@wordpress/editor 14.12.0 → 14.13.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 +2 -0
- package/README.md +120 -99
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +1 -1
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
- package/build/components/collab-sidebar/add-comment.js +17 -65
- package/build/components/collab-sidebar/add-comment.js.map +1 -1
- package/build/components/collab-sidebar/comment-author-info.js +76 -0
- package/build/components/collab-sidebar/comment-author-info.js.map +1 -0
- package/build/components/collab-sidebar/comment-button-toolbar.js +2 -2
- package/build/components/collab-sidebar/comment-button-toolbar.js.map +1 -1
- package/build/components/collab-sidebar/comment-button.js +2 -2
- package/build/components/collab-sidebar/comment-button.js.map +1 -1
- package/build/components/collab-sidebar/comment-form.js +64 -0
- package/build/components/collab-sidebar/comment-form.js.map +1 -0
- package/build/components/collab-sidebar/comments.js +33 -91
- package/build/components/collab-sidebar/comments.js.map +1 -1
- package/build/components/create-template-part-modal/index.js +1 -2
- package/build/components/create-template-part-modal/index.js.map +1 -1
- package/build/components/document-bar/index.js +10 -3
- package/build/components/document-bar/index.js.map +1 -1
- package/build/components/document-outline/check.js +4 -4
- package/build/components/document-outline/check.js.map +1 -1
- package/build/components/document-outline/index.js +8 -8
- package/build/components/document-outline/index.js.map +1 -1
- package/build/components/document-tools/index.js +1 -1
- package/build/components/document-tools/index.js.map +1 -1
- package/build/components/editor-history/redo.js +1 -1
- package/build/components/editor-history/redo.js.map +1 -1
- package/build/components/editor-history/undo.js +1 -1
- package/build/components/editor-history/undo.js.map +1 -1
- package/build/components/editor-interface/content-slot-fill.js +1 -10
- package/build/components/editor-interface/content-slot-fill.js.map +1 -1
- package/build/components/editor-interface/index.js +3 -9
- package/build/components/editor-interface/index.js.map +1 -1
- package/build/components/editor-notices/index.js +1 -1
- package/build/components/editor-notices/index.js.map +1 -1
- package/build/components/editor-snackbars/index.js +1 -1
- package/build/components/editor-snackbars/index.js.map +1 -1
- package/build/components/entities-saved-states/entity-record-item.js +9 -1
- package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
- package/build/components/entities-saved-states/index.js +2 -2
- package/build/components/entities-saved-states/index.js.map +1 -1
- package/build/components/page-attributes/check.js +3 -3
- package/build/components/page-attributes/check.js.map +1 -1
- package/build/components/page-attributes/order.js +1 -1
- package/build/components/page-attributes/order.js.map +1 -1
- package/build/components/page-attributes/panel.js +1 -1
- package/build/components/page-attributes/panel.js.map +1 -1
- package/build/components/page-attributes/parent.js +1 -1
- package/build/components/page-attributes/parent.js.map +1 -1
- package/build/components/plugin-document-setting-panel/index.js +2 -2
- package/build/components/plugin-document-setting-panel/index.js.map +1 -1
- package/build/components/plugin-more-menu-item/index.js +2 -1
- package/build/components/plugin-more-menu-item/index.js.map +1 -1
- package/build/components/plugin-post-publish-panel/index.js +2 -2
- package/build/components/plugin-post-publish-panel/index.js.map +1 -1
- package/build/components/plugin-post-status-info/index.js +4 -4
- package/build/components/plugin-post-status-info/index.js.map +1 -1
- package/build/components/plugin-pre-publish-panel/index.js +2 -2
- package/build/components/plugin-pre-publish-panel/index.js.map +1 -1
- package/build/components/plugin-preview-menu-item/index.js +2 -1
- package/build/components/plugin-preview-menu-item/index.js.map +1 -1
- package/build/components/plugin-sidebar/index.js +1 -0
- package/build/components/plugin-sidebar/index.js.map +1 -1
- package/build/components/plugin-sidebar-more-menu-item/index.js +2 -1
- package/build/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
- package/build/components/post-actions/actions.js +3 -3
- package/build/components/post-actions/actions.js.map +1 -1
- package/build/components/post-author/check.js +3 -3
- package/build/components/post-author/check.js.map +1 -1
- package/build/components/post-author/index.js +1 -1
- package/build/components/post-author/index.js.map +1 -1
- package/build/components/post-author/panel.js +1 -1
- package/build/components/post-author/panel.js.map +1 -1
- package/build/components/post-card-panel/index.js +9 -4
- package/build/components/post-card-panel/index.js.map +1 -1
- package/build/components/post-comments/index.js +1 -1
- package/build/components/post-comments/index.js.map +1 -1
- package/build/components/post-discussion/panel.js +1 -1
- package/build/components/post-discussion/panel.js.map +1 -1
- package/build/components/post-excerpt/check.js +3 -3
- package/build/components/post-excerpt/check.js.map +1 -1
- package/build/components/post-excerpt/panel.js +1 -1
- package/build/components/post-excerpt/panel.js.map +1 -1
- package/build/components/post-excerpt/plugin.js +4 -4
- package/build/components/post-excerpt/plugin.js.map +1 -1
- package/build/components/post-featured-image/check.js +3 -3
- package/build/components/post-featured-image/check.js.map +1 -1
- package/build/components/post-featured-image/index.js +39 -9
- package/build/components/post-featured-image/index.js.map +1 -1
- package/build/components/post-featured-image/panel.js +1 -1
- package/build/components/post-featured-image/panel.js.map +1 -1
- package/build/components/post-fields/index.js +70 -0
- package/build/components/post-fields/index.js.map +1 -0
- package/build/components/post-format/check.js +9 -12
- package/build/components/post-format/check.js.map +1 -1
- package/build/components/post-format/index.js +1 -1
- package/build/components/post-format/index.js.map +1 -1
- package/build/components/post-format/panel.js +1 -1
- package/build/components/post-format/panel.js.map +1 -1
- package/build/components/post-last-revision/check.js +3 -3
- package/build/components/post-last-revision/check.js.map +1 -1
- package/build/components/post-last-revision/index.js +1 -1
- package/build/components/post-last-revision/index.js.map +1 -1
- package/build/components/post-last-revision/panel.js +1 -1
- package/build/components/post-last-revision/panel.js.map +1 -1
- package/build/components/post-locked-modal/index.js +1 -1
- package/build/components/post-locked-modal/index.js.map +1 -1
- package/build/components/post-pending-status/check.js +3 -3
- package/build/components/post-pending-status/check.js.map +1 -1
- package/build/components/post-pending-status/index.js +1 -1
- package/build/components/post-pending-status/index.js.map +1 -1
- package/build/components/post-preview-button/index.js +1 -1
- package/build/components/post-preview-button/index.js.map +1 -1
- package/build/components/post-publish-panel/index.js +5 -2
- package/build/components/post-publish-panel/index.js.map +1 -1
- package/build/components/post-schedule/check.js +3 -3
- package/build/components/post-schedule/check.js.map +1 -1
- package/build/components/post-schedule/index.js +1 -1
- package/build/components/post-schedule/index.js.map +1 -1
- package/build/components/post-schedule/label.js +1 -1
- package/build/components/post-schedule/label.js.map +1 -1
- package/build/components/post-schedule/panel.js +1 -1
- package/build/components/post-schedule/panel.js.map +1 -1
- package/build/components/post-slug/check.js +3 -3
- package/build/components/post-slug/check.js.map +1 -1
- package/build/components/post-slug/index.js +1 -1
- package/build/components/post-slug/index.js.map +1 -1
- package/build/components/post-sticky/check.js +3 -3
- package/build/components/post-sticky/check.js.map +1 -1
- package/build/components/post-sticky/index.js +1 -1
- package/build/components/post-sticky/index.js.map +1 -1
- package/build/components/post-switch-to-draft-button/index.js +1 -1
- package/build/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build/components/post-sync-status/index.js +1 -1
- package/build/components/post-sync-status/index.js.map +1 -1
- package/build/components/post-taxonomies/check.js +3 -3
- package/build/components/post-taxonomies/check.js.map +1 -1
- package/build/components/post-taxonomies/flat-term-selector.js +1 -1
- package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/panel.js +16 -13
- package/build/components/post-taxonomies/panel.js.map +1 -1
- package/build/components/post-template/classic-theme.js +2 -2
- package/build/components/post-template/classic-theme.js.map +1 -1
- package/build/components/post-template/panel.js +1 -1
- package/build/components/post-template/panel.js.map +1 -1
- package/build/components/post-text-editor/index.js +1 -1
- package/build/components/post-text-editor/index.js.map +1 -1
- package/build/components/post-title/index.js +20 -18
- package/build/components/post-title/index.js.map +1 -1
- package/build/components/post-title/post-title-raw.js +1 -1
- package/build/components/post-title/post-title-raw.js.map +1 -1
- package/build/components/post-trash/check.js +3 -3
- package/build/components/post-trash/check.js.map +1 -1
- package/build/components/post-trash/index.js +1 -1
- package/build/components/post-trash/index.js.map +1 -1
- package/build/components/post-type-support-check/index.js +6 -6
- package/build/components/post-type-support-check/index.js.map +1 -1
- package/build/components/post-url/check.js +3 -3
- package/build/components/post-url/check.js.map +1 -1
- package/build/components/post-url/index.js +1 -1
- package/build/components/post-url/index.js.map +1 -1
- package/build/components/post-url/label.js +1 -1
- package/build/components/post-url/label.js.map +1 -1
- package/build/components/post-url/panel.js +1 -1
- package/build/components/post-url/panel.js.map +1 -1
- package/build/components/post-visibility/check.js +1 -1
- package/build/components/post-visibility/check.js.map +1 -1
- package/build/components/post-visibility/index.js +1 -1
- package/build/components/post-visibility/index.js.map +1 -1
- package/build/components/preferences-modal/block-visibility.js +87 -0
- package/build/components/preferences-modal/block-visibility.js.map +1 -0
- package/build/components/preferences-modal/enable-panel.js +27 -19
- package/build/components/preferences-modal/enable-panel.js.map +1 -1
- package/build/components/preferences-modal/enable-publish-sidebar.js +13 -10
- package/build/components/preferences-modal/enable-publish-sidebar.js.map +1 -1
- package/build/components/preferences-modal/index.js +2 -2
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/provider/index.js +14 -8
- package/build/components/provider/index.js.map +1 -1
- package/build/components/table-of-contents/index.js +1 -1
- package/build/components/table-of-contents/index.js.map +1 -1
- package/build/components/theme-support-check/index.js +4 -4
- package/build/components/theme-support-check/index.js.map +1 -1
- package/build/components/time-to-read/index.js +1 -1
- package/build/components/time-to-read/index.js.map +1 -1
- package/build/components/unsaved-changes-warning/index.js +1 -1
- package/build/components/unsaved-changes-warning/index.js.map +1 -1
- package/build/components/word-count/index.js +1 -1
- package/build/components/word-count/index.js.map +1 -1
- package/build/components/zoom-out-toggle/index.js +8 -3
- package/build/components/zoom-out-toggle/index.js.map +1 -1
- package/build/dataviews/api.js +41 -0
- package/build/dataviews/api.js.map +1 -1
- package/build/dataviews/store/private-actions.js +26 -4
- package/build/dataviews/store/private-actions.js.map +1 -1
- package/build/dataviews/store/private-selectors.js +5 -0
- package/build/dataviews/store/private-selectors.js.map +1 -1
- package/build/dataviews/store/reducer.js +23 -0
- package/build/dataviews/store/reducer.js.map +1 -1
- package/build/private-apis.js +4 -0
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +11 -9
- package/build/store/actions.js.map +1 -1
- package/build/store/private-selectors.js +5 -1
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.native.js +1 -0
- package/build/store/reducer.native.js.map +1 -1
- package/build/store/selectors.js +34 -42
- package/build/store/selectors.js.map +1 -1
- package/build/utils/get-template-info.js +60 -0
- package/build/utils/get-template-info.js.map +1 -0
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +1 -1
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
- package/build-module/components/collab-sidebar/add-comment.js +18 -67
- package/build-module/components/collab-sidebar/add-comment.js.map +1 -1
- package/build-module/components/collab-sidebar/comment-author-info.js +71 -0
- package/build-module/components/collab-sidebar/comment-author-info.js.map +1 -0
- package/build-module/components/collab-sidebar/comment-button-toolbar.js +2 -2
- package/build-module/components/collab-sidebar/comment-button-toolbar.js.map +1 -1
- package/build-module/components/collab-sidebar/comment-button.js +2 -2
- package/build-module/components/collab-sidebar/comment-button.js.map +1 -1
- package/build-module/components/collab-sidebar/comment-form.js +59 -0
- package/build-module/components/collab-sidebar/comment-form.js.map +1 -0
- package/build-module/components/collab-sidebar/comments.js +33 -91
- package/build-module/components/collab-sidebar/comments.js.map +1 -1
- package/build-module/components/create-template-part-modal/index.js +1 -2
- package/build-module/components/create-template-part-modal/index.js.map +1 -1
- package/build-module/components/document-bar/index.js +10 -3
- package/build-module/components/document-bar/index.js.map +1 -1
- package/build-module/components/document-outline/check.js +4 -4
- package/build-module/components/document-outline/check.js.map +1 -1
- package/build-module/components/document-outline/index.js +8 -8
- package/build-module/components/document-outline/index.js.map +1 -1
- package/build-module/components/document-tools/index.js +1 -1
- package/build-module/components/document-tools/index.js.map +1 -1
- package/build-module/components/editor-history/redo.js +1 -1
- package/build-module/components/editor-history/redo.js.map +1 -1
- package/build-module/components/editor-history/undo.js +1 -1
- package/build-module/components/editor-history/undo.js.map +1 -1
- package/build-module/components/editor-interface/content-slot-fill.js +2 -11
- package/build-module/components/editor-interface/content-slot-fill.js.map +1 -1
- package/build-module/components/editor-interface/index.js +4 -10
- package/build-module/components/editor-interface/index.js.map +1 -1
- package/build-module/components/editor-notices/index.js +1 -1
- package/build-module/components/editor-notices/index.js.map +1 -1
- package/build-module/components/editor-snackbars/index.js +1 -1
- package/build-module/components/editor-snackbars/index.js.map +1 -1
- package/build-module/components/entities-saved-states/entity-record-item.js +9 -1
- package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
- package/build-module/components/entities-saved-states/index.js +2 -2
- package/build-module/components/entities-saved-states/index.js.map +1 -1
- package/build-module/components/page-attributes/check.js +3 -3
- package/build-module/components/page-attributes/check.js.map +1 -1
- package/build-module/components/page-attributes/order.js +1 -1
- package/build-module/components/page-attributes/order.js.map +1 -1
- package/build-module/components/page-attributes/panel.js +1 -1
- package/build-module/components/page-attributes/panel.js.map +1 -1
- package/build-module/components/page-attributes/parent.js +1 -1
- package/build-module/components/page-attributes/parent.js.map +1 -1
- package/build-module/components/plugin-document-setting-panel/index.js +2 -2
- package/build-module/components/plugin-document-setting-panel/index.js.map +1 -1
- package/build-module/components/plugin-more-menu-item/index.js +2 -1
- package/build-module/components/plugin-more-menu-item/index.js.map +1 -1
- package/build-module/components/plugin-post-publish-panel/index.js +2 -2
- package/build-module/components/plugin-post-publish-panel/index.js.map +1 -1
- package/build-module/components/plugin-post-status-info/index.js +4 -4
- package/build-module/components/plugin-post-status-info/index.js.map +1 -1
- package/build-module/components/plugin-pre-publish-panel/index.js +2 -2
- package/build-module/components/plugin-pre-publish-panel/index.js.map +1 -1
- package/build-module/components/plugin-preview-menu-item/index.js +2 -1
- package/build-module/components/plugin-preview-menu-item/index.js.map +1 -1
- package/build-module/components/plugin-sidebar/index.js +1 -0
- package/build-module/components/plugin-sidebar/index.js.map +1 -1
- package/build-module/components/plugin-sidebar-more-menu-item/index.js +2 -1
- package/build-module/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
- package/build-module/components/post-actions/actions.js +3 -3
- package/build-module/components/post-actions/actions.js.map +1 -1
- package/build-module/components/post-author/check.js +3 -3
- package/build-module/components/post-author/check.js.map +1 -1
- package/build-module/components/post-author/index.js +1 -1
- package/build-module/components/post-author/index.js.map +1 -1
- package/build-module/components/post-author/panel.js +1 -1
- package/build-module/components/post-author/panel.js.map +1 -1
- package/build-module/components/post-card-panel/index.js +9 -4
- package/build-module/components/post-card-panel/index.js.map +1 -1
- package/build-module/components/post-comments/index.js +1 -1
- package/build-module/components/post-comments/index.js.map +1 -1
- package/build-module/components/post-discussion/panel.js +1 -1
- package/build-module/components/post-discussion/panel.js.map +1 -1
- package/build-module/components/post-excerpt/check.js +3 -3
- package/build-module/components/post-excerpt/check.js.map +1 -1
- package/build-module/components/post-excerpt/panel.js +1 -1
- package/build-module/components/post-excerpt/panel.js.map +1 -1
- package/build-module/components/post-excerpt/plugin.js +4 -4
- package/build-module/components/post-excerpt/plugin.js.map +1 -1
- package/build-module/components/post-featured-image/check.js +3 -3
- package/build-module/components/post-featured-image/check.js.map +1 -1
- package/build-module/components/post-featured-image/index.js +40 -10
- package/build-module/components/post-featured-image/index.js.map +1 -1
- package/build-module/components/post-featured-image/panel.js +1 -1
- package/build-module/components/post-featured-image/panel.js.map +1 -1
- package/build-module/components/post-fields/index.js +62 -0
- package/build-module/components/post-fields/index.js.map +1 -0
- package/build-module/components/post-format/check.js +10 -11
- package/build-module/components/post-format/check.js.map +1 -1
- package/build-module/components/post-format/index.js +1 -1
- package/build-module/components/post-format/index.js.map +1 -1
- package/build-module/components/post-format/panel.js +1 -1
- package/build-module/components/post-format/panel.js.map +1 -1
- package/build-module/components/post-last-revision/check.js +3 -3
- package/build-module/components/post-last-revision/check.js.map +1 -1
- package/build-module/components/post-last-revision/index.js +1 -1
- package/build-module/components/post-last-revision/index.js.map +1 -1
- package/build-module/components/post-last-revision/panel.js +1 -1
- package/build-module/components/post-last-revision/panel.js.map +1 -1
- package/build-module/components/post-locked-modal/index.js +1 -1
- package/build-module/components/post-locked-modal/index.js.map +1 -1
- package/build-module/components/post-pending-status/check.js +3 -3
- package/build-module/components/post-pending-status/check.js.map +1 -1
- package/build-module/components/post-pending-status/index.js +1 -1
- package/build-module/components/post-pending-status/index.js.map +1 -1
- package/build-module/components/post-preview-button/index.js +1 -1
- package/build-module/components/post-preview-button/index.js.map +1 -1
- package/build-module/components/post-publish-panel/index.js +5 -2
- package/build-module/components/post-publish-panel/index.js.map +1 -1
- package/build-module/components/post-schedule/check.js +3 -3
- package/build-module/components/post-schedule/check.js.map +1 -1
- package/build-module/components/post-schedule/index.js +1 -1
- package/build-module/components/post-schedule/index.js.map +1 -1
- package/build-module/components/post-schedule/label.js +1 -1
- package/build-module/components/post-schedule/label.js.map +1 -1
- package/build-module/components/post-schedule/panel.js +1 -1
- package/build-module/components/post-schedule/panel.js.map +1 -1
- package/build-module/components/post-slug/check.js +3 -3
- package/build-module/components/post-slug/check.js.map +1 -1
- package/build-module/components/post-slug/index.js +1 -1
- package/build-module/components/post-slug/index.js.map +1 -1
- package/build-module/components/post-sticky/check.js +3 -3
- package/build-module/components/post-sticky/check.js.map +1 -1
- package/build-module/components/post-sticky/index.js +1 -1
- package/build-module/components/post-sticky/index.js.map +1 -1
- package/build-module/components/post-switch-to-draft-button/index.js +1 -1
- package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build-module/components/post-sync-status/index.js +1 -1
- package/build-module/components/post-sync-status/index.js.map +1 -1
- package/build-module/components/post-taxonomies/check.js +3 -3
- package/build-module/components/post-taxonomies/check.js.map +1 -1
- package/build-module/components/post-taxonomies/flat-term-selector.js +1 -1
- package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/panel.js +17 -12
- package/build-module/components/post-taxonomies/panel.js.map +1 -1
- package/build-module/components/post-template/classic-theme.js +2 -2
- package/build-module/components/post-template/classic-theme.js.map +1 -1
- package/build-module/components/post-template/panel.js +1 -1
- package/build-module/components/post-template/panel.js.map +1 -1
- package/build-module/components/post-text-editor/index.js +1 -1
- package/build-module/components/post-text-editor/index.js.map +1 -1
- package/build-module/components/post-title/index.js +20 -18
- package/build-module/components/post-title/index.js.map +1 -1
- package/build-module/components/post-title/post-title-raw.js +1 -1
- package/build-module/components/post-title/post-title-raw.js.map +1 -1
- package/build-module/components/post-trash/check.js +3 -3
- package/build-module/components/post-trash/check.js.map +1 -1
- package/build-module/components/post-trash/index.js +1 -1
- package/build-module/components/post-trash/index.js.map +1 -1
- package/build-module/components/post-type-support-check/index.js +6 -6
- package/build-module/components/post-type-support-check/index.js.map +1 -1
- package/build-module/components/post-url/check.js +3 -3
- package/build-module/components/post-url/check.js.map +1 -1
- package/build-module/components/post-url/index.js +1 -1
- package/build-module/components/post-url/index.js.map +1 -1
- package/build-module/components/post-url/label.js +1 -1
- package/build-module/components/post-url/label.js.map +1 -1
- package/build-module/components/post-url/panel.js +1 -1
- package/build-module/components/post-url/panel.js.map +1 -1
- package/build-module/components/post-visibility/check.js +1 -1
- package/build-module/components/post-visibility/check.js.map +1 -1
- package/build-module/components/post-visibility/index.js +1 -1
- package/build-module/components/post-visibility/index.js.map +1 -1
- package/build-module/components/preferences-modal/block-visibility.js +80 -0
- package/build-module/components/preferences-modal/block-visibility.js.map +1 -0
- package/build-module/components/preferences-modal/enable-panel.js +27 -19
- package/build-module/components/preferences-modal/enable-panel.js.map +1 -1
- package/build-module/components/preferences-modal/enable-publish-sidebar.js +13 -10
- package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +2 -2
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/provider/index.js +14 -8
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/table-of-contents/index.js +1 -1
- package/build-module/components/table-of-contents/index.js.map +1 -1
- package/build-module/components/theme-support-check/index.js +4 -4
- package/build-module/components/theme-support-check/index.js.map +1 -1
- package/build-module/components/time-to-read/index.js +1 -1
- package/build-module/components/time-to-read/index.js.map +1 -1
- package/build-module/components/unsaved-changes-warning/index.js +1 -1
- package/build-module/components/unsaved-changes-warning/index.js.map +1 -1
- package/build-module/components/word-count/index.js +1 -1
- package/build-module/components/word-count/index.js.map +1 -1
- package/build-module/components/zoom-out-toggle/index.js +8 -3
- package/build-module/components/zoom-out-toggle/index.js.map +1 -1
- package/build-module/dataviews/api.js +39 -0
- package/build-module/dataviews/api.js.map +1 -1
- package/build-module/dataviews/store/private-actions.js +23 -3
- package/build-module/dataviews/store/private-actions.js.map +1 -1
- package/build-module/dataviews/store/private-selectors.js +4 -0
- package/build-module/dataviews/store/private-selectors.js.map +1 -1
- package/build-module/dataviews/store/reducer.js +23 -0
- package/build-module/dataviews/store/reducer.js.map +1 -1
- package/build-module/private-apis.js +4 -0
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +11 -9
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/private-selectors.js +6 -3
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.native.js +2 -1
- package/build-module/store/reducer.native.js.map +1 -1
- package/build-module/store/selectors.js +33 -39
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/get-template-info.js +51 -0
- package/build-module/utils/get-template-info.js.map +1 -0
- package/build-style/style-rtl.css +11 -81
- package/build-style/style.css +11 -81
- package/build-types/components/block-settings-menu/plugin-block-settings-menu-item.d.ts +2 -2
- package/build-types/components/block-settings-menu/plugin-block-settings-menu-item.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/add-comment.d.ts +2 -2
- package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/comment-author-info.d.ts +17 -0
- package/build-types/components/collab-sidebar/comment-author-info.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/comment-form.d.ts +18 -0
- package/build-types/components/collab-sidebar/comment-form.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/comments.d.ts +2 -2
- package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
- package/build-types/components/create-template-part-modal/index.d.ts.map +1 -1
- package/build-types/components/document-bar/index.d.ts +2 -2
- package/build-types/components/document-bar/index.d.ts.map +1 -1
- package/build-types/components/document-outline/check.d.ts +5 -5
- package/build-types/components/document-outline/check.d.ts.map +1 -1
- package/build-types/components/document-outline/index.d.ts +4 -6
- package/build-types/components/document-outline/index.d.ts.map +1 -1
- package/build-types/components/document-tools/index.d.ts.map +1 -1
- package/build-types/components/editor-interface/content-slot-fill.d.ts +12 -1
- package/build-types/components/editor-interface/content-slot-fill.d.ts.map +1 -1
- package/build-types/components/editor-interface/index.d.ts.map +1 -1
- package/build-types/components/editor-notices/index.d.ts +2 -2
- package/build-types/components/editor-notices/index.d.ts.map +1 -1
- package/build-types/components/editor-snackbars/index.d.ts +2 -2
- package/build-types/components/editor-snackbars/index.d.ts.map +1 -1
- package/build-types/components/entities-saved-states/entity-record-item.d.ts.map +1 -1
- package/build-types/components/entities-saved-states/index.d.ts +4 -4
- package/build-types/components/entities-saved-states/index.d.ts.map +1 -1
- package/build-types/components/header/back-button.d.ts.map +1 -1
- package/build-types/components/more-menu/tools-more-menu-group.d.ts.map +1 -1
- package/build-types/components/more-menu/view-more-menu-group.d.ts.map +1 -1
- package/build-types/components/page-attributes/check.d.ts +5 -5
- package/build-types/components/page-attributes/check.d.ts.map +1 -1
- package/build-types/components/page-attributes/order.d.ts +2 -2
- package/build-types/components/page-attributes/order.d.ts.map +1 -1
- package/build-types/components/page-attributes/panel.d.ts +2 -2
- package/build-types/components/page-attributes/panel.d.ts.map +1 -1
- package/build-types/components/page-attributes/parent.d.ts +2 -2
- package/build-types/components/page-attributes/parent.d.ts.map +1 -1
- package/build-types/components/plugin-document-setting-panel/index.d.ts +4 -4
- package/build-types/components/plugin-document-setting-panel/index.d.ts.map +1 -1
- package/build-types/components/plugin-more-menu-item/index.d.ts +4 -2
- package/build-types/components/plugin-more-menu-item/index.d.ts.map +1 -1
- package/build-types/components/plugin-post-publish-panel/index.d.ts +4 -4
- package/build-types/components/plugin-post-publish-panel/index.d.ts.map +1 -1
- package/build-types/components/plugin-post-status-info/index.d.ts +6 -6
- package/build-types/components/plugin-post-status-info/index.d.ts.map +1 -1
- package/build-types/components/plugin-pre-publish-panel/index.d.ts +4 -4
- package/build-types/components/plugin-pre-publish-panel/index.d.ts.map +1 -1
- package/build-types/components/plugin-preview-menu-item/index.d.ts +4 -2
- package/build-types/components/plugin-preview-menu-item/index.d.ts.map +1 -1
- package/build-types/components/plugin-sidebar/index.d.ts +2 -0
- package/build-types/components/plugin-sidebar/index.d.ts.map +1 -1
- package/build-types/components/plugin-sidebar-more-menu-item/index.d.ts +4 -2
- package/build-types/components/plugin-sidebar-more-menu-item/index.d.ts.map +1 -1
- package/build-types/components/post-author/check.d.ts +5 -5
- package/build-types/components/post-author/check.d.ts.map +1 -1
- package/build-types/components/post-author/index.d.ts +2 -2
- package/build-types/components/post-author/index.d.ts.map +1 -1
- package/build-types/components/post-author/panel.d.ts +2 -2
- package/build-types/components/post-author/panel.d.ts.map +1 -1
- package/build-types/components/post-card-panel/index.d.ts.map +1 -1
- package/build-types/components/post-discussion/panel.d.ts +2 -2
- package/build-types/components/post-discussion/panel.d.ts.map +1 -1
- package/build-types/components/post-excerpt/check.d.ts +5 -5
- package/build-types/components/post-excerpt/check.d.ts.map +1 -1
- package/build-types/components/post-excerpt/panel.d.ts +2 -2
- package/build-types/components/post-excerpt/panel.d.ts.map +1 -1
- package/build-types/components/post-excerpt/plugin.d.ts +6 -6
- package/build-types/components/post-excerpt/plugin.d.ts.map +1 -1
- package/build-types/components/post-featured-image/check.d.ts +5 -5
- package/build-types/components/post-featured-image/check.d.ts.map +1 -1
- package/build-types/components/post-featured-image/panel.d.ts +2 -2
- package/build-types/components/post-featured-image/panel.d.ts.map +1 -1
- package/build-types/components/post-fields/index.d.ts +12 -0
- package/build-types/components/post-fields/index.d.ts.map +1 -0
- package/build-types/components/post-format/check.d.ts +11 -4
- package/build-types/components/post-format/check.d.ts.map +1 -1
- package/build-types/components/post-format/index.d.ts +2 -2
- package/build-types/components/post-format/index.d.ts.map +1 -1
- package/build-types/components/post-format/panel.d.ts +2 -2
- package/build-types/components/post-format/panel.d.ts.map +1 -1
- package/build-types/components/post-last-revision/check.d.ts +5 -5
- package/build-types/components/post-last-revision/check.d.ts.map +1 -1
- package/build-types/components/post-last-revision/index.d.ts +2 -2
- package/build-types/components/post-last-revision/index.d.ts.map +1 -1
- package/build-types/components/post-last-revision/panel.d.ts +2 -2
- package/build-types/components/post-last-revision/panel.d.ts.map +1 -1
- package/build-types/components/post-locked-modal/index.d.ts +2 -2
- package/build-types/components/post-locked-modal/index.d.ts.map +1 -1
- package/build-types/components/post-pending-status/check.d.ts +5 -5
- package/build-types/components/post-pending-status/check.d.ts.map +1 -1
- package/build-types/components/post-pending-status/index.d.ts +2 -2
- package/build-types/components/post-pending-status/index.d.ts.map +1 -1
- package/build-types/components/post-preview-button/index.d.ts +2 -2
- package/build-types/components/post-preview-button/index.d.ts.map +1 -1
- package/build-types/components/post-publish-panel/index.d.ts.map +1 -1
- package/build-types/components/post-schedule/check.d.ts +5 -5
- package/build-types/components/post-schedule/check.d.ts.map +1 -1
- package/build-types/components/post-schedule/index.d.ts +2 -2
- package/build-types/components/post-schedule/index.d.ts.map +1 -1
- package/build-types/components/post-schedule/label.d.ts +2 -2
- package/build-types/components/post-schedule/label.d.ts.map +1 -1
- package/build-types/components/post-schedule/panel.d.ts +2 -2
- package/build-types/components/post-schedule/panel.d.ts.map +1 -1
- package/build-types/components/post-slug/check.d.ts +5 -5
- package/build-types/components/post-slug/check.d.ts.map +1 -1
- package/build-types/components/post-slug/index.d.ts +2 -2
- package/build-types/components/post-slug/index.d.ts.map +1 -1
- package/build-types/components/post-sticky/check.d.ts +5 -5
- package/build-types/components/post-sticky/check.d.ts.map +1 -1
- package/build-types/components/post-sticky/index.d.ts +2 -2
- package/build-types/components/post-sticky/index.d.ts.map +1 -1
- package/build-types/components/post-switch-to-draft-button/index.d.ts +2 -2
- package/build-types/components/post-switch-to-draft-button/index.d.ts.map +1 -1
- package/build-types/components/post-sync-status/index.d.ts +2 -2
- package/build-types/components/post-sync-status/index.d.ts.map +1 -1
- package/build-types/components/post-taxonomies/check.d.ts +5 -5
- package/build-types/components/post-taxonomies/check.d.ts.map +1 -1
- package/build-types/components/post-taxonomies/flat-term-selector.d.ts +2 -2
- package/build-types/components/post-taxonomies/flat-term-selector.d.ts.map +1 -1
- package/build-types/components/post-taxonomies/panel.d.ts +6 -2
- package/build-types/components/post-taxonomies/panel.d.ts.map +1 -1
- package/build-types/components/post-template/panel.d.ts +2 -2
- package/build-types/components/post-template/panel.d.ts.map +1 -1
- package/build-types/components/post-text-editor/index.d.ts +2 -2
- package/build-types/components/post-text-editor/index.d.ts.map +1 -1
- package/build-types/components/post-title/index.d.ts +1 -1
- package/build-types/components/post-trash/check.d.ts +5 -5
- package/build-types/components/post-trash/check.d.ts.map +1 -1
- package/build-types/components/post-trash/index.d.ts +2 -2
- package/build-types/components/post-trash/index.d.ts.map +1 -1
- package/build-types/components/post-type-support-check/index.d.ts +8 -8
- package/build-types/components/post-type-support-check/index.d.ts.map +1 -1
- package/build-types/components/post-url/check.d.ts +5 -5
- package/build-types/components/post-url/check.d.ts.map +1 -1
- package/build-types/components/post-url/index.d.ts +2 -2
- package/build-types/components/post-url/index.d.ts.map +1 -1
- package/build-types/components/post-url/label.d.ts +2 -2
- package/build-types/components/post-url/label.d.ts.map +1 -1
- package/build-types/components/post-url/panel.d.ts +2 -2
- package/build-types/components/post-url/panel.d.ts.map +1 -1
- package/build-types/components/post-visibility/check.d.ts +2 -2
- package/build-types/components/post-visibility/check.d.ts.map +1 -1
- package/build-types/components/post-visibility/index.d.ts +2 -2
- package/build-types/components/post-visibility/index.d.ts.map +1 -1
- package/build-types/components/preferences-modal/block-visibility.d.ts +2 -0
- package/build-types/components/preferences-modal/block-visibility.d.ts.map +1 -0
- package/build-types/components/preferences-modal/enable-panel.d.ts +1 -2
- package/build-types/components/preferences-modal/enable-panel.d.ts.map +1 -1
- package/build-types/components/preferences-modal/enable-plugin-document-setting-panel.d.ts.map +1 -1
- package/build-types/components/preferences-modal/enable-publish-sidebar.d.ts +1 -2
- package/build-types/components/preferences-modal/enable-publish-sidebar.d.ts.map +1 -1
- package/build-types/components/provider/index.d.ts +2 -2
- package/build-types/components/provider/index.d.ts.map +1 -1
- package/build-types/components/save-publish-panels/index.d.ts.map +1 -1
- package/build-types/components/theme-support-check/index.d.ts +6 -6
- package/build-types/components/theme-support-check/index.d.ts.map +1 -1
- package/build-types/components/time-to-read/index.d.ts +2 -2
- package/build-types/components/time-to-read/index.d.ts.map +1 -1
- package/build-types/components/unsaved-changes-warning/index.d.ts +2 -2
- package/build-types/components/unsaved-changes-warning/index.d.ts.map +1 -1
- package/build-types/components/word-count/index.d.ts +2 -2
- package/build-types/components/word-count/index.d.ts.map +1 -1
- package/build-types/components/zoom-out-toggle/index.d.ts.map +1 -1
- package/build-types/dataviews/api.d.ts +24 -0
- package/build-types/dataviews/api.d.ts.map +1 -1
- package/build-types/dataviews/store/private-actions.d.ts +14 -2
- package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
- package/build-types/dataviews/store/private-selectors.d.ts +1 -0
- package/build-types/dataviews/store/private-selectors.d.ts.map +1 -1
- package/build-types/dataviews/store/reducer.d.ts +10 -2
- package/build-types/dataviews/store/reducer.d.ts.map +1 -1
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/store/actions.d.ts +7 -5
- package/build-types/store/actions.d.ts.map +1 -1
- package/build-types/store/private-selectors.d.ts +1 -0
- package/build-types/store/private-selectors.d.ts.map +1 -1
- package/build-types/store/reducer.d.ts +5 -0
- package/build-types/store/reducer.d.ts.map +1 -1
- package/build-types/store/selectors.d.ts +4 -11
- package/build-types/store/selectors.d.ts.map +1 -1
- package/build-types/utils/get-template-info.d.ts +6 -0
- package/build-types/utils/get-template-info.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/components/block-settings-menu/plugin-block-settings-menu-item.js +1 -1
- package/src/components/collab-sidebar/add-comment.js +21 -78
- package/src/components/collab-sidebar/comment-author-info.js +68 -0
- package/src/components/collab-sidebar/comment-button-toolbar.js +3 -3
- package/src/components/collab-sidebar/comment-button.js +3 -3
- package/src/components/collab-sidebar/comment-form.js +62 -0
- package/src/components/collab-sidebar/comments.js +39 -101
- package/src/components/create-template-part-modal/index.js +3 -2
- package/src/components/document-bar/index.js +12 -3
- package/src/components/document-outline/check.js +4 -4
- package/src/components/document-outline/index.js +9 -9
- package/src/components/document-tools/index.js +3 -2
- package/src/components/editor-history/redo.js +1 -1
- package/src/components/editor-history/undo.js +1 -1
- package/src/components/editor-interface/content-slot-fill.js +4 -9
- package/src/components/editor-interface/index.js +1 -11
- package/src/components/editor-notices/index.js +1 -1
- package/src/components/editor-snackbars/index.js +1 -1
- package/src/components/entities-saved-states/entity-record-item.js +12 -4
- package/src/components/entities-saved-states/index.js +2 -2
- package/src/components/header/style.scss +2 -1
- package/src/components/page-attributes/check.js +3 -3
- package/src/components/page-attributes/order.js +1 -1
- package/src/components/page-attributes/panel.js +1 -1
- package/src/components/page-attributes/parent.js +1 -1
- package/src/components/plugin-document-setting-panel/index.js +2 -2
- package/src/components/plugin-more-menu-item/index.js +2 -1
- package/src/components/plugin-post-publish-panel/index.js +2 -2
- package/src/components/plugin-post-status-info/index.js +4 -4
- package/src/components/plugin-pre-publish-panel/index.js +2 -2
- package/src/components/plugin-preview-menu-item/index.js +2 -1
- package/src/components/plugin-sidebar/index.js +1 -0
- package/src/components/plugin-sidebar-more-menu-item/index.js +2 -2
- package/src/components/post-actions/actions.js +3 -3
- package/src/components/post-author/check.js +3 -3
- package/src/components/post-author/index.js +1 -1
- package/src/components/post-author/panel.js +1 -1
- package/src/components/post-card-panel/index.js +18 -5
- package/src/components/post-comments/index.js +1 -1
- package/src/components/post-discussion/panel.js +1 -1
- package/src/components/post-excerpt/check.js +3 -3
- package/src/components/post-excerpt/panel.js +1 -1
- package/src/components/post-excerpt/plugin.js +4 -4
- package/src/components/post-featured-image/check.js +3 -3
- package/src/components/post-featured-image/index.js +107 -43
- package/src/components/post-featured-image/panel.js +1 -1
- package/src/components/post-featured-image/style.scss +23 -13
- package/src/components/post-fields/index.ts +76 -0
- package/src/components/post-format/check.js +9 -11
- package/src/components/post-format/index.js +1 -1
- package/src/components/post-format/panel.js +1 -1
- package/src/components/post-last-revision/check.js +3 -3
- package/src/components/post-last-revision/index.js +1 -1
- package/src/components/post-last-revision/panel.js +1 -1
- package/src/components/post-locked-modal/index.js +1 -1
- package/src/components/post-pending-status/check.js +3 -3
- package/src/components/post-pending-status/index.js +1 -1
- package/src/components/post-preview-button/index.js +1 -1
- package/src/components/post-publish-panel/index.js +7 -3
- package/src/components/post-schedule/check.js +3 -3
- package/src/components/post-schedule/index.js +1 -1
- package/src/components/post-schedule/label.js +1 -1
- package/src/components/post-schedule/panel.js +1 -1
- package/src/components/post-slug/check.js +3 -3
- package/src/components/post-slug/index.js +1 -1
- package/src/components/post-sticky/check.js +3 -3
- package/src/components/post-sticky/index.js +1 -1
- package/src/components/post-switch-to-draft-button/index.js +1 -1
- package/src/components/post-sync-status/index.js +1 -1
- package/src/components/post-taxonomies/check.js +3 -3
- package/src/components/post-taxonomies/flat-term-selector.js +1 -1
- package/src/components/post-taxonomies/panel.js +15 -12
- package/src/components/post-template/classic-theme.js +2 -2
- package/src/components/post-template/panel.js +1 -1
- package/src/components/post-text-editor/index.js +1 -1
- package/src/components/post-title/index.js +20 -18
- package/src/components/post-title/post-title-raw.js +1 -1
- package/src/components/post-trash/check.js +3 -3
- package/src/components/post-trash/index.js +1 -1
- package/src/components/post-type-support-check/index.js +6 -6
- package/src/components/post-url/check.js +3 -3
- package/src/components/post-url/index.js +1 -1
- package/src/components/post-url/label.js +1 -1
- package/src/components/post-url/panel.js +1 -1
- package/src/components/post-visibility/check.js +1 -1
- package/src/components/post-visibility/index.js +1 -1
- package/src/components/preferences-modal/block-visibility.js +96 -0
- package/src/components/preferences-modal/enable-panel.js +27 -17
- package/src/components/preferences-modal/enable-publish-sidebar.js +18 -15
- package/src/components/preferences-modal/index.js +2 -2
- package/src/components/provider/index.js +55 -30
- package/src/components/table-of-contents/index.js +1 -1
- package/src/components/theme-support-check/index.js +4 -4
- package/src/components/time-to-read/index.js +1 -1
- package/src/components/unsaved-changes-warning/index.js +1 -1
- package/src/components/word-count/index.js +1 -1
- package/src/components/zoom-out-toggle/index.js +26 -13
- package/src/dataviews/api.js +41 -0
- package/src/dataviews/store/private-actions.ts +57 -3
- package/src/dataviews/store/private-selectors.ts +4 -0
- package/src/dataviews/store/reducer.ts +38 -1
- package/src/private-apis.js +4 -1
- package/src/store/actions.js +13 -9
- package/src/store/private-selectors.js +13 -8
- package/src/store/reducer.native.js +2 -0
- package/src/store/selectors.js +80 -62
- package/src/store/test/selectors.js +0 -255
- package/src/style.scss +0 -1
- package/src/utils/get-template-info.js +52 -0
- package/src/utils/test/get-template-info.js +224 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/components/block-manager/category.js +0 -107
- package/build/components/block-manager/category.js.map +0 -1
- package/build/components/block-manager/checklist.js +0 -35
- package/build/components/block-manager/checklist.js.map +0 -1
- package/build/components/block-manager/index.js +0 -115
- package/build/components/block-manager/index.js.map +0 -1
- package/build-module/components/block-manager/category.js +0 -99
- package/build-module/components/block-manager/category.js.map +0 -1
- package/build-module/components/block-manager/checklist.js +0 -28
- package/build-module/components/block-manager/checklist.js.map +0 -1
- package/build-module/components/block-manager/index.js +0 -107
- package/build-module/components/block-manager/index.js.map +0 -1
- package/build-types/components/block-manager/category.d.ts +0 -6
- package/build-types/components/block-manager/category.d.ts.map +0 -1
- package/build-types/components/block-manager/checklist.d.ts +0 -7
- package/build-types/components/block-manager/checklist.d.ts.map +0 -1
- package/build-types/components/block-manager/index.d.ts +0 -2
- package/build-types/components/block-manager/index.d.ts.map +0 -1
- package/src/components/block-manager/category.js +0 -96
- package/src/components/block-manager/checklist.js +0 -30
- package/src/components/block-manager/index.js +0 -145
- package/src/components/block-manager/style.scss +0 -82
|
@@ -16,11 +16,16 @@
|
|
|
16
16
|
&:hover,
|
|
17
17
|
&:focus,
|
|
18
18
|
&:focus-within {
|
|
19
|
-
.editor-post-featured-image__actions {
|
|
19
|
+
.editor-post-featured-image__actions:not(.editor-post-featured-image__actions-is-requesting-image) {
|
|
20
20
|
opacity: 1;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
.editor-post-featured-image__actions.editor-post-featured-image__actions-missing-image {
|
|
25
|
+
opacity: 1;
|
|
26
|
+
margin-top: $grid-unit-20;
|
|
27
|
+
}
|
|
28
|
+
|
|
24
29
|
.components-drop-zone__content {
|
|
25
30
|
border-radius: $radius-small;
|
|
26
31
|
}
|
|
@@ -72,17 +77,22 @@
|
|
|
72
77
|
}
|
|
73
78
|
|
|
74
79
|
.editor-post-featured-image__actions {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
&:not(.editor-post-featured-image__actions-missing-image) {
|
|
81
|
+
@include reduce-motion("transition");
|
|
82
|
+
bottom: 0;
|
|
83
|
+
opacity: 0; // Use opacity instead of visibility so that the buttons remain in the tab order.
|
|
84
|
+
padding: $grid-unit-10;
|
|
85
|
+
position: absolute;
|
|
86
|
+
transition: opacity 50ms ease-out;
|
|
82
87
|
|
|
83
|
-
.editor-post-featured-image__action {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
+
.editor-post-featured-image__action {
|
|
89
|
+
backdrop-filter: blur(16px) saturate(180%);
|
|
90
|
+
background: rgba(255, 255, 255, 0.75);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.editor-post-featured-image__action {
|
|
95
|
+
flex-grow: 1;
|
|
96
|
+
justify-content: center;
|
|
97
|
+
}
|
|
88
98
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { useEffect, useMemo } from '@wordpress/element';
|
|
5
|
+
import { useEntityRecords } from '@wordpress/core-data';
|
|
6
|
+
import { useDispatch, useSelect } from '@wordpress/data';
|
|
7
|
+
import type { Field } from '@wordpress/dataviews';
|
|
8
|
+
import type { BasePostWithEmbeddedAuthor } from '@wordpress/fields';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Internal dependencies
|
|
12
|
+
*/
|
|
13
|
+
import { unlock } from '../../lock-unlock';
|
|
14
|
+
import { store as editorStore } from '../../store';
|
|
15
|
+
|
|
16
|
+
interface UsePostFieldsReturn {
|
|
17
|
+
isLoading: boolean;
|
|
18
|
+
fields: Field< BasePostWithEmbeddedAuthor >[];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface Author {
|
|
22
|
+
id: number;
|
|
23
|
+
name: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function usePostFields(): UsePostFieldsReturn {
|
|
27
|
+
const postType = 'page'; // TODO: this could be page or post (experimental).
|
|
28
|
+
|
|
29
|
+
const { registerPostTypeSchema } = unlock( useDispatch( editorStore ) );
|
|
30
|
+
useEffect( () => {
|
|
31
|
+
registerPostTypeSchema( postType );
|
|
32
|
+
}, [ registerPostTypeSchema, postType ] );
|
|
33
|
+
|
|
34
|
+
const { defaultFields } = useSelect(
|
|
35
|
+
( select ) => {
|
|
36
|
+
const { getEntityFields } = unlock( select( editorStore ) );
|
|
37
|
+
return {
|
|
38
|
+
defaultFields: getEntityFields( 'postType', postType ),
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
[ postType ]
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
const { records: authors, isResolving: isLoadingAuthors } =
|
|
45
|
+
useEntityRecords< Author >( 'root', 'user', { per_page: -1 } );
|
|
46
|
+
|
|
47
|
+
const fields = useMemo(
|
|
48
|
+
() =>
|
|
49
|
+
defaultFields.map(
|
|
50
|
+
( field: Field< BasePostWithEmbeddedAuthor > ) => {
|
|
51
|
+
if ( field.id === 'author' ) {
|
|
52
|
+
return {
|
|
53
|
+
...field,
|
|
54
|
+
elements: authors?.map( ( { id, name } ) => ( {
|
|
55
|
+
value: id,
|
|
56
|
+
label: name,
|
|
57
|
+
} ) ),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return field;
|
|
62
|
+
}
|
|
63
|
+
) as Field< BasePostWithEmbeddedAuthor >[],
|
|
64
|
+
[ authors, defaultFields ]
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
isLoading: isLoadingAuthors,
|
|
69
|
+
fields,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Hook to get the fields for a post (BasePost or BasePostWithEmbeddedAuthor).
|
|
75
|
+
*/
|
|
76
|
+
export default usePostFields;
|
|
@@ -9,7 +9,15 @@ import { useSelect } from '@wordpress/data';
|
|
|
9
9
|
import PostTypeSupportCheck from '../post-type-support-check';
|
|
10
10
|
import { store as editorStore } from '../../store';
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Component check if there are any post formats.
|
|
14
|
+
*
|
|
15
|
+
* @param {Object} props The component props.
|
|
16
|
+
* @param {React.ReactNode} props.children The child elements to render.
|
|
17
|
+
*
|
|
18
|
+
* @return {React.ReactNode} The rendered component or null if post formats are disabled.
|
|
19
|
+
*/
|
|
20
|
+
export default function PostFormatCheck( { children } ) {
|
|
13
21
|
const disablePostFormats = useSelect(
|
|
14
22
|
( select ) =>
|
|
15
23
|
select( editorStore ).getEditorSettings().disablePostFormats,
|
|
@@ -26,13 +34,3 @@ function PostFormatCheck( { children } ) {
|
|
|
26
34
|
</PostTypeSupportCheck>
|
|
27
35
|
);
|
|
28
36
|
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Component check if there are any post formats.
|
|
32
|
-
*
|
|
33
|
-
* @param {Object} props The component props.
|
|
34
|
-
* @param {Element} props.children The child elements to render.
|
|
35
|
-
*
|
|
36
|
-
* @return {Component|null} The rendered component or null if post formats are disabled.
|
|
37
|
-
*/
|
|
38
|
-
export default PostFormatCheck;
|
|
@@ -46,7 +46,7 @@ export const POST_FORMATS = [
|
|
|
46
46
|
* <PostFormat />
|
|
47
47
|
* ```
|
|
48
48
|
*
|
|
49
|
-
* @return {
|
|
49
|
+
* @return {React.ReactNode} The rendered PostFormat component.
|
|
50
50
|
*/
|
|
51
51
|
export default function PostFormat() {
|
|
52
52
|
const instanceId = useInstanceId( PostFormat );
|
|
@@ -18,7 +18,7 @@ import { store as editorStore } from '../../store';
|
|
|
18
18
|
/**
|
|
19
19
|
* Renders the Post Author Panel component.
|
|
20
20
|
*
|
|
21
|
-
* @return {
|
|
21
|
+
* @return {React.ReactNode} The rendered component.
|
|
22
22
|
*/
|
|
23
23
|
function PostFormat() {
|
|
24
24
|
const { postFormat } = useSelect( ( select ) => {
|
|
@@ -12,10 +12,10 @@ import { store as editorStore } from '../../store';
|
|
|
12
12
|
/**
|
|
13
13
|
* Wrapper component that renders its children if the post has more than one revision.
|
|
14
14
|
*
|
|
15
|
-
* @param {Object}
|
|
16
|
-
* @param {
|
|
15
|
+
* @param {Object} props Props.
|
|
16
|
+
* @param {React.ReactNode} props.children Children to be rendered.
|
|
17
17
|
*
|
|
18
|
-
* @return {
|
|
18
|
+
* @return {React.ReactNode} Rendered child components if post has more than one revision, otherwise null.
|
|
19
19
|
*/
|
|
20
20
|
function PostLastRevisionCheck( { children } ) {
|
|
21
21
|
const { lastRevisionId, revisionsCount } = useSelect( ( select ) => {
|
|
@@ -28,7 +28,7 @@ function usePostLastRevisionInfo() {
|
|
|
28
28
|
/**
|
|
29
29
|
* Renders the component for displaying the last revision of a post.
|
|
30
30
|
*
|
|
31
|
-
* @return {
|
|
31
|
+
* @return {React.ReactNode} The rendered component.
|
|
32
32
|
*/
|
|
33
33
|
function PostLastRevision() {
|
|
34
34
|
const { lastRevisionId, revisionsCount } = usePostLastRevisionInfo();
|
|
@@ -12,7 +12,7 @@ import PostLastRevisionCheck from './check';
|
|
|
12
12
|
/**
|
|
13
13
|
* Renders the panel for displaying the last revision of a post.
|
|
14
14
|
*
|
|
15
|
-
* @return {
|
|
15
|
+
* @return {React.ReactNode} The rendered component.
|
|
16
16
|
*/
|
|
17
17
|
function PostLastRevisionPanel() {
|
|
18
18
|
return (
|
|
@@ -24,7 +24,7 @@ import { store as editorStore } from '../../store';
|
|
|
24
24
|
* A modal component that is displayed when a post is locked for editing by another user.
|
|
25
25
|
* The modal provides information about the lock status and options to take over or exit the editor.
|
|
26
26
|
*
|
|
27
|
-
* @return {
|
|
27
|
+
* @return {React.ReactNode} The rendered PostLockedModal component.
|
|
28
28
|
*/
|
|
29
29
|
export default function PostLockedModal() {
|
|
30
30
|
const instanceId = useInstanceId( PostLockedModal );
|
|
@@ -13,10 +13,10 @@ import { store as editorStore } from '../../store';
|
|
|
13
13
|
* If the post is already published or the user doesn't have the
|
|
14
14
|
* capability to publish, it returns null.
|
|
15
15
|
*
|
|
16
|
-
* @param {Object}
|
|
17
|
-
* @param {
|
|
16
|
+
* @param {Object} props Component properties.
|
|
17
|
+
* @param {React.ReactElement} props.children Children to be rendered.
|
|
18
18
|
*
|
|
19
|
-
* @return {
|
|
19
|
+
* @return {React.ReactElement} The rendered child elements or null if the post is already published or the user doesn't have the capability to publish.
|
|
20
20
|
*/
|
|
21
21
|
export function PostPendingStatusCheck( { children } ) {
|
|
22
22
|
const { hasPublishAction, isPublished } = useSelect( ( select ) => {
|
|
@@ -14,7 +14,7 @@ import { store as editorStore } from '../../store';
|
|
|
14
14
|
/**
|
|
15
15
|
* A component for displaying and toggling the pending status of a post.
|
|
16
16
|
*
|
|
17
|
-
* @return {
|
|
17
|
+
* @return {React.ReactNode} The rendered component.
|
|
18
18
|
*/
|
|
19
19
|
export function PostPendingStatus() {
|
|
20
20
|
const status = useSelect(
|
|
@@ -112,7 +112,7 @@ function writeInterstitialMessage( targetDocument ) {
|
|
|
112
112
|
* @param {string} props.role The role attribute for the button.
|
|
113
113
|
* @param {Function} props.onPreview The callback function for preview event.
|
|
114
114
|
*
|
|
115
|
-
* @return {
|
|
115
|
+
* @return {React.ReactNode} The rendered button component.
|
|
116
116
|
*/
|
|
117
117
|
export default function PostPreviewButton( {
|
|
118
118
|
className,
|
|
@@ -47,9 +47,10 @@ export class PostPublishPanel extends Component {
|
|
|
47
47
|
// Automatically collapse the publish sidebar when a post
|
|
48
48
|
// is published and the user makes an edit.
|
|
49
49
|
if (
|
|
50
|
-
prevProps.isPublished &&
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
( prevProps.isPublished &&
|
|
51
|
+
! this.props.isSaving &&
|
|
52
|
+
this.props.isDirty ) ||
|
|
53
|
+
this.props.currentPostId !== prevProps.currentPostId
|
|
53
54
|
) {
|
|
54
55
|
this.props.onClose();
|
|
55
56
|
}
|
|
@@ -75,6 +76,7 @@ export class PostPublishPanel extends Component {
|
|
|
75
76
|
onTogglePublishSidebar,
|
|
76
77
|
PostPublishExtension,
|
|
77
78
|
PrePublishExtension,
|
|
79
|
+
currentPostId,
|
|
78
80
|
...additionalProps
|
|
79
81
|
} = this.props;
|
|
80
82
|
const {
|
|
@@ -154,6 +156,7 @@ export default compose( [
|
|
|
154
156
|
const { getPostType } = select( coreStore );
|
|
155
157
|
const {
|
|
156
158
|
getCurrentPost,
|
|
159
|
+
getCurrentPostId,
|
|
157
160
|
getEditedPostAttribute,
|
|
158
161
|
isCurrentPostPublished,
|
|
159
162
|
isCurrentPostScheduled,
|
|
@@ -177,6 +180,7 @@ export default compose( [
|
|
|
177
180
|
isSaving: isSavingPost() && ! isAutosavingPost(),
|
|
178
181
|
isSavingNonPostEntityChanges: isSavingNonPostEntityChanges(),
|
|
179
182
|
isScheduled: isCurrentPostScheduled(),
|
|
183
|
+
currentPostId: getCurrentPostId(),
|
|
180
184
|
};
|
|
181
185
|
} ),
|
|
182
186
|
withDispatch( ( dispatch, { isPublishSidebarEnabled } ) => {
|
|
@@ -11,10 +11,10 @@ import { store as editorStore } from '../../store';
|
|
|
11
11
|
/**
|
|
12
12
|
* Wrapper component that renders its children only if post has a publish action.
|
|
13
13
|
*
|
|
14
|
-
* @param {Object}
|
|
15
|
-
* @param {
|
|
14
|
+
* @param {Object} props Props.
|
|
15
|
+
* @param {React.ReactElement} props.children Children to be rendered.
|
|
16
16
|
*
|
|
17
|
-
* @return {
|
|
17
|
+
* @return {React.ReactElement} - The component to be rendered or null if there is no publish action.
|
|
18
18
|
*/
|
|
19
19
|
export default function PostScheduleCheck( { children } ) {
|
|
20
20
|
const hasPublishAction = useSelect( ( select ) => {
|
|
@@ -27,7 +27,7 @@ const { PrivatePublishDateTimePicker } = unlock( blockEditorPrivateApis );
|
|
|
27
27
|
* @param {Object} props Props.
|
|
28
28
|
* @param {Function} props.onClose Function to close the component.
|
|
29
29
|
*
|
|
30
|
-
* @return {
|
|
30
|
+
* @return {React.ReactNode} The rendered component.
|
|
31
31
|
*/
|
|
32
32
|
export default function PostSchedule( props ) {
|
|
33
33
|
return (
|
|
@@ -15,7 +15,7 @@ import { store as editorStore } from '../../store';
|
|
|
15
15
|
*
|
|
16
16
|
* @param {Object} props Props.
|
|
17
17
|
*
|
|
18
|
-
* @return {
|
|
18
|
+
* @return {React.ReactNode} The rendered component.
|
|
19
19
|
*/
|
|
20
20
|
export default function PostScheduleLabel( props ) {
|
|
21
21
|
return usePostScheduleLabel( props );
|
|
@@ -31,7 +31,7 @@ const DESIGN_POST_TYPES = [
|
|
|
31
31
|
/**
|
|
32
32
|
* Renders the Post Schedule Panel component.
|
|
33
33
|
*
|
|
34
|
-
* @return {
|
|
34
|
+
* @return {React.ReactNode} The rendered component.
|
|
35
35
|
*/
|
|
36
36
|
export default function PostSchedulePanel() {
|
|
37
37
|
const [ popoverAnchor, setPopoverAnchor ] = useState( null );
|
|
@@ -6,10 +6,10 @@ import PostTypeSupportCheck from '../post-type-support-check';
|
|
|
6
6
|
/**
|
|
7
7
|
* Wrapper component that renders its children only if the post type supports the slug.
|
|
8
8
|
*
|
|
9
|
-
* @param {Object}
|
|
10
|
-
* @param {
|
|
9
|
+
* @param {Object} props Props.
|
|
10
|
+
* @param {React.ReactNode} props.children Children to be rendered.
|
|
11
11
|
*
|
|
12
|
-
* @return {
|
|
12
|
+
* @return {React.ReactNode} The rendered component.
|
|
13
13
|
*/
|
|
14
14
|
export default function PostSlugCheck( { children } ) {
|
|
15
15
|
return (
|
|
@@ -62,7 +62,7 @@ function PostSlugControl() {
|
|
|
62
62
|
/**
|
|
63
63
|
* Renders the PostSlug component. It provide a control for editing the post slug.
|
|
64
64
|
*
|
|
65
|
-
* @return {
|
|
65
|
+
* @return {React.ReactNode} The rendered component.
|
|
66
66
|
*/
|
|
67
67
|
export default function PostSlug() {
|
|
68
68
|
return (
|
|
@@ -11,10 +11,10 @@ import { store as editorStore } from '../../store';
|
|
|
11
11
|
/**
|
|
12
12
|
* Wrapper component that renders its children only if post has a sticky action.
|
|
13
13
|
*
|
|
14
|
-
* @param {Object}
|
|
15
|
-
* @param {
|
|
14
|
+
* @param {Object} props Props.
|
|
15
|
+
* @param {React.ReactElement} props.children Children to be rendered.
|
|
16
16
|
*
|
|
17
|
-
* @return {
|
|
17
|
+
* @return {React.ReactElement} The component to be rendered or null if post type is not 'post' or hasStickyAction is false.
|
|
18
18
|
*/
|
|
19
19
|
export default function PostStickyCheck( { children } ) {
|
|
20
20
|
const { hasStickyAction, postType } = useSelect( ( select ) => {
|
|
@@ -14,7 +14,7 @@ import { store as editorStore } from '../../store';
|
|
|
14
14
|
/**
|
|
15
15
|
* Renders the PostSticky component. It provides a checkbox control for the sticky post feature.
|
|
16
16
|
*
|
|
17
|
-
* @return {
|
|
17
|
+
* @return {React.ReactNode} The rendered component.
|
|
18
18
|
*/
|
|
19
19
|
export default function PostSticky() {
|
|
20
20
|
const postSticky = useSelect( ( select ) => {
|
|
@@ -18,7 +18,7 @@ import { store as editorStore } from '../../store';
|
|
|
18
18
|
/**
|
|
19
19
|
* Renders a button component that allows the user to switch a post to draft status.
|
|
20
20
|
*
|
|
21
|
-
* @return {
|
|
21
|
+
* @return {React.ReactNode} The rendered component.
|
|
22
22
|
*/
|
|
23
23
|
export default function PostSwitchToDraftButton() {
|
|
24
24
|
deprecated( 'wp.editor.PostSwitchToDraftButton', {
|
|
@@ -13,7 +13,7 @@ import { store as editorStore } from '../../store';
|
|
|
13
13
|
/**
|
|
14
14
|
* Renders the sync status of a post.
|
|
15
15
|
*
|
|
16
|
-
* @return {
|
|
16
|
+
* @return {React.ReactNode} The rendered sync status component.
|
|
17
17
|
*/
|
|
18
18
|
export default function PostSyncStatus() {
|
|
19
19
|
const { syncStatus, postType } = useSelect( ( select ) => {
|
|
@@ -12,10 +12,10 @@ import { store as editorStore } from '../../store';
|
|
|
12
12
|
/**
|
|
13
13
|
* Renders the children components only if the current post type has taxonomies.
|
|
14
14
|
*
|
|
15
|
-
* @param {Object}
|
|
16
|
-
* @param {
|
|
15
|
+
* @param {Object} props The component props.
|
|
16
|
+
* @param {React.ReactNode} props.children The children components to render.
|
|
17
17
|
*
|
|
18
|
-
* @return {
|
|
18
|
+
* @return {React.ReactElement} The rendered children components or null if the current post type has no taxonomies.
|
|
19
19
|
*/
|
|
20
20
|
export default function PostTaxonomiesCheck( { children } ) {
|
|
21
21
|
const hasTaxonomies = useSelect( ( select ) => {
|
|
@@ -71,7 +71,7 @@ const Wrapper = ( { children, __nextHasNoMarginBottom } ) =>
|
|
|
71
71
|
* @param {string} props.slug The slug of the taxonomy.
|
|
72
72
|
* @param {boolean} props.__nextHasNoMarginBottom Start opting into the new margin-free styles that will become the default in a future version, currently scheduled to be WordPress 7.0. (The prop can be safely removed once this happens.)
|
|
73
73
|
*
|
|
74
|
-
* @return {
|
|
74
|
+
* @return {React.ReactNode} The rendered flat term selector component.
|
|
75
75
|
*/
|
|
76
76
|
export function FlatTermSelector( { slug, __nextHasNoMarginBottom } ) {
|
|
77
77
|
const [ values, setValues ] = useState( [] );
|
|
@@ -11,6 +11,15 @@ import { store as editorStore } from '../../store';
|
|
|
11
11
|
import PostTaxonomiesForm from './index';
|
|
12
12
|
import PostTaxonomiesCheck from './check';
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Renders a panel for a specific taxonomy.
|
|
16
|
+
*
|
|
17
|
+
* @param {Object} props The component props.
|
|
18
|
+
* @param {Object} props.taxonomy The taxonomy object.
|
|
19
|
+
* @param {React.ReactNode} props.children The child components.
|
|
20
|
+
*
|
|
21
|
+
* @return {React.ReactNode} The rendered taxonomy panel.
|
|
22
|
+
*/
|
|
14
23
|
function TaxonomyPanel( { taxonomy, children } ) {
|
|
15
24
|
const slug = taxonomy?.slug;
|
|
16
25
|
const panelName = slug ? `taxonomy-panel-${ slug }` : '';
|
|
@@ -47,7 +56,12 @@ function TaxonomyPanel( { taxonomy, children } ) {
|
|
|
47
56
|
);
|
|
48
57
|
}
|
|
49
58
|
|
|
50
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Component that renders the post taxonomies panel.
|
|
61
|
+
*
|
|
62
|
+
* @return {React.ReactNode} The rendered component.
|
|
63
|
+
*/
|
|
64
|
+
export default function PostTaxonomies() {
|
|
51
65
|
return (
|
|
52
66
|
<PostTaxonomiesCheck>
|
|
53
67
|
<PostTaxonomiesForm
|
|
@@ -62,14 +76,3 @@ function PostTaxonomies() {
|
|
|
62
76
|
</PostTaxonomiesCheck>
|
|
63
77
|
);
|
|
64
78
|
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Renders a panel for a specific taxonomy.
|
|
68
|
-
*
|
|
69
|
-
* @param {Object} props The component props.
|
|
70
|
-
* @param {Object} props.taxonomy The taxonomy object.
|
|
71
|
-
* @param {Element} props.children The child components.
|
|
72
|
-
*
|
|
73
|
-
* @return {Component} The rendered taxonomy panel.
|
|
74
|
-
*/
|
|
75
|
-
export default PostTaxonomies;
|
|
@@ -63,7 +63,7 @@ function PostTemplateToggle( { isOpen, onClick } ) {
|
|
|
63
63
|
* @param {Object} props The component props.
|
|
64
64
|
* @param {Function} props.onClose The function to close the dropdown.
|
|
65
65
|
*
|
|
66
|
-
* @return {
|
|
66
|
+
* @return {React.ReactNode} The rendered dropdown content.
|
|
67
67
|
*/
|
|
68
68
|
function PostTemplateDropdownContent( { onClose } ) {
|
|
69
69
|
const allowSwitchingTemplate = useAllowSwitchingTemplates();
|
|
@@ -235,6 +235,6 @@ function ClassicThemeControl() {
|
|
|
235
235
|
*
|
|
236
236
|
* The dropdown menu includes a button for toggling the menu, a list of available templates, and options for creating and editing templates.
|
|
237
237
|
*
|
|
238
|
-
* @return {
|
|
238
|
+
* @return {React.ReactNode} The rendered ClassicThemeControl component.
|
|
239
239
|
*/
|
|
240
240
|
export default ClassicThemeControl;
|
|
@@ -16,7 +16,7 @@ import PostPanelRow from '../post-panel-row';
|
|
|
16
16
|
/**
|
|
17
17
|
* Displays the template controls based on the current editor settings and user permissions.
|
|
18
18
|
*
|
|
19
|
-
* @return {
|
|
19
|
+
* @return {React.ReactNode} The rendered PostTemplatePanel component.
|
|
20
20
|
*/
|
|
21
21
|
export default function PostTemplatePanel() {
|
|
22
22
|
const { templateId, isBlockTheme } = useSelect( ( select ) => {
|
|
@@ -22,7 +22,7 @@ import { store as editorStore } from '../../store';
|
|
|
22
22
|
/**
|
|
23
23
|
* Displays the Post Text Editor along with content in Visual and Text mode.
|
|
24
24
|
*
|
|
25
|
-
* @return {
|
|
25
|
+
* @return {React.ReactNode} The rendered PostTextEditor component.
|
|
26
26
|
*/
|
|
27
27
|
export default function PostTextEditor() {
|
|
28
28
|
const instanceId = useInstanceId( PostTextEditor );
|
|
@@ -28,7 +28,7 @@ import usePostTitleFocus from './use-post-title-focus';
|
|
|
28
28
|
import usePostTitle from './use-post-title';
|
|
29
29
|
import PostTypeSupportCheck from '../post-type-support-check';
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
const PostTitle = forwardRef( ( _, forwardedRef ) => {
|
|
32
32
|
const { placeholder } = useSelect( ( select ) => {
|
|
33
33
|
const { getSettings } = select( blockEditorStore );
|
|
34
34
|
const { titlePlaceholder } = getSettings();
|
|
@@ -171,23 +171,21 @@ function PostTitle( _, forwardedRef ) {
|
|
|
171
171
|
|
|
172
172
|
return (
|
|
173
173
|
/* eslint-disable jsx-a11y/heading-has-content, jsx-a11y/no-noninteractive-element-to-interactive-role */
|
|
174
|
-
<
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
/>
|
|
187
|
-
</PostTypeSupportCheck>
|
|
174
|
+
<h1
|
|
175
|
+
ref={ useMergeRefs( [ richTextRef, focusRef ] ) }
|
|
176
|
+
contentEditable
|
|
177
|
+
className={ className }
|
|
178
|
+
aria-label={ decodedPlaceholder }
|
|
179
|
+
role="textbox"
|
|
180
|
+
aria-multiline="true"
|
|
181
|
+
onFocus={ onSelect }
|
|
182
|
+
onBlur={ onUnselect }
|
|
183
|
+
onKeyDown={ onKeyDown }
|
|
184
|
+
onPaste={ onPaste }
|
|
185
|
+
/>
|
|
188
186
|
/* eslint-enable jsx-a11y/heading-has-content, jsx-a11y/no-noninteractive-element-to-interactive-role */
|
|
189
187
|
);
|
|
190
|
-
}
|
|
188
|
+
} );
|
|
191
189
|
|
|
192
190
|
/**
|
|
193
191
|
* Renders the `PostTitle` component.
|
|
@@ -195,6 +193,10 @@ function PostTitle( _, forwardedRef ) {
|
|
|
195
193
|
* @param {Object} _ Unused parameter.
|
|
196
194
|
* @param {Element} forwardedRef Forwarded ref for the component.
|
|
197
195
|
*
|
|
198
|
-
* @return {
|
|
196
|
+
* @return {React.ReactNode} The rendered PostTitle component.
|
|
199
197
|
*/
|
|
200
|
-
export default forwardRef(
|
|
198
|
+
export default forwardRef( ( _, forwardedRef ) => (
|
|
199
|
+
<PostTypeSupportCheck supportKeys="title">
|
|
200
|
+
<PostTitle ref={ forwardedRef } />
|
|
201
|
+
</PostTypeSupportCheck>
|
|
202
|
+
) );
|
|
@@ -26,7 +26,7 @@ import usePostTitle from './use-post-title';
|
|
|
26
26
|
* @param {Object} _ Unused parameter.
|
|
27
27
|
* @param {Element} forwardedRef Reference to the component's DOM node.
|
|
28
28
|
*
|
|
29
|
-
* @return {
|
|
29
|
+
* @return {React.ReactNode} The rendered component.
|
|
30
30
|
*/
|
|
31
31
|
function PostTitleRaw( _, forwardedRef ) {
|
|
32
32
|
const { placeholder } = useSelect( ( select ) => {
|
|
@@ -13,10 +13,10 @@ import { GLOBAL_POST_TYPES } from '../../store/constants';
|
|
|
13
13
|
/**
|
|
14
14
|
* Wrapper component that renders its children only if the post can trashed.
|
|
15
15
|
*
|
|
16
|
-
* @param {Object}
|
|
17
|
-
* @param {
|
|
16
|
+
* @param {Object} props - The component props.
|
|
17
|
+
* @param {React.ReactEl} props.children - The child components to render.
|
|
18
18
|
*
|
|
19
|
-
* @return {
|
|
19
|
+
* @return {React.ReactElement} The rendered child components or null if the post can not trashed.
|
|
20
20
|
*/
|
|
21
21
|
export default function PostTrashCheck( { children } ) {
|
|
22
22
|
const { canTrashPost } = useSelect( ( select ) => {
|
|
@@ -19,7 +19,7 @@ import PostTrashCheck from './check';
|
|
|
19
19
|
* Displays the Post Trash Button and Confirm Dialog in the Editor.
|
|
20
20
|
*
|
|
21
21
|
* @param {?{onActionPerformed: Object}} An object containing the onActionPerformed function.
|
|
22
|
-
* @return {
|
|
22
|
+
* @return {React.ReactNode} The rendered PostTrash component.
|
|
23
23
|
*/
|
|
24
24
|
export default function PostTrash( { onActionPerformed } ) {
|
|
25
25
|
const registry = useRegistry();
|
|
@@ -13,13 +13,13 @@ import { store as editorStore } from '../../store';
|
|
|
13
13
|
* A component which renders its own children only if the current editor post
|
|
14
14
|
* type supports one of the given `supportKeys` prop.
|
|
15
15
|
*
|
|
16
|
-
* @param {Object}
|
|
17
|
-
* @param {
|
|
18
|
-
*
|
|
19
|
-
* @param {(string|string[])}
|
|
20
|
-
*
|
|
16
|
+
* @param {Object} props Props.
|
|
17
|
+
* @param {React.ReactElement} props.children Children to be rendered if post
|
|
18
|
+
* type supports.
|
|
19
|
+
* @param {(string|string[])} props.supportKeys String or string array of keys
|
|
20
|
+
* to test.
|
|
21
21
|
*
|
|
22
|
-
* @return {
|
|
22
|
+
* @return {React.ReactElement} The component to be rendered.
|
|
23
23
|
*/
|
|
24
24
|
function PostTypeSupportCheck( { children, supportKeys } ) {
|
|
25
25
|
const postType = useSelect( ( select ) => {
|