@wordpress/editor 13.16.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 +2 -0
- package/build/components/autocompleters/index.js +0 -2
- package/build/components/autocompleters/index.js.map +1 -1
- package/build/components/autocompleters/user.js +2 -9
- package/build/components/autocompleters/user.js.map +1 -1
- package/build/components/autosave-monitor/index.js +0 -24
- package/build/components/autosave-monitor/index.js.map +1 -1
- package/build/components/character-count/index.js +1 -4
- package/build/components/character-count/index.js.map +1 -1
- package/build/components/deprecated.js +1 -11
- package/build/components/deprecated.js.map +1 -1
- package/build/components/deprecated.native.js +0 -1
- package/build/components/deprecated.native.js.map +1 -1
- package/build/components/document-outline/check.js +1 -7
- package/build/components/document-outline/check.js.map +1 -1
- package/build/components/document-outline/index.js +7 -24
- package/build/components/document-outline/index.js.map +1 -1
- package/build/components/document-outline/item.js +1 -5
- package/build/components/document-outline/item.js.map +1 -1
- package/build/components/editor-help/add-blocks.native.js +1 -8
- package/build/components/editor-help/add-blocks.native.js.map +1 -1
- package/build/components/editor-help/customize-blocks.native.js +1 -8
- package/build/components/editor-help/customize-blocks.native.js.map +1 -1
- package/build/components/editor-help/help-detail-navigation-screen.native.js +5 -13
- package/build/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
- package/build/components/editor-help/help-get-support-button.native.js +1 -7
- package/build/components/editor-help/help-get-support-button.native.js.map +1 -1
- package/build/components/editor-help/help-section-title.native.js +1 -7
- package/build/components/editor-help/help-section-title.native.js.map +1 -1
- package/build/components/editor-help/help-topic-row.native.js +1 -8
- package/build/components/editor-help/help-topic-row.native.js.map +1 -1
- package/build/components/editor-help/icon-move-blocks.native.js +0 -4
- package/build/components/editor-help/icon-move-blocks.native.js.map +1 -1
- package/build/components/editor-help/index.native.js +8 -29
- package/build/components/editor-help/index.native.js.map +1 -1
- package/build/components/editor-help/intro-to-blocks.native.js +1 -9
- package/build/components/editor-help/intro-to-blocks.native.js.map +1 -1
- package/build/components/editor-help/move-blocks.native.js +1 -8
- package/build/components/editor-help/move-blocks.native.js.map +1 -1
- package/build/components/editor-help/remove-blocks.native.js +1 -8
- package/build/components/editor-help/remove-blocks.native.js.map +1 -1
- package/build/components/editor-help/view-sections.native.js +1 -12
- package/build/components/editor-help/view-sections.native.js.map +1 -1
- package/build/components/editor-history/redo.js +6 -14
- package/build/components/editor-history/redo.js.map +1 -1
- package/build/components/editor-history/undo.js +6 -14
- package/build/components/editor-history/undo.js.map +1 -1
- package/build/components/editor-notices/index.js +1 -10
- package/build/components/editor-notices/index.js.map +1 -1
- package/build/components/editor-snackbars/index.js +1 -5
- package/build/components/editor-snackbars/index.js.map +1 -1
- package/build/components/entities-saved-states/entity-record-item.js +3 -10
- package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
- package/build/components/entities-saved-states/entity-type-list.js +3 -15
- package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
- package/build/components/entities-saved-states/hooks/use-is-dirty.js +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 +1 -10
- package/build/components/post-comments/index.js.map +1 -1
- package/build/components/post-excerpt/check.js +6 -8
- package/build/components/post-excerpt/check.js.map +1 -1
- package/build/components/post-excerpt/index.js +1 -7
- package/build/components/post-excerpt/index.js.map +1 -1
- package/build/components/post-featured-image/check.js +6 -9
- package/build/components/post-featured-image/check.js.map +1 -1
- package/build/components/post-featured-image/index.js +13 -42
- package/build/components/post-featured-image/index.js.map +1 -1
- package/build/components/post-format/check.js +9 -18
- package/build/components/post-format/check.js.map +1 -1
- package/build/components/post-format/index.js +2 -20
- package/build/components/post-format/index.js.map +1 -1
- package/build/components/post-last-revision/check.js +15 -22
- package/build/components/post-last-revision/check.js.map +1 -1
- package/build/components/post-last-revision/index.js +17 -28
- package/build/components/post-last-revision/index.js.map +1 -1
- package/build/components/post-locked-modal/index.js +8 -28
- package/build/components/post-locked-modal/index.js.map +1 -1
- package/build/components/post-pending-status/check.js +16 -24
- package/build/components/post-pending-status/check.js.map +1 -1
- package/build/components/post-pending-status/index.js +10 -28
- package/build/components/post-pending-status/index.js.map +1 -1
- package/build/components/post-pingbacks/index.js +1 -10
- package/build/components/post-pingbacks/index.js.map +1 -1
- package/build/components/post-preview-button/index.js +11 -22
- package/build/components/post-preview-button/index.js.map +1 -1
- package/build/components/post-publish-button/index.js +6 -32
- package/build/components/post-publish-button/index.js.map +1 -1
- package/build/components/post-publish-button/label.js +1 -10
- package/build/components/post-publish-button/label.js.map +1 -1
- package/build/components/post-publish-panel/index.js +1 -22
- package/build/components/post-publish-panel/index.js.map +1 -1
- package/build/components/post-publish-panel/maybe-category-panel.js +4 -14
- package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-post-format-panel.js +2 -18
- package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-tags-panel.js +2 -17
- package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-upload-media.js +1 -18
- package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
- package/build/components/post-publish-panel/postpublish.js +3 -27
- package/build/components/post-publish-panel/postpublish.js.map +1 -1
- package/build/components/post-publish-panel/prepublish.js +1 -26
- package/build/components/post-publish-panel/prepublish.js.map +1 -1
- package/build/components/post-saved-state/index.js +12 -29
- package/build/components/post-saved-state/index.js.map +1 -1
- package/build/components/post-schedule/check.js +1 -8
- package/build/components/post-schedule/check.js.map +1 -1
- package/build/components/post-schedule/index.js +7 -13
- package/build/components/post-schedule/index.js.map +1 -1
- package/build/components/post-schedule/label.js +18 -29
- package/build/components/post-schedule/label.js.map +1 -1
- package/build/components/post-slug/check.js +1 -4
- package/build/components/post-slug/check.js.map +1 -1
- package/build/components/post-slug/index.js +1 -19
- package/build/components/post-slug/index.js.map +1 -1
- package/build/components/post-sticky/check.js +1 -8
- package/build/components/post-sticky/check.js.map +1 -1
- package/build/components/post-sticky/index.js +1 -12
- package/build/components/post-sticky/index.js.map +1 -1
- package/build/components/post-switch-to-draft-button/index.js +1 -14
- package/build/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build/components/post-sync-status/index.js +5 -18
- package/build/components/post-sync-status/index.js.map +1 -1
- package/build/components/post-taxonomies/check.js +1 -9
- package/build/components/post-taxonomies/check.js.map +1 -1
- package/build/components/post-taxonomies/flat-term-selector.js +15 -50
- package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/hierarchical-term-selector.js +27 -79
- package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/index.js +3 -13
- package/build/components/post-taxonomies/index.js.map +1 -1
- package/build/components/post-taxonomies/most-used-terms.js +1 -9
- package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
- package/build/components/post-template/index.js +1 -11
- package/build/components/post-template/index.js.map +1 -1
- package/build/components/post-text-editor/index.js +3 -17
- package/build/components/post-text-editor/index.js.map +1 -1
- package/build/components/post-title/index.js +14 -46
- package/build/components/post-title/index.js.map +1 -1
- package/build/components/post-title/index.native.js +7 -44
- package/build/components/post-title/index.native.js.map +1 -1
- package/build/components/post-trash/check.js +1 -7
- package/build/components/post-trash/check.js.map +1 -1
- package/build/components/post-trash/index.js +1 -8
- package/build/components/post-trash/index.js.map +1 -1
- package/build/components/post-type-support-check/index.js +0 -9
- package/build/components/post-type-support-check/index.js.map +1 -1
- package/build/components/post-url/check.js +1 -12
- package/build/components/post-url/check.js.map +1 -1
- package/build/components/post-url/index.js +3 -15
- package/build/components/post-url/index.js.map +1 -1
- package/build/components/post-url/label.js +1 -5
- package/build/components/post-url/label.js.map +1 -1
- package/build/components/post-visibility/check.js +1 -7
- package/build/components/post-visibility/check.js.map +1 -1
- package/build/components/post-visibility/index.js +1 -17
- package/build/components/post-visibility/index.js.map +1 -1
- package/build/components/post-visibility/label.js +1 -5
- package/build/components/post-visibility/label.js.map +1 -1
- package/build/components/post-visibility/utils.js +1 -2
- package/build/components/post-visibility/utils.js.map +1 -1
- package/build/components/provider/index.js +13 -27
- package/build/components/provider/index.js.map +1 -1
- package/build/components/provider/index.native.js +18 -70
- package/build/components/provider/index.native.js.map +1 -1
- package/build/components/provider/use-block-editor-settings.js +9 -20
- package/build/components/provider/use-block-editor-settings.js.map +1 -1
- package/build/components/provider/use-block-editor-settings.native.js +5 -11
- package/build/components/provider/use-block-editor-settings.native.js.map +1 -1
- package/build/components/provider/with-registry-provider.js +5 -12
- package/build/components/provider/with-registry-provider.js.map +1 -1
- package/build/components/table-of-contents/index.js +4 -14
- package/build/components/table-of-contents/index.js.map +1 -1
- package/build/components/table-of-contents/panel.js +1 -13
- package/build/components/table-of-contents/panel.js.map +1 -1
- package/build/components/template-validation-notice/index.js +3 -12
- package/build/components/template-validation-notice/index.js.map +1 -1
- package/build/components/theme-support-check/index.js +3 -12
- package/build/components/theme-support-check/index.js.map +1 -1
- package/build/components/time-to-read/index.js +2 -10
- package/build/components/time-to-read/index.js.map +1 -1
- package/build/components/unsaved-changes-warning/index.js +21 -35
- package/build/components/unsaved-changes-warning/index.js.map +1 -1
- package/build/components/word-count/index.js +2 -7
- package/build/components/word-count/index.js.map +1 -1
- package/build/hooks/custom-sources-backwards-compatibility.js +7 -18
- package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
- package/build/hooks/default-autocompleters.js +3 -4
- package/build/hooks/default-autocompleters.js.map +1 -1
- package/build/hooks/index.js +0 -1
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/index.native.js.map +1 -1
- package/build/index.js +0 -9
- package/build/index.js.map +1 -1
- package/build/index.native.js +0 -11
- package/build/index.native.js.map +1 -1
- package/build/lock-unlock.js +1 -2
- package/build/lock-unlock.js.map +1 -1
- package/build/private-apis.js +1 -4
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +60 -129
- package/build/store/actions.js.map +1 -1
- package/build/store/actions.native.js +1 -8
- package/build/store/actions.native.js.map +1 -1
- package/build/store/constants.js +1 -2
- package/build/store/constants.js.map +1 -1
- package/build/store/defaults.js +2 -3
- package/build/store/defaults.js.map +1 -1
- package/build/store/index.js +3 -11
- package/build/store/index.js.map +1 -1
- package/build/store/local-autosave.js +0 -4
- package/build/store/local-autosave.js.map +1 -1
- package/build/store/reducer.js +19 -49
- package/build/store/reducer.js.map +1 -1
- package/build/store/reducer.native.js +3 -17
- package/build/store/reducer.native.js.map +1 -1
- package/build/store/selectors.js +169 -295
- package/build/store/selectors.js.map +1 -1
- package/build/store/selectors.native.js +4 -11
- package/build/store/selectors.native.js.map +1 -1
- package/build/store/utils/notice-builder.js +13 -24
- package/build/store/utils/notice-builder.js.map +1 -1
- package/build/utils/get-template-part-icon.js +0 -3
- package/build/utils/get-template-part-icon.js.map +1 -1
- package/build/utils/index.js +0 -4
- package/build/utils/index.js.map +1 -1
- package/build/utils/index.native.js +0 -2
- package/build/utils/index.native.js.map +1 -1
- package/build/utils/media-upload/index.js +2 -6
- package/build/utils/media-upload/index.js.map +1 -1
- package/build/utils/media-upload/index.native.js +0 -1
- package/build/utils/media-upload/index.native.js.map +1 -1
- package/build/utils/terms.js +8 -18
- package/build/utils/terms.js.map +1 -1
- package/build/utils/url.js +0 -4
- package/build/utils/url.js.map +1 -1
- package/build-module/components/autocompleters/index.js.map +1 -1
- package/build-module/components/autocompleters/user.js +2 -5
- package/build-module/components/autocompleters/user.js.map +1 -1
- package/build-module/components/autosave-monitor/index.js +2 -17
- package/build-module/components/autosave-monitor/index.js.map +1 -1
- package/build-module/components/character-count/index.js +1 -1
- package/build-module/components/character-count/index.js.map +1 -1
- package/build-module/components/deprecated.js +0 -4
- package/build-module/components/deprecated.js.map +1 -1
- package/build-module/components/deprecated.native.js +0 -1
- package/build-module/components/deprecated.native.js.map +1 -1
- package/build-module/components/document-outline/check.js +0 -4
- package/build-module/components/document-outline/check.js.map +1 -1
- package/build-module/components/document-outline/index.js +9 -13
- package/build-module/components/document-outline/index.js.map +1 -1
- package/build-module/components/document-outline/item.js +0 -3
- package/build-module/components/document-outline/item.js.map +1 -1
- package/build-module/components/editor-help/add-blocks.native.js +2 -5
- package/build-module/components/editor-help/add-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/customize-blocks.native.js +2 -5
- package/build-module/components/editor-help/customize-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/help-detail-navigation-screen.native.js +6 -8
- package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
- package/build-module/components/editor-help/help-get-support-button.native.js +2 -5
- package/build-module/components/editor-help/help-get-support-button.native.js.map +1 -1
- package/build-module/components/editor-help/help-section-title.native.js +2 -5
- package/build-module/components/editor-help/help-section-title.native.js.map +1 -1
- package/build-module/components/editor-help/help-topic-row.native.js +1 -6
- package/build-module/components/editor-help/help-topic-row.native.js.map +1 -1
- package/build-module/components/editor-help/icon-move-blocks.native.js +0 -1
- package/build-module/components/editor-help/icon-move-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/index.native.js +9 -9
- package/build-module/components/editor-help/index.native.js.map +1 -1
- package/build-module/components/editor-help/intro-to-blocks.native.js +2 -5
- package/build-module/components/editor-help/intro-to-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/move-blocks.native.js +2 -5
- package/build-module/components/editor-help/move-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/remove-blocks.native.js +2 -5
- package/build-module/components/editor-help/remove-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/view-sections.native.js +2 -4
- package/build-module/components/editor-help/view-sections.native.js.map +1 -1
- package/build-module/components/editor-history/redo.js +6 -8
- package/build-module/components/editor-history/redo.js.map +1 -1
- package/build-module/components/editor-history/undo.js +6 -8
- package/build-module/components/editor-history/undo.js.map +1 -1
- package/build-module/components/editor-notices/index.js +1 -2
- package/build-module/components/editor-notices/index.js.map +1 -1
- package/build-module/components/editor-snackbars/index.js +0 -1
- package/build-module/components/editor-snackbars/index.js.map +1 -1
- package/build-module/components/entities-saved-states/entity-record-item.js +3 -4
- package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
- package/build-module/components/entities-saved-states/entity-type-list.js +3 -10
- package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
- package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +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 +1 -7
- package/build-module/components/post-comments/index.js.map +1 -1
- package/build-module/components/post-excerpt/check.js +5 -6
- package/build-module/components/post-excerpt/check.js.map +1 -1
- package/build-module/components/post-excerpt/index.js +1 -4
- package/build-module/components/post-excerpt/index.js.map +1 -1
- package/build-module/components/post-featured-image/check.js +5 -6
- package/build-module/components/post-featured-image/check.js.map +1 -1
- package/build-module/components/post-featured-image/index.js +13 -31
- package/build-module/components/post-featured-image/index.js.map +1 -1
- package/build-module/components/post-format/check.js +10 -15
- package/build-module/components/post-format/check.js.map +1 -1
- package/build-module/components/post-format/index.js +4 -12
- package/build-module/components/post-format/index.js.map +1 -1
- package/build-module/components/post-last-revision/check.js +17 -17
- package/build-module/components/post-last-revision/check.js.map +1 -1
- package/build-module/components/post-last-revision/index.js +18 -21
- package/build-module/components/post-last-revision/index.js.map +1 -1
- package/build-module/components/post-locked-modal/index.js +8 -22
- package/build-module/components/post-locked-modal/index.js.map +1 -1
- package/build-module/components/post-pending-status/check.js +17 -20
- package/build-module/components/post-pending-status/check.js.map +1 -1
- package/build-module/components/post-pending-status/index.js +11 -20
- package/build-module/components/post-pending-status/index.js.map +1 -1
- package/build-module/components/post-pingbacks/index.js +1 -7
- package/build-module/components/post-pingbacks/index.js.map +1 -1
- package/build-module/components/post-preview-button/index.js +11 -17
- package/build-module/components/post-preview-button/index.js.map +1 -1
- package/build-module/components/post-publish-button/index.js +7 -23
- package/build-module/components/post-publish-button/index.js.map +1 -1
- package/build-module/components/post-publish-button/label.js +1 -4
- package/build-module/components/post-publish-button/label.js.map +1 -1
- package/build-module/components/post-publish-panel/index.js +1 -8
- package/build-module/components/post-publish-panel/index.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-category-panel.js +4 -8
- package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-post-format-panel.js +2 -12
- package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-tags-panel.js +2 -9
- package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-upload-media.js +1 -12
- package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
- package/build-module/components/post-publish-panel/postpublish.js +3 -16
- package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
- package/build-module/components/post-publish-panel/prepublish.js +1 -10
- package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
- package/build-module/components/post-saved-state/index.js +15 -23
- package/build-module/components/post-saved-state/index.js.map +1 -1
- package/build-module/components/post-schedule/check.js +1 -3
- package/build-module/components/post-schedule/check.js.map +1 -1
- package/build-module/components/post-schedule/index.js +8 -8
- package/build-module/components/post-schedule/index.js.map +1 -1
- package/build-module/components/post-schedule/label.js +18 -22
- package/build-module/components/post-schedule/label.js.map +1 -1
- package/build-module/components/post-slug/check.js +0 -1
- package/build-module/components/post-slug/check.js.map +1 -1
- package/build-module/components/post-slug/index.js +1 -8
- package/build-module/components/post-slug/index.js.map +1 -1
- package/build-module/components/post-sticky/check.js +1 -3
- package/build-module/components/post-sticky/check.js.map +1 -1
- package/build-module/components/post-sticky/index.js +1 -3
- package/build-module/components/post-sticky/index.js.map +1 -1
- package/build-module/components/post-switch-to-draft-button/index.js +1 -9
- package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build-module/components/post-sync-status/index.js +5 -11
- package/build-module/components/post-sync-status/index.js.map +1 -1
- package/build-module/components/post-taxonomies/check.js +1 -3
- package/build-module/components/post-taxonomies/check.js.map +1 -1
- package/build-module/components/post-taxonomies/flat-term-selector.js +17 -39
- package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js +29 -66
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/index.js +3 -5
- package/build-module/components/post-taxonomies/index.js.map +1 -1
- package/build-module/components/post-taxonomies/most-used-terms.js +1 -4
- package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
- package/build-module/components/post-template/index.js +1 -5
- package/build-module/components/post-template/index.js.map +1 -1
- package/build-module/components/post-text-editor/index.js +4 -9
- package/build-module/components/post-text-editor/index.js.map +1 -1
- package/build-module/components/post-title/index.js +17 -35
- package/build-module/components/post-title/index.js.map +1 -1
- package/build-module/components/post-title/index.native.js +8 -33
- package/build-module/components/post-title/index.native.js.map +1 -1
- package/build-module/components/post-trash/check.js +1 -4
- package/build-module/components/post-trash/check.js.map +1 -1
- package/build-module/components/post-trash/index.js +1 -4
- package/build-module/components/post-trash/index.js.map +1 -1
- package/build-module/components/post-type-support-check/index.js +3 -6
- package/build-module/components/post-type-support-check/index.js.map +1 -1
- package/build-module/components/post-url/check.js +1 -9
- package/build-module/components/post-url/check.js.map +1 -1
- package/build-module/components/post-url/index.js +3 -8
- package/build-module/components/post-url/index.js.map +1 -1
- package/build-module/components/post-url/label.js +1 -1
- package/build-module/components/post-url/label.js.map +1 -1
- package/build-module/components/post-visibility/check.js +1 -2
- package/build-module/components/post-visibility/check.js.map +1 -1
- package/build-module/components/post-visibility/index.js +1 -10
- package/build-module/components/post-visibility/index.js.map +1 -1
- package/build-module/components/post-visibility/label.js +1 -1
- package/build-module/components/post-visibility/label.js.map +1 -1
- package/build-module/components/post-visibility/utils.js.map +1 -1
- package/build-module/components/provider/index.js +13 -14
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/provider/index.native.js +21 -52
- package/build-module/components/provider/index.native.js.map +1 -1
- package/build-module/components/provider/use-block-editor-settings.js +9 -12
- package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
- package/build-module/components/provider/use-block-editor-settings.native.js +5 -5
- package/build-module/components/provider/use-block-editor-settings.native.js.map +1 -1
- package/build-module/components/provider/with-registry-provider.js +5 -8
- package/build-module/components/provider/with-registry-provider.js.map +1 -1
- package/build-module/components/table-of-contents/index.js +4 -7
- package/build-module/components/table-of-contents/index.js.map +1 -1
- package/build-module/components/table-of-contents/panel.js +1 -5
- package/build-module/components/table-of-contents/panel.js.map +1 -1
- package/build-module/components/template-validation-notice/index.js +2 -6
- package/build-module/components/template-validation-notice/index.js.map +1 -1
- package/build-module/components/theme-support-check/index.js +3 -7
- package/build-module/components/theme-support-check/index.js.map +1 -1
- package/build-module/components/time-to-read/index.js +4 -7
- package/build-module/components/time-to-read/index.js.map +1 -1
- package/build-module/components/unsaved-changes-warning/index.js +22 -31
- package/build-module/components/unsaved-changes-warning/index.js.map +1 -1
- package/build-module/components/word-count/index.js +2 -4
- package/build-module/components/word-count/index.js.map +1 -1
- package/build-module/hooks/custom-sources-backwards-compatibility.js +9 -15
- package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
- package/build-module/hooks/default-autocompleters.js +3 -4
- package/build-module/hooks/default-autocompleters.js.map +1 -1
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/index.native.js.map +1 -1
- package/build-module/index.js +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +1 -1
- package/build-module/index.native.js.map +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +62 -84
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/actions.native.js +2 -2
- package/build-module/store/actions.native.js.map +1 -1
- package/build-module/store/constants.js +1 -1
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/defaults.js +3 -2
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/index.js +5 -4
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/local-autosave.js +0 -1
- package/build-module/store/local-autosave.js.map +1 -1
- package/build-module/store/reducer.js +21 -33
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/reducer.native.js +4 -10
- package/build-module/store/reducer.native.js.map +1 -1
- package/build-module/store/selectors.js +172 -222
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/selectors.native.js +6 -8
- package/build-module/store/selectors.native.js.map +1 -1
- package/build-module/store/utils/notice-builder.js +15 -21
- package/build-module/store/utils/notice-builder.js.map +1 -1
- package/build-module/utils/get-template-part-icon.js +0 -2
- package/build-module/utils/get-template-part-icon.js.map +1 -1
- package/build-module/utils/index.js.map +1 -1
- package/build-module/utils/index.native.js.map +1 -1
- package/build-module/utils/media-upload/index.js +2 -4
- package/build-module/utils/media-upload/index.js.map +1 -1
- package/build-module/utils/media-upload/index.native.js.map +1 -1
- package/build-module/utils/terms.js +9 -11
- package/build-module/utils/terms.js.map +1 -1
- package/build-module/utils/url.js +1 -1
- package/build-module/utils/url.js.map +1 -1
- package/build-style/style-rtl.css +10 -17
- package/build-style/style.css +10 -17
- package/package.json +32 -31
- package/src/components/editor-help/index.native.js +1 -1
- package/src/components/editor-help/style.scss +5 -0
- package/src/components/page-attributes/order.js +15 -23
- package/src/components/page-attributes/test/order.js +46 -15
- package/src/components/post-excerpt/check.js +6 -2
- package/src/components/post-featured-image/check.js +4 -2
- package/src/components/post-format/check.js +16 -11
- package/src/components/post-last-revision/check.js +12 -14
- package/src/components/post-last-revision/index.js +12 -10
- package/src/components/post-last-revision/test/check.js +28 -16
- package/src/components/post-pending-status/check.js +13 -19
- package/src/components/post-pending-status/index.js +9 -14
- package/src/components/post-pending-status/test/check.js +32 -10
- package/src/components/post-publish-panel/style.scss +12 -25
- package/src/components/post-sync-status/style.scss +4 -1
- package/src/components/post-type-support-check/index.js +1 -1
- package/src/components/post-type-support-check/test/index.js +1 -1
- package/src/components/provider/index.js +3 -2
- package/src/components/unsaved-changes-warning/index.js +22 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_i18n","require","_constants","getNotificationArgumentsForSaveSuccess","data","_postType$viewable","previousPost","post","postType","options","isAutosave","status","publishStatus","isPublished","includes","willPublish","noticeMessage","shouldShowLink","viewable","isDraft","__","labels","item_reverted_to_draft","publish","item_published","private","item_published_privately","future","item_scheduled","item_updated","actions","push","label","view_item","url","link","id","SAVE_POST_NOTICE_ID","type","getNotificationArgumentsForSaveFail","edits","error","code","indexOf","messages","message","test","join","getNotificationArgumentsForTrashFail","TRASH_POST_NOTICE_ID"],"sources":["@wordpress/editor/src/store/utils/notice-builder.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { SAVE_POST_NOTICE_ID, TRASH_POST_NOTICE_ID } from '../constants';\n\n/**\n * Builds the arguments for a success notification dispatch.\n *\n * @param {Object} data Incoming data to build the arguments from.\n *\n * @return {Array} Arguments for dispatch. An empty array signals no\n * notification should be sent.\n */\nexport function getNotificationArgumentsForSaveSuccess( data ) {\n\tconst { previousPost, post, postType } = data;\n\t// Autosaves are neither shown a notice nor redirected.\n\tif ( data.options?.isAutosave ) {\n\t\treturn [];\n\t}\n\n\t// No notice is shown after trashing a post\n\tif ( post.status === 'trash' && previousPost.status !== 'trash' ) {\n\t\treturn [];\n\t}\n\n\tconst publishStatus = [ 'publish', 'private', 'future' ];\n\tconst isPublished = publishStatus.includes( previousPost.status );\n\tconst willPublish = publishStatus.includes( post.status );\n\n\tlet noticeMessage;\n\tlet shouldShowLink = postType?.viewable ?? false;\n\tlet isDraft;\n\n\t// Always should a notice, which will be spoken for accessibility.\n\tif ( ! isPublished && ! willPublish ) {\n\t\t// If saving a non-published post, don't show notice.\n\t\tnoticeMessage = __( 'Draft saved.' );\n\t\tisDraft = true;\n\t} else if ( isPublished && ! willPublish ) {\n\t\t// If undoing publish status, show specific notice.\n\t\tnoticeMessage = postType.labels.item_reverted_to_draft;\n\t\tshouldShowLink = false;\n\t} else if ( ! isPublished && willPublish ) {\n\t\t// If publishing or scheduling a post, show the corresponding\n\t\t// publish message.\n\t\tnoticeMessage = {\n\t\t\tpublish: postType.labels.item_published,\n\t\t\tprivate: postType.labels.item_published_privately,\n\t\t\tfuture: postType.labels.item_scheduled,\n\t\t}[ post.status ];\n\t} else {\n\t\t// Generic fallback notice.\n\t\tnoticeMessage = postType.labels.item_updated;\n\t}\n\n\tconst actions = [];\n\tif ( shouldShowLink ) {\n\t\tactions.push( {\n\t\t\tlabel: isDraft ? __( 'View Preview' ) : postType.labels.view_item,\n\t\t\turl: post.link,\n\t\t} );\n\t}\n\treturn [\n\t\tnoticeMessage,\n\t\t{\n\t\t\tid: SAVE_POST_NOTICE_ID,\n\t\t\ttype: 'snackbar',\n\t\t\tactions,\n\t\t},\n\t];\n}\n\n/**\n * Builds the fail notification arguments for dispatch.\n *\n * @param {Object} data Incoming data to build the arguments with.\n *\n * @return {Array} Arguments for dispatch. An empty array signals no\n * notification should be sent.\n */\nexport function getNotificationArgumentsForSaveFail( data ) {\n\tconst { post, edits, error } = data;\n\tif ( error && 'rest_autosave_no_changes' === error.code ) {\n\t\t// Autosave requested a new autosave, but there were no changes. This shouldn't\n\t\t// result in an error notice for the user.\n\t\treturn [];\n\t}\n\n\tconst publishStatus = [ 'publish', 'private', 'future' ];\n\tconst isPublished = publishStatus.indexOf( post.status ) !== -1;\n\t// If the post was being published, we show the corresponding publish error message\n\t// Unless we publish an \"updating failed\" message.\n\tconst messages = {\n\t\tpublish: __( 'Publishing failed.' ),\n\t\tprivate: __( 'Publishing failed.' ),\n\t\tfuture: __( 'Scheduling failed.' ),\n\t};\n\tlet noticeMessage =\n\t\t! isPublished && publishStatus.indexOf( edits.status ) !== -1\n\t\t\t? messages[ edits.status ]\n\t\t\t: __( 'Updating failed.' );\n\n\t// Check if message string contains HTML. Notice text is currently only\n\t// supported as plaintext, and stripping the tags may muddle the meaning.\n\tif ( error.message && ! /<\\/?[^>]*>/.test( error.message ) ) {\n\t\tnoticeMessage = [ noticeMessage, error.message ].join( ' ' );\n\t}\n\treturn [\n\t\tnoticeMessage,\n\t\t{\n\t\t\tid: SAVE_POST_NOTICE_ID,\n\t\t},\n\t];\n}\n\n/**\n * Builds the trash fail notification arguments for dispatch.\n *\n * @param {Object} data\n *\n * @return {Array} Arguments for dispatch.\n */\nexport function getNotificationArgumentsForTrashFail( data ) {\n\treturn [\n\t\tdata.error.message && data.error.code !== 'unknown_error'\n\t\t\t? data.error.message\n\t\t\t: __( 'Trashing failed' ),\n\t\t{\n\t\t\tid: TRASH_POST_NOTICE_ID,\n\t\t},\n\t];\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,sCAAsCA,CAAEC,IAAI,EAAG;EAAA,IAAAC,kBAAA;EAC9D,MAAM;IAAEC,YAAY;IAAEC,IAAI;IAAEC;EAAS,CAAC,GAAGJ,IAAI;EAC7C;EACA,IAAKA,IAAI,CAACK,OAAO,EAAEC,UAAU,EAAG;IAC/B,OAAO,EAAE;EACV;;EAEA;EACA,IAAKH,IAAI,CAACI,MAAM,KAAK,OAAO,IAAIL,YAAY,CAACK,MAAM,KAAK,OAAO,EAAG;IACjE,OAAO,EAAE;EACV;EAEA,MAAMC,aAAa,GAAG,CAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAE;EACxD,MAAMC,WAAW,GAAGD,aAAa,CAACE,QAAQ,CAAER,YAAY,CAACK,MAAO,CAAC;EACjE,MAAMI,WAAW,GAAGH,aAAa,CAACE,QAAQ,CAAEP,IAAI,CAACI,MAAO,CAAC;EAEzD,IAAIK,aAAa;EACjB,IAAIC,cAAc,IAAAZ,kBAAA,GAAGG,QAAQ,EAAEU,QAAQ,cAAAb,kBAAA,cAAAA,kBAAA,GAAI,KAAK;EAChD,IAAIc,OAAO;;EAEX;EACA,IAAK,CAAEN,WAAW,IAAI,CAAEE,WAAW,EAAG;IACrC;IACAC,aAAa,GAAG,IAAAI,QAAE,EAAE,cAAe,CAAC;IACpCD,OAAO,GAAG,IAAI;EACf,CAAC,MAAM,IAAKN,WAAW,IAAI,CAAEE,WAAW,EAAG;IAC1C;IACAC,aAAa,GAAGR,QAAQ,CAACa,MAAM,CAACC,sBAAsB;IACtDL,cAAc,GAAG,KAAK;EACvB,CAAC,MAAM,IAAK,CAAEJ,WAAW,IAAIE,WAAW,EAAG;IAC1C;IACA;IACAC,aAAa,GAAG;MACfO,OAAO,EAAEf,QAAQ,CAACa,MAAM,CAACG,cAAc;MACvCC,OAAO,EAAEjB,QAAQ,CAACa,MAAM,CAACK,wBAAwB;MACjDC,MAAM,EAAEnB,QAAQ,CAACa,MAAM,CAACO;IACzB,CAAC,CAAErB,IAAI,CAACI,MAAM,CAAE;EACjB,CAAC,MAAM;IACN;IACAK,aAAa,GAAGR,QAAQ,CAACa,MAAM,CAACQ,YAAY;EAC7C;EAEA,MAAMC,OAAO,GAAG,EAAE;EAClB,IAAKb,cAAc,EAAG;IACrBa,OAAO,CAACC,IAAI,CAAE;MACbC,KAAK,EAAEb,OAAO,GAAG,IAAAC,QAAE,EAAE,cAAe,CAAC,GAAGZ,QAAQ,CAACa,MAAM,CAACY,SAAS;MACjEC,GAAG,EAAE3B,IAAI,CAAC4B;IACX,CAAE,CAAC;EACJ;EACA,OAAO,CACNnB,aAAa,EACb;IACCoB,EAAE,EAAEC,8BAAmB;IACvBC,IAAI,EAAE,UAAU;IAChBR;EACD,CAAC,CACD;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASS,mCAAmCA,CAAEnC,IAAI,EAAG;EAC3D,MAAM;IAAEG,IAAI;IAAEiC,KAAK;IAAEC;EAAM,CAAC,GAAGrC,IAAI;EACnC,IAAKqC,KAAK,IAAI,0BAA0B,KAAKA,KAAK,CAACC,IAAI,EAAG;IACzD;IACA;IACA,OAAO,EAAE;EACV;EAEA,MAAM9B,aAAa,GAAG,CAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAE;EACxD,MAAMC,WAAW,GAAGD,aAAa,CAAC+B,OAAO,CAAEpC,IAAI,CAACI,MAAO,CAAC,KAAK,CAAC,CAAC;EAC/D;EACA;EACA,MAAMiC,QAAQ,GAAG;IAChBrB,OAAO,EAAE,IAAAH,QAAE,EAAE,oBAAqB,CAAC;IACnCK,OAAO,EAAE,IAAAL,QAAE,EAAE,oBAAqB,CAAC;IACnCO,MAAM,EAAE,IAAAP,QAAE,EAAE,oBAAqB;EAClC,CAAC;EACD,IAAIJ,aAAa,GAChB,CAAEH,WAAW,IAAID,aAAa,CAAC+B,OAAO,CAAEH,KAAK,CAAC7B,MAAO,CAAC,KAAK,CAAC,CAAC,GAC1DiC,QAAQ,CAAEJ,KAAK,CAAC7B,MAAM,CAAE,GACxB,IAAAS,QAAE,EAAE,kBAAmB,CAAC;;EAE5B;EACA;EACA,IAAKqB,KAAK,CAACI,OAAO,IAAI,CAAE,YAAY,CAACC,IAAI,CAAEL,KAAK,CAACI,OAAQ,CAAC,EAAG;IAC5D7B,aAAa,GAAG,CAAEA,aAAa,EAAEyB,KAAK,CAACI,OAAO,CAAE,CAACE,IAAI,CAAE,GAAI,CAAC;EAC7D;EACA,OAAO,CACN/B,aAAa,EACb;IACCoB,EAAE,EAAEC;EACL,CAAC,CACD;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASW,oCAAoCA,CAAE5C,IAAI,EAAG;EAC5D,OAAO,CACNA,IAAI,CAACqC,KAAK,CAACI,OAAO,IAAIzC,IAAI,CAACqC,KAAK,CAACC,IAAI,KAAK,eAAe,GACtDtC,IAAI,CAACqC,KAAK,CAACI,OAAO,GAClB,IAAAzB,QAAE,EAAE,iBAAkB,CAAC,EAC1B;IACCgB,EAAE,EAAEa;EACL,CAAC,CACD;AACF"}
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getTemplatePartIcon = getTemplatePartIcon;
|
|
7
|
-
|
|
8
7
|
var _icons = require("@wordpress/icons");
|
|
9
|
-
|
|
10
8
|
/**
|
|
11
9
|
* WordPress dependencies
|
|
12
10
|
*/
|
|
@@ -26,7 +24,6 @@ function getTemplatePartIcon(iconName) {
|
|
|
26
24
|
} else if ('sidebar' === iconName) {
|
|
27
25
|
return _icons.sidebar;
|
|
28
26
|
}
|
|
29
|
-
|
|
30
27
|
return _icons.symbolFilled;
|
|
31
28
|
}
|
|
32
29
|
//# sourceMappingURL=get-template-part-icon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_icons","require","getTemplatePartIcon","iconName","headerIcon","footerIcon","sidebarIcon","symbolFilledIcon"],"sources":["@wordpress/editor/src/utils/get-template-part-icon.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\theader as headerIcon,\n\tfooter as footerIcon,\n\tsidebar as sidebarIcon,\n\tsymbolFilled as symbolFilledIcon,\n} from '@wordpress/icons';\n/**\n * Helper function to retrieve the corresponding icon by name.\n *\n * @param {string} iconName The name of the icon.\n *\n * @return {Object} The corresponding icon.\n */\nexport function getTemplatePartIcon( iconName ) {\n\tif ( 'header' === iconName ) {\n\t\treturn headerIcon;\n\t} else if ( 'footer' === iconName ) {\n\t\treturn footerIcon;\n\t} else if ( 'sidebar' === iconName ) {\n\t\treturn sidebarIcon;\n\t}\n\treturn symbolFilledIcon;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,mBAAmBA,CAAEC,QAAQ,EAAG;EAC/C,IAAK,QAAQ,KAAKA,QAAQ,EAAG;IAC5B,OAAOC,aAAU;EAClB,CAAC,MAAM,IAAK,QAAQ,KAAKD,QAAQ,EAAG;IACnC,OAAOE,aAAU;EAClB,CAAC,MAAM,IAAK,SAAS,KAAKF,QAAQ,EAAG;IACpC,OAAOG,cAAW;EACnB;EACA,OAAOC,mBAAgB;AACxB"}
|
package/build/utils/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -23,10 +22,7 @@ Object.defineProperty(exports, "mediaUpload", {
|
|
|
23
22
|
return _mediaUpload.default;
|
|
24
23
|
}
|
|
25
24
|
});
|
|
26
|
-
|
|
27
25
|
var _mediaUpload = _interopRequireDefault(require("./media-upload"));
|
|
28
|
-
|
|
29
26
|
var _url = require("./url.js");
|
|
30
|
-
|
|
31
27
|
var _getTemplatePartIcon = require("./get-template-part-icon");
|
|
32
28
|
//# sourceMappingURL=index.js.map
|
package/build/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/editor/src/utils/index.js"],"
|
|
1
|
+
{"version":3,"names":["_mediaUpload","_interopRequireDefault","require","_url","_getTemplatePartIcon"],"sources":["@wordpress/editor/src/utils/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport mediaUpload from './media-upload';\n\nexport { mediaUpload };\nexport { cleanForSlug } from './url.js';\nexport { getTemplatePartIcon } from './get-template-part-icon';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -11,6 +10,5 @@ Object.defineProperty(exports, "mediaUpload", {
|
|
|
11
10
|
return _mediaUpload.default;
|
|
12
11
|
}
|
|
13
12
|
});
|
|
14
|
-
|
|
15
13
|
var _mediaUpload = _interopRequireDefault(require("./media-upload"));
|
|
16
14
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/editor/src/utils/index.native.js"],"
|
|
1
|
+
{"version":3,"names":["_mediaUpload","_interopRequireDefault","require"],"sources":["@wordpress/editor/src/utils/index.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport mediaUpload from './media-upload';\n\nexport { mediaUpload };\n"],"mappings":";;;;;;;;;;;;AAGA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA"}
|
|
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = mediaUpload;
|
|
7
|
-
|
|
8
7
|
var _data = require("@wordpress/data");
|
|
9
|
-
|
|
10
8
|
var _mediaUtils = require("@wordpress/media-utils");
|
|
11
|
-
|
|
12
9
|
var _store = require("../../store");
|
|
13
|
-
|
|
14
10
|
/**
|
|
15
11
|
* WordPress dependencies
|
|
16
12
|
*/
|
|
@@ -18,7 +14,9 @@ var _store = require("../../store");
|
|
|
18
14
|
/**
|
|
19
15
|
* Internal dependencies
|
|
20
16
|
*/
|
|
17
|
+
|
|
21
18
|
const noop = () => {};
|
|
19
|
+
|
|
22
20
|
/**
|
|
23
21
|
* Upload a media file when the file upload button is activated.
|
|
24
22
|
* Wrapper around mediaUpload() that injects the current post ID.
|
|
@@ -31,8 +29,6 @@ const noop = () => {};
|
|
|
31
29
|
* @param {Function} $0.onError Function called when an error happens.
|
|
32
30
|
* @param {Function} $0.onFileChange Function called each time a file or a temporary representation of the file is available.
|
|
33
31
|
*/
|
|
34
|
-
|
|
35
|
-
|
|
36
32
|
function mediaUpload({
|
|
37
33
|
additionalData = {},
|
|
38
34
|
allowedTypes,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_data","require","_mediaUtils","_store","noop","mediaUpload","additionalData","allowedTypes","filesList","maxUploadFileSize","onError","onFileChange","getCurrentPostId","getEditorSettings","select","editorStore","wpAllowedMimeTypes","allowedMimeTypes","uploadMedia","post","message"],"sources":["@wordpress/editor/src/utils/media-upload/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { select } from '@wordpress/data';\nimport { uploadMedia } from '@wordpress/media-utils';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nconst noop = () => {};\n\n/**\n * Upload a media file when the file upload button is activated.\n * Wrapper around mediaUpload() that injects the current post ID.\n *\n * @param {Object} $0 Parameters object passed to the function.\n * @param {?Object} $0.additionalData Additional data to include in the request.\n * @param {string} $0.allowedTypes Array with the types of media that can be uploaded, if unset all types are allowed.\n * @param {Array} $0.filesList List of files.\n * @param {?number} $0.maxUploadFileSize Maximum upload size in bytes allowed for the site.\n * @param {Function} $0.onError Function called when an error happens.\n * @param {Function} $0.onFileChange Function called each time a file or a temporary representation of the file is available.\n */\nexport default function mediaUpload( {\n\tadditionalData = {},\n\tallowedTypes,\n\tfilesList,\n\tmaxUploadFileSize,\n\tonError = noop,\n\tonFileChange,\n} ) {\n\tconst { getCurrentPostId, getEditorSettings } = select( editorStore );\n\tconst wpAllowedMimeTypes = getEditorSettings().allowedMimeTypes;\n\tmaxUploadFileSize =\n\t\tmaxUploadFileSize || getEditorSettings().maxUploadFileSize;\n\n\tuploadMedia( {\n\t\tallowedTypes,\n\t\tfilesList,\n\t\tonFileChange,\n\t\tadditionalData: {\n\t\t\tpost: getCurrentPostId(),\n\t\t\t...additionalData,\n\t\t},\n\t\tmaxUploadFileSize,\n\t\tonError: ( { message } ) => onError( message ),\n\t\twpAllowedMimeTypes,\n\t} );\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGA,MAAMG,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,WAAWA,CAAE;EACpCC,cAAc,GAAG,CAAC,CAAC;EACnBC,YAAY;EACZC,SAAS;EACTC,iBAAiB;EACjBC,OAAO,GAAGN,IAAI;EACdO;AACD,CAAC,EAAG;EACH,MAAM;IAAEC,gBAAgB;IAAEC;EAAkB,CAAC,GAAG,IAAAC,YAAM,EAAEC,YAAY,CAAC;EACrE,MAAMC,kBAAkB,GAAGH,iBAAiB,CAAC,CAAC,CAACI,gBAAgB;EAC/DR,iBAAiB,GAChBA,iBAAiB,IAAII,iBAAiB,CAAC,CAAC,CAACJ,iBAAiB;EAE3D,IAAAS,uBAAW,EAAE;IACZX,YAAY;IACZC,SAAS;IACTG,YAAY;IACZL,cAAc,EAAE;MACfa,IAAI,EAAEP,gBAAgB,CAAC,CAAC;MACxB,GAAGN;IACJ,CAAC;IACDG,iBAAiB;IACjBC,OAAO,EAAEA,CAAE;MAAEU;IAAQ,CAAC,KAAMV,OAAO,CAAEU,OAAQ,CAAC;IAC9CJ;EACD,CAAE,CAAC;AACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/editor/src/utils/media-upload/index.native.js"],"
|
|
1
|
+
{"version":3,"names":["mediaUpload"],"sources":["@wordpress/editor/src/utils/media-upload/index.native.js"],"sourcesContent":["export default function mediaUpload() {}\n"],"mappings":";;;;;;AAAe,SAASA,WAAWA,CAAA,EAAG,CAAC"}
|
package/build/utils/terms.js
CHANGED
|
@@ -5,9 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.buildTermsTree = buildTermsTree;
|
|
7
7
|
exports.unescapeTerms = exports.unescapeTerm = exports.unescapeString = void 0;
|
|
8
|
-
|
|
9
8
|
var _htmlEntities = require("@wordpress/html-entities");
|
|
10
|
-
|
|
11
9
|
/**
|
|
12
10
|
* WordPress dependencies
|
|
13
11
|
*/
|
|
@@ -26,42 +24,39 @@ function buildTermsTree(flatTerms) {
|
|
|
26
24
|
parent: null,
|
|
27
25
|
...term
|
|
28
26
|
};
|
|
29
|
-
});
|
|
27
|
+
});
|
|
30
28
|
|
|
29
|
+
// All terms should have a `parent` because we're about to index them by it.
|
|
31
30
|
if (flatTermsWithParentAndChildren.some(({
|
|
32
31
|
parent
|
|
33
32
|
}) => parent === null)) {
|
|
34
33
|
return flatTermsWithParentAndChildren;
|
|
35
34
|
}
|
|
36
|
-
|
|
37
35
|
const termsByParent = flatTermsWithParentAndChildren.reduce((acc, term) => {
|
|
38
36
|
const {
|
|
39
37
|
parent
|
|
40
38
|
} = term;
|
|
41
|
-
|
|
42
39
|
if (!acc[parent]) {
|
|
43
40
|
acc[parent] = [];
|
|
44
41
|
}
|
|
45
|
-
|
|
46
42
|
acc[parent].push(term);
|
|
47
43
|
return acc;
|
|
48
44
|
}, {});
|
|
49
|
-
|
|
50
45
|
const fillWithChildren = terms => {
|
|
51
46
|
return terms.map(term => {
|
|
52
47
|
const children = termsByParent[term.id];
|
|
53
|
-
return {
|
|
48
|
+
return {
|
|
49
|
+
...term,
|
|
54
50
|
children: children && children.length ? fillWithChildren(children) : []
|
|
55
51
|
};
|
|
56
52
|
});
|
|
57
53
|
};
|
|
58
|
-
|
|
59
54
|
return fillWithChildren(termsByParent['0'] || []);
|
|
60
55
|
}
|
|
61
|
-
|
|
62
56
|
const unescapeString = arg => {
|
|
63
57
|
return (0, _htmlEntities.decodeEntities)(arg);
|
|
64
58
|
};
|
|
59
|
+
|
|
65
60
|
/**
|
|
66
61
|
* Returns a term object with name unescaped.
|
|
67
62
|
*
|
|
@@ -69,15 +64,14 @@ const unescapeString = arg => {
|
|
|
69
64
|
*
|
|
70
65
|
* @return {Object} Term object with name property unescaped.
|
|
71
66
|
*/
|
|
72
|
-
|
|
73
|
-
|
|
74
67
|
exports.unescapeString = unescapeString;
|
|
75
|
-
|
|
76
68
|
const unescapeTerm = term => {
|
|
77
|
-
return {
|
|
69
|
+
return {
|
|
70
|
+
...term,
|
|
78
71
|
name: unescapeString(term.name)
|
|
79
72
|
};
|
|
80
73
|
};
|
|
74
|
+
|
|
81
75
|
/**
|
|
82
76
|
* Returns an array of term objects with names unescaped.
|
|
83
77
|
* The unescape of each term is performed using the unescapeTerm function.
|
|
@@ -86,13 +80,9 @@ const unescapeTerm = term => {
|
|
|
86
80
|
*
|
|
87
81
|
* @return {Object[]} Array of term objects unescaped.
|
|
88
82
|
*/
|
|
89
|
-
|
|
90
|
-
|
|
91
83
|
exports.unescapeTerm = unescapeTerm;
|
|
92
|
-
|
|
93
84
|
const unescapeTerms = terms => {
|
|
94
85
|
return (terms !== null && terms !== void 0 ? terms : []).map(unescapeTerm);
|
|
95
86
|
};
|
|
96
|
-
|
|
97
87
|
exports.unescapeTerms = unescapeTerms;
|
|
98
88
|
//# sourceMappingURL=terms.js.map
|
package/build/utils/terms.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_htmlEntities","require","buildTermsTree","flatTerms","flatTermsWithParentAndChildren","map","term","children","parent","some","termsByParent","reduce","acc","push","fillWithChildren","terms","id","length","unescapeString","arg","decodeEntities","exports","unescapeTerm","name","unescapeTerms"],"sources":["@wordpress/editor/src/utils/terms.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Returns terms in a tree form.\n *\n * @param {Array} flatTerms Array of terms in flat format.\n *\n * @return {Array} Array of terms in tree format.\n */\nexport function buildTermsTree( flatTerms ) {\n\tconst flatTermsWithParentAndChildren = flatTerms.map( ( term ) => {\n\t\treturn {\n\t\t\tchildren: [],\n\t\t\tparent: null,\n\t\t\t...term,\n\t\t};\n\t} );\n\n\t// All terms should have a `parent` because we're about to index them by it.\n\tif (\n\t\tflatTermsWithParentAndChildren.some( ( { parent } ) => parent === null )\n\t) {\n\t\treturn flatTermsWithParentAndChildren;\n\t}\n\n\tconst termsByParent = flatTermsWithParentAndChildren.reduce(\n\t\t( acc, term ) => {\n\t\t\tconst { parent } = term;\n\t\t\tif ( ! acc[ parent ] ) {\n\t\t\t\tacc[ parent ] = [];\n\t\t\t}\n\t\t\tacc[ parent ].push( term );\n\t\t\treturn acc;\n\t\t},\n\t\t{}\n\t);\n\n\tconst fillWithChildren = ( terms ) => {\n\t\treturn terms.map( ( term ) => {\n\t\t\tconst children = termsByParent[ term.id ];\n\t\t\treturn {\n\t\t\t\t...term,\n\t\t\t\tchildren:\n\t\t\t\t\tchildren && children.length\n\t\t\t\t\t\t? fillWithChildren( children )\n\t\t\t\t\t\t: [],\n\t\t\t};\n\t\t} );\n\t};\n\n\treturn fillWithChildren( termsByParent[ '0' ] || [] );\n}\n\nexport const unescapeString = ( arg ) => {\n\treturn decodeEntities( arg );\n};\n\n/**\n * Returns a term object with name unescaped.\n *\n * @param {Object} term The term object to unescape.\n *\n * @return {Object} Term object with name property unescaped.\n */\nexport const unescapeTerm = ( term ) => {\n\treturn {\n\t\t...term,\n\t\tname: unescapeString( term.name ),\n\t};\n};\n\n/**\n * Returns an array of term objects with names unescaped.\n * The unescape of each term is performed using the unescapeTerm function.\n *\n * @param {Object[]} terms Array of term objects to unescape.\n *\n * @return {Object[]} Array of term objects unescaped.\n */\nexport const unescapeTerms = ( terms ) => {\n\treturn ( terms ?? [] ).map( unescapeTerm );\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,aAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,cAAcA,CAAEC,SAAS,EAAG;EAC3C,MAAMC,8BAA8B,GAAGD,SAAS,CAACE,GAAG,CAAIC,IAAI,IAAM;IACjE,OAAO;MACNC,QAAQ,EAAE,EAAE;MACZC,MAAM,EAAE,IAAI;MACZ,GAAGF;IACJ,CAAC;EACF,CAAE,CAAC;;EAEH;EACA,IACCF,8BAA8B,CAACK,IAAI,CAAE,CAAE;IAAED;EAAO,CAAC,KAAMA,MAAM,KAAK,IAAK,CAAC,EACvE;IACD,OAAOJ,8BAA8B;EACtC;EAEA,MAAMM,aAAa,GAAGN,8BAA8B,CAACO,MAAM,CAC1D,CAAEC,GAAG,EAAEN,IAAI,KAAM;IAChB,MAAM;MAAEE;IAAO,CAAC,GAAGF,IAAI;IACvB,IAAK,CAAEM,GAAG,CAAEJ,MAAM,CAAE,EAAG;MACtBI,GAAG,CAAEJ,MAAM,CAAE,GAAG,EAAE;IACnB;IACAI,GAAG,CAAEJ,MAAM,CAAE,CAACK,IAAI,CAAEP,IAAK,CAAC;IAC1B,OAAOM,GAAG;EACX,CAAC,EACD,CAAC,CACF,CAAC;EAED,MAAME,gBAAgB,GAAKC,KAAK,IAAM;IACrC,OAAOA,KAAK,CAACV,GAAG,CAAIC,IAAI,IAAM;MAC7B,MAAMC,QAAQ,GAAGG,aAAa,CAAEJ,IAAI,CAACU,EAAE,CAAE;MACzC,OAAO;QACN,GAAGV,IAAI;QACPC,QAAQ,EACPA,QAAQ,IAAIA,QAAQ,CAACU,MAAM,GACxBH,gBAAgB,CAAEP,QAAS,CAAC,GAC5B;MACL,CAAC;IACF,CAAE,CAAC;EACJ,CAAC;EAED,OAAOO,gBAAgB,CAAEJ,aAAa,CAAE,GAAG,CAAE,IAAI,EAAG,CAAC;AACtD;AAEO,MAAMQ,cAAc,GAAKC,GAAG,IAAM;EACxC,OAAO,IAAAC,4BAAc,EAAED,GAAI,CAAC;AAC7B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AANAE,OAAA,CAAAH,cAAA,GAAAA,cAAA;AAOO,MAAMI,YAAY,GAAKhB,IAAI,IAAM;EACvC,OAAO;IACN,GAAGA,IAAI;IACPiB,IAAI,EAAEL,cAAc,CAAEZ,IAAI,CAACiB,IAAK;EACjC,CAAC;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPAF,OAAA,CAAAC,YAAA,GAAAA,YAAA;AAQO,MAAME,aAAa,GAAKT,KAAK,IAAM;EACzC,OAAO,CAAEA,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI,EAAE,EAAGV,GAAG,CAAEiB,YAAa,CAAC;AAC3C,CAAC;AAACD,OAAA,CAAAG,aAAA,GAAAA,aAAA"}
|
package/build/utils/url.js
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.cleanForSlug = cleanForSlug;
|
|
9
|
-
|
|
10
8
|
var _url = require("@wordpress/url");
|
|
11
|
-
|
|
12
9
|
var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
|
|
13
|
-
|
|
14
10
|
/**
|
|
15
11
|
* WordPress dependencies
|
|
16
12
|
*/
|
package/build/utils/url.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_url","require","_deprecated","_interopRequireDefault","cleanForSlug","string","deprecated","since","plugin","alternative","urlCleanForSlug"],"sources":["@wordpress/editor/src/utils/url.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { cleanForSlug as urlCleanForSlug } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Performs some basic cleanup of a string for use as a post slug\n *\n * This replicates some of what sanitize_title() does in WordPress core, but\n * is only designed to approximate what the slug will be.\n *\n * Converts Latin-1 Supplement and Latin Extended-A letters to basic Latin letters.\n * Removes combining diacritical marks. Converts whitespace, periods,\n * and forward slashes to hyphens. Removes any remaining non-word characters\n * except hyphens and underscores. Converts remaining string to lowercase.\n * It does not account for octets, HTML entities, or other encoded characters.\n *\n * @param {string} string Title or slug to be processed\n *\n * @return {string} Processed string\n */\nexport function cleanForSlug( string ) {\n\tdeprecated( 'wp.editor.cleanForSlug', {\n\t\tsince: '12.7',\n\t\tplugin: 'Gutenberg',\n\t\talternative: 'wp.url.cleanForSlug',\n\t} );\n\treturn urlCleanForSlug( string );\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAJA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,YAAYA,CAAEC,MAAM,EAAG;EACtC,IAAAC,mBAAU,EAAE,wBAAwB,EAAE;IACrCC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,WAAW;IACnBC,WAAW,EAAE;EACd,CAAE,CAAC;EACH,OAAO,IAAAC,iBAAe,EAAEL,MAAO,CAAC;AACjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/editor/src/components/autocompleters/index.js"],"
|
|
1
|
+
{"version":3,"names":["default","userAutocompleter"],"sources":["@wordpress/editor/src/components/autocompleters/index.js"],"sourcesContent":["export { default as userAutocompleter } from './user';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,iBAAiB,QAAQ,QAAQ"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createElement, Fragment } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
6
5
|
import { useMemo } from '@wordpress/element';
|
|
7
6
|
import { useSelect } from '@wordpress/data';
|
|
8
7
|
import { store as coreStore } from '@wordpress/core-data';
|
|
8
|
+
|
|
9
9
|
/** @typedef {import('@wordpress/components').WPCompleter} WPCompleter */
|
|
10
10
|
|
|
11
11
|
export function getUserLabel(user) {
|
|
@@ -22,17 +22,16 @@ export function getUserLabel(user) {
|
|
|
22
22
|
className: "editor-autocompleters__user-slug"
|
|
23
23
|
}, user.slug));
|
|
24
24
|
}
|
|
25
|
+
|
|
25
26
|
/**
|
|
26
27
|
* A user mentions completer.
|
|
27
28
|
*
|
|
28
29
|
* @type {WPCompleter}
|
|
29
30
|
*/
|
|
30
|
-
|
|
31
31
|
export default {
|
|
32
32
|
name: 'users',
|
|
33
33
|
className: 'editor-autocompleters__user',
|
|
34
34
|
triggerPrefix: '@',
|
|
35
|
-
|
|
36
35
|
useItems(filterValue) {
|
|
37
36
|
const users = useSelect(select => {
|
|
38
37
|
const {
|
|
@@ -50,10 +49,8 @@ export default {
|
|
|
50
49
|
})) : [], [users]);
|
|
51
50
|
return [options];
|
|
52
51
|
},
|
|
53
|
-
|
|
54
52
|
getOptionCompletion(user) {
|
|
55
53
|
return `@${user.slug}`;
|
|
56
54
|
}
|
|
57
|
-
|
|
58
55
|
};
|
|
59
56
|
//# sourceMappingURL=user.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["useMemo","useSelect","store","coreStore","getUserLabel","user","avatar","avatar_urls","createElement","className","alt","src","Fragment","name","slug","triggerPrefix","useItems","filterValue","users","select","getUsers","context","search","encodeURIComponent","options","map","key","value","label","getOptionCompletion"],"sources":["@wordpress/editor/src/components/autocompleters/user.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/** @typedef {import('@wordpress/components').WPCompleter} WPCompleter */\n\nexport function getUserLabel( user ) {\n\tconst avatar =\n\t\tuser.avatar_urls && user.avatar_urls[ 24 ] ? (\n\t\t\t<img\n\t\t\t\tclassName=\"editor-autocompleters__user-avatar\"\n\t\t\t\talt=\"\"\n\t\t\t\tsrc={ user.avatar_urls[ 24 ] }\n\t\t\t/>\n\t\t) : (\n\t\t\t<span className=\"editor-autocompleters__no-avatar\"></span>\n\t\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ avatar }\n\t\t\t<span className=\"editor-autocompleters__user-name\">\n\t\t\t\t{ user.name }\n\t\t\t</span>\n\t\t\t<span className=\"editor-autocompleters__user-slug\">\n\t\t\t\t{ user.slug }\n\t\t\t</span>\n\t\t</>\n\t);\n}\n\n/**\n * A user mentions completer.\n *\n * @type {WPCompleter}\n */\nexport default {\n\tname: 'users',\n\tclassName: 'editor-autocompleters__user',\n\ttriggerPrefix: '@',\n\n\tuseItems( filterValue ) {\n\t\tconst users = useSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst { getUsers } = select( coreStore );\n\t\t\t\treturn getUsers( {\n\t\t\t\t\tcontext: 'view',\n\t\t\t\t\tsearch: encodeURIComponent( filterValue ),\n\t\t\t\t} );\n\t\t\t},\n\t\t\t[ filterValue ]\n\t\t);\n\n\t\tconst options = useMemo(\n\t\t\t() =>\n\t\t\t\tusers\n\t\t\t\t\t? users.map( ( user ) => ( {\n\t\t\t\t\t\t\tkey: `user-${ user.slug }`,\n\t\t\t\t\t\t\tvalue: user,\n\t\t\t\t\t\t\tlabel: getUserLabel( user ),\n\t\t\t\t\t } ) )\n\t\t\t\t\t: [],\n\t\t\t[ users ]\n\t\t);\n\n\t\treturn [ options ];\n\t},\n\n\tgetOptionCompletion( user ) {\n\t\treturn `@${ user.slug }`;\n\t},\n};\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;;AAEzD;;AAEA,OAAO,SAASC,YAAYA,CAAEC,IAAI,EAAG;EACpC,MAAMC,MAAM,GACXD,IAAI,CAACE,WAAW,IAAIF,IAAI,CAACE,WAAW,CAAE,EAAE,CAAE,GACzCC,aAAA;IACCC,SAAS,EAAC,oCAAoC;IAC9CC,GAAG,EAAC,EAAE;IACNC,GAAG,EAAGN,IAAI,CAACE,WAAW,CAAE,EAAE;EAAI,CAC9B,CAAC,GAEFC,aAAA;IAAMC,SAAS,EAAC;EAAkC,CAAO,CACzD;EAEF,OACCD,aAAA,CAAAI,QAAA,QACGN,MAAM,EACRE,aAAA;IAAMC,SAAS,EAAC;EAAkC,GAC/CJ,IAAI,CAACQ,IACF,CAAC,EACPL,aAAA;IAAMC,SAAS,EAAC;EAAkC,GAC/CJ,IAAI,CAACS,IACF,CACL,CAAC;AAEL;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe;EACdD,IAAI,EAAE,OAAO;EACbJ,SAAS,EAAE,6BAA6B;EACxCM,aAAa,EAAE,GAAG;EAElBC,QAAQA,CAAEC,WAAW,EAAG;IACvB,MAAMC,KAAK,GAAGjB,SAAS,CACpBkB,MAAM,IAAM;MACb,MAAM;QAAEC;MAAS,CAAC,GAAGD,MAAM,CAAEhB,SAAU,CAAC;MACxC,OAAOiB,QAAQ,CAAE;QAChBC,OAAO,EAAE,MAAM;QACfC,MAAM,EAAEC,kBAAkB,CAAEN,WAAY;MACzC,CAAE,CAAC;IACJ,CAAC,EACD,CAAEA,WAAW,CACd,CAAC;IAED,MAAMO,OAAO,GAAGxB,OAAO,CACtB,MACCkB,KAAK,GACFA,KAAK,CAACO,GAAG,CAAIpB,IAAI,KAAQ;MACzBqB,GAAG,EAAG,QAAQrB,IAAI,CAACS,IAAM,EAAC;MAC1Ba,KAAK,EAAEtB,IAAI;MACXuB,KAAK,EAAExB,YAAY,CAAEC,IAAK;IAC1B,CAAC,CAAG,CAAC,GACL,EAAE,EACN,CAAEa,KAAK,CACR,CAAC;IAED,OAAO,CAAEM,OAAO,CAAE;EACnB,CAAC;EAEDK,mBAAmBA,CAAExB,IAAI,EAAG;IAC3B,OAAQ,IAAIA,IAAI,CAACS,IAAM,EAAC;EACzB;AACD,CAAC"}
|
|
@@ -5,11 +5,12 @@ import { Component } from '@wordpress/element';
|
|
|
5
5
|
import { compose } from '@wordpress/compose';
|
|
6
6
|
import { withSelect, withDispatch } from '@wordpress/data';
|
|
7
7
|
import { store as coreStore } from '@wordpress/core-data';
|
|
8
|
+
|
|
8
9
|
/**
|
|
9
10
|
* Internal dependencies
|
|
10
11
|
*/
|
|
11
|
-
|
|
12
12
|
import { store as editorStore } from '../../store';
|
|
13
|
+
|
|
13
14
|
/**
|
|
14
15
|
* AutosaveMonitor invokes `props.autosave()` within at most `interval` seconds after an unsaved change is detected.
|
|
15
16
|
*
|
|
@@ -21,76 +22,61 @@ import { store as editorStore } from '../../store';
|
|
|
21
22
|
* * If `props.isAutosaveable` happens to be false at a time of checking for changes, the check is retried every second.
|
|
22
23
|
* * The timer may be disabled by setting `props.disableIntervalChecks` to `true`. In that mode, any change will immediately trigger `props.autosave()`.
|
|
23
24
|
*/
|
|
24
|
-
|
|
25
25
|
export class AutosaveMonitor extends Component {
|
|
26
26
|
constructor(props) {
|
|
27
27
|
super(props);
|
|
28
28
|
this.needsAutosave = !!(props.isDirty && props.isAutosaveable);
|
|
29
29
|
}
|
|
30
|
-
|
|
31
30
|
componentDidMount() {
|
|
32
31
|
if (!this.props.disableIntervalChecks) {
|
|
33
32
|
this.setAutosaveTimer();
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
|
-
|
|
37
35
|
componentDidUpdate(prevProps) {
|
|
38
36
|
if (this.props.disableIntervalChecks) {
|
|
39
37
|
if (this.props.editsReference !== prevProps.editsReference) {
|
|
40
38
|
this.props.autosave();
|
|
41
39
|
}
|
|
42
|
-
|
|
43
40
|
return;
|
|
44
41
|
}
|
|
45
|
-
|
|
46
42
|
if (this.props.interval !== prevProps.interval) {
|
|
47
43
|
clearTimeout(this.timerId);
|
|
48
44
|
this.setAutosaveTimer();
|
|
49
45
|
}
|
|
50
|
-
|
|
51
46
|
if (!this.props.isDirty) {
|
|
52
47
|
this.needsAutosave = false;
|
|
53
48
|
return;
|
|
54
49
|
}
|
|
55
|
-
|
|
56
50
|
if (this.props.isAutosaving && !prevProps.isAutosaving) {
|
|
57
51
|
this.needsAutosave = false;
|
|
58
52
|
return;
|
|
59
53
|
}
|
|
60
|
-
|
|
61
54
|
if (this.props.editsReference !== prevProps.editsReference) {
|
|
62
55
|
this.needsAutosave = true;
|
|
63
56
|
}
|
|
64
57
|
}
|
|
65
|
-
|
|
66
58
|
componentWillUnmount() {
|
|
67
59
|
clearTimeout(this.timerId);
|
|
68
60
|
}
|
|
69
|
-
|
|
70
61
|
setAutosaveTimer(timeout = this.props.interval * 1000) {
|
|
71
62
|
this.timerId = setTimeout(() => {
|
|
72
63
|
this.autosaveTimerHandler();
|
|
73
64
|
}, timeout);
|
|
74
65
|
}
|
|
75
|
-
|
|
76
66
|
autosaveTimerHandler() {
|
|
77
67
|
if (!this.props.isAutosaveable) {
|
|
78
68
|
this.setAutosaveTimer(1000);
|
|
79
69
|
return;
|
|
80
70
|
}
|
|
81
|
-
|
|
82
71
|
if (this.needsAutosave) {
|
|
83
72
|
this.needsAutosave = false;
|
|
84
73
|
this.props.autosave();
|
|
85
74
|
}
|
|
86
|
-
|
|
87
75
|
this.setAutosaveTimer();
|
|
88
76
|
}
|
|
89
|
-
|
|
90
77
|
render() {
|
|
91
78
|
return null;
|
|
92
79
|
}
|
|
93
|
-
|
|
94
80
|
}
|
|
95
81
|
export default compose([withSelect((select, ownProps) => {
|
|
96
82
|
const {
|
|
@@ -119,6 +105,5 @@ export default compose([withSelect((select, ownProps) => {
|
|
|
119
105
|
} = ownProps;
|
|
120
106
|
autosave();
|
|
121
107
|
}
|
|
122
|
-
|
|
123
108
|
}))])(AutosaveMonitor);
|
|
124
109
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["Component","compose","withSelect","withDispatch","store","coreStore","editorStore","AutosaveMonitor","constructor","props","needsAutosave","isDirty","isAutosaveable","componentDidMount","disableIntervalChecks","setAutosaveTimer","componentDidUpdate","prevProps","editsReference","autosave","interval","clearTimeout","timerId","isAutosaving","componentWillUnmount","timeout","setTimeout","autosaveTimerHandler","render","select","ownProps","getReferenceByDistinctEdits","isEditedPostDirty","isEditedPostAutosaveable","isAutosavingPost","getEditorSettings","autosaveInterval","dispatch"],"sources":["@wordpress/editor/src/components/autosave-monitor/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * AutosaveMonitor invokes `props.autosave()` within at most `interval` seconds after an unsaved change is detected.\n *\n * The logic is straightforward: a check is performed every `props.interval` seconds. If any changes are detected, `props.autosave()` is called.\n * The time between the change and the autosave varies but is no larger than `props.interval` seconds. Refer to the code below for more details, such as\n * the specific way of detecting changes.\n *\n * There are two caveats:\n * * If `props.isAutosaveable` happens to be false at a time of checking for changes, the check is retried every second.\n * * The timer may be disabled by setting `props.disableIntervalChecks` to `true`. In that mode, any change will immediately trigger `props.autosave()`.\n */\nexport class AutosaveMonitor extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.needsAutosave = !! ( props.isDirty && props.isAutosaveable );\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( ! this.props.disableIntervalChecks ) {\n\t\t\tthis.setAutosaveTimer();\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( this.props.disableIntervalChecks ) {\n\t\t\tif ( this.props.editsReference !== prevProps.editsReference ) {\n\t\t\t\tthis.props.autosave();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.props.interval !== prevProps.interval ) {\n\t\t\tclearTimeout( this.timerId );\n\t\t\tthis.setAutosaveTimer();\n\t\t}\n\n\t\tif ( ! this.props.isDirty ) {\n\t\t\tthis.needsAutosave = false;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.props.isAutosaving && ! prevProps.isAutosaving ) {\n\t\t\tthis.needsAutosave = false;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.props.editsReference !== prevProps.editsReference ) {\n\t\t\tthis.needsAutosave = true;\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tclearTimeout( this.timerId );\n\t}\n\n\tsetAutosaveTimer( timeout = this.props.interval * 1000 ) {\n\t\tthis.timerId = setTimeout( () => {\n\t\t\tthis.autosaveTimerHandler();\n\t\t}, timeout );\n\t}\n\n\tautosaveTimerHandler() {\n\t\tif ( ! this.props.isAutosaveable ) {\n\t\t\tthis.setAutosaveTimer( 1000 );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.needsAutosave ) {\n\t\t\tthis.needsAutosave = false;\n\t\t\tthis.props.autosave();\n\t\t}\n\n\t\tthis.setAutosaveTimer();\n\t}\n\n\trender() {\n\t\treturn null;\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select, ownProps ) => {\n\t\tconst { getReferenceByDistinctEdits } = select( coreStore );\n\n\t\tconst {\n\t\t\tisEditedPostDirty,\n\t\t\tisEditedPostAutosaveable,\n\t\t\tisAutosavingPost,\n\t\t\tgetEditorSettings,\n\t\t} = select( editorStore );\n\n\t\tconst { interval = getEditorSettings().autosaveInterval } = ownProps;\n\n\t\treturn {\n\t\t\teditsReference: getReferenceByDistinctEdits(),\n\t\t\tisDirty: isEditedPostDirty(),\n\t\t\tisAutosaveable: isEditedPostAutosaveable(),\n\t\t\tisAutosaving: isAutosavingPost(),\n\t\t\tinterval,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, ownProps ) => ( {\n\t\tautosave() {\n\t\t\tconst { autosave = dispatch( editorStore ).autosave } = ownProps;\n\t\t\tautosave();\n\t\t},\n\t} ) ),\n] )( AutosaveMonitor );\n"],"mappings":"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"}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { useSelect } from '@wordpress/data';
|
|
5
5
|
import { count as characterCount } from '@wordpress/wordcount';
|
|
6
|
+
|
|
6
7
|
/**
|
|
7
8
|
* Internal dependencies
|
|
8
9
|
*/
|
|
9
|
-
|
|
10
10
|
import { store as editorStore } from '../../store';
|
|
11
11
|
export default function CharacterCount() {
|
|
12
12
|
const content = useSelect(select => select(editorStore).getEditedPostAttribute('content'), []);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["useSelect","count","characterCount","store","editorStore","CharacterCount","content","select","getEditedPostAttribute"],"sources":["@wordpress/editor/src/components/character-count/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { count as characterCount } from '@wordpress/wordcount';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function CharacterCount() {\n\tconst content = useSelect(\n\t\t( select ) => select( editorStore ).getEditedPostAttribute( 'content' ),\n\t\t[]\n\t);\n\n\treturn characterCount( content, 'characters_including_spaces' );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,cAAc,QAAQ,sBAAsB;;AAE9D;AACA;AACA;AACA,SAASC,KAAK,IAAIC,WAAW,QAAQ,aAAa;AAElD,eAAe,SAASC,cAAcA,CAAA,EAAG;EACxC,MAAMC,OAAO,GAAGN,SAAS,CACtBO,MAAM,IAAMA,MAAM,CAAEH,WAAY,CAAC,CAACI,sBAAsB,CAAE,SAAU,CAAC,EACvE,EACD,CAAC;EAED,OAAON,cAAc,CAAEI,OAAO,EAAE,6BAA8B,CAAC;AAChE"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createElement } from "@wordpress/element";
|
|
2
2
|
// Block Creation Components.
|
|
3
|
-
|
|
4
3
|
/**
|
|
5
4
|
* WordPress dependencies
|
|
6
5
|
*/
|
|
@@ -8,7 +7,6 @@ import deprecated from '@wordpress/deprecated';
|
|
|
8
7
|
import { forwardRef } from '@wordpress/element';
|
|
9
8
|
import { Autocomplete as RootAutocomplete, AlignmentToolbar as RootAlignmentToolbar, BlockAlignmentToolbar as RootBlockAlignmentToolbar, BlockControls as RootBlockControls, BlockEdit as RootBlockEdit, BlockEditorKeyboardShortcuts as RootBlockEditorKeyboardShortcuts, BlockFormatControls as RootBlockFormatControls, BlockIcon as RootBlockIcon, BlockInspector as RootBlockInspector, BlockList as RootBlockList, BlockMover as RootBlockMover, BlockNavigationDropdown as RootBlockNavigationDropdown, BlockSelectionClearer as RootBlockSelectionClearer, BlockSettingsMenu as RootBlockSettingsMenu, BlockTitle as RootBlockTitle, BlockToolbar as RootBlockToolbar, ColorPalette as RootColorPalette, ContrastChecker as RootContrastChecker, CopyHandler as RootCopyHandler, createCustomColorsHOC as rootCreateCustomColorsHOC, DefaultBlockAppender as RootDefaultBlockAppender, FontSizePicker as RootFontSizePicker, getColorClassName as rootGetColorClassName, getColorObjectByAttributeValues as rootGetColorObjectByAttributeValues, getColorObjectByColorValue as rootGetColorObjectByColorValue, getFontSize as rootGetFontSize, getFontSizeClass as rootGetFontSizeClass, Inserter as RootInserter, InnerBlocks as RootInnerBlocks, InspectorAdvancedControls as RootInspectorAdvancedControls, InspectorControls as RootInspectorControls, PanelColorSettings as RootPanelColorSettings, PlainText as RootPlainText, RichText as RootRichText, RichTextShortcut as RootRichTextShortcut, RichTextToolbarButton as RootRichTextToolbarButton, __unstableRichTextInputEvent as __unstableRootRichTextInputEvent, MediaPlaceholder as RootMediaPlaceholder, MediaUpload as RootMediaUpload, MediaUploadCheck as RootMediaUploadCheck, MultiSelectScrollIntoView as RootMultiSelectScrollIntoView, NavigableToolbar as RootNavigableToolbar, ObserveTyping as RootObserveTyping, SkipToSelectedBlock as RootSkipToSelectedBlock, URLInput as RootURLInput, URLInputButton as RootURLInputButton, URLPopover as RootURLPopover, Warning as RootWarning, WritingFlow as RootWritingFlow, withColorContext as rootWithColorContext, withColors as rootWithColors, withFontSizes as rootWithFontSizes } from '@wordpress/block-editor';
|
|
10
9
|
export { default as ServerSideRender } from '@wordpress/server-side-render';
|
|
11
|
-
|
|
12
10
|
function deprecateComponent(name, Wrapped, staticsToHoist = []) {
|
|
13
11
|
const Component = forwardRef((props, ref) => {
|
|
14
12
|
deprecated('wp.editor.' + name, {
|
|
@@ -26,7 +24,6 @@ function deprecateComponent(name, Wrapped, staticsToHoist = []) {
|
|
|
26
24
|
});
|
|
27
25
|
return Component;
|
|
28
26
|
}
|
|
29
|
-
|
|
30
27
|
function deprecateFunction(name, func) {
|
|
31
28
|
return (...args) => {
|
|
32
29
|
deprecated('wp.editor.' + name, {
|
|
@@ -37,7 +34,6 @@ function deprecateFunction(name, func) {
|
|
|
37
34
|
return func(...args);
|
|
38
35
|
};
|
|
39
36
|
}
|
|
40
|
-
|
|
41
37
|
const RichText = deprecateComponent('RichText', RootRichText, ['Content']);
|
|
42
38
|
RichText.isEmpty = deprecateFunction('RichText.isEmpty', RootRichText.isEmpty);
|
|
43
39
|
export { RichText };
|