1 this["wp"] = this["wp"] || {}; this["wp"]["editWidgets"] = |
1 /******/ (function() { // webpackBootstrap |
2 /******/ (function(modules) { // webpackBootstrap |
2 /******/ var __webpack_modules__ = ({ |
|
3 |
|
4 /***/ 4403: |
|
5 /***/ (function(module, exports) { |
|
6 |
|
7 var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! |
|
8 Copyright (c) 2018 Jed Watson. |
|
9 Licensed under the MIT License (MIT), see |
|
10 http://jedwatson.github.io/classnames |
|
11 */ |
|
12 /* global define */ |
|
13 |
|
14 (function () { |
|
15 'use strict'; |
|
16 |
|
17 var hasOwn = {}.hasOwnProperty; |
|
18 |
|
19 function classNames() { |
|
20 var classes = []; |
|
21 |
|
22 for (var i = 0; i < arguments.length; i++) { |
|
23 var arg = arguments[i]; |
|
24 if (!arg) continue; |
|
25 |
|
26 var argType = typeof arg; |
|
27 |
|
28 if (argType === 'string' || argType === 'number') { |
|
29 classes.push(arg); |
|
30 } else if (Array.isArray(arg)) { |
|
31 if (arg.length) { |
|
32 var inner = classNames.apply(null, arg); |
|
33 if (inner) { |
|
34 classes.push(inner); |
|
35 } |
|
36 } |
|
37 } else if (argType === 'object') { |
|
38 if (arg.toString === Object.prototype.toString) { |
|
39 for (var key in arg) { |
|
40 if (hasOwn.call(arg, key) && arg[key]) { |
|
41 classes.push(key); |
|
42 } |
|
43 } |
|
44 } else { |
|
45 classes.push(arg.toString()); |
|
46 } |
|
47 } |
|
48 } |
|
49 |
|
50 return classes.join(' '); |
|
51 } |
|
52 |
|
53 if ( true && module.exports) { |
|
54 classNames.default = classNames; |
|
55 module.exports = classNames; |
|
56 } else if (true) { |
|
57 // register as 'classnames', consistent with npm package name |
|
58 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { |
|
59 return classNames; |
|
60 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), |
|
61 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); |
|
62 } else {} |
|
63 }()); |
|
64 |
|
65 |
|
66 /***/ }) |
|
67 |
|
68 /******/ }); |
|
69 /************************************************************************/ |
3 /******/ // The module cache |
70 /******/ // The module cache |
4 /******/ var installedModules = {}; |
71 /******/ var __webpack_module_cache__ = {}; |
5 /******/ |
72 /******/ |
6 /******/ // The require function |
73 /******/ // The require function |
7 /******/ function __webpack_require__(moduleId) { |
74 /******/ function __webpack_require__(moduleId) { |
8 /******/ |
|
9 /******/ // Check if module is in cache |
75 /******/ // Check if module is in cache |
10 /******/ if(installedModules[moduleId]) { |
76 /******/ var cachedModule = __webpack_module_cache__[moduleId]; |
11 /******/ return installedModules[moduleId].exports; |
77 /******/ if (cachedModule !== undefined) { |
|
78 /******/ return cachedModule.exports; |
12 /******/ } |
79 /******/ } |
13 /******/ // Create a new module (and put it into the cache) |
80 /******/ // Create a new module (and put it into the cache) |
14 /******/ var module = installedModules[moduleId] = { |
81 /******/ var module = __webpack_module_cache__[moduleId] = { |
15 /******/ i: moduleId, |
82 /******/ // no module.id needed |
16 /******/ l: false, |
83 /******/ // no module.loaded needed |
17 /******/ exports: {} |
84 /******/ exports: {} |
18 /******/ }; |
85 /******/ }; |
19 /******/ |
86 /******/ |
20 /******/ // Execute the module function |
87 /******/ // Execute the module function |
21 /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); |
88 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); |
22 /******/ |
89 /******/ |
23 /******/ // Flag the module as loaded |
|
24 /******/ module.l = true; |
|
25 /******/ |
|
26 /******/ // Return the exports of the module |
90 /******/ // Return the exports of the module |
27 /******/ return module.exports; |
91 /******/ return module.exports; |
28 /******/ } |
92 /******/ } |
29 /******/ |
93 /******/ |
30 /******/ |
|
31 /******/ // expose the modules object (__webpack_modules__) |
|
32 /******/ __webpack_require__.m = modules; |
|
33 /******/ |
|
34 /******/ // expose the module cache |
|
35 /******/ __webpack_require__.c = installedModules; |
|
36 /******/ |
|
37 /******/ // define getter function for harmony exports |
|
38 /******/ __webpack_require__.d = function(exports, name, getter) { |
|
39 /******/ if(!__webpack_require__.o(exports, name)) { |
|
40 /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); |
|
41 /******/ } |
|
42 /******/ }; |
|
43 /******/ |
|
44 /******/ // define __esModule on exports |
|
45 /******/ __webpack_require__.r = function(exports) { |
|
46 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
|
47 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
|
48 /******/ } |
|
49 /******/ Object.defineProperty(exports, '__esModule', { value: true }); |
|
50 /******/ }; |
|
51 /******/ |
|
52 /******/ // create a fake namespace object |
|
53 /******/ // mode & 1: value is a module id, require it |
|
54 /******/ // mode & 2: merge all properties of value into the ns |
|
55 /******/ // mode & 4: return value when already ns object |
|
56 /******/ // mode & 8|1: behave like require |
|
57 /******/ __webpack_require__.t = function(value, mode) { |
|
58 /******/ if(mode & 1) value = __webpack_require__(value); |
|
59 /******/ if(mode & 8) return value; |
|
60 /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; |
|
61 /******/ var ns = Object.create(null); |
|
62 /******/ __webpack_require__.r(ns); |
|
63 /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); |
|
64 /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); |
|
65 /******/ return ns; |
|
66 /******/ }; |
|
67 /******/ |
|
68 /******/ // getDefaultExport function for compatibility with non-harmony modules |
|
69 /******/ __webpack_require__.n = function(module) { |
|
70 /******/ var getter = module && module.__esModule ? |
|
71 /******/ function getDefault() { return module['default']; } : |
|
72 /******/ function getModuleExports() { return module; }; |
|
73 /******/ __webpack_require__.d(getter, 'a', getter); |
|
74 /******/ return getter; |
|
75 /******/ }; |
|
76 /******/ |
|
77 /******/ // Object.prototype.hasOwnProperty.call |
|
78 /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; |
|
79 /******/ |
|
80 /******/ // __webpack_public_path__ |
|
81 /******/ __webpack_require__.p = ""; |
|
82 /******/ |
|
83 /******/ |
|
84 /******/ // Load entry module and return exports |
|
85 /******/ return __webpack_require__(__webpack_require__.s = "F35A"); |
|
86 /******/ }) |
|
87 /************************************************************************/ |
94 /************************************************************************/ |
88 /******/ ({ |
95 /******/ /* webpack/runtime/compat get default export */ |
89 |
96 /******/ !function() { |
90 /***/ "//Lo": |
97 /******/ // getDefaultExport function for compatibility with non-harmony modules |
91 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
98 /******/ __webpack_require__.n = function(module) { |
92 |
99 /******/ var getter = module && module.__esModule ? |
93 "use strict"; |
100 /******/ function() { return module['default']; } : |
94 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
101 /******/ function() { return module; }; |
95 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
102 /******/ __webpack_require__.d(getter, { a: getter }); |
96 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); |
103 /******/ return getter; |
97 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
104 /******/ }; |
98 |
105 /******/ }(); |
99 |
106 /******/ |
100 /** |
107 /******/ /* webpack/runtime/define property getters */ |
101 * WordPress dependencies |
108 /******/ !function() { |
102 */ |
109 /******/ // define getter functions for harmony exports |
103 |
110 /******/ __webpack_require__.d = function(exports, definition) { |
104 const blockDefault = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
111 /******/ for(var key in definition) { |
105 xmlns: "http://www.w3.org/2000/svg", |
112 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { |
106 viewBox: "0 0 24 24" |
113 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); |
107 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
114 /******/ } |
108 d: "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z" |
115 /******/ } |
109 })); |
116 /******/ }; |
110 /* harmony default export */ __webpack_exports__["a"] = (blockDefault); |
117 /******/ }(); |
111 |
118 /******/ |
112 |
119 /******/ /* webpack/runtime/hasOwnProperty shorthand */ |
113 /***/ }), |
120 /******/ !function() { |
114 |
121 /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } |
115 /***/ "1CF3": |
122 /******/ }(); |
116 /***/ (function(module, exports) { |
123 /******/ |
117 |
124 /******/ /* webpack/runtime/make namespace object */ |
118 (function() { module.exports = window["wp"]["dom"]; }()); |
125 /******/ !function() { |
119 |
126 /******/ // define __esModule on exports |
120 /***/ }), |
127 /******/ __webpack_require__.r = function(exports) { |
121 |
128 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
122 /***/ "1ZqX": |
129 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
123 /***/ (function(module, exports) { |
130 /******/ } |
124 |
131 /******/ Object.defineProperty(exports, '__esModule', { value: true }); |
125 (function() { module.exports = window["wp"]["data"]; }()); |
132 /******/ }; |
126 |
133 /******/ }(); |
127 /***/ }), |
134 /******/ |
128 |
135 /************************************************************************/ |
129 /***/ "6aBm": |
136 var __webpack_exports__ = {}; |
130 /***/ (function(module, exports) { |
137 // This entry need to be wrapped in an IIFE because it need to be in strict mode. |
131 |
138 !function() { |
132 (function() { module.exports = window["wp"]["mediaUtils"]; }()); |
|
133 |
|
134 /***/ }), |
|
135 |
|
136 /***/ "Cg8A": |
|
137 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
138 |
|
139 "use strict"; |
|
140 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
|
141 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
|
142 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); |
|
143 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
|
144 |
|
145 |
|
146 /** |
|
147 * WordPress dependencies |
|
148 */ |
|
149 |
|
150 const cog = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
|
151 xmlns: "http://www.w3.org/2000/svg", |
|
152 viewBox: "0 0 24 24" |
|
153 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
|
154 fillRule: "evenodd", |
|
155 d: "M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z", |
|
156 clipRule: "evenodd" |
|
157 })); |
|
158 /* harmony default export */ __webpack_exports__["a"] = (cog); |
|
159 |
|
160 |
|
161 /***/ }), |
|
162 |
|
163 /***/ "F35A": |
|
164 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
165 |
|
166 "use strict"; |
139 "use strict"; |
167 // ESM COMPAT FLAG |
140 // ESM COMPAT FLAG |
168 __webpack_require__.r(__webpack_exports__); |
141 __webpack_require__.r(__webpack_exports__); |
169 |
142 |
170 // EXPORTS |
143 // EXPORTS |
171 __webpack_require__.d(__webpack_exports__, "reinitializeEditor", function() { return /* binding */ reinitializeEditor; }); |
144 __webpack_require__.d(__webpack_exports__, { |
172 __webpack_require__.d(__webpack_exports__, "initialize", function() { return /* binding */ initialize; }); |
145 "initialize": function() { return /* binding */ initialize; }, |
173 |
146 "reinitializeEditor": function() { return /* binding */ reinitializeEditor; } |
174 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-widgets/build-module/store/actions.js |
147 }); |
|
148 |
|
149 // NAMESPACE OBJECT: ./node_modules/@wordpress/interface/build-module/store/actions.js |
175 var actions_namespaceObject = {}; |
150 var actions_namespaceObject = {}; |
176 __webpack_require__.r(actions_namespaceObject); |
151 __webpack_require__.r(actions_namespaceObject); |
177 __webpack_require__.d(actions_namespaceObject, "persistStubPost", function() { return persistStubPost; }); |
152 __webpack_require__.d(actions_namespaceObject, { |
178 __webpack_require__.d(actions_namespaceObject, "saveEditedWidgetAreas", function() { return actions_saveEditedWidgetAreas; }); |
153 "disableComplementaryArea": function() { return disableComplementaryArea; }, |
179 __webpack_require__.d(actions_namespaceObject, "saveWidgetAreas", function() { return saveWidgetAreas; }); |
154 "enableComplementaryArea": function() { return enableComplementaryArea; }, |
180 __webpack_require__.d(actions_namespaceObject, "saveWidgetArea", function() { return saveWidgetArea; }); |
155 "pinItem": function() { return pinItem; }, |
181 __webpack_require__.d(actions_namespaceObject, "setWidgetIdForClientId", function() { return setWidgetIdForClientId; }); |
156 "setFeatureDefaults": function() { return setFeatureDefaults; }, |
182 __webpack_require__.d(actions_namespaceObject, "setWidgetAreasOpenState", function() { return setWidgetAreasOpenState; }); |
157 "setFeatureValue": function() { return setFeatureValue; }, |
183 __webpack_require__.d(actions_namespaceObject, "setIsWidgetAreaOpen", function() { return actions_setIsWidgetAreaOpen; }); |
158 "toggleFeature": function() { return toggleFeature; }, |
184 __webpack_require__.d(actions_namespaceObject, "setIsInserterOpened", function() { return actions_setIsInserterOpened; }); |
159 "unpinItem": function() { return unpinItem; } |
185 __webpack_require__.d(actions_namespaceObject, "closeGeneralSidebar", function() { return actions_closeGeneralSidebar; }); |
160 }); |
186 __webpack_require__.d(actions_namespaceObject, "moveBlockToWidgetArea", function() { return actions_moveBlockToWidgetArea; }); |
161 |
187 __webpack_require__.d(actions_namespaceObject, "__unstableToggleFeature", function() { return __unstableToggleFeature; }); |
162 // NAMESPACE OBJECT: ./node_modules/@wordpress/interface/build-module/store/selectors.js |
|
163 var selectors_namespaceObject = {}; |
|
164 __webpack_require__.r(selectors_namespaceObject); |
|
165 __webpack_require__.d(selectors_namespaceObject, { |
|
166 "getActiveComplementaryArea": function() { return getActiveComplementaryArea; }, |
|
167 "isFeatureActive": function() { return isFeatureActive; }, |
|
168 "isItemPinned": function() { return isItemPinned; } |
|
169 }); |
|
170 |
|
171 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-widgets/build-module/store/actions.js |
|
172 var store_actions_namespaceObject = {}; |
|
173 __webpack_require__.r(store_actions_namespaceObject); |
|
174 __webpack_require__.d(store_actions_namespaceObject, { |
|
175 "closeGeneralSidebar": function() { return closeGeneralSidebar; }, |
|
176 "moveBlockToWidgetArea": function() { return moveBlockToWidgetArea; }, |
|
177 "persistStubPost": function() { return persistStubPost; }, |
|
178 "saveEditedWidgetAreas": function() { return saveEditedWidgetAreas; }, |
|
179 "saveWidgetArea": function() { return saveWidgetArea; }, |
|
180 "saveWidgetAreas": function() { return saveWidgetAreas; }, |
|
181 "setIsInserterOpened": function() { return setIsInserterOpened; }, |
|
182 "setIsListViewOpened": function() { return setIsListViewOpened; }, |
|
183 "setIsWidgetAreaOpen": function() { return setIsWidgetAreaOpen; }, |
|
184 "setWidgetAreasOpenState": function() { return setWidgetAreasOpenState; }, |
|
185 "setWidgetIdForClientId": function() { return setWidgetIdForClientId; } |
|
186 }); |
188 |
187 |
189 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-widgets/build-module/store/resolvers.js |
188 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-widgets/build-module/store/resolvers.js |
190 var resolvers_namespaceObject = {}; |
189 var resolvers_namespaceObject = {}; |
191 __webpack_require__.r(resolvers_namespaceObject); |
190 __webpack_require__.r(resolvers_namespaceObject); |
192 __webpack_require__.d(resolvers_namespaceObject, "getWidgetAreas", function() { return getWidgetAreas; }); |
191 __webpack_require__.d(resolvers_namespaceObject, { |
193 __webpack_require__.d(resolvers_namespaceObject, "getWidgets", function() { return getWidgets; }); |
192 "getWidgetAreas": function() { return getWidgetAreas; }, |
|
193 "getWidgets": function() { return getWidgets; } |
|
194 }); |
194 |
195 |
195 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-widgets/build-module/store/selectors.js |
196 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-widgets/build-module/store/selectors.js |
196 var selectors_namespaceObject = {}; |
197 var store_selectors_namespaceObject = {}; |
197 __webpack_require__.r(selectors_namespaceObject); |
198 __webpack_require__.r(store_selectors_namespaceObject); |
198 __webpack_require__.d(selectors_namespaceObject, "getWidgets", function() { return selectors_getWidgets; }); |
199 __webpack_require__.d(store_selectors_namespaceObject, { |
199 __webpack_require__.d(selectors_namespaceObject, "getWidget", function() { return getWidget; }); |
200 "__experimentalGetInsertionPoint": function() { return __experimentalGetInsertionPoint; }, |
200 __webpack_require__.d(selectors_namespaceObject, "getWidgetAreas", function() { return selectors_getWidgetAreas; }); |
201 "canInsertBlockInWidgetArea": function() { return canInsertBlockInWidgetArea; }, |
201 __webpack_require__.d(selectors_namespaceObject, "getWidgetAreaForWidgetId", function() { return getWidgetAreaForWidgetId; }); |
202 "getEditedWidgetAreas": function() { return getEditedWidgetAreas; }, |
202 __webpack_require__.d(selectors_namespaceObject, "getParentWidgetAreaBlock", function() { return selectors_getParentWidgetAreaBlock; }); |
203 "getIsWidgetAreaOpen": function() { return getIsWidgetAreaOpen; }, |
203 __webpack_require__.d(selectors_namespaceObject, "getEditedWidgetAreas", function() { return selectors_getEditedWidgetAreas; }); |
204 "getParentWidgetAreaBlock": function() { return getParentWidgetAreaBlock; }, |
204 __webpack_require__.d(selectors_namespaceObject, "getReferenceWidgetBlocks", function() { return getReferenceWidgetBlocks; }); |
205 "getReferenceWidgetBlocks": function() { return getReferenceWidgetBlocks; }, |
205 __webpack_require__.d(selectors_namespaceObject, "isSavingWidgetAreas", function() { return selectors_isSavingWidgetAreas; }); |
206 "getWidget": function() { return getWidget; }, |
206 __webpack_require__.d(selectors_namespaceObject, "getIsWidgetAreaOpen", function() { return getIsWidgetAreaOpen; }); |
207 "getWidgetAreaForWidgetId": function() { return getWidgetAreaForWidgetId; }, |
207 __webpack_require__.d(selectors_namespaceObject, "isInserterOpened", function() { return selectors_isInserterOpened; }); |
208 "getWidgetAreas": function() { return selectors_getWidgetAreas; }, |
208 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetInsertionPoint", function() { return __experimentalGetInsertionPoint; }); |
209 "getWidgets": function() { return selectors_getWidgets; }, |
209 __webpack_require__.d(selectors_namespaceObject, "canInsertBlockInWidgetArea", function() { return selectors_canInsertBlockInWidgetArea; }); |
210 "isInserterOpened": function() { return isInserterOpened; }, |
210 __webpack_require__.d(selectors_namespaceObject, "__unstableIsFeatureActive", function() { return __unstableIsFeatureActive; }); |
211 "isListViewOpened": function() { return isListViewOpened; }, |
|
212 "isSavingWidgetAreas": function() { return isSavingWidgetAreas; } |
|
213 }); |
211 |
214 |
212 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-widgets/build-module/blocks/widget-area/index.js |
215 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-widgets/build-module/blocks/widget-area/index.js |
213 var widget_area_namespaceObject = {}; |
216 var widget_area_namespaceObject = {}; |
214 __webpack_require__.r(widget_area_namespaceObject); |
217 __webpack_require__.r(widget_area_namespaceObject); |
215 __webpack_require__.d(widget_area_namespaceObject, "metadata", function() { return widget_area_metadata; }); |
218 __webpack_require__.d(widget_area_namespaceObject, { |
216 __webpack_require__.d(widget_area_namespaceObject, "name", function() { return widget_area_name; }); |
219 "metadata": function() { return metadata; }, |
217 __webpack_require__.d(widget_area_namespaceObject, "settings", function() { return widget_area_settings; }); |
220 "name": function() { return widget_area_name; }, |
218 |
221 "settings": function() { return settings; } |
219 // EXTERNAL MODULE: external ["wp","element"] |
222 }); |
220 var external_wp_element_ = __webpack_require__("GRId"); |
223 |
221 |
224 ;// CONCATENATED MODULE: external ["wp","element"] |
222 // EXTERNAL MODULE: external ["wp","blocks"] |
225 var external_wp_element_namespaceObject = window["wp"]["element"]; |
223 var external_wp_blocks_ = __webpack_require__("HSyU"); |
226 ;// CONCATENATED MODULE: external ["wp","blocks"] |
224 |
227 var external_wp_blocks_namespaceObject = window["wp"]["blocks"]; |
225 // EXTERNAL MODULE: external ["wp","blockLibrary"] |
228 ;// CONCATENATED MODULE: external ["wp","data"] |
226 var external_wp_blockLibrary_ = __webpack_require__("QyPg"); |
229 var external_wp_data_namespaceObject = window["wp"]["data"]; |
227 |
230 ;// CONCATENATED MODULE: external ["wp","blockLibrary"] |
228 // EXTERNAL MODULE: external ["wp","coreData"] |
231 var external_wp_blockLibrary_namespaceObject = window["wp"]["blockLibrary"]; |
229 var external_wp_coreData_ = __webpack_require__("jZUy"); |
232 ;// CONCATENATED MODULE: external ["wp","coreData"] |
230 |
233 var external_wp_coreData_namespaceObject = window["wp"]["coreData"]; |
231 // EXTERNAL MODULE: external ["wp","widgets"] |
234 ;// CONCATENATED MODULE: external ["wp","widgets"] |
232 var external_wp_widgets_ = __webpack_require__("GLVC"); |
235 var external_wp_widgets_namespaceObject = window["wp"]["widgets"]; |
233 |
236 ;// CONCATENATED MODULE: external ["wp","preferences"] |
234 // EXTERNAL MODULE: external ["wp","apiFetch"] |
237 var external_wp_preferences_namespaceObject = window["wp"]["preferences"]; |
235 var external_wp_apiFetch_ = __webpack_require__("ywyh"); |
238 ;// CONCATENATED MODULE: external ["wp","apiFetch"] |
236 var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_); |
239 var external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"]; |
237 |
240 var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject); |
238 // EXTERNAL MODULE: external ["wp","data"] |
241 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/reducer.js |
239 var external_wp_data_ = __webpack_require__("1ZqX"); |
242 /** |
240 |
243 * WordPress dependencies |
241 // EXTERNAL MODULE: external "lodash" |
244 */ |
242 var external_lodash_ = __webpack_require__("YLtl"); |
245 |
243 |
|
244 // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/defaults.js |
|
245 const PREFERENCES_DEFAULTS = { |
|
246 features: { |
|
247 fixedToolbar: false, |
|
248 welcomeGuide: true, |
|
249 showBlockBreadcrumbs: true, |
|
250 themeStyles: true |
|
251 } |
|
252 }; |
|
253 |
|
254 // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/reducer.js |
|
255 /** |
|
256 * External dependencies |
|
257 */ |
|
258 |
|
259 /** |
|
260 * WordPress dependencies |
|
261 */ |
|
262 |
|
263 |
|
264 /** |
|
265 * Internal dependencies |
|
266 */ |
|
267 |
|
268 |
|
269 /** |
|
270 * Higher-order reducer creator which provides the given initial state for the |
|
271 * original reducer. |
|
272 * |
|
273 * @param {*} initialState Initial state to provide to reducer. |
|
274 * |
|
275 * @return {Function} Higher-order reducer. |
|
276 */ |
|
277 |
|
278 const createWithInitialState = initialState => reducer => { |
|
279 return (state = initialState, action) => reducer(state, action); |
|
280 }; |
|
281 /** |
246 /** |
282 * Controls the open state of the widget areas. |
247 * Controls the open state of the widget areas. |
283 * |
248 * |
284 * @param {Object} state Redux state |
249 * @param {Object} state Redux state. |
285 * @param {Object} action Redux action |
250 * @param {Object} action Redux action. |
286 * @return {Array} Updated state |
251 * |
287 */ |
252 * @return {Array} Updated state. |
288 |
253 */ |
289 |
254 |
290 function reducer_widgetAreasOpenState(state = {}, action) { |
255 function widgetAreasOpenState() { |
|
256 let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
|
257 let action = arguments.length > 1 ? arguments[1] : undefined; |
291 const { |
258 const { |
292 type |
259 type |
293 } = action; |
260 } = action; |
294 |
261 |
295 switch (type) { |
262 switch (type) { |
314 return state; |
281 return state; |
315 } |
282 } |
316 } |
283 } |
317 } |
284 } |
318 /** |
285 /** |
319 * Reducer tracking whether the inserter is open. |
286 * Reducer to set the block inserter panel open or closed. |
320 * |
287 * |
321 * @param {boolean|Object} state |
288 * Note: this reducer interacts with the list view panel reducer |
322 * @param {Object} action |
289 * to make sure that only one of the two panels is open at the same time. |
323 */ |
290 * |
324 |
291 * @param {Object} state Current state. |
325 function blockInserterPanel(state = false, action) { |
292 * @param {Object} action Dispatched action. |
|
293 */ |
|
294 |
|
295 function blockInserterPanel() { |
|
296 let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; |
|
297 let action = arguments.length > 1 ? arguments[1] : undefined; |
|
298 |
326 switch (action.type) { |
299 switch (action.type) { |
|
300 case 'SET_IS_LIST_VIEW_OPENED': |
|
301 return action.isOpen ? false : state; |
|
302 |
327 case 'SET_IS_INSERTER_OPENED': |
303 case 'SET_IS_INSERTER_OPENED': |
328 return action.value; |
304 return action.value; |
329 } |
305 } |
330 |
306 |
331 return state; |
307 return state; |
332 } |
308 } |
333 /** |
309 /** |
334 * Reducer returning the user preferences. |
310 * Reducer to set the list view panel open or closed. |
335 * |
311 * |
336 * @param {Object} state Current state. |
312 * Note: this reducer interacts with the inserter panel reducer |
337 * @param {Object} action Dispatched action. |
313 * to make sure that only one of the two panels is open at the same time. |
338 * |
314 * |
339 * @return {Object} Updated state. |
315 * @param {Object} state Current state. |
340 */ |
316 * @param {Object} action Dispatched action. |
341 |
317 */ |
342 |
318 |
343 const preferences = Object(external_lodash_["flow"])([external_wp_data_["combineReducers"], createWithInitialState(PREFERENCES_DEFAULTS)])({ |
319 function listViewPanel() { |
344 features(state, action) { |
320 let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; |
345 if (action.type === 'TOGGLE_FEATURE') { |
321 let action = arguments.length > 1 ? arguments[1] : undefined; |
346 return { ...state, |
322 |
347 [action.feature]: !state[action.feature] |
323 switch (action.type) { |
348 }; |
324 case 'SET_IS_INSERTER_OPENED': |
|
325 return action.value ? false : state; |
|
326 |
|
327 case 'SET_IS_LIST_VIEW_OPENED': |
|
328 return action.isOpen; |
|
329 } |
|
330 |
|
331 return state; |
|
332 } |
|
333 /* harmony default export */ var reducer = ((0,external_wp_data_namespaceObject.combineReducers)({ |
|
334 blockInserterPanel, |
|
335 listViewPanel, |
|
336 widgetAreasOpenState |
|
337 })); |
|
338 |
|
339 ;// CONCATENATED MODULE: external ["wp","i18n"] |
|
340 var external_wp_i18n_namespaceObject = window["wp"]["i18n"]; |
|
341 ;// CONCATENATED MODULE: external ["wp","notices"] |
|
342 var external_wp_notices_namespaceObject = window["wp"]["notices"]; |
|
343 ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js |
|
344 function _extends() { |
|
345 _extends = Object.assign ? Object.assign.bind() : function (target) { |
|
346 for (var i = 1; i < arguments.length; i++) { |
|
347 var source = arguments[i]; |
|
348 |
|
349 for (var key in source) { |
|
350 if (Object.prototype.hasOwnProperty.call(source, key)) { |
|
351 target[key] = source[key]; |
|
352 } |
|
353 } |
349 } |
354 } |
350 |
355 |
351 return state; |
356 return target; |
|
357 }; |
|
358 return _extends.apply(this, arguments); |
|
359 } |
|
360 // EXTERNAL MODULE: ./node_modules/classnames/index.js |
|
361 var classnames = __webpack_require__(4403); |
|
362 var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); |
|
363 ;// CONCATENATED MODULE: external ["wp","components"] |
|
364 var external_wp_components_namespaceObject = window["wp"]["components"]; |
|
365 ;// CONCATENATED MODULE: external ["wp","primitives"] |
|
366 var external_wp_primitives_namespaceObject = window["wp"]["primitives"]; |
|
367 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js |
|
368 |
|
369 |
|
370 /** |
|
371 * WordPress dependencies |
|
372 */ |
|
373 |
|
374 const check = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { |
|
375 xmlns: "http://www.w3.org/2000/svg", |
|
376 viewBox: "0 0 24 24" |
|
377 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { |
|
378 d: "M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z" |
|
379 })); |
|
380 /* harmony default export */ var library_check = (check); |
|
381 |
|
382 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/star-filled.js |
|
383 |
|
384 |
|
385 /** |
|
386 * WordPress dependencies |
|
387 */ |
|
388 |
|
389 const starFilled = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { |
|
390 xmlns: "http://www.w3.org/2000/svg", |
|
391 viewBox: "0 0 24 24" |
|
392 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { |
|
393 d: "M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z" |
|
394 })); |
|
395 /* harmony default export */ var star_filled = (starFilled); |
|
396 |
|
397 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/star-empty.js |
|
398 |
|
399 |
|
400 /** |
|
401 * WordPress dependencies |
|
402 */ |
|
403 |
|
404 const starEmpty = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { |
|
405 xmlns: "http://www.w3.org/2000/svg", |
|
406 viewBox: "0 0 24 24" |
|
407 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { |
|
408 fillRule: "evenodd", |
|
409 d: "M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z", |
|
410 clipRule: "evenodd" |
|
411 })); |
|
412 /* harmony default export */ var star_empty = (starEmpty); |
|
413 |
|
414 ;// CONCATENATED MODULE: external ["wp","viewport"] |
|
415 var external_wp_viewport_namespaceObject = window["wp"]["viewport"]; |
|
416 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js |
|
417 |
|
418 |
|
419 /** |
|
420 * WordPress dependencies |
|
421 */ |
|
422 |
|
423 const closeSmall = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { |
|
424 xmlns: "http://www.w3.org/2000/svg", |
|
425 viewBox: "0 0 24 24" |
|
426 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { |
|
427 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" |
|
428 })); |
|
429 /* harmony default export */ var close_small = (closeSmall); |
|
430 |
|
431 ;// CONCATENATED MODULE: external "lodash" |
|
432 var external_lodash_namespaceObject = window["lodash"]; |
|
433 ;// CONCATENATED MODULE: external ["wp","deprecated"] |
|
434 var external_wp_deprecated_namespaceObject = window["wp"]["deprecated"]; |
|
435 var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject); |
|
436 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/actions.js |
|
437 /** |
|
438 * WordPress dependencies |
|
439 */ |
|
440 |
|
441 |
|
442 /** |
|
443 * Enable the complementary area. |
|
444 * |
|
445 * @param {string} scope Complementary area scope. |
|
446 * @param {string} area Area identifier. |
|
447 */ |
|
448 |
|
449 const enableComplementaryArea = (scope, area) => _ref => { |
|
450 let { |
|
451 registry |
|
452 } = _ref; |
|
453 |
|
454 // Return early if there's no area. |
|
455 if (!area) { |
|
456 return; |
352 } |
457 } |
353 |
458 |
|
459 registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'complementaryArea', area); |
|
460 }; |
|
461 /** |
|
462 * Disable the complementary area. |
|
463 * |
|
464 * @param {string} scope Complementary area scope. |
|
465 */ |
|
466 |
|
467 const disableComplementaryArea = scope => _ref2 => { |
|
468 let { |
|
469 registry |
|
470 } = _ref2; |
|
471 registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'complementaryArea', null); |
|
472 }; |
|
473 /** |
|
474 * Pins an item. |
|
475 * |
|
476 * @param {string} scope Item scope. |
|
477 * @param {string} item Item identifier. |
|
478 * |
|
479 * @return {Object} Action object. |
|
480 */ |
|
481 |
|
482 const pinItem = (scope, item) => _ref3 => { |
|
483 let { |
|
484 registry |
|
485 } = _ref3; |
|
486 |
|
487 // Return early if there's no item. |
|
488 if (!item) { |
|
489 return; |
|
490 } |
|
491 |
|
492 const pinnedItems = registry.select(external_wp_preferences_namespaceObject.store).get(scope, 'pinnedItems'); // The item is already pinned, there's nothing to do. |
|
493 |
|
494 if ((pinnedItems === null || pinnedItems === void 0 ? void 0 : pinnedItems[item]) === true) { |
|
495 return; |
|
496 } |
|
497 |
|
498 registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'pinnedItems', { ...pinnedItems, |
|
499 [item]: true |
|
500 }); |
|
501 }; |
|
502 /** |
|
503 * Unpins an item. |
|
504 * |
|
505 * @param {string} scope Item scope. |
|
506 * @param {string} item Item identifier. |
|
507 */ |
|
508 |
|
509 const unpinItem = (scope, item) => _ref4 => { |
|
510 let { |
|
511 registry |
|
512 } = _ref4; |
|
513 |
|
514 // Return early if there's no item. |
|
515 if (!item) { |
|
516 return; |
|
517 } |
|
518 |
|
519 const pinnedItems = registry.select(external_wp_preferences_namespaceObject.store).get(scope, 'pinnedItems'); |
|
520 registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'pinnedItems', { ...pinnedItems, |
|
521 [item]: false |
|
522 }); |
|
523 }; |
|
524 /** |
|
525 * Returns an action object used in signalling that a feature should be toggled. |
|
526 * |
|
527 * @param {string} scope The feature scope (e.g. core/edit-post). |
|
528 * @param {string} featureName The feature name. |
|
529 */ |
|
530 |
|
531 function toggleFeature(scope, featureName) { |
|
532 return function (_ref5) { |
|
533 let { |
|
534 registry |
|
535 } = _ref5; |
|
536 external_wp_deprecated_default()(`dispatch( 'core/interface' ).toggleFeature`, { |
|
537 since: '6.0', |
|
538 alternative: `dispatch( 'core/preferences' ).toggle` |
|
539 }); |
|
540 registry.dispatch(external_wp_preferences_namespaceObject.store).toggle(scope, featureName); |
|
541 }; |
|
542 } |
|
543 /** |
|
544 * Returns an action object used in signalling that a feature should be set to |
|
545 * a true or false value |
|
546 * |
|
547 * @param {string} scope The feature scope (e.g. core/edit-post). |
|
548 * @param {string} featureName The feature name. |
|
549 * @param {boolean} value The value to set. |
|
550 * |
|
551 * @return {Object} Action object. |
|
552 */ |
|
553 |
|
554 function setFeatureValue(scope, featureName, value) { |
|
555 return function (_ref6) { |
|
556 let { |
|
557 registry |
|
558 } = _ref6; |
|
559 external_wp_deprecated_default()(`dispatch( 'core/interface' ).setFeatureValue`, { |
|
560 since: '6.0', |
|
561 alternative: `dispatch( 'core/preferences' ).set` |
|
562 }); |
|
563 registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, featureName, !!value); |
|
564 }; |
|
565 } |
|
566 /** |
|
567 * Returns an action object used in signalling that defaults should be set for features. |
|
568 * |
|
569 * @param {string} scope The feature scope (e.g. core/edit-post). |
|
570 * @param {Object<string, boolean>} defaults A key/value map of feature names to values. |
|
571 * |
|
572 * @return {Object} Action object. |
|
573 */ |
|
574 |
|
575 function setFeatureDefaults(scope, defaults) { |
|
576 return function (_ref7) { |
|
577 let { |
|
578 registry |
|
579 } = _ref7; |
|
580 external_wp_deprecated_default()(`dispatch( 'core/interface' ).setFeatureDefaults`, { |
|
581 since: '6.0', |
|
582 alternative: `dispatch( 'core/preferences' ).setDefaults` |
|
583 }); |
|
584 registry.dispatch(external_wp_preferences_namespaceObject.store).setDefaults(scope, defaults); |
|
585 }; |
|
586 } |
|
587 |
|
588 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/selectors.js |
|
589 /** |
|
590 * WordPress dependencies |
|
591 */ |
|
592 |
|
593 |
|
594 |
|
595 /** |
|
596 * Returns the complementary area that is active in a given scope. |
|
597 * |
|
598 * @param {Object} state Global application state. |
|
599 * @param {string} scope Item scope. |
|
600 * |
|
601 * @return {string} The complementary area that is active in the given scope. |
|
602 */ |
|
603 |
|
604 const getActiveComplementaryArea = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope) => { |
|
605 return select(external_wp_preferences_namespaceObject.store).get(scope, 'complementaryArea'); |
354 }); |
606 }); |
355 /* harmony default export */ var reducer = (Object(external_wp_data_["combineReducers"])({ |
607 /** |
356 blockInserterPanel, |
608 * Returns a boolean indicating if an item is pinned or not. |
357 widgetAreasOpenState: reducer_widgetAreasOpenState, |
609 * |
358 preferences |
610 * @param {Object} state Global application state. |
|
611 * @param {string} scope Scope. |
|
612 * @param {string} item Item to check. |
|
613 * |
|
614 * @return {boolean} True if the item is pinned and false otherwise. |
|
615 */ |
|
616 |
|
617 const isItemPinned = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope, item) => { |
|
618 var _pinnedItems$item; |
|
619 |
|
620 const pinnedItems = select(external_wp_preferences_namespaceObject.store).get(scope, 'pinnedItems'); |
|
621 return (_pinnedItems$item = pinnedItems === null || pinnedItems === void 0 ? void 0 : pinnedItems[item]) !== null && _pinnedItems$item !== void 0 ? _pinnedItems$item : true; |
|
622 }); |
|
623 /** |
|
624 * Returns a boolean indicating whether a feature is active for a particular |
|
625 * scope. |
|
626 * |
|
627 * @param {Object} state The store state. |
|
628 * @param {string} scope The scope of the feature (e.g. core/edit-post). |
|
629 * @param {string} featureName The name of the feature. |
|
630 * |
|
631 * @return {boolean} Is the feature enabled? |
|
632 */ |
|
633 |
|
634 const isFeatureActive = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope, featureName) => { |
|
635 external_wp_deprecated_default()(`select( 'core/interface' ).isFeatureActive( scope, featureName )`, { |
|
636 since: '6.0', |
|
637 alternative: `select( 'core/preferences' ).get( scope, featureName )` |
|
638 }); |
|
639 return !!select(external_wp_preferences_namespaceObject.store).get(scope, featureName); |
|
640 }); |
|
641 |
|
642 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/constants.js |
|
643 /** |
|
644 * The identifier for the data store. |
|
645 * |
|
646 * @type {string} |
|
647 */ |
|
648 const STORE_NAME = 'core/interface'; |
|
649 |
|
650 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/index.js |
|
651 /** |
|
652 * WordPress dependencies |
|
653 */ |
|
654 |
|
655 /** |
|
656 * Internal dependencies |
|
657 */ |
|
658 |
|
659 |
|
660 |
|
661 |
|
662 /** |
|
663 * Store definition for the interface namespace. |
|
664 * |
|
665 * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore |
|
666 * |
|
667 * @type {Object} |
|
668 */ |
|
669 |
|
670 const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, { |
|
671 reducer: () => {}, |
|
672 actions: actions_namespaceObject, |
|
673 selectors: selectors_namespaceObject |
|
674 }); // Once we build a more generic persistence plugin that works across types of stores |
|
675 // we'd be able to replace this with a register call. |
|
676 |
|
677 (0,external_wp_data_namespaceObject.register)(store); |
|
678 |
|
679 ;// CONCATENATED MODULE: external ["wp","plugins"] |
|
680 var external_wp_plugins_namespaceObject = window["wp"]["plugins"]; |
|
681 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-context/index.js |
|
682 /** |
|
683 * WordPress dependencies |
|
684 */ |
|
685 |
|
686 /* harmony default export */ var complementary_area_context = ((0,external_wp_plugins_namespaceObject.withPluginContext)((context, ownProps) => { |
|
687 return { |
|
688 icon: ownProps.icon || context.icon, |
|
689 identifier: ownProps.identifier || `${context.name}/${ownProps.name}` |
|
690 }; |
359 })); |
691 })); |
360 |
692 |
361 // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/utils.js |
693 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-toggle/index.js |
|
694 |
|
695 |
|
696 |
|
697 /** |
|
698 * External dependencies |
|
699 */ |
|
700 |
|
701 /** |
|
702 * WordPress dependencies |
|
703 */ |
|
704 |
|
705 |
|
706 |
|
707 /** |
|
708 * Internal dependencies |
|
709 */ |
|
710 |
|
711 |
|
712 |
|
713 |
|
714 function ComplementaryAreaToggle(_ref) { |
|
715 let { |
|
716 as = external_wp_components_namespaceObject.Button, |
|
717 scope, |
|
718 identifier, |
|
719 icon, |
|
720 selectedIcon, |
|
721 ...props |
|
722 } = _ref; |
|
723 const ComponentToUse = as; |
|
724 const isSelected = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getActiveComplementaryArea(scope) === identifier, [identifier]); |
|
725 const { |
|
726 enableComplementaryArea, |
|
727 disableComplementaryArea |
|
728 } = (0,external_wp_data_namespaceObject.useDispatch)(store); |
|
729 return (0,external_wp_element_namespaceObject.createElement)(ComponentToUse, _extends({ |
|
730 icon: selectedIcon && isSelected ? selectedIcon : icon, |
|
731 onClick: () => { |
|
732 if (isSelected) { |
|
733 disableComplementaryArea(scope); |
|
734 } else { |
|
735 enableComplementaryArea(scope, identifier); |
|
736 } |
|
737 } |
|
738 }, (0,external_lodash_namespaceObject.omit)(props, ['name']))); |
|
739 } |
|
740 |
|
741 /* harmony default export */ var complementary_area_toggle = (complementary_area_context(ComplementaryAreaToggle)); |
|
742 |
|
743 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-header/index.js |
|
744 |
|
745 |
|
746 |
|
747 /** |
|
748 * External dependencies |
|
749 */ |
|
750 |
|
751 /** |
|
752 * WordPress dependencies |
|
753 */ |
|
754 |
|
755 |
|
756 /** |
|
757 * Internal dependencies |
|
758 */ |
|
759 |
|
760 |
|
761 |
|
762 const ComplementaryAreaHeader = _ref => { |
|
763 let { |
|
764 smallScreenTitle, |
|
765 children, |
|
766 className, |
|
767 toggleButtonProps |
|
768 } = _ref; |
|
769 const toggleButton = (0,external_wp_element_namespaceObject.createElement)(complementary_area_toggle, _extends({ |
|
770 icon: close_small |
|
771 }, toggleButtonProps)); |
|
772 return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("div", { |
|
773 className: "components-panel__header interface-complementary-area-header__small" |
|
774 }, smallScreenTitle && (0,external_wp_element_namespaceObject.createElement)("span", { |
|
775 className: "interface-complementary-area-header__small-title" |
|
776 }, smallScreenTitle), toggleButton), (0,external_wp_element_namespaceObject.createElement)("div", { |
|
777 className: classnames_default()('components-panel__header', 'interface-complementary-area-header', className), |
|
778 tabIndex: -1 |
|
779 }, children, toggleButton)); |
|
780 }; |
|
781 |
|
782 /* harmony default export */ var complementary_area_header = (ComplementaryAreaHeader); |
|
783 |
|
784 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/action-item/index.js |
|
785 |
|
786 |
|
787 |
|
788 /** |
|
789 * External dependencies |
|
790 */ |
|
791 |
|
792 /** |
|
793 * WordPress dependencies |
|
794 */ |
|
795 |
|
796 |
|
797 |
|
798 |
|
799 function ActionItemSlot(_ref) { |
|
800 let { |
|
801 name, |
|
802 as: Component = external_wp_components_namespaceObject.ButtonGroup, |
|
803 fillProps = {}, |
|
804 bubblesVirtually, |
|
805 ...props |
|
806 } = _ref; |
|
807 return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Slot, { |
|
808 name: name, |
|
809 bubblesVirtually: bubblesVirtually, |
|
810 fillProps: fillProps |
|
811 }, fills => { |
|
812 if ((0,external_lodash_namespaceObject.isEmpty)(external_wp_element_namespaceObject.Children.toArray(fills))) { |
|
813 return null; |
|
814 } // Special handling exists for backward compatibility. |
|
815 // It ensures that menu items created by plugin authors aren't |
|
816 // duplicated with automatically injected menu items coming |
|
817 // from pinnable plugin sidebars. |
|
818 // @see https://github.com/WordPress/gutenberg/issues/14457 |
|
819 |
|
820 |
|
821 const initializedByPlugins = []; |
|
822 external_wp_element_namespaceObject.Children.forEach(fills, _ref2 => { |
|
823 let { |
|
824 props: { |
|
825 __unstableExplicitMenuItem, |
|
826 __unstableTarget |
|
827 } |
|
828 } = _ref2; |
|
829 |
|
830 if (__unstableTarget && __unstableExplicitMenuItem) { |
|
831 initializedByPlugins.push(__unstableTarget); |
|
832 } |
|
833 }); |
|
834 const children = external_wp_element_namespaceObject.Children.map(fills, child => { |
|
835 if (!child.props.__unstableExplicitMenuItem && initializedByPlugins.includes(child.props.__unstableTarget)) { |
|
836 return null; |
|
837 } |
|
838 |
|
839 return child; |
|
840 }); |
|
841 return (0,external_wp_element_namespaceObject.createElement)(Component, props, children); |
|
842 }); |
|
843 } |
|
844 |
|
845 function ActionItem(_ref3) { |
|
846 let { |
|
847 name, |
|
848 as: Component = external_wp_components_namespaceObject.Button, |
|
849 onClick, |
|
850 ...props |
|
851 } = _ref3; |
|
852 return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Fill, { |
|
853 name: name |
|
854 }, _ref4 => { |
|
855 let { |
|
856 onClick: fpOnClick |
|
857 } = _ref4; |
|
858 return (0,external_wp_element_namespaceObject.createElement)(Component, _extends({ |
|
859 onClick: onClick || fpOnClick ? function () { |
|
860 (onClick || external_lodash_namespaceObject.noop)(...arguments); |
|
861 (fpOnClick || external_lodash_namespaceObject.noop)(...arguments); |
|
862 } : undefined |
|
863 }, props)); |
|
864 }); |
|
865 } |
|
866 |
|
867 ActionItem.Slot = ActionItemSlot; |
|
868 /* harmony default export */ var action_item = (ActionItem); |
|
869 |
|
870 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-more-menu-item/index.js |
|
871 |
|
872 |
|
873 |
|
874 /** |
|
875 * External dependencies |
|
876 */ |
|
877 |
|
878 /** |
|
879 * WordPress dependencies |
|
880 */ |
|
881 |
|
882 |
|
883 |
|
884 /** |
|
885 * Internal dependencies |
|
886 */ |
|
887 |
|
888 |
|
889 |
|
890 |
|
891 const PluginsMenuItem = props => // Menu item is marked with unstable prop for backward compatibility. |
|
892 // They are removed so they don't leak to DOM elements. |
|
893 // @see https://github.com/WordPress/gutenberg/issues/14457 |
|
894 (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, (0,external_lodash_namespaceObject.omit)(props, ['__unstableExplicitMenuItem', '__unstableTarget'])); |
|
895 |
|
896 function ComplementaryAreaMoreMenuItem(_ref) { |
|
897 let { |
|
898 scope, |
|
899 target, |
|
900 __unstableExplicitMenuItem, |
|
901 ...props |
|
902 } = _ref; |
|
903 return (0,external_wp_element_namespaceObject.createElement)(complementary_area_toggle, _extends({ |
|
904 as: toggleProps => { |
|
905 return (0,external_wp_element_namespaceObject.createElement)(action_item, _extends({ |
|
906 __unstableExplicitMenuItem: __unstableExplicitMenuItem, |
|
907 __unstableTarget: `${scope}/${target}`, |
|
908 as: PluginsMenuItem, |
|
909 name: `${scope}/plugin-more-menu` |
|
910 }, toggleProps)); |
|
911 }, |
|
912 role: "menuitemcheckbox", |
|
913 selectedIcon: library_check, |
|
914 name: target, |
|
915 scope: scope |
|
916 }, props)); |
|
917 } |
|
918 |
|
919 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/pinned-items/index.js |
|
920 |
|
921 |
|
922 |
|
923 /** |
|
924 * External dependencies |
|
925 */ |
|
926 |
|
927 |
|
928 /** |
|
929 * WordPress dependencies |
|
930 */ |
|
931 |
|
932 |
|
933 |
|
934 function PinnedItems(_ref) { |
|
935 let { |
|
936 scope, |
|
937 ...props |
|
938 } = _ref; |
|
939 return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Fill, _extends({ |
|
940 name: `PinnedItems/${scope}` |
|
941 }, props)); |
|
942 } |
|
943 |
|
944 function PinnedItemsSlot(_ref2) { |
|
945 let { |
|
946 scope, |
|
947 className, |
|
948 ...props |
|
949 } = _ref2; |
|
950 return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Slot, _extends({ |
|
951 name: `PinnedItems/${scope}` |
|
952 }, props), fills => !(0,external_lodash_namespaceObject.isEmpty)(fills) && (0,external_wp_element_namespaceObject.createElement)("div", { |
|
953 className: classnames_default()(className, 'interface-pinned-items') |
|
954 }, fills)); |
|
955 } |
|
956 |
|
957 PinnedItems.Slot = PinnedItemsSlot; |
|
958 /* harmony default export */ var pinned_items = (PinnedItems); |
|
959 |
|
960 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area/index.js |
|
961 |
|
962 |
|
963 |
|
964 /** |
|
965 * External dependencies |
|
966 */ |
|
967 |
|
968 /** |
|
969 * WordPress dependencies |
|
970 */ |
|
971 |
|
972 |
|
973 |
|
974 |
|
975 |
|
976 |
|
977 |
|
978 /** |
|
979 * Internal dependencies |
|
980 */ |
|
981 |
|
982 |
|
983 |
|
984 |
|
985 |
|
986 |
|
987 |
|
988 |
|
989 function ComplementaryAreaSlot(_ref) { |
|
990 let { |
|
991 scope, |
|
992 ...props |
|
993 } = _ref; |
|
994 return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Slot, _extends({ |
|
995 name: `ComplementaryArea/${scope}` |
|
996 }, props)); |
|
997 } |
|
998 |
|
999 function ComplementaryAreaFill(_ref2) { |
|
1000 let { |
|
1001 scope, |
|
1002 children, |
|
1003 className |
|
1004 } = _ref2; |
|
1005 return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Fill, { |
|
1006 name: `ComplementaryArea/${scope}` |
|
1007 }, (0,external_wp_element_namespaceObject.createElement)("div", { |
|
1008 className: className |
|
1009 }, children)); |
|
1010 } |
|
1011 |
|
1012 function useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall) { |
|
1013 const previousIsSmall = (0,external_wp_element_namespaceObject.useRef)(false); |
|
1014 const shouldOpenWhenNotSmall = (0,external_wp_element_namespaceObject.useRef)(false); |
|
1015 const { |
|
1016 enableComplementaryArea, |
|
1017 disableComplementaryArea |
|
1018 } = (0,external_wp_data_namespaceObject.useDispatch)(store); |
|
1019 (0,external_wp_element_namespaceObject.useEffect)(() => { |
|
1020 // If the complementary area is active and the editor is switching from a big to a small window size. |
|
1021 if (isActive && isSmall && !previousIsSmall.current) { |
|
1022 // Disable the complementary area. |
|
1023 disableComplementaryArea(scope); // Flag the complementary area to be reopened when the window size goes from small to big. |
|
1024 |
|
1025 shouldOpenWhenNotSmall.current = true; |
|
1026 } else if ( // If there is a flag indicating the complementary area should be enabled when we go from small to big window size |
|
1027 // and we are going from a small to big window size. |
|
1028 shouldOpenWhenNotSmall.current && !isSmall && previousIsSmall.current) { |
|
1029 // Remove the flag indicating the complementary area should be enabled. |
|
1030 shouldOpenWhenNotSmall.current = false; // Enable the complementary area. |
|
1031 |
|
1032 enableComplementaryArea(scope, identifier); |
|
1033 } else if ( // If the flag is indicating the current complementary should be reopened but another complementary area becomes active, |
|
1034 // remove the flag. |
|
1035 shouldOpenWhenNotSmall.current && activeArea && activeArea !== identifier) { |
|
1036 shouldOpenWhenNotSmall.current = false; |
|
1037 } |
|
1038 |
|
1039 if (isSmall !== previousIsSmall.current) { |
|
1040 previousIsSmall.current = isSmall; |
|
1041 } |
|
1042 }, [isActive, isSmall, scope, identifier, activeArea]); |
|
1043 } |
|
1044 |
|
1045 function ComplementaryArea(_ref3) { |
|
1046 let { |
|
1047 children, |
|
1048 className, |
|
1049 closeLabel = (0,external_wp_i18n_namespaceObject.__)('Close plugin'), |
|
1050 identifier, |
|
1051 header, |
|
1052 headerClassName, |
|
1053 icon, |
|
1054 isPinnable = true, |
|
1055 panelClassName, |
|
1056 scope, |
|
1057 name, |
|
1058 smallScreenTitle, |
|
1059 title, |
|
1060 toggleShortcut, |
|
1061 isActiveByDefault, |
|
1062 showIconLabels = false |
|
1063 } = _ref3; |
|
1064 const { |
|
1065 isActive, |
|
1066 isPinned, |
|
1067 activeArea, |
|
1068 isSmall, |
|
1069 isLarge |
|
1070 } = (0,external_wp_data_namespaceObject.useSelect)(select => { |
|
1071 const { |
|
1072 getActiveComplementaryArea, |
|
1073 isItemPinned |
|
1074 } = select(store); |
|
1075 |
|
1076 const _activeArea = getActiveComplementaryArea(scope); |
|
1077 |
|
1078 return { |
|
1079 isActive: _activeArea === identifier, |
|
1080 isPinned: isItemPinned(scope, identifier), |
|
1081 activeArea: _activeArea, |
|
1082 isSmall: select(external_wp_viewport_namespaceObject.store).isViewportMatch('< medium'), |
|
1083 isLarge: select(external_wp_viewport_namespaceObject.store).isViewportMatch('large') |
|
1084 }; |
|
1085 }, [identifier, scope]); |
|
1086 useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall); |
|
1087 const { |
|
1088 enableComplementaryArea, |
|
1089 disableComplementaryArea, |
|
1090 pinItem, |
|
1091 unpinItem |
|
1092 } = (0,external_wp_data_namespaceObject.useDispatch)(store); |
|
1093 (0,external_wp_element_namespaceObject.useEffect)(() => { |
|
1094 if (isActiveByDefault && activeArea === undefined && !isSmall) { |
|
1095 enableComplementaryArea(scope, identifier); |
|
1096 } |
|
1097 }, [activeArea, isActiveByDefault, scope, identifier, isSmall]); |
|
1098 return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, isPinnable && (0,external_wp_element_namespaceObject.createElement)(pinned_items, { |
|
1099 scope: scope |
|
1100 }, isPinned && (0,external_wp_element_namespaceObject.createElement)(complementary_area_toggle, { |
|
1101 scope: scope, |
|
1102 identifier: identifier, |
|
1103 isPressed: isActive && (!showIconLabels || isLarge), |
|
1104 "aria-expanded": isActive, |
|
1105 label: title, |
|
1106 icon: showIconLabels ? library_check : icon, |
|
1107 showTooltip: !showIconLabels, |
|
1108 variant: showIconLabels ? 'tertiary' : undefined |
|
1109 })), name && isPinnable && (0,external_wp_element_namespaceObject.createElement)(ComplementaryAreaMoreMenuItem, { |
|
1110 target: name, |
|
1111 scope: scope, |
|
1112 icon: icon |
|
1113 }, title), isActive && (0,external_wp_element_namespaceObject.createElement)(ComplementaryAreaFill, { |
|
1114 className: classnames_default()('interface-complementary-area', className), |
|
1115 scope: scope |
|
1116 }, (0,external_wp_element_namespaceObject.createElement)(complementary_area_header, { |
|
1117 className: headerClassName, |
|
1118 closeLabel: closeLabel, |
|
1119 onClose: () => disableComplementaryArea(scope), |
|
1120 smallScreenTitle: smallScreenTitle, |
|
1121 toggleButtonProps: { |
|
1122 label: closeLabel, |
|
1123 shortcut: toggleShortcut, |
|
1124 scope, |
|
1125 identifier |
|
1126 } |
|
1127 }, header || (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("strong", null, title), isPinnable && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { |
|
1128 className: "interface-complementary-area__pin-unpin-item", |
|
1129 icon: isPinned ? star_filled : star_empty, |
|
1130 label: isPinned ? (0,external_wp_i18n_namespaceObject.__)('Unpin from toolbar') : (0,external_wp_i18n_namespaceObject.__)('Pin to toolbar'), |
|
1131 onClick: () => (isPinned ? unpinItem : pinItem)(scope, identifier), |
|
1132 isPressed: isPinned, |
|
1133 "aria-expanded": isPinned |
|
1134 }))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Panel, { |
|
1135 className: panelClassName |
|
1136 }, children))); |
|
1137 } |
|
1138 |
|
1139 const ComplementaryAreaWrapped = complementary_area_context(ComplementaryArea); |
|
1140 ComplementaryAreaWrapped.Slot = ComplementaryAreaSlot; |
|
1141 /* harmony default export */ var complementary_area = (ComplementaryAreaWrapped); |
|
1142 |
|
1143 ;// CONCATENATED MODULE: external ["wp","compose"] |
|
1144 var external_wp_compose_namespaceObject = window["wp"]["compose"]; |
|
1145 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/interface-skeleton/index.js |
|
1146 |
|
1147 |
|
1148 |
|
1149 /** |
|
1150 * External dependencies |
|
1151 */ |
|
1152 |
|
1153 /** |
|
1154 * WordPress dependencies |
|
1155 */ |
|
1156 |
|
1157 /** |
|
1158 * WordPress dependencies |
|
1159 */ |
|
1160 |
|
1161 |
|
1162 |
|
1163 |
|
1164 |
|
1165 |
|
1166 function useHTMLClass(className) { |
|
1167 (0,external_wp_element_namespaceObject.useEffect)(() => { |
|
1168 const element = document && document.querySelector(`html:not(.${className})`); |
|
1169 |
|
1170 if (!element) { |
|
1171 return; |
|
1172 } |
|
1173 |
|
1174 element.classList.toggle(className); |
|
1175 return () => { |
|
1176 element.classList.toggle(className); |
|
1177 }; |
|
1178 }, [className]); |
|
1179 } |
|
1180 |
|
1181 function InterfaceSkeleton(_ref, ref) { |
|
1182 let { |
|
1183 footer, |
|
1184 header, |
|
1185 sidebar, |
|
1186 secondarySidebar, |
|
1187 notices, |
|
1188 content, |
|
1189 drawer, |
|
1190 actions, |
|
1191 labels, |
|
1192 className, |
|
1193 shortcuts |
|
1194 } = _ref; |
|
1195 const navigateRegionsProps = (0,external_wp_components_namespaceObject.__unstableUseNavigateRegions)(shortcuts); |
|
1196 useHTMLClass('interface-interface-skeleton__html-container'); |
|
1197 const defaultLabels = { |
|
1198 /* translators: accessibility text for the nav bar landmark region. */ |
|
1199 drawer: (0,external_wp_i18n_namespaceObject.__)('Drawer'), |
|
1200 |
|
1201 /* translators: accessibility text for the top bar landmark region. */ |
|
1202 header: (0,external_wp_i18n_namespaceObject.__)('Header'), |
|
1203 |
|
1204 /* translators: accessibility text for the content landmark region. */ |
|
1205 body: (0,external_wp_i18n_namespaceObject.__)('Content'), |
|
1206 |
|
1207 /* translators: accessibility text for the secondary sidebar landmark region. */ |
|
1208 secondarySidebar: (0,external_wp_i18n_namespaceObject.__)('Block Library'), |
|
1209 |
|
1210 /* translators: accessibility text for the settings landmark region. */ |
|
1211 sidebar: (0,external_wp_i18n_namespaceObject.__)('Settings'), |
|
1212 |
|
1213 /* translators: accessibility text for the publish landmark region. */ |
|
1214 actions: (0,external_wp_i18n_namespaceObject.__)('Publish'), |
|
1215 |
|
1216 /* translators: accessibility text for the footer landmark region. */ |
|
1217 footer: (0,external_wp_i18n_namespaceObject.__)('Footer') |
|
1218 }; |
|
1219 const mergedLabels = { ...defaultLabels, |
|
1220 ...labels |
|
1221 }; |
|
1222 return (0,external_wp_element_namespaceObject.createElement)("div", _extends({}, navigateRegionsProps, { |
|
1223 ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([ref, navigateRegionsProps.ref]), |
|
1224 className: classnames_default()(className, 'interface-interface-skeleton', navigateRegionsProps.className, !!footer && 'has-footer') |
|
1225 }), !!drawer && (0,external_wp_element_namespaceObject.createElement)("div", { |
|
1226 className: "interface-interface-skeleton__drawer", |
|
1227 role: "region", |
|
1228 "aria-label": mergedLabels.drawer, |
|
1229 tabIndex: "-1" |
|
1230 }, drawer), (0,external_wp_element_namespaceObject.createElement)("div", { |
|
1231 className: "interface-interface-skeleton__editor" |
|
1232 }, !!header && (0,external_wp_element_namespaceObject.createElement)("div", { |
|
1233 className: "interface-interface-skeleton__header", |
|
1234 role: "region", |
|
1235 "aria-label": mergedLabels.header, |
|
1236 tabIndex: "-1" |
|
1237 }, header), (0,external_wp_element_namespaceObject.createElement)("div", { |
|
1238 className: "interface-interface-skeleton__body" |
|
1239 }, !!secondarySidebar && (0,external_wp_element_namespaceObject.createElement)("div", { |
|
1240 className: "interface-interface-skeleton__secondary-sidebar", |
|
1241 role: "region", |
|
1242 "aria-label": mergedLabels.secondarySidebar, |
|
1243 tabIndex: "-1" |
|
1244 }, secondarySidebar), !!notices && (0,external_wp_element_namespaceObject.createElement)("div", { |
|
1245 className: "interface-interface-skeleton__notices" |
|
1246 }, notices), (0,external_wp_element_namespaceObject.createElement)("div", { |
|
1247 className: "interface-interface-skeleton__content", |
|
1248 role: "region", |
|
1249 "aria-label": mergedLabels.body, |
|
1250 tabIndex: "-1" |
|
1251 }, content), !!sidebar && (0,external_wp_element_namespaceObject.createElement)("div", { |
|
1252 className: "interface-interface-skeleton__sidebar", |
|
1253 role: "region", |
|
1254 "aria-label": mergedLabels.sidebar, |
|
1255 tabIndex: "-1" |
|
1256 }, sidebar), !!actions && (0,external_wp_element_namespaceObject.createElement)("div", { |
|
1257 className: "interface-interface-skeleton__actions", |
|
1258 role: "region", |
|
1259 "aria-label": mergedLabels.actions, |
|
1260 tabIndex: "-1" |
|
1261 }, actions))), !!footer && (0,external_wp_element_namespaceObject.createElement)("div", { |
|
1262 className: "interface-interface-skeleton__footer", |
|
1263 role: "region", |
|
1264 "aria-label": mergedLabels.footer, |
|
1265 tabIndex: "-1" |
|
1266 }, footer)); |
|
1267 } |
|
1268 |
|
1269 /* harmony default export */ var interface_skeleton = ((0,external_wp_element_namespaceObject.forwardRef)(InterfaceSkeleton)); |
|
1270 |
|
1271 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/more-vertical.js |
|
1272 |
|
1273 |
|
1274 /** |
|
1275 * WordPress dependencies |
|
1276 */ |
|
1277 |
|
1278 const moreVertical = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { |
|
1279 xmlns: "http://www.w3.org/2000/svg", |
|
1280 viewBox: "0 0 24 24" |
|
1281 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { |
|
1282 d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" |
|
1283 })); |
|
1284 /* harmony default export */ var more_vertical = (moreVertical); |
|
1285 |
|
1286 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/more-menu-dropdown/index.js |
|
1287 |
|
1288 |
|
1289 /** |
|
1290 * External dependencies |
|
1291 */ |
|
1292 |
|
1293 /** |
|
1294 * WordPress dependencies |
|
1295 */ |
|
1296 |
|
1297 |
|
1298 |
|
1299 |
|
1300 function MoreMenuDropdown(_ref) { |
|
1301 let { |
|
1302 as: DropdownComponent = external_wp_components_namespaceObject.DropdownMenu, |
|
1303 className, |
|
1304 |
|
1305 /* translators: button label text should, if possible, be under 16 characters. */ |
|
1306 label = (0,external_wp_i18n_namespaceObject.__)('Options'), |
|
1307 popoverProps, |
|
1308 toggleProps, |
|
1309 children |
|
1310 } = _ref; |
|
1311 return (0,external_wp_element_namespaceObject.createElement)(DropdownComponent, { |
|
1312 className: classnames_default()('interface-more-menu-dropdown', className), |
|
1313 icon: more_vertical, |
|
1314 label: label, |
|
1315 popoverProps: { |
|
1316 position: 'bottom left', |
|
1317 ...popoverProps, |
|
1318 className: classnames_default()('interface-more-menu-dropdown__content', popoverProps === null || popoverProps === void 0 ? void 0 : popoverProps.className) |
|
1319 }, |
|
1320 toggleProps: { |
|
1321 tooltipPosition: 'bottom', |
|
1322 ...toggleProps |
|
1323 } |
|
1324 }, onClose => children(onClose)); |
|
1325 } |
|
1326 |
|
1327 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/index.js |
|
1328 |
|
1329 |
|
1330 |
|
1331 |
|
1332 |
|
1333 |
|
1334 |
|
1335 |
|
1336 |
|
1337 |
|
1338 |
|
1339 |
|
1340 |
|
1341 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/index.js |
|
1342 |
|
1343 |
|
1344 |
|
1345 ;// CONCATENATED MODULE: external ["wp","blockEditor"] |
|
1346 var external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"]; |
|
1347 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/transformers.js |
|
1348 /** |
|
1349 * WordPress dependencies |
|
1350 */ |
|
1351 |
|
1352 |
|
1353 /** |
|
1354 * Converts a widget entity record into a block. |
|
1355 * |
|
1356 * @param {Object} widget The widget entity record. |
|
1357 * @return {Object} a block (converted from the entity record). |
|
1358 */ |
|
1359 |
|
1360 function transformWidgetToBlock(widget) { |
|
1361 if (widget.id_base === 'block') { |
|
1362 const parsedBlocks = (0,external_wp_blocks_namespaceObject.parse)(widget.instance.raw.content); |
|
1363 |
|
1364 if (!parsedBlocks.length) { |
|
1365 return (0,external_wp_widgets_namespaceObject.addWidgetIdToBlock)((0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', {}, []), widget.id); |
|
1366 } |
|
1367 |
|
1368 return (0,external_wp_widgets_namespaceObject.addWidgetIdToBlock)(parsedBlocks[0], widget.id); |
|
1369 } |
|
1370 |
|
1371 let attributes; |
|
1372 |
|
1373 if (widget._embedded.about[0].is_multi) { |
|
1374 attributes = { |
|
1375 idBase: widget.id_base, |
|
1376 instance: widget.instance |
|
1377 }; |
|
1378 } else { |
|
1379 attributes = { |
|
1380 id: widget.id |
|
1381 }; |
|
1382 } |
|
1383 |
|
1384 return (0,external_wp_widgets_namespaceObject.addWidgetIdToBlock)((0,external_wp_blocks_namespaceObject.createBlock)('core/legacy-widget', attributes, []), widget.id); |
|
1385 } |
|
1386 /** |
|
1387 * Converts a block to a widget entity record. |
|
1388 * |
|
1389 * @param {Object} block The block. |
|
1390 * @param {Object?} relatedWidget A related widget entity record from the API (optional). |
|
1391 * @return {Object} the widget object (converted from block). |
|
1392 */ |
|
1393 |
|
1394 function transformBlockToWidget(block) { |
|
1395 let relatedWidget = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; |
|
1396 let widget; |
|
1397 const isValidLegacyWidgetBlock = block.name === 'core/legacy-widget' && (block.attributes.id || block.attributes.instance); |
|
1398 |
|
1399 if (isValidLegacyWidgetBlock) { |
|
1400 var _block$attributes$id, _block$attributes$idB, _block$attributes$ins; |
|
1401 |
|
1402 widget = { ...relatedWidget, |
|
1403 id: (_block$attributes$id = block.attributes.id) !== null && _block$attributes$id !== void 0 ? _block$attributes$id : relatedWidget.id, |
|
1404 id_base: (_block$attributes$idB = block.attributes.idBase) !== null && _block$attributes$idB !== void 0 ? _block$attributes$idB : relatedWidget.id_base, |
|
1405 instance: (_block$attributes$ins = block.attributes.instance) !== null && _block$attributes$ins !== void 0 ? _block$attributes$ins : relatedWidget.instance |
|
1406 }; |
|
1407 } else { |
|
1408 widget = { ...relatedWidget, |
|
1409 id_base: 'block', |
|
1410 instance: { |
|
1411 raw: { |
|
1412 content: (0,external_wp_blocks_namespaceObject.serialize)(block) |
|
1413 } |
|
1414 } |
|
1415 }; |
|
1416 } // Delete read-only properties. |
|
1417 |
|
1418 |
|
1419 delete widget.rendered; |
|
1420 delete widget.rendered_form; |
|
1421 return widget; |
|
1422 } |
|
1423 |
|
1424 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/utils.js |
362 /** |
1425 /** |
363 * "Kind" of the navigation post. |
1426 * "Kind" of the navigation post. |
364 * |
1427 * |
365 * @type {string} |
1428 * @type {string} |
366 */ |
1429 */ |
435 meta: { |
1498 meta: { |
436 widgetAreaId: id |
1499 widgetAreaId: id |
437 } |
1500 } |
438 }); |
1501 }); |
439 |
1502 |
440 // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/constants.js |
1503 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/constants.js |
441 /** |
1504 /** |
442 * Module Constants |
1505 * Module Constants |
443 */ |
1506 */ |
444 const STORE_NAME = 'core/edit-widgets'; |
1507 const constants_STORE_NAME = 'core/edit-widgets'; |
445 |
1508 |
446 // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/controls.js |
1509 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/actions.js |
447 /** |
1510 /** |
448 * WordPress dependencies |
1511 * WordPress dependencies |
449 */ |
1512 */ |
|
1513 |
|
1514 |
|
1515 |
|
1516 |
|
1517 |
450 |
1518 |
451 /** |
1519 /** |
452 * Internal dependencies |
1520 * Internal dependencies |
453 */ |
1521 */ |
454 |
|
455 |
|
456 |
|
457 /** |
|
458 * Trigger an API Fetch request. |
|
459 * |
|
460 * @param {Object} request API Fetch Request Object. |
|
461 * @return {Object} control descriptor. |
|
462 */ |
|
463 |
|
464 function apiFetch(request) { |
|
465 return { |
|
466 type: 'API_FETCH', |
|
467 request |
|
468 }; |
|
469 } |
|
470 /** |
|
471 * Returns a list of pending actions for given post id. |
|
472 * |
|
473 * @param {number} postId Post ID. |
|
474 * @return {Array} List of pending actions. |
|
475 */ |
|
476 |
|
477 function getPendingActions(postId) { |
|
478 return { |
|
479 type: 'GET_PENDING_ACTIONS', |
|
480 postId |
|
481 }; |
|
482 } |
|
483 /** |
|
484 * Returns boolean indicating whether or not an action processing specified |
|
485 * post is currently running. |
|
486 * |
|
487 * @param {number} postId Post ID. |
|
488 * @return {Object} Action. |
|
489 */ |
|
490 |
|
491 function isProcessingPost(postId) { |
|
492 return { |
|
493 type: 'IS_PROCESSING_POST', |
|
494 postId |
|
495 }; |
|
496 } |
|
497 /** |
|
498 * Resolves navigation post for given menuId. |
|
499 * |
|
500 * @see selectors.js |
|
501 * @param {number} menuId Menu ID. |
|
502 * @return {Object} Action. |
|
503 */ |
|
504 |
|
505 function getNavigationPostForMenu(menuId) { |
|
506 return { |
|
507 type: 'SELECT', |
|
508 registryName: 'core/edit-navigation', |
|
509 selectorName: 'getNavigationPostForMenu', |
|
510 args: [menuId] |
|
511 }; |
|
512 } |
|
513 /** |
|
514 * Resolves widget areas. |
|
515 * |
|
516 * @param {Object} query Query. |
|
517 * @return {Object} Action. |
|
518 */ |
|
519 |
|
520 function resolveWidgetAreas(query = buildWidgetAreasQuery()) { |
|
521 return { |
|
522 type: 'RESOLVE_WIDGET_AREAS', |
|
523 query |
|
524 }; |
|
525 } |
|
526 /** |
|
527 * Resolves widgets. |
|
528 * |
|
529 * @param {Object} query Query. |
|
530 * @return {Object} Action. |
|
531 */ |
|
532 |
|
533 function resolveWidgets(query = buildWidgetsQuery()) { |
|
534 return { |
|
535 type: 'RESOLVE_WIDGETS', |
|
536 query |
|
537 }; |
|
538 } |
|
539 /** |
|
540 * Calls a selector using chosen registry. |
|
541 * |
|
542 * @param {string} registryName Registry name. |
|
543 * @param {string} selectorName Selector name. |
|
544 * @param {Array} args Selector arguments. |
|
545 * @return {Object} control descriptor. |
|
546 */ |
|
547 |
|
548 function controls_select(registryName, selectorName, ...args) { |
|
549 return { |
|
550 type: 'SELECT', |
|
551 registryName, |
|
552 selectorName, |
|
553 args |
|
554 }; |
|
555 } |
|
556 /** |
|
557 * Dispatches an action using chosen registry. |
|
558 * |
|
559 * @param {string} registryName Registry name. |
|
560 * @param {string} actionName Action name. |
|
561 * @param {Array} args Selector arguments. |
|
562 * @return {Object} control descriptor. |
|
563 */ |
|
564 |
|
565 function dispatch(registryName, actionName, ...args) { |
|
566 return { |
|
567 type: 'DISPATCH', |
|
568 registryName, |
|
569 actionName, |
|
570 args |
|
571 }; |
|
572 } |
|
573 const controls = { |
|
574 AWAIT_PROMISE: ({ |
|
575 promise |
|
576 }) => promise, |
|
577 SELECT: Object(external_wp_data_["createRegistryControl"])(registry => ({ |
|
578 registryName, |
|
579 selectorName, |
|
580 args |
|
581 }) => { |
|
582 return registry.select(registryName)[selectorName](...args); |
|
583 }), |
|
584 GET_PENDING_ACTIONS: Object(external_wp_data_["createRegistryControl"])(registry => ({ |
|
585 postId |
|
586 }) => { |
|
587 var _getState$processingQ; |
|
588 |
|
589 return ((_getState$processingQ = getState(registry).processingQueue[postId]) === null || _getState$processingQ === void 0 ? void 0 : _getState$processingQ.pendingActions) || []; |
|
590 }), |
|
591 IS_PROCESSING_POST: Object(external_wp_data_["createRegistryControl"])(registry => ({ |
|
592 postId |
|
593 }) => { |
|
594 var _getState$processingQ2; |
|
595 |
|
596 return (_getState$processingQ2 = getState(registry).processingQueue[postId]) === null || _getState$processingQ2 === void 0 ? void 0 : _getState$processingQ2.inProgress; |
|
597 }), |
|
598 DISPATCH: Object(external_wp_data_["createRegistryControl"])(registry => ({ |
|
599 registryName, |
|
600 actionName, |
|
601 args |
|
602 }) => { |
|
603 return registry.dispatch(registryName)[actionName](...args); |
|
604 }), |
|
605 RESOLVE_WIDGET_AREAS: Object(external_wp_data_["createRegistryControl"])(registry => ({ |
|
606 query |
|
607 }) => { |
|
608 return registry.resolveSelect('core').getEntityRecords(KIND, WIDGET_AREA_ENTITY_TYPE, query); |
|
609 }), |
|
610 RESOLVE_WIDGETS: Object(external_wp_data_["createRegistryControl"])(registry => ({ |
|
611 query |
|
612 }) => { |
|
613 return registry.resolveSelect('core').getEntityRecords('root', 'widget', query); |
|
614 }) |
|
615 }; |
|
616 |
|
617 const getState = registry => registry.stores[STORE_NAME].store.getState(); |
|
618 |
|
619 /* harmony default export */ var store_controls = (controls); |
|
620 |
|
621 // EXTERNAL MODULE: external ["wp","i18n"] |
|
622 var external_wp_i18n_ = __webpack_require__("l3Sj"); |
|
623 |
|
624 // EXTERNAL MODULE: external ["wp","notices"] |
|
625 var external_wp_notices_ = __webpack_require__("onLe"); |
|
626 |
|
627 // EXTERNAL MODULE: ./node_modules/@wordpress/interface/build-module/index.js + 15 modules |
|
628 var build_module = __webpack_require__("U60i"); |
|
629 |
|
630 // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/transformers.js |
|
631 /** |
|
632 * WordPress dependencies |
|
633 */ |
|
634 |
|
635 |
|
636 function transformWidgetToBlock(widget) { |
|
637 if (widget.id_base === 'block') { |
|
638 const parsedBlocks = Object(external_wp_blocks_["parse"])(widget.instance.raw.content); |
|
639 |
|
640 if (!parsedBlocks.length) { |
|
641 return Object(external_wp_widgets_["addWidgetIdToBlock"])(Object(external_wp_blocks_["createBlock"])('core/paragraph', {}, []), widget.id); |
|
642 } |
|
643 |
|
644 return Object(external_wp_widgets_["addWidgetIdToBlock"])(parsedBlocks[0], widget.id); |
|
645 } |
|
646 |
|
647 let attributes; |
|
648 |
|
649 if (widget._embedded.about[0].is_multi) { |
|
650 attributes = { |
|
651 idBase: widget.id_base, |
|
652 instance: widget.instance |
|
653 }; |
|
654 } else { |
|
655 attributes = { |
|
656 id: widget.id |
|
657 }; |
|
658 } |
|
659 |
|
660 return Object(external_wp_widgets_["addWidgetIdToBlock"])(Object(external_wp_blocks_["createBlock"])('core/legacy-widget', attributes, []), widget.id); |
|
661 } |
|
662 function transformBlockToWidget(block, relatedWidget = {}) { |
|
663 let widget; |
|
664 const isValidLegacyWidgetBlock = block.name === 'core/legacy-widget' && (block.attributes.id || block.attributes.instance); |
|
665 |
|
666 if (isValidLegacyWidgetBlock) { |
|
667 var _block$attributes$id, _block$attributes$idB, _block$attributes$ins; |
|
668 |
|
669 widget = { ...relatedWidget, |
|
670 id: (_block$attributes$id = block.attributes.id) !== null && _block$attributes$id !== void 0 ? _block$attributes$id : relatedWidget.id, |
|
671 id_base: (_block$attributes$idB = block.attributes.idBase) !== null && _block$attributes$idB !== void 0 ? _block$attributes$idB : relatedWidget.id_base, |
|
672 instance: (_block$attributes$ins = block.attributes.instance) !== null && _block$attributes$ins !== void 0 ? _block$attributes$ins : relatedWidget.instance |
|
673 }; |
|
674 } else { |
|
675 widget = { ...relatedWidget, |
|
676 id_base: 'block', |
|
677 instance: { |
|
678 raw: { |
|
679 content: Object(external_wp_blocks_["serialize"])(block) |
|
680 } |
|
681 } |
|
682 }; |
|
683 } // Delete read-only properties. |
|
684 |
|
685 |
|
686 delete widget.rendered; |
|
687 delete widget.rendered_form; |
|
688 return widget; |
|
689 } |
|
690 |
|
691 // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/actions.js |
|
692 /** |
|
693 * WordPress dependencies |
|
694 */ |
|
695 |
|
696 |
|
697 |
|
698 |
|
699 /** |
|
700 * Internal dependencies |
|
701 */ |
|
702 |
|
703 |
1522 |
704 |
1523 |
705 |
1524 |
706 |
1525 |
707 /** |
1526 /** |
708 * Persists a stub post with given ID to core data store. The post is meant to be in-memory only and |
1527 * Persists a stub post with given ID to core data store. The post is meant to be in-memory only and |
709 * shouldn't be saved via the API. |
1528 * shouldn't be saved via the API. |
710 * |
1529 * |
711 * @param {string} id Post ID. |
1530 * @param {string} id Post ID. |
712 * @param {Array} blocks Blocks the post should consist of. |
1531 * @param {Array} blocks Blocks the post should consist of. |
713 * @return {Object} The post object. |
1532 * @return {Object} The post object. |
714 */ |
1533 */ |
715 |
1534 |
716 const persistStubPost = function* (id, blocks) { |
1535 const persistStubPost = (id, blocks) => _ref => { |
|
1536 let { |
|
1537 registry |
|
1538 } = _ref; |
717 const stubPost = createStubPost(id, blocks); |
1539 const stubPost = createStubPost(id, blocks); |
718 yield dispatch('core', 'receiveEntityRecords', KIND, POST_TYPE, stubPost, { |
1540 registry.dispatch(external_wp_coreData_namespaceObject.store).receiveEntityRecords(KIND, POST_TYPE, stubPost, { |
719 id: stubPost.id |
1541 id: stubPost.id |
720 }, false); |
1542 }, false); |
721 return stubPost; |
1543 return stubPost; |
722 }; |
1544 }; |
723 function* actions_saveEditedWidgetAreas() { |
1545 /** |
724 const editedWidgetAreas = yield controls_select(STORE_NAME, 'getEditedWidgetAreas'); |
1546 * Converts all the blocks from edited widget areas into widgets, |
|
1547 * and submits a batch request to save everything at once. |
|
1548 * |
|
1549 * Creates a snackbar notice on either success or error. |
|
1550 * |
|
1551 * @return {Function} An action creator. |
|
1552 */ |
|
1553 |
|
1554 const saveEditedWidgetAreas = () => async _ref2 => { |
|
1555 let { |
|
1556 select, |
|
1557 dispatch, |
|
1558 registry |
|
1559 } = _ref2; |
|
1560 const editedWidgetAreas = select.getEditedWidgetAreas(); |
725 |
1561 |
726 if (!(editedWidgetAreas !== null && editedWidgetAreas !== void 0 && editedWidgetAreas.length)) { |
1562 if (!(editedWidgetAreas !== null && editedWidgetAreas !== void 0 && editedWidgetAreas.length)) { |
727 return; |
1563 return; |
728 } |
1564 } |
729 |
1565 |
730 try { |
1566 try { |
731 yield* saveWidgetAreas(editedWidgetAreas); |
1567 await dispatch.saveWidgetAreas(editedWidgetAreas); |
732 yield dispatch(external_wp_notices_["store"], 'createSuccessNotice', Object(external_wp_i18n_["__"])('Widgets saved.'), { |
1568 registry.dispatch(external_wp_notices_namespaceObject.store).createSuccessNotice((0,external_wp_i18n_namespaceObject.__)('Widgets saved.'), { |
733 type: 'snackbar' |
1569 type: 'snackbar' |
734 }); |
1570 }); |
735 } catch (e) { |
1571 } catch (e) { |
736 yield dispatch(external_wp_notices_["store"], 'createErrorNotice', |
1572 registry.dispatch(external_wp_notices_namespaceObject.store).createErrorNotice( |
737 /* translators: %s: The error message. */ |
1573 /* translators: %s: The error message. */ |
738 Object(external_wp_i18n_["sprintf"])(Object(external_wp_i18n_["__"])('There was an error. %s'), e.message), { |
1574 (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)('There was an error. %s'), e.message), { |
739 type: 'snackbar' |
1575 type: 'snackbar' |
740 }); |
1576 }); |
741 } |
1577 } |
742 } |
1578 }; |
743 function* saveWidgetAreas(widgetAreas) { |
1579 /** |
|
1580 * Converts all the blocks from specified widget areas into widgets, |
|
1581 * and submits a batch request to save everything at once. |
|
1582 * |
|
1583 * @param {Object[]} widgetAreas Widget areas to save. |
|
1584 * @return {Function} An action creator. |
|
1585 */ |
|
1586 |
|
1587 const saveWidgetAreas = widgetAreas => async _ref3 => { |
|
1588 let { |
|
1589 dispatch, |
|
1590 registry |
|
1591 } = _ref3; |
|
1592 |
744 try { |
1593 try { |
745 for (const widgetArea of widgetAreas) { |
1594 for (const widgetArea of widgetAreas) { |
746 yield* saveWidgetArea(widgetArea.id); |
1595 await dispatch.saveWidgetArea(widgetArea.id); |
747 } |
1596 } |
748 } finally { |
1597 } finally { |
749 // saveEditedEntityRecord resets the resolution status, let's fix it manually |
1598 // saveEditedEntityRecord resets the resolution status, let's fix it manually. |
750 yield dispatch('core', 'finishResolution', 'getEntityRecord', KIND, WIDGET_AREA_ENTITY_TYPE, buildWidgetAreasQuery()); |
1599 await registry.dispatch(external_wp_coreData_namespaceObject.store).finishResolution('getEntityRecord', KIND, WIDGET_AREA_ENTITY_TYPE, buildWidgetAreasQuery()); |
751 } |
1600 } |
752 } |
1601 }; |
753 function* saveWidgetArea(widgetAreaId) { |
1602 /** |
754 const widgets = yield controls_select(STORE_NAME, 'getWidgets'); |
1603 * Converts all the blocks from a widget area specified by ID into widgets, |
755 const post = yield controls_select('core', 'getEditedEntityRecord', KIND, POST_TYPE, buildWidgetAreaPostId(widgetAreaId)); // Get all widgets from this area |
1604 * and submits a batch request to save everything at once. |
756 |
1605 * |
757 const areaWidgets = Object.values(widgets).filter(({ |
1606 * @param {string} widgetAreaId ID of the widget area to process. |
758 sidebar |
1607 * @return {Function} An action creator. |
759 }) => sidebar === widgetAreaId); // Remove all duplicate reference widget instances for legacy widgets. |
1608 */ |
|
1609 |
|
1610 const saveWidgetArea = widgetAreaId => async _ref4 => { |
|
1611 let { |
|
1612 dispatch, |
|
1613 select, |
|
1614 registry |
|
1615 } = _ref4; |
|
1616 const widgets = select.getWidgets(); |
|
1617 const post = registry.select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(KIND, POST_TYPE, buildWidgetAreaPostId(widgetAreaId)); // Get all widgets from this area |
|
1618 |
|
1619 const areaWidgets = Object.values(widgets).filter(_ref5 => { |
|
1620 let { |
|
1621 sidebar |
|
1622 } = _ref5; |
|
1623 return sidebar === widgetAreaId; |
|
1624 }); // Remove all duplicate reference widget instances for legacy widgets. |
760 // Why? We filter out the widgets with duplicate IDs to prevent adding more than one instance of a widget |
1625 // Why? We filter out the widgets with duplicate IDs to prevent adding more than one instance of a widget |
761 // implemented using a function. WordPress doesn't support having more than one instance of these, if you try to |
1626 // implemented using a function. WordPress doesn't support having more than one instance of these, if you try to |
762 // save multiple instances of these in different sidebars you will run into undefined behaviors. |
1627 // save multiple instances of these in different sidebars you will run into undefined behaviors. |
763 |
1628 |
764 const usedReferenceWidgets = []; |
1629 const usedReferenceWidgets = []; |
2721 * Internal dependencies |
3714 * Internal dependencies |
2722 */ |
3715 */ |
2723 |
3716 |
2724 |
3717 |
2725 |
3718 |
2726 const POPOVER_PROPS = { |
|
2727 className: 'edit-widgets-more-menu__content', |
|
2728 position: 'bottom left' |
|
2729 }; |
|
2730 const TOGGLE_PROPS = { |
|
2731 tooltipPosition: 'bottom' |
|
2732 }; |
|
2733 function MoreMenu() { |
3719 function MoreMenu() { |
2734 const [isKeyboardShortcutsModalActive, setIsKeyboardShortcutsModalVisible] = Object(external_wp_element_["useState"])(false); |
3720 const [isKeyboardShortcutsModalActive, setIsKeyboardShortcutsModalVisible] = (0,external_wp_element_namespaceObject.useState)(false); |
2735 |
3721 |
2736 const toggleKeyboardShortcutsModal = () => setIsKeyboardShortcutsModalVisible(!isKeyboardShortcutsModalActive); |
3722 const toggleKeyboardShortcutsModal = () => setIsKeyboardShortcutsModalVisible(!isKeyboardShortcutsModalActive); |
2737 |
3723 |
2738 Object(external_wp_keyboardShortcuts_["useShortcut"])('core/edit-widgets/keyboard-shortcuts', toggleKeyboardShortcutsModal, { |
3724 (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/edit-widgets/keyboard-shortcuts', toggleKeyboardShortcutsModal); |
2739 bindGlobal: true |
3725 const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium'); |
2740 }); |
3726 return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(MoreMenuDropdown, null, onClose => (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, isLargeViewport && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, { |
2741 const isLargeViewport = Object(external_wp_compose_["useViewportMatch"])('medium'); |
3727 label: (0,external_wp_i18n_namespaceObject._x)('View', 'noun') |
2742 return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["DropdownMenu"], { |
3728 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, { |
2743 className: "edit-widgets-more-menu", |
3729 scope: "core/edit-widgets", |
2744 icon: more_vertical["a" /* default */] |
3730 name: "fixedToolbar", |
2745 /* translators: button label text should, if possible, be under 16 characters. */ |
3731 label: (0,external_wp_i18n_namespaceObject.__)('Top toolbar'), |
2746 , |
3732 info: (0,external_wp_i18n_namespaceObject.__)('Access all block and document tools in a single place'), |
2747 label: Object(external_wp_i18n_["__"])('Options'), |
3733 messageActivated: (0,external_wp_i18n_namespaceObject.__)('Top toolbar activated'), |
2748 popoverProps: POPOVER_PROPS, |
3734 messageDeactivated: (0,external_wp_i18n_namespaceObject.__)('Top toolbar deactivated') |
2749 toggleProps: TOGGLE_PROPS |
3735 })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, { |
2750 }, () => Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, isLargeViewport && Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], { |
3736 label: (0,external_wp_i18n_namespaceObject.__)('Tools') |
2751 label: Object(external_wp_i18n_["_x"])('View', 'noun') |
3737 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { |
2752 }, Object(external_wp_element_["createElement"])(FeatureToggle, { |
|
2753 feature: "fixedToolbar", |
|
2754 label: Object(external_wp_i18n_["__"])('Top toolbar'), |
|
2755 info: Object(external_wp_i18n_["__"])('Access all block and document tools in a single place'), |
|
2756 messageActivated: Object(external_wp_i18n_["__"])('Top toolbar activated'), |
|
2757 messageDeactivated: Object(external_wp_i18n_["__"])('Top toolbar deactivated') |
|
2758 })), Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], { |
|
2759 label: Object(external_wp_i18n_["__"])('Tools') |
|
2760 }, Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], { |
|
2761 onClick: () => { |
3738 onClick: () => { |
2762 setIsKeyboardShortcutsModalVisible(true); |
3739 setIsKeyboardShortcutsModalVisible(true); |
2763 }, |
3740 }, |
2764 shortcut: external_wp_keycodes_["displayShortcut"].access('h') |
3741 shortcut: external_wp_keycodes_namespaceObject.displayShortcut.access('h') |
2765 }, Object(external_wp_i18n_["__"])('Keyboard shortcuts')), Object(external_wp_element_["createElement"])(FeatureToggle, { |
3742 }, (0,external_wp_i18n_namespaceObject.__)('Keyboard shortcuts')), (0,external_wp_element_namespaceObject.createElement)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, { |
2766 feature: "welcomeGuide", |
3743 scope: "core/edit-widgets", |
2767 label: Object(external_wp_i18n_["__"])('Welcome Guide') |
3744 name: "welcomeGuide", |
2768 }), Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], { |
3745 label: (0,external_wp_i18n_namespaceObject.__)('Welcome Guide') |
|
3746 }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { |
2769 role: "menuitem", |
3747 role: "menuitem", |
2770 icon: external["a" /* default */], |
3748 icon: library_external, |
2771 href: Object(external_wp_i18n_["__"])('https://wordpress.org/support/article/block-based-widgets-editor/'), |
3749 href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/support/article/block-based-widgets-editor/'), |
2772 target: "_blank", |
3750 target: "_blank", |
2773 rel: "noopener noreferrer" |
3751 rel: "noopener noreferrer" |
2774 }, Object(external_wp_i18n_["__"])('Help'), Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], { |
3752 }, (0,external_wp_i18n_namespaceObject.__)('Help'), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, { |
2775 as: "span" |
3753 as: "span" |
2776 }, |
3754 }, |
2777 /* translators: accessibility text */ |
3755 /* translators: accessibility text */ |
2778 Object(external_wp_i18n_["__"])('(opens in a new tab)')))), Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], { |
3756 (0,external_wp_i18n_namespaceObject.__)('(opens in a new tab)'))), (0,external_wp_element_namespaceObject.createElement)(tools_more_menu_group.Slot, { |
2779 label: Object(external_wp_i18n_["__"])('Preferences') |
3757 fillProps: { |
2780 }, Object(external_wp_element_["createElement"])(FeatureToggle, { |
3758 onClose |
2781 feature: "keepCaretInsideBlock", |
3759 } |
2782 label: Object(external_wp_i18n_["__"])('Contain text cursor inside block'), |
3760 })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, { |
2783 info: Object(external_wp_i18n_["__"])('Aids screen readers by stopping text caret from leaving blocks.'), |
3761 label: (0,external_wp_i18n_namespaceObject.__)('Preferences') |
2784 messageActivated: Object(external_wp_i18n_["__"])('Contain text cursor inside block activated'), |
3762 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, { |
2785 messageDeactivated: Object(external_wp_i18n_["__"])('Contain text cursor inside block deactivated') |
3763 scope: "core/edit-widgets", |
2786 }), Object(external_wp_element_["createElement"])(FeatureToggle, { |
3764 name: "keepCaretInsideBlock", |
2787 feature: "themeStyles", |
3765 label: (0,external_wp_i18n_namespaceObject.__)('Contain text cursor inside block'), |
2788 info: Object(external_wp_i18n_["__"])('Make the editor look like your theme.'), |
3766 info: (0,external_wp_i18n_namespaceObject.__)('Aids screen readers by stopping text caret from leaving blocks.'), |
2789 label: Object(external_wp_i18n_["__"])('Use theme styles') |
3767 messageActivated: (0,external_wp_i18n_namespaceObject.__)('Contain text cursor inside block activated'), |
2790 }), isLargeViewport && Object(external_wp_element_["createElement"])(FeatureToggle, { |
3768 messageDeactivated: (0,external_wp_i18n_namespaceObject.__)('Contain text cursor inside block deactivated') |
2791 feature: "showBlockBreadcrumbs", |
3769 }), (0,external_wp_element_namespaceObject.createElement)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, { |
2792 label: Object(external_wp_i18n_["__"])('Display block breadcrumbs'), |
3770 scope: "core/edit-widgets", |
2793 info: Object(external_wp_i18n_["__"])('Shows block breadcrumbs at the bottom of the editor.'), |
3771 name: "themeStyles", |
2794 messageActivated: Object(external_wp_i18n_["__"])('Display block breadcrumbs activated'), |
3772 info: (0,external_wp_i18n_namespaceObject.__)('Make the editor look like your theme.'), |
2795 messageDeactivated: Object(external_wp_i18n_["__"])('Display block breadcrumbs deactivated') |
3773 label: (0,external_wp_i18n_namespaceObject.__)('Use theme styles') |
2796 })))), Object(external_wp_element_["createElement"])(KeyboardShortcutHelpModal, { |
3774 }), isLargeViewport && (0,external_wp_element_namespaceObject.createElement)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, { |
|
3775 scope: "core/edit-widgets", |
|
3776 name: "showBlockBreadcrumbs", |
|
3777 label: (0,external_wp_i18n_namespaceObject.__)('Display block breadcrumbs'), |
|
3778 info: (0,external_wp_i18n_namespaceObject.__)('Shows block breadcrumbs at the bottom of the editor.'), |
|
3779 messageActivated: (0,external_wp_i18n_namespaceObject.__)('Display block breadcrumbs activated'), |
|
3780 messageDeactivated: (0,external_wp_i18n_namespaceObject.__)('Display block breadcrumbs deactivated') |
|
3781 })))), (0,external_wp_element_namespaceObject.createElement)(KeyboardShortcutHelpModal, { |
2797 isModalActive: isKeyboardShortcutsModalActive, |
3782 isModalActive: isKeyboardShortcutsModalActive, |
2798 toggleModal: toggleKeyboardShortcutsModal |
3783 toggleModal: toggleKeyboardShortcutsModal |
2799 })); |
3784 })); |
2800 } |
3785 } |
2801 |
3786 |
2802 // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/header/index.js |
3787 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/header/index.js |
2803 |
3788 |
2804 |
3789 |
2805 /** |
3790 /** |
2806 * WordPress dependencies |
3791 * WordPress dependencies |
2807 */ |
3792 */ |
2913 |
3919 |
2914 |
3920 |
2915 function Notices() { |
3921 function Notices() { |
2916 const { |
3922 const { |
2917 removeNotice |
3923 removeNotice |
2918 } = Object(external_wp_data_["useDispatch"])(external_wp_notices_["store"]); |
3924 } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store); |
2919 const { |
3925 const { |
2920 notices |
3926 notices |
2921 } = Object(external_wp_data_["useSelect"])(select => { |
3927 } = (0,external_wp_data_namespaceObject.useSelect)(select => { |
2922 return { |
3928 return { |
2923 notices: select(external_wp_notices_["store"]).getNotices() |
3929 notices: select(external_wp_notices_namespaceObject.store).getNotices() |
2924 }; |
3930 }; |
2925 }, []); |
3931 }, []); |
2926 const dismissibleNotices = Object(external_lodash_["filter"])(notices, { |
3932 const dismissibleNotices = (0,external_lodash_namespaceObject.filter)(notices, { |
2927 isDismissible: true, |
3933 isDismissible: true, |
2928 type: 'default' |
3934 type: 'default' |
2929 }); |
3935 }); |
2930 const nonDismissibleNotices = Object(external_lodash_["filter"])(notices, { |
3936 const nonDismissibleNotices = (0,external_lodash_namespaceObject.filter)(notices, { |
2931 isDismissible: false, |
3937 isDismissible: false, |
2932 type: 'default' |
3938 type: 'default' |
2933 }); |
3939 }); |
2934 const snackbarNotices = Object(external_lodash_["filter"])(notices, { |
3940 const snackbarNotices = (0,external_lodash_namespaceObject.filter)(notices, { |
2935 type: 'snackbar' |
3941 type: 'snackbar' |
2936 }); |
3942 }); |
2937 return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["NoticeList"], { |
3943 return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.NoticeList, { |
2938 notices: nonDismissibleNotices, |
3944 notices: nonDismissibleNotices, |
2939 className: "edit-widgets-notices__pinned" |
3945 className: "edit-widgets-notices__pinned" |
2940 }), Object(external_wp_element_["createElement"])(external_wp_components_["NoticeList"], { |
3946 }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.NoticeList, { |
2941 notices: dismissibleNotices, |
3947 notices: dismissibleNotices, |
2942 className: "edit-widgets-notices__dismissible", |
3948 className: "edit-widgets-notices__dismissible", |
2943 onRemove: removeNotice |
3949 onRemove: removeNotice |
2944 }), Object(external_wp_element_["createElement"])(external_wp_components_["SnackbarList"], { |
3950 }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SnackbarList, { |
2945 notices: snackbarNotices, |
3951 notices: snackbarNotices, |
2946 className: "edit-widgets-notices__snackbar", |
3952 className: "edit-widgets-notices__snackbar", |
2947 onRemove: removeNotice |
3953 onRemove: removeNotice |
2948 })); |
3954 })); |
2949 } |
3955 } |
2950 |
3956 |
2951 /* harmony default export */ var components_notices = (Notices); |
3957 /* harmony default export */ var notices = (Notices); |
2952 |
3958 |
2953 // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/widget-areas-block-editor-content/index.js |
3959 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/widget-areas-block-editor-content/index.js |
2954 |
3960 |
2955 |
3961 |
2956 /** |
3962 /** |
2957 * WordPress dependencies |
3963 * WordPress dependencies |
2958 */ |
3964 */ |
|
3965 |
2959 |
3966 |
2960 |
3967 |
2961 |
3968 |
2962 /** |
3969 /** |
2963 * Internal dependencies |
3970 * Internal dependencies |
2964 */ |
3971 */ |
2965 |
3972 |
2966 |
3973 |
2967 |
3974 |
2968 |
3975 function WidgetAreasBlockEditorContent(_ref) { |
2969 function WidgetAreasBlockEditorContent({ |
3976 let { |
2970 blockEditorSettings |
3977 blockEditorSettings |
2971 }) { |
3978 } = _ref; |
2972 const { |
3979 const hasThemeStyles = (0,external_wp_data_namespaceObject.useSelect)(select => !!select(external_wp_preferences_namespaceObject.store).get('core/edit-widgets', 'themeStyles'), []); |
2973 hasThemeStyles |
3980 const styles = (0,external_wp_element_namespaceObject.useMemo)(() => { |
2974 } = Object(external_wp_data_["useSelect"])(select => ({ |
|
2975 hasThemeStyles: select(store).__unstableIsFeatureActive('themeStyles') |
|
2976 })); |
|
2977 const styles = Object(external_wp_element_["useMemo"])(() => { |
|
2978 return hasThemeStyles ? blockEditorSettings.styles : []; |
3981 return hasThemeStyles ? blockEditorSettings.styles : []; |
2979 }, [blockEditorSettings, hasThemeStyles]); |
3982 }, [blockEditorSettings, hasThemeStyles]); |
2980 return Object(external_wp_element_["createElement"])("div", { |
3983 return (0,external_wp_element_namespaceObject.createElement)("div", { |
2981 className: "edit-widgets-block-editor" |
3984 className: "edit-widgets-block-editor" |
2982 }, Object(external_wp_element_["createElement"])(components_notices, null), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockTools"], null, Object(external_wp_element_["createElement"])(keyboard_shortcuts, null), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockEditorKeyboardShortcuts"], null), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__unstableEditorStyles"], { |
3985 }, (0,external_wp_element_namespaceObject.createElement)(notices, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockTools, null, (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcuts, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__unstableEditorStyles, { |
2983 styles: styles |
3986 styles: styles |
2984 }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockSelectionClearer"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["WritingFlow"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["ObserveTyping"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockList"], { |
3987 }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockSelectionClearer, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.WritingFlow, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.ObserveTyping, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockList, { |
2985 className: "edit-widgets-main-block-list" |
3988 className: "edit-widgets-main-block-list" |
2986 })))))); |
3989 })))))); |
2987 } |
3990 } |
2988 |
3991 |
2989 // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/hooks/use-widget-library-insertion-point.js |
3992 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js |
2990 /** |
3993 |
2991 * WordPress dependencies |
3994 |
2992 */ |
3995 /** |
|
3996 * WordPress dependencies |
|
3997 */ |
|
3998 |
|
3999 const close_close = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { |
|
4000 xmlns: "http://www.w3.org/2000/svg", |
|
4001 viewBox: "0 0 24 24" |
|
4002 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { |
|
4003 d: "M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z" |
|
4004 })); |
|
4005 /* harmony default export */ var library_close = (close_close); |
|
4006 |
|
4007 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/hooks/use-widget-library-insertion-point.js |
|
4008 /** |
|
4009 * WordPress dependencies |
|
4010 */ |
|
4011 |
2993 |
4012 |
2994 |
4013 |
2995 /** |
4014 /** |
2996 * Internal dependencies |
4015 * Internal dependencies |
2997 */ |
4016 */ |
2998 |
4017 |
2999 |
4018 |
3000 |
4019 |
3001 |
4020 |
3002 const useWidgetLibraryInsertionPoint = () => { |
4021 const useWidgetLibraryInsertionPoint = () => { |
3003 const firstRootId = Object(external_wp_data_["useSelect"])(select => { |
4022 const firstRootId = (0,external_wp_data_namespaceObject.useSelect)(select => { |
3004 var _widgetAreasPost$bloc; |
4023 var _widgetAreasPost$bloc; |
3005 |
4024 |
3006 // Default to the first widget area |
4025 // Default to the first widget area |
3007 const { |
4026 const { |
3008 getEntityRecord |
4027 getEntityRecord |
3009 } = select('core'); |
4028 } = select(external_wp_coreData_namespaceObject.store); |
3010 const widgetAreasPost = getEntityRecord(KIND, POST_TYPE, buildWidgetAreasPostId()); |
4029 const widgetAreasPost = getEntityRecord(KIND, POST_TYPE, buildWidgetAreasPostId()); |
3011 return widgetAreasPost === null || widgetAreasPost === void 0 ? void 0 : (_widgetAreasPost$bloc = widgetAreasPost.blocks[0]) === null || _widgetAreasPost$bloc === void 0 ? void 0 : _widgetAreasPost$bloc.clientId; |
4030 return widgetAreasPost === null || widgetAreasPost === void 0 ? void 0 : (_widgetAreasPost$bloc = widgetAreasPost.blocks[0]) === null || _widgetAreasPost$bloc === void 0 ? void 0 : _widgetAreasPost$bloc.clientId; |
3012 }, []); |
4031 }, []); |
3013 return Object(external_wp_data_["useSelect"])(select => { |
4032 return (0,external_wp_data_namespaceObject.useSelect)(select => { |
3014 const { |
4033 const { |
3015 getBlockRootClientId, |
4034 getBlockRootClientId, |
3016 getBlockSelectionEnd, |
4035 getBlockSelectionEnd, |
3017 getBlockOrder, |
4036 getBlockOrder, |
3018 getBlockIndex |
4037 getBlockIndex |
3019 } = select(external_wp_blockEditor_["store"]); |
4038 } = select(external_wp_blockEditor_namespaceObject.store); |
3020 |
4039 |
3021 const insertionPoint = select(store).__experimentalGetInsertionPoint(); // "Browse all" in the quick inserter will set the rootClientId to the current block. |
4040 const insertionPoint = select(store_store).__experimentalGetInsertionPoint(); // "Browse all" in the quick inserter will set the rootClientId to the current block. |
3022 // Otherwise, it will just be undefined, and we'll have to handle it differently below. |
4041 // Otherwise, it will just be undefined, and we'll have to handle it differently below. |
3023 |
4042 |
3024 |
4043 |
3025 if (insertionPoint.rootClientId) { |
4044 if (insertionPoint.rootClientId) { |
3026 return insertionPoint; |
4045 return insertionPoint; |
3067 * Internal dependencies |
4084 * Internal dependencies |
3068 */ |
4085 */ |
3069 |
4086 |
3070 |
4087 |
3071 |
4088 |
3072 |
4089 function InserterSidebar() { |
3073 |
4090 const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<'); |
3074 const interfaceLabels = { |
|
3075 /* translators: accessibility text for the widgets screen top bar landmark region. */ |
|
3076 header: Object(external_wp_i18n_["__"])('Widgets top bar'), |
|
3077 |
|
3078 /* translators: accessibility text for the widgets screen content landmark region. */ |
|
3079 body: Object(external_wp_i18n_["__"])('Widgets and blocks'), |
|
3080 |
|
3081 /* translators: accessibility text for the widgets screen settings landmark region. */ |
|
3082 sidebar: Object(external_wp_i18n_["__"])('Widgets settings'), |
|
3083 |
|
3084 /* translators: accessibility text for the widgets screen footer landmark region. */ |
|
3085 footer: Object(external_wp_i18n_["__"])('Widgets footer') |
|
3086 }; |
|
3087 |
|
3088 function Interface({ |
|
3089 blockEditorSettings |
|
3090 }) { |
|
3091 const isMobileViewport = Object(external_wp_compose_["useViewportMatch"])('medium', '<'); |
|
3092 const isHugeViewport = Object(external_wp_compose_["useViewportMatch"])('huge', '>='); |
|
3093 const { |
|
3094 setIsInserterOpened, |
|
3095 closeGeneralSidebar |
|
3096 } = Object(external_wp_data_["useDispatch"])(store); |
|
3097 const { |
4091 const { |
3098 rootClientId, |
4092 rootClientId, |
3099 insertionIndex |
4093 insertionIndex |
3100 } = use_widget_library_insertion_point(); |
4094 } = use_widget_library_insertion_point(); |
3101 const { |
4095 const { |
|
4096 setIsInserterOpened |
|
4097 } = (0,external_wp_data_namespaceObject.useDispatch)(store_store); |
|
4098 const closeInserter = (0,external_wp_element_namespaceObject.useCallback)(() => { |
|
4099 return setIsInserterOpened(false); |
|
4100 }, [setIsInserterOpened]); |
|
4101 const TagName = !isMobileViewport ? external_wp_components_namespaceObject.VisuallyHidden : 'div'; |
|
4102 const [inserterDialogRef, inserterDialogProps] = (0,external_wp_compose_namespaceObject.__experimentalUseDialog)({ |
|
4103 onClose: closeInserter, |
|
4104 focusOnMount: null |
|
4105 }); |
|
4106 const libraryRef = (0,external_wp_element_namespaceObject.useRef)(); |
|
4107 (0,external_wp_element_namespaceObject.useEffect)(() => { |
|
4108 libraryRef.current.focusSearch(); |
|
4109 }, []); |
|
4110 return (0,external_wp_element_namespaceObject.createElement)("div", _extends({ |
|
4111 ref: inserterDialogRef |
|
4112 }, inserterDialogProps, { |
|
4113 className: "edit-widgets-layout__inserter-panel" |
|
4114 }), (0,external_wp_element_namespaceObject.createElement)(TagName, { |
|
4115 className: "edit-widgets-layout__inserter-panel-header" |
|
4116 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { |
|
4117 icon: library_close, |
|
4118 onClick: closeInserter, |
|
4119 label: (0,external_wp_i18n_namespaceObject.__)('Close block inserter') |
|
4120 })), (0,external_wp_element_namespaceObject.createElement)("div", { |
|
4121 className: "edit-widgets-layout__inserter-panel-content" |
|
4122 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalLibrary, { |
|
4123 showInserterHelpPanel: true, |
|
4124 shouldFocusBlock: isMobileViewport, |
|
4125 rootClientId: rootClientId, |
|
4126 __experimentalInsertionIndex: insertionIndex, |
|
4127 ref: libraryRef |
|
4128 }))); |
|
4129 } |
|
4130 |
|
4131 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/secondary-sidebar/list-view-sidebar.js |
|
4132 |
|
4133 |
|
4134 /** |
|
4135 * WordPress dependencies |
|
4136 */ |
|
4137 |
|
4138 |
|
4139 |
|
4140 |
|
4141 |
|
4142 |
|
4143 |
|
4144 /** |
|
4145 * Internal dependencies |
|
4146 */ |
|
4147 |
|
4148 |
|
4149 function ListViewSidebar() { |
|
4150 const { |
|
4151 setIsListViewOpened |
|
4152 } = (0,external_wp_data_namespaceObject.useDispatch)(store_store); |
|
4153 const focusOnMountRef = (0,external_wp_compose_namespaceObject.useFocusOnMount)('firstElement'); |
|
4154 const headerFocusReturnRef = (0,external_wp_compose_namespaceObject.useFocusReturn)(); |
|
4155 const contentFocusReturnRef = (0,external_wp_compose_namespaceObject.useFocusReturn)(); |
|
4156 |
|
4157 function closeOnEscape(event) { |
|
4158 if (event.keyCode === external_wp_keycodes_namespaceObject.ESCAPE && !event.defaultPrevented) { |
|
4159 event.preventDefault(); |
|
4160 setIsListViewOpened(false); |
|
4161 } |
|
4162 } |
|
4163 |
|
4164 const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(ListViewSidebar); |
|
4165 const labelId = `edit-widgets-editor__list-view-panel-label-${instanceId}`; |
|
4166 return (// eslint-disable-next-line jsx-a11y/no-static-element-interactions |
|
4167 (0,external_wp_element_namespaceObject.createElement)("div", { |
|
4168 "aria-labelledby": labelId, |
|
4169 className: "edit-widgets-editor__list-view-panel", |
|
4170 onKeyDown: closeOnEscape |
|
4171 }, (0,external_wp_element_namespaceObject.createElement)("div", { |
|
4172 className: "edit-widgets-editor__list-view-panel-header", |
|
4173 ref: headerFocusReturnRef |
|
4174 }, (0,external_wp_element_namespaceObject.createElement)("strong", { |
|
4175 id: labelId |
|
4176 }, (0,external_wp_i18n_namespaceObject.__)('List View')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { |
|
4177 icon: close_small, |
|
4178 label: (0,external_wp_i18n_namespaceObject.__)('Close List View Sidebar'), |
|
4179 onClick: () => setIsListViewOpened(false) |
|
4180 })), (0,external_wp_element_namespaceObject.createElement)("div", { |
|
4181 className: "edit-widgets-editor__list-view-panel-content", |
|
4182 ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([contentFocusReturnRef, focusOnMountRef]) |
|
4183 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalListView, { |
|
4184 showNestedBlocks: true, |
|
4185 __experimentalHideContainerBlockActions: true, |
|
4186 __experimentalFeatures: true, |
|
4187 __experimentalPersistentListViewFeatures: true |
|
4188 }))) |
|
4189 ); |
|
4190 } |
|
4191 |
|
4192 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/secondary-sidebar/index.js |
|
4193 |
|
4194 |
|
4195 /** |
|
4196 * WordPress dependencies |
|
4197 */ |
|
4198 |
|
4199 /** |
|
4200 * Internal dependencies |
|
4201 */ |
|
4202 |
|
4203 |
|
4204 /** |
|
4205 * Internal dependencies |
|
4206 */ |
|
4207 |
|
4208 |
|
4209 |
|
4210 function SecondarySidebar() { |
|
4211 const { |
|
4212 isInserterOpen, |
|
4213 isListViewOpen |
|
4214 } = (0,external_wp_data_namespaceObject.useSelect)(select => { |
|
4215 const { |
|
4216 isInserterOpened, |
|
4217 isListViewOpened |
|
4218 } = select(store_store); |
|
4219 return { |
|
4220 isInserterOpen: isInserterOpened(), |
|
4221 isListViewOpen: isListViewOpened() |
|
4222 }; |
|
4223 }, []); |
|
4224 |
|
4225 if (isInserterOpen) { |
|
4226 return (0,external_wp_element_namespaceObject.createElement)(InserterSidebar, null); |
|
4227 } |
|
4228 |
|
4229 if (isListViewOpen) { |
|
4230 return (0,external_wp_element_namespaceObject.createElement)(ListViewSidebar, null); |
|
4231 } |
|
4232 |
|
4233 return null; |
|
4234 } |
|
4235 |
|
4236 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/layout/interface.js |
|
4237 |
|
4238 |
|
4239 /** |
|
4240 * WordPress dependencies |
|
4241 */ |
|
4242 |
|
4243 |
|
4244 |
|
4245 |
|
4246 |
|
4247 |
|
4248 |
|
4249 |
|
4250 /** |
|
4251 * Internal dependencies |
|
4252 */ |
|
4253 |
|
4254 |
|
4255 |
|
4256 |
|
4257 |
|
4258 const interfaceLabels = { |
|
4259 /* translators: accessibility text for the widgets screen top bar landmark region. */ |
|
4260 header: (0,external_wp_i18n_namespaceObject.__)('Widgets top bar'), |
|
4261 |
|
4262 /* translators: accessibility text for the widgets screen content landmark region. */ |
|
4263 body: (0,external_wp_i18n_namespaceObject.__)('Widgets and blocks'), |
|
4264 |
|
4265 /* translators: accessibility text for the widgets screen settings landmark region. */ |
|
4266 sidebar: (0,external_wp_i18n_namespaceObject.__)('Widgets settings'), |
|
4267 |
|
4268 /* translators: accessibility text for the widgets screen footer landmark region. */ |
|
4269 footer: (0,external_wp_i18n_namespaceObject.__)('Widgets footer') |
|
4270 }; |
|
4271 |
|
4272 function Interface(_ref) { |
|
4273 let { |
|
4274 blockEditorSettings |
|
4275 } = _ref; |
|
4276 const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<'); |
|
4277 const isHugeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('huge', '>='); |
|
4278 const { |
|
4279 setIsInserterOpened, |
|
4280 setIsListViewOpened, |
|
4281 closeGeneralSidebar |
|
4282 } = (0,external_wp_data_namespaceObject.useDispatch)(store_store); |
|
4283 const { |
3102 hasBlockBreadCrumbsEnabled, |
4284 hasBlockBreadCrumbsEnabled, |
3103 hasSidebarEnabled, |
4285 hasSidebarEnabled, |
3104 isInserterOpened, |
4286 isInserterOpened, |
|
4287 isListViewOpened, |
3105 previousShortcut, |
4288 previousShortcut, |
3106 nextShortcut |
4289 nextShortcut |
3107 } = Object(external_wp_data_["useSelect"])(select => ({ |
4290 } = (0,external_wp_data_namespaceObject.useSelect)(select => ({ |
3108 hasSidebarEnabled: !!select(build_module["g" /* store */]).getActiveComplementaryArea(store.name), |
4291 hasSidebarEnabled: !!select(store).getActiveComplementaryArea(store_store.name), |
3109 isInserterOpened: !!select(store).isInserterOpened(), |
4292 isInserterOpened: !!select(store_store).isInserterOpened(), |
3110 hasBlockBreadCrumbsEnabled: select(store).__unstableIsFeatureActive('showBlockBreadcrumbs'), |
4293 isListViewOpened: !!select(store_store).isListViewOpened(), |
3111 previousShortcut: select(external_wp_keyboardShortcuts_["store"]).getAllShortcutRawKeyCombinations('core/edit-widgets/previous-region'), |
4294 hasBlockBreadCrumbsEnabled: !!select(external_wp_preferences_namespaceObject.store).get('core/edit-widgets', 'showBlockBreadcrumbs'), |
3112 nextShortcut: select(external_wp_keyboardShortcuts_["store"]).getAllShortcutRawKeyCombinations('core/edit-widgets/next-region') |
4295 previousShortcut: select(external_wp_keyboardShortcuts_namespaceObject.store).getAllShortcutKeyCombinations('core/edit-widgets/previous-region'), |
|
4296 nextShortcut: select(external_wp_keyboardShortcuts_namespaceObject.store).getAllShortcutKeyCombinations('core/edit-widgets/next-region') |
3113 }), []); // Inserter and Sidebars are mutually exclusive |
4297 }), []); // Inserter and Sidebars are mutually exclusive |
3114 |
4298 |
3115 Object(external_wp_element_["useEffect"])(() => { |
4299 (0,external_wp_element_namespaceObject.useEffect)(() => { |
3116 if (hasSidebarEnabled && !isHugeViewport) { |
4300 if (hasSidebarEnabled && !isHugeViewport) { |
3117 setIsInserterOpened(false); |
4301 setIsInserterOpened(false); |
|
4302 setIsListViewOpened(false); |
3118 } |
4303 } |
3119 }, [hasSidebarEnabled, isHugeViewport]); |
4304 }, [hasSidebarEnabled, isHugeViewport]); |
3120 Object(external_wp_element_["useEffect"])(() => { |
4305 (0,external_wp_element_namespaceObject.useEffect)(() => { |
3121 if (isInserterOpened && !isHugeViewport) { |
4306 if ((isInserterOpened || isListViewOpened) && !isHugeViewport) { |
3122 closeGeneralSidebar(); |
4307 closeGeneralSidebar(); |
3123 } |
4308 } |
3124 }, [isInserterOpened, isHugeViewport]); |
4309 }, [isInserterOpened, isListViewOpened, isHugeViewport]); |
3125 const [inserterDialogRef, inserterDialogProps] = Object(external_wp_compose_["__experimentalUseDialog"])({ |
4310 const secondarySidebarLabel = isListViewOpened ? (0,external_wp_i18n_namespaceObject.__)('List View') : (0,external_wp_i18n_namespaceObject.__)('Block Library'); |
3126 onClose: () => setIsInserterOpened(false) |
4311 const hasSecondarySidebar = isListViewOpened || isInserterOpened; |
3127 }); |
4312 return (0,external_wp_element_namespaceObject.createElement)(interface_skeleton, { |
3128 return Object(external_wp_element_["createElement"])(build_module["e" /* InterfaceSkeleton */], { |
4313 labels: { ...interfaceLabels, |
3129 labels: interfaceLabels, |
4314 secondarySidebar: secondarySidebarLabel |
3130 header: Object(external_wp_element_["createElement"])(header, null), |
4315 }, |
3131 secondarySidebar: isInserterOpened && Object(external_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({ |
4316 header: (0,external_wp_element_namespaceObject.createElement)(header, null), |
3132 ref: inserterDialogRef |
4317 secondarySidebar: hasSecondarySidebar && (0,external_wp_element_namespaceObject.createElement)(SecondarySidebar, null), |
3133 }, inserterDialogProps, { |
4318 sidebar: hasSidebarEnabled && (0,external_wp_element_namespaceObject.createElement)(complementary_area.Slot, { |
3134 className: "edit-widgets-layout__inserter-panel" |
|
3135 }), Object(external_wp_element_["createElement"])("div", { |
|
3136 className: "edit-widgets-layout__inserter-panel-header" |
|
3137 }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { |
|
3138 icon: library_close["a" /* default */], |
|
3139 onClick: () => setIsInserterOpened(false) |
|
3140 })), Object(external_wp_element_["createElement"])("div", { |
|
3141 className: "edit-widgets-layout__inserter-panel-content" |
|
3142 }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalLibrary"], { |
|
3143 showInserterHelpPanel: true, |
|
3144 shouldFocusBlock: isMobileViewport, |
|
3145 rootClientId: rootClientId, |
|
3146 __experimentalInsertionIndex: insertionIndex |
|
3147 }))), |
|
3148 sidebar: hasSidebarEnabled && Object(external_wp_element_["createElement"])(build_module["b" /* ComplementaryArea */].Slot, { |
|
3149 scope: "core/edit-widgets" |
4319 scope: "core/edit-widgets" |
3150 }), |
4320 }), |
3151 content: Object(external_wp_element_["createElement"])(WidgetAreasBlockEditorContent, { |
4321 content: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(WidgetAreasBlockEditorContent, { |
3152 blockEditorSettings: blockEditorSettings |
4322 blockEditorSettings: blockEditorSettings |
3153 }), |
4323 }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockStyles.Slot, { |
3154 footer: hasBlockBreadCrumbsEnabled && !isMobileViewport && Object(external_wp_element_["createElement"])("div", { |
4324 scope: "core/block-inspector" |
|
4325 })), |
|
4326 footer: hasBlockBreadCrumbsEnabled && !isMobileViewport && (0,external_wp_element_namespaceObject.createElement)("div", { |
3155 className: "edit-widgets-layout__footer" |
4327 className: "edit-widgets-layout__footer" |
3156 }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockBreadcrumb"], { |
4328 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockBreadcrumb, { |
3157 rootLabelText: Object(external_wp_i18n_["__"])('Widgets') |
4329 rootLabelText: (0,external_wp_i18n_namespaceObject.__)('Widgets') |
3158 })), |
4330 })), |
3159 shortcuts: { |
4331 shortcuts: { |
3160 previous: previousShortcut, |
4332 previous: previousShortcut, |
3161 next: nextShortcut |
4333 next: nextShortcut |
3162 } |
4334 } |
3163 }); |
4335 }); |
3164 } |
4336 } |
3165 |
4337 |
3166 /* harmony default export */ var layout_interface = (Interface); |
4338 /* harmony default export */ var layout_interface = (Interface); |
3167 |
4339 |
3168 // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/layout/unsaved-changes-warning.js |
4340 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/layout/unsaved-changes-warning.js |
3169 /** |
4341 /** |
3170 * WordPress dependencies |
4342 * WordPress dependencies |
3171 */ |
4343 */ |
3172 |
4344 |
3173 |
4345 |
3233 |
4406 |
3234 |
4407 |
3235 function WelcomeGuide() { |
4408 function WelcomeGuide() { |
3236 var _widgetAreas$filter$l; |
4409 var _widgetAreas$filter$l; |
3237 |
4410 |
3238 const isActive = Object(external_wp_data_["useSelect"])(select => select(store).__unstableIsFeatureActive('welcomeGuide'), []); |
4411 const isActive = (0,external_wp_data_namespaceObject.useSelect)(select => !!select(external_wp_preferences_namespaceObject.store).get('core/edit-widgets', 'welcomeGuide'), []); |
3239 const { |
4412 const { |
3240 __unstableToggleFeature: toggleFeature |
4413 toggle |
3241 } = Object(external_wp_data_["useDispatch"])(store); |
4414 } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store); |
3242 const widgetAreas = Object(external_wp_data_["useSelect"])(select => select(store).getWidgetAreas({ |
4415 const widgetAreas = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).getWidgetAreas({ |
3243 per_page: -1 |
4416 per_page: -1 |
3244 })); |
4417 }), []); |
3245 |
4418 |
3246 if (!isActive) { |
4419 if (!isActive) { |
3247 return null; |
4420 return null; |
3248 } |
4421 } |
3249 |
4422 |
3250 const isEntirelyBlockWidgets = widgetAreas === null || widgetAreas === void 0 ? void 0 : widgetAreas.every(widgetArea => widgetArea.id === 'wp_inactive_widgets' || widgetArea.widgets.every(widgetId => widgetId.startsWith('block-'))); |
4423 const isEntirelyBlockWidgets = widgetAreas === null || widgetAreas === void 0 ? void 0 : widgetAreas.every(widgetArea => widgetArea.id === 'wp_inactive_widgets' || widgetArea.widgets.every(widgetId => widgetId.startsWith('block-'))); |
3251 const numWidgetAreas = (_widgetAreas$filter$l = widgetAreas === null || widgetAreas === void 0 ? void 0 : widgetAreas.filter(widgetArea => widgetArea.id !== 'wp_inactive_widgets').length) !== null && _widgetAreas$filter$l !== void 0 ? _widgetAreas$filter$l : 0; |
4424 const numWidgetAreas = (_widgetAreas$filter$l = widgetAreas === null || widgetAreas === void 0 ? void 0 : widgetAreas.filter(widgetArea => widgetArea.id !== 'wp_inactive_widgets').length) !== null && _widgetAreas$filter$l !== void 0 ? _widgetAreas$filter$l : 0; |
3252 return Object(external_wp_element_["createElement"])(external_wp_components_["Guide"], { |
4425 return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Guide, { |
3253 className: "edit-widgets-welcome-guide", |
4426 className: "edit-widgets-welcome-guide", |
3254 contentLabel: Object(external_wp_i18n_["__"])('Welcome to block Widgets'), |
4427 contentLabel: (0,external_wp_i18n_namespaceObject.__)('Welcome to block Widgets'), |
3255 finishButtonText: Object(external_wp_i18n_["__"])('Get started'), |
4428 finishButtonText: (0,external_wp_i18n_namespaceObject.__)('Get started'), |
3256 onFinish: () => toggleFeature('welcomeGuide'), |
4429 onFinish: () => toggle('core/edit-widgets', 'welcomeGuide'), |
3257 pages: [{ |
4430 pages: [{ |
3258 image: Object(external_wp_element_["createElement"])(WelcomeGuideImage, { |
4431 image: (0,external_wp_element_namespaceObject.createElement)(WelcomeGuideImage, { |
3259 nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.svg", |
4432 nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.svg", |
3260 animatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.gif" |
4433 animatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.gif" |
3261 }), |
4434 }), |
3262 content: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("h1", { |
4435 content: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("h1", { |
3263 className: "edit-widgets-welcome-guide__heading" |
4436 className: "edit-widgets-welcome-guide__heading" |
3264 }, Object(external_wp_i18n_["__"])('Welcome to block Widgets')), isEntirelyBlockWidgets ? Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("p", { |
4437 }, (0,external_wp_i18n_namespaceObject.__)('Welcome to block Widgets')), isEntirelyBlockWidgets ? (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("p", { |
3265 className: "edit-widgets-welcome-guide__text" |
4438 className: "edit-widgets-welcome-guide__text" |
3266 }, Object(external_wp_i18n_["sprintf"])( // Translators: %s: Number of block areas in the current theme. |
4439 }, (0,external_wp_i18n_namespaceObject.sprintf)( // Translators: %s: Number of block areas in the current theme. |
3267 Object(external_wp_i18n_["_n"])('Your theme provides %s “block” area 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.', 'Your theme provides %s 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.', numWidgetAreas), numWidgetAreas))) : Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("p", { |
4440 (0,external_wp_i18n_namespaceObject._n)('Your theme provides %s “block” area 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.', 'Your theme provides %s 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.', numWidgetAreas), numWidgetAreas))) : (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("p", { |
3268 className: "edit-widgets-welcome-guide__text" |
4441 className: "edit-widgets-welcome-guide__text" |
3269 }, Object(external_wp_i18n_["__"])('You can now add any block to your site’s widget areas. Don’t worry, all of your favorite widgets still work flawlessly.')), Object(external_wp_element_["createElement"])("p", { |
4442 }, (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)("p", { |
3270 className: "edit-widgets-welcome-guide__text" |
4443 className: "edit-widgets-welcome-guide__text" |
3271 }, Object(external_wp_element_["createElement"])("strong", null, Object(external_wp_i18n_["__"])('Want to stick with the old widgets?')), ' ', Object(external_wp_element_["createElement"])(external_wp_components_["ExternalLink"], { |
4444 }, (0,external_wp_element_namespaceObject.createElement)("strong", null, (0,external_wp_i18n_namespaceObject.__)('Want to stick with the old widgets?')), ' ', (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, { |
3272 href: Object(external_wp_i18n_["__"])('https://wordpress.org/plugins/classic-widgets/') |
4445 href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/plugins/classic-widgets/') |
3273 }, Object(external_wp_i18n_["__"])('Get the Classic Widgets plugin.'))))) |
4446 }, (0,external_wp_i18n_namespaceObject.__)('Get the Classic Widgets plugin.'))))) |
3274 }, { |
4447 }, { |
3275 image: Object(external_wp_element_["createElement"])(WelcomeGuideImage, { |
4448 image: (0,external_wp_element_namespaceObject.createElement)(WelcomeGuideImage, { |
3276 nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-editor.svg", |
4449 nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-editor.svg", |
3277 animatedSrc: "https://s.w.org/images/block-editor/welcome-editor.gif" |
4450 animatedSrc: "https://s.w.org/images/block-editor/welcome-editor.gif" |
3278 }), |
4451 }), |
3279 content: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("h1", { |
4452 content: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("h1", { |
3280 className: "edit-widgets-welcome-guide__heading" |
4453 className: "edit-widgets-welcome-guide__heading" |
3281 }, Object(external_wp_i18n_["__"])('Make each block your own')), Object(external_wp_element_["createElement"])("p", { |
4454 }, (0,external_wp_i18n_namespaceObject.__)('Make each block your own')), (0,external_wp_element_namespaceObject.createElement)("p", { |
3282 className: "edit-widgets-welcome-guide__text" |
4455 className: "edit-widgets-welcome-guide__text" |
3283 }, Object(external_wp_i18n_["__"])('Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.'))) |
4456 }, (0,external_wp_i18n_namespaceObject.__)('Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.'))) |
3284 }, { |
4457 }, { |
3285 image: Object(external_wp_element_["createElement"])(WelcomeGuideImage, { |
4458 image: (0,external_wp_element_namespaceObject.createElement)(WelcomeGuideImage, { |
3286 nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-library.svg", |
4459 nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-library.svg", |
3287 animatedSrc: "https://s.w.org/images/block-editor/welcome-library.gif" |
4460 animatedSrc: "https://s.w.org/images/block-editor/welcome-library.gif" |
3288 }), |
4461 }), |
3289 content: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("h1", { |
4462 content: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("h1", { |
3290 className: "edit-widgets-welcome-guide__heading" |
4463 className: "edit-widgets-welcome-guide__heading" |
3291 }, Object(external_wp_i18n_["__"])('Get to know the block library')), Object(external_wp_element_["createElement"])("p", { |
4464 }, (0,external_wp_i18n_namespaceObject.__)('Get to know the block library')), (0,external_wp_element_namespaceObject.createElement)("p", { |
3292 className: "edit-widgets-welcome-guide__text" |
4465 className: "edit-widgets-welcome-guide__text" |
3293 }, Object(external_wp_element_["createInterpolateElement"])(Object(external_wp_i18n_["__"])('All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon.'), { |
4466 }, (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)('All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon.'), { |
3294 InserterIconImage: Object(external_wp_element_["createElement"])("img", { |
4467 InserterIconImage: (0,external_wp_element_namespaceObject.createElement)("img", { |
3295 className: "edit-widgets-welcome-guide__inserter-icon", |
4468 className: "edit-widgets-welcome-guide__inserter-icon", |
3296 alt: Object(external_wp_i18n_["__"])('inserter'), |
4469 alt: (0,external_wp_i18n_namespaceObject.__)('inserter'), |
3297 src: "data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A" |
4470 src: "data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A" |
3298 }) |
4471 }) |
3299 }))) |
4472 }))) |
3300 }, { |
4473 }, { |
3301 image: Object(external_wp_element_["createElement"])(WelcomeGuideImage, { |
4474 image: (0,external_wp_element_namespaceObject.createElement)(WelcomeGuideImage, { |
3302 nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.svg", |
4475 nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.svg", |
3303 animatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.gif" |
4476 animatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.gif" |
3304 }), |
4477 }), |
3305 content: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("h1", { |
4478 content: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("h1", { |
3306 className: "edit-widgets-welcome-guide__heading" |
4479 className: "edit-widgets-welcome-guide__heading" |
3307 }, Object(external_wp_i18n_["__"])('Learn how to use the block editor')), Object(external_wp_element_["createElement"])("p", { |
4480 }, (0,external_wp_i18n_namespaceObject.__)('Learn how to use the block editor')), (0,external_wp_element_namespaceObject.createElement)("p", { |
3308 className: "edit-widgets-welcome-guide__text" |
4481 className: "edit-widgets-welcome-guide__text" |
3309 }, Object(external_wp_i18n_["__"])('New to the block editor? Want to learn more about using it? '), Object(external_wp_element_["createElement"])(external_wp_components_["ExternalLink"], { |
4482 }, (0,external_wp_i18n_namespaceObject.__)('New to the block editor? Want to learn more about using it? '), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, { |
3310 href: Object(external_wp_i18n_["__"])('https://wordpress.org/support/article/wordpress-editor/') |
4483 href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/support/article/wordpress-editor/') |
3311 }, Object(external_wp_i18n_["__"])("Here's a detailed guide.")))) |
4484 }, (0,external_wp_i18n_namespaceObject.__)("Here's a detailed guide.")))) |
3312 }] |
4485 }] |
3313 }); |
4486 }); |
3314 } |
4487 } |
3315 |
4488 |
3316 function WelcomeGuideImage({ |
4489 function WelcomeGuideImage(_ref) { |
3317 nonAnimatedSrc, |
4490 let { |
3318 animatedSrc |
4491 nonAnimatedSrc, |
3319 }) { |
4492 animatedSrc |
3320 return Object(external_wp_element_["createElement"])("picture", { |
4493 } = _ref; |
|
4494 return (0,external_wp_element_namespaceObject.createElement)("picture", { |
3321 className: "edit-widgets-welcome-guide__image" |
4495 className: "edit-widgets-welcome-guide__image" |
3322 }, Object(external_wp_element_["createElement"])("source", { |
4496 }, (0,external_wp_element_namespaceObject.createElement)("source", { |
3323 srcSet: nonAnimatedSrc, |
4497 srcSet: nonAnimatedSrc, |
3324 media: "(prefers-reduced-motion: reduce)" |
4498 media: "(prefers-reduced-motion: reduce)" |
3325 }), Object(external_wp_element_["createElement"])("img", { |
4499 }), (0,external_wp_element_namespaceObject.createElement)("img", { |
3326 src: animatedSrc, |
4500 src: animatedSrc, |
3327 width: "312", |
4501 width: "312", |
3328 height: "240", |
4502 height: "240", |
3329 alt: "" |
4503 alt: "" |
3330 })); |
4504 })); |
3331 } |
4505 } |
3332 |
4506 |
3333 // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/layout/index.js |
4507 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/layout/index.js |
3334 |
4508 |
3335 |
4509 |
3336 /** |
4510 /** |
3337 * WordPress dependencies |
4511 * WordPress dependencies |
3338 */ |
4512 */ |
|
4513 |
|
4514 |
|
4515 |
3339 |
4516 |
3340 |
4517 |
3341 /** |
4518 /** |
3342 * Internal dependencies |
4519 * Internal dependencies |
3343 */ |
4520 */ |
3454 settings, |
4656 settings, |
3455 name |
4657 name |
3456 } = block; |
4658 } = block; |
3457 |
4659 |
3458 if (metadata) { |
4660 if (metadata) { |
3459 Object(external_wp_blocks_["unstable__bootstrapServerSideBlockDefinitions"])({ |
4661 (0,external_wp_blocks_namespaceObject.unstable__bootstrapServerSideBlockDefinitions)({ |
3460 [name]: metadata |
4662 [name]: metadata |
3461 }); |
4663 }); |
3462 } |
4664 } |
3463 |
4665 |
3464 Object(external_wp_blocks_["registerBlockType"])(name, settings); |
4666 (0,external_wp_blocks_namespaceObject.registerBlockType)(name, settings); |
3465 }; |
4667 }; |
3466 |
4668 |
3467 |
4669 }(); |
3468 /***/ }), |
4670 (window.wp = window.wp || {}).editWidgets = __webpack_exports__; |
3469 |
4671 /******/ })() |
3470 /***/ "GLVC": |
4672 ; |
3471 /***/ (function(module, exports) { |
|
3472 |
|
3473 (function() { module.exports = window["wp"]["widgets"]; }()); |
|
3474 |
|
3475 /***/ }), |
|
3476 |
|
3477 /***/ "GRId": |
|
3478 /***/ (function(module, exports) { |
|
3479 |
|
3480 (function() { module.exports = window["wp"]["element"]; }()); |
|
3481 |
|
3482 /***/ }), |
|
3483 |
|
3484 /***/ "HSyU": |
|
3485 /***/ (function(module, exports) { |
|
3486 |
|
3487 (function() { module.exports = window["wp"]["blocks"]; }()); |
|
3488 |
|
3489 /***/ }), |
|
3490 |
|
3491 /***/ "K+tz": |
|
3492 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
3493 |
|
3494 "use strict"; |
|
3495 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
|
3496 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
|
3497 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); |
|
3498 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
|
3499 |
|
3500 |
|
3501 /** |
|
3502 * WordPress dependencies |
|
3503 */ |
|
3504 |
|
3505 const external = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
|
3506 xmlns: "http://www.w3.org/2000/svg", |
|
3507 viewBox: "0 0 24 24" |
|
3508 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
|
3509 d: "M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z" |
|
3510 })); |
|
3511 /* harmony default export */ __webpack_exports__["a"] = (external); |
|
3512 |
|
3513 |
|
3514 /***/ }), |
|
3515 |
|
3516 /***/ "K2cm": |
|
3517 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
3518 |
|
3519 "use strict"; |
|
3520 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
|
3521 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
|
3522 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); |
|
3523 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
|
3524 |
|
3525 |
|
3526 /** |
|
3527 * WordPress dependencies |
|
3528 */ |
|
3529 |
|
3530 const redo = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
|
3531 xmlns: "http://www.w3.org/2000/svg", |
|
3532 viewBox: "0 0 24 24" |
|
3533 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
|
3534 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" |
|
3535 })); |
|
3536 /* harmony default export */ __webpack_exports__["a"] = (redo); |
|
3537 |
|
3538 |
|
3539 /***/ }), |
|
3540 |
|
3541 /***/ "K9lf": |
|
3542 /***/ (function(module, exports) { |
|
3543 |
|
3544 (function() { module.exports = window["wp"]["compose"]; }()); |
|
3545 |
|
3546 /***/ }), |
|
3547 |
|
3548 /***/ "KEfo": |
|
3549 /***/ (function(module, exports) { |
|
3550 |
|
3551 (function() { module.exports = window["wp"]["viewport"]; }()); |
|
3552 |
|
3553 /***/ }), |
|
3554 |
|
3555 /***/ "Mmq9": |
|
3556 /***/ (function(module, exports) { |
|
3557 |
|
3558 (function() { module.exports = window["wp"]["url"]; }()); |
|
3559 |
|
3560 /***/ }), |
|
3561 |
|
3562 /***/ "Ntru": |
|
3563 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
3564 |
|
3565 "use strict"; |
|
3566 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
|
3567 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
|
3568 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); |
|
3569 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
|
3570 |
|
3571 |
|
3572 /** |
|
3573 * WordPress dependencies |
|
3574 */ |
|
3575 |
|
3576 const undo = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
|
3577 xmlns: "http://www.w3.org/2000/svg", |
|
3578 viewBox: "0 0 24 24" |
|
3579 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
|
3580 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" |
|
3581 })); |
|
3582 /* harmony default export */ __webpack_exports__["a"] = (undo); |
|
3583 |
|
3584 |
|
3585 /***/ }), |
|
3586 |
|
3587 /***/ "Q4Sy": |
|
3588 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
3589 |
|
3590 "use strict"; |
|
3591 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
|
3592 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
|
3593 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); |
|
3594 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
|
3595 |
|
3596 |
|
3597 /** |
|
3598 * WordPress dependencies |
|
3599 */ |
|
3600 |
|
3601 const plus = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
|
3602 xmlns: "http://www.w3.org/2000/svg", |
|
3603 viewBox: "0 0 24 24" |
|
3604 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
|
3605 d: "M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z" |
|
3606 })); |
|
3607 /* harmony default export */ __webpack_exports__["a"] = (plus); |
|
3608 |
|
3609 |
|
3610 /***/ }), |
|
3611 |
|
3612 /***/ "QyPg": |
|
3613 /***/ (function(module, exports) { |
|
3614 |
|
3615 (function() { module.exports = window["wp"]["blockLibrary"]; }()); |
|
3616 |
|
3617 /***/ }), |
|
3618 |
|
3619 /***/ "RMJe": |
|
3620 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
3621 |
|
3622 "use strict"; |
|
3623 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
|
3624 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
|
3625 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); |
|
3626 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
|
3627 |
|
3628 |
|
3629 /** |
|
3630 * WordPress dependencies |
|
3631 */ |
|
3632 |
|
3633 const check = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
|
3634 xmlns: "http://www.w3.org/2000/svg", |
|
3635 viewBox: "0 0 24 24" |
|
3636 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
|
3637 d: "M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z" |
|
3638 })); |
|
3639 /* harmony default export */ __webpack_exports__["a"] = (check); |
|
3640 |
|
3641 |
|
3642 /***/ }), |
|
3643 |
|
3644 /***/ "RxS6": |
|
3645 /***/ (function(module, exports) { |
|
3646 |
|
3647 (function() { module.exports = window["wp"]["keycodes"]; }()); |
|
3648 |
|
3649 /***/ }), |
|
3650 |
|
3651 /***/ "TSYQ": |
|
3652 /***/ (function(module, exports, __webpack_require__) { |
|
3653 |
|
3654 var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! |
|
3655 Copyright (c) 2018 Jed Watson. |
|
3656 Licensed under the MIT License (MIT), see |
|
3657 http://jedwatson.github.io/classnames |
|
3658 */ |
|
3659 /* global define */ |
|
3660 |
|
3661 (function () { |
|
3662 'use strict'; |
|
3663 |
|
3664 var hasOwn = {}.hasOwnProperty; |
|
3665 |
|
3666 function classNames() { |
|
3667 var classes = []; |
|
3668 |
|
3669 for (var i = 0; i < arguments.length; i++) { |
|
3670 var arg = arguments[i]; |
|
3671 if (!arg) continue; |
|
3672 |
|
3673 var argType = typeof arg; |
|
3674 |
|
3675 if (argType === 'string' || argType === 'number') { |
|
3676 classes.push(arg); |
|
3677 } else if (Array.isArray(arg)) { |
|
3678 if (arg.length) { |
|
3679 var inner = classNames.apply(null, arg); |
|
3680 if (inner) { |
|
3681 classes.push(inner); |
|
3682 } |
|
3683 } |
|
3684 } else if (argType === 'object') { |
|
3685 if (arg.toString === Object.prototype.toString) { |
|
3686 for (var key in arg) { |
|
3687 if (hasOwn.call(arg, key) && arg[key]) { |
|
3688 classes.push(key); |
|
3689 } |
|
3690 } |
|
3691 } else { |
|
3692 classes.push(arg.toString()); |
|
3693 } |
|
3694 } |
|
3695 } |
|
3696 |
|
3697 return classes.join(' '); |
|
3698 } |
|
3699 |
|
3700 if ( true && module.exports) { |
|
3701 classNames.default = classNames; |
|
3702 module.exports = classNames; |
|
3703 } else if (true) { |
|
3704 // register as 'classnames', consistent with npm package name |
|
3705 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { |
|
3706 return classNames; |
|
3707 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), |
|
3708 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); |
|
3709 } else {} |
|
3710 }()); |
|
3711 |
|
3712 |
|
3713 /***/ }), |
|
3714 |
|
3715 /***/ "Tqx9": |
|
3716 /***/ (function(module, exports) { |
|
3717 |
|
3718 (function() { module.exports = window["wp"]["primitives"]; }()); |
|
3719 |
|
3720 /***/ }), |
|
3721 |
|
3722 /***/ "TvNi": |
|
3723 /***/ (function(module, exports) { |
|
3724 |
|
3725 (function() { module.exports = window["wp"]["plugins"]; }()); |
|
3726 |
|
3727 /***/ }), |
|
3728 |
|
3729 /***/ "U60i": |
|
3730 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
3731 |
|
3732 "use strict"; |
|
3733 |
|
3734 // EXPORTS |
|
3735 __webpack_require__.d(__webpack_exports__, "g", function() { return /* reexport */ store; }); |
|
3736 __webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ complementary_area; }); |
|
3737 __webpack_require__.d(__webpack_exports__, "c", function() { return /* reexport */ ComplementaryAreaMoreMenuItem; }); |
|
3738 __webpack_require__.d(__webpack_exports__, "d", function() { return /* reexport */ fullscreen_mode; }); |
|
3739 __webpack_require__.d(__webpack_exports__, "e", function() { return /* reexport */ interface_skeleton; }); |
|
3740 __webpack_require__.d(__webpack_exports__, "f", function() { return /* reexport */ pinned_items; }); |
|
3741 __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ action_item; }); |
|
3742 |
|
3743 // NAMESPACE OBJECT: ./node_modules/@wordpress/interface/build-module/store/actions.js |
|
3744 var actions_namespaceObject = {}; |
|
3745 __webpack_require__.r(actions_namespaceObject); |
|
3746 __webpack_require__.d(actions_namespaceObject, "enableComplementaryArea", function() { return actions_enableComplementaryArea; }); |
|
3747 __webpack_require__.d(actions_namespaceObject, "disableComplementaryArea", function() { return actions_disableComplementaryArea; }); |
|
3748 __webpack_require__.d(actions_namespaceObject, "pinItem", function() { return actions_pinItem; }); |
|
3749 __webpack_require__.d(actions_namespaceObject, "unpinItem", function() { return actions_unpinItem; }); |
|
3750 |
|
3751 // NAMESPACE OBJECT: ./node_modules/@wordpress/interface/build-module/store/selectors.js |
|
3752 var selectors_namespaceObject = {}; |
|
3753 __webpack_require__.r(selectors_namespaceObject); |
|
3754 __webpack_require__.d(selectors_namespaceObject, "getActiveComplementaryArea", function() { return selectors_getActiveComplementaryArea; }); |
|
3755 __webpack_require__.d(selectors_namespaceObject, "isItemPinned", function() { return selectors_isItemPinned; }); |
|
3756 |
|
3757 // EXTERNAL MODULE: external ["wp","data"] |
|
3758 var external_wp_data_ = __webpack_require__("1ZqX"); |
|
3759 |
|
3760 // EXTERNAL MODULE: external "lodash" |
|
3761 var external_lodash_ = __webpack_require__("YLtl"); |
|
3762 |
|
3763 // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/reducer.js |
|
3764 /** |
|
3765 * External dependencies |
|
3766 */ |
|
3767 |
|
3768 /** |
|
3769 * WordPress dependencies |
|
3770 */ |
|
3771 |
|
3772 |
|
3773 /** |
|
3774 * Reducer to keep tract of the active area per scope. |
|
3775 * |
|
3776 * @param {boolean} state Previous state. |
|
3777 * @param {Object} action Action object. |
|
3778 * @param {string} action.type Action type. |
|
3779 * @param {string} action.itemType Type of item. |
|
3780 * @param {string} action.scope Item scope. |
|
3781 * @param {string} action.item Item name. |
|
3782 * |
|
3783 * @return {Object} Updated state. |
|
3784 */ |
|
3785 |
|
3786 function singleEnableItems(state = {}, { |
|
3787 type, |
|
3788 itemType, |
|
3789 scope, |
|
3790 item |
|
3791 }) { |
|
3792 if (type !== 'SET_SINGLE_ENABLE_ITEM' || !itemType || !scope) { |
|
3793 return state; |
|
3794 } |
|
3795 |
|
3796 return { ...state, |
|
3797 [itemType]: { ...state[itemType], |
|
3798 [scope]: item || null |
|
3799 } |
|
3800 }; |
|
3801 } |
|
3802 /** |
|
3803 * Reducer keeping track of the "pinned" items per scope. |
|
3804 * |
|
3805 * @param {boolean} state Previous state. |
|
3806 * @param {Object} action Action object. |
|
3807 * @param {string} action.type Action type. |
|
3808 * @param {string} action.itemType Type of item. |
|
3809 * @param {string} action.scope Item scope. |
|
3810 * @param {string} action.item Item name. |
|
3811 * @param {boolean} action.isEnable Whether the item is pinned. |
|
3812 * |
|
3813 * @return {Object} Updated state. |
|
3814 */ |
|
3815 |
|
3816 function multipleEnableItems(state = {}, { |
|
3817 type, |
|
3818 itemType, |
|
3819 scope, |
|
3820 item, |
|
3821 isEnable |
|
3822 }) { |
|
3823 if (type !== 'SET_MULTIPLE_ENABLE_ITEM' || !itemType || !scope || !item || Object(external_lodash_["get"])(state, [itemType, scope, item]) === isEnable) { |
|
3824 return state; |
|
3825 } |
|
3826 |
|
3827 const currentTypeState = state[itemType] || {}; |
|
3828 const currentScopeState = currentTypeState[scope] || {}; |
|
3829 return { ...state, |
|
3830 [itemType]: { ...currentTypeState, |
|
3831 [scope]: { ...currentScopeState, |
|
3832 [item]: isEnable || false |
|
3833 } |
|
3834 } |
|
3835 }; |
|
3836 } |
|
3837 const enableItems = Object(external_wp_data_["combineReducers"])({ |
|
3838 singleEnableItems, |
|
3839 multipleEnableItems |
|
3840 }); |
|
3841 /* harmony default export */ var reducer = (Object(external_wp_data_["combineReducers"])({ |
|
3842 enableItems |
|
3843 })); |
|
3844 |
|
3845 // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/actions.js |
|
3846 /** |
|
3847 * Returns an action object used in signalling that an active area should be changed. |
|
3848 * |
|
3849 * @param {string} itemType Type of item. |
|
3850 * @param {string} scope Item scope. |
|
3851 * @param {string} item Item identifier. |
|
3852 * |
|
3853 * @return {Object} Action object. |
|
3854 */ |
|
3855 function setSingleEnableItem(itemType, scope, item) { |
|
3856 return { |
|
3857 type: 'SET_SINGLE_ENABLE_ITEM', |
|
3858 itemType, |
|
3859 scope, |
|
3860 item |
|
3861 }; |
|
3862 } |
|
3863 /** |
|
3864 * Returns an action object used in signalling that a complementary item should be enabled. |
|
3865 * |
|
3866 * @param {string} scope Complementary area scope. |
|
3867 * @param {string} area Area identifier. |
|
3868 * |
|
3869 * @return {Object} Action object. |
|
3870 */ |
|
3871 |
|
3872 |
|
3873 function actions_enableComplementaryArea(scope, area) { |
|
3874 return setSingleEnableItem('complementaryArea', scope, area); |
|
3875 } |
|
3876 /** |
|
3877 * Returns an action object used in signalling that the complementary area of a given scope should be disabled. |
|
3878 * |
|
3879 * @param {string} scope Complementary area scope. |
|
3880 * |
|
3881 * @return {Object} Action object. |
|
3882 */ |
|
3883 |
|
3884 function actions_disableComplementaryArea(scope) { |
|
3885 return setSingleEnableItem('complementaryArea', scope, undefined); |
|
3886 } |
|
3887 /** |
|
3888 * Returns an action object to make an area enabled/disabled. |
|
3889 * |
|
3890 * @param {string} itemType Type of item. |
|
3891 * @param {string} scope Item scope. |
|
3892 * @param {string} item Item identifier. |
|
3893 * @param {boolean} isEnable Boolean indicating if an area should be pinned or not. |
|
3894 * |
|
3895 * @return {Object} Action object. |
|
3896 */ |
|
3897 |
|
3898 function setMultipleEnableItem(itemType, scope, item, isEnable) { |
|
3899 return { |
|
3900 type: 'SET_MULTIPLE_ENABLE_ITEM', |
|
3901 itemType, |
|
3902 scope, |
|
3903 item, |
|
3904 isEnable |
|
3905 }; |
|
3906 } |
|
3907 /** |
|
3908 * Returns an action object used in signalling that an item should be pinned. |
|
3909 * |
|
3910 * @param {string} scope Item scope. |
|
3911 * @param {string} itemId Item identifier. |
|
3912 * |
|
3913 * @return {Object} Action object. |
|
3914 */ |
|
3915 |
|
3916 |
|
3917 function actions_pinItem(scope, itemId) { |
|
3918 return setMultipleEnableItem('pinnedItems', scope, itemId, true); |
|
3919 } |
|
3920 /** |
|
3921 * Returns an action object used in signalling that an item should be unpinned. |
|
3922 * |
|
3923 * @param {string} scope Item scope. |
|
3924 * @param {string} itemId Item identifier. |
|
3925 * |
|
3926 * @return {Object} Action object. |
|
3927 */ |
|
3928 |
|
3929 function actions_unpinItem(scope, itemId) { |
|
3930 return setMultipleEnableItem('pinnedItems', scope, itemId, false); |
|
3931 } |
|
3932 |
|
3933 // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/selectors.js |
|
3934 /** |
|
3935 * External dependencies |
|
3936 */ |
|
3937 |
|
3938 /** |
|
3939 * Returns the item that is enabled in a given scope. |
|
3940 * |
|
3941 * @param {Object} state Global application state. |
|
3942 * @param {string} itemType Type of item. |
|
3943 * @param {string} scope Item scope. |
|
3944 * |
|
3945 * @return {?string|null} The item that is enabled in the passed scope and type. |
|
3946 */ |
|
3947 |
|
3948 function getSingleEnableItem(state, itemType, scope) { |
|
3949 return Object(external_lodash_["get"])(state.enableItems.singleEnableItems, [itemType, scope]); |
|
3950 } |
|
3951 /** |
|
3952 * Returns the complementary area that is active in a given scope. |
|
3953 * |
|
3954 * @param {Object} state Global application state. |
|
3955 * @param {string} scope Item scope. |
|
3956 * |
|
3957 * @return {string} The complementary area that is active in the given scope. |
|
3958 */ |
|
3959 |
|
3960 |
|
3961 function selectors_getActiveComplementaryArea(state, scope) { |
|
3962 return getSingleEnableItem(state, 'complementaryArea', scope); |
|
3963 } |
|
3964 /** |
|
3965 * Returns a boolean indicating if an item is enabled or not in a given scope. |
|
3966 * |
|
3967 * @param {Object} state Global application state. |
|
3968 * @param {string} itemType Type of item. |
|
3969 * @param {string} scope Scope. |
|
3970 * @param {string} item Item to check. |
|
3971 * |
|
3972 * @return {boolean|undefined} True if the item is enabled, false otherwise if the item is explicitly disabled, and undefined if there is no information for that item. |
|
3973 */ |
|
3974 |
|
3975 function isMultipleEnabledItemEnabled(state, itemType, scope, item) { |
|
3976 return Object(external_lodash_["get"])(state.enableItems.multipleEnableItems, [itemType, scope, item]); |
|
3977 } |
|
3978 /** |
|
3979 * Returns a boolean indicating if an item is pinned or not. |
|
3980 * |
|
3981 * @param {Object} state Global application state. |
|
3982 * @param {string} scope Scope. |
|
3983 * @param {string} item Item to check. |
|
3984 * |
|
3985 * @return {boolean} True if the item is pinned and false otherwise. |
|
3986 */ |
|
3987 |
|
3988 |
|
3989 function selectors_isItemPinned(state, scope, item) { |
|
3990 return isMultipleEnabledItemEnabled(state, 'pinnedItems', scope, item) !== false; |
|
3991 } |
|
3992 |
|
3993 // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/constants.js |
|
3994 /** |
|
3995 * The identifier for the data store. |
|
3996 * |
|
3997 * @type {string} |
|
3998 */ |
|
3999 const STORE_NAME = 'core/interface'; |
|
4000 |
|
4001 // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/index.js |
|
4002 /** |
|
4003 * WordPress dependencies |
|
4004 */ |
|
4005 |
|
4006 /** |
|
4007 * Internal dependencies |
|
4008 */ |
|
4009 |
|
4010 |
|
4011 |
|
4012 |
|
4013 |
|
4014 /** |
|
4015 * Store definition for the interface namespace. |
|
4016 * |
|
4017 * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore |
|
4018 * |
|
4019 * @type {Object} |
|
4020 */ |
|
4021 |
|
4022 const store = Object(external_wp_data_["createReduxStore"])(STORE_NAME, { |
|
4023 reducer: reducer, |
|
4024 actions: actions_namespaceObject, |
|
4025 selectors: selectors_namespaceObject, |
|
4026 persist: ['enableItems'] |
|
4027 }); // Once we build a more generic persistence plugin that works across types of stores |
|
4028 // we'd be able to replace this with a register call. |
|
4029 |
|
4030 Object(external_wp_data_["registerStore"])(STORE_NAME, { |
|
4031 reducer: reducer, |
|
4032 actions: actions_namespaceObject, |
|
4033 selectors: selectors_namespaceObject, |
|
4034 persist: ['enableItems'] |
|
4035 }); |
|
4036 |
|
4037 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js |
|
4038 var esm_extends = __webpack_require__("wx14"); |
|
4039 |
|
4040 // EXTERNAL MODULE: external ["wp","element"] |
|
4041 var external_wp_element_ = __webpack_require__("GRId"); |
|
4042 |
|
4043 // EXTERNAL MODULE: ./node_modules/classnames/index.js |
|
4044 var classnames = __webpack_require__("TSYQ"); |
|
4045 var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); |
|
4046 |
|
4047 // EXTERNAL MODULE: external ["wp","components"] |
|
4048 var external_wp_components_ = __webpack_require__("tI+e"); |
|
4049 |
|
4050 // EXTERNAL MODULE: external ["wp","i18n"] |
|
4051 var external_wp_i18n_ = __webpack_require__("l3Sj"); |
|
4052 |
|
4053 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js |
|
4054 var check = __webpack_require__("RMJe"); |
|
4055 |
|
4056 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/star-filled.js |
|
4057 var star_filled = __webpack_require__("URob"); |
|
4058 |
|
4059 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/star-empty.js |
|
4060 var star_empty = __webpack_require__("Xxwi"); |
|
4061 |
|
4062 // EXTERNAL MODULE: external ["wp","viewport"] |
|
4063 var external_wp_viewport_ = __webpack_require__("KEfo"); |
|
4064 |
|
4065 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js |
|
4066 var close_small = __webpack_require__("bWcr"); |
|
4067 |
|
4068 // EXTERNAL MODULE: external ["wp","plugins"] |
|
4069 var external_wp_plugins_ = __webpack_require__("TvNi"); |
|
4070 |
|
4071 // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-context/index.js |
|
4072 /** |
|
4073 * WordPress dependencies |
|
4074 */ |
|
4075 |
|
4076 /* harmony default export */ var complementary_area_context = (Object(external_wp_plugins_["withPluginContext"])((context, ownProps) => { |
|
4077 return { |
|
4078 icon: ownProps.icon || context.icon, |
|
4079 identifier: ownProps.identifier || `${context.name}/${ownProps.name}` |
|
4080 }; |
|
4081 })); |
|
4082 |
|
4083 // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-toggle/index.js |
|
4084 |
|
4085 |
|
4086 |
|
4087 /** |
|
4088 * External dependencies |
|
4089 */ |
|
4090 |
|
4091 /** |
|
4092 * WordPress dependencies |
|
4093 */ |
|
4094 |
|
4095 |
|
4096 |
|
4097 /** |
|
4098 * Internal dependencies |
|
4099 */ |
|
4100 |
|
4101 |
|
4102 |
|
4103 |
|
4104 function ComplementaryAreaToggle({ |
|
4105 as = external_wp_components_["Button"], |
|
4106 scope, |
|
4107 identifier, |
|
4108 icon, |
|
4109 selectedIcon, |
|
4110 ...props |
|
4111 }) { |
|
4112 const ComponentToUse = as; |
|
4113 const isSelected = Object(external_wp_data_["useSelect"])(select => select(store).getActiveComplementaryArea(scope) === identifier, [identifier]); |
|
4114 const { |
|
4115 enableComplementaryArea, |
|
4116 disableComplementaryArea |
|
4117 } = Object(external_wp_data_["useDispatch"])(store); |
|
4118 return Object(external_wp_element_["createElement"])(ComponentToUse, Object(esm_extends["a" /* default */])({ |
|
4119 icon: selectedIcon && isSelected ? selectedIcon : icon, |
|
4120 onClick: () => { |
|
4121 if (isSelected) { |
|
4122 disableComplementaryArea(scope); |
|
4123 } else { |
|
4124 enableComplementaryArea(scope, identifier); |
|
4125 } |
|
4126 } |
|
4127 }, Object(external_lodash_["omit"])(props, ['name']))); |
|
4128 } |
|
4129 |
|
4130 /* harmony default export */ var complementary_area_toggle = (complementary_area_context(ComplementaryAreaToggle)); |
|
4131 |
|
4132 // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-header/index.js |
|
4133 |
|
4134 |
|
4135 |
|
4136 /** |
|
4137 * External dependencies |
|
4138 */ |
|
4139 |
|
4140 /** |
|
4141 * WordPress dependencies |
|
4142 */ |
|
4143 |
|
4144 |
|
4145 /** |
|
4146 * Internal dependencies |
|
4147 */ |
|
4148 |
|
4149 |
|
4150 |
|
4151 const ComplementaryAreaHeader = ({ |
|
4152 smallScreenTitle, |
|
4153 children, |
|
4154 className, |
|
4155 toggleButtonProps |
|
4156 }) => { |
|
4157 const toggleButton = Object(external_wp_element_["createElement"])(complementary_area_toggle, Object(esm_extends["a" /* default */])({ |
|
4158 icon: close_small["a" /* default */] |
|
4159 }, toggleButtonProps)); |
|
4160 return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("div", { |
|
4161 className: "components-panel__header interface-complementary-area-header__small" |
|
4162 }, smallScreenTitle && Object(external_wp_element_["createElement"])("span", { |
|
4163 className: "interface-complementary-area-header__small-title" |
|
4164 }, smallScreenTitle), toggleButton), Object(external_wp_element_["createElement"])("div", { |
|
4165 className: classnames_default()('components-panel__header', 'interface-complementary-area-header', className), |
|
4166 tabIndex: -1 |
|
4167 }, children, toggleButton)); |
|
4168 }; |
|
4169 |
|
4170 /* harmony default export */ var complementary_area_header = (ComplementaryAreaHeader); |
|
4171 |
|
4172 // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/action-item/index.js |
|
4173 |
|
4174 |
|
4175 |
|
4176 /** |
|
4177 * External dependencies |
|
4178 */ |
|
4179 |
|
4180 /** |
|
4181 * WordPress dependencies |
|
4182 */ |
|
4183 |
|
4184 |
|
4185 |
|
4186 |
|
4187 function ActionItemSlot({ |
|
4188 name, |
|
4189 as: Component = external_wp_components_["ButtonGroup"], |
|
4190 fillProps = {}, |
|
4191 bubblesVirtually, |
|
4192 ...props |
|
4193 }) { |
|
4194 return Object(external_wp_element_["createElement"])(external_wp_components_["Slot"], { |
|
4195 name: name, |
|
4196 bubblesVirtually: bubblesVirtually, |
|
4197 fillProps: fillProps |
|
4198 }, fills => { |
|
4199 if (Object(external_lodash_["isEmpty"])(external_wp_element_["Children"].toArray(fills))) { |
|
4200 return null; |
|
4201 } // Special handling exists for backward compatibility. |
|
4202 // It ensures that menu items created by plugin authors aren't |
|
4203 // duplicated with automatically injected menu items coming |
|
4204 // from pinnable plugin sidebars. |
|
4205 // @see https://github.com/WordPress/gutenberg/issues/14457 |
|
4206 |
|
4207 |
|
4208 const initializedByPlugins = []; |
|
4209 external_wp_element_["Children"].forEach(fills, ({ |
|
4210 props: { |
|
4211 __unstableExplicitMenuItem, |
|
4212 __unstableTarget |
|
4213 } |
|
4214 }) => { |
|
4215 if (__unstableTarget && __unstableExplicitMenuItem) { |
|
4216 initializedByPlugins.push(__unstableTarget); |
|
4217 } |
|
4218 }); |
|
4219 const children = external_wp_element_["Children"].map(fills, child => { |
|
4220 if (!child.props.__unstableExplicitMenuItem && initializedByPlugins.includes(child.props.__unstableTarget)) { |
|
4221 return null; |
|
4222 } |
|
4223 |
|
4224 return child; |
|
4225 }); |
|
4226 return Object(external_wp_element_["createElement"])(Component, props, children); |
|
4227 }); |
|
4228 } |
|
4229 |
|
4230 function ActionItem({ |
|
4231 name, |
|
4232 as: Component = external_wp_components_["Button"], |
|
4233 onClick, |
|
4234 ...props |
|
4235 }) { |
|
4236 return Object(external_wp_element_["createElement"])(external_wp_components_["Fill"], { |
|
4237 name: name |
|
4238 }, ({ |
|
4239 onClick: fpOnClick |
|
4240 }) => { |
|
4241 return Object(external_wp_element_["createElement"])(Component, Object(esm_extends["a" /* default */])({ |
|
4242 onClick: onClick || fpOnClick ? (...args) => { |
|
4243 (onClick || external_lodash_["noop"])(...args); |
|
4244 (fpOnClick || external_lodash_["noop"])(...args); |
|
4245 } : undefined |
|
4246 }, props)); |
|
4247 }); |
|
4248 } |
|
4249 |
|
4250 ActionItem.Slot = ActionItemSlot; |
|
4251 /* harmony default export */ var action_item = (ActionItem); |
|
4252 |
|
4253 // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-more-menu-item/index.js |
|
4254 |
|
4255 |
|
4256 |
|
4257 /** |
|
4258 * External dependencies |
|
4259 */ |
|
4260 |
|
4261 /** |
|
4262 * WordPress dependencies |
|
4263 */ |
|
4264 |
|
4265 |
|
4266 |
|
4267 /** |
|
4268 * Internal dependencies |
|
4269 */ |
|
4270 |
|
4271 |
|
4272 |
|
4273 |
|
4274 const PluginsMenuItem = props => // Menu item is marked with unstable prop for backward compatibility. |
|
4275 // They are removed so they don't leak to DOM elements. |
|
4276 // @see https://github.com/WordPress/gutenberg/issues/14457 |
|
4277 Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], Object(external_lodash_["omit"])(props, ['__unstableExplicitMenuItem', '__unstableTarget'])); |
|
4278 |
|
4279 function ComplementaryAreaMoreMenuItem({ |
|
4280 scope, |
|
4281 target, |
|
4282 __unstableExplicitMenuItem, |
|
4283 ...props |
|
4284 }) { |
|
4285 return Object(external_wp_element_["createElement"])(complementary_area_toggle, Object(esm_extends["a" /* default */])({ |
|
4286 as: toggleProps => { |
|
4287 return Object(external_wp_element_["createElement"])(action_item, Object(esm_extends["a" /* default */])({ |
|
4288 __unstableExplicitMenuItem: __unstableExplicitMenuItem, |
|
4289 __unstableTarget: `${scope}/${target}`, |
|
4290 as: PluginsMenuItem, |
|
4291 name: `${scope}/plugin-more-menu` |
|
4292 }, toggleProps)); |
|
4293 }, |
|
4294 role: "menuitemcheckbox", |
|
4295 selectedIcon: check["a" /* default */], |
|
4296 name: target, |
|
4297 scope: scope |
|
4298 }, props)); |
|
4299 } |
|
4300 |
|
4301 // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/pinned-items/index.js |
|
4302 |
|
4303 |
|
4304 |
|
4305 /** |
|
4306 * External dependencies |
|
4307 */ |
|
4308 |
|
4309 |
|
4310 /** |
|
4311 * WordPress dependencies |
|
4312 */ |
|
4313 |
|
4314 |
|
4315 |
|
4316 function PinnedItems({ |
|
4317 scope, |
|
4318 ...props |
|
4319 }) { |
|
4320 return Object(external_wp_element_["createElement"])(external_wp_components_["Fill"], Object(esm_extends["a" /* default */])({ |
|
4321 name: `PinnedItems/${scope}` |
|
4322 }, props)); |
|
4323 } |
|
4324 |
|
4325 function PinnedItemsSlot({ |
|
4326 scope, |
|
4327 className, |
|
4328 ...props |
|
4329 }) { |
|
4330 return Object(external_wp_element_["createElement"])(external_wp_components_["Slot"], Object(esm_extends["a" /* default */])({ |
|
4331 name: `PinnedItems/${scope}` |
|
4332 }, props), fills => !Object(external_lodash_["isEmpty"])(fills) && Object(external_wp_element_["createElement"])("div", { |
|
4333 className: classnames_default()(className, 'interface-pinned-items') |
|
4334 }, fills)); |
|
4335 } |
|
4336 |
|
4337 PinnedItems.Slot = PinnedItemsSlot; |
|
4338 /* harmony default export */ var pinned_items = (PinnedItems); |
|
4339 |
|
4340 // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area/index.js |
|
4341 |
|
4342 |
|
4343 |
|
4344 /** |
|
4345 * External dependencies |
|
4346 */ |
|
4347 |
|
4348 /** |
|
4349 * WordPress dependencies |
|
4350 */ |
|
4351 |
|
4352 |
|
4353 |
|
4354 |
|
4355 |
|
4356 |
|
4357 |
|
4358 /** |
|
4359 * Internal dependencies |
|
4360 */ |
|
4361 |
|
4362 |
|
4363 |
|
4364 |
|
4365 |
|
4366 |
|
4367 |
|
4368 |
|
4369 function ComplementaryAreaSlot({ |
|
4370 scope, |
|
4371 ...props |
|
4372 }) { |
|
4373 return Object(external_wp_element_["createElement"])(external_wp_components_["Slot"], Object(esm_extends["a" /* default */])({ |
|
4374 name: `ComplementaryArea/${scope}` |
|
4375 }, props)); |
|
4376 } |
|
4377 |
|
4378 function ComplementaryAreaFill({ |
|
4379 scope, |
|
4380 children, |
|
4381 className |
|
4382 }) { |
|
4383 return Object(external_wp_element_["createElement"])(external_wp_components_["Fill"], { |
|
4384 name: `ComplementaryArea/${scope}` |
|
4385 }, Object(external_wp_element_["createElement"])("div", { |
|
4386 className: className |
|
4387 }, children)); |
|
4388 } |
|
4389 |
|
4390 function useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall) { |
|
4391 const previousIsSmall = Object(external_wp_element_["useRef"])(false); |
|
4392 const shouldOpenWhenNotSmall = Object(external_wp_element_["useRef"])(false); |
|
4393 const { |
|
4394 enableComplementaryArea, |
|
4395 disableComplementaryArea |
|
4396 } = Object(external_wp_data_["useDispatch"])(store); |
|
4397 Object(external_wp_element_["useEffect"])(() => { |
|
4398 // If the complementary area is active and the editor is switching from a big to a small window size. |
|
4399 if (isActive && isSmall && !previousIsSmall.current) { |
|
4400 // Disable the complementary area. |
|
4401 disableComplementaryArea(scope); // Flag the complementary area to be reopened when the window size goes from small to big. |
|
4402 |
|
4403 shouldOpenWhenNotSmall.current = true; |
|
4404 } else if ( // If there is a flag indicating the complementary area should be enabled when we go from small to big window size |
|
4405 // and we are going from a small to big window size. |
|
4406 shouldOpenWhenNotSmall.current && !isSmall && previousIsSmall.current) { |
|
4407 // Remove the flag indicating the complementary area should be enabled. |
|
4408 shouldOpenWhenNotSmall.current = false; // Enable the complementary area. |
|
4409 |
|
4410 enableComplementaryArea(scope, identifier); |
|
4411 } else if ( // If the flag is indicating the current complementary should be reopened but another complementary area becomes active, |
|
4412 // remove the flag. |
|
4413 shouldOpenWhenNotSmall.current && activeArea && activeArea !== identifier) { |
|
4414 shouldOpenWhenNotSmall.current = false; |
|
4415 } |
|
4416 |
|
4417 if (isSmall !== previousIsSmall.current) { |
|
4418 previousIsSmall.current = isSmall; |
|
4419 } |
|
4420 }, [isActive, isSmall, scope, identifier, activeArea]); |
|
4421 } |
|
4422 |
|
4423 function ComplementaryArea({ |
|
4424 children, |
|
4425 className, |
|
4426 closeLabel = Object(external_wp_i18n_["__"])('Close plugin'), |
|
4427 identifier, |
|
4428 header, |
|
4429 headerClassName, |
|
4430 icon, |
|
4431 isPinnable = true, |
|
4432 panelClassName, |
|
4433 scope, |
|
4434 name, |
|
4435 smallScreenTitle, |
|
4436 title, |
|
4437 toggleShortcut, |
|
4438 isActiveByDefault, |
|
4439 showIconLabels = false |
|
4440 }) { |
|
4441 const { |
|
4442 isActive, |
|
4443 isPinned, |
|
4444 activeArea, |
|
4445 isSmall, |
|
4446 isLarge |
|
4447 } = Object(external_wp_data_["useSelect"])(select => { |
|
4448 const { |
|
4449 getActiveComplementaryArea, |
|
4450 isItemPinned |
|
4451 } = select(store); |
|
4452 |
|
4453 const _activeArea = getActiveComplementaryArea(scope); |
|
4454 |
|
4455 return { |
|
4456 isActive: _activeArea === identifier, |
|
4457 isPinned: isItemPinned(scope, identifier), |
|
4458 activeArea: _activeArea, |
|
4459 isSmall: select(external_wp_viewport_["store"]).isViewportMatch('< medium'), |
|
4460 isLarge: select(external_wp_viewport_["store"]).isViewportMatch('large') |
|
4461 }; |
|
4462 }, [identifier, scope]); |
|
4463 useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall); |
|
4464 const { |
|
4465 enableComplementaryArea, |
|
4466 disableComplementaryArea, |
|
4467 pinItem, |
|
4468 unpinItem |
|
4469 } = Object(external_wp_data_["useDispatch"])(store); |
|
4470 Object(external_wp_element_["useEffect"])(() => { |
|
4471 if (isActiveByDefault && activeArea === undefined && !isSmall) { |
|
4472 enableComplementaryArea(scope, identifier); |
|
4473 } |
|
4474 }, [activeArea, isActiveByDefault, scope, identifier, isSmall]); |
|
4475 return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, isPinnable && Object(external_wp_element_["createElement"])(pinned_items, { |
|
4476 scope: scope |
|
4477 }, isPinned && Object(external_wp_element_["createElement"])(complementary_area_toggle, { |
|
4478 scope: scope, |
|
4479 identifier: identifier, |
|
4480 isPressed: isActive && (!showIconLabels || isLarge), |
|
4481 "aria-expanded": isActive, |
|
4482 label: title, |
|
4483 icon: showIconLabels ? check["a" /* default */] : icon, |
|
4484 showTooltip: !showIconLabels, |
|
4485 isTertiary: showIconLabels |
|
4486 })), name && isPinnable && Object(external_wp_element_["createElement"])(ComplementaryAreaMoreMenuItem, { |
|
4487 target: name, |
|
4488 scope: scope, |
|
4489 icon: icon |
|
4490 }, title), isActive && Object(external_wp_element_["createElement"])(ComplementaryAreaFill, { |
|
4491 className: classnames_default()('interface-complementary-area', className), |
|
4492 scope: scope |
|
4493 }, Object(external_wp_element_["createElement"])(complementary_area_header, { |
|
4494 className: headerClassName, |
|
4495 closeLabel: closeLabel, |
|
4496 onClose: () => disableComplementaryArea(scope), |
|
4497 smallScreenTitle: smallScreenTitle, |
|
4498 toggleButtonProps: { |
|
4499 label: closeLabel, |
|
4500 shortcut: toggleShortcut, |
|
4501 scope, |
|
4502 identifier |
|
4503 } |
|
4504 }, header || Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("strong", null, title), isPinnable && Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { |
|
4505 className: "interface-complementary-area__pin-unpin-item", |
|
4506 icon: isPinned ? star_filled["a" /* default */] : star_empty["a" /* default */], |
|
4507 label: isPinned ? Object(external_wp_i18n_["__"])('Unpin from toolbar') : Object(external_wp_i18n_["__"])('Pin to toolbar'), |
|
4508 onClick: () => (isPinned ? unpinItem : pinItem)(scope, identifier), |
|
4509 isPressed: isPinned, |
|
4510 "aria-expanded": isPinned |
|
4511 }))), Object(external_wp_element_["createElement"])(external_wp_components_["Panel"], { |
|
4512 className: panelClassName |
|
4513 }, children))); |
|
4514 } |
|
4515 |
|
4516 const ComplementaryAreaWrapped = complementary_area_context(ComplementaryArea); |
|
4517 ComplementaryAreaWrapped.Slot = ComplementaryAreaSlot; |
|
4518 /* harmony default export */ var complementary_area = (ComplementaryAreaWrapped); |
|
4519 |
|
4520 // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/fullscreen-mode/index.js |
|
4521 /** |
|
4522 * WordPress dependencies |
|
4523 */ |
|
4524 |
|
4525 class fullscreen_mode_FullscreenMode extends external_wp_element_["Component"] { |
|
4526 componentDidMount() { |
|
4527 this.isSticky = false; |
|
4528 this.sync(); // `is-fullscreen-mode` is set in PHP as a body class by Gutenberg, and this causes |
|
4529 // `sticky-menu` to be applied by WordPress and prevents the admin menu being scrolled |
|
4530 // even if `is-fullscreen-mode` is then removed. Let's remove `sticky-menu` here as |
|
4531 // a consequence of the FullscreenMode setup |
|
4532 |
|
4533 if (document.body.classList.contains('sticky-menu')) { |
|
4534 this.isSticky = true; |
|
4535 document.body.classList.remove('sticky-menu'); |
|
4536 } |
|
4537 } |
|
4538 |
|
4539 componentWillUnmount() { |
|
4540 if (this.isSticky) { |
|
4541 document.body.classList.add('sticky-menu'); |
|
4542 } |
|
4543 |
|
4544 if (this.props.isActive) { |
|
4545 document.body.classList.remove('is-fullscreen-mode'); |
|
4546 } |
|
4547 } |
|
4548 |
|
4549 componentDidUpdate(prevProps) { |
|
4550 if (this.props.isActive !== prevProps.isActive) { |
|
4551 this.sync(); |
|
4552 } |
|
4553 } |
|
4554 |
|
4555 sync() { |
|
4556 const { |
|
4557 isActive |
|
4558 } = this.props; |
|
4559 |
|
4560 if (isActive) { |
|
4561 document.body.classList.add('is-fullscreen-mode'); |
|
4562 } else { |
|
4563 document.body.classList.remove('is-fullscreen-mode'); |
|
4564 } |
|
4565 } |
|
4566 |
|
4567 render() { |
|
4568 return null; |
|
4569 } |
|
4570 |
|
4571 } |
|
4572 /* harmony default export */ var fullscreen_mode = (fullscreen_mode_FullscreenMode); |
|
4573 |
|
4574 // EXTERNAL MODULE: external ["wp","compose"] |
|
4575 var external_wp_compose_ = __webpack_require__("K9lf"); |
|
4576 |
|
4577 // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/interface-skeleton/index.js |
|
4578 |
|
4579 |
|
4580 /** |
|
4581 * External dependencies |
|
4582 */ |
|
4583 |
|
4584 /** |
|
4585 * WordPress dependencies |
|
4586 */ |
|
4587 |
|
4588 /** |
|
4589 * WordPress dependencies |
|
4590 */ |
|
4591 |
|
4592 |
|
4593 |
|
4594 |
|
4595 |
|
4596 |
|
4597 function useHTMLClass(className) { |
|
4598 Object(external_wp_element_["useEffect"])(() => { |
|
4599 const element = document && document.querySelector(`html:not(.${className})`); |
|
4600 |
|
4601 if (!element) { |
|
4602 return; |
|
4603 } |
|
4604 |
|
4605 element.classList.toggle(className); |
|
4606 return () => { |
|
4607 element.classList.toggle(className); |
|
4608 }; |
|
4609 }, [className]); |
|
4610 } |
|
4611 |
|
4612 function InterfaceSkeleton({ |
|
4613 footer, |
|
4614 header, |
|
4615 sidebar, |
|
4616 secondarySidebar, |
|
4617 notices, |
|
4618 content, |
|
4619 drawer, |
|
4620 actions, |
|
4621 labels, |
|
4622 className, |
|
4623 shortcuts |
|
4624 }, ref) { |
|
4625 const fallbackRef = Object(external_wp_element_["useRef"])(); |
|
4626 const regionsClassName = Object(external_wp_components_["__unstableUseNavigateRegions"])(fallbackRef, shortcuts); |
|
4627 useHTMLClass('interface-interface-skeleton__html-container'); |
|
4628 const defaultLabels = { |
|
4629 /* translators: accessibility text for the nav bar landmark region. */ |
|
4630 drawer: Object(external_wp_i18n_["__"])('Drawer'), |
|
4631 |
|
4632 /* translators: accessibility text for the top bar landmark region. */ |
|
4633 header: Object(external_wp_i18n_["__"])('Header'), |
|
4634 |
|
4635 /* translators: accessibility text for the content landmark region. */ |
|
4636 body: Object(external_wp_i18n_["__"])('Content'), |
|
4637 |
|
4638 /* translators: accessibility text for the secondary sidebar landmark region. */ |
|
4639 secondarySidebar: Object(external_wp_i18n_["__"])('Block Library'), |
|
4640 |
|
4641 /* translators: accessibility text for the settings landmark region. */ |
|
4642 sidebar: Object(external_wp_i18n_["__"])('Settings'), |
|
4643 |
|
4644 /* translators: accessibility text for the publish landmark region. */ |
|
4645 actions: Object(external_wp_i18n_["__"])('Publish'), |
|
4646 |
|
4647 /* translators: accessibility text for the footer landmark region. */ |
|
4648 footer: Object(external_wp_i18n_["__"])('Footer') |
|
4649 }; |
|
4650 const mergedLabels = { ...defaultLabels, |
|
4651 ...labels |
|
4652 }; |
|
4653 return Object(external_wp_element_["createElement"])("div", { |
|
4654 ref: Object(external_wp_compose_["useMergeRefs"])([ref, fallbackRef]), |
|
4655 className: classnames_default()(className, 'interface-interface-skeleton', regionsClassName, !!footer && 'has-footer') |
|
4656 }, !!drawer && Object(external_wp_element_["createElement"])("div", { |
|
4657 className: "interface-interface-skeleton__drawer", |
|
4658 role: "region", |
|
4659 "aria-label": mergedLabels.drawer |
|
4660 }, drawer), Object(external_wp_element_["createElement"])("div", { |
|
4661 className: "interface-interface-skeleton__editor" |
|
4662 }, !!header && Object(external_wp_element_["createElement"])("div", { |
|
4663 className: "interface-interface-skeleton__header", |
|
4664 role: "region", |
|
4665 "aria-label": mergedLabels.header, |
|
4666 tabIndex: "-1" |
|
4667 }, header), Object(external_wp_element_["createElement"])("div", { |
|
4668 className: "interface-interface-skeleton__body" |
|
4669 }, !!secondarySidebar && Object(external_wp_element_["createElement"])("div", { |
|
4670 className: "interface-interface-skeleton__secondary-sidebar", |
|
4671 role: "region", |
|
4672 "aria-label": mergedLabels.secondarySidebar, |
|
4673 tabIndex: "-1" |
|
4674 }, secondarySidebar), !!notices && Object(external_wp_element_["createElement"])("div", { |
|
4675 className: "interface-interface-skeleton__notices" |
|
4676 }, notices), Object(external_wp_element_["createElement"])("div", { |
|
4677 className: "interface-interface-skeleton__content", |
|
4678 role: "region", |
|
4679 "aria-label": mergedLabels.body, |
|
4680 tabIndex: "-1" |
|
4681 }, content), !!sidebar && Object(external_wp_element_["createElement"])("div", { |
|
4682 className: "interface-interface-skeleton__sidebar", |
|
4683 role: "region", |
|
4684 "aria-label": mergedLabels.sidebar, |
|
4685 tabIndex: "-1" |
|
4686 }, sidebar), !!actions && Object(external_wp_element_["createElement"])("div", { |
|
4687 className: "interface-interface-skeleton__actions", |
|
4688 role: "region", |
|
4689 "aria-label": mergedLabels.actions, |
|
4690 tabIndex: "-1" |
|
4691 }, actions))), !!footer && Object(external_wp_element_["createElement"])("div", { |
|
4692 className: "interface-interface-skeleton__footer", |
|
4693 role: "region", |
|
4694 "aria-label": mergedLabels.footer, |
|
4695 tabIndex: "-1" |
|
4696 }, footer)); |
|
4697 } |
|
4698 |
|
4699 /* harmony default export */ var interface_skeleton = (Object(external_wp_element_["forwardRef"])(InterfaceSkeleton)); |
|
4700 |
|
4701 // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/index.js |
|
4702 |
|
4703 |
|
4704 |
|
4705 |
|
4706 |
|
4707 |
|
4708 |
|
4709 // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/index.js |
|
4710 |
|
4711 |
|
4712 |
|
4713 |
|
4714 /***/ }), |
|
4715 |
|
4716 /***/ "URob": |
|
4717 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
4718 |
|
4719 "use strict"; |
|
4720 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
|
4721 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
|
4722 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); |
|
4723 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
|
4724 |
|
4725 |
|
4726 /** |
|
4727 * WordPress dependencies |
|
4728 */ |
|
4729 |
|
4730 const starFilled = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
|
4731 xmlns: "http://www.w3.org/2000/svg", |
|
4732 viewBox: "0 0 24 24" |
|
4733 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
|
4734 d: "M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z" |
|
4735 })); |
|
4736 /* harmony default export */ __webpack_exports__["a"] = (starFilled); |
|
4737 |
|
4738 |
|
4739 /***/ }), |
|
4740 |
|
4741 /***/ "VKE3": |
|
4742 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
4743 |
|
4744 "use strict"; |
|
4745 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
|
4746 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
|
4747 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); |
|
4748 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
|
4749 |
|
4750 |
|
4751 /** |
|
4752 * WordPress dependencies |
|
4753 */ |
|
4754 |
|
4755 const moreVertical = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
|
4756 xmlns: "http://www.w3.org/2000/svg", |
|
4757 viewBox: "0 0 24 24" |
|
4758 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
|
4759 d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" |
|
4760 })); |
|
4761 /* harmony default export */ __webpack_exports__["a"] = (moreVertical); |
|
4762 |
|
4763 |
|
4764 /***/ }), |
|
4765 |
|
4766 /***/ "Xxwi": |
|
4767 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
4768 |
|
4769 "use strict"; |
|
4770 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
|
4771 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
|
4772 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); |
|
4773 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
|
4774 |
|
4775 |
|
4776 /** |
|
4777 * WordPress dependencies |
|
4778 */ |
|
4779 |
|
4780 const starEmpty = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
|
4781 xmlns: "http://www.w3.org/2000/svg", |
|
4782 viewBox: "0 0 24 24" |
|
4783 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
|
4784 fillRule: "evenodd", |
|
4785 d: "M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z", |
|
4786 clipRule: "evenodd" |
|
4787 })); |
|
4788 /* harmony default export */ __webpack_exports__["a"] = (starEmpty); |
|
4789 |
|
4790 |
|
4791 /***/ }), |
|
4792 |
|
4793 /***/ "YLtl": |
|
4794 /***/ (function(module, exports) { |
|
4795 |
|
4796 (function() { module.exports = window["lodash"]; }()); |
|
4797 |
|
4798 /***/ }), |
|
4799 |
|
4800 /***/ "axFQ": |
|
4801 /***/ (function(module, exports) { |
|
4802 |
|
4803 (function() { module.exports = window["wp"]["blockEditor"]; }()); |
|
4804 |
|
4805 /***/ }), |
|
4806 |
|
4807 /***/ "bWcr": |
|
4808 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
4809 |
|
4810 "use strict"; |
|
4811 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
|
4812 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
|
4813 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); |
|
4814 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
|
4815 |
|
4816 |
|
4817 /** |
|
4818 * WordPress dependencies |
|
4819 */ |
|
4820 |
|
4821 const closeSmall = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
|
4822 xmlns: "http://www.w3.org/2000/svg", |
|
4823 viewBox: "0 0 24 24" |
|
4824 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
|
4825 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" |
|
4826 })); |
|
4827 /* harmony default export */ __webpack_exports__["a"] = (closeSmall); |
|
4828 |
|
4829 |
|
4830 /***/ }), |
|
4831 |
|
4832 /***/ "diJD": |
|
4833 /***/ (function(module, exports) { |
|
4834 |
|
4835 (function() { module.exports = window["wp"]["reusableBlocks"]; }()); |
|
4836 |
|
4837 /***/ }), |
|
4838 |
|
4839 /***/ "g56x": |
|
4840 /***/ (function(module, exports) { |
|
4841 |
|
4842 (function() { module.exports = window["wp"]["hooks"]; }()); |
|
4843 |
|
4844 /***/ }), |
|
4845 |
|
4846 /***/ "gdqT": |
|
4847 /***/ (function(module, exports) { |
|
4848 |
|
4849 (function() { module.exports = window["wp"]["a11y"]; }()); |
|
4850 |
|
4851 /***/ }), |
|
4852 |
|
4853 /***/ "hF7m": |
|
4854 /***/ (function(module, exports) { |
|
4855 |
|
4856 (function() { module.exports = window["wp"]["keyboardShortcuts"]; }()); |
|
4857 |
|
4858 /***/ }), |
|
4859 |
|
4860 /***/ "jZUy": |
|
4861 /***/ (function(module, exports) { |
|
4862 |
|
4863 (function() { module.exports = window["wp"]["coreData"]; }()); |
|
4864 |
|
4865 /***/ }), |
|
4866 |
|
4867 /***/ "l3Sj": |
|
4868 /***/ (function(module, exports) { |
|
4869 |
|
4870 (function() { module.exports = window["wp"]["i18n"]; }()); |
|
4871 |
|
4872 /***/ }), |
|
4873 |
|
4874 /***/ "onLe": |
|
4875 /***/ (function(module, exports) { |
|
4876 |
|
4877 (function() { module.exports = window["wp"]["notices"]; }()); |
|
4878 |
|
4879 /***/ }), |
|
4880 |
|
4881 /***/ "tI+e": |
|
4882 /***/ (function(module, exports) { |
|
4883 |
|
4884 (function() { module.exports = window["wp"]["components"]; }()); |
|
4885 |
|
4886 /***/ }), |
|
4887 |
|
4888 /***/ "w95h": |
|
4889 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
4890 |
|
4891 "use strict"; |
|
4892 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
|
4893 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
|
4894 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); |
|
4895 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
|
4896 |
|
4897 |
|
4898 /** |
|
4899 * WordPress dependencies |
|
4900 */ |
|
4901 |
|
4902 const close = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
|
4903 xmlns: "http://www.w3.org/2000/svg", |
|
4904 viewBox: "0 0 24 24" |
|
4905 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
|
4906 d: "M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z" |
|
4907 })); |
|
4908 /* harmony default export */ __webpack_exports__["a"] = (close); |
|
4909 |
|
4910 |
|
4911 /***/ }), |
|
4912 |
|
4913 /***/ "wx14": |
|
4914 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
4915 |
|
4916 "use strict"; |
|
4917 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; }); |
|
4918 function _extends() { |
|
4919 _extends = Object.assign || function (target) { |
|
4920 for (var i = 1; i < arguments.length; i++) { |
|
4921 var source = arguments[i]; |
|
4922 |
|
4923 for (var key in source) { |
|
4924 if (Object.prototype.hasOwnProperty.call(source, key)) { |
|
4925 target[key] = source[key]; |
|
4926 } |
|
4927 } |
|
4928 } |
|
4929 |
|
4930 return target; |
|
4931 }; |
|
4932 |
|
4933 return _extends.apply(this, arguments); |
|
4934 } |
|
4935 |
|
4936 /***/ }), |
|
4937 |
|
4938 /***/ "ywyh": |
|
4939 /***/ (function(module, exports) { |
|
4940 |
|
4941 (function() { module.exports = window["wp"]["apiFetch"]; }()); |
|
4942 |
|
4943 /***/ }) |
|
4944 |
|
4945 /******/ }); |
|