@wordpress/edit-post 7.16.0 → 7.17.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 +2 -0
- package/README.md +6 -1
- package/build/components/block-manager/category.js +1 -14
- package/build/components/block-manager/category.js.map +1 -1
- package/build/components/block-manager/checklist.js +1 -5
- package/build/components/block-manager/checklist.js.map +1 -1
- package/build/components/block-manager/index.js +11 -23
- package/build/components/block-manager/index.js.map +1 -1
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +3 -11
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
- package/build/components/browser-url/index.js +6 -23
- package/build/components/browser-url/index.js.map +1 -1
- package/build/components/device-preview/index.js +1 -11
- package/build/components/device-preview/index.js.map +1 -1
- package/build/components/editor-initialization/index.js +0 -2
- package/build/components/editor-initialization/index.js.map +1 -1
- package/build/components/editor-initialization/listener-hooks.js +1 -12
- package/build/components/editor-initialization/listener-hooks.js.map +1 -1
- package/build/components/header/document-actions/index.js +1 -17
- package/build/components/header/document-actions/index.js.map +1 -1
- package/build/components/header/fullscreen-mode-close/index.js +3 -22
- package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
- package/build/components/header/header-toolbar/index.js +5 -22
- package/build/components/header/header-toolbar/index.js.map +1 -1
- package/build/components/header/header-toolbar/index.native.js +2 -24
- package/build/components/header/header-toolbar/index.native.js.map +1 -1
- package/build/components/header/index.js +3 -20
- package/build/components/header/index.js.map +1 -1
- package/build/components/header/index.native.js +1 -13
- package/build/components/header/index.native.js.map +1 -1
- package/build/components/header/main-dashboard-button/index.js +1 -7
- package/build/components/header/main-dashboard-button/index.js.map +1 -1
- package/build/components/header/mode-switcher/index.js +6 -21
- package/build/components/header/mode-switcher/index.js.map +1 -1
- package/build/components/header/more-menu/index.js +1 -12
- package/build/components/header/more-menu/index.js.map +1 -1
- package/build/components/header/plugin-more-menu-item/index.js +0 -8
- package/build/components/header/plugin-more-menu-item/index.js.map +1 -1
- package/build/components/header/plugin-sidebar-more-menu-item/index.js +3 -4
- package/build/components/header/plugin-sidebar-more-menu-item/index.js.map +1 -1
- package/build/components/header/post-publish-button-or-toggle.js +2 -11
- package/build/components/header/post-publish-button-or-toggle.js.map +1 -1
- package/build/components/header/preferences-menu-item/index.js +1 -7
- package/build/components/header/preferences-menu-item/index.js.map +1 -1
- package/build/components/header/tools-more-menu-group/index.js +1 -6
- package/build/components/header/tools-more-menu-group/index.js.map +1 -1
- package/build/components/header/writing-menu/index.js +1 -15
- package/build/components/header/writing-menu/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +1 -2
- package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -9
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +4 -25
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +1 -6
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +4 -23
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/layout/actions-panel.js +7 -17
- package/build/components/layout/actions-panel.js.map +1 -1
- package/build/components/layout/index.js +47 -82
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/index.native.js +5 -34
- package/build/components/layout/index.native.js.map +1 -1
- package/build/components/meta-boxes/index.js +4 -12
- package/build/components/meta-boxes/index.js.map +1 -1
- package/build/components/meta-boxes/meta-box-visibility.js +1 -12
- package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
- package/build/components/meta-boxes/meta-boxes-area/index.js +0 -10
- package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
- package/build/components/preferences-modal/index.js +1 -18
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/preferences-modal/meta-boxes-section.js +3 -13
- package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build/components/preferences-modal/options/enable-custom-fields.js +10 -11
- package/build/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
- package/build/components/preferences-modal/options/enable-feature.js +0 -7
- package/build/components/preferences-modal/options/enable-feature.js.map +1 -1
- package/build/components/preferences-modal/options/enable-panel.js +0 -7
- package/build/components/preferences-modal/options/enable-panel.js.map +1 -1
- package/build/components/preferences-modal/options/enable-plugin-document-setting-panel.js +1 -6
- package/build/components/preferences-modal/options/enable-plugin-document-setting-panel.js.map +1 -1
- package/build/components/preferences-modal/options/enable-publish-sidebar.js +2 -8
- package/build/components/preferences-modal/options/enable-publish-sidebar.js.map +1 -1
- package/build/components/preferences-modal/options/index.js +0 -6
- package/build/components/preferences-modal/options/index.js.map +1 -1
- package/build/components/secondary-sidebar/inserter-sidebar.js +1 -9
- package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-outline.js +1 -8
- package/build/components/secondary-sidebar/list-view-outline.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +32 -44
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/components/sidebar/discussion-panel/index.js +0 -11
- package/build/components/sidebar/discussion-panel/index.js.map +1 -1
- package/build/components/sidebar/featured-image/index.js +0 -15
- package/build/components/sidebar/featured-image/index.js.map +1 -1
- package/build/components/sidebar/last-revision/index.js +1 -5
- package/build/components/sidebar/last-revision/index.js.map +1 -1
- package/build/components/sidebar/page-attributes/index.js +0 -14
- package/build/components/sidebar/page-attributes/index.js.map +1 -1
- package/build/components/sidebar/plugin-document-setting-panel/index.js +44 -61
- package/build/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
- package/build/components/sidebar/plugin-post-publish-panel/index.js +19 -25
- package/build/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
- package/build/components/sidebar/plugin-post-status-info/index.js +2 -5
- package/build/components/sidebar/plugin-post-status-info/index.js.map +1 -1
- package/build/components/sidebar/plugin-pre-publish-panel/index.js +19 -25
- package/build/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
- package/build/components/sidebar/plugin-sidebar/index.js +0 -8
- package/build/components/sidebar/plugin-sidebar/index.js.map +1 -1
- package/build/components/sidebar/post-author/index.js +1 -5
- package/build/components/sidebar/post-author/index.js.map +1 -1
- package/build/components/sidebar/post-excerpt/index.js +0 -13
- package/build/components/sidebar/post-excerpt/index.js.map +1 -1
- package/build/components/sidebar/post-format/index.js +1 -5
- package/build/components/sidebar/post-format/index.js.map +1 -1
- package/build/components/sidebar/post-pending-status/index.js +1 -5
- package/build/components/sidebar/post-pending-status/index.js.map +1 -1
- package/build/components/sidebar/post-schedule/index.js +5 -9
- package/build/components/sidebar/post-schedule/index.js.map +1 -1
- package/build/components/sidebar/post-slug/index.js +1 -5
- package/build/components/sidebar/post-slug/index.js.map +1 -1
- package/build/components/sidebar/post-status/index.js +0 -24
- package/build/components/sidebar/post-status/index.js.map +1 -1
- package/build/components/sidebar/post-sticky/index.js +1 -5
- package/build/components/sidebar/post-sticky/index.js.map +1 -1
- package/build/components/sidebar/post-taxonomies/index.js +1 -6
- package/build/components/sidebar/post-taxonomies/index.js.map +1 -1
- package/build/components/sidebar/post-taxonomies/taxonomy-panel.js +1 -11
- package/build/components/sidebar/post-taxonomies/taxonomy-panel.js.map +1 -1
- package/build/components/sidebar/post-template/create-modal.js +1 -16
- package/build/components/sidebar/post-template/create-modal.js.map +1 -1
- package/build/components/sidebar/post-template/form.js +3 -16
- package/build/components/sidebar/post-template/form.js.map +1 -1
- package/build/components/sidebar/post-template/index.js +5 -24
- package/build/components/sidebar/post-template/index.js.map +1 -1
- package/build/components/sidebar/post-trash/index.js +1 -3
- package/build/components/sidebar/post-trash/index.js.map +1 -1
- package/build/components/sidebar/post-url/index.js +5 -9
- package/build/components/sidebar/post-url/index.js.map +1 -1
- package/build/components/sidebar/post-visibility/index.js +5 -10
- package/build/components/sidebar/post-visibility/index.js.map +1 -1
- package/build/components/sidebar/settings-header/index.js +12 -17
- package/build/components/sidebar/settings-header/index.js.map +1 -1
- package/build/components/sidebar/settings-sidebar/index.js +2 -29
- package/build/components/sidebar/settings-sidebar/index.js.map +1 -1
- package/build/components/sidebar/template-summary/index.js +1 -9
- package/build/components/sidebar/template-summary/index.js.map +1 -1
- package/build/components/start-page-options/index.js +1 -15
- package/build/components/start-page-options/index.js.map +1 -1
- package/build/components/text-editor/index.js +1 -8
- package/build/components/text-editor/index.js.map +1 -1
- package/build/components/view-link/index.js +3 -10
- package/build/components/view-link/index.js.map +1 -1
- package/build/components/visual-editor/block-inspector-button.js +1 -11
- package/build/components/visual-editor/block-inspector-button.js.map +1 -1
- package/build/components/visual-editor/header.native.js +1 -12
- package/build/components/visual-editor/header.native.js.map +1 -1
- package/build/components/visual-editor/index.js +33 -53
- package/build/components/visual-editor/index.js.map +1 -1
- package/build/components/visual-editor/index.native.js +1 -9
- package/build/components/visual-editor/index.native.js.map +1 -1
- package/build/components/welcome-guide/default.js +1 -8
- package/build/components/welcome-guide/default.js.map +1 -1
- package/build/components/welcome-guide/image.js +0 -2
- package/build/components/welcome-guide/image.js.map +1 -1
- package/build/components/welcome-guide/index.js +1 -11
- package/build/components/welcome-guide/index.js.map +1 -1
- package/build/components/welcome-guide/template.js +1 -8
- package/build/components/welcome-guide/template.js.map +1 -1
- package/build/editor.js +7 -29
- package/build/editor.js.map +1 -1
- package/build/editor.native.js +10 -35
- package/build/editor.native.js.map +1 -1
- package/build/hooks/commands/use-common-commands.js +10 -24
- package/build/hooks/commands/use-common-commands.js.map +1 -1
- package/build/hooks/components/index.js +1 -3
- package/build/hooks/components/index.js.map +1 -1
- package/build/hooks/index.js +0 -1
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/validate-multiple-use/index.js +10 -18
- package/build/hooks/validate-multiple-use/index.js.map +1 -1
- package/build/index.js +14 -47
- package/build/index.js.map +1 -1
- package/build/index.native.js +0 -9
- package/build/index.native.js.map +1 -1
- package/build/lock-unlock.js +1 -2
- package/build/lock-unlock.js.map +1 -1
- package/build/plugins/copy-content-menu-item/index.js +1 -10
- package/build/plugins/copy-content-menu-item/index.js.map +1 -1
- package/build/plugins/index.js +5 -22
- package/build/plugins/index.js.map +1 -1
- package/build/plugins/keyboard-shortcuts-help-menu-item/index.js +1 -10
- package/build/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
- package/build/plugins/welcome-guide-menu-item/index.js +1 -6
- package/build/plugins/welcome-guide-menu-item/index.js.map +1 -1
- package/build/store/actions.js +53 -120
- package/build/store/actions.js.map +1 -1
- package/build/store/constants.js +2 -3
- package/build/store/constants.js.map +1 -1
- package/build/store/index.js +0 -9
- package/build/store/index.js.map +1 -1
- package/build/store/reducer.js +9 -42
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +63 -91
- package/build/store/selectors.js.map +1 -1
- package/build/utils/meta-boxes.js +0 -4
- package/build/utils/meta-boxes.js.map +1 -1
- package/build-module/components/block-manager/category.js +1 -8
- package/build-module/components/block-manager/category.js.map +1 -1
- package/build-module/components/block-manager/checklist.js +0 -3
- package/build-module/components/block-manager/checklist.js.map +1 -1
- package/build-module/components/block-manager/index.js +11 -14
- package/build-module/components/block-manager/index.js.map +1 -1
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +2 -8
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
- package/build-module/components/browser-url/index.js +7 -14
- package/build-module/components/browser-url/index.js.map +1 -1
- package/build-module/components/device-preview/index.js +1 -3
- package/build-module/components/device-preview/index.js.map +1 -1
- package/build-module/components/editor-initialization/index.js +1 -1
- package/build-module/components/editor-initialization/index.js.map +1 -1
- package/build-module/components/editor-initialization/listener-hooks.js +3 -5
- package/build-module/components/editor-initialization/listener-hooks.js.map +1 -1
- package/build-module/components/header/document-actions/index.js +1 -10
- package/build-module/components/header/document-actions/index.js.map +1 -1
- package/build-module/components/header/fullscreen-mode-close/index.js +4 -13
- package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
- package/build-module/components/header/header-toolbar/index.js +5 -13
- package/build-module/components/header/header-toolbar/index.js.map +1 -1
- package/build-module/components/header/header-toolbar/index.native.js +3 -11
- package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
- package/build-module/components/header/index.js +3 -5
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/header/index.native.js +2 -9
- package/build-module/components/header/index.native.js.map +1 -1
- package/build-module/components/header/main-dashboard-button/index.js +0 -5
- package/build-module/components/header/main-dashboard-button/index.js.map +1 -1
- package/build-module/components/header/mode-switcher/index.js +8 -16
- package/build-module/components/header/mode-switcher/index.js.map +1 -1
- package/build-module/components/header/more-menu/index.js +1 -4
- package/build-module/components/header/more-menu/index.js.map +1 -1
- package/build-module/components/header/plugin-more-menu-item/index.js +1 -2
- package/build-module/components/header/plugin-more-menu-item/index.js.map +1 -1
- package/build-module/components/header/plugin-sidebar-more-menu-item/index.js +3 -2
- package/build-module/components/header/plugin-sidebar-more-menu-item/index.js.map +1 -1
- package/build-module/components/header/post-publish-button-or-toggle.js +2 -5
- package/build-module/components/header/post-publish-button-or-toggle.js.map +1 -1
- package/build-module/components/header/preferences-menu-item/index.js +1 -2
- package/build-module/components/header/preferences-menu-item/index.js.map +1 -1
- package/build-module/components/header/tools-more-menu-group/index.js +0 -3
- package/build-module/components/header/tools-more-menu-group/index.js.map +1 -1
- package/build-module/components/header/writing-menu/index.js +1 -8
- package/build-module/components/header/writing-menu/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -6
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +5 -13
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -5
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +4 -14
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/layout/actions-panel.js +6 -8
- package/build-module/components/layout/actions-panel.js.map +1 -1
- package/build-module/components/layout/index.js +50 -57
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/index.native.js +6 -20
- package/build-module/components/layout/index.native.js.map +1 -1
- package/build-module/components/meta-boxes/index.js +4 -6
- package/build-module/components/meta-boxes/index.js.map +1 -1
- package/build-module/components/meta-boxes/meta-box-visibility.js +1 -9
- package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
- package/build-module/components/meta-boxes/meta-boxes-area/index.js +3 -7
- package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +2 -5
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/preferences-modal/meta-boxes-section.js +3 -5
- package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build-module/components/preferences-modal/options/enable-custom-fields.js +9 -2
- package/build-module/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
- package/build-module/components/preferences-modal/options/enable-feature.js +1 -1
- package/build-module/components/preferences-modal/options/enable-feature.js.map +1 -1
- package/build-module/components/preferences-modal/options/enable-panel.js +1 -1
- package/build-module/components/preferences-modal/options/enable-panel.js.map +1 -1
- package/build-module/components/preferences-modal/options/enable-plugin-document-setting-panel.js +1 -4
- package/build-module/components/preferences-modal/options/enable-plugin-document-setting-panel.js.map +1 -1
- package/build-module/components/preferences-modal/options/enable-publish-sidebar.js +2 -1
- package/build-module/components/preferences-modal/options/enable-publish-sidebar.js.map +1 -1
- package/build-module/components/preferences-modal/options/index.js.map +1 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.js +1 -2
- package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-outline.js +0 -3
- package/build-module/components/secondary-sidebar/list-view-outline.js.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +32 -30
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build-module/components/sidebar/discussion-panel/index.js +2 -7
- package/build-module/components/sidebar/discussion-panel/index.js.map +1 -1
- package/build-module/components/sidebar/featured-image/index.js +2 -7
- package/build-module/components/sidebar/featured-image/index.js.map +1 -1
- package/build-module/components/sidebar/last-revision/index.js +0 -3
- package/build-module/components/sidebar/last-revision/index.js.map +1 -1
- package/build-module/components/sidebar/page-attributes/index.js +2 -7
- package/build-module/components/sidebar/page-attributes/index.js.map +1 -1
- package/build-module/components/sidebar/plugin-document-setting-panel/index.js +46 -55
- package/build-module/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
- package/build-module/components/sidebar/plugin-post-publish-panel/index.js +19 -22
- package/build-module/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
- package/build-module/components/sidebar/plugin-post-status-info/index.js +1 -3
- package/build-module/components/sidebar/plugin-post-status-info/index.js.map +1 -1
- package/build-module/components/sidebar/plugin-pre-publish-panel/index.js +19 -22
- package/build-module/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
- package/build-module/components/sidebar/plugin-sidebar/index.js +2 -3
- package/build-module/components/sidebar/plugin-sidebar/index.js.map +1 -1
- package/build-module/components/sidebar/post-author/index.js +0 -1
- package/build-module/components/sidebar/post-author/index.js.map +1 -1
- package/build-module/components/sidebar/post-excerpt/index.js +2 -7
- package/build-module/components/sidebar/post-excerpt/index.js.map +1 -1
- package/build-module/components/sidebar/post-format/index.js +0 -1
- package/build-module/components/sidebar/post-format/index.js.map +1 -1
- package/build-module/components/sidebar/post-pending-status/index.js +0 -1
- package/build-module/components/sidebar/post-pending-status/index.js.map +1 -1
- package/build-module/components/sidebar/post-schedule/index.js +4 -5
- package/build-module/components/sidebar/post-schedule/index.js.map +1 -1
- package/build-module/components/sidebar/post-slug/index.js +0 -1
- package/build-module/components/sidebar/post-slug/index.js.map +1 -1
- package/build-module/components/sidebar/post-status/index.js +2 -6
- package/build-module/components/sidebar/post-status/index.js.map +1 -1
- package/build-module/components/sidebar/post-sticky/index.js +0 -1
- package/build-module/components/sidebar/post-sticky/index.js.map +1 -1
- package/build-module/components/sidebar/post-taxonomies/index.js +1 -4
- package/build-module/components/sidebar/post-taxonomies/index.js.map +1 -1
- package/build-module/components/sidebar/post-taxonomies/taxonomy-panel.js +1 -7
- package/build-module/components/sidebar/post-taxonomies/taxonomy-panel.js.map +1 -1
- package/build-module/components/sidebar/post-template/create-modal.js +1 -10
- package/build-module/components/sidebar/post-template/create-modal.js.map +1 -1
- package/build-module/components/sidebar/post-template/form.js +3 -6
- package/build-module/components/sidebar/post-template/form.js.map +1 -1
- package/build-module/components/sidebar/post-template/index.js +5 -16
- package/build-module/components/sidebar/post-template/index.js.map +1 -1
- package/build-module/components/sidebar/post-trash/index.js +0 -1
- package/build-module/components/sidebar/post-trash/index.js.map +1 -1
- package/build-module/components/sidebar/post-url/index.js +4 -5
- package/build-module/components/sidebar/post-url/index.js.map +1 -1
- package/build-module/components/sidebar/post-visibility/index.js +4 -6
- package/build-module/components/sidebar/post-visibility/index.js.map +1 -1
- package/build-module/components/sidebar/settings-header/index.js +12 -13
- package/build-module/components/sidebar/settings-header/index.js.map +1 -1
- package/build-module/components/sidebar/settings-sidebar/index.js +2 -9
- package/build-module/components/sidebar/settings-sidebar/index.js.map +1 -1
- package/build-module/components/sidebar/template-summary/index.js +1 -6
- package/build-module/components/sidebar/template-summary/index.js.map +1 -1
- package/build-module/components/start-page-options/index.js +1 -8
- package/build-module/components/start-page-options/index.js.map +1 -1
- package/build-module/components/text-editor/index.js +1 -2
- package/build-module/components/text-editor/index.js.map +1 -1
- package/build-module/components/view-link/index.js +2 -3
- package/build-module/components/view-link/index.js.map +1 -1
- package/build-module/components/visual-editor/block-inspector-button.js +1 -5
- package/build-module/components/visual-editor/block-inspector-button.js.map +1 -1
- package/build-module/components/visual-editor/header.native.js +1 -4
- package/build-module/components/visual-editor/header.native.js.map +1 -1
- package/build-module/components/visual-editor/index.js +34 -43
- package/build-module/components/visual-editor/index.js.map +1 -1
- package/build-module/components/visual-editor/index.native.js +1 -5
- package/build-module/components/visual-editor/index.native.js.map +1 -1
- package/build-module/components/welcome-guide/default.js +1 -2
- 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 +1 -6
- package/build-module/components/welcome-guide/index.js.map +1 -1
- package/build-module/components/welcome-guide/template.js +1 -2
- package/build-module/components/welcome-guide/template.js.map +1 -1
- package/build-module/editor.js +7 -14
- package/build-module/editor.js.map +1 -1
- package/build-module/editor.native.js +11 -23
- package/build-module/editor.native.js.map +1 -1
- package/build-module/hooks/commands/use-common-commands.js +11 -14
- package/build-module/hooks/commands/use-common-commands.js.map +1 -1
- package/build-module/hooks/components/index.js +0 -2
- package/build-module/hooks/components/index.js.map +1 -1
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/validate-multiple-use/index.js +9 -11
- package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
- package/build-module/index.js +16 -25
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +2 -3
- 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 +0 -3
- package/build-module/plugins/copy-content-menu-item/index.js.map +1 -1
- package/build-module/plugins/index.js +5 -11
- package/build-module/plugins/index.js.map +1 -1
- package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js +1 -2
- package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
- package/build-module/plugins/welcome-guide-menu-item/index.js +1 -2
- package/build-module/plugins/welcome-guide-menu-item/index.js.map +1 -1
- package/build-module/store/actions.js +55 -66
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/constants.js +2 -2
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/index.js +2 -2
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/reducer.js +10 -33
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +63 -64
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/meta-boxes.js +0 -2
- package/build-module/utils/meta-boxes.js.map +1 -1
- package/build-style/style-rtl.css +19 -9
- package/build-style/style.css +19 -9
- package/package.json +32 -32
- package/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +29 -0
- package/src/components/keyboard-shortcuts/index.js +2 -2
- package/src/components/layout/index.js +56 -40
- package/src/components/preferences-modal/options/enable-custom-fields.js +15 -4
- package/src/components/preferences-modal/options/test/enable-custom-fields.js +6 -1
- package/src/components/sidebar/plugin-document-setting-panel/index.js +54 -65
- package/src/components/sidebar/plugin-post-publish-panel/index.js +23 -27
- package/src/components/sidebar/plugin-pre-publish-panel/index.js +25 -28
- package/src/components/sidebar/post-schedule/style.scss +2 -0
- package/src/components/visual-editor/index.js +9 -8
- package/src/components/visual-editor/style.scss +5 -1
- package/src/hooks/commands/use-common-commands.js +8 -12
- package/src/store/selectors.js +10 -3
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createElement, Fragment } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
@@ -10,10 +9,10 @@ import { isRTL, __ } from '@wordpress/i18n';
|
|
|
10
9
|
import { drawerLeft, drawerRight } from '@wordpress/icons';
|
|
11
10
|
import { store as interfaceStore } from '@wordpress/interface';
|
|
12
11
|
import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
|
|
12
|
+
|
|
13
13
|
/**
|
|
14
14
|
* Internal dependencies
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
16
|
import SettingsHeader from '../settings-header';
|
|
18
17
|
import PostStatus from '../post-status';
|
|
19
18
|
import LastRevision from '../last-revision';
|
|
@@ -31,7 +30,6 @@ const SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select({
|
|
|
31
30
|
web: true,
|
|
32
31
|
native: false
|
|
33
32
|
});
|
|
34
|
-
|
|
35
33
|
const SettingsSidebar = () => {
|
|
36
34
|
const {
|
|
37
35
|
sidebarName,
|
|
@@ -46,15 +44,12 @@ const SettingsSidebar = () => {
|
|
|
46
44
|
// should contain the sidebar that will be active when the toggle button is pressed. If a block
|
|
47
45
|
// is selected, that should be edit-post/block otherwise it's edit-post/document.
|
|
48
46
|
let sidebar = select(interfaceStore).getActiveComplementaryArea(editPostStore.name);
|
|
49
|
-
|
|
50
47
|
if (!['edit-post/document', 'edit-post/block'].includes(sidebar)) {
|
|
51
48
|
if (select(blockEditorStore).getBlockSelectionStart()) {
|
|
52
49
|
sidebar = 'edit-post/block';
|
|
53
50
|
}
|
|
54
|
-
|
|
55
51
|
sidebar = 'edit-post/document';
|
|
56
52
|
}
|
|
57
|
-
|
|
58
53
|
const shortcut = select(keyboardShortcutsStore).getShortcutRepresentation('core/edit-post/toggle-sidebar');
|
|
59
54
|
return {
|
|
60
55
|
sidebarName: sidebar,
|
|
@@ -69,8 +64,7 @@ const SettingsSidebar = () => {
|
|
|
69
64
|
}),
|
|
70
65
|
closeLabel: __('Close Settings'),
|
|
71
66
|
headerClassName: "edit-post-sidebar__panel-tabs"
|
|
72
|
-
/* translators: button label text should, if possible, be under 16 characters.
|
|
73
|
-
,
|
|
67
|
+
/* translators: button label text should, if possible, be under 16 characters. */,
|
|
74
68
|
title: __('Settings'),
|
|
75
69
|
toggleShortcut: keyboardShortcut,
|
|
76
70
|
icon: isRTL() ? drawerLeft : drawerRight,
|
|
@@ -79,6 +73,5 @@ const SettingsSidebar = () => {
|
|
|
79
73
|
location: "side"
|
|
80
74
|
})), isTemplateMode && sidebarName === 'edit-post/document' && createElement(TemplateSummary, null), sidebarName === 'edit-post/block' && createElement(BlockInspector, null));
|
|
81
75
|
};
|
|
82
|
-
|
|
83
76
|
export default SettingsSidebar;
|
|
84
77
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["BlockInspector","store","blockEditorStore","useSelect","Platform","isRTL","__","drawerLeft","drawerRight","interfaceStore","keyboardShortcutsStore","SettingsHeader","PostStatus","LastRevision","PostTaxonomies","FeaturedImage","PostExcerpt","DiscussionPanel","PageAttributes","MetaBoxes","PluginDocumentSettingPanel","PluginSidebarEditPost","TemplateSummary","editPostStore","SIDEBAR_ACTIVE_BY_DEFAULT","select","web","native","SettingsSidebar","sidebarName","keyboardShortcut","isTemplateMode","sidebar","getActiveComplementaryArea","name","includes","getBlockSelectionStart","shortcut","getShortcutRepresentation","isEditingTemplate","createElement","identifier","header","closeLabel","headerClassName","title","toggleShortcut","icon","isActiveByDefault","Fragment","Slot","location"],"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 } from '@wordpress/data';\nimport { Platform } 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';\n\n/**\n * Internal dependencies\n */\nimport SettingsHeader from '../settings-header';\nimport PostStatus from '../post-status';\nimport LastRevision from '../last-revision';\nimport PostTaxonomies from '../post-taxonomies';\nimport FeaturedImage from '../featured-image';\nimport PostExcerpt from '../post-excerpt';\nimport DiscussionPanel from '../discussion-panel';\nimport PageAttributes from '../page-attributes';\nimport MetaBoxes from '../../meta-boxes';\nimport PluginDocumentSettingPanel from '../plugin-document-setting-panel';\nimport PluginSidebarEditPost from '../plugin-sidebar';\nimport TemplateSummary from '../template-summary';\nimport { store as editPostStore } from '../../../store';\n\nconst SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select( {\n\tweb: true,\n\tnative: false,\n} );\n\nconst SettingsSidebar = () => {\n\tconst { sidebarName, keyboardShortcut, isTemplateMode } = useSelect(\n\t\t( select ) => {\n\t\t\t// The settings sidebar is used by the edit-post/document and edit-post/block sidebars.\n\t\t\t// sidebarName represents the sidebar that is active or that should be active when the SettingsSidebar toggle button is pressed.\n\t\t\t// If one of the two sidebars is active the component will contain the content of that sidebar.\n\t\t\t// When neither of the two sidebars is active we can not simply return null, because the PluginSidebarEditPost\n\t\t\t// component, besides being used to render the sidebar, also renders the toggle button. In that case sidebarName\n\t\t\t// should contain the sidebar that will be active when the toggle button is pressed. If a block\n\t\t\t// is selected, that should be edit-post/block otherwise it's edit-post/document.\n\t\t\tlet sidebar = select( interfaceStore ).getActiveComplementaryArea(\n\t\t\t\teditPostStore.name\n\t\t\t);\n\t\t\tif (\n\t\t\t\t! [ 'edit-post/document', 'edit-post/block' ].includes(\n\t\t\t\t\tsidebar\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tif ( select( blockEditorStore ).getBlockSelectionStart() ) {\n\t\t\t\t\tsidebar = 'edit-post/block';\n\t\t\t\t}\n\t\t\t\tsidebar = 'edit-post/document';\n\t\t\t}\n\t\t\tconst shortcut = select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getShortcutRepresentation( 'core/edit-post/toggle-sidebar' );\n\t\t\treturn {\n\t\t\t\tsidebarName: sidebar,\n\t\t\t\tkeyboardShortcut: shortcut,\n\t\t\t\tisTemplateMode: select( editPostStore ).isEditingTemplate(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\treturn (\n\t\t<PluginSidebarEditPost\n\t\t\tidentifier={ sidebarName }\n\t\t\theader={ <SettingsHeader sidebarName={ sidebarName } /> }\n\t\t\tcloseLabel={ __( 'Close Settings' ) }\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{ ! isTemplateMode && sidebarName === 'edit-post/document' && (\n\t\t\t\t<>\n\t\t\t\t\t<PostStatus />\n\t\t\t\t\t<PluginDocumentSettingPanel.Slot />\n\t\t\t\t\t<LastRevision />\n\t\t\t\t\t<PostTaxonomies />\n\t\t\t\t\t<FeaturedImage />\n\t\t\t\t\t<PostExcerpt />\n\t\t\t\t\t<DiscussionPanel />\n\t\t\t\t\t<PageAttributes />\n\t\t\t\t\t<MetaBoxes location=\"side\" />\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ isTemplateMode && sidebarName === 'edit-post/document' && (\n\t\t\t\t<TemplateSummary />\n\t\t\t) }\n\t\t\t{ sidebarName === 'edit-post/block' && <BlockInspector /> }\n\t\t</PluginSidebarEditPost>\n\t);\n};\n\nexport default SettingsSidebar;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,cAAc,EACdC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,KAAK,EAAEC,EAAE,QAAQ,iBAAiB;AAC3C,SAASC,UAAU,EAAEC,WAAW,QAAQ,kBAAkB;AAC1D,SAASP,KAAK,IAAIQ,cAAc,QAAQ,sBAAsB;AAC9D,SAASR,KAAK,IAAIS,sBAAsB,QAAQ,+BAA+B;;AAE/E;AACA;AACA;AACA,OAAOC,cAAc,MAAM,oBAAoB;AAC/C,OAAOC,UAAU,MAAM,gBAAgB;AACvC,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,OAAOC,cAAc,MAAM,oBAAoB;AAC/C,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,OAAOC,WAAW,MAAM,iBAAiB;AACzC,OAAOC,eAAe,MAAM,qBAAqB;AAC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Aa,CAAE,CAAG;IACzDc,UAAU,EAAGrC,EAAE,CAAE,gBAAiB,CAAG;IACrCsC,eAAe,EAAC;IAChB;IACAC,KAAK,EAAGvC,EAAE,CAAE,UAAW,CAAG;IAC1BwC,cAAc,EAAGhB,gBAAkB;IACnCiB,IAAI,EAAG1C,KAAK,CAAC,CAAC,GAAGE,UAAU,GAAGC,WAAa;IAC3CwC,iBAAiB,EAAGxB;EAA2B,GAE7C,CAAEO,cAAc,IAAIF,WAAW,KAAK,oBAAoB,IACzDW,aAAA,CAAAS,QAAA,QACCT,aAAA,CAAC5B,UAAU,MAAE,CAAC,EACd4B,aAAA,CAACpB,0BAA0B,CAAC8B,IAAI,MAAE,CAAC,EACnCV,aAAA,CAAC3B,YAAY,MAAE,CAAC,EAChB2B,aAAA,CAAC1B,cAAc,MAAE,CAAC,EAClB0B,aAAA,CAACzB,aAAa,MAAE,CAAC,EACjByB,aAAA,CAACxB,WAAW,MAAE,CAAC,EACfwB,aAAA,CAACvB,eAAe,MAAE,CAAC,EACnBuB,aAAA,CAACtB,cAAc,MAAE,CAAC,EAClBsB,aAAA,CAACrB,SAAS;IAACgC,QAAQ,EAAC;EAAM,CAAE,CAC3B,CACF,EACCpB,cAAc,IAAIF,WAAW,KAAK,oBAAoB,IACvDW,aAAA,CAAClB,eAAe,MAAE,CAClB,EACCO,WAAW,KAAK,iBAAiB,IAAIW,aAAA,CAACxC,cAAc,MAAE,CAClC,CAAC;AAE1B,CAAC;AAED,eAAe4B,eAAe"}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import { createElement } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
6
5
|
import { Icon, layout } from '@wordpress/icons';
|
|
7
6
|
import { useSelect } from '@wordpress/data';
|
|
8
7
|
import { Flex, FlexItem, FlexBlock, PanelBody } from '@wordpress/components';
|
|
8
|
+
|
|
9
9
|
/**
|
|
10
10
|
* Internal dependencies
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
12
|
import { store as editPostStore } from '../../../store';
|
|
14
|
-
|
|
15
13
|
function TemplateSummary() {
|
|
16
14
|
const template = useSelect(select => {
|
|
17
15
|
const {
|
|
@@ -19,11 +17,9 @@ function TemplateSummary() {
|
|
|
19
17
|
} = select(editPostStore);
|
|
20
18
|
return getEditedPostTemplate();
|
|
21
19
|
}, []);
|
|
22
|
-
|
|
23
20
|
if (!template) {
|
|
24
21
|
return null;
|
|
25
22
|
}
|
|
26
|
-
|
|
27
23
|
return createElement(PanelBody, null, createElement(Flex, {
|
|
28
24
|
align: "flex-start",
|
|
29
25
|
gap: "3"
|
|
@@ -33,6 +29,5 @@ function TemplateSummary() {
|
|
|
33
29
|
className: "edit-post-template-summary__title"
|
|
34
30
|
}, template?.title || template?.slug), createElement("p", null, template?.description))));
|
|
35
31
|
}
|
|
36
|
-
|
|
37
32
|
export default TemplateSummary;
|
|
38
33
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["Icon","layout","useSelect","Flex","FlexItem","FlexBlock","PanelBody","store","editPostStore","TemplateSummary","template","select","getEditedPostTemplate","createElement","align","gap","icon","className","title","slug","description"],"sources":["@wordpress/edit-post/src/components/sidebar/template-summary/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Icon, layout } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { Flex, FlexItem, FlexBlock, PanelBody } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\nfunction TemplateSummary() {\n\tconst template = useSelect( ( select ) => {\n\t\tconst { getEditedPostTemplate } = select( editPostStore );\n\t\treturn getEditedPostTemplate();\n\t}, [] );\n\n\tif ( ! template ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody>\n\t\t\t<Flex align=\"flex-start\" gap=\"3\">\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<Icon icon={ layout } />\n\t\t\t\t</FlexItem>\n\n\t\t\t\t<FlexBlock>\n\t\t\t\t\t<h2 className=\"edit-post-template-summary__title\">\n\t\t\t\t\t\t{ template?.title || template?.slug }\n\t\t\t\t\t</h2>\n\t\t\t\t\t<p>{ template?.description }</p>\n\t\t\t\t</FlexBlock>\n\t\t\t</Flex>\n\t\t</PanelBody>\n\t);\n}\n\nexport default TemplateSummary;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,IAAI,EAAEC,MAAM,QAAQ,kBAAkB;AAC/C,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,IAAI,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,SAAS,QAAQ,uBAAuB;;AAE5E;AACA;AACA;AACA,SAASC,KAAK,IAAIC,aAAa,QAAQ,gBAAgB;AAEvD,SAASC,eAAeA,CAAA,EAAG;EAC1B,MAAMC,QAAQ,GAAGR,SAAS,CAAIS,MAAM,IAAM;IACzC,MAAM;MAAEC;IAAsB,CAAC,GAAGD,MAAM,CAAEH,aAAc,CAAC;IACzD,OAAOI,qBAAqB,CAAC,CAAC;EAC/B,CAAC,EAAE,EAAG,CAAC;EAEP,IAAK,CAAEF,QAAQ,EAAG;IACjB,OAAO,IAAI;EACZ;EAEA,OACCG,aAAA,CAACP,SAAS,QACTO,aAAA,CAACV,IAAI;IAACW,KAAK,EAAC,YAAY;IAACC,GAAG,EAAC;EAAG,GAC/BF,aAAA,CAACT,QAAQ,QACRS,aAAA,CAACb,IAAI;IAACgB,IAAI,EAAGf;EAAQ,CAAE,CACd,CAAC,EAEXY,aAAA,CAACR,SAAS,QACTQ,aAAA;IAAII,SAAS,EAAC;EAAmC,GAC9CP,QAAQ,EAAEQ,KAAK,IAAIR,QAAQ,EAAES,IAC5B,CAAC,EACLN,aAAA,YAAKH,QAAQ,EAAEU,WAAgB,CACrB,CACN,CACI,CAAC;AAEd;AAEA,eAAeX,eAAe"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createElement } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
@@ -10,12 +9,11 @@ import { store as blockEditorStore, __experimentalBlockPatternsList as BlockPatt
|
|
|
10
9
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
11
10
|
import { useAsyncList } from '@wordpress/compose';
|
|
12
11
|
import { store as editorStore } from '@wordpress/editor';
|
|
12
|
+
|
|
13
13
|
/**
|
|
14
14
|
* Internal dependencies
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
16
|
import { store as editPostStore } from '../../store';
|
|
18
|
-
|
|
19
17
|
function useStartPatterns() {
|
|
20
18
|
// A pattern is a start pattern if it includes 'core/post-content' in its blockTypes,
|
|
21
19
|
// and it has no postTypes declares and the current post type is page or if
|
|
@@ -43,7 +41,6 @@ function useStartPatterns() {
|
|
|
43
41
|
});
|
|
44
42
|
}, [postType, blockPatternsWithPostContentBlockType]);
|
|
45
43
|
}
|
|
46
|
-
|
|
47
44
|
function PatternSelection({
|
|
48
45
|
onChoosePattern
|
|
49
46
|
}) {
|
|
@@ -61,7 +58,6 @@ function PatternSelection({
|
|
|
61
58
|
}
|
|
62
59
|
});
|
|
63
60
|
}
|
|
64
|
-
|
|
65
61
|
const START_PAGE_MODAL_STATES = {
|
|
66
62
|
INITIAL: 'INITIAL',
|
|
67
63
|
PATTERN: 'PATTERN',
|
|
@@ -75,7 +71,6 @@ export default function StartPageOptions() {
|
|
|
75
71
|
if (!hasStartPattern || modalState !== START_PAGE_MODAL_STATES.INITIAL) {
|
|
76
72
|
return false;
|
|
77
73
|
}
|
|
78
|
-
|
|
79
74
|
const {
|
|
80
75
|
getEditedPostContent,
|
|
81
76
|
isEditedPostSaveable
|
|
@@ -91,11 +86,9 @@ export default function StartPageOptions() {
|
|
|
91
86
|
setModalState(START_PAGE_MODAL_STATES.PATTERN);
|
|
92
87
|
}
|
|
93
88
|
}, [shouldOpenModel]);
|
|
94
|
-
|
|
95
89
|
if (modalState === START_PAGE_MODAL_STATES.INITIAL || modalState === START_PAGE_MODAL_STATES.CLOSED) {
|
|
96
90
|
return null;
|
|
97
91
|
}
|
|
98
|
-
|
|
99
92
|
return createElement(Modal, {
|
|
100
93
|
className: "edit-post-start-page-options__modal",
|
|
101
94
|
title: __('Choose a pattern'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["Modal","__","useState","useEffect","useMemo","store","blockEditorStore","__experimentalBlockPatternsList","BlockPatternsList","useSelect","useDispatch","useAsyncList","editorStore","editPostStore","useStartPatterns","blockPatternsWithPostContentBlockType","postType","select","getPatternsByBlockTypes","getCurrentPostType","filter","pattern","postTypes","Array","isArray","includes","PatternSelection","onChoosePattern","blockPatterns","shownBlockPatterns","resetEditorBlocks","createElement","shownPatterns","onClickPattern","_pattern","blocks","START_PAGE_MODAL_STATES","INITIAL","PATTERN","CLOSED","StartPageOptions","modalState","setModalState","hasStartPattern","length","shouldOpenModel","getEditedPostContent","isEditedPostSaveable","isEditingTemplate","isFeatureActive","className","title","isFullScreen","onRequestClose"],"sources":["@wordpress/edit-post/src/components/start-page-options/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useEffect, useMemo } from '@wordpress/element';\nimport {\n\tstore as blockEditorStore,\n\t__experimentalBlockPatternsList as BlockPatternsList,\n} from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useAsyncList } from '@wordpress/compose';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nfunction useStartPatterns() {\n\t// A pattern is a start pattern if it includes 'core/post-content' in its blockTypes,\n\t// and it has no postTypes declares and the current post type is page or if\n\t// the current post type is part of the postTypes declared.\n\tconst { blockPatternsWithPostContentBlockType, postType } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getPatternsByBlockTypes } = select( blockEditorStore );\n\t\t\tconst { getCurrentPostType } = select( editorStore );\n\t\t\treturn {\n\t\t\t\tblockPatternsWithPostContentBlockType:\n\t\t\t\t\tgetPatternsByBlockTypes( 'core/post-content' ),\n\t\t\t\tpostType: getCurrentPostType(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\treturn useMemo( () => {\n\t\t// filter patterns without postTypes declared if the current postType is page\n\t\t// or patterns that declare the current postType in its post type array.\n\t\treturn blockPatternsWithPostContentBlockType.filter( ( pattern ) => {\n\t\t\treturn (\n\t\t\t\t( postType === 'page' && ! pattern.postTypes ) ||\n\t\t\t\t( Array.isArray( pattern.postTypes ) &&\n\t\t\t\t\tpattern.postTypes.includes( postType ) )\n\t\t\t);\n\t\t} );\n\t}, [ postType, blockPatternsWithPostContentBlockType ] );\n}\n\nfunction PatternSelection( { onChoosePattern } ) {\n\tconst blockPatterns = useStartPatterns();\n\tconst shownBlockPatterns = useAsyncList( blockPatterns );\n\tconst { resetEditorBlocks } = useDispatch( editorStore );\n\treturn (\n\t\t<BlockPatternsList\n\t\t\tblockPatterns={ blockPatterns }\n\t\t\tshownPatterns={ shownBlockPatterns }\n\t\t\tonClickPattern={ ( _pattern, blocks ) => {\n\t\t\t\tresetEditorBlocks( blocks );\n\t\t\t\tonChoosePattern();\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nconst START_PAGE_MODAL_STATES = {\n\tINITIAL: 'INITIAL',\n\tPATTERN: 'PATTERN',\n\tCLOSED: 'CLOSED',\n};\n\nexport default function StartPageOptions() {\n\tconst [ modalState, setModalState ] = useState(\n\t\tSTART_PAGE_MODAL_STATES.INITIAL\n\t);\n\tconst blockPatterns = useStartPatterns();\n\tconst hasStartPattern = blockPatterns.length > 0;\n\tconst shouldOpenModel = useSelect(\n\t\t( select ) => {\n\t\t\tif (\n\t\t\t\t! hasStartPattern ||\n\t\t\t\tmodalState !== START_PAGE_MODAL_STATES.INITIAL\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst { getEditedPostContent, isEditedPostSaveable } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst { isEditingTemplate, isFeatureActive } =\n\t\t\t\tselect( editPostStore );\n\t\t\treturn (\n\t\t\t\t! isEditedPostSaveable() &&\n\t\t\t\t'' === getEditedPostContent() &&\n\t\t\t\t! isEditingTemplate() &&\n\t\t\t\t! isFeatureActive( 'welcomeGuide' )\n\t\t\t);\n\t\t},\n\t\t[ modalState, hasStartPattern ]\n\t);\n\n\tuseEffect( () => {\n\t\tif ( shouldOpenModel ) {\n\t\t\tsetModalState( START_PAGE_MODAL_STATES.PATTERN );\n\t\t}\n\t}, [ shouldOpenModel ] );\n\n\tif (\n\t\tmodalState === START_PAGE_MODAL_STATES.INITIAL ||\n\t\tmodalState === START_PAGE_MODAL_STATES.CLOSED\n\t) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"edit-post-start-page-options__modal\"\n\t\t\ttitle={ __( 'Choose a pattern' ) }\n\t\t\tisFullScreen={ true }\n\t\t\tonRequestClose={ () => {\n\t\t\t\tsetModalState( START_PAGE_MODAL_STATES.CLOSED );\n\t\t\t} }\n\t\t>\n\t\t\t<div className=\"edit-post-start-page-options__modal-content\">\n\t\t\t\t{ modalState === START_PAGE_MODAL_STATES.PATTERN && (\n\t\t\t\t\t<PatternSelection\n\t\t\t\t\t\tonChoosePattern={ () => {\n\t\t\t\t\t\t\tsetModalState( START_PAGE_MODAL_STATES.CLOSED );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</Modal>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,EAAEC,SAAS,EAAEC,OAAO,QAAQ,oBAAoB;AACjE,SACCC,KAAK,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,CAAEO,eAAe,CAAG,CAAC;EAExB,IACCJ,UAAU,KAAKL,uBAAuB,CAACC,OAAO,IAC9CI,UAAU,KAAKL,uBAAuB,CAACG,MAAM,EAC5C;IACD,OAAO,IAAI;EACZ;EACA,OACCR,aAAA,CAAC/B,KAAK;IACLkD,SAAS,EAAC,qCAAqC;IAC/CC,KAAK,EAAGlD,EAAE,CAAE,kBAAmB,CAAG;IAClCmD,YAAY,EAAG,IAAM;IACrBC,cAAc,EAAGA,CAAA,KAAM;MACtBX,aAAa,CAAEN,uBAAuB,CAACG,MAAO,CAAC;IAChD;EAAG,GAEHR,aAAA;IAAKmB,SAAS,EAAC;EAA6C,GACzDT,UAAU,KAAKL,uBAAuB,CAACE,OAAO,IAC/CP,aAAA,CAACL,gBAAgB;IAChBC,eAAe,EAAGA,CAAA,KAAM;MACvBe,aAAa,CAAEN,uBAAuB,CAACG,MAAO,CAAC;IAChD;EAAG,CACH,CAEE,CACC,CAAC;AAEV"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createElement } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
@@ -8,10 +7,10 @@ import { Button } from '@wordpress/components';
|
|
|
8
7
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
9
8
|
import { __ } from '@wordpress/i18n';
|
|
10
9
|
import { displayShortcut } from '@wordpress/keycodes';
|
|
10
|
+
|
|
11
11
|
/**
|
|
12
12
|
* Internal dependencies
|
|
13
13
|
*/
|
|
14
|
-
|
|
15
14
|
import { store as editPostStore } from '../../store';
|
|
16
15
|
export default function TextEditor() {
|
|
17
16
|
const isRichEditingEnabled = useSelect(select => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["PostTextEditor","PostTitle","store","editorStore","Button","useDispatch","useSelect","__","displayShortcut","editPostStore","TextEditor","isRichEditingEnabled","select","getEditorSettings","richEditingEnabled","switchEditorMode","createElement","className","variant","onClick","shortcut","secondary"],"sources":["@wordpress/edit-post/src/components/text-editor/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPostTextEditor,\n\tPostTitle,\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';\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( editPostStore );\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<PostTitle />\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,SAAS,EACTC,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;;AAErD;AACA;AACA;AACA,SAASN,KAAK,IAAIO,aAAa,QAAQ,aAAa;AAEpD,eAAe,SAASC,UAAUA,CAAA,EAAG;EACpC,MAAMC,oBAAoB,GAAGL,SAAS,CAAIM,MAAM,IAAM;IACrD,OAAOA,MAAM,CAAET,WAAY,CAAC,CAACU,iBAAiB,CAAC,CAAC,CAACC,kBAAkB;EACpE,CAAC,EAAE,EAAG,CAAC;EACP,MAAM;IAAEC;EAAiB,CAAC,GAAGV,WAAW,CAAEI,aAAc,CAAC;EAEzD,OACCO,aAAA;IAAKC,SAAS,EAAC;EAAuB,GACnCN,oBAAoB,IACrBK,aAAA;IAAKC,SAAS,EAAC;EAAgC,GAC9CD,aAAA,aAAMT,EAAE,CAAE,cAAe,CAAO,CAAC,EACjCS,aAAA,CAACZ,MAAM;IACNc,OAAO,EAAC,UAAU;IAClBC,OAAO,EAAGA,CAAA,KAAMJ,gBAAgB,CAAE,QAAS,CAAG;IAC9CK,QAAQ,EAAGZ,eAAe,CAACa,SAAS,CAAE,GAAI;EAAG,GAE3Cd,EAAE,CAAE,kBAAmB,CAClB,CACJ,CACL,EACDS,aAAA;IAAKC,SAAS,EAAC;EAA6B,GAC3CD,aAAA,CAACf,SAAS,MAAE,CAAC,EACbe,aAAA,CAAChB,cAAc,MAAE,CACb,CACD,CAAC;AAER"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createElement } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
@@ -23,12 +22,12 @@ export default function ViewLink() {
|
|
|
23
22
|
isPublished: select(editorStore).isCurrentPostPublished(),
|
|
24
23
|
label: postType?.labels.view_item
|
|
25
24
|
};
|
|
26
|
-
}, []);
|
|
25
|
+
}, []);
|
|
27
26
|
|
|
27
|
+
// Only render the view button if the post is published and has a permalink.
|
|
28
28
|
if (!isPublished || !permalink) {
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
31
|
-
|
|
32
31
|
return createElement(Button, {
|
|
33
32
|
icon: external,
|
|
34
33
|
label: label || __('View post'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["__","Button","external","store","editorStore","coreStore","useSelect","ViewLink","permalink","isPublished","label","select","postTypeSlug","getCurrentPostType","postType","getPostType","getPermalink","isCurrentPostPublished","labels","view_item","createElement","icon","href","target"],"sources":["@wordpress/edit-post/src/components/view-link/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { external } from '@wordpress/icons';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\nexport default function ViewLink() {\n\tconst { permalink, isPublished, label } = useSelect( ( select ) => {\n\t\t// Grab post type to retrieve the view_item label.\n\t\tconst postTypeSlug = select( editorStore ).getCurrentPostType();\n\t\tconst postType = select( coreStore ).getPostType( postTypeSlug );\n\n\t\treturn {\n\t\t\tpermalink: select( editorStore ).getPermalink(),\n\t\t\tisPublished: select( editorStore ).isCurrentPostPublished(),\n\t\t\tlabel: postType?.labels.view_item,\n\t\t};\n\t}, [] );\n\n\t// Only render the view button if the post is published and has a permalink.\n\tif ( ! isPublished || ! permalink ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Button\n\t\t\ticon={ external }\n\t\t\tlabel={ label || __( 'View post' ) }\n\t\t\thref={ permalink }\n\t\t\ttarget=\"_blank\"\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,QAAQ,QAAQ,kBAAkB;AAC3C,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASD,KAAK,IAAIE,SAAS,QAAQ,sBAAsB;AACzD,SAASC,SAAS,QAAQ,iBAAiB;AAE3C,eAAe,SAASC,QAAQA,CAAA,EAAG;EAClC,MAAM;IAAEC,SAAS;IAAEC,WAAW;IAAEC;EAAM,CAAC,GAAGJ,SAAS,CAAIK,MAAM,IAAM;IAClE;IACA,MAAMC,YAAY,GAAGD,MAAM,CAAEP,WAAY,CAAC,CAACS,kBAAkB,CAAC,CAAC;IAC/D,MAAMC,QAAQ,GAAGH,MAAM,CAAEN,SAAU,CAAC,CAACU,WAAW,CAAEH,YAAa,CAAC;IAEhE,OAAO;MACNJ,SAAS,EAAEG,MAAM,CAAEP,WAAY,CAAC,CAACY,YAAY,CAAC,CAAC;MAC/CP,WAAW,EAAEE,MAAM,CAAEP,WAAY,CAAC,CAACa,sBAAsB,CAAC,CAAC;MAC3DP,KAAK,EAAEI,QAAQ,EAAEI,MAAM,CAACC;IACzB,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;;EAEP;EACA,IAAK,CAAEV,WAAW,IAAI,CAAED,SAAS,EAAG;IACnC,OAAO,IAAI;EACZ;EAEA,OACCY,aAAA,CAACnB,MAAM;IACNoB,IAAI,EAAGnB,QAAU;IACjBQ,KAAK,EAAGA,KAAK,IAAIV,EAAE,CAAE,WAAY,CAAG;IACpCsB,IAAI,EAAGd,SAAW;IAClBe,MAAM,EAAC;EAAQ,CACf,CAAC;AAEJ"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createElement } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
@@ -8,14 +7,12 @@ import { MenuItem } from '@wordpress/components';
|
|
|
8
7
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
9
8
|
import { speak } from '@wordpress/a11y';
|
|
10
9
|
import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
|
|
10
|
+
|
|
11
11
|
/**
|
|
12
12
|
* Internal dependencies
|
|
13
13
|
*/
|
|
14
|
-
|
|
15
14
|
import { store as editPostStore } from '../../store';
|
|
16
|
-
|
|
17
15
|
const noop = () => {};
|
|
18
|
-
|
|
19
16
|
export function BlockInspectorButton({
|
|
20
17
|
onClick = noop,
|
|
21
18
|
small = false
|
|
@@ -41,7 +38,6 @@ export function BlockInspectorButton({
|
|
|
41
38
|
openGeneralSidebar('edit-post/block');
|
|
42
39
|
speak(__('Additional settings are now available in the Editor block settings sidebar'));
|
|
43
40
|
}
|
|
44
|
-
|
|
45
41
|
onClick();
|
|
46
42
|
},
|
|
47
43
|
shortcut: shortcut
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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/edit-post/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,+BAAgC,CAAC;IAC9DF,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"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { createElement } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* External dependencies
|
|
5
4
|
*/
|
|
6
5
|
import { View } from 'react-native';
|
|
6
|
+
|
|
7
7
|
/**
|
|
8
8
|
* WordPress dependencies
|
|
9
9
|
*/
|
|
10
|
-
|
|
11
10
|
import { memo } from '@wordpress/element';
|
|
12
11
|
import { __ } from '@wordpress/i18n';
|
|
13
12
|
import { withDispatch, withSelect } from '@wordpress/data';
|
|
@@ -46,13 +45,11 @@ export default compose([withSelect(select => {
|
|
|
46
45
|
} = dispatch(blockEditorStore);
|
|
47
46
|
return {
|
|
48
47
|
clearSelectedBlock,
|
|
49
|
-
|
|
50
48
|
editTitle(title) {
|
|
51
49
|
editPost({
|
|
52
50
|
title
|
|
53
51
|
});
|
|
54
52
|
}
|
|
55
|
-
|
|
56
53
|
};
|
|
57
54
|
}), withPreferredColorScheme])(Header);
|
|
58
55
|
//# sourceMappingURL=header.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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};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