@wordpress/interface 4.3.1 → 4.5.1

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.
@@ -1,89 +1,90 @@
1
1
  /**
2
- * Returns an action object used in signalling that an active area should be changed.
3
- *
4
- * @param {string} itemType Type of item.
5
- * @param {string} scope Item scope.
6
- * @param {string} item Item identifier.
7
- *
8
- * @return {Object} Action object.
2
+ * WordPress dependencies
9
3
  */
10
- function setSingleEnableItem(itemType, scope, item) {
11
- return {
12
- type: 'SET_SINGLE_ENABLE_ITEM',
13
- itemType,
14
- scope,
15
- item
16
- };
17
- }
4
+ import deprecated from '@wordpress/deprecated';
5
+ import { store as preferencesStore } from '@wordpress/preferences';
18
6
  /**
19
- * Returns an action object used in signalling that a complementary item should be enabled.
7
+ * Enable the complementary area.
20
8
  *
21
9
  * @param {string} scope Complementary area scope.
22
10
  * @param {string} area Area identifier.
23
- *
24
- * @return {Object} Action object.
25
11
  */
26
12
 
13
+ export const enableComplementaryArea = (scope, area) => _ref => {
14
+ let {
15
+ registry
16
+ } = _ref;
27
17
 
28
- export function enableComplementaryArea(scope, area) {
29
- return setSingleEnableItem('complementaryArea', scope, area);
30
- }
18
+ // Return early if there's no area.
19
+ if (!area) {
20
+ return;
21
+ }
22
+
23
+ registry.dispatch(preferencesStore).set(scope, 'complementaryArea', area);
24
+ };
31
25
  /**
32
- * Returns an action object used in signalling that the complementary area of a given scope should be disabled.
26
+ * Disable the complementary area.
33
27
  *
34
28
  * @param {string} scope Complementary area scope.
35
- *
36
- * @return {Object} Action object.
37
29
  */
38
30
 
39
- export function disableComplementaryArea(scope) {
40
- return setSingleEnableItem('complementaryArea', scope, undefined);
41
- }
31
+ export const disableComplementaryArea = scope => _ref2 => {
32
+ let {
33
+ registry
34
+ } = _ref2;
35
+ registry.dispatch(preferencesStore).set(scope, 'complementaryArea', null);
36
+ };
42
37
  /**
43
- * Returns an action object to make an area enabled/disabled.
38
+ * Pins an item.
44
39
  *
45
- * @param {string} itemType Type of item.
46
- * @param {string} scope Item scope.
47
- * @param {string} item Item identifier.
48
- * @param {boolean} isEnable Boolean indicating if an area should be pinned or not.
40
+ * @param {string} scope Item scope.
41
+ * @param {string} item Item identifier.
49
42
  *
50
43
  * @return {Object} Action object.
51
44
  */
52
45
 
53
- function setMultipleEnableItem(itemType, scope, item, isEnable) {
54
- return {
55
- type: 'SET_MULTIPLE_ENABLE_ITEM',
56
- itemType,
57
- scope,
58
- item,
59
- isEnable
60
- };
61
- }
62
- /**
63
- * Returns an action object used in signalling that an item should be pinned.
64
- *
65
- * @param {string} scope Item scope.
66
- * @param {string} itemId Item identifier.
67
- *
68
- * @return {Object} Action object.
69
- */
46
+ export const pinItem = (scope, item) => _ref3 => {
47
+ let {
48
+ registry
49
+ } = _ref3;
70
50
 
51
+ // Return early if there's no item.
52
+ if (!item) {
53
+ return;
54
+ }
71
55
 
72
- export function pinItem(scope, itemId) {
73
- return setMultipleEnableItem('pinnedItems', scope, itemId, true);
74
- }
56
+ const pinnedItems = registry.select(preferencesStore).get(scope, 'pinnedItems'); // The item is already pinned, there's nothing to do.
57
+
58
+ if ((pinnedItems === null || pinnedItems === void 0 ? void 0 : pinnedItems[item]) === true) {
59
+ return;
60
+ }
61
+
62
+ registry.dispatch(preferencesStore).set(scope, 'pinnedItems', { ...pinnedItems,
63
+ [item]: true
64
+ });
65
+ };
75
66
  /**
76
- * Returns an action object used in signalling that an item should be unpinned.
67
+ * Unpins an item.
77
68
  *
78
- * @param {string} scope Item scope.
79
- * @param {string} itemId Item identifier.
80
- *
81
- * @return {Object} Action object.
69
+ * @param {string} scope Item scope.
70
+ * @param {string} item Item identifier.
82
71
  */
83
72
 
