@wordpress/notices 4.7.0 → 4.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/index.js +0 -1
  3. package/build/index.js.map +1 -1
  4. package/build/store/actions.js +12 -20
  5. package/build/store/actions.js.map +1 -1
  6. package/build/store/constants.js +1 -2
  7. package/build/store/constants.js.map +1 -1
  8. package/build/store/controls.js +0 -3
  9. package/build/store/controls.js.map +1 -1
  10. package/build/store/index.js +0 -8
  11. package/build/store/index.js.map +1 -1
  12. package/build/store/reducer.js +0 -7
  13. package/build/store/reducer.js.map +1 -1
  14. package/build/store/selectors.js +1 -4
  15. package/build/store/selectors.js.map +1 -1
  16. package/build/store/utils/on-sub-key.js +5 -9
  17. package/build/store/utils/on-sub-key.js.map +1 -1
  18. package/build-module/index.js.map +1 -1
  19. package/build-module/store/actions.js +12 -11
  20. package/build-module/store/actions.js.map +1 -1
  21. package/build-module/store/constants.js +1 -1
  22. package/build-module/store/constants.js.map +1 -1
  23. package/build-module/store/controls.js +0 -1
  24. package/build-module/store/controls.js.map +1 -1
  25. package/build-module/store/index.js +2 -2
  26. package/build-module/store/index.js.map +1 -1
  27. package/build-module/store/reducer.js +1 -5
  28. package/build-module/store/reducer.js.map +1 -1
  29. package/build-module/store/selectors.js +2 -3
  30. package/build-module/store/selectors.js.map +1 -1
  31. package/build-module/store/utils/on-sub-key.js +5 -7
  32. package/build-module/store/utils/on-sub-key.js.map +1 -1
  33. package/build-types/store/actions.d.ts.map +1 -1
  34. package/build-types/store/index.d.ts +2 -2
  35. package/build-types/store/index.d.ts.map +1 -1
  36. package/build-types/store/selectors.d.ts +0 -1
  37. package/build-types/store/selectors.d.ts.map +1 -1
  38. package/package.json +7 -4
  39. package/src/store/actions.js +0 -1
  40. package/src/store/selectors.js +0 -1
  41. package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 4.8.0 (2023-08-16)
6
+
5
7
  ## 4.7.0 (2023-08-10)
6
8
 
7
9
  ## 4.6.0 (2023-07-20)
package/build/index.js CHANGED
@@ -9,6 +9,5 @@ Object.defineProperty(exports, "store", {
9
9
  return _store.store;
10
10
  }
11
11
  });
12
-
13
12
  var _store = require("./store");
14
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/notices/src/index.js"],"names":[],"mappings":";;;;;;;;;;;;AAAA","sourcesContent":["export { store } from './store';\n"]}
1
+ {"version":3,"names":["_store","require"],"sources":["@wordpress/notices/src/index.js"],"sourcesContent":["export { store } from './store';\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA"}
@@ -11,9 +11,7 @@ exports.createWarningNotice = createWarningNotice;
11
11
  exports.removeAllNotices = removeAllNotices;
12
12
  exports.removeNotice = removeNotice;
13
13
  exports.removeNotices = removeNotices;
14
-
15
14
  var _constants = require("./constants");
16
-
17
15
  /**
18
16
  * Internal dependencies
19
17
  */
@@ -26,9 +24,10 @@ var _constants = require("./constants");
26
24
  * browser navigation.
27
25
  * @property {?Function} onClick Optional function to invoke when action is
28
26
  * triggered by user.
29
- *
30
27
  */
28
+
31
29
  let uniqueId = 0;
30
+
32
31
  /**
33
32
  * Returns an action object used in signalling that a notice is to be created.
34
33
  *
@@ -80,7 +79,6 @@ let uniqueId = 0;
80
79
  *
81
80
  * @return {Object} Action object.
82
81
  */
83
-
84
82
  function createNotice(status = _constants.DEFAULT_STATUS, content, options = {}) {
85
83
  const {
86
84
  speak = true,
@@ -93,10 +91,11 @@ function createNotice(status = _constants.DEFAULT_STATUS, content, options = {})
93
91
  icon = null,
94
92
  explicitDismiss = false,
95
93
  onDismiss
96
- } = options; // The supported value shape of content is currently limited to plain text
94
+ } = options;
95
+
96
+ // The supported value shape of content is currently limited to plain text
97
97
  // strings. To avoid setting expectation that e.g. a WPElement could be
98
98
  // supported, cast to a string.
99
-
100
99
  content = String(content);
101
100
  return {
102
101
  type: 'CREATE_NOTICE',
@@ -116,6 +115,7 @@ function createNotice(status = _constants.DEFAULT_STATUS, content, options = {})
116
115
  }
117
116
  };
118
117
  }
118
+
119
119
  /**
120
120
  * Returns an action object used in signalling that a success notice is to be
121
121
  * created. Refer to `createNotice` for options documentation.
@@ -151,11 +151,10 @@ function createNotice(status = _constants.DEFAULT_STATUS, content, options = {})
151
151
  *
152
152
  * @return {Object} Action object.
153
153
  */
154
-
155
-
156
154
  function createSuccessNotice(content, options) {
157
155
  return createNotice('success', content, options);
158
156
  }
157
+
159
158
  /**
160
159
  * Returns an action object used in signalling that an info notice is to be
161
160
  * created. Refer to `createNotice` for options documentation.
@@ -190,11 +189,10 @@ function createSuccessNotice(content, options) {
190
189
  *
191
190
  * @return {Object} Action object.
192
191
  */
193
-
194
-
195
192
  function createInfoNotice(content, options) {
196
193
  return createNotice('info', content, options);
197
194
  }
195
+
198
196
  /**
199
197
  * Returns an action object used in signalling that an error notice is to be
200
198
  * created. Refer to `createNotice` for options documentation.
@@ -232,11 +230,10 @@ function createInfoNotice(content, options) {
232
230
  *
233
231
  * @return {Object} Action object.
234
232
  */
235
-
236
-
237
233
  function createErrorNotice(content, options) {
238
234
  return createNotice('error', content, options);
239
235
  }
236
+
240
237
  /**
241
238
  * Returns an action object used in signalling that a warning notice is to be
242
239
  * created. Refer to `createNotice` for options documentation.
@@ -275,11 +272,10 @@ function createErrorNotice(content, options) {
275
272
  *
276
273
  * @return {Object} Action object.
277
274
  */
278
-
279
-
280
275
  function createWarningNotice(content, options) {
281
276
  return createNotice('warning', content, options);
282
277
  }
278
+
283
279
  /**
284
280
  * Returns an action object used in signalling that a notice is to be removed.
285
281
  *
@@ -321,8 +317,6 @@ function createWarningNotice(content, options) {
321
317
  *
322
318
  * @return {Object} Action object.
323
319
  */
