@wordpress/editor 13.16.0 → 13.17.1
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/build/components/autocompleters/index.js +0 -2
- package/build/components/autocompleters/index.js.map +1 -1
- package/build/components/autocompleters/user.js +2 -9
- package/build/components/autocompleters/user.js.map +1 -1
- package/build/components/autosave-monitor/index.js +0 -24
- package/build/components/autosave-monitor/index.js.map +1 -1
- package/build/components/character-count/index.js +1 -4
- package/build/components/character-count/index.js.map +1 -1
- package/build/components/deprecated.js +1 -11
- package/build/components/deprecated.js.map +1 -1
- package/build/components/deprecated.native.js +0 -1
- package/build/components/deprecated.native.js.map +1 -1
- package/build/components/document-outline/check.js +1 -7
- package/build/components/document-outline/check.js.map +1 -1
- package/build/components/document-outline/index.js +7 -24
- package/build/components/document-outline/index.js.map +1 -1
- package/build/components/document-outline/item.js +1 -5
- package/build/components/document-outline/item.js.map +1 -1
- package/build/components/editor-help/add-blocks.native.js +1 -8
- package/build/components/editor-help/add-blocks.native.js.map +1 -1
- package/build/components/editor-help/customize-blocks.native.js +1 -8
- package/build/components/editor-help/customize-blocks.native.js.map +1 -1
- package/build/components/editor-help/help-detail-navigation-screen.native.js +5 -13
- package/build/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
- package/build/components/editor-help/help-get-support-button.native.js +1 -7
- package/build/components/editor-help/help-get-support-button.native.js.map +1 -1
- package/build/components/editor-help/help-section-title.native.js +1 -7
- package/build/components/editor-help/help-section-title.native.js.map +1 -1
- package/build/components/editor-help/help-topic-row.native.js +1 -8
- package/build/components/editor-help/help-topic-row.native.js.map +1 -1
- package/build/components/editor-help/icon-move-blocks.native.js +0 -4
- package/build/components/editor-help/icon-move-blocks.native.js.map +1 -1
- package/build/components/editor-help/index.native.js +8 -29
- package/build/components/editor-help/index.native.js.map +1 -1
- package/build/components/editor-help/intro-to-blocks.native.js +1 -9
- package/build/components/editor-help/intro-to-blocks.native.js.map +1 -1
- package/build/components/editor-help/move-blocks.native.js +1 -8
- package/build/components/editor-help/move-blocks.native.js.map +1 -1
- package/build/components/editor-help/remove-blocks.native.js +1 -8
- package/build/components/editor-help/remove-blocks.native.js.map +1 -1
- package/build/components/editor-help/view-sections.native.js +1 -12
- package/build/components/editor-help/view-sections.native.js.map +1 -1
- package/build/components/editor-history/redo.js +6 -14
- package/build/components/editor-history/redo.js.map +1 -1
- package/build/components/editor-history/undo.js +6 -14
- package/build/components/editor-history/undo.js.map +1 -1
- package/build/components/editor-notices/index.js +1 -10
- package/build/components/editor-notices/index.js.map +1 -1
- package/build/components/editor-snackbars/index.js +1 -5
- package/build/components/editor-snackbars/index.js.map +1 -1
- package/build/components/entities-saved-states/entity-record-item.js +3 -10
- package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
- package/build/components/entities-saved-states/entity-type-list.js +3 -15
- package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
- package/build/components/entities-saved-states/hooks/use-is-dirty.js +20 -24
- package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
- package/build/components/entities-saved-states/index.js +8 -27
- package/build/components/entities-saved-states/index.js.map +1 -1
- package/build/components/error-boundary/index.js +1 -18
- package/build/components/error-boundary/index.js.map +1 -1
- package/build/components/global-keyboard-shortcuts/index.js +5 -9
- package/build/components/global-keyboard-shortcuts/index.js.map +1 -1
- package/build/components/global-keyboard-shortcuts/register-shortcuts.js +1 -8
- package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
- package/build/components/index.js +4 -76
- package/build/components/index.js.map +1 -1
- package/build/components/index.native.js +0 -9
- package/build/components/index.native.js.map +1 -1
- package/build/components/local-autosave-monitor/index.js +6 -31
- package/build/components/local-autosave-monitor/index.js.map +1 -1
- package/build/components/media-categories/index.js +30 -45
- package/build/components/media-categories/index.js.map +1 -1
- package/build/components/page-attributes/check.js +3 -7
- package/build/components/page-attributes/check.js.map +1 -1
- package/build/components/page-attributes/order.js +17 -42
- package/build/components/page-attributes/order.js.map +1 -1
- package/build/components/page-attributes/parent.js +8 -34
- package/build/components/page-attributes/parent.js.map +1 -1
- package/build/components/post-author/check.js +1 -11
- package/build/components/post-author/check.js.map +1 -1
- package/build/components/post-author/combobox.js +7 -23
- package/build/components/post-author/combobox.js.map +1 -1
- package/build/components/post-author/constants.js +0 -1
- package/build/components/post-author/constants.js.map +1 -1
- package/build/components/post-author/index.js +1 -12
- package/build/components/post-author/index.js.map +1 -1
- package/build/components/post-author/select.js +1 -12
- package/build/components/post-author/select.js.map +1 -1
- package/build/components/post-comments/index.js +1 -10
- package/build/components/post-comments/index.js.map +1 -1
- package/build/components/post-excerpt/check.js +6 -8
- package/build/components/post-excerpt/check.js.map +1 -1
- package/build/components/post-excerpt/index.js +1 -7
- package/build/components/post-excerpt/index.js.map +1 -1
- package/build/components/post-featured-image/check.js +6 -9
- package/build/components/post-featured-image/check.js.map +1 -1
- package/build/components/post-featured-image/index.js +13 -42
- package/build/components/post-featured-image/index.js.map +1 -1
- package/build/components/post-format/check.js +9 -18
- package/build/components/post-format/check.js.map +1 -1
- package/build/components/post-format/index.js +2 -20
- package/build/components/post-format/index.js.map +1 -1
- package/build/components/post-last-revision/check.js +15 -22
- package/build/components/post-last-revision/check.js.map +1 -1
- package/build/components/post-last-revision/index.js +17 -28
- package/build/components/post-last-revision/index.js.map +1 -1
- package/build/components/post-locked-modal/index.js +8 -28
- package/build/components/post-locked-modal/index.js.map +1 -1
- package/build/components/post-pending-status/check.js +16 -24
- package/build/components/post-pending-status/check.js.map +1 -1
- package/build/components/post-pending-status/index.js +10 -28
- package/build/components/post-pending-status/index.js.map +1 -1
- package/build/components/post-pingbacks/index.js +1 -10
- package/build/components/post-pingbacks/index.js.map +1 -1
- package/build/components/post-preview-button/index.js +11 -22
- package/build/components/post-preview-button/index.js.map +1 -1
- package/build/components/post-publish-button/index.js +6 -32
- package/build/components/post-publish-button/index.js.map +1 -1
- package/build/components/post-publish-button/label.js +1 -10
- package/build/components/post-publish-button/label.js.map +1 -1
- package/build/components/post-publish-panel/index.js +1 -22
- package/build/components/post-publish-panel/index.js.map +1 -1
- package/build/components/post-publish-panel/maybe-category-panel.js +4 -14
- package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-post-format-panel.js +2 -18
- package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-tags-panel.js +2 -17
- package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-upload-media.js +1 -18
- package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
- package/build/components/post-publish-panel/postpublish.js +3 -27
- package/build/components/post-publish-panel/postpublish.js.map +1 -1
- package/build/components/post-publish-panel/prepublish.js +1 -26
- package/build/components/post-publish-panel/prepublish.js.map +1 -1
- package/build/components/post-saved-state/index.js +12 -29
- package/build/components/post-saved-state/index.js.map +1 -1
- package/build/components/post-schedule/check.js +1 -8
- package/build/components/post-schedule/check.js.map +1 -1
- package/build/components/post-schedule/index.js +7 -13
- package/build/components/post-schedule/index.js.map +1 -1
- package/build/components/post-schedule/label.js +18 -29
- package/build/components/post-schedule/label.js.map +1 -1
- package/build/components/post-slug/check.js +1 -4
- package/build/components/post-slug/check.js.map +1 -1
- package/build/components/post-slug/index.js +1 -19
- package/build/components/post-slug/index.js.map +1 -1
- package/build/components/post-sticky/check.js +1 -8
- package/build/components/post-sticky/check.js.map +1 -1
- package/build/components/post-sticky/index.js +1 -12
- package/build/components/post-sticky/index.js.map +1 -1
- package/build/components/post-switch-to-draft-button/index.js +1 -14
- package/build/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build/components/post-sync-status/index.js +5 -18
- package/build/components/post-sync-status/index.js.map +1 -1
- package/build/components/post-taxonomies/check.js +1 -9
- package/build/components/post-taxonomies/check.js.map +1 -1
- package/build/components/post-taxonomies/flat-term-selector.js +15 -50
- package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/hierarchical-term-selector.js +27 -79
- package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/index.js +3 -13
- package/build/components/post-taxonomies/index.js.map +1 -1
- package/build/components/post-taxonomies/most-used-terms.js +1 -9
- package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
- package/build/components/post-template/index.js +1 -11
- package/build/components/post-template/index.js.map +1 -1
- package/build/components/post-text-editor/index.js +3 -17
- package/build/components/post-text-editor/index.js.map +1 -1
- package/build/components/post-title/index.js +14 -46
- package/build/components/post-title/index.js.map +1 -1
- package/build/components/post-title/index.native.js +7 -44
- package/build/components/post-title/index.native.js.map +1 -1
- package/build/components/post-trash/check.js +1 -7
- package/build/components/post-trash/check.js.map +1 -1
- package/build/components/post-trash/index.js +1 -8
- package/build/components/post-trash/index.js.map +1 -1
- package/build/components/post-type-support-check/index.js +0 -9
- package/build/components/post-type-support-check/index.js.map +1 -1
- package/build/components/post-url/check.js +1 -12
- package/build/components/post-url/check.js.map +1 -1
- package/build/components/post-url/index.js +3 -15
- package/build/components/post-url/index.js.map +1 -1
- package/build/components/post-url/label.js +1 -5
- package/build/components/post-url/label.js.map +1 -1
- package/build/components/post-visibility/check.js +1 -7
- package/build/components/post-visibility/check.js.map +1 -1
- package/build/components/post-visibility/index.js +1 -17
- package/build/components/post-visibility/index.js.map +1 -1
- package/build/components/post-visibility/label.js +1 -5
- package/build/components/post-visibility/label.js.map +1 -1
- package/build/components/post-visibility/utils.js +1 -2
- package/build/components/post-visibility/utils.js.map +1 -1
- package/build/components/provider/index.js +13 -27
- package/build/components/provider/index.js.map +1 -1
- package/build/components/provider/index.native.js +18 -70
- package/build/components/provider/index.native.js.map +1 -1
- package/build/components/provider/use-block-editor-settings.js +9 -20
- package/build/components/provider/use-block-editor-settings.js.map +1 -1
- package/build/components/provider/use-block-editor-settings.native.js +5 -11
- package/build/components/provider/use-block-editor-settings.native.js.map +1 -1
- package/build/components/provider/with-registry-provider.js +5 -12
- package/build/components/provider/with-registry-provider.js.map +1 -1
- package/build/components/table-of-contents/index.js +4 -14
- package/build/components/table-of-contents/index.js.map +1 -1
- package/build/components/table-of-contents/panel.js +1 -13
- package/build/components/table-of-contents/panel.js.map +1 -1
- package/build/components/template-validation-notice/index.js +3 -12
- package/build/components/template-validation-notice/index.js.map +1 -1
- package/build/components/theme-support-check/index.js +3 -12
- package/build/components/theme-support-check/index.js.map +1 -1
- package/build/components/time-to-read/index.js +2 -10
- package/build/components/time-to-read/index.js.map +1 -1
- package/build/components/unsaved-changes-warning/index.js +21 -35
- package/build/components/unsaved-changes-warning/index.js.map +1 -1
- package/build/components/word-count/index.js +2 -7
- package/build/components/word-count/index.js.map +1 -1
- package/build/hooks/custom-sources-backwards-compatibility.js +7 -18
- package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
- package/build/hooks/default-autocompleters.js +3 -4
- package/build/hooks/default-autocompleters.js.map +1 -1
- package/build/hooks/index.js +0 -1
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/index.native.js.map +1 -1
- package/build/index.js +0 -9
- package/build/index.js.map +1 -1
- package/build/index.native.js +0 -11
- package/build/index.native.js.map +1 -1
- package/build/lock-unlock.js +1 -2
- package/build/lock-unlock.js.map +1 -1
- package/build/private-apis.js +1 -4
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +60 -129
- package/build/store/actions.js.map +1 -1
- package/build/store/actions.native.js +1 -8
- package/build/store/actions.native.js.map +1 -1
- package/build/store/constants.js +1 -2
- package/build/store/constants.js.map +1 -1
- package/build/store/defaults.js +2 -3
- package/build/store/defaults.js.map +1 -1
- package/build/store/index.js +3 -11
- package/build/store/index.js.map +1 -1
- package/build/store/local-autosave.js +0 -4
- package/build/store/local-autosave.js.map +1 -1
- package/build/store/reducer.js +19 -49
- package/build/store/reducer.js.map +1 -1
- package/build/store/reducer.native.js +3 -17
- package/build/store/reducer.native.js.map +1 -1
- package/build/store/selectors.js +169 -295
- package/build/store/selectors.js.map +1 -1
- package/build/store/selectors.native.js +4 -11
- package/build/store/selectors.native.js.map +1 -1
- package/build/store/utils/notice-builder.js +13 -24
- package/build/store/utils/notice-builder.js.map +1 -1
- package/build/utils/get-template-part-icon.js +0 -3
- package/build/utils/get-template-part-icon.js.map +1 -1
- package/build/utils/index.js +0 -4
- package/build/utils/index.js.map +1 -1
- package/build/utils/index.native.js +0 -2
- package/build/utils/index.native.js.map +1 -1
- package/build/utils/media-upload/index.js +2 -6
- package/build/utils/media-upload/index.js.map +1 -1
- package/build/utils/media-upload/index.native.js +0 -1
- package/build/utils/media-upload/index.native.js.map +1 -1
- package/build/utils/terms.js +8 -18
- package/build/utils/terms.js.map +1 -1
- package/build/utils/url.js +0 -4
- package/build/utils/url.js.map +1 -1
- package/build-module/components/autocompleters/index.js.map +1 -1
- package/build-module/components/autocompleters/user.js +2 -5
- package/build-module/components/autocompleters/user.js.map +1 -1
- package/build-module/components/autosave-monitor/index.js +2 -17
- package/build-module/components/autosave-monitor/index.js.map +1 -1
- package/build-module/components/character-count/index.js +1 -1
- package/build-module/components/character-count/index.js.map +1 -1
- package/build-module/components/deprecated.js +0 -4
- package/build-module/components/deprecated.js.map +1 -1
- package/build-module/components/deprecated.native.js +0 -1
- package/build-module/components/deprecated.native.js.map +1 -1
- package/build-module/components/document-outline/check.js +0 -4
- package/build-module/components/document-outline/check.js.map +1 -1
- package/build-module/components/document-outline/index.js +9 -13
- package/build-module/components/document-outline/index.js.map +1 -1
- package/build-module/components/document-outline/item.js +0 -3
- package/build-module/components/document-outline/item.js.map +1 -1
- package/build-module/components/editor-help/add-blocks.native.js +2 -5
- package/build-module/components/editor-help/add-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/customize-blocks.native.js +2 -5
- package/build-module/components/editor-help/customize-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/help-detail-navigation-screen.native.js +6 -8
- package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
- package/build-module/components/editor-help/help-get-support-button.native.js +2 -5
- package/build-module/components/editor-help/help-get-support-button.native.js.map +1 -1
- package/build-module/components/editor-help/help-section-title.native.js +2 -5
- package/build-module/components/editor-help/help-section-title.native.js.map +1 -1
- package/build-module/components/editor-help/help-topic-row.native.js +1 -6
- package/build-module/components/editor-help/help-topic-row.native.js.map +1 -1
- package/build-module/components/editor-help/icon-move-blocks.native.js +0 -1
- package/build-module/components/editor-help/icon-move-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/index.native.js +9 -9
- package/build-module/components/editor-help/index.native.js.map +1 -1
- package/build-module/components/editor-help/intro-to-blocks.native.js +2 -5
- package/build-module/components/editor-help/intro-to-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/move-blocks.native.js +2 -5
- package/build-module/components/editor-help/move-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/remove-blocks.native.js +2 -5
- package/build-module/components/editor-help/remove-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/view-sections.native.js +2 -4
- package/build-module/components/editor-help/view-sections.native.js.map +1 -1
- package/build-module/components/editor-history/redo.js +6 -8
- package/build-module/components/editor-history/redo.js.map +1 -1
- package/build-module/components/editor-history/undo.js +6 -8
- package/build-module/components/editor-history/undo.js.map +1 -1
- package/build-module/components/editor-notices/index.js +1 -2
- package/build-module/components/editor-notices/index.js.map +1 -1
- package/build-module/components/editor-snackbars/index.js +0 -1
- package/build-module/components/editor-snackbars/index.js.map +1 -1
- package/build-module/components/entities-saved-states/entity-record-item.js +3 -4
- package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
- package/build-module/components/entities-saved-states/entity-type-list.js +3 -10
- package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
- package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +20 -18
- package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
- package/build-module/components/entities-saved-states/index.js +8 -16
- package/build-module/components/entities-saved-states/index.js.map +1 -1
- package/build-module/components/error-boundary/index.js +1 -12
- package/build-module/components/error-boundary/index.js.map +1 -1
- package/build-module/components/global-keyboard-shortcuts/index.js +5 -6
- package/build-module/components/global-keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +0 -3
- package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
- package/build-module/components/index.js +6 -3
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/index.native.js +4 -2
- package/build-module/components/index.native.js.map +1 -1
- package/build-module/components/local-autosave-monitor/index.js +6 -21
- package/build-module/components/local-autosave-monitor/index.js.map +1 -1
- package/build-module/components/media-categories/index.js +31 -41
- package/build-module/components/media-categories/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 +17 -31
- package/build-module/components/page-attributes/order.js.map +1 -1
- package/build-module/components/page-attributes/parent.js +9 -23
- package/build-module/components/page-attributes/parent.js.map +1 -1
- package/build-module/components/post-author/check.js +1 -5
- package/build-module/components/post-author/check.js.map +1 -1
- package/build-module/components/post-author/combobox.js +7 -16
- package/build-module/components/post-author/combobox.js.map +1 -1
- package/build-module/components/post-author/constants.js +0 -1
- package/build-module/components/post-author/constants.js.map +1 -1
- package/build-module/components/post-author/index.js +1 -6
- package/build-module/components/post-author/index.js.map +1 -1
- package/build-module/components/post-author/select.js +1 -6
- package/build-module/components/post-author/select.js.map +1 -1
- package/build-module/components/post-comments/index.js +1 -7
- package/build-module/components/post-comments/index.js.map +1 -1
- package/build-module/components/post-excerpt/check.js +5 -6
- package/build-module/components/post-excerpt/check.js.map +1 -1
- package/build-module/components/post-excerpt/index.js +1 -4
- package/build-module/components/post-excerpt/index.js.map +1 -1
- package/build-module/components/post-featured-image/check.js +5 -6
- package/build-module/components/post-featured-image/check.js.map +1 -1
- package/build-module/components/post-featured-image/index.js +13 -31
- package/build-module/components/post-featured-image/index.js.map +1 -1
- package/build-module/components/post-format/check.js +10 -15
- package/build-module/components/post-format/check.js.map +1 -1
- package/build-module/components/post-format/index.js +4 -12
- package/build-module/components/post-format/index.js.map +1 -1
- package/build-module/components/post-last-revision/check.js +17 -17
- package/build-module/components/post-last-revision/check.js.map +1 -1
- package/build-module/components/post-last-revision/index.js +18 -21
- package/build-module/components/post-last-revision/index.js.map +1 -1
- package/build-module/components/post-locked-modal/index.js +8 -22
- package/build-module/components/post-locked-modal/index.js.map +1 -1
- package/build-module/components/post-pending-status/check.js +17 -20
- package/build-module/components/post-pending-status/check.js.map +1 -1
- package/build-module/components/post-pending-status/index.js +11 -20
- package/build-module/components/post-pending-status/index.js.map +1 -1
- package/build-module/components/post-pingbacks/index.js +1 -7
- package/build-module/components/post-pingbacks/index.js.map +1 -1
- package/build-module/components/post-preview-button/index.js +11 -17
- package/build-module/components/post-preview-button/index.js.map +1 -1
- package/build-module/components/post-publish-button/index.js +7 -23
- package/build-module/components/post-publish-button/index.js.map +1 -1
- package/build-module/components/post-publish-button/label.js +1 -4
- package/build-module/components/post-publish-button/label.js.map +1 -1
- package/build-module/components/post-publish-panel/index.js +1 -8
- package/build-module/components/post-publish-panel/index.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-category-panel.js +4 -8
- package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-post-format-panel.js +2 -12
- package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-tags-panel.js +2 -9
- package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-upload-media.js +1 -12
- package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
- package/build-module/components/post-publish-panel/postpublish.js +3 -16
- package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
- package/build-module/components/post-publish-panel/prepublish.js +1 -10
- package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
- package/build-module/components/post-saved-state/index.js +15 -23
- package/build-module/components/post-saved-state/index.js.map +1 -1
- package/build-module/components/post-schedule/check.js +1 -3
- package/build-module/components/post-schedule/check.js.map +1 -1
- package/build-module/components/post-schedule/index.js +8 -8
- package/build-module/components/post-schedule/index.js.map +1 -1
- package/build-module/components/post-schedule/label.js +18 -22
- package/build-module/components/post-schedule/label.js.map +1 -1
- package/build-module/components/post-slug/check.js +0 -1
- package/build-module/components/post-slug/check.js.map +1 -1
- package/build-module/components/post-slug/index.js +1 -8
- package/build-module/components/post-slug/index.js.map +1 -1
- package/build-module/components/post-sticky/check.js +1 -3
- package/build-module/components/post-sticky/check.js.map +1 -1
- package/build-module/components/post-sticky/index.js +1 -3
- package/build-module/components/post-sticky/index.js.map +1 -1
- package/build-module/components/post-switch-to-draft-button/index.js +1 -9
- package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build-module/components/post-sync-status/index.js +5 -11
- package/build-module/components/post-sync-status/index.js.map +1 -1
- package/build-module/components/post-taxonomies/check.js +1 -3
- package/build-module/components/post-taxonomies/check.js.map +1 -1
- package/build-module/components/post-taxonomies/flat-term-selector.js +17 -39
- package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js +29 -66
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/index.js +3 -5
- package/build-module/components/post-taxonomies/index.js.map +1 -1
- package/build-module/components/post-taxonomies/most-used-terms.js +1 -4
- package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
- package/build-module/components/post-template/index.js +1 -5
- package/build-module/components/post-template/index.js.map +1 -1
- package/build-module/components/post-text-editor/index.js +4 -9
- package/build-module/components/post-text-editor/index.js.map +1 -1
- package/build-module/components/post-title/index.js +17 -35
- package/build-module/components/post-title/index.js.map +1 -1
- package/build-module/components/post-title/index.native.js +8 -33
- package/build-module/components/post-title/index.native.js.map +1 -1
- package/build-module/components/post-trash/check.js +1 -4
- package/build-module/components/post-trash/check.js.map +1 -1
- package/build-module/components/post-trash/index.js +1 -4
- package/build-module/components/post-trash/index.js.map +1 -1
- package/build-module/components/post-type-support-check/index.js +3 -6
- package/build-module/components/post-type-support-check/index.js.map +1 -1
- package/build-module/components/post-url/check.js +1 -9
- package/build-module/components/post-url/check.js.map +1 -1
- package/build-module/components/post-url/index.js +3 -8
- 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-visibility/check.js +1 -2
- package/build-module/components/post-visibility/check.js.map +1 -1
- package/build-module/components/post-visibility/index.js +1 -10
- package/build-module/components/post-visibility/index.js.map +1 -1
- package/build-module/components/post-visibility/label.js +1 -1
- package/build-module/components/post-visibility/label.js.map +1 -1
- package/build-module/components/post-visibility/utils.js.map +1 -1
- package/build-module/components/provider/index.js +13 -14
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/provider/index.native.js +21 -52
- package/build-module/components/provider/index.native.js.map +1 -1
- package/build-module/components/provider/use-block-editor-settings.js +9 -12
- package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
- package/build-module/components/provider/use-block-editor-settings.native.js +5 -5
- package/build-module/components/provider/use-block-editor-settings.native.js.map +1 -1
- package/build-module/components/provider/with-registry-provider.js +5 -8
- package/build-module/components/provider/with-registry-provider.js.map +1 -1
- package/build-module/components/table-of-contents/index.js +4 -7
- package/build-module/components/table-of-contents/index.js.map +1 -1
- package/build-module/components/table-of-contents/panel.js +1 -5
- package/build-module/components/table-of-contents/panel.js.map +1 -1
- package/build-module/components/template-validation-notice/index.js +2 -6
- package/build-module/components/template-validation-notice/index.js.map +1 -1
- package/build-module/components/theme-support-check/index.js +3 -7
- package/build-module/components/theme-support-check/index.js.map +1 -1
- package/build-module/components/time-to-read/index.js +4 -7
- package/build-module/components/time-to-read/index.js.map +1 -1
- package/build-module/components/unsaved-changes-warning/index.js +22 -31
- package/build-module/components/unsaved-changes-warning/index.js.map +1 -1
- package/build-module/components/word-count/index.js +2 -4
- package/build-module/components/word-count/index.js.map +1 -1
- package/build-module/hooks/custom-sources-backwards-compatibility.js +9 -15
- package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
- package/build-module/hooks/default-autocompleters.js +3 -4
- package/build-module/hooks/default-autocompleters.js.map +1 -1
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/index.native.js.map +1 -1
- package/build-module/index.js +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +1 -1
- package/build-module/index.native.js.map +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +62 -84
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/actions.native.js +2 -2
- package/build-module/store/actions.native.js.map +1 -1
- package/build-module/store/constants.js +1 -1
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/defaults.js +3 -2
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/index.js +5 -4
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/local-autosave.js +0 -1
- package/build-module/store/local-autosave.js.map +1 -1
- package/build-module/store/reducer.js +21 -33
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/reducer.native.js +4 -10
- package/build-module/store/reducer.native.js.map +1 -1
- package/build-module/store/selectors.js +172 -222
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/selectors.native.js +6 -8
- package/build-module/store/selectors.native.js.map +1 -1
- package/build-module/store/utils/notice-builder.js +15 -21
- package/build-module/store/utils/notice-builder.js.map +1 -1
- package/build-module/utils/get-template-part-icon.js +0 -2
- package/build-module/utils/get-template-part-icon.js.map +1 -1
- package/build-module/utils/index.js.map +1 -1
- package/build-module/utils/index.native.js.map +1 -1
- package/build-module/utils/media-upload/index.js +2 -4
- package/build-module/utils/media-upload/index.js.map +1 -1
- package/build-module/utils/media-upload/index.native.js.map +1 -1
- package/build-module/utils/terms.js +9 -11
- package/build-module/utils/terms.js.map +1 -1
- package/build-module/utils/url.js +1 -1
- package/build-module/utils/url.js.map +1 -1
- package/build-style/style-rtl.css +10 -17
- package/build-style/style.css +10 -17
- package/package.json +32 -31
- package/src/components/editor-help/index.native.js +1 -1
- package/src/components/editor-help/style.scss +5 -0
- package/src/components/entities-saved-states/hooks/use-is-dirty.js +16 -20
- package/src/components/page-attributes/order.js +15 -23
- package/src/components/page-attributes/test/order.js +46 -15
- package/src/components/post-excerpt/check.js +6 -2
- package/src/components/post-featured-image/check.js +4 -2
- package/src/components/post-format/check.js +16 -11
- package/src/components/post-last-revision/check.js +12 -14
- package/src/components/post-last-revision/index.js +12 -10
- package/src/components/post-last-revision/test/check.js +28 -16
- package/src/components/post-pending-status/check.js +13 -19
- package/src/components/post-pending-status/index.js +9 -14
- package/src/components/post-pending-status/test/check.js +32 -10
- package/src/components/post-publish-panel/style.scss +12 -25
- package/src/components/post-sync-status/style.scss +4 -1
- package/src/components/post-type-support-check/index.js +1 -1
- package/src/components/post-type-support-check/test/index.js +1 -1
- package/src/components/provider/index.js +3 -2
- package/src/components/unsaved-changes-warning/index.js +22 -27
|
@@ -9,13 +9,14 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
9
9
|
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
10
10
|
import { applyFilters } from '@wordpress/hooks';
|
|
11
11
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
12
|
+
|
|
12
13
|
/**
|
|
13
14
|
* Internal dependencies
|
|
14
15
|
*/
|
|
15
|
-
|
|
16
16
|
import { TRASH_POST_NOTICE_ID } from './constants';
|
|
17
17
|
import { localAutosaveSet } from './local-autosave';
|
|
18
18
|
import { getNotificationArgumentsForSaveSuccess, getNotificationArgumentsForSaveFail, getNotificationArgumentsForTrashFail } from './utils/notice-builder';
|
|
19
|
+
|
|
19
20
|
/**
|
|
20
21
|
* Returns an action generator used in signalling that editor has initialized with
|
|
21
22
|
* the specified post object and editor settings.
|
|
@@ -24,60 +25,54 @@ import { getNotificationArgumentsForSaveSuccess, getNotificationArgumentsForSave
|
|
|
24
25
|
* @param {Object} edits Initial edited attributes object.
|
|
25
26
|
* @param {Array?} template Block Template.
|
|
26
27
|
*/
|
|
27
|
-
|
|
28
28
|
export const setupEditor = (post, edits, template) => ({
|
|
29
29
|
dispatch
|
|
30
30
|
}) => {
|
|
31
|
-
dispatch.setupEditorState(post);
|
|
32
|
-
|
|
31
|
+
dispatch.setupEditorState(post);
|
|
32
|
+
// Apply a template for new posts only, if exists.
|
|
33
33
|
const isNewPost = post.status === 'auto-draft';
|
|
34
|
-
|
|
35
34
|
if (isNewPost && template) {
|
|
36
35
|
// In order to ensure maximum of a single parse during setup, edits are
|
|
37
36
|
// included as part of editor setup action. Assume edited content as
|
|
38
37
|
// canonical if provided, falling back to post.
|
|
39
38
|
let content;
|
|
40
|
-
|
|
41
39
|
if ('content' in edits) {
|
|
42
40
|
content = edits.content;
|
|
43
41
|
} else {
|
|
44
42
|
content = post.content.raw;
|
|
45
43
|
}
|
|
46
|
-
|
|
47
44
|
let blocks = parse(content);
|
|
48
45
|
blocks = synchronizeBlocksWithTemplate(blocks, template);
|
|
49
46
|
dispatch.resetEditorBlocks(blocks, {
|
|
50
47
|
__unstableShouldCreateUndoLevel: false
|
|
51
48
|
});
|
|
52
49
|
}
|
|
53
|
-
|
|
54
50
|
if (edits && Object.values(edits).some(([key, edit]) => {
|
|
55
51
|
var _post$key$raw;
|
|
56
|
-
|
|
57
52
|
return edit !== ((_post$key$raw = post[key]?.raw) !== null && _post$key$raw !== void 0 ? _post$key$raw : post[key]);
|
|
58
53
|
})) {
|
|
59
54
|
dispatch.editPost(edits);
|
|
60
55
|
}
|
|
61
56
|
};
|
|
57
|
+
|
|
62
58
|
/**
|
|
63
59
|
* Returns an action object signalling that the editor is being destroyed and
|
|
64
60
|
* that any necessary state or side-effect cleanup should occur.
|
|
65
61
|
*
|
|
66
62
|
* @return {Object} Action object.
|
|
67
63
|
*/
|
|
68
|
-
|
|
69
64
|
export function __experimentalTearDownEditor() {
|
|
70
65
|
return {
|
|
71
66
|
type: 'TEAR_DOWN_EDITOR'
|
|
72
67
|
};
|
|
73
68
|
}
|
|
69
|
+
|
|
74
70
|
/**
|
|
75
71
|
* Returns an action object used in signalling that the latest version of the
|
|
76
72
|
* post has been received, either by initialization or save.
|
|
77
73
|
*
|
|
78
74
|
* @deprecated Since WordPress 6.0.
|
|
79
75
|
*/
|
|
80
|
-
|
|
81
76
|
export function resetPost() {
|
|
82
77
|
deprecated("wp.data.dispatch( 'core/editor' ).resetPost", {
|
|
83
78
|
since: '6.0',
|
|
@@ -88,6 +83,7 @@ export function resetPost() {
|
|
|
88
83
|
type: 'DO_NOTHING'
|
|
89
84
|
};
|
|
90
85
|
}
|
|
86
|
+
|
|
91
87
|
/**
|
|
92
88
|
* Returns an action object used in signalling that a patch of updates for the
|
|
93
89
|
* latest version of the post have been received.
|
|
@@ -95,7 +91,6 @@ export function resetPost() {
|
|
|
95
91
|
* @return {Object} Action object.
|
|
96
92
|
* @deprecated since Gutenberg 9.7.0.
|
|
97
93
|
*/
|
|
98
|
-
|
|
99
94
|
export function updatePost() {
|
|
100
95
|
deprecated("wp.data.dispatch( 'core/editor' ).updatePost", {
|
|
101
96
|
since: '5.7',
|
|
@@ -105,6 +100,7 @@ export function updatePost() {
|
|
|
105
100
|
type: 'DO_NOTHING'
|
|
106
101
|
};
|
|
107
102
|
}
|
|
103
|
+
|
|
108
104
|
/**
|
|
109
105
|
* Returns an action object used to setup the editor state when first opening
|
|
110
106
|
* an editor.
|
|
@@ -113,13 +109,13 @@ export function updatePost() {
|
|
|
113
109
|
*
|
|
114
110
|
* @return {Object} Action object.
|
|
115
111
|
*/
|
|
116
|
-
|
|
117
112
|
export function setupEditorState(post) {
|
|
118
113
|
return {
|
|
119
114
|
type: 'SETUP_EDITOR_STATE',
|
|
120
115
|
post
|
|
121
116
|
};
|
|
122
117
|
}
|
|
118
|
+
|
|
123
119
|
/**
|
|
124
120
|
* Returns an action object used in signalling that attributes of the post have
|
|
125
121
|
* been edited.
|
|
@@ -127,7 +123,6 @@ export function setupEditorState(post) {
|
|
|
127
123
|
* @param {Object} edits Post attributes to edit.
|
|
128
124
|
* @param {Object} options Options for the edit.
|
|
129
125
|
*/
|
|
130
|
-
|
|
131
126
|
export const editPost = (edits, options) => ({
|
|
132
127
|
select,
|
|
133
128
|
registry
|
|
@@ -138,12 +133,12 @@ export const editPost = (edits, options) => ({
|
|
|
138
133
|
} = select.getCurrentPost();
|
|
139
134
|
registry.dispatch(coreStore).editEntityRecord('postType', type, id, edits, options);
|
|
140
135
|
};
|
|
136
|
+
|
|
141
137
|
/**
|
|
142
138
|
* Action for saving the current post in the editor.
|
|
143
139
|
*
|
|
144
140
|
* @param {Object} options
|
|
145
141
|
*/
|
|
146
|
-
|
|
147
142
|
export const savePost = (options = {}) => async ({
|
|
148
143
|
select,
|
|
149
144
|
dispatch,
|
|
@@ -152,9 +147,7 @@ export const savePost = (options = {}) => async ({
|
|
|
152
147
|
if (!select.isEditedPostSaveable()) {
|
|
153
148
|
return;
|
|
154
149
|
}
|
|
155
|
-
|
|
156
150
|
const content = select.getEditedPostContent();
|
|
157
|
-
|
|
158
151
|
if (!options.isAutosave) {
|
|
159
152
|
dispatch.editPost({
|
|
160
153
|
content
|
|
@@ -162,7 +155,6 @@ export const savePost = (options = {}) => async ({
|
|
|
162
155
|
undoIgnore: true
|
|
163
156
|
});
|
|
164
157
|
}
|
|
165
|
-
|
|
166
158
|
const previousRecord = select.getCurrentPost();
|
|
167
159
|
const edits = {
|
|
168
160
|
id: previousRecord.id,
|
|
@@ -175,25 +167,21 @@ export const savePost = (options = {}) => async ({
|
|
|
175
167
|
});
|
|
176
168
|
await registry.dispatch(coreStore).saveEntityRecord('postType', previousRecord.type, edits, options);
|
|
177
169
|
let error = registry.select(coreStore).getLastEntitySaveError('postType', previousRecord.type, previousRecord.id);
|
|
178
|
-
|
|
179
170
|
if (!error) {
|
|
180
171
|
await applyFilters('editor.__unstableSavePost', Promise.resolve(), options).catch(err => {
|
|
181
172
|
error = err;
|
|
182
173
|
});
|
|
183
174
|
}
|
|
184
|
-
|
|
185
175
|
dispatch({
|
|
186
176
|
type: 'REQUEST_POST_UPDATE_FINISH',
|
|
187
177
|
options
|
|
188
178
|
});
|
|
189
|
-
|
|
190
179
|
if (error) {
|
|
191
180
|
const args = getNotificationArgumentsForSaveFail({
|
|
192
181
|
post: previousRecord,
|
|
193
182
|
edits,
|
|
194
183
|
error
|
|
195
184
|
});
|
|
196
|
-
|
|
197
185
|
if (args.length) {
|
|
198
186
|
registry.dispatch(noticesStore).createErrorNotice(...args);
|
|
199
187
|
}
|
|
@@ -205,24 +193,22 @@ export const savePost = (options = {}) => async ({
|
|
|
205
193
|
postType: await registry.resolveSelect(coreStore).getPostType(updatedRecord.type),
|
|
206
194
|
options
|
|
207
195
|
});
|
|
208
|
-
|
|
209
196
|
if (args.length) {
|
|
210
197
|
registry.dispatch(noticesStore).createSuccessNotice(...args);
|
|
211
|
-
}
|
|
198
|
+
}
|
|
199
|
+
// Make sure that any edits after saving create an undo level and are
|
|
212
200
|
// considered for change detection.
|
|
213
|
-
|
|
214
|
-
|
|
215
201
|
if (!options.isAutosave) {
|
|
216
202
|
registry.dispatch(blockEditorStore).__unstableMarkLastChangeAsPersistent();
|
|
217
203
|
}
|
|
218
204
|
}
|
|
219
205
|
};
|
|
206
|
+
|
|
220
207
|
/**
|
|
221
208
|
* Action for refreshing the current post.
|
|
222
209
|
*
|
|
223
210
|
* @deprecated Since WordPress 6.0.
|
|
224
211
|
*/
|
|
225
|
-
|
|
226
212
|
export function refreshPost() {
|
|
227
213
|
deprecated("wp.data.dispatch( 'core/editor' ).refreshPost", {
|
|
228
214
|
since: '6.0',
|
|
@@ -233,10 +219,10 @@ export function refreshPost() {
|
|
|
233
219
|
type: 'DO_NOTHING'
|
|
234
220
|
};
|
|
235
221
|
}
|
|
222
|
+
|
|
236
223
|
/**
|
|
237
224
|
* Action for trashing the current post in the editor.
|
|
238
225
|
*/
|
|
239
|
-
|
|
240
226
|
export const trashPost = () => async ({
|
|
241
227
|
select,
|
|
242
228
|
dispatch,
|
|
@@ -252,7 +238,6 @@ export const trashPost = () => async ({
|
|
|
252
238
|
dispatch({
|
|
253
239
|
type: 'REQUEST_POST_DELETE_START'
|
|
254
240
|
});
|
|
255
|
-
|
|
256
241
|
try {
|
|
257
242
|
const post = select.getCurrentPost();
|
|
258
243
|
await apiFetch({
|
|
@@ -265,11 +250,11 @@ export const trashPost = () => async ({
|
|
|
265
250
|
error
|
|
266
251
|
}));
|
|
267
252
|
}
|
|
268
|
-
|
|
269
253
|
dispatch({
|
|
270
254
|
type: 'REQUEST_POST_DELETE_FINISH'
|
|
271
255
|
});
|
|
272
256
|
};
|
|
257
|
+
|
|
273
258
|
/**
|
|
274
259
|
* Action that autosaves the current post. This
|
|
275
260
|
* includes server-side autosaving (default) and client-side (a.k.a. local)
|
|
@@ -278,7 +263,6 @@ export const trashPost = () => async ({
|
|
|
278
263
|
*
|
|
279
264
|
* @param {Object?} options Extra flags to identify the autosave.
|
|
280
265
|
*/
|
|
281
|
-
|
|
282
266
|
export const autosave = ({
|
|
283
267
|
local = false,
|
|
284
268
|
...options
|
|
@@ -308,7 +292,6 @@ export const __unstableSaveForPreview = ({
|
|
|
308
292
|
}) => {
|
|
309
293
|
if ((forceIsAutosaveable || select.isEditedPostAutosaveable()) && !select.isPostLocked()) {
|
|
310
294
|
const isDraft = ['draft', 'auto-draft'].includes(select.getEditedPostAttribute('status'));
|
|
311
|
-
|
|
312
295
|
if (isDraft) {
|
|
313
296
|
await dispatch.savePost({
|
|
314
297
|
isPreview: true
|
|
@@ -319,33 +302,32 @@ export const __unstableSaveForPreview = ({
|
|
|
319
302
|
});
|
|
320
303
|
}
|
|
321
304
|
}
|
|
322
|
-
|
|
323
305
|
return select.getEditedPostPreviewLink();
|
|
324
306
|
};
|
|
307
|
+
|
|
325
308
|
/**
|
|
326
309
|
* Action that restores last popped state in undo history.
|
|
327
310
|
*/
|
|
328
|
-
|
|
329
311
|
export const redo = () => ({
|
|
330
312
|
registry
|
|
331
313
|
}) => {
|
|
332
314
|
registry.dispatch(coreStore).redo();
|
|
333
315
|
};
|
|
316
|
+
|
|
334
317
|
/**
|
|
335
318
|
* Action that pops a record from undo history and undoes the edit.
|
|
336
319
|
*/
|
|
337
|
-
|
|
338
320
|
export const undo = () => ({
|
|
339
321
|
registry
|
|
340
322
|
}) => {
|
|
341
323
|
registry.dispatch(coreStore).undo();
|
|
342
324
|
};
|
|
325
|
+
|
|
343
326
|
/**
|
|
344
327
|
* Action that creates an undo history record.
|
|
345
328
|
*
|
|
346
329
|
* @deprecated Since WordPress 6.0
|
|
347
330
|
*/
|
|
348
|
-
|
|
349
331
|
export function createUndoLevel() {
|
|
350
332
|
deprecated("wp.data.dispatch( 'core/editor' ).createUndoLevel", {
|
|
351
333
|
since: '6.0',
|
|
@@ -356,37 +338,38 @@ export function createUndoLevel() {
|
|
|
356
338
|
type: 'DO_NOTHING'
|
|
357
339
|
};
|
|
358
340
|
}
|
|
341
|
+
|
|
359
342
|
/**
|
|
360
343
|
* Action that locks the editor.
|
|
361
344
|
*
|
|
362
345
|
* @param {Object} lock Details about the post lock status, user, and nonce.
|
|
363
346
|
* @return {Object} Action object.
|
|
364
347
|
*/
|
|
365
|
-
|
|
366
348
|
export function updatePostLock(lock) {
|
|
367
349
|
return {
|
|
368
350
|
type: 'UPDATE_POST_LOCK',
|
|
369
351
|
lock
|
|
370
352
|
};
|
|
371
353
|
}
|
|
354
|
+
|
|
372
355
|
/**
|
|
373
356
|
* Enable the publish sidebar.
|
|
374
357
|
*/
|
|
375
|
-
|
|
376
358
|
export const enablePublishSidebar = () => ({
|
|
377
359
|
registry
|
|
378
360
|
}) => {
|
|
379
361
|
registry.dispatch(preferencesStore).set('core/edit-post', 'isPublishSidebarEnabled', true);
|
|
380
362
|
};
|
|
363
|
+
|
|
381
364
|
/**
|
|
382
365
|
* Disables the publish sidebar.
|
|
383
366
|
*/
|
|
384
|
-
|
|
385
367
|
export const disablePublishSidebar = () => ({
|
|
386
368
|
registry
|
|
387
369
|
}) => {
|
|
388
370
|
registry.dispatch(preferencesStore).set('core/edit-post', 'isPublishSidebarEnabled', false);
|
|
389
371
|
};
|
|
372
|
+
|
|
390
373
|
/**
|
|
391
374
|
* Action that locks post saving.
|
|
392
375
|
*
|
|
@@ -430,13 +413,13 @@ export const disablePublishSidebar = () => ({
|
|
|
430
413
|
*
|
|
431
414
|
* @return {Object} Action object
|
|
432
415
|
*/
|
|
433
|
-
|
|
434
416
|
export function lockPostSaving(lockName) {
|
|
435
417
|
return {
|
|
436
418
|
type: 'LOCK_POST_SAVING',
|
|
437
419
|
lockName
|
|
438
420
|
};
|
|
439
421
|
}
|
|
422
|
+
|
|
440
423
|
/**
|
|
441
424
|
* Action that unlocks post saving.
|
|
442
425
|
*
|
|
@@ -450,13 +433,13 @@ export function lockPostSaving(lockName) {
|
|
|
450
433
|
*
|
|
451
434
|
* @return {Object} Action object
|
|
452
435
|
*/
|
|
453
|
-
|
|
454
436
|
export function unlockPostSaving(lockName) {
|
|
455
437
|
return {
|
|
456
438
|
type: 'UNLOCK_POST_SAVING',
|
|
457
439
|
lockName
|
|
458
440
|
};
|
|
459
441
|
}
|
|
442
|
+
|
|
460
443
|
/**
|
|
461
444
|
* Action that locks post autosaving.
|
|
462
445
|
*
|
|
@@ -470,13 +453,13 @@ export function unlockPostSaving(lockName) {
|
|
|
470
453
|
*
|
|
471
454
|
* @return {Object} Action object
|
|
472
455
|
*/
|
|
473
|
-
|
|
474
456
|
export function lockPostAutosaving(lockName) {
|
|
475
457
|
return {
|
|
476
458
|
type: 'LOCK_POST_AUTOSAVING',
|
|
477
459
|
lockName
|
|
478
460
|
};
|
|
479
461
|
}
|
|
462
|
+
|
|
480
463
|
/**
|
|
481
464
|
* Action that unlocks post autosaving.
|
|
482
465
|
*
|
|
@@ -490,20 +473,19 @@ export function lockPostAutosaving(lockName) {
|
|
|
490
473
|
*
|
|
491
474
|
* @return {Object} Action object
|
|
492
475
|
*/
|
|
493
|
-
|
|
494
476
|
export function unlockPostAutosaving(lockName) {
|
|
495
477
|
return {
|
|
496
478
|
type: 'UNLOCK_POST_AUTOSAVING',
|
|
497
479
|
lockName
|
|
498
480
|
};
|
|
499
481
|
}
|
|
482
|
+
|
|
500
483
|
/**
|
|
501
484
|
* Returns an action object used to signal that the blocks have been updated.
|
|
502
485
|
*
|
|
503
486
|
* @param {Array} blocks Block Array.
|
|
504
487
|
* @param {?Object} options Optional options.
|
|
505
488
|
*/
|
|
506
|
-
|
|
507
489
|
export const resetEditorBlocks = (blocks, options = {}) => ({
|
|
508
490
|
select,
|
|
509
491
|
dispatch,
|
|
@@ -517,30 +499,27 @@ export const resetEditorBlocks = (blocks, options = {}) => ({
|
|
|
517
499
|
blocks,
|
|
518
500
|
selection
|
|
519
501
|
};
|
|
520
|
-
|
|
521
502
|
if (__unstableShouldCreateUndoLevel !== false) {
|
|
522
503
|
const {
|
|
523
504
|
id,
|
|
524
505
|
type
|
|
525
506
|
} = select.getCurrentPost();
|
|
526
507
|
const noChange = registry.select(coreStore).getEditedEntityRecord('postType', type, id).blocks === edits.blocks;
|
|
527
|
-
|
|
528
508
|
if (noChange) {
|
|
529
509
|
registry.dispatch(coreStore).__unstableCreateUndoLevel('postType', type, id);
|
|
530
|
-
|
|
531
510
|
return;
|
|
532
|
-
}
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
// We create a new function here on every persistent edit
|
|
533
514
|
// to make sure the edit makes the post dirty and creates
|
|
534
515
|
// a new undo level.
|
|
535
|
-
|
|
536
|
-
|
|
537
516
|
edits.content = ({
|
|
538
517
|
blocks: blocksForSerialization = []
|
|
539
518
|
}) => __unstableSerializeAndClean(blocksForSerialization);
|
|
540
519
|
}
|
|
541
|
-
|
|
542
520
|
dispatch.editPost(edits);
|
|
543
521
|
};
|
|
522
|
+
|
|
544
523
|
/*
|
|
545
524
|
* Returns an action object used in signalling that the post editor settings have been updated.
|
|
546
525
|
*
|
|
@@ -548,13 +527,13 @@ export const resetEditorBlocks = (blocks, options = {}) => ({
|
|
|
548
527
|
*
|
|
549
528
|
* @return {Object} Action object
|
|
550
529
|
*/
|
|
551
|
-
|
|
552
530
|
export function updateEditorSettings(settings) {
|
|
553
531
|
return {
|
|
554
532
|
type: 'UPDATE_EDITOR_SETTINGS',
|
|
555
533
|
settings
|
|
556
534
|
};
|
|
557
535
|
}
|
|
536
|
+
|
|
558
537
|
/**
|
|
559
538
|
* Backward compatibility
|
|
560
539
|
*/
|
|
@@ -569,160 +548,159 @@ const getBlockEditorAction = name => (...args) => ({
|
|
|
569
548
|
});
|
|
570
549
|
registry.dispatch(blockEditorStore)[name](...args);
|
|
571
550
|
};
|
|
551
|
+
|
|
572
552
|
/**
|
|
573
553
|
* @see resetBlocks in core/block-editor store.
|
|
574
554
|
*/
|
|
575
|
-
|
|
576
|
-
|
|
577
555
|
export const resetBlocks = getBlockEditorAction('resetBlocks');
|
|
556
|
+
|
|
578
557
|
/**
|
|
579
558
|
* @see receiveBlocks in core/block-editor store.
|
|
580
559
|
*/
|
|
581
|
-
|
|
582
560
|
export const receiveBlocks = getBlockEditorAction('receiveBlocks');
|
|
561
|
+
|
|
583
562
|
/**
|
|
584
563
|
* @see updateBlock in core/block-editor store.
|
|
585
564
|
*/
|
|
586
|
-
|
|
587
565
|
export const updateBlock = getBlockEditorAction('updateBlock');
|
|
566
|
+
|
|
588
567
|
/**
|
|
589
568
|
* @see updateBlockAttributes in core/block-editor store.
|
|
590
569
|
*/
|
|
591
|
-
|
|
592
570
|
export const updateBlockAttributes = getBlockEditorAction('updateBlockAttributes');
|
|
571
|
+
|
|
593
572
|
/**
|
|
594
573
|
* @see selectBlock in core/block-editor store.
|
|
595
574
|
*/
|
|
596
|
-
|
|
597
575
|
export const selectBlock = getBlockEditorAction('selectBlock');
|
|
576
|
+
|
|
598
577
|
/**
|
|
599
578
|
* @see startMultiSelect in core/block-editor store.
|
|
600
579
|
*/
|
|
601
|
-
|
|
602
580
|
export const startMultiSelect = getBlockEditorAction('startMultiSelect');
|
|
581
|
+
|
|
603
582
|
/**
|
|
604
583
|
* @see stopMultiSelect in core/block-editor store.
|
|
605
584
|
*/
|
|
606
|
-
|
|
607
585
|
export const stopMultiSelect = getBlockEditorAction('stopMultiSelect');
|
|
586
|
+
|
|
608
587
|
/**
|
|
609
588
|
* @see multiSelect in core/block-editor store.
|
|
610
589
|
*/
|
|
611
|
-
|
|
612
590
|
export const multiSelect = getBlockEditorAction('multiSelect');
|
|
591
|
+
|
|
613
592
|
/**
|
|
614
593
|
* @see clearSelectedBlock in core/block-editor store.
|
|
615
594
|
*/
|
|
616
|
-
|
|
617
595
|
export const clearSelectedBlock = getBlockEditorAction('clearSelectedBlock');
|
|
596
|
+
|
|
618
597
|
/**
|
|
619
598
|
* @see toggleSelection in core/block-editor store.
|
|
620
599
|
*/
|
|
621
|
-
|
|
622
600
|
export const toggleSelection = getBlockEditorAction('toggleSelection');
|
|
601
|
+
|
|
623
602
|
/**
|
|
624
603
|
* @see replaceBlocks in core/block-editor store.
|
|
625
604
|
*/
|
|
626
|
-
|
|
627
605
|
export const replaceBlocks = getBlockEditorAction('replaceBlocks');
|
|
606
|
+
|
|
628
607
|
/**
|
|
629
608
|
* @see replaceBlock in core/block-editor store.
|
|
630
609
|
*/
|
|
631
|
-
|
|
632
610
|
export const replaceBlock = getBlockEditorAction('replaceBlock');
|
|
611
|
+
|
|
633
612
|
/**
|
|
634
613
|
* @see moveBlocksDown in core/block-editor store.
|
|
635
614
|
*/
|
|
636
|
-
|
|
637
615
|
export const moveBlocksDown = getBlockEditorAction('moveBlocksDown');
|
|
616
|
+
|
|
638
617
|
/**
|
|
639
618
|
* @see moveBlocksUp in core/block-editor store.
|
|
640
619
|
*/
|
|
641
|
-
|
|
642
620
|
export const moveBlocksUp = getBlockEditorAction('moveBlocksUp');
|
|
621
|
+
|
|
643
622
|
/**
|
|
644
623
|
* @see moveBlockToPosition in core/block-editor store.
|
|
645
624
|
*/
|
|
646
|
-
|
|
647
625
|
export const moveBlockToPosition = getBlockEditorAction('moveBlockToPosition');
|
|
626
|
+
|
|
648
627
|
/**
|
|
649
628
|
* @see insertBlock in core/block-editor store.
|
|
650
629
|
*/
|
|
651
|
-
|
|
652
630
|
export const insertBlock = getBlockEditorAction('insertBlock');
|
|
631
|
+
|
|
653
632
|
/**
|
|
654
633
|
* @see insertBlocks in core/block-editor store.
|
|
655
634
|
*/
|
|
656
|
-
|
|
657
635
|
export const insertBlocks = getBlockEditorAction('insertBlocks');
|
|
636
|
+
|
|
658
637
|
/**
|
|
659
638
|
* @see showInsertionPoint in core/block-editor store.
|
|
660
639
|
*/
|
|
661
|
-
|
|
662
640
|
export const showInsertionPoint = getBlockEditorAction('showInsertionPoint');
|
|
641
|
+
|
|
663
642
|
/**
|
|
664
643
|
* @see hideInsertionPoint in core/block-editor store.
|
|
665
644
|
*/
|
|
666
|
-
|
|
667
645
|
export const hideInsertionPoint = getBlockEditorAction('hideInsertionPoint');
|
|
646
|
+
|
|
668
647
|
/**
|
|
669
648
|
* @see setTemplateValidity in core/block-editor store.
|
|
670
649
|
*/
|
|
671
|
-
|
|
672
650
|
export const setTemplateValidity = getBlockEditorAction('setTemplateValidity');
|
|
651
|
+
|
|
673
652
|
/**
|
|
674
653
|
* @see synchronizeTemplate in core/block-editor store.
|
|
675
654
|
*/
|
|
676
|
-
|
|
677
655
|
export const synchronizeTemplate = getBlockEditorAction('synchronizeTemplate');
|
|
656
|
+
|
|
678
657
|
/**
|
|
679
658
|
* @see mergeBlocks in core/block-editor store.
|
|
680
659
|
*/
|
|
681
|
-
|
|
682
660
|
export const mergeBlocks = getBlockEditorAction('mergeBlocks');
|
|
661
|
+
|
|
683
662
|
/**
|
|
684
663
|
* @see removeBlocks in core/block-editor store.
|
|
685
664
|
*/
|
|
686
|
-
|
|
687
665
|
export const removeBlocks = getBlockEditorAction('removeBlocks');
|
|
666
|
+
|
|
688
667
|
/**
|
|
689
668
|
* @see removeBlock in core/block-editor store.
|
|
690
669
|
*/
|
|
691
|
-
|
|
692
670
|
export const removeBlock = getBlockEditorAction('removeBlock');
|
|
671
|
+
|
|
693
672
|
/**
|
|
694
673
|
* @see toggleBlockMode in core/block-editor store.
|
|
695
674
|
*/
|
|
696
|
-
|
|
697
675
|
export const toggleBlockMode = getBlockEditorAction('toggleBlockMode');
|
|
676
|
+
|
|
698
677
|
/**
|
|
699
678
|
* @see startTyping in core/block-editor store.
|
|
700
679
|
*/
|
|
701
|
-
|
|
702
680
|
export const startTyping = getBlockEditorAction('startTyping');
|
|
681
|
+
|
|
703
682
|
/**
|
|
704
683
|
* @see stopTyping in core/block-editor store.
|
|
705
684
|
*/
|
|
706
|
-
|
|
707
685
|
export const stopTyping = getBlockEditorAction('stopTyping');
|
|
686
|
+
|
|
708
687
|
/**
|
|
709
688
|
* @see enterFormattedText in core/block-editor store.
|
|
710
689
|
*/
|
|
711
|
-
|
|
712
690
|
export const enterFormattedText = getBlockEditorAction('enterFormattedText');
|
|
691
|
+
|
|
713
692
|
/**
|
|
714
693
|
* @see exitFormattedText in core/block-editor store.
|
|
715
694
|
*/
|
|
716
|
-
|
|
717
695
|
export const exitFormattedText = getBlockEditorAction('exitFormattedText');
|
|
696
|
+
|
|
718
697
|
/**
|
|
719
698
|
* @see insertDefaultBlock in core/block-editor store.
|
|
720
699
|
*/
|
|
721
|
-
|
|
722
700
|
export const insertDefaultBlock = getBlockEditorAction('insertDefaultBlock');
|
|
701
|
+
|
|
723
702
|
/**
|
|
724
703
|
* @see updateBlockListSettings in core/block-editor store.
|
|
725
704
|
*/
|
|
726
|
-
|
|
727
705
|
export const updateBlockListSettings = getBlockEditorAction('updateBlockListSettings');
|
|
728
706
|
//# sourceMappingURL=actions.js.map
|