@wordpress/editor 13.33.0 → 13.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -4
- package/README.md +132 -20
- package/build/bindings/pattern-overrides.js +70 -1
- package/build/bindings/pattern-overrides.js.map +1 -1
- package/build/components/autosave-monitor/index.js +15 -12
- package/build/components/autosave-monitor/index.js.map +1 -1
- package/build/components/block-settings-menu/content-only-settings-menu.js +126 -0
- package/build/components/block-settings-menu/content-only-settings-menu.js.map +1 -0
- package/build/components/block-settings-menu/content-only-settings-menu.native.js +11 -0
- package/build/components/block-settings-menu/content-only-settings-menu.native.js.map +1 -0
- package/build/components/character-count/index.js +5 -0
- package/build/components/character-count/index.js.map +1 -1
- package/build/components/collapsible-block-toolbar/index.js +73 -0
- package/build/components/collapsible-block-toolbar/index.js.map +1 -0
- package/build/components/document-bar/index.js +2 -2
- package/build/components/document-bar/index.js.map +1 -1
- package/build/components/document-outline/check.js +8 -0
- package/build/components/document-outline/check.js.map +1 -1
- package/build/components/document-outline/index.js +11 -0
- package/build/components/document-outline/index.js.map +1 -1
- package/build/components/document-outline/item.js +2 -2
- package/build/components/document-outline/item.js.map +1 -1
- package/build/components/document-tools/index.js +15 -25
- package/build/components/document-tools/index.js.map +1 -1
- package/build/components/editor-canvas/edit-template-blocks-notification.js +1 -1
- package/build/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
- package/build/components/editor-canvas/index.js +19 -8
- package/build/components/editor-canvas/index.js.map +1 -1
- package/build/components/editor-history/redo.js +11 -0
- package/build/components/editor-history/redo.js.map +1 -1
- package/build/components/editor-history/undo.js +11 -0
- package/build/components/editor-history/undo.js.map +1 -1
- package/build/components/editor-snackbars/index.js +6 -0
- package/build/components/editor-snackbars/index.js.map +1 -1
- package/build/components/global-keyboard-shortcuts/index.js +7 -0
- package/build/components/global-keyboard-shortcuts/index.js.map +1 -1
- package/build/components/global-keyboard-shortcuts/register-shortcuts.js +35 -1
- package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
- package/build/components/global-styles-provider/index.js +130 -0
- package/build/components/global-styles-provider/index.js.map +1 -0
- package/build/components/header/index.js +147 -0
- package/build/components/header/index.js.map +1 -0
- package/build/components/inserter-sidebar/index.js +56 -34
- package/build/components/inserter-sidebar/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +4 -0
- package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +2 -2
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/list-view-sidebar/index.js +1 -1
- package/build/components/list-view-sidebar/index.js.map +1 -1
- package/build/components/more-menu/copy-content-menu-item.js +59 -0
- package/build/components/more-menu/copy-content-menu-item.js.map +1 -0
- package/build/components/more-menu/index.js +119 -0
- package/build/components/more-menu/index.js.map +1 -0
- package/build/components/more-menu/tools-more-menu-group.js +23 -0
- package/build/components/more-menu/tools-more-menu-group.js.map +1 -0
- package/build/components/more-menu/view-more-menu-group.js +24 -0
- package/build/components/more-menu/view-more-menu-group.js.map +1 -0
- package/build/components/page-attributes/check.js +8 -0
- package/build/components/page-attributes/check.js.map +1 -1
- package/build/components/page-attributes/order.js +7 -0
- package/build/components/page-attributes/order.js.map +1 -1
- package/build/components/page-attributes/panel.js +14 -8
- package/build/components/page-attributes/panel.js.map +1 -1
- package/build/components/page-attributes/parent.js +7 -0
- package/build/components/page-attributes/parent.js.map +1 -1
- package/build/components/plugin-post-publish-panel/index.js +1 -1
- package/build/components/plugin-post-publish-panel/index.js.map +1 -1
- package/build/components/plugin-pre-publish-panel/index.js +1 -1
- package/build/components/plugin-pre-publish-panel/index.js.map +1 -1
- package/build/components/plugin-sidebar/index.js +1 -1
- package/build/components/plugin-sidebar/index.js.map +1 -1
- package/build/components/post-actions/actions.js +219 -66
- package/build/components/post-actions/actions.js.map +1 -1
- package/build/components/post-actions/index.js +32 -16
- package/build/components/post-actions/index.js.map +1 -1
- package/build/components/post-author/check.js +9 -0
- package/build/components/post-author/check.js.map +1 -1
- package/build/components/post-author/index.js +6 -0
- package/build/components/post-author/index.js.map +1 -1
- package/build/components/post-author/panel.js +5 -0
- package/build/components/post-author/panel.js.map +1 -1
- package/build/components/post-card-panel/index.js +7 -66
- package/build/components/post-card-panel/index.js.map +1 -1
- package/build/components/post-comments/index.js +28 -8
- package/build/components/post-comments/index.js.map +1 -1
- package/build/components/post-content-information/index.js +72 -0
- package/build/components/post-content-information/index.js.map +1 -0
- package/build/components/post-discussion/panel.js +104 -20
- package/build/components/post-discussion/panel.js.map +1 -1
- package/build/components/post-excerpt/check.js +0 -19
- package/build/components/post-excerpt/check.js.map +1 -1
- package/build/components/post-excerpt/index.js +52 -12
- package/build/components/post-excerpt/index.js.map +1 -1
- package/build/components/post-excerpt/panel.js +118 -7
- package/build/components/post-excerpt/panel.js.map +1 -1
- package/build/components/post-excerpt/plugin.js +2 -2
- package/build/components/post-excerpt/plugin.js.map +1 -1
- package/build/components/post-featured-image/index.js +1 -1
- package/build/components/post-featured-image/index.js.map +1 -1
- package/build/components/post-format/panel.js +27 -0
- package/build/components/post-format/panel.js.map +1 -0
- package/build/components/post-last-edited-panel/index.js +33 -0
- package/build/components/post-last-edited-panel/index.js.map +1 -0
- package/build/components/post-panel-row/index.js +2 -2
- package/build/components/post-panel-row/index.js.map +1 -1
- package/build/components/post-panel-section/index.js +28 -0
- package/build/components/post-panel-section/index.js.map +1 -0
- package/build/components/post-pingbacks/index.js +5 -2
- package/build/components/post-pingbacks/index.js.map +1 -1
- package/build/components/post-publish-button/post-publish-button-or-toggle.js +100 -0
- package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -0
- package/build/components/post-saved-state/index.js +2 -2
- package/build/components/post-saved-state/index.js.map +1 -1
- package/build/components/post-schedule/panel.js +1 -1
- package/build/components/post-schedule/panel.js.map +1 -1
- package/build/components/post-slug/panel.js +27 -0
- package/build/components/post-slug/panel.js.map +1 -0
- package/build/components/post-status/index.js +13 -13
- package/build/components/post-status/index.js.map +1 -1
- package/build/components/post-sticky/panel.js +21 -0
- package/build/components/post-sticky/panel.js.map +1 -0
- package/build/components/post-template/block-theme.js +2 -2
- package/build/components/post-template/block-theme.js.map +1 -1
- package/build/components/post-template/classic-theme.js +0 -1
- package/build/components/post-template/classic-theme.js.map +1 -1
- package/build/components/post-template/swap-template-button.js +2 -5
- package/build/components/post-template/swap-template-button.js.map +1 -1
- package/build/components/post-title/index.js +2 -2
- package/build/components/post-title/index.js.map +1 -1
- package/build/components/post-title/post-title-raw.js +2 -2
- package/build/components/post-title/post-title-raw.js.map +1 -1
- package/build/components/post-transform-panel/hooks.js +90 -0
- package/build/components/post-transform-panel/hooks.js.map +1 -0
- package/build/components/post-transform-panel/index.js +101 -0
- package/build/components/post-transform-panel/index.js.map +1 -0
- package/build/components/post-trash/panel.js +18 -0
- package/build/components/post-trash/panel.js.map +1 -0
- package/build/components/post-type-support-check/index.js +1 -1
- package/build/components/post-type-support-check/index.js.map +1 -1
- package/build/components/post-url/index.js +2 -1
- package/build/components/post-url/index.js.map +1 -1
- package/build/components/post-url/panel.js +1 -1
- package/build/components/post-url/panel.js.map +1 -1
- package/build/components/preferences-modal/enable-publish-sidebar.js +34 -0
- package/build/components/preferences-modal/enable-publish-sidebar.js.map +1 -0
- package/build/components/preferences-modal/index.js +11 -5
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/preview-dropdown/index.js +3 -1
- package/build/components/preview-dropdown/index.js.map +1 -1
- package/build/components/provider/disable-non-page-content-blocks.js +23 -16
- package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
- package/build/components/provider/index.js +3 -1
- package/build/components/provider/index.js.map +1 -1
- package/build/components/provider/use-block-editor-settings.js +21 -3
- package/build/components/provider/use-block-editor-settings.js.map +1 -1
- package/build/components/save-publish-panels/index.js +89 -0
- package/build/components/save-publish-panels/index.js.map +1 -0
- package/build/components/sidebar/constants.js +11 -0
- package/build/components/sidebar/constants.js.map +1 -0
- package/build/components/sidebar/header.js +53 -0
- package/build/components/sidebar/header.js.map +1 -0
- package/build/components/sidebar/index.js +157 -0
- package/build/components/sidebar/index.js.map +1 -0
- package/build/components/sidebar/post-summary.js +84 -0
- package/build/components/sidebar/post-summary.js.map +1 -0
- package/build/components/start-page-options/index.js +10 -8
- package/build/components/start-page-options/index.js.map +1 -1
- package/build/components/start-template-options/index.js +192 -0
- package/build/components/start-template-options/index.js.map +1 -0
- package/build/components/template-content-panel/index.js +38 -0
- package/build/components/template-content-panel/index.js.map +1 -0
- package/build/hooks/pattern-overrides.js +10 -5
- package/build/hooks/pattern-overrides.js.map +1 -1
- package/build/private-apis.js +19 -8
- package/build/private-apis.js.map +1 -1
- package/build/private-apis.native.js +72 -0
- package/build/private-apis.native.js.map +1 -0
- package/build/store/private-selectors.js +6 -1
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +15 -0
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +3 -1
- package/build/store/selectors.js.map +1 -1
- package/build-module/bindings/pattern-overrides.js +69 -1
- package/build-module/bindings/pattern-overrides.js.map +1 -1
- package/build-module/components/autosave-monitor/index.js +15 -13
- package/build-module/components/autosave-monitor/index.js.map +1 -1
- package/build-module/components/block-settings-menu/content-only-settings-menu.js +119 -0
- package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -0
- package/build-module/components/block-settings-menu/content-only-settings-menu.native.js +5 -0
- package/build-module/components/block-settings-menu/content-only-settings-menu.native.js.map +1 -0
- package/build-module/components/character-count/index.js +6 -0
- package/build-module/components/character-count/index.js.map +1 -1
- package/build-module/components/collapsible-block-toolbar/index.js +65 -0
- package/build-module/components/collapsible-block-toolbar/index.js.map +1 -0
- package/build-module/components/document-bar/index.js +2 -2
- package/build-module/components/document-bar/index.js.map +1 -1
- package/build-module/components/document-outline/check.js +9 -0
- package/build-module/components/document-outline/check.js.map +1 -1
- package/build-module/components/document-outline/index.js +11 -0
- package/build-module/components/document-outline/index.js.map +1 -1
- package/build-module/components/document-outline/item.js +2 -2
- package/build-module/components/document-outline/item.js.map +1 -1
- package/build-module/components/document-tools/index.js +17 -27
- package/build-module/components/document-tools/index.js.map +1 -1
- package/build-module/components/editor-canvas/edit-template-blocks-notification.js +1 -1
- package/build-module/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
- package/build-module/components/editor-canvas/index.js +19 -8
- package/build-module/components/editor-canvas/index.js.map +1 -1
- package/build-module/components/editor-history/redo.js +11 -0
- package/build-module/components/editor-history/redo.js.map +1 -1
- package/build-module/components/editor-history/undo.js +11 -0
- package/build-module/components/editor-history/undo.js.map +1 -1
- package/build-module/components/editor-snackbars/index.js +6 -0
- package/build-module/components/editor-snackbars/index.js.map +1 -1
- package/build-module/components/global-keyboard-shortcuts/index.js +8 -0
- package/build-module/components/global-keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +36 -1
- package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
- package/build-module/components/global-styles-provider/index.js +120 -0
- package/build-module/components/global-styles-provider/index.js.map +1 -0
- package/build-module/components/header/index.js +139 -0
- package/build-module/components/header/index.js.map +1 -0
- package/build-module/components/inserter-sidebar/index.js +59 -37
- package/build-module/components/inserter-sidebar/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js +4 -0
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +2 -2
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build-module/components/list-view-sidebar/index.js +1 -1
- package/build-module/components/list-view-sidebar/index.js.map +1 -1
- package/build-module/components/more-menu/copy-content-menu-item.js +52 -0
- package/build-module/components/more-menu/copy-content-menu-item.js.map +1 -0
- package/build-module/components/more-menu/index.js +111 -0
- package/build-module/components/more-menu/index.js.map +1 -0
- package/build-module/components/more-menu/tools-more-menu-group.js +16 -0
- package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -0
- package/build-module/components/more-menu/view-more-menu-group.js +17 -0
- package/build-module/components/more-menu/view-more-menu-group.js.map +1 -0
- package/build-module/components/page-attributes/check.js +9 -0
- package/build-module/components/page-attributes/check.js.map +1 -1
- package/build-module/components/page-attributes/order.js +7 -0
- package/build-module/components/page-attributes/order.js.map +1 -1
- package/build-module/components/page-attributes/panel.js +13 -6
- package/build-module/components/page-attributes/panel.js.map +1 -1
- package/build-module/components/page-attributes/parent.js +7 -0
- package/build-module/components/page-attributes/parent.js.map +1 -1
- package/build-module/components/plugin-post-publish-panel/index.js +1 -1
- package/build-module/components/plugin-post-publish-panel/index.js.map +1 -1
- package/build-module/components/plugin-pre-publish-panel/index.js +1 -1
- package/build-module/components/plugin-pre-publish-panel/index.js.map +1 -1
- package/build-module/components/plugin-sidebar/index.js +1 -1
- package/build-module/components/plugin-sidebar/index.js.map +1 -1
- package/build-module/components/post-actions/actions.js +223 -70
- package/build-module/components/post-actions/actions.js.map +1 -1
- package/build-module/components/post-actions/index.js +33 -17
- package/build-module/components/post-actions/index.js.map +1 -1
- package/build-module/components/post-author/check.js +10 -0
- package/build-module/components/post-author/check.js.map +1 -1
- package/build-module/components/post-author/index.js +6 -0
- package/build-module/components/post-author/index.js.map +1 -1
- package/build-module/components/post-author/panel.js +6 -0
- package/build-module/components/post-author/panel.js.map +1 -1
- package/build-module/components/post-card-panel/index.js +9 -67
- package/build-module/components/post-card-panel/index.js.map +1 -1
- package/build-module/components/post-comments/index.js +30 -10
- package/build-module/components/post-comments/index.js.map +1 -1
- package/build-module/components/post-content-information/index.js +66 -0
- package/build-module/components/post-content-information/index.js.map +1 -0
- package/build-module/components/post-discussion/panel.js +105 -21
- package/build-module/components/post-discussion/panel.js.map +1 -1
- package/build-module/components/post-excerpt/check.js +0 -19
- package/build-module/components/post-excerpt/check.js.map +1 -1
- package/build-module/components/post-excerpt/index.js +52 -11
- package/build-module/components/post-excerpt/index.js.map +1 -1
- package/build-module/components/post-excerpt/panel.js +118 -8
- package/build-module/components/post-excerpt/panel.js.map +1 -1
- package/build-module/components/post-excerpt/plugin.js +2 -2
- package/build-module/components/post-excerpt/plugin.js.map +1 -1
- package/build-module/components/post-featured-image/index.js +1 -1
- package/build-module/components/post-featured-image/index.js.map +1 -1
- package/build-module/components/post-format/panel.js +18 -0
- package/build-module/components/post-format/panel.js.map +1 -0
- package/build-module/components/post-last-edited-panel/index.js +26 -0
- package/build-module/components/post-last-edited-panel/index.js.map +1 -0
- package/build-module/components/post-panel-row/index.js +2 -2
- package/build-module/components/post-panel-row/index.js.map +1 -1
- package/build-module/components/post-panel-section/index.js +20 -0
- package/build-module/components/post-panel-section/index.js.map +1 -0
- package/build-module/components/post-pingbacks/index.js +6 -3
- package/build-module/components/post-pingbacks/index.js.map +1 -1
- package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +91 -0
- package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -0
- package/build-module/components/post-saved-state/index.js +2 -2
- package/build-module/components/post-saved-state/index.js.map +1 -1
- package/build-module/components/post-schedule/panel.js +1 -1
- package/build-module/components/post-schedule/panel.js.map +1 -1
- package/build-module/components/post-slug/panel.js +18 -0
- package/build-module/components/post-slug/panel.js.map +1 -0
- package/build-module/components/post-status/index.js +13 -13
- package/build-module/components/post-status/index.js.map +1 -1
- package/build-module/components/post-sticky/panel.js +12 -0
- package/build-module/components/post-sticky/panel.js.map +1 -0
- package/build-module/components/post-template/block-theme.js +2 -2
- package/build-module/components/post-template/block-theme.js.map +1 -1
- package/build-module/components/post-template/classic-theme.js +0 -1
- package/build-module/components/post-template/classic-theme.js.map +1 -1
- package/build-module/components/post-template/swap-template-button.js +3 -6
- package/build-module/components/post-template/swap-template-button.js.map +1 -1
- package/build-module/components/post-title/index.js +2 -2
- package/build-module/components/post-title/index.js.map +1 -1
- package/build-module/components/post-title/post-title-raw.js +2 -2
- package/build-module/components/post-title/post-title-raw.js.map +1 -1
- package/build-module/components/post-transform-panel/hooks.js +83 -0
- package/build-module/components/post-transform-panel/hooks.js.map +1 -0
- package/build-module/components/post-transform-panel/index.js +94 -0
- package/build-module/components/post-transform-panel/index.js.map +1 -0
- package/build-module/components/post-trash/panel.js +10 -0
- package/build-module/components/post-trash/panel.js.map +1 -0
- package/build-module/components/post-type-support-check/index.js +1 -1
- package/build-module/components/post-type-support-check/index.js.map +1 -1
- package/build-module/components/post-url/index.js +2 -1
- package/build-module/components/post-url/index.js.map +1 -1
- package/build-module/components/post-url/panel.js +1 -1
- package/build-module/components/post-url/panel.js.map +1 -1
- package/build-module/components/preferences-modal/enable-publish-sidebar.js +27 -0
- package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +1 -0
- package/build-module/components/preferences-modal/index.js +11 -5
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/preview-dropdown/index.js +3 -1
- package/build-module/components/preview-dropdown/index.js.map +1 -1
- package/build-module/components/provider/disable-non-page-content-blocks.js +24 -17
- package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
- package/build-module/components/provider/index.js +3 -1
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/provider/use-block-editor-settings.js +21 -3
- package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
- package/build-module/components/save-publish-panels/index.js +80 -0
- package/build-module/components/save-publish-panels/index.js.map +1 -0
- package/build-module/components/sidebar/constants.js +5 -0
- package/build-module/components/sidebar/constants.js.map +1 -0
- package/build-module/components/sidebar/header.js +46 -0
- package/build-module/components/sidebar/header.js.map +1 -0
- package/build-module/components/sidebar/index.js +149 -0
- package/build-module/components/sidebar/index.js.map +1 -0
- package/build-module/components/sidebar/post-summary.js +77 -0
- package/build-module/components/sidebar/post-summary.js.map +1 -0
- package/build-module/components/start-page-options/index.js +10 -8
- package/build-module/components/start-page-options/index.js.map +1 -1
- package/build-module/components/start-template-options/index.js +185 -0
- package/build-module/components/start-template-options/index.js.map +1 -0
- package/build-module/components/template-content-panel/index.js +31 -0
- package/build-module/components/template-content-panel/index.js.map +1 -0
- package/build-module/hooks/pattern-overrides.js +10 -5
- package/build-module/hooks/pattern-overrides.js.map +1 -1
- package/build-module/private-apis.js +19 -8
- package/build-module/private-apis.js.map +1 -1
- package/build-module/private-apis.native.js +62 -0
- package/build-module/private-apis.native.js.map +1 -0
- package/build-module/store/private-selectors.js +3 -0
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +14 -0
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +3 -1
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +535 -48
- package/build-style/style.css +535 -48
- package/package.json +38 -36
- package/src/bindings/pattern-overrides.js +83 -1
- package/src/components/autocompleters/style.scss +1 -2
- package/src/components/autosave-monitor/index.js +15 -12
- package/src/components/block-settings-menu/content-only-settings-menu.js +175 -0
- package/src/components/block-settings-menu/content-only-settings-menu.native.js +4 -0
- package/src/components/block-settings-menu/style.scss +4 -0
- package/src/components/character-count/index.js +5 -0
- package/src/components/collapsible-block-toolbar/index.js +77 -0
- package/src/components/collapsible-block-toolbar/style.scss +80 -0
- package/src/components/document-bar/index.js +2 -2
- package/src/components/document-outline/check.js +8 -0
- package/src/components/document-outline/index.js +10 -0
- package/src/components/document-outline/item.js +2 -2
- package/src/components/document-tools/index.js +19 -26
- package/src/components/editor-canvas/edit-template-blocks-notification.js +1 -1
- package/src/components/editor-canvas/index.js +18 -6
- package/src/components/editor-history/redo.js +10 -0
- package/src/components/editor-history/undo.js +10 -0
- package/src/components/editor-snackbars/index.js +5 -0
- package/src/components/entities-saved-states/style.scss +7 -0
- package/src/components/global-keyboard-shortcuts/index.js +7 -0
- package/src/components/global-keyboard-shortcuts/register-shortcuts.js +42 -1
- package/src/components/global-styles-provider/index.js +162 -0
- package/src/components/header/index.js +154 -0
- package/src/components/header/style.scss +231 -0
- package/src/components/inserter-sidebar/index.js +52 -32
- package/src/components/inserter-sidebar/style.scss +10 -3
- package/src/components/keyboard-shortcut-help-modal/config.js +10 -1
- package/src/components/keyboard-shortcut-help-modal/index.js +2 -2
- package/src/components/list-view-sidebar/index.js +1 -1
- package/src/components/list-view-sidebar/style.scss +3 -2
- package/src/components/more-menu/copy-content-menu-item.js +51 -0
- package/src/components/more-menu/index.js +158 -0
- package/src/components/more-menu/tools-more-menu-group.js +11 -0
- package/src/components/more-menu/view-more-menu-group.js +13 -0
- package/src/components/page-attributes/check.js +8 -0
- package/src/components/page-attributes/order.js +6 -0
- package/src/components/page-attributes/panel.js +21 -17
- package/src/components/page-attributes/parent.js +6 -0
- package/src/components/page-attributes/test/order.js +5 -1
- package/src/components/plugin-post-publish-panel/index.js +1 -1
- package/src/components/plugin-pre-publish-panel/index.js +1 -1
- package/src/components/plugin-sidebar/index.js +1 -1
- package/src/components/post-actions/actions.js +373 -152
- package/src/components/post-actions/index.js +34 -33
- package/src/components/post-author/check.js +9 -0
- package/src/components/post-author/index.js +5 -0
- package/src/components/post-author/panel.js +5 -0
- package/src/components/post-card-panel/index.js +40 -141
- package/src/components/post-card-panel/style.scss +2 -6
- package/src/components/post-comments/index.js +47 -9
- package/src/components/post-content-information/index.js +83 -0
- package/src/components/post-content-information/style.scss +6 -0
- package/src/components/post-discussion/panel.js +108 -27
- package/src/components/post-discussion/style.scss +26 -0
- package/src/components/post-excerpt/check.js +0 -18
- package/src/components/post-excerpt/index.js +66 -15
- package/src/components/post-excerpt/panel.js +196 -19
- package/src/components/post-excerpt/plugin.js +2 -2
- package/src/components/post-excerpt/style.scss +24 -0
- package/src/components/post-featured-image/index.js +1 -1
- package/src/components/post-featured-image/style.scss +2 -8
- package/src/components/post-format/panel.js +22 -0
- package/src/components/post-format/style.scss +6 -0
- package/src/components/post-last-edited-panel/index.js +35 -0
- package/src/components/post-last-edited-panel/style.scss +6 -0
- package/src/components/post-last-revision/test/check.js +5 -1
- package/src/components/post-panel-row/index.js +2 -2
- package/src/components/post-panel-row/style.scss +3 -3
- package/src/components/post-panel-section/index.js +19 -0
- package/src/components/post-panel-section/style.scss +3 -0
- package/src/components/post-pingbacks/index.js +11 -2
- package/src/components/post-publish-button/post-publish-button-or-toggle.js +102 -0
- package/src/components/post-publish-button/test/post-publish-button-or-toggle.js +63 -0
- package/src/components/post-publish-panel/style.scss +48 -0
- package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +225 -75
- package/src/components/post-saved-state/index.js +2 -2
- package/src/components/post-schedule/panel.js +1 -1
- package/src/components/post-schedule/style.scss +2 -4
- package/src/components/post-slug/panel.js +22 -0
- package/src/components/post-slug/style.scss +5 -0
- package/src/components/post-slug/test/index.js +5 -1
- package/src/components/post-status/index.js +88 -80
- package/src/components/post-status/style.scss +0 -1
- package/src/components/post-sticky/panel.js +18 -0
- package/src/components/post-template/block-theme.js +2 -2
- package/src/components/post-template/classic-theme.js +0 -1
- package/src/components/post-template/swap-template-button.js +3 -6
- package/src/components/post-text-editor/style.scss +1 -1
- package/src/components/post-title/index.js +2 -2
- package/src/components/post-title/post-title-raw.js +2 -2
- package/src/components/post-title/style.scss +1 -1
- package/src/components/post-transform-panel/hooks.js +114 -0
- package/src/components/post-transform-panel/index.js +99 -0
- package/src/components/post-trash/panel.js +13 -0
- package/src/components/post-type-support-check/index.js +1 -1
- package/src/components/post-type-support-check/test/index.js +2 -2
- package/src/components/post-url/index.js +1 -0
- package/src/components/post-url/panel.js +1 -1
- package/src/components/preferences-modal/enable-publish-sidebar.js +28 -0
- package/src/components/preferences-modal/index.js +17 -3
- package/src/components/preview-dropdown/index.js +3 -1
- package/src/components/provider/disable-non-page-content-blocks.js +23 -21
- package/src/components/provider/index.js +4 -0
- package/src/components/provider/use-block-editor-settings.js +19 -4
- package/src/components/save-publish-panels/index.js +96 -0
- package/src/components/save-publish-panels/style.scss +36 -0
- package/src/components/sidebar/constants.js +4 -0
- package/src/components/sidebar/header.js +49 -0
- package/src/components/sidebar/index.js +200 -0
- package/src/components/sidebar/post-summary.js +104 -0
- package/src/components/sidebar/style.scss +18 -0
- package/src/components/start-page-options/index.js +12 -5
- package/src/components/start-template-options/index.js +219 -0
- package/src/components/start-template-options/style.scss +55 -0
- package/src/components/template-areas/style.scss +0 -1
- package/src/components/template-content-panel/index.js +36 -0
- package/src/hooks/pattern-overrides.js +12 -6
- package/src/private-apis.js +22 -8
- package/src/private-apis.native.js +61 -0
- package/src/store/private-selectors.js +3 -0
- package/src/store/reducer.js +12 -0
- package/src/store/selectors.js +3 -1
- package/src/style.scss +11 -0
- package/src/components/post-slug/test/check.js +0 -17
|
@@ -27,6 +27,30 @@ exports[`PostPublishPanel should render the post-publish panel if the post is pu
|
|
|
27
27
|
padding: 0;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
.emotion-10 {
|
|
31
|
+
display: -webkit-box;
|
|
32
|
+
display: -webkit-flex;
|
|
33
|
+
display: -ms-flexbox;
|
|
34
|
+
display: flex;
|
|
35
|
+
-webkit-align-items: flex-start;
|
|
36
|
+
-webkit-box-align: flex-start;
|
|
37
|
+
-ms-flex-align: flex-start;
|
|
38
|
+
align-items: flex-start;
|
|
39
|
+
-webkit-flex-direction: row;
|
|
40
|
+
-ms-flex-direction: row;
|
|
41
|
+
flex-direction: row;
|
|
42
|
+
gap: 0;
|
|
43
|
+
-webkit-box-pack: start;
|
|
44
|
+
-ms-flex-pack: start;
|
|
45
|
+
-webkit-justify-content: start;
|
|
46
|
+
justify-content: start;
|
|
47
|
+
width: 100%;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.emotion-10>* {
|
|
51
|
+
min-width: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
30
54
|
<div>
|
|
31
55
|
<div
|
|
32
56
|
class="editor-post-publish-panel"
|
|
@@ -139,22 +163,28 @@ exports[`PostPublishPanel should render the post-publish panel if the post is pu
|
|
|
139
163
|
<div
|
|
140
164
|
class="components-base-control__field emotion-2 emotion-3"
|
|
141
165
|
>
|
|
142
|
-
<
|
|
143
|
-
class="components-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
class="components-checkbox-control__input"
|
|
147
|
-
id="inspector-checkbox-control-3"
|
|
148
|
-
type="checkbox"
|
|
149
|
-
value="1"
|
|
150
|
-
/>
|
|
151
|
-
</span>
|
|
152
|
-
<label
|
|
153
|
-
class="components-checkbox-control__label"
|
|
154
|
-
for="inspector-checkbox-control-3"
|
|
166
|
+
<div
|
|
167
|
+
class="components-flex components-h-stack emotion-10 emotion-11"
|
|
168
|
+
data-wp-c16t="true"
|
|
169
|
+
data-wp-component="HStack"
|
|
155
170
|
>
|
|
156
|
-
|
|
157
|
-
|
|
171
|
+
<span
|
|
172
|
+
class="components-checkbox-control__input-container"
|
|
173
|
+
>
|
|
174
|
+
<input
|
|
175
|
+
class="components-checkbox-control__input"
|
|
176
|
+
id="inspector-checkbox-control-3"
|
|
177
|
+
type="checkbox"
|
|
178
|
+
value="1"
|
|
179
|
+
/>
|
|
180
|
+
</span>
|
|
181
|
+
<label
|
|
182
|
+
class="components-checkbox-control__label"
|
|
183
|
+
for="inspector-checkbox-control-3"
|
|
184
|
+
>
|
|
185
|
+
Always show pre-publish checks.
|
|
186
|
+
</label>
|
|
187
|
+
</div>
|
|
158
188
|
</div>
|
|
159
189
|
</div>
|
|
160
190
|
</div>
|
|
@@ -189,6 +219,30 @@ exports[`PostPublishPanel should render the post-publish panel if the post is sc
|
|
|
189
219
|
padding: 0;
|
|
190
220
|
}
|
|
191
221
|
|
|
222
|
+
.emotion-10 {
|
|
223
|
+
display: -webkit-box;
|
|
224
|
+
display: -webkit-flex;
|
|
225
|
+
display: -ms-flexbox;
|
|
226
|
+
display: flex;
|
|
227
|
+
-webkit-align-items: flex-start;
|
|
228
|
+
-webkit-box-align: flex-start;
|
|
229
|
+
-ms-flex-align: flex-start;
|
|
230
|
+
align-items: flex-start;
|
|
231
|
+
-webkit-flex-direction: row;
|
|
232
|
+
-ms-flex-direction: row;
|
|
233
|
+
flex-direction: row;
|
|
234
|
+
gap: 0;
|
|
235
|
+
-webkit-box-pack: start;
|
|
236
|
+
-ms-flex-pack: start;
|
|
237
|
+
-webkit-justify-content: start;
|
|
238
|
+
justify-content: start;
|
|
239
|
+
width: 100%;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.emotion-10>* {
|
|
243
|
+
min-width: 0;
|
|
244
|
+
}
|
|
245
|
+
|
|
192
246
|
<div>
|
|
193
247
|
<div
|
|
194
248
|
class="editor-post-publish-panel"
|
|
@@ -301,22 +355,28 @@ exports[`PostPublishPanel should render the post-publish panel if the post is sc
|
|
|
301
355
|
<div
|
|
302
356
|
class="components-base-control__field emotion-2 emotion-3"
|
|
303
357
|
>
|
|
304
|
-
<
|
|
305
|
-
class="components-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
class="components-checkbox-control__input"
|
|
309
|
-
id="inspector-checkbox-control-4"
|
|
310
|
-
type="checkbox"
|
|
311
|
-
value="1"
|
|
312
|
-
/>
|
|
313
|
-
</span>
|
|
314
|
-
<label
|
|
315
|
-
class="components-checkbox-control__label"
|
|
316
|
-
for="inspector-checkbox-control-4"
|
|
358
|
+
<div
|
|
359
|
+
class="components-flex components-h-stack emotion-10 emotion-11"
|
|
360
|
+
data-wp-c16t="true"
|
|
361
|
+
data-wp-component="HStack"
|
|
317
362
|
>
|
|
318
|
-
|
|
319
|
-
|
|
363
|
+
<span
|
|
364
|
+
class="components-checkbox-control__input-container"
|
|
365
|
+
>
|
|
366
|
+
<input
|
|
367
|
+
class="components-checkbox-control__input"
|
|
368
|
+
id="inspector-checkbox-control-4"
|
|
369
|
+
type="checkbox"
|
|
370
|
+
value="1"
|
|
371
|
+
/>
|
|
372
|
+
</span>
|
|
373
|
+
<label
|
|
374
|
+
class="components-checkbox-control__label"
|
|
375
|
+
for="inspector-checkbox-control-4"
|
|
376
|
+
>
|
|
377
|
+
Always show pre-publish checks.
|
|
378
|
+
</label>
|
|
379
|
+
</div>
|
|
320
380
|
</div>
|
|
321
381
|
</div>
|
|
322
382
|
</div>
|
|
@@ -341,6 +401,30 @@ exports[`PostPublishPanel should render the pre-publish panel if post status is
|
|
|
341
401
|
margin-bottom: inherit;
|
|
342
402
|
}
|
|
343
403
|
|
|
404
|
+
.emotion-4 {
|
|
405
|
+
display: -webkit-box;
|
|
406
|
+
display: -webkit-flex;
|
|
407
|
+
display: -ms-flexbox;
|
|
408
|
+
display: flex;
|
|
409
|
+
-webkit-align-items: flex-start;
|
|
410
|
+
-webkit-box-align: flex-start;
|
|
411
|
+
-ms-flex-align: flex-start;
|
|
412
|
+
align-items: flex-start;
|
|
413
|
+
-webkit-flex-direction: row;
|
|
414
|
+
-ms-flex-direction: row;
|
|
415
|
+
flex-direction: row;
|
|
416
|
+
gap: 0;
|
|
417
|
+
-webkit-box-pack: start;
|
|
418
|
+
-ms-flex-pack: start;
|
|
419
|
+
-webkit-justify-content: start;
|
|
420
|
+
justify-content: start;
|
|
421
|
+
width: 100%;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.emotion-4>* {
|
|
425
|
+
min-width: 0;
|
|
426
|
+
}
|
|
427
|
+
|
|
344
428
|
<div>
|
|
345
429
|
<div
|
|
346
430
|
class="editor-post-publish-panel"
|
|
@@ -424,22 +508,28 @@ exports[`PostPublishPanel should render the pre-publish panel if post status is
|
|
|
424
508
|
<div
|
|
425
509
|
class="components-base-control__field emotion-2 emotion-3"
|
|
426
510
|
>
|
|
427
|
-
<
|
|
428
|
-
class="components-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
class="components-checkbox-control__input"
|
|
432
|
-
id="inspector-checkbox-control-1"
|
|
433
|
-
type="checkbox"
|
|
434
|
-
value="1"
|
|
435
|
-
/>
|
|
436
|
-
</span>
|
|
437
|
-
<label
|
|
438
|
-
class="components-checkbox-control__label"
|
|
439
|
-
for="inspector-checkbox-control-1"
|
|
511
|
+
<div
|
|
512
|
+
class="components-flex components-h-stack emotion-4 emotion-5"
|
|
513
|
+
data-wp-c16t="true"
|
|
514
|
+
data-wp-component="HStack"
|
|
440
515
|
>
|
|
441
|
-
|
|
442
|
-
|
|
516
|
+
<span
|
|
517
|
+
class="components-checkbox-control__input-container"
|
|
518
|
+
>
|
|
519
|
+
<input
|
|
520
|
+
class="components-checkbox-control__input"
|
|
521
|
+
id="inspector-checkbox-control-1"
|
|
522
|
+
type="checkbox"
|
|
523
|
+
value="1"
|
|
524
|
+
/>
|
|
525
|
+
</span>
|
|
526
|
+
<label
|
|
527
|
+
class="components-checkbox-control__label"
|
|
528
|
+
for="inspector-checkbox-control-1"
|
|
529
|
+
>
|
|
530
|
+
Always show pre-publish checks.
|
|
531
|
+
</label>
|
|
532
|
+
</div>
|
|
443
533
|
</div>
|
|
444
534
|
</div>
|
|
445
535
|
</div>
|
|
@@ -464,6 +554,30 @@ exports[`PostPublishPanel should render the pre-publish panel if the post is not
|
|
|
464
554
|
margin-bottom: inherit;
|
|
465
555
|
}
|
|
466
556
|
|
|
557
|
+
.emotion-4 {
|
|
558
|
+
display: -webkit-box;
|
|
559
|
+
display: -webkit-flex;
|
|
560
|
+
display: -ms-flexbox;
|
|
561
|
+
display: flex;
|
|
562
|
+
-webkit-align-items: flex-start;
|
|
563
|
+
-webkit-box-align: flex-start;
|
|
564
|
+
-ms-flex-align: flex-start;
|
|
565
|
+
align-items: flex-start;
|
|
566
|
+
-webkit-flex-direction: row;
|
|
567
|
+
-ms-flex-direction: row;
|
|
568
|
+
flex-direction: row;
|
|
569
|
+
gap: 0;
|
|
570
|
+
-webkit-box-pack: start;
|
|
571
|
+
-ms-flex-pack: start;
|
|
572
|
+
-webkit-justify-content: start;
|
|
573
|
+
justify-content: start;
|
|
574
|
+
width: 100%;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.emotion-4>* {
|
|
578
|
+
min-width: 0;
|
|
579
|
+
}
|
|
580
|
+
|
|
467
581
|
<div>
|
|
468
582
|
<div
|
|
469
583
|
class="editor-post-publish-panel"
|
|
@@ -547,22 +661,28 @@ exports[`PostPublishPanel should render the pre-publish panel if the post is not
|
|
|
547
661
|
<div
|
|
548
662
|
class="components-base-control__field emotion-2 emotion-3"
|
|
549
663
|
>
|
|
550
|
-
<
|
|
551
|
-
class="components-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
class="components-checkbox-control__input"
|
|
555
|
-
id="inspector-checkbox-control-0"
|
|
556
|
-
type="checkbox"
|
|
557
|
-
value="1"
|
|
558
|
-
/>
|
|
559
|
-
</span>
|
|
560
|
-
<label
|
|
561
|
-
class="components-checkbox-control__label"
|
|
562
|
-
for="inspector-checkbox-control-0"
|
|
664
|
+
<div
|
|
665
|
+
class="components-flex components-h-stack emotion-4 emotion-5"
|
|
666
|
+
data-wp-c16t="true"
|
|
667
|
+
data-wp-component="HStack"
|
|
563
668
|
>
|
|
564
|
-
|
|
565
|
-
|
|
669
|
+
<span
|
|
670
|
+
class="components-checkbox-control__input-container"
|
|
671
|
+
>
|
|
672
|
+
<input
|
|
673
|
+
class="components-checkbox-control__input"
|
|
674
|
+
id="inspector-checkbox-control-0"
|
|
675
|
+
type="checkbox"
|
|
676
|
+
value="1"
|
|
677
|
+
/>
|
|
678
|
+
</span>
|
|
679
|
+
<label
|
|
680
|
+
class="components-checkbox-control__label"
|
|
681
|
+
for="inspector-checkbox-control-0"
|
|
682
|
+
>
|
|
683
|
+
Always show pre-publish checks.
|
|
684
|
+
</label>
|
|
685
|
+
</div>
|
|
566
686
|
</div>
|
|
567
687
|
</div>
|
|
568
688
|
</div>
|
|
@@ -631,6 +751,30 @@ exports[`PostPublishPanel should render the spinner if the post is being saved 1
|
|
|
631
751
|
margin-bottom: inherit;
|
|
632
752
|
}
|
|
633
753
|
|
|
754
|
+
.emotion-10 {
|
|
755
|
+
display: -webkit-box;
|
|
756
|
+
display: -webkit-flex;
|
|
757
|
+
display: -ms-flexbox;
|
|
758
|
+
display: flex;
|
|
759
|
+
-webkit-align-items: flex-start;
|
|
760
|
+
-webkit-box-align: flex-start;
|
|
761
|
+
-ms-flex-align: flex-start;
|
|
762
|
+
align-items: flex-start;
|
|
763
|
+
-webkit-flex-direction: row;
|
|
764
|
+
-ms-flex-direction: row;
|
|
765
|
+
flex-direction: row;
|
|
766
|
+
gap: 0;
|
|
767
|
+
-webkit-box-pack: start;
|
|
768
|
+
-ms-flex-pack: start;
|
|
769
|
+
-webkit-justify-content: start;
|
|
770
|
+
justify-content: start;
|
|
771
|
+
width: 100%;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
.emotion-10>* {
|
|
775
|
+
min-width: 0;
|
|
776
|
+
}
|
|
777
|
+
|
|
634
778
|
<div>
|
|
635
779
|
<div
|
|
636
780
|
class="editor-post-publish-panel"
|
|
@@ -695,22 +839,28 @@ exports[`PostPublishPanel should render the spinner if the post is being saved 1
|
|
|
695
839
|
<div
|
|
696
840
|
class="components-base-control__field emotion-8 emotion-9"
|
|
697
841
|
>
|
|
698
|
-
<
|
|
699
|
-
class="components-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
class="components-checkbox-control__input"
|
|
703
|
-
id="inspector-checkbox-control-2"
|
|
704
|
-
type="checkbox"
|
|
705
|
-
value="1"
|
|
706
|
-
/>
|
|
707
|
-
</span>
|
|
708
|
-
<label
|
|
709
|
-
class="components-checkbox-control__label"
|
|
710
|
-
for="inspector-checkbox-control-2"
|
|
842
|
+
<div
|
|
843
|
+
class="components-flex components-h-stack emotion-10 emotion-11"
|
|
844
|
+
data-wp-c16t="true"
|
|
845
|
+
data-wp-component="HStack"
|
|
711
846
|
>
|
|
712
|
-
|
|
713
|
-
|
|
847
|
+
<span
|
|
848
|
+
class="components-checkbox-control__input-container"
|
|
849
|
+
>
|
|
850
|
+
<input
|
|
851
|
+
class="components-checkbox-control__input"
|
|
852
|
+
id="inspector-checkbox-control-2"
|
|
853
|
+
type="checkbox"
|
|
854
|
+
value="1"
|
|
855
|
+
/>
|
|
856
|
+
</span>
|
|
857
|
+
<label
|
|
858
|
+
class="components-checkbox-control__label"
|
|
859
|
+
for="inspector-checkbox-control-2"
|
|
860
|
+
>
|
|
861
|
+
Always show pre-publish checks.
|
|
862
|
+
</label>
|
|
863
|
+
</div>
|
|
714
864
|
</div>
|
|
715
865
|
</div>
|
|
716
866
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
4
|
+
import clsx from 'clsx';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -141,7 +141,7 @@ export default function PostSavedState( { forceIsDirty } ) {
|
|
|
141
141
|
<Button
|
|
142
142
|
className={
|
|
143
143
|
isSaveable || isSaving
|
|
144
|
-
?
|
|
144
|
+
? clsx( {
|
|
145
145
|
'editor-post-save-draft': ! isSavedState,
|
|
146
146
|
'editor-post-saved-state': isSavedState,
|
|
147
147
|
'is-saving': isSaving,
|
|
@@ -62,7 +62,7 @@ export default function PostSchedulePanel() {
|
|
|
62
62
|
contentClassName="editor-post-schedule__dialog"
|
|
63
63
|
renderToggle={ ( { onToggle, isOpen } ) => (
|
|
64
64
|
<Button
|
|
65
|
-
|
|
65
|
+
size="compact"
|
|
66
66
|
className="editor-post-schedule__dialog-toggle"
|
|
67
67
|
variant="tertiary"
|
|
68
68
|
onClick={ onToggle }
|
|
@@ -10,14 +10,12 @@
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.editor-post-schedule__dialog-toggle.components-button {
|
|
13
|
-
display: block;
|
|
14
|
-
max-width: 100%;
|
|
15
13
|
overflow: hidden;
|
|
16
14
|
text-align: left;
|
|
17
15
|
white-space: unset;
|
|
18
16
|
height: auto;
|
|
17
|
+
min-height: $button-size-compact;
|
|
19
18
|
|
|
20
19
|
// The line height + the padding should be the same as the button size.
|
|
21
|
-
|
|
22
|
-
line-height: $grid-unit-20;
|
|
20
|
+
line-height: inherit;
|
|
23
21
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { PanelRow } from '@wordpress/components';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import PostSlugForm from './';
|
|
10
|
+
import PostSlugCheck from './check';
|
|
11
|
+
|
|
12
|
+
export function PostSlug() {
|
|
13
|
+
return (
|
|
14
|
+
<PostSlugCheck>
|
|
15
|
+
<PanelRow className="editor-post-slug">
|
|
16
|
+
<PostSlugForm />
|
|
17
|
+
</PanelRow>
|
|
18
|
+
</PostSlugCheck>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default PostSlug;
|
|
@@ -26,7 +26,11 @@ describe( 'PostSlug', () => {
|
|
|
26
26
|
|
|
27
27
|
useSelect.mockImplementation( ( mapSelect ) =>
|
|
28
28
|
mapSelect( () => ( {
|
|
29
|
-
getPostType: () =>
|
|
29
|
+
getPostType: () => ( {
|
|
30
|
+
supports: {
|
|
31
|
+
slug: true,
|
|
32
|
+
},
|
|
33
|
+
} ),
|
|
30
34
|
getEditedPostAttribute: () => 'post',
|
|
31
35
|
getEditedPostSlug: () => '1',
|
|
32
36
|
} ) )
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
4
|
+
import clsx from 'clsx';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -21,6 +21,7 @@ import { useState, useMemo } from '@wordpress/element';
|
|
|
21
21
|
import { store as coreStore } from '@wordpress/core-data';
|
|
22
22
|
import { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';
|
|
23
23
|
import { useInstanceId } from '@wordpress/compose';
|
|
24
|
+
import { Icon, chevronDownSmall } from '@wordpress/icons';
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
27
|
* Internal dependencies
|
|
@@ -31,8 +32,8 @@ import {
|
|
|
31
32
|
PATTERN_POST_TYPE,
|
|
32
33
|
NAVIGATION_POST_TYPE,
|
|
33
34
|
} from '../../store/constants';
|
|
35
|
+
import PostPanelRow from '../post-panel-row';
|
|
34
36
|
import { store as editorStore } from '../../store';
|
|
35
|
-
import { Icon, chevronDownSmall } from '@wordpress/icons';
|
|
36
37
|
|
|
37
38
|
function PostStatusLabel( { canEdit } ) {
|
|
38
39
|
const status = useSelect(
|
|
@@ -52,15 +53,15 @@ function PostStatusLabel( { canEdit } ) {
|
|
|
52
53
|
statusLabel = __( 'Draft' );
|
|
53
54
|
break;
|
|
54
55
|
case 'pending':
|
|
55
|
-
statusLabel = __( 'Pending
|
|
56
|
+
statusLabel = __( 'Pending' );
|
|
56
57
|
break;
|
|
57
58
|
case 'private':
|
|
58
|
-
statusLabel = __( '
|
|
59
|
+
statusLabel = __( 'Private' );
|
|
59
60
|
break;
|
|
60
61
|
}
|
|
61
62
|
return (
|
|
62
63
|
<Text
|
|
63
|
-
className={
|
|
64
|
+
className={ clsx( 'editor-post-status-label', {
|
|
64
65
|
[ ` has-status-${ status }` ]: !! status,
|
|
65
66
|
'has-icon': canEdit,
|
|
66
67
|
} ) }
|
|
@@ -183,14 +184,6 @@ export default function PostStatus() {
|
|
|
183
184
|
return null;
|
|
184
185
|
}
|
|
185
186
|
|
|
186
|
-
if ( ! canEdit ) {
|
|
187
|
-
return (
|
|
188
|
-
<div className="editor-post-status">
|
|
189
|
-
<PostStatusLabel />
|
|
190
|
-
</div>
|
|
191
|
-
);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
187
|
const updatePost = ( {
|
|
195
188
|
status: newStatus = status,
|
|
196
189
|
password: newPassword = password,
|
|
@@ -232,79 +225,94 @@ export default function PostStatus() {
|
|
|
232
225
|
};
|
|
233
226
|
|
|
234
227
|
return (
|
|
235
|
-
<
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
<form>
|
|
256
|
-
<VStack spacing={ 4 }>
|
|
257
|
-
<RadioControl
|
|
258
|
-
className="editor-change-status__options"
|
|
259
|
-
hideLabelFromVision
|
|
260
|
-
label={ __( 'Status' ) }
|
|
261
|
-
options={ STATUS_OPTIONS }
|
|
262
|
-
onChange={ handleStatus }
|
|
263
|
-
selected={
|
|
264
|
-
status === 'auto-draft' ? 'draft' : status
|
|
265
|
-
}
|
|
228
|
+
<PostPanelRow label={ __( 'Status' ) } ref={ setPopoverAnchor }>
|
|
229
|
+
{ canEdit ? (
|
|
230
|
+
<Dropdown
|
|
231
|
+
className="editor-post-status"
|
|
232
|
+
contentClassName="editor-change-status__content"
|
|
233
|
+
popoverProps={ popoverProps }
|
|
234
|
+
focusOnMount
|
|
235
|
+
renderToggle={ ( { onToggle } ) => (
|
|
236
|
+
<Button
|
|
237
|
+
className="editor-post-status-trigger"
|
|
238
|
+
onClick={ onToggle }
|
|
239
|
+
>
|
|
240
|
+
<PostStatusLabel canEdit={ canEdit } />
|
|
241
|
+
</Button>
|
|
242
|
+
) }
|
|
243
|
+
renderContent={ ( { onClose } ) => (
|
|
244
|
+
<>
|
|
245
|
+
<InspectorPopoverHeader
|
|
246
|
+
title={ __( 'Status & visibility' ) }
|
|
247
|
+
onClose={ onClose }
|
|
266
248
|
/>
|
|
267
|
-
|
|
268
|
-
<VStack
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
onChange={ handleTogglePassword }
|
|
249
|
+
<form>
|
|
250
|
+
<VStack spacing={ 4 }>
|
|
251
|
+
<RadioControl
|
|
252
|
+
className="editor-change-status__options"
|
|
253
|
+
hideLabelFromVision
|
|
254
|
+
label={ __( 'Status' ) }
|
|
255
|
+
options={ STATUS_OPTIONS }
|
|
256
|
+
onChange={ handleStatus }
|
|
257
|
+
selected={
|
|
258
|
+
status === 'auto-draft'
|
|
259
|
+
? 'draft'
|
|
260
|
+
: status
|
|
261
|
+
}
|
|
281
262
|
/>
|
|
282
|
-
{
|
|
283
|
-
<
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
} )
|
|
290
|
-
}
|
|
291
|
-
value={ password }
|
|
292
|
-
placeholder={ __(
|
|
293
|
-
'Use a secure password'
|
|
294
|
-
) }
|
|
295
|
-
type="text"
|
|
296
|
-
id={ passwordInputId }
|
|
297
|
-
__next40pxDefaultSize
|
|
263
|
+
{ status !== 'private' && (
|
|
264
|
+
<VStack
|
|
265
|
+
as="fieldset"
|
|
266
|
+
spacing={ 4 }
|
|
267
|
+
className="editor-change-status__password-fieldset"
|
|
268
|
+
>
|
|
269
|
+
<CheckboxControl
|
|
298
270
|
__nextHasNoMarginBottom
|
|
271
|
+
label={ __(
|
|
272
|
+
'Password protected'
|
|
273
|
+
) }
|
|
274
|
+
help={ __(
|
|
275
|
+
'Only visible to those who know the password'
|
|
276
|
+
) }
|
|
277
|
+
checked={ showPassword }
|
|
278
|
+
onChange={
|
|
279
|
+
handleTogglePassword
|
|
280
|
+
}
|
|
299
281
|
/>
|
|
300
|
-
|
|
282
|
+
{ showPassword && (
|
|
283
|
+
<div className="editor-change-status__password-input">
|
|
284
|
+
<TextControl
|
|
285
|
+
label={ __(
|
|
286
|
+
'Password'
|
|
287
|
+
) }
|
|
288
|
+
onChange={ ( value ) =>
|
|
289
|
+
updatePost( {
|
|
290
|
+
password: value,
|
|
291
|
+
} )
|
|
292
|
+
}
|
|
293
|
+
value={ password }
|
|
294
|
+
placeholder={ __(
|
|
295
|
+
'Use a secure password'
|
|
296
|
+
) }
|
|
297
|
+
type="text"
|
|
298
|
+
id={ passwordInputId }
|
|
299
|
+
__next40pxDefaultSize
|
|
300
|
+
__nextHasNoMarginBottom
|
|
301
|
+
/>
|
|
302
|
+
</div>
|
|
303
|
+
) }
|
|
304
|
+
</VStack>
|
|
301
305
|
) }
|
|
302
306
|
</VStack>
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
+
</form>
|
|
308
|
+
</>
|
|
309
|
+
) }
|
|
310
|
+
/>
|
|
311
|
+
) : (
|
|
312
|
+
<div className="editor-post-status">
|
|
313
|
+
<PostStatusLabel />
|
|
314
|
+
</div>
|
|
307
315
|
) }
|
|
308
|
-
|
|
316
|
+
</PostPanelRow>
|
|
309
317
|
);
|
|
310
318
|
}
|