@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
|
@@ -12,10 +12,10 @@ import { store as editorStore } from '../../store';
|
|
|
12
12
|
/**
|
|
13
13
|
* Check if the post URL is valid and visible.
|
|
14
14
|
*
|
|
15
|
-
* @param {Object}
|
|
16
|
-
* @param {
|
|
15
|
+
* @param {Object} props The component props.
|
|
16
|
+
* @param {React.ReactElement} props.children The child components.
|
|
17
17
|
*
|
|
18
|
-
* @return {
|
|
18
|
+
* @return {React.ReactElement} The child components if the post URL is valid and visible, otherwise null.
|
|
19
19
|
*/
|
|
20
20
|
export default function PostURLCheck( { children } ) {
|
|
21
21
|
const isVisible = useSelect( ( select ) => {
|
|
@@ -34,7 +34,7 @@ import { store as editorStore } from '../../store';
|
|
|
34
34
|
*
|
|
35
35
|
* @param {Function} onClose Callback function to be executed when the popover is closed.
|
|
36
36
|
*
|
|
37
|
-
* @return {
|
|
37
|
+
* @return {React.ReactNode} The rendered PostURL component.
|
|
38
38
|
*/
|
|
39
39
|
export default function PostURL( { onClose } ) {
|
|
40
40
|
const {
|
|
@@ -12,7 +12,7 @@ import { store as editorStore } from '../../store';
|
|
|
12
12
|
/**
|
|
13
13
|
* Represents a label component for a post URL.
|
|
14
14
|
*
|
|
15
|
-
* @return {
|
|
15
|
+
* @return {React.ReactNode} The PostURLLabel component.
|
|
16
16
|
*/
|
|
17
17
|
export default function PostURLLabel() {
|
|
18
18
|
return usePostURLLabel();
|
|
@@ -19,7 +19,7 @@ import { store as editorStore } from '../../store';
|
|
|
19
19
|
/**
|
|
20
20
|
* Renders the `PostURLPanel` component.
|
|
21
21
|
*
|
|
22
|
-
* @return {
|
|
22
|
+
* @return {React.ReactNode} The rendered PostURLPanel component.
|
|
23
23
|
*/
|
|
24
24
|
export default function PostURLPanel() {
|
|
25
25
|
const { isFrontPage } = useSelect( ( select ) => {
|
|
@@ -15,7 +15,7 @@ import { store as editorStore } from '../../store';
|
|
|
15
15
|
* @param {Object} props The component props.
|
|
16
16
|
* @param {Function} props.render Function to render the component.
|
|
17
17
|
* Receives an object with a `canEdit` property.
|
|
18
|
-
* @return {
|
|
18
|
+
* @return {React.ReactNode} The rendered component.
|
|
19
19
|
*/
|
|
20
20
|
export default function PostVisibilityCheck( { render } ) {
|
|
21
21
|
const canEdit = useSelect( ( select ) => {
|
|
@@ -22,7 +22,7 @@ import { store as editorStore } from '../../store';
|
|
|
22
22
|
*
|
|
23
23
|
* @param {Object} props The component props.
|
|
24
24
|
* @param {Function} props.onClose Function to call when the popover is closed.
|
|
25
|
-
* @return {
|
|
25
|
+
* @return {React.ReactNode} The rendered component.
|
|
26
26
|
*/
|
|
27
27
|
export default function PostVisibility( { onClose } ) {
|
|
28
28
|
const instanceId = useInstanceId( PostVisibility );
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { useSelect, useDispatch } from '@wordpress/data';
|
|
5
|
+
import { store as preferencesStore } from '@wordpress/preferences';
|
|
6
|
+
import { hasBlockSupport, store as blocksStore } from '@wordpress/blocks';
|
|
7
|
+
import { useMemo } from '@wordpress/element';
|
|
8
|
+
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Internal dependencies
|
|
12
|
+
*/
|
|
13
|
+
import { store as editorStore } from '../../store';
|
|
14
|
+
import { unlock } from '../../lock-unlock';
|
|
15
|
+
|
|
16
|
+
const { BlockManager } = unlock( blockEditorPrivateApis );
|
|
17
|
+
|
|
18
|
+
export default function BlockVisibility() {
|
|
19
|
+
const { showBlockTypes, hideBlockTypes } = unlock(
|
|
20
|
+
useDispatch( editorStore )
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
const {
|
|
24
|
+
blockTypes,
|
|
25
|
+
allowedBlockTypes: _allowedBlockTypes,
|
|
26
|
+
hiddenBlockTypes: _hiddenBlockTypes,
|
|
27
|
+
} = useSelect( ( select ) => {
|
|
28
|
+
return {
|
|
29
|
+
blockTypes: select( blocksStore ).getBlockTypes(),
|
|
30
|
+
allowedBlockTypes:
|
|
31
|
+
select( editorStore ).getEditorSettings().allowedBlockTypes,
|
|
32
|
+
hiddenBlockTypes:
|
|
33
|
+
select( preferencesStore ).get( 'core', 'hiddenBlockTypes' ) ??
|
|
34
|
+
[],
|
|
35
|
+
};
|
|
36
|
+
}, [] );
|
|
37
|
+
|
|
38
|
+
const allowedBlockTypes = useMemo( () => {
|
|
39
|
+
if ( _allowedBlockTypes === true ) {
|
|
40
|
+
return blockTypes;
|
|
41
|
+
}
|
|
42
|
+
return blockTypes.filter( ( { name } ) => {
|
|
43
|
+
return _allowedBlockTypes?.includes( name );
|
|
44
|
+
} );
|
|
45
|
+
}, [ _allowedBlockTypes, blockTypes ] );
|
|
46
|
+
|
|
47
|
+
const filteredBlockTypes = allowedBlockTypes.filter(
|
|
48
|
+
( blockType ) =>
|
|
49
|
+
hasBlockSupport( blockType, 'inserter', true ) &&
|
|
50
|
+
( ! blockType.parent ||
|
|
51
|
+
blockType.parent.includes( 'core/post-content' ) )
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
// Some hidden blocks become unregistered
|
|
55
|
+
// by removing for instance the plugin that registered them, yet
|
|
56
|
+
// they're still remain as hidden by the user's action.
|
|
57
|
+
// We consider "hidden", blocks which were hidden and
|
|
58
|
+
// are still registered.
|
|
59
|
+
const hiddenBlockTypes = _hiddenBlockTypes.filter( ( hiddenBlock ) => {
|
|
60
|
+
return filteredBlockTypes.some(
|
|
61
|
+
( registeredBlock ) => registeredBlock.name === hiddenBlock
|
|
62
|
+
);
|
|
63
|
+
} );
|
|
64
|
+
|
|
65
|
+
const selectedBlockTypes = filteredBlockTypes.filter(
|
|
66
|
+
( blockType ) => ! hiddenBlockTypes.includes( blockType.name )
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
const onChangeSelectedBlockTypes = ( newSelectedBlockTypes ) => {
|
|
70
|
+
if ( selectedBlockTypes.length > newSelectedBlockTypes.length ) {
|
|
71
|
+
const blockTypesToHide = selectedBlockTypes.filter(
|
|
72
|
+
( blockType ) =>
|
|
73
|
+
! newSelectedBlockTypes.find(
|
|
74
|
+
( { name } ) => name === blockType.name
|
|
75
|
+
)
|
|
76
|
+
);
|
|
77
|
+
hideBlockTypes( blockTypesToHide.map( ( { name } ) => name ) );
|
|
78
|
+
} else if ( selectedBlockTypes.length < newSelectedBlockTypes.length ) {
|
|
79
|
+
const blockTypesToShow = newSelectedBlockTypes.filter(
|
|
80
|
+
( blockType ) =>
|
|
81
|
+
! selectedBlockTypes.find(
|
|
82
|
+
( { name } ) => name === blockType.name
|
|
83
|
+
)
|
|
84
|
+
);
|
|
85
|
+
showBlockTypes( blockTypesToShow.map( ( { name } ) => name ) );
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
return (
|
|
90
|
+
<BlockManager
|
|
91
|
+
blockTypes={ filteredBlockTypes }
|
|
92
|
+
selectedBlockTypes={ selectedBlockTypes }
|
|
93
|
+
onChange={ onChangeSelectedBlockTypes }
|
|
94
|
+
/>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
import { withSelect, withDispatch } from '@wordpress/data';
|
|
4
|
+
import { useDispatch, useSelect } from '@wordpress/data';
|
|
6
5
|
import { privateApis as preferencesPrivateApis } from '@wordpress/preferences';
|
|
7
6
|
|
|
8
7
|
/**
|
|
@@ -13,18 +12,29 @@ import { store as editorStore } from '../../store';
|
|
|
13
12
|
|
|
14
13
|
const { PreferenceBaseOption } = unlock( preferencesPrivateApis );
|
|
15
14
|
|
|
16
|
-
export default
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
15
|
+
export default function EnablePanelOption( props ) {
|
|
16
|
+
const { toggleEditorPanelEnabled } = useDispatch( editorStore );
|
|
17
|
+
const { isChecked, isRemoved } = useSelect(
|
|
18
|
+
( select ) => {
|
|
19
|
+
const { isEditorPanelEnabled, isEditorPanelRemoved } =
|
|
20
|
+
select( editorStore );
|
|
21
|
+
return {
|
|
22
|
+
isChecked: isEditorPanelEnabled( props.panelName ),
|
|
23
|
+
isRemoved: isEditorPanelRemoved( props.panelName ),
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
[ props.panelName ]
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
if ( isRemoved ) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<PreferenceBaseOption
|
|
35
|
+
isChecked={ isChecked }
|
|
36
|
+
onChange={ () => toggleEditorPanelEnabled( props.panelName ) }
|
|
37
|
+
{ ...props }
|
|
38
|
+
/>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
import { withSelect, withDispatch } from '@wordpress/data';
|
|
4
|
+
import { useDispatch, useSelect } from '@wordpress/data';
|
|
6
5
|
import { privateApis as preferencesPrivateApis } from '@wordpress/preferences';
|
|
7
6
|
|
|
8
7
|
/**
|
|
@@ -13,16 +12,20 @@ import { store as editorStore } from '../../store';
|
|
|
13
12
|
|
|
14
13
|
const { PreferenceBaseOption } = unlock( preferencesPrivateApis );
|
|
15
14
|
|
|
16
|
-
export default
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
export default function EnablePublishSidebarOption( props ) {
|
|
16
|
+
const isChecked = useSelect( ( select ) => {
|
|
17
|
+
return select( editorStore ).isPublishSidebarEnabled();
|
|
18
|
+
}, [] );
|
|
19
|
+
const { enablePublishSidebar, disablePublishSidebar } =
|
|
20
|
+
useDispatch( editorStore );
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<PreferenceBaseOption
|
|
24
|
+
isChecked={ isChecked }
|
|
25
|
+
onChange={ ( isEnabled ) =>
|
|
26
|
+
isEnabled ? enablePublishSidebar() : disablePublishSidebar()
|
|
27
|
+
}
|
|
28
|
+
{ ...props }
|
|
29
|
+
/>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -18,7 +18,7 @@ import { store as interfaceStore } from '@wordpress/interface';
|
|
|
18
18
|
import EnablePanelOption from './enable-panel';
|
|
19
19
|
import EnablePluginDocumentSettingPanelOption from './enable-plugin-document-setting-panel';
|
|
20
20
|
import EnablePublishSidebarOption from './enable-publish-sidebar';
|
|
21
|
-
import
|
|
21
|
+
import BlockVisibility from './block-visibility';
|
|
22
22
|
import PostTaxonomies from '../post-taxonomies';
|
|
23
23
|
import PostFeaturedImageCheck from '../post-featured-image/check';
|
|
24
24
|
import PostExcerptCheck from '../post-excerpt/check';
|
|
@@ -297,7 +297,7 @@ function PreferencesModalContents( { extraSections = {} } ) {
|
|
|
297
297
|
"Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later."
|
|
298
298
|
) }
|
|
299
299
|
>
|
|
300
|
-
<
|
|
300
|
+
<BlockVisibility />
|
|
301
301
|
</PreferencesModalSection>
|
|
302
302
|
</>
|
|
303
303
|
),
|
|
@@ -72,8 +72,7 @@ const NON_CONTEXTUAL_POST_TYPES = [
|
|
|
72
72
|
* @return {Array} Block editor props.
|
|
73
73
|
*/
|
|
74
74
|
function useBlockEditorProps( post, template, mode ) {
|
|
75
|
-
const rootLevelPost =
|
|
76
|
-
mode === 'post-only' || ! template ? 'post' : 'template';
|
|
75
|
+
const rootLevelPost = mode === 'template-locked' ? 'template' : 'post';
|
|
77
76
|
const [ postBlocks, onInput, onChange ] = useEntityBlockEditor(
|
|
78
77
|
'postType',
|
|
79
78
|
post.type,
|
|
@@ -164,30 +163,48 @@ export const ExperimentalEditorProvider = withRegistryProvider(
|
|
|
164
163
|
BlockEditorProviderComponent = ExperimentalBlockEditorProvider,
|
|
165
164
|
__unstableTemplate: template,
|
|
166
165
|
} ) => {
|
|
167
|
-
const {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
166
|
+
const {
|
|
167
|
+
editorSettings,
|
|
168
|
+
selection,
|
|
169
|
+
isReady,
|
|
170
|
+
mode,
|
|
171
|
+
defaultMode,
|
|
172
|
+
postTypeEntities,
|
|
173
|
+
hasLoadedPostObject,
|
|
174
|
+
} = useSelect(
|
|
175
|
+
( select ) => {
|
|
176
|
+
const {
|
|
177
|
+
getEditorSettings,
|
|
178
|
+
getEditorSelection,
|
|
179
|
+
getRenderingMode,
|
|
180
|
+
__unstableIsEditorReady,
|
|
181
|
+
} = select( editorStore );
|
|
182
|
+
const { getEntitiesConfig } = select( coreStore );
|
|
183
|
+
|
|
184
|
+
const postTypeObject = select( coreStore ).getPostType(
|
|
185
|
+
post.type
|
|
186
|
+
);
|
|
187
|
+
|
|
188
|
+
const _hasLoadedPostObject = select(
|
|
189
|
+
coreStore
|
|
190
|
+
).hasFinishedResolution( 'getPostType', [ post.type ] );
|
|
177
191
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
192
|
+
return {
|
|
193
|
+
hasLoadedPostObject: _hasLoadedPostObject,
|
|
194
|
+
editorSettings: getEditorSettings(),
|
|
195
|
+
isReady: __unstableIsEditorReady(),
|
|
196
|
+
mode: getRenderingMode(),
|
|
197
|
+
defaultMode:
|
|
198
|
+
postTypeObject?.default_rendering_mode ?? 'post-only',
|
|
199
|
+
selection: getEditorSelection(),
|
|
200
|
+
postTypeEntities:
|
|
201
|
+
post.type === 'wp_template'
|
|
202
|
+
? getEntitiesConfig( 'postType' )
|
|
203
|
+
: null,
|
|
204
|
+
};
|
|
205
|
+
},
|
|
206
|
+
[ post.type ]
|
|
207
|
+
);
|
|
191
208
|
const shouldRenderTemplate = !! template && mode !== 'post-only';
|
|
192
209
|
const rootLevelPost = shouldRenderTemplate ? template : post;
|
|
193
210
|
const defaultBlockContext = useMemo( () => {
|
|
@@ -282,7 +299,15 @@ export const ExperimentalEditorProvider = withRegistryProvider(
|
|
|
282
299
|
}
|
|
283
300
|
);
|
|
284
301
|
}
|
|
285
|
-
}, [
|
|
302
|
+
}, [
|
|
303
|
+
createWarningNotice,
|
|
304
|
+
initialEdits,
|
|
305
|
+
settings,
|
|
306
|
+
post,
|
|
307
|
+
recovery,
|
|
308
|
+
setupEditor,
|
|
309
|
+
updatePostLock,
|
|
310
|
+
] );
|
|
286
311
|
|
|
287
312
|
// Synchronizes the active post with the state
|
|
288
313
|
useEffect( () => {
|
|
@@ -301,15 +326,15 @@ export const ExperimentalEditorProvider = withRegistryProvider(
|
|
|
301
326
|
|
|
302
327
|
// Sets the right rendering mode when loading the editor.
|
|
303
328
|
useEffect( () => {
|
|
304
|
-
setRenderingMode(
|
|
305
|
-
}, [
|
|
329
|
+
setRenderingMode( defaultMode );
|
|
330
|
+
}, [ defaultMode, setRenderingMode ] );
|
|
306
331
|
|
|
307
332
|
useHideBlocksFromInserter( post.type, mode );
|
|
308
333
|
|
|
309
334
|
// Register the editor commands.
|
|
310
335
|
useCommands();
|
|
311
336
|
|
|
312
|
-
if ( ! isReady ) {
|
|
337
|
+
if ( ! isReady || ! mode || ! hasLoadedPostObject ) {
|
|
313
338
|
return null;
|
|
314
339
|
}
|
|
315
340
|
|
|
@@ -386,7 +411,7 @@ export const ExperimentalEditorProvider = withRegistryProvider(
|
|
|
386
411
|
* </EditorProvider>
|
|
387
412
|
* ```
|
|
388
413
|
*
|
|
389
|
-
* @return {
|
|
414
|
+
* @return {React.ReactNode} The rendered EditorProvider component.
|
|
390
415
|
*/
|
|
391
416
|
export function EditorProvider( props ) {
|
|
392
417
|
return (
|
|
@@ -61,6 +61,6 @@ function TableOfContents(
|
|
|
61
61
|
* @param {boolean} props.repositionDropdown Whether to reposition the dropdown.
|
|
62
62
|
* @param {Element.ref} ref The component's ref.
|
|
63
63
|
*
|
|
64
|
-
* @return {
|
|
64
|
+
* @return {React.ReactNode} The rendered table of contents component.
|
|
65
65
|
*/
|
|
66
66
|
export default forwardRef( TableOfContents );
|
|
@@ -12,11 +12,11 @@ import { store as editorStore } from '../../store';
|
|
|
12
12
|
/**
|
|
13
13
|
* Checks if the current theme supports specific features and renders the children if supported.
|
|
14
14
|
*
|
|
15
|
-
* @param {Object}
|
|
16
|
-
* @param {
|
|
17
|
-
* @param {string|string[]}
|
|
15
|
+
* @param {Object} props The component props.
|
|
16
|
+
* @param {React.ReactElement} props.children The children to render if the theme supports the specified features.
|
|
17
|
+
* @param {string|string[]} props.supportKeys The key(s) of the theme support(s) to check.
|
|
18
18
|
*
|
|
19
|
-
* @return {
|
|
19
|
+
* @return {React.ReactElement} The rendered children if the theme supports the specified features, otherwise null.
|
|
20
20
|
*/
|
|
21
21
|
export default function ThemeSupportCheck( { children, supportKeys } ) {
|
|
22
22
|
const { postType, themeSupports } = useSelect( ( select ) => {
|
|
@@ -23,7 +23,7 @@ const AVERAGE_READING_RATE = 189;
|
|
|
23
23
|
/**
|
|
24
24
|
* Component for showing Time To Read in Content.
|
|
25
25
|
*
|
|
26
|
-
* @return {
|
|
26
|
+
* @return {React.ReactNode} The rendered TimeToRead component.
|
|
27
27
|
*/
|
|
28
28
|
export default function TimeToRead() {
|
|
29
29
|
const content = useSelect(
|
|
@@ -10,7 +10,7 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
10
10
|
* Warns the user if there are unsaved changes before leaving the editor.
|
|
11
11
|
* Compatible with Post Editor and Site Editor.
|
|
12
12
|
*
|
|
13
|
-
* @return {
|
|
13
|
+
* @return {React.ReactNode} The component.
|
|
14
14
|
*/
|
|
15
15
|
export default function UnsavedChangesWarning() {
|
|
16
16
|
const { __experimentalGetDirtyEntityRecords } = useSelect( coreStore );
|
|
@@ -13,7 +13,7 @@ import { store as editorStore } from '../../store';
|
|
|
13
13
|
/**
|
|
14
14
|
* Renders the word count of the post content.
|
|
15
15
|
*
|
|
16
|
-
* @return {
|
|
16
|
+
* @return {React.ReactNode} The rendered WordCount component.
|
|
17
17
|
*/
|
|
18
18
|
export default function WordCount() {
|
|
19
19
|
const content = useSelect(
|
|
@@ -20,13 +20,19 @@ import { isAppleOS } from '@wordpress/keycodes';
|
|
|
20
20
|
import { unlock } from '../../lock-unlock';
|
|
21
21
|
|
|
22
22
|
const ZoomOutToggle = ( { disabled } ) => {
|
|
23
|
-
const { isZoomOut, showIconLabels } = useSelect(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
const { isZoomOut, showIconLabels, isDistractionFree } = useSelect(
|
|
24
|
+
( select ) => ( {
|
|
25
|
+
isZoomOut: unlock( select( blockEditorStore ) ).isZoomOut(),
|
|
26
|
+
showIconLabels: select( preferencesStore ).get(
|
|
27
|
+
'core',
|
|
28
|
+
'showIconLabels'
|
|
29
|
+
),
|
|
30
|
+
isDistractionFree: select( preferencesStore ).get(
|
|
31
|
+
'core',
|
|
32
|
+
'distractionFree'
|
|
33
|
+
),
|
|
34
|
+
} )
|
|
35
|
+
);
|
|
30
36
|
|
|
31
37
|
const { resetZoomLevel, setZoomLevel } = unlock(
|
|
32
38
|
useDispatch( blockEditorStore )
|
|
@@ -52,13 +58,19 @@ const ZoomOutToggle = ( { disabled } ) => {
|
|
|
52
58
|
};
|
|
53
59
|
}, [ registerShortcut, unregisterShortcut ] );
|
|
54
60
|
|
|
55
|
-
useShortcut(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
useShortcut(
|
|
62
|
+
'core/editor/zoom',
|
|
63
|
+
() => {
|
|
64
|
+
if ( isZoomOut ) {
|
|
65
|
+
resetZoomLevel();
|
|
66
|
+
} else {
|
|
67
|
+
setZoomLevel( 'auto-scaled' );
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
isDisabled: isDistractionFree,
|
|
60
72
|
}
|
|
61
|
-
|
|
73
|
+
);
|
|
62
74
|
|
|
63
75
|
const handleZoomOut = () => {
|
|
64
76
|
if ( isZoomOut ) {
|
|
@@ -78,6 +90,7 @@ const ZoomOutToggle = ( { disabled } ) => {
|
|
|
78
90
|
isPressed={ isZoomOut }
|
|
79
91
|
size="compact"
|
|
80
92
|
showTooltip={ ! showIconLabels }
|
|
93
|
+
className="editor-zoom-out-toggle"
|
|
81
94
|
/>
|
|
82
95
|
);
|
|
83
96
|
};
|
package/src/dataviews/api.js
CHANGED
|
@@ -11,6 +11,7 @@ import { store as editorStore } from '../store';
|
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* @typedef {import('@wordpress/dataviews').Action} Action
|
|
14
|
+
* @typedef {import('@wordpress/dataviews').Field} Field
|
|
14
15
|
*/
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -53,3 +54,43 @@ export function unregisterEntityAction( kind, name, actionId ) {
|
|
|
53
54
|
_unregisterEntityAction( kind, name, actionId );
|
|
54
55
|
}
|
|
55
56
|
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Registers a new DataViews field.
|
|
60
|
+
*
|
|
61
|
+
* This is an experimental API and is subject to change.
|
|
62
|
+
* it's only available in the Gutenberg plugin for now.
|
|
63
|
+
*
|
|
64
|
+
* @param {string} kind Entity kind.
|
|
65
|
+
* @param {string} name Entity name.
|
|
66
|
+
* @param {Field} config Field configuration.
|
|
67
|
+
*/
|
|
68
|
+
export function registerEntityField( kind, name, config ) {
|
|
69
|
+
const { registerEntityField: _registerEntityField } = unlock(
|
|
70
|
+
dispatch( editorStore )
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
if ( globalThis.IS_GUTENBERG_PLUGIN ) {
|
|
74
|
+
_registerEntityField( kind, name, config );
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Unregisters a DataViews field.
|
|
80
|
+
*
|
|
81
|
+
* This is an experimental API and is subject to change.
|
|
82
|
+
* it's only available in the Gutenberg plugin for now.
|
|
83
|
+
*
|
|
84
|
+
* @param {string} kind Entity kind.
|
|
85
|
+
* @param {string} name Entity name.
|
|
86
|
+
* @param {string} fieldId Field ID.
|
|
87
|
+
*/
|
|
88
|
+
export function unregisterEntityField( kind, name, fieldId ) {
|
|
89
|
+
const { unregisterEntityField: _unregisterEntityField } = unlock(
|
|
90
|
+
dispatch( editorStore )
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
if ( globalThis.IS_GUTENBERG_PLUGIN ) {
|
|
94
|
+
_unregisterEntityField( kind, name, fieldId );
|
|
95
|
+
}
|
|
96
|
+
}
|