@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
package/src/components/index.js
CHANGED
|
@@ -32,6 +32,7 @@ export { default as PluginMoreMenuItem } from './plugin-more-menu-item';
|
|
|
32
32
|
export { default as PluginPostPublishPanel } from './plugin-post-publish-panel';
|
|
33
33
|
export { default as PluginPostStatusInfo } from './plugin-post-status-info';
|
|
34
34
|
export { default as PluginPrePublishPanel } from './plugin-pre-publish-panel';
|
|
35
|
+
export { default as PluginPreviewMenuItem } from './plugin-preview-menu-item';
|
|
35
36
|
export { default as PluginSidebar } from './plugin-sidebar';
|
|
36
37
|
export { default as PluginSidebarMoreMenuItem } from './plugin-sidebar-more-menu-item';
|
|
37
38
|
export { default as PostTemplatePanel } from './post-template/panel';
|
|
@@ -22,6 +22,7 @@ const { PrivateInserterLibrary } = unlock( blockEditorPrivateApis );
|
|
|
22
22
|
|
|
23
23
|
export default function InserterSidebar() {
|
|
24
24
|
const {
|
|
25
|
+
blockInsertionPoint,
|
|
25
26
|
blockSectionRootClientId,
|
|
26
27
|
inserterSidebarToggleRef,
|
|
27
28
|
insertionPoint,
|
|
@@ -33,13 +34,18 @@ export default function InserterSidebar() {
|
|
|
33
34
|
getInsertionPoint,
|
|
34
35
|
isPublishSidebarOpened,
|
|
35
36
|
} = unlock( select( editorStore ) );
|
|
36
|
-
const {
|
|
37
|
-
|
|
37
|
+
const {
|
|
38
|
+
getBlockInsertionPoint,
|
|
39
|
+
getBlockRootClientId,
|
|
40
|
+
__unstableGetEditorMode,
|
|
41
|
+
getSectionRootClientId,
|
|
42
|
+
} = unlock( select( blockEditorStore ) );
|
|
38
43
|
const { get } = select( preferencesStore );
|
|
39
44
|
const { getActiveComplementaryArea } = select( interfaceStore );
|
|
40
45
|
const getBlockSectionRootClientId = () => {
|
|
41
46
|
if ( __unstableGetEditorMode() === 'zoom-out' ) {
|
|
42
|
-
const
|
|
47
|
+
const sectionRootClientId = getSectionRootClientId();
|
|
48
|
+
|
|
43
49
|
if ( sectionRootClientId ) {
|
|
44
50
|
return sectionRootClientId;
|
|
45
51
|
}
|
|
@@ -47,6 +53,7 @@ export default function InserterSidebar() {
|
|
|
47
53
|
return getBlockRootClientId();
|
|
48
54
|
};
|
|
49
55
|
return {
|
|
56
|
+
blockInsertionPoint: getBlockInsertionPoint(),
|
|
50
57
|
inserterSidebarToggleRef: getInserterSidebarToggleRef(),
|
|
51
58
|
insertionPoint: getInsertionPoint(),
|
|
52
59
|
showMostUsedBlocks: get( 'core', 'mostUsedBlocks' ),
|
|
@@ -85,9 +92,9 @@ export default function InserterSidebar() {
|
|
|
85
92
|
showInserterHelpPanel
|
|
86
93
|
shouldFocusBlock={ isMobileViewport }
|
|
87
94
|
rootClientId={
|
|
88
|
-
blockSectionRootClientId ??
|
|
95
|
+
blockSectionRootClientId ?? blockInsertionPoint.rootClientId
|
|
89
96
|
}
|
|
90
|
-
__experimentalInsertionIndex={
|
|
97
|
+
__experimentalInsertionIndex={ blockInsertionPoint.index }
|
|
91
98
|
onSelect={ insertionPoint.onSelect }
|
|
92
99
|
__experimentalInitialTab={ insertionPoint.tab }
|
|
93
100
|
__experimentalInitialCategory={ insertionPoint.category }
|
|
@@ -144,20 +144,20 @@ function useAutosavePurge() {
|
|
|
144
144
|
[]
|
|
145
145
|
);
|
|
146
146
|
|
|
147
|
-
const
|
|
148
|
-
const
|
|
147
|
+
const lastIsDirtyRef = useRef( isDirty );
|
|
148
|
+
const lastIsAutosavingRef = useRef( isAutosaving );
|
|
149
149
|
|
|
150
150
|
useEffect( () => {
|
|
151
151
|
if (
|
|
152
152
|
! didError &&
|
|
153
|
-
( (
|
|
154
|
-
(
|
|
153
|
+
( ( lastIsAutosavingRef.current && ! isAutosaving ) ||
|
|
154
|
+
( lastIsDirtyRef.current && ! isDirty ) )
|
|
155
155
|
) {
|
|
156
156
|
localAutosaveClear( postId, isEditedPostNew );
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
lastIsDirtyRef.current = isDirty;
|
|
160
|
+
lastIsAutosavingRef.current = isAutosaving;
|
|
161
161
|
}, [ isDirty, isAutosaving, didError ] );
|
|
162
162
|
|
|
163
163
|
// Once the isEditedPostNew changes from true to false, let's clear the auto-draft autosave.
|
|
@@ -222,10 +222,11 @@ function PostParentToggle( { isOpen, onClick } ) {
|
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
export function ParentRow() {
|
|
225
|
-
const homeUrl = useSelect(
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
225
|
+
const homeUrl = useSelect( ( select ) => {
|
|
226
|
+
// Site index.
|
|
227
|
+
return select( coreStore ).getEntityRecord( 'root', '__unstableBase' )
|
|
228
|
+
?.home;
|
|
229
|
+
}, [] );
|
|
229
230
|
// Use internal state instead of a ref to make sure that the component
|
|
230
231
|
// re-renders when the popover's anchor updates.
|
|
231
232
|
const [ popoverAnchor, setPopoverAnchor ] = useState( null );
|
|
@@ -274,16 +275,20 @@ export function ParentRow() {
|
|
|
274
275
|
}
|
|
275
276
|
) }
|
|
276
277
|
<p>
|
|
277
|
-
{
|
|
278
|
-
|
|
278
|
+
{ createInterpolateElement(
|
|
279
|
+
__(
|
|
280
|
+
'They also show up as sub-items in the default navigation menu. <a>Learn more.</a>'
|
|
281
|
+
),
|
|
282
|
+
{
|
|
283
|
+
a: (
|
|
284
|
+
<ExternalLink
|
|
285
|
+
href={ __(
|
|
286
|
+
'https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes'
|
|
287
|
+
) }
|
|
288
|
+
/>
|
|
289
|
+
),
|
|
290
|
+
}
|
|
279
291
|
) }
|
|
280
|
-
<ExternalLink
|
|
281
|
-
href={ __(
|
|
282
|
-
'https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes'
|
|
283
|
-
) }
|
|
284
|
-
>
|
|
285
|
-
{ __( 'Learn more' ) }
|
|
286
|
-
</ExternalLink>
|
|
287
292
|
</p>
|
|
288
293
|
</div>
|
|
289
294
|
<PageAttributesParent />
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { compose } from '@wordpress/compose';
|
|
5
|
+
import { MenuItem } from '@wordpress/components';
|
|
6
|
+
import { withPluginContext } from '@wordpress/plugins';
|
|
7
|
+
import { ActionItem } from '@wordpress/interface';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Renders a menu item in the Preview dropdown, which can be used as a button or link depending on the props provided.
|
|
11
|
+
* The text within the component appears as the menu item label.
|
|
12
|
+
*
|
|
13
|
+
* @param {Object} props Component properties.
|
|
14
|
+
* @param {string} [props.href] When `href` is provided, the menu item is rendered as an anchor instead of a button. It corresponds to the `href` attribute of the anchor.
|
|
15
|
+
* @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The icon to be rendered to the left of the menu item label. Can be a Dashicon slug or an SVG WP element.
|
|
16
|
+
* @param {Function} [props.onClick] The callback function to be executed when the user clicks the menu item.
|
|
17
|
+
* @param {...*} [props.other] Any additional props are passed through to the underlying MenuItem component.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```jsx
|
|
21
|
+
* import { __ } from '@wordpress/i18n';
|
|
22
|
+
* import { PluginPreviewMenuItem } from '@wordpress/editor';
|
|
23
|
+
* import { external } from '@wordpress/icons';
|
|
24
|
+
*
|
|
25
|
+
* function onPreviewClick() {
|
|
26
|
+
* // Handle preview action
|
|
27
|
+
* }
|
|
28
|
+
*
|
|
29
|
+
* const ExternalPreviewMenuItem = () => (
|
|
30
|
+
* <PreviewDropdownMenuItem
|
|
31
|
+
* icon={ external }
|
|
32
|
+
* onClick={ onPreviewClick }
|
|
33
|
+
* >
|
|
34
|
+
* { __( 'Preview in new tab' ) }
|
|
35
|
+
* </PreviewDropdownMenuItem>
|
|
36
|
+
* );
|
|
37
|
+
* registerPlugin( 'external-preview-menu-item', {
|
|
38
|
+
* render: ExternalPreviewMenuItem,
|
|
39
|
+
* } );
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @return {Component} The rendered menu item component.
|
|
43
|
+
*/
|
|
44
|
+
export default compose(
|
|
45
|
+
withPluginContext( ( context, ownProps ) => {
|
|
46
|
+
return {
|
|
47
|
+
as: ownProps.as ?? MenuItem,
|
|
48
|
+
icon: ownProps.icon || context.icon,
|
|
49
|
+
name: 'core/plugin-preview-menu',
|
|
50
|
+
};
|
|
51
|
+
} )
|
|
52
|
+
)( ActionItem );
|