324
-
325
-
326
320
  function removeNotice(id, context = _constants.DEFAULT_CONTEXT) {
327
321
  return {
328
322
  type: 'REMOVE_NOTICE',
@@ -330,6 +324,7 @@ function removeNotice(id, context = _constants.DEFAULT_CONTEXT) {
330
324
  context
331
325
  };
332
326
  }
327
+
333
328
  /**
334
329
  * Removes all notices from a given context. Defaults to the default context.
335
330
  *
@@ -376,8 +371,6 @@ function removeNotice(id, context = _constants.DEFAULT_CONTEXT) {
376
371
  *
377
372
  * @return {Object} Action object.
378
373
  */
379
-
380
-
381
374
  function removeAllNotices(noticeType = 'default', context = _constants.DEFAULT_CONTEXT) {
382
375
  return {
383
376
  type: 'REMOVE_ALL_NOTICES',
@@ -385,6 +378,7 @@ function removeAllNotices(noticeType = 'default', context = _constants.DEFAULT_C
385
378
  context
386
379
  };
387
380
  }
381
+
388
382
  /**
389
383
  * Returns an action object used in signalling that several notices are to be removed.
390
384
  *
@@ -423,8 +417,6 @@ function removeAllNotices(noticeType = 'default', context = _constants.DEFAULT_C
423
417
  * ```
424
418
  * @return {Object} Action object.
425
419
  */
426
-
427
-
428
420
  function removeNotices(ids, context = _constants.DEFAULT_CONTEXT) {
429
421
  return {
430
422
  type: 'REMOVE_NOTICES',
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/notices/src/store/actions.js"],"names":["uniqueId","createNotice","status","DEFAULT_STATUS","content","options","speak","isDismissible","context","DEFAULT_CONTEXT","id","actions","type","__unstableHTML","icon","explicitDismiss","onDismiss","String","notice","spokenMessage","createSuccessNotice","createInfoNotice","createErrorNotice","createWarningNotice","removeNotice","removeAllNotices","noticeType","removeNotices","ids"],"mappings":";;;;;;;;;;;;;;AAGA;;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,IAAIA,QAAQ,GAAG,CAAf;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACO,SAASC,YAAT,CAAuBC,MAAM,GAAGC,yBAAhC,EAAgDC,OAAhD,EAAyDC,OAAO,GAAG,EAAnE,EAAwE;AAC9E,QAAM;AACLC,IAAAA,KAAK,GAAG,IADH;AAELC,IAAAA,aAAa,GAAG,IAFX;AAGLC,IAAAA,OAAO,GAAGC,0BAHL;AAILC,IAAAA,EAAE,GAAI,GAAGF,OAAS,GAAG,EAAER,QAAU,EAJ5B;AAKLW,IAAAA,OAAO,GAAG,EALL;AAMLC,IAAAA,IAAI,GAAG,SANF;AAOLC,IAAAA,cAPK;AAQLC,IAAAA,IAAI,GAAG,IARF;AASLC,IAAAA,eAAe,GAAG,KATb;AAULC,IAAAA;AAVK,MAWFX,OAXJ,CAD8E,CAc9E;AACA;AACA;;AACAD,EAAAA,OAAO,GAAGa,MAAM,CAAEb,OAAF,CAAhB;AAEA,SAAO;AACNQ,IAAAA,IAAI,EAAE,eADA;AAENJ,IAAAA,OAFM;AAGNU,IAAAA,MAAM,EAAE;AACPR,MAAAA,EADO;AAEPR,MAAAA,MAFO;AAGPE,MAAAA,OAHO;AAIPe,MAAAA,aAAa,EAAEb,KAAK,GAAGF,OAAH,GAAa,IAJ1B;AAKPS,MAAAA,cALO;AAMPN,MAAAA,aANO;AAOPI,MAAAA,OAPO;AAQPC,MAAAA,IARO;AASPE,MAAAA,IATO;AAUPC,MAAAA,eAVO;AAWPC,MAAAA;AAXO;AAHF,GAAP;AAiBA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASI,mBAAT,CAA8BhB,OAA9B,EAAuCC,OAAvC,EAAiD;AACvD,SAAOJ,YAAY,CAAE,SAAF,EAAaG,OAAb,EAAsBC,OAAtB,CAAnB;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASgB,gBAAT,CAA2BjB,OAA3B,EAAoCC,OAApC,EAA8C;AACpD,SAAOJ,YAAY,CAAE,MAAF,EAAUG,OAAV,EAAmBC,OAAnB,CAAnB;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASiB,iBAAT,CAA4BlB,OAA5B,EAAqCC,OAArC,EAA+C;AACrD,SAAOJ,YAAY,CAAE,OAAF,EAAWG,OAAX,EAAoBC,OAApB,CAAnB;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASkB,mBAAT,CAA8BnB,OAA9B,EAAuCC,OAAvC,EAAiD;AACvD,SAAOJ,YAAY,CAAE,SAAF,EAAaG,OAAb,EAAsBC,OAAtB,CAAnB;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASmB,YAAT,CAAuBd,EAAvB,EAA2BF,OAAO,GAAGC,0BAArC,EAAuD;AAC7D,SAAO;AACNG,IAAAA,IAAI,EAAE,eADA;AAENF,IAAAA,EAFM;AAGNF,IAAAA;AAHM,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASiB,gBAAT,CACNC,UAAU,GAAG,SADP,EAENlB,OAAO,GAAGC,0BAFJ,EAGL;AACD,SAAO;AACNG,IAAAA,IAAI,EAAE,oBADA;AAENc,IAAAA,UAFM;AAGNlB,IAAAA;AAHM,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASmB,aAAT,CAAwBC,GAAxB,EAA6BpB,OAAO,GAAGC,0BAAvC,EAAyD;AAC/D,SAAO;AACNG,IAAAA,IAAI,EAAE,gBADA;AAENgB,IAAAA,GAFM;AAGNpB,IAAAA;AAHM,GAAP;AAKA","sourcesContent":["/**\n * Internal dependencies\n */\nimport { DEFAULT_CONTEXT, DEFAULT_STATUS } from './constants';\n\n/**\n * @typedef {Object} WPNoticeAction Object describing a user action option associated with a notice.\n *\n * @property {string} label Message to use as action label.\n * @property {?string} url Optional URL of resource if action incurs\n * browser navigation.\n * @property {?Function} onClick Optional function to invoke when action is\n * triggered by user.\n *\n */\n\nlet uniqueId = 0;\n\n/**\n * Returns an action object used in signalling that a notice is to be created.\n *\n * @param {string|undefined} status Notice status (\"info\" if undefined is passed).\n * @param {string} content Notice message.\n * @param {Object} [options] Notice options.\n * @param {string} [options.context='global'] Context under which to\n * group notice.\n * @param {string} [options.id] Identifier for notice.\n * Automatically assigned\n * if not specified.\n * @param {boolean} [options.isDismissible=true] Whether the notice can\n * be dismissed by user.\n * @param {string} [options.type='default'] Type of notice, one of\n * `default`, or `snackbar`.\n * @param {boolean} [options.speak=true] Whether the notice\n * content should be\n * announced to screen\n * readers.\n * @param {Array<WPNoticeAction>} [options.actions] User actions to be\n * presented with notice.\n * @param {string} [options.icon] An icon displayed with the notice.\n * Only used when type is set to `snackbar`.\n * @param {boolean} [options.explicitDismiss] Whether the notice includes\n * an explicit dismiss button and\n * can't be dismissed by clicking\n * the body of the notice. Only applies\n * when type is set to `snackbar`.\n * @param {Function} [options.onDismiss] Called when the notice is dismissed.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const { createNotice } = useDispatch( noticesStore );\n * return (\n * <Button\n * onClick={ () => createNotice( 'success', __( 'Notice message' ) ) }\n * >\n * { __( 'Generate a success notice!' ) }\n * </Button>\n * );\n * };\n * ```\n *\n * @return {Object} Action object.\n */\nexport function createNotice( status = DEFAULT_STATUS, content, options = {} ) {\n\tconst {\n\t\tspeak = true,\n\t\tisDismissible = true,\n\t\tcontext = DEFAULT_CONTEXT,\n\t\tid = `${ context }${ ++uniqueId }`,\n\t\tactions = [],\n\t\ttype = 'default',\n\t\t__unstableHTML,\n\t\ticon = null,\n\t\texplicitDismiss = false,\n\t\tonDismiss,\n\t} = options;\n\n\t// The supported value shape of content is currently limited to plain text\n\t// strings. To avoid setting expectation that e.g. a WPElement could be\n\t// supported, cast to a string.\n\tcontent = String( content );\n\n\treturn {\n\t\ttype: 'CREATE_NOTICE',\n\t\tcontext,\n\t\tnotice: {\n\t\t\tid,\n\t\t\tstatus,\n\t\t\tcontent,\n\t\t\tspokenMessage: speak ? content : null,\n\t\t\t__unstableHTML,\n\t\t\tisDismissible,\n\t\t\tactions,\n\t\t\ttype,\n\t\t\ticon,\n\t\t\texplicitDismiss,\n\t\t\tonDismiss,\n\t\t},\n\t};\n}\n\n/**\n * Returns an action object used in signalling that a success notice is to be\n * created. Refer to `createNotice` for options documentation.\n *\n * @see createNotice\n *\n * @param {string} content Notice message.\n * @param {Object} [options] Optional notice options.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const { createSuccessNotice } = useDispatch( noticesStore );\n * return (\n * <Button\n * onClick={ () =>\n * createSuccessNotice( __( 'Success!' ), {\n * type: 'snackbar',\n * icon: '🔥',\n * } )\n * }\n * >\n * { __( 'Generate a snackbar success notice!' ) }\n * </Button>\n * );\n * };\n * ```\n *\n * @return {Object} Action object.\n */\nexport function createSuccessNotice( content, options ) {\n\treturn createNotice( 'success', content, options );\n}\n\n/**\n * Returns an action object used in signalling that an info notice is to be\n * created. Refer to `createNotice` for options documentation.\n *\n * @see createNotice\n *\n * @param {string} content Notice message.\n * @param {Object} [options] Optional notice options.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const { createInfoNotice } = useDispatch( noticesStore );\n * return (\n * <Button\n * onClick={ () =>\n * createInfoNotice( __( 'Something happened!' ), {\n * isDismissible: false,\n * } )\n * }\n * >\n * { __( 'Generate a notice that cannot be dismissed.' ) }\n * </Button>\n * );\n * };\n *```\n *\n * @return {Object} Action object.\n */\nexport function createInfoNotice( content, options ) {\n\treturn createNotice( 'info', content, options );\n}\n\n/**\n * Returns an action object used in signalling that an error notice is to be\n * created. Refer to `createNotice` for options documentation.\n *\n * @see createNotice\n *\n * @param {string} content Notice message.\n * @param {Object} [options] Optional notice options.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const { createErrorNotice } = useDispatch( noticesStore );\n * return (\n * <Button\n * onClick={ () =>\n * createErrorNotice( __( 'An error occurred!' ), {\n * type: 'snackbar',\n * explicitDismiss: true,\n * } )\n * }\n * >\n * { __(\n * 'Generate an snackbar error notice with explicit dismiss button.'\n * ) }\n * </Button>\n * );\n * };\n * ```\n *\n * @return {Object} Action object.\n */\nexport function createErrorNotice( content, options ) {\n\treturn createNotice( 'error', content, options );\n}\n\n/**\n * Returns an action object used in signalling that a warning notice is to be\n * created. Refer to `createNotice` for options documentation.\n *\n * @see createNotice\n *\n * @param {string} content Notice message.\n * @param {Object} [options] Optional notice options.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const { createWarningNotice, createInfoNotice } = useDispatch( noticesStore );\n * return (\n * <Button\n * onClick={ () =>\n * createWarningNotice( __( 'Warning!' ), {\n * onDismiss: () => {\n * createInfoNotice(\n * __( 'The warning has been dismissed!' )\n * );\n * },\n * } )\n * }\n * >\n * { __( 'Generates a warning notice with onDismiss callback' ) }\n * </Button>\n * );\n * };\n * ```\n *\n * @return {Object} Action object.\n */\nexport function createWarningNotice( content, options ) {\n\treturn createNotice( 'warning', content, options );\n}\n\n/**\n * Returns an action object used in signalling that a notice is to be removed.\n *\n * @param {string} id Notice unique identifier.\n * @param {string} [context='global'] Optional context (grouping) in which the notice is\n * intended to appear. Defaults to default context.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const notices = useSelect( ( select ) => select( noticesStore ).getNotices() );\n * const { createWarningNotice, removeNotice } = useDispatch( noticesStore );\n *\n * return (\n * <>\n * <Button\n * onClick={ () =>\n * createWarningNotice( __( 'Warning!' ), {\n * isDismissible: false,\n * } )\n * }\n * >\n * { __( 'Generate a notice' ) }\n * </Button>\n * { notices.length > 0 && (\n * <Button onClick={ () => removeNotice( notices[ 0 ].id ) }>\n * { __( 'Remove the notice' ) }\n * </Button>\n * ) }\n * </>\n * );\n *};\n * ```\n *\n * @return {Object} Action object.\n */\nexport function removeNotice( id, context = DEFAULT_CONTEXT ) {\n\treturn {\n\t\ttype: 'REMOVE_NOTICE',\n\t\tid,\n\t\tcontext,\n\t};\n}\n\n/**\n * Removes all notices from a given context. Defaults to the default context.\n *\n * @param {string} noticeType The context to remove all notices from.\n * @param {string} context The context to remove all notices from.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch, useSelect } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * export const ExampleComponent = () => {\n * \tconst notices = useSelect( ( select ) =>\n * \t\tselect( noticesStore ).getNotices()\n * \t);\n * \tconst { removeNotices } = useDispatch( noticesStore );\n * \treturn (\n * \t\t<>\n * \t\t\t<ul>\n * \t\t\t\t{ notices.map( ( notice ) => (\n * \t\t\t\t\t<li key={ notice.id }>{ notice.content }</li>\n * \t\t\t\t) ) }\n * \t\t\t</ul>\n * \t\t\t<Button\n * \t\t\t\tonClick={ () =>\n * \t\t\t\t\tremoveAllNotices()\n * \t\t\t\t}\n * \t\t\t>\n * \t\t\t\t{ __( 'Clear all notices', 'woo-gutenberg-products-block' ) }\n * \t\t\t</Button>\n * \t\t\t<Button\n * \t\t\t\tonClick={ () =>\n * \t\t\t\t\tremoveAllNotices( 'snackbar' )\n * \t\t\t\t}\n * \t\t\t>\n * \t\t\t\t{ __( 'Clear all snackbar notices', 'woo-gutenberg-products-block' ) }\n * \t\t\t</Button>\n * \t\t</>\n * \t);\n * };\n * ```\n *\n * @return {Object} \t Action object.\n */\nexport function removeAllNotices(\n\tnoticeType = 'default',\n\tcontext = DEFAULT_CONTEXT\n) {\n\treturn {\n\t\ttype: 'REMOVE_ALL_NOTICES',\n\t\tnoticeType,\n\t\tcontext,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that several notices are to be removed.\n *\n * @param {string[]} ids List of unique notice identifiers.\n * @param {string} [context='global'] Optional context (grouping) in which the notices are\n * intended to appear. Defaults to default context.\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch, useSelect } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * \tconst notices = useSelect( ( select ) =>\n * \t\tselect( noticesStore ).getNotices()\n * \t);\n * \tconst { removeNotices } = useDispatch( noticesStore );\n * \treturn (\n * \t\t<>\n * \t\t\t<ul>\n * \t\t\t\t{ notices.map( ( notice ) => (\n * \t\t\t\t\t<li key={ notice.id }>{ notice.content }</li>\n * \t\t\t\t) ) }\n * \t\t\t</ul>\n * \t\t\t<Button\n * \t\t\t\tonClick={ () =>\n * \t\t\t\t\tremoveNotices( notices.map( ( { id } ) => id ) )\n * \t\t\t\t}\n * \t\t\t>\n * \t\t\t\t{ __( 'Clear all notices' ) }\n * \t\t\t</Button>\n * \t\t</>\n * \t);\n * };\n * ```\n * @return {Object} Action object.\n */\nexport function removeNotices( ids, context = DEFAULT_CONTEXT ) {\n\treturn {\n\t\ttype: 'REMOVE_NOTICES',\n\t\tids,\n\t\tcontext,\n\t};\n}\n"]}
1
+ {"version":3,"names":["_constants","require","uniqueId","createNotice","status","DEFAULT_STATUS","content","options","speak","isDismissible","context","DEFAULT_CONTEXT","id","actions","type","__unstableHTML","icon","explicitDismiss","onDismiss","String","notice","spokenMessage","createSuccessNotice","createInfoNotice","createErrorNotice","createWarningNotice","removeNotice","removeAllNotices","noticeType","removeNotices","ids"],"sources":["@wordpress/notices/src/store/actions.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { DEFAULT_CONTEXT, DEFAULT_STATUS } from './constants';\n\n/**\n * @typedef {Object} WPNoticeAction Object describing a user action option associated with a notice.\n *\n * @property {string} label Message to use as action label.\n * @property {?string} url Optional URL of resource if action incurs\n * browser navigation.\n * @property {?Function} onClick Optional function to invoke when action is\n * triggered by user.\n */\n\nlet uniqueId = 0;\n\n/**\n * Returns an action object used in signalling that a notice is to be created.\n *\n * @param {string|undefined} status Notice status (\"info\" if undefined is passed).\n * @param {string} content Notice message.\n * @param {Object} [options] Notice options.\n * @param {string} [options.context='global'] Context under which to\n * group notice.\n * @param {string} [options.id] Identifier for notice.\n * Automatically assigned\n * if not specified.\n * @param {boolean} [options.isDismissible=true] Whether the notice can\n * be dismissed by user.\n * @param {string} [options.type='default'] Type of notice, one of\n * `default`, or `snackbar`.\n * @param {boolean} [options.speak=true] Whether the notice\n * content should be\n * announced to screen\n * readers.\n * @param {Array<WPNoticeAction>} [options.actions] User actions to be\n * presented with notice.\n * @param {string} [options.icon] An icon displayed with the notice.\n * Only used when type is set to `snackbar`.\n * @param {boolean} [options.explicitDismiss] Whether the notice includes\n * an explicit dismiss button and\n * can't be dismissed by clicking\n * the body of the notice. Only applies\n * when type is set to `snackbar`.\n * @param {Function} [options.onDismiss] Called when the notice is dismissed.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const { createNotice } = useDispatch( noticesStore );\n * return (\n * <Button\n * onClick={ () => createNotice( 'success', __( 'Notice message' ) ) }\n * >\n * { __( 'Generate a success notice!' ) }\n * </Button>\n * );\n * };\n * ```\n *\n * @return {Object} Action object.\n */\nexport function createNotice( status = DEFAULT_STATUS, content, options = {} ) {\n\tconst {\n\t\tspeak = true,\n\t\tisDismissible = true,\n\t\tcontext = DEFAULT_CONTEXT,\n\t\tid = `${ context }${ ++uniqueId }`,\n\t\tactions = [],\n\t\ttype = 'default',\n\t\t__unstableHTML,\n\t\ticon = null,\n\t\texplicitDismiss = false,\n\t\tonDismiss,\n\t} = options;\n\n\t// The supported value shape of content is currently limited to plain text\n\t// strings. To avoid setting expectation that e.g. a WPElement could be\n\t// supported, cast to a string.\n\tcontent = String( content );\n\n\treturn {\n\t\ttype: 'CREATE_NOTICE',\n\t\tcontext,\n\t\tnotice: {\n\t\t\tid,\n\t\t\tstatus,\n\t\t\tcontent,\n\t\t\tspokenMessage: speak ? content : null,\n\t\t\t__unstableHTML,\n\t\t\tisDismissible,\n\t\t\tactions,\n\t\t\ttype,\n\t\t\ticon,\n\t\t\texplicitDismiss,\n\t\t\tonDismiss,\n\t\t},\n\t};\n}\n\n/**\n * Returns an action object used in signalling that a success notice is to be\n * created. Refer to `createNotice` for options documentation.\n *\n * @see createNotice\n *\n * @param {string} content Notice message.\n * @param {Object} [options] Optional notice options.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const { createSuccessNotice } = useDispatch( noticesStore );\n * return (\n * <Button\n * onClick={ () =>\n * createSuccessNotice( __( 'Success!' ), {\n * type: 'snackbar',\n * icon: '🔥',\n * } )\n * }\n * >\n * { __( 'Generate a snackbar success notice!' ) }\n * </Button>\n * );\n * };\n * ```\n *\n * @return {Object} Action object.\n */\nexport function createSuccessNotice( content, options ) {\n\treturn createNotice( 'success', content, options );\n}\n\n/**\n * Returns an action object used in signalling that an info notice is to be\n * created. Refer to `createNotice` for options documentation.\n *\n * @see createNotice\n *\n * @param {string} content Notice message.\n * @param {Object} [options] Optional notice options.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const { createInfoNotice } = useDispatch( noticesStore );\n * return (\n * <Button\n * onClick={ () =>\n * createInfoNotice( __( 'Something happened!' ), {\n * isDismissible: false,\n * } )\n * }\n * >\n * { __( 'Generate a notice that cannot be dismissed.' ) }\n * </Button>\n * );\n * };\n *```\n *\n * @return {Object} Action object.\n */\nexport function createInfoNotice( content, options ) {\n\treturn createNotice( 'info', content, options );\n}\n\n/**\n * Returns an action object used in signalling that an error notice is to be\n * created. Refer to `createNotice` for options documentation.\n *\n * @see createNotice\n *\n * @param {string} content Notice message.\n * @param {Object} [options] Optional notice options.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const { createErrorNotice } = useDispatch( noticesStore );\n * return (\n * <Button\n * onClick={ () =>\n * createErrorNotice( __( 'An error occurred!' ), {\n * type: 'snackbar',\n * explicitDismiss: true,\n * } )\n * }\n * >\n * { __(\n * 'Generate an snackbar error notice with explicit dismiss button.'\n * ) }\n * </Button>\n * );\n * };\n * ```\n *\n * @return {Object} Action object.\n */\nexport function createErrorNotice( content, options ) {\n\treturn createNotice( 'error', content, options );\n}\n\n/**\n * Returns an action object used in signalling that a warning notice is to be\n * created. Refer to `createNotice` for options documentation.\n *\n * @see createNotice\n *\n * @param {string} content Notice message.\n * @param {Object} [options] Optional notice options.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const { createWarningNotice, createInfoNotice } = useDispatch( noticesStore );\n * return (\n * <Button\n * onClick={ () =>\n * createWarningNotice( __( 'Warning!' ), {\n * onDismiss: () => {\n * createInfoNotice(\n * __( 'The warning has been dismissed!' )\n * );\n * },\n * } )\n * }\n * >\n * { __( 'Generates a warning notice with onDismiss callback' ) }\n * </Button>\n * );\n * };\n * ```\n *\n * @return {Object} Action object.\n */\nexport function createWarningNotice( content, options ) {\n\treturn createNotice( 'warning', content, options );\n}\n\n/**\n * Returns an action object used in signalling that a notice is to be removed.\n *\n * @param {string} id Notice unique identifier.\n * @param {string} [context='global'] Optional context (grouping) in which the notice is\n * intended to appear. Defaults to default context.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const notices = useSelect( ( select ) => select( noticesStore ).getNotices() );\n * const { createWarningNotice, removeNotice } = useDispatch( noticesStore );\n *\n * return (\n * <>\n * <Button\n * onClick={ () =>\n * createWarningNotice( __( 'Warning!' ), {\n * isDismissible: false,\n * } )\n * }\n * >\n * { __( 'Generate a notice' ) }\n * </Button>\n * { notices.length > 0 && (\n * <Button onClick={ () => removeNotice( notices[ 0 ].id ) }>\n * { __( 'Remove the notice' ) }\n * </Button>\n * ) }\n * </>\n * );\n *};\n * ```\n *\n * @return {Object} Action object.\n */\nexport function removeNotice( id, context = DEFAULT_CONTEXT ) {\n\treturn {\n\t\ttype: 'REMOVE_NOTICE',\n\t\tid,\n\t\tcontext,\n\t};\n}\n\n/**\n * Removes all notices from a given context. Defaults to the default context.\n *\n * @param {string} noticeType The context to remove all notices from.\n * @param {string} context The context to remove all notices from.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch, useSelect } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * export const ExampleComponent = () => {\n * \tconst notices = useSelect( ( select ) =>\n * \t\tselect( noticesStore ).getNotices()\n * \t);\n * \tconst { removeNotices } = useDispatch( noticesStore );\n * \treturn (\n * \t\t<>\n * \t\t\t<ul>\n * \t\t\t\t{ notices.map( ( notice ) => (\n * \t\t\t\t\t<li key={ notice.id }>{ notice.content }</li>\n * \t\t\t\t) ) }\n * \t\t\t</ul>\n * \t\t\t<Button\n * \t\t\t\tonClick={ () =>\n * \t\t\t\t\tremoveAllNotices()\n * \t\t\t\t}\n * \t\t\t>\n * \t\t\t\t{ __( 'Clear all notices', 'woo-gutenberg-products-block' ) }\n * \t\t\t</Button>\n * \t\t\t<Button\n * \t\t\t\tonClick={ () =>\n * \t\t\t\t\tremoveAllNotices( 'snackbar' )\n * \t\t\t\t}\n * \t\t\t>\n * \t\t\t\t{ __( 'Clear all snackbar notices', 'woo-gutenberg-products-block' ) }\n * \t\t\t</Button>\n * \t\t</>\n * \t);\n * };\n * ```\n *\n * @return {Object} \t Action object.\n */\nexport function removeAllNotices(\n\tnoticeType = 'default',\n\tcontext = DEFAULT_CONTEXT\n) {\n\treturn {\n\t\ttype: 'REMOVE_ALL_NOTICES',\n\t\tnoticeType,\n\t\tcontext,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that several notices are to be removed.\n *\n * @param {string[]} ids List of unique notice identifiers.\n * @param {string} [context='global'] Optional context (grouping) in which the notices are\n * intended to appear. Defaults to default context.\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch, useSelect } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * \tconst notices = useSelect( ( select ) =>\n * \t\tselect( noticesStore ).getNotices()\n * \t);\n * \tconst { removeNotices } = useDispatch( noticesStore );\n * \treturn (\n * \t\t<>\n * \t\t\t<ul>\n * \t\t\t\t{ notices.map( ( notice ) => (\n * \t\t\t\t\t<li key={ notice.id }>{ notice.content }</li>\n * \t\t\t\t) ) }\n * \t\t\t</ul>\n * \t\t\t<Button\n * \t\t\t\tonClick={ () =>\n * \t\t\t\t\tremoveNotices( notices.map( ( { id } ) => id ) )\n * \t\t\t\t}\n * \t\t\t>\n * \t\t\t\t{ __( 'Clear all notices' ) }\n * \t\t\t</Button>\n * \t\t</>\n * \t);\n * };\n * ```\n * @return {Object} Action object.\n */\nexport function removeNotices( ids, context = DEFAULT_CONTEXT ) {\n\treturn {\n\t\ttype: 'REMOVE_NOTICES',\n\t\tids,\n\t\tcontext,\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;AAGA,IAAAA,UAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAIC,QAAQ,GAAG,CAAC;;AAEhB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,YAAYA,CAAEC,MAAM,GAAGC,yBAAc,EAAEC,OAAO,EAAEC,OAAO,GAAG,CAAC,CAAC,EAAG;EAC9E,MAAM;IACLC,KAAK,GAAG,IAAI;IACZC,aAAa,GAAG,IAAI;IACpBC,OAAO,GAAGC,0BAAe;IACzBC,EAAE,GAAI,GAAGF,OAAS,GAAG,EAAER,QAAU,EAAC;IAClCW,OAAO,GAAG,EAAE;IACZC,IAAI,GAAG,SAAS;IAChBC,cAAc;IACdC,IAAI,GAAG,IAAI;IACXC,eAAe,GAAG,KAAK;IACvBC;EACD,CAAC,GAAGX,OAAO;;EAEX;EACA;EACA;EACAD,OAAO,GAAGa,MAAM,CAAEb,OAAQ,CAAC;EAE3B,OAAO;IACNQ,IAAI,EAAE,eAAe;IACrBJ,OAAO;IACPU,MAAM,EAAE;MACPR,EAAE;MACFR,MAAM;MACNE,OAAO;MACPe,aAAa,EAAEb,KAAK,GAAGF,OAAO,GAAG,IAAI;MACrCS,cAAc;MACdN,aAAa;MACbI,OAAO;MACPC,IAAI;MACJE,IAAI;MACJC,eAAe;MACfC;IACD;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,mBAAmBA,CAAEhB,OAAO,EAAEC,OAAO,EAAG;EACvD,OAAOJ,YAAY,CAAE,SAAS,EAAEG,OAAO,EAAEC,OAAQ,CAAC;AACnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASgB,gBAAgBA,CAAEjB,OAAO,EAAEC,OAAO,EAAG;EACpD,OAAOJ,YAAY,CAAE,MAAM,EAAEG,OAAO,EAAEC,OAAQ,CAAC;AAChD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASiB,iBAAiBA,CAAElB,OAAO,EAAEC,OAAO,EAAG;EACrD,OAAOJ,YAAY,CAAE,OAAO,EAAEG,OAAO,EAAEC,OAAQ,CAAC;AACjD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASkB,mBAAmBA,CAAEnB,OAAO,EAAEC,OAAO,EAAG;EACvD,OAAOJ,YAAY,CAAE,SAAS,EAAEG,OAAO,EAAEC,OAAQ,CAAC;AACnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASmB,YAAYA,CAAEd,EAAE,EAAEF,OAAO,GAAGC,0BAAe,EAAG;EAC7D,OAAO;IACNG,IAAI,EAAE,eAAe;IACrBF,EAAE;IACFF;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASiB,gBAAgBA,CAC/BC,UAAU,GAAG,SAAS,EACtBlB,OAAO,GAAGC,0BAAe,EACxB;EACD,OAAO;IACNG,IAAI,EAAE,oBAAoB;IAC1Bc,UAAU;IACVlB;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASmB,aAAaA,CAAEC,GAAG,EAAEpB,OAAO,GAAGC,0BAAe,EAAG;EAC/D,OAAO;IACNG,IAAI,EAAE,gBAAgB;IACtBgB,GAAG;IACHpB;EACD,CAAC;AACF"}
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DEFAULT_STATUS = exports.DEFAULT_CONTEXT = void 0;
7
-
8
7
  /**
9
8
  * Default context to use for notice grouping when not otherwise specified. Its
10
9
  * specific value doesn't hold much meaning, but it must be reasonably unique
@@ -13,12 +12,12 @@ exports.DEFAULT_STATUS = exports.DEFAULT_CONTEXT = void 0;
13
12
  * @type {string}
14
13
  */
15
14
  const DEFAULT_CONTEXT = 'global';
15
+
16
16
  /**
17
17
  * Default notice status.
18
18
  *
19
19
  * @type {string}
20
20
  */
21
-
22
21
  exports.DEFAULT_CONTEXT = DEFAULT_CONTEXT;
23
22
  const DEFAULT_STATUS = 'info';
24
23
  exports.DEFAULT_STATUS = DEFAULT_STATUS;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/notices/src/store/constants.js"],"names":["DEFAULT_CONTEXT","DEFAULT_STATUS"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,eAAe,GAAG,QAAxB;AAEP;AACA;AACA;AACA;AACA;;;AACO,MAAMC,cAAc,GAAG,MAAvB","sourcesContent":["/**\n * Default context to use for notice grouping when not otherwise specified. Its\n * specific value doesn't hold much meaning, but it must be reasonably unique\n * and, more importantly, referenced consistently in the store implementation.\n *\n * @type {string}\n */\nexport const DEFAULT_CONTEXT = 'global';\n\n/**\n * Default notice status.\n *\n * @type {string}\n */\nexport const DEFAULT_STATUS = 'info';\n"]}
1
+ {"version":3,"names":["DEFAULT_CONTEXT","exports","DEFAULT_STATUS"],"sources":["@wordpress/notices/src/store/constants.js"],"sourcesContent":["/**\n * Default context to use for notice grouping when not otherwise specified. Its\n * specific value doesn't hold much meaning, but it must be reasonably unique\n * and, more importantly, referenced consistently in the store implementation.\n *\n * @type {string}\n */\nexport const DEFAULT_CONTEXT = 'global';\n\n/**\n * Default notice status.\n *\n * @type {string}\n */\nexport const DEFAULT_STATUS = 'info';\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,eAAe,GAAG,QAAQ;;AAEvC;AACA;AACA;AACA;AACA;AAJAC,OAAA,CAAAD,eAAA,GAAAA,eAAA;AAKO,MAAME,cAAc,GAAG,MAAM;AAACD,OAAA,CAAAC,cAAA,GAAAA,cAAA"}
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _a11y = require("@wordpress/a11y");
9
-
10
8
  /**
11
9
  * WordPress dependencies
12
10
  */
@@ -14,7 +12,6 @@ var _default = {
14
12
  SPEAK(action) {
15
13
  (0, _a11y.speak)(action.message, action.ariaLive || 'assertive');
16
14
  }
17
-
18
15
  };
19
16
  exports.default = _default;
20
17
  //# sourceMappingURL=controls.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/notices/src/store/controls.js"],"names":["SPEAK","action","message","ariaLive"],"mappings":";;;;;;;AAGA;;AAHA;AACA;AACA;eAGe;AACdA,EAAAA,KAAK,CAAEC,MAAF,EAAW;AACf,qBAAOA,MAAM,CAACC,OAAd,EAAuBD,MAAM,CAACE,QAAP,IAAmB,WAA1C;AACA;;AAHa,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\n\nexport default {\n\tSPEAK( action ) {\n\t\tspeak( action.message, action.ariaLive || 'assertive' );\n\t},\n};\n"]}
1
+ {"version":3,"names":["_a11y","require","_default","SPEAK","action","speak","message","ariaLive","exports","default"],"sources":["@wordpress/notices/src/store/controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\n\nexport default {\n\tSPEAK( action ) {\n\t\tspeak( action.message, action.ariaLive || 'assertive' );\n\t},\n};\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA;AACA;AACA;AAFA,IAAAC,QAAA,GAKe;EACdC,KAAKA,CAAEC,MAAM,EAAG;IACf,IAAAC,WAAK,EAAED,MAAM,CAACE,OAAO,EAAEF,MAAM,CAACG,QAAQ,IAAI,WAAY,CAAC;EACxD;AACD,CAAC;AAAAC,OAAA,CAAAC,OAAA,GAAAP,QAAA"}
@@ -1,24 +1,16 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.store = void 0;
9
-
10
8
  var _data = require("@wordpress/data");
11
-
12
9
  var _reducer = _interopRequireDefault(require("./reducer"));
13
-
14
10
  var actions = _interopRequireWildcard(require("./actions"));
15
-
16
11
  var selectors = _interopRequireWildcard(require("./selectors"));
17
-
18
12
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
-
20
13
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
-
22
14
  /**
23
15
  * WordPress dependencies
24
16
  */
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/notices/src/store/index.js"],"names":["store","reducer","actions","selectors"],"mappings":";;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;;;;;AAVA;AACA;AACA;;AAGA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACO,MAAMA,KAAK,GAAG,4BAAkB,cAAlB,EAAkC;AACtDC,EAAAA,OAAO,EAAPA,gBADsD;AAEtDC,EAAAA,OAFsD;AAGtDC,EAAAA;AAHsD,CAAlC,CAAd;;AAMP,oBAAUH,KAAV","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as actions from './actions';\nimport * as selectors from './selectors';\n\n/**\n * Store definition for the notices namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n */\nexport const store = createReduxStore( 'core/notices', {\n\treducer,\n\tactions,\n\tselectors,\n} );\n\nregister( store );\n"]}
1
+ {"version":3,"names":["_data","require","_reducer","_interopRequireDefault","actions","_interopRequireWildcard","selectors","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","store","createReduxStore","reducer","exports","register"],"sources":["@wordpress/notices/src/store/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as actions from './actions';\nimport * as selectors from './selectors';\n\n/**\n * Store definition for the notices namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n */\nexport const store = createReduxStore( 'core/notices', {\n\treducer,\n\tactions,\n\tselectors,\n} );\n\nregister( store );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAD,uBAAA,CAAAJ,OAAA;AAAyC,SAAAM,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAH,wBAAAO,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA;AAVzC;AACA;AACA;;AAGA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACO,MAAMW,KAAK,GAAG,IAAAC,sBAAgB,EAAE,cAAc,EAAE;EACtDC,OAAO,EAAPA,gBAAO;EACP3B,OAAO;EACPE;AACD,CAAE,CAAC;AAAC0B,OAAA,CAAAH,KAAA,GAAAA,KAAA;AAEJ,IAAAI,cAAQ,EAAEJ,KAAM,CAAC"}
@@ -1,14 +1,11 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _onSubKey = _interopRequireDefault(require("./utils/on-sub-key"));
11
-
12
9
  /**
13
10
  * Internal dependencies
14
11
  */
@@ -29,23 +26,19 @@ const notices = (0, _onSubKey.default)('context')((state = [], action) => {
29
26
  return [...state.filter(({
30
27
  id
31
28
  }) => id !== action.notice.id), action.notice];
32
-
33
29
  case 'REMOVE_NOTICE':
34
30
  return state.filter(({
35
31
  id
36
32
  }) => id !== action.id);
37
-
38
33
  case 'REMOVE_NOTICES':
39
34
  return state.filter(({
40
35
  id
41
36
  }) => !action.ids.includes(id));
42
-
43
37
  case 'REMOVE_ALL_NOTICES':
44
38
  return state.filter(({
45
39
  type
46
40
  }) => type !== action.noticeType);
47
41
  }
48
-
49
42
  return state;
50
43
  });
51
44
  var _default = notices;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/notices/src/store/reducer.js"],"names":["notices","state","action","type","filter","id","notice","ids","includes","noticeType"],"mappings":";;;;;;;;;AAGA;;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,OAAO,GAAG,uBAAU,SAAV,EAAuB,CAAEC,KAAK,GAAG,EAAV,EAAcC,MAAd,KAA0B;AAChE,UAASA,MAAM,CAACC,IAAhB;AACC,SAAK,eAAL;AACC;AACA,aAAO,CACN,GAAGF,KAAK,CAACG,MAAN,CAAc,CAAE;AAAEC,QAAAA;AAAF,OAAF,KAAcA,EAAE,KAAKH,MAAM,CAACI,MAAP,CAAcD,EAAjD,CADG,EAENH,MAAM,CAACI,MAFD,CAAP;;AAKD,SAAK,eAAL;AACC,aAAOL,KAAK,CAACG,MAAN,CAAc,CAAE;AAAEC,QAAAA;AAAF,OAAF,KAAcA,EAAE,KAAKH,MAAM,CAACG,EAA1C,CAAP;;AAED,SAAK,gBAAL;AACC,aAAOJ,KAAK,CAACG,MAAN,CAAc,CAAE;AAAEC,QAAAA;AAAF,OAAF,KAAc,CAAEH,MAAM,CAACK,GAAP,CAAWC,QAAX,CAAqBH,EAArB,CAA9B,CAAP;;AAED,SAAK,oBAAL;AACC,aAAOJ,KAAK,CAACG,MAAN,CAAc,CAAE;AAAED,QAAAA;AAAF,OAAF,KAAgBA,IAAI,KAAKD,MAAM,CAACO,UAA9C,CAAP;AAfF;;AAkBA,SAAOR,KAAP;AACA,CApBe,CAAhB;eAsBeD,O","sourcesContent":["/**\n * Internal dependencies\n */\nimport onSubKey from './utils/on-sub-key';\n\n/**\n * Reducer returning the next notices state. The notices state is an object\n * where each key is a context, its value an array of notice objects.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nconst notices = onSubKey( 'context' )( ( state = [], action ) => {\n\tswitch ( action.type ) {\n\t\tcase 'CREATE_NOTICE':\n\t\t\t// Avoid duplicates on ID.\n\t\t\treturn [\n\t\t\t\t...state.filter( ( { id } ) => id !== action.notice.id ),\n\t\t\t\taction.notice,\n\t\t\t];\n\n\t\tcase 'REMOVE_NOTICE':\n\t\t\treturn state.filter( ( { id } ) => id !== action.id );\n\n\t\tcase 'REMOVE_NOTICES':\n\t\t\treturn state.filter( ( { id } ) => ! action.ids.includes( id ) );\n\n\t\tcase 'REMOVE_ALL_NOTICES':\n\t\t\treturn state.filter( ( { type } ) => type !== action.noticeType );\n\t}\n\n\treturn state;\n} );\n\nexport default notices;\n"]}
1
+ {"version":3,"names":["_onSubKey","_interopRequireDefault","require","notices","onSubKey","state","action","type","filter","id","notice","ids","includes","noticeType","_default","exports","default"],"sources":["@wordpress/notices/src/store/reducer.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport onSubKey from './utils/on-sub-key';\n\n/**\n * Reducer returning the next notices state. The notices state is an object\n * where each key is a context, its value an array of notice objects.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nconst notices = onSubKey( 'context' )( ( state = [], action ) => {\n\tswitch ( action.type ) {\n\t\tcase 'CREATE_NOTICE':\n\t\t\t// Avoid duplicates on ID.\n\t\t\treturn [\n\t\t\t\t...state.filter( ( { id } ) => id !== action.notice.id ),\n\t\t\t\taction.notice,\n\t\t\t];\n\n\t\tcase 'REMOVE_NOTICE':\n\t\t\treturn state.filter( ( { id } ) => id !== action.id );\n\n\t\tcase 'REMOVE_NOTICES':\n\t\t\treturn state.filter( ( { id } ) => ! action.ids.includes( id ) );\n\n\t\tcase 'REMOVE_ALL_NOTICES':\n\t\t\treturn state.filter( ( { type } ) => type !== action.noticeType );\n\t}\n\n\treturn state;\n} );\n\nexport default notices;\n"],"mappings":";;;;;;;AAGA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,OAAO,GAAG,IAAAC,iBAAQ,EAAE,SAAU,CAAC,CAAE,CAAEC,KAAK,GAAG,EAAE,EAAEC,MAAM,KAAM;EAChE,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,eAAe;MACnB;MACA,OAAO,CACN,GAAGF,KAAK,CAACG,MAAM,CAAE,CAAE;QAAEC;MAAG,CAAC,KAAMA,EAAE,KAAKH,MAAM,CAACI,MAAM,CAACD,EAAG,CAAC,EACxDH,MAAM,CAACI,MAAM,CACb;IAEF,KAAK,eAAe;MACnB,OAAOL,KAAK,CAACG,MAAM,CAAE,CAAE;QAAEC;MAAG,CAAC,KAAMA,EAAE,KAAKH,MAAM,CAACG,EAAG,CAAC;IAEtD,KAAK,gBAAgB;MACpB,OAAOJ,KAAK,CAACG,MAAM,CAAE,CAAE;QAAEC;MAAG,CAAC,KAAM,CAAEH,MAAM,CAACK,GAAG,CAACC,QAAQ,CAAEH,EAAG,CAAE,CAAC;IAEjE,KAAK,oBAAoB;MACxB,OAAOJ,KAAK,CAACG,MAAM,CAAE,CAAE;QAAED;MAAK,CAAC,KAAMA,IAAI,KAAKD,MAAM,CAACO,UAAW,CAAC;EACnE;EAEA,OAAOR,KAAK;AACb,CAAE,CAAC;AAAC,IAAAS,QAAA,GAEWX,OAAO;AAAAY,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.getNotices = getNotices;
7
-
8
7
  var _constants = require("./constants");
9
-
10
8
  /**
11
9
  * Internal dependencies
12
10
  */
@@ -23,6 +21,7 @@ var _constants = require("./constants");
23
21
  * @type {Array}
24
22
  */
25
23
  const DEFAULT_NOTICES = [];
24
+
26
25
  /**
27
26
  * @typedef {Object} WPNotice Notice object.
28
27
  *
@@ -46,7 +45,6 @@ const DEFAULT_NOTICES = [];
46
45
  * announced to screen readers. Defaults to
47
46
  * `true`.
48
47
  * @property {WPNoticeAction[]} actions User actions to present with notice.
49
- *
50
48
  */
51
49
 
52
50
  /**
@@ -76,7 +74,6 @@ const DEFAULT_NOTICES = [];
76
74
  *
77
75
  * @return {WPNotice[]} Array of notices.
78
76
  */
79
-
80
77
  function getNotices(state, context = _constants.DEFAULT_CONTEXT) {
81
78
  return state[context] || DEFAULT_NOTICES;
82
79
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/notices/src/store/selectors.js"],"names":["DEFAULT_NOTICES","getNotices","state","context","DEFAULT_CONTEXT"],"mappings":";;;;;;;AAGA;;AAHA;AACA;AACA;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,eAAe,GAAG,EAAxB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACO,SAASC,UAAT,CAAqBC,KAArB,EAA4BC,OAAO,GAAGC,0BAAtC,EAAwD;AAC9D,SAAOF,KAAK,CAAEC,OAAF,CAAL,IAAoBH,eAA3B;AACA","sourcesContent":["/**\n * Internal dependencies\n */\nimport { DEFAULT_CONTEXT } from './constants';\n\n/** @typedef {import('./actions').WPNoticeAction} WPNoticeAction */\n\n/**\n * The default empty set of notices to return when there are no notices\n * assigned for a given notices context. This can occur if the getNotices\n * selector is called without a notice ever having been created for the\n * context. A shared value is used to ensure referential equality between\n * sequential selector calls, since otherwise `[] !== []`.\n *\n * @type {Array}\n */\nconst DEFAULT_NOTICES = [];\n\n/**\n * @typedef {Object} WPNotice Notice object.\n *\n * @property {string} id Unique identifier of notice.\n * @property {string} status Status of notice, one of `success`,\n * `info`, `error`, or `warning`. Defaults\n * to `info`.\n * @property {string} content Notice message.\n * @property {string} spokenMessage Audibly announced message text used by\n * assistive technologies.\n * @property {string} __unstableHTML Notice message as raw HTML. Intended to\n * serve primarily for compatibility of\n * server-rendered notices, and SHOULD NOT\n * be used for notices. It is subject to\n * removal without notice.\n * @property {boolean} isDismissible Whether the notice can be dismissed by\n * user. Defaults to `true`.\n * @property {string} type Type of notice, one of `default`,\n * or `snackbar`. Defaults to `default`.\n * @property {boolean} speak Whether the notice content should be\n * announced to screen readers. Defaults to\n * `true`.\n * @property {WPNoticeAction[]} actions User actions to present with notice.\n *\n */\n\n/**\n * Returns all notices as an array, optionally for a given context. Defaults to\n * the global context.\n *\n * @param {Object} state Notices state.\n * @param {?string} context Optional grouping context.\n *\n * @example\n *\n *```js\n * import { useSelect } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n *\n * const ExampleComponent = () => {\n * const notices = useSelect( ( select ) => select( noticesStore ).getNotices() );\n * return (\n * <ul>\n * { notices.map( ( notice ) => (\n * <li key={ notice.ID }>{ notice.content }</li>\n * ) ) }\n * </ul>\n * )\n * };\n *```\n *\n * @return {WPNotice[]} Array of notices.\n */\nexport function getNotices( state, context = DEFAULT_CONTEXT ) {\n\treturn state[ context ] || DEFAULT_NOTICES;\n}\n"]}
1
+ {"version":3,"names":["_constants","require","DEFAULT_NOTICES","getNotices","state","context","DEFAULT_CONTEXT"],"sources":["@wordpress/notices/src/store/selectors.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { DEFAULT_CONTEXT } from './constants';\n\n/** @typedef {import('./actions').WPNoticeAction} WPNoticeAction */\n\n/**\n * The default empty set of notices to return when there are no notices\n * assigned for a given notices context. This can occur if the getNotices\n * selector is called without a notice ever having been created for the\n * context. A shared value is used to ensure referential equality between\n * sequential selector calls, since otherwise `[] !== []`.\n *\n * @type {Array}\n */\nconst DEFAULT_NOTICES = [];\n\n/**\n * @typedef {Object} WPNotice Notice object.\n *\n * @property {string} id Unique identifier of notice.\n * @property {string} status Status of notice, one of `success`,\n * `info`, `error`, or `warning`. Defaults\n * to `info`.\n * @property {string} content Notice message.\n * @property {string} spokenMessage Audibly announced message text used by\n * assistive technologies.\n * @property {string} __unstableHTML Notice message as raw HTML. Intended to\n * serve primarily for compatibility of\n * server-rendered notices, and SHOULD NOT\n * be used for notices. It is subject to\n * removal without notice.\n * @property {boolean} isDismissible Whether the notice can be dismissed by\n * user. Defaults to `true`.\n * @property {string} type Type of notice, one of `default`,\n * or `snackbar`. Defaults to `default`.\n * @property {boolean} speak Whether the notice content should be\n * announced to screen readers. Defaults to\n * `true`.\n * @property {WPNoticeAction[]} actions User actions to present with notice.\n */\n\n/**\n * Returns all notices as an array, optionally for a given context. Defaults to\n * the global context.\n *\n * @param {Object} state Notices state.\n * @param {?string} context Optional grouping context.\n *\n * @example\n *\n *```js\n * import { useSelect } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n *\n * const ExampleComponent = () => {\n * const notices = useSelect( ( select ) => select( noticesStore ).getNotices() );\n * return (\n * <ul>\n * { notices.map( ( notice ) => (\n * <li key={ notice.ID }>{ notice.content }</li>\n * ) ) }\n * </ul>\n * )\n * };\n *```\n *\n * @return {WPNotice[]} Array of notices.\n */\nexport function getNotices( state, context = DEFAULT_CONTEXT ) {\n\treturn state[ context ] || DEFAULT_NOTICES;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,UAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,eAAe,GAAG,EAAE;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,UAAUA,CAAEC,KAAK,EAAEC,OAAO,GAAGC,0BAAe,EAAG;EAC9D,OAAOF,KAAK,CAAEC,OAAO,CAAE,IAAIH,eAAe;AAC3C"}
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.onSubKey = exports.default = void 0;
7
-
8
7
  /**
9
8
  * Higher-order reducer creator which creates a combined reducer object, keyed
10
9
  * by a property on the action object.
@@ -17,24 +16,21 @@ const onSubKey = actionProperty => reducer => (state = {}, action) => {
17
16
  // Retrieve subkey from action. Do not track if undefined; useful for cases
18
17
  // where reducer is scoped by action shape.
19
18
  const key = action[actionProperty];
20
-
21
19
  if (key === undefined) {
22
20
  return state;
23
- } // Avoid updating state if unchanged. Note that this also accounts for a
24
- // reducer which returns undefined on a key which is not yet tracked.
25
-
21
+ }
26
22
 
23
+ // Avoid updating state if unchanged. Note that this also accounts for a
24
+ // reducer which returns undefined on a key which is not yet tracked.
27
25
  const nextKeyState = reducer(state[key], action);
28
-
29
26
  if (nextKeyState === state[key]) {
30
27
  return state;
31
28
  }
32
-
33
- return { ...state,
29
+ return {
30
+ ...state,
34
31
  [key]: nextKeyState
35
32
  };
36
33
  };
37
-
38
34
  exports.onSubKey = onSubKey;
39
35
  var _default = onSubKey;
40
36
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/notices/src/store/utils/on-sub-key.js"],"names":["onSubKey","actionProperty","reducer","state","action","key","undefined","nextKeyState"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,QAAQ,GAClBC,cAAF,IACEC,OAAF,IACA,CAAEC,KAAK,GAAG,EAAV,EAAcC,MAAd,KAA0B;AACzB;AACA;AACA,QAAMC,GAAG,GAAGD,MAAM,CAAEH,cAAF,CAAlB;;AACA,MAAKI,GAAG,KAAKC,SAAb,EAAyB;AACxB,WAAOH,KAAP;AACA,GANwB,CAQzB;AACA;;;AACA,QAAMI,YAAY,GAAGL,OAAO,CAAEC,KAAK,CAAEE,GAAF,CAAP,EAAgBD,MAAhB,CAA5B;;AACA,MAAKG,YAAY,KAAKJ,KAAK,CAAEE,GAAF,CAA3B,EAAqC;AACpC,WAAOF,KAAP;AACA;;AAED,SAAO,EACN,GAAGA,KADG;AAEN,KAAEE,GAAF,GAASE;AAFH,GAAP;AAIA,CAtBK;;;eAwBQP,Q","sourcesContent":["/**\n * Higher-order reducer creator which creates a combined reducer object, keyed\n * by a property on the action object.\n *\n * @param {string} actionProperty Action property by which to key object.\n *\n * @return {Function} Higher-order reducer.\n */\nexport const onSubKey =\n\t( actionProperty ) =>\n\t( reducer ) =>\n\t( state = {}, action ) => {\n\t\t// Retrieve subkey from action. Do not track if undefined; useful for cases\n\t\t// where reducer is scoped by action shape.\n\t\tconst key = action[ actionProperty ];\n\t\tif ( key === undefined ) {\n\t\t\treturn state;\n\t\t}\n\n\t\t// Avoid updating state if unchanged. Note that this also accounts for a\n\t\t// reducer which returns undefined on a key which is not yet tracked.\n\t\tconst nextKeyState = reducer( state[ key ], action );\n\t\tif ( nextKeyState === state[ key ] ) {\n\t\t\treturn state;\n\t\t}\n\n\t\treturn {\n\t\t\t...state,\n\t\t\t[ key ]: nextKeyState,\n\t\t};\n\t};\n\nexport default onSubKey;\n"]}
1
+ {"version":3,"names":["onSubKey","actionProperty","reducer","state","action","key","undefined","nextKeyState","exports","_default","default"],"sources":["@wordpress/notices/src/store/utils/on-sub-key.js"],"sourcesContent":["/**\n * Higher-order reducer creator which creates a combined reducer object, keyed\n * by a property on the action object.\n *\n * @param {string} actionProperty Action property by which to key object.\n *\n * @return {Function} Higher-order reducer.\n */\nexport const onSubKey =\n\t( actionProperty ) =>\n\t( reducer ) =>\n\t( state = {}, action ) => {\n\t\t// Retrieve subkey from action. Do not track if undefined; useful for cases\n\t\t// where reducer is scoped by action shape.\n\t\tconst key = action[ actionProperty ];\n\t\tif ( key === undefined ) {\n\t\t\treturn state;\n\t\t}\n\n\t\t// Avoid updating state if unchanged. Note that this also accounts for a\n\t\t// reducer which returns undefined on a key which is not yet tracked.\n\t\tconst nextKeyState = reducer( state[ key ], action );\n\t\tif ( nextKeyState === state[ key ] ) {\n\t\t\treturn state;\n\t\t}\n\n\t\treturn {\n\t\t\t...state,\n\t\t\t[ key ]: nextKeyState,\n\t\t};\n\t};\n\nexport default onSubKey;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,QAAQ,GAClBC,cAAc,IACdC,OAAO,IACT,CAAEC,KAAK,GAAG,CAAC,CAAC,EAAEC,MAAM,KAAM;EACzB;EACA;EACA,MAAMC,GAAG,GAAGD,MAAM,CAAEH,cAAc,CAAE;EACpC,IAAKI,GAAG,KAAKC,SAAS,EAAG;IACxB,OAAOH,KAAK;EACb;;EAEA;EACA;EACA,MAAMI,YAAY,GAAGL,OAAO,CAAEC,KAAK,CAAEE,GAAG,CAAE,EAAED,MAAO,CAAC;EACpD,IAAKG,YAAY,KAAKJ,KAAK,CAAEE,GAAG,CAAE,EAAG;IACpC,OAAOF,KAAK;EACb;EAEA,OAAO;IACN,GAAGA,KAAK;IACR,CAAEE,GAAG,GAAIE;EACV,CAAC;AACF,CAAC;AAACC,OAAA,CAAAR,QAAA,GAAAA,QAAA;AAAA,IAAAS,QAAA,GAEYT,QAAQ;AAAAQ,OAAA,CAAAE,OAAA,GAAAD,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/notices/src/index.js"],"names":["store"],"mappings":"AAAA,SAASA,KAAT,QAAsB,SAAtB","sourcesContent":["export { store } from './store';\n"]}
1
+ {"version":3,"names":["store"],"sources":["@wordpress/notices/src/index.js"],"sourcesContent":["export { store } from './store';\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,SAAS"}
@@ -2,6 +2,7 @@
2
2
  * Internal dependencies
3
3
  */
4
4
  import { DEFAULT_CONTEXT, DEFAULT_STATUS } from './constants';
5
+
5
6
  /**
6
7
  * @typedef {Object} WPNoticeAction Object describing a user action option associated with a notice.
7
8
  *
@@ -10,10 +11,10 @@ import { DEFAULT_CONTEXT, DEFAULT_STATUS } from './constants';
10
11
  * browser navigation.
11
12
  * @property {?Function} onClick Optional function to invoke when action is
12
13
  * triggered by user.
13
- *
14
14
  */
15
15
 
16
16
  let uniqueId = 0;
17
+
17
18
  /**
18
19
  * Returns an action object used in signalling that a notice is to be created.
19
20
  *
@@ -65,7 +66,6 @@ let uniqueId = 0;
65
66
  *
66
67
  * @return {Object} Action object.
67
68
  */
68
-
69
69
  export function createNotice(status = DEFAULT_STATUS, content, options = {}) {
70
70
  const {
71
71
  speak = true,
@@ -78,10 +78,11 @@ export function createNotice(status = DEFAULT_STATUS, content, options = {}) {
78
78
  icon = null,
79
79
  explicitDismiss = false,
80
80
  onDismiss
81
- } = options; // The supported value shape of content is currently limited to plain text
81
+ } = options;
82
+
83
+ // The supported value shape of content is currently limited to plain text
82
84
  // strings. To avoid setting expectation that e.g. a WPElement could be
83
85
  // supported, cast to a string.
84
-
85
86
  content = String(content);
86
87
  return {
87
88
  type: 'CREATE_NOTICE',
@@ -101,6 +102,7 @@ export function createNotice(status = DEFAULT_STATUS, content, options = {}) {
101
102
  }
102
103
  };
103
104
  }
105
+
104
106
  /**
105
107
  * Returns an action object used in signalling that a success notice is to be
106
108
  * created. Refer to `createNotice` for options documentation.
@@ -136,10 +138,10 @@ export function createNotice(status = DEFAULT_STATUS, content, options = {}) {
136
138
  *
137
139
  * @return {Object} Action object.
138
140
  */
139
-
140
141
  export function createSuccessNotice(content, options) {
141
142
  return createNotice('success', content, options);
142
143
  }
144
+
143
145
  /**
144
146
  * Returns an action object used in signalling that an info notice is to be
145
147
  * created. Refer to `createNotice` for options documentation.
@@ -174,10 +176,10 @@ export function createSuccessNotice(content, options) {
174
176
  *
175
177
  * @return {Object} Action object.
176
178
  */
177
-
178
179
  export function createInfoNotice(content, options) {
179
180
  return createNotice('info', content, options);
180
181
  }
182
+
181
183
  /**
182
184
  * Returns an action object used in signalling that an error notice is to be
183
185
  * created. Refer to `createNotice` for options documentation.
@@ -215,10 +217,10 @@ export function createInfoNotice(content, options) {
215
217
  *
216
218
  * @return {Object} Action object.
217
219
  */
218
-
219
220
  export function createErrorNotice(content, options) {
220
221
  return createNotice('error', content, options);
221
222
  }
223
+
222
224
  /**
223
225
  * Returns an action object used in signalling that a warning notice is to be
224
226
  * created. Refer to `createNotice` for options documentation.
@@ -257,10 +259,10 @@ export function createErrorNotice(content, options) {
257
259
  *
258
260
  * @return {Object} Action object.
259
261
  */
260
-
261
262
  export function createWarningNotice(content, options) {
262
263
  return createNotice('warning', content, options);
263
264
  }
265
+
264
266
  /**
265
267
  * Returns an action object used in signalling that a notice is to be removed.
266
268
  *
@@ -302,7 +304,6 @@ export function createWarningNotice(content, options) {
302
304
  *
303
305
  * @return {Object} Action object.
304
306
  */
305
-
306
307
  export function removeNotice(id, context = DEFAULT_CONTEXT) {
307
308
  return {
308
309
  type: 'REMOVE_NOTICE',
@@ -310,6 +311,7 @@ export function removeNotice(id, context = DEFAULT_CONTEXT) {
310
311
  context
311
312
  };
312
313
  }
314
+
313
315
  /**
314
316
  * Removes all notices from a given context. Defaults to the default context.
315
317
  *
@@ -356,7 +358,6 @@ export function removeNotice(id, context = DEFAULT_CONTEXT) {
356
358
  *
357
359
  * @return {Object} Action object.
358
360
  */
359
-
360
361
  export function removeAllNotices(noticeType = 'default', context = DEFAULT_CONTEXT) {
361
362
  return {
362
363
  type: 'REMOVE_ALL_NOTICES',
@@ -364,6 +365,7 @@ export function removeAllNotices(noticeType = 'default', context = DEFAULT_CONTE
364
365
  context
365
366
  };
366
367
  }
368
+
367
369
  /**
368
370
  * Returns an action object used in signalling that several notices are to be removed.
369
371
  *
@@ -402,7 +404,6 @@ export function removeAllNotices(noticeType = 'default', context = DEFAULT_CONTE
402
404
  * ```
403
405
  * @return {Object} Action object.
404
406
  */
405
-
406
407
  export function removeNotices(ids, context = DEFAULT_CONTEXT) {
407
408
  return {
408
409
  type: 'REMOVE_NOTICES',
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/notices/src/store/actions.js"],"names":["DEFAULT_CONTEXT","DEFAULT_STATUS","uniqueId","createNotice","status","content","options","speak","isDismissible","context","id","actions","type","__unstableHTML","icon","explicitDismiss","onDismiss","String","notice","spokenMessage","createSuccessNotice","createInfoNotice","createErrorNotice","createWarningNotice","removeNotice","removeAllNotices","noticeType","removeNotices","ids"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAT,EAA0BC,cAA1B,QAAgD,aAAhD;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAIC,QAAQ,GAAG,CAAf;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,YAAT,CAAuBC,MAAM,GAAGH,cAAhC,EAAgDI,OAAhD,EAAyDC,OAAO,GAAG,EAAnE,EAAwE;AAC9E,QAAM;AACLC,IAAAA,KAAK,GAAG,IADH;AAELC,IAAAA,aAAa,GAAG,IAFX;AAGLC,IAAAA,OAAO,GAAGT,eAHL;AAILU,IAAAA,EAAE,GAAI,GAAGD,OAAS,GAAG,EAAEP,QAAU,EAJ5B;AAKLS,IAAAA,OAAO,GAAG,EALL;AAMLC,IAAAA,IAAI,GAAG,SANF;AAOLC,IAAAA,cAPK;AAQLC,IAAAA,IAAI,GAAG,IARF;AASLC,IAAAA,eAAe,GAAG,KATb;AAULC,IAAAA;AAVK,MAWFV,OAXJ,CAD8E,CAc9E;AACA;AACA;;AACAD,EAAAA,OAAO,GAAGY,MAAM,CAAEZ,OAAF,CAAhB;AAEA,SAAO;AACNO,IAAAA,IAAI,EAAE,eADA;AAENH,IAAAA,OAFM;AAGNS,IAAAA,MAAM,EAAE;AACPR,MAAAA,EADO;AAEPN,MAAAA,MAFO;AAGPC,MAAAA,OAHO;AAIPc,MAAAA,aAAa,EAAEZ,KAAK,GAAGF,OAAH,GAAa,IAJ1B;AAKPQ,MAAAA,cALO;AAMPL,MAAAA,aANO;AAOPG,MAAAA,OAPO;AAQPC,MAAAA,IARO;AASPE,MAAAA,IATO;AAUPC,MAAAA,eAVO;AAWPC,MAAAA;AAXO;AAHF,GAAP;AAiBA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASI,mBAAT,CAA8Bf,OAA9B,EAAuCC,OAAvC,EAAiD;AACvD,SAAOH,YAAY,CAAE,SAAF,EAAaE,OAAb,EAAsBC,OAAtB,CAAnB;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASe,gBAAT,CAA2BhB,OAA3B,EAAoCC,OAApC,EAA8C;AACpD,SAAOH,YAAY,CAAE,MAAF,EAAUE,OAAV,EAAmBC,OAAnB,CAAnB;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASgB,iBAAT,CAA4BjB,OAA5B,EAAqCC,OAArC,EAA+C;AACrD,SAAOH,YAAY,CAAE,OAAF,EAAWE,OAAX,EAAoBC,OAApB,CAAnB;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASiB,mBAAT,CAA8BlB,OAA9B,EAAuCC,OAAvC,EAAiD;AACvD,SAAOH,YAAY,CAAE,SAAF,EAAaE,OAAb,EAAsBC,OAAtB,CAAnB;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASkB,YAAT,CAAuBd,EAAvB,EAA2BD,OAAO,GAAGT,eAArC,EAAuD;AAC7D,SAAO;AACNY,IAAAA,IAAI,EAAE,eADA;AAENF,IAAAA,EAFM;AAGND,IAAAA;AAHM,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASgB,gBAAT,CACNC,UAAU,GAAG,SADP,EAENjB,OAAO,GAAGT,eAFJ,EAGL;AACD,SAAO;AACNY,IAAAA,IAAI,EAAE,oBADA;AAENc,IAAAA,UAFM;AAGNjB,IAAAA;AAHM,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASkB,aAAT,CAAwBC,GAAxB,EAA6BnB,OAAO,GAAGT,eAAvC,EAAyD;AAC/D,SAAO;AACNY,IAAAA,IAAI,EAAE,gBADA;AAENgB,IAAAA,GAFM;AAGNnB,IAAAA;AAHM,GAAP;AAKA","sourcesContent":["/**\n * Internal dependencies\n */\nimport { DEFAULT_CONTEXT, DEFAULT_STATUS } from './constants';\n\n/**\n * @typedef {Object} WPNoticeAction Object describing a user action option associated with a notice.\n *\n * @property {string} label Message to use as action label.\n * @property {?string} url Optional URL of resource if action incurs\n * browser navigation.\n * @property {?Function} onClick Optional function to invoke when action is\n * triggered by user.\n *\n */\n\nlet uniqueId = 0;\n\n/**\n * Returns an action object used in signalling that a notice is to be created.\n *\n * @param {string|undefined} status Notice status (\"info\" if undefined is passed).\n * @param {string} content Notice message.\n * @param {Object} [options] Notice options.\n * @param {string} [options.context='global'] Context under which to\n * group notice.\n * @param {string} [options.id] Identifier for notice.\n * Automatically assigned\n * if not specified.\n * @param {boolean} [options.isDismissible=true] Whether the notice can\n * be dismissed by user.\n * @param {string} [options.type='default'] Type of notice, one of\n * `default`, or `snackbar`.\n * @param {boolean} [options.speak=true] Whether the notice\n * content should be\n * announced to screen\n * readers.\n * @param {Array<WPNoticeAction>} [options.actions] User actions to be\n * presented with notice.\n * @param {string} [options.icon] An icon displayed with the notice.\n * Only used when type is set to `snackbar`.\n * @param {boolean} [options.explicitDismiss] Whether the notice includes\n * an explicit dismiss button and\n * can't be dismissed by clicking\n * the body of the notice. Only applies\n * when type is set to `snackbar`.\n * @param {Function} [options.onDismiss] Called when the notice is dismissed.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const { createNotice } = useDispatch( noticesStore );\n * return (\n * <Button\n * onClick={ () => createNotice( 'success', __( 'Notice message' ) ) }\n * >\n * { __( 'Generate a success notice!' ) }\n * </Button>\n * );\n * };\n * ```\n *\n * @return {Object} Action object.\n */\nexport function createNotice( status = DEFAULT_STATUS, content, options = {} ) {\n\tconst {\n\t\tspeak = true,\n\t\tisDismissible = true,\n\t\tcontext = DEFAULT_CONTEXT,\n\t\tid = `${ context }${ ++uniqueId }`,\n\t\tactions = [],\n\t\ttype = 'default',\n\t\t__unstableHTML,\n\t\ticon = null,\n\t\texplicitDismiss = false,\n\t\tonDismiss,\n\t} = options;\n\n\t// The supported value shape of content is currently limited to plain text\n\t// strings. To avoid setting expectation that e.g. a WPElement could be\n\t// supported, cast to a string.\n\tcontent = String( content );\n\n\treturn {\n\t\ttype: 'CREATE_NOTICE',\n\t\tcontext,\n\t\tnotice: {\n\t\t\tid,\n\t\t\tstatus,\n\t\t\tcontent,\n\t\t\tspokenMessage: speak ? content : null,\n\t\t\t__unstableHTML,\n\t\t\tisDismissible,\n\t\t\tactions,\n\t\t\ttype,\n\t\t\ticon,\n\t\t\texplicitDismiss,\n\t\t\tonDismiss,\n\t\t},\n\t};\n}\n\n/**\n * Returns an action object used in signalling that a success notice is to be\n * created. Refer to `createNotice` for options documentation.\n *\n * @see createNotice\n *\n * @param {string} content Notice message.\n * @param {Object} [options] Optional notice options.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const { createSuccessNotice } = useDispatch( noticesStore );\n * return (\n * <Button\n * onClick={ () =>\n * createSuccessNotice( __( 'Success!' ), {\n * type: 'snackbar',\n * icon: '🔥',\n * } )\n * }\n * >\n * { __( 'Generate a snackbar success notice!' ) }\n * </Button>\n * );\n * };\n * ```\n *\n * @return {Object} Action object.\n */\nexport function createSuccessNotice( content, options ) {\n\treturn createNotice( 'success', content, options );\n}\n\n/**\n * Returns an action object used in signalling that an info notice is to be\n * created. Refer to `createNotice` for options documentation.\n *\n * @see createNotice\n *\n * @param {string} content Notice message.\n * @param {Object} [options] Optional notice options.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const { createInfoNotice } = useDispatch( noticesStore );\n * return (\n * <Button\n * onClick={ () =>\n * createInfoNotice( __( 'Something happened!' ), {\n * isDismissible: false,\n * } )\n * }\n * >\n * { __( 'Generate a notice that cannot be dismissed.' ) }\n * </Button>\n * );\n * };\n *```\n *\n * @return {Object} Action object.\n */\nexport function createInfoNotice( content, options ) {\n\treturn createNotice( 'info', content, options );\n}\n\n/**\n * Returns an action object used in signalling that an error notice is to be\n * created. Refer to `createNotice` for options documentation.\n *\n * @see createNotice\n *\n * @param {string} content Notice message.\n * @param {Object} [options] Optional notice options.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const { createErrorNotice } = useDispatch( noticesStore );\n * return (\n * <Button\n * onClick={ () =>\n * createErrorNotice( __( 'An error occurred!' ), {\n * type: 'snackbar',\n * explicitDismiss: true,\n * } )\n * }\n * >\n * { __(\n * 'Generate an snackbar error notice with explicit dismiss button.'\n * ) }\n * </Button>\n * );\n * };\n * ```\n *\n * @return {Object} Action object.\n */\nexport function createErrorNotice( content, options ) {\n\treturn createNotice( 'error', content, options );\n}\n\n/**\n * Returns an action object used in signalling that a warning notice is to be\n * created. Refer to `createNotice` for options documentation.\n *\n * @see createNotice\n *\n * @param {string} content Notice message.\n * @param {Object} [options] Optional notice options.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const { createWarningNotice, createInfoNotice } = useDispatch( noticesStore );\n * return (\n * <Button\n * onClick={ () =>\n * createWarningNotice( __( 'Warning!' ), {\n * onDismiss: () => {\n * createInfoNotice(\n * __( 'The warning has been dismissed!' )\n * );\n * },\n * } )\n * }\n * >\n * { __( 'Generates a warning notice with onDismiss callback' ) }\n * </Button>\n * );\n * };\n * ```\n *\n * @return {Object} Action object.\n */\nexport function createWarningNotice( content, options ) {\n\treturn createNotice( 'warning', content, options );\n}\n\n/**\n * Returns an action object used in signalling that a notice is to be removed.\n *\n * @param {string} id Notice unique identifier.\n * @param {string} [context='global'] Optional context (grouping) in which the notice is\n * intended to appear. Defaults to default context.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const notices = useSelect( ( select ) => select( noticesStore ).getNotices() );\n * const { createWarningNotice, removeNotice } = useDispatch( noticesStore );\n *\n * return (\n * <>\n * <Button\n * onClick={ () =>\n * createWarningNotice( __( 'Warning!' ), {\n * isDismissible: false,\n * } )\n * }\n * >\n * { __( 'Generate a notice' ) }\n * </Button>\n * { notices.length > 0 && (\n * <Button onClick={ () => removeNotice( notices[ 0 ].id ) }>\n * { __( 'Remove the notice' ) }\n * </Button>\n * ) }\n * </>\n * );\n *};\n * ```\n *\n * @return {Object} Action object.\n */\nexport function removeNotice( id, context = DEFAULT_CONTEXT ) {\n\treturn {\n\t\ttype: 'REMOVE_NOTICE',\n\t\tid,\n\t\tcontext,\n\t};\n}\n\n/**\n * Removes all notices from a given context. Defaults to the default context.\n *\n * @param {string} noticeType The context to remove all notices from.\n * @param {string} context The context to remove all notices from.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch, useSelect } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * export const ExampleComponent = () => {\n * \tconst notices = useSelect( ( select ) =>\n * \t\tselect( noticesStore ).getNotices()\n * \t);\n * \tconst { removeNotices } = useDispatch( noticesStore );\n * \treturn (\n * \t\t<>\n * \t\t\t<ul>\n * \t\t\t\t{ notices.map( ( notice ) => (\n * \t\t\t\t\t<li key={ notice.id }>{ notice.content }</li>\n * \t\t\t\t) ) }\n * \t\t\t</ul>\n * \t\t\t<Button\n * \t\t\t\tonClick={ () =>\n * \t\t\t\t\tremoveAllNotices()\n * \t\t\t\t}\n * \t\t\t>\n * \t\t\t\t{ __( 'Clear all notices', 'woo-gutenberg-products-block' ) }\n * \t\t\t</Button>\n * \t\t\t<Button\n * \t\t\t\tonClick={ () =>\n * \t\t\t\t\tremoveAllNotices( 'snackbar' )\n * \t\t\t\t}\n * \t\t\t>\n * \t\t\t\t{ __( 'Clear all snackbar notices', 'woo-gutenberg-products-block' ) }\n * \t\t\t</Button>\n * \t\t</>\n * \t);\n * };\n * ```\n *\n * @return {Object} \t Action object.\n */\nexport function removeAllNotices(\n\tnoticeType = 'default',\n\tcontext = DEFAULT_CONTEXT\n) {\n\treturn {\n\t\ttype: 'REMOVE_ALL_NOTICES',\n\t\tnoticeType,\n\t\tcontext,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that several notices are to be removed.\n *\n * @param {string[]} ids List of unique notice identifiers.\n * @param {string} [context='global'] Optional context (grouping) in which the notices are\n * intended to appear. Defaults to default context.\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch, useSelect } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * \tconst notices = useSelect( ( select ) =>\n * \t\tselect( noticesStore ).getNotices()\n * \t);\n * \tconst { removeNotices } = useDispatch( noticesStore );\n * \treturn (\n * \t\t<>\n * \t\t\t<ul>\n * \t\t\t\t{ notices.map( ( notice ) => (\n * \t\t\t\t\t<li key={ notice.id }>{ notice.content }</li>\n * \t\t\t\t) ) }\n * \t\t\t</ul>\n * \t\t\t<Button\n * \t\t\t\tonClick={ () =>\n * \t\t\t\t\tremoveNotices( notices.map( ( { id } ) => id ) )\n * \t\t\t\t}\n * \t\t\t>\n * \t\t\t\t{ __( 'Clear all notices' ) }\n * \t\t\t</Button>\n * \t\t</>\n * \t);\n * };\n * ```\n * @return {Object} Action object.\n */\nexport function removeNotices( ids, context = DEFAULT_CONTEXT ) {\n\treturn {\n\t\ttype: 'REMOVE_NOTICES',\n\t\tids,\n\t\tcontext,\n\t};\n}\n"]}
1
+ {"version":3,"names":["DEFAULT_CONTEXT","DEFAULT_STATUS","uniqueId","createNotice","status","content","options","speak","isDismissible","context","id","actions","type","__unstableHTML","icon","explicitDismiss","onDismiss","String","notice","spokenMessage","createSuccessNotice","createInfoNotice","createErrorNotice","createWarningNotice","removeNotice","removeAllNotices","noticeType","removeNotices","ids"],"sources":["@wordpress/notices/src/store/actions.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { DEFAULT_CONTEXT, DEFAULT_STATUS } from './constants';\n\n/**\n * @typedef {Object} WPNoticeAction Object describing a user action option associated with a notice.\n *\n * @property {string} label Message to use as action label.\n * @property {?string} url Optional URL of resource if action incurs\n * browser navigation.\n * @property {?Function} onClick Optional function to invoke when action is\n * triggered by user.\n */\n\nlet uniqueId = 0;\n\n/**\n * Returns an action object used in signalling that a notice is to be created.\n *\n * @param {string|undefined} status Notice status (\"info\" if undefined is passed).\n * @param {string} content Notice message.\n * @param {Object} [options] Notice options.\n * @param {string} [options.context='global'] Context under which to\n * group notice.\n * @param {string} [options.id] Identifier for notice.\n * Automatically assigned\n * if not specified.\n * @param {boolean} [options.isDismissible=true] Whether the notice can\n * be dismissed by user.\n * @param {string} [options.type='default'] Type of notice, one of\n * `default`, or `snackbar`.\n * @param {boolean} [options.speak=true] Whether the notice\n * content should be\n * announced to screen\n * readers.\n * @param {Array<WPNoticeAction>} [options.actions] User actions to be\n * presented with notice.\n * @param {string} [options.icon] An icon displayed with the notice.\n * Only used when type is set to `snackbar`.\n * @param {boolean} [options.explicitDismiss] Whether the notice includes\n * an explicit dismiss button and\n * can't be dismissed by clicking\n * the body of the notice. Only applies\n * when type is set to `snackbar`.\n * @param {Function} [options.onDismiss] Called when the notice is dismissed.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const { createNotice } = useDispatch( noticesStore );\n * return (\n * <Button\n * onClick={ () => createNotice( 'success', __( 'Notice message' ) ) }\n * >\n * { __( 'Generate a success notice!' ) }\n * </Button>\n * );\n * };\n * ```\n *\n * @return {Object} Action object.\n */\nexport function createNotice( status = DEFAULT_STATUS, content, options = {} ) {\n\tconst {\n\t\tspeak = true,\n\t\tisDismissible = true,\n\t\tcontext = DEFAULT_CONTEXT,\n\t\tid = `${ context }${ ++uniqueId }`,\n\t\tactions = [],\n\t\ttype = 'default',\n\t\t__unstableHTML,\n\t\ticon = null,\n\t\texplicitDismiss = false,\n\t\tonDismiss,\n\t} = options;\n\n\t// The supported value shape of content is currently limited to plain text\n\t// strings. To avoid setting expectation that e.g. a WPElement could be\n\t// supported, cast to a string.\n\tcontent = String( content );\n\n\treturn {\n\t\ttype: 'CREATE_NOTICE',\n\t\tcontext,\n\t\tnotice: {\n\t\t\tid,\n\t\t\tstatus,\n\t\t\tcontent,\n\t\t\tspokenMessage: speak ? content : null,\n\t\t\t__unstableHTML,\n\t\t\tisDismissible,\n\t\t\tactions,\n\t\t\ttype,\n\t\t\ticon,\n\t\t\texplicitDismiss,\n\t\t\tonDismiss,\n\t\t},\n\t};\n}\n\n/**\n * Returns an action object used in signalling that a success notice is to be\n * created. Refer to `createNotice` for options documentation.\n *\n * @see createNotice\n *\n * @param {string} content Notice message.\n * @param {Object} [options] Optional notice options.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const { createSuccessNotice } = useDispatch( noticesStore );\n * return (\n * <Button\n * onClick={ () =>\n * createSuccessNotice( __( 'Success!' ), {\n * type: 'snackbar',\n * icon: '🔥',\n * } )\n * }\n * >\n * { __( 'Generate a snackbar success notice!' ) }\n * </Button>\n * );\n * };\n * ```\n *\n * @return {Object} Action object.\n */\nexport function createSuccessNotice( content, options ) {\n\treturn createNotice( 'success', content, options );\n}\n\n/**\n * Returns an action object used in signalling that an info notice is to be\n * created. Refer to `createNotice` for options documentation.\n *\n * @see createNotice\n *\n * @param {string} content Notice message.\n * @param {Object} [options] Optional notice options.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const { createInfoNotice } = useDispatch( noticesStore );\n * return (\n * <Button\n * onClick={ () =>\n * createInfoNotice( __( 'Something happened!' ), {\n * isDismissible: false,\n * } )\n * }\n * >\n * { __( 'Generate a notice that cannot be dismissed.' ) }\n * </Button>\n * );\n * };\n *```\n *\n * @return {Object} Action object.\n */\nexport function createInfoNotice( content, options ) {\n\treturn createNotice( 'info', content, options );\n}\n\n/**\n * Returns an action object used in signalling that an error notice is to be\n * created. Refer to `createNotice` for options documentation.\n *\n * @see createNotice\n *\n * @param {string} content Notice message.\n * @param {Object} [options] Optional notice options.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const { createErrorNotice } = useDispatch( noticesStore );\n * return (\n * <Button\n * onClick={ () =>\n * createErrorNotice( __( 'An error occurred!' ), {\n * type: 'snackbar',\n * explicitDismiss: true,\n * } )\n * }\n * >\n * { __(\n * 'Generate an snackbar error notice with explicit dismiss button.'\n * ) }\n * </Button>\n * );\n * };\n * ```\n *\n * @return {Object} Action object.\n */\nexport function createErrorNotice( content, options ) {\n\treturn createNotice( 'error', content, options );\n}\n\n/**\n * Returns an action object used in signalling that a warning notice is to be\n * created. Refer to `createNotice` for options documentation.\n *\n * @see createNotice\n *\n * @param {string} content Notice message.\n * @param {Object} [options] Optional notice options.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const { createWarningNotice, createInfoNotice } = useDispatch( noticesStore );\n * return (\n * <Button\n * onClick={ () =>\n * createWarningNotice( __( 'Warning!' ), {\n * onDismiss: () => {\n * createInfoNotice(\n * __( 'The warning has been dismissed!' )\n * );\n * },\n * } )\n * }\n * >\n * { __( 'Generates a warning notice with onDismiss callback' ) }\n * </Button>\n * );\n * };\n * ```\n *\n * @return {Object} Action object.\n */\nexport function createWarningNotice( content, options ) {\n\treturn createNotice( 'warning', content, options );\n}\n\n/**\n * Returns an action object used in signalling that a notice is to be removed.\n *\n * @param {string} id Notice unique identifier.\n * @param {string} [context='global'] Optional context (grouping) in which the notice is\n * intended to appear. Defaults to default context.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * const notices = useSelect( ( select ) => select( noticesStore ).getNotices() );\n * const { createWarningNotice, removeNotice } = useDispatch( noticesStore );\n *\n * return (\n * <>\n * <Button\n * onClick={ () =>\n * createWarningNotice( __( 'Warning!' ), {\n * isDismissible: false,\n * } )\n * }\n * >\n * { __( 'Generate a notice' ) }\n * </Button>\n * { notices.length > 0 && (\n * <Button onClick={ () => removeNotice( notices[ 0 ].id ) }>\n * { __( 'Remove the notice' ) }\n * </Button>\n * ) }\n * </>\n * );\n *};\n * ```\n *\n * @return {Object} Action object.\n */\nexport function removeNotice( id, context = DEFAULT_CONTEXT ) {\n\treturn {\n\t\ttype: 'REMOVE_NOTICE',\n\t\tid,\n\t\tcontext,\n\t};\n}\n\n/**\n * Removes all notices from a given context. Defaults to the default context.\n *\n * @param {string} noticeType The context to remove all notices from.\n * @param {string} context The context to remove all notices from.\n *\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch, useSelect } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * export const ExampleComponent = () => {\n * \tconst notices = useSelect( ( select ) =>\n * \t\tselect( noticesStore ).getNotices()\n * \t);\n * \tconst { removeNotices } = useDispatch( noticesStore );\n * \treturn (\n * \t\t<>\n * \t\t\t<ul>\n * \t\t\t\t{ notices.map( ( notice ) => (\n * \t\t\t\t\t<li key={ notice.id }>{ notice.content }</li>\n * \t\t\t\t) ) }\n * \t\t\t</ul>\n * \t\t\t<Button\n * \t\t\t\tonClick={ () =>\n * \t\t\t\t\tremoveAllNotices()\n * \t\t\t\t}\n * \t\t\t>\n * \t\t\t\t{ __( 'Clear all notices', 'woo-gutenberg-products-block' ) }\n * \t\t\t</Button>\n * \t\t\t<Button\n * \t\t\t\tonClick={ () =>\n * \t\t\t\t\tremoveAllNotices( 'snackbar' )\n * \t\t\t\t}\n * \t\t\t>\n * \t\t\t\t{ __( 'Clear all snackbar notices', 'woo-gutenberg-products-block' ) }\n * \t\t\t</Button>\n * \t\t</>\n * \t);\n * };\n * ```\n *\n * @return {Object} \t Action object.\n */\nexport function removeAllNotices(\n\tnoticeType = 'default',\n\tcontext = DEFAULT_CONTEXT\n) {\n\treturn {\n\t\ttype: 'REMOVE_ALL_NOTICES',\n\t\tnoticeType,\n\t\tcontext,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that several notices are to be removed.\n *\n * @param {string[]} ids List of unique notice identifiers.\n * @param {string} [context='global'] Optional context (grouping) in which the notices are\n * intended to appear. Defaults to default context.\n * @example\n * ```js\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch, useSelect } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n * \tconst notices = useSelect( ( select ) =>\n * \t\tselect( noticesStore ).getNotices()\n * \t);\n * \tconst { removeNotices } = useDispatch( noticesStore );\n * \treturn (\n * \t\t<>\n * \t\t\t<ul>\n * \t\t\t\t{ notices.map( ( notice ) => (\n * \t\t\t\t\t<li key={ notice.id }>{ notice.content }</li>\n * \t\t\t\t) ) }\n * \t\t\t</ul>\n * \t\t\t<Button\n * \t\t\t\tonClick={ () =>\n * \t\t\t\t\tremoveNotices( notices.map( ( { id } ) => id ) )\n * \t\t\t\t}\n * \t\t\t>\n * \t\t\t\t{ __( 'Clear all notices' ) }\n * \t\t\t</Button>\n * \t\t</>\n * \t);\n * };\n * ```\n * @return {Object} Action object.\n */\nexport function removeNotices( ids, context = DEFAULT_CONTEXT ) {\n\treturn {\n\t\ttype: 'REMOVE_NOTICES',\n\t\tids,\n\t\tcontext,\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,EAAEC,cAAc,QAAQ,aAAa;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAIC,QAAQ,GAAG,CAAC;;AAEhB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAAEC,MAAM,GAAGH,cAAc,EAAEI,OAAO,EAAEC,OAAO,GAAG,CAAC,CAAC,EAAG;EAC9E,MAAM;IACLC,KAAK,GAAG,IAAI;IACZC,aAAa,GAAG,IAAI;IACpBC,OAAO,GAAGT,eAAe;IACzBU,EAAE,GAAI,GAAGD,OAAS,GAAG,EAAEP,QAAU,EAAC;IAClCS,OAAO,GAAG,EAAE;IACZC,IAAI,GAAG,SAAS;IAChBC,cAAc;IACdC,IAAI,GAAG,IAAI;IACXC,eAAe,GAAG,KAAK;IACvBC;EACD,CAAC,GAAGV,OAAO;;EAEX;EACA;EACA;EACAD,OAAO,GAAGY,MAAM,CAAEZ,OAAQ,CAAC;EAE3B,OAAO;IACNO,IAAI,EAAE,eAAe;IACrBH,OAAO;IACPS,MAAM,EAAE;MACPR,EAAE;MACFN,MAAM;MACNC,OAAO;MACPc,aAAa,EAAEZ,KAAK,GAAGF,OAAO,GAAG,IAAI;MACrCQ,cAAc;MACdL,aAAa;MACbG,OAAO;MACPC,IAAI;MACJE,IAAI;MACJC,eAAe;MACfC;IACD;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASI,mBAAmBA,CAAEf,OAAO,EAAEC,OAAO,EAAG;EACvD,OAAOH,YAAY,CAAE,SAAS,EAAEE,OAAO,EAAEC,OAAQ,CAAC;AACnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASe,gBAAgBA,CAAEhB,OAAO,EAAEC,OAAO,EAAG;EACpD,OAAOH,YAAY,CAAE,MAAM,EAAEE,OAAO,EAAEC,OAAQ,CAAC;AAChD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASgB,iBAAiBA,CAAEjB,OAAO,EAAEC,OAAO,EAAG;EACrD,OAAOH,YAAY,CAAE,OAAO,EAAEE,OAAO,EAAEC,OAAQ,CAAC;AACjD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASiB,mBAAmBA,CAAElB,OAAO,EAAEC,OAAO,EAAG;EACvD,OAAOH,YAAY,CAAE,SAAS,EAAEE,OAAO,EAAEC,OAAQ,CAAC;AACnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASkB,YAAYA,CAAEd,EAAE,EAAED,OAAO,GAAGT,eAAe,EAAG;EAC7D,OAAO;IACNY,IAAI,EAAE,eAAe;IACrBF,EAAE;IACFD;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASgB,gBAAgBA,CAC/BC,UAAU,GAAG,SAAS,EACtBjB,OAAO,GAAGT,eAAe,EACxB;EACD,OAAO;IACNY,IAAI,EAAE,oBAAoB;IAC1Bc,UAAU;IACVjB;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASkB,aAAaA,CAAEC,GAAG,EAAEnB,OAAO,GAAGT,eAAe,EAAG;EAC/D,OAAO;IACNY,IAAI,EAAE,gBAAgB;IACtBgB,GAAG;IACHnB;EACD,CAAC;AACF"}
@@ -6,11 +6,11 @@
6
6
  * @type {string}
7
7
  */
8
8
  export const DEFAULT_CONTEXT = 'global';
9
+
9
10
  /**
10
11
  * Default notice status.
11
12
  *
12
13
  * @type {string}
13
14
  */
14
-
15
15
  export const DEFAULT_STATUS = 'info';
16
16
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/notices/src/store/constants.js"],"names":["DEFAULT_CONTEXT","DEFAULT_STATUS"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,eAAe,GAAG,QAAxB;AAEP;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,cAAc,GAAG,MAAvB","sourcesContent":["/**\n * Default context to use for notice grouping when not otherwise specified. Its\n * specific value doesn't hold much meaning, but it must be reasonably unique\n * and, more importantly, referenced consistently in the store implementation.\n *\n * @type {string}\n */\nexport const DEFAULT_CONTEXT = 'global';\n\n/**\n * Default notice status.\n *\n * @type {string}\n */\nexport const DEFAULT_STATUS = 'info';\n"]}
1
+ {"version":3,"names":["DEFAULT_CONTEXT","DEFAULT_STATUS"],"sources":["@wordpress/notices/src/store/constants.js"],"sourcesContent":["/**\n * Default context to use for notice grouping when not otherwise specified. Its\n * specific value doesn't hold much meaning, but it must be reasonably unique\n * and, more importantly, referenced consistently in the store implementation.\n *\n * @type {string}\n */\nexport const DEFAULT_CONTEXT = 'global';\n\n/**\n * Default notice status.\n *\n * @type {string}\n */\nexport const DEFAULT_STATUS = 'info';\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,eAAe,GAAG,QAAQ;;AAEvC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAG,MAAM"}
@@ -6,6 +6,5 @@ export default {
6
6
  SPEAK(action) {
7
7
  speak(action.message, action.ariaLive || 'assertive');
8
8
  }
9
-
10
9
  };
11
10
  //# sourceMappingURL=controls.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/notices/src/store/controls.js"],"names":["speak","SPEAK","action","message","ariaLive"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAT,QAAsB,iBAAtB;AAEA,eAAe;AACdC,EAAAA,KAAK,CAAEC,MAAF,EAAW;AACfF,IAAAA,KAAK,CAAEE,MAAM,CAACC,OAAT,EAAkBD,MAAM,CAACE,QAAP,IAAmB,WAArC,CAAL;AACA;;AAHa,CAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\n\nexport default {\n\tSPEAK( action ) {\n\t\tspeak( action.message, action.ariaLive || 'assertive' );\n\t},\n};\n"]}
1
+ {"version":3,"names":["speak","SPEAK","action","message","ariaLive"],"sources":["@wordpress/notices/src/store/controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\n\nexport default {\n\tSPEAK( action ) {\n\t\tspeak( action.message, action.ariaLive || 'assertive' );\n\t},\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,QAAQ,iBAAiB;AAEvC,eAAe;EACdC,KAAKA,CAAEC,MAAM,EAAG;IACfF,KAAK,CAAEE,MAAM,CAACC,OAAO,EAAED,MAAM,CAACE,QAAQ,IAAI,WAAY,CAAC;EACxD;AACD,CAAC"}
@@ -2,19 +2,19 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { createReduxStore, register } from '@wordpress/data';
5
+
5
6
  /**
6
7
  * Internal dependencies
7
8
  */
8
-
9
9
  import reducer from './reducer';
10
10
  import * as actions from './actions';
11
11
  import * as selectors from './selectors';
12
+
12
13
  /**
13
14
  * Store definition for the notices namespace.
14
15
  *
15
16
  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
16
17
  */
17
-
18
18
  export const store = createReduxStore('core/notices', {
19
19
  reducer,
20
20
  actions,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/notices/src/store/index.js"],"names":["createReduxStore","register","reducer","actions","selectors","store"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gBAAT,EAA2BC,QAA3B,QAA2C,iBAA3C;AAEA;AACA;AACA;;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAO,KAAKC,OAAZ,MAAyB,WAAzB;AACA,OAAO,KAAKC,SAAZ,MAA2B,aAA3B;AAEA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,KAAK,GAAGL,gBAAgB,CAAE,cAAF,EAAkB;AACtDE,EAAAA,OADsD;AAEtDC,EAAAA,OAFsD;AAGtDC,EAAAA;AAHsD,CAAlB,CAA9B;AAMPH,QAAQ,CAAEI,KAAF,CAAR","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as actions from './actions';\nimport * as selectors from './selectors';\n\n/**\n * Store definition for the notices namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n */\nexport const store = createReduxStore( 'core/notices', {\n\treducer,\n\tactions,\n\tselectors,\n} );\n\nregister( store );\n"]}
1
+ {"version":3,"names":["createReduxStore","register","reducer","actions","selectors","store"],"sources":["@wordpress/notices/src/store/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as actions from './actions';\nimport * as selectors from './selectors';\n\n/**\n * Store definition for the notices namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n */\nexport const store = createReduxStore( 'core/notices', {\n\treducer,\n\tactions,\n\tselectors,\n} );\n\nregister( store );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gBAAgB,EAAEC,QAAQ,QAAQ,iBAAiB;;AAE5D;AACA;AACA;AACA,OAAOC,OAAO,MAAM,WAAW;AAC/B,OAAO,KAAKC,OAAO,MAAM,WAAW;AACpC,OAAO,KAAKC,SAAS,MAAM,aAAa;;AAExC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,KAAK,GAAGL,gBAAgB,CAAE,cAAc,EAAE;EACtDE,OAAO;EACPC,OAAO;EACPC;AACD,CAAE,CAAC;AAEHH,QAAQ,CAAEI,KAAM,CAAC"}
@@ -2,6 +2,7 @@
2
2
  * Internal dependencies
3
3
  */
4
4
  import onSubKey from './utils/on-sub-key';
5
+
5
6
  /**
6
7
  * Reducer returning the next notices state. The notices state is an object
7
8
  * where each key is a context, its value an array of notice objects.
@@ -11,7 +12,6 @@ import onSubKey from './utils/on-sub-key';
11
12
  *
12
13
  * @return {Object} Updated state.
13
14
  */
14
-
15
15
  const notices = onSubKey('context')((state = [], action) => {
16
16
  switch (action.type) {
17
17
  case 'CREATE_NOTICE':
@@ -19,23 +19,19 @@ const notices = onSubKey('context')((state = [], action) => {
19
19
  return [...state.filter(({
20
20
  id
21
21
  }) => id !== action.notice.id), action.notice];
22
-
23
22
  case 'REMOVE_NOTICE':
24
23
  return state.filter(({
25
24
  id
26
25
  }) => id !== action.id);
27
-
28
26
  case 'REMOVE_NOTICES':
29
27
  return state.filter(({
30
28
  id
31
29
  }) => !action.ids.includes(id));
32
-
33
30
  case 'REMOVE_ALL_NOTICES':
34
31
  return state.filter(({
35
32
  type
36
33
  }) => type !== action.noticeType);
37
34
  }
38
-
39
35
  return state;
40
36
  });
41
37
  export default notices;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/notices/src/store/reducer.js"],"names":["onSubKey","notices","state","action","type","filter","id","notice","ids","includes","noticeType"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,QAAP,MAAqB,oBAArB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,OAAO,GAAGD,QAAQ,CAAE,SAAF,CAAR,CAAuB,CAAEE,KAAK,GAAG,EAAV,EAAcC,MAAd,KAA0B;AAChE,UAASA,MAAM,CAACC,IAAhB;AACC,SAAK,eAAL;AACC;AACA,aAAO,CACN,GAAGF,KAAK,CAACG,MAAN,CAAc,CAAE;AAAEC,QAAAA;AAAF,OAAF,KAAcA,EAAE,KAAKH,MAAM,CAACI,MAAP,CAAcD,EAAjD,CADG,EAENH,MAAM,CAACI,MAFD,CAAP;;AAKD,SAAK,eAAL;AACC,aAAOL,KAAK,CAACG,MAAN,CAAc,CAAE;AAAEC,QAAAA;AAAF,OAAF,KAAcA,EAAE,KAAKH,MAAM,CAACG,EAA1C,CAAP;;AAED,SAAK,gBAAL;AACC,aAAOJ,KAAK,CAACG,MAAN,CAAc,CAAE;AAAEC,QAAAA;AAAF,OAAF,KAAc,CAAEH,MAAM,CAACK,GAAP,CAAWC,QAAX,CAAqBH,EAArB,CAA9B,CAAP;;AAED,SAAK,oBAAL;AACC,aAAOJ,KAAK,CAACG,MAAN,CAAc,CAAE;AAAED,QAAAA;AAAF,OAAF,KAAgBA,IAAI,KAAKD,MAAM,CAACO,UAA9C,CAAP;AAfF;;AAkBA,SAAOR,KAAP;AACA,CApBe,CAAhB;AAsBA,eAAeD,OAAf","sourcesContent":["/**\n * Internal dependencies\n */\nimport onSubKey from './utils/on-sub-key';\n\n/**\n * Reducer returning the next notices state. The notices state is an object\n * where each key is a context, its value an array of notice objects.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nconst notices = onSubKey( 'context' )( ( state = [], action ) => {\n\tswitch ( action.type ) {\n\t\tcase 'CREATE_NOTICE':\n\t\t\t// Avoid duplicates on ID.\n\t\t\treturn [\n\t\t\t\t...state.filter( ( { id } ) => id !== action.notice.id ),\n\t\t\t\taction.notice,\n\t\t\t];\n\n\t\tcase 'REMOVE_NOTICE':\n\t\t\treturn state.filter( ( { id } ) => id !== action.id );\n\n\t\tcase 'REMOVE_NOTICES':\n\t\t\treturn state.filter( ( { id } ) => ! action.ids.includes( id ) );\n\n\t\tcase 'REMOVE_ALL_NOTICES':\n\t\t\treturn state.filter( ( { type } ) => type !== action.noticeType );\n\t}\n\n\treturn state;\n} );\n\nexport default notices;\n"]}
1
+ {"version":3,"names":["onSubKey","notices","state","action","type","filter","id","notice","ids","includes","noticeType"],"sources":["@wordpress/notices/src/store/reducer.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport onSubKey from './utils/on-sub-key';\n\n/**\n * Reducer returning the next notices state. The notices state is an object\n * where each key is a context, its value an array of notice objects.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nconst notices = onSubKey( 'context' )( ( state = [], action ) => {\n\tswitch ( action.type ) {\n\t\tcase 'CREATE_NOTICE':\n\t\t\t// Avoid duplicates on ID.\n\t\t\treturn [\n\t\t\t\t...state.filter( ( { id } ) => id !== action.notice.id ),\n\t\t\t\taction.notice,\n\t\t\t];\n\n\t\tcase 'REMOVE_NOTICE':\n\t\t\treturn state.filter( ( { id } ) => id !== action.id );\n\n\t\tcase 'REMOVE_NOTICES':\n\t\t\treturn state.filter( ( { id } ) => ! action.ids.includes( id ) );\n\n\t\tcase 'REMOVE_ALL_NOTICES':\n\t\t\treturn state.filter( ( { type } ) => type !== action.noticeType );\n\t}\n\n\treturn state;\n} );\n\nexport default notices;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,QAAQ,MAAM,oBAAoB;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,OAAO,GAAGD,QAAQ,CAAE,SAAU,CAAC,CAAE,CAAEE,KAAK,GAAG,EAAE,EAAEC,MAAM,KAAM;EAChE,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,eAAe;MACnB;MACA,OAAO,CACN,GAAGF,KAAK,CAACG,MAAM,CAAE,CAAE;QAAEC;MAAG,CAAC,KAAMA,EAAE,KAAKH,MAAM,CAACI,MAAM,CAACD,EAAG,CAAC,EACxDH,MAAM,CAACI,MAAM,CACb;IAEF,KAAK,eAAe;MACnB,OAAOL,KAAK,CAACG,MAAM,CAAE,CAAE;QAAEC;MAAG,CAAC,KAAMA,EAAE,KAAKH,MAAM,CAACG,EAAG,CAAC;IAEtD,KAAK,gBAAgB;MACpB,OAAOJ,KAAK,CAACG,MAAM,CAAE,CAAE;QAAEC;MAAG,CAAC,KAAM,CAAEH,MAAM,CAACK,GAAG,CAACC,QAAQ,CAAEH,EAAG,CAAE,CAAC;IAEjE,KAAK,oBAAoB;MACxB,OAAOJ,KAAK,CAACG,MAAM,CAAE,CAAE;QAAED;MAAK,CAAC,KAAMA,IAAI,KAAKD,MAAM,CAACO,UAAW,CAAC;EACnE;EAEA,OAAOR,KAAK;AACb,CAAE,CAAC;AAEH,eAAeD,OAAO"}
@@ -2,6 +2,7 @@
2
2
  * Internal dependencies
3
3
  */
4
4
  import { DEFAULT_CONTEXT } from './constants';
5
+
5
6
  /** @typedef {import('./actions').WPNoticeAction} WPNoticeAction */
6
7
 
7
8
  /**
@@ -13,8 +14,8 @@ import { DEFAULT_CONTEXT } from './constants';
13
14
  *
14
15
  * @type {Array}
15
16
  */
16
-
17
17
  const DEFAULT_NOTICES = [];
18
+
18
19
  /**
19
20
  * @typedef {Object} WPNotice Notice object.
20
21
  *
@@ -38,7 +39,6 @@ const DEFAULT_NOTICES = [];
38
39
  * announced to screen readers. Defaults to
39
40
  * `true`.
40
41
  * @property {WPNoticeAction[]} actions User actions to present with notice.
41
- *
42
42
  */
43
43
 
44
44
  /**
@@ -68,7 +68,6 @@ const DEFAULT_NOTICES = [];
68
68
  *
69
69
  * @return {WPNotice[]} Array of notices.
70
70
  */
71
-
72
71
  export function getNotices(state, context = DEFAULT_CONTEXT) {
73
72
  return state[context] || DEFAULT_NOTICES;
74
73
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/notices/src/store/selectors.js"],"names":["DEFAULT_CONTEXT","DEFAULT_NOTICES","getNotices","state","context"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAT,QAAgC,aAAhC;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,eAAe,GAAG,EAAxB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,UAAT,CAAqBC,KAArB,EAA4BC,OAAO,GAAGJ,eAAtC,EAAwD;AAC9D,SAAOG,KAAK,CAAEC,OAAF,CAAL,IAAoBH,eAA3B;AACA","sourcesContent":["/**\n * Internal dependencies\n */\nimport { DEFAULT_CONTEXT } from './constants';\n\n/** @typedef {import('./actions').WPNoticeAction} WPNoticeAction */\n\n/**\n * The default empty set of notices to return when there are no notices\n * assigned for a given notices context. This can occur if the getNotices\n * selector is called without a notice ever having been created for the\n * context. A shared value is used to ensure referential equality between\n * sequential selector calls, since otherwise `[] !== []`.\n *\n * @type {Array}\n */\nconst DEFAULT_NOTICES = [];\n\n/**\n * @typedef {Object} WPNotice Notice object.\n *\n * @property {string} id Unique identifier of notice.\n * @property {string} status Status of notice, one of `success`,\n * `info`, `error`, or `warning`. Defaults\n * to `info`.\n * @property {string} content Notice message.\n * @property {string} spokenMessage Audibly announced message text used by\n * assistive technologies.\n * @property {string} __unstableHTML Notice message as raw HTML. Intended to\n * serve primarily for compatibility of\n * server-rendered notices, and SHOULD NOT\n * be used for notices. It is subject to\n * removal without notice.\n * @property {boolean} isDismissible Whether the notice can be dismissed by\n * user. Defaults to `true`.\n * @property {string} type Type of notice, one of `default`,\n * or `snackbar`. Defaults to `default`.\n * @property {boolean} speak Whether the notice content should be\n * announced to screen readers. Defaults to\n * `true`.\n * @property {WPNoticeAction[]} actions User actions to present with notice.\n *\n */\n\n/**\n * Returns all notices as an array, optionally for a given context. Defaults to\n * the global context.\n *\n * @param {Object} state Notices state.\n * @param {?string} context Optional grouping context.\n *\n * @example\n *\n *```js\n * import { useSelect } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n *\n * const ExampleComponent = () => {\n * const notices = useSelect( ( select ) => select( noticesStore ).getNotices() );\n * return (\n * <ul>\n * { notices.map( ( notice ) => (\n * <li key={ notice.ID }>{ notice.content }</li>\n * ) ) }\n * </ul>\n * )\n * };\n *```\n *\n * @return {WPNotice[]} Array of notices.\n */\nexport function getNotices( state, context = DEFAULT_CONTEXT ) {\n\treturn state[ context ] || DEFAULT_NOTICES;\n}\n"]}
1
+ {"version":3,"names":["DEFAULT_CONTEXT","DEFAULT_NOTICES","getNotices","state","context"],"sources":["@wordpress/notices/src/store/selectors.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { DEFAULT_CONTEXT } from './constants';\n\n/** @typedef {import('./actions').WPNoticeAction} WPNoticeAction */\n\n/**\n * The default empty set of notices to return when there are no notices\n * assigned for a given notices context. This can occur if the getNotices\n * selector is called without a notice ever having been created for the\n * context. A shared value is used to ensure referential equality between\n * sequential selector calls, since otherwise `[] !== []`.\n *\n * @type {Array}\n */\nconst DEFAULT_NOTICES = [];\n\n/**\n * @typedef {Object} WPNotice Notice object.\n *\n * @property {string} id Unique identifier of notice.\n * @property {string} status Status of notice, one of `success`,\n * `info`, `error`, or `warning`. Defaults\n * to `info`.\n * @property {string} content Notice message.\n * @property {string} spokenMessage Audibly announced message text used by\n * assistive technologies.\n * @property {string} __unstableHTML Notice message as raw HTML. Intended to\n * serve primarily for compatibility of\n * server-rendered notices, and SHOULD NOT\n * be used for notices. It is subject to\n * removal without notice.\n * @property {boolean} isDismissible Whether the notice can be dismissed by\n * user. Defaults to `true`.\n * @property {string} type Type of notice, one of `default`,\n * or `snackbar`. Defaults to `default`.\n * @property {boolean} speak Whether the notice content should be\n * announced to screen readers. Defaults to\n * `true`.\n * @property {WPNoticeAction[]} actions User actions to present with notice.\n */\n\n/**\n * Returns all notices as an array, optionally for a given context. Defaults to\n * the global context.\n *\n * @param {Object} state Notices state.\n * @param {?string} context Optional grouping context.\n *\n * @example\n *\n *```js\n * import { useSelect } from '@wordpress/data';\n * import { store as noticesStore } from '@wordpress/notices';\n *\n * const ExampleComponent = () => {\n * const notices = useSelect( ( select ) => select( noticesStore ).getNotices() );\n * return (\n * <ul>\n * { notices.map( ( notice ) => (\n * <li key={ notice.ID }>{ notice.content }</li>\n * ) ) }\n * </ul>\n * )\n * };\n *```\n *\n * @return {WPNotice[]} Array of notices.\n */\nexport function getNotices( state, context = DEFAULT_CONTEXT ) {\n\treturn state[ context ] || DEFAULT_NOTICES;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,aAAa;;AAE7C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,eAAe,GAAG,EAAE;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAAEC,KAAK,EAAEC,OAAO,GAAGJ,eAAe,EAAG;EAC9D,OAAOG,KAAK,CAAEC,OAAO,CAAE,IAAIH,eAAe;AAC3C"}
@@ -10,20 +10,18 @@ export const onSubKey = actionProperty => reducer => (state = {}, action) => {
10
10
  // Retrieve subkey from action. Do not track if undefined; useful for cases
11
11
  // where reducer is scoped by action shape.
12
12
  const key = action[actionProperty];
13
-
14
13
  if (key === undefined) {
15
14
  return state;
16
- } // Avoid updating state if unchanged. Note that this also accounts for a
17
- // reducer which returns undefined on a key which is not yet tracked.
18
-
15
+ }
19
16
 
17
+ // Avoid updating state if unchanged. Note that this also accounts for a
18
+ // reducer which returns undefined on a key which is not yet tracked.
20
19
  const nextKeyState = reducer(state[key], action);
21
-
22
20
  if (nextKeyState === state[key]) {
23
21
  return state;
24
22
  }
25
-
26
- return { ...state,
23
+ return {
24
+ ...state,
27
25
  [key]: nextKeyState
28
26
  };
29
27
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/notices/src/store/utils/on-sub-key.js"],"names":["onSubKey","actionProperty","reducer","state","action","key","undefined","nextKeyState"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,QAAQ,GAClBC,cAAF,IACEC,OAAF,IACA,CAAEC,KAAK,GAAG,EAAV,EAAcC,MAAd,KAA0B;AACzB;AACA;AACA,QAAMC,GAAG,GAAGD,MAAM,CAAEH,cAAF,CAAlB;;AACA,MAAKI,GAAG,KAAKC,SAAb,EAAyB;AACxB,WAAOH,KAAP;AACA,GANwB,CAQzB;AACA;;;AACA,QAAMI,YAAY,GAAGL,OAAO,CAAEC,KAAK,CAAEE,GAAF,CAAP,EAAgBD,MAAhB,CAA5B;;AACA,MAAKG,YAAY,KAAKJ,KAAK,CAAEE,GAAF,CAA3B,EAAqC;AACpC,WAAOF,KAAP;AACA;;AAED,SAAO,EACN,GAAGA,KADG;AAEN,KAAEE,GAAF,GAASE;AAFH,GAAP;AAIA,CAtBK;AAwBP,eAAeP,QAAf","sourcesContent":["/**\n * Higher-order reducer creator which creates a combined reducer object, keyed\n * by a property on the action object.\n *\n * @param {string} actionProperty Action property by which to key object.\n *\n * @return {Function} Higher-order reducer.\n */\nexport const onSubKey =\n\t( actionProperty ) =>\n\t( reducer ) =>\n\t( state = {}, action ) => {\n\t\t// Retrieve subkey from action. Do not track if undefined; useful for cases\n\t\t// where reducer is scoped by action shape.\n\t\tconst key = action[ actionProperty ];\n\t\tif ( key === undefined ) {\n\t\t\treturn state;\n\t\t}\n\n\t\t// Avoid updating state if unchanged. Note that this also accounts for a\n\t\t// reducer which returns undefined on a key which is not yet tracked.\n\t\tconst nextKeyState = reducer( state[ key ], action );\n\t\tif ( nextKeyState === state[ key ] ) {\n\t\t\treturn state;\n\t\t}\n\n\t\treturn {\n\t\t\t...state,\n\t\t\t[ key ]: nextKeyState,\n\t\t};\n\t};\n\nexport default onSubKey;\n"]}
1
+ {"version":3,"names":["onSubKey","actionProperty","reducer","state","action","key","undefined","nextKeyState"],"sources":["@wordpress/notices/src/store/utils/on-sub-key.js"],"sourcesContent":["/**\n * Higher-order reducer creator which creates a combined reducer object, keyed\n * by a property on the action object.\n *\n * @param {string} actionProperty Action property by which to key object.\n *\n * @return {Function} Higher-order reducer.\n */\nexport const onSubKey =\n\t( actionProperty ) =>\n\t( reducer ) =>\n\t( state = {}, action ) => {\n\t\t// Retrieve subkey from action. Do not track if undefined; useful for cases\n\t\t// where reducer is scoped by action shape.\n\t\tconst key = action[ actionProperty ];\n\t\tif ( key === undefined ) {\n\t\t\treturn state;\n\t\t}\n\n\t\t// Avoid updating state if unchanged. Note that this also accounts for a\n\t\t// reducer which returns undefined on a key which is not yet tracked.\n\t\tconst nextKeyState = reducer( state[ key ], action );\n\t\tif ( nextKeyState === state[ key ] ) {\n\t\t\treturn state;\n\t\t}\n\n\t\treturn {\n\t\t\t...state,\n\t\t\t[ key ]: nextKeyState,\n\t\t};\n\t};\n\nexport default onSubKey;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,QAAQ,GAClBC,cAAc,IACdC,OAAO,IACT,CAAEC,KAAK,GAAG,CAAC,CAAC,EAAEC,MAAM,KAAM;EACzB;EACA;EACA,MAAMC,GAAG,GAAGD,MAAM,CAAEH,cAAc,CAAE;EACpC,IAAKI,GAAG,KAAKC,SAAS,EAAG;IACxB,OAAOH,KAAK;EACb;;EAEA;EACA;EACA,MAAMI,YAAY,GAAGL,OAAO,CAAEC,KAAK,CAAEE,GAAG,CAAE,EAAED,MAAO,CAAC;EACpD,IAAKG,YAAY,KAAKJ,KAAK,CAAEE,GAAG,CAAE,EAAG;IACpC,OAAOF,KAAK;EACb;EAEA,OAAO;IACN,GAAGA,KAAK;IACR,CAAEE,GAAG,GAAIE;EACV,CAAC;AACF,CAAC;AAEF,eAAeP,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/store/actions.js"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,qCAhDW,MAAM,GAAC,SAAS,WAChB,MAAM;;;;;;;;;;gBA6CL,MAAM,CAsCjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,6CA7BW,MAAM,iCA2BL,MAAM,CAIjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,0CA5BW,MAAM,iCA0BL,MAAM,CAIjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,2CA/BW,MAAM,iCA6BL,MAAM,CAIjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,6CAhCW,MAAM,iCA8BL,MAAM,CAIjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,iCAtCW,MAAM,iCAoCL,MAAM,CAQjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,8CA3CW,MAAM,YACN,MAAM,GAwCL,MAAM,CAWjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,mCAnCW,MAAM,EAAE,iCAiCP,MAAM,CAQjB;;;;;;;;WAzZa,MAAM;;;;;SACL,MAAM"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/store/actions.js"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,qCAhDW,MAAM,GAAC,SAAS,WAChB,MAAM;;;;;;;;;;gBA6CL,MAAM,CAsCjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,6CA7BW,MAAM,iCA2BL,MAAM,CAIjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,0CA5BW,MAAM,iCA0BL,MAAM,CAIjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,2CA/BW,MAAM,iCA6BL,MAAM,CAIjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,6CAhCW,MAAM,iCA8BL,MAAM,CAIjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,iCAtCW,MAAM,iCAoCL,MAAM,CAQjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,8CA3CW,MAAM,YACN,MAAM,GAwCL,MAAM,CAWjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,mCAnCW,MAAM,EAAE,iCAiCP,MAAM,CAQjB;;;;;;;;WAxZa,MAAM;;;;;SACL,MAAM"}
@@ -4,6 +4,6 @@
4
4
  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
5
5
  */
6
6
  export const store: import("@wordpress/data/build-types/types").StoreDescriptor<import("@wordpress/data/build-types/types").ReduxStoreConfig<any, typeof actions, typeof selectors>>;
7
- import * as actions from "./actions";
8
- import * as selectors from "./selectors";
7
+ import * as actions from './actions';
8
+ import * as selectors from './selectors';
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.js"],"names":[],"mappings":"AAYA;;;;GAIG;AACH,qLAII"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.js"],"names":[],"mappings":"AAYA;;;;GAIG;AACH,qLAII;yBAZqB,WAAW;2BACT,aAAa"}
@@ -21,7 +21,6 @@
21
21
  * announced to screen readers. Defaults to
22
22
  * `true`.
23
23
  * @property {WPNoticeAction[]} actions User actions to present with notice.
24
- *
25
24
  */
26
25
  /**
27
26
  * Returns all notices as an array, optionally for a given context. Defaults to
@@ -1 +1 @@
1
- {"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../src/store/selectors.js"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,kCAvBW,MAAM,YACL,MAAM,UAoBN,QAAQ,EAAE,CAIrB;;;;;;;;QApDa,MAAM;;;;;;YACN,MAAM;;;;aAGN,MAAM;;;;;mBACN,MAAM;;;;;;;;oBAEN,MAAM;;;;;mBAKN,OAAO;;;;;UAEP,MAAM;;;;;;WAEN,OAAO;;;;aAGP,cAAc,EAAE;;6BAnChB,OAAO,WAAW,EAAE,cAAc"}
1
+ {"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../src/store/selectors.js"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,kCAvBW,MAAM,YACL,MAAM,UAoBN,QAAQ,EAAE,CAIrB;;;;;;;;QAnDa,MAAM;;;;;;YACN,MAAM;;;;aAGN,MAAM;;;;;mBACN,MAAM;;;;;;;;oBAEN,MAAM;;;;;mBAKN,OAAO;;;;;UAEP,MAAM;;;;;;WAEN,OAAO;;;;aAGP,cAAc,EAAE;;6BAnChB,OAAO,WAAW,EAAE,cAAc"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/notices",
3
- "version": "4.7.0",
3
+ "version": "4.8.0",
4
4
  "description": "State management for notices.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -27,11 +27,14 @@
27
27
  "types": "build-types",
28
28
  "dependencies": {
29
29
  "@babel/runtime": "^7.16.0",
30
- "@wordpress/a11y": "^3.39.0",
31
- "@wordpress/data": "^9.9.0"
30
+ "@wordpress/a11y": "^3.40.0",
31
+ "@wordpress/data": "^9.10.0"
32
+ },
33
+ "peerDependencies": {
34
+ "react": "^18.0.0"
32
35
  },
33
36
  "publishConfig": {
34
37
  "access": "public"
35
38
  },
36
- "gitHead": "b898cf1dc8e70841d1647ea0994ac6278acc18a7"
39
+ "gitHead": "78a288d55b83a713b2f7d98d5a855c0771a2afc6"
37
40
  }
@@ -11,7 +11,6 @@ import { DEFAULT_CONTEXT, DEFAULT_STATUS } from './constants';
11
11
  * browser navigation.
12
12
  * @property {?Function} onClick Optional function to invoke when action is
13
13
  * triggered by user.
14
- *
15
14
  */
16
15
 
17
16
  let uniqueId = 0;
@@ -39,7 +39,6 @@ const DEFAULT_NOTICES = [];
39
39
  * announced to screen readers. Defaults to
40
40
  * `true`.
41
41
  * @property {WPNoticeAction[]} actions User actions to present with notice.
42
- *
43
42
  */
44
43
 
45
44
  /**
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../element/node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/scheduler/tracing.d.ts","../element/node_modules/@types/react/index.d.ts","../element/build-types/react.d.ts","../element/build-types/create-interpolate-element.d.ts","../../node_modules/@types/react/index.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/@types/react-dom/client.d.ts","../element/build-types/react-platform.d.ts","../element/build-types/utils.d.ts","../element/build-types/platform.d.ts","../element/build-types/serialize.d.ts","../element/build-types/raw-html.d.ts","../element/build-types/index.d.ts","../data/build-types/components/with-select/index.d.ts","../data/build-types/components/with-dispatch/index.d.ts","../data/build-types/components/with-registry/index.d.ts","../../node_modules/redux/index.d.ts","../data/build-types/types.d.ts","../data/build-types/components/use-dispatch/use-dispatch.d.ts","../data/build-types/components/use-dispatch/use-dispatch-with-map.d.ts","../data/build-types/components/use-dispatch/index.d.ts","../data/build-types/components/async-mode-provider/use-async-mode.d.ts","../data/build-types/components/async-mode-provider/context.d.ts","../data/build-types/components/async-mode-provider/index.d.ts","../data/build-types/registry.d.ts","../data/build-types/controls.d.ts","../data/build-types/redux-store/index.d.ts","../data/build-types/dispatch.d.ts","../data/build-types/select.d.ts","../data/build-types/plugins/persistence/index.d.ts","../data/build-types/plugins/index.d.ts","../data/build-types/components/registry-provider/use-registry.d.ts","../data/build-types/components/registry-provider/context.d.ts","../data/build-types/components/registry-provider/index.d.ts","../data/build-types/components/use-select/index.d.ts","../data/build-types/factory.d.ts","../data/build-types/index.d.ts","./src/store/utils/on-sub-key.js","./src/store/reducer.js","./src/store/constants.js","./src/store/actions.js","./src/store/selectors.js","./src/store/index.js","./src/index.js","../a11y/build-types/index.d.ts","./src/store/controls.js","../../typings/gutenberg-env/index.d.ts","../../node_modules/@types/react/global.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},{"version":"bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"5917af4ff931b050dba49a1dedd9c00f15f7b3dc4345ad8491bfacd2ec68ed32","affectsGlobalScope":true},"14ed49cb68f29e36dfb562b7c382ce70d467b7310e8e27cc587772d029f372b7","ab6f9c23c44e0b20c2be80af46ffc9d0e6681efa05ee1704bb4c9fcef8e61497",{"version":"5917af4ff931b050dba49a1dedd9c00f15f7b3dc4345ad8491bfacd2ec68ed32","affectsGlobalScope":true},"e4dd91dd4789a109aab51d8a0569a282369fcda9ba6f2b2297bc61bacfb1a042","83e27bbd7304ea67f9afa1535f1d4fdb15866089f0d893c784cbb5b1c6fb3386","c4b39848e2fb237507a7acae0b83a34271c9d72714faae6a6b9075527205111b","d2d9e98a2b167079474768593e1e7125fc3db055add8fbdb5977e3d05a8a3696","6462da67490105ba7d98cf312c2faf8794c425781128b161ea8394d66502eec8","62359da52b6c8d00c50c2e50738fac82e902f916fdf458d8159e7edb1c60c3a8","1e0ac21bc775686383ea8c8e48bd98b385e6195b25c85525a7affd08a2cd38b9","0449615e1ed03c7d54fc435a63b7ef0cb4e5cea5ac40c9a63280a46f7eeae0ff","f647358d9c48f01ca886cf4e022a31cbc9f84a5706cd85df656b0b8e3ec118eb","3e04bd7b52acb9c393909520bc6bf74989ed3cb8cee63c9ae88e20467a8f02d9","a958d081d81c1194d1878b28f081d0144d95f4e36c6b375e357cb982e8b40705",{"version":"8f19251323456195ec9236df857bac3b8f97b73b540ef06ead2ceccc3884954f","affectsGlobalScope":true},"e22fef80128b275bd9098debe2dea313c1492bd3fbb48651bfe4f939d0c94f05","e3e12de1cc9a3f289b1ea267336edf625260cdaa50a3dbb33b61fc58e5a792c7","d23aeb9ad9955d3b6df7a972355dd465aaa0f7b8c223834f9499585b75f2ab04","cf000108177216c2ffd9962c785dfe0eb36306b14817894115be2d8f470552d6","61937532d01a86bc9f9847e016305cec9b5a716db5a630a0c37049a477d18f60","c792ecb733fc79337b7b497d3298dc31217f0f2b944ade255037dea871915353","61e8a34952f23c48deff3e85e982b1b3a600d15fb4d3b7c07a9096505ad2c35c","4fe57f4d9ea10f6069813ca18818838ce21258f42e79f898b4fb7860ce0c58ca","1e525db7ea2d7369211b74756f1034e4219134c3c99c0e147998caf43b10e017","45390dd6a52b4929c8c20a131237eca530cdb9cc0b3486495cb452ba231f5bfa","63372ca52d40ee7e0263b6f22339b0a0617b7436ec3965e13239a01455258484","b16d8125f0987eeddb3cc3278272324e8f6a3d2608d92f5fbb20908c89bb1d71","d2c8976d6e6874ce159fc31c8511fffde72dcdf230394750ea4ef3c02a32e52e","fb6fa5434ecf7670f3dba36bced663afe875282d1231fb3ae95eeedae85ce4cf","e4cb6f9e4d40f538e26c72cc81ebd8ebae3317f940f39696e30d1381f36e5a0a","30289252a73fce7ff4b88369c829ed1f8533ccc028c55b264fc96fb576ffdd6a","3f473bb1c974b627227610013561332ea2f8e6eed0e86e87eaef96b6146d28c8","ce5bdb993fed19ff6f8a7a9ae3dd2fbe650c45c6552e7fe33e24bc4c51363b81","c8bd10b6cdcb527ce859b9c5b4b6168f270cec11cb051cc77eb4dead206b5e0f","5298c28f30d0a401464fccc5ea2e620c381a9b75bc4bbc0fb1557468ea077ead",{"version":"f2826236122014bd16973ab7849482d448c80093b8fc52c157df9c3866cbe289","signature":"ce7ffbddb9bb9f620d1f13ba84c9ef672e982556ad05dbd574b39b13cbf12af8"},{"version":"d672859cce98709e6f8e8d866d7ea30bdb103eb298027b55bff7927454f17eea","signature":"8cd75268d6d413038d764da8d35fa3828a2d782df84982a95ff951231bef59de"},{"version":"be5f60dac6d1a7bf083d585a766b3622bdc2776baa7f3951d13db56fccdd981e","signature":"6dd6e32523e3027be07af56705521d59d933661f2b52f3235c5bb969f1943562"},{"version":"56602ecd2bbbe1fa83cc7f7654be87a7e0c758eb60107a71987da4050182c2b1","signature":"e7acc24edd380b4d4fd8158223381aec4fb8753b0ddf970545d8211c768a303f"},{"version":"d4639f0c84a68794e342c1b8bf3c82fbb40368ff6fa184b4a4e13a2186188d79","signature":"13261509c8b90cf17d981050f4d0735625eb3be8f74ad0d3f0fafcf3d9d04be0"},{"version":"be794c27e7da2f411ec46fbb65ec156a7d1f86fe705ab78636e087451a0e0216","signature":"03ec60de068e21597a2b1c7c2b270c9c48da82c4c6b17cba4afffeb5f5830902"},{"version":"9740d100bf2f102a458086b57767ef6a16895ac3587e902666abed1f012fe300","signature":"81a18789776f52e86306fe133335102bd04f9f0cc52d9e52f9c4fa53394f43a4"},"628892c81712740099899916d35460c1e8552c7246db3b3b0cafb309735555de",{"version":"07252f048ee1ed29f5202040d7e2afc939a27e0d0d4292e01ea2b49f4682f146","signature":"5b290b95cdcc0133deaed18862ee0c7d7508df2d7b4e2175f97fc82b69b924f2"},{"version":"084d8b571b1e8b984824263889aabc2c37d29b49f7cbab3e4ebd05e4c02891eb","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"importsNotUsedAsValues":2,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[60],[57,58,59,106],[80,81],[60,83],[90,91],[77,78],[76],[71],[72,73,74,76,79,82,83,84,85,86,87,89,92,93,94],[88],[83],[75],[61],[61,62,66,67,68,69,70],[64,65],[60,61],[56,57,58,59],[101],[98],[103],[95,97,99,100],[96],[98,99],[99]],"referencedMap":[[65,1],[64,1],[63,2],[81,1],[82,3],[91,4],[92,5],[79,6],[77,7],[93,7],[73,8],[74,1],[72,8],[84,7],[86,7],[95,9],[89,10],[88,11],[85,7],[83,7],[87,7],[76,12],[62,13],[71,14],[70,1],[66,15],[61,1],[69,16],[60,17],[102,18],[99,19],[104,20],[101,21],[97,22],[100,23]],"exportedModulesMap":[[65,1],[64,1],[63,2],[81,1],[82,3],[91,4],[92,5],[79,6],[77,7],[93,7],[73,8],[74,1],[72,8],[84,7],[86,7],[95,9],[89,10],[88,11],[85,7],[83,7],[87,7],[76,12],[62,13],[71,14],[70,1],[66,15],[61,1],[69,16],[60,17],[101,7],[100,24]],"semanticDiagnosticsPerFile":[58,65,64,63,59,57,75,11,13,12,2,14,15,16,17,18,19,20,21,3,4,25,22,23,24,26,27,28,5,29,30,31,32,6,36,33,34,35,37,7,38,43,44,39,40,41,42,8,48,45,46,47,49,9,50,51,52,53,54,1,10,55,103,81,82,80,91,92,90,79,78,77,93,73,74,72,84,86,94,95,89,88,85,83,87,76,62,71,68,70,66,61,69,67,56,60,102,99,98,104,101,97,100,96,105],"latestChangedDtsFile":"./build-types/store/controls.d.ts"},"version":"4.9.5"}
1
+ {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/scheduler/tracing.d.ts","../../node_modules/@types/react/index.d.ts","../element/build-types/react.d.ts","../element/build-types/create-interpolate-element.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/@types/react-dom/client.d.ts","../element/build-types/react-platform.d.ts","../element/build-types/utils.d.ts","../element/build-types/platform.d.ts","../element/build-types/serialize.d.ts","../element/build-types/raw-html.d.ts","../element/build-types/index.d.ts","../data/build-types/components/with-select/index.d.ts","../data/build-types/components/with-dispatch/index.d.ts","../data/build-types/components/with-registry/index.d.ts","../../node_modules/redux/index.d.ts","../data/build-types/types.d.ts","../data/build-types/components/use-dispatch/use-dispatch.d.ts","../data/build-types/components/use-dispatch/use-dispatch-with-map.d.ts","../data/build-types/components/use-dispatch/index.d.ts","../data/build-types/components/async-mode-provider/use-async-mode.d.ts","../data/build-types/components/async-mode-provider/context.d.ts","../data/build-types/components/async-mode-provider/index.d.ts","../data/build-types/registry.d.ts","../data/build-types/controls.d.ts","../data/build-types/redux-store/index.d.ts","../data/build-types/dispatch.d.ts","../data/build-types/select.d.ts","../data/build-types/plugins/persistence/index.d.ts","../data/build-types/plugins/index.d.ts","../data/build-types/components/registry-provider/use-registry.d.ts","../data/build-types/components/registry-provider/context.d.ts","../data/build-types/components/registry-provider/index.d.ts","../data/build-types/components/use-select/index.d.ts","../data/build-types/factory.d.ts","../data/build-types/index.d.ts","./src/store/utils/on-sub-key.js","./src/store/reducer.js","./src/store/constants.js","./src/store/actions.js","./src/store/selectors.js","./src/store/index.js","./src/index.js","../a11y/build-types/index.d.ts","./src/store/controls.js","../../typings/gutenberg-env/index.d.ts"],"fileInfos":[{"version":"f59215c5f1d886b05395ee7aca73e0ac69ddfad2843aa88530e797879d511bad","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","f4e736d6c8d69ae5b3ab0ddfcaa3dc365c3e76909d6660af5b4e979b3934ac20","eeeb3aca31fbadef8b82502484499dfd1757204799a6f5b33116201c810676ec",{"version":"3dda5344576193a4ae48b8d03f105c86f20b2f2aff0a1d1fd7935f5d68649654","affectsGlobalScope":true},{"version":"9d9885c728913c1d16e0d2831b40341d6ad9a0ceecaabc55209b306ad9c736a5","affectsGlobalScope":true},{"version":"17bea081b9c0541f39dd1ae9bc8c78bdd561879a682e60e2f25f688c0ecab248","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"f06948deb2a51aae25184561c9640fb66afeddb34531a9212d011792b1d19e0a","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"61ed9b6d07af959e745fb11f9593ecd743b279418cc8a99448ea3cd5f3b3eb22","affectsGlobalScope":true},{"version":"038a2f66a34ee7a9c2fbc3584c8ab43dff2995f8c68e3f566f4c300d2175e31e","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8","affectsGlobalScope":true},{"version":"930b0e15811f84e203d3c23508674d5ded88266df4b10abee7b31b2ac77632d2","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"25de46552b782d43cb7284df22fe2a265de387cf0248b747a7a1b647d81861f6","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f","affectsGlobalScope":true},"4c68749a564a6facdf675416d75789ee5a557afda8960e0803cf6711fa569288","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"5917af4ff931b050dba49a1dedd9c00f15f7b3dc4345ad8491bfacd2ec68ed32","affectsGlobalScope":true},"dafd74bcff368ce1a07ee99d42fe2f8868743ae46fd47208eebd7c8ba8bbff86","9448cecc866cbdbe522f6152b6645e3e36aaee8f276d04e6c8bed83193b12c73","e4dd91dd4789a109aab51d8a0569a282369fcda9ba6f2b2297bc61bacfb1a042","83e27bbd7304ea67f9afa1535f1d4fdb15866089f0d893c784cbb5b1c6fb3386","472c14cdec534a465e866b6e1feee2d4e0d89c15fdc33ba80ff034fa0e80f3c1","4d807d55c784b72f71c092c34c84d09b95c29500c30252538fd5cf9a0a788c0e","df43a3968118d4b16618d7a0ac8ba89337fcce3c39e39984087ac34bf0cf250c","69ae15cf7f64219db1d1585f0ec791ee14b48d07e4fb453e80137b84e0a8c3a0","582f001c48a6204fd6bb5c6c71b36adc5256078c0ac3686b99db59cbb724ca73","af88a0b0f808a6721401550621bfe67c46c6fd55000305058e7c73600d119a9b","d628659c9f4df17c9f47205600cd27ca34327b6f49c03c3a92ba35194ba5358d","6f82e9d16b584ec9127bcccd8ce9311e587652acb36657458f9174ccaec7b354","e3fa7ffb42258b9fc94b57a2547b30cd2abc69ce64a9031c6e27197a62c9c333",{"version":"8f19251323456195ec9236df857bac3b8f97b73b540ef06ead2ceccc3884954f","affectsGlobalScope":true},"b87862101a0bc834b490d40f203e7550d38ba119fbb4b7cf1a3fe5d62e3aa62d","a895daacc14309d96555463210644d8e2aceef5d57346ce1bb513f8cdfabd393","7f1be7e4a47f9abe89d28793e59d0d7a935c7f14a597f1e2b6651d1e54f23957","39f82ec23c92368df0de1449bb26e14280862e092ab8e3eaacf80570ac35a7f2","92deca0757666c0db63066e8307e28452fed66d809d5c1ef0554b0475e3b098b","496a712363ee622ead98319bdf81471e550993b83529174068fce0f0e2db1615","1a4f84d939445c350647adf2f5001ecc6fcef110b6daa79c11b3aa7c9984d0e1","0c37cfbb515ee4df942133efa11132b16e9a3c8b2bf70f602337756d0783918b","8c2a4bbd3555d93ed90e0c99548acc2b32c260cddafecec4b4cd454c1424ad1e","ff76b8ba80b70f157bd235558599e13355a81b640c270e1f504cfb5b0c5b23fa","acc5e4fc8f5c67e0ec0b0e70a9aa47e928b4bf45439ca592309cbc1592764d4a","e7b7ca1fbfddbe67a3736393a170a4fe8d2929cdde754c08e4db38a03869ec94","829868d6ec1927e4700983dba2e0835327ecdd4d7f99072a3de19fda116551b4","0daf72d81e292312f185c81a2ad0648b226433a00d7d139addc06d39d078b2f1","4a9216f87f9b92167b0b18cd90016000e71dd7ea61a95385b2b97be6585e9cb3","90b78b57b0842bd1fd5ec099a97cfb33146e6d2d52dd68d8a89ae834105ab366","9798502506a30b631a4841a0c5e4dd369c8662c2ab08bf069fb464262cd9d9f8","887dc6c82444f5c7f3da9c1914b74a13bb46ca0f218deda5ea25d9fda2bef1b6","9481c72104c81bcf6384d66fec925883e1cfc251ec79911b224c020402fcca43","292ce5a17ff2c76cea97f425a55a9cf3e7ea2b97de64e34f96e499fa3c32fd58",{"version":"f2826236122014bd16973ab7849482d448c80093b8fc52c157df9c3866cbe289","signature":"ce7ffbddb9bb9f620d1f13ba84c9ef672e982556ad05dbd574b39b13cbf12af8"},{"version":"d672859cce98709e6f8e8d866d7ea30bdb103eb298027b55bff7927454f17eea","signature":"8cd75268d6d413038d764da8d35fa3828a2d782df84982a95ff951231bef59de"},{"version":"be5f60dac6d1a7bf083d585a766b3622bdc2776baa7f3951d13db56fccdd981e","signature":"6dd6e32523e3027be07af56705521d59d933661f2b52f3235c5bb969f1943562"},{"version":"3e2a840985ee6ca2f7a9c4353b2a402cf0a4d8d0847548c4f104425e7bd99816","signature":"e7acc24edd380b4d4fd8158223381aec4fb8753b0ddf970545d8211c768a303f"},{"version":"94d67b40b1b430492341fd1f60a31012dbc60641beea183daa7e6fcf7f9fef5d","signature":"9bc5960befcac4086f139ff0f3f3fb09cdde486bf68ee6c7e563efd8bddb1222"},{"version":"be794c27e7da2f411ec46fbb65ec156a7d1f86fe705ab78636e087451a0e0216","signature":"fa581d9b2af25bb4313f8c473cf7075e8fbddb6a5f4a2ec282b458c555072da9"},{"version":"9740d100bf2f102a458086b57767ef6a16895ac3587e902666abed1f012fe300","signature":"81a18789776f52e86306fe133335102bd04f9f0cc52d9e52f9c4fa53394f43a4"},"934232109defba5ca40966f6e3ac2a92874fd0a3db8352adbf82fefa1575aa2c",{"version":"07252f048ee1ed29f5202040d7e2afc939a27e0d0d4292e01ea2b49f4682f146","signature":"5b290b95cdcc0133deaed18862ee0c7d7508df2d7b4e2175f97fc82b69b924f2"},{"version":"084d8b571b1e8b984824263889aabc2c37d29b49f7cbab3e4ebd05e4c02891eb","affectsGlobalScope":true}],"root":[[100,106],108],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[65],[61,62,63,64],[84,85],[65,87],[94,95],[81,82],[80],[75],[76,77,78,80,83,86,87,88,89,90,91,93,96,97,98],[92],[87],[79],[66],[66,67,70,71,72,73,74],[68,69],[65,66],[105],[102],[107],[99,101,103,104],[100],[102,103],[103]],"referencedMap":[[69,1],[68,1],[65,2],[85,1],[86,3],[95,4],[96,5],[83,6],[81,7],[97,7],[77,8],[78,1],[76,8],[88,7],[90,7],[99,9],[93,10],[92,11],[89,7],[87,7],[91,7],[80,12],[67,13],[75,14],[74,1],[70,15],[66,1],[73,16],[106,17],[103,18],[108,19],[105,20],[101,21],[104,22]],"exportedModulesMap":[[69,1],[68,1],[65,2],[85,1],[86,3],[95,4],[96,5],[83,6],[81,7],[97,7],[77,8],[78,1],[76,8],[88,7],[90,7],[99,9],[93,10],[92,11],[89,7],[87,7],[91,7],[80,12],[67,13],[75,14],[74,1],[70,15],[66,1],[73,16],[105,7],[104,23]],"semanticDiagnosticsPerFile":[63,69,68,61,65,64,62,79,59,60,12,14,13,2,15,16,17,18,19,20,21,22,3,4,26,23,24,25,27,28,29,5,30,31,32,33,6,37,34,35,36,38,7,39,44,45,40,41,42,43,8,49,46,47,48,50,9,51,52,53,56,54,55,57,10,1,11,58,107,85,86,84,95,96,94,83,82,81,97,77,78,76,88,90,98,99,93,92,89,87,91,80,67,75,72,74,70,66,73,71,106,103,102,108,105,101,104,100,109],"latestChangedDtsFile":"./build-types/store/controls.d.ts"},"version":"5.1.6"}