@wordpress/editor 13.32.0 → 13.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +355 -20
- package/build/bindings/index.js.map +1 -1
- package/build/bindings/pattern-overrides.js.map +1 -1
- package/build/bindings/post-meta.js +12 -30
- package/build/bindings/post-meta.js.map +1 -1
- package/build/components/autocompleters/index.js.map +1 -1
- package/build/components/autocompleters/user.js.map +1 -1
- package/build/components/autosave-monitor/index.js +24 -11
- package/build/components/autosave-monitor/index.js.map +1 -1
- package/build/components/block-manager/category.js.map +1 -1
- package/build/components/block-manager/checklist.js.map +1 -1
- package/build/components/block-manager/index.js.map +1 -1
- package/build/components/block-removal-warnings/index.js.map +1 -1
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
- 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/commands/index.js +19 -0
- package/build/components/commands/index.js.map +1 -1
- package/build/components/commands/index.native.js.map +1 -1
- package/build/components/deprecated.js.map +1 -1
- package/build/components/deprecated.native.js.map +1 -1
- 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.map +1 -1
- package/build/components/document-tools/index.js +1 -8
- package/build/components/document-tools/index.js.map +1 -1
- package/build/components/editor-canvas/edit-template-blocks-notification.js +13 -2
- package/build/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
- package/build/components/editor-canvas/index.js +2 -2
- package/build/components/editor-canvas/index.js.map +1 -1
- package/build/components/editor-help/add-blocks.native.js.map +1 -1
- package/build/components/editor-help/customize-blocks.native.js.map +1 -1
- package/build/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
- package/build/components/editor-help/help-get-support-button.native.js.map +1 -1
- package/build/components/editor-help/help-section-title.native.js.map +1 -1
- package/build/components/editor-help/help-topic-row.native.js.map +1 -1
- package/build/components/editor-help/icon-move-blocks.native.js.map +1 -1
- package/build/components/editor-help/index.native.js.map +1 -1
- package/build/components/editor-help/intro-to-blocks.native.js.map +1 -1
- package/build/components/editor-help/move-blocks.native.js.map +1 -1
- package/build/components/editor-help/remove-blocks.native.js.map +1 -1
- package/build/components/editor-help/view-sections.native.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-notices/index.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/entities-saved-states/entity-record-item.js.map +1 -1
- package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
- package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
- package/build/components/entities-saved-states/index.js.map +1 -1
- package/build/components/error-boundary/index.js.map +1 -1
- package/build/components/error-boundary/index.native.js.map +1 -1
- package/build/components/global-keyboard-shortcuts/index.js +31 -0
- package/build/components/global-keyboard-shortcuts/index.js.map +1 -1
- package/build/components/global-keyboard-shortcuts/register-shortcuts.js +52 -0
- package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
- package/build/components/index.js +33 -1
- package/build/components/index.js.map +1 -1
- package/build/components/index.native.js.map +1 -1
- package/build/components/inserter-sidebar/index.js +1 -4
- package/build/components/inserter-sidebar/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +82 -0
- package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -0
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +49 -0
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -0
- package/build/components/keyboard-shortcut-help-modal/index.js +126 -0
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -0
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +55 -0
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -0
- package/build/components/list-view-sidebar/index.js +1 -1
- package/build/components/list-view-sidebar/index.js.map +1 -1
- package/build/components/list-view-sidebar/list-view-outline.js.map +1 -1
- package/build/components/local-autosave-monitor/index.js.map +1 -1
- package/build/components/media-categories/index.js.map +1 -1
- package/build/components/mode-switcher/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/offline-status/index.native.js.map +1 -1
- 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/pattern-overrides-panel/index.js.map +1 -1
- package/build/components/plugin-document-setting-panel/index.js.map +1 -1
- package/build/components/plugin-more-menu-item/index.js +78 -0
- package/build/components/plugin-more-menu-item/index.js.map +1 -0
- 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-post-status-info/index.js +73 -0
- package/build/components/plugin-post-status-info/index.js.map +1 -0
- 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 +108 -0
- package/build/components/plugin-sidebar/index.js.map +1 -0
- package/build/components/plugin-sidebar-more-menu-item/index.js +71 -0
- package/build/components/plugin-sidebar-more-menu-item/index.js.map +1 -0
- package/build/components/post-actions/actions.js +316 -20
- package/build/components/post-actions/actions.js.map +1 -1
- package/build/components/post-actions/index.js +160 -0
- package/build/components/post-actions/index.js.map +1 -0
- package/build/components/post-author/check.js +9 -0
- package/build/components/post-author/check.js.map +1 -1
- package/build/components/post-author/combobox.js.map +1 -1
- package/build/components/post-author/constants.js.map +1 -1
- package/build/components/post-author/hook.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-author/select.js.map +1 -1
- package/build/components/post-card-panel/index.js +14 -15
- package/build/components/post-card-panel/index.js.map +1 -1
- 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 +9 -7
- package/build/components/post-discussion/panel.js.map +1 -1
- package/build/components/post-excerpt/check.js +7 -18
- 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/check.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-featured-image/panel.js.map +1 -1
- package/build/components/post-format/check.js.map +1 -1
- package/build/components/post-format/index.js.map +1 -1
- 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-last-revision/check.js.map +1 -1
- package/build/components/post-last-revision/index.js.map +1 -1
- package/build/components/post-last-revision/panel.js.map +1 -1
- package/build/components/post-locked-modal/index.js.map +1 -1
- package/build/components/post-panel-row/index.js.map +1 -1
- package/build/components/post-pending-status/check.js.map +1 -1
- package/build/components/post-pending-status/index.js.map +1 -1
- package/build/components/post-pingbacks/index.js.map +1 -1
- package/build/components/post-preview-button/index.js.map +1 -1
- package/build/components/post-publish-button/index.js +31 -31
- package/build/components/post-publish-button/index.js.map +1 -1
- package/build/components/post-publish-button/label.js +51 -43
- package/build/components/post-publish-button/label.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-publish-panel/index.js.map +1 -1
- package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
- package/build/components/post-publish-panel/postpublish.js.map +1 -1
- package/build/components/post-publish-panel/prepublish.js.map +1 -1
- package/build/components/post-saved-state/index.js +10 -6
- package/build/components/post-saved-state/index.js.map +1 -1
- package/build/components/post-schedule/check.js.map +1 -1
- package/build/components/post-schedule/index.js.map +1 -1
- package/build/components/post-schedule/label.js.map +1 -1
- package/build/components/post-schedule/panel.js +9 -1
- package/build/components/post-schedule/panel.js.map +1 -1
- package/build/components/post-slug/check.js.map +1 -1
- package/build/components/post-slug/index.js +43 -68
- package/build/components/post-slug/index.js.map +1 -1
- package/build/components/post-status/index.js +239 -0
- package/build/components/post-status/index.js.map +1 -0
- package/build/components/post-sticky/check.js.map +1 -1
- package/build/components/post-sticky/index.js.map +1 -1
- package/build/components/post-switch-to-draft-button/index.js +6 -1
- package/build/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build/components/post-sync-status/index.js.map +1 -1
- package/build/components/post-taxonomies/check.js.map +1 -1
- package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/index.js.map +1 -1
- package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
- package/build/components/post-taxonomies/panel.js.map +1 -1
- package/build/components/post-template/block-theme.js +8 -4
- 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/create-new-template-modal.js.map +1 -1
- package/build/components/post-template/create-new-template.js.map +1 -1
- package/build/components/post-template/hooks.js.map +1 -1
- package/build/components/post-template/panel.js.map +1 -1
- package/build/components/post-template/reset-default-template.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-text-editor/index.js.map +1 -1
- package/build/components/post-title/constants.js.map +1 -1
- package/build/components/post-title/index.js.map +1 -1
- package/build/components/post-title/index.native.js.map +1 -1
- package/build/components/post-title/post-title-raw.js.map +1 -1
- package/build/components/post-title/use-post-title-focus.js.map +1 -1
- package/build/components/post-title/use-post-title.js.map +1 -1
- package/build/components/post-trash/check.js +23 -25
- package/build/components/post-trash/check.js.map +1 -1
- package/build/components/post-trash/index.js +2 -1
- package/build/components/post-trash/index.js.map +1 -1
- package/build/components/post-type-support-check/index.js.map +1 -1
- package/build/components/post-url/check.js.map +1 -1
- package/build/components/post-url/index.js +45 -19
- package/build/components/post-url/index.js.map +1 -1
- package/build/components/post-url/label.js.map +1 -1
- package/build/components/post-url/panel.js +15 -8
- package/build/components/post-url/panel.js.map +1 -1
- package/build/components/post-view-link/index.js.map +1 -1
- package/build/components/post-visibility/check.js.map +1 -1
- package/build/components/post-visibility/index.js +2 -1
- package/build/components/post-visibility/index.js.map +1 -1
- package/build/components/post-visibility/label.js.map +1 -1
- package/build/components/post-visibility/utils.js.map +1 -1
- package/build/components/preferences-modal/enable-panel.js.map +1 -1
- package/build/components/preferences-modal/enable-plugin-document-setting-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 +26 -18
- 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 +4 -2
- package/build/components/provider/index.js.map +1 -1
- package/build/components/provider/index.native.js +6 -1
- package/build/components/provider/index.native.js.map +1 -1
- package/build/components/provider/navigation-block-editing-mode.js.map +1 -1
- package/build/components/provider/use-auto-switch-editor-sidebars.js +52 -0
- package/build/components/provider/use-auto-switch-editor-sidebars.js.map +1 -0
- package/build/components/provider/use-block-editor-settings.js +64 -43
- package/build/components/provider/use-block-editor-settings.js.map +1 -1
- package/build/components/provider/use-block-editor-settings.native.js.map +1 -1
- package/build/components/provider/use-hide-blocks-from-inserter.js.map +1 -1
- package/build/components/provider/with-registry-provider.js +1 -0
- package/build/components/provider/with-registry-provider.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/start-page-options/index.js +143 -0
- package/build/components/start-page-options/index.js.map +1 -0
- package/build/components/table-of-contents/index.js.map +1 -1
- package/build/components/table-of-contents/panel.js.map +1 -1
- package/build/components/template-areas/index.js.map +1 -1
- package/build/components/template-validation-notice/index.js +23 -29
- package/build/components/template-validation-notice/index.js.map +1 -1
- package/build/components/theme-support-check/index.js +10 -16
- package/build/components/theme-support-check/index.js.map +1 -1
- package/build/components/time-to-read/index.js.map +1 -1
- package/build/components/unsaved-changes-warning/index.js.map +1 -1
- package/build/components/word-count/index.js.map +1 -1
- package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
- package/build/hooks/default-autocompleters.js.map +1 -1
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/index.native.js.map +1 -1
- package/build/hooks/pattern-overrides.js +22 -10
- package/build/hooks/pattern-overrides.js.map +1 -1
- package/build/hooks/use-select-nearest-editable-block.js.map +1 -1
- package/build/index.js.map +1 -1
- package/build/index.native.js.map +1 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/private-apis.js +38 -3
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js.map +1 -1
- package/build/store/actions.native.js.map +1 -1
- package/build/store/constants.js +8 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/defaults.js.map +1 -1
- package/build/store/index.js +1 -1
- package/build/store/index.js.map +1 -1
- package/build/store/local-autosave.js.map +1 -1
- package/build/store/private-actions.js +177 -4
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +1 -7
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js.map +1 -1
- package/build/store/reducer.native.js.map +1 -1
- package/build/store/selectors.js +8 -11
- package/build/store/selectors.js.map +1 -1
- package/build/store/selectors.native.js.map +1 -1
- package/build/store/utils/get-filtered-template-parts.js.map +1 -1
- package/build/store/utils/is-template-revertable.js +28 -0
- package/build/store/utils/is-template-revertable.js.map +1 -0
- package/build/store/utils/notice-builder.js.map +1 -1
- package/build/utils/get-template-part-icon.js.map +1 -1
- package/build/utils/index.js.map +1 -1
- package/build/utils/index.native.js.map +1 -1
- package/build/utils/media-upload/index.js.map +1 -1
- package/build/utils/media-upload/index.native.js.map +1 -1
- package/build/utils/terms.js.map +1 -1
- package/build/utils/url.js.map +1 -1
- package/build-module/bindings/index.js.map +1 -1
- package/build-module/bindings/pattern-overrides.js.map +1 -1
- package/build-module/bindings/post-meta.js +14 -31
- package/build-module/bindings/post-meta.js.map +1 -1
- package/build-module/components/autocompleters/index.js.map +1 -1
- package/build-module/components/autocompleters/user.js.map +1 -1
- package/build-module/components/autosave-monitor/index.js +24 -12
- package/build-module/components/autosave-monitor/index.js.map +1 -1
- package/build-module/components/block-manager/category.js.map +1 -1
- package/build-module/components/block-manager/checklist.js.map +1 -1
- package/build-module/components/block-manager/index.js.map +1 -1
- package/build-module/components/block-removal-warnings/index.js.map +1 -1
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
- 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/commands/index.js +20 -1
- package/build-module/components/commands/index.js.map +1 -1
- package/build-module/components/commands/index.native.js.map +1 -1
- package/build-module/components/deprecated.js.map +1 -1
- package/build-module/components/deprecated.native.js.map +1 -1
- 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.map +1 -1
- package/build-module/components/document-tools/index.js +2 -9
- package/build-module/components/document-tools/index.js.map +1 -1
- package/build-module/components/editor-canvas/edit-template-blocks-notification.js +13 -2
- package/build-module/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
- package/build-module/components/editor-canvas/index.js +2 -2
- package/build-module/components/editor-canvas/index.js.map +1 -1
- package/build-module/components/editor-help/add-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/customize-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
- package/build-module/components/editor-help/help-get-support-button.native.js.map +1 -1
- package/build-module/components/editor-help/help-section-title.native.js.map +1 -1
- package/build-module/components/editor-help/help-topic-row.native.js.map +1 -1
- package/build-module/components/editor-help/icon-move-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/index.native.js.map +1 -1
- package/build-module/components/editor-help/intro-to-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/move-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/remove-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/view-sections.native.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-notices/index.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/entities-saved-states/entity-record-item.js.map +1 -1
- package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
- package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
- package/build-module/components/entities-saved-states/index.js.map +1 -1
- package/build-module/components/error-boundary/index.js.map +1 -1
- package/build-module/components/error-boundary/index.native.js.map +1 -1
- package/build-module/components/global-keyboard-shortcuts/index.js +32 -0
- package/build-module/components/global-keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +53 -0
- package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
- package/build-module/components/index.js +4 -0
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/index.native.js.map +1 -1
- package/build-module/components/inserter-sidebar/index.js +2 -5
- package/build-module/components/inserter-sidebar/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js +75 -0
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -0
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +41 -0
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -0
- package/build-module/components/keyboard-shortcut-help-modal/index.js +118 -0
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -0
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +48 -0
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -0
- 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/list-view-sidebar/list-view-outline.js.map +1 -1
- package/build-module/components/local-autosave-monitor/index.js.map +1 -1
- package/build-module/components/media-categories/index.js.map +1 -1
- package/build-module/components/mode-switcher/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/offline-status/index.native.js.map +1 -1
- 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/pattern-overrides-panel/index.js.map +1 -1
- package/build-module/components/plugin-document-setting-panel/index.js.map +1 -1
- package/build-module/components/plugin-more-menu-item/index.js +73 -0
- package/build-module/components/plugin-more-menu-item/index.js.map +1 -0
- 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-post-status-info/index.js +66 -0
- package/build-module/components/plugin-post-status-info/index.js.map +1 -0
- 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 +102 -0
- package/build-module/components/plugin-sidebar/index.js.map +1 -0
- package/build-module/components/plugin-sidebar-more-menu-item/index.js +65 -0
- package/build-module/components/plugin-sidebar-more-menu-item/index.js.map +1 -0
- package/build-module/components/post-actions/actions.js +317 -19
- package/build-module/components/post-actions/actions.js.map +1 -1
- package/build-module/components/post-actions/index.js +153 -0
- package/build-module/components/post-actions/index.js.map +1 -0
- 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/combobox.js.map +1 -1
- package/build-module/components/post-author/constants.js.map +1 -1
- package/build-module/components/post-author/hook.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-author/select.js.map +1 -1
- package/build-module/components/post-card-panel/index.js +16 -17
- package/build-module/components/post-card-panel/index.js.map +1 -1
- 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 +8 -6
- package/build-module/components/post-discussion/panel.js.map +1 -1
- package/build-module/components/post-excerpt/check.js +8 -18
- 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/check.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-featured-image/panel.js.map +1 -1
- package/build-module/components/post-format/check.js.map +1 -1
- package/build-module/components/post-format/index.js.map +1 -1
- 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-last-revision/check.js.map +1 -1
- package/build-module/components/post-last-revision/index.js.map +1 -1
- package/build-module/components/post-last-revision/panel.js.map +1 -1
- package/build-module/components/post-locked-modal/index.js.map +1 -1
- package/build-module/components/post-panel-row/index.js.map +1 -1
- package/build-module/components/post-pending-status/check.js.map +1 -1
- package/build-module/components/post-pending-status/index.js.map +1 -1
- package/build-module/components/post-pingbacks/index.js.map +1 -1
- package/build-module/components/post-preview-button/index.js.map +1 -1
- package/build-module/components/post-publish-button/index.js +31 -31
- package/build-module/components/post-publish-button/index.js.map +1 -1
- package/build-module/components/post-publish-button/label.js +51 -42
- package/build-module/components/post-publish-button/label.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-publish-panel/index.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
- package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
- package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
- package/build-module/components/post-saved-state/index.js +10 -6
- package/build-module/components/post-saved-state/index.js.map +1 -1
- package/build-module/components/post-schedule/check.js.map +1 -1
- package/build-module/components/post-schedule/index.js.map +1 -1
- package/build-module/components/post-schedule/label.js.map +1 -1
- package/build-module/components/post-schedule/panel.js +9 -1
- package/build-module/components/post-schedule/panel.js.map +1 -1
- package/build-module/components/post-slug/check.js.map +1 -1
- package/build-module/components/post-slug/index.js +44 -68
- package/build-module/components/post-slug/index.js.map +1 -1
- package/build-module/components/post-status/index.js +231 -0
- package/build-module/components/post-status/index.js.map +1 -0
- package/build-module/components/post-sticky/check.js.map +1 -1
- package/build-module/components/post-sticky/index.js.map +1 -1
- package/build-module/components/post-switch-to-draft-button/index.js +7 -1
- package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build-module/components/post-sync-status/index.js.map +1 -1
- package/build-module/components/post-taxonomies/check.js.map +1 -1
- package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/index.js.map +1 -1
- package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
- package/build-module/components/post-taxonomies/panel.js.map +1 -1
- package/build-module/components/post-template/block-theme.js +9 -5
- 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/create-new-template-modal.js.map +1 -1
- package/build-module/components/post-template/create-new-template.js.map +1 -1
- package/build-module/components/post-template/hooks.js.map +1 -1
- package/build-module/components/post-template/panel.js.map +1 -1
- package/build-module/components/post-template/reset-default-template.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-text-editor/index.js.map +1 -1
- package/build-module/components/post-title/constants.js.map +1 -1
- package/build-module/components/post-title/index.js.map +1 -1
- package/build-module/components/post-title/index.native.js.map +1 -1
- package/build-module/components/post-title/post-title-raw.js.map +1 -1
- package/build-module/components/post-title/use-post-title-focus.js.map +1 -1
- package/build-module/components/post-title/use-post-title.js.map +1 -1
- package/build-module/components/post-trash/check.js +24 -26
- package/build-module/components/post-trash/check.js.map +1 -1
- package/build-module/components/post-trash/index.js +2 -1
- package/build-module/components/post-trash/index.js.map +1 -1
- package/build-module/components/post-type-support-check/index.js.map +1 -1
- package/build-module/components/post-url/check.js.map +1 -1
- package/build-module/components/post-url/index.js +47 -21
- package/build-module/components/post-url/index.js.map +1 -1
- package/build-module/components/post-url/label.js.map +1 -1
- package/build-module/components/post-url/panel.js +15 -8
- package/build-module/components/post-url/panel.js.map +1 -1
- package/build-module/components/post-view-link/index.js.map +1 -1
- package/build-module/components/post-visibility/check.js.map +1 -1
- package/build-module/components/post-visibility/index.js +2 -1
- package/build-module/components/post-visibility/index.js.map +1 -1
- package/build-module/components/post-visibility/label.js.map +1 -1
- package/build-module/components/post-visibility/utils.js.map +1 -1
- package/build-module/components/preferences-modal/enable-panel.js.map +1 -1
- package/build-module/components/preferences-modal/enable-plugin-document-setting-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 +26 -18
- 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 +5 -3
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/provider/index.native.js.map +1 -1
- package/build-module/components/provider/navigation-block-editing-mode.js.map +1 -1
- package/build-module/components/provider/use-auto-switch-editor-sidebars.js +46 -0
- package/build-module/components/provider/use-auto-switch-editor-sidebars.js.map +1 -0
- package/build-module/components/provider/use-block-editor-settings.js +66 -45
- package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
- package/build-module/components/provider/use-block-editor-settings.native.js.map +1 -1
- package/build-module/components/provider/use-hide-blocks-from-inserter.js.map +1 -1
- package/build-module/components/provider/with-registry-provider.js +1 -0
- package/build-module/components/provider/with-registry-provider.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/start-page-options/index.js +136 -0
- package/build-module/components/start-page-options/index.js.map +1 -0
- package/build-module/components/table-of-contents/index.js.map +1 -1
- package/build-module/components/table-of-contents/panel.js.map +1 -1
- package/build-module/components/template-areas/index.js.map +1 -1
- package/build-module/components/template-validation-notice/index.js +25 -31
- package/build-module/components/template-validation-notice/index.js.map +1 -1
- package/build-module/components/theme-support-check/index.js +11 -16
- package/build-module/components/theme-support-check/index.js.map +1 -1
- package/build-module/components/time-to-read/index.js.map +1 -1
- package/build-module/components/unsaved-changes-warning/index.js.map +1 -1
- package/build-module/components/word-count/index.js.map +1 -1
- package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
- package/build-module/hooks/default-autocompleters.js.map +1 -1
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/index.native.js.map +1 -1
- package/build-module/hooks/pattern-overrides.js +22 -10
- package/build-module/hooks/pattern-overrides.js.map +1 -1
- package/build-module/hooks/use-select-nearest-editable-block.js.map +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js.map +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/private-apis.js +36 -3
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/actions.native.js.map +1 -1
- package/build-module/store/constants.js +7 -0
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/local-autosave.js.map +1 -1
- package/build-module/store/private-actions.js +174 -4
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +1 -6
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/reducer.native.js.map +1 -1
- package/build-module/store/selectors.js +4 -7
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/selectors.native.js.map +1 -1
- package/build-module/store/utils/get-filtered-template-parts.js.map +1 -1
- package/build-module/store/utils/is-template-revertable.js +22 -0
- package/build-module/store/utils/is-template-revertable.js.map +1 -0
- package/build-module/store/utils/notice-builder.js.map +1 -1
- package/build-module/utils/get-template-part-icon.js.map +1 -1
- package/build-module/utils/index.js.map +1 -1
- package/build-module/utils/index.native.js.map +1 -1
- package/build-module/utils/media-upload/index.js.map +1 -1
- package/build-module/utils/media-upload/index.native.js.map +1 -1
- package/build-module/utils/terms.js.map +1 -1
- package/build-module/utils/url.js.map +1 -1
- package/build-style/style-rtl.css +703 -53
- package/build-style/style.css +703 -53
- package/package.json +35 -35
- package/src/bindings/post-meta.js +11 -27
- package/src/components/autosave-monitor/index.js +23 -11
- 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/commands/index.js +20 -1
- package/src/components/document-outline/check.js +8 -0
- package/src/components/document-outline/index.js +10 -0
- package/src/components/document-tools/index.js +16 -19
- package/src/components/editor-canvas/edit-template-blocks-notification.js +16 -2
- package/src/components/editor-canvas/index.js +4 -4
- 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/error-boundary/style.native.scss +1 -1
- package/src/components/global-keyboard-shortcuts/index.js +32 -0
- package/src/components/global-keyboard-shortcuts/register-shortcuts.js +61 -0
- package/src/components/index.js +4 -0
- package/src/components/inserter-sidebar/index.js +2 -5
- package/src/components/keyboard-shortcut-help-modal/config.js +62 -0
- package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +43 -0
- package/src/components/keyboard-shortcut-help-modal/index.js +160 -0
- package/src/components/keyboard-shortcut-help-modal/shortcut.js +67 -0
- package/src/components/keyboard-shortcut-help-modal/style.scss +61 -0
- package/src/components/list-view-sidebar/index.js +1 -1
- package/src/components/list-view-sidebar/style.scss +2 -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/plugin-more-menu-item/index.js +73 -0
- package/src/components/plugin-post-publish-panel/index.js +1 -1
- package/src/components/plugin-post-status-info/index.js +63 -0
- package/src/components/plugin-pre-publish-panel/index.js +1 -1
- package/src/components/plugin-sidebar/index.js +98 -0
- package/src/components/plugin-sidebar-more-menu-item/index.js +64 -0
- package/src/components/post-actions/actions.js +413 -18
- package/src/components/post-actions/index.js +190 -0
- package/src/components/post-actions/style.scss +3 -0
- 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 +28 -23
- package/src/components/post-card-panel/style.scss +2 -6
- 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 +24 -20
- package/src/components/post-excerpt/check.js +8 -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-last-edited-panel/index.js +35 -0
- package/src/components/post-last-edited-panel/style.scss +6 -0
- package/src/components/post-panel-row/style.scss +3 -3
- package/src/components/post-publish-button/index.js +23 -36
- package/src/components/post-publish-button/label.js +54 -39
- package/src/components/post-publish-button/post-publish-button-or-toggle.js +102 -0
- package/src/components/post-publish-button/test/index.js +15 -26
- package/src/components/post-publish-button/test/label.js +44 -21
- package/src/components/post-publish-button/test/post-publish-button-or-toggle.js +63 -0
- package/src/components/post-publish-panel/style.scss +43 -0
- package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +225 -75
- package/src/components/post-saved-state/index.js +13 -6
- package/src/components/post-saved-state/test/index.js +4 -0
- package/src/components/post-schedule/panel.js +23 -1
- package/src/components/post-schedule/style.scss +2 -4
- package/src/components/post-slug/index.js +50 -68
- package/src/components/post-slug/test/index.js +29 -6
- package/src/components/post-status/index.js +318 -0
- package/src/components/post-status/style.scss +74 -0
- package/src/components/post-switch-to-draft-button/index.js +5 -0
- package/src/components/post-template/block-theme.js +33 -24
- 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/style.scss +1 -1
- package/src/components/post-trash/check.js +19 -19
- package/src/components/post-trash/index.js +1 -0
- package/src/components/post-url/index.js +132 -101
- package/src/components/post-url/panel.js +21 -8
- package/src/components/post-url/style.scss +8 -6
- package/src/components/post-visibility/index.js +1 -0
- package/src/components/preferences-modal/enable-publish-sidebar.js +28 -0
- package/src/components/preferences-modal/index.js +40 -22
- 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 +17 -8
- package/src/components/provider/use-auto-switch-editor-sidebars.js +49 -0
- package/src/components/provider/use-block-editor-settings.js +59 -33
- package/src/components/provider/with-registry-provider.js +1 -0
- package/src/components/save-publish-panels/index.js +96 -0
- package/src/components/save-publish-panels/style.scss +36 -0
- package/src/components/start-page-options/index.js +140 -0
- package/src/components/start-page-options/style.scss +26 -0
- package/src/components/template-validation-notice/index.js +48 -50
- package/src/components/theme-support-check/index.js +9 -16
- package/src/components/theme-support-check/test/index.js +44 -43
- package/src/hooks/pattern-overrides.js +25 -14
- package/src/private-apis.js +33 -2
- package/src/store/constants.js +7 -0
- package/src/store/private-actions.js +269 -4
- package/src/store/private-selectors.js +1 -6
- package/src/store/selectors.js +4 -7
- package/src/store/utils/is-template-revertable.js +23 -0
- package/src/style.scss +10 -2
- package/src/components/post-publish-button/style.scss +0 -8
- package/src/components/provider/test/disable-non-page-content-blocks.js +0 -111
- package/src/components/template-validation-notice/style.scss +0 -9
|
@@ -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>
|
|
@@ -40,13 +40,14 @@ export default function PostSavedState( { forceIsDirty } ) {
|
|
|
40
40
|
isAutosaving,
|
|
41
41
|
isDirty,
|
|
42
42
|
isNew,
|
|
43
|
-
isPending,
|
|
44
43
|
isPublished,
|
|
45
44
|
isSaveable,
|
|
46
45
|
isSaving,
|
|
47
46
|
isScheduled,
|
|
48
47
|
hasPublishAction,
|
|
49
48
|
showIconLabels,
|
|
49
|
+
postStatus,
|
|
50
|
+
postStatusHasChanged,
|
|
50
51
|
} = useSelect(
|
|
51
52
|
( select ) => {
|
|
52
53
|
const {
|
|
@@ -59,14 +60,13 @@ export default function PostSavedState( { forceIsDirty } ) {
|
|
|
59
60
|
getCurrentPost,
|
|
60
61
|
isAutosavingPost,
|
|
61
62
|
getEditedPostAttribute,
|
|
63
|
+
getPostEdits,
|
|
62
64
|
} = select( editorStore );
|
|
63
65
|
const { get } = select( preferencesStore );
|
|
64
|
-
|
|
65
66
|
return {
|
|
66
67
|
isAutosaving: isAutosavingPost(),
|
|
67
68
|
isDirty: forceIsDirty || isEditedPostDirty(),
|
|
68
69
|
isNew: isEditedPostNew(),
|
|
69
|
-
isPending: 'pending' === getEditedPostAttribute( 'status' ),
|
|
70
70
|
isPublished: isCurrentPostPublished(),
|
|
71
71
|
isSaving: isSavingPost(),
|
|
72
72
|
isSaveable: isEditedPostSaveable(),
|
|
@@ -74,11 +74,13 @@ export default function PostSavedState( { forceIsDirty } ) {
|
|
|
74
74
|
hasPublishAction:
|
|
75
75
|
getCurrentPost()?._links?.[ 'wp:action-publish' ] ?? false,
|
|
76
76
|
showIconLabels: get( 'core', 'showIconLabels' ),
|
|
77
|
+
postStatus: getEditedPostAttribute( 'status' ),
|
|
78
|
+
postStatusHasChanged: !! getPostEdits()?.status,
|
|
77
79
|
};
|
|
78
80
|
},
|
|
79
81
|
[ forceIsDirty ]
|
|
80
82
|
);
|
|
81
|
-
|
|
83
|
+
const isPending = postStatus === 'pending';
|
|
82
84
|
const { savePost } = useDispatch( editorStore );
|
|
83
85
|
|
|
84
86
|
const wasSaving = usePrevious( isSaving );
|
|
@@ -102,7 +104,13 @@ export default function PostSavedState( { forceIsDirty } ) {
|
|
|
102
104
|
return null;
|
|
103
105
|
}
|
|
104
106
|
|
|
105
|
-
if (
|
|
107
|
+
if (
|
|
108
|
+
isPublished ||
|
|
109
|
+
isScheduled ||
|
|
110
|
+
! [ 'pending', 'draft', 'auto-draft' ].includes( postStatus ) ||
|
|
111
|
+
( postStatusHasChanged &&
|
|
112
|
+
[ 'pending', 'draft' ].includes( postStatus ) )
|
|
113
|
+
) {
|
|
106
114
|
return null;
|
|
107
115
|
}
|
|
108
116
|
|
|
@@ -115,7 +123,6 @@ export default function PostSavedState( { forceIsDirty } ) {
|
|
|
115
123
|
const isSaved = forceSavedMessage || ( ! isNew && ! isDirty );
|
|
116
124
|
const isSavedState = isSaving || isSaved;
|
|
117
125
|
const isDisabled = isSaving || isSaved || ! isSaveable;
|
|
118
|
-
|
|
119
126
|
let text;
|
|
120
127
|
|
|
121
128
|
if ( isSaving ) {
|
|
@@ -47,6 +47,7 @@ describe( 'PostSavedState', () => {
|
|
|
47
47
|
isNew: true,
|
|
48
48
|
isSaveable: false,
|
|
49
49
|
isSaving: true,
|
|
50
|
+
postStatus: 'draft',
|
|
50
51
|
} ) );
|
|
51
52
|
|
|
52
53
|
render( <PostSavedState /> );
|
|
@@ -62,6 +63,7 @@ describe( 'PostSavedState', () => {
|
|
|
62
63
|
isNew: true,
|
|
63
64
|
isSaveable: false,
|
|
64
65
|
isSaving: false,
|
|
66
|
+
postStatus: 'draft',
|
|
65
67
|
} ) );
|
|
66
68
|
|
|
67
69
|
render( <PostSavedState /> );
|
|
@@ -75,6 +77,7 @@ describe( 'PostSavedState', () => {
|
|
|
75
77
|
isNew: false,
|
|
76
78
|
isSaveable: true,
|
|
77
79
|
isSaving: false,
|
|
80
|
+
postStatus: 'draft',
|
|
78
81
|
} ) );
|
|
79
82
|
|
|
80
83
|
render( <PostSavedState /> );
|
|
@@ -93,6 +96,7 @@ describe( 'PostSavedState', () => {
|
|
|
93
96
|
isNew: false,
|
|
94
97
|
isSaveable: true,
|
|
95
98
|
isSaving: false,
|
|
99
|
+
postStatus: 'draft',
|
|
96
100
|
} ) );
|
|
97
101
|
|
|
98
102
|
// Simulate the viewport being considered large.
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { Button, Dropdown } from '@wordpress/components';
|
|
5
5
|
import { __, sprintf } from '@wordpress/i18n';
|
|
6
6
|
import { useState, useMemo } from '@wordpress/element';
|
|
7
|
+
import { useSelect } from '@wordpress/data';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Internal dependencies
|
|
@@ -12,9 +13,27 @@ import PostScheduleCheck from './check';
|
|
|
12
13
|
import PostScheduleForm from './index';
|
|
13
14
|
import { usePostScheduleLabel } from './label';
|
|
14
15
|
import PostPanelRow from '../post-panel-row';
|
|
16
|
+
import { store as editorStore } from '../../store';
|
|
17
|
+
import {
|
|
18
|
+
TEMPLATE_POST_TYPE,
|
|
19
|
+
TEMPLATE_PART_POST_TYPE,
|
|
20
|
+
PATTERN_POST_TYPE,
|
|
21
|
+
NAVIGATION_POST_TYPE,
|
|
22
|
+
} from '../../store/constants';
|
|
23
|
+
|
|
24
|
+
const DESIGN_POST_TYPES = [
|
|
25
|
+
TEMPLATE_POST_TYPE,
|
|
26
|
+
TEMPLATE_PART_POST_TYPE,
|
|
27
|
+
PATTERN_POST_TYPE,
|
|
28
|
+
NAVIGATION_POST_TYPE,
|
|
29
|
+
];
|
|
15
30
|
|
|
16
31
|
export default function PostSchedulePanel() {
|
|
17
32
|
const [ popoverAnchor, setPopoverAnchor ] = useState( null );
|
|
33
|
+
const postType = useSelect(
|
|
34
|
+
( select ) => select( editorStore ).getCurrentPostType(),
|
|
35
|
+
[]
|
|
36
|
+
);
|
|
18
37
|
// Memoize popoverProps to avoid returning a new object every time.
|
|
19
38
|
const popoverProps = useMemo(
|
|
20
39
|
() => ( {
|
|
@@ -29,6 +48,9 @@ export default function PostSchedulePanel() {
|
|
|
29
48
|
|
|
30
49
|
const label = usePostScheduleLabel();
|
|
31
50
|
const fullLabel = usePostScheduleLabel( { full: true } );
|
|
51
|
+
if ( DESIGN_POST_TYPES.includes( postType ) ) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
32
54
|
|
|
33
55
|
return (
|
|
34
56
|
<PostScheduleCheck>
|
|
@@ -40,7 +62,7 @@ export default function PostSchedulePanel() {
|
|
|
40
62
|
contentClassName="editor-post-schedule__dialog"
|
|
41
63
|
renderToggle={ ( { onToggle, isOpen } ) => (
|
|
42
64
|
<Button
|
|
43
|
-
|
|
65
|
+
size="compact"
|
|
44
66
|
className="editor-post-schedule__dialog-toggle"
|
|
45
67
|
variant="tertiary"
|
|
46
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
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useDispatch, useSelect } from '@wordpress/data';
|
|
5
|
+
import { useState } from '@wordpress/element';
|
|
6
6
|
import { __ } from '@wordpress/i18n';
|
|
7
|
-
import { compose } from '@wordpress/compose';
|
|
8
7
|
import { safeDecodeURIComponent, cleanForSlug } from '@wordpress/url';
|
|
9
8
|
import { TextControl } from '@wordpress/components';
|
|
10
9
|
|
|
@@ -14,72 +13,55 @@ import { TextControl } from '@wordpress/components';
|
|
|
14
13
|
import PostSlugCheck from './check';
|
|
15
14
|
import { store as editorStore } from '../../store';
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
postID,
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
this.setSlug = this.setSlug.bind( this );
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
setSlug( event ) {
|
|
32
|
-
const { postSlug, onUpdateSlug } = this.props;
|
|
33
|
-
const { value } = event.target;
|
|
34
|
-
|
|
35
|
-
const editedSlug = cleanForSlug( value );
|
|
36
|
-
|
|
37
|
-
if ( editedSlug === postSlug ) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
onUpdateSlug( editedSlug );
|
|
42
|
-
}
|
|
16
|
+
function PostSlugControl() {
|
|
17
|
+
const postSlug = useSelect( ( select ) => {
|
|
18
|
+
return safeDecodeURIComponent(
|
|
19
|
+
select( editorStore ).getEditedPostSlug()
|
|
20
|
+
);
|
|
21
|
+
}, [] );
|
|
22
|
+
const { editPost } = useDispatch( editorStore );
|
|
23
|
+
const [ forceEmptyField, setForceEmptyField ] = useState( false );
|
|
43
24
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
25
|
+
return (
|
|
26
|
+
<TextControl
|
|
27
|
+
__nextHasNoMarginBottom
|
|
28
|
+
label={ __( 'Slug' ) }
|
|
29
|
+
autoComplete="off"
|
|
30
|
+
spellCheck="false"
|
|
31
|
+
value={ forceEmptyField ? '' : postSlug }
|
|
32
|
+
onChange={ ( newValue ) => {
|
|
33
|
+
editPost( { slug: newValue } );
|
|
34
|
+
// When we delete the field the permalink gets
|
|
35
|
+
// reverted to the original value.
|
|
36
|
+
// The forceEmptyField logic allows the user to have
|
|
37
|
+
// the field temporarily empty while typing.
|
|
38
|
+
if ( ! newValue ) {
|
|
39
|
+
if ( ! forceEmptyField ) {
|
|
40
|
+
setForceEmptyField( true );
|
|
56
41
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if ( forceEmptyField ) {
|
|
45
|
+
setForceEmptyField( false );
|
|
46
|
+
}
|
|
47
|
+
} }
|
|
48
|
+
onBlur={ ( event ) => {
|
|
49
|
+
editPost( {
|
|
50
|
+
slug: cleanForSlug( event.target.value ),
|
|
51
|
+
} );
|
|
52
|
+
if ( forceEmptyField ) {
|
|
53
|
+
setForceEmptyField( false );
|
|
54
|
+
}
|
|
55
|
+
} }
|
|
56
|
+
className="editor-post-slug"
|
|
57
|
+
/>
|
|
58
|
+
);
|
|
63
59
|
}
|
|
64
60
|
|
|
65
|
-
export default
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
postSlug: getEditedPostAttribute( 'slug' ),
|
|
73
|
-
postTitle: getEditedPostAttribute( 'title' ),
|
|
74
|
-
postID: id,
|
|
75
|
-
};
|
|
76
|
-
} ),
|
|
77
|
-
withDispatch( ( dispatch ) => {
|
|
78
|
-
const { editPost } = dispatch( editorStore );
|
|
79
|
-
return {
|
|
80
|
-
onUpdateSlug( slug ) {
|
|
81
|
-
editPost( { slug } );
|
|
82
|
-
},
|
|
83
|
-
};
|
|
84
|
-
} ),
|
|
85
|
-
] )( PostSlug );
|
|
61
|
+
export default function PostSlug() {
|
|
62
|
+
return (
|
|
63
|
+
<PostSlugCheck>
|
|
64
|
+
<PostSlugControl />
|
|
65
|
+
</PostSlugCheck>
|
|
66
|
+
);
|
|
67
|
+
}
|