84
- export function unpinItem(scope, itemId) {
85
- return setMultipleEnableItem('pinnedItems', scope, itemId, false);
86
- }
73
+ export const unpinItem = (scope, item) => _ref4 => {
74
+ let {
75
+ registry
76
+ } = _ref4;
77
+
78
+ // Return early if there's no item.
79
+ if (!item) {
80
+ return;
81
+ }
82
+
83
+ const pinnedItems = registry.select(preferencesStore).get(scope, 'pinnedItems');
84
+ registry.dispatch(preferencesStore).set(scope, 'pinnedItems', { ...pinnedItems,
85
+ [item]: false
86
+ });
87
+ };
87
88
  /**
88
89
  * Returns an action object used in signalling that a feature should be toggled.
89
90
  *
@@ -92,13 +93,15 @@ export function unpinItem(scope, itemId) {
92
93
  */
93
94
 
94
95
  export function toggleFeature(scope, featureName) {
95
- return function (_ref) {
96
+ return function (_ref5) {
96
97
  let {
97
- select,
98
- dispatch
99
- } = _ref;
100
- const currentValue = select.isFeatureActive(scope, featureName);
101
- dispatch.setFeatureValue(scope, featureName, !currentValue);
98
+ registry
99
+ } = _ref5;
100
+ deprecated(`wp.dispatch( 'core/interface' ).toggleFeature`, {
101
+ since: '6.0',
102
+ alternative: `wp.dispatch( 'core/preferences' ).toggle`
103
+ });
104
+ registry.dispatch(preferencesStore).toggle(scope, featureName);
102
105
  };
103
106
  }
104
107
  /**
@@ -113,11 +116,15 @@ export function toggleFeature(scope, featureName) {
113
116
  */
114
117
 
