@wordpress/edit-widgets 6.52.0 → 6.53.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 +10 -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.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.map +2 -2
- 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.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.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 +9 -7
- package/build-style/style.css +9 -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 +0 -7
- 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 -7
- 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
|
@@ -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,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { __experimentalListView as ListView } from '@wordpress/block-editor';
|
|
5
2
|
import { Button } from '@wordpress/components';
|
|
6
3
|
import { useFocusOnMount, useMergeRefs } from '@wordpress/compose';
|
|
@@ -9,10 +6,6 @@ import { useCallback, useState } from '@wordpress/element';
|
|
|
9
6
|
import { __ } from '@wordpress/i18n';
|
|
10
7
|
import { closeSmall } from '@wordpress/icons';
|
|
11
8
|
import { ESCAPE } from '@wordpress/keycodes';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Internal dependencies
|
|
15
|
-
*/
|
|
16
9
|
import { store as editWidgetsStore } from '../../store';
|
|
17
10
|
import { unlock } from '../../lock-unlock';
|
|
18
11
|
|
|
@@ -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';
|
|
@@ -11,10 +8,6 @@ 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
10
|
import { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Internal dependencies
|
|
17
|
-
*/
|
|
18
11
|
import KeyboardShortcuts from '../keyboard-shortcuts';
|
|
19
12
|
import { buildWidgetAreasPostId, KIND, POST_TYPE } from '../../store/utils';
|
|
20
13
|
import useLastSelectedWidgetArea from '../../hooks/use-last-selected-widget-area';
|
package/src/filters/index.js
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
1
|
import { BlockControls } from '@wordpress/block-editor';
|
|
6
2
|
import { createHigherOrderComponent } from '@wordpress/compose';
|
|
7
3
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
8
4
|
import { addFilter } from '@wordpress/hooks';
|
|
9
5
|
import { MoveToWidgetArea } from '@wordpress/widgets';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Internal dependencies
|
|
13
|
-
*/
|
|
14
6
|
import { store as editWidgetsStore } from '../store';
|
|
15
7
|
|
|
16
8
|
const withMoveToWidgetAreaToolbarItem = createHigherOrderComponent(
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { useSelect } from '@wordpress/data';
|
|
5
2
|
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
6
3
|
import { store as coreStore } from '@wordpress/core-data';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Internal dependencies
|
|
10
|
-
*/
|
|
11
4
|
import { store as widgetsEditorStore } from '../store';
|
|
12
5
|
import { buildWidgetAreasPostId, KIND, POST_TYPE } from '../store/utils';
|
|
13
6
|
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { useSelect } from '@wordpress/data';
|
|
5
2
|
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
6
3
|
import { store as coreStore } from '@wordpress/core-data';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Internal dependencies
|
|
10
|
-
*/
|
|
11
4
|
import { store as editWidgetsStore } from '../store';
|
|
12
5
|
import { buildWidgetAreasPostId, KIND, POST_TYPE } from '../store/utils';
|
|
13
6
|
|
package/src/index.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import {
|
|
5
2
|
registerBlockType,
|
|
6
3
|
unstable__bootstrapServerSideBlockDefinitions, // eslint-disable-line camelcase
|
|
@@ -22,10 +19,6 @@ import {
|
|
|
22
19
|
registerWidgetGroupBlock,
|
|
23
20
|
} from '@wordpress/widgets';
|
|
24
21
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Internal dependencies
|
|
28
|
-
*/
|
|
29
22
|
import './store';
|
|
30
23
|
import './filters';
|
|
31
24
|
import * as widgetArea from './blocks/widget-area';
|
package/src/lock-unlock.js
CHANGED
package/src/store/actions.js
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { __, sprintf } from '@wordpress/i18n';
|
|
5
2
|
import { store as noticesStore } from '@wordpress/notices';
|
|
6
3
|
import { store as interfaceStore } from '@wordpress/interface';
|
|
7
4
|
import { getWidgetIdFromBlock } from '@wordpress/widgets';
|
|
8
5
|
import { store as coreStore } from '@wordpress/core-data';
|
|
9
6
|
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Internal dependencies
|
|
13
|
-
*/
|
|
14
7
|
import { transformBlockToWidget } from './transformers';
|
|
15
8
|
import {
|
|
16
9
|
buildWidgetAreaPostId,
|
package/src/store/index.js
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import apiFetch from '@wordpress/api-fetch';
|
|
5
2
|
import { createReduxStore, register } from '@wordpress/data';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Internal dependencies
|
|
9
|
-
*/
|
|
10
3
|
import reducer from './reducer';
|
|
11
4
|
import * as resolvers from './resolvers';
|
|
12
5
|
import * as selectors from './selectors';
|
package/src/store/reducer.js
CHANGED
package/src/store/resolvers.js
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { createBlock } from '@wordpress/blocks';
|
|
5
2
|
import { store as coreStore } from '@wordpress/core-data';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Internal dependencies
|
|
9
|
-
*/
|
|
10
3
|
import { persistStubPost, setWidgetAreasOpenState } from './actions';
|
|
11
4
|
import {
|
|
12
5
|
KIND,
|
package/src/store/selectors.js
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { createSelector, createRegistrySelector } from '@wordpress/data';
|
|
5
2
|
import { getWidgetIdFromBlock } from '@wordpress/widgets';
|
|
6
3
|
import { store as coreStore } from '@wordpress/core-data';
|
|
7
4
|
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Internal dependencies
|
|
11
|
-
*/
|
|
12
5
|
import {
|
|
13
6
|
buildWidgetsQuery,
|
|
14
7
|
buildWidgetAreasQuery,
|