@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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { store as coreStore } from '@wordpress/core-data';
|
|
5
|
-
import type { Action } from '@wordpress/dataviews';
|
|
5
|
+
import type { Action, Field } from '@wordpress/dataviews';
|
|
6
6
|
import { doAction } from '@wordpress/hooks';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -24,6 +24,15 @@ import {
|
|
|
24
24
|
renamePost,
|
|
25
25
|
resetPost,
|
|
26
26
|
deletePost,
|
|
27
|
+
featuredImageField,
|
|
28
|
+
dateField,
|
|
29
|
+
parentField,
|
|
30
|
+
passwordField,
|
|
31
|
+
commentStatusField,
|
|
32
|
+
slugField,
|
|
33
|
+
statusField,
|
|
34
|
+
authorField,
|
|
35
|
+
titleField,
|
|
27
36
|
} from '@wordpress/fields';
|
|
28
37
|
import duplicateTemplatePart from '../actions/duplicate-template-part';
|
|
29
38
|
|
|
@@ -53,6 +62,32 @@ export function unregisterEntityAction(
|
|
|
53
62
|
};
|
|
54
63
|
}
|
|
55
64
|
|
|
65
|
+
export function registerEntityField< Item >(
|
|
66
|
+
kind: string,
|
|
67
|
+
name: string,
|
|
68
|
+
config: Field< Item >
|
|
69
|
+
) {
|
|
70
|
+
return {
|
|
71
|
+
type: 'REGISTER_ENTITY_FIELD' as const,
|
|
72
|
+
kind,
|
|
73
|
+
name,
|
|
74
|
+
config,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function unregisterEntityField(
|
|
79
|
+
kind: string,
|
|
80
|
+
name: string,
|
|
81
|
+
fieldId: string
|
|
82
|
+
) {
|
|
83
|
+
return {
|
|
84
|
+
type: 'UNREGISTER_ENTITY_FIELD' as const,
|
|
85
|
+
kind,
|
|
86
|
+
name,
|
|
87
|
+
fieldId,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
56
91
|
export function setIsReady( kind: string, name: string ) {
|
|
57
92
|
return {
|
|
58
93
|
type: 'SET_IS_READY' as const,
|
|
@@ -61,7 +96,7 @@ export function setIsReady( kind: string, name: string ) {
|
|
|
61
96
|
};
|
|
62
97
|
}
|
|
63
98
|
|
|
64
|
-
export const
|
|
99
|
+
export const registerPostTypeSchema =
|
|
65
100
|
( postType: string ) =>
|
|
66
101
|
async ( { registry }: { registry: any } ) => {
|
|
67
102
|
const isReady = unlock( registry.select( editorStore ) ).isEntityReady(
|
|
@@ -124,6 +159,18 @@ export const registerPostTypeActions =
|
|
|
124
159
|
permanentlyDeletePost,
|
|
125
160
|
];
|
|
126
161
|
|
|
162
|
+
const fields = [
|
|
163
|
+
featuredImageField,
|
|
164
|
+
titleField,
|
|
165
|
+
authorField,
|
|
166
|
+
statusField,
|
|
167
|
+
dateField,
|
|
168
|
+
slugField,
|
|
169
|
+
parentField,
|
|
170
|
+
commentStatusField,
|
|
171
|
+
passwordField,
|
|
172
|
+
];
|
|
173
|
+
|
|
127
174
|
registry.batch( () => {
|
|
128
175
|
actions.forEach( ( action ) => {
|
|
129
176
|
if ( ! action ) {
|
|
@@ -135,7 +182,14 @@ export const registerPostTypeActions =
|
|
|
135
182
|
action
|
|
136
183
|
);
|
|
137
184
|
} );
|
|
185
|
+
fields.forEach( ( field ) => {
|
|
186
|
+
unlock( registry.dispatch( editorStore ) ).registerEntityField(
|
|
187
|
+
'postType',
|
|
188
|
+
postType,
|
|
189
|
+
field
|
|
190
|
+
);
|
|
191
|
+
} );
|
|
138
192
|
} );
|
|
139
193
|
|
|
140
|
-
doAction( 'core.
|
|
194
|
+
doAction( 'core.registerPostTypeSchema', postType );
|
|
141
195
|
};
|
|
@@ -9,6 +9,10 @@ export function getEntityActions( state: State, kind: string, name: string ) {
|
|
|
9
9
|
return state.actions[ kind ]?.[ name ] ?? EMPTY_ARRAY;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
export function getEntityFields( state: State, kind: string, name: string ) {
|
|
13
|
+
return state.fields[ kind ]?.[ name ] ?? EMPTY_ARRAY;
|
|
14
|
+
}
|
|
15
|
+
|
|
12
16
|
export function isEntityReady( state: State, kind: string, name: string ) {
|
|
13
17
|
return state.isReady[ kind ]?.[ name ];
|
|
14
18
|
}
|
|
@@ -2,17 +2,21 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { combineReducers } from '@wordpress/data';
|
|
5
|
-
import type { Action } from '@wordpress/dataviews';
|
|
5
|
+
import type { Action, Field } from '@wordpress/dataviews';
|
|
6
6
|
|
|
7
7
|
type ReduxAction =
|
|
8
8
|
| ReturnType< typeof import('./private-actions').registerEntityAction >
|
|
9
9
|
| ReturnType< typeof import('./private-actions').unregisterEntityAction >
|
|
10
|
+
| ReturnType< typeof import('./private-actions').registerEntityField >
|
|
11
|
+
| ReturnType< typeof import('./private-actions').unregisterEntityField >
|
|
10
12
|
| ReturnType< typeof import('./private-actions').setIsReady >;
|
|
11
13
|
|
|
12
14
|
export type ActionState = Record< string, Record< string, Action< any >[] > >;
|
|
15
|
+
export type FieldsState = Record< string, Record< string, Field< any >[] > >;
|
|
13
16
|
export type ReadyState = Record< string, Record< string, boolean > >;
|
|
14
17
|
export type State = {
|
|
15
18
|
actions: ActionState;
|
|
19
|
+
fields: FieldsState;
|
|
16
20
|
isReady: ReadyState;
|
|
17
21
|
};
|
|
18
22
|
|
|
@@ -64,7 +68,40 @@ function actions( state: ActionState = {}, action: ReduxAction ) {
|
|
|
64
68
|
return state;
|
|
65
69
|
}
|
|
66
70
|
|
|
71
|
+
function fields( state: FieldsState = {}, action: ReduxAction ) {
|
|
72
|
+
switch ( action.type ) {
|
|
73
|
+
case 'REGISTER_ENTITY_FIELD':
|
|
74
|
+
return {
|
|
75
|
+
...state,
|
|
76
|
+
[ action.kind ]: {
|
|
77
|
+
...state[ action.kind ],
|
|
78
|
+
[ action.name ]: [
|
|
79
|
+
...(
|
|
80
|
+
state[ action.kind ]?.[ action.name ] ?? []
|
|
81
|
+
).filter(
|
|
82
|
+
( _field ) => _field.id !== action.config.id
|
|
83
|
+
),
|
|
84
|
+
action.config,
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
case 'UNREGISTER_ENTITY_FIELD':
|
|
89
|
+
return {
|
|
90
|
+
...state,
|
|
91
|
+
[ action.kind ]: {
|
|
92
|
+
...state[ action.kind ],
|
|
93
|
+
[ action.name ]: (
|
|
94
|
+
state[ action.kind ]?.[ action.name ] ?? []
|
|
95
|
+
).filter( ( _field ) => _field.id !== action.fieldId ),
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return state;
|
|
101
|
+
}
|
|
102
|
+
|
|
67
103
|
export default combineReducers( {
|
|
68
104
|
actions,
|
|
105
|
+
fields,
|
|
69
106
|
isReady,
|
|
70
107
|
} );
|
package/src/private-apis.js
CHANGED
|
@@ -16,6 +16,7 @@ import PluginPostExcerpt from './components/post-excerpt/plugin';
|
|
|
16
16
|
import PostCardPanel from './components/post-card-panel';
|
|
17
17
|
import PreferencesModal from './components/preferences-modal';
|
|
18
18
|
import { usePostActions } from './components/post-actions/actions';
|
|
19
|
+
import usePostFields from './components/post-fields';
|
|
19
20
|
import ToolsMoreMenuGroup from './components/more-menu/tools-more-menu-group';
|
|
20
21
|
import ViewMoreMenuGroup from './components/more-menu/view-more-menu-group';
|
|
21
22
|
import ResizableEditor from './components/resizable-editor';
|
|
@@ -24,6 +25,7 @@ import {
|
|
|
24
25
|
GlobalStylesProvider,
|
|
25
26
|
} from './components/global-styles-provider';
|
|
26
27
|
import { registerCoreBlockBindingsSources } from './bindings/api';
|
|
28
|
+
import { getTemplateInfo } from './utils/get-template-info';
|
|
27
29
|
|
|
28
30
|
const { store: interfaceStore, ...remainingInterfaceApis } = interfaceApis;
|
|
29
31
|
|
|
@@ -40,11 +42,12 @@ lock( privateApis, {
|
|
|
40
42
|
PostCardPanel,
|
|
41
43
|
PreferencesModal,
|
|
42
44
|
usePostActions,
|
|
45
|
+
usePostFields,
|
|
43
46
|
ToolsMoreMenuGroup,
|
|
44
47
|
ViewMoreMenuGroup,
|
|
45
48
|
ResizableEditor,
|
|
46
49
|
registerCoreBlockBindingsSources,
|
|
47
|
-
|
|
50
|
+
getTemplateInfo,
|
|
48
51
|
// This is a temporary private API while we're updating the site editor to use EditorProvider.
|
|
49
52
|
interfaceStore,
|
|
50
53
|
...remainingInterfaceApis,
|
package/src/store/actions.js
CHANGED
|
@@ -35,9 +35,9 @@ import { unlock } from '../lock-unlock';
|
|
|
35
35
|
* Returns an action generator used in signalling that editor has initialized with
|
|
36
36
|
* the specified post object and editor settings.
|
|
37
37
|
*
|
|
38
|
-
* @param {Object} post
|
|
39
|
-
* @param {Object} edits
|
|
40
|
-
* @param {Array
|
|
38
|
+
* @param {Object} post Post object.
|
|
39
|
+
* @param {Object} edits Initial edited attributes object.
|
|
40
|
+
* @param {Array} [template] Block Template.
|
|
41
41
|
*/
|
|
42
42
|
export const setupEditor =
|
|
43
43
|
( post, edits, template ) =>
|
|
@@ -157,8 +157,8 @@ export function setEditedPost( postType, postId ) {
|
|
|
157
157
|
* Returns an action object used in signalling that attributes of the post have
|
|
158
158
|
* been edited.
|
|
159
159
|
*
|
|
160
|
-
* @param {Object} edits
|
|
161
|
-
* @param {Object} options Options for the edit.
|
|
160
|
+
* @param {Object} edits Post attributes to edit.
|
|
161
|
+
* @param {Object} [options] Options for the edit.
|
|
162
162
|
*
|
|
163
163
|
* @example
|
|
164
164
|
* ```js
|
|
@@ -195,7 +195,7 @@ export const editPost =
|
|
|
195
195
|
/**
|
|
196
196
|
* Action for saving the current post in the editor.
|
|
197
197
|
*
|
|
198
|
-
* @param {Object} options
|
|
198
|
+
* @param {Object} [options]
|
|
199
199
|
*/
|
|
200
200
|
export const savePost =
|
|
201
201
|
( options = {} ) =>
|
|
@@ -375,7 +375,8 @@ export const trashPost =
|
|
|
375
375
|
* autosaving (e.g. on the Web, the post might be committed to Session
|
|
376
376
|
* Storage).
|
|
377
377
|
*
|
|
378
|
-
* @param {Object
|
|
378
|
+
* @param {Object} [options] Extra flags to identify the autosave.
|
|
379
|
+
* @param {boolean} [options.local] Whether to perform a local autosave.
|
|
379
380
|
*/
|
|
380
381
|
export const autosave =
|
|
381
382
|
( { local = false, ...options } = {} ) =>
|
|
@@ -598,8 +599,8 @@ export function unlockPostAutosaving( lockName ) {
|
|
|
598
599
|
/**
|
|
599
600
|
* Returns an action object used to signal that the blocks have been updated.
|
|
600
601
|
*
|
|
601
|
-
* @param {Array}
|
|
602
|
-
* @param {
|
|
602
|
+
* @param {Array} blocks Block Array.
|
|
603
|
+
* @param {Object} [options] Optional options.
|
|
603
604
|
*/
|
|
604
605
|
export const resetEditorBlocks =
|
|
605
606
|
( blocks, options = {} ) =>
|
|
@@ -834,6 +835,9 @@ export const toggleDistractionFree =
|
|
|
834
835
|
.set( 'core', 'fixedToolbar', true );
|
|
835
836
|
dispatch.setIsInserterOpened( false );
|
|
836
837
|
dispatch.setIsListViewOpened( false );
|
|
838
|
+
unlock(
|
|
839
|
+
registry.dispatch( blockEditorStore )
|
|
840
|
+
).resetZoomLevel();
|
|
837
841
|
} );
|
|
838
842
|
}
|
|
839
843
|
registry.batch( () => {
|
|
@@ -20,13 +20,10 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
20
20
|
/**
|
|
21
21
|
* Internal dependencies
|
|
22
22
|
*/
|
|
23
|
-
import {
|
|
24
|
-
getRenderingMode,
|
|
25
|
-
getCurrentPost,
|
|
26
|
-
__experimentalGetDefaultTemplatePartAreas,
|
|
27
|
-
} from './selectors';
|
|
23
|
+
import { getRenderingMode, getCurrentPost } from './selectors';
|
|
28
24
|
import {
|
|
29
25
|
getEntityActions as _getEntityActions,
|
|
26
|
+
getEntityFields as _getEntityFields,
|
|
30
27
|
isEntityReady as _isEntityReady,
|
|
31
28
|
} from '../dataviews/store/private-selectors';
|
|
32
29
|
|
|
@@ -101,9 +98,13 @@ export const getPostIcon = createRegistrySelector(
|
|
|
101
98
|
postType === 'wp_template'
|
|
102
99
|
) {
|
|
103
100
|
return (
|
|
104
|
-
|
|
105
|
-
(
|
|
106
|
-
|
|
101
|
+
(
|
|
102
|
+
select( coreStore ).getEntityRecord(
|
|
103
|
+
'root',
|
|
104
|
+
'__unstableBase'
|
|
105
|
+
)?.default_template_part_areas || []
|
|
106
|
+
).find( ( item ) => options.area === item.area )?.icon ||
|
|
107
|
+
layout
|
|
107
108
|
);
|
|
108
109
|
}
|
|
109
110
|
if ( CARD_ICONS[ postType ] ) {
|
|
@@ -171,6 +172,10 @@ export function isEntityReady( state, ...args ) {
|
|
|
171
172
|
return _isEntityReady( state.dataviews, ...args );
|
|
172
173
|
}
|
|
173
174
|
|
|
175
|
+
export function getEntityFields( state, ...args ) {
|
|
176
|
+
return _getEntityFields( state.dataviews, ...args );
|
|
177
|
+
}
|
|
178
|
+
|
|
174
179
|
/**
|
|
175
180
|
* Similar to getBlocksByName in @wordpress/block-editor, but only returns the top-most
|
|
176
181
|
* blocks that aren't descendants of the query block.
|
|
@@ -9,6 +9,7 @@ import { combineReducers } from '@wordpress/data';
|
|
|
9
9
|
import {
|
|
10
10
|
postId,
|
|
11
11
|
postType,
|
|
12
|
+
renderingMode,
|
|
12
13
|
saving,
|
|
13
14
|
postLock,
|
|
14
15
|
postSavingLock,
|
|
@@ -82,6 +83,7 @@ export default combineReducers( {
|
|
|
82
83
|
postId,
|
|
83
84
|
postType,
|
|
84
85
|
postTitle,
|
|
86
|
+
renderingMode,
|
|
85
87
|
saving,
|
|
86
88
|
postLock,
|
|
87
89
|
postSavingLock,
|
package/src/store/selectors.js
CHANGED
|
@@ -12,7 +12,6 @@ import { addQueryArgs, cleanForSlug } from '@wordpress/url';
|
|
|
12
12
|
import { createSelector, createRegistrySelector } from '@wordpress/data';
|
|
13
13
|
import deprecated from '@wordpress/deprecated';
|
|
14
14
|
import { Platform } from '@wordpress/element';
|
|
15
|
-
import { layout } from '@wordpress/icons';
|
|
16
15
|
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
17
16
|
import { store as coreStore } from '@wordpress/core-data';
|
|
18
17
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
@@ -29,6 +28,7 @@ import {
|
|
|
29
28
|
import { getPostRawValue } from './reducer';
|
|
30
29
|
import { getTemplatePartIcon } from '../utils/get-template-part-icon';
|
|
31
30
|
import { unlock } from '../lock-unlock';
|
|
31
|
+
import { getTemplateInfo } from '../utils/get-template-info';
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* Shared reference to an empty object for cases where it is important to avoid
|
|
@@ -1702,16 +1702,20 @@ export const getBlockListSettings = getBlockEditorSelector(
|
|
|
1702
1702
|
'getBlockListSettings'
|
|
1703
1703
|
);
|
|
1704
1704
|
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1705
|
+
export const __experimentalGetDefaultTemplateTypes = createRegistrySelector(
|
|
1706
|
+
( select ) => () => {
|
|
1707
|
+
deprecated(
|
|
1708
|
+
"select('core/editor').__experimentalGetDefaultTemplateTypes",
|
|
1709
|
+
{
|
|
1710
|
+
since: '6.8',
|
|
1711
|
+
alternative:
|
|
1712
|
+
"select('core/core-data').getEntityRecord( 'root', '__unstableBase' )?.default_template_types",
|
|
1713
|
+
}
|
|
1714
|
+
);
|
|
1715
|
+
return select( coreStore ).getEntityRecord( 'root', '__unstableBase' )
|
|
1716
|
+
?.default_template_types;
|
|
1717
|
+
}
|
|
1718
|
+
);
|
|
1715
1719
|
|
|
1716
1720
|
/**
|
|
1717
1721
|
* Returns the default template part areas.
|
|
@@ -1720,15 +1724,26 @@ export function __experimentalGetDefaultTemplateTypes( state ) {
|
|
|
1720
1724
|
*
|
|
1721
1725
|
* @return {Array} The template part areas.
|
|
1722
1726
|
*/
|
|
1723
|
-
export const __experimentalGetDefaultTemplatePartAreas =
|
|
1724
|
-
(
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1727
|
+
export const __experimentalGetDefaultTemplatePartAreas = createRegistrySelector(
|
|
1728
|
+
( select ) =>
|
|
1729
|
+
createSelector( () => {
|
|
1730
|
+
deprecated(
|
|
1731
|
+
"select('core/editor').__experimentalGetDefaultTemplatePartAreas",
|
|
1732
|
+
{
|
|
1733
|
+
since: '6.8',
|
|
1734
|
+
alternative:
|
|
1735
|
+
"select('core/core-data').getEntityRecord( 'root', '__unstableBase' )?.default_template_part_areas",
|
|
1736
|
+
}
|
|
1737
|
+
);
|
|
1738
|
+
|
|
1739
|
+
const areas =
|
|
1740
|
+
select( coreStore ).getEntityRecord( 'root', '__unstableBase' )
|
|
1741
|
+
?.default_template_part_areas || [];
|
|
1742
|
+
|
|
1743
|
+
return areas.map( ( item ) => {
|
|
1744
|
+
return { ...item, icon: getTemplatePartIcon( item.icon ) };
|
|
1745
|
+
} );
|
|
1746
|
+
} )
|
|
1732
1747
|
);
|
|
1733
1748
|
|
|
1734
1749
|
/**
|
|
@@ -1739,20 +1754,30 @@ export const __experimentalGetDefaultTemplatePartAreas = createSelector(
|
|
|
1739
1754
|
*
|
|
1740
1755
|
* @return {Object} The template type.
|
|
1741
1756
|
*/
|
|
1742
|
-
export const __experimentalGetDefaultTemplateType =
|
|
1743
|
-
(
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1757
|
+
export const __experimentalGetDefaultTemplateType = createRegistrySelector(
|
|
1758
|
+
( select ) =>
|
|
1759
|
+
createSelector( ( state, slug ) => {
|
|
1760
|
+
deprecated(
|
|
1761
|
+
"select('core/editor').__experimentalGetDefaultTemplateType",
|
|
1762
|
+
{
|
|
1763
|
+
since: '6.8',
|
|
1764
|
+
}
|
|
1765
|
+
);
|
|
1766
|
+
const templateTypes = select( coreStore ).getEntityRecord(
|
|
1767
|
+
'root',
|
|
1768
|
+
'__unstableBase'
|
|
1769
|
+
)?.default_template_types;
|
|
1770
|
+
|
|
1771
|
+
if ( ! templateTypes ) {
|
|
1772
|
+
return EMPTY_OBJECT;
|
|
1773
|
+
}
|
|
1748
1774
|
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
( state ) => [ __experimentalGetDefaultTemplateTypes( state ) ]
|
|
1775
|
+
return (
|
|
1776
|
+
Object.values( templateTypes ).find(
|
|
1777
|
+
( type ) => type.slug === slug
|
|
1778
|
+
) ?? EMPTY_OBJECT
|
|
1779
|
+
);
|
|
1780
|
+
} )
|
|
1756
1781
|
);
|
|
1757
1782
|
|
|
1758
1783
|
/**
|
|
@@ -1763,38 +1788,31 @@ export const __experimentalGetDefaultTemplateType = createSelector(
|
|
|
1763
1788
|
* @param {Object} template The template for which we need information.
|
|
1764
1789
|
* @return {Object} Information about the template, including title, description, and icon.
|
|
1765
1790
|
*/
|
|
1766
|
-
export const __experimentalGetTemplateInfo =
|
|
1767
|
-
(
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1791
|
+
export const __experimentalGetTemplateInfo = createRegistrySelector(
|
|
1792
|
+
( select ) =>
|
|
1793
|
+
createSelector( ( state, template ) => {
|
|
1794
|
+
deprecated( "select('core/editor').__experimentalGetTemplateInfo", {
|
|
1795
|
+
since: '6.8',
|
|
1796
|
+
} );
|
|
1771
1797
|
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1798
|
+
if ( ! template ) {
|
|
1799
|
+
return EMPTY_OBJECT;
|
|
1800
|
+
}
|
|
1775
1801
|
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
typeof description === 'string' ? description : description?.raw;
|
|
1780
|
-
const templateIcon =
|
|
1781
|
-
__experimentalGetDefaultTemplatePartAreas( state ).find(
|
|
1782
|
-
( item ) => area === item.area
|
|
1783
|
-
)?.icon || layout;
|
|
1802
|
+
const templateTypes =
|
|
1803
|
+
select( coreStore ).getEntityRecord( 'root', '__unstableBase' )
|
|
1804
|
+
?.default_template_types || [];
|
|
1784
1805
|
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
__experimentalGetDefaultTemplateTypes( state ),
|
|
1796
|
-
__experimentalGetDefaultTemplatePartAreas( state ),
|
|
1797
|
-
]
|
|
1806
|
+
const templateAreas =
|
|
1807
|
+
select( coreStore ).getEntityRecord( 'root', '__unstableBase' )
|
|
1808
|
+
?.default_template_part_areas || [];
|
|
1809
|
+
|
|
1810
|
+
return getTemplateInfo( {
|
|
1811
|
+
template,
|
|
1812
|
+
templateAreas,
|
|
1813
|
+
templateTypes,
|
|
1814
|
+
} );
|
|
1815
|
+
} )
|
|
1798
1816
|
);
|
|
1799
1817
|
|
|
1800
1818
|
/**
|