@wordpress/editor 13.15.0 → 13.17.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 +4 -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 +5 -14
- 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 +11 -23
- 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 +10 -27
- 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 +11 -23
- 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 +10 -23
- 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 +8 -42
- 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 +61 -130
- 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 +170 -296
- 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 +4 -7
- 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 +12 -19
- 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 +11 -23
- 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 +12 -19
- 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 +14 -20
- 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 +11 -39
- 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 +63 -85
- 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 +173 -223
- 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/page-attributes/order.js +15 -23
- package/src/components/page-attributes/test/order.js +46 -15
- package/src/components/post-author/test/check.js +18 -12
- package/src/components/post-comments/index.js +11 -17
- package/src/components/post-excerpt/check.js +6 -2
- package/src/components/post-excerpt/index.js +10 -16
- 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-pingbacks/index.js +11 -15
- 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 +8 -10
- package/src/components/post-type-support-check/test/index.js +36 -20
- package/src/components/provider/index.js +3 -2
- package/src/components/unsaved-changes-warning/index.js +22 -27
- package/src/hooks/custom-sources-backwards-compatibility.js +1 -25
- package/src/store/actions.js +1 -1
- package/src/store/selectors.js +2 -2
- package/src/store/test/selectors.js +13 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["__","useSelect","PanelBody","PanelRow","store","coreStore","EntityRecordItem","getEntityDescription","entity","count","EntityTypeList","list","unselectedEntities","setUnselectedEntities","length","firstRecord","entityConfig","select","getEntityConfig","kind","name","entityLabel","label","description","createElement","title","initialOpen","map","record","key","property","checked","some","elt","onChange","value"],"sources":["@wordpress/editor/src/components/entities-saved-states/entity-type-list.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody, PanelRow } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport EntityRecordItem from './entity-record-item';\n\nfunction getEntityDescription( entity, count ) {\n\tswitch ( entity ) {\n\t\tcase 'site':\n\t\t\treturn 1 === count\n\t\t\t\t? __( 'This change will affect your whole site.' )\n\t\t\t\t: __( 'These changes will affect your whole site.' );\n\t\tcase 'wp_template':\n\t\t\treturn __(\n\t\t\t\t'This change will affect pages and posts that use this template.'\n\t\t\t);\n\t\tcase 'page':\n\t\tcase 'post':\n\t\t\treturn __( 'The following content has been modified.' );\n\t}\n}\n\nexport default function EntityTypeList( {\n\tlist,\n\tunselectedEntities,\n\tsetUnselectedEntities,\n} ) {\n\tconst count = list.length;\n\tconst firstRecord = list[ 0 ];\n\tconst entityConfig = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityConfig(\n\t\t\t\tfirstRecord.kind,\n\t\t\t\tfirstRecord.name\n\t\t\t),\n\t\t[ firstRecord.kind, firstRecord.name ]\n\t);\n\tconst { name } = firstRecord;\n\n\tlet entityLabel = entityConfig.label;\n\tif ( name === 'wp_template_part' ) {\n\t\tentityLabel =\n\t\t\t1 === count ? __( 'Template Part' ) : __( 'Template Parts' );\n\t}\n\t// Set description based on type of entity.\n\tconst description = getEntityDescription( name, count );\n\n\treturn (\n\t\t<PanelBody title={ entityLabel } initialOpen={ true }>\n\t\t\t{ description && <PanelRow>{ description }</PanelRow> }\n\t\t\t{ list.map( ( record ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<EntityRecordItem\n\t\t\t\t\t\tkey={ record.key || record.property }\n\t\t\t\t\t\trecord={ record }\n\t\t\t\t\t\tchecked={\n\t\t\t\t\t\t\t! unselectedEntities.some(\n\t\t\t\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\t\t\t\telt.kind === record.kind &&\n\t\t\t\t\t\t\t\t\telt.name === record.name &&\n\t\t\t\t\t\t\t\t\telt.key === record.key &&\n\t\t\t\t\t\t\t\t\telt.property === record.property\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetUnselectedEntities( record, value )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</PanelBody>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,SAAS,EAAEC,QAAQ,QAAQ,uBAAuB;AAC3D,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,OAAOC,gBAAgB,MAAM,sBAAsB;AAEnD,SAASC,oBAAoBA,CAAEC,MAAM,EAAEC,KAAK,EAAG;EAC9C,QAASD,MAAM;IACd,KAAK,MAAM;MACV,OAAO,CAAC,KAAKC,KAAK,GACfT,EAAE,CAAE,0CAA2C,CAAC,GAChDA,EAAE,CAAE,4CAA6C,CAAC;IACtD,KAAK,aAAa;MACjB,OAAOA,EAAE,CACR,iEACD,CAAC;IACF,KAAK,MAAM;IACX,KAAK,MAAM;MACV,OAAOA,EAAE,CAAE,0CAA2C,CAAC;EACzD;AACD;AAEA,eAAe,SAASU,cAAcA,CAAE;EACvCC,IAAI;EACJC,kBAAkB;EAClBC;AACD,CAAC,EAAG;EACH,MAAMJ,KAAK,GAAGE,IAAI,CAACG,MAAM;EACzB,MAAMC,WAAW,GAAGJ,IAAI,CAAE,CAAC,CAAE;EAC7B,MAAMK,YAAY,GAAGf,SAAS,CAC3BgB,MAAM,IACPA,MAAM,CAAEZ,SAAU,CAAC,CAACa,eAAe,CAClCH,WAAW,CAACI,IAAI,EAChBJ,WAAW,CAACK,IACb,CAAC,EACF,CAAEL,WAAW,CAACI,IAAI,EAAEJ,WAAW,CAACK,IAAI,CACrC,CAAC;EACD,MAAM;IAAEA;EAAK,CAAC,GAAGL,WAAW;EAE5B,IAAIM,WAAW,GAAGL,YAAY,CAACM,KAAK;EACpC,IAAKF,IAAI,KAAK,kBAAkB,EAAG;IAClCC,WAAW,GACV,CAAC,KAAKZ,KAAK,GAAGT,EAAE,CAAE,eAAgB,CAAC,GAAGA,EAAE,CAAE,gBAAiB,CAAC;EAC9D;EACA;EACA,MAAMuB,WAAW,GAAGhB,oBAAoB,CAAEa,IAAI,EAAEX,KAAM,CAAC;EAEvD,OACCe,aAAA,CAACtB,SAAS;IAACuB,KAAK,EAAGJ,WAAa;IAACK,WAAW,EAAG;EAAM,GAClDH,WAAW,IAAIC,aAAA,CAACrB,QAAQ,QAAGoB,WAAuB,CAAC,EACnDZ,IAAI,CAACgB,GAAG,CAAIC,MAAM,IAAM;IACzB,OACCJ,aAAA,CAAClB,gBAAgB;MAChBuB,GAAG,EAAGD,MAAM,CAACC,GAAG,IAAID,MAAM,CAACE,QAAU;MACrCF,MAAM,EAAGA,MAAQ;MACjBG,OAAO,EACN,CAAEnB,kBAAkB,CAACoB,IAAI,CACtBC,GAAG,IACJA,GAAG,CAACd,IAAI,KAAKS,MAAM,CAACT,IAAI,IACxBc,GAAG,CAACb,IAAI,KAAKQ,MAAM,CAACR,IAAI,IACxBa,GAAG,CAACJ,GAAG,KAAKD,MAAM,CAACC,GAAG,IACtBI,GAAG,CAACH,QAAQ,KAAKF,MAAM,CAACE,QAC1B,CACA;MACDI,QAAQ,EAAKC,KAAK,IACjBtB,qBAAqB,CAAEe,MAAM,EAAEO,KAAM;IACrC,CACD,CAAC;EAEJ,CAAE,CACQ,CAAC;AAEd"}
|
|
@@ -19,13 +19,12 @@ export const useIsDirty = () => {
|
|
|
19
19
|
const {
|
|
20
20
|
dirtyEntityRecords
|
|
21
21
|
} = useSelect(select => {
|
|
22
|
-
const dirtyRecords = select(coreStore).__experimentalGetDirtyEntityRecords();
|
|
23
|
-
|
|
22
|
+
const dirtyRecords = select(coreStore).__experimentalGetDirtyEntityRecords();
|
|
24
23
|
|
|
24
|
+
// Remove site object and decouple into its edited pieces.
|
|
25
25
|
const dirtyRecordsWithoutSite = dirtyRecords.filter(record => !(record.kind === 'root' && record.name === 'site'));
|
|
26
26
|
const siteEdits = select(coreStore).getEntityRecordEdits('root', 'site');
|
|
27
27
|
const siteEditsAsEntities = [];
|
|
28
|
-
|
|
29
28
|
for (const property in siteEdits) {
|
|
30
29
|
siteEditsAsEntities.push({
|
|
31
30
|
kind: 'root',
|
|
@@ -34,15 +33,14 @@ export const useIsDirty = () => {
|
|
|
34
33
|
property
|
|
35
34
|
});
|
|
36
35
|
}
|
|
37
|
-
|
|
38
36
|
const dirtyRecordsWithSiteItems = [...dirtyRecordsWithoutSite, ...siteEditsAsEntities];
|
|
39
37
|
return {
|
|
40
38
|
dirtyEntityRecords: dirtyRecordsWithSiteItems
|
|
41
39
|
};
|
|
42
|
-
}, []);
|
|
40
|
+
}, []);
|
|
43
41
|
|
|
42
|
+
// Unchecked entities to be ignored by save function.
|
|
44
43
|
const [unselectedEntities, _setUnselectedEntities] = useState([]);
|
|
45
|
-
|
|
46
44
|
const setUnselectedEntities = ({
|
|
47
45
|
kind,
|
|
48
46
|
name,
|
|
@@ -60,7 +58,6 @@ export const useIsDirty = () => {
|
|
|
60
58
|
}]);
|
|
61
59
|
}
|
|
62
60
|
};
|
|
63
|
-
|
|
64
61
|
const isDirty = dirtyEntityRecords.length - unselectedEntities.length > 0;
|
|
65
62
|
return {
|
|
66
63
|
dirtyEntityRecords,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["useSelect","store","coreStore","useState","__","TRANSLATED_SITE_PROPERTIES","title","description","site_logo","site_icon","show_on_front","page_on_front","posts_per_page","default_comment_status","useIsDirty","dirtyEntityRecords","select","dirtyRecords","__experimentalGetDirtyEntityRecords","dirtyRecordsWithoutSite","filter","record","kind","name","siteEdits","getEntityRecordEdits","siteEditsAsEntities","property","push","dirtyRecordsWithSiteItems","unselectedEntities","_setUnselectedEntities","setUnselectedEntities","key","checked","elt","isDirty","length"],"sources":["@wordpress/editor/src/components/entities-saved-states/hooks/use-is-dirty.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\nconst TRANSLATED_SITE_PROPERTIES = {\n\ttitle: __( 'Title' ),\n\tdescription: __( 'Tagline' ),\n\tsite_logo: __( 'Logo' ),\n\tsite_icon: __( 'Icon' ),\n\tshow_on_front: __( 'Show on front' ),\n\tpage_on_front: __( 'Page on front' ),\n\tposts_per_page: __( 'Maximum posts per page' ),\n\tdefault_comment_status: __( 'Allow comments on new posts' ),\n};\n\nexport const useIsDirty = () => {\n\tconst { dirtyEntityRecords } = useSelect( ( select ) => {\n\t\tconst dirtyRecords =\n\t\t\tselect( coreStore ).__experimentalGetDirtyEntityRecords();\n\n\t\t// Remove site object and decouple into its edited pieces.\n\t\tconst dirtyRecordsWithoutSite = dirtyRecords.filter(\n\t\t\t( record ) => ! ( record.kind === 'root' && record.name === 'site' )\n\t\t);\n\n\t\tconst siteEdits = select( coreStore ).getEntityRecordEdits(\n\t\t\t'root',\n\t\t\t'site'\n\t\t);\n\n\t\tconst siteEditsAsEntities = [];\n\t\tfor ( const property in siteEdits ) {\n\t\t\tsiteEditsAsEntities.push( {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'site',\n\t\t\t\ttitle: TRANSLATED_SITE_PROPERTIES[ property ] || property,\n\t\t\t\tproperty,\n\t\t\t} );\n\t\t}\n\t\tconst dirtyRecordsWithSiteItems = [\n\t\t\t...dirtyRecordsWithoutSite,\n\t\t\t...siteEditsAsEntities,\n\t\t];\n\n\t\treturn {\n\t\t\tdirtyEntityRecords: dirtyRecordsWithSiteItems,\n\t\t};\n\t}, [] );\n\n\t// Unchecked entities to be ignored by save function.\n\tconst [ unselectedEntities, _setUnselectedEntities ] = useState( [] );\n\n\tconst setUnselectedEntities = (\n\t\t{ kind, name, key, property },\n\t\tchecked\n\t) => {\n\t\tif ( checked ) {\n\t\t\t_setUnselectedEntities(\n\t\t\t\tunselectedEntities.filter(\n\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\telt.kind !== kind ||\n\t\t\t\t\t\telt.name !== name ||\n\t\t\t\t\t\telt.key !== key ||\n\t\t\t\t\t\telt.property !== property\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\t_setUnselectedEntities( [\n\t\t\t\t...unselectedEntities,\n\t\t\t\t{ kind, name, key, property },\n\t\t\t] );\n\t\t}\n\t};\n\n\tconst isDirty = dirtyEntityRecords.length - unselectedEntities.length > 0;\n\n\treturn {\n\t\tdirtyEntityRecords,\n\t\tisDirty,\n\t\tsetUnselectedEntities,\n\t\tunselectedEntities,\n\t};\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;AAEpC,MAAMC,0BAA0B,GAAG;EAClCC,KAAK,EAAEF,EAAE,CAAE,OAAQ,CAAC;EACpBG,WAAW,EAAEH,EAAE,CAAE,SAAU,CAAC;EAC5BI,SAAS,EAAEJ,EAAE,CAAE,MAAO,CAAC;EACvBK,SAAS,EAAEL,EAAE,CAAE,MAAO,CAAC;EACvBM,aAAa,EAAEN,EAAE,CAAE,eAAgB,CAAC;EACpCO,aAAa,EAAEP,EAAE,CAAE,eAAgB,CAAC;EACpCQ,cAAc,EAAER,EAAE,CAAE,wBAAyB,CAAC;EAC9CS,sBAAsB,EAAET,EAAE,CAAE,6BAA8B;AAC3D,CAAC;AAED,OAAO,MAAMU,UAAU,GAAGA,CAAA,KAAM;EAC/B,MAAM;IAAEC;EAAmB,CAAC,GAAGf,SAAS,CAAIgB,MAAM,IAAM;IACvD,MAAMC,YAAY,GACjBD,MAAM,CAAEd,SA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AI;QAAEU,GAAG;QAAEN;MAAS,CAAC,CAC5B,CAAC;IACJ;EACD,CAAC;EAED,MAAMS,OAAO,GAAGrB,kBAAkB,CAACsB,MAAM,GAAGP,kBAAkB,CAACO,MAAM,GAAG,CAAC;EAEzE,OAAO;IACNtB,kBAAkB;IAClBqB,OAAO;IACPJ,qBAAqB;IACrBF;EACD,CAAC;AACF,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createElement } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
@@ -11,21 +10,19 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
11
10
|
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
12
11
|
import { __experimentalUseDialog as useDialog } from '@wordpress/compose';
|
|
13
12
|
import { store as noticesStore } from '@wordpress/notices';
|
|
13
|
+
|
|
14
14
|
/**
|
|
15
15
|
* Internal dependencies
|
|
16
16
|
*/
|
|
17
|
-
|
|
18
17
|
import EntityTypeList from './entity-type-list';
|
|
19
18
|
import { useIsDirty } from './hooks/use-is-dirty';
|
|
20
19
|
const PUBLISH_ON_SAVE_ENTITIES = [{
|
|
21
20
|
kind: 'postType',
|
|
22
21
|
name: 'wp_navigation'
|
|
23
22
|
}];
|
|
24
|
-
|
|
25
23
|
function identity(values) {
|
|
26
24
|
return values;
|
|
27
25
|
}
|
|
28
|
-
|
|
29
26
|
export default function EntitiesSavedStates({
|
|
30
27
|
close
|
|
31
28
|
}) {
|
|
@@ -59,21 +56,21 @@ export function EntitiesSavedStatesExtensible({
|
|
|
59
56
|
createSuccessNotice,
|
|
60
57
|
createErrorNotice,
|
|
61
58
|
removeNotice
|
|
62
|
-
} = useDispatch(noticesStore);
|
|
59
|
+
} = useDispatch(noticesStore);
|
|
63
60
|
|
|
61
|
+
// To group entities by type.
|
|
64
62
|
const partitionedSavables = dirtyEntityRecords.reduce((acc, record) => {
|
|
65
63
|
const {
|
|
66
64
|
name
|
|
67
65
|
} = record;
|
|
68
|
-
|
|
69
66
|
if (!acc[name]) {
|
|
70
67
|
acc[name] = [];
|
|
71
68
|
}
|
|
72
|
-
|
|
73
69
|
acc[name].push(record);
|
|
74
70
|
return acc;
|
|
75
|
-
}, {});
|
|
71
|
+
}, {});
|
|
76
72
|
|
|
73
|
+
// Sort entity groups.
|
|
77
74
|
const {
|
|
78
75
|
site: siteSavables,
|
|
79
76
|
wp_template: templateSavables,
|
|
@@ -82,7 +79,6 @@ export function EntitiesSavedStatesExtensible({
|
|
|
82
79
|
} = partitionedSavables;
|
|
83
80
|
const sortedPartitionedSavables = [siteSavables, templateSavables, templatePartSavables, ...Object.values(contentSavables)].filter(Array.isArray);
|
|
84
81
|
const saveEnabled = saveEnabledProp !== null && saveEnabledProp !== void 0 ? saveEnabledProp : isDirty;
|
|
85
|
-
|
|
86
82
|
const saveCheckedEntities = () => {
|
|
87
83
|
const saveNoticeId = 'site-editor-save-success';
|
|
88
84
|
removeNotice(saveNoticeId);
|
|
@@ -111,17 +107,13 @@ export function EntitiesSavedStatesExtensible({
|
|
|
111
107
|
status: 'publish'
|
|
112
108
|
});
|
|
113
109
|
}
|
|
114
|
-
|
|
115
110
|
pendingSavedRecords.push(saveEditedEntityRecord(kind, name, key));
|
|
116
111
|
}
|
|
117
112
|
});
|
|
118
|
-
|
|
119
113
|
if (siteItemsToSave.length) {
|
|
120
114
|
pendingSavedRecords.push(saveSpecifiedEntityEdits('root', 'site', undefined, siteItemsToSave));
|
|
121
115
|
}
|
|
122
|
-
|
|
123
116
|
__unstableMarkLastChangeAsPersistent();
|
|
124
|
-
|
|
125
117
|
Promise.all(pendingSavedRecords).then(values => {
|
|
126
118
|
return onSave(values);
|
|
127
119
|
}).then(values => {
|
|
@@ -134,10 +126,10 @@ export function EntitiesSavedStatesExtensible({
|
|
|
134
126
|
});
|
|
135
127
|
}
|
|
136
128
|
}).catch(error => createErrorNotice(`${__('Saving failed.')} ${error}`));
|
|
137
|
-
};
|
|
138
|
-
// its own will use the event object in place of the expected saved entities.
|
|
139
|
-
|
|
129
|
+
};
|
|
140
130
|
|
|
131
|
+
// Explicitly define this with no argument passed. Using `close` on
|
|
132
|
+
// its own will use the event object in place of the expected saved entities.
|
|
141
133
|
const dismissPanel = useCallback(() => close(), [close]);
|
|
142
134
|
const [saveDialogRef, saveDialogProps] = useDialog({
|
|
143
135
|
onClose: () => dismissPanel()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/editor/src/components/entities-saved-states/index.js"],"names":["Button","Flex","FlexItem","__","useDispatch","useCallback","useRef","store","coreStore","blockEditorStore","__experimentalUseDialog","useDialog","noticesStore","EntityTypeList","useIsDirty","PUBLISH_ON_SAVE_ENTITIES","kind","name","identity","values","EntitiesSavedStates","close","isDirtyProps","EntitiesSavedStatesExtensible","additionalPrompt","undefined","onSave","saveEnabled","saveEnabledProp","saveLabel","dirtyEntityRecords","isDirty","setUnselectedEntities","unselectedEntities","saveButtonRef","editEntityRecord","saveEditedEntityRecord","__experimentalSaveSpecifiedEntityEdits","saveSpecifiedEntityEdits","__unstableMarkLastChangeAsPersistent","createSuccessNotice","createErrorNotice","removeNotice","partitionedSavables","reduce","acc","record","push","site","siteSavables","wp_template","templateSavables","wp_template_part","templatePartSavables","contentSavables","sortedPartitionedSavables","Object","filter","Array","isArray","saveCheckedEntities","saveNoticeId","entitiesToSave","key","property","some","elt","siteItemsToSave","pendingSavedRecords","forEach","typeToPublish","status","length","Promise","all","then","value","type","id","catch","error","dismissPanel","saveDialogRef","saveDialogProps","onClose","map","list"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,MAAT,EAAiBC,IAAjB,EAAuBC,QAAvB,QAAuC,uBAAvC;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,WAAT,QAA4B,iBAA5B;AACA,SAASC,WAAT,EAAsBC,MAAtB,QAAoC,oBAApC;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,s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AAGC,IAAA,OAAO,EAAC,WAHT;AAIC,IAAA,OAAO,EAAGiF;AAJX,KAMG9E,EAAE,CAAE,QAAF,CANL,CAZD,CALD,EA2BC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,8BAAUA,EAAE,CAAE,wBAAF,CAAZ,CADD,EAEGqB,gBAFH,EAGGO,OAAO,IACR,yBACG5B,EAAE,CACH,4EADG,CADL,CAJF,CA3BD,EAuCGoD,yBAAyB,CAAC8B,GAA1B,CAAiCC,IAAF,IAAY;AAC5C,WACC,cAAC,cAAD;AACC,MAAA,GAAG,EAAGA,IAAI,CAAE,CAAF,CAAJ,CAAUrE,IADjB;AAEC,MAAA,IAAI,EAAGqE,IAFR;AAGC,MAAA,kBAAkB,EAAGrD,kBAHtB;AAIC,MAAA,qBAAqB,EAAGD;AAJzB,MADD;AAQA,GATC,CAvCH,CADD;AAoDA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button, Flex, FlexItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { useCallback, useRef } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { __experimentalUseDialog as useDialog } from '@wordpress/compose';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport EntityTypeList from './entity-type-list';\nimport { useIsDirty } from './hooks/use-is-dirty';\n\nconst PUBLISH_ON_SAVE_ENTITIES = [\n\t{\n\t\tkind: 'postType',\n\t\tname: 'wp_navigation',\n\t},\n];\n\nfunction identity( values ) {\n\treturn values;\n}\n\nexport default function EntitiesSavedStates( { close } ) {\n\tconst isDirtyProps = useIsDirty();\n\treturn (\n\t\t<EntitiesSavedStatesExtensible close={ close } { ...isDirtyProps } />\n\t);\n}\n\nexport function EntitiesSavedStatesExtensible( {\n\tadditionalPrompt = undefined,\n\tclose,\n\tonSave = identity,\n\tsaveEnabled: saveEnabledProp = undefined,\n\tsaveLabel = __( 'Save' ),\n\n\tdirtyEntityRecords,\n\tisDirty,\n\tsetUnselectedEntities,\n\tunselectedEntities,\n} ) {\n\tconst saveButtonRef = useRef();\n\tconst {\n\t\teditEntityRecord,\n\t\tsaveEditedEntityRecord,\n\t\t__experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits,\n\t} = useDispatch( coreStore );\n\n\tconst { __unstableMarkLastChangeAsPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst { createSuccessNotice, createErrorNotice, removeNotice } =\n\t\tuseDispatch( noticesStore );\n\n\t// To group entities by type.\n\tconst partitionedSavables = dirtyEntityRecords.reduce( ( acc, record ) => {\n\t\tconst { name } = record;\n\t\tif ( ! acc[ name ] ) {\n\t\t\tacc[ name ] = [];\n\t\t}\n\t\tacc[ name ].push( record );\n\t\treturn acc;\n\t}, {} );\n\n\t// Sort entity groups.\n\tconst {\n\t\tsite: siteSavables,\n\t\twp_template: templateSavables,\n\t\twp_template_part: templatePartSavables,\n\t\t...contentSavables\n\t} = partitionedSavables;\n\tconst sortedPartitionedSavables = [\n\t\tsiteSavables,\n\t\ttemplateSavables,\n\t\ttemplatePartSavables,\n\t\t...Object.values( contentSavables ),\n\t].filter( Array.isArray );\n\n\tconst saveEnabled = saveEnabledProp ?? isDirty;\n\n\tconst saveCheckedEntities = () => {\n\t\tconst saveNoticeId = 'site-editor-save-success';\n\t\tremoveNotice( saveNoticeId );\n\t\tconst entitiesToSave = dirtyEntityRecords.filter(\n\t\t\t( { kind, name, key, property } ) => {\n\t\t\t\treturn ! unselectedEntities.some(\n\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\telt.kind === kind &&\n\t\t\t\t\t\telt.name === name &&\n\t\t\t\t\t\telt.key === key &&\n\t\t\t\t\t\telt.property === property\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\n\t\tclose( entitiesToSave );\n\n\t\tconst siteItemsToSave = [];\n\t\tconst pendingSavedRecords = [];\n\t\tentitiesToSave.forEach( ( { kind, name, key, property } ) => {\n\t\t\tif ( 'root' === kind && 'site' === name ) {\n\t\t\t\tsiteItemsToSave.push( property );\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tPUBLISH_ON_SAVE_ENTITIES.some(\n\t\t\t\t\t\t( typeToPublish ) =>\n\t\t\t\t\t\t\ttypeToPublish.kind === kind &&\n\t\t\t\t\t\t\ttypeToPublish.name === name\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\teditEntityRecord( kind, name, key, { status: 'publish' } );\n\t\t\t\t}\n\n\t\t\t\tpendingSavedRecords.push(\n\t\t\t\t\tsaveEditedEntityRecord( kind, name, key )\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\t\tif ( siteItemsToSave.length ) {\n\t\t\tpendingSavedRecords.push(\n\t\t\t\tsaveSpecifiedEntityEdits(\n\t\t\t\t\t'root',\n\t\t\t\t\t'site',\n\t\t\t\t\tundefined,\n\t\t\t\t\tsiteItemsToSave\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t__unstableMarkLastChangeAsPersistent();\n\n\t\tPromise.all( pendingSavedRecords )\n\t\t\t.then( ( values ) => {\n\t\t\t\treturn onSave( values );\n\t\t\t} )\n\t\t\t.then( ( values ) => {\n\t\t\t\tif (\n\t\t\t\t\tvalues.some( ( value ) => typeof value === 'undefined' )\n\t\t\t\t) {\n\t\t\t\t\tcreateErrorNotice( __( 'Saving failed.' ) );\n\t\t\t\t} else {\n\t\t\t\t\tcreateSuccessNotice( __( 'Site updated.' ), {\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\tid: saveNoticeId,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.catch( ( error ) =>\n\t\t\t\tcreateErrorNotice( `${ __( 'Saving failed.' ) } ${ error }` )\n\t\t\t);\n\t};\n\n\t// Explicitly define this with no argument passed. Using `close` on\n\t// its own will use the event object in place of the expected saved entities.\n\tconst dismissPanel = useCallback( () => close(), [ close ] );\n\n\tconst [ saveDialogRef, saveDialogProps ] = useDialog( {\n\t\tonClose: () => dismissPanel(),\n\t} );\n\n\treturn (\n\t\t<div\n\t\t\tref={ saveDialogRef }\n\t\t\t{ ...saveDialogProps }\n\t\t\tclassName=\"entities-saved-states__panel\"\n\t\t>\n\t\t\t<Flex className=\"entities-saved-states__panel-header\" gap={ 2 }>\n\t\t\t\t<FlexItem\n\t\t\t\t\tisBlock\n\t\t\t\t\tas={ Button }\n\t\t\t\t\tref={ saveButtonRef }\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\tdisabled={ ! saveEnabled }\n\t\t\t\t\tonClick={ saveCheckedEntities }\n\t\t\t\t\tclassName=\"editor-entities-saved-states__save-button\"\n\t\t\t\t>\n\t\t\t\t\t{ saveLabel }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem\n\t\t\t\t\tisBlock\n\t\t\t\t\tas={ Button }\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tonClick={ dismissPanel }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t</FlexItem>\n\t\t\t</Flex>\n\n\t\t\t<div className=\"entities-saved-states__text-prompt\">\n\t\t\t\t<strong>{ __( 'Are you ready to save?' ) }</strong>\n\t\t\t\t{ additionalPrompt }\n\t\t\t\t{ isDirty && (\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'The following changes have been made to your site, templates, and content.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t) }\n\t\t\t</div>\n\n\t\t\t{ sortedPartitionedSavables.map( ( list ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<EntityTypeList\n\t\t\t\t\t\tkey={ list[ 0 ].name }\n\t\t\t\t\t\tlist={ list }\n\t\t\t\t\t\tunselectedEntities={ unselectedEntities }\n\t\t\t\t\t\tsetUnselectedEntities={ setUnselectedEntities }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</div>\n\t);\n}\n"]}
|
|
1
|
+
{"version":3,"names":["Button","Flex","FlexItem","__","useDispatch","useCallback","useRef","store","coreStore","blockEditorStore","__experimentalUseDialog","useDialog","noticesStore","EntityTypeList","useIsDirty","PUBLISH_ON_SAVE_ENTITIES","kind","name","identity","values","EntitiesSavedStates","close","isDirtyProps","createElement","EntitiesSavedStatesExtensible","additionalPrompt","undefined","onSave","saveEnabled","saveEnabledProp","saveLabel","dirtyEntityRecords","isDirty","setUnselectedEntities","unselectedEntities","saveButtonRef","editEntityRecord","saveEditedEntityRecord","__experimentalSaveSpecifiedEntityEdits","saveSpecifiedEntityEdits","__unstableMarkLastChangeAsPersistent","createSuccessNotice","createErrorNotice","removeNotice","partitionedSavables","reduce","acc","record","push","site","siteSavables","wp_template","templateSavables","wp_template_part","templatePartSavables","contentSavables","sortedPartitionedSavables","Object","filter","Array","isArray","saveCheckedEntities","saveNoticeId","entitiesToSave","key","property","some","elt","siteItemsToSave","pendingSavedRecords","forEach","typeToPublish","status","length","Promise","all","then","value","type","id","catch","error","dismissPanel","saveDialogRef","saveDialogProps","onClose","ref","className","gap","isBlock","as","variant","disabled","onClick","map","list"],"sources":["@wordpress/editor/src/components/entities-saved-states/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button, Flex, FlexItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { useCallback, useRef } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { __experimentalUseDialog as useDialog } from '@wordpress/compose';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport EntityTypeList from './entity-type-list';\nimport { useIsDirty } from './hooks/use-is-dirty';\n\nconst PUBLISH_ON_SAVE_ENTITIES = [\n\t{\n\t\tkind: 'postType',\n\t\tname: 'wp_navigation',\n\t},\n];\n\nfunction identity( values ) {\n\treturn values;\n}\n\nexport default function EntitiesSavedStates( { close } ) {\n\tconst isDirtyProps = useIsDirty();\n\treturn (\n\t\t<EntitiesSavedStatesExtensible close={ close } { ...isDirtyProps } />\n\t);\n}\n\nexport function EntitiesSavedStatesExtensible( {\n\tadditionalPrompt = undefined,\n\tclose,\n\tonSave = identity,\n\tsaveEnabled: saveEnabledProp = undefined,\n\tsaveLabel = __( 'Save' ),\n\n\tdirtyEntityRecords,\n\tisDirty,\n\tsetUnselectedEntities,\n\tunselectedEntities,\n} ) {\n\tconst saveButtonRef = useRef();\n\tconst {\n\t\teditEntityRecord,\n\t\tsaveEditedEntityRecord,\n\t\t__experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits,\n\t} = useDispatch( coreStore );\n\n\tconst { __unstableMarkLastChangeAsPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst { createSuccessNotice, createErrorNotice, removeNotice } =\n\t\tuseDispatch( noticesStore );\n\n\t// To group entities by type.\n\tconst partitionedSavables = dirtyEntityRecords.reduce( ( acc, record ) => {\n\t\tconst { name } = record;\n\t\tif ( ! acc[ name ] ) {\n\t\t\tacc[ name ] = [];\n\t\t}\n\t\tacc[ name ].push( record );\n\t\treturn acc;\n\t}, {} );\n\n\t// Sort entity groups.\n\tconst {\n\t\tsite: siteSavables,\n\t\twp_template: templateSavables,\n\t\twp_template_part: templatePartSavables,\n\t\t...contentSavables\n\t} = partitionedSavables;\n\tconst sortedPartitionedSavables = [\n\t\tsiteSavables,\n\t\ttemplateSavables,\n\t\ttemplatePartSavables,\n\t\t...Object.values( contentSavables ),\n\t].filter( Array.isArray );\n\n\tconst saveEnabled = saveEnabledProp ?? isDirty;\n\n\tconst saveCheckedEntities = () => {\n\t\tconst saveNoticeId = 'site-editor-save-success';\n\t\tremoveNotice( saveNoticeId );\n\t\tconst entitiesToSave = dirtyEntityRecords.filter(\n\t\t\t( { kind, name, key, property } ) => {\n\t\t\t\treturn ! unselectedEntities.some(\n\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\telt.kind === kind &&\n\t\t\t\t\t\telt.name === name &&\n\t\t\t\t\t\telt.key === key &&\n\t\t\t\t\t\telt.property === property\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\n\t\tclose( entitiesToSave );\n\n\t\tconst siteItemsToSave = [];\n\t\tconst pendingSavedRecords = [];\n\t\tentitiesToSave.forEach( ( { kind, name, key, property } ) => {\n\t\t\tif ( 'root' === kind && 'site' === name ) {\n\t\t\t\tsiteItemsToSave.push( property );\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tPUBLISH_ON_SAVE_ENTITIES.some(\n\t\t\t\t\t\t( typeToPublish ) =>\n\t\t\t\t\t\t\ttypeToPublish.kind === kind &&\n\t\t\t\t\t\t\ttypeToPublish.name === name\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\teditEntityRecord( kind, name, key, { status: 'publish' } );\n\t\t\t\t}\n\n\t\t\t\tpendingSavedRecords.push(\n\t\t\t\t\tsaveEditedEntityRecord( kind, name, key )\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\t\tif ( siteItemsToSave.length ) {\n\t\t\tpendingSavedRecords.push(\n\t\t\t\tsaveSpecifiedEntityEdits(\n\t\t\t\t\t'root',\n\t\t\t\t\t'site',\n\t\t\t\t\tundefined,\n\t\t\t\t\tsiteItemsToSave\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t__unstableMarkLastChangeAsPersistent();\n\n\t\tPromise.all( pendingSavedRecords )\n\t\t\t.then( ( values ) => {\n\t\t\t\treturn onSave( values );\n\t\t\t} )\n\t\t\t.then( ( values ) => {\n\t\t\t\tif (\n\t\t\t\t\tvalues.some( ( value ) => typeof value === 'undefined' )\n\t\t\t\t) {\n\t\t\t\t\tcreateErrorNotice( __( 'Saving failed.' ) );\n\t\t\t\t} else {\n\t\t\t\t\tcreateSuccessNotice( __( 'Site updated.' ), {\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\tid: saveNoticeId,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.catch( ( error ) =>\n\t\t\t\tcreateErrorNotice( `${ __( 'Saving failed.' ) } ${ error }` )\n\t\t\t);\n\t};\n\n\t// Explicitly define this with no argument passed. Using `close` on\n\t// its own will use the event object in place of the expected saved entities.\n\tconst dismissPanel = useCallback( () => close(), [ close ] );\n\n\tconst [ saveDialogRef, saveDialogProps ] = useDialog( {\n\t\tonClose: () => dismissPanel(),\n\t} );\n\n\treturn (\n\t\t<div\n\t\t\tref={ saveDialogRef }\n\t\t\t{ ...saveDialogProps }\n\t\t\tclassName=\"entities-saved-states__panel\"\n\t\t>\n\t\t\t<Flex className=\"entities-saved-states__panel-header\" gap={ 2 }>\n\t\t\t\t<FlexItem\n\t\t\t\t\tisBlock\n\t\t\t\t\tas={ Button }\n\t\t\t\t\tref={ saveButtonRef }\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\tdisabled={ ! saveEnabled }\n\t\t\t\t\tonClick={ saveCheckedEntities }\n\t\t\t\t\tclassName=\"editor-entities-saved-states__save-button\"\n\t\t\t\t>\n\t\t\t\t\t{ saveLabel }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem\n\t\t\t\t\tisBlock\n\t\t\t\t\tas={ Button }\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tonClick={ dismissPanel }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t</FlexItem>\n\t\t\t</Flex>\n\n\t\t\t<div className=\"entities-saved-states__text-prompt\">\n\t\t\t\t<strong>{ __( 'Are you ready to save?' ) }</strong>\n\t\t\t\t{ additionalPrompt }\n\t\t\t\t{ isDirty && (\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'The following changes have been made to your site, templates, and content.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t) }\n\t\t\t</div>\n\n\t\t\t{ sortedPartitionedSavables.map( ( list ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<EntityTypeList\n\t\t\t\t\t\tkey={ list[ 0 ].name }\n\t\t\t\t\t\tlist={ list }\n\t\t\t\t\t\tunselectedEntities={ unselectedEntities }\n\t\t\t\t\t\tsetUnselectedEntities={ setUnselectedEntities }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</div>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,MAAM,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,uBAAuB;AAC9D,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,WAAW,EAAEC,MAAM,QAAQ,oBAAoB;AACxD,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASD,KAAK,IAAIE,gBAAgB,QAAQ,yBAAyB;AACnE,SAASC,uBAAuB,IAAIC,SAAS,QAAQ,oBAAoB;AACzE,SAASJ,KAAK,IAAIK,YAAY,QAAQ,oBAAoB;;AAE1D;AACA;AACA;AACA,OAAOC,cAAc,MAAM,oBAAoB;AAC/C,SAASC,UAAU,QAAQ,sBAAsB;AAEjD,MAAMC,wBAAwB,GAAG,CAChC;EACCC,IAAI,EAAE,UAAU;EAChBC,IAAI,EAAE;AACP,CAAC,CACD;AAED,SAASC,QAAQA,CAAEC,MAAM,EAAG;EAC3B,OAAOA,MAAM;AACd;AAEA,eAAe,SAASC,mBAAmBA,CAAE;EAAEC;AAAM,CAAC,EAAG;EACxD,MAAMC,YAAY,GAAGR,UAAU,CAAC,CAAC;EACjC,OACCS,aAAA,CAACC,6BAA6B;IAACH,KAAK,EAAGA,KAAO;IAAA,GAAMC;EAAY,CAAI,CAAC;AAEvE;AAEA,OAAO,SAASE,6BAA6BA,CAAE;EAC9CC,gBAAgB,GAAGC,SAAS;EAC5BL,KAAK;EACLM,MAAM,GAAGT,QAAQ;EACjBU,WAAW,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AAG,EAAGnD,aAAe;IACrBwD,OAAO,EAAC,SAAS;IACjBC,QAAQ,EAAG,CAAEhE,WAAa;IAC1BiE,OAAO,EAAGhC,mBAAqB;IAC/B0B,SAAS,EAAC;EAA2C,GAEnDzD,SACO,CAAC,EACXP,aAAA,CAACrB,QAAQ;IACRuF,OAAO;IACPC,EAAE,EAAG1F,MAAQ;IACb2F,OAAO,EAAC,WAAW;IACnBE,OAAO,EAAGX;EAAc,GAEtB/E,EAAE,CAAE,QAAS,CACN,CACL,CAAC,EAEPoB,aAAA;IAAKgE,SAAS,EAAC;EAAoC,GAClDhE,aAAA,iBAAUpB,EAAE,CAAE,wBAAyB,CAAW,CAAC,EACjDsB,gBAAgB,EAChBO,OAAO,IACRT,aAAA,YACGpB,EAAE,CACH,4EACD,CACE,CAEA,CAAC,EAEJqD,yBAAyB,CAACsC,GAAG,CAAIC,IAAI,IAAM;IAC5C,OACCxE,aAAA,CAACV,cAAc;MACdmD,GAAG,EAAG+B,IAAI,CAAE,CAAC,CAAE,CAAC9E,IAAM;MACtB8E,IAAI,EAAGA,IAAM;MACb7D,kBAAkB,EAAGA,kBAAoB;MACzCD,qBAAqB,EAAGA;IAAuB,CAC/C,CAAC;EAEJ,CAAE,CACE,CAAC;AAER"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createElement } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
@@ -10,12 +9,11 @@ import { select } from '@wordpress/data';
|
|
|
10
9
|
import { Warning } from '@wordpress/block-editor';
|
|
11
10
|
import { useCopyToClipboard } from '@wordpress/compose';
|
|
12
11
|
import { doAction } from '@wordpress/hooks';
|
|
12
|
+
|
|
13
13
|
/**
|
|
14
14
|
* Internal dependencies
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
16
|
import { store as editorStore } from '../../store';
|
|
18
|
-
|
|
19
17
|
function getContent() {
|
|
20
18
|
try {
|
|
21
19
|
// While `select` in a component is generally discouraged, it is
|
|
@@ -27,7 +25,6 @@ function getContent() {
|
|
|
27
25
|
return select(editorStore).getEditedPostContent();
|
|
28
26
|
} catch (error) {}
|
|
29
27
|
}
|
|
30
|
-
|
|
31
28
|
function CopyButton({
|
|
32
29
|
text,
|
|
33
30
|
children
|
|
@@ -38,7 +35,6 @@ function CopyButton({
|
|
|
38
35
|
ref: ref
|
|
39
36
|
}, children);
|
|
40
37
|
}
|
|
41
|
-
|
|
42
38
|
class ErrorBoundary extends Component {
|
|
43
39
|
constructor() {
|
|
44
40
|
super(...arguments);
|
|
@@ -46,26 +42,21 @@ class ErrorBoundary extends Component {
|
|
|
46
42
|
error: null
|
|
47
43
|
};
|
|
48
44
|
}
|
|
49
|
-
|
|
50
45
|
componentDidCatch(error) {
|
|
51
46
|
doAction('editor.ErrorBoundary.errorLogged', error);
|
|
52
47
|
}
|
|
53
|
-
|
|
54
48
|
static getDerivedStateFromError(error) {
|
|
55
49
|
return {
|
|
56
50
|
error
|
|
57
51
|
};
|
|
58
52
|
}
|
|
59
|
-
|
|
60
53
|
render() {
|
|
61
54
|
const {
|
|
62
55
|
error
|
|
63
56
|
} = this.state;
|
|
64
|
-
|
|
65
57
|
if (!error) {
|
|
66
58
|
return this.props.children;
|
|
67
59
|
}
|
|
68
|
-
|
|
69
60
|
const actions = [createElement(CopyButton, {
|
|
70
61
|
key: "copy-post",
|
|
71
62
|
text: getContent
|
|
@@ -78,8 +69,6 @@ class ErrorBoundary extends Component {
|
|
|
78
69
|
actions: actions
|
|
79
70
|
}, __('The editor has encountered an unexpected error.'));
|
|
80
71
|
}
|
|
81
|
-
|
|
82
72
|
}
|
|
83
|
-
|
|
84
73
|
export default ErrorBoundary;
|
|
85
74
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["Component","__","Button","select","Warning","useCopyToClipboard","doAction","store","editorStore","getContent","getEditedPostContent","error","CopyButton","text","children","ref","createElement","variant","ErrorBoundary","constructor","arguments","state","componentDidCatch","getDerivedStateFromError","render","props","actions","key","stack","className"],"sources":["@wordpress/editor/src/components/error-boundary/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { select } from '@wordpress/data';\nimport { Warning } from '@wordpress/block-editor';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { doAction } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction getContent() {\n\ttry {\n\t\t// While `select` in a component is generally discouraged, it is\n\t\t// used here because it (a) reduces the chance of data loss in the\n\t\t// case of additional errors by performing a direct retrieval and\n\t\t// (b) avoids the performance cost associated with unnecessary\n\t\t// content serialization throughout the lifetime of a non-erroring\n\t\t// application.\n\t\treturn select( editorStore ).getEditedPostContent();\n\t} catch ( error ) {}\n}\n\nfunction CopyButton( { text, children } ) {\n\tconst ref = useCopyToClipboard( text );\n\treturn (\n\t\t<Button variant=\"secondary\" ref={ ref }>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n\nclass ErrorBoundary extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\terror: null,\n\t\t};\n\t}\n\n\tcomponentDidCatch( error ) {\n\t\tdoAction( 'editor.ErrorBoundary.errorLogged', error );\n\t}\n\n\tstatic getDerivedStateFromError( error ) {\n\t\treturn { error };\n\t}\n\n\trender() {\n\t\tconst { error } = this.state;\n\t\tif ( ! error ) {\n\t\t\treturn this.props.children;\n\t\t}\n\n\t\tconst actions = [\n\t\t\t<CopyButton key=\"copy-post\" text={ getContent }>\n\t\t\t\t{ __( 'Copy Post Text' ) }\n\t\t\t</CopyButton>,\n\t\t\t<CopyButton key=\"copy-error\" text={ error.stack }>\n\t\t\t\t{ __( 'Copy Error' ) }\n\t\t\t</CopyButton>,\n\t\t];\n\n\t\treturn (\n\t\t\t<Warning className=\"editor-error-boundary\" actions={ actions }>\n\t\t\t\t{ __( 'The editor has encountered an unexpected error.' ) }\n\t\t\t</Warning>\n\t\t);\n\t}\n}\n\nexport default ErrorBoundary;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,MAAM,QAAQ,iBAAiB;AACxC,SAASC,OAAO,QAAQ,yBAAyB;AACjD,SAASC,kBAAkB,QAAQ,oBAAoB;AACvD,SAASC,QAAQ,QAAQ,kBAAkB;;AAE3C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,WAAW,QAAQ,aAAa;AAElD,SAASC,UAAUA,CAAA,EAAG;EACrB,IAAI;IACH;IACA;IACA;IACA;IACA;IACA;IACA,OAAON,MAAM,CAAEK,WAAY,CAAC,CAACE,oBAAoB,CAAC,CAAC;EACpD,CAAC,CAAC,OAAQC,KAAK,EAAG,CAAC;AACpB;AAEA,SAASC,UAAUA,CAAE;EAAEC,IAAI;EAAEC;AAAS,CAAC,EAAG;EACzC,MAAMC,GAAG,GAAGV,kBAAkB,CAAEQ,IAAK,CAAC;EACtC,OACCG,aAAA,CAACd,MAAM;IAACe,OAAO,EAAC,WAAW;IAACF,GAAG,EAAGA;EAAK,GACpCD,QACK,CAAC;AAEX;AAEA,MAAMI,aAAa,SAASlB,SAAS,CAAC;EACrCmB,WAAWA,CAAA,EAAG;IACb,KAAK,CAAE,GAAGC,SAAU,CAAC;IAErB,IAAI,CAACC,KAAK,GAAG;MACZV,KAAK,EAAE;IACR,CAAC;EACF;EAEAW,iBAAiBA,CAAEX,KAAK,EAAG;IAC1BL,QAAQ,CAAE,kCAAkC,EAAEK,KAAM,CAAC;EACtD;EAEA,OAAOY,wBAAwBA,CAAEZ,KAAK,EAAG;IACxC,OAAO;MAAEA;IAAM,CAAC;EACjB;EAEAa,MAAMA,CAAA,EAAG;IACR,MAAM;MAAEb;IAAM,CAAC,GAAG,IAAI,CAACU,KAAK;IAC5B,IAAK,CAAEV,KAAK,EAAG;MACd,OAAO,IAAI,CAACc,KAAK,CAACX,QAAQ;IAC3B;IAEA,MAAMY,OAAO,GAAG,CACfV,aAAA,CAACJ,UAAU;MAACe,GAAG,EAAC,WAAW;MAACd,IAAI,EAAGJ;IAAY,GAC5CR,EAAE,CAAE,gBAAiB,CACZ,CAAC,EACbe,aAAA,CAACJ,UAAU;MAACe,GAAG,EAAC,YAAY;MAACd,IAAI,EAAGF,KAAK,CAACiB;IAAO,GAC9C3B,EAAE,CAAE,YAAa,CACR,CAAC,CACb;IAED,OACCe,aAAA,CAACZ,OAAO;MAACyB,SAAS,EAAC,uBAAuB;MAACH,OAAO,EAAGA;IAAS,GAC3DzB,EAAE,CAAE,iDAAkD,CAChD,CAAC;EAEZ;AACD;AAEA,eAAeiB,aAAa"}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { useShortcut } from '@wordpress/keyboard-shortcuts';
|
|
5
5
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
6
|
+
|
|
6
7
|
/**
|
|
7
8
|
* Internal dependencies
|
|
8
9
|
*/
|
|
9
|
-
|
|
10
10
|
import { store as editorStore } from '../../store';
|
|
11
11
|
export default function EditorKeyboardShortcuts() {
|
|
12
12
|
const {
|
|
@@ -28,23 +28,22 @@ export default function EditorKeyboardShortcuts() {
|
|
|
28
28
|
});
|
|
29
29
|
useShortcut('core/editor/save', event => {
|
|
30
30
|
event.preventDefault();
|
|
31
|
+
|
|
31
32
|
/**
|
|
32
33
|
* Do not save the post if post saving is locked.
|
|
33
34
|
*/
|
|
34
|
-
|
|
35
35
|
if (isPostSavingLocked()) {
|
|
36
36
|
return;
|
|
37
|
-
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// TODO: This should be handled in the `savePost` effect in
|
|
38
40
|
// considering `isSaveable`. See note on `isEditedPostSaveable`
|
|
39
41
|
// selector about dirtiness and meta-boxes.
|
|
40
42
|
//
|
|
41
43
|
// See: `isEditedPostSaveable`
|
|
42
|
-
|
|
43
|
-
|
|
44
44
|
if (!isEditedPostDirty()) {
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
|
-
|
|
48
47
|
savePost();
|
|
49
48
|
});
|
|
50
49
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["useShortcut","useDispatch","useSelect","store","editorStore","EditorKeyboardShortcuts","redo","undo","savePost","isEditedPostDirty","isPostSavingLocked","event","preventDefault"],"sources":["@wordpress/editor/src/components/global-keyboard-shortcuts/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function EditorKeyboardShortcuts() {\n\tconst { redo, undo, savePost } = useDispatch( editorStore );\n\tconst { isEditedPostDirty, isPostSavingLocked } = useSelect( editorStore );\n\n\tuseShortcut( 'core/editor/undo', ( event ) => {\n\t\tundo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/editor/redo', ( event ) => {\n\t\tredo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/editor/save', ( event ) => {\n\t\tevent.preventDefault();\n\n\t\t/**\n\t\t * Do not save the post if post saving is locked.\n\t\t */\n\t\tif ( isPostSavingLocked() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// TODO: This should be handled in the `savePost` effect in\n\t\t// considering `isSaveable`. See note on `isEditedPostSaveable`\n\t\t// selector about dirtiness and meta-boxes.\n\t\t//\n\t\t// See: `isEditedPostSaveable`\n\t\tif ( ! isEditedPostDirty() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsavePost();\n\t} );\n\n\treturn null;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,+BAA+B;AAC3D,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;;AAExD;AACA;AACA;AACA,SAASC,KAAK,IAAIC,WAAW,QAAQ,aAAa;AAElD,eAAe,SAASC,uBAAuBA,CAAA,EAAG;EACjD,MAAM;IAAEC,IAAI;IAAEC,IAAI;IAAEC;EAAS,CAAC,GAAGP,WAAW,CAAEG,WAAY,CAAC;EAC3D,MAAM;IAAEK,iBAAiB;IAAEC;EAAmB,CAAC,GAAGR,SAAS,CAAEE,WAAY,CAAC;EAE1EJ,WAAW,CAAE,kBAAkB,EAAIW,KAAK,IAAM;IAC7CJ,IAAI,CAAC,CAAC;IACNI,KAAK,CAACC,cAAc,CAAC,CAAC;EACvB,CAAE,CAAC;EAEHZ,WAAW,CAAE,kBAAkB,EAAIW,KAAK,IAAM;IAC7CL,IAAI,CAAC,CAAC;IACNK,KAAK,CAACC,cAAc,CAAC,CAAC;EACvB,CAAE,CAAC;EAEHZ,WAAW,CAAE,kBAAkB,EAAIW,KAAK,IAAM;IAC7CA,KAAK,CAACC,cAAc,CAAC,CAAC;;IAEtB;AACF;AACA;IACE,IAAKF,kBAAkB,CAAC,CAAC,EAAG;MAC3B;IACD;;IAEA;IACA;IACA;IACA;IACA;IACA,IAAK,CAAED,iBAAiB,CAAC,CAAC,EAAG;MAC5B;IACD;IAEAD,QAAQ,CAAC,CAAC;EACX,CAAE,CAAC;EAEH,OAAO,IAAI;AACZ"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createElement } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
@@ -9,7 +8,6 @@ import { __ } from '@wordpress/i18n';
|
|
|
9
8
|
import { BlockEditorKeyboardShortcuts } from '@wordpress/block-editor';
|
|
10
9
|
import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
|
|
11
10
|
import { isAppleOS } from '@wordpress/keycodes';
|
|
12
|
-
|
|
13
11
|
function EditorKeyboardShortcutsRegister() {
|
|
14
12
|
// Registering the shortcuts.
|
|
15
13
|
const {
|
|
@@ -54,6 +52,5 @@ function EditorKeyboardShortcutsRegister() {
|
|
|
54
52
|
}, [registerShortcut]);
|
|
55
53
|
return createElement(BlockEditorKeyboardShortcuts.Register, null);
|
|
56
54
|
}
|
|
57
|
-
|
|
58
55
|
export default EditorKeyboardShortcutsRegister;
|
|
59
56
|
//# sourceMappingURL=register-shortcuts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["useEffect","useDispatch","__","BlockEditorKeyboardShortcuts","store","keyboardShortcutsStore","isAppleOS","EditorKeyboardShortcutsRegister","registerShortcut","name","category","description","keyCombination","modifier","character","aliases","createElement","Register"],"sources":["@wordpress/editor/src/components/global-keyboard-shortcuts/register-shortcuts.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { BlockEditorKeyboardShortcuts } from '@wordpress/block-editor';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { isAppleOS } from '@wordpress/keycodes';\n\nfunction EditorKeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/save',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Save your changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 's',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/undo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Undo your last changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/redo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Redo your last undo.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t\t// Disable on Apple OS because it conflicts with the browser's\n\t\t\t// history shortcut. It's a fine alias for both Windows and Linux.\n\t\t\t// Since there's no conflict for Ctrl+Shift+Z on both Windows and\n\t\t\t// Linux, we keep it as the default for consistency.\n\t\t\taliases: isAppleOS()\n\t\t\t\t? []\n\t\t\t\t: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmodifier: 'primary',\n\t\t\t\t\t\t\tcharacter: 'y',\n\t\t\t\t\t\t},\n\t\t\t\t ],\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\treturn <BlockEditorKeyboardShortcuts.Register />;\n}\n\nexport default EditorKeyboardShortcutsRegister;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,4BAA4B,QAAQ,yBAAyB;AACtE,SAASC,KAAK,IAAIC,sBAAsB,QAAQ,+BAA+B;AAC/E,SAASC,SAAS,QAAQ,qBAAqB;AAE/C,SAASC,+BAA+BA,CAAA,EAAG;EAC1C;EACA,MAAM;IAAEC;EAAiB,CAAC,GAAGP,WAAW,CAAEI,sBAAuB,CAAC;EAClEL,SAAS,CAAE,MAAM;IAChBQ,gBAAgB,CAAE;MACjBC,IAAI,EAAE,kBAAkB;MACxBC,QAAQ,EAAE,QAAQ;MAClBC,WAAW,EAAET,EAAE,CAAE,oBAAqB,CAAC;MACvCU,cAAc,EAAE;QACfC,QAAQ,EAAE,SAAS;QACnBC,SAAS,EAAE;MACZ;IACD,CAAE,CAAC;IAEHN,gBAAgB,CAAE;MACjBC,IAAI,EAAE,kBAAkB;MACxBC,QAAQ,EAAE,QAAQ;MAClBC,WAAW,EAAET,EAAE,CAAE,yBAA0B,CAAC;MAC5CU,cAAc,EAAE;QACfC,QAAQ,EAAE,SAAS;QACnBC,SAAS,EAAE;MACZ;IACD,CAAE,CAAC;IAEHN,gBAAgB,CAAE;MACjBC,IAAI,EAAE,kBAAkB;MACxBC,QAAQ,EAAE,QAAQ;MAClBC,WAAW,EAAET,EAAE,CAAE,sBAAuB,CAAC;MACzCU,cAAc,EAAE;QACfC,QAAQ,EAAE,cAAc;QACxBC,SAAS,EAAE;MACZ,CAAC;MACD;MACA;MACA;MACA;MACAC,OAAO,EAAET,SAAS,CAAC,CAAC,GACjB,EAAE,GACF,CACA;QACCO,QAAQ,EAAE,SAAS;QACnBC,SAAS,EAAE;MACZ,CAAC;IAEL,CAAE,CAAC;EACJ,CAAC,EAAE,CAAEN,gBAAgB,CAAG,CAAC;EAEzB,OAAOQ,aAAA,CAACb,4BAA4B,CAACc,QAAQ,MAAE,CAAC;AACjD;AAEA,eAAeV,+BAA+B"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Internal dependencies
|
|
3
3
|
*/
|
|
4
|
-
import EditorKeyboardShortcuts from './global-keyboard-shortcuts';
|
|
4
|
+
import EditorKeyboardShortcuts from './global-keyboard-shortcuts';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// Block Creation Components.
|
|
7
|
+
export * from './autocompleters';
|
|
7
8
|
|
|
9
|
+
// Post Related Components.
|
|
8
10
|
export { default as AutosaveMonitor } from './autosave-monitor';
|
|
9
11
|
export { default as DocumentOutline } from './document-outline';
|
|
10
12
|
export { default as DocumentOutlineCheck } from './document-outline/check';
|
|
@@ -71,8 +73,9 @@ export { default as ThemeSupportCheck } from './theme-support-check';
|
|
|
71
73
|
export { default as UnsavedChangesWarning } from './unsaved-changes-warning';
|
|
72
74
|
export { default as WordCount } from './word-count';
|
|
73
75
|
export { default as TimeToRead } from './time-to-read';
|
|
74
|
-
export { default as CharacterCount } from './character-count';
|
|
76
|
+
export { default as CharacterCount } from './character-count';
|
|
75
77
|
|
|
78
|
+
// State Related Components.
|
|
76
79
|
export { default as EditorProvider } from './provider';
|
|
77
80
|
export * from './deprecated';
|
|
78
81
|
export const VisualEditorGlobalKeyboardShortcuts = EditorKeyboardShortcuts;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/editor/src/components/index.js"],"names":["EditorKeyboardShortcuts","default","AutosaveMonitor","DocumentOutline","DocumentOutlineCheck","EditorKeyboardShortcutsRegister","EditorHistoryRedo","EditorHistoryUndo","EditorNotices","EditorSnackbars","EntitiesSavedStates","useIsDirty","useEntitiesSavedStatesIsDirty","ErrorBoundary","LocalAutosaveMonitor","PageAttributesCheck","PageAttributesOrder","PageAttributesParent","PageTemplate","PostAuthor","PostAuthorCheck","PostComments","PostExcerpt","PostExcerptCheck","PostFeaturedImage","PostFeaturedImageCheck","PostFormat","PostFormatCheck","PostLastRevision","PostLastRevisionCheck","PostLockedModal","PostPendingStatus","PostPendingStatusCheck","PostPingbacks","PostPreviewButton","PostPublishButton","PostPublishButtonLabel","PostPublishPanel","PostSavedState","PostSchedule","PostScheduleCheck","PostScheduleLabel","usePostScheduleLabel","PostSlug","PostSlugCheck","PostSticky","PostStickyCheck","PostSwitchToDraftButton","PostSyncStatus","PostSyncStatusModal","PostTaxonomies","FlatTermSelector","PostTaxonomiesFlatTermSelector","HierarchicalTermSelector","PostTaxonomiesHierarchicalTermSelector","PostTaxonomiesCheck","PostTextEditor","PostTitle","PostTrash","PostTrashCheck","PostTypeSupportCheck","PostURL","PostURLCheck","PostURLLabel","usePostURLLabel","PostVisibility","PostVisibilityLabel","usePostVisibilityLabel","PostVisibilityCheck","TableOfContents","ThemeSupportCheck","UnsavedChangesWarning","WordCount","TimeToRead","CharacterCount","EditorProvider","VisualEditorGlobalKeyboardShortcuts","TextEditorGlobalKeyboardShortcuts"],"mappings":"A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AIsD,mBAApB,QAA+C,yBAA/C;AACA,SAAStD,OAAO,IAAIuD,cAApB,QAA0C,oBAA1C;AACA,SAASvD,OAAO,IAAIwD,SAApB,QAAqC,cAArC;AACA,SAASxD,OAAO,IAAIyD,SAApB,QAAqC,cAArC;AACA,SAASzD,OAAO,IAAI0D,cAApB,QAA0C,oBAA1C;AACA,SAAS1D,OAAO,IAAI2D,oBAApB,QAAgD,2BAAhD;AACA,SAAS3D,OAAO,IAAI4D,OAApB,QAAmC,YAAnC;AACA,SAAS5D,OAAO,IAAI6D,YAApB,QAAwC,kBAAxC;AACA,SAAS7D,OAAO,IAAI8D,YAApB,EAAkCC,eAAlC,QAAyD,kBAAzD;AACA,SAAS/D,OAAO,IAAIgE,cAApB,QAA0C,mBAA1C;AACA,SACChE,OAAO,IAAIiE,mBADZ,EAECC,sBAFD,QAGO,yBAHP;AAIA,SAASlE,OAAO,IAAImE,mBAApB,QAA+C,yBAA/C;AACA,SAASnE,OAAO,IAAIoE,eAApB,QAA2C,qBAA3C;AACA,SAASpE,OAAO,IAAIqE,iBAApB,QAA6C,uBAA7C;AACA,SAASrE,OAAO,IAAIsE,qBAApB,QAAiD,2BAAjD;AACA,SAAStE,OAAO,IAAIuE,SAApB,QAAqC,cAArC;AACA,SAASvE,OAAO,IAAIwE,UAApB,QAAsC,gBAAtC;AACA,SAASxE,OAAO,IAAIyE,cAApB,QAA0C,mBAA1C,C,CAEA;;AACA,SAASzE,OAAO,IAAI0E,cAApB,QAA0C,YAA1C;AAEA,cAAc,cAAd;AACA,OAAO,MAAMC,mCAAmC,GAAG5E,uBAA5C;AACP,OAAO,MAAM6E,iCAAiC,GAAG7E,uBAA1C","sourcesContent":["/**\n * Internal dependencies\n */\nimport EditorKeyboardShortcuts from './global-keyboard-shortcuts';\n\n// Block Creation Components.\nexport * from './autocompleters';\n\n// Post Related Components.\nexport { default as AutosaveMonitor } from './autosave-monitor';\nexport { default as DocumentOutline } from './document-outline';\nexport { default as DocumentOutlineCheck } from './document-outline/check';\nexport { EditorKeyboardShortcuts };\nexport { default as EditorKeyboardShortcutsRegister } from './global-keyboard-shortcuts/register-shortcuts';\nexport { default as EditorHistoryRedo } from './editor-history/redo';\nexport { default as EditorHistoryUndo } from './editor-history/undo';\nexport { default as EditorNotices } from './editor-notices';\nexport { default as EditorSnackbars } from './editor-snackbars';\nexport { default as EntitiesSavedStates } from './entities-saved-states';\nexport { useIsDirty as useEntitiesSavedStatesIsDirty } from './entities-saved-states/hooks/use-is-dirty';\nexport { default as ErrorBoundary } from './error-boundary';\nexport { default as LocalAutosaveMonitor } from './local-autosave-monitor';\nexport { default as PageAttributesCheck } from './page-attributes/check';\nexport { default as PageAttributesOrder } from './page-attributes/order';\nexport { default as PageAttributesParent } from './page-attributes/parent';\nexport { default as PageTemplate } from './post-template';\nexport { default as PostAuthor } from './post-author';\nexport { default as PostAuthorCheck } from './post-author/check';\nexport { default as PostComments } from './post-comments';\nexport { default as PostExcerpt } from './post-excerpt';\nexport { default as PostExcerptCheck } from './post-excerpt/check';\nexport { default as PostFeaturedImage } from './post-featured-image';\nexport { default as PostFeaturedImageCheck } from './post-featured-image/check';\nexport { default as PostFormat } from './post-format';\nexport { default as PostFormatCheck } from './post-format/check';\nexport { default as PostLastRevision } from './post-last-revision';\nexport { default as PostLastRevisionCheck } from './post-last-revision/check';\nexport { default as PostLockedModal } from './post-locked-modal';\nexport { default as PostPendingStatus } from './post-pending-status';\nexport { default as PostPendingStatusCheck } from './post-pending-status/check';\nexport { default as PostPingbacks } from './post-pingbacks';\nexport { default as PostPreviewButton } from './post-preview-button';\nexport { default as PostPublishButton } from './post-publish-button';\nexport { default as PostPublishButtonLabel } from './post-publish-button/label';\nexport { default as PostPublishPanel } from './post-publish-panel';\nexport { default as PostSavedState } from './post-saved-state';\nexport { default as PostSchedule } from './post-schedule';\nexport { default as PostScheduleCheck } from './post-schedule/check';\nexport {\n\tdefault as PostScheduleLabel,\n\tusePostScheduleLabel,\n} from './post-schedule/label';\nexport { default as PostSlug } from './post-slug';\nexport { default as PostSlugCheck } from './post-slug/check';\nexport { default as PostSticky } from './post-sticky';\nexport { default as PostStickyCheck } from './post-sticky/check';\nexport { default as PostSwitchToDraftButton } from './post-switch-to-draft-button';\nexport {\n\tdefault as PostSyncStatus,\n\tPostSyncStatusModal,\n} from './post-sync-status';\nexport { default as PostTaxonomies } from './post-taxonomies';\nexport { FlatTermSelector as PostTaxonomiesFlatTermSelector } from './post-taxonomies/flat-term-selector';\nexport { HierarchicalTermSelector as PostTaxonomiesHierarchicalTermSelector } from './post-taxonomies/hierarchical-term-selector';\nexport { default as PostTaxonomiesCheck } from './post-taxonomies/check';\nexport { default as PostTextEditor } from './post-text-editor';\nexport { default as PostTitle } from './post-title';\nexport { default as PostTrash } from './post-trash';\nexport { default as PostTrashCheck } from './post-trash/check';\nexport { default as PostTypeSupportCheck } from './post-type-support-check';\nexport { default as PostURL } from './post-url';\nexport { default as PostURLCheck } from './post-url/check';\nexport { default as PostURLLabel, usePostURLLabel } from './post-url/label';\nexport { default as PostVisibility } from './post-visibility';\nexport {\n\tdefault as PostVisibilityLabel,\n\tusePostVisibilityLabel,\n} from './post-visibility/label';\nexport { default as PostVisibilityCheck } from './post-visibility/check';\nexport { default as TableOfContents } from './table-of-contents';\nexport { default as ThemeSupportCheck } from './theme-support-check';\nexport { default as UnsavedChangesWarning } from './unsaved-changes-warning';\nexport { default as WordCount } from './word-count';\nexport { default as TimeToRead } from './time-to-read';\nexport { default as CharacterCount } from './character-count';\n\n// State Related Components.\nexport { default as EditorProvider } from './provider';\n\nexport * from './deprecated';\nexport const VisualEditorGlobalKeyboardShortcuts = EditorKeyboardShortcuts;\nexport const TextEditorGlobalKeyboardShortcuts = EditorKeyboardShortcuts;\n"]}
|
|
1
|
+
{"version":3,"names":["EditorKeyboardShortcuts","default","AutosaveMonitor","DocumentOutline","DocumentOutlineCheck","EditorKeyboardShortcutsRegister","EditorHistoryRedo","EditorHistoryUndo","EditorNotices","EditorSnackbars","EntitiesSavedStates","useIsDirty","useEntitiesSavedStatesIsDirty","ErrorBoundary","LocalAutosaveMonitor","PageAttributesCheck","PageAttributesOrder","PageAttributesParent","PageTemplate","PostAuthor","PostAuthorCheck","PostComments","PostExcerpt","PostExcerptCheck","PostFeaturedImage","PostFeaturedImageCheck","PostFormat","PostFormatCheck","PostLastRevision","PostLastRevisionCheck","PostLockedModal","PostPendingStatus","PostPendingStatusCheck","PostPingbacks","PostPreviewButton","PostPublishButton","PostPublishButtonLabel","PostPublishPanel","PostSavedState","PostSchedule","PostScheduleCheck","PostScheduleLabel","usePostScheduleLabel","PostSlug","PostSlugCheck","PostSticky","PostStickyCheck","PostSwitchToDraftButton","PostSyncStatus","PostSyncStatusModal","PostTaxonomies","FlatTermSelector","PostTaxonomiesFlatTermSelector","HierarchicalTermSelector","PostTaxonomiesHierarchicalTermSelector","PostTaxonomiesCheck","PostTextEditor","PostTitle","PostTrash","PostTrashCheck","PostTypeSupportCheck","PostURL","PostURLCheck","PostURLLabel","usePostURLLabel","PostVisibility","PostVisibilityLabel","usePostVisibilityLabel","PostVisibilityCheck","TableOfContents","ThemeSupportCheck","UnsavedChangesWarning","WordCount","TimeToRead","CharacterCount","EditorProvider","VisualEditorGlobalKeyboardShortcuts","TextEditorGlobalKeyboardShortcuts"],"sources":["@wordpress/editor/src/components/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport EditorKeyboardShortcuts from './global-keyboard-shortcuts';\n\n// Block Creation Components.\nexport * from './autocompleters';\n\n// Post Related Components.\nexport { default as AutosaveMonitor } from './autosave-monitor';\nexport { default as DocumentOutline } from './document-outline';\nexport { default as DocumentOutlineCheck } from './document-outline/check';\nexport { EditorKeyboardShortcuts };\nexport { default as EditorKeyboardShortcutsRegister } from './global-keyboard-shortcuts/register-shortcuts';\nexport { default as EditorHistoryRedo } from './editor-history/redo';\nexport { default as EditorHistoryUndo } from './editor-history/undo';\nexport { default as EditorNotices } from './editor-notices';\nexport { default as EditorSnackbars } from './editor-snackbars';\nexport { default as EntitiesSavedStates } from './entities-saved-states';\nexport { useIsDirty as useEntitiesSavedStatesIsDirty } from './entities-saved-states/hooks/use-is-dirty';\nexport { default as ErrorBoundary } from './error-boundary';\nexport { default as LocalAutosaveMonitor } from './local-autosave-monitor';\nexport { default as PageAttributesCheck } from './page-attributes/check';\nexport { default as PageAttributesOrder } from './page-attributes/order';\nexport { default as PageAttributesParent } from './page-attributes/parent';\nexport { default as PageTemplate } from './post-template';\nexport { default as PostAuthor } from './post-author';\nexport { default as PostAuthorCheck } from './post-author/check';\nexport { default as PostComments } from './post-comments';\nexport { default as PostExcerpt } from './post-excerpt';\nexport { default as PostExcerptCheck } from './post-excerpt/check';\nexport { default as PostFeaturedImage } from './post-featured-image';\nexport { default as PostFeaturedImageCheck } from './post-featured-image/check';\nexport { default as PostFormat } from './post-format';\nexport { default as PostFormatCheck } from './post-format/check';\nexport { default as PostLastRevision } from './post-last-revision';\nexport { default as PostLastRevisionCheck } from './post-last-revision/check';\nexport { default as PostLockedModal } from './post-locked-modal';\nexport { default as PostPendingStatus } from './post-pending-status';\nexport { default as PostPendingStatusCheck } from './post-pending-status/check';\nexport { default as PostPingbacks } from './post-pingbacks';\nexport { default as PostPreviewButton } from './post-preview-button';\nexport { default as PostPublishButton } from './post-publish-button';\nexport { default as PostPublishButtonLabel } from './post-publish-button/label';\nexport { default as PostPublishPanel } from './post-publish-panel';\nexport { default as PostSavedState } from './post-saved-state';\nexport { default as PostSchedule } from './post-schedule';\nexport { default as PostScheduleCheck } from './post-schedule/check';\nexport {\n\tdefault as PostScheduleLabel,\n\tusePostScheduleLabel,\n} from './post-schedule/label';\nexport { default as PostSlug } from './post-slug';\nexport { default as PostSlugCheck } from './post-slug/check';\nexport { default as PostSticky } from './post-sticky';\nexport { default as PostStickyCheck } from './post-sticky/check';\nexport { default as PostSwitchToDraftButton } from './post-switch-to-draft-button';\nexport {\n\tdefault as PostSyncStatus,\n\tPostSyncStatusModal,\n} from './post-sync-status';\nexport { default as PostTaxonomies } from './post-taxonomies';\nexport { FlatTermSelector as PostTaxonomiesFlatTermSelector } from './post-taxonomies/flat-term-selector';\nexport { HierarchicalTermSelector as PostTaxonomiesHierarchicalTermSelector } from './post-taxonomies/hierarchical-term-selector';\nexport { default as PostTaxonomiesCheck } from './post-taxonomies/check';\nexport { default as PostTextEditor } from './post-text-editor';\nexport { default as PostTitle } from './post-title';\nexport { default as PostTrash } from './post-trash';\nexport { default as PostTrashCheck } from './post-trash/check';\nexport { default as PostTypeSupportCheck } from './post-type-support-check';\nexport { default as PostURL } from './post-url';\nexport { default as PostURLCheck } from './post-url/check';\nexport { default as PostURLLabel, usePostURLLabel } from './post-url/label';\nexport { default as PostVisibility } from './post-visibility';\nexport {\n\tdefault as PostVisibilityLabel,\n\tusePostVisibilityLabel,\n} from './post-visibility/label';\nexport { default as PostVisibilityCheck } from './post-visibility/check';\nexport { default as TableOfContents } from './table-of-contents';\nexport { default as ThemeSupportCheck } from './theme-support-check';\nexport { default as UnsavedChangesWarning } from './unsaved-changes-warning';\nexport { default as WordCount } from './word-count';\nexport { default as TimeToRead } from './time-to-read';\nexport { default as CharacterCount } from './character-count';\n\n// State Related Components.\nexport { default as EditorProvider } from './provider';\n\nexport * from './deprecated';\nexport const VisualEditorGlobalKeyboardShortcuts = EditorKeyboardShortcuts;\nexport const TextEditorGlobalKeyboardShortcuts = EditorKeyboardShortcuts;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,uBAAuB,MAAM,6BAA6B;;AAEjE;AACA,cAAc,kBAAkB;;AAEhC;AACA,SAASC,OAAO,IAAIC,eAAe,QAAQ,oBAAoB;AAC/D,SAASD,OAAO,IAAIE,eAAe,QAAQ,oBAAoB;AAC/D,SAASF,OAAO,IAAIG,oBAAoB,QAAQ,0BAA0B;AAC1E,SAASJ,uBAAuB;AAChC,SAASC,OAAO,IAAII,+BAA+B,QAAQ,gDAAgD;AAC3G,SAASJ,OAAO,IAAIK,iBAAiB,QAAQ,uBAAuB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,OAAO,IAAI2D,oBAAoB,QAAQ,2BAA2B;AAC3E,SAAS3D,OAAO,IAAI4D,OAAO,QAAQ,YAAY;AAC/C,SAAS5D,OAAO,IAAI6D,YAAY,QAAQ,kBAAkB;AAC1D,SAAS7D,OAAO,IAAI8D,YAAY,EAAEC,eAAe,QAAQ,kBAAkB;AAC3E,SAAS/D,OAAO,IAAIgE,cAAc,QAAQ,mBAAmB;AAC7D,SACChE,OAAO,IAAIiE,mBAAmB,EAC9BC,sBAAsB,QAChB,yBAAyB;AAChC,SAASlE,OAAO,IAAImE,mBAAmB,QAAQ,yBAAyB;AACxE,SAASnE,OAAO,IAAIoE,eAAe,QAAQ,qBAAqB;AAChE,SAASpE,OAAO,IAAIqE,iBAAiB,QAAQ,uBAAuB;AACpE,SAASrE,OAAO,IAAIsE,qBAAqB,QAAQ,2BAA2B;AAC5E,SAAStE,OAAO,IAAIuE,SAAS,QAAQ,cAAc;AACnD,SAASvE,OAAO,IAAIwE,UAAU,QAAQ,gBAAgB;AACtD,SAASxE,OAAO,IAAIyE,cAAc,QAAQ,mBAAmB;;AAE7D;AACA,SAASzE,OAAO,IAAI0E,cAAc,QAAQ,YAAY;AAEtD,cAAc,cAAc;AAC5B,OAAO,MAAMC,mCAAmC,GAAG5E,uBAAuB;AAC1E,OAAO,MAAM6E,iCAAiC,GAAG7E,uBAAuB"}
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
export { default as AutosaveMonitor } from './autosave-monitor';
|
|
3
3
|
export { default as PostTitle } from './post-title';
|
|
4
4
|
export { default as EditorHistoryRedo } from './editor-history/redo';
|
|
5
|
-
export { default as EditorHistoryUndo } from './editor-history/undo';
|
|
5
|
+
export { default as EditorHistoryUndo } from './editor-history/undo';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// State Related Components.
|
|
8
|
+
export { default as EditorProvider } from './provider';
|
|
8
9
|
|
|
10
|
+
// Other Components.
|
|
9
11
|
export { default as EditorHelpTopics } from './editor-help';
|
|
10
12
|
export * from './deprecated';
|
|
11
13
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["default","AutosaveMonitor","PostTitle","EditorHistoryRedo","EditorHistoryUndo","EditorProvider","EditorHelpTopics"],"sources":["@wordpress/editor/src/components/index.native.js"],"sourcesContent":["// Post Related Components.\nexport { default as AutosaveMonitor } from './autosave-monitor';\nexport { default as PostTitle } from './post-title';\nexport { default as EditorHistoryRedo } from './editor-history/redo';\nexport { default as EditorHistoryUndo } from './editor-history/undo';\n\n// State Related Components.\nexport { default as EditorProvider } from './provider';\n\n// Other Components.\nexport { default as EditorHelpTopics } from './editor-help';\n\nexport * from './deprecated';\n"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,eAAe,QAAQ,oBAAoB;AAC/D,SAASD,OAAO,IAAIE,SAAS,QAAQ,cAAc;AACnD,SAASF,OAAO,IAAIG,iBAAiB,QAAQ,uBAAuB;AACpE,SAASH,OAAO,IAAII,iBAAiB,QAAQ,uBAAuB;;AAEpE;AACA,SAASJ,OAAO,IAAIK,cAAc,QAAQ,YAAY;;AAEtD;AACA,SAASL,OAAO,IAAIM,gBAAgB,QAAQ,eAAe;AAE3D,cAAc,cAAc"}
|