115
118
  export function setFeatureValue(scope, featureName, value) {
116
- return {
117
- type: 'SET_FEATURE_VALUE',
118
- scope,
119
- featureName,
120
- value: !!value
119
+ return function (_ref6) {
120
+ let {
121
+ registry
122
+ } = _ref6;
123
+ deprecated(`wp.dispatch( 'core/interface' ).setFeatureValue`, {
124
+ since: '6.0',
125
+ alternative: `wp.dispatch( 'core/preferences' ).set`
126
+ });
127
+ registry.dispatch(preferencesStore).set(scope, featureName, !!value);
121
128
  };
122
129
  }
123
130
  /**
@@ -130,10 +137,15 @@ export function setFeatureValue(scope, featureName, value) {
130
137
  */
131
138
 
132
139
  export function setFeatureDefaults(scope, defaults) {
133
- return {
134
- type: 'SET_FEATURE_DEFAULTS',
135
- scope,
136
- defaults
140
+ return function (_ref7) {
141
+ let {
142
+ registry
143
+ } = _ref7;
144
+ deprecated(`wp.dispatch( 'core/interface' ).setFeatureDefaults`, {
145
+ since: '6.0',
146
+ alternative: `wp.dispatch( 'core/preferences' ).setDefaults`
147
+ });
148
+ registry.dispatch(preferencesStore).setDefaults(scope, defaults);
137
149
  };
138
150
  }
139
151
  //# sourceMappingURL=actions.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/interface/src/store/actions.js"],"names":["setSingleEnableItem","itemType","scope","item","type","enableComplementaryArea","area","disableComplementaryArea","undefined","setMultipleEnableItem","isEnable","pinItem","itemId","unpinItem","toggleFeature","featureName","select","dispatch","currentValue","isFeatureActive","setFeatureValue","value","setFeatureDefaults","defaults"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,mBAAT,CAA8BC,QAA9B,EAAwCC,KAAxC,EAA+CC,IAA/C,EAAsD;AACrD,SAAO;AACNC,IAAAA,IAAI,EAAE,wBADA;AAENH,IAAAA,QAFM;AAGNC,IAAAA,KAHM;AAINC,IAAAA;AAJM,GAAP;AAMA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,SAASE,uBAAT,CAAkCH,KAAlC,EAAyCI,IAAzC,EAAgD;AACtD,SAAON,mBAAmB,CAAE,mBAAF,EAAuBE,KAAvB,EAA8BI,IAA9B,CAA1B;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,wBAAT,CAAmCL,KAAnC,EAA2C;AACjD,SAAOF,mBAAmB,CAAE,mBAAF,EAAuBE,KAAvB,EAA8BM,SAA9B,CAA1B;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,qBAAT,CAAgCR,QAAhC,EAA0CC,KAA1C,EAAiDC,IAAjD,EAAuDO,QAAvD,EAAkE;AACjE,SAAO;AACNN,IAAAA,IAAI,EAAE,0BADA;AAENH,IAAAA,QAFM;AAGNC,IAAAA,KAHM;AAINC,IAAAA,IAJM;AAKNO,IAAAA;AALM,GAAP;AAOA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,SAASC,OAAT,CAAkBT,KAAlB,EAAyBU,MAAzB,EAAkC;AACxC,SAAOH,qBAAqB,CAAE,aAAF,EAAiBP,KAAjB,EAAwBU,MAAxB,EAAgC,IAAhC,CAA5B;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,SAAT,CAAoBX,KAApB,EAA2BU,MAA3B,EAAoC;AAC1C,SAAOH,qBAAqB,CAAE,aAAF,EAAiBP,KAAjB,EAAwBU,MAAxB,EAAgC,KAAhC,CAA5B;AACA;AAED;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASE,aAAT,CAAwBZ,KAAxB,EAA+Ba,WAA/B,EAA6C;AACnD,SAAO,gBAAkC;AAAA,QAAvB;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV,KAAuB;AACxC,UAAMC,YAAY,GAAGF,MAAM,CAACG,eAAP,CAAwBjB,KAAxB,EAA+Ba,WAA/B,CAArB;AACAE,IAAAA,QAAQ,CAACG,eAAT,CAA0BlB,KAA1B,EAAiCa,WAAjC,EAA8C,CAAEG,YAAhD;AACA,GAHD;AAIA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASE,eAAT,CAA0BlB,KAA1B,EAAiCa,WAAjC,EAA8CM,KAA9C,EAAsD;AAC5D,SAAO;AACNjB,IAAAA,IAAI,EAAE,mBADA;AAENF,IAAAA,KAFM;AAGNa,IAAAA,WAHM;AAINM,IAAAA,KAAK,EAAE,CAAC,CAAEA;AAJJ,GAAP;AAMA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,kBAAT,CAA6BpB,KAA7B,EAAoCqB,QAApC,EAA+C;AACrD,SAAO;AACNnB,IAAAA,IAAI,EAAE,sBADA;AAENF,IAAAA,KAFM;AAGNqB,IAAAA;AAHM,GAAP;AAKA","sourcesContent":["/**\n * Returns an action object used in signalling that an active area should be changed.\n *\n * @param {string} itemType Type of item.\n * @param {string} scope Item scope.\n * @param {string} item Item identifier.\n *\n * @return {Object} Action object.\n */\nfunction setSingleEnableItem( itemType, scope, item ) {\n\treturn {\n\t\ttype: 'SET_SINGLE_ENABLE_ITEM',\n\t\titemType,\n\t\tscope,\n\t\titem,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that a complementary item should be enabled.\n *\n * @param {string} scope Complementary area scope.\n * @param {string} area Area identifier.\n *\n * @return {Object} Action object.\n */\nexport function enableComplementaryArea( scope, area ) {\n\treturn setSingleEnableItem( 'complementaryArea', scope, area );\n}\n\n/**\n * Returns an action object used in signalling that the complementary area of a given scope should be disabled.\n *\n * @param {string} scope Complementary area scope.\n *\n * @return {Object} Action object.\n */\nexport function disableComplementaryArea( scope ) {\n\treturn setSingleEnableItem( 'complementaryArea', scope, undefined );\n}\n\n/**\n * Returns an action object to make an area enabled/disabled.\n *\n * @param {string} itemType Type of item.\n * @param {string} scope Item scope.\n * @param {string} item Item identifier.\n * @param {boolean} isEnable Boolean indicating if an area should be pinned or not.\n *\n * @return {Object} Action object.\n */\nfunction setMultipleEnableItem( itemType, scope, item, isEnable ) {\n\treturn {\n\t\ttype: 'SET_MULTIPLE_ENABLE_ITEM',\n\t\titemType,\n\t\tscope,\n\t\titem,\n\t\tisEnable,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that an item should be pinned.\n *\n * @param {string} scope Item scope.\n * @param {string} itemId Item identifier.\n *\n * @return {Object} Action object.\n */\nexport function pinItem( scope, itemId ) {\n\treturn setMultipleEnableItem( 'pinnedItems', scope, itemId, true );\n}\n\n/**\n * Returns an action object used in signalling that an item should be unpinned.\n *\n * @param {string} scope Item scope.\n * @param {string} itemId Item identifier.\n *\n * @return {Object} Action object.\n */\nexport function unpinItem( scope, itemId ) {\n\treturn setMultipleEnableItem( 'pinnedItems', scope, itemId, false );\n}\n\n/**\n * Returns an action object used in signalling that a feature should be toggled.\n *\n * @param {string} scope The feature scope (e.g. core/edit-post).\n * @param {string} featureName The feature name.\n */\nexport function toggleFeature( scope, featureName ) {\n\treturn function ( { select, dispatch } ) {\n\t\tconst currentValue = select.isFeatureActive( scope, featureName );\n\t\tdispatch.setFeatureValue( scope, featureName, ! currentValue );\n\t};\n}\n\n/**\n * Returns an action object used in signalling that a feature should be set to\n * a true or false value\n *\n * @param {string} scope The feature scope (e.g. core/edit-post).\n * @param {string} featureName The feature name.\n * @param {boolean} value The value to set.\n *\n * @return {Object} Action object.\n */\nexport function setFeatureValue( scope, featureName, value ) {\n\treturn {\n\t\ttype: 'SET_FEATURE_VALUE',\n\t\tscope,\n\t\tfeatureName,\n\t\tvalue: !! value,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that defaults should be set for features.\n *\n * @param {string} scope The feature scope (e.g. core/edit-post).\n * @param {Object<string, boolean>} defaults A key/value map of feature names to values.\n *\n * @return {Object} Action object.\n */\nexport function setFeatureDefaults( scope, defaults ) {\n\treturn {\n\t\ttype: 'SET_FEATURE_DEFAULTS',\n\t\tscope,\n\t\tdefaults,\n\t};\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/interface/src/store/actions.js"],"names":["deprecated","store","preferencesStore","enableComplementaryArea","scope","area","registry","dispatch","set","disableComplementaryArea","pinItem","item","pinnedItems","select","get","unpinItem","toggleFeature","featureName","since","alternative","toggle","setFeatureValue","value","setFeatureDefaults","defaults","setDefaults"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,uBAAvB;AACA,SAASC,KAAK,IAAIC,gBAAlB,QAA0C,wBAA1C;AAEA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,uBAAuB,GAAG,CAAEC,KAAF,EAASC,IAAT,KAAmB,QAAoB;AAAA,MAAlB;AAAEC,IAAAA;AAAF,GAAkB;;AAC7E;AACA,MAAK,CAAED,IAAP,EAAc;AACb;AACA;;AAEDC,EAAAA,QAAQ,CACNC,QADF,CACYL,gBADZ,EAEEM,GAFF,CAEOJ,KAFP,EAEc,mB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D,KAAxD,CAAV;AAKAb,IAAAA,QAAQ,CAACC,QAAT,CAAmBL,gBAAnB,EAAsCuB,WAAtC,CAAmDrB,KAAnD,EAA0DoB,QAA1D;AACA,GAPD;AAQA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Enable the complementary area.\n *\n * @param {string} scope Complementary area scope.\n * @param {string} area Area identifier.\n */\nexport const enableComplementaryArea = ( scope, area ) => ( { registry } ) => {\n\t// Return early if there's no area.\n\tif ( ! area ) {\n\t\treturn;\n\t}\n\n\tregistry\n\t\t.dispatch( preferencesStore )\n\t\t.set( scope, 'complementaryArea', area );\n};\n\n/**\n * Disable the complementary area.\n *\n * @param {string} scope Complementary area scope.\n */\nexport const disableComplementaryArea = ( scope ) => ( { registry } ) => {\n\tregistry\n\t\t.dispatch( preferencesStore )\n\t\t.set( scope, 'complementaryArea', null );\n};\n\n/**\n * Pins an item.\n *\n * @param {string} scope Item scope.\n * @param {string} item Item identifier.\n *\n * @return {Object} Action object.\n */\nexport const pinItem = ( scope, item ) => ( { registry } ) => {\n\t// Return early if there's no item.\n\tif ( ! item ) {\n\t\treturn;\n\t}\n\n\tconst pinnedItems = registry\n\t\t.select( preferencesStore )\n\t\t.get( scope, 'pinnedItems' );\n\n\t// The item is already pinned, there's nothing to do.\n\tif ( pinnedItems?.[ item ] === true ) {\n\t\treturn;\n\t}\n\n\tregistry.dispatch( preferencesStore ).set( scope, 'pinnedItems', {\n\t\t...pinnedItems,\n\t\t[ item ]: true,\n\t} );\n};\n\n/**\n * Unpins an item.\n *\n * @param {string} scope Item scope.\n * @param {string} item Item identifier.\n */\nexport const unpinItem = ( scope, item ) => ( { registry } ) => {\n\t// Return early if there's no item.\n\tif ( ! item ) {\n\t\treturn;\n\t}\n\n\tconst pinnedItems = registry\n\t\t.select( preferencesStore )\n\t\t.get( scope, 'pinnedItems' );\n\n\tregistry.dispatch( preferencesStore ).set( scope, 'pinnedItems', {\n\t\t...pinnedItems,\n\t\t[ item ]: false,\n\t} );\n};\n\n/**\n * Returns an action object used in signalling that a feature should be toggled.\n *\n * @param {string} scope The feature scope (e.g. core/edit-post).\n * @param {string} featureName The feature name.\n */\nexport function toggleFeature( scope, featureName ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated( `wp.dispatch( 'core/interface' ).toggleFeature`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `wp.dispatch( 'core/preferences' ).toggle`,\n\t\t} );\n\n\t\tregistry.dispatch( preferencesStore ).toggle( scope, featureName );\n\t};\n}\n\n/**\n * Returns an action object used in signalling that a feature should be set to\n * a true or false value\n *\n * @param {string} scope The feature scope (e.g. core/edit-post).\n * @param {string} featureName The feature name.\n * @param {boolean} value The value to set.\n *\n * @return {Object} Action object.\n */\nexport function setFeatureValue( scope, featureName, value ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated( `wp.dispatch( 'core/interface' ).setFeatureValue`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `wp.dispatch( 'core/preferences' ).set`,\n\t\t} );\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( scope, featureName, !! value );\n\t};\n}\n\n/**\n * Returns an action object used in signalling that defaults should be set for features.\n *\n * @param {string} scope The feature scope (e.g. core/edit-post).\n * @param {Object<string, boolean>} defaults A key/value map of feature names to values.\n *\n * @return {Object} Action object.\n */\nexport function setFeatureDefaults( scope, defaults ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated( `wp.dispatch( 'core/interface' ).setFeatureDefaults`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `wp.dispatch( 'core/preferences' ).setDefaults`,\n\t\t} );\n\n\t\tregistry.dispatch( preferencesStore ).setDefaults( scope, defaults );\n\t};\n}\n"]}
@@ -1,21 +1,14 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { createReduxStore, registerStore } from '@wordpress/data';
4
+ import { createReduxStore, register } from '@wordpress/data';
5
5
  /**
6
6
  * Internal dependencies
7
7
  */
8
8
 
9
- import reducer from './reducer';
10
9
  import * as actions from './actions';
11
10
  import * as selectors from './selectors';
12
11
  import { STORE_NAME } from './constants';
13
- const storeConfig = {
14
- reducer,
15
- actions,
16
- selectors,
17
- persist: ['enableItems', 'preferences']
18
- };
19
12
  /**
20
13
  * Store definition for the interface namespace.
21
14
  *
@@ -24,8 +17,12 @@ const storeConfig = {
24
17
  * @type {Object}
25
18
  */
26
19
 
27
- export const store = createReduxStore(STORE_NAME, storeConfig); // Once we build a more generic persistence plugin that works across types of stores
20
+ export const store = createReduxStore(STORE_NAME, {
21
+ reducer: () => {},
22
+ actions,
23
+ selectors
24
+ }); // Once we build a more generic persistence plugin that works across types of stores
28
25
  // we'd be able to replace this with a register call.
29
26
 
30
- registerStore(STORE_NAME, storeConfig);
27
+ register(store);
31
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/interface/src/store/index.js"],"names":["createReduxStore","registerStore","reducer","actions","selectors","STORE_NAME","storeConfig","persist","store"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gBAAT,EAA2BC,aAA3B,QAAgD,iBAAhD;AAEA;AACA;AACA;;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAO,KAAKC,OAAZ,MAAyB,WAAzB;AACA,OAAO,KAAKC,SAAZ,MAA2B,aAA3B;AACA,SAASC,UAAT,QAA2B,aAA3B;AAEA,MAAMC,WAAW,GAAG;AACnBJ,EAAAA,OADmB;AAEnBC,EAAAA,OAFmB;AAGnBC,EAAAA,SAHmB;AAInBG,EAAAA,OAAO,EAAE,CAAE,aAAF,EAAiB,aAAjB;AAJU,CAApB;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,KAAK,GAAGR,gBAAgB,CAAEK,UAAF,EAAcC,WAAd,CAA9B,C,CAEP;AACA;;AACAL,aAAa,CAAEI,UAAF,EAAcC,WAAd,CAAb","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createReduxStore, registerStore } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as actions from './actions';\nimport * as selectors from './selectors';\nimport { STORE_NAME } from './constants';\n\nconst storeConfig = {\n\treducer,\n\tactions,\n\tselectors,\n\tpersist: [ 'enableItems', 'preferences' ],\n};\n\n/**\n * Store definition for the interface namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n *\n * @type {Object}\n */\nexport const store = createReduxStore( STORE_NAME, storeConfig );\n\n// Once we build a more generic persistence plugin that works across types of stores\n// we'd be able to replace this with a register call.\nregisterStore( STORE_NAME, storeConfig );\n"]}
1
+ {"version":3,"sources":["@wordpress/interface/src/store/index.js"],"names":["createReduxStore","register","actions","selectors","STORE_NAME","store","reducer"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gBAAT,EAA2BC,QAA3B,QAA2C,iBAA3C;AAEA;AACA;AACA;;AACA,OAAO,KAAKC,OAAZ,MAAyB,WAAzB;AACA,OAAO,KAAKC,SAAZ,MAA2B,aAA3B;AACA,SAASC,UAAT,QAA2B,aAA3B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,KAAK,GAAGL,gBAAgB,CAAEI,UAAF,EAAc;AAClDE,EAAAA,OAAO,EAAE,MAAM,CAAE,CADiC;AAElDJ,EAAAA,OAFkD;AAGlDC,EAAAA;AAHkD,CAAd,CAA9B,C,CAMP;AACA;;AACAF,QAAQ,CAAEI,KAAF,CAAR","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport * as actions from './actions';\nimport * as selectors from './selectors';\nimport { STORE_NAME } from './constants';\n\n/**\n * Store definition for the interface namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n *\n * @type {Object}\n */\nexport const store = createReduxStore( STORE_NAME, {\n\treducer: () => {},\n\tactions,\n\tselectors,\n} );\n\n// Once we build a more generic persistence plugin that works across types of stores\n// we'd be able to replace this with a register call.\nregister( store );\n"]}
@@ -1,20 +1,9 @@
1
1
  /**
2
- * External dependencies
2
+ * WordPress dependencies
3
3
  */
4
- import { get } from 'lodash';
5
- /**
6
- * Returns the item that is enabled in a given scope.
7
- *
8
- * @param {Object} state Global application state.
9
- * @param {string} itemType Type of item.
10
- * @param {string} scope Item scope.
11
- *
12
- * @return {?string|null} The item that is enabled in the passed scope and type.
13
- */
14
-
15
- function getSingleEnableItem(state, itemType, scope) {
16
- return get(state.enableItems.singleEnableItems, [itemType, scope]);
17
- }
4
+ import { createRegistrySelector } from '@wordpress/data';
5
+ import deprecated from '@wordpress/deprecated';
6
+ import { store as preferencesStore } from '@wordpress/preferences';
18
7
  /**
19
8
  * Returns the complementary area that is active in a given scope.
20
9
  *
@@ -24,24 +13,9 @@ function getSingleEnableItem(state, itemType, scope) {
24
13
  * @return {string} The complementary area that is active in the given scope.
25
14
  */
26
15
 
27
-
28
- export function getActiveComplementaryArea(state, scope) {
29
- return getSingleEnableItem(state, 'complementaryArea', scope);
30
- }
31
- /**
32
- * Returns a boolean indicating if an item is enabled or not in a given scope.
33
- *
34
- * @param {Object} state Global application state.
35
- * @param {string} itemType Type of item.
36
- * @param {string} scope Scope.
37
- * @param {string} item Item to check.
38
- *
39
- * @return {boolean|undefined} True if the item is enabled, false otherwise if the item is explicitly disabled, and undefined if there is no information for that item.
40
- */
41
-
42
- function isMultipleEnabledItemEnabled(state, itemType, scope, item) {
43
- return get(state.enableItems.multipleEnableItems, [itemType, scope, item]);
44
- }
16
+ export const getActiveComplementaryArea = createRegistrySelector(select => (state, scope) => {
17
+ return select(preferencesStore).get(scope, 'complementaryArea');
18
+ });
45
19
  /**
46
20
  * Returns a boolean indicating if an item is pinned or not.
47
21
  *
@@ -52,10 +26,12 @@ function isMultipleEnabledItemEnabled(state, itemType, scope, item) {
52
26
  * @return {boolean} True if the item is pinned and false otherwise.
53
27
  */
54
28
 
29
+ export const isItemPinned = createRegistrySelector(select => (state, scope, item) => {
30
+ var _pinnedItems$item;
55
31
 
56
- export function isItemPinned(state, scope, item) {
57
- return isMultipleEnabledItemEnabled(state, 'pinnedItems', scope, item) !== false;
58
- }
32
+ const pinnedItems = select(preferencesStore).get(scope, 'pinnedItems');
33
+ return (_pinnedItems$item = pinnedItems === null || pinnedItems === void 0 ? void 0 : pinnedItems[item]) !== null && _pinnedItems$item !== void 0 ? _pinnedItems$item : true;
34
+ });
59
35
  /**
60
36
  * Returns a boolean indicating whether a feature is active for a particular
61
37
  * scope.
@@ -67,11 +43,11 @@ export function isItemPinned(state, scope, item) {
67
43
  * @return {boolean} Is the feature enabled?
68
44
  */
69
45
 
70
- export function isFeatureActive(state, scope, featureName) {
71
- var _state$preferences$fe, _state$preferenceDefa;
72
-
73
- const featureValue = (_state$preferences$fe = state.preferences.features[scope]) === null || _state$preferences$fe === void 0 ? void 0 : _state$preferences$fe[featureName];
74
- const defaultedFeatureValue = featureValue !== undefined ? featureValue : (_state$preferenceDefa = state.preferenceDefaults.features[scope]) === null || _state$preferenceDefa === void 0 ? void 0 : _state$preferenceDefa[featureName];
75
- return !!defaultedFeatureValue;
76
- }
46
+ export const isFeatureActive = createRegistrySelector(select => (state, scope, featureName) => {
47
+ deprecated(`wp.select( 'core/interface' ).isFeatureActive( scope, featureName )`, {
48
+ since: '6.0',
49
+ alternative: `!! wp.select( 'core/preferences' ).isFeatureActive( scope, featureName )`
50
+ });
51
+ return !!select(preferencesStore).get(scope, featureName);
52
+ });
77
53
  //# sourceMappingURL=selectors.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/interface/src/store/selectors.js"],"names":["get","getSingleEnableItem","state","itemType","scope","enableItems","singleEnableItems","getActiveComplementaryArea","isMultipleEnabledItemEnabled","item","multipleEnableItems","isItemPinned","isFeatureActive","featureName","featureValue","preferences","features","defaultedFeatureValue","undefined","preferen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GAC1BH,YAAY,KAAKI,SAAjB,GACGJ,YADH,4BAEGZ,KAAK,CAACiB,kBAAN,CAAyBH,QAAzB,CAAmCZ,KAAnC,CAFH,0DAEG,sBAA8CS,WAA9C,CAHJ;AAKA,SAAO,CAAC,CAAEI,qBAAV;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport { get } from 'lodash';\n\n/**\n * Returns the item that is enabled in a given scope.\n *\n * @param {Object} state Global application state.\n * @param {string} itemType Type of item.\n * @param {string} scope Item scope.\n *\n * @return {?string|null} The item that is enabled in the passed scope and type.\n */\nfunction getSingleEnableItem( state, itemType, scope ) {\n\treturn get( state.enableItems.singleEnableItems, [ itemType, scope ] );\n}\n\n/**\n * Returns the complementary area that is active in a given scope.\n *\n * @param {Object} state Global application state.\n * @param {string} scope Item scope.\n *\n * @return {string} The complementary area that is active in the given scope.\n */\nexport function getActiveComplementaryArea( state, scope ) {\n\treturn getSingleEnableItem( state, 'complementaryArea', scope );\n}\n\n/**\n * Returns a boolean indicating if an item is enabled or not in a given scope.\n *\n * @param {Object} state Global application state.\n * @param {string} itemType Type of item.\n * @param {string} scope Scope.\n * @param {string} item Item to check.\n *\n * @return {boolean|undefined} True if the item is enabled, false otherwise if the item is explicitly disabled, and undefined if there is no information for that item.\n */\nfunction isMultipleEnabledItemEnabled( state, itemType, scope, item ) {\n\treturn get( state.enableItems.multipleEnableItems, [\n\t\titemType,\n\t\tscope,\n\t\titem,\n\t] );\n}\n\n/**\n * Returns a boolean indicating if an item is pinned or not.\n *\n * @param {Object} state Global application state.\n * @param {string} scope Scope.\n * @param {string} item Item to check.\n *\n * @return {boolean} True if the item is pinned and false otherwise.\n */\nexport function isItemPinned( state, scope, item ) {\n\treturn (\n\t\tisMultipleEnabledItemEnabled( state, 'pinnedItems', scope, item ) !==\n\t\tfalse\n\t);\n}\n\n/**\n * Returns a boolean indicating whether a feature is active for a particular\n * scope.\n *\n * @param {Object} state The store state.\n * @param {string} scope The scope of the feature (e.g. core/edit-post).\n * @param {string} featureName The name of the feature.\n *\n * @return {boolean} Is the feature enabled?\n */\nexport function isFeatureActive( state, scope, featureName ) {\n\tconst featureValue = state.preferences.features[ scope ]?.[ featureName ];\n\tconst defaultedFeatureValue =\n\t\tfeatureValue !== undefined\n\t\t\t? featureValue\n\t\t\t: state.preferenceDefaults.features[ scope ]?.[ featureName ];\n\n\treturn !! defaultedFeatureValue;\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/interface/src/store/selectors.js"],"names":["createRegistrySelector","deprecated","store","preferencesStore","getActiveComplementaryArea","select","state","scope","get","isItemPinned","item","pinnedItems","isFeatureActive","featureName","since","alternative"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,sBAAT,QAAuC,iBAAvC;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AACA,SAASC,KAAK,IAAIC,gBAAlB,QAA0C,wBAA1C;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,0BAA0B,GAAGJ,sBAAsB,CAC7DK,MAAF,IAAc,CAAEC,KAAF,EAASC,KAAT,KAAoB;AACjC,SAAOF,MAAM,CAAEF,gBAAF,CAAN,CAA2BK,GAA3B,CAAgCD,KAAhC,EAAuC,mBAAvC,CAAP;AACA,CAH8D,CAAzD;AAMP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAME,YAAY,GAAGT,sBAAsB,CAC/CK,MAAF,IAAc,CAAEC,KAAF,EAASC,KAAT,EAAgBG,IAAhB,KAA0B;AAAA;;AACvC,QAAMC,WAAW,GAAGN,MAAM,CAAEF,gBAAF,CAAN,CAA2BK,GAA3B,CACnBD,KADmB,EAEnB,aAFmB,CAApB;AAIA,8BAAOI,WAAP,aAAOA,WAAP,uBAAOA,WAAW,CAAID,IAAJ,CAAlB,iEAAgC,IAAhC;AACA,CAPgD,CAA3C;AAUP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAME,eAAe,GAAGZ,sBAAsB,CAClDK,MAAF,IAAc,CAAEC,KAAF,EAASC,KAAT,EAAgBM,WAAhB,KAAiC;AAC9CZ,EAAAA,UAAU,CACR,qEADQ,EAET;AACCa,IAAAA,KAAK,EAAE,KADR;AAECC,IAAAA,WAAW,EAAG;AAFf,GAFS,CAAV;AAQA,SAAO,CAAC,CAAEV,MAAM,CAAEF,gBAAF,CAAN,CAA2BK,GAA3B,CAAgCD,KAAhC,EAAuCM,WAAvC,CAAV;AACA,CAXmD,CAA9C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createRegistrySelector } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Returns the complementary area that is active in a given scope.\n *\n * @param {Object} state Global application state.\n * @param {string} scope Item scope.\n *\n * @return {string} The complementary area that is active in the given scope.\n */\nexport const getActiveComplementaryArea = createRegistrySelector(\n\t( select ) => ( state, scope ) => {\n\t\treturn select( preferencesStore ).get( scope, 'complementaryArea' );\n\t}\n);\n\n/**\n * Returns a boolean indicating if an item is pinned or not.\n *\n * @param {Object} state Global application state.\n * @param {string} scope Scope.\n * @param {string} item Item to check.\n *\n * @return {boolean} True if the item is pinned and false otherwise.\n */\nexport const isItemPinned = createRegistrySelector(\n\t( select ) => ( state, scope, item ) => {\n\t\tconst pinnedItems = select( preferencesStore ).get(\n\t\t\tscope,\n\t\t\t'pinnedItems'\n\t\t);\n\t\treturn pinnedItems?.[ item ] ?? true;\n\t}\n);\n\n/**\n * Returns a boolean indicating whether a feature is active for a particular\n * scope.\n *\n * @param {Object} state The store state.\n * @param {string} scope The scope of the feature (e.g. core/edit-post).\n * @param {string} featureName The name of the feature.\n *\n * @return {boolean} Is the feature enabled?\n */\nexport const isFeatureActive = createRegistrySelector(\n\t( select ) => ( state, scope, featureName ) => {\n\t\tdeprecated(\n\t\t\t`wp.select( 'core/interface' ).isFeatureActive( scope, featureName )`,\n\t\t\t{\n\t\t\t\tsince: '6.0',\n\t\t\t\talternative: `!! wp.select( 'core/preferences' ).isFeatureActive( scope, featureName )`,\n\t\t\t}\n\t\t);\n\n\t\treturn !! select( preferencesStore ).get( scope, featureName );\n\t}\n);\n"]}
@@ -304,7 +304,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
304
304
  display: flex;
305
305
  flex-direction: column;
306
306
  overflow: auto;
307
- z-index: 91;
307
+ z-index: 20;
308
308
  }
309
309
 
310
310
  .interface-interface-skeleton__secondary-sidebar,
@@ -304,7 +304,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
304
304
  display: flex;
305
305
  flex-direction: column;
306
306
  overflow: auto;
307
- z-index: 91;
307
+ z-index: 20;
308
308
  }
