@wordpress/edit-widgets 5.16.0 → 5.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/CHANGELOG.md +2 -0
- package/build/blocks/widget-area/edit/index.js +4 -16
- package/build/blocks/widget-area/edit/index.js.map +1 -1
- package/build/blocks/widget-area/edit/inner-blocks.js +5 -10
- package/build/blocks/widget-area/edit/inner-blocks.js.map +1 -1
- package/build/blocks/widget-area/edit/use-is-dragging-within.js +5 -10
- package/build/blocks/widget-area/edit/use-is-dragging-within.js.map +1 -1
- package/build/blocks/widget-area/index.js +0 -5
- package/build/blocks/widget-area/index.js.map +1 -1
- package/build/components/error-boundary/index.js +1 -15
- package/build/components/error-boundary/index.js.map +1 -1
- package/build/components/header/index.js +9 -32
- package/build/components/header/index.js.map +1 -1
- package/build/components/header/undo-redo/redo.js +3 -9
- package/build/components/header/undo-redo/redo.js.map +1 -1
- package/build/components/header/undo-redo/undo.js +3 -9
- package/build/components/header/undo-redo/undo.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +1 -2
- package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -9
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +4 -20
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +1 -6
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +1 -18
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/layout/index.js +2 -19
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/interface.js +5 -21
- package/build/components/layout/interface.js.map +1 -1
- package/build/components/layout/unsaved-changes-warning.js +0 -6
- package/build/components/layout/unsaved-changes-warning.js.map +1 -1
- package/build/components/more-menu/index.js +2 -17
- package/build/components/more-menu/index.js.map +1 -1
- package/build/components/more-menu/tools-more-menu-group.js +1 -5
- package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
- package/build/components/notices/index.js +1 -6
- package/build/components/notices/index.js.map +1 -1
- package/build/components/save-button/index.js +1 -7
- package/build/components/save-button/index.js.map +1 -1
- package/build/components/secondary-sidebar/index.js +1 -10
- package/build/components/secondary-sidebar/index.js.map +1 -1
- package/build/components/secondary-sidebar/inserter-sidebar.js +1 -11
- package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +6 -15
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/components/sidebar/index.js +12 -26
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar/widget-areas.js +1 -12
- package/build/components/sidebar/widget-areas.js.map +1 -1
- package/build/components/welcome-guide/index.js +3 -12
- package/build/components/welcome-guide/index.js.map +1 -1
- package/build/components/widget-areas-block-editor-content/index.js +1 -8
- package/build/components/widget-areas-block-editor-content/index.js.map +1 -1
- package/build/components/widget-areas-block-editor-provider/index.js +8 -23
- package/build/components/widget-areas-block-editor-provider/index.js.map +1 -1
- package/build/constants.js.map +1 -1
- package/build/filters/index.js +0 -1
- package/build/filters/index.js.map +1 -1
- package/build/filters/move-to-widget-area.js +3 -9
- package/build/filters/move-to-widget-area.js.map +1 -1
- package/build/filters/replace-media-upload.js +1 -3
- package/build/filters/replace-media-upload.js.map +1 -1
- package/build/hooks/use-last-selected-widget-area.js +5 -13
- package/build/hooks/use-last-selected-widget-area.js.map +1 -1
- package/build/hooks/use-widget-library-insertion-point.js +6 -14
- package/build/hooks/use-widget-library-insertion-point.js.map +1 -1
- package/build/index.js +6 -34
- package/build/index.js.map +1 -1
- package/build/lock-unlock.js +1 -2
- package/build/lock-unlock.js.map +1 -1
- package/build/store/actions.js +41 -79
- package/build/store/actions.js.map +1 -1
- package/build/store/constants.js +0 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/index.js +4 -15
- package/build/store/index.js.map +1 -1
- package/build/store/reducer.js +4 -16
- package/build/store/reducer.js.map +1 -1
- package/build/store/resolvers.js +1 -17
- package/build/store/resolvers.js.map +1 -1
- package/build/store/selectors.js +28 -49
- package/build/store/selectors.js.map +1 -1
- package/build/store/transformers.js +7 -16
- package/build/store/transformers.js.map +1 -1
- package/build/store/utils.js +7 -16
- package/build/store/utils.js.map +1 -1
- package/build-module/blocks/widget-area/edit/index.js +5 -8
- package/build-module/blocks/widget-area/edit/index.js.map +1 -1
- package/build-module/blocks/widget-area/edit/inner-blocks.js +6 -6
- package/build-module/blocks/widget-area/edit/inner-blocks.js.map +1 -1
- package/build-module/blocks/widget-area/edit/use-is-dragging-within.js +6 -9
- package/build-module/blocks/widget-area/edit/use-is-dragging-within.js.map +1 -1
- package/build-module/blocks/widget-area/index.js +1 -1
- package/build-module/blocks/widget-area/index.js.map +1 -1
- package/build-module/components/error-boundary/index.js +0 -9
- package/build-module/components/error-boundary/index.js.map +1 -1
- package/build-module/components/header/index.js +9 -17
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/header/undo-redo/redo.js +2 -2
- package/build-module/components/header/undo-redo/redo.js.map +1 -1
- package/build-module/components/header/undo-redo/undo.js +2 -2
- package/build-module/components/header/undo-redo/undo.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -6
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +5 -13
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -5
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +1 -10
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/layout/index.js +2 -8
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/interface.js +5 -9
- package/build-module/components/layout/interface.js.map +1 -1
- package/build-module/components/layout/unsaved-changes-warning.js +2 -3
- package/build-module/components/layout/unsaved-changes-warning.js.map +1 -1
- package/build-module/components/more-menu/index.js +2 -6
- package/build-module/components/more-menu/index.js.map +1 -1
- package/build-module/components/more-menu/tools-more-menu-group.js +0 -3
- package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -1
- package/build-module/components/notices/index.js +0 -3
- package/build-module/components/notices/index.js.map +1 -1
- package/build-module/components/save-button/index.js +1 -4
- package/build-module/components/save-button/index.js.map +1 -1
- package/build-module/components/secondary-sidebar/index.js +1 -6
- package/build-module/components/secondary-sidebar/index.js.map +1 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.js +1 -2
- package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +6 -7
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build-module/components/sidebar/index.js +13 -18
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar/widget-areas.js +1 -4
- package/build-module/components/sidebar/widget-areas.js.map +1 -1
- package/build-module/components/welcome-guide/index.js +3 -7
- package/build-module/components/welcome-guide/index.js.map +1 -1
- package/build-module/components/widget-areas-block-editor-content/index.js +1 -2
- package/build-module/components/widget-areas-block-editor-content/index.js.map +1 -1
- package/build-module/components/widget-areas-block-editor-provider/index.js +8 -7
- package/build-module/components/widget-areas-block-editor-provider/index.js.map +1 -1
- package/build-module/constants.js.map +1 -1
- package/build-module/filters/index.js.map +1 -1
- package/build-module/filters/move-to-widget-area.js +4 -4
- package/build-module/filters/move-to-widget-area.js.map +1 -1
- package/build-module/filters/replace-media-upload.js +0 -2
- package/build-module/filters/replace-media-upload.js.map +1 -1
- package/build-module/hooks/use-last-selected-widget-area.js +7 -9
- package/build-module/hooks/use-last-selected-widget-area.js.map +1 -1
- package/build-module/hooks/use-widget-library-insertion-point.js +6 -10
- package/build-module/hooks/use-widget-library-insertion-point.js.map +1 -1
- package/build-module/index.js +8 -20
- package/build-module/index.js.map +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/store/actions.js +43 -56
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/index.js +6 -6
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/reducer.js +5 -11
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/resolvers.js +3 -10
- package/build-module/store/resolvers.js.map +1 -1
- package/build-module/store/selectors.js +29 -38
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/transformers.js +8 -13
- package/build-module/store/transformers.js.map +1 -1
- package/build-module/store/utils.js +7 -7
- package/build-module/store/utils.js.map +1 -1
- package/build-style/style-rtl.css +14 -11
- package/build-style/style.css +14 -11
- package/package.json +28 -27
- package/src/components/keyboard-shortcut-help-modal/style.scss +0 -5
- package/src/components/widget-areas-block-editor-provider/index.js +3 -3
- package/src/index.js +0 -1
- package/src/store/selectors.js +10 -2
|
@@ -4,58 +4,59 @@
|
|
|
4
4
|
* @type {string}
|
|
5
5
|
*/
|
|
6
6
|
export const KIND = 'root';
|
|
7
|
+
|
|
7
8
|
/**
|
|
8
9
|
* "post type" of the navigation post.
|
|
9
10
|
*
|
|
10
11
|
* @type {string}
|
|
11
12
|
*/
|
|
12
|
-
|
|
13
13
|
export const WIDGET_AREA_ENTITY_TYPE = 'sidebar';
|
|
14
|
+
|
|
14
15
|
/**
|
|
15
16
|
* "post type" of the widget area post.
|
|
16
17
|
*
|
|
17
18
|
* @type {string}
|
|
18
19
|
*/
|
|
19
|
-
|
|
20
20
|
export const POST_TYPE = 'postType';
|
|
21
|
+
|
|
21
22
|
/**
|
|
22
23
|
* Builds an ID for a new widget area post.
|
|
23
24
|
*
|
|
24
25
|
* @param {number} widgetAreaId Widget area id.
|
|
25
26
|
* @return {string} An ID.
|
|
26
27
|
*/
|
|
27
|
-
|
|
28
28
|
export const buildWidgetAreaPostId = widgetAreaId => `widget-area-${widgetAreaId}`;
|
|
29
|
+
|
|
29
30
|
/**
|
|
30
31
|
* Builds an ID for a global widget areas post.
|
|
31
32
|
*
|
|
32
33
|
* @return {string} An ID.
|
|
33
34
|
*/
|
|
34
|
-
|
|
35
35
|
export const buildWidgetAreasPostId = () => `widget-areas`;
|
|
36
|
+
|
|
36
37
|
/**
|
|
37
38
|
* Builds a query to resolve sidebars.
|
|
38
39
|
*
|
|
39
40
|
* @return {Object} Query.
|
|
40
41
|
*/
|
|
41
|
-
|
|
42
42
|
export function buildWidgetAreasQuery() {
|
|
43
43
|
return {
|
|
44
44
|
per_page: -1
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
+
|
|
47
48
|
/**
|
|
48
49
|
* Builds a query to resolve widgets.
|
|
49
50
|
*
|
|
50
51
|
* @return {Object} Query.
|
|
51
52
|
*/
|
|
52
|
-
|
|
53
53
|
export function buildWidgetsQuery() {
|
|
54
54
|
return {
|
|
55
55
|
per_page: -1,
|
|
56
56
|
_embed: 'about'
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
+
|
|
59
60
|
/**
|
|
60
61
|
* Creates a stub post with given id and set of blocks. Used as a governing entity records
|
|
61
62
|
* for all widget areas.
|
|
@@ -64,7 +65,6 @@ export function buildWidgetsQuery() {
|
|
|
64
65
|
* @param {Array} blocks The list of blocks.
|
|
65
66
|
* @return {Object} A stub post object formatted in compliance with the data layer.
|
|
66
67
|
*/
|
|
67
|
-
|
|
68
68
|
export const createStubPost = (id, blocks) => ({
|
|
69
69
|
id,
|
|
70
70
|
slug: id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["KIND","WIDGET_AREA_ENTITY_TYPE","POST_TYPE","buildWidgetAreaPostId","widgetAreaId","buildWidgetAreasPostId","buildWidgetAreasQuery","per_page","buildWidgetsQuery","_embed","createStubPost","id","blocks","slug","status","type","meta"],"sources":["@wordpress/edit-widgets/src/store/utils.js"],"sourcesContent":["/**\n * \"Kind\" of the navigation post.\n *\n * @type {string}\n */\nexport const KIND = 'root';\n\n/**\n * \"post type\" of the navigation post.\n *\n * @type {string}\n */\nexport const WIDGET_AREA_ENTITY_TYPE = 'sidebar';\n\n/**\n * \"post type\" of the widget area post.\n *\n * @type {string}\n */\nexport const POST_TYPE = 'postType';\n\n/**\n * Builds an ID for a new widget area post.\n *\n * @param {number} widgetAreaId Widget area id.\n * @return {string} An ID.\n */\nexport const buildWidgetAreaPostId = ( widgetAreaId ) =>\n\t`widget-area-${ widgetAreaId }`;\n\n/**\n * Builds an ID for a global widget areas post.\n *\n * @return {string} An ID.\n */\nexport const buildWidgetAreasPostId = () => `widget-areas`;\n\n/**\n * Builds a query to resolve sidebars.\n *\n * @return {Object} Query.\n */\nexport function buildWidgetAreasQuery() {\n\treturn {\n\t\tper_page: -1,\n\t};\n}\n\n/**\n * Builds a query to resolve widgets.\n *\n * @return {Object} Query.\n */\nexport function buildWidgetsQuery() {\n\treturn {\n\t\tper_page: -1,\n\t\t_embed: 'about',\n\t};\n}\n\n/**\n * Creates a stub post with given id and set of blocks. Used as a governing entity records\n * for all widget areas.\n *\n * @param {string} id Post ID.\n * @param {Array} blocks The list of blocks.\n * @return {Object} A stub post object formatted in compliance with the data layer.\n */\nexport const createStubPost = ( id, blocks ) => ( {\n\tid,\n\tslug: id,\n\tstatus: 'draft',\n\ttype: 'page',\n\tblocks,\n\tmeta: {\n\t\twidgetAreaId: id,\n\t},\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,IAAI,GAAG,MAAM;;AAE1B;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,SAAS;;AAEhD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,SAAS,GAAG,UAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,qBAAqB,GAAKC,YAAY,IACjD,eAAeA,YAAc,EAAC;;AAEhC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAGA,CAAA,KAAO,cAAa;;AAE1D;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CAAA,EAAG;EACvC,OAAO;IACNC,QAAQ,EAAE,CAAC;EACZ,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAAA,EAAG;EACnC,OAAO;IACND,QAAQ,EAAE,CAAC,CAAC;IACZE,MAAM,EAAE;EACT,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAGA,CAAEC,EAAE,EAAEC,MAAM,MAAQ;EACjDD,EAAE;EACFE,IAAI,EAAEF,EAAE;EACRG,MAAM,EAAE,OAAO;EACfC,IAAI,EAAE,MAAM;EACZH,MAAM;EACNI,IAAI,EAAE;IACLZ,YAAY,EAAEO;EACf;AACD,CAAC,CAAE"}
|
|
@@ -320,6 +320,11 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
320
320
|
overflow: auto;
|
|
321
321
|
z-index: 20;
|
|
322
322
|
}
|
|
323
|
+
@media (min-width: 782px) {
|
|
324
|
+
.interface-interface-skeleton__content {
|
|
325
|
+
z-index: auto;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
323
328
|
|
|
324
329
|
.interface-interface-skeleton__secondary-sidebar,
|
|
325
330
|
.interface-interface-skeleton__sidebar {
|
|
@@ -466,21 +471,22 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
466
471
|
gap: 4px;
|
|
467
472
|
margin-left: -4px;
|
|
468
473
|
}
|
|
469
|
-
.interface-pinned-items .components-button:not(:first-child) {
|
|
470
|
-
display: none;
|
|
471
|
-
}
|
|
472
|
-
@media (min-width: 600px) {
|
|
473
|
-
.interface-pinned-items .components-button:not(:first-child) {
|
|
474
|
-
display: flex;
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
474
|
.interface-pinned-items .components-button {
|
|
475
|
+
display: none;
|
|
478
476
|
margin: 0;
|
|
479
477
|
}
|
|
478
|
+
.interface-pinned-items .components-button:nth-last-child(1), .interface-pinned-items .components-button:nth-last-child(2) {
|
|
479
|
+
display: flex;
|
|
480
|
+
}
|
|
480
481
|
.interface-pinned-items .components-button svg {
|
|
481
482
|
max-width: 24px;
|
|
482
483
|
max-height: 24px;
|
|
483
484
|
}
|
|
485
|
+
@media (min-width: 600px) {
|
|
486
|
+
.interface-pinned-items .components-button {
|
|
487
|
+
display: flex;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
484
490
|
|
|
485
491
|
@media (min-width: 600px) {
|
|
486
492
|
.interface-preferences-modal {
|
|
@@ -716,9 +722,6 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
|
|
|
716
722
|
.edit-widgets-keyboard-shortcut-help-modal__section {
|
|
717
723
|
margin: 0 0 2rem 0;
|
|
718
724
|
}
|
|
719
|
-
.edit-widgets-keyboard-shortcut-help-modal__main-shortcuts .edit-widgets-keyboard-shortcut-help-modal__shortcut-list {
|
|
720
|
-
margin-top: -25px;
|
|
721
|
-
}
|
|
722
725
|
.edit-widgets-keyboard-shortcut-help-modal__section-title {
|
|
723
726
|
font-size: 0.9rem;
|
|
724
727
|
font-weight: 600;
|
package/build-style/style.css
CHANGED
|
@@ -320,6 +320,11 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
320
320
|
overflow: auto;
|
|
321
321
|
z-index: 20;
|
|
322
322
|
}
|
|
323
|
+
@media (min-width: 782px) {
|
|
324
|
+
.interface-interface-skeleton__content {
|
|
325
|
+
z-index: auto;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
323
328
|
|
|
324
329
|
.interface-interface-skeleton__secondary-sidebar,
|
|
325
330
|
.interface-interface-skeleton__sidebar {
|
|
@@ -466,21 +471,22 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
466
471
|
gap: 4px;
|
|
467
472
|
margin-right: -4px;
|
|
468
473
|
}
|
|
469
|
-
.interface-pinned-items .components-button:not(:first-child) {
|
|
470
|
-
display: none;
|
|
471
|
-
}
|
|
472
|
-
@media (min-width: 600px) {
|
|
473
|
-
.interface-pinned-items .components-button:not(:first-child) {
|
|
474
|
-
display: flex;
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
474
|
.interface-pinned-items .components-button {
|
|
475
|
+
display: none;
|
|
478
476
|
margin: 0;
|
|
479
477
|
}
|
|
478
|
+
.interface-pinned-items .components-button:nth-last-child(1), .interface-pinned-items .components-button:nth-last-child(2) {
|
|
479
|
+
display: flex;
|
|
480
|
+
}
|
|
480
481
|
.interface-pinned-items .components-button svg {
|
|
481
482
|
max-width: 24px;
|
|
482
483
|
max-height: 24px;
|
|
483
484
|
}
|
|
485
|
+
@media (min-width: 600px) {
|
|
486
|
+
.interface-pinned-items .components-button {
|
|
487
|
+
display: flex;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
484
490
|
|
|
485
491
|
@media (min-width: 600px) {
|
|
486
492
|
.interface-preferences-modal {
|
|
@@ -716,9 +722,6 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
|
|
|
716
722
|
.edit-widgets-keyboard-shortcut-help-modal__section {
|
|
717
723
|
margin: 0 0 2rem 0;
|
|
718
724
|
}
|
|
719
|
-
.edit-widgets-keyboard-shortcut-help-modal__main-shortcuts .edit-widgets-keyboard-shortcut-help-modal__shortcut-list {
|
|
720
|
-
margin-top: -25px;
|
|
721
|
-
}
|
|
722
725
|
.edit-widgets-keyboard-shortcut-help-modal__section-title {
|
|
723
726
|
font-size: 0.9rem;
|
|
724
727
|
font-weight: 600;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-widgets",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.17.1",
|
|
4
4
|
"description": "Widgets Page module for WordPress..",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -27,31 +27,32 @@
|
|
|
27
27
|
"react-native": "src/index",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@babel/runtime": "^7.16.0",
|
|
30
|
-
"@wordpress/api-fetch": "^6.
|
|
31
|
-
"@wordpress/block-editor": "^12.
|
|
32
|
-
"@wordpress/block-library": "^8.
|
|
33
|
-
"@wordpress/blocks": "^12.
|
|
34
|
-
"@wordpress/components": "^25.
|
|
35
|
-
"@wordpress/compose": "^6.
|
|
36
|
-
"@wordpress/core-data": "^6.
|
|
37
|
-
"@wordpress/data": "^9.
|
|
38
|
-
"@wordpress/deprecated": "^3.
|
|
39
|
-
"@wordpress/dom": "^3.
|
|
40
|
-
"@wordpress/element": "^5.
|
|
41
|
-
"@wordpress/hooks": "^3.
|
|
42
|
-
"@wordpress/i18n": "^4.
|
|
43
|
-
"@wordpress/icons": "^9.
|
|
44
|
-
"@wordpress/interface": "^5.
|
|
45
|
-
"@wordpress/keyboard-shortcuts": "^4.
|
|
46
|
-
"@wordpress/keycodes": "^3.
|
|
47
|
-
"@wordpress/media-utils": "^4.
|
|
48
|
-
"@wordpress/notices": "^4.
|
|
49
|
-
"@wordpress/
|
|
50
|
-
"@wordpress/
|
|
51
|
-
"@wordpress/
|
|
52
|
-
"@wordpress/
|
|
53
|
-
"@wordpress/
|
|
54
|
-
"@wordpress/
|
|
30
|
+
"@wordpress/api-fetch": "^6.37.1",
|
|
31
|
+
"@wordpress/block-editor": "^12.8.1",
|
|
32
|
+
"@wordpress/block-library": "^8.17.1",
|
|
33
|
+
"@wordpress/blocks": "^12.17.1",
|
|
34
|
+
"@wordpress/components": "^25.6.1",
|
|
35
|
+
"@wordpress/compose": "^6.17.1",
|
|
36
|
+
"@wordpress/core-data": "^6.17.1",
|
|
37
|
+
"@wordpress/data": "^9.10.1",
|
|
38
|
+
"@wordpress/deprecated": "^3.40.1",
|
|
39
|
+
"@wordpress/dom": "^3.40.1",
|
|
40
|
+
"@wordpress/element": "^5.17.1",
|
|
41
|
+
"@wordpress/hooks": "^3.40.1",
|
|
42
|
+
"@wordpress/i18n": "^4.40.1",
|
|
43
|
+
"@wordpress/icons": "^9.31.1",
|
|
44
|
+
"@wordpress/interface": "^5.17.1",
|
|
45
|
+
"@wordpress/keyboard-shortcuts": "^4.17.1",
|
|
46
|
+
"@wordpress/keycodes": "^3.40.1",
|
|
47
|
+
"@wordpress/media-utils": "^4.31.1",
|
|
48
|
+
"@wordpress/notices": "^4.8.1",
|
|
49
|
+
"@wordpress/patterns": "^1.1.1",
|
|
50
|
+
"@wordpress/plugins": "^6.8.1",
|
|
51
|
+
"@wordpress/preferences": "^3.17.1",
|
|
52
|
+
"@wordpress/private-apis": "^0.22.1",
|
|
53
|
+
"@wordpress/reusable-blocks": "^4.17.1",
|
|
54
|
+
"@wordpress/url": "^3.41.1",
|
|
55
|
+
"@wordpress/widgets": "^3.17.1",
|
|
55
56
|
"classnames": "^2.3.1"
|
|
56
57
|
},
|
|
57
58
|
"peerDependencies": {
|
|
@@ -61,5 +62,5 @@
|
|
|
61
62
|
"publishConfig": {
|
|
62
63
|
"access": "public"
|
|
63
64
|
},
|
|
64
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "bb1fbf87bb0f451744530fc6a85de2dff1263bed"
|
|
65
66
|
}
|
|
@@ -3,11 +3,6 @@
|
|
|
3
3
|
margin: 0 0 2rem 0;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
&__main-shortcuts .edit-widgets-keyboard-shortcut-help-modal__shortcut-list {
|
|
7
|
-
// Push the shortcut to be flush with top modal header.
|
|
8
|
-
margin-top: -$grid-unit-30 -$border-width;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
6
|
&__section-title {
|
|
12
7
|
font-size: 0.9rem;
|
|
13
8
|
font-weight: 600;
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
CopyHandler,
|
|
16
16
|
privateApis as blockEditorPrivateApis,
|
|
17
17
|
} from '@wordpress/block-editor';
|
|
18
|
-
import {
|
|
18
|
+
import { privateApis as editPatternsPrivateApis } from '@wordpress/patterns';
|
|
19
19
|
import { ShortcutProvider } from '@wordpress/keyboard-shortcuts';
|
|
20
20
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
21
21
|
|
|
@@ -30,7 +30,7 @@ import { ALLOW_REUSABLE_BLOCKS } from '../../constants';
|
|
|
30
30
|
import { unlock } from '../../lock-unlock';
|
|
31
31
|
|
|
32
32
|
const { ExperimentalBlockEditorProvider } = unlock( blockEditorPrivateApis );
|
|
33
|
-
|
|
33
|
+
const { PatternsMenuItems } = unlock( editPatternsPrivateApis );
|
|
34
34
|
export default function WidgetAreasBlockEditorProvider( {
|
|
35
35
|
blockEditorSettings,
|
|
36
36
|
children,
|
|
@@ -112,7 +112,7 @@ export default function WidgetAreasBlockEditorProvider( {
|
|
|
112
112
|
{ ...props }
|
|
113
113
|
>
|
|
114
114
|
<CopyHandler>{ children }</CopyHandler>
|
|
115
|
-
<
|
|
115
|
+
<PatternsMenuItems rootClientId={ widgetAreaId } />
|
|
116
116
|
</ExperimentalBlockEditorProvider>
|
|
117
117
|
</SlotFillProvider>
|
|
118
118
|
</ShortcutProvider>
|
package/src/index.js
CHANGED
package/src/store/selectors.js
CHANGED
|
@@ -19,6 +19,11 @@ import {
|
|
|
19
19
|
} from './utils';
|
|
20
20
|
import { STORE_NAME as editWidgetsStoreName } from './constants';
|
|
21
21
|
|
|
22
|
+
const EMPTY_INSERTION_POINT = {
|
|
23
|
+
rootClientId: undefined,
|
|
24
|
+
insertionIndex: undefined,
|
|
25
|
+
};
|
|
26
|
+
|
|
22
27
|
/**
|
|
23
28
|
* Returns all API widgets.
|
|
24
29
|
*
|
|
@@ -254,8 +259,11 @@ export function isInserterOpened( state ) {
|
|
|
254
259
|
* @return {Object} The root client ID and index to insert at.
|
|
255
260
|
*/
|
|
256
261
|
export function __experimentalGetInsertionPoint( state ) {
|
|
257
|
-
|
|
258
|
-
|
|
262
|
+
if ( typeof state.blockInserterPanel === 'boolean' ) {
|
|
263
|
+
return EMPTY_INSERTION_POINT;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
return state.blockInserterPanel;
|
|
259
267
|
}
|
|
260
268
|
|
|
261
269
|
/**
|