@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
|
@@ -17,35 +17,26 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
17
17
|
*/
|
|
18
18
|
import { unlock } from '../../lock-unlock';
|
|
19
19
|
import { usePostActions } from './actions';
|
|
20
|
-
import { store as editorStore } from '../../store';
|
|
21
20
|
|
|
22
|
-
const {
|
|
23
|
-
DropdownMenuV2: DropdownMenu,
|
|
24
|
-
DropdownMenuGroupV2: DropdownMenuGroup,
|
|
25
|
-
DropdownMenuItemV2: DropdownMenuItem,
|
|
26
|
-
DropdownMenuItemLabelV2: DropdownMenuItemLabel,
|
|
27
|
-
kebabCase,
|
|
28
|
-
} = unlock( componentsPrivateApis );
|
|
21
|
+
const { DropdownMenuV2, kebabCase } = unlock( componentsPrivateApis );
|
|
29
22
|
|
|
30
|
-
export default function PostActions( {
|
|
23
|
+
export default function PostActions( { postType, postId, onActionPerformed } ) {
|
|
31
24
|
const [ isActionsMenuOpen, setIsActionsMenuOpen ] = useState( false );
|
|
32
|
-
const { item, permissions
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
};
|
|
48
|
-
}, [] );
|
|
25
|
+
const { item, permissions } = useSelect(
|
|
26
|
+
( select ) => {
|
|
27
|
+
const { getEditedEntityRecord, getEntityRecordPermissions } =
|
|
28
|
+
unlock( select( coreStore ) );
|
|
29
|
+
return {
|
|
30
|
+
item: getEditedEntityRecord( 'postType', postType, postId ),
|
|
31
|
+
permissions: getEntityRecordPermissions(
|
|
32
|
+
'postType',
|
|
33
|
+
postType,
|
|
34
|
+
postId
|
|
35
|
+
),
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
[ postId, postType ]
|
|
39
|
+
);
|
|
49
40
|
const itemWithPermissions = useMemo( () => {
|
|
50
41
|
return {
|
|
51
42
|
...item,
|
|
@@ -63,7 +54,7 @@ export default function PostActions( { onActionPerformed, buttonProps } ) {
|
|
|
63
54
|
}, [ allActions, itemWithPermissions ] );
|
|
64
55
|
|
|
65
56
|
return (
|
|
66
|
-
<
|
|
57
|
+
<DropdownMenuV2
|
|
67
58
|
open={ isActionsMenuOpen }
|
|
68
59
|
trigger={
|
|
69
60
|
<Button
|
|
@@ -76,7 +67,6 @@ export default function PostActions( { onActionPerformed, buttonProps } ) {
|
|
|
76
67
|
onClick={ () =>
|
|
77
68
|
setIsActionsMenuOpen( ! isActionsMenuOpen )
|
|
78
69
|
}
|
|
79
|
-
{ ...buttonProps }
|
|
80
70
|
/>
|
|
81
71
|
}
|
|
82
72
|
onOpenChange={ setIsActionsMenuOpen }
|
|
@@ -89,7 +79,7 @@ export default function PostActions( { onActionPerformed, buttonProps } ) {
|
|
|
89
79
|
setIsActionsMenuOpen( false );
|
|
90
80
|
} }
|
|
91
81
|
/>
|
|
92
|
-
</
|
|
82
|
+
</DropdownMenuV2>
|
|
93
83
|
);
|
|
94
84
|
}
|
|
95
85
|
|
|
@@ -103,12 +93,12 @@ function DropdownMenuItemTrigger( { action, onClick, items } ) {
|
|
|
103
93
|
const label =
|
|
104
94
|
typeof action.label === 'string' ? action.label : action.label( items );
|
|
105
95
|
return (
|
|
106
|
-
<
|
|
96
|
+
<DropdownMenuV2.Item
|
|
107
97
|
onClick={ onClick }
|
|
108
98
|
hideOnClick={ ! action.RenderModal }
|
|
109
99
|
>
|
|
110
|
-
<
|
|
111
|
-
</
|
|
100
|
+
<DropdownMenuV2.ItemLabel>{ label }</DropdownMenuV2.ItemLabel>
|
|
101
|
+
</DropdownMenuV2.Item>
|
|
112
102
|
);
|
|
113
103
|
}
|
|
114
104
|
|
|
@@ -155,7 +145,7 @@ function ActionWithModal( { action, item, ActionTrigger, onClose } ) {
|
|
|
155
145
|
// With an added onClose prop.
|
|
156
146
|
function ActionsDropdownMenuGroup( { actions, item, onClose } ) {
|
|
157
147
|
return (
|
|
158
|
-
<
|
|
148
|
+
<DropdownMenuV2.Group>
|
|
159
149
|
{ actions.map( ( action ) => {
|
|
160
150
|
if ( action.RenderModal ) {
|
|
161
151
|
return (
|
|
@@ -177,6 +167,6 @@ function ActionsDropdownMenuGroup( { actions, item, onClose } ) {
|
|
|
177
167
|
/>
|
|
178
168
|
);
|
|
179
169
|
} ) }
|
|
180
|
-
</
|
|
170
|
+
</DropdownMenuV2.Group>
|
|
181
171
|
);
|
|
182
172
|
}
|
|
@@ -26,59 +26,56 @@ import {
|
|
|
26
26
|
GLOBAL_POST_TYPES,
|
|
27
27
|
} from '../../store/constants';
|
|
28
28
|
import { unlock } from '../../lock-unlock';
|
|
29
|
+
import PostActions from '../post-actions';
|
|
29
30
|
|
|
30
|
-
export default function PostCardPanel( {
|
|
31
|
+
export default function PostCardPanel( {
|
|
32
|
+
postType,
|
|
33
|
+
postId,
|
|
34
|
+
onActionPerformed,
|
|
35
|
+
} ) {
|
|
31
36
|
const { isFrontPage, isPostsPage, title, icon, isSync } = useSelect(
|
|
32
37
|
( select ) => {
|
|
33
|
-
const {
|
|
34
|
-
|
|
35
|
-
getCurrentPostType,
|
|
36
|
-
getCurrentPostId,
|
|
37
|
-
__experimentalGetTemplateInfo,
|
|
38
|
-
} = select( editorStore );
|
|
39
|
-
const { canUser } = select( coreStore );
|
|
40
|
-
const { getEditedEntityRecord } = select( coreStore );
|
|
38
|
+
const { __experimentalGetTemplateInfo } = select( editorStore );
|
|
39
|
+
const { canUser, getEditedEntityRecord } = select( coreStore );
|
|
41
40
|
const siteSettings = canUser( 'read', {
|
|
42
41
|
kind: 'root',
|
|
43
42
|
name: 'site',
|
|
44
43
|
} )
|
|
45
44
|
? getEditedEntityRecord( 'root', 'site' )
|
|
46
45
|
: undefined;
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
const _record = getEditedEntityRecord(
|
|
47
|
+
'postType',
|
|
48
|
+
postType,
|
|
49
|
+
postId
|
|
50
|
+
);
|
|
50
51
|
const _templateInfo =
|
|
51
52
|
[ TEMPLATE_POST_TYPE, TEMPLATE_PART_POST_TYPE ].includes(
|
|
52
|
-
|
|
53
|
+
postType
|
|
53
54
|
) && __experimentalGetTemplateInfo( _record );
|
|
54
55
|
let _isSync = false;
|
|
55
|
-
if ( GLOBAL_POST_TYPES.includes(
|
|
56
|
-
if ( PATTERN_POST_TYPE ===
|
|
56
|
+
if ( GLOBAL_POST_TYPES.includes( postType ) ) {
|
|
57
|
+
if ( PATTERN_POST_TYPE === postType ) {
|
|
57
58
|
// When the post is first created, the top level wp_pattern_sync_status is not set so get meta value instead.
|
|
58
59
|
const currentSyncStatus =
|
|
59
|
-
|
|
60
|
-
?.wp_pattern_sync_status === 'unsynced'
|
|
60
|
+
_record?.meta?.wp_pattern_sync_status === 'unsynced'
|
|
61
61
|
? 'unsynced'
|
|
62
|
-
:
|
|
63
|
-
'wp_pattern_sync_status'
|
|
64
|
-
);
|
|
62
|
+
: _record?.wp_pattern_sync_status;
|
|
65
63
|
_isSync = currentSyncStatus !== 'unsynced';
|
|
66
64
|
} else {
|
|
67
65
|
_isSync = true;
|
|
68
66
|
}
|
|
69
67
|
}
|
|
70
68
|
return {
|
|
71
|
-
title:
|
|
72
|
-
|
|
73
|
-
icon: unlock( select( editorStore ) ).getPostIcon( _type, {
|
|
69
|
+
title: _templateInfo?.title || _record?.title,
|
|
70
|
+
icon: unlock( select( editorStore ) ).getPostIcon( postType, {
|
|
74
71
|
area: _record?.area,
|
|
75
72
|
} ),
|
|
76
73
|
isSync: _isSync,
|
|
77
|
-
isFrontPage: siteSettings?.page_on_front ===
|
|
78
|
-
isPostsPage: siteSettings?.page_for_posts ===
|
|
74
|
+
isFrontPage: siteSettings?.page_on_front === postId,
|
|
75
|
+
isPostsPage: siteSettings?.page_for_posts === postId,
|
|
79
76
|
};
|
|
80
77
|
},
|
|
81
|
-
[]
|
|
78
|
+
[ postId, postType ]
|
|
82
79
|
);
|
|
83
80
|
return (
|
|
84
81
|
<div className="editor-post-card-panel">
|
|
@@ -113,7 +110,11 @@ export default function PostCardPanel( { actions } ) {
|
|
|
113
110
|
</span>
|
|
114
111
|
) }
|
|
115
112
|
</Text>
|
|
116
|
-
|
|
113
|
+
<PostActions
|
|
114
|
+
postType={ postType }
|
|
115
|
+
postId={ postId }
|
|
116
|
+
onActionPerformed={ onActionPerformed }
|
|
117
|
+
/>
|
|
117
118
|
</HStack>
|
|
118
119
|
</div>
|
|
119
120
|
);
|
|
@@ -2,15 +2,6 @@
|
|
|
2
2
|
// sidebar width - popover padding - form margin
|
|
3
3
|
min-width: $sidebar-width - $grid-unit-20 - $grid-unit-20;
|
|
4
4
|
margin: $grid-unit-10;
|
|
5
|
-
|
|
6
|
-
.components-radio-control__option {
|
|
7
|
-
align-items: flex-start;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.components-radio-control__label .components-text {
|
|
11
|
-
display: block;
|
|
12
|
-
margin-top: $grid-unit-05;
|
|
13
|
-
}
|
|
14
5
|
}
|
|
15
6
|
.editor-post-discussion__panel-toggle {
|
|
16
7
|
|
|
@@ -198,6 +198,8 @@ function PrivateExcerpt() {
|
|
|
198
198
|
ref={ setPopoverAnchor }
|
|
199
199
|
renderToggle={ ( { onToggle } ) => (
|
|
200
200
|
<Button
|
|
201
|
+
// TODO: Switch to `true` (40px size) if possible
|
|
202
|
+
__next40pxDefaultSize={ false }
|
|
201
203
|
className="editor-post-excerpt__dropdown__trigger"
|
|
202
204
|
onClick={ onToggle }
|
|
203
205
|
variant="link"
|
|
@@ -160,6 +160,8 @@ function PostFeaturedImage( {
|
|
|
160
160
|
render={ ( { open } ) => (
|
|
161
161
|
<div className="editor-post-featured-image__container">
|
|
162
162
|
<Button
|
|
163
|
+
// TODO: Switch to `true` (40px size) if possible
|
|
164
|
+
__next40pxDefaultSize={ false }
|
|
163
165
|
ref={ toggleRef }
|
|
164
166
|
className={
|
|
165
167
|
! featuredImageId
|
|
@@ -180,6 +182,8 @@ function PostFeaturedImage( {
|
|
|
180
182
|
: `editor-post-featured-image-${ featuredImageId }-describedby`
|
|
181
183
|
}
|
|
182
184
|
aria-haspopup="dialog"
|
|
185
|
+
disabled={ isLoading }
|
|
186
|
+
accessibleWhenDisabled
|
|
183
187
|
>
|
|
184
188
|
{ !! featuredImageId && media && (
|
|
185
189
|
<img
|
|
@@ -198,6 +202,8 @@ function PostFeaturedImage( {
|
|
|
198
202
|
{ !! featuredImageId && (
|
|
199
203
|
<HStack className="editor-post-featured-image__actions">
|
|
200
204
|
<Button
|
|
205
|
+
// TODO: Switch to `true` (40px size) if possible
|
|
206
|
+
__next40pxDefaultSize={ false }
|
|
201
207
|
className="editor-post-featured-image__action"
|
|
202
208
|
onClick={ open }
|
|
203
209
|
aria-haspopup="dialog"
|
|
@@ -205,6 +211,8 @@ function PostFeaturedImage( {
|
|
|
205
211
|
{ __( 'Replace' ) }
|
|
206
212
|
</Button>
|
|
207
213
|
<Button
|
|
214
|
+
// TODO: Switch to `true` (40px size) if possible
|
|
215
|
+
__next40pxDefaultSize={ false }
|
|
208
216
|
className="editor-post-featured-image__action"
|
|
209
217
|
onClick={ () => {
|
|
210
218
|
onRemoveImage();
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.components-drop-zone__content {
|
|
25
|
-
border-radius: $radius-
|
|
25
|
+
border-radius: $radius-small;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
// Align text and icons horizontally to avoid clipping when the featured image is not set.
|
|
@@ -65,7 +65,6 @@
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.editor-post-featured-image__toggle {
|
|
68
|
-
border-radius: $radius-block-ui;
|
|
69
68
|
height: 100%;
|
|
70
69
|
line-height: 20px;
|
|
71
70
|
padding: $grid-unit-10 0;
|
|
@@ -100,6 +100,8 @@ export default function PostFormat() {
|
|
|
100
100
|
{ suggestion && suggestion.id !== postFormat && (
|
|
101
101
|
<p className="editor-post-format__suggestion">
|
|
102
102
|
<Button
|
|
103
|
+
// TODO: Switch to `true` (40px size) if possible
|
|
104
|
+
__next40pxDefaultSize={ false }
|
|
103
105
|
variant="link"
|
|
104
106
|
onClick={ () =>
|
|
105
107
|
onUpdatePostFormat( suggestion.id )
|
|
@@ -178,6 +178,8 @@ export default function PostLockedModal() {
|
|
|
178
178
|
shouldCloseOnClickOutside={ false }
|
|
179
179
|
shouldCloseOnEsc={ false }
|
|
180
180
|
isDismissible={ false }
|
|
181
|
+
// Do not remove this class, as this class is used by third party plugins.
|
|
182
|
+
className="editor-post-locked-modal"
|
|
181
183
|
size="medium"
|
|
182
184
|
>
|
|
183
185
|
<HStack alignment="top" spacing={ 6 }>
|
|
@@ -254,11 +256,21 @@ export default function PostLockedModal() {
|
|
|
254
256
|
justify="flex-end"
|
|
255
257
|
>
|
|
256
258
|
{ ! isTakeover && (
|
|
257
|
-
<Button
|
|
259
|
+
<Button
|
|
260
|
+
// TODO: Switch to `true` (40px size) if possible
|
|
261
|
+
__next40pxDefaultSize={ false }
|
|
262
|
+
variant="tertiary"
|
|
263
|
+
href={ unlockUrl }
|
|
264
|
+
>
|
|
258
265
|
{ __( 'Take over' ) }
|
|
259
266
|
</Button>
|
|
260
267
|
) }
|
|
261
|
-
<Button
|
|
268
|
+
<Button
|
|
269
|
+
// TODO: Switch to `true` (40px size) if possible
|
|
270
|
+
__next40pxDefaultSize={ false }
|
|
271
|
+
variant="primary"
|
|
272
|
+
href={ allPostsUrl }
|
|
273
|
+
>
|
|
262
274
|
{ allPostsLabel }
|
|
263
275
|
</Button>
|
|
264
276
|
</HStack>
|
|
@@ -78,6 +78,8 @@ export class PostPublishPanel extends Component {
|
|
|
78
78
|
<div className="editor-post-publish-panel__header">
|
|
79
79
|
{ isPostPublish ? (
|
|
80
80
|
<Button
|
|
81
|
+
// TODO: Switch to `true` (40px size) if possible
|
|
82
|
+
__next40pxDefaultSize={ false }
|
|
81
83
|
onClick={ onClose }
|
|
82
84
|
icon={ closeSmall }
|
|
83
85
|
label={ __( 'Close panel' ) }
|
|
@@ -14,11 +14,6 @@ import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
|
14
14
|
import { useState } from '@wordpress/element';
|
|
15
15
|
import { isBlobURL } from '@wordpress/blob';
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
* Internal dependencies
|
|
19
|
-
*/
|
|
20
|
-
import { store as editorStore } from '../../store';
|
|
21
|
-
|
|
22
17
|
function flattenBlocks( blocks ) {
|
|
23
18
|
const result = [];
|
|
24
19
|
|
|
@@ -65,9 +60,11 @@ function Image( block ) {
|
|
|
65
60
|
|
|
66
61
|
export default function PostFormatPanel() {
|
|
67
62
|
const [ isUploading, setIsUploading ] = useState( false );
|
|
63
|
+
const [ isAnimating, setIsAnimating ] = useState( false );
|
|
64
|
+
const [ hadUploadError, setHadUploadError ] = useState( false );
|
|
68
65
|
const { editorBlocks, mediaUpload } = useSelect(
|
|
69
66
|
( select ) => ( {
|
|
70
|
-
editorBlocks: select(
|
|
67
|
+
editorBlocks: select( blockEditorStore ).getBlocks(),
|
|
71
68
|
mediaUpload: select( blockEditorStore ).getSettings().mediaUpload,
|
|
72
69
|
} ),
|
|
73
70
|
[]
|
|
@@ -93,6 +90,7 @@ export default function PostFormatPanel() {
|
|
|
93
90
|
|
|
94
91
|
function uploadImages() {
|
|
95
92
|
setIsUploading( true );
|
|
93
|
+
setHadUploadError( false );
|
|
96
94
|
Promise.all(
|
|
97
95
|
externalImages.map( ( image ) =>
|
|
98
96
|
window
|
|
@@ -102,28 +100,30 @@ export default function PostFormatPanel() {
|
|
|
102
100
|
: image.attributes.url + '?'
|
|
103
101
|
)
|
|
104
102
|
.then( ( response ) => response.blob() )
|
|
105
|
-
.then(
|
|
106
|
-
(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
103
|
+
.then( ( blob ) =>
|
|
104
|
+
new Promise( ( resolve, reject ) => {
|
|
105
|
+
mediaUpload( {
|
|
106
|
+
filesList: [ blob ],
|
|
107
|
+
onFileChange: ( [ media ] ) => {
|
|
108
|
+
if ( isBlobURL( media.url ) ) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
114
111
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
112
|
+
updateBlockAttributes( image.clientId, {
|
|
113
|
+
id: media.id,
|
|
114
|
+
url: media.url,
|
|
115
|
+
} );
|
|
116
|
+
resolve();
|
|
117
|
+
},
|
|
118
|
+
onError() {
|
|
119
|
+
reject();
|
|
120
|
+
},
|
|
121
|
+
} );
|
|
122
|
+
} ).then( () => setIsAnimating( true ) )
|
|
126
123
|
)
|
|
124
|
+
.catch( () => {
|
|
125
|
+
setHadUploadError( true );
|
|
126
|
+
} )
|
|
127
127
|
)
|
|
128
128
|
).finally( () => {
|
|
129
129
|
setIsUploading( false );
|
|
@@ -144,19 +144,27 @@ export default function PostFormatPanel() {
|
|
|
144
144
|
gap: '8px',
|
|
145
145
|
} }
|
|
146
146
|
>
|
|
147
|
-
<AnimatePresence
|
|
147
|
+
<AnimatePresence
|
|
148
|
+
onExitComplete={ () => setIsAnimating( false ) }
|
|
149
|
+
>
|
|
148
150
|
{ externalImages.map( ( image ) => {
|
|
149
151
|
return <Image key={ image.clientId } { ...image } />;
|
|
150
152
|
} ) }
|
|
151
153
|
</AnimatePresence>
|
|
152
|
-
{ isUploading ? (
|
|
154
|
+
{ isUploading || isAnimating ? (
|
|
153
155
|
<Spinner />
|
|
154
156
|
) : (
|
|
155
|
-
<Button
|
|
157
|
+
<Button
|
|
158
|
+
// TODO: Switch to `true` (40px size) if possible
|
|
159
|
+
__next40pxDefaultSize={ false }
|
|
160
|
+
variant="primary"
|
|
161
|
+
onClick={ uploadImages }
|
|
162
|
+
>
|
|
156
163
|
{ __( 'Upload' ) }
|
|
157
164
|
</Button>
|
|
158
165
|
) }
|
|
159
166
|
</div>
|
|
167
|
+
{ hadUploadError && <p>{ __( 'Upload failed, try again.' ) }</p> }
|
|
160
168
|
</PanelBody>
|
|
161
169
|
);
|
|
162
170
|
}
|
|
@@ -44,7 +44,7 @@ const getFuturePostUrl = ( post ) => {
|
|
|
44
44
|
function CopyButton( { text, onCopy, children } ) {
|
|
45
45
|
const ref = useCopyToClipboard( text, onCopy );
|
|
46
46
|
return (
|
|
47
|
-
<Button variant="secondary" ref={ ref }>
|
|
47
|
+
<Button __next40pxDefaultSize variant="secondary" ref={ ref }>
|
|
48
48
|
{ children }
|
|
49
49
|
</Button>
|
|
50
50
|
);
|
|
@@ -122,6 +122,7 @@ class PostPublishPanelPostpublish extends Component {
|
|
|
122
122
|
</p>
|
|
123
123
|
<div className="post-publish-panel__postpublish-post-address-container">
|
|
124
124
|
<TextControl
|
|
125
|
+
__next40pxDefaultSize
|
|
125
126
|
__nextHasNoMarginBottom
|
|
126
127
|
className="post-publish-panel__postpublish-post-address"
|
|
127
128
|
readOnly
|
|
@@ -145,12 +146,17 @@ class PostPublishPanelPostpublish extends Component {
|
|
|
145
146
|
|
|
146
147
|
<div className="post-publish-panel__postpublish-buttons">
|
|
147
148
|
{ ! isScheduled && (
|
|
148
|
-
<Button
|
|
149
|
+
<Button
|
|
150
|
+
variant="primary"
|
|
151
|
+
href={ link }
|
|
152
|
+
__next40pxDefaultSize
|
|
153
|
+
>
|
|
149
154
|
{ viewPostLabel }
|
|
150
155
|
</Button>
|
|
151
156
|
) }
|
|
152
157
|
<Button
|
|
153
158
|
variant={ isScheduled ? 'primary' : 'secondary' }
|
|
159
|
+
__next40pxDefaultSize
|
|
154
160
|
href={ addLink }
|
|
155
161
|
>
|
|
156
162
|
{ addNewPostLabel }
|
|
@@ -37,8 +37,9 @@
|
|
|
37
37
|
|
|
38
38
|
.components-site-icon {
|
|
39
39
|
border: none;
|
|
40
|
-
border-radius: $radius-
|
|
40
|
+
border-radius: $radius-small;
|
|
41
41
|
margin-right: $grid-unit-15;
|
|
42
|
+
flex-shrink: 0;
|
|
42
43
|
|
|
43
44
|
// Same size as in the Site menu.
|
|
44
45
|
height: 36px;
|
|
@@ -54,6 +55,7 @@
|
|
|
54
55
|
display: block;
|
|
55
56
|
color: $gray-700;
|
|
56
57
|
font-size: $helptext-font-size;
|
|
58
|
+
word-break: break-word;
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
.editor-post-publish-panel__header-publish-button,
|
|
@@ -120,7 +120,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is pu
|
|
|
120
120
|
post address
|
|
121
121
|
</label>
|
|
122
122
|
<input
|
|
123
|
-
class="components-text-control__input"
|
|
123
|
+
class="components-text-control__input is-next-40px-default-size"
|
|
124
124
|
id="inspector-text-control-0"
|
|
125
125
|
readonly=""
|
|
126
126
|
type="text"
|
|
@@ -132,7 +132,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is pu
|
|
|
132
132
|
class="post-publish-panel__postpublish-post-address__copy-button-wrap"
|
|
133
133
|
>
|
|
134
134
|
<button
|
|
135
|
-
class="components-button is-secondary"
|
|
135
|
+
class="components-button is-next-40px-default-size is-secondary"
|
|
136
136
|
type="button"
|
|
137
137
|
>
|
|
138
138
|
Copy
|
|
@@ -143,11 +143,11 @@ exports[`PostPublishPanel should render the post-publish panel if the post is pu
|
|
|
143
143
|
class="post-publish-panel__postpublish-buttons"
|
|
144
144
|
>
|
|
145
145
|
<a
|
|
146
|
-
class="components-button is-primary"
|
|
146
|
+
class="components-button is-next-40px-default-size is-primary"
|
|
147
147
|
href="https://wordpress.local/sample-page/"
|
|
148
148
|
/>
|
|
149
149
|
<a
|
|
150
|
-
class="components-button is-secondary"
|
|
150
|
+
class="components-button is-next-40px-default-size is-secondary"
|
|
151
151
|
href="post-new.php?"
|
|
152
152
|
/>
|
|
153
153
|
</div>
|
|
@@ -312,7 +312,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is sc
|
|
|
312
312
|
post address
|
|
313
313
|
</label>
|
|
314
314
|
<input
|
|
315
|
-
class="components-text-control__input"
|
|
315
|
+
class="components-text-control__input is-next-40px-default-size"
|
|
316
316
|
id="inspector-text-control-1"
|
|
317
317
|
readonly=""
|
|
318
318
|
type="text"
|
|
@@ -324,7 +324,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is sc
|
|
|
324
324
|
class="post-publish-panel__postpublish-post-address__copy-button-wrap"
|
|
325
325
|
>
|
|
326
326
|
<button
|
|
327
|
-
class="components-button is-secondary"
|
|
327
|
+
class="components-button is-next-40px-default-size is-secondary"
|
|
328
328
|
type="button"
|
|
329
329
|
>
|
|
330
330
|
Copy
|
|
@@ -335,11 +335,11 @@ exports[`PostPublishPanel should render the post-publish panel if the post is sc
|
|
|
335
335
|
class="post-publish-panel__postpublish-buttons"
|
|
336
336
|
>
|
|
337
337
|
<a
|
|
338
|
-
class="components-button is-primary"
|
|
338
|
+
class="components-button is-next-40px-default-size is-primary"
|
|
339
339
|
href="https://wordpress.local/sample-page/"
|
|
340
340
|
/>
|
|
341
341
|
<a
|
|
342
|
-
class="components-button is-secondary"
|
|
342
|
+
class="components-button is-next-40px-default-size is-secondary"
|
|
343
343
|
href="post-new.php?"
|
|
344
344
|
/>
|
|
345
345
|
</div>
|
|
@@ -171,7 +171,7 @@ export default function PostStatus() {
|
|
|
171
171
|
contentClassName="editor-change-status__content"
|
|
172
172
|
popoverProps={ popoverProps }
|
|
173
173
|
focusOnMount
|
|
174
|
-
renderToggle={ ( { onToggle } ) => (
|
|
174
|
+
renderToggle={ ( { onToggle, isOpen } ) => (
|
|
175
175
|
<Button
|
|
176
176
|
variant="tertiary"
|
|
177
177
|
size="compact"
|
|
@@ -179,9 +179,10 @@ export default function PostStatus() {
|
|
|
179
179
|
icon={ postStatusesInfo[ status ]?.icon }
|
|
180
180
|
aria-label={ sprintf(
|
|
181
181
|
// translators: %s: Current post status.
|
|
182
|
-
__( 'Change
|
|
182
|
+
__( 'Change status: %s' ),
|
|
183
183
|
postStatusesInfo[ status ]?.label
|
|
184
184
|
) }
|
|
185
|
+
aria-expanded={ isOpen }
|
|
185
186
|
>
|
|
186
187
|
{ postStatusesInfo[ status ]?.label }
|
|
187
188
|
</Button>
|