@wordpress/customize-widgets 4.17.0 → 4.17.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.
package/build/store/selectors.js
CHANGED
|
@@ -47,7 +47,7 @@ function isInserterOpened(state) {
|
|
|
47
47
|
* @return {Object} The root client ID and index to insert at.
|
|
48
48
|
*/
|
|
49
49
|
function __experimentalGetInsertionPoint(state) {
|
|
50
|
-
if (typeof state === 'boolean') {
|
|
50
|
+
if (typeof state.blockInserterPanel === 'boolean') {
|
|
51
51
|
return EMPTY_INSERTION_POINT;
|
|
52
52
|
}
|
|
53
53
|
return state.blockInserterPanel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["EMPTY_INSERTION_POINT","rootClientId","undefined","insertionIndex","isInserterOpened","state","blockInserterPanel","__experimentalGetInsertionPoint"],"sources":["@wordpress/customize-widgets/src/store/selectors.js"],"sourcesContent":["const EMPTY_INSERTION_POINT = {\n\trootClientId: undefined,\n\tinsertionIndex: undefined,\n};\n\n/**\n * Returns true if the inserter is opened.\n *\n * @param {Object} state Global application state.\n *\n * @example\n * ```js\n * import { store as customizeWidgetsStore } from '@wordpress/customize-widgets';\n * import { __ } from '@wordpress/i18n';\n * import { useSelect } from '@wordpress/data';\n *\n * const ExampleComponent = () => {\n * const { isInserterOpened } = useSelect(\n * ( select ) => select( customizeWidgetsStore ),\n * []\n * );\n *\n * return isInserterOpened()\n * ? __( 'Inserter is open' )\n * : __( 'Inserter is closed.' );\n * };\n * ```\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport function isInserterOpened( state ) {\n\treturn !! state.blockInserterPanel;\n}\n\n/**\n * Get the insertion point for the inserter.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID and index to insert at.\n */\nexport function __experimentalGetInsertionPoint( state ) {\n\tif ( typeof state === 'boolean' ) {\n\t\treturn EMPTY_INSERTION_POINT;\n\t}\n\n\treturn state.blockInserterPanel;\n}\n"],"mappings":";;;;;;;AAAA,MAAMA,qBAAqB,GAAG;EAC7BC,YAAY,EAAEC,SAAS;EACvBC,cAAc,EAAED;AACjB,CAAC;;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;AACO,SAASE,gBAAgBA,CAAEC,KAAK,EAAG;EACzC,OAAO,CAAC,CAAEA,KAAK,CAACC,kBAAkB;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,+BAA+BA,CAAEF,KAAK,EAAG;EACxD,IAAK,OAAOA,KAAK,KAAK,SAAS,EAAG;
|
|
1
|
+
{"version":3,"names":["EMPTY_INSERTION_POINT","rootClientId","undefined","insertionIndex","isInserterOpened","state","blockInserterPanel","__experimentalGetInsertionPoint"],"sources":["@wordpress/customize-widgets/src/store/selectors.js"],"sourcesContent":["const EMPTY_INSERTION_POINT = {\n\trootClientId: undefined,\n\tinsertionIndex: undefined,\n};\n\n/**\n * Returns true if the inserter is opened.\n *\n * @param {Object} state Global application state.\n *\n * @example\n * ```js\n * import { store as customizeWidgetsStore } from '@wordpress/customize-widgets';\n * import { __ } from '@wordpress/i18n';\n * import { useSelect } from '@wordpress/data';\n *\n * const ExampleComponent = () => {\n * const { isInserterOpened } = useSelect(\n * ( select ) => select( customizeWidgetsStore ),\n * []\n * );\n *\n * return isInserterOpened()\n * ? __( 'Inserter is open' )\n * : __( 'Inserter is closed.' );\n * };\n * ```\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport function isInserterOpened( state ) {\n\treturn !! state.blockInserterPanel;\n}\n\n/**\n * Get the insertion point for the inserter.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID and index to insert at.\n */\nexport function __experimentalGetInsertionPoint( state ) {\n\tif ( typeof state.blockInserterPanel === 'boolean' ) {\n\t\treturn EMPTY_INSERTION_POINT;\n\t}\n\n\treturn state.blockInserterPanel;\n}\n"],"mappings":";;;;;;;AAAA,MAAMA,qBAAqB,GAAG;EAC7BC,YAAY,EAAEC,SAAS;EACvBC,cAAc,EAAED;AACjB,CAAC;;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;AACO,SAASE,gBAAgBA,CAAEC,KAAK,EAAG;EACzC,OAAO,CAAC,CAAEA,KAAK,CAACC,kBAAkB;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,+BAA+BA,CAAEF,KAAK,EAAG;EACxD,IAAK,OAAOA,KAAK,CAACC,kBAAkB,KAAK,SAAS,EAAG;IACpD,OAAON,qBAAqB;EAC7B;EAEA,OAAOK,KAAK,CAACC,kBAAkB;AAChC"}
|
|
@@ -40,7 +40,7 @@ export function isInserterOpened(state) {
|
|
|
40
40
|
* @return {Object} The root client ID and index to insert at.
|
|
41
41
|
*/
|
|
42
42
|
export function __experimentalGetInsertionPoint(state) {
|
|
43
|
-
if (typeof state === 'boolean') {
|
|
43
|
+
if (typeof state.blockInserterPanel === 'boolean') {
|
|
44
44
|
return EMPTY_INSERTION_POINT;
|
|
45
45
|
}
|
|
46
46
|
return state.blockInserterPanel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["EMPTY_INSERTION_POINT","rootClientId","undefined","insertionIndex","isInserterOpened","state","blockInserterPanel","__experimentalGetInsertionPoint"],"sources":["@wordpress/customize-widgets/src/store/selectors.js"],"sourcesContent":["const EMPTY_INSERTION_POINT = {\n\trootClientId: undefined,\n\tinsertionIndex: undefined,\n};\n\n/**\n * Returns true if the inserter is opened.\n *\n * @param {Object} state Global application state.\n *\n * @example\n * ```js\n * import { store as customizeWidgetsStore } from '@wordpress/customize-widgets';\n * import { __ } from '@wordpress/i18n';\n * import { useSelect } from '@wordpress/data';\n *\n * const ExampleComponent = () => {\n * const { isInserterOpened } = useSelect(\n * ( select ) => select( customizeWidgetsStore ),\n * []\n * );\n *\n * return isInserterOpened()\n * ? __( 'Inserter is open' )\n * : __( 'Inserter is closed.' );\n * };\n * ```\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport function isInserterOpened( state ) {\n\treturn !! state.blockInserterPanel;\n}\n\n/**\n * Get the insertion point for the inserter.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID and index to insert at.\n */\nexport function __experimentalGetInsertionPoint( state ) {\n\tif ( typeof state === 'boolean' ) {\n\t\treturn EMPTY_INSERTION_POINT;\n\t}\n\n\treturn state.blockInserterPanel;\n}\n"],"mappings":"AAAA,MAAMA,qBAAqB,GAAG;EAC7BC,YAAY,EAAEC,SAAS;EACvBC,cAAc,EAAED;AACjB,CAAC;;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,OAAO,SAASE,gBAAgBA,CAAEC,KAAK,EAAG;EACzC,OAAO,CAAC,CAAEA,KAAK,CAACC,kBAAkB;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,+BAA+BA,CAAEF,KAAK,EAAG;EACxD,IAAK,OAAOA,KAAK,KAAK,SAAS,EAAG;
|
|
1
|
+
{"version":3,"names":["EMPTY_INSERTION_POINT","rootClientId","undefined","insertionIndex","isInserterOpened","state","blockInserterPanel","__experimentalGetInsertionPoint"],"sources":["@wordpress/customize-widgets/src/store/selectors.js"],"sourcesContent":["const EMPTY_INSERTION_POINT = {\n\trootClientId: undefined,\n\tinsertionIndex: undefined,\n};\n\n/**\n * Returns true if the inserter is opened.\n *\n * @param {Object} state Global application state.\n *\n * @example\n * ```js\n * import { store as customizeWidgetsStore } from '@wordpress/customize-widgets';\n * import { __ } from '@wordpress/i18n';\n * import { useSelect } from '@wordpress/data';\n *\n * const ExampleComponent = () => {\n * const { isInserterOpened } = useSelect(\n * ( select ) => select( customizeWidgetsStore ),\n * []\n * );\n *\n * return isInserterOpened()\n * ? __( 'Inserter is open' )\n * : __( 'Inserter is closed.' );\n * };\n * ```\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport function isInserterOpened( state ) {\n\treturn !! state.blockInserterPanel;\n}\n\n/**\n * Get the insertion point for the inserter.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID and index to insert at.\n */\nexport function __experimentalGetInsertionPoint( state ) {\n\tif ( typeof state.blockInserterPanel === 'boolean' ) {\n\t\treturn EMPTY_INSERTION_POINT;\n\t}\n\n\treturn state.blockInserterPanel;\n}\n"],"mappings":"AAAA,MAAMA,qBAAqB,GAAG;EAC7BC,YAAY,EAAEC,SAAS;EACvBC,cAAc,EAAED;AACjB,CAAC;;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,OAAO,SAASE,gBAAgBA,CAAEC,KAAK,EAAG;EACzC,OAAO,CAAC,CAAEA,KAAK,CAACC,kBAAkB;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,+BAA+BA,CAAEF,KAAK,EAAG;EACxD,IAAK,OAAOA,KAAK,CAACC,kBAAkB,KAAK,SAAS,EAAG;IACpD,OAAON,qBAAqB;EAC7B;EAEA,OAAOK,KAAK,CAACC,kBAAkB;AAChC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/customize-widgets",
|
|
3
|
-
"version": "4.17.
|
|
3
|
+
"version": "4.17.1",
|
|
4
4
|
"description": "Widgets blocks in Customizer Module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -24,26 +24,26 @@
|
|
|
24
24
|
"react-native": "src/index",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/runtime": "^7.16.0",
|
|
27
|
-
"@wordpress/block-editor": "^12.8.
|
|
28
|
-
"@wordpress/block-library": "^8.17.
|
|
29
|
-
"@wordpress/blocks": "^12.17.
|
|
30
|
-
"@wordpress/components": "^25.6.
|
|
31
|
-
"@wordpress/compose": "^6.17.
|
|
32
|
-
"@wordpress/core-data": "^6.17.
|
|
33
|
-
"@wordpress/data": "^9.10.
|
|
34
|
-
"@wordpress/dom": "^3.40.
|
|
35
|
-
"@wordpress/element": "^5.17.
|
|
36
|
-
"@wordpress/hooks": "^3.40.
|
|
37
|
-
"@wordpress/i18n": "^4.40.
|
|
38
|
-
"@wordpress/icons": "^9.31.
|
|
39
|
-
"@wordpress/interface": "^5.17.
|
|
40
|
-
"@wordpress/is-shallow-equal": "^4.40.
|
|
41
|
-
"@wordpress/keyboard-shortcuts": "^4.17.
|
|
42
|
-
"@wordpress/keycodes": "^3.40.
|
|
43
|
-
"@wordpress/media-utils": "^4.31.
|
|
44
|
-
"@wordpress/preferences": "^3.17.
|
|
45
|
-
"@wordpress/private-apis": "^0.22.
|
|
46
|
-
"@wordpress/widgets": "^3.17.
|
|
27
|
+
"@wordpress/block-editor": "^12.8.1",
|
|
28
|
+
"@wordpress/block-library": "^8.17.1",
|
|
29
|
+
"@wordpress/blocks": "^12.17.1",
|
|
30
|
+
"@wordpress/components": "^25.6.1",
|
|
31
|
+
"@wordpress/compose": "^6.17.1",
|
|
32
|
+
"@wordpress/core-data": "^6.17.1",
|
|
33
|
+
"@wordpress/data": "^9.10.1",
|
|
34
|
+
"@wordpress/dom": "^3.40.1",
|
|
35
|
+
"@wordpress/element": "^5.17.1",
|
|
36
|
+
"@wordpress/hooks": "^3.40.1",
|
|
37
|
+
"@wordpress/i18n": "^4.40.1",
|
|
38
|
+
"@wordpress/icons": "^9.31.1",
|
|
39
|
+
"@wordpress/interface": "^5.17.1",
|
|
40
|
+
"@wordpress/is-shallow-equal": "^4.40.1",
|
|
41
|
+
"@wordpress/keyboard-shortcuts": "^4.17.1",
|
|
42
|
+
"@wordpress/keycodes": "^3.40.1",
|
|
43
|
+
"@wordpress/media-utils": "^4.31.1",
|
|
44
|
+
"@wordpress/preferences": "^3.17.1",
|
|
45
|
+
"@wordpress/private-apis": "^0.22.1",
|
|
46
|
+
"@wordpress/widgets": "^3.17.1",
|
|
47
47
|
"classnames": "^2.3.1",
|
|
48
48
|
"fast-deep-equal": "^3.1.3"
|
|
49
49
|
},
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "bb1fbf87bb0f451744530fc6a85de2dff1263bed"
|
|
58
58
|
}
|
package/src/store/selectors.js
CHANGED
|
@@ -40,7 +40,7 @@ export function isInserterOpened( state ) {
|
|
|
40
40
|
* @return {Object} The root client ID and index to insert at.
|
|
41
41
|
*/
|
|
42
42
|
export function __experimentalGetInsertionPoint( state ) {
|
|
43
|
-
if ( typeof state === 'boolean' ) {
|
|
43
|
+
if ( typeof state.blockInserterPanel === 'boolean' ) {
|
|
44
44
|
return EMPTY_INSERTION_POINT;
|
|
45
45
|
}
|
|
46
46
|
|