@wordpress/edit-widgets 6.52.0 → 6.54.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 +12 -0
- package/build/blocks/widget-area/edit/index.cjs.map +2 -2
- package/build/blocks/widget-area/edit/inner-blocks.cjs.map +2 -2
- package/build/blocks/widget-area/edit/use-is-dragging-within.cjs.map +2 -2
- package/build/blocks/widget-area/index.cjs.map +2 -2
- package/build/components/error-boundary/index.cjs.map +2 -2
- package/build/components/header/document-tools/index.cjs.map +2 -2
- package/build/components/header/index.cjs.map +2 -2
- package/build/components/header/undo-redo/redo.cjs.map +2 -2
- package/build/components/header/undo-redo/undo.cjs.map +2 -2
- package/build/components/keyboard-shortcut-help-modal/config.cjs.map +2 -2
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs.map +2 -2
- package/build/components/keyboard-shortcut-help-modal/index.cjs.map +2 -2
- package/build/components/keyboard-shortcut-help-modal/shortcut.cjs.map +2 -2
- package/build/components/keyboard-shortcuts/index.cjs.map +2 -2
- package/build/components/layout/index.cjs +20 -19
- package/build/components/layout/index.cjs.map +2 -2
- package/build/components/layout/interface.cjs.map +2 -2
- package/build/components/layout/unsaved-changes-warning.cjs.map +2 -2
- package/build/components/more-menu/index.cjs.map +2 -2
- package/build/components/more-menu/tools-more-menu-group.cjs.map +2 -2
- package/build/components/notices/index.cjs.map +2 -2
- package/build/components/save-button/index.cjs.map +2 -2
- package/build/components/secondary-sidebar/index.cjs.map +2 -2
- package/build/components/secondary-sidebar/inserter-sidebar.cjs.map +2 -2
- package/build/components/secondary-sidebar/list-view-sidebar.cjs +2 -4
- package/build/components/secondary-sidebar/list-view-sidebar.cjs.map +2 -2
- package/build/components/sidebar/index.cjs.map +2 -2
- package/build/components/sidebar/widget-areas.cjs.map +2 -2
- package/build/components/welcome-guide/index.cjs.map +2 -2
- package/build/components/widget-areas-block-editor-content/index.cjs.map +2 -2
- package/build/components/widget-areas-block-editor-provider/index.cjs +0 -3
- package/build/components/widget-areas-block-editor-provider/index.cjs.map +3 -3
- package/build/filters/index.cjs.map +2 -2
- package/build/filters/move-to-widget-area.cjs.map +2 -2
- package/build/filters/replace-media-upload.cjs.map +2 -2
- package/build/hooks/use-last-selected-widget-area.cjs.map +2 -2
- package/build/hooks/use-widget-library-insertion-point.cjs.map +2 -2
- package/build/index.cjs.map +2 -2
- package/build/lock-unlock.cjs.map +2 -2
- package/build/store/actions.cjs.map +2 -2
- package/build/store/index.cjs.map +2 -2
- package/build/store/reducer.cjs.map +2 -2
- package/build/store/resolvers.cjs.map +2 -2
- package/build/store/selectors.cjs.map +2 -2
- package/build/store/transformers.cjs.map +2 -2
- package/build-module/blocks/widget-area/edit/index.mjs.map +2 -2
- package/build-module/blocks/widget-area/edit/inner-blocks.mjs.map +2 -2
- package/build-module/blocks/widget-area/edit/use-is-dragging-within.mjs.map +2 -2
- package/build-module/blocks/widget-area/index.mjs.map +2 -2
- package/build-module/components/error-boundary/index.mjs.map +2 -2
- package/build-module/components/header/document-tools/index.mjs.map +2 -2
- package/build-module/components/header/index.mjs.map +2 -2
- package/build-module/components/header/undo-redo/redo.mjs.map +2 -2
- package/build-module/components/header/undo-redo/undo.mjs.map +2 -2
- package/build-module/components/keyboard-shortcut-help-modal/config.mjs.map +2 -2
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.mjs.map +2 -2
- package/build-module/components/keyboard-shortcut-help-modal/index.mjs.map +2 -2
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs.map +2 -2
- package/build-module/components/keyboard-shortcuts/index.mjs.map +2 -2
- package/build-module/components/layout/index.mjs +20 -19
- package/build-module/components/layout/index.mjs.map +2 -2
- package/build-module/components/layout/interface.mjs.map +2 -2
- package/build-module/components/layout/unsaved-changes-warning.mjs.map +2 -2
- package/build-module/components/more-menu/index.mjs.map +2 -2
- package/build-module/components/more-menu/tools-more-menu-group.mjs.map +2 -2
- package/build-module/components/notices/index.mjs.map +2 -2
- package/build-module/components/save-button/index.mjs.map +2 -2
- package/build-module/components/secondary-sidebar/index.mjs.map +2 -2
- package/build-module/components/secondary-sidebar/inserter-sidebar.mjs.map +2 -2
- package/build-module/components/secondary-sidebar/list-view-sidebar.mjs +2 -4
- package/build-module/components/secondary-sidebar/list-view-sidebar.mjs.map +2 -2
- package/build-module/components/sidebar/index.mjs.map +2 -2
- package/build-module/components/sidebar/widget-areas.mjs.map +2 -2
- package/build-module/components/welcome-guide/index.mjs.map +2 -2
- package/build-module/components/widget-areas-block-editor-content/index.mjs.map +2 -2
- package/build-module/components/widget-areas-block-editor-provider/index.mjs +0 -3
- package/build-module/components/widget-areas-block-editor-provider/index.mjs.map +2 -2
- package/build-module/filters/index.mjs.map +2 -2
- package/build-module/filters/move-to-widget-area.mjs.map +2 -2
- package/build-module/filters/replace-media-upload.mjs.map +2 -2
- package/build-module/hooks/use-last-selected-widget-area.mjs.map +2 -2
- package/build-module/hooks/use-widget-library-insertion-point.mjs.map +2 -2
- package/build-module/index.mjs.map +2 -2
- package/build-module/lock-unlock.mjs.map +2 -2
- package/build-module/store/actions.mjs.map +2 -2
- package/build-module/store/index.mjs.map +2 -2
- package/build-module/store/reducer.mjs.map +2 -2
- package/build-module/store/resolvers.mjs.map +2 -2
- package/build-module/store/selectors.mjs.map +2 -2
- package/build-module/store/transformers.mjs.map +2 -2
- package/build-style/style-rtl.css +8 -7
- package/build-style/style.css +8 -7
- package/package.json +32 -31
- package/src/blocks/widget-area/edit/index.js +0 -7
- package/src/blocks/widget-area/edit/inner-blocks.js +0 -11
- package/src/blocks/widget-area/edit/use-is-dragging-within.js +0 -3
- package/src/blocks/widget-area/index.js +0 -7
- package/src/components/error-boundary/index.js +0 -3
- package/src/components/error-boundary/test/error-boundary.js +0 -11
- package/src/components/header/document-tools/index.js +0 -7
- package/src/components/header/index.js +0 -7
- package/src/components/header/style.scss +2 -3
- package/src/components/header/undo-redo/redo.js +0 -3
- package/src/components/header/undo-redo/undo.js +0 -3
- package/src/components/keyboard-shortcut-help-modal/config.js +0 -3
- package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -7
- package/src/components/keyboard-shortcut-help-modal/index.js +0 -11
- package/src/components/keyboard-shortcut-help-modal/shortcut.js +0 -3
- package/src/components/keyboard-shortcuts/index.js +0 -7
- package/src/components/layout/index.js +21 -24
- package/src/components/layout/interface.js +0 -7
- package/src/components/layout/unsaved-changes-warning.js +0 -7
- package/src/components/more-menu/index.js +0 -7
- package/src/components/more-menu/tools-more-menu-group.js +0 -3
- package/src/components/notices/index.js +0 -3
- package/src/components/save-button/index.js +0 -7
- package/src/components/secondary-sidebar/index.js +0 -10
- package/src/components/secondary-sidebar/inserter-sidebar.js +0 -7
- package/src/components/secondary-sidebar/list-view-sidebar.js +2 -12
- package/src/components/sidebar/index.js +0 -11
- package/src/components/sidebar/widget-areas.js +0 -7
- package/src/components/welcome-guide/index.js +0 -7
- package/src/components/widget-areas-block-editor-content/index.js +0 -7
- package/src/components/widget-areas-block-editor-provider/index.js +0 -10
- package/src/filters/index.js +0 -3
- package/src/filters/move-to-widget-area.js +0 -8
- package/src/filters/replace-media-upload.js +0 -3
- package/src/hooks/use-last-selected-widget-area.js +0 -7
- package/src/hooks/use-widget-library-insertion-point.js +0 -7
- package/src/index.js +0 -7
- package/src/lock-unlock.js +0 -3
- package/src/store/actions.js +0 -7
- package/src/store/index.js +0 -7
- package/src/store/reducer.js +0 -3
- package/src/store/resolvers.js +0 -7
- package/src/store/selectors.js +0 -7
- package/src/store/test/reducer.js +0 -7
- package/src/store/test/selectors.js +0 -3
- package/src/store/transformers.js +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-widgets",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.54.0",
|
|
4
4
|
"description": "Widgets Page module for WordPress..",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -47,35 +47,36 @@
|
|
|
47
47
|
]
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@wordpress/
|
|
51
|
-
"@wordpress/
|
|
52
|
-
"@wordpress/
|
|
53
|
-
"@wordpress/block-
|
|
54
|
-
"@wordpress/
|
|
55
|
-
"@wordpress/
|
|
56
|
-
"@wordpress/
|
|
57
|
-
"@wordpress/
|
|
58
|
-
"@wordpress/data": "^
|
|
59
|
-
"@wordpress/
|
|
60
|
-
"@wordpress/
|
|
61
|
-
"@wordpress/
|
|
62
|
-
"@wordpress/
|
|
63
|
-
"@wordpress/
|
|
64
|
-
"@wordpress/
|
|
65
|
-
"@wordpress/
|
|
66
|
-
"@wordpress/
|
|
67
|
-
"@wordpress/
|
|
68
|
-
"@wordpress/
|
|
69
|
-
"@wordpress/
|
|
70
|
-
"@wordpress/
|
|
71
|
-
"@wordpress/
|
|
72
|
-
"@wordpress/
|
|
73
|
-
"@wordpress/
|
|
74
|
-
"@wordpress/
|
|
75
|
-
"@wordpress/
|
|
76
|
-
"@wordpress/
|
|
77
|
-
"@wordpress/
|
|
78
|
-
"@wordpress/
|
|
50
|
+
"@wordpress/admin-ui": "^2.9.0",
|
|
51
|
+
"@wordpress/api-fetch": "^7.54.0",
|
|
52
|
+
"@wordpress/base-styles": "^13.0.0",
|
|
53
|
+
"@wordpress/block-editor": "^17.0.0",
|
|
54
|
+
"@wordpress/block-library": "^10.5.0",
|
|
55
|
+
"@wordpress/blocks": "^15.27.0",
|
|
56
|
+
"@wordpress/components": "^40.0.0",
|
|
57
|
+
"@wordpress/compose": "^8.7.0",
|
|
58
|
+
"@wordpress/core-data": "^7.54.0",
|
|
59
|
+
"@wordpress/data": "^10.54.0",
|
|
60
|
+
"@wordpress/deprecated": "^4.54.0",
|
|
61
|
+
"@wordpress/dom": "^4.54.0",
|
|
62
|
+
"@wordpress/element": "^8.6.0",
|
|
63
|
+
"@wordpress/hooks": "^4.54.0",
|
|
64
|
+
"@wordpress/i18n": "^6.27.0",
|
|
65
|
+
"@wordpress/icons": "^15.5.0",
|
|
66
|
+
"@wordpress/interface": "^10.0.0",
|
|
67
|
+
"@wordpress/keyboard-shortcuts": "^5.54.0",
|
|
68
|
+
"@wordpress/keycodes": "^4.54.0",
|
|
69
|
+
"@wordpress/media-utils": "^5.54.0",
|
|
70
|
+
"@wordpress/notices": "^5.54.0",
|
|
71
|
+
"@wordpress/patterns": "^2.54.0",
|
|
72
|
+
"@wordpress/plugins": "^7.54.0",
|
|
73
|
+
"@wordpress/preferences": "^4.54.0",
|
|
74
|
+
"@wordpress/private-apis": "^1.54.0",
|
|
75
|
+
"@wordpress/reusable-blocks": "^5.54.0",
|
|
76
|
+
"@wordpress/theme": "^2.0.0",
|
|
77
|
+
"@wordpress/ui": "^0.21.0",
|
|
78
|
+
"@wordpress/url": "^4.54.0",
|
|
79
|
+
"@wordpress/widgets": "^4.54.0",
|
|
79
80
|
"clsx": "^2.1.1"
|
|
80
81
|
},
|
|
81
82
|
"devDependencies": {
|
|
@@ -90,5 +91,5 @@
|
|
|
90
91
|
"publishConfig": {
|
|
91
92
|
"access": "public"
|
|
92
93
|
},
|
|
93
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "5ef24f60261976bb198ad035db24bf81c1fb92b4"
|
|
94
95
|
}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { useEffect, useState, useCallback, useRef } from '@wordpress/element';
|
|
5
2
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
6
3
|
import { EntityProvider } from '@wordpress/core-data';
|
|
@@ -10,10 +7,6 @@ import {
|
|
|
10
7
|
PanelBody,
|
|
11
8
|
} from '@wordpress/components';
|
|
12
9
|
import { useBlockProps } from '@wordpress/block-editor';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Internal dependencies
|
|
16
|
-
*/
|
|
17
10
|
import WidgetAreaInnerBlocks from './inner-blocks';
|
|
18
11
|
import { store as editWidgetsStore } from '../../../store';
|
|
19
12
|
import useIsDraggingWithin from './use-is-dragging-within';
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
1
|
import clsx from 'clsx';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* WordPress dependencies
|
|
8
|
-
*/
|
|
9
2
|
import { useEntityBlockEditor } from '@wordpress/core-data';
|
|
10
3
|
import { InnerBlocks, useInnerBlocksProps } from '@wordpress/block-editor';
|
|
11
4
|
import { useRef } from '@wordpress/element';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Internal dependencies
|
|
15
|
-
*/
|
|
16
5
|
import useIsDraggingWithin from './use-is-dragging-within';
|
|
17
6
|
|
|
18
7
|
export default function WidgetAreaInnerBlocks( { id } ) {
|
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { render } from '@testing-library/react';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* WordPress dependencies
|
|
8
|
-
*/
|
|
9
2
|
import * as wpHooks from '@wordpress/hooks';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Internal dependencies
|
|
13
|
-
*/
|
|
14
3
|
import ErrorBoundary from '../index';
|
|
15
4
|
|
|
16
5
|
const theError = new Error( 'Kaboom' );
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
5
2
|
import { __, _x } from '@wordpress/i18n';
|
|
6
3
|
import { Button, ToolbarItem } from '@wordpress/components';
|
|
@@ -8,10 +5,6 @@ import { NavigableToolbar } from '@wordpress/block-editor';
|
|
|
8
5
|
import { listView, plus } from '@wordpress/icons';
|
|
9
6
|
import { useCallback } from '@wordpress/element';
|
|
10
7
|
import { useViewportMatch } from '@wordpress/compose';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Internal dependencies
|
|
14
|
-
*/
|
|
15
8
|
import UndoButton from '../undo-redo/undo';
|
|
16
9
|
import RedoButton from '../undo-redo/redo';
|
|
17
10
|
import { store as editWidgetsStore } from '../../../store';
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { BlockToolbar } from '@wordpress/block-editor';
|
|
5
2
|
import { useSelect } from '@wordpress/data';
|
|
6
3
|
import { useRef } from '@wordpress/element';
|
|
@@ -10,10 +7,6 @@ import { PinnedItems } from '@wordpress/interface';
|
|
|
10
7
|
import { useViewportMatch } from '@wordpress/compose';
|
|
11
8
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
12
9
|
import { VisuallyHidden } from '@wordpress/ui';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Internal dependencies
|
|
16
|
-
*/
|
|
17
10
|
import DocumentTools from './document-tools';
|
|
18
11
|
import SaveButton from '../save-button';
|
|
19
12
|
import MoreMenu from '../more-menu';
|
|
@@ -127,9 +127,8 @@
|
|
|
127
127
|
background: $gray-900;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
&:focus:not(:
|
|
131
|
-
|
|
132
|
-
outline: 1px solid transparent;
|
|
130
|
+
&:focus:not(:active) {
|
|
131
|
+
@include outset-ring__focus();
|
|
133
132
|
}
|
|
134
133
|
|
|
135
134
|
&::before {
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { useSelect } from '@wordpress/data';
|
|
5
2
|
import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Internal dependencies
|
|
9
|
-
*/
|
|
10
3
|
import Shortcut from './shortcut';
|
|
11
4
|
|
|
12
5
|
function DynamicShortcut( { name } ) {
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
1
|
import clsx from 'clsx';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* WordPress dependencies
|
|
8
|
-
*/
|
|
9
2
|
import { Modal } from '@wordpress/components';
|
|
10
3
|
import { __ } from '@wordpress/i18n';
|
|
11
4
|
import {
|
|
@@ -13,10 +6,6 @@ import {
|
|
|
13
6
|
store as keyboardShortcutsStore,
|
|
14
7
|
} from '@wordpress/keyboard-shortcuts';
|
|
15
8
|
import { useSelect } from '@wordpress/data';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Internal dependencies
|
|
19
|
-
*/
|
|
20
9
|
import { textFormattingShortcuts } from './config';
|
|
21
10
|
import Shortcut from './shortcut';
|
|
22
11
|
import DynamicShortcut from './dynamic-shortcut';
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { useEffect } from '@wordpress/element';
|
|
5
2
|
import {
|
|
6
3
|
useShortcut,
|
|
@@ -11,10 +8,6 @@ import { useDispatch } from '@wordpress/data';
|
|
|
11
8
|
import { __ } from '@wordpress/i18n';
|
|
12
9
|
import { store as coreStore } from '@wordpress/core-data';
|
|
13
10
|
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Internal dependencies
|
|
17
|
-
*/
|
|
18
11
|
import { store as editWidgetsStore } from '../../store';
|
|
19
12
|
import { unlock } from '../../lock-unlock';
|
|
20
13
|
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
1
|
+
import { getAdminThemeColors } from '@wordpress/admin-ui';
|
|
4
2
|
import { __, sprintf } from '@wordpress/i18n';
|
|
3
|
+
import { useMemo } from '@wordpress/element';
|
|
5
4
|
import { useDispatch } from '@wordpress/data';
|
|
6
5
|
import { PluginArea } from '@wordpress/plugins';
|
|
7
6
|
import { store as noticesStore } from '@wordpress/notices';
|
|
8
7
|
import { __unstableUseNavigateRegions as useNavigateRegions } from '@wordpress/components';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Internal dependencies
|
|
12
|
-
*/
|
|
8
|
+
import { ThemeProvider } from '@wordpress/theme';
|
|
13
9
|
import ErrorBoundary from '../error-boundary';
|
|
14
10
|
import WidgetAreasBlockEditorProvider from '../widget-areas-block-editor-provider';
|
|
15
11
|
import Sidebar from '../sidebar';
|
|
@@ -33,25 +29,26 @@ function Layout( { blockEditorSettings } ) {
|
|
|
33
29
|
}
|
|
34
30
|
|
|
35
31
|
const navigateRegionsProps = useNavigateRegions();
|
|
32
|
+
const adminPrimary = useMemo( () => getAdminThemeColors().primary, [] );
|
|
36
33
|
|
|
37
34
|
return (
|
|
38
|
-
<
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</
|
|
53
|
-
</
|
|
54
|
-
</
|
|
35
|
+
<ThemeProvider isRoot color={ { primary: adminPrimary } }>
|
|
36
|
+
<ErrorBoundary>
|
|
37
|
+
<div { ...navigateRegionsProps }>
|
|
38
|
+
<WidgetAreasBlockEditorProvider
|
|
39
|
+
blockEditorSettings={ blockEditorSettings }
|
|
40
|
+
>
|
|
41
|
+
<Interface
|
|
42
|
+
blockEditorSettings={ blockEditorSettings }
|
|
43
|
+
/>
|
|
44
|
+
<Sidebar />
|
|
45
|
+
<PluginArea onError={ onPluginAreaError } />
|
|
46
|
+
<UnsavedChangesWarning />
|
|
47
|
+
<WelcomeGuide />
|
|
48
|
+
</WidgetAreasBlockEditorProvider>
|
|
49
|
+
</div>
|
|
50
|
+
</ErrorBoundary>
|
|
51
|
+
</ThemeProvider>
|
|
55
52
|
);
|
|
56
53
|
}
|
|
57
54
|
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { useViewportMatch } from '@wordpress/compose';
|
|
5
2
|
import { BlockBreadcrumb } from '@wordpress/block-editor';
|
|
6
3
|
import { useEffect } from '@wordpress/element';
|
|
@@ -12,10 +9,6 @@ import {
|
|
|
12
9
|
} from '@wordpress/interface';
|
|
13
10
|
import { __ } from '@wordpress/i18n';
|
|
14
11
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Internal dependencies
|
|
18
|
-
*/
|
|
19
12
|
import Header from '../header';
|
|
20
13
|
import WidgetAreasBlockEditorContent from '../widget-areas-block-editor-content';
|
|
21
14
|
import { store as editWidgetsStore } from '../../store';
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { __ } from '@wordpress/i18n';
|
|
5
2
|
import { useEffect } from '@wordpress/element';
|
|
6
3
|
import { useSelect } from '@wordpress/data';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Internal dependencies
|
|
10
|
-
*/
|
|
11
4
|
import { store as editWidgetsStore } from '../../store';
|
|
12
5
|
|
|
13
6
|
/**
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { MenuGroup, MenuItem, DropdownMenu } from '@wordpress/components';
|
|
5
2
|
import { useState } from '@wordpress/element';
|
|
6
3
|
import { __, _x } from '@wordpress/i18n';
|
|
@@ -10,10 +7,6 @@ import { displayShortcut } from '@wordpress/keycodes';
|
|
|
10
7
|
import { useShortcut } from '@wordpress/keyboard-shortcuts';
|
|
11
8
|
import { useViewportMatch } from '@wordpress/compose';
|
|
12
9
|
import { VisuallyHidden } from '@wordpress/ui';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Internal dependencies
|
|
16
|
-
*/
|
|
17
10
|
import KeyboardShortcutHelpModal from '../keyboard-shortcut-help-modal';
|
|
18
11
|
import ToolsMoreMenuGroup from './tools-more-menu-group';
|
|
19
12
|
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { Button } from '@wordpress/components';
|
|
5
2
|
import { __ } from '@wordpress/i18n';
|
|
6
3
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Internal dependencies
|
|
10
|
-
*/
|
|
11
4
|
import { store as editWidgetsStore } from '../../store';
|
|
12
5
|
|
|
13
6
|
function SaveButton() {
|
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { useSelect } from '@wordpress/data';
|
|
5
|
-
/**
|
|
6
|
-
* Internal dependencies
|
|
7
|
-
*/
|
|
8
2
|
import { store as editWidgetsStore } from '../../store';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Internal dependencies
|
|
12
|
-
*/
|
|
13
3
|
import InserterSidebar from './inserter-sidebar';
|
|
14
4
|
import ListViewSidebar from './list-view-sidebar';
|
|
15
5
|
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { __experimentalLibrary as Library } from '@wordpress/block-editor';
|
|
5
2
|
import { useViewportMatch } from '@wordpress/compose';
|
|
6
3
|
import { useCallback, useRef } from '@wordpress/element';
|
|
7
4
|
import { useDispatch } from '@wordpress/data';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Internal dependencies
|
|
11
|
-
*/
|
|
12
5
|
import useWidgetLibraryInsertionPoint from '../../hooks/use-widget-library-insertion-point';
|
|
13
6
|
import { store as editWidgetsStore } from '../../store';
|
|
14
7
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { __experimentalListView as ListView } from '@wordpress/block-editor';
|
|
5
2
|
import { Button } from '@wordpress/components';
|
|
6
|
-
import { useFocusOnMount, useMergeRefs } from '@wordpress/compose';
|
|
7
3
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
8
4
|
import { useCallback, useState } from '@wordpress/element';
|
|
9
5
|
import { __ } from '@wordpress/i18n';
|
|
10
6
|
import { closeSmall } from '@wordpress/icons';
|
|
11
7
|
import { ESCAPE } from '@wordpress/keycodes';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Internal dependencies
|
|
15
|
-
*/
|
|
16
8
|
import { store as editWidgetsStore } from '../../store';
|
|
17
9
|
import { unlock } from '../../lock-unlock';
|
|
18
10
|
|
|
@@ -24,8 +16,6 @@ export default function ListViewSidebar() {
|
|
|
24
16
|
// re-renders when the dropZoneElement updates.
|
|
25
17
|
const [ dropZoneElement, setDropZoneElement ] = useState( null );
|
|
26
18
|
|
|
27
|
-
const focusOnMountRef = useFocusOnMount( 'firstElement' );
|
|
28
|
-
|
|
29
19
|
// When closing the list view, focus should return to the toggle button.
|
|
30
20
|
const closeListView = useCallback( () => {
|
|
31
21
|
setIsListViewOpened( false );
|
|
@@ -59,9 +49,9 @@ export default function ListViewSidebar() {
|
|
|
59
49
|
</div>
|
|
60
50
|
<div
|
|
61
51
|
className="edit-widgets-editor__list-view-panel-content"
|
|
62
|
-
ref={
|
|
52
|
+
ref={ setDropZoneElement }
|
|
63
53
|
>
|
|
64
|
-
<ListView dropZoneElement={ dropZoneElement } />
|
|
54
|
+
<ListView dropZoneElement={ dropZoneElement } focusOnMount />
|
|
65
55
|
</div>
|
|
66
56
|
</div>
|
|
67
57
|
);
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { useEffect, useContext, useCallback } from '@wordpress/element';
|
|
5
2
|
import { isRTL, __ } from '@wordpress/i18n';
|
|
6
3
|
import {
|
|
@@ -11,22 +8,14 @@ import {
|
|
|
11
8
|
BlockInspector,
|
|
12
9
|
store as blockEditorStore,
|
|
13
10
|
} from '@wordpress/block-editor';
|
|
14
|
-
|
|
15
11
|
import { drawerLeft, drawerRight } from '@wordpress/icons';
|
|
16
12
|
import { privateApis as componentsPrivateApis } from '@wordpress/components';
|
|
17
13
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
18
|
-
|
|
19
14
|
const SIDEBAR_ACTIVE_BY_DEFAULT = true;
|
|
20
|
-
|
|
21
15
|
const BLOCK_INSPECTOR_IDENTIFIER = 'edit-widgets/block-inspector';
|
|
22
|
-
|
|
23
16
|
// Widget areas were once called block areas, so use 'edit-widgets/block-areas'
|
|
24
17
|
// for backwards compatibility.
|
|
25
18
|
const WIDGET_AREAS_IDENTIFIER = 'edit-widgets/block-areas';
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Internal dependencies
|
|
29
|
-
*/
|
|
30
19
|
import WidgetAreas from './widget-areas';
|
|
31
20
|
import { store as editWidgetsStore } from '../../store';
|
|
32
21
|
import { unlock } from '../../lock-unlock';
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { useSelect } from '@wordpress/data';
|
|
5
2
|
import { useMemo } from '@wordpress/element';
|
|
6
3
|
import { blockDefault } from '@wordpress/icons';
|
|
@@ -9,10 +6,6 @@ import { Button } from '@wordpress/components';
|
|
|
9
6
|
import { __ } from '@wordpress/i18n';
|
|
10
7
|
import { addQueryArgs } from '@wordpress/url';
|
|
11
8
|
import { safeHTML } from '@wordpress/dom';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Internal dependencies
|
|
15
|
-
*/
|
|
16
9
|
import { store as editWidgetsStore } from '../../store';
|
|
17
10
|
|
|
18
11
|
export default function WidgetAreas( { selectedWidgetAreaId } ) {
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
5
2
|
import { ExternalLink, Guide } from '@wordpress/components';
|
|
6
3
|
import { __, sprintf, _n } from '@wordpress/i18n';
|
|
7
4
|
import { createInterpolateElement } from '@wordpress/element';
|
|
8
5
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Internal dependencies
|
|
12
|
-
*/
|
|
13
6
|
import { store as editWidgetsStore } from '../../store';
|
|
14
7
|
|
|
15
8
|
export default function WelcomeGuide() {
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import {
|
|
5
2
|
BlockList,
|
|
6
3
|
BlockToolbar,
|
|
@@ -13,10 +10,6 @@ import { useViewportMatch } from '@wordpress/compose';
|
|
|
13
10
|
import { useSelect } from '@wordpress/data';
|
|
14
11
|
import { useMemo } from '@wordpress/element';
|
|
15
12
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Internal dependencies
|
|
19
|
-
*/
|
|
20
13
|
import Notices from '../notices';
|
|
21
14
|
import KeyboardShortcuts from '../keyboard-shortcuts';
|
|
22
15
|
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { SlotFillProvider } from '@wordpress/components';
|
|
5
2
|
import { useViewportMatch } from '@wordpress/compose';
|
|
6
3
|
import { uploadMedia } from '@wordpress/media-utils';
|
|
@@ -10,11 +7,6 @@ import { useMemo } from '@wordpress/element';
|
|
|
10
7
|
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
11
8
|
import { privateApis as editPatternsPrivateApis } from '@wordpress/patterns';
|
|
12
9
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
13
|
-
import { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Internal dependencies
|
|
17
|
-
*/
|
|
18
10
|
import KeyboardShortcuts from '../keyboard-shortcuts';
|
|
19
11
|
import { buildWidgetAreasPostId, KIND, POST_TYPE } from '../../store/utils';
|
|
20
12
|
import useLastSelectedWidgetArea from '../../hooks/use-last-selected-widget-area';
|
|
@@ -24,7 +16,6 @@ import { unlock } from '../../lock-unlock';
|
|
|
24
16
|
|
|
25
17
|
const { ExperimentalBlockEditorProvider } = unlock( blockEditorPrivateApis );
|
|
26
18
|
const { PatternsMenuItems } = unlock( editPatternsPrivateApis );
|
|
27
|
-
const { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );
|
|
28
19
|
|
|
29
20
|
const EMPTY_ARRAY = [];
|
|
30
21
|
|
|
@@ -119,7 +110,6 @@ export default function WidgetAreasBlockEditorProvider( {
|
|
|
119
110
|
return (
|
|
120
111
|
<SlotFillProvider>
|
|
121
112
|
<KeyboardShortcuts.Register />
|
|
122
|
-
<BlockKeyboardShortcuts />
|
|
123
113
|
<ExperimentalBlockEditorProvider
|
|
124
114
|
value={ blocks }
|
|
125
115
|
onInput={ onInput }
|