1 this["wp"] = this["wp"] || {}; this["wp"]["notices"] = |
1 /******/ (function() { // webpackBootstrap |
2 /******/ (function(modules) { // webpackBootstrap |
2 /******/ "use strict"; |
3 /******/ // The module cache |
3 /******/ // The require scope |
4 /******/ var installedModules = {}; |
4 /******/ var __webpack_require__ = {}; |
5 /******/ |
5 /******/ |
6 /******/ // The require function |
6 /************************************************************************/ |
7 /******/ function __webpack_require__(moduleId) { |
7 /******/ /* webpack/runtime/define property getters */ |
8 /******/ |
8 /******/ !function() { |
9 /******/ // Check if module is in cache |
9 /******/ // define getter functions for harmony exports |
10 /******/ if(installedModules[moduleId]) { |
10 /******/ __webpack_require__.d = function(exports, definition) { |
11 /******/ return installedModules[moduleId].exports; |
11 /******/ for(var key in definition) { |
12 /******/ } |
12 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { |
13 /******/ // Create a new module (and put it into the cache) |
13 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); |
14 /******/ var module = installedModules[moduleId] = { |
14 /******/ } |
15 /******/ i: moduleId, |
15 /******/ } |
16 /******/ l: false, |
|
17 /******/ exports: {} |
|
18 /******/ }; |
16 /******/ }; |
19 /******/ |
17 /******/ }(); |
20 /******/ // Execute the module function |
18 /******/ |
21 /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); |
19 /******/ /* webpack/runtime/hasOwnProperty shorthand */ |
22 /******/ |
20 /******/ !function() { |
23 /******/ // Flag the module as loaded |
21 /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } |
24 /******/ module.l = true; |
22 /******/ }(); |
25 /******/ |
23 /******/ |
26 /******/ // Return the exports of the module |
24 /******/ /* webpack/runtime/make namespace object */ |
27 /******/ return module.exports; |
25 /******/ !function() { |
28 /******/ } |
26 /******/ // define __esModule on exports |
29 /******/ |
27 /******/ __webpack_require__.r = function(exports) { |
30 /******/ |
28 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
31 /******/ // expose the modules object (__webpack_modules__) |
29 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
32 /******/ __webpack_require__.m = modules; |
30 /******/ } |
33 /******/ |
31 /******/ Object.defineProperty(exports, '__esModule', { value: true }); |
34 /******/ // expose the module cache |
32 /******/ }; |
35 /******/ __webpack_require__.c = installedModules; |
33 /******/ }(); |
36 /******/ |
34 /******/ |
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 = "Ko7W"); |
|
86 /******/ }) |
|
87 /************************************************************************/ |
35 /************************************************************************/ |
88 /******/ ({ |
36 var __webpack_exports__ = {}; |
89 |
|
90 /***/ "1ZqX": |
|
91 /***/ (function(module, exports) { |
|
92 |
|
93 (function() { module.exports = window["wp"]["data"]; }()); |
|
94 |
|
95 /***/ }), |
|
96 |
|
97 /***/ "Ko7W": |
|
98 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
99 |
|
100 "use strict"; |
|
101 // ESM COMPAT FLAG |
37 // ESM COMPAT FLAG |
102 __webpack_require__.r(__webpack_exports__); |
38 __webpack_require__.r(__webpack_exports__); |
103 |
39 |
104 // EXPORTS |
40 // EXPORTS |
105 __webpack_require__.d(__webpack_exports__, "store", function() { return /* reexport */ store; }); |
41 __webpack_require__.d(__webpack_exports__, { |
|
42 "store": function() { return /* reexport */ store; } |
|
43 }); |
106 |
44 |
107 // NAMESPACE OBJECT: ./node_modules/@wordpress/notices/build-module/store/actions.js |
45 // NAMESPACE OBJECT: ./node_modules/@wordpress/notices/build-module/store/actions.js |
108 var actions_namespaceObject = {}; |
46 var actions_namespaceObject = {}; |
109 __webpack_require__.r(actions_namespaceObject); |
47 __webpack_require__.r(actions_namespaceObject); |
110 __webpack_require__.d(actions_namespaceObject, "createNotice", function() { return createNotice; }); |
48 __webpack_require__.d(actions_namespaceObject, { |
111 __webpack_require__.d(actions_namespaceObject, "createSuccessNotice", function() { return createSuccessNotice; }); |
49 "createErrorNotice": function() { return createErrorNotice; }, |
112 __webpack_require__.d(actions_namespaceObject, "createInfoNotice", function() { return createInfoNotice; }); |
50 "createInfoNotice": function() { return createInfoNotice; }, |
113 __webpack_require__.d(actions_namespaceObject, "createErrorNotice", function() { return createErrorNotice; }); |
51 "createNotice": function() { return createNotice; }, |
114 __webpack_require__.d(actions_namespaceObject, "createWarningNotice", function() { return createWarningNotice; }); |
52 "createSuccessNotice": function() { return createSuccessNotice; }, |
115 __webpack_require__.d(actions_namespaceObject, "removeNotice", function() { return removeNotice; }); |
53 "createWarningNotice": function() { return createWarningNotice; }, |
|
54 "removeNotice": function() { return removeNotice; } |
|
55 }); |
116 |
56 |
117 // NAMESPACE OBJECT: ./node_modules/@wordpress/notices/build-module/store/selectors.js |
57 // NAMESPACE OBJECT: ./node_modules/@wordpress/notices/build-module/store/selectors.js |
118 var selectors_namespaceObject = {}; |
58 var selectors_namespaceObject = {}; |
119 __webpack_require__.r(selectors_namespaceObject); |
59 __webpack_require__.r(selectors_namespaceObject); |
120 __webpack_require__.d(selectors_namespaceObject, "getNotices", function() { return getNotices; }); |
60 __webpack_require__.d(selectors_namespaceObject, { |
121 |
61 "getNotices": function() { return getNotices; } |
122 // EXTERNAL MODULE: external ["wp","data"] |
62 }); |
123 var external_wp_data_ = __webpack_require__("1ZqX"); |
63 |
124 |
64 ;// CONCATENATED MODULE: external ["wp","data"] |
125 // EXTERNAL MODULE: external "lodash" |
65 var external_wp_data_namespaceObject = window["wp"]["data"]; |
126 var external_lodash_ = __webpack_require__("YLtl"); |
66 ;// CONCATENATED MODULE: external "lodash" |
127 |
67 var external_lodash_namespaceObject = window["lodash"]; |
128 // CONCATENATED MODULE: ./node_modules/@wordpress/notices/build-module/store/utils/on-sub-key.js |
68 ;// CONCATENATED MODULE: ./node_modules/@wordpress/notices/build-module/store/utils/on-sub-key.js |
129 /** |
69 /** |
130 * Higher-order reducer creator which creates a combined reducer object, keyed |
70 * Higher-order reducer creator which creates a combined reducer object, keyed |
131 * by a property on the action object. |
71 * by a property on the action object. |
132 * |
72 * |
133 * @param {string} actionProperty Action property by which to key object. |
73 * @param {string} actionProperty Action property by which to key object. |
134 * |
74 * |
135 * @return {Function} Higher-order reducer. |
75 * @return {Function} Higher-order reducer. |
136 */ |
76 */ |
137 const onSubKey = actionProperty => reducer => (state = {}, action) => { |
77 const onSubKey = actionProperty => reducer => function () { |
|
78 let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
|
79 let action = arguments.length > 1 ? arguments[1] : undefined; |
138 // Retrieve subkey from action. Do not track if undefined; useful for cases |
80 // Retrieve subkey from action. Do not track if undefined; useful for cases |
139 // where reducer is scoped by action shape. |
81 // where reducer is scoped by action shape. |
140 const key = action[actionProperty]; |
82 const key = action[actionProperty]; |
141 |
83 |
142 if (key === undefined) { |
84 if (key === undefined) { |
396 |
345 |
397 const DEFAULT_NOTICES = []; |
346 const DEFAULT_NOTICES = []; |
398 /** |
347 /** |
399 * @typedef {Object} WPNotice Notice object. |
348 * @typedef {Object} WPNotice Notice object. |
400 * |
349 * |
401 * @property {string} id Unique identifier of notice. |
350 * @property {string} id Unique identifier of notice. |
402 * @property {string} status Status of notice, one of `success`, |
351 * @property {string} status Status of notice, one of `success`, |
403 * `info`, `error`, or `warning`. Defaults |
352 * `info`, `error`, or `warning`. Defaults |
404 * to `info`. |
353 * to `info`. |
405 * @property {string} content Notice message. |
354 * @property {string} content Notice message. |
406 * @property {string} spokenMessage Audibly announced message text used by |
355 * @property {string} spokenMessage Audibly announced message text used by |
407 * assistive technologies. |
356 * assistive technologies. |
408 * @property {string} __unstableHTML Notice message as raw HTML. Intended to |
357 * @property {string} __unstableHTML Notice message as raw HTML. Intended to |
409 * serve primarily for compatibility of |
358 * serve primarily for compatibility of |
410 * server-rendered notices, and SHOULD NOT |
359 * server-rendered notices, and SHOULD NOT |
411 * be used for notices. It is subject to |
360 * be used for notices. It is subject to |
412 * removal without notice. |
361 * removal without notice. |
413 * @property {boolean} isDismissible Whether the notice can be dismissed by |
362 * @property {boolean} isDismissible Whether the notice can be dismissed by |
414 * user. Defaults to `true`. |
363 * user. Defaults to `true`. |
415 * @property {string} type Type of notice, one of `default`, |
364 * @property {string} type Type of notice, one of `default`, |
416 * or `snackbar`. Defaults to `default`. |
365 * or `snackbar`. Defaults to `default`. |
417 * @property {boolean} speak Whether the notice content should be |
366 * @property {boolean} speak Whether the notice content should be |
418 * announced to screen readers. Defaults to |
367 * announced to screen readers. Defaults to |
419 * `true`. |
368 * `true`. |
420 * @property {WPNoticeAction[]} actions User actions to present with notice. |
369 * @property {WPNoticeAction[]} actions User actions to present with notice. |
421 * |
370 * |
422 */ |
371 */ |
423 |
372 |
424 /** |
373 /** |
425 * Returns all notices as an array, optionally for a given context. Defaults to |
374 * Returns all notices as an array, optionally for a given context. Defaults to |