@wordpress/editor 14.5.0 → 14.7.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 +37 -0
- package/build/bindings/post-meta.js +12 -10
- package/build/bindings/post-meta.js.map +1 -1
- package/build/components/block-manager/index.js +4 -1
- package/build/components/block-manager/index.js.map +1 -1
- package/build/components/block-settings-menu/content-only-settings-menu.js +5 -8
- package/build/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
- package/build/components/create-template-part-modal/index.js +1 -0
- package/build/components/create-template-part-modal/index.js.map +1 -1
- package/build/components/document-bar/index.js +4 -4
- package/build/components/document-bar/index.js.map +1 -1
- package/build/components/editor-history/redo.js +4 -1
- package/build/components/editor-history/redo.js.map +1 -1
- package/build/components/editor-history/undo.js +4 -1
- package/build/components/editor-history/undo.js.map +1 -1
- package/build/components/editor-interface/index.js +2 -3
- package/build/components/editor-interface/index.js.map +1 -1
- package/build/components/error-boundary/index.js +4 -1
- package/build/components/error-boundary/index.js.map +1 -1
- package/build/components/global-styles-provider/index.js +17 -4
- package/build/components/global-styles-provider/index.js.map +1 -1
- package/build/components/index.js +8 -0
- package/build/components/index.js.map +1 -1
- package/build/components/inserter-sidebar/index.js +8 -7
- package/build/components/inserter-sidebar/index.js.map +1 -1
- package/build/components/local-autosave-monitor/index.js +5 -5
- package/build/components/local-autosave-monitor/index.js.map +1 -1
- package/build/components/page-attributes/parent.js +10 -6
- package/build/components/page-attributes/parent.js.map +1 -1
- package/build/components/plugin-preview-menu-item/index.js +57 -0
- package/build/components/plugin-preview-menu-item/index.js.map +1 -0
- package/build/components/post-actions/actions.js +4 -499
- package/build/components/post-actions/actions.js.map +1 -1
- package/build/components/post-actions/index.js +13 -25
- package/build/components/post-actions/index.js.map +1 -1
- package/build/components/post-card-panel/index.js +20 -20
- package/build/components/post-card-panel/index.js.map +1 -1
- package/build/components/post-excerpt/panel.js +4 -1
- package/build/components/post-excerpt/panel.js.map +1 -1
- package/build/components/post-featured-image/index.js +14 -3
- package/build/components/post-featured-image/index.js.map +1 -1
- package/build/components/post-format/index.js +4 -1
- package/build/components/post-format/index.js.map +1 -1
- package/build/components/post-last-revision/index.js +4 -1
- package/build/components/post-last-revision/index.js.map +1 -1
- package/build/components/post-locked-modal/index.js +12 -3
- package/build/components/post-locked-modal/index.js.map +1 -1
- package/build/components/post-publish-panel/index.js +4 -1
- package/build/components/post-publish-panel/index.js.map +1 -1
- package/build/components/post-publish-panel/maybe-post-format-panel.js +4 -1
- package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-upload-media.js +14 -8
- package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
- package/build/components/post-publish-panel/postpublish.js +4 -0
- package/build/components/post-publish-panel/postpublish.js.map +1 -1
- package/build/components/post-slug/index.js +1 -0
- package/build/components/post-slug/index.js.map +1 -1
- package/build/components/post-status/index.js +4 -2
- package/build/components/post-status/index.js.map +1 -1
- package/build/components/post-taxonomies/hierarchical-term-selector.js +6 -2
- package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/most-used-terms.js +4 -1
- package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
- package/build/components/post-template/block-theme.js +13 -4
- package/build/components/post-template/block-theme.js.map +1 -1
- package/build/components/post-template/classic-theme.js +4 -1
- package/build/components/post-template/classic-theme.js.map +1 -1
- package/build/components/post-title/index.js +32 -46
- package/build/components/post-title/index.js.map +1 -1
- package/build/components/post-url/index.js +10 -6
- package/build/components/post-url/index.js.map +1 -1
- package/build/components/preview-dropdown/index.js +26 -14
- package/build/components/preview-dropdown/index.js.map +1 -1
- package/build/components/provider/use-block-editor-settings.js +5 -6
- package/build/components/provider/use-block-editor-settings.js.map +1 -1
- package/build/components/save-publish-panels/index.js +8 -2
- package/build/components/save-publish-panels/index.js.map +1 -1
- package/build/components/sidebar/post-summary.js +10 -7
- package/build/components/sidebar/post-summary.js.map +1 -1
- package/build/components/start-template-options/index.js +4 -1
- package/build/components/start-template-options/index.js.map +1 -1
- package/build/components/table-of-contents/index.js +4 -1
- package/build/components/table-of-contents/index.js.map +1 -1
- package/build/components/template-content-panel/index.js +1 -1
- package/build/components/template-content-panel/index.js.map +1 -1
- package/build/components/text-editor/index.js +4 -1
- package/build/components/text-editor/index.js.map +1 -1
- package/build/components/visual-editor/index.js +1 -6
- package/build/components/visual-editor/index.js.map +1 -1
- package/build/dataviews/actions/duplicate-pattern.js +48 -0
- package/build/dataviews/actions/duplicate-pattern.js.map +1 -0
- package/build/dataviews/actions/duplicate-post.js +146 -0
- package/build/dataviews/actions/duplicate-post.js.map +1 -0
- package/build/dataviews/actions/duplicate-post.native.js +9 -0
- package/build/dataviews/actions/duplicate-post.native.js.map +1 -0
- package/build/dataviews/actions/duplicate-template-part.js +67 -0
- package/build/dataviews/actions/duplicate-template-part.js.map +1 -0
- package/build/dataviews/actions/export-pattern.js +2 -0
- package/build/dataviews/actions/export-pattern.js.map +1 -1
- package/build/dataviews/actions/permanently-delete-post.js +2 -0
- package/build/dataviews/actions/permanently-delete-post.js.map +1 -1
- package/build/dataviews/actions/rename-post.js +125 -0
- package/build/dataviews/actions/rename-post.js.map +1 -0
- package/build/dataviews/actions/reorder-page.js +116 -0
- package/build/dataviews/actions/reorder-page.js.map +1 -0
- package/build/dataviews/actions/reorder-page.native.js +9 -0
- package/build/dataviews/actions/reorder-page.native.js.map +1 -0
- package/build/dataviews/actions/reset-post.js +9 -3
- package/build/dataviews/actions/reset-post.js.map +1 -1
- package/build/dataviews/actions/trash-post.js +8 -2
- package/build/dataviews/actions/trash-post.js.map +1 -1
- package/build/dataviews/actions/utils.js +9 -1
- package/build/dataviews/actions/utils.js.map +1 -1
- package/build/dataviews/actions/view-post-revisions.js +49 -0
- package/build/dataviews/actions/view-post-revisions.js.map +1 -0
- package/build/dataviews/actions/view-post.js +36 -0
- package/build/dataviews/actions/view-post.js.map +1 -0
- package/build/dataviews/fields/index.js +32 -0
- package/build/dataviews/fields/index.js.map +1 -0
- package/build/dataviews/store/private-actions.js +16 -2
- package/build/dataviews/store/private-actions.js.map +1 -1
- package/build/dataviews/types.js.map +1 -1
- package/build/private-apis.js +2 -2
- package/build/private-apis.js.map +1 -1
- package/build/store/private-actions.js +2 -2
- package/build/store/private-actions.js.map +1 -1
- package/build/store/utils/is-template-revertable.js +1 -1
- package/build/store/utils/is-template-revertable.js.map +1 -1
- package/build-module/bindings/post-meta.js +12 -10
- package/build-module/bindings/post-meta.js.map +1 -1
- package/build-module/components/block-manager/index.js +4 -1
- package/build-module/components/block-manager/index.js.map +1 -1
- package/build-module/components/block-settings-menu/content-only-settings-menu.js +6 -9
- package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
- package/build-module/components/create-template-part-modal/index.js +1 -0
- package/build-module/components/create-template-part-modal/index.js.map +1 -1
- package/build-module/components/document-bar/index.js +4 -4
- package/build-module/components/document-bar/index.js.map +1 -1
- package/build-module/components/editor-history/redo.js +4 -1
- package/build-module/components/editor-history/redo.js.map +1 -1
- package/build-module/components/editor-history/undo.js +4 -1
- package/build-module/components/editor-history/undo.js.map +1 -1
- package/build-module/components/editor-interface/index.js +2 -3
- package/build-module/components/editor-interface/index.js.map +1 -1
- package/build-module/components/error-boundary/index.js +4 -1
- package/build-module/components/error-boundary/index.js.map +1 -1
- package/build-module/components/global-styles-provider/index.js +17 -4
- package/build-module/components/global-styles-provider/index.js.map +1 -1
- package/build-module/components/index.js +1 -0
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/inserter-sidebar/index.js +8 -7
- package/build-module/components/inserter-sidebar/index.js.map +1 -1
- package/build-module/components/local-autosave-monitor/index.js +5 -5
- package/build-module/components/local-autosave-monitor/index.js.map +1 -1
- package/build-module/components/page-attributes/parent.js +10 -6
- package/build-module/components/page-attributes/parent.js.map +1 -1
- package/build-module/components/plugin-preview-menu-item/index.js +52 -0
- package/build-module/components/plugin-preview-menu-item/index.js.map +1 -0
- package/build-module/components/post-actions/actions.js +5 -501
- package/build-module/components/post-actions/actions.js.map +1 -1
- package/build-module/components/post-actions/index.js +13 -25
- package/build-module/components/post-actions/index.js.map +1 -1
- package/build-module/components/post-card-panel/index.js +20 -20
- package/build-module/components/post-card-panel/index.js.map +1 -1
- package/build-module/components/post-excerpt/panel.js +4 -1
- package/build-module/components/post-excerpt/panel.js.map +1 -1
- package/build-module/components/post-featured-image/index.js +14 -3
- package/build-module/components/post-featured-image/index.js.map +1 -1
- package/build-module/components/post-format/index.js +4 -1
- package/build-module/components/post-format/index.js.map +1 -1
- package/build-module/components/post-last-revision/index.js +4 -1
- package/build-module/components/post-last-revision/index.js.map +1 -1
- package/build-module/components/post-locked-modal/index.js +12 -3
- package/build-module/components/post-locked-modal/index.js.map +1 -1
- package/build-module/components/post-publish-panel/index.js +4 -1
- package/build-module/components/post-publish-panel/index.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-post-format-panel.js +4 -1
- package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-upload-media.js +14 -8
- package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
- package/build-module/components/post-publish-panel/postpublish.js +4 -0
- package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
- package/build-module/components/post-slug/index.js +1 -0
- package/build-module/components/post-slug/index.js.map +1 -1
- package/build-module/components/post-status/index.js +4 -2
- package/build-module/components/post-status/index.js.map +1 -1
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js +7 -3
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/most-used-terms.js +4 -1
- package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
- package/build-module/components/post-template/block-theme.js +13 -4
- package/build-module/components/post-template/block-theme.js.map +1 -1
- package/build-module/components/post-template/classic-theme.js +4 -1
- package/build-module/components/post-template/classic-theme.js.map +1 -1
- package/build-module/components/post-title/index.js +33 -47
- package/build-module/components/post-title/index.js.map +1 -1
- package/build-module/components/post-url/index.js +11 -7
- package/build-module/components/post-url/index.js.map +1 -1
- package/build-module/components/preview-dropdown/index.js +26 -14
- package/build-module/components/preview-dropdown/index.js.map +1 -1
- package/build-module/components/provider/use-block-editor-settings.js +6 -7
- package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
- package/build-module/components/save-publish-panels/index.js +8 -2
- package/build-module/components/save-publish-panels/index.js.map +1 -1
- package/build-module/components/sidebar/post-summary.js +10 -7
- package/build-module/components/sidebar/post-summary.js.map +1 -1
- package/build-module/components/start-template-options/index.js +4 -1
- package/build-module/components/start-template-options/index.js.map +1 -1
- package/build-module/components/table-of-contents/index.js +4 -1
- package/build-module/components/table-of-contents/index.js.map +1 -1
- package/build-module/components/template-content-panel/index.js +1 -1
- package/build-module/components/template-content-panel/index.js.map +1 -1
- package/build-module/components/text-editor/index.js +4 -1
- package/build-module/components/text-editor/index.js.map +1 -1
- package/build-module/components/visual-editor/index.js +1 -6
- package/build-module/components/visual-editor/index.js.map +1 -1
- package/build-module/dataviews/actions/duplicate-pattern.js +39 -0
- package/build-module/dataviews/actions/duplicate-pattern.js.map +1 -0
- package/build-module/dataviews/actions/duplicate-post.js +139 -0
- package/build-module/dataviews/actions/duplicate-post.js.map +1 -0
- package/build-module/dataviews/actions/duplicate-post.native.js +3 -0
- package/build-module/dataviews/actions/duplicate-post.native.js.map +1 -0
- package/build-module/dataviews/actions/duplicate-template-part.js +58 -0
- package/build-module/dataviews/actions/duplicate-template-part.js.map +1 -0
- package/build-module/dataviews/actions/export-pattern.js +2 -0
- package/build-module/dataviews/actions/export-pattern.js.map +1 -1
- package/build-module/dataviews/actions/permanently-delete-post.js +3 -0
- package/build-module/dataviews/actions/permanently-delete-post.js.map +1 -1
- package/build-module/dataviews/actions/rename-post.js +118 -0
- package/build-module/dataviews/actions/rename-post.js.map +1 -0
- package/build-module/dataviews/actions/reorder-page.js +111 -0
- package/build-module/dataviews/actions/reorder-page.js.map +1 -0
- package/build-module/dataviews/actions/reorder-page.native.js +3 -0
- package/build-module/dataviews/actions/reorder-page.native.js.map +1 -0
- package/build-module/dataviews/actions/reset-post.js +9 -3
- package/build-module/dataviews/actions/reset-post.js.map +1 -1
- package/build-module/dataviews/actions/trash-post.js +8 -2
- package/build-module/dataviews/actions/trash-post.js.map +1 -1
- package/build-module/dataviews/actions/utils.js +7 -1
- package/build-module/dataviews/actions/utils.js.map +1 -1
- package/build-module/dataviews/actions/view-post-revisions.js +43 -0
- package/build-module/dataviews/actions/view-post-revisions.js.map +1 -0
- package/build-module/dataviews/actions/view-post.js +30 -0
- package/build-module/dataviews/actions/view-post.js.map +1 -0
- package/build-module/dataviews/fields/index.js +26 -0
- package/build-module/dataviews/fields/index.js.map +1 -0
- package/build-module/dataviews/store/private-actions.js +16 -2
- package/build-module/dataviews/store/private-actions.js.map +1 -1
- package/build-module/dataviews/types.js.map +1 -1
- package/build-module/private-apis.js +2 -2
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/private-actions.js +2 -2
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/utils/is-template-revertable.js +1 -1
- package/build-module/store/utils/is-template-revertable.js.map +1 -1
- package/build-style/style-rtl.css +14 -38
- package/build-style/style.css +14 -38
- package/build-types/bindings/post-meta.d.ts +0 -3
- package/build-types/bindings/post-meta.d.ts.map +1 -1
- package/build-types/components/block-settings-menu/content-only-settings-menu.d.ts.map +1 -1
- package/build-types/components/create-template-part-modal/index.d.ts.map +1 -1
- package/build-types/components/editor-history/redo.d.ts.map +1 -1
- package/build-types/components/editor-history/undo.d.ts.map +1 -1
- package/build-types/components/editor-interface/index.d.ts.map +1 -1
- package/build-types/components/error-boundary/index.d.ts.map +1 -1
- package/build-types/components/global-styles-provider/index.d.ts.map +1 -1
- package/build-types/components/index.d.ts +1 -0
- package/build-types/components/index.d.ts.map +1 -1
- package/build-types/components/inserter-sidebar/index.d.ts.map +1 -1
- package/build-types/components/page-attributes/parent.d.ts.map +1 -1
- package/build-types/components/plugin-preview-menu-item/index.d.ts +3 -0
- package/build-types/components/plugin-preview-menu-item/index.d.ts.map +1 -0
- package/build-types/components/post-actions/actions.d.ts +1 -26
- package/build-types/components/post-actions/actions.d.ts.map +1 -1
- package/build-types/components/post-actions/index.d.ts +3 -2
- package/build-types/components/post-actions/index.d.ts.map +1 -1
- package/build-types/components/post-card-panel/index.d.ts +4 -2
- package/build-types/components/post-card-panel/index.d.ts.map +1 -1
- package/build-types/components/post-format/index.d.ts.map +1 -1
- package/build-types/components/post-last-revision/index.d.ts.map +1 -1
- package/build-types/components/post-locked-modal/index.d.ts.map +1 -1
- package/build-types/components/post-publish-panel/index.d.ts.map +1 -1
- package/build-types/components/post-publish-panel/maybe-post-format-panel.d.ts.map +1 -1
- package/build-types/components/post-publish-panel/maybe-upload-media.d.ts.map +1 -1
- package/build-types/components/post-slug/index.d.ts.map +1 -1
- package/build-types/components/post-status/index.d.ts.map +1 -1
- package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts +1 -17
- package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts.map +1 -1
- package/build-types/components/post-taxonomies/most-used-terms.d.ts.map +1 -1
- package/build-types/components/post-template/block-theme.d.ts.map +1 -1
- package/build-types/components/post-template/classic-theme.d.ts.map +1 -1
- package/build-types/components/post-url/index.d.ts.map +1 -1
- package/build-types/components/preview-dropdown/index.d.ts.map +1 -1
- package/build-types/components/provider/use-block-editor-settings.d.ts.map +1 -1
- package/build-types/components/save-publish-panels/index.d.ts.map +1 -1
- package/build-types/components/sidebar/post-summary.d.ts.map +1 -1
- package/build-types/components/start-template-options/index.d.ts.map +1 -1
- package/build-types/components/template-content-panel/index.d.ts.map +1 -1
- package/build-types/components/text-editor/index.d.ts.map +1 -1
- package/build-types/components/visual-editor/index.d.ts.map +1 -1
- package/build-types/dataviews/actions/duplicate-pattern.d.ts +5 -0
- package/build-types/dataviews/actions/duplicate-pattern.d.ts.map +1 -0
- package/build-types/dataviews/actions/duplicate-post.d.ts +5 -0
- package/build-types/dataviews/actions/duplicate-post.d.ts.map +1 -0
- package/build-types/dataviews/actions/duplicate-post.native.d.ts +3 -0
- package/build-types/dataviews/actions/duplicate-post.native.d.ts.map +1 -0
- package/build-types/dataviews/actions/duplicate-template-part.d.ts +5 -0
- package/build-types/dataviews/actions/duplicate-template-part.d.ts.map +1 -0
- package/build-types/dataviews/actions/export-pattern.d.ts.map +1 -1
- package/build-types/dataviews/actions/permanently-delete-post.d.ts.map +1 -1
- package/build-types/dataviews/actions/rename-post.d.ts +5 -0
- package/build-types/dataviews/actions/rename-post.d.ts.map +1 -0
- package/build-types/dataviews/actions/reorder-page.d.ts +8 -0
- package/build-types/dataviews/actions/reorder-page.d.ts.map +1 -0
- package/build-types/dataviews/actions/reorder-page.native.d.ts +3 -0
- package/build-types/dataviews/actions/reorder-page.native.d.ts.map +1 -0
- package/build-types/dataviews/actions/reset-post.d.ts.map +1 -1
- package/build-types/dataviews/actions/trash-post.d.ts.map +1 -1
- package/build-types/dataviews/actions/utils.d.ts +5 -3
- package/build-types/dataviews/actions/utils.d.ts.map +1 -1
- package/build-types/dataviews/actions/view-post-revisions.d.ts +8 -0
- package/build-types/dataviews/actions/view-post-revisions.d.ts.map +1 -0
- package/build-types/dataviews/actions/view-post.d.ts +8 -0
- package/build-types/dataviews/actions/view-post.d.ts.map +1 -0
- package/build-types/dataviews/fields/index.d.ts +8 -0
- package/build-types/dataviews/fields/index.d.ts.map +1 -0
- package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
- package/build-types/dataviews/types.d.ts +57 -8
- package/build-types/dataviews/types.d.ts.map +1 -1
- package/build-types/store/private-actions.d.ts.map +1 -1
- package/build-types/store/utils/is-template-revertable.d.ts.map +1 -1
- package/package.json +36 -36
- package/src/bindings/post-meta.js +14 -8
- package/src/components/block-manager/index.js +2 -0
- package/src/components/block-manager/style.scss +2 -2
- package/src/components/block-settings-menu/content-only-settings-menu.js +5 -9
- package/src/components/create-template-part-modal/index.js +1 -0
- package/src/components/create-template-part-modal/style.scss +1 -1
- package/src/components/document-bar/index.js +4 -4
- package/src/components/document-outline/style.scss +1 -1
- package/src/components/editor-history/redo.js +2 -0
- package/src/components/editor-history/undo.js +2 -0
- package/src/components/editor-interface/index.js +2 -4
- package/src/components/error-boundary/index.js +6 -1
- package/src/components/error-boundary/style.native.scss +1 -1
- package/src/components/error-boundary/style.scss +1 -1
- package/src/components/global-styles-provider/index.js +16 -3
- package/src/components/header/style.scss +6 -3
- package/src/components/index.js +1 -0
- package/src/components/inserter-sidebar/index.js +12 -5
- package/src/components/local-autosave-monitor/index.js +6 -6
- package/src/components/page-attributes/parent.js +18 -13
- package/src/components/plugin-preview-menu-item/index.js +52 -0
- package/src/components/post-actions/actions.js +5 -616
- package/src/components/post-actions/index.js +24 -34
- package/src/components/post-card-panel/index.js +28 -27
- package/src/components/post-card-panel/style.scss +1 -1
- package/src/components/post-discussion/style.scss +0 -9
- package/src/components/post-excerpt/panel.js +2 -0
- package/src/components/post-featured-image/index.js +8 -0
- package/src/components/post-featured-image/style.scss +1 -2
- package/src/components/post-format/index.js +2 -0
- package/src/components/post-format/style.scss +0 -6
- package/src/components/post-last-revision/index.js +2 -0
- package/src/components/post-locked-modal/index.js +14 -2
- package/src/components/post-locked-modal/style.scss +1 -1
- package/src/components/post-publish-panel/index.js +2 -0
- package/src/components/post-publish-panel/maybe-post-format-panel.js +2 -0
- package/src/components/post-publish-panel/maybe-upload-media.js +37 -29
- package/src/components/post-publish-panel/postpublish.js +8 -2
- package/src/components/post-publish-panel/style.scss +3 -1
- package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +8 -8
- package/src/components/post-slug/index.js +1 -0
- package/src/components/post-status/index.js +3 -2
- package/src/components/post-status/style.scss +0 -19
- package/src/components/post-taxonomies/hierarchical-term-selector.js +5 -1
- package/src/components/post-taxonomies/most-used-terms.js +2 -0
- package/src/components/post-template/block-theme.js +15 -9
- package/src/components/post-template/classic-theme.js +2 -0
- package/src/components/post-title/index.js +30 -41
- package/src/components/post-url/index.js +17 -9
- package/src/components/preview-dropdown/index.js +28 -20
- package/src/components/provider/use-block-editor-settings.js +5 -5
- package/src/components/resizable-editor/style.scss +2 -2
- package/src/components/save-publish-panels/index.js +4 -0
- package/src/components/save-publish-panels/style.scss +3 -3
- package/src/components/sidebar/post-summary.js +20 -16
- package/src/components/site-discussion/style.scss +0 -14
- package/src/components/start-template-options/index.js +6 -1
- package/src/components/table-of-contents/index.js +2 -0
- package/src/components/template-content-panel/index.js +4 -1
- package/src/components/text-editor/index.js +2 -0
- package/src/components/visual-editor/index.js +2 -9
- package/src/dataviews/actions/duplicate-pattern.tsx +40 -0
- package/src/dataviews/actions/duplicate-post.native.tsx +3 -0
- package/src/dataviews/actions/duplicate-post.tsx +174 -0
- package/src/dataviews/actions/duplicate-template-part.tsx +70 -0
- package/src/dataviews/actions/export-pattern.tsx +2 -0
- package/src/dataviews/actions/permanently-delete-post.tsx +2 -0
- package/src/dataviews/actions/rename-post.tsx +146 -0
- package/src/dataviews/actions/reorder-page.native.tsx +3 -0
- package/src/dataviews/actions/reorder-page.tsx +125 -0
- package/src/dataviews/actions/reset-post.tsx +6 -1
- package/src/dataviews/actions/trash-post.tsx +4 -0
- package/src/dataviews/actions/utils.ts +14 -4
- package/src/dataviews/actions/view-post-revisions.tsx +47 -0
- package/src/dataviews/actions/view-post.tsx +30 -0
- package/src/dataviews/fields/index.ts +26 -0
- package/src/dataviews/store/private-actions.ts +42 -1
- package/src/dataviews/types.ts +47 -6
- package/src/private-apis.js +2 -2
- package/src/store/private-actions.js +4 -2
- package/src/store/utils/is-template-revertable.js +2 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -18,25 +18,6 @@
|
|
|
18
18
|
padding: $grid-unit-20;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.editor-change-status__options {
|
|
22
|
-
.components-base-control__field > .components-v-stack {
|
|
23
|
-
gap: $grid-unit-15;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// TODO: it's not great to override component styles.. This might be resolved
|
|
27
|
-
// by the new radio control component.
|
|
28
|
-
.components-radio-control__option {
|
|
29
|
-
align-items: flex-start;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
label {
|
|
33
|
-
.components-text {
|
|
34
|
-
display: block;
|
|
35
|
-
margin-top: $grid-unit-05;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
21
|
.editor-change-status__password-legend {
|
|
41
22
|
padding: 0;
|
|
42
23
|
margin-bottom: $grid-unit-10;
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
withFilters,
|
|
13
13
|
Flex,
|
|
14
14
|
FlexItem,
|
|
15
|
+
SearchControl,
|
|
15
16
|
} from '@wordpress/components';
|
|
16
17
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
17
18
|
import { useDebounce } from '@wordpress/compose';
|
|
@@ -406,7 +407,8 @@ export function HierarchicalTermSelector( { slug } ) {
|
|
|
406
407
|
return (
|
|
407
408
|
<Flex direction="column" gap="4">
|
|
408
409
|
{ showFilter && (
|
|
409
|
-
<
|
|
410
|
+
<SearchControl
|
|
411
|
+
__next40pxDefaultSize
|
|
410
412
|
__nextHasNoMarginBottom
|
|
411
413
|
label={ filterLabel }
|
|
412
414
|
value={ filterValue }
|
|
@@ -426,6 +428,8 @@ export function HierarchicalTermSelector( { slug } ) {
|
|
|
426
428
|
{ ! loading && hasCreateAction && (
|
|
427
429
|
<FlexItem>
|
|
428
430
|
<Button
|
|
431
|
+
// TODO: Switch to `true` (40px size) if possible
|
|
432
|
+
__next40pxDefaultSize={ false }
|
|
429
433
|
onClick={ onToggleForm }
|
|
430
434
|
className="editor-post-taxonomies__hierarchical-terms-add"
|
|
431
435
|
aria-expanded={ showForm }
|
|
@@ -62,6 +62,8 @@ export default function MostUsedTerms( { onSelect, taxonomy } ) {
|
|
|
62
62
|
{ terms.map( ( term ) => (
|
|
63
63
|
<li key={ term.id }>
|
|
64
64
|
<Button
|
|
65
|
+
// TODO: Switch to `true` (40px size) if possible
|
|
66
|
+
__next40pxDefaultSize={ false }
|
|
65
67
|
variant="link"
|
|
66
68
|
onClick={ () => onSelect( term ) }
|
|
67
69
|
>
|
|
@@ -8,6 +8,7 @@ import { __ } from '@wordpress/i18n';
|
|
|
8
8
|
import { useEntityRecord, store as coreStore } from '@wordpress/core-data';
|
|
9
9
|
import { check } from '@wordpress/icons';
|
|
10
10
|
import { store as noticesStore } from '@wordpress/notices';
|
|
11
|
+
import { store as preferencesStore } from '@wordpress/preferences';
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Internal dependencies
|
|
@@ -43,6 +44,8 @@ export default function BlockThemeControl( { id } ) {
|
|
|
43
44
|
};
|
|
44
45
|
}, [] );
|
|
45
46
|
|
|
47
|
+
const { get: getPreference } = useSelect( preferencesStore );
|
|
48
|
+
|
|
46
49
|
const { editedRecord: template, hasResolved } = useEntityRecord(
|
|
47
50
|
'postType',
|
|
48
51
|
'wp_template',
|
|
@@ -75,6 +78,17 @@ export default function BlockThemeControl( { id } ) {
|
|
|
75
78
|
},
|
|
76
79
|
]
|
|
77
80
|
: undefined;
|
|
81
|
+
|
|
82
|
+
const mayShowTemplateEditNotice = () => {
|
|
83
|
+
if ( ! getPreference( 'core/edit-site', 'welcomeGuideTemplate' ) ) {
|
|
84
|
+
createSuccessNotice(
|
|
85
|
+
__(
|
|
86
|
+
'Editing template. Changes made here affect all posts and pages that use the template.'
|
|
87
|
+
),
|
|
88
|
+
{ type: 'snackbar', actions: notificationAction }
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
78
92
|
return (
|
|
79
93
|
<DropdownMenu
|
|
80
94
|
popoverProps={ POPOVER_PROPS }
|
|
@@ -99,15 +113,7 @@ export default function BlockThemeControl( { id } ) {
|
|
|
99
113
|
postType: 'wp_template',
|
|
100
114
|
} );
|
|
101
115
|
onClose();
|
|
102
|
-
|
|
103
|
-
__(
|
|
104
|
-
'Editing template. Changes made here affect all posts and pages that use the template.'
|
|
105
|
-
),
|
|
106
|
-
{
|
|
107
|
-
type: 'snackbar',
|
|
108
|
-
actions: notificationAction,
|
|
109
|
-
}
|
|
110
|
-
);
|
|
116
|
+
mayShowTemplateEditNotice();
|
|
111
117
|
} }
|
|
112
118
|
>
|
|
113
119
|
{ __( 'Edit template' ) }
|
|
@@ -177,6 +177,8 @@ function PostTemplateDropdownContent( { onClose } ) {
|
|
|
177
177
|
{ canEdit && onNavigateToEntityRecord && (
|
|
178
178
|
<p>
|
|
179
179
|
<Button
|
|
180
|
+
// TODO: Switch to `true` (40px size) if possible
|
|
181
|
+
__next40pxDefaultSize={ false }
|
|
180
182
|
variant="link"
|
|
181
183
|
onClick={ () => {
|
|
182
184
|
onNavigateToEntityRecord( {
|
|
@@ -15,7 +15,6 @@ import { pasteHandler } from '@wordpress/blocks';
|
|
|
15
15
|
import {
|
|
16
16
|
__unstableUseRichText as useRichText,
|
|
17
17
|
create,
|
|
18
|
-
toHTMLString,
|
|
19
18
|
insert,
|
|
20
19
|
} from '@wordpress/rich-text';
|
|
21
20
|
import { useMergeRefs } from '@wordpress/compose';
|
|
@@ -50,9 +49,35 @@ function PostTitle( _, forwardedRef ) {
|
|
|
50
49
|
const { clearSelectedBlock, insertBlocks, insertDefaultBlock } =
|
|
51
50
|
useDispatch( blockEditorStore );
|
|
52
51
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
const decodedPlaceholder =
|
|
53
|
+
decodeEntities( placeholder ) || __( 'Add title' );
|
|
54
|
+
|
|
55
|
+
const {
|
|
56
|
+
value,
|
|
57
|
+
onChange,
|
|
58
|
+
ref: richTextRef,
|
|
59
|
+
} = useRichText( {
|
|
60
|
+
value: title,
|
|
61
|
+
onChange( newValue ) {
|
|
62
|
+
onUpdate( newValue.replace( REGEXP_NEWLINES, ' ' ) );
|
|
63
|
+
},
|
|
64
|
+
placeholder: decodedPlaceholder,
|
|
65
|
+
selectionStart: selection.start,
|
|
66
|
+
selectionEnd: selection.end,
|
|
67
|
+
onSelectionChange( newStart, newEnd ) {
|
|
68
|
+
setSelection( ( sel ) => {
|
|
69
|
+
const { start, end } = sel;
|
|
70
|
+
if ( start === newStart && end === newEnd ) {
|
|
71
|
+
return sel;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
start: newStart,
|
|
75
|
+
end: newEnd,
|
|
76
|
+
};
|
|
77
|
+
} );
|
|
78
|
+
},
|
|
79
|
+
__unstableDisableFormats: false,
|
|
80
|
+
} );
|
|
56
81
|
|
|
57
82
|
function onInsertBlockAfter( blocks ) {
|
|
58
83
|
insertBlocks( blocks, 0 );
|
|
@@ -130,49 +155,14 @@ function PostTitle( _, forwardedRef ) {
|
|
|
130
155
|
onInsertBlockAfter( content );
|
|
131
156
|
}
|
|
132
157
|
} else {
|
|
133
|
-
const value = {
|
|
134
|
-
...create( { html: title } ),
|
|
135
|
-
...selection,
|
|
136
|
-
};
|
|
137
|
-
|
|
138
158
|
// Strip HTML to avoid unwanted HTML being added to the title.
|
|
139
159
|
// In the majority of cases it is assumed that HTML in the title
|
|
140
160
|
// is undesirable.
|
|
141
161
|
const contentNoHTML = stripHTML( content );
|
|
142
|
-
|
|
143
|
-
const newValue = insert( value, create( { html: contentNoHTML } ) );
|
|
144
|
-
onUpdate( toHTMLString( { value: newValue } ) );
|
|
145
|
-
setSelection( {
|
|
146
|
-
start: newValue.start,
|
|
147
|
-
end: newValue.end,
|
|
148
|
-
} );
|
|
162
|
+
onChange( insert( value, create( { html: contentNoHTML } ) ) );
|
|
149
163
|
}
|
|
150
164
|
}
|
|
151
165
|
|
|
152
|
-
const decodedPlaceholder =
|
|
153
|
-
decodeEntities( placeholder ) || __( 'Add title' );
|
|
154
|
-
|
|
155
|
-
const { ref: richTextRef } = useRichText( {
|
|
156
|
-
value: title,
|
|
157
|
-
onChange,
|
|
158
|
-
placeholder: decodedPlaceholder,
|
|
159
|
-
selectionStart: selection.start,
|
|
160
|
-
selectionEnd: selection.end,
|
|
161
|
-
onSelectionChange( newStart, newEnd ) {
|
|
162
|
-
setSelection( ( sel ) => {
|
|
163
|
-
const { start, end } = sel;
|
|
164
|
-
if ( start === newStart && end === newEnd ) {
|
|
165
|
-
return sel;
|
|
166
|
-
}
|
|
167
|
-
return {
|
|
168
|
-
start: newStart,
|
|
169
|
-
end: newEnd,
|
|
170
|
-
};
|
|
171
|
-
} );
|
|
172
|
-
},
|
|
173
|
-
__unstableDisableFormats: false,
|
|
174
|
-
} );
|
|
175
|
-
|
|
176
166
|
// The wp-block className is important for editor styles.
|
|
177
167
|
// This same block is used in both the visual and the code editor.
|
|
178
168
|
const className = clsx( DEFAULT_CLASSNAMES, {
|
|
@@ -192,7 +182,6 @@ function PostTitle( _, forwardedRef ) {
|
|
|
192
182
|
onFocus={ onSelect }
|
|
193
183
|
onBlur={ onUnselect }
|
|
194
184
|
onKeyDown={ onKeyDown }
|
|
195
|
-
onKeyPress={ onUnselect }
|
|
196
185
|
onPaste={ onPaste }
|
|
197
186
|
/>
|
|
198
187
|
</PostTypeSupportCheck>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
5
5
|
import { safeDecodeURIComponent, cleanForSlug } from '@wordpress/url';
|
|
6
|
-
import { useState } from '@wordpress/element';
|
|
6
|
+
import { useState, createInterpolateElement } from '@wordpress/element';
|
|
7
7
|
import { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';
|
|
8
8
|
import { __ } from '@wordpress/i18n';
|
|
9
9
|
import {
|
|
@@ -83,14 +83,20 @@ export default function PostURL( { onClose } ) {
|
|
|
83
83
|
<VStack spacing={ 3 }>
|
|
84
84
|
{ isEditable && (
|
|
85
85
|
<div>
|
|
86
|
-
{
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
86
|
+
{ createInterpolateElement(
|
|
87
|
+
__(
|
|
88
|
+
'Customize the last part of the URL. <a>Learn more.</a>'
|
|
89
|
+
),
|
|
90
|
+
{
|
|
91
|
+
a: (
|
|
92
|
+
<ExternalLink
|
|
93
|
+
href={ __(
|
|
94
|
+
'https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink'
|
|
95
|
+
) }
|
|
96
|
+
/>
|
|
97
|
+
),
|
|
98
|
+
}
|
|
99
|
+
) }
|
|
94
100
|
</div>
|
|
95
101
|
) }
|
|
96
102
|
<div>
|
|
@@ -104,6 +110,8 @@ export default function PostURL( { onClose } ) {
|
|
|
104
110
|
}
|
|
105
111
|
suffix={
|
|
106
112
|
<Button
|
|
113
|
+
// TODO: Switch to `true` (40px size) if possible
|
|
114
|
+
__next40pxDefaultSize={ false }
|
|
107
115
|
icon={ copySmall }
|
|
108
116
|
ref={ copyButtonRef }
|
|
109
117
|
label={ __( 'Copy' ) }
|
|
@@ -22,6 +22,7 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
22
22
|
import { useEffect, useRef } from '@wordpress/element';
|
|
23
23
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
24
24
|
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
25
|
+
import { ActionItem } from '@wordpress/interface';
|
|
25
26
|
|
|
26
27
|
/**
|
|
27
28
|
* Internal dependencies
|
|
@@ -39,14 +40,14 @@ export default function PreviewDropdown( { forceIsAutosaveable, disabled } ) {
|
|
|
39
40
|
showIconLabels,
|
|
40
41
|
} = useSelect( ( select ) => {
|
|
41
42
|
const { getDeviceType, getCurrentPostType } = select( editorStore );
|
|
42
|
-
const {
|
|
43
|
+
const { getEntityRecord, getPostType } = select( coreStore );
|
|
43
44
|
const { get } = select( preferencesStore );
|
|
44
45
|
const { __unstableGetEditorMode } = select( blockEditorStore );
|
|
45
46
|
const _currentPostType = getCurrentPostType();
|
|
46
47
|
return {
|
|
47
48
|
deviceType: getDeviceType(),
|
|
48
49
|
editorMode: __unstableGetEditorMode(),
|
|
49
|
-
homeUrl:
|
|
50
|
+
homeUrl: getEntityRecord( 'root', '__unstableBase' )?.home,
|
|
50
51
|
isTemplate: _currentPostType === 'wp_template',
|
|
51
52
|
isViewable: getPostType( _currentPostType )?.viewable ?? false,
|
|
52
53
|
showIconLabels: get( 'core', 'showIconLabels' ),
|
|
@@ -58,18 +59,18 @@ export default function PreviewDropdown( { forceIsAutosaveable, disabled } ) {
|
|
|
58
59
|
/**
|
|
59
60
|
* Save the original editing mode in a ref to restore it when we exit zoom out.
|
|
60
61
|
*/
|
|
61
|
-
const
|
|
62
|
+
const originalEditingModeRef = useRef( editorMode );
|
|
62
63
|
useEffect( () => {
|
|
63
64
|
if ( editorMode !== 'zoom-out' ) {
|
|
64
|
-
|
|
65
|
+
originalEditingModeRef.current = editorMode;
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
return () => {
|
|
68
69
|
if (
|
|
69
70
|
editorMode === 'zoom-out' &&
|
|
70
|
-
editorMode !==
|
|
71
|
+
editorMode !== originalEditingModeRef.current
|
|
71
72
|
) {
|
|
72
|
-
__unstableSetEditorMode(
|
|
73
|
+
__unstableSetEditorMode( originalEditingModeRef.current );
|
|
73
74
|
}
|
|
74
75
|
};
|
|
75
76
|
}, [ editorMode, __unstableSetEditorMode ] );
|
|
@@ -111,22 +112,24 @@ export default function PreviewDropdown( { forceIsAutosaveable, disabled } ) {
|
|
|
111
112
|
label: __( 'Desktop' ),
|
|
112
113
|
icon: desktop,
|
|
113
114
|
},
|
|
114
|
-
|
|
115
|
+
];
|
|
116
|
+
if ( window.__experimentalEnableZoomOutExperiment ) {
|
|
117
|
+
choices.push( {
|
|
115
118
|
value: 'ZoomOut',
|
|
116
119
|
label: __( 'Desktop (50%)' ),
|
|
117
120
|
icon: desktop,
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
121
|
+
} );
|
|
122
|
+
}
|
|
123
|
+
choices.push( {
|
|
124
|
+
value: 'Tablet',
|
|
125
|
+
label: __( 'Tablet' ),
|
|
126
|
+
icon: tablet,
|
|
127
|
+
} );
|
|
128
|
+
choices.push( {
|
|
129
|
+
value: 'Mobile',
|
|
130
|
+
label: __( 'Mobile' ),
|
|
131
|
+
icon: mobile,
|
|
132
|
+
} );
|
|
130
133
|
|
|
131
134
|
const previewValue = editorMode === 'zoom-out' ? 'ZoomOut' : deviceType;
|
|
132
135
|
|
|
@@ -136,7 +139,7 @@ export default function PreviewDropdown( { forceIsAutosaveable, disabled } ) {
|
|
|
136
139
|
* @param {string} value The device type.
|
|
137
140
|
*/
|
|
138
141
|
const onSelect = ( value ) => {
|
|
139
|
-
let newEditorMode =
|
|
142
|
+
let newEditorMode = originalEditingModeRef.current;
|
|
140
143
|
|
|
141
144
|
if ( value === 'ZoomOut' ) {
|
|
142
145
|
newEditorMode = 'zoom-out';
|
|
@@ -206,6 +209,11 @@ export default function PreviewDropdown( { forceIsAutosaveable, disabled } ) {
|
|
|
206
209
|
/>
|
|
207
210
|
</MenuGroup>
|
|
208
211
|
) }
|
|
212
|
+
<ActionItem.Slot
|
|
213
|
+
name="core/plugin-preview-menu"
|
|
214
|
+
as={ MenuGroup }
|
|
215
|
+
fillProps={ { onClick: onClose } }
|
|
216
|
+
/>
|
|
209
217
|
</>
|
|
210
218
|
) }
|
|
211
219
|
</DropdownMenu>
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
import inserterMediaCategories from '../media-categories';
|
|
24
24
|
import { mediaUpload } from '../../utils';
|
|
25
25
|
import { store as editorStore } from '../../store';
|
|
26
|
-
import {
|
|
26
|
+
import { unlock } from '../../lock-unlock';
|
|
27
27
|
import { useGlobalStylesContext } from '../global-styles-provider';
|
|
28
28
|
|
|
29
29
|
const EMPTY_BLOCKS_LIST = [];
|
|
@@ -47,6 +47,7 @@ const BLOCK_EDITOR_SETTINGS = [
|
|
|
47
47
|
'allowedMimeTypes',
|
|
48
48
|
'bodyPlaceholder',
|
|
49
49
|
'canLockBlocks',
|
|
50
|
+
'canUpdateBlockBindings',
|
|
50
51
|
'capabilities',
|
|
51
52
|
'clearBlockSelection',
|
|
52
53
|
'codeEditingEnabled',
|
|
@@ -74,7 +75,6 @@ const BLOCK_EDITOR_SETTINGS = [
|
|
|
74
75
|
'postContentAttributes',
|
|
75
76
|
'postsPerPage',
|
|
76
77
|
'readOnly',
|
|
77
|
-
'sectionRootClientId',
|
|
78
78
|
'styles',
|
|
79
79
|
'titlePlaceholder',
|
|
80
80
|
'supportsLayout',
|
|
@@ -90,6 +90,7 @@ const {
|
|
|
90
90
|
globalStylesLinksDataKey,
|
|
91
91
|
selectBlockPatternsKey,
|
|
92
92
|
reusableBlocksSelectKey,
|
|
93
|
+
sectionRootClientIdKey,
|
|
93
94
|
} = unlock( privateApis );
|
|
94
95
|
|
|
95
96
|
/**
|
|
@@ -325,10 +326,9 @@ function useBlockEditorSettings( settings, postType, postId, renderingMode ) {
|
|
|
325
326
|
? [ [ 'core/navigation', {}, [] ] ]
|
|
326
327
|
: settings.template,
|
|
327
328
|
__experimentalSetIsInserterOpened: setIsInserterOpened,
|
|
329
|
+
[ sectionRootClientIdKey ]: sectionRootClientId,
|
|
328
330
|
};
|
|
329
|
-
|
|
330
|
-
sectionRootClientId,
|
|
331
|
-
} );
|
|
331
|
+
|
|
332
332
|
return blockEditorSettings;
|
|
333
333
|
}, [
|
|
334
334
|
allowedBlockTypes,
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
cursor: ew-resize;
|
|
17
17
|
outline: none;
|
|
18
18
|
background: none;
|
|
19
|
-
border-radius: $radius-
|
|
19
|
+
border-radius: $radius-full;
|
|
20
20
|
border: 0;
|
|
21
21
|
height: 100px;
|
|
22
22
|
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
content: "";
|
|
30
30
|
width: $grid-unit-05;
|
|
31
31
|
background-color: rgba($gray-700, 0.4);
|
|
32
|
-
border-radius: $radius-
|
|
32
|
+
border-radius: $radius-full;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
&.is-left {
|
|
@@ -71,6 +71,8 @@ export default function SavePublishPanels( {
|
|
|
71
71
|
unmountableContent = (
|
|
72
72
|
<div className="editor-layout__toggle-publish-panel">
|
|
73
73
|
<Button
|
|
74
|
+
// TODO: Switch to `true` (40px size) if possible
|
|
75
|
+
__next40pxDefaultSize={ false }
|
|
74
76
|
variant="secondary"
|
|
75
77
|
className="editor-layout__toggle-publish-panel-button"
|
|
76
78
|
onClick={ togglePublishSidebar }
|
|
@@ -84,6 +86,8 @@ export default function SavePublishPanels( {
|
|
|
84
86
|
unmountableContent = (
|
|
85
87
|
<div className="editor-layout__toggle-entities-saved-states-panel">
|
|
86
88
|
<Button
|
|
89
|
+
// TODO: Switch to `true` (40px size) if possible
|
|
90
|
+
__next40pxDefaultSize={ false }
|
|
87
91
|
variant="secondary"
|
|
88
92
|
className="editor-layout__toggle-entities-saved-states-panel-button"
|
|
89
93
|
onClick={ openEntitiesSavedStates }
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
.editor-layout__toggle-sidebar-panel,
|
|
4
4
|
.editor-layout__toggle-entities-saved-states-panel {
|
|
5
5
|
z-index: z-index(".editor-layout__toggle-sidebar-panel");
|
|
6
|
-
position: fixed !important; //
|
|
6
|
+
position: fixed !important; // Necessary to override the default relative positioning.
|
|
7
7
|
top: -9999em;
|
|
8
8
|
bottom: auto;
|
|
9
9
|
left: auto;
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
box-sizing: border-box;
|
|
12
12
|
width: $sidebar-width;
|
|
13
13
|
background-color: $white;
|
|
14
|
-
border:
|
|
15
|
-
height: auto !important; //
|
|
14
|
+
border: $border-width dotted $gray-300;
|
|
15
|
+
height: auto !important; // Necessary to override the default sidebar positioning.
|
|
16
16
|
padding: $grid-unit-30;
|
|
17
17
|
display: flex;
|
|
18
18
|
justify-content: center;
|
|
@@ -8,7 +8,6 @@ import { useSelect } from '@wordpress/data';
|
|
|
8
8
|
* Internal dependencies
|
|
9
9
|
*/
|
|
10
10
|
import PluginPostStatusInfo from '../plugin-post-status-info';
|
|
11
|
-
import PostActions from '../post-actions';
|
|
12
11
|
import PostAuthorPanel from '../post-author/panel';
|
|
13
12
|
import PostCardPanel from '../post-card-panel';
|
|
14
13
|
import PostContentInformation from '../post-content-information';
|
|
@@ -36,16 +35,23 @@ import { PrivatePostLastRevision } from '../post-last-revision';
|
|
|
36
35
|
const PANEL_NAME = 'post-status';
|
|
37
36
|
|
|
38
37
|
export default function PostSummary( { onActionPerformed } ) {
|
|
39
|
-
const { isRemovedPostStatusPanel } = useSelect(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
38
|
+
const { isRemovedPostStatusPanel, postType, postId } = useSelect(
|
|
39
|
+
( select ) => {
|
|
40
|
+
// We use isEditorPanelRemoved to hide the panel if it was programatically removed. We do
|
|
41
|
+
// not use isEditorPanelEnabled since this panel should not be disabled through the UI.
|
|
42
|
+
const {
|
|
43
|
+
isEditorPanelRemoved,
|
|
44
|
+
getCurrentPostType,
|
|
45
|
+
getCurrentPostId,
|
|
46
|
+
} = select( editorStore );
|
|
47
|
+
return {
|
|
48
|
+
isRemovedPostStatusPanel: isEditorPanelRemoved( PANEL_NAME ),
|
|
49
|
+
postType: getCurrentPostType(),
|
|
50
|
+
postId: getCurrentPostId(),
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
[]
|
|
54
|
+
);
|
|
49
55
|
|
|
50
56
|
return (
|
|
51
57
|
<PostPanelSection className="editor-post-summary">
|
|
@@ -54,11 +60,9 @@ export default function PostSummary( { onActionPerformed } ) {
|
|
|
54
60
|
<>
|
|
55
61
|
<VStack spacing={ 4 }>
|
|
56
62
|
<PostCardPanel
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
/>
|
|
61
|
-
}
|
|
63
|
+
postType={ postType }
|
|
64
|
+
postId={ postId }
|
|
65
|
+
onActionPerformed={ onActionPerformed }
|
|
62
66
|
/>
|
|
63
67
|
<PostFeaturedImagePanel withPanelBody={ false } />
|
|
64
68
|
<PostExcerptPanel />
|
|
@@ -3,17 +3,3 @@
|
|
|
3
3
|
padding: $grid-unit-20;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.editor-site-discussion__options {
|
|
7
|
-
// TODO: it's not great to override component styles.. This might be resolved
|
|
8
|
-
// by the new radio control component.
|
|
9
|
-
.components-radio-control__option {
|
|
10
|
-
align-items: flex-start;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
label {
|
|
14
|
-
.components-text {
|
|
15
|
-
display: block;
|
|
16
|
-
margin-top: $grid-unit-05;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -155,7 +155,12 @@ function StartModal( { slug, isCustom, onClose, postType } ) {
|
|
|
155
155
|
expanded={ false }
|
|
156
156
|
>
|
|
157
157
|
<FlexItem>
|
|
158
|
-
<Button
|
|
158
|
+
<Button
|
|
159
|
+
// TODO: Switch to `true` (40px size) if possible
|
|
160
|
+
__next40pxDefaultSize={ false }
|
|
161
|
+
variant="tertiary"
|
|
162
|
+
onClick={ onClose }
|
|
163
|
+
>
|
|
159
164
|
{ __( 'Skip' ) }
|
|
160
165
|
</Button>
|
|
161
166
|
</FlexItem>
|
|
@@ -30,6 +30,8 @@ function TableOfContents(
|
|
|
30
30
|
contentClassName="table-of-contents__popover"
|
|
31
31
|
renderToggle={ ( { isOpen, onToggle } ) => (
|
|
32
32
|
<Button
|
|
33
|
+
// TODO: Switch to `true` (40px size) if possible
|
|
34
|
+
__next40pxDefaultSize={ false }
|
|
33
35
|
{ ...props }
|
|
34
36
|
ref={ ref }
|
|
35
37
|
onClick={ hasBlocks ? onToggle : undefined }
|
|
@@ -59,7 +59,10 @@ export default function TemplateContentPanel() {
|
|
|
59
59
|
|
|
60
60
|
const { enableComplementaryArea } = useDispatch( interfaceStore );
|
|
61
61
|
|
|
62
|
-
if (
|
|
62
|
+
if (
|
|
63
|
+
( renderingMode === 'post-only' && postType !== TEMPLATE_POST_TYPE ) ||
|
|
64
|
+
clientIds.length === 0
|
|
65
|
+
) {
|
|
63
66
|
return null;
|
|
64
67
|
}
|
|
65
68
|
|
|
@@ -40,6 +40,8 @@ export default function TextEditor( { autoFocus = false } ) {
|
|
|
40
40
|
<div className="editor-text-editor__toolbar">
|
|
41
41
|
<h2>{ __( 'Editing code' ) }</h2>
|
|
42
42
|
<Button
|
|
43
|
+
// TODO: Switch to `true` (40px size) if possible
|
|
44
|
+
__next40pxDefaultSize={ false }
|
|
43
45
|
variant="tertiary"
|
|
44
46
|
onClick={ () => switchEditorMode( 'visual' ) }
|
|
45
47
|
shortcut={ shortcut }
|
|
@@ -128,8 +128,7 @@ function VisualEditor( {
|
|
|
128
128
|
getRenderingMode,
|
|
129
129
|
getDeviceType,
|
|
130
130
|
} = select( editorStore );
|
|
131
|
-
const { getPostType,
|
|
132
|
-
select( coreStore );
|
|
131
|
+
const { getPostType, getEditedEntityRecord } = select( coreStore );
|
|
133
132
|
const postTypeSlug = getCurrentPostType();
|
|
134
133
|
const _renderingMode = getRenderingMode();
|
|
135
134
|
let _wrapperBlockName;
|
|
@@ -143,10 +142,6 @@ function VisualEditor( {
|
|
|
143
142
|
const editorSettings = getEditorSettings();
|
|
144
143
|
const supportsTemplateMode = editorSettings.supportsTemplateMode;
|
|
145
144
|
const postTypeObject = getPostType( postTypeSlug );
|
|
146
|
-
const canEditTemplate = canUser( 'create', {
|
|
147
|
-
kind: 'postType',
|
|
148
|
-
name: 'wp_template',
|
|
149
|
-
} );
|
|
150
145
|
const currentTemplateId = getCurrentTemplateId();
|
|
151
146
|
const template = currentTemplateId
|
|
152
147
|
? getEditedEntityRecord(
|
|
@@ -163,9 +158,7 @@ function VisualEditor( {
|
|
|
163
158
|
// Post template fetch returns a 404 on classic themes, which
|
|
164
159
|
// messes with e2e tests, so check it's a block theme first.
|
|
165
160
|
editedPostTemplate:
|
|
166
|
-
postTypeObject?.viewable &&
|
|
167
|
-
supportsTemplateMode &&
|
|
168
|
-
canEditTemplate
|
|
161
|
+
postTypeObject?.viewable && supportsTemplateMode
|
|
169
162
|
? template
|
|
170
163
|
: undefined,
|
|
171
164
|
wrapperBlockName: _wrapperBlockName,
|