309
309
 
310
310
  .interface-interface-skeleton__secondary-sidebar,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/interface",
3
- "version": "4.3.1",
3
+ "version": "4.5.1",
4
4
  "description": "Interface module for WordPress. The package contains shared functionality across the modern JavaScript-based WordPress screens.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -32,15 +32,17 @@
32
32
  ],
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.16.0",
35
- "@wordpress/a11y": "^3.4.1",
36
- "@wordpress/components": "^19.6.1",
37
- "@wordpress/compose": "^5.2.1",
38
- "@wordpress/data": "^6.4.1",
39
- "@wordpress/element": "^4.2.1",
40
- "@wordpress/i18n": "^4.4.1",
41
- "@wordpress/icons": "^8.0.1",
42
- "@wordpress/plugins": "^4.2.1",
43
- "@wordpress/viewport": "^4.2.1",
35
+ "@wordpress/a11y": "^3.6.1",
36
+ "@wordpress/components": "^19.8.1",
37
+ "@wordpress/compose": "^5.4.1",
38
+ "@wordpress/data": "^6.6.1",
39
+ "@wordpress/deprecated": "^3.6.1",
40
+ "@wordpress/element": "^4.4.1",
41
+ "@wordpress/i18n": "^4.6.1",
42
+ "@wordpress/icons": "^8.2.1",
43
+ "@wordpress/plugins": "^4.4.1",
44
+ "@wordpress/preferences": "^1.2.1",
45
+ "@wordpress/viewport": "^4.4.1",
44
46
  "classnames": "^2.3.1",
45
47
  "lodash": "^4.17.21"
46
48
  },
@@ -51,5 +53,5 @@
51
53
  "publishConfig": {
52
54
  "access": "public"
53
55
  },
54
- "gitHead": "3494eafea7cb345728166c902b3d1223c4a8db6f"
56
+ "gitHead": "446565ecaa40370173c18926535e975ec5652b71"
55
57
  }