@wordpress/edit-post 7.31.0 → 7.33.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 +4 -0
- package/README.md +9 -323
- package/build/components/browser-url/index.js.map +1 -1
- package/build/components/editor-initialization/index.js +0 -1
- package/build/components/editor-initialization/index.js.map +1 -1
- package/build/components/editor-initialization/listener-hooks.js +1 -38
- package/build/components/editor-initialization/listener-hooks.js.map +1 -1
- package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
- package/build/components/header/header-toolbar/index.native.js.map +1 -1
- package/build/components/header/index.js +5 -5
- package/build/components/header/index.js.map +1 -1
- package/build/components/header/index.native.js +1 -1
- package/build/components/header/index.native.js.map +1 -1
- package/build/components/header/main-dashboard-button/index.js.map +1 -1
- package/build/components/header/more-menu/index.js +7 -6
- package/build/components/header/more-menu/index.js.map +1 -1
- package/build/components/header/post-publish-button-or-toggle.js +11 -13
- package/build/components/header/post-publish-button-or-toggle.js.map +1 -1
- package/build/components/header/preferences-menu-item/index.js +12 -4
- package/build/components/header/preferences-menu-item/index.js.map +1 -1
- package/build/components/header/tools-more-menu-group/index.js.map +1 -1
- package/build/components/header/writing-menu/index.js.map +1 -1
- package/build/components/init-pattern-modal/index.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +1 -36
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/layout/actions-panel.js +4 -7
- package/build/components/layout/actions-panel.js.map +1 -1
- package/build/components/layout/index.js +16 -21
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/index.native.js.map +1 -1
- package/build/components/meta-boxes/index.js.map +1 -1
- package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
- package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
- package/build/components/preferences-modal/enable-custom-fields.js.map +1 -1
- package/build/components/preferences-modal/enable-panel.js.map +1 -1
- package/build/components/preferences-modal/enable-publish-sidebar.js.map +1 -1
- package/build/components/preferences-modal/index.js +1 -21
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build/components/sidebar/plugin-post-publish-panel/index.js +16 -64
- package/build/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
- package/build/components/sidebar/plugin-pre-publish-panel/index.js +16 -63
- package/build/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
- package/build/components/sidebar/post-format/index.js.map +1 -1
- package/build/components/sidebar/post-pending-status/index.js.map +1 -1
- package/build/components/sidebar/post-slug/index.js.map +1 -1
- package/build/components/sidebar/post-status/index.js +9 -9
- package/build/components/sidebar/post-status/index.js.map +1 -1
- package/build/components/sidebar/post-sticky/index.js.map +1 -1
- package/build/components/sidebar/post-trash/index.js.map +1 -1
- package/build/components/sidebar/post-visibility/index.js.map +1 -1
- package/build/components/sidebar/settings-header/index.js.map +1 -1
- package/build/components/sidebar/settings-sidebar/index.js +42 -40
- package/build/components/sidebar/settings-sidebar/index.js.map +1 -1
- package/build/components/text-editor/index.js.map +1 -1
- package/build/components/visual-editor/block-inspector-button.js +1 -1
- package/build/components/visual-editor/block-inspector-button.js.map +1 -1
- package/build/components/visual-editor/header.native.js.map +1 -1
- package/build/components/visual-editor/index.js +4 -1
- package/build/components/visual-editor/index.js.map +1 -1
- package/build/components/visual-editor/index.native.js.map +1 -1
- package/build/components/visual-editor/use-padding-appender.js +62 -0
- package/build/components/visual-editor/use-padding-appender.js.map +1 -0
- package/build/components/welcome-guide/default.js.map +1 -1
- package/build/components/welcome-guide/image.js.map +1 -1
- package/build/components/welcome-guide/index.js.map +1 -1
- package/build/components/welcome-guide/template.js.map +1 -1
- package/build/editor.js +9 -4
- package/build/editor.js.map +1 -1
- package/build/editor.native.js.map +1 -1
- package/build/hooks/commands/use-common-commands.js +7 -24
- package/build/hooks/commands/use-common-commands.js.map +1 -1
- package/build/hooks/components/index.js.map +1 -1
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/use-navigate-to-entity-record.js +36 -19
- package/build/hooks/use-navigate-to-entity-record.js.map +1 -1
- package/build/hooks/validate-multiple-use/index.js.map +1 -1
- package/build/index.js +7 -12
- package/build/index.js.map +1 -1
- package/build/index.native.js +2 -4
- package/build/index.native.js.map +1 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/plugins/copy-content-menu-item/index.js.map +1 -1
- package/build/plugins/index.js.map +1 -1
- package/build/plugins/keyboard-shortcuts-help-menu-item/index.js +7 -4
- package/build/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
- package/build/plugins/welcome-guide-menu-item/index.js.map +1 -1
- package/build/store/actions.js +46 -31
- package/build/store/actions.js.map +1 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/index.js +1 -1
- package/build/store/index.js.map +1 -1
- package/build/store/reducer.js +1 -15
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +44 -24
- package/build/store/selectors.js.map +1 -1
- package/build/utils/meta-boxes.js.map +1 -1
- package/build-module/components/browser-url/index.js.map +1 -1
- package/build-module/components/editor-initialization/index.js +1 -2
- package/build-module/components/editor-initialization/index.js.map +1 -1
- package/build-module/components/editor-initialization/listener-hooks.js +2 -38
- package/build-module/components/editor-initialization/listener-hooks.js.map +1 -1
- package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
- package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
- package/build-module/components/header/index.js +4 -4
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/header/index.native.js +1 -1
- package/build-module/components/header/index.native.js.map +1 -1
- package/build-module/components/header/main-dashboard-button/index.js.map +1 -1
- package/build-module/components/header/more-menu/index.js +5 -4
- package/build-module/components/header/more-menu/index.js.map +1 -1
- package/build-module/components/header/post-publish-button-or-toggle.js +11 -13
- package/build-module/components/header/post-publish-button-or-toggle.js.map +1 -1
- package/build-module/components/header/preferences-menu-item/index.js +11 -3
- package/build-module/components/header/preferences-menu-item/index.js.map +1 -1
- package/build-module/components/header/tools-more-menu-group/index.js.map +1 -1
- package/build-module/components/header/writing-menu/index.js.map +1 -1
- package/build-module/components/init-pattern-modal/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +1 -36
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/layout/actions-panel.js +4 -5
- package/build-module/components/layout/actions-panel.js.map +1 -1
- package/build-module/components/layout/index.js +15 -20
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/index.native.js.map +1 -1
- package/build-module/components/meta-boxes/index.js.map +1 -1
- package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
- package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
- package/build-module/components/preferences-modal/enable-custom-fields.js.map +1 -1
- package/build-module/components/preferences-modal/enable-panel.js.map +1 -1
- package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +1 -20
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build-module/components/sidebar/plugin-post-publish-panel/index.js +14 -62
- package/build-module/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
- package/build-module/components/sidebar/plugin-pre-publish-panel/index.js +14 -61
- package/build-module/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
- package/build-module/components/sidebar/post-format/index.js.map +1 -1
- package/build-module/components/sidebar/post-pending-status/index.js.map +1 -1
- package/build-module/components/sidebar/post-slug/index.js.map +1 -1
- package/build-module/components/sidebar/post-status/index.js +9 -10
- package/build-module/components/sidebar/post-status/index.js.map +1 -1
- package/build-module/components/sidebar/post-sticky/index.js.map +1 -1
- package/build-module/components/sidebar/post-trash/index.js.map +1 -1
- package/build-module/components/sidebar/post-visibility/index.js.map +1 -1
- package/build-module/components/sidebar/settings-header/index.js.map +1 -1
- package/build-module/components/sidebar/settings-sidebar/index.js +43 -41
- package/build-module/components/sidebar/settings-sidebar/index.js.map +1 -1
- package/build-module/components/text-editor/index.js.map +1 -1
- package/build-module/components/visual-editor/block-inspector-button.js +1 -1
- package/build-module/components/visual-editor/block-inspector-button.js.map +1 -1
- package/build-module/components/visual-editor/header.native.js.map +1 -1
- package/build-module/components/visual-editor/index.js +4 -1
- package/build-module/components/visual-editor/index.js.map +1 -1
- package/build-module/components/visual-editor/index.native.js.map +1 -1
- package/build-module/components/visual-editor/use-padding-appender.js +55 -0
- package/build-module/components/visual-editor/use-padding-appender.js.map +1 -0
- package/build-module/components/welcome-guide/default.js.map +1 -1
- package/build-module/components/welcome-guide/image.js.map +1 -1
- package/build-module/components/welcome-guide/index.js.map +1 -1
- package/build-module/components/welcome-guide/template.js.map +1 -1
- package/build-module/editor.js +9 -4
- package/build-module/editor.js.map +1 -1
- package/build-module/editor.native.js.map +1 -1
- package/build-module/hooks/commands/use-common-commands.js +9 -26
- package/build-module/hooks/commands/use-common-commands.js.map +1 -1
- package/build-module/hooks/components/index.js.map +1 -1
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/use-navigate-to-entity-record.js +37 -20
- package/build-module/hooks/use-navigate-to-entity-record.js.map +1 -1
- package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
- package/build-module/index.js +8 -8
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +2 -4
- package/build-module/index.native.js.map +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/plugins/copy-content-menu-item/index.js.map +1 -1
- package/build-module/plugins/index.js.map +1 -1
- package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js +6 -3
- package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
- package/build-module/plugins/welcome-guide-menu-item/index.js.map +1 -1
- package/build-module/store/actions.js +38 -22
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/reducer.js +1 -13
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +42 -21
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/meta-boxes.js.map +1 -1
- package/build-style/classic-rtl.css +2 -2
- package/build-style/classic.css +2 -2
- package/build-style/style-rtl.css +12 -454
- package/build-style/style.css +12 -454
- package/package.json +32 -34
- package/src/classic.scss +2 -1
- package/src/components/editor-initialization/index.js +1 -5
- package/src/components/editor-initialization/listener-hooks.js +1 -40
- package/src/components/editor-initialization/test/listener-hooks.js +1 -96
- package/src/components/header/index.js +3 -4
- package/src/components/header/index.native.js +1 -1
- package/src/components/header/more-menu/index.js +3 -4
- package/src/components/header/post-publish-button-or-toggle.js +10 -11
- package/src/components/header/preferences-menu-item/index.js +9 -3
- package/src/components/header/style.scss +5 -3
- package/src/components/header/test/index.js +13 -1
- package/src/components/keyboard-shortcuts/index.js +3 -44
- package/src/components/layout/actions-panel.js +5 -4
- package/src/components/layout/index.js +20 -42
- package/src/components/meta-boxes/meta-boxes-area/style.scss +1 -1
- package/src/components/preferences-modal/index.js +1 -24
- package/src/components/sidebar/plugin-post-publish-panel/index.js +12 -67
- package/src/components/sidebar/plugin-pre-publish-panel/index.js +12 -66
- package/src/components/sidebar/post-status/index.js +6 -9
- package/src/components/sidebar/settings-sidebar/index.js +64 -56
- package/src/components/visual-editor/block-inspector-button.js +1 -1
- package/src/components/visual-editor/index.js +4 -0
- package/src/components/visual-editor/use-padding-appender.js +66 -0
- package/src/editor.js +14 -4
- package/src/hooks/commands/use-common-commands.js +13 -28
- package/src/hooks/use-navigate-to-entity-record.js +37 -24
- package/src/index.js +11 -6
- package/src/index.native.js +1 -4
- package/src/plugins/keyboard-shortcuts-help-menu-item/index.js +5 -3
- package/src/store/actions.js +37 -24
- package/src/store/reducer.js +0 -13
- package/src/store/selectors.js +52 -36
- package/src/store/test/actions.js +11 -10
- package/src/style.scss +1 -20
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +0 -107
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +0 -1
- package/build/components/header/plugin-more-menu-item/index.js +0 -78
- package/build/components/header/plugin-more-menu-item/index.js.map +0 -1
- package/build/components/header/plugin-sidebar-more-menu-item/index.js +0 -71
- package/build/components/header/plugin-sidebar-more-menu-item/index.js.map +0 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +0 -78
- package/build/components/keyboard-shortcut-help-modal/config.js.map +0 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -49
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +0 -129
- package/build/components/keyboard-shortcut-help-modal/index.js.map +0 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +0 -55
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
- package/build/components/sidebar/plugin-post-status-info/index.js +0 -73
- package/build/components/sidebar/plugin-post-status-info/index.js.map +0 -1
- package/build/components/sidebar/plugin-sidebar/index.js +0 -104
- package/build/components/sidebar/plugin-sidebar/index.js.map +0 -1
- package/build/components/sidebar/template-summary/index.js +0 -36
- package/build/components/sidebar/template-summary/index.js.map +0 -1
- package/build/components/start-page-options/index.js +0 -107
- package/build/components/start-page-options/index.js.map +0 -1
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +0 -100
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +0 -1
- package/build-module/components/header/plugin-more-menu-item/index.js +0 -73
- package/build-module/components/header/plugin-more-menu-item/index.js.map +0 -1
- package/build-module/components/header/plugin-sidebar-more-menu-item/index.js +0 -65
- package/build-module/components/header/plugin-sidebar-more-menu-item/index.js.map +0 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js +0 -71
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +0 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -41
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +0 -119
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +0 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -48
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
- package/build-module/components/sidebar/plugin-post-status-info/index.js +0 -66
- package/build-module/components/sidebar/plugin-post-status-info/index.js.map +0 -1
- package/build-module/components/sidebar/plugin-sidebar/index.js +0 -98
- package/build-module/components/sidebar/plugin-sidebar/index.js.map +0 -1
- package/build-module/components/sidebar/template-summary/index.js +0 -29
- package/build-module/components/sidebar/template-summary/index.js.map +0 -1
- package/build-module/components/start-page-options/index.js +0 -100
- package/build-module/components/start-page-options/index.js.map +0 -1
- package/src/components/block-settings-menu/plugin-block-settings-menu-item.js +0 -108
- package/src/components/header/plugin-more-menu-item/index.js +0 -73
- package/src/components/header/plugin-sidebar-more-menu-item/index.js +0 -64
- package/src/components/keyboard-shortcut-help-modal/config.js +0 -53
- package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -43
- package/src/components/keyboard-shortcut-help-modal/index.js +0 -159
- package/src/components/keyboard-shortcut-help-modal/shortcut.js +0 -67
- package/src/components/keyboard-shortcut-help-modal/style.scss +0 -61
- package/src/components/keyboard-shortcut-help-modal/test/index.js +0 -36
- package/src/components/sidebar/plugin-post-publish-panel/test/__snapshots__/index.js.snap +0 -39
- package/src/components/sidebar/plugin-post-publish-panel/test/index.js +0 -33
- package/src/components/sidebar/plugin-post-status-info/index.js +0 -63
- package/src/components/sidebar/plugin-post-status-info/test/__snapshots__/index.js.snap +0 -11
- package/src/components/sidebar/plugin-post-status-info/test/index.js +0 -29
- package/src/components/sidebar/plugin-pre-publish-panel/test/index.js +0 -33
- package/src/components/sidebar/plugin-sidebar/index.js +0 -94
- package/src/components/sidebar/template-summary/index.js +0 -37
- package/src/components/sidebar/template-summary/style.scss +0 -5
- package/src/components/start-page-options/index.js +0 -108
- package/src/components/start-page-options/style.scss +0 -26
|
@@ -2,17 +2,15 @@ import { createElement } from "react";
|
|
|
2
2
|
/**
|
|
3
3
|
* WordPress dependencies
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
const {
|
|
8
|
-
Fill,
|
|
9
|
-
Slot
|
|
10
|
-
} = createSlotFill('PluginPrePublishPanel');
|
|
5
|
+
import deprecated from '@wordpress/deprecated';
|
|
6
|
+
import { PluginPrePublishPanel } from '@wordpress/editor';
|
|
11
7
|
|
|
12
8
|
/**
|
|
13
9
|
* Renders provided content to the pre-publish side panel in the publish flow
|
|
14
10
|
* (side panel that opens when a user first pushes "Publish" from the main editor).
|
|
15
11
|
*
|
|
12
|
+
* @deprecated since 6.6, use `wp.editor.PluginPrePublishPanel` instead.
|
|
13
|
+
*
|
|
16
14
|
* @param {Object} props Component props.
|
|
17
15
|
* @param {string} [props.className] An optional class name added to the panel.
|
|
18
16
|
* @param {string} [props.title] Title displayed at the top of the panel.
|
|
@@ -23,61 +21,16 @@ const {
|
|
|
23
21
|
* the sidebar is pinned to toolbar.
|
|
24
22
|
* @param {Element} props.children Children to be rendered
|
|
25
23
|
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```js
|
|
28
|
-
* // Using ES5 syntax
|
|
29
|
-
* var __ = wp.i18n.__;
|
|
30
|
-
* var PluginPrePublishPanel = wp.editPost.PluginPrePublishPanel;
|
|
31
|
-
*
|
|
32
|
-
* function MyPluginPrePublishPanel() {
|
|
33
|
-
* return React.createElement(
|
|
34
|
-
* PluginPrePublishPanel,
|
|
35
|
-
* {
|
|
36
|
-
* className: 'my-plugin-pre-publish-panel',
|
|
37
|
-
* title: __( 'My panel title' ),
|
|
38
|
-
* initialOpen: true,
|
|
39
|
-
* },
|
|
40
|
-
* __( 'My panel content' )
|
|
41
|
-
* );
|
|
42
|
-
* }
|
|
43
|
-
* ```
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```jsx
|
|
47
|
-
* // Using ESNext syntax
|
|
48
|
-
* import { __ } from '@wordpress/i18n';
|
|
49
|
-
* import { PluginPrePublishPanel } from '@wordpress/edit-post';
|
|
50
|
-
*
|
|
51
|
-
* const MyPluginPrePublishPanel = () => (
|
|
52
|
-
* <PluginPrePublishPanel
|
|
53
|
-
* className="my-plugin-pre-publish-panel"
|
|
54
|
-
* title={ __( 'My panel title' ) }
|
|
55
|
-
* initialOpen={ true }
|
|
56
|
-
* >
|
|
57
|
-
* { __( 'My panel content' ) }
|
|
58
|
-
* </PluginPrePublishPanel>
|
|
59
|
-
* );
|
|
60
|
-
* ```
|
|
61
|
-
*
|
|
62
24
|
* @return {Component} The component to be rendered.
|
|
63
25
|
*/
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return createElement(Fill, null, createElement(PanelBody, {
|
|
75
|
-
className: className,
|
|
76
|
-
initialOpen: initialOpen || !title,
|
|
77
|
-
title: title,
|
|
78
|
-
icon: icon !== null && icon !== void 0 ? icon : pluginIcon
|
|
79
|
-
}, children));
|
|
80
|
-
};
|
|
81
|
-
PluginPrePublishPanel.Slot = Slot;
|
|
82
|
-
export default PluginPrePublishPanel;
|
|
26
|
+
export default function EditPostPluginPrePublishPanel(props) {
|
|
27
|
+
deprecated('wp.editPost.PluginPrePublishPanel', {
|
|
28
|
+
since: '6.6',
|
|
29
|
+
version: '6.8',
|
|
30
|
+
alternative: 'wp.editor.PluginPrePublishPanel'
|
|
31
|
+
});
|
|
32
|
+
return createElement(PluginPrePublishPanel, {
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
}
|
|
83
36
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["deprecated","PluginPrePublishPanel","EditPostPluginPrePublishPanel","props","since","version","alternative","createElement"],"sources":["@wordpress/edit-post/src/components/sidebar/plugin-pre-publish-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { PluginPrePublishPanel } from '@wordpress/editor';\n\n/**\n * Renders provided content to the pre-publish side panel in the publish flow\n * (side panel that opens when a user first pushes \"Publish\" from the main editor).\n *\n * @deprecated since 6.6, use `wp.editor.PluginPrePublishPanel` instead.\n *\n * @param {Object} props Component props.\n * @param {string} [props.className] An optional class name added to the panel.\n * @param {string} [props.title] Title displayed at the top of the panel.\n * @param {boolean} [props.initialOpen=false] Whether to have the panel initially opened.\n * When no title is provided it is always opened.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/)\n * icon slug string, or an SVG WP element, to be rendered when\n * the sidebar is pinned to toolbar.\n * @param {Element} props.children Children to be rendered\n *\n * @return {Component} The component to be rendered.\n */\nexport default function EditPostPluginPrePublishPanel( props ) {\n\tdeprecated( 'wp.editPost.PluginPrePublishPanel', {\n\t\tsince: '6.6',\n\t\tversion: '6.8',\n\t\talternative: 'wp.editor.PluginPrePublishPanel',\n\t} );\n\treturn <PluginPrePublishPanel { ...props } />;\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,uBAAuB;AAC9C,SAASC,qBAAqB,QAAQ,mBAAmB;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,6BAA6BA,CAAEC,KAAK,EAAG;EAC9DH,UAAU,CAAE,mCAAmC,EAAE;IAChDI,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE,KAAK;IACdC,WAAW,EAAE;EACd,CAAE,CAAC;EACH,OAAOC,aAAA,CAACN,qBAAqB;IAAA,GAAME;EAAK,CAAI,CAAC;AAC9C","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PanelRow","PostFormat","PostFormatForm","PostFormatCheck","createElement","className"],"sources":["@wordpress/edit-post/src/components/sidebar/post-format/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PanelRow } from '@wordpress/components';\nimport {\n\tPostFormat as PostFormatForm,\n\tPostFormatCheck,\n} from '@wordpress/editor';\n\nexport function PostFormat() {\n\treturn (\n\t\t<PostFormatCheck>\n\t\t\t<PanelRow className=\"edit-post-post-format\">\n\t\t\t\t<PostFormatForm />\n\t\t\t</PanelRow>\n\t\t</PostFormatCheck>\n\t);\n}\n\nexport default PostFormat;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,uBAAuB;AAChD,SACCC,UAAU,IAAIC,cAAc,EAC5BC,eAAe,QACT,mBAAmB;AAE1B,OAAO,SAASF,UAAUA,CAAA,EAAG;EAC5B,OACCG,aAAA,CAACD,eAAe,QACfC,aAAA,CAACJ,QAAQ;IAACK,SAAS,EAAC;EAAuB,GAC1CD,aAAA,CAACF,cAAc,MAAE,CACR,CACM,CAAC;AAEpB;AAEA,eAAeD,UAAU"}
|
|
1
|
+
{"version":3,"names":["PanelRow","PostFormat","PostFormatForm","PostFormatCheck","createElement","className"],"sources":["@wordpress/edit-post/src/components/sidebar/post-format/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PanelRow } from '@wordpress/components';\nimport {\n\tPostFormat as PostFormatForm,\n\tPostFormatCheck,\n} from '@wordpress/editor';\n\nexport function PostFormat() {\n\treturn (\n\t\t<PostFormatCheck>\n\t\t\t<PanelRow className=\"edit-post-post-format\">\n\t\t\t\t<PostFormatForm />\n\t\t\t</PanelRow>\n\t\t</PostFormatCheck>\n\t);\n}\n\nexport default PostFormat;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,uBAAuB;AAChD,SACCC,UAAU,IAAIC,cAAc,EAC5BC,eAAe,QACT,mBAAmB;AAE1B,OAAO,SAASF,UAAUA,CAAA,EAAG;EAC5B,OACCG,aAAA,CAACD,eAAe,QACfC,aAAA,CAACJ,QAAQ;IAACK,SAAS,EAAC;EAAuB,GAC1CD,aAAA,CAACF,cAAc,MAAE,CACR,CACM,CAAC;AAEpB;AAEA,eAAeD,UAAU","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PostPendingStatus","PostPendingStatusForm","PostPendingStatusCheck","privateApis","editorPrivateApis","unlock","PostPanelRow","createElement"],"sources":["@wordpress/edit-post/src/components/sidebar/post-pending-status/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPostPendingStatus as PostPendingStatusForm,\n\tPostPendingStatusCheck,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostPanelRow } = unlock( editorPrivateApis );\n\nexport function PostPendingStatus() {\n\treturn (\n\t\t<PostPendingStatusCheck>\n\t\t\t<PostPanelRow>\n\t\t\t\t<PostPendingStatusForm />\n\t\t\t</PostPanelRow>\n\t\t</PostPendingStatusCheck>\n\t);\n}\n\nexport default PostPendingStatus;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,iBAAiB,IAAIC,qBAAqB,EAC1CC,sBAAsB,EACtBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;;AAE1B;AACA;AACA;AACA,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,MAAM;EAAEC;AAAa,CAAC,GAAGD,MAAM,CAAED,iBAAkB,CAAC;AAEpD,OAAO,SAASJ,iBAAiBA,CAAA,EAAG;EACnC,OACCO,aAAA,CAACL,sBAAsB,QACtBK,aAAA,CAACD,YAAY,QACZC,aAAA,CAACN,qBAAqB,MAAE,CACX,CACS,CAAC;AAE3B;AAEA,eAAeD,iBAAiB"}
|
|
1
|
+
{"version":3,"names":["PostPendingStatus","PostPendingStatusForm","PostPendingStatusCheck","privateApis","editorPrivateApis","unlock","PostPanelRow","createElement"],"sources":["@wordpress/edit-post/src/components/sidebar/post-pending-status/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPostPendingStatus as PostPendingStatusForm,\n\tPostPendingStatusCheck,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostPanelRow } = unlock( editorPrivateApis );\n\nexport function PostPendingStatus() {\n\treturn (\n\t\t<PostPendingStatusCheck>\n\t\t\t<PostPanelRow>\n\t\t\t\t<PostPendingStatusForm />\n\t\t\t</PostPanelRow>\n\t\t</PostPendingStatusCheck>\n\t);\n}\n\nexport default PostPendingStatus;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,iBAAiB,IAAIC,qBAAqB,EAC1CC,sBAAsB,EACtBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;;AAE1B;AACA;AACA;AACA,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,MAAM;EAAEC;AAAa,CAAC,GAAGD,MAAM,CAAED,iBAAkB,CAAC;AAEpD,OAAO,SAASJ,iBAAiBA,CAAA,EAAG;EACnC,OACCO,aAAA,CAACL,sBAAsB,QACtBK,aAAA,CAACD,YAAY,QACZC,aAAA,CAACN,qBAAqB,MAAE,CACX,CACS,CAAC;AAE3B;AAEA,eAAeD,iBAAiB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PanelRow","PostSlug","PostSlugForm","PostSlugCheck","createElement","className"],"sources":["@wordpress/edit-post/src/components/sidebar/post-slug/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PanelRow } from '@wordpress/components';\nimport { PostSlug as PostSlugForm, PostSlugCheck } from '@wordpress/editor';\n\nexport function PostSlug() {\n\treturn (\n\t\t<PostSlugCheck>\n\t\t\t<PanelRow className=\"edit-post-post-slug\">\n\t\t\t\t<PostSlugForm />\n\t\t\t</PanelRow>\n\t\t</PostSlugCheck>\n\t);\n}\n\nexport default PostSlug;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,QAAQ,IAAIC,YAAY,EAAEC,aAAa,QAAQ,mBAAmB;AAE3E,OAAO,SAASF,QAAQA,CAAA,EAAG;EAC1B,OACCG,aAAA,CAACD,aAAa,QACbC,aAAA,CAACJ,QAAQ;IAACK,SAAS,EAAC;EAAqB,GACxCD,aAAA,CAACF,YAAY,MAAE,CACN,CACI,CAAC;AAElB;AAEA,eAAeD,QAAQ"}
|
|
1
|
+
{"version":3,"names":["PanelRow","PostSlug","PostSlugForm","PostSlugCheck","createElement","className"],"sources":["@wordpress/edit-post/src/components/sidebar/post-slug/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PanelRow } from '@wordpress/components';\nimport { PostSlug as PostSlugForm, PostSlugCheck } from '@wordpress/editor';\n\nexport function PostSlug() {\n\treturn (\n\t\t<PostSlugCheck>\n\t\t\t<PanelRow className=\"edit-post-post-slug\">\n\t\t\t\t<PostSlugForm />\n\t\t\t</PanelRow>\n\t\t</PostSlugCheck>\n\t);\n}\n\nexport default PostSlug;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,QAAQ,IAAIC,YAAY,EAAEC,aAAa,QAAQ,mBAAmB;AAE3E,OAAO,SAASF,QAAQA,CAAA,EAAG;EAC1B,OACCG,aAAA,CAACD,aAAa,QACbC,aAAA,CAACJ,QAAQ;IAACK,SAAS,EAAC;EAAqB,GACxCD,aAAA,CAACF,YAAY,MAAE,CACN,CACI,CAAC;AAElB;AAEA,eAAeD,QAAQ","ignoreList":[]}
|
|
@@ -5,18 +5,19 @@ import { createElement, Fragment } from "react";
|
|
|
5
5
|
import { __ } from '@wordpress/i18n';
|
|
6
6
|
import { __experimentalHStack as HStack, PanelBody } from '@wordpress/components';
|
|
7
7
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
8
|
-
import { PostAuthorPanel, PostSchedulePanel,
|
|
8
|
+
import { PluginPostStatusInfo, PostAuthorPanel, PostSchedulePanel, PostSyncStatus, PostURLPanel, PostTemplatePanel, PostFeaturedImagePanel, store as editorStore, privateApis as editorPrivateApis } from '@wordpress/editor';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Internal dependencies
|
|
12
12
|
*/
|
|
13
|
-
import PostVisibility from '../post-visibility';
|
|
14
13
|
import PostTrash from '../post-trash';
|
|
15
14
|
import PostSticky from '../post-sticky';
|
|
16
15
|
import PostSlug from '../post-slug';
|
|
17
16
|
import PostFormat from '../post-format';
|
|
18
|
-
import
|
|
19
|
-
|
|
17
|
+
import { unlock } from '../../../lock-unlock';
|
|
18
|
+
const {
|
|
19
|
+
PostStatus: PostStatusPanel
|
|
20
|
+
} = unlock(editorPrivateApis);
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
* Module Constants
|
|
@@ -49,14 +50,12 @@ export default function PostStatus() {
|
|
|
49
50
|
title: __('Summary'),
|
|
50
51
|
opened: isOpened,
|
|
51
52
|
onToggle: () => toggleEditorPanelOpened(PANEL_NAME)
|
|
52
|
-
}, createElement(PluginPostStatusInfo.Slot, null, fills => createElement(Fragment, null, createElement(PostFeaturedImagePanel, {
|
|
53
|
+
}, createElement(PluginPostStatusInfo.Slot, null, fills => createElement(Fragment, null, createElement(PostStatusPanel, null), createElement(PostFeaturedImagePanel, {
|
|
53
54
|
withPanelBody: false
|
|
54
|
-
}), createElement(
|
|
55
|
+
}), createElement(PostSchedulePanel, null), createElement(PostTemplatePanel, null), createElement(PostURLPanel, null), createElement(PostSyncStatus, null), createElement(PostSticky, null), createElement(PostFormat, null), createElement(PostSlug, null), createElement(PostAuthorPanel, null), fills, createElement(HStack, {
|
|
55
56
|
style: {
|
|
56
57
|
marginTop: '16px'
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
wrap: true
|
|
60
|
-
}, createElement(PostSwitchToDraftButton, null), createElement(PostTrash, null)))));
|
|
58
|
+
}
|
|
59
|
+
}, createElement(PostTrash, null)))));
|
|
61
60
|
}
|
|
62
61
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","__experimentalHStack","HStack","PanelBody","useDispatch","useSelect","
|
|
1
|
+
{"version":3,"names":["__","__experimentalHStack","HStack","PanelBody","useDispatch","useSelect","PluginPostStatusInfo","PostAuthorPanel","PostSchedulePanel","PostSyncStatus","PostURLPanel","PostTemplatePanel","PostFeaturedImagePanel","store","editorStore","privateApis","editorPrivateApis","PostTrash","PostSticky","PostSlug","PostFormat","unlock","PostStatus","PostStatusPanel","PANEL_NAME","isOpened","isRemoved","select","isEditorPanelRemoved","isEditorPanelOpened","toggleEditorPanelOpened","createElement","className","title","opened","onToggle","Slot","fills","Fragment","withPanelBody","style","marginTop"],"sources":["@wordpress/edit-post/src/components/sidebar/post-status/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalHStack as HStack,\n\tPanelBody,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tPluginPostStatusInfo,\n\tPostAuthorPanel,\n\tPostSchedulePanel,\n\tPostSyncStatus,\n\tPostURLPanel,\n\tPostTemplatePanel,\n\tPostFeaturedImagePanel,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport PostTrash from '../post-trash';\nimport PostSticky from '../post-sticky';\nimport PostSlug from '../post-slug';\nimport PostFormat from '../post-format';\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostStatus: PostStatusPanel } = unlock( editorPrivateApis );\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'post-status';\n\nexport default function PostStatus() {\n\tconst { isOpened, isRemoved } = useSelect( ( select ) => {\n\t\t// We use isEditorPanelRemoved to hide the panel if it was programatically removed. We do\n\t\t// not use isEditorPanelEnabled since this panel should not be disabled through the UI.\n\t\tconst { isEditorPanelRemoved, isEditorPanelOpened } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tisRemoved: isEditorPanelRemoved( PANEL_NAME ),\n\t\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t\t};\n\t}, [] );\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\n\tif ( isRemoved ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody\n\t\t\tclassName=\"edit-post-post-status\"\n\t\t\ttitle={ __( 'Summary' ) }\n\t\t\topened={ isOpened }\n\t\t\tonToggle={ () => toggleEditorPanelOpened( PANEL_NAME ) }\n\t\t>\n\t\t\t<PluginPostStatusInfo.Slot>\n\t\t\t\t{ ( fills ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<PostStatusPanel />\n\t\t\t\t\t\t<PostFeaturedImagePanel withPanelBody={ false } />\n\t\t\t\t\t\t<PostSchedulePanel />\n\t\t\t\t\t\t<PostTemplatePanel />\n\t\t\t\t\t\t<PostURLPanel />\n\t\t\t\t\t\t<PostSyncStatus />\n\t\t\t\t\t\t<PostSticky />\n\t\t\t\t\t\t<PostFormat />\n\t\t\t\t\t\t<PostSlug />\n\t\t\t\t\t\t<PostAuthorPanel />\n\t\t\t\t\t\t{ fills }\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\tmarginTop: '16px',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PostTrash />\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</PluginPostStatusInfo.Slot>\n\t\t</PanelBody>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SACCC,oBAAoB,IAAIC,MAAM,EAC9BC,SAAS,QACH,uBAAuB;AAC9B,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SACCC,oBAAoB,EACpBC,eAAe,EACfC,iBAAiB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,aAAA,CAACnB,sBAAsB;IAAC2B,aAAa,EAAG;EAAO,CAAE,CAAC,EAClDR,aAAA,CAACvB,iBAAiB,MAAE,CAAC,EACrBuB,aAAA,CAACpB,iBAAiB,MAAE,CAAC,EACrBoB,aAAA,CAACrB,YAAY,MAAE,CAAC,EAChBqB,aAAA,CAACtB,cAAc,MAAE,CAAC,EAClBsB,aAAA,CAACb,UAAU,MAAE,CAAC,EACda,aAAA,CAACX,UAAU,MAAE,CAAC,EACdW,aAAA,CAACZ,QAAQ,MAAE,CAAC,EACZY,aAAA,CAACxB,eAAe,MAAE,CAAC,EACjB8B,KAAK,EACPN,aAAA,CAAC7B,MAAM;IACNsC,KAAK,EAAG;MACPC,SAAS,EAAE;IACZ;EAAG,GAEHV,aAAA,CAACd,SAAS,MAAE,CACL,CACP,CAEuB,CACjB,CAAC;AAEd","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PostSticky","PostStickyForm","PostStickyCheck","privateApis","editorPrivateApis","unlock","PostPanelRow","createElement"],"sources":["@wordpress/edit-post/src/components/sidebar/post-sticky/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPostSticky as PostStickyForm,\n\tPostStickyCheck,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostPanelRow } = unlock( editorPrivateApis );\n\nexport function PostSticky() {\n\treturn (\n\t\t<PostStickyCheck>\n\t\t\t<PostPanelRow>\n\t\t\t\t<PostStickyForm />\n\t\t\t</PostPanelRow>\n\t\t</PostStickyCheck>\n\t);\n}\n\nexport default PostSticky;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,UAAU,IAAIC,cAAc,EAC5BC,eAAe,EACfC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;;AAE1B;AACA;AACA;AACA,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,MAAM;EAAEC;AAAa,CAAC,GAAGD,MAAM,CAAED,iBAAkB,CAAC;AAEpD,OAAO,SAASJ,UAAUA,CAAA,EAAG;EAC5B,OACCO,aAAA,CAACL,eAAe,QACfK,aAAA,CAACD,YAAY,QACZC,aAAA,CAACN,cAAc,MAAE,CACJ,CACE,CAAC;AAEpB;AAEA,eAAeD,UAAU"}
|
|
1
|
+
{"version":3,"names":["PostSticky","PostStickyForm","PostStickyCheck","privateApis","editorPrivateApis","unlock","PostPanelRow","createElement"],"sources":["@wordpress/edit-post/src/components/sidebar/post-sticky/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPostSticky as PostStickyForm,\n\tPostStickyCheck,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostPanelRow } = unlock( editorPrivateApis );\n\nexport function PostSticky() {\n\treturn (\n\t\t<PostStickyCheck>\n\t\t\t<PostPanelRow>\n\t\t\t\t<PostStickyForm />\n\t\t\t</PostPanelRow>\n\t\t</PostStickyCheck>\n\t);\n}\n\nexport default PostSticky;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,UAAU,IAAIC,cAAc,EAC5BC,eAAe,EACfC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;;AAE1B;AACA;AACA;AACA,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,MAAM;EAAEC;AAAa,CAAC,GAAGD,MAAM,CAAED,iBAAkB,CAAC;AAEpD,OAAO,SAASJ,UAAUA,CAAA,EAAG;EAC5B,OACCO,aAAA,CAACL,eAAe,QACfK,aAAA,CAACD,YAAY,QACZC,aAAA,CAACN,cAAc,MAAE,CACJ,CACE,CAAC;AAEpB;AAEA,eAAeD,UAAU","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PostTrash","PostTrashLink","PostTrashCheck","createElement"],"sources":["@wordpress/edit-post/src/components/sidebar/post-trash/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PostTrash as PostTrashLink, PostTrashCheck } from '@wordpress/editor';\n\nexport default function PostTrash() {\n\treturn (\n\t\t<PostTrashCheck>\n\t\t\t<PostTrashLink />\n\t\t</PostTrashCheck>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,IAAIC,aAAa,EAAEC,cAAc,QAAQ,mBAAmB;AAE9E,eAAe,SAASF,SAASA,CAAA,EAAG;EACnC,OACCG,aAAA,CAACD,cAAc,QACdC,aAAA,CAACF,aAAa,MAAE,CACD,CAAC;AAEnB"}
|
|
1
|
+
{"version":3,"names":["PostTrash","PostTrashLink","PostTrashCheck","createElement"],"sources":["@wordpress/edit-post/src/components/sidebar/post-trash/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PostTrash as PostTrashLink, PostTrashCheck } from '@wordpress/editor';\n\nexport default function PostTrash() {\n\treturn (\n\t\t<PostTrashCheck>\n\t\t\t<PostTrashLink />\n\t\t</PostTrashCheck>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,IAAIC,aAAa,EAAEC,cAAc,QAAQ,mBAAmB;AAE9E,eAAe,SAASF,SAASA,CAAA,EAAG;EACnC,OACCG,aAAA,CAACD,cAAc,QACdC,aAAA,CAACF,aAAa,MAAE,CACD,CAAC;AAEnB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","sprintf","Dropdown","Button","PostVisibility","PostVisibilityForm","PostVisibilityLabel","PostVisibilityCheck","usePostVisibilityLabel","privateApis","editorPrivateApis","useMemo","useState","unlock","PostPanelRow","popoverAnchor","setPopoverAnchor","popoverProps","anchor","placement","createElement","render","canEdit","label","ref","contentClassName","focusOnMount","renderToggle","isOpen","onToggle","PostVisibilityToggle","onClick","renderContent","onClose","__next40pxDefaultSize","className","variant"],"sources":["@wordpress/edit-post/src/components/sidebar/post-visibility/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Dropdown, Button } from '@wordpress/components';\nimport {\n\tPostVisibility as PostVisibilityForm,\n\tPostVisibilityLabel,\n\tPostVisibilityCheck,\n\tusePostVisibilityLabel,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostPanelRow } = unlock( editorPrivateApis );\n\nexport function PostVisibility() {\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'bottom-end',\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\treturn (\n\t\t<PostVisibilityCheck\n\t\t\trender={ ( { canEdit } ) => (\n\t\t\t\t<PostPanelRow\n\t\t\t\t\tlabel={ __( 'Visibility' ) }\n\t\t\t\t\tref={ setPopoverAnchor }\n\t\t\t\t>\n\t\t\t\t\t{ ! canEdit && (\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<PostVisibilityLabel />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t\t{ canEdit && (\n\t\t\t\t\t\t<Dropdown\n\t\t\t\t\t\t\tcontentClassName=\"edit-post-post-visibility__dialog\"\n\t\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t\t\tfocusOnMount\n\t\t\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t\t\t<PostVisibilityToggle\n\t\t\t\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t\t\t<PostVisibilityForm onClose={ onClose } />\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</PostPanelRow>\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nfunction PostVisibilityToggle( { isOpen, onClick } ) {\n\tconst label = usePostVisibilityLabel();\n\treturn (\n\t\t<Button\n\t\t\t__next40pxDefaultSize\n\t\t\tclassName=\"edit-post-post-visibility__toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\t// translators: %s: Current post visibility.\n\t\t\taria-label={ sprintf( __( 'Select visibility: %s' ), label ) }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ label }\n\t\t</Button>\n\t);\n}\n\nexport default PostVisibility;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,QAAQ,EAAEC,MAAM,QAAQ,uBAAuB;AACxD,SACCC,cAAc,IAAIC,kBAAkB,EACpCC,mBAAmB,EACnBC,mBAAmB,EACnBC,sBAAsB,EACtBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;AAC1B,SAASC,OAAO,EAAEC,QAAQ,QAAQ,oBAAoB;;AAEtD;AACA;AACA;AACA,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,MAAM;EAAEC;AAAa,CAAC,GAAGD,MAAM,CAAEH,iBAAkB,CAAC;AAEpD,OAAO,SAASN,cAAcA,CAAA,EAAG;EAChC;EACA;EACA,MAAM,CAAEW,aAAa,EAAEC,gBAAgB,CAAE,GAAGJ,QAAQ,CAAE,IAAK,CAAC;EAC5D;EACA,MAAMK,YAAY,GAAGN,OAAO,CAC3B,OAAQ;IACP;IACA;IACAO,MAAM,EAAEH,aAAa;IACrBI,SAAS,EAAE;EACZ,CAAC,CAAE,EACH,CAAEJ,aAAa,CAChB,CAAC;EAED,OACCK,aAAA,CAACb,mBAAmB;IACnBc,MAAM,EAAGA,CAAE;MAAEC;IAAQ,CAAC,KACrBF,aAAA,CAACN,YAAY;MACZS,KAAK,EAAGvB,EAAE,CAAE,YAAa,CAAG;MAC5BwB,GAAG,EAAGR;IAAkB,GAEtB,CAAEM,OAAO,IACVF,aAAA,eACCA,aAAA,CAACd,mBAAmB,MAAE,CACjB,CACN,EACCgB,OAAO,IACRF,aAAA,CAAClB,QAAQ;MACRuB,gBAAgB,EAAC,mCAAmC;MACpDR,YAAY,EAAGA,YAAc;MAC7BS,YAAY;MACZC,YAAY,EAAGA,CAAE;QAAEC,MAAM;QAAEC;MAAS,CAAC,KACpCT,aAAA,CAACU,oBAAoB;QACpBF,MAAM,EAAGA,MAAQ;QACjBG,OAAO,EAAGF;MAAU,CACpB,CACC;MACHG,aAAa,EAAGA,CAAE;QAAEC;MAAQ,CAAC,KAC5Bb,aAAA,CAACf,kBAAkB;QAAC4B,OAAO,EAAGA;MAAS,CAAE;IACvC,CACH,CAEW;EACZ,CACH,CAAC;AAEJ;AAEA,SAASH,oBAAoBA,CAAE;EAAEF,MAAM;EAAEG;AAAQ,CAAC,EAAG;EACpD,MAAMR,KAAK,GAAGf,sBAAsB,CAAC,CAAC;EACtC,OACCY,aAAA,CAACjB,MAAM;IACN+B,qBAAqB;IACrBC,SAAS,EAAC,mCAAmC;IAC7CC,OAAO,EAAC,UAAU;IAClB,iBAAgBR;IAChB;IAAA;IACA,cAAa3B,OAAO,CAAED,EAAE,CAAE,uBAAwB,CAAC,EAAEuB,KAAM,CAAG;IAC9DQ,OAAO,EAAGA;EAAS,GAEjBR,KACK,CAAC;AAEX;AAEA,eAAenB,cAAc"}
|
|
1
|
+
{"version":3,"names":["__","sprintf","Dropdown","Button","PostVisibility","PostVisibilityForm","PostVisibilityLabel","PostVisibilityCheck","usePostVisibilityLabel","privateApis","editorPrivateApis","useMemo","useState","unlock","PostPanelRow","popoverAnchor","setPopoverAnchor","popoverProps","anchor","placement","createElement","render","canEdit","label","ref","contentClassName","focusOnMount","renderToggle","isOpen","onToggle","PostVisibilityToggle","onClick","renderContent","onClose","__next40pxDefaultSize","className","variant"],"sources":["@wordpress/edit-post/src/components/sidebar/post-visibility/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Dropdown, Button } from '@wordpress/components';\nimport {\n\tPostVisibility as PostVisibilityForm,\n\tPostVisibilityLabel,\n\tPostVisibilityCheck,\n\tusePostVisibilityLabel,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostPanelRow } = unlock( editorPrivateApis );\n\nexport function PostVisibility() {\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'bottom-end',\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\treturn (\n\t\t<PostVisibilityCheck\n\t\t\trender={ ( { canEdit } ) => (\n\t\t\t\t<PostPanelRow\n\t\t\t\t\tlabel={ __( 'Visibility' ) }\n\t\t\t\t\tref={ setPopoverAnchor }\n\t\t\t\t>\n\t\t\t\t\t{ ! canEdit && (\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<PostVisibilityLabel />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t\t{ canEdit && (\n\t\t\t\t\t\t<Dropdown\n\t\t\t\t\t\t\tcontentClassName=\"edit-post-post-visibility__dialog\"\n\t\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t\t\tfocusOnMount\n\t\t\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t\t\t<PostVisibilityToggle\n\t\t\t\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t\t\t<PostVisibilityForm onClose={ onClose } />\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</PostPanelRow>\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nfunction PostVisibilityToggle( { isOpen, onClick } ) {\n\tconst label = usePostVisibilityLabel();\n\treturn (\n\t\t<Button\n\t\t\t__next40pxDefaultSize\n\t\t\tclassName=\"edit-post-post-visibility__toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\t// translators: %s: Current post visibility.\n\t\t\taria-label={ sprintf( __( 'Select visibility: %s' ), label ) }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ label }\n\t\t</Button>\n\t);\n}\n\nexport default PostVisibility;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,QAAQ,EAAEC,MAAM,QAAQ,uBAAuB;AACxD,SACCC,cAAc,IAAIC,kBAAkB,EACpCC,mBAAmB,EACnBC,mBAAmB,EACnBC,sBAAsB,EACtBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;AAC1B,SAASC,OAAO,EAAEC,QAAQ,QAAQ,oBAAoB;;AAEtD;AACA;AACA;AACA,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,MAAM;EAAEC;AAAa,CAAC,GAAGD,MAAM,CAAEH,iBAAkB,CAAC;AAEpD,OAAO,SAASN,cAAcA,CAAA,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;IAC9DQ,OAAO,EAAGA;EAAS,GAEjBR,KACK,CAAC;AAEX;AAEA,eAAenB,cAAc","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["privateApis","componentsPrivateApis","__","_x","useSelect","forwardRef","store","editorStore","unlock","sidebars","Tabs","SettingsHeader","_","ref","documentLabel","select","getPostTypeLabel","createElement","TabList","Tab","tabId","document","block"],"sources":["@wordpress/edit-post/src/components/sidebar/settings-header/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { forwardRef } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\nimport { sidebars } from '../settings-sidebar';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nconst SettingsHeader = ( _, ref ) => {\n\tconst { documentLabel } = useSelect( ( select ) => {\n\t\tconst { getPostTypeLabel } = select( editorStore );\n\n\t\treturn {\n\t\t\t// translators: Default label for the Document sidebar tab, not selected.\n\t\t\tdocumentLabel: getPostTypeLabel() || _x( 'Document', 'noun' ),\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Tabs.TabList ref={ ref }>\n\t\t\t<Tabs.Tab\n\t\t\t\ttabId={ sidebars.document }\n\t\t\t\t// Used for focus management in the SettingsSidebar component.\n\t\t\t\tdata-tab-id={ sidebars.document }\n\t\t\t>\n\t\t\t\t{ documentLabel }\n\t\t\t</Tabs.Tab>\n\t\t\t<Tabs.Tab\n\t\t\t\ttabId={ sidebars.block }\n\t\t\t\t// Used for focus management in the SettingsSidebar component.\n\t\t\t\tdata-tab-id={ sidebars.block }\n\t\t\t>\n\t\t\t\t{ /* translators: Text label for the Block Settings Sidebar tab. */ }\n\t\t\t\t{ __( 'Block' ) }\n\t\t\t</Tabs.Tab>\n\t\t</Tabs.TabList>\n\t);\n};\n\nexport default forwardRef( SettingsHeader );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,qBAAqB,QAAQ,uBAAuB;AAC5E,SAASC,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;;AAExD;AACA;AACA;AACA,SAASC,MAAM,QAAQ,sBAAsB;AAC7C,SAASC,QAAQ,QAAQ,qBAAqB;AAE9C,MAAM;EAAEC;AAAK,CAAC,GAAGF,MAAM,CAAEP,qBAAsB,CAAC;AAEhD,MAAMU,cAAc,GAAGA,CAAEC,CAAC,EAAEC,GAAG,KAAM;EACpC,MAAM;IAAEC;EAAc,CAAC,GAAGV,SAAS,CAAIW,MAAM,IAAM;IAClD,MAAM;MAAEC;IAAiB,CAAC,GAAGD,MAAM,CAAER,WAAY,CAAC;IAElD,OAAO;MACN;MACAO,aAAa,EAAEE,gBAAgB,CAAC,CAAC,IAAIb,EAAE,CAAE,UAAU,EAAE,MAAO;IAC7D,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,OACCc,aAAA,CAACP,IAAI,CAACQ,OAAO;IAACL,GAAG,EAAGA;EAAK,GACxBI,aAAA,CAACP,IAAI,CAACS,GAAG;IACRC,KAAK,EAAGX,QAAQ,CAACY;IACjB;IAAA;IACA,eAAcZ,QAAQ,CAACY;EAAU,GAE/BP,aACO,CAAC,EACXG,aAAA,CAACP,IAAI,CAACS,GAAG;IACRC,KAAK,EAAGX,QAAQ,CAACa;IACjB;IAAA;IACA,eAAcb,QAAQ,CAACa;EAAO,GAG5BpB,EAAE,CAAE,OAAQ,CACL,CACG,CAAC;AAEjB,CAAC;AAED,eAAeG,UAAU,CAAEM,cAAe,CAAC"}
|
|
1
|
+
{"version":3,"names":["privateApis","componentsPrivateApis","__","_x","useSelect","forwardRef","store","editorStore","unlock","sidebars","Tabs","SettingsHeader","_","ref","documentLabel","select","getPostTypeLabel","createElement","TabList","Tab","tabId","document","block"],"sources":["@wordpress/edit-post/src/components/sidebar/settings-header/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { forwardRef } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\nimport { sidebars } from '../settings-sidebar';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nconst SettingsHeader = ( _, ref ) => {\n\tconst { documentLabel } = useSelect( ( select ) => {\n\t\tconst { getPostTypeLabel } = select( editorStore );\n\n\t\treturn {\n\t\t\t// translators: Default label for the Document sidebar tab, not selected.\n\t\t\tdocumentLabel: getPostTypeLabel() || _x( 'Document', 'noun' ),\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Tabs.TabList ref={ ref }>\n\t\t\t<Tabs.Tab\n\t\t\t\ttabId={ sidebars.document }\n\t\t\t\t// Used for focus management in the SettingsSidebar component.\n\t\t\t\tdata-tab-id={ sidebars.document }\n\t\t\t>\n\t\t\t\t{ documentLabel }\n\t\t\t</Tabs.Tab>\n\t\t\t<Tabs.Tab\n\t\t\t\ttabId={ sidebars.block }\n\t\t\t\t// Used for focus management in the SettingsSidebar component.\n\t\t\t\tdata-tab-id={ sidebars.block }\n\t\t\t>\n\t\t\t\t{ /* translators: Text label for the Block Settings Sidebar tab. */ }\n\t\t\t\t{ __( 'Block' ) }\n\t\t\t</Tabs.Tab>\n\t\t</Tabs.TabList>\n\t);\n};\n\nexport default forwardRef( SettingsHeader );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,qBAAqB,QAAQ,uBAAuB;AAC5E,SAASC,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;;AAExD;AACA;AACA;AACA,SAASC,MAAM,QAAQ,sBAAsB;AAC7C,SAASC,QAAQ,QAAQ,qBAAqB;AAE9C,MAAM;EAAEC;AAAK,CAAC,GAAGF,MAAM,CAAEP,qBAAsB,CAAC;AAEhD,MAAMU,cAAc,GAAGA,CAAEC,CAAC,EAAEC,GAAG,KAAM;EACpC,MAAM;IAAEC;EAAc,CAAC,GAAGV,SAAS,CAAIW,MAAM,IAAM;IAClD,MAAM;MAAEC;IAAiB,CAAC,GAAGD,MAAM,CAAER,WAAY,CAAC;IAElD,OAAO;MACN;MACAO,aAAa,EAAEE,gBAAgB,CAAC,CAAC,IAAIb,EAAE,CAAE,UAAU,EAAE,MAAO;IAC7D,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,OACCc,aAAA,CAACP,IAAI,CAACQ,OAAO;IAACL,GAAG,EAAGA;EAAK,GACxBI,aAAA,CAACP,IAAI,CAACS,GAAG;IACRC,KAAK,EAAGX,QAAQ,CAACY;IACjB;IAAA;IACA,eAAcZ,QAAQ,CAACY;EAAU,GAE/BP,aACO,CAAC,EACXG,aAAA,CAACP,IAAI,CAACS,GAAG;IACRC,KAAK,EAAGX,QAAQ,CAACa;IACjB;IAAA;IACA,eAAcb,QAAQ,CAACa;EAAO,GAG5BpB,EAAE,CAAE,OAAQ,CACL,CACG,CAAC;AAEjB,CAAC;AAED,eAAeG,UAAU,CAAEM,cAAe,CAAC","ignoreList":[]}
|
|
@@ -7,9 +7,9 @@ import { useSelect, useDispatch } from '@wordpress/data';
|
|
|
7
7
|
import { Platform, useCallback, useContext, useEffect, useRef } from '@wordpress/element';
|
|
8
8
|
import { isRTL, __ } from '@wordpress/i18n';
|
|
9
9
|
import { drawerLeft, drawerRight } from '@wordpress/icons';
|
|
10
|
-
import { store as interfaceStore } from '@wordpress/interface';
|
|
11
10
|
import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
|
|
12
|
-
import { store as editorStore, PageAttributesPanel, PluginDocumentSettingPanel, PostDiscussionPanel, PostExcerptPanel, PostLastRevisionPanel, PostTaxonomiesPanel } from '@wordpress/editor';
|
|
11
|
+
import { store as editorStore, PageAttributesPanel, PluginDocumentSettingPanel, PluginSidebar, PostDiscussionPanel, PostExcerptPanel, PostLastRevisionPanel, PostTaxonomiesPanel, privateApis as editorPrivateApis } from '@wordpress/editor';
|
|
12
|
+
import { addQueryArgs } from '@wordpress/url';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Internal dependencies
|
|
@@ -17,14 +17,21 @@ import { store as editorStore, PageAttributesPanel, PluginDocumentSettingPanel,
|
|
|
17
17
|
import SettingsHeader from '../settings-header';
|
|
18
18
|
import PostStatus from '../post-status';
|
|
19
19
|
import MetaBoxes from '../../meta-boxes';
|
|
20
|
-
import PluginSidebarEditPost from '../plugin-sidebar';
|
|
21
|
-
import TemplateSummary from '../template-summary';
|
|
22
20
|
import { store as editPostStore } from '../../../store';
|
|
23
21
|
import { privateApis as componentsPrivateApis } from '@wordpress/components';
|
|
24
22
|
import { unlock } from '../../../lock-unlock';
|
|
23
|
+
const {
|
|
24
|
+
PostCardPanel,
|
|
25
|
+
PostActions,
|
|
26
|
+
interfaceStore
|
|
27
|
+
} = unlock(editorPrivateApis);
|
|
25
28
|
const {
|
|
26
29
|
Tabs
|
|
27
30
|
} = unlock(componentsPrivateApis);
|
|
31
|
+
const {
|
|
32
|
+
PatternOverridesPanel,
|
|
33
|
+
useAutoSwitchEditorSidebars
|
|
34
|
+
} = unlock(editorPrivateApis);
|
|
28
35
|
const SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select({
|
|
29
36
|
web: true,
|
|
30
37
|
native: false
|
|
@@ -33,13 +40,21 @@ export const sidebars = {
|
|
|
33
40
|
document: 'edit-post/document',
|
|
34
41
|
block: 'edit-post/block'
|
|
35
42
|
};
|
|
43
|
+
function onActionPerformed(actionId, items) {
|
|
44
|
+
if (actionId === 'move-to-trash') {
|
|
45
|
+
const postType = items[0].type;
|
|
46
|
+
document.location.href = addQueryArgs('edit.php', {
|
|
47
|
+
post_type: postType
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
36
51
|
const SidebarContent = ({
|
|
37
|
-
|
|
52
|
+
tabName,
|
|
38
53
|
keyboardShortcut,
|
|
39
54
|
isEditingTemplate
|
|
40
55
|
}) => {
|
|
41
56
|
const tabListRef = useRef(null);
|
|
42
|
-
// Because `
|
|
57
|
+
// Because `PluginSidebar` renders a `ComplementaryArea`, we
|
|
43
58
|
// need to forward the `Tabs` context so it can be passed through the
|
|
44
59
|
// underlying slot/fill.
|
|
45
60
|
const tabsContextValue = useContext(Tabs.Context);
|
|
@@ -54,7 +69,7 @@ const SidebarContent = ({
|
|
|
54
69
|
// We are purposefully using a custom `data-tab-id` attribute here
|
|
55
70
|
// because we don't want rely on any assumptions about `Tabs`
|
|
56
71
|
// component internals.
|
|
57
|
-
element => element.getAttribute('data-tab-id') ===
|
|
72
|
+
element => element.getAttribute('data-tab-id') === tabName);
|
|
58
73
|
const activeElement = selectedTabElement?.ownerDocument.activeElement;
|
|
59
74
|
const tabsHasFocus = tabsElements.some(element => {
|
|
60
75
|
return activeElement && activeElement.id === element.id;
|
|
@@ -62,9 +77,9 @@ const SidebarContent = ({
|
|
|
62
77
|
if (tabsHasFocus && selectedTabElement && selectedTabElement.id !== activeElement?.id) {
|
|
63
78
|
selectedTabElement?.focus();
|
|
64
79
|
}
|
|
65
|
-
}, [
|
|
66
|
-
return createElement(
|
|
67
|
-
identifier:
|
|
80
|
+
}, [tabName]);
|
|
81
|
+
return createElement(PluginSidebar, {
|
|
82
|
+
identifier: tabName,
|
|
68
83
|
header: createElement(Tabs.Context.Provider, {
|
|
69
84
|
value: tabsContextValue
|
|
70
85
|
}, createElement(SettingsHeader, {
|
|
@@ -87,40 +102,33 @@ const SidebarContent = ({
|
|
|
87
102
|
}, createElement(Tabs.TabPanel, {
|
|
88
103
|
tabId: sidebars.document,
|
|
89
104
|
focusable: false
|
|
90
|
-
},
|
|
105
|
+
}, createElement(PostCardPanel, {
|
|
106
|
+
actions: createElement(PostActions, {
|
|
107
|
+
onActionPerformed: onActionPerformed
|
|
108
|
+
})
|
|
109
|
+
}), !isEditingTemplate && createElement(Fragment, null, createElement(PostStatus, null), createElement(PluginDocumentSettingPanel.Slot, null), createElement(PostLastRevisionPanel, null), createElement(PostTaxonomiesPanel, null), createElement(PostExcerptPanel, null), createElement(PostDiscussionPanel, null), createElement(PageAttributesPanel, null), createElement(PatternOverridesPanel, null), createElement(MetaBoxes, {
|
|
91
110
|
location: "side"
|
|
92
|
-
}))
|
|
111
|
+
}))), createElement(Tabs.TabPanel, {
|
|
93
112
|
tabId: sidebars.block,
|
|
94
113
|
focusable: false
|
|
95
114
|
}, createElement(BlockInspector, null))));
|
|
96
115
|
};
|
|
97
116
|
const SettingsSidebar = () => {
|
|
117
|
+
useAutoSwitchEditorSidebars();
|
|
98
118
|
const {
|
|
99
|
-
|
|
100
|
-
isSettingsSidebarActive,
|
|
119
|
+
tabName,
|
|
101
120
|
keyboardShortcut,
|
|
102
121
|
isEditingTemplate
|
|
103
122
|
} = useSelect(select => {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
// is selected, that should be edit-post/block otherwise it's edit-post/document.
|
|
111
|
-
let sidebar = select(interfaceStore).getActiveComplementaryArea(editPostStore.name);
|
|
112
|
-
let isSettingsSidebar = true;
|
|
113
|
-
if (![sidebars.document, sidebars.block].includes(sidebar)) {
|
|
114
|
-
isSettingsSidebar = false;
|
|
115
|
-
if (select(blockEditorStore).getBlockSelectionStart()) {
|
|
116
|
-
sidebar = sidebars.block;
|
|
117
|
-
}
|
|
118
|
-
sidebar = sidebars.document;
|
|
123
|
+
const shortcut = select(keyboardShortcutsStore).getShortcutRepresentation('core/editor/toggle-sidebar');
|
|
124
|
+
const sidebar = select(interfaceStore).getActiveComplementaryArea('core');
|
|
125
|
+
const _isEditorSidebarOpened = [sidebars.block, sidebars.document].includes(sidebar);
|
|
126
|
+
let _tabName = sidebar;
|
|
127
|
+
if (!_isEditorSidebarOpened) {
|
|
128
|
+
_tabName = !!select(blockEditorStore).getBlockSelectionStart() ? sidebars.block : sidebars.document;
|
|
119
129
|
}
|
|
120
|
-
const shortcut = select(keyboardShortcutsStore).getShortcutRepresentation('core/edit-post/toggle-sidebar');
|
|
121
130
|
return {
|
|
122
|
-
|
|
123
|
-
isSettingsSidebarActive: isSettingsSidebar,
|
|
131
|
+
tabName: _tabName,
|
|
124
132
|
keyboardShortcut: shortcut,
|
|
125
133
|
isEditingTemplate: select(editorStore).getCurrentPostType() === 'wp_template'
|
|
126
134
|
};
|
|
@@ -133,18 +141,12 @@ const SettingsSidebar = () => {
|
|
|
133
141
|
openGeneralSidebar(newSelectedTabId);
|
|
134
142
|
}
|
|
135
143
|
}, [openGeneralSidebar]);
|
|
136
|
-
return createElement(Tabs
|
|
137
|
-
|
|
138
|
-
// `interfaceStore`), when the sidebar closes the currently selected
|
|
139
|
-
// tab can't be found. This causes the component to continuously reset
|
|
140
|
-
// the selection to `null` in an infinite loop.Proactively setting
|
|
141
|
-
// the selected tab to `null` avoids that.
|
|
142
|
-
, {
|
|
143
|
-
selectedTabId: isSettingsSidebarActive ? sidebarName : null,
|
|
144
|
+
return createElement(Tabs, {
|
|
145
|
+
selectedTabId: tabName,
|
|
144
146
|
onSelect: onTabSelect,
|
|
145
147
|
selectOnMove: false
|
|
146
148
|
}, createElement(SidebarContent, {
|
|
147
|
-
|
|
149
|
+
tabName: tabName,
|
|
148
150
|
keyboardShortcut: keyboardShortcut,
|
|
149
151
|
isEditingTemplate: isEditingTemplate
|
|
150
152
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BlockInspector","store","blockEditorStore","useSelect","useDispatch","Platform","useCallback","useContext","useEffect","useRef","isRTL","__","drawerLeft","drawerRight","interfaceStore","keyboardShortcutsStore","editorStore","PageAttributesPanel","PluginDocumentSettingPanel","PostDiscussionPanel","PostExcerptPanel","PostLastRevisionPanel","PostTaxonomiesPanel","SettingsHeader","PostStatus","MetaBoxes","PluginSidebarEditPost","TemplateSummary","editPostStore","privateApis","componentsPrivateApis","unlock","Tabs","SIDEBAR_ACTIVE_BY_DEFAULT","select","web","native","sidebars","document","block","SidebarContent","sidebarName","keyboardShortcut","isEditingTemplate","tabListRef","tabsContextValue","Context","tabsElements","Array","from","current","querySelectorAll","selectedTabElement","find","element","getAttribute","activeElement","ownerDocument","tabsHasFocus","some","id","focus","createElement","identifier","header","Provider","value","ref","closeLabel","className","headerClassName","title","toggleShortcut","icon","isActiveByDefault","TabPanel","tabId","focusable","Fragment","Slot","location","SettingsSidebar","isSettingsSidebarActive","sidebar","getActiveComplementaryArea","name","isSettingsSidebar","includes","getBlockSelectionStart","shortcut","getShortcutRepresentation","getCurrentPostType","openGeneralSidebar","onTabSelect","newSelectedTabId","selectedTabId","onSelect","selectOnMove"],"sources":["@wordpress/edit-post/src/components/sidebar/settings-sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tBlockInspector,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tPlatform,\n\tuseCallback,\n\tuseContext,\n\tuseEffect,\n\tuseRef,\n} from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { drawerLeft, drawerRight } from '@wordpress/icons';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport {\n\tstore as editorStore,\n\tPageAttributesPanel,\n\tPluginDocumentSettingPanel,\n\tPostDiscussionPanel,\n\tPostExcerptPanel,\n\tPostLastRevisionPanel,\n\tPostTaxonomiesPanel,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport SettingsHeader from '../settings-header';\nimport PostStatus from '../post-status';\nimport MetaBoxes from '../../meta-boxes';\nimport PluginSidebarEditPost from '../plugin-sidebar';\nimport TemplateSummary from '../template-summary';\nimport { store as editPostStore } from '../../../store';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { unlock } from '../../../lock-unlock';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nconst SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select( {\n\tweb: true,\n\tnative: false,\n} );\nexport const sidebars = {\n\tdocument: 'edit-post/document',\n\tblock: 'edit-post/block',\n};\n\nconst SidebarContent = ( {\n\tsidebarName,\n\tkeyboardShortcut,\n\tisEditingTemplate,\n} ) => {\n\tconst tabListRef = useRef( null );\n\t// Because `PluginSidebarEditPost` renders a `ComplementaryArea`, we\n\t// need to forward the `Tabs` context so it can be passed through the\n\t// underlying slot/fill.\n\tconst tabsContextValue = useContext( Tabs.Context );\n\n\t// This effect addresses a race condition caused by tabbing from the last\n\t// block in the editor into the settings sidebar. Without this effect, the\n\t// selected tab and browser focus can become separated in an unexpected way\n\t// (e.g the \"block\" tab is focused, but the \"post\" tab is selected).\n\tuseEffect( () => {\n\t\tconst tabsElements = Array.from(\n\t\t\ttabListRef.current?.querySelectorAll( '[role=\"tab\"]' ) || []\n\t\t);\n\t\tconst selectedTabElement = tabsElements.find(\n\t\t\t// We are purposefully using a custom `data-tab-id` attribute here\n\t\t\t// because we don't want rely on any assumptions about `Tabs`\n\t\t\t// component internals.\n\t\t\t( element ) => element.getAttribute( 'data-tab-id' ) === sidebarName\n\t\t);\n\t\tconst activeElement = selectedTabElement?.ownerDocument.activeElement;\n\t\tconst tabsHasFocus = tabsElements.some( ( element ) => {\n\t\t\treturn activeElement && activeElement.id === element.id;\n\t\t} );\n\t\tif (\n\t\t\ttabsHasFocus &&\n\t\t\tselectedTabElement &&\n\t\t\tselectedTabElement.id !== activeElement?.id\n\t\t) {\n\t\t\tselectedTabElement?.focus();\n\t\t}\n\t}, [ sidebarName ] );\n\n\treturn (\n\t\t<PluginSidebarEditPost\n\t\t\tidentifier={ sidebarName }\n\t\t\theader={\n\t\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t\t<SettingsHeader ref={ tabListRef } />\n\t\t\t\t</Tabs.Context.Provider>\n\t\t\t}\n\t\t\tcloseLabel={ __( 'Close Settings' ) }\n\t\t\t// This classname is added so we can apply a corrective negative\n\t\t\t// margin to the panel.\n\t\t\t// see https://github.com/WordPress/gutenberg/pull/55360#pullrequestreview-1737671049\n\t\t\tclassName=\"edit-post-sidebar__panel\"\n\t\t\theaderClassName=\"edit-post-sidebar__panel-tabs\"\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\ttitle={ __( 'Settings' ) }\n\t\t\ttoggleShortcut={ keyboardShortcut }\n\t\t\ticon={ isRTL() ? drawerLeft : drawerRight }\n\t\t\tisActiveByDefault={ SIDEBAR_ACTIVE_BY_DEFAULT }\n\t\t>\n\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t<Tabs.TabPanel tabId={ sidebars.document } focusable={ false }>\n\t\t\t\t\t{ ! isEditingTemplate && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PostStatus />\n\t\t\t\t\t\t\t<PluginDocumentSettingPanel.Slot />\n\t\t\t\t\t\t\t<PostLastRevisionPanel />\n\t\t\t\t\t\t\t<PostTaxonomiesPanel />\n\t\t\t\t\t\t\t<PostExcerptPanel />\n\t\t\t\t\t\t\t<PostDiscussionPanel />\n\t\t\t\t\t\t\t<PageAttributesPanel />\n\t\t\t\t\t\t\t<MetaBoxes location=\"side\" />\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isEditingTemplate && <TemplateSummary /> }\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel tabId={ sidebars.block } focusable={ false }>\n\t\t\t\t\t<BlockInspector />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs.Context.Provider>\n\t\t</PluginSidebarEditPost>\n\t);\n};\n\nconst SettingsSidebar = () => {\n\tconst {\n\t\tsidebarName,\n\t\tisSettingsSidebarActive,\n\t\tkeyboardShortcut,\n\t\tisEditingTemplate,\n\t} = useSelect( ( select ) => {\n\t\t// The settings sidebar is used by the edit-post/document and edit-post/block sidebars.\n\t\t// sidebarName represents the sidebar that is active or that should be active when the SettingsSidebar toggle button is pressed.\n\t\t// If one of the two sidebars is active the component will contain the content of that sidebar.\n\t\t// When neither of the two sidebars is active we can not simply return null, because the PluginSidebarEditPost\n\t\t// component, besides being used to render the sidebar, also renders the toggle button. In that case sidebarName\n\t\t// should contain the sidebar that will be active when the toggle button is pressed. If a block\n\t\t// is selected, that should be edit-post/block otherwise it's edit-post/document.\n\t\tlet sidebar = select( interfaceStore ).getActiveComplementaryArea(\n\t\t\teditPostStore.name\n\t\t);\n\t\tlet isSettingsSidebar = true;\n\t\tif ( ! [ sidebars.document, sidebars.block ].includes( sidebar ) ) {\n\t\t\tisSettingsSidebar = false;\n\t\t\tif ( select( blockEditorStore ).getBlockSelectionStart() ) {\n\t\t\t\tsidebar = sidebars.block;\n\t\t\t}\n\t\t\tsidebar = sidebars.document;\n\t\t}\n\t\tconst shortcut = select(\n\t\t\tkeyboardShortcutsStore\n\t\t).getShortcutRepresentation( 'core/edit-post/toggle-sidebar' );\n\t\treturn {\n\t\t\tsidebarName: sidebar,\n\t\t\tisSettingsSidebarActive: isSettingsSidebar,\n\t\t\tkeyboardShortcut: shortcut,\n\t\t\tisEditingTemplate:\n\t\t\t\tselect( editorStore ).getCurrentPostType() === 'wp_template',\n\t\t};\n\t}, [] );\n\n\tconst { openGeneralSidebar } = useDispatch( editPostStore );\n\n\tconst onTabSelect = useCallback(\n\t\t( newSelectedTabId ) => {\n\t\t\tif ( !! newSelectedTabId ) {\n\t\t\t\topenGeneralSidebar( newSelectedTabId );\n\t\t\t}\n\t\t},\n\t\t[ openGeneralSidebar ]\n\t);\n\n\treturn (\n\t\t<Tabs\n\t\t\t// Due to how this component is controlled (via a value from the\n\t\t\t// `interfaceStore`), when the sidebar closes the currently selected\n\t\t\t// tab can't be found. This causes the component to continuously reset\n\t\t\t// the selection to `null` in an infinite loop.Proactively setting\n\t\t\t// the selected tab to `null` avoids that.\n\t\t\tselectedTabId={ isSettingsSidebarActive ? sidebarName : null }\n\t\t\tonSelect={ onTabSelect }\n\t\t\tselectOnMove={ false }\n\t\t>\n\t\t\t<SidebarContent\n\t\t\t\tsidebarName={ sidebarName }\n\t\t\t\tkeyboardShortcut={ keyboardShortcut }\n\t\t\t\tisEditingTemplate={ isEditingTemplate }\n\t\t\t/>\n\t\t</Tabs>\n\t);\n};\n\nexport default SettingsSidebar;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,cAAc,EACdC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SACCC,QAAQ,EACRC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,MAAM,QACA,oBAAoB;AAC3B,SAASC,KAAK,EAAEC,EAAE,QAAQ,iBAAiB;AAC3C,SAASC,UAAU,EAAEC,WAAW,QAAQ,kBAAkB;AAC1D,SAASZ,KAAK,IAAIa,cAAc,QAAQ,sBAAsB;AAC9D,SAASb,KAAK,IAAIc,sBAAsB,QAAQ,+BAA+B;AAC/E,SACCd,KAAK,IAAIe,WAAW,EACpBC,mBAAmB,EACnBC,0BAA0B,EAC1BC,mBAAmB,EACnBC,gBAAgB,EAChBC,qBAAqB,EACrBC,mBAAmB,QACb,mBAAmB;;AAE1B;AACA;AACA;AACA,OAAOC,cAAc,MAAM,oBAAoB;AAC/C,OAAOC,UAAU,MAAM,gBAAgB;AACvC,OAAOC,SAAS,MAAM,kBAAkB;AACxC,OAAOC,qBAAqB,MAAM,mBAAmB;AACrD,OAAOC,eAAe,MAAM,qBAAqB;AACj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AEP,MAAM;IAAEC;EAAmB,CAAC,GAAGxF,WAAW,CAAEwB,aAAc,CAAC;EAE3D,MAAMiE,WAAW,GAAGvF,WAAW,CAC5BwF,gBAAgB,IAAM;IACvB,IAAK,CAAC,CAAEA,gBAAgB,EAAG;MAC1BF,kBAAkB,CAAEE,gBAAiB,CAAC;IACvC;EACD,CAAC,EACD,CAAEF,kBAAkB,CACrB,CAAC;EAED,OACC9B,aAAA,CAAC9B;EACA;EACA;EACA;EACA;EACA;EAAA;IACA+D,aAAa,EAAGb,uBAAuB,GAAGzC,WAAW,GAAG,IAAM;IAC9DuD,QAAQ,EAAGH,WAAa;IACxBI,YAAY,EAAG;EAAO,GAEtBnC,aAAA,CAACtB,cAAc;IACdC,WAAW,EAAGA,WAAa;IAC3BC,gBAAgB,EAAGA,gBAAkB;IACrCC,iBAAiB,EAAGA;EAAmB,CACvC,CACI,CAAC;AAET,CAAC;AAED,eAAesC,eAAe"}
|
|
1
|
+
{"version":3,"names":["BlockInspector","store","blockEditorStore","useSelect","useDispatch","Platform","useCallback","useContext","useEffect","useRef","isRTL","__","drawerLeft","drawerRight","keyboardShortcutsStore","editorStore","PageAttributesPanel","PluginDocumentSettingPanel","PluginSidebar","PostDiscussionPanel","PostExcerptPanel","PostLastRevisionPanel","PostTaxonomiesPanel","privateApis","editorPrivateApis","addQueryArgs","SettingsHeader","PostStatus","MetaBoxes","editPostStore","componentsPrivateApis","unlock","PostCardPanel","PostActions","interfaceStore","Tabs","PatternOverridesPanel","useAutoSwitchEditorSidebars","SIDEBAR_ACTIVE_BY_DEFAULT","select","web","native","sidebars","document","block","onActionPerformed","actionId","items","postType","type","location","href","post_type","SidebarContent","tabName","keyboardShortcut","isEditingTemplate","tabListRef","tabsContextValue","Context","tabsElements","Array","from","current","querySelectorAll","selectedTabElement","find","element","getAttribute","activeElement","ownerDocument","tabsHasFocus","some","id","focus","createElement","identifier","header","Provider","value","ref","closeLabel","className","headerClassName","title","toggleShortcut","icon","isActiveByDefault","TabPanel","tabId","focusable","actions","Fragment","Slot","SettingsSidebar","shortcut","getShortcutRepresentation","sidebar","getActiveComplementaryArea","_isEditorSidebarOpened","includes","_tabName","getBlockSelectionStart","getCurrentPostType","openGeneralSidebar","onTabSelect","newSelectedTabId","selectedTabId","onSelect","selectOnMove"],"sources":["@wordpress/edit-post/src/components/sidebar/settings-sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tBlockInspector,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tPlatform,\n\tuseCallback,\n\tuseContext,\n\tuseEffect,\n\tuseRef,\n} from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { drawerLeft, drawerRight } from '@wordpress/icons';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport {\n\tstore as editorStore,\n\tPageAttributesPanel,\n\tPluginDocumentSettingPanel,\n\tPluginSidebar,\n\tPostDiscussionPanel,\n\tPostExcerptPanel,\n\tPostLastRevisionPanel,\n\tPostTaxonomiesPanel,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport SettingsHeader from '../settings-header';\nimport PostStatus from '../post-status';\nimport MetaBoxes from '../../meta-boxes';\nimport { store as editPostStore } from '../../../store';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostCardPanel, PostActions, interfaceStore } =\n\tunlock( editorPrivateApis );\nconst { Tabs } = unlock( componentsPrivateApis );\nconst { PatternOverridesPanel, useAutoSwitchEditorSidebars } =\n\tunlock( editorPrivateApis );\n\nconst SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select( {\n\tweb: true,\n\tnative: false,\n} );\nexport const sidebars = {\n\tdocument: 'edit-post/document',\n\tblock: 'edit-post/block',\n};\n\nfunction onActionPerformed( actionId, items ) {\n\tif ( actionId === 'move-to-trash' ) {\n\t\tconst postType = items[ 0 ].type;\n\t\tdocument.location.href = addQueryArgs( 'edit.php', {\n\t\t\tpost_type: postType,\n\t\t} );\n\t}\n}\n\nconst SidebarContent = ( { tabName, keyboardShortcut, isEditingTemplate } ) => {\n\tconst tabListRef = useRef( null );\n\t// Because `PluginSidebar` renders a `ComplementaryArea`, we\n\t// need to forward the `Tabs` context so it can be passed through the\n\t// underlying slot/fill.\n\tconst tabsContextValue = useContext( Tabs.Context );\n\n\t// This effect addresses a race condition caused by tabbing from the last\n\t// block in the editor into the settings sidebar. Without this effect, the\n\t// selected tab and browser focus can become separated in an unexpected way\n\t// (e.g the \"block\" tab is focused, but the \"post\" tab is selected).\n\tuseEffect( () => {\n\t\tconst tabsElements = Array.from(\n\t\t\ttabListRef.current?.querySelectorAll( '[role=\"tab\"]' ) || []\n\t\t);\n\t\tconst selectedTabElement = tabsElements.find(\n\t\t\t// We are purposefully using a custom `data-tab-id` attribute here\n\t\t\t// because we don't want rely on any assumptions about `Tabs`\n\t\t\t// component internals.\n\t\t\t( element ) => element.getAttribute( 'data-tab-id' ) === tabName\n\t\t);\n\t\tconst activeElement = selectedTabElement?.ownerDocument.activeElement;\n\t\tconst tabsHasFocus = tabsElements.some( ( element ) => {\n\t\t\treturn activeElement && activeElement.id === element.id;\n\t\t} );\n\t\tif (\n\t\t\ttabsHasFocus &&\n\t\t\tselectedTabElement &&\n\t\t\tselectedTabElement.id !== activeElement?.id\n\t\t) {\n\t\t\tselectedTabElement?.focus();\n\t\t}\n\t}, [ tabName ] );\n\n\treturn (\n\t\t<PluginSidebar\n\t\t\tidentifier={ tabName }\n\t\t\theader={\n\t\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t\t<SettingsHeader ref={ tabListRef } />\n\t\t\t\t</Tabs.Context.Provider>\n\t\t\t}\n\t\t\tcloseLabel={ __( 'Close Settings' ) }\n\t\t\t// This classname is added so we can apply a corrective negative\n\t\t\t// margin to the panel.\n\t\t\t// see https://github.com/WordPress/gutenberg/pull/55360#pullrequestreview-1737671049\n\t\t\tclassName=\"edit-post-sidebar__panel\"\n\t\t\theaderClassName=\"edit-post-sidebar__panel-tabs\"\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\ttitle={ __( 'Settings' ) }\n\t\t\ttoggleShortcut={ keyboardShortcut }\n\t\t\ticon={ isRTL() ? drawerLeft : drawerRight }\n\t\t\tisActiveByDefault={ SIDEBAR_ACTIVE_BY_DEFAULT }\n\t\t>\n\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t<Tabs.TabPanel tabId={ sidebars.document } focusable={ false }>\n\t\t\t\t\t<PostCardPanel\n\t\t\t\t\t\tactions={\n\t\t\t\t\t\t\t<PostActions\n\t\t\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t{ ! isEditingTemplate && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PostStatus />\n\t\t\t\t\t\t\t<PluginDocumentSettingPanel.Slot />\n\t\t\t\t\t\t\t<PostLastRevisionPanel />\n\t\t\t\t\t\t\t<PostTaxonomiesPanel />\n\t\t\t\t\t\t\t<PostExcerptPanel />\n\t\t\t\t\t\t\t<PostDiscussionPanel />\n\t\t\t\t\t\t\t<PageAttributesPanel />\n\t\t\t\t\t\t\t<PatternOverridesPanel />\n\t\t\t\t\t\t\t<MetaBoxes location=\"side\" />\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel tabId={ sidebars.block } focusable={ false }>\n\t\t\t\t\t<BlockInspector />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs.Context.Provider>\n\t\t</PluginSidebar>\n\t);\n};\n\nconst SettingsSidebar = () => {\n\tuseAutoSwitchEditorSidebars();\n\tconst { tabName, keyboardShortcut, isEditingTemplate } = useSelect(\n\t\t( select ) => {\n\t\t\tconst shortcut = select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getShortcutRepresentation( 'core/editor/toggle-sidebar' );\n\n\t\t\tconst sidebar =\n\t\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' );\n\t\t\tconst _isEditorSidebarOpened = [\n\t\t\t\tsidebars.block,\n\t\t\t\tsidebars.document,\n\t\t\t].includes( sidebar );\n\t\t\tlet _tabName = sidebar;\n\t\t\tif ( ! _isEditorSidebarOpened ) {\n\t\t\t\t_tabName = !! select(\n\t\t\t\t\tblockEditorStore\n\t\t\t\t).getBlockSelectionStart()\n\t\t\t\t\t? sidebars.block\n\t\t\t\t\t: sidebars.document;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\ttabName: _tabName,\n\t\t\t\tkeyboardShortcut: shortcut,\n\t\t\t\tisEditingTemplate:\n\t\t\t\t\tselect( editorStore ).getCurrentPostType() ===\n\t\t\t\t\t'wp_template',\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst { openGeneralSidebar } = useDispatch( editPostStore );\n\n\tconst onTabSelect = useCallback(\n\t\t( newSelectedTabId ) => {\n\t\t\tif ( !! newSelectedTabId ) {\n\t\t\t\topenGeneralSidebar( newSelectedTabId );\n\t\t\t}\n\t\t},\n\t\t[ openGeneralSidebar ]\n\t);\n\n\treturn (\n\t\t<Tabs\n\t\t\tselectedTabId={ tabName }\n\t\t\tonSelect={ onTabSelect }\n\t\t\tselectOnMove={ false }\n\t\t>\n\t\t\t<SidebarContent\n\t\t\t\ttabName={ tabName }\n\t\t\t\tkeyboardShortcut={ keyboardShortcut }\n\t\t\t\tisEditingTemplate={ isEditingTemplate }\n\t\t\t/>\n\t\t</Tabs>\n\t);\n};\n\nexport default SettingsSidebar;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,cAAc,EACdC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,SAAS,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AAgB,EAAG;MAC1BF,kBAAkB,CAAEE,gBAAiB,CAAC;IACvC;EACD,CAAC,EACD,CAAEF,kBAAkB,CACrB,CAAC;EAED,OACC7B,aAAA,CAACxC,IAAI;IACJwE,aAAa,EAAGrD,OAAS;IACzBsD,QAAQ,EAAGH,WAAa;IACxBI,YAAY,EAAG;EAAO,GAEtBlC,aAAA,CAACtB,cAAc;IACdC,OAAO,EAAGA,OAAS;IACnBC,gBAAgB,EAAGA,gBAAkB;IACrCC,iBAAiB,EAAGA;EAAmB,CACvC,CACI,CAAC;AAET,CAAC;AAED,eAAesC,eAAe","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PostTextEditor","PostTitleRaw","store","editorStore","Button","useDispatch","useSelect","__","displayShortcut","useEffect","useRef","editPostStore","TextEditor","isRichEditingEnabled","select","getEditorSettings","richEditingEnabled","switchEditorMode","isWelcomeGuideVisible","isFeatureActive","titleRef","current","focus","createElement","className","variant","onClick","shortcut","secondary","ref"],"sources":["@wordpress/edit-post/src/components/text-editor/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPostTextEditor,\n\tPostTitleRaw,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { Button } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { useEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nexport default function TextEditor() {\n\tconst isRichEditingEnabled = useSelect( ( select ) => {\n\t\treturn select( editorStore ).getEditorSettings().richEditingEnabled;\n\t}, [] );\n\tconst { switchEditorMode } = useDispatch( editorStore );\n\n\tconst { isWelcomeGuideVisible } = useSelect( ( select ) => {\n\t\tconst { isFeatureActive } = select( editPostStore );\n\n\t\treturn {\n\t\t\tisWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),\n\t\t};\n\t}, [] );\n\n\tconst titleRef = useRef();\n\n\tuseEffect( () => {\n\t\tif ( isWelcomeGuideVisible ) {\n\t\t\treturn;\n\t\t}\n\t\ttitleRef?.current?.focus();\n\t}, [ isWelcomeGuideVisible ] );\n\n\treturn (\n\t\t<div className=\"edit-post-text-editor\">\n\t\t\t{ isRichEditingEnabled && (\n\t\t\t\t<div className=\"edit-post-text-editor__toolbar\">\n\t\t\t\t\t<h2>{ __( 'Editing code' ) }</h2>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => switchEditorMode( 'visual' ) }\n\t\t\t\t\t\tshortcut={ displayShortcut.secondary( 'm' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Exit code editor' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"edit-post-text-editor__body\">\n\t\t\t\t<PostTitleRaw ref={ titleRef } />\n\t\t\t\t<PostTextEditor />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,cAAc,EACdC,YAAY,EACZC,KAAK,IAAIC,WAAW,QACd,mBAAmB;AAC1B,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,SAAS,EAAEC,MAAM,QAAQ,oBAAoB;;AAEtD;AACA;AACA;AACA,SAASR,KAAK,IAAIS,aAAa,QAAQ,aAAa;AAEpD,eAAe,SAASC,UAAUA,CAAA,EAAG;EACpC,MAAMC,oBAAoB,GAAGP,SAAS,CAAIQ,MAAM,IAAM;IACrD,OAAOA,MAAM,CAAEX,WAAY,CAAC,CAACY,iBAAiB,CAAC,CAAC,CAACC,kBAAkB;EACpE,CAAC,EAAE,EAAG,CAAC;EACP,MAAM;IAAEC;EAAiB,CAAC,GAAGZ,WAAW,CAAEF,WAAY,CAAC;EAEvD,MAAM;IAAEe;EAAsB,CAAC,GAAGZ,SAAS,CAAIQ,MAAM,IAAM;IAC1D,MAAM;MAAEK;IAAgB,CAAC,GAAGL,MAAM,CAAEH,aAAc,CAAC;IAEnD,OAAO;MACNO,qBAAqB,EAAEC,eAAe,CAAE,cAAe;IACxD,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMC,QAAQ,GAAGV,MAAM,CAAC,CAAC;EAEzBD,SAAS,CAAE,MAAM;IAChB,IAAKS,qBAAqB,EAAG;MAC5B;IACD;IACAE,QAAQ,EAAEC,OAAO,EAAEC,KAAK,CAAC,CAAC;EAC3B,CAAC,EAAE,CAAEJ,qBAAqB,CAAG,CAAC;EAE9B,OACCK,aAAA;IAAKC,SAAS,EAAC;EAAuB,GACnCX,oBAAoB,IACrBU,aAAA;IAAKC,SAAS,EAAC;EAAgC,GAC9CD,aAAA,aAAMhB,EAAE,CAAE,cAAe,CAAO,CAAC,EACjCgB,aAAA,CAACnB,MAAM;IACNqB,OAAO,EAAC,UAAU;IAClBC,OAAO,EAAGA,CAAA,KAAMT,gBAAgB,CAAE,QAAS,CAAG;IAC9CU,QAAQ,EAAGnB,eAAe,CAACoB,SAAS,CAAE,GAAI;EAAG,GAE3CrB,EAAE,CAAE,kBAAmB,CAClB,CACJ,CACL,EACDgB,aAAA;IAAKC,SAAS,EAAC;EAA6B,GAC3CD,aAAA,CAACtB,YAAY;IAAC4B,GAAG,EAAGT;EAAU,CAAE,CAAC,EACjCG,aAAA,CAACvB,cAAc,MAAE,CACb,CACD,CAAC;AAER"}
|
|
1
|
+
{"version":3,"names":["PostTextEditor","PostTitleRaw","store","editorStore","Button","useDispatch","useSelect","__","displayShortcut","useEffect","useRef","editPostStore","TextEditor","isRichEditingEnabled","select","getEditorSettings","richEditingEnabled","switchEditorMode","isWelcomeGuideVisible","isFeatureActive","titleRef","current","focus","createElement","className","variant","onClick","shortcut","secondary","ref"],"sources":["@wordpress/edit-post/src/components/text-editor/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPostTextEditor,\n\tPostTitleRaw,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { Button } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { useEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nexport default function TextEditor() {\n\tconst isRichEditingEnabled = useSelect( ( select ) => {\n\t\treturn select( editorStore ).getEditorSettings().richEditingEnabled;\n\t}, [] );\n\tconst { switchEditorMode } = useDispatch( editorStore );\n\n\tconst { isWelcomeGuideVisible } = useSelect( ( select ) => {\n\t\tconst { isFeatureActive } = select( editPostStore );\n\n\t\treturn {\n\t\t\tisWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),\n\t\t};\n\t}, [] );\n\n\tconst titleRef = useRef();\n\n\tuseEffect( () => {\n\t\tif ( isWelcomeGuideVisible ) {\n\t\t\treturn;\n\t\t}\n\t\ttitleRef?.current?.focus();\n\t}, [ isWelcomeGuideVisible ] );\n\n\treturn (\n\t\t<div className=\"edit-post-text-editor\">\n\t\t\t{ isRichEditingEnabled && (\n\t\t\t\t<div className=\"edit-post-text-editor__toolbar\">\n\t\t\t\t\t<h2>{ __( 'Editing code' ) }</h2>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => switchEditorMode( 'visual' ) }\n\t\t\t\t\t\tshortcut={ displayShortcut.secondary( 'm' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Exit code editor' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"edit-post-text-editor__body\">\n\t\t\t\t<PostTitleRaw ref={ titleRef } />\n\t\t\t\t<PostTextEditor />\n\t\t\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AO,CAAC,EACjCgB,aAAA,CAACnB,MAAM;IACNqB,OAAO,EAAC,UAAU;IAClBC,OAAO,EAAGA,CAAA,KAAMT,gBAAgB,CAAE,QAAS,CAAG;IAC9CU,QAAQ,EAAGnB,eAAe,CAACoB,SAAS,CAAE,GAAI;EAAG,GAE3CrB,EAAE,CAAE,kBAAmB,CAClB,CACJ,CACL,EACDgB,aAAA;IAAKC,SAAS,EAAC;EAA6B,GAC3CD,aAAA,CAACtB,YAAY;IAAC4B,GAAG,EAAGT;EAAU,CAAE,CAAC,EACjCG,aAAA,CAACvB,cAAc,MAAE,CACb,CACD,CAAC;AAER","ignoreList":[]}
|
|
@@ -21,7 +21,7 @@ export function BlockInspectorButton({
|
|
|
21
21
|
shortcut,
|
|
22
22
|
areAdvancedSettingsOpened
|
|
23
23
|
} = useSelect(select => ({
|
|
24
|
-
shortcut: select(keyboardShortcutsStore).getShortcutRepresentation('core/
|
|
24
|
+
shortcut: select(keyboardShortcutsStore).getShortcutRepresentation('core/editor/toggle-sidebar'),
|
|
25
25
|
areAdvancedSettingsOpened: select(editPostStore).getActiveGeneralSidebarName() === 'edit-post/block'
|
|
26
26
|
}), []);
|
|
27
27
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","MenuItem","useSelect","useDispatch","speak","store","keyboardShortcutsStore","editPostStore","noop","BlockInspectorButton","onClick","small","shortcut","areAdvancedSettingsOpened","select","getShortcutRepresentation","getActiveGeneralSidebarName","openGeneralSidebar","closeGeneralSidebar","label","createElement"],"sources":["@wordpress/edit-post/src/components/visual-editor/block-inspector-button.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuItem } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { speak } from '@wordpress/a11y';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nconst noop = () => {};\n\nexport function BlockInspectorButton( { onClick = noop, small = false } ) {\n\tconst { shortcut, areAdvancedSettingsOpened } = useSelect(\n\t\t( select ) => ( {\n\t\t\tshortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getShortcutRepresentation( 'core/
|
|
1
|
+
{"version":3,"names":["__","MenuItem","useSelect","useDispatch","speak","store","keyboardShortcutsStore","editPostStore","noop","BlockInspectorButton","onClick","small","shortcut","areAdvancedSettingsOpened","select","getShortcutRepresentation","getActiveGeneralSidebarName","openGeneralSidebar","closeGeneralSidebar","label","createElement"],"sources":["@wordpress/edit-post/src/components/visual-editor/block-inspector-button.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuItem } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { speak } from '@wordpress/a11y';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nconst noop = () => {};\n\nexport function BlockInspectorButton( { onClick = noop, small = false } ) {\n\tconst { shortcut, areAdvancedSettingsOpened } = useSelect(\n\t\t( select ) => ( {\n\t\t\tshortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getShortcutRepresentation( 'core/editor/toggle-sidebar' ),\n\t\t\tareAdvancedSettingsOpened:\n\t\t\t\tselect( editPostStore ).getActiveGeneralSidebarName() ===\n\t\t\t\t'edit-post/block',\n\t\t} ),\n\t\t[]\n\t);\n\tconst { openGeneralSidebar, closeGeneralSidebar } =\n\t\tuseDispatch( editPostStore );\n\n\tconst label = areAdvancedSettingsOpened\n\t\t? __( 'Hide more settings' )\n\t\t: __( 'Show more settings' );\n\n\treturn (\n\t\t<MenuItem\n\t\t\tonClick={ () => {\n\t\t\t\tif ( areAdvancedSettingsOpened ) {\n\t\t\t\t\tcloseGeneralSidebar();\n\t\t\t\t\tspeak( __( 'Block settings closed' ) );\n\t\t\t\t} else {\n\t\t\t\t\topenGeneralSidebar( 'edit-post/block' );\n\t\t\t\t\tspeak(\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'Additional settings are now available in the Editor block settings sidebar'\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tonClick();\n\t\t\t} }\n\t\t\tshortcut={ shortcut }\n\t\t>\n\t\t\t{ ! small && label }\n\t\t</MenuItem>\n\t);\n}\n\nexport default BlockInspectorButton;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,KAAK,QAAQ,iBAAiB;AACvC,SAASC,KAAK,IAAIC,sBAAsB,QAAQ,+BAA+B;;AAE/E;AACA;AACA;AACA,SAASD,KAAK,IAAIE,aAAa,QAAQ,aAAa;AAEpD,MAAMC,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAErB,OAAO,SAASC,oBAAoBA,CAAE;EAAEC,OAAO,GAAGF,IAAI;EAAEG,KAAK,GAAG;AAAM,CAAC,EAAG;EACzE,MAAM;IAAEC,QAAQ;IAAEC;EAA0B,CAAC,GAAGX,SAAS,CACtDY,MAAM,KAAQ;IACfF,QAAQ,EAAEE,MAAM,CACfR,sBACD,CAAC,CAACS,yBAAyB,CAAE,4BAA6B,CAAC;IAC3DF,yBAAyB,EACxBC,MAAM,CAAEP,aAAc,CAAC,CAACS,2BAA2B,CAAC,CAAC,KACrD;EACF,CAAC,CAAE,EACH,EACD,CAAC;EACD,MAAM;IAAEC,kBAAkB;IAAEC;EAAoB,CAAC,GAChDf,WAAW,CAAEI,aAAc,CAAC;EAE7B,MAAMY,KAAK,GAAGN,yBAAyB,GACpCb,EAAE,CAAE,oBAAqB,CAAC,GAC1BA,EAAE,CAAE,oBAAqB,CAAC;EAE7B,OACCoB,aAAA,CAACnB,QAAQ;IACRS,OAAO,EAAGA,CAAA,KAAM;MACf,IAAKG,yBAAyB,EAAG;QAChCK,mBAAmB,CAAC,CAAC;QACrBd,KAAK,CAAEJ,EAAE,CAAE,uBAAwB,CAAE,CAAC;MACvC,CAAC,MAAM;QACNiB,kBAAkB,CAAE,iBAAkB,CAAC;QACvCb,KAAK,CACJJ,EAAE,CACD,4EACD,CACD,CAAC;MACF;MACAU,OAAO,CAAC,CAAC;IACV,CAAG;IACHE,QAAQ,EAAGA;EAAU,GAEnB,CAAED,KAAK,IAAIQ,KACJ,CAAC;AAEb;AAEA,eAAeV,oBAAoB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","memo","__","withDispatch","withSelect","compose","withPreferredColorScheme","PostTitle","store","blockEditorStore","useEditorWrapperStyles","Header","EditorHeader","editTitle","setTitleRef","title","wrapperStyles","createElement","style","innerRef","onUpdate","placeholder","accessibilityLabel","prevProps","nextProps","select","getEditedPostAttribute","dispatch","editPost","clearSelectedBlock"],"sources":["@wordpress/edit-post/src/components/visual-editor/header.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { memo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { compose, withPreferredColorScheme } from '@wordpress/compose';\nimport { PostTitle } from '@wordpress/editor';\nimport {\n\tstore as blockEditorStore,\n\tuseEditorWrapperStyles,\n} from '@wordpress/block-editor';\n\nconst Header = memo(\n\tfunction EditorHeader( { editTitle, setTitleRef, title } ) {\n\t\tconst [ wrapperStyles ] = useEditorWrapperStyles();\n\t\treturn (\n\t\t\t<View style={ wrapperStyles }>\n\t\t\t\t<PostTitle\n\t\t\t\t\tinnerRef={ setTitleRef }\n\t\t\t\t\ttitle={ title }\n\t\t\t\t\tonUpdate={ editTitle }\n\t\t\t\t\tplaceholder={ __( 'Add title' ) }\n\t\t\t\t\taccessibilityLabel=\"post-title\"\n\t\t\t\t/>\n\t\t\t</View>\n\t\t);\n\t},\n\t( prevProps, nextProps ) => prevProps.title === nextProps.title\n);\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( 'core/editor' );\n\n\t\treturn {\n\t\t\ttitle: getEditedPostAttribute( 'title' ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { editPost } = dispatch( 'core/editor' );\n\n\t\tconst { clearSelectedBlock } = dispatch( blockEditorStore );\n\n\t\treturn {\n\t\t\tclearSelectedBlock,\n\t\t\teditTitle( title ) {\n\t\t\t\teditPost( { title } );\n\t\t\t},\n\t\t};\n\t} ),\n\twithPreferredColorScheme,\n] )( Header );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,cAAc;;AAEnC;AACA;AACA;AACA,SAASC,IAAI,QAAQ,oBAAoB;AACzC,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAC1D,SAASC,OAAO,EAAEC,wBAAwB,QAAQ,oBAAoB;AACtE,SAASC,SAAS,QAAQ,mBAAmB;AAC7C,SACCC,KAAK,IAAIC,gBAAgB,EACzBC,sBAAsB,QAChB,yBAAyB;AAEhC,MAAMC,MAAM,GAAGV,IAAI,CAClB,SAASW,YAAYA,CAAE;EAAEC,SAAS;EAAEC,WAAW;EAAEC;AAAM,CAAC,EAAG;EAC1D,MAAM,CAAEC,aAAa,CAAE,GAAGN,sBAAsB,CAAC,CAAC;EAClD,OACCO,aAAA,CAACjB,IAAI;IAACkB,KAAK,EAAGF;EAAe,GAC5BC,aAAA,CAACV,SAAS;IACTY,QAAQ,EAAGL,WAAa;IACxBC,KAAK,EAAGA,KAAO;IACfK,QAAQ,EAAGP,SAAW;IACtBQ,WAAW,EAAGnB,EAAE,CAAE,WAAY,CAAG;IACjCoB,kBAAkB,EAAC;EAAY,CAC/B,CACI,CAAC;AAET,CAAC,EACD,CAAEC,SAAS,EAAEC,SAAS,KAAMD,SAAS,CAACR,KAAK,KAAKS,SAAS,CAACT,KAC3D,CAAC;AAED,eAAeV,OAAO,CAAE,CACvBD,UAAU,CAAIqB,MAAM,IAAM;EACzB,MAAM;IAAEC;EAAuB,CAAC,GAAGD,MAAM,CAAE,aAAc,CAAC;EAE1D,OAAO;IACNV,KAAK,EAAEW,sBAAsB,CAAE,OAAQ;EACxC,CAAC;AACF,CAAE,CAAC,EACHvB,YAAY,CAAIwB,QAAQ,IAAM;EAC7B,MAAM;IAAEC;EAAS,CAAC,GAAGD,QAAQ,CAAE,aAAc,CAAC;EAE9C,MAAM;IAAEE;EAAmB,CAAC,GAAGF,QAAQ,CAAElB,gBAAiB,CAAC;EAE3D,OAAO;IACNoB,kBAAkB;IAClBhB,SAASA,CAAEE,KAAK,EAAG;MAClBa,QAAQ,CAAE;QAAEb;MAAM,CAAE,CAAC;IACtB;EACD,CAAC;AACF,CAAE,CAAC,EACHT,wBAAwB,CACvB,CAAC,CAAEK,MAAO,CAAC"}
|
|
1
|
+
{"version":3,"names":["View","memo","__","withDispatch","withSelect","compose","withPreferredColorScheme","PostTitle","store","blockEditorStore","useEditorWrapperStyles","Header","EditorHeader","editTitle","setTitleRef","title","wrapperStyles","createElement","style","innerRef","onUpdate","placeholder","accessibilityLabel","prevProps","nextProps","select","getEditedPostAttribute","dispatch","editPost","clearSelectedBlock"],"sources":["@wordpress/edit-post/src/components/visual-editor/header.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { memo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { compose, withPreferredColorScheme } from '@wordpress/compose';\nimport { PostTitle } from '@wordpress/editor';\nimport {\n\tstore as blockEditorStore,\n\tuseEditorWrapperStyles,\n} from '@wordpress/block-editor';\n\nconst Header = memo(\n\tfunction EditorHeader( { editTitle, setTitleRef, title } ) {\n\t\tconst [ wrapperStyles ] = useEditorWrapperStyles();\n\t\treturn (\n\t\t\t<View style={ wrapperStyles }>\n\t\t\t\t<PostTitle\n\t\t\t\t\tinnerRef={ setTitleRef }\n\t\t\t\t\ttitle={ title }\n\t\t\t\t\tonUpdate={ editTitle }\n\t\t\t\t\tplaceholder={ __( 'Add title' ) }\n\t\t\t\t\taccessibilityLabel=\"post-title\"\n\t\t\t\t/>\n\t\t\t</View>\n\t\t);\n\t},\n\t( prevProps, nextProps ) => prevProps.title === nextProps.title\n);\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( 'core/editor' );\n\n\t\treturn {\n\t\t\ttitle: getEditedPostAttribute( 'title' ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { editPost } = dispatch( 'core/editor' );\n\n\t\tconst { clearSelectedBlock } = dispatch( blockEditorStore );\n\n\t\treturn {\n\t\t\tclearSelectedBlock,\n\t\t\teditTitle( title ) {\n\t\t\t\teditPost( { title } );\n\t\t\t},\n\t\t};\n\t} ),\n\twithPreferredColorScheme,\n] )( Header );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,cAAc;;AAEnC;AACA;AACA;AACA,SAASC,IAAI,QAAQ,oBAAoB;AACzC,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAC1D,SAASC,OAAO,EAAEC,wBAAwB,QAAQ,oBAAoB;AACtE,SAASC,SAAS,QAAQ,mBAAmB;AAC7C,SACCC,KAAK,IAAIC,gBAAgB,EACzBC,sBAAsB,QAChB,yBAAyB;AAEhC,MAAMC,MAAM,GAAGV,IAAI,CAClB,SAASW,YAAYA,CAAE;EAAEC,SAAS;EAAEC,WAAW;EAAEC;AAAM,CAAC,EAAG;EAC1D,MAAM,CAAEC,aAAa,CAAE,GAAGN,sBAAsB,CAAC,CAAC;EAClD,OACCO,aAAA,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