@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_data","require","_lockUnlock","_store","registerEntityAction","kind","name","config","_registerEntityAction","unlock","dispatch","editorStore","globalThis","IS_GUTENBERG_PLUGIN","unregisterEntityAction","actionId","_unregisterEntityAction"],"sources":["@wordpress/editor/src/dataviews/api.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { dispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport { store as editorStore } from '../store';\n\n/**\n * @typedef {import('@wordpress/dataviews').Action} Action\n */\n\n/**\n * Registers a new DataViews action.\n *\n * This is an experimental API and is subject to change.\n * it's only available in the Gutenberg plugin for now.\n *\n * @param {string} kind Entity kind.\n * @param {string} name Entity name.\n * @param {Action} config Action configuration.\n */\n\nexport function registerEntityAction( kind, name, config ) {\n\tconst { registerEntityAction: _registerEntityAction } = unlock(\n\t\tdispatch( editorStore )\n\t);\n\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t_registerEntityAction( kind, name, config );\n\t}\n}\n\n/**\n * Unregisters a DataViews action.\n *\n * This is an experimental API and is subject to change.\n * it's only available in the Gutenberg plugin for now.\n *\n * @param {string} kind Entity kind.\n * @param {string} name Entity name.\n * @param {string} actionId Action ID.\n */\nexport function unregisterEntityAction( kind, name, actionId ) {\n\tconst { unregisterEntityAction: _unregisterEntityAction } = unlock(\n\t\tdispatch( editorStore )\n\t);\n\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t_unregisterEntityAction( kind, name, actionId );\n\t}\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_data","require","_lockUnlock","_store","registerEntityAction","kind","name","config","_registerEntityAction","unlock","dispatch","editorStore","globalThis","IS_GUTENBERG_PLUGIN","unregisterEntityAction","actionId","_unregisterEntityAction","registerEntityField","_registerEntityField","unregisterEntityField","fieldId","_unregisterEntityField"],"sources":["@wordpress/editor/src/dataviews/api.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { dispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport { store as editorStore } from '../store';\n\n/**\n * @typedef {import('@wordpress/dataviews').Action} Action\n * @typedef {import('@wordpress/dataviews').Field} Field\n */\n\n/**\n * Registers a new DataViews action.\n *\n * This is an experimental API and is subject to change.\n * it's only available in the Gutenberg plugin for now.\n *\n * @param {string} kind Entity kind.\n * @param {string} name Entity name.\n * @param {Action} config Action configuration.\n */\n\nexport function registerEntityAction( kind, name, config ) {\n\tconst { registerEntityAction: _registerEntityAction } = unlock(\n\t\tdispatch( editorStore )\n\t);\n\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t_registerEntityAction( kind, name, config );\n\t}\n}\n\n/**\n * Unregisters a DataViews action.\n *\n * This is an experimental API and is subject to change.\n * it's only available in the Gutenberg plugin for now.\n *\n * @param {string} kind Entity kind.\n * @param {string} name Entity name.\n * @param {string} actionId Action ID.\n */\nexport function unregisterEntityAction( kind, name, actionId ) {\n\tconst { unregisterEntityAction: _unregisterEntityAction } = unlock(\n\t\tdispatch( editorStore )\n\t);\n\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t_unregisterEntityAction( kind, name, actionId );\n\t}\n}\n\n/**\n * Registers a new DataViews field.\n *\n * This is an experimental API and is subject to change.\n * it's only available in the Gutenberg plugin for now.\n *\n * @param {string} kind Entity kind.\n * @param {string} name Entity name.\n * @param {Field} config Field configuration.\n */\nexport function registerEntityField( kind, name, config ) {\n\tconst { registerEntityField: _registerEntityField } = unlock(\n\t\tdispatch( editorStore )\n\t);\n\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t_registerEntityField( kind, name, config );\n\t}\n}\n\n/**\n * Unregisters a DataViews field.\n *\n * This is an experimental API and is subject to change.\n * it's only available in the Gutenberg plugin for now.\n *\n * @param {string} kind Entity kind.\n * @param {string} name Entity name.\n * @param {string} fieldId Field ID.\n */\nexport function unregisterEntityField( kind, name, fieldId ) {\n\tconst { unregisterEntityField: _unregisterEntityField } = unlock(\n\t\tdispatch( editorStore )\n\t);\n\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t_unregisterEntityField( kind, name, fieldId );\n\t}\n}\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO,SAASG,oBAAoBA,CAAEC,IAAI,EAAEC,IAAI,EAAEC,MAAM,EAAG;EAC1D,MAAM;IAAEH,oBAAoB,EAAEI;EAAsB,CAAC,GAAG,IAAAC,kBAAM,EAC7D,IAAAC,cAAQ,EAAEC,YAAY,CACvB,CAAC;EAED,IAAKC,UAAU,CAACC,mBAAmB,EAAG;IACrCL,qBAAqB,CAAEH,IAAI,EAAEC,IAAI,EAAEC,MAAO,CAAC;EAC5C;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASO,sBAAsBA,CAAET,IAAI,EAAEC,IAAI,EAAES,QAAQ,EAAG;EAC9D,MAAM;IAAED,sBAAsB,EAAEE;EAAwB,CAAC,GAAG,IAAAP,kBAAM,EACjE,IAAAC,cAAQ,EAAEC,YAAY,CACvB,CAAC;EAED,IAAKC,UAAU,CAACC,mBAAmB,EAAG;IACrCG,uBAAuB,CAAEX,IAAI,EAAEC,IAAI,EAAES,QAAS,CAAC;EAChD;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,mBAAmBA,CAAEZ,IAAI,EAAEC,IAAI,EAAEC,MAAM,EAAG;EACzD,MAAM;IAAEU,mBAAmB,EAAEC;EAAqB,CAAC,GAAG,IAAAT,kBAAM,EAC3D,IAAAC,cAAQ,EAAEC,YAAY,CACvB,CAAC;EAED,IAAKC,UAAU,CAACC,mBAAmB,EAAG;IACrCK,oBAAoB,CAAEb,IAAI,EAAEC,IAAI,EAAEC,MAAO,CAAC;EAC3C;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASY,qBAAqBA,CAAEd,IAAI,EAAEC,IAAI,EAAEc,OAAO,EAAG;EAC5D,MAAM;IAAED,qBAAqB,EAAEE;EAAuB,CAAC,GAAG,IAAAZ,kBAAM,EAC/D,IAAAC,cAAQ,EAAEC,YAAY,CACvB,CAAC;EAED,IAAKC,UAAU,CAACC,mBAAmB,EAAG;IACrCQ,sBAAsB,CAAEhB,IAAI,EAAEC,IAAI,EAAEc,OAAQ,CAAC;EAC9C;AACD","ignoreList":[]}
|
|
@@ -5,9 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.registerEntityAction = registerEntityAction;
|
|
8
|
-
exports.
|
|
8
|
+
exports.registerEntityField = registerEntityField;
|
|
9
|
+
exports.registerPostTypeSchema = void 0;
|
|
9
10
|
exports.setIsReady = setIsReady;
|
|
10
11
|
exports.unregisterEntityAction = unregisterEntityAction;
|
|
12
|
+
exports.unregisterEntityField = unregisterEntityField;
|
|
11
13
|
var _coreData = require("@wordpress/core-data");
|
|
12
14
|
var _hooks = require("@wordpress/hooks");
|
|
13
15
|
var _store = require("../../store");
|
|
@@ -38,6 +40,22 @@ function unregisterEntityAction(kind, name, actionId) {
|
|
|
38
40
|
actionId
|
|
39
41
|
};
|
|
40
42
|
}
|
|
43
|
+
function registerEntityField(kind, name, config) {
|
|
44
|
+
return {
|
|
45
|
+
type: 'REGISTER_ENTITY_FIELD',
|
|
46
|
+
kind,
|
|
47
|
+
name,
|
|
48
|
+
config
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function unregisterEntityField(kind, name, fieldId) {
|
|
52
|
+
return {
|
|
53
|
+
type: 'UNREGISTER_ENTITY_FIELD',
|
|
54
|
+
kind,
|
|
55
|
+
name,
|
|
56
|
+
fieldId
|
|
57
|
+
};
|
|
58
|
+
}
|
|
41
59
|
function setIsReady(kind, name) {
|
|
42
60
|
return {
|
|
43
61
|
type: 'SET_IS_READY',
|
|
@@ -45,7 +63,7 @@ function setIsReady(kind, name) {
|
|
|
45
63
|
name
|
|
46
64
|
};
|
|
47
65
|
}
|
|
48
|
-
const
|
|
66
|
+
const registerPostTypeSchema = postType => async ({
|
|
49
67
|
registry
|
|
50
68
|
}) => {
|
|
51
69
|
const isReady = (0, _lockUnlock.unlock)(registry.select(_store.store)).isEntityReady('postType', postType);
|
|
@@ -62,6 +80,7 @@ const registerPostTypeActions = postType => async ({
|
|
|
62
80
|
const actions = [postTypeConfig.viewable ? _fields.viewPost : undefined, !!postTypeConfig?.supports?.revisions ? _fields.viewPostRevisions : undefined,
|
|
63
81
|
// @ts-ignore
|
|
64
82
|
globalThis.IS_GUTENBERG_PLUGIN ? !['wp_template', 'wp_block', 'wp_template_part'].includes(postTypeConfig.slug) && canCreate && _fields.duplicatePost : undefined, postTypeConfig.slug === 'wp_template_part' && canCreate && currentTheme?.is_block_theme ? _duplicateTemplatePart.default : undefined, canCreate && postTypeConfig.slug === 'wp_block' ? _fields.duplicatePattern : undefined, postTypeConfig.supports?.title ? _fields.renamePost : undefined, postTypeConfig?.supports?.['page-attributes'] ? _fields.reorderPage : undefined, postTypeConfig.slug === 'wp_block' ? _fields.exportPattern : undefined, _fields.restorePost, _fields.resetPost, _fields.deletePost, _fields.trashPost, _fields.permanentlyDeletePost];
|
|
83
|
+
const fields = [_fields.featuredImageField, _fields.titleField, _fields.authorField, _fields.statusField, _fields.dateField, _fields.slugField, _fields.parentField, _fields.commentStatusField, _fields.passwordField];
|
|
65
84
|
registry.batch(() => {
|
|
66
85
|
actions.forEach(action => {
|
|
67
86
|
if (!action) {
|
|
@@ -69,8 +88,11 @@ const registerPostTypeActions = postType => async ({
|
|
|
69
88
|
}
|
|
70
89
|
(0, _lockUnlock.unlock)(registry.dispatch(_store.store)).registerEntityAction('postType', postType, action);
|
|
71
90
|
});
|
|
91
|
+
fields.forEach(field => {
|
|
92
|
+
(0, _lockUnlock.unlock)(registry.dispatch(_store.store)).registerEntityField('postType', postType, field);
|
|
93
|
+
});
|
|
72
94
|
});
|
|
73
|
-
(0, _hooks.doAction)('core.
|
|
95
|
+
(0, _hooks.doAction)('core.registerPostTypeSchema', postType);
|
|
74
96
|
};
|
|
75
|
-
exports.
|
|
97
|
+
exports.registerPostTypeSchema = registerPostTypeSchema;
|
|
76
98
|
//# sourceMappingURL=private-actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_coreData","require","_hooks","_store","_lockUnlock","_fields","_duplicateTemplatePart","_interopRequireDefault","registerEntityAction","kind","name","config","type","unregisterEntityAction","actionId","setIsReady","
|
|
1
|
+
{"version":3,"names":["_coreData","require","_hooks","_store","_lockUnlock","_fields","_duplicateTemplatePart","_interopRequireDefault","registerEntityAction","kind","name","config","type","unregisterEntityAction","actionId","registerEntityField","unregisterEntityField","fieldId","setIsReady","registerPostTypeSchema","postType","registry","isReady","unlock","select","editorStore","isEntityReady","dispatch","postTypeConfig","resolveSelect","coreStore","getPostType","canCreate","canUser","currentTheme","getCurrentTheme","actions","viewable","viewPost","undefined","supports","revisions","viewPostRevisions","globalThis","IS_GUTENBERG_PLUGIN","includes","slug","duplicatePost","is_block_theme","duplicateTemplatePart","duplicatePattern","title","renamePost","reorderPage","exportPattern","restorePost","resetPost","deletePost","trashPost","permanentlyDeletePost","fields","featuredImageField","titleField","authorField","statusField","dateField","slugField","parentField","commentStatusField","passwordField","batch","forEach","action","field","doAction","exports"],"sources":["@wordpress/editor/src/dataviews/store/private-actions.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport type { Action, Field } from '@wordpress/dataviews';\nimport { doAction } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport type { PostType } from '../types';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport {\n\tviewPost,\n\tviewPostRevisions,\n\tduplicatePost,\n\tduplicatePattern,\n\treorderPage,\n\texportPattern,\n\tpermanentlyDeletePost,\n\trestorePost,\n\ttrashPost,\n\trenamePost,\n\tresetPost,\n\tdeletePost,\n\tfeaturedImageField,\n\tdateField,\n\tparentField,\n\tpasswordField,\n\tcommentStatusField,\n\tslugField,\n\tstatusField,\n\tauthorField,\n\ttitleField,\n} from '@wordpress/fields';\nimport duplicateTemplatePart from '../actions/duplicate-template-part';\n\nexport function registerEntityAction< Item >(\n\tkind: string,\n\tname: string,\n\tconfig: Action< Item >\n) {\n\treturn {\n\t\ttype: 'REGISTER_ENTITY_ACTION' as const,\n\t\tkind,\n\t\tname,\n\t\tconfig,\n\t};\n}\n\nexport function unregisterEntityAction(\n\tkind: string,\n\tname: string,\n\tactionId: string\n) {\n\treturn {\n\t\ttype: 'UNREGISTER_ENTITY_ACTION' as const,\n\t\tkind,\n\t\tname,\n\t\tactionId,\n\t};\n}\n\nexport function registerEntityField< Item >(\n\tkind: string,\n\tname: string,\n\tconfig: Field< Item >\n) {\n\treturn {\n\t\ttype: 'REGISTER_ENTITY_FIELD' as const,\n\t\tkind,\n\t\tname,\n\t\tconfig,\n\t};\n}\n\nexport function unregisterEntityField(\n\tkind: string,\n\tname: string,\n\tfieldId: string\n) {\n\treturn {\n\t\ttype: 'UNREGISTER_ENTITY_FIELD' as const,\n\t\tkind,\n\t\tname,\n\t\tfieldId,\n\t};\n}\n\nexport function setIsReady( kind: string, name: string ) {\n\treturn {\n\t\ttype: 'SET_IS_READY' as const,\n\t\tkind,\n\t\tname,\n\t};\n}\n\nexport const registerPostTypeSchema =\n\t( postType: string ) =>\n\tasync ( { registry }: { registry: any } ) => {\n\t\tconst isReady = unlock( registry.select( editorStore ) ).isEntityReady(\n\t\t\t'postType',\n\t\t\tpostType\n\t\t);\n\t\tif ( isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\tunlock( registry.dispatch( editorStore ) ).setIsReady(\n\t\t\t'postType',\n\t\t\tpostType\n\t\t);\n\n\t\tconst postTypeConfig = ( await registry\n\t\t\t.resolveSelect( coreStore )\n\t\t\t.getPostType( postType ) ) as PostType;\n\n\t\tconst canCreate = await registry\n\t\t\t.resolveSelect( coreStore )\n\t\t\t.canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: postType,\n\t\t\t} );\n\t\tconst currentTheme = await registry\n\t\t\t.resolveSelect( coreStore )\n\t\t\t.getCurrentTheme();\n\n\t\tconst actions = [\n\t\t\tpostTypeConfig.viewable ? viewPost : undefined,\n\t\t\t!! postTypeConfig?.supports?.revisions\n\t\t\t\t? viewPostRevisions\n\t\t\t\t: undefined,\n\t\t\t// @ts-ignore\n\t\t\tglobalThis.IS_GUTENBERG_PLUGIN\n\t\t\t\t? ! [ 'wp_template', 'wp_block', 'wp_template_part' ].includes(\n\t\t\t\t\t\tpostTypeConfig.slug\n\t\t\t\t ) &&\n\t\t\t\t canCreate &&\n\t\t\t\t duplicatePost\n\t\t\t\t: undefined,\n\t\t\tpostTypeConfig.slug === 'wp_template_part' &&\n\t\t\tcanCreate &&\n\t\t\tcurrentTheme?.is_block_theme\n\t\t\t\t? duplicateTemplatePart\n\t\t\t\t: undefined,\n\t\t\tcanCreate && postTypeConfig.slug === 'wp_block'\n\t\t\t\t? duplicatePattern\n\t\t\t\t: undefined,\n\t\t\tpostTypeConfig.supports?.title ? renamePost : undefined,\n\t\t\tpostTypeConfig?.supports?.[ 'page-attributes' ]\n\t\t\t\t? reorderPage\n\t\t\t\t: undefined,\n\t\t\tpostTypeConfig.slug === 'wp_block' ? exportPattern : undefined,\n\t\t\trestorePost,\n\t\t\tresetPost,\n\t\t\tdeletePost,\n\t\t\ttrashPost,\n\t\t\tpermanentlyDeletePost,\n\t\t];\n\n\t\tconst fields = [\n\t\t\tfeaturedImageField,\n\t\t\ttitleField,\n\t\t\tauthorField,\n\t\t\tstatusField,\n\t\t\tdateField,\n\t\t\tslugField,\n\t\t\tparentField,\n\t\t\tcommentStatusField,\n\t\t\tpasswordField,\n\t\t];\n\n\t\tregistry.batch( () => {\n\t\t\tactions.forEach( ( action ) => {\n\t\t\t\tif ( ! action ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tunlock( registry.dispatch( editorStore ) ).registerEntityAction(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\taction\n\t\t\t\t);\n\t\t\t} );\n\t\t\tfields.forEach( ( field ) => {\n\t\t\t\tunlock( registry.dispatch( editorStore ) ).registerEntityField(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tfield\n\t\t\t\t);\n\t\t\t} );\n\t\t} );\n\n\t\tdoAction( 'core.registerPostTypeSchema', postType );\n\t};\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getEntityActions = getEntityActions;
|
|
7
|
+
exports.getEntityFields = getEntityFields;
|
|
7
8
|
exports.isEntityReady = isEntityReady;
|
|
8
9
|
/**
|
|
9
10
|
* Internal dependencies
|
|
@@ -14,6 +15,10 @@ function getEntityActions(state, kind, name) {
|
|
|
14
15
|
var _state$actions$kind$n;
|
|
15
16
|
return (_state$actions$kind$n = state.actions[kind]?.[name]) !== null && _state$actions$kind$n !== void 0 ? _state$actions$kind$n : EMPTY_ARRAY;
|
|
16
17
|
}
|
|
18
|
+
function getEntityFields(state, kind, name) {
|
|
19
|
+
var _state$fields$kind$na;
|
|
20
|
+
return (_state$fields$kind$na = state.fields[kind]?.[name]) !== null && _state$fields$kind$na !== void 0 ? _state$fields$kind$na : EMPTY_ARRAY;
|
|
21
|
+
}
|
|
17
22
|
function isEntityReady(state, kind, name) {
|
|
18
23
|
return state.isReady[kind]?.[name];
|
|
19
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["EMPTY_ARRAY","getEntityActions","state","kind","name","_state$actions$kind$n","actions","isEntityReady","isReady"],"sources":["@wordpress/editor/src/dataviews/store/private-selectors.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { State } from './reducer';\n\nconst EMPTY_ARRAY = [] as [];\n\nexport function getEntityActions( state: State, kind: string, name: string ) {\n\treturn state.actions[ kind ]?.[ name ] ?? EMPTY_ARRAY;\n}\n\nexport function isEntityReady( state: State, kind: string, name: string ) {\n\treturn state.isReady[ kind ]?.[ name ];\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["EMPTY_ARRAY","getEntityActions","state","kind","name","_state$actions$kind$n","actions","getEntityFields","_state$fields$kind$na","fields","isEntityReady","isReady"],"sources":["@wordpress/editor/src/dataviews/store/private-selectors.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { State } from './reducer';\n\nconst EMPTY_ARRAY = [] as [];\n\nexport function getEntityActions( state: State, kind: string, name: string ) {\n\treturn state.actions[ kind ]?.[ name ] ?? EMPTY_ARRAY;\n}\n\nexport function getEntityFields( state: State, kind: string, name: string ) {\n\treturn state.fields[ kind ]?.[ name ] ?? EMPTY_ARRAY;\n}\n\nexport function isEntityReady( state: State, kind: string, name: string ) {\n\treturn state.isReady[ kind ]?.[ name ];\n}\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;;AAGA,MAAMA,WAAW,GAAG,EAAQ;AAErB,SAASC,gBAAgBA,CAAEC,KAAY,EAAEC,IAAY,EAAEC,IAAY,EAAG;EAAA,IAAAC,qBAAA;EAC5E,QAAAA,qBAAA,GAAOH,KAAK,CAACI,OAAO,CAAEH,IAAI,CAAE,GAAIC,IAAI,CAAE,cAAAC,qBAAA,cAAAA,qBAAA,GAAIL,WAAW;AACtD;AAEO,SAASO,eAAeA,CAAEL,KAAY,EAAEC,IAAY,EAAEC,IAAY,EAAG;EAAA,IAAAI,qBAAA;EAC3E,QAAAA,qBAAA,GAAON,KAAK,CAACO,MAAM,CAAEN,IAAI,CAAE,GAAIC,IAAI,CAAE,cAAAI,qBAAA,cAAAA,qBAAA,GAAIR,WAAW;AACrD;AAEO,SAASU,aAAaA,CAAER,KAAY,EAAEC,IAAY,EAAEC,IAAY,EAAG;EACzE,OAAOF,KAAK,CAACS,OAAO,CAAER,IAAI,CAAE,GAAIC,IAAI,CAAE;AACvC","ignoreList":[]}
|
|
@@ -47,8 +47,31 @@ function actions(state = {}, action) {
|
|
|
47
47
|
}
|
|
48
48
|
return state;
|
|
49
49
|
}
|
|
50
|
+
function fields(state = {}, action) {
|
|
51
|
+
var _state$action$kind$ac3, _state$action$kind$ac4;
|
|
52
|
+
switch (action.type) {
|
|
53
|
+
case 'REGISTER_ENTITY_FIELD':
|
|
54
|
+
return {
|
|
55
|
+
...state,
|
|
56
|
+
[action.kind]: {
|
|
57
|
+
...state[action.kind],
|
|
58
|
+
[action.name]: [...((_state$action$kind$ac3 = state[action.kind]?.[action.name]) !== null && _state$action$kind$ac3 !== void 0 ? _state$action$kind$ac3 : []).filter(_field => _field.id !== action.config.id), action.config]
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
case 'UNREGISTER_ENTITY_FIELD':
|
|
62
|
+
return {
|
|
63
|
+
...state,
|
|
64
|
+
[action.kind]: {
|
|
65
|
+
...state[action.kind],
|
|
66
|
+
[action.name]: ((_state$action$kind$ac4 = state[action.kind]?.[action.name]) !== null && _state$action$kind$ac4 !== void 0 ? _state$action$kind$ac4 : []).filter(_field => _field.id !== action.fieldId)
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
return state;
|
|
71
|
+
}
|
|
50
72
|
var _default = exports.default = (0, _data.combineReducers)({
|
|
51
73
|
actions,
|
|
74
|
+
fields,
|
|
52
75
|
isReady
|
|
53
76
|
});
|
|
54
77
|
//# sourceMappingURL=reducer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_data","require","isReady","state","action","type","kind","name","actions","_state$action$kind$ac","filter","_action","id","config","_state$action$kind$ac2","actionId","_default","exports","default","combineReducers"],"sources":["@wordpress/editor/src/dataviews/store/reducer.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\nimport type { Action } from '@wordpress/dataviews';\n\ntype ReduxAction =\n\t| ReturnType< typeof import('./private-actions').registerEntityAction >\n\t| ReturnType< typeof import('./private-actions').unregisterEntityAction >\n\t| ReturnType< typeof import('./private-actions').setIsReady >;\n\nexport type ActionState = Record< string, Record< string, Action< any >[] > >;\nexport type ReadyState = Record< string, Record< string, boolean > >;\nexport type State = {\n\tactions: ActionState;\n\tisReady: ReadyState;\n};\n\nfunction isReady( state: ReadyState = {}, action: ReduxAction ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_READY':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t...state[ action.kind ],\n\t\t\t\t\t[ action.name ]: true,\n\t\t\t\t},\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\nfunction actions( state: ActionState = {}, action: ReduxAction ) {\n\tswitch ( action.type ) {\n\t\tcase 'REGISTER_ENTITY_ACTION':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t...state[ action.kind ],\n\t\t\t\t\t[ action.name ]: [\n\t\t\t\t\t\t...(\n\t\t\t\t\t\t\tstate[ action.kind ]?.[ action.name ] ?? []\n\t\t\t\t\t\t).filter(\n\t\t\t\t\t\t\t( _action ) => _action.id !== action.config.id\n\t\t\t\t\t\t),\n\t\t\t\t\t\taction.config,\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t};\n\t\tcase 'UNREGISTER_ENTITY_ACTION': {\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t...state[ action.kind ],\n\t\t\t\t\t[ action.name ]: (\n\t\t\t\t\t\tstate[ action.kind ]?.[ action.name ] ?? []\n\t\t\t\t\t).filter( ( _action ) => _action.id !== action.actionId ),\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t}\n\n\treturn state;\n}\n\nexport default combineReducers( {\n\tactions,\n\tisReady,\n} );\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["_data","require","isReady","state","action","type","kind","name","actions","_state$action$kind$ac","filter","_action","id","config","_state$action$kind$ac2","actionId","fields","_state$action$kind$ac3","_state$action$kind$ac4","_field","fieldId","_default","exports","default","combineReducers"],"sources":["@wordpress/editor/src/dataviews/store/reducer.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\nimport type { Action, Field } from '@wordpress/dataviews';\n\ntype ReduxAction =\n\t| ReturnType< typeof import('./private-actions').registerEntityAction >\n\t| ReturnType< typeof import('./private-actions').unregisterEntityAction >\n\t| ReturnType< typeof import('./private-actions').registerEntityField >\n\t| ReturnType< typeof import('./private-actions').unregisterEntityField >\n\t| ReturnType< typeof import('./private-actions').setIsReady >;\n\nexport type ActionState = Record< string, Record< string, Action< any >[] > >;\nexport type FieldsState = Record< string, Record< string, Field< any >[] > >;\nexport type ReadyState = Record< string, Record< string, boolean > >;\nexport type State = {\n\tactions: ActionState;\n\tfields: FieldsState;\n\tisReady: ReadyState;\n};\n\nfunction isReady( state: ReadyState = {}, action: ReduxAction ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_READY':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t...state[ action.kind ],\n\t\t\t\t\t[ action.name ]: true,\n\t\t\t\t},\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\nfunction actions( state: ActionState = {}, action: ReduxAction ) {\n\tswitch ( action.type ) {\n\t\tcase 'REGISTER_ENTITY_ACTION':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t...state[ action.kind ],\n\t\t\t\t\t[ action.name ]: [\n\t\t\t\t\t\t...(\n\t\t\t\t\t\t\tstate[ action.kind ]?.[ action.name ] ?? []\n\t\t\t\t\t\t).filter(\n\t\t\t\t\t\t\t( _action ) => _action.id !== action.config.id\n\t\t\t\t\t\t),\n\t\t\t\t\t\taction.config,\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t};\n\t\tcase 'UNREGISTER_ENTITY_ACTION': {\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t...state[ action.kind ],\n\t\t\t\t\t[ action.name ]: (\n\t\t\t\t\t\tstate[ action.kind ]?.[ action.name ] ?? []\n\t\t\t\t\t).filter( ( _action ) => _action.id !== action.actionId ),\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t}\n\n\treturn state;\n}\n\nfunction fields( state: FieldsState = {}, action: ReduxAction ) {\n\tswitch ( action.type ) {\n\t\tcase 'REGISTER_ENTITY_FIELD':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t...state[ action.kind ],\n\t\t\t\t\t[ action.name ]: [\n\t\t\t\t\t\t...(\n\t\t\t\t\t\t\tstate[ action.kind ]?.[ action.name ] ?? []\n\t\t\t\t\t\t).filter(\n\t\t\t\t\t\t\t( _field ) => _field.id !== action.config.id\n\t\t\t\t\t\t),\n\t\t\t\t\t\taction.config,\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t};\n\t\tcase 'UNREGISTER_ENTITY_FIELD':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t...state[ action.kind ],\n\t\t\t\t\t[ action.name ]: (\n\t\t\t\t\t\tstate[ action.kind ]?.[ action.name ] ?? []\n\t\t\t\t\t).filter( ( _field ) => _field.id !== action.fieldId ),\n\t\t\t\t},\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\nexport default combineReducers( {\n\tactions,\n\tfields,\n\tisReady,\n} );\n"],"mappings":"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","ignoreList":[]}
|
package/build/private-apis.js
CHANGED
|
@@ -16,11 +16,13 @@ var _plugin = _interopRequireDefault(require("./components/post-excerpt/plugin")
|
|
|
16
16
|
var _postCardPanel = _interopRequireDefault(require("./components/post-card-panel"));
|
|
17
17
|
var _preferencesModal = _interopRequireDefault(require("./components/preferences-modal"));
|
|
18
18
|
var _actions = require("./components/post-actions/actions");
|
|
19
|
+
var _postFields = _interopRequireDefault(require("./components/post-fields"));
|
|
19
20
|
var _toolsMoreMenuGroup = _interopRequireDefault(require("./components/more-menu/tools-more-menu-group"));
|
|
20
21
|
var _viewMoreMenuGroup = _interopRequireDefault(require("./components/more-menu/view-more-menu-group"));
|
|
21
22
|
var _resizableEditor = _interopRequireDefault(require("./components/resizable-editor"));
|
|
22
23
|
var _globalStylesProvider = require("./components/global-styles-provider");
|
|
23
24
|
var _api = require("./bindings/api");
|
|
25
|
+
var _getTemplateInfo = require("./utils/get-template-info");
|
|
24
26
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
25
27
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
26
28
|
/**
|
|
@@ -48,10 +50,12 @@ const privateApis = exports.privateApis = {};
|
|
|
48
50
|
PostCardPanel: _postCardPanel.default,
|
|
49
51
|
PreferencesModal: _preferencesModal.default,
|
|
50
52
|
usePostActions: _actions.usePostActions,
|
|
53
|
+
usePostFields: _postFields.default,
|
|
51
54
|
ToolsMoreMenuGroup: _toolsMoreMenuGroup.default,
|
|
52
55
|
ViewMoreMenuGroup: _viewMoreMenuGroup.default,
|
|
53
56
|
ResizableEditor: _resizableEditor.default,
|
|
54
57
|
registerCoreBlockBindingsSources: _api.registerCoreBlockBindingsSources,
|
|
58
|
+
getTemplateInfo: _getTemplateInfo.getTemplateInfo,
|
|
55
59
|
// This is a temporary private API while we're updating the site editor to use EditorProvider.
|
|
56
60
|
interfaceStore,
|
|
57
61
|
...remainingInterfaceApis
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["interfaceApis","_interopRequireWildcard","require","_lockUnlock","_entitiesSavedStates","_contentSlotFill","_interopRequireDefault","_backButton","_createTemplatePartModal","_editor","_plugin","_postCardPanel","_preferencesModal","_actions","_toolsMoreMenuGroup","_viewMoreMenuGroup","_resizableEditor","_globalStylesProvider","_api","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","store","interfaceStore","remainingInterfaceApis","privateApis","exports","lock","CreateTemplatePartModal","BackButton","EntitiesSavedStatesExtensible","Editor","EditorContentSlotFill","GlobalStylesProvider","mergeBaseAndUserConfigs","PluginPostExcerpt","PostCardPanel","PreferencesModal","usePostActions","ToolsMoreMenuGroup","ViewMoreMenuGroup","ResizableEditor","registerCoreBlockBindingsSources"],"sources":["@wordpress/editor/src/private-apis.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport * as interfaceApis from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { lock } from './lock-unlock';\nimport { EntitiesSavedStatesExtensible } from './components/entities-saved-states';\nimport EditorContentSlotFill from './components/editor-interface/content-slot-fill';\nimport BackButton from './components/header/back-button';\nimport CreateTemplatePartModal from './components/create-template-part-modal';\nimport Editor from './components/editor';\nimport PluginPostExcerpt from './components/post-excerpt/plugin';\nimport PostCardPanel from './components/post-card-panel';\nimport PreferencesModal from './components/preferences-modal';\nimport { usePostActions } from './components/post-actions/actions';\nimport ToolsMoreMenuGroup from './components/more-menu/tools-more-menu-group';\nimport ViewMoreMenuGroup from './components/more-menu/view-more-menu-group';\nimport ResizableEditor from './components/resizable-editor';\nimport {\n\tmergeBaseAndUserConfigs,\n\tGlobalStylesProvider,\n} from './components/global-styles-provider';\nimport { registerCoreBlockBindingsSources } from './bindings/api';\n\nconst { store: interfaceStore, ...remainingInterfaceApis } = interfaceApis;\n\nexport const privateApis = {};\nlock( privateApis, {\n\tCreateTemplatePartModal,\n\tBackButton,\n\tEntitiesSavedStatesExtensible,\n\tEditor,\n\tEditorContentSlotFill,\n\tGlobalStylesProvider,\n\tmergeBaseAndUserConfigs,\n\tPluginPostExcerpt,\n\tPostCardPanel,\n\tPreferencesModal,\n\tusePostActions,\n\tToolsMoreMenuGroup,\n\tViewMoreMenuGroup,\n\tResizableEditor,\n\tregisterCoreBlockBindingsSources,\n\n\t// This is a temporary private API while we're updating the site editor to use EditorProvider.\n\tinterfaceStore,\n\t...remainingInterfaceApis,\n} );\n"],"mappings":";;;;;;;AAGA,IAAAA,aAAA,GAAAC,uBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,wBAAA,GAAAF,sBAAA,CAAAJ,OAAA;AACA,IAAAO,OAAA,GAAAH,sBAAA,CAAAJ,OAAA;AACA,IAAAQ,OAAA,GAAAJ,sBAAA,CAAAJ,OAAA;AACA,IAAAS,cAAA,GAAAL,sBAAA,CAAAJ,OAAA;AACA,IAAAU,iBAAA,GAAAN,sBAAA,CAAAJ,OAAA;AACA,IAAAW,QAAA,GAAAX,OAAA;AACA,IAAAY,
|
|
1
|
+
{"version":3,"names":["interfaceApis","_interopRequireWildcard","require","_lockUnlock","_entitiesSavedStates","_contentSlotFill","_interopRequireDefault","_backButton","_createTemplatePartModal","_editor","_plugin","_postCardPanel","_preferencesModal","_actions","_postFields","_toolsMoreMenuGroup","_viewMoreMenuGroup","_resizableEditor","_globalStylesProvider","_api","_getTemplateInfo","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","store","interfaceStore","remainingInterfaceApis","privateApis","exports","lock","CreateTemplatePartModal","BackButton","EntitiesSavedStatesExtensible","Editor","EditorContentSlotFill","GlobalStylesProvider","mergeBaseAndUserConfigs","PluginPostExcerpt","PostCardPanel","PreferencesModal","usePostActions","usePostFields","ToolsMoreMenuGroup","ViewMoreMenuGroup","ResizableEditor","registerCoreBlockBindingsSources","getTemplateInfo"],"sources":["@wordpress/editor/src/private-apis.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport * as interfaceApis from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { lock } from './lock-unlock';\nimport { EntitiesSavedStatesExtensible } from './components/entities-saved-states';\nimport EditorContentSlotFill from './components/editor-interface/content-slot-fill';\nimport BackButton from './components/header/back-button';\nimport CreateTemplatePartModal from './components/create-template-part-modal';\nimport Editor from './components/editor';\nimport PluginPostExcerpt from './components/post-excerpt/plugin';\nimport PostCardPanel from './components/post-card-panel';\nimport PreferencesModal from './components/preferences-modal';\nimport { usePostActions } from './components/post-actions/actions';\nimport usePostFields from './components/post-fields';\nimport ToolsMoreMenuGroup from './components/more-menu/tools-more-menu-group';\nimport ViewMoreMenuGroup from './components/more-menu/view-more-menu-group';\nimport ResizableEditor from './components/resizable-editor';\nimport {\n\tmergeBaseAndUserConfigs,\n\tGlobalStylesProvider,\n} from './components/global-styles-provider';\nimport { registerCoreBlockBindingsSources } from './bindings/api';\nimport { getTemplateInfo } from './utils/get-template-info';\n\nconst { store: interfaceStore, ...remainingInterfaceApis } = interfaceApis;\n\nexport const privateApis = {};\nlock( privateApis, {\n\tCreateTemplatePartModal,\n\tBackButton,\n\tEntitiesSavedStatesExtensible,\n\tEditor,\n\tEditorContentSlotFill,\n\tGlobalStylesProvider,\n\tmergeBaseAndUserConfigs,\n\tPluginPostExcerpt,\n\tPostCardPanel,\n\tPreferencesModal,\n\tusePostActions,\n\tusePostFields,\n\tToolsMoreMenuGroup,\n\tViewMoreMenuGroup,\n\tResizableEditor,\n\tregisterCoreBlockBindingsSources,\n\tgetTemplateInfo,\n\t// This is a temporary private API while we're updating the site editor to use EditorProvider.\n\tinterfaceStore,\n\t...remainingInterfaceApis,\n} );\n"],"mappings":"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","ignoreList":[]}
|
package/build/store/actions.js
CHANGED
|
@@ -61,9 +61,9 @@ var _lockUnlock = require("../lock-unlock");
|
|
|
61
61
|
* Returns an action generator used in signalling that editor has initialized with
|
|
62
62
|
* the specified post object and editor settings.
|
|
63
63
|
*
|
|
64
|
-
* @param {Object} post
|
|
65
|
-
* @param {Object} edits
|
|
66
|
-
* @param {Array
|
|
64
|
+
* @param {Object} post Post object.
|
|
65
|
+
* @param {Object} edits Initial edited attributes object.
|
|
66
|
+
* @param {Array} [template] Block Template.
|
|
67
67
|
*/
|
|
68
68
|
const setupEditor = (post, edits, template) => ({
|
|
69
69
|
dispatch
|
|
@@ -182,8 +182,8 @@ function setEditedPost(postType, postId) {
|
|
|
182
182
|
* Returns an action object used in signalling that attributes of the post have
|
|
183
183
|
* been edited.
|
|
184
184
|
*
|
|
185
|
-
* @param {Object} edits
|
|
186
|
-
* @param {Object} options Options for the edit.
|
|
185
|
+
* @param {Object} edits Post attributes to edit.
|
|
186
|
+
* @param {Object} [options] Options for the edit.
|
|
187
187
|
*
|
|
188
188
|
* @example
|
|
189
189
|
* ```js
|
|
@@ -222,7 +222,7 @@ const editPost = (edits, options) => ({
|
|
|
222
222
|
/**
|
|
223
223
|
* Action for saving the current post in the editor.
|
|
224
224
|
*
|
|
225
|
-
* @param {Object} options
|
|
225
|
+
* @param {Object} [options]
|
|
226
226
|
*/
|
|
227
227
|
exports.editPost = editPost;
|
|
228
228
|
const savePost = (options = {}) => async ({
|
|
@@ -375,7 +375,8 @@ const trashPost = () => async ({
|
|
|
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
|
exports.trashPost = trashPost;
|
|
381
382
|
const autosave = ({
|
|
@@ -609,8 +610,8 @@ function unlockPostAutosaving(lockName) {
|
|
|
609
610
|
/**
|
|
610
611
|
* Returns an action object used to signal that the blocks have been updated.
|
|
611
612
|
*
|
|
612
|
-
* @param {Array}
|
|
613
|
-
* @param {
|
|
613
|
+
* @param {Array} blocks Block Array.
|
|
614
|
+
* @param {Object} [options] Optional options.
|
|
614
615
|
*/
|
|
615
616
|
const resetEditorBlocks = (blocks, options = {}) => ({
|
|
616
617
|
select,
|
|
@@ -837,6 +838,7 @@ const toggleDistractionFree = ({
|
|
|
837
838
|
registry.dispatch(_preferences.store).set('core', 'fixedToolbar', true);
|
|
838
839
|
dispatch.setIsInserterOpened(false);
|
|
839
840
|
dispatch.setIsListViewOpened(false);
|
|
841
|
+
(0, _lockUnlock.unlock)(registry.dispatch(_blockEditor.store)).resetZoomLevel();
|
|
840
842
|
});
|
|
841
843
|
}
|
|
842
844
|
registry.batch(() => {
|