diff options
Diffstat (limited to 'wp-includes/js/dist/customize-widgets.js')
-rw-r--r-- | wp-includes/js/dist/customize-widgets.js | 373 |
1 files changed, 188 insertions, 185 deletions
diff --git a/wp-includes/js/dist/customize-widgets.js b/wp-includes/js/dist/customize-widgets.js index 70f8854..71b52fb 100644 --- a/wp-includes/js/dist/customize-widgets.js +++ b/wp-includes/js/dist/customize-widgets.js @@ -1,8 +1,8 @@ -/******/ (function() { // webpackBootstrap +/******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 4403: -/***/ (function(module, exports) { +/***/ 5755: +/***/ ((module, exports) => { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2018 Jed Watson. @@ -67,8 +67,8 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! /***/ }), -/***/ 5619: -/***/ (function(module) { +/***/ 7734: +/***/ ((module) => { "use strict"; @@ -175,123 +175,125 @@ module.exports = function equal(a, b) { /******/ /************************************************************************/ /******/ /* webpack/runtime/compat get default export */ -/******/ !function() { +/******/ (() => { /******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { +/******/ __webpack_require__.n = (module) => { /******/ var getter = module && module.__esModule ? -/******/ function() { return module['default']; } : -/******/ function() { return module; }; +/******/ () => (module['default']) : +/******/ () => (module); /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; -/******/ }(); +/******/ })(); /******/ /******/ /* webpack/runtime/define property getters */ -/******/ !function() { +/******/ (() => { /******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = function(exports, definition) { +/******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; -/******/ }(); +/******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ !function() { -/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } -/******/ }(); +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ -/******/ !function() { +/******/ (() => { /******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { +/******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; -/******/ }(); +/******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be in strict mode. -!function() { +(() => { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { - initialize: function() { return /* binding */ initialize; }, - store: function() { return /* reexport */ store; } + initialize: () => (/* binding */ initialize), + store: () => (/* reexport */ store) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/customize-widgets/build-module/store/selectors.js var selectors_namespaceObject = {}; __webpack_require__.r(selectors_namespaceObject); __webpack_require__.d(selectors_namespaceObject, { - __experimentalGetInsertionPoint: function() { return __experimentalGetInsertionPoint; }, - isInserterOpened: function() { return isInserterOpened; } + __experimentalGetInsertionPoint: () => (__experimentalGetInsertionPoint), + isInserterOpened: () => (isInserterOpened) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/customize-widgets/build-module/store/actions.js var actions_namespaceObject = {}; __webpack_require__.r(actions_namespaceObject); __webpack_require__.d(actions_namespaceObject, { - setIsInserterOpened: function() { return setIsInserterOpened; } + setIsInserterOpened: () => (setIsInserterOpened) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/interface/build-module/store/actions.js var store_actions_namespaceObject = {}; __webpack_require__.r(store_actions_namespaceObject); __webpack_require__.d(store_actions_namespaceObject, { - closeModal: function() { return closeModal; }, - disableComplementaryArea: function() { return disableComplementaryArea; }, - enableComplementaryArea: function() { return enableComplementaryArea; }, - openModal: function() { return openModal; }, - pinItem: function() { return pinItem; }, - setDefaultComplementaryArea: function() { return setDefaultComplementaryArea; }, - setFeatureDefaults: function() { return setFeatureDefaults; }, - setFeatureValue: function() { return setFeatureValue; }, - toggleFeature: function() { return toggleFeature; }, - unpinItem: function() { return unpinItem; } + closeModal: () => (closeModal), + disableComplementaryArea: () => (disableComplementaryArea), + enableComplementaryArea: () => (enableComplementaryArea), + openModal: () => (openModal), + pinItem: () => (pinItem), + setDefaultComplementaryArea: () => (setDefaultComplementaryArea), + setFeatureDefaults: () => (setFeatureDefaults), + setFeatureValue: () => (setFeatureValue), + toggleFeature: () => (toggleFeature), + unpinItem: () => (unpinItem) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/interface/build-module/store/selectors.js var store_selectors_namespaceObject = {}; __webpack_require__.r(store_selectors_namespaceObject); __webpack_require__.d(store_selectors_namespaceObject, { - getActiveComplementaryArea: function() { return getActiveComplementaryArea; }, - isComplementaryAreaLoading: function() { return isComplementaryAreaLoading; }, - isFeatureActive: function() { return isFeatureActive; }, - isItemPinned: function() { return isItemPinned; }, - isModalActive: function() { return isModalActive; } + getActiveComplementaryArea: () => (getActiveComplementaryArea), + isComplementaryAreaLoading: () => (isComplementaryAreaLoading), + isFeatureActive: () => (isFeatureActive), + isItemPinned: () => (isItemPinned), + isModalActive: () => (isModalActive) }); +;// CONCATENATED MODULE: external "React" +const external_React_namespaceObject = window["React"]; ;// CONCATENATED MODULE: external ["wp","element"] -var external_wp_element_namespaceObject = window["wp"]["element"]; +const external_wp_element_namespaceObject = window["wp"]["element"]; ;// CONCATENATED MODULE: external ["wp","blockLibrary"] -var external_wp_blockLibrary_namespaceObject = window["wp"]["blockLibrary"]; +const external_wp_blockLibrary_namespaceObject = window["wp"]["blockLibrary"]; ;// CONCATENATED MODULE: external ["wp","widgets"] -var external_wp_widgets_namespaceObject = window["wp"]["widgets"]; +const external_wp_widgets_namespaceObject = window["wp"]["widgets"]; ;// CONCATENATED MODULE: external ["wp","blocks"] -var external_wp_blocks_namespaceObject = window["wp"]["blocks"]; +const external_wp_blocks_namespaceObject = window["wp"]["blocks"]; ;// CONCATENATED MODULE: external ["wp","data"] -var external_wp_data_namespaceObject = window["wp"]["data"]; +const external_wp_data_namespaceObject = window["wp"]["data"]; ;// CONCATENATED MODULE: external ["wp","preferences"] -var external_wp_preferences_namespaceObject = window["wp"]["preferences"]; +const external_wp_preferences_namespaceObject = window["wp"]["preferences"]; ;// CONCATENATED MODULE: external ["wp","components"] -var external_wp_components_namespaceObject = window["wp"]["components"]; +const external_wp_components_namespaceObject = window["wp"]["components"]; ;// CONCATENATED MODULE: external ["wp","i18n"] -var external_wp_i18n_namespaceObject = window["wp"]["i18n"]; +const external_wp_i18n_namespaceObject = window["wp"]["i18n"]; ;// CONCATENATED MODULE: external ["wp","blockEditor"] -var external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"]; +const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"]; ;// CONCATENATED MODULE: external ["wp","compose"] -var external_wp_compose_namespaceObject = window["wp"]["compose"]; +const external_wp_compose_namespaceObject = window["wp"]["compose"]; ;// CONCATENATED MODULE: external ["wp","hooks"] -var external_wp_hooks_namespaceObject = window["wp"]["hooks"]; +const external_wp_hooks_namespaceObject = window["wp"]["hooks"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/error-boundary/index.js /** @@ -308,7 +310,7 @@ function CopyButton({ children }) { const ref = (0,external_wp_compose_namespaceObject.useCopyToClipboard)(text); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "secondary", ref: ref }, children); @@ -333,9 +335,9 @@ class ErrorBoundary extends external_wp_element_namespaceObject.Component { if (!error) { return this.props.children; } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, { className: "customize-widgets-error-boundary", - actions: [(0,external_wp_element_namespaceObject.createElement)(CopyButton, { + actions: [(0,external_React_namespaceObject.createElement)(CopyButton, { key: "copy-error", text: error.stack }, (0,external_wp_i18n_namespaceObject.__)('Copy Error'))] @@ -344,9 +346,9 @@ class ErrorBoundary extends external_wp_element_namespaceObject.Component { } ;// CONCATENATED MODULE: external ["wp","coreData"] -var external_wp_coreData_namespaceObject = window["wp"]["coreData"]; +const external_wp_coreData_namespaceObject = window["wp"]["coreData"]; ;// CONCATENATED MODULE: external ["wp","mediaUtils"] -var external_wp_mediaUtils_namespaceObject = window["wp"]["mediaUtils"]; +const external_wp_mediaUtils_namespaceObject = window["wp"]["mediaUtils"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/block-inspector-button/index.js /** @@ -364,7 +366,7 @@ function BlockInspectorButton({ }) { const selectedBlockClientId = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getSelectedBlockClientId(), []); const selectedBlock = (0,external_wp_element_namespaceObject.useMemo)(() => document.getElementById(`block-${selectedBlockClientId}`), [selectedBlockClientId]); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { onClick: () => { // Open the inspector. inspector.open({ @@ -376,28 +378,28 @@ function BlockInspectorButton({ ...props }, (0,external_wp_i18n_namespaceObject.__)('Show more settings')); } -/* harmony default export */ var block_inspector_button = (BlockInspectorButton); +/* harmony default export */ const block_inspector_button = (BlockInspectorButton); // EXTERNAL MODULE: ./node_modules/classnames/index.js -var classnames = __webpack_require__(4403); +var classnames = __webpack_require__(5755); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); ;// CONCATENATED MODULE: external ["wp","keycodes"] -var external_wp_keycodes_namespaceObject = window["wp"]["keycodes"]; +const external_wp_keycodes_namespaceObject = window["wp"]["keycodes"]; ;// CONCATENATED MODULE: external ["wp","primitives"] -var external_wp_primitives_namespaceObject = window["wp"]["primitives"]; +const external_wp_primitives_namespaceObject = window["wp"]["primitives"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/undo.js /** * WordPress dependencies */ -const undo = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const undo = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z" })); -/* harmony default export */ var library_undo = (undo); +/* harmony default export */ const library_undo = (undo); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/redo.js @@ -405,13 +407,13 @@ const undo = (0,external_wp_element_namespaceObject.createElement)(external_wp_p * WordPress dependencies */ -const redo = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const redo = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z" })); -/* harmony default export */ var library_redo = (redo); +/* harmony default export */ const library_redo = (redo); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/plus.js @@ -419,13 +421,13 @@ const redo = (0,external_wp_element_namespaceObject.createElement)(external_wp_p * WordPress dependencies */ -const plus = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const plus = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { - d: "M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z" +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { + d: "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z" })); -/* harmony default export */ var library_plus = (plus); +/* harmony default export */ const library_plus = (plus); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js @@ -433,13 +435,13 @@ const plus = (0,external_wp_element_namespaceObject.createElement)(external_wp_p * WordPress dependencies */ -const closeSmall = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const closeSmall = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z" })); -/* harmony default export */ var close_small = (closeSmall); +/* harmony default export */ const close_small = (closeSmall); ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/store/reducer.js /** @@ -460,7 +462,7 @@ function blockInserterPanel(state = false, action) { } return state; } -/* harmony default export */ var reducer = ((0,external_wp_data_namespaceObject.combineReducers)({ +/* harmony default export */ const reducer = ((0,external_wp_data_namespaceObject.combineReducers)({ blockInserterPanel })); @@ -526,11 +528,11 @@ function __experimentalGetInsertionPoint(state) { * * @example * ```js + * import { useState } from 'react'; * import { store as customizeWidgetsStore } from '@wordpress/customize-widgets'; * import { __ } from '@wordpress/i18n'; * import { useDispatch } from '@wordpress/data'; * import { Button } from '@wordpress/components'; - * import { useState } from '@wordpress/element'; * * const ExampleComponent = () => { * const { setIsInserterOpened } = useDispatch( customizeWidgetsStore ); @@ -622,29 +624,29 @@ function Inserter({ }) { const inserterTitleId = (0,external_wp_compose_namespaceObject.useInstanceId)(Inserter, 'customize-widget-layout__inserter-panel-title'); const insertionPoint = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).__experimentalGetInsertionPoint(), []); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: "customize-widgets-layout__inserter-panel", "aria-labelledby": inserterTitleId - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "customize-widgets-layout__inserter-panel-header" - }, (0,external_wp_element_namespaceObject.createElement)("h2", { + }, (0,external_React_namespaceObject.createElement)("h2", { id: inserterTitleId, className: "customize-widgets-layout__inserter-panel-header-title" - }, (0,external_wp_i18n_namespaceObject.__)('Add a block')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_wp_i18n_namespaceObject.__)('Add a block')), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { className: "customize-widgets-layout__inserter-panel-header-close-button", icon: close_small, onClick: () => setIsOpened(false), "aria-label": (0,external_wp_i18n_namespaceObject.__)('Close inserter') - })), (0,external_wp_element_namespaceObject.createElement)("div", { + })), (0,external_React_namespaceObject.createElement)("div", { className: "customize-widgets-layout__inserter-panel-content" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalLibrary, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalLibrary, { rootClientId: insertionPoint.rootClientId, __experimentalInsertionIndex: insertionPoint.insertionIndex, showInserterHelpPanel: true, onSelect: () => setIsOpened(false) }))); } -/* harmony default export */ var components_inserter = (Inserter); +/* harmony default export */ const components_inserter = (Inserter); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/external.js @@ -652,29 +654,29 @@ function Inserter({ * WordPress dependencies */ -const external = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const external = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z" })); -/* harmony default export */ var library_external = (external); +/* harmony default export */ const library_external = (external); ;// CONCATENATED MODULE: external ["wp","keyboardShortcuts"] -var external_wp_keyboardShortcuts_namespaceObject = window["wp"]["keyboardShortcuts"]; +const external_wp_keyboardShortcuts_namespaceObject = window["wp"]["keyboardShortcuts"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/more-vertical.js /** * WordPress dependencies */ -const moreVertical = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const moreVertical = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" })); -/* harmony default export */ var more_vertical = (moreVertical); +/* harmony default export */ const more_vertical = (moreVertical); ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/more-menu-dropdown/index.js @@ -698,7 +700,7 @@ function MoreMenuDropdown({ toggleProps, children }) { - return (0,external_wp_element_namespaceObject.createElement)(DropdownComponent, { + return (0,external_React_namespaceObject.createElement)(DropdownComponent, { className: classnames_default()('interface-more-menu-dropdown', className), icon: more_vertical, label: label, @@ -709,7 +711,8 @@ function MoreMenuDropdown({ }, toggleProps: { tooltipPosition: 'bottom', - ...toggleProps + ...toggleProps, + size: 'compact' } }, onClose => children(onClose)); } @@ -725,12 +728,8 @@ function MoreMenuDropdown({ - - - - ;// CONCATENATED MODULE: external ["wp","deprecated"] -var external_wp_deprecated_namespaceObject = window["wp"]["deprecated"]; +const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"]; var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject); ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/actions.js /** @@ -1062,7 +1061,7 @@ function activeModal(state = null, action) { } return state; } -/* harmony default export */ var store_reducer = ((0,external_wp_data_namespaceObject.combineReducers)({ +/* harmony default export */ const store_reducer = ((0,external_wp_data_namespaceObject.combineReducers)({ complementaryAreas, activeModal })); @@ -1189,16 +1188,16 @@ function KeyCombination({ }) { const shortcut = keyCombination.modifier ? external_wp_keycodes_namespaceObject.displayShortcutList[keyCombination.modifier](keyCombination.character) : keyCombination.character; const ariaLabel = keyCombination.modifier ? external_wp_keycodes_namespaceObject.shortcutAriaLabel[keyCombination.modifier](keyCombination.character) : keyCombination.character; - return (0,external_wp_element_namespaceObject.createElement)("kbd", { + return (0,external_React_namespaceObject.createElement)("kbd", { className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-key-combination", "aria-label": forceAriaLabel || ariaLabel }, (Array.isArray(shortcut) ? shortcut : [shortcut]).map((character, index) => { if (character === '+') { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, { + return (0,external_React_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, { key: index }, character); } - return (0,external_wp_element_namespaceObject.createElement)("kbd", { + return (0,external_React_namespaceObject.createElement)("kbd", { key: index, className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-key" }, character); @@ -1210,20 +1209,20 @@ function Shortcut({ aliases = [], ariaLabel }) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("div", { className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-description" - }, description), (0,external_wp_element_namespaceObject.createElement)("div", { + }, description), (0,external_React_namespaceObject.createElement)("div", { className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-term" - }, (0,external_wp_element_namespaceObject.createElement)(KeyCombination, { + }, (0,external_React_namespaceObject.createElement)(KeyCombination, { keyCombination: keyCombination, forceAriaLabel: ariaLabel - }), aliases.map((alias, index) => (0,external_wp_element_namespaceObject.createElement)(KeyCombination, { + }), aliases.map((alias, index) => (0,external_React_namespaceObject.createElement)(KeyCombination, { keyCombination: alias, forceAriaLabel: ariaLabel, key: index })))); } -/* harmony default export */ var keyboard_shortcut_help_modal_shortcut = (Shortcut); +/* harmony default export */ const keyboard_shortcut_help_modal_shortcut = (Shortcut); ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js @@ -1259,13 +1258,13 @@ function DynamicShortcut({ if (!keyCombination) { return null; } - return (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcut_help_modal_shortcut, { + return (0,external_React_namespaceObject.createElement)(keyboard_shortcut_help_modal_shortcut, { keyCombination: keyCombination, description: description, aliases: aliases }); } -/* harmony default export */ var dynamic_shortcut = (DynamicShortcut); +/* harmony default export */ const dynamic_shortcut = (DynamicShortcut); ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcut-help-modal/index.js @@ -1296,28 +1295,27 @@ const ShortcutList = ({ * Safari+VoiceOver won't announce the list otherwise. */ /* eslint-disable jsx-a11y/no-redundant-roles */ -(0,external_wp_element_namespaceObject.createElement)("ul", { +(0,external_React_namespaceObject.createElement)("ul", { className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-list", role: "list" -}, shortcuts.map((shortcut, index) => (0,external_wp_element_namespaceObject.createElement)("li", { +}, shortcuts.map((shortcut, index) => (0,external_React_namespaceObject.createElement)("li", { className: "customize-widgets-keyboard-shortcut-help-modal__shortcut", key: index -}, typeof shortcut === 'string' ? (0,external_wp_element_namespaceObject.createElement)(dynamic_shortcut, { +}, typeof shortcut === 'string' ? (0,external_React_namespaceObject.createElement)(dynamic_shortcut, { name: shortcut -}) : (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcut_help_modal_shortcut, { +}) : (0,external_React_namespaceObject.createElement)(keyboard_shortcut_help_modal_shortcut, { ...shortcut })))) /* eslint-enable jsx-a11y/no-redundant-roles */; - const ShortcutSection = ({ title, shortcuts, className -}) => (0,external_wp_element_namespaceObject.createElement)("section", { +}) => (0,external_React_namespaceObject.createElement)("section", { className: classnames_default()('customize-widgets-keyboard-shortcut-help-modal__section', className) -}, !!title && (0,external_wp_element_namespaceObject.createElement)("h2", { +}, !!title && (0,external_React_namespaceObject.createElement)("h2", { className: "customize-widgets-keyboard-shortcut-help-modal__section-title" -}, title), (0,external_wp_element_namespaceObject.createElement)(ShortcutList, { +}, title), (0,external_React_namespaceObject.createElement)(ShortcutList, { shortcuts: shortcuts })); const ShortcutCategorySection = ({ @@ -1328,7 +1326,7 @@ const ShortcutCategorySection = ({ const categoryShortcuts = (0,external_wp_data_namespaceObject.useSelect)(select => { return select(external_wp_keyboardShortcuts_namespaceObject.store).getCategoryShortcuts(categoryName); }, [categoryName]); - return (0,external_wp_element_namespaceObject.createElement)(ShortcutSection, { + return (0,external_React_namespaceObject.createElement)(ShortcutSection, { title: title, shortcuts: categoryShortcuts.concat(additionalShortcuts) }); @@ -1353,20 +1351,20 @@ function KeyboardShortcutHelpModal({ if (!isModalActive) { return null; } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, { className: "customize-widgets-keyboard-shortcut-help-modal", title: (0,external_wp_i18n_namespaceObject.__)('Keyboard shortcuts'), onRequestClose: toggleModal - }, (0,external_wp_element_namespaceObject.createElement)(ShortcutSection, { + }, (0,external_React_namespaceObject.createElement)(ShortcutSection, { className: "customize-widgets-keyboard-shortcut-help-modal__main-shortcuts", shortcuts: ['core/customize-widgets/keyboard-shortcuts'] - }), (0,external_wp_element_namespaceObject.createElement)(ShortcutCategorySection, { + }), (0,external_React_namespaceObject.createElement)(ShortcutCategorySection, { title: (0,external_wp_i18n_namespaceObject.__)('Global shortcuts'), categoryName: "global" - }), (0,external_wp_element_namespaceObject.createElement)(ShortcutCategorySection, { + }), (0,external_React_namespaceObject.createElement)(ShortcutCategorySection, { title: (0,external_wp_i18n_namespaceObject.__)('Selection shortcuts'), categoryName: "selection" - }), (0,external_wp_element_namespaceObject.createElement)(ShortcutCategorySection, { + }), (0,external_React_namespaceObject.createElement)(ShortcutCategorySection, { title: (0,external_wp_i18n_namespaceObject.__)('Block shortcuts'), categoryName: "block", additionalShortcuts: [{ @@ -1377,7 +1375,7 @@ function KeyboardShortcutHelpModal({ /* translators: The forward-slash character. e.g. '/'. */ ariaLabel: (0,external_wp_i18n_namespaceObject.__)('Forward-slash') }] - }), (0,external_wp_element_namespaceObject.createElement)(ShortcutSection, { + }), (0,external_React_namespaceObject.createElement)(ShortcutSection, { title: (0,external_wp_i18n_namespaceObject.__)('Text formatting'), shortcuts: textFormattingShortcuts })); @@ -1405,47 +1403,47 @@ function MoreMenu() { const [isKeyboardShortcutsModalActive, setIsKeyboardShortcutsModalVisible] = (0,external_wp_element_namespaceObject.useState)(false); const toggleKeyboardShortcutsModal = () => setIsKeyboardShortcutsModalVisible(!isKeyboardShortcutsModalActive); (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/customize-widgets/keyboard-shortcuts', toggleKeyboardShortcutsModal); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(MoreMenuDropdown, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(MoreMenuDropdown, { as: external_wp_components_namespaceObject.ToolbarDropdownMenu - }, () => (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, { + }, () => (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, { label: (0,external_wp_i18n_namespaceObject._x)('View', 'noun') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, { + }, (0,external_React_namespaceObject.createElement)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, { scope: "core/customize-widgets", name: "fixedToolbar", label: (0,external_wp_i18n_namespaceObject.__)('Top toolbar'), info: (0,external_wp_i18n_namespaceObject.__)('Access all block and document tools in a single place'), messageActivated: (0,external_wp_i18n_namespaceObject.__)('Top toolbar activated'), messageDeactivated: (0,external_wp_i18n_namespaceObject.__)('Top toolbar deactivated') - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, { + })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, { label: (0,external_wp_i18n_namespaceObject.__)('Tools') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { onClick: () => { setIsKeyboardShortcutsModalVisible(true); }, shortcut: external_wp_keycodes_namespaceObject.displayShortcut.access('h') - }, (0,external_wp_i18n_namespaceObject.__)('Keyboard shortcuts')), (0,external_wp_element_namespaceObject.createElement)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, { + }, (0,external_wp_i18n_namespaceObject.__)('Keyboard shortcuts')), (0,external_React_namespaceObject.createElement)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, { scope: "core/customize-widgets", name: "welcomeGuide", label: (0,external_wp_i18n_namespaceObject.__)('Welcome Guide') - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { role: "menuitem", icon: library_external, href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/documentation/article/block-based-widgets-editor/'), target: "_blank", rel: "noopener noreferrer" - }, (0,external_wp_i18n_namespaceObject.__)('Help'), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, { + }, (0,external_wp_i18n_namespaceObject.__)('Help'), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, { as: "span" }, /* translators: accessibility text */ - (0,external_wp_i18n_namespaceObject.__)('(opens in a new tab)')))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, { + (0,external_wp_i18n_namespaceObject.__)('(opens in a new tab)')))), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, { label: (0,external_wp_i18n_namespaceObject.__)('Preferences') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, { + }, (0,external_React_namespaceObject.createElement)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, { scope: "core/customize-widgets", name: "keepCaretInsideBlock", label: (0,external_wp_i18n_namespaceObject.__)('Contain text cursor inside block'), info: (0,external_wp_i18n_namespaceObject.__)('Aids screen readers by stopping text caret from leaving blocks.'), messageActivated: (0,external_wp_i18n_namespaceObject.__)('Contain text cursor inside block activated'), messageDeactivated: (0,external_wp_i18n_namespaceObject.__)('Contain text cursor inside block deactivated') - })))), (0,external_wp_element_namespaceObject.createElement)(KeyboardShortcutHelpModal, { + })))), (0,external_React_namespaceObject.createElement)(KeyboardShortcutHelpModal, { isModalActive: isKeyboardShortcutsModalActive, toggleModal: toggleKeyboardShortcutsModal })); @@ -1487,14 +1485,14 @@ function Header({ setUndoRedo([sidebar.hasUndo(), sidebar.hasRedo()]); }); }, [sidebar]); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("div", { className: classnames_default()('customize-widgets-header', { 'is-fixed-toolbar-active': isFixedToolbarActive }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.NavigableToolbar, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.NavigableToolbar, { className: "customize-widgets-header-toolbar", "aria-label": (0,external_wp_i18n_namespaceObject.__)('Document tools') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { icon: !(0,external_wp_i18n_namespaceObject.isRTL)() ? library_undo : library_redo /* translators: button label text should, if possible, be under 16 characters. */, label: (0,external_wp_i18n_namespaceObject.__)('Undo'), @@ -1506,7 +1504,7 @@ function Header({ "aria-disabled": !hasUndo, onClick: sidebar.undo, className: "customize-widgets-editor-history-button undo-button" - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { icon: !(0,external_wp_i18n_namespaceObject.isRTL)() ? library_redo : library_undo /* translators: button label text should, if possible, be under 16 characters. */, label: (0,external_wp_i18n_namespaceObject.__)('Redo'), @@ -1518,7 +1516,7 @@ function Header({ "aria-disabled": !hasRedo, onClick: sidebar.redo, className: "customize-widgets-editor-history-button redo-button" - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { className: "customize-widgets-header-toolbar__inserter-toggle", isPressed: isInserterOpened, variant: "primary", @@ -1527,11 +1525,11 @@ function Header({ onClick: () => { setIsInserterOpened(isOpen => !isOpen); } - }), (0,external_wp_element_namespaceObject.createElement)(MoreMenu, null))), (0,external_wp_element_namespaceObject.createPortal)((0,external_wp_element_namespaceObject.createElement)(components_inserter, { + }), (0,external_React_namespaceObject.createElement)(MoreMenu, null))), (0,external_wp_element_namespaceObject.createPortal)((0,external_React_namespaceObject.createElement)(components_inserter, { setIsOpened: setIsInserterOpened }), inserter.contentContainer[0])); } -/* harmony default export */ var header = (Header); +/* harmony default export */ const header = (Header); ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/inserter/use-inserter.js /** @@ -1566,10 +1564,10 @@ function useInserter(inserter) { } // EXTERNAL MODULE: ./node_modules/fast-deep-equal/es6/index.js -var es6 = __webpack_require__(5619); +var es6 = __webpack_require__(7734); var es6_default = /*#__PURE__*/__webpack_require__.n(es6); ;// CONCATENATED MODULE: external ["wp","isShallowEqual"] -var external_wp_isShallowEqual_namespaceObject = window["wp"]["isShallowEqual"]; +const external_wp_isShallowEqual_namespaceObject = window["wp"]["isShallowEqual"]; var external_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(external_wp_isShallowEqual_namespaceObject); ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/utils.js // @ts-check @@ -1856,7 +1854,7 @@ function FocusControl({ }; }, [api, focusWidget]); const context = (0,external_wp_element_namespaceObject.useMemo)(() => [focusedWidgetIdRef, focusWidget], [focusedWidgetIdRef, focusWidget]); - return (0,external_wp_element_namespaceObject.createElement)(FocusControlContext.Provider, { + return (0,external_React_namespaceObject.createElement)(FocusControlContext.Provider, { value: context }, children); } @@ -1900,7 +1898,7 @@ function useBlocksFocusControl(blocks) { } ;// CONCATENATED MODULE: external ["wp","privateApis"] -var external_wp_privateApis_namespaceObject = window["wp"]["privateApis"]; +const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/lock-unlock.js /** * WordPress dependencies @@ -1934,7 +1932,7 @@ function SidebarEditorProvider({ }) { const [blocks, onInput, onChange] = useSidebarBlockEditor(sidebar); useBlocksFocusControl(blocks); - return (0,external_wp_element_namespaceObject.createElement)(ExperimentalBlockEditorProvider, { + return (0,external_React_namespaceObject.createElement)(ExperimentalBlockEditorProvider, { value: blocks, onInput: onInput, onChange: onChange, @@ -1959,36 +1957,36 @@ function WelcomeGuide({ toggle } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store); const isEntirelyBlockWidgets = sidebar.getWidgets().every(widget => widget.id.startsWith('block-')); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: "customize-widgets-welcome-guide" - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "customize-widgets-welcome-guide__image__wrapper" - }, (0,external_wp_element_namespaceObject.createElement)("picture", null, (0,external_wp_element_namespaceObject.createElement)("source", { + }, (0,external_React_namespaceObject.createElement)("picture", null, (0,external_React_namespaceObject.createElement)("source", { srcSet: "https://s.w.org/images/block-editor/welcome-editor.svg", media: "(prefers-reduced-motion: reduce)" - }), (0,external_wp_element_namespaceObject.createElement)("img", { + }), (0,external_React_namespaceObject.createElement)("img", { className: "customize-widgets-welcome-guide__image", src: "https://s.w.org/images/block-editor/welcome-editor.gif", width: "312", height: "240", alt: "" - }))), (0,external_wp_element_namespaceObject.createElement)("h1", { + }))), (0,external_React_namespaceObject.createElement)("h1", { className: "customize-widgets-welcome-guide__heading" - }, (0,external_wp_i18n_namespaceObject.__)('Welcome to block Widgets')), (0,external_wp_element_namespaceObject.createElement)("p", { + }, (0,external_wp_i18n_namespaceObject.__)('Welcome to block Widgets')), (0,external_React_namespaceObject.createElement)("p", { className: "customize-widgets-welcome-guide__text" - }, isEntirelyBlockWidgets ? (0,external_wp_i18n_namespaceObject.__)('Your theme provides different “block” areas for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.') : (0,external_wp_i18n_namespaceObject.__)('You can now add any block to your site’s widget areas. Don’t worry, all of your favorite widgets still work flawlessly.')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, isEntirelyBlockWidgets ? (0,external_wp_i18n_namespaceObject.__)('Your theme provides different “block” areas for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.') : (0,external_wp_i18n_namespaceObject.__)('You can now add any block to your site’s widget areas. Don’t worry, all of your favorite widgets still work flawlessly.')), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { className: "customize-widgets-welcome-guide__button", variant: "primary", onClick: () => toggle('core/customize-widgets', 'welcomeGuide') - }, (0,external_wp_i18n_namespaceObject.__)('Got it')), (0,external_wp_element_namespaceObject.createElement)("hr", { + }, (0,external_wp_i18n_namespaceObject.__)('Got it')), (0,external_React_namespaceObject.createElement)("hr", { className: "customize-widgets-welcome-guide__separator" - }), !isEntirelyBlockWidgets && (0,external_wp_element_namespaceObject.createElement)("p", { + }), !isEntirelyBlockWidgets && (0,external_React_namespaceObject.createElement)("p", { className: "customize-widgets-welcome-guide__more-info" - }, (0,external_wp_i18n_namespaceObject.__)('Want to stick with the old widgets?'), (0,external_wp_element_namespaceObject.createElement)("br", null), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, { + }, (0,external_wp_i18n_namespaceObject.__)('Want to stick with the old widgets?'), (0,external_React_namespaceObject.createElement)("br", null), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, { href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/plugins/classic-widgets/') - }, (0,external_wp_i18n_namespaceObject.__)('Get the Classic Widgets plugin.'))), (0,external_wp_element_namespaceObject.createElement)("p", { + }, (0,external_wp_i18n_namespaceObject.__)('Get the Classic Widgets plugin.'))), (0,external_React_namespaceObject.createElement)("p", { className: "customize-widgets-welcome-guide__more-info" - }, (0,external_wp_i18n_namespaceObject.__)('New to the block editor?'), (0,external_wp_element_namespaceObject.createElement)("br", null), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, { + }, (0,external_wp_i18n_namespaceObject.__)('New to the block editor?'), (0,external_React_namespaceObject.createElement)("br", null), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, { href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/documentation/article/wordpress-block-editor/') }, (0,external_wp_i18n_namespaceObject.__)("Here's a detailed guide.")))); } @@ -2130,7 +2128,7 @@ function KeyboardShortcutsRegister() { return null; } KeyboardShortcuts.Register = KeyboardShortcutsRegister; -/* harmony default export */ var keyboard_shortcuts = (KeyboardShortcuts); +/* harmony default export */ const keyboard_shortcuts = (KeyboardShortcuts); ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/block-appender/index.js @@ -2156,7 +2154,7 @@ function BlockAppender(props) { } } }, [isBlocksListEmpty]); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.ButtonBlockAppender, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.ButtonBlockAppender, { ...props, ref: ref }); @@ -2174,6 +2172,7 @@ function BlockAppender(props) { + /** * Internal dependencies */ @@ -2195,6 +2194,7 @@ function SidebarBlockEditor({ inspector }) { const [isInserterOpened, setIsInserterOpened] = useInserter(inserter); + const isMediumViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('small'); const { hasUploadPermissions, isFixedToolbarActive, @@ -2232,43 +2232,45 @@ function SidebarBlockEditor({ ...blockEditorSettings, __experimentalSetIsInserterOpened: setIsInserterOpened, mediaUpload: mediaUploadBlockEditor, - hasFixedToolbar: isFixedToolbarActive, + hasFixedToolbar: isFixedToolbarActive || !isMediumViewport, keepCaretInsideBlock, __unstableHasCustomAppender: true }; - }, [hasUploadPermissions, blockEditorSettings, isFixedToolbarActive, keepCaretInsideBlock, setIsInserterOpened]); + }, [hasUploadPermissions, blockEditorSettings, isFixedToolbarActive, isMediumViewport, keepCaretInsideBlock, setIsInserterOpened]); if (isWelcomeGuideActive) { - return (0,external_wp_element_namespaceObject.createElement)(WelcomeGuide, { + return (0,external_React_namespaceObject.createElement)(WelcomeGuide, { sidebar: sidebar }); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcuts.Register, null), (0,external_wp_element_namespaceObject.createElement)(SidebarEditorProvider, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(keyboard_shortcuts.Register, null), (0,external_React_namespaceObject.createElement)(SidebarEditorProvider, { sidebar: sidebar, settings: settings - }, (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcuts, { + }, (0,external_React_namespaceObject.createElement)(keyboard_shortcuts, { undo: sidebar.undo, redo: sidebar.redo, save: sidebar.save - }), (0,external_wp_element_namespaceObject.createElement)(header, { + }), (0,external_React_namespaceObject.createElement)(header, { sidebar: sidebar, inserter: inserter, isInserterOpened: isInserterOpened, setIsInserterOpened: setIsInserterOpened, - isFixedToolbarActive: isFixedToolbarActive - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockTools, null, (0,external_wp_element_namespaceObject.createElement)(BlockCanvas, { + isFixedToolbarActive: isFixedToolbarActive || !isMediumViewport + }), (isFixedToolbarActive || !isMediumViewport) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockToolbar, { + hideDragHandle: true + }), (0,external_React_namespaceObject.createElement)(BlockCanvas, { shouldIframe: false, styles: settings.defaultEditorStyles, height: "100%" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockList, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockList, { renderAppender: BlockAppender - }))), (0,external_wp_element_namespaceObject.createPortal)( + })), (0,external_wp_element_namespaceObject.createPortal)( // This is a temporary hack to prevent button component inside <BlockInspector> // from submitting form when type="button" is not specified. - (0,external_wp_element_namespaceObject.createElement)("form", { + (0,external_React_namespaceObject.createElement)("form", { onSubmit: event => event.preventDefault() - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockInspector, null)), inspector.contentContainer[0])), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__unstableBlockSettingsMenuFirstItem, null, ({ + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockInspector, null)), inspector.contentContainer[0])), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__unstableBlockSettingsMenuFirstItem, null, ({ onClose - }) => (0,external_wp_element_namespaceObject.createElement)(block_inspector_button, { + }) => (0,external_React_namespaceObject.createElement)(block_inspector_button, { inspector: inspector, closeMenu: onClose }))); @@ -2290,7 +2292,7 @@ function SidebarControls({ sidebarControls, activeSidebarControl }), [sidebarControls, activeSidebarControl]); - return (0,external_wp_element_namespaceObject.createElement)(SidebarControlsContext.Provider, { + return (0,external_React_namespaceObject.createElement)(SidebarControlsContext.Provider, { value: context }, children); } @@ -2412,7 +2414,7 @@ function CustomizeWidgets({ unsubscribers.forEach(unsubscriber => unsubscriber()); }; }, [sidebarControls]); - const activeSidebar = activeSidebarControl && (0,external_wp_element_namespaceObject.createPortal)((0,external_wp_element_namespaceObject.createElement)(ErrorBoundary, null, (0,external_wp_element_namespaceObject.createElement)(SidebarBlockEditor, { + const activeSidebar = activeSidebarControl && (0,external_wp_element_namespaceObject.createPortal)((0,external_React_namespaceObject.createElement)(ErrorBoundary, null, (0,external_React_namespaceObject.createElement)(SidebarBlockEditor, { key: activeSidebarControl.id, blockEditorSettings: blockEditorSettings, sidebar: activeSidebarControl.sidebarAdapter, @@ -2422,14 +2424,14 @@ function CustomizeWidgets({ // We have to portal this to the parent of both the editor and the inspector, // so that the popovers will appear above both of them. - const popover = parentContainer && (0,external_wp_element_namespaceObject.createPortal)((0,external_wp_element_namespaceObject.createElement)("div", { + const popover = parentContainer && (0,external_wp_element_namespaceObject.createPortal)((0,external_React_namespaceObject.createElement)("div", { className: "customize-widgets-popover", ref: popoverRef - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Popover.Slot, null)), parentContainer); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SlotFillProvider, null, (0,external_wp_element_namespaceObject.createElement)(SidebarControls, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Popover.Slot, null)), parentContainer); + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SlotFillProvider, null, (0,external_React_namespaceObject.createElement)(SidebarControls, { sidebarControls: sidebarControls, activeSidebarControl: activeSidebarControl - }, (0,external_wp_element_namespaceObject.createElement)(FocusControl, { + }, (0,external_React_namespaceObject.createElement)(FocusControl, { api: api, sidebarControls: sidebarControls }, activeSidebar, popover))); @@ -2865,7 +2867,7 @@ class SidebarAdapter { } ;// CONCATENATED MODULE: external ["wp","dom"] -var external_wp_dom_namespaceObject = window["wp"]["dom"]; +const external_wp_dom_namespaceObject = window["wp"]["dom"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/controls/inserter-outer-section.js /** * WordPress dependencies @@ -3090,9 +3092,9 @@ const withMoveToSidebarToolbarItem = (0,external_wp_compose_namespaceObject.crea // Move focus to the moved widget and expand the sidebar. focusWidget(widgetId); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(BlockEdit, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(BlockEdit, { ...props - }), hasMultipleSidebars && canInsertBlockInSidebar && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_widgets_namespaceObject.MoveToWidgetArea, { + }), hasMultipleSidebars && canInsertBlockInSidebar && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_widgets_namespaceObject.MoveToWidgetArea, { widgetAreas: sidebarControls.map(sidebarControl => ({ id: sidebarControl.id, name: sidebarControl.params.label, @@ -3129,7 +3131,7 @@ const withWideWidgetDisplay = (0,external_wp_compose_namespaceObject.createHighe idBase } = props.attributes; const isWide = (_wp$customize$Widgets = wide_widget_display_wp.customize.Widgets.data.availableWidgets.find(widget => widget.id_base === idBase)?.is_wide) !== null && _wp$customize$Widgets !== void 0 ? _wp$customize$Widgets : false; - return (0,external_wp_element_namespaceObject.createElement)(BlockEdit, { + return (0,external_React_namespaceObject.createElement)(BlockEdit, { ...props, isWide: isWide }); @@ -3207,7 +3209,7 @@ function initialize(editorName, blockEditorSettings) { sidebarControls.push(control); } }); - (0,external_wp_element_namespaceObject.createRoot)(container).render((0,external_wp_element_namespaceObject.createElement)(CustomizeWidgets, { + (0,external_wp_element_namespaceObject.createRoot)(container).render((0,external_React_namespaceObject.createElement)(CustomizeWidgets, { api: build_module_wp.customize, sidebarControls: sidebarControls, blockEditorSettings: blockEditorSettings @@ -3216,7 +3218,8 @@ function initialize(editorName, blockEditorSettings) { } -}(); +})(); + (window.wp = window.wp || {}).customizeWidgets = __webpack_exports__; /******/ })() ;
\ No newline at end of file |