@wordpress/notices 5.17.0 → 5.18.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.
package/CHANGELOG.md
CHANGED
package/build/store/reducer.js
CHANGED
@@ -1 +1 @@
|
|
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":"
|
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,GAAAC,OAAA,CAAAC,OAAA,GAEWb,OAAO","ignoreList":[]}
|
@@ -1 +1 @@
|
|
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":"
|
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","ignoreList":[]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@wordpress/notices",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.18.0",
|
4
4
|
"description": "State management for notices.",
|
5
5
|
"author": "The WordPress Contributors",
|
6
6
|
"license": "GPL-2.0-or-later",
|
@@ -29,8 +29,8 @@
|
|
29
29
|
"types": "build-types",
|
30
30
|
"dependencies": {
|
31
31
|
"@babel/runtime": "7.25.7",
|
32
|
-
"@wordpress/a11y": "^4.
|
33
|
-
"@wordpress/data": "^10.
|
32
|
+
"@wordpress/a11y": "^4.18.0",
|
33
|
+
"@wordpress/data": "^10.18.0"
|
34
34
|
},
|
35
35
|
"peerDependencies": {
|
36
36
|
"react": "^18.0.0"
|
@@ -38,5 +38,5 @@
|
|
38
38
|
"publishConfig": {
|
39
39
|
"access": "public"
|
40
40
|
},
|
41
|
-
"gitHead": "
|
41
|
+
"gitHead": "afe4fb333177642180ac020f1030c5685eab7183"
|
42
42
|
}
|