@wordpress/editor 12.0.3 → 12.0.7
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/build/components/autocompleters/user.js +1 -1
- package/build/components/autosave-monitor/index.js +2 -1
- package/build/components/autosave-monitor/index.js.map +1 -1
- package/build/components/deprecated.js +6 -4
- package/build/components/deprecated.js.map +1 -1
- package/build/components/deprecated.native.js +26 -26
- package/build/components/document-outline/check.js +5 -4
- package/build/components/document-outline/check.js.map +1 -1
- package/build/components/document-outline/index.js +13 -9
- package/build/components/document-outline/index.js.map +1 -1
- package/build/components/document-outline/item.js +25 -22
- package/build/components/document-outline/item.js.map +1 -1
- package/build/components/editor-help/help-detail-navigation-screen.native.js +5 -4
- 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 +5 -4
- package/build/components/editor-help/help-get-support-button.native.js.map +1 -1
- package/build/components/editor-help/help-topic-row.native.js +6 -5
- package/build/components/editor-help/help-topic-row.native.js.map +1 -1
- package/build/components/editor-help/index.native.js +21 -16
- package/build/components/editor-help/index.native.js.map +1 -1
- package/build/components/editor-help/view-sections.native.js +16 -13
- package/build/components/editor-help/view-sections.native.js.map +1 -1
- package/build/components/editor-notices/index.js +5 -4
- package/build/components/editor-notices/index.js.map +1 -1
- package/build/components/entities-saved-states/entity-record-item.js +7 -6
- package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
- package/build/components/entities-saved-states/entity-type-list.js +7 -6
- package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
- package/build/components/entities-saved-states/index.js +31 -22
- package/build/components/entities-saved-states/index.js.map +1 -1
- package/build/components/error-boundary/index.js +5 -4
- package/build/components/error-boundary/index.js.map +1 -1
- package/build/components/global-keyboard-shortcuts/save-shortcut.js +4 -3
- package/build/components/global-keyboard-shortcuts/save-shortcut.js.map +1 -1
- package/build/components/index.js +22 -22
- package/build/components/index.native.js +4 -4
- package/build/components/page-attributes/check.js +4 -3
- package/build/components/page-attributes/check.js.map +1 -1
- package/build/components/page-attributes/order.js +5 -4
- package/build/components/page-attributes/order.js.map +1 -1
- package/build/components/page-attributes/parent.js +6 -3
- package/build/components/page-attributes/parent.js.map +1 -1
- package/build/components/post-author/check.js +4 -3
- package/build/components/post-author/check.js.map +1 -1
- package/build/components/post-author/combobox.js +6 -3
- package/build/components/post-author/combobox.js.map +1 -1
- package/build/components/post-comments/index.js +6 -4
- package/build/components/post-comments/index.js.map +1 -1
- package/build/components/post-excerpt/index.js +5 -4
- package/build/components/post-excerpt/index.js.map +1 -1
- package/build/components/post-featured-image/index.js +51 -41
- package/build/components/post-featured-image/index.js.map +1 -1
- package/build/components/post-format/check.js +5 -4
- package/build/components/post-format/check.js.map +1 -1
- package/build/components/post-format/index.js +1 -1
- package/build/components/post-last-revision/check.js +7 -5
- package/build/components/post-last-revision/check.js.map +1 -1
- package/build/components/post-last-revision/index.js +5 -4
- package/build/components/post-last-revision/index.js.map +1 -1
- package/build/components/post-pending-status/check.js +7 -5
- package/build/components/post-pending-status/check.js.map +1 -1
- package/build/components/post-pending-status/index.js +6 -4
- package/build/components/post-pending-status/index.js.map +1 -1
- package/build/components/post-pingbacks/index.js +6 -4
- package/build/components/post-pingbacks/index.js.map +1 -1
- package/build/components/post-preview-button/index.js +11 -7
- package/build/components/post-preview-button/index.js.map +1 -1
- package/build/components/post-publish-button/index.js +12 -4
- package/build/components/post-publish-button/index.js.map +1 -1
- package/build/components/post-publish-button/label.js +15 -12
- package/build/components/post-publish-button/label.js.map +1 -1
- package/build/components/post-publish-panel/index.js +4 -3
- package/build/components/post-publish-panel/index.js.map +1 -1
- package/build/components/post-publish-panel/maybe-post-format-panel.js +11 -8
- package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-tags-panel.js +7 -4
- package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
- package/build/components/post-publish-panel/postpublish.js +6 -5
- package/build/components/post-publish-panel/postpublish.js.map +1 -1
- package/build/components/post-publish-panel/prepublish.js +4 -3
- package/build/components/post-publish-panel/prepublish.js.map +1 -1
- package/build/components/post-saved-state/index.js +6 -5
- package/build/components/post-saved-state/index.js.map +1 -1
- package/build/components/post-schedule/check.js +6 -4
- package/build/components/post-schedule/check.js.map +1 -1
- package/build/components/post-schedule/index.js +15 -10
- package/build/components/post-schedule/index.js.map +1 -1
- package/build/components/post-schedule/label.js +5 -4
- package/build/components/post-schedule/label.js.map +1 -1
- package/build/components/post-slug/check.js +4 -3
- package/build/components/post-slug/check.js.map +1 -1
- package/build/components/post-slug/index.js +6 -5
- package/build/components/post-slug/index.js.map +1 -1
- package/build/components/post-sticky/check.js +7 -5
- package/build/components/post-sticky/check.js.map +1 -1
- package/build/components/post-sticky/index.js +5 -4
- package/build/components/post-sticky/index.js.map +1 -1
- package/build/components/post-switch-to-draft-button/index.js +7 -6
- package/build/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build/components/post-taxonomies/check.js +6 -5
- package/build/components/post-taxonomies/check.js.map +1 -1
- package/build/components/post-taxonomies/flat-term-selector.js +4 -3
- package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/hierarchical-term-selector.js +6 -5
- package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/index.js +6 -5
- package/build/components/post-taxonomies/index.js.map +1 -1
- package/build/components/post-taxonomies/most-used-terms.js +5 -4
- package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
- package/build/components/post-template/index.js +2 -1
- package/build/components/post-template/index.js.map +1 -1
- package/build/components/post-title/index.native.js +6 -5
- package/build/components/post-title/index.native.js.map +1 -1
- package/build/components/post-trash/check.js +8 -6
- package/build/components/post-trash/check.js.map +1 -1
- package/build/components/post-trash/index.js +8 -6
- package/build/components/post-trash/index.js.map +1 -1
- package/build/components/post-type-support-check/index.js +6 -5
- package/build/components/post-type-support-check/index.js.map +1 -1
- package/build/components/post-visibility/check.js +5 -4
- package/build/components/post-visibility/check.js.map +1 -1
- package/build/components/post-visibility/index.js +28 -24
- package/build/components/post-visibility/index.js.map +1 -1
- package/build/components/post-visibility/label.js +5 -3
- package/build/components/post-visibility/label.js.map +1 -1
- package/build/components/provider/index.js +9 -8
- package/build/components/provider/index.js.map +1 -1
- package/build/components/provider/index.native.js +17 -11
- package/build/components/provider/index.native.js.map +1 -1
- package/build/components/table-of-contents/index.js +33 -26
- package/build/components/table-of-contents/index.js.map +1 -1
- package/build/components/table-of-contents/panel.js +5 -4
- package/build/components/table-of-contents/panel.js.map +1 -1
- package/build/components/template-validation-notice/index.js +6 -4
- package/build/components/template-validation-notice/index.js.map +1 -1
- package/build/components/theme-support-check/index.js +7 -6
- package/build/components/theme-support-check/index.js.map +1 -1
- package/build/hooks/custom-sources-backwards-compatibility.js +12 -8
- package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
- package/build/hooks/default-autocompleters.js +2 -1
- package/build/hooks/default-autocompleters.js.map +1 -1
- package/build/index.js +4 -4
- package/build/store/actions.js +51 -30
- package/build/store/actions.js.map +1 -1
- package/build/store/actions.native.js +3 -2
- package/build/store/actions.native.js.map +1 -1
- package/build/store/constants.js +1 -1
- package/build/store/controls.js +10 -9
- package/build/store/controls.js.map +1 -1
- package/build/store/defaults.js +1 -1
- package/build/store/index.js +5 -3
- package/build/store/index.js.map +1 -1
- package/build/store/reducer.js +52 -22
- package/build/store/reducer.js.map +1 -1
- package/build/store/reducer.native.js +14 -4
- package/build/store/reducer.native.js.map +1 -1
- package/build/store/selectors.js +56 -37
- package/build/store/selectors.js.map +1 -1
- package/build/store/selectors.native.js +1 -1
- package/build/store/utils/notice-builder.js +1 -1
- package/build/utils/index.js +6 -6
- package/build/utils/media-upload/index.js +15 -11
- package/build/utils/media-upload/index.js.map +1 -1
- package/build/utils/url.js +1 -1
- package/build-module/components/autosave-monitor/index.js +2 -1
- package/build-module/components/autosave-monitor/index.js.map +1 -1
- package/build-module/components/deprecated.js +4 -3
- package/build-module/components/deprecated.js.map +1 -1
- package/build-module/components/document-outline/check.js +5 -4
- package/build-module/components/document-outline/check.js.map +1 -1
- package/build-module/components/document-outline/index.js +13 -9
- package/build-module/components/document-outline/index.js.map +1 -1
- package/build-module/components/document-outline/item.js +25 -22
- package/build-module/components/document-outline/item.js.map +1 -1
- package/build-module/components/editor-help/help-detail-navigation-screen.native.js +5 -4
- 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 +5 -4
- package/build-module/components/editor-help/help-get-support-button.native.js.map +1 -1
- package/build-module/components/editor-help/help-topic-row.native.js +6 -5
- package/build-module/components/editor-help/help-topic-row.native.js.map +1 -1
- package/build-module/components/editor-help/index.native.js +20 -16
- package/build-module/components/editor-help/index.native.js.map +1 -1
- package/build-module/components/editor-help/view-sections.native.js +15 -12
- package/build-module/components/editor-help/view-sections.native.js.map +1 -1
- package/build-module/components/editor-notices/index.js +5 -4
- package/build-module/components/editor-notices/index.js.map +1 -1
- package/build-module/components/entities-saved-states/entity-record-item.js +7 -6
- 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 +7 -6
- package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
- package/build-module/components/entities-saved-states/index.js +31 -22
- package/build-module/components/entities-saved-states/index.js.map +1 -1
- package/build-module/components/error-boundary/index.js +5 -4
- package/build-module/components/error-boundary/index.js.map +1 -1
- package/build-module/components/global-keyboard-shortcuts/save-shortcut.js +4 -3
- package/build-module/components/global-keyboard-shortcuts/save-shortcut.js.map +1 -1
- package/build-module/components/page-attributes/check.js +4 -3
- package/build-module/components/page-attributes/check.js.map +1 -1
- package/build-module/components/page-attributes/order.js +5 -4
- package/build-module/components/page-attributes/order.js.map +1 -1
- package/build-module/components/page-attributes/parent.js +5 -2
- package/build-module/components/page-attributes/parent.js.map +1 -1
- package/build-module/components/post-author/check.js +4 -3
- package/build-module/components/post-author/check.js.map +1 -1
- package/build-module/components/post-author/combobox.js +6 -3
- package/build-module/components/post-author/combobox.js.map +1 -1
- package/build-module/components/post-comments/index.js +6 -4
- package/build-module/components/post-comments/index.js.map +1 -1
- package/build-module/components/post-excerpt/index.js +5 -4
- package/build-module/components/post-excerpt/index.js.map +1 -1
- package/build-module/components/post-featured-image/index.js +51 -41
- package/build-module/components/post-featured-image/index.js.map +1 -1
- package/build-module/components/post-format/check.js +5 -4
- package/build-module/components/post-format/check.js.map +1 -1
- package/build-module/components/post-last-revision/check.js +7 -5
- package/build-module/components/post-last-revision/check.js.map +1 -1
- package/build-module/components/post-last-revision/index.js +5 -4
- package/build-module/components/post-last-revision/index.js.map +1 -1
- package/build-module/components/post-pending-status/check.js +7 -5
- package/build-module/components/post-pending-status/check.js.map +1 -1
- package/build-module/components/post-pending-status/index.js +6 -4
- package/build-module/components/post-pending-status/index.js.map +1 -1
- package/build-module/components/post-pingbacks/index.js +6 -4
- package/build-module/components/post-pingbacks/index.js.map +1 -1
- package/build-module/components/post-preview-button/index.js +11 -7
- package/build-module/components/post-preview-button/index.js.map +1 -1
- package/build-module/components/post-publish-button/index.js +12 -4
- package/build-module/components/post-publish-button/index.js.map +1 -1
- package/build-module/components/post-publish-button/label.js +15 -12
- package/build-module/components/post-publish-button/label.js.map +1 -1
- package/build-module/components/post-publish-panel/index.js +4 -3
- package/build-module/components/post-publish-panel/index.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-post-format-panel.js +11 -8
- 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 +7 -4
- package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
- package/build-module/components/post-publish-panel/postpublish.js +6 -5
- package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
- package/build-module/components/post-publish-panel/prepublish.js +4 -3
- package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
- package/build-module/components/post-saved-state/index.js +6 -5
- package/build-module/components/post-saved-state/index.js.map +1 -1
- package/build-module/components/post-schedule/check.js +6 -4
- package/build-module/components/post-schedule/check.js.map +1 -1
- package/build-module/components/post-schedule/index.js +15 -10
- package/build-module/components/post-schedule/index.js.map +1 -1
- package/build-module/components/post-schedule/label.js +6 -4
- package/build-module/components/post-schedule/label.js.map +1 -1
- package/build-module/components/post-slug/check.js +4 -3
- package/build-module/components/post-slug/check.js.map +1 -1
- package/build-module/components/post-slug/index.js +6 -5
- package/build-module/components/post-slug/index.js.map +1 -1
- package/build-module/components/post-sticky/check.js +7 -5
- package/build-module/components/post-sticky/check.js.map +1 -1
- package/build-module/components/post-sticky/index.js +5 -4
- package/build-module/components/post-sticky/index.js.map +1 -1
- package/build-module/components/post-switch-to-draft-button/index.js +7 -6
- package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build-module/components/post-taxonomies/check.js +6 -5
- package/build-module/components/post-taxonomies/check.js.map +1 -1
- package/build-module/components/post-taxonomies/flat-term-selector.js +4 -3
- package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js +4 -3
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/index.js +6 -5
- package/build-module/components/post-taxonomies/index.js.map +1 -1
- package/build-module/components/post-taxonomies/most-used-terms.js +5 -4
- package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
- package/build-module/components/post-template/index.js +2 -1
- package/build-module/components/post-template/index.js.map +1 -1
- package/build-module/components/post-title/index.native.js +6 -5
- package/build-module/components/post-title/index.native.js.map +1 -1
- package/build-module/components/post-trash/check.js +8 -6
- package/build-module/components/post-trash/check.js.map +1 -1
- package/build-module/components/post-trash/index.js +8 -6
- package/build-module/components/post-trash/index.js.map +1 -1
- package/build-module/components/post-type-support-check/index.js +6 -5
- package/build-module/components/post-type-support-check/index.js.map +1 -1
- package/build-module/components/post-visibility/check.js +5 -4
- package/build-module/components/post-visibility/check.js.map +1 -1
- package/build-module/components/post-visibility/index.js +28 -24
- package/build-module/components/post-visibility/index.js.map +1 -1
- package/build-module/components/post-visibility/label.js +5 -3
- package/build-module/components/post-visibility/label.js.map +1 -1
- package/build-module/components/provider/index.js +9 -8
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/provider/index.native.js +13 -9
- package/build-module/components/provider/index.native.js.map +1 -1
- package/build-module/components/table-of-contents/index.js +33 -26
- package/build-module/components/table-of-contents/index.js.map +1 -1
- package/build-module/components/table-of-contents/panel.js +5 -4
- package/build-module/components/table-of-contents/panel.js.map +1 -1
- package/build-module/components/template-validation-notice/index.js +6 -4
- package/build-module/components/template-validation-notice/index.js.map +1 -1
- package/build-module/components/theme-support-check/index.js +7 -6
- package/build-module/components/theme-support-check/index.js.map +1 -1
- package/build-module/hooks/custom-sources-backwards-compatibility.js +12 -8
- package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
- package/build-module/hooks/default-autocompleters.js +2 -1
- package/build-module/hooks/default-autocompleters.js.map +1 -1
- package/build-module/store/actions.js +27 -12
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/actions.native.js +2 -1
- package/build-module/store/actions.native.js.map +1 -1
- package/build-module/store/controls.js +8 -7
- package/build-module/store/controls.js.map +1 -1
- package/build-module/store/reducer.js +44 -14
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/reducer.native.js +12 -3
- package/build-module/store/reducer.native.js.map +1 -1
- package/build-module/store/selectors.js +7 -4
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/media-upload/index.js +15 -11
- package/build-module/utils/media-upload/index.js.map +1 -1
- package/package.json +31 -31
- package/src/components/entities-saved-states/index.js +8 -1
|
@@ -79,7 +79,8 @@ class AutosaveMonitor extends _element.Component {
|
|
|
79
79
|
clearTimeout(this.timerId);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
setAutosaveTimer(
|
|
82
|
+
setAutosaveTimer() {
|
|
83
|
+
let timeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props.interval * 1000;
|
|
83
84
|
this.timerId = setTimeout(() => {
|
|
84
85
|
this.autosaveTimerHandler();
|
|
85
86
|
}, timeout);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/editor/src/components/autosave-monitor/index.js"],"names":["AutosaveMonitor","Component","constructor","props","needsAutosave","isDirty","isAutosaveable","componentDidMount","disableIntervalChecks","setAutosaveTimer","componentDidUpdate","prevProps","editsReference","autosave","interval","clearTimeout","timerId","isAutosaving","componentWillUnmount","timeout","setTimeout","autosaveTimerHandler","render","select","ownProps","getReferenceByDistinctEdits","coreStore","isEditedPostDirty","isEditedPostAutosaveable","isAutosavingPost","getEditorSettings","editorStore","autosaveInterval","dispatch"],"mappings":";;;;;;;AAGA;;AACA;;AACA;;AACA;;AAKA;;AAXA;AACA;AACA;;AAMA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,eAAN,SAA8BC,kBAA9B,CAAwC;AAC9CC,EAAAA,WAAW,CAAEC,KAAF,EAAU;AACpB,UAAOA,KAAP;AACA,SAAKC,aAAL,GAAqB,CAAC,EAAID,KAAK,CAACE,OAAN,IAAiBF,KAAK,CAACG,cAA3B,CAAtB;AACA;;AAEDC,EAAAA,iBAAiB,GAAG;AACnB,QAAK,CAAE,KAAKJ,KAAL,CAAWK,qBAAlB,EAA0C;AACzC,WAAKC,gBAAL;AACA;AACD;;AAEDC,EAAAA,kBAAkB,CAAEC,SAAF,EAAc;AAC/B,QAAK,KAAKR,KAAL,CAAWK,qBAAhB,EAAwC;AACvC,UAAK,KAAKL,KAAL,CAAWS,cAAX,KAA8BD,SAAS,CAACC,cAA7C,EAA8D;AAC7D,aAAKT,KAAL,CAAWU,QAAX;AACA;;AACD;AACA;;AAED,QAAK,KAAKV,KAAL,CAAWW,QAAX,KAAwBH,SAAS,CAACG,QAAvC,EAAkD;AACjDC,MAAAA,YAAY,CAAE,KAAKC,OAAP,CAAZ;AACA,WAAKP,gBAAL;AACA;;AAED,QAAK,CAAE,KAAKN,KAAL,CAAWE,OAAlB,EAA4B;AAC3B,WAAKD,aAAL,GAAqB,KAArB;AACA;AACA;;AAED,QAAK,KAAKD,KAAL,CAAWc,YAAX,IAA2B,CAAEN,SAAS,CAACM,YAA5C,EAA2D;AAC1D,WAAKb,aAAL,GAAqB,KAArB;AACA;AACA;;AAED,QAAK,KAAKD,KAAL,CAAWS,cAAX,KAA8BD,SAAS,CAACC,cAA7C,EAA8D;AAC7D,WAAKR,aAAL,GAAqB,IAArB;AACA;AACD;;AAEDc,EAAAA,oBAAoB,GAAG;AACtBH,IAAAA,YAAY,CAAE,KAAKC,OAAP,CAAZ;AACA;;AAEDP,EAAAA,gBAAgB,
|
|
1
|
+
{"version":3,"sources":["@wordpress/editor/src/components/autosave-monitor/index.js"],"names":["AutosaveMonitor","Component","constructor","props","needsAutosave","isDirty","isAutosaveable","componentDidMount","disableIntervalChecks","setAutosaveTimer","componentDidUpdate","prevProps","editsReference","autosave","interval","clearTimeout","timerId","isAutosaving","componentWillUnmount","timeout","setTimeout","autosaveTimerHandler","render","select","ownProps","getReferenceByDistinctEdits","coreStore","isEditedPostDirty","isEditedPostAutosaveable","isAutosavingPost","getEditorSettings","editorStore","autosaveInterval","dispatch"],"mappings":";;;;;;;AAGA;;AACA;;AACA;;AACA;;AAKA;;AAXA;AACA;AACA;;AAMA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,eAAN,SAA8BC,kBAA9B,CAAwC;AAC9CC,EAAAA,WAAW,CAAEC,KAAF,EAAU;AACpB,UAAOA,KAAP;AACA,SAAKC,aAAL,GAAqB,CAAC,EAAID,KAAK,CAACE,OAAN,IAAiBF,KAAK,CAACG,cAA3B,CAAtB;AACA;;AAEDC,EAAAA,iBAAiB,GAAG;AACnB,QAAK,CAAE,KAAKJ,KAA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B;AACA,WAAKD,KAAL,CAAWU,QAAX;AACA;;AAED,SAAKJ,gBAAL;AACA;;AAEDa,EAAAA,MAAM,GAAG;AACR,WAAO,IAAP;AACA;;AAlE6C;;;;eAqEhC,sBAAS,CACvB,sBAAY,CAAEC,MAAF,EAAUC,QAAV,KAAwB;AACnC,QAAM;AAAEC,IAAAA;AAAF,MAAkCF,MAAM,CAAEG,eAAF,CAA9C;AAEA,QAAM;AACLC,IAAAA,iBADK;AAELC,IAAAA,wBAFK;AAGLC,IAAAA,gBAHK;AAILC,IAAAA;AAJK,MAKFP,MAAM,CAAEQ,YAAF,CALV;AAOA,QAAM;AAAEjB,IAAAA,QAAQ,GAAGgB,iBAAiB,GAAGE;AAAjC,MAAsDR,QAA5D;AAEA,SAAO;AACNZ,IAAAA,cAAc,EAAEa,2BAA2B,EADrC;AAENpB,IAAAA,OAAO,EAAEsB,iBAAiB,EAFpB;AAGNrB,IAAAA,cAAc,EAAEsB,wBAAwB,EAHlC;AAINX,IAAAA,YAAY,EAAEY,gBAAgB,EAJxB;AAKNf,IAAAA;AALM,GAAP;AAOA,CAnBD,CADuB,EAqBvB,wBAAc,CAAEmB,QAAF,EAAYT,QAAZ,MAA4B;AACzCX,EAAAA,QAAQ,GAAG;AACV,UAAM;AAAEA,MAAAA,QAAQ,GAAGoB,QAAQ,CAAEF,YAAF,CAAR,CAAwBlB;AAArC,QAAkDW,QAAxD;AACAX,IAAAA,QAAQ;AACR;;AAJwC,CAA5B,CAAd,CArBuB,CAAT,EA2BVb,eA3BU,C","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"]}
|
|
@@ -5,13 +5,14 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
+
exports.RichTextToolbarButton = exports.RichTextShortcut = exports.RichText = exports.PreserveScrollInReorder = exports.PlainText = exports.PanelColorSettings = exports.ObserveTyping = exports.NavigableToolbar = exports.MultiSelectScrollIntoView = exports.MediaUploadCheck = exports.MediaUpload = exports.MediaPlaceholder = exports.InspectorControls = exports.InspectorAdvancedControls = exports.Inserter = exports.InnerBlocks = exports.FontSizePicker = exports.DefaultBlockAppender = exports.CopyHandler = exports.ContrastChecker = exports.ColorPalette = exports.BlockToolbar = exports.BlockTitle = exports.BlockSettingsMenu = exports.BlockSelectionClearer = exports.BlockNavigationDropdown = exports.BlockMover = exports.BlockList = exports.BlockInspector = exports.BlockIcon = exports.BlockFormatControls = exports.BlockEditorKeyboardShortcuts = exports.BlockEdit = exports.BlockControls = exports.BlockAlignmentToolbar = exports.Autocomplete = exports.AlignmentToolbar = void 0;
|
|
8
9
|
Object.defineProperty(exports, "ServerSideRender", {
|
|
9
10
|
enumerable: true,
|
|
10
11
|
get: function () {
|
|
11
12
|
return _serverSideRender.default;
|
|
12
13
|
}
|
|
13
14
|
});
|
|
14
|
-
exports.withFontSizes = exports.withColors = exports.withColorContext = exports.getFontSizeClass = exports.getFontSize = exports.getColorObjectByColorValue = exports.getColorObjectByAttributeValues = exports.getColorClassName = exports.createCustomColorsHOC = exports.WritingFlow = exports.Warning = exports.URLPopover = exports.URLInputButton = exports.URLInput = exports.SkipToSelectedBlock =
|
|
15
|
+
exports.withFontSizes = exports.withColors = exports.withColorContext = exports.getFontSizeClass = exports.getFontSize = exports.getColorObjectByColorValue = exports.getColorObjectByAttributeValues = exports.getColorClassName = exports.createCustomColorsHOC = exports.__unstableRichTextInputEvent = exports.WritingFlow = exports.Warning = exports.URLPopover = exports.URLInputButton = exports.URLInput = exports.SkipToSelectedBlock = void 0;
|
|
15
16
|
|
|
16
17
|
var _element = require("@wordpress/element");
|
|
17
18
|
|
|
@@ -28,7 +29,8 @@ var _serverSideRender = _interopRequireDefault(require("@wordpress/server-side-r
|
|
|
28
29
|
/**
|
|
29
30
|
* WordPress dependencies
|
|
30
31
|
*/
|
|
31
|
-
function deprecateComponent(name, Wrapped
|
|
32
|
+
function deprecateComponent(name, Wrapped) {
|
|
33
|
+
let staticsToHoist = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
32
34
|
const Component = (0, _element.forwardRef)((props, ref) => {
|
|
33
35
|
(0, _deprecated.default)('wp.editor.' + name, {
|
|
34
36
|
since: '5.3',
|
|
@@ -45,12 +47,12 @@ function deprecateComponent(name, Wrapped, staticsToHoist = []) {
|
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
function deprecateFunction(name, func) {
|
|
48
|
-
return (
|
|
50
|
+
return function () {
|
|
49
51
|
(0, _deprecated.default)('wp.editor.' + name, {
|
|
50
52
|
since: '5.3',
|
|
51
53
|
alternative: 'wp.blockEditor.' + name
|
|
52
54
|
});
|
|
53
|
-
return func(...
|
|
55
|
+
return func(...arguments);
|
|
54
56
|
};
|
|
55
57
|
}
|
|
56
58
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/editor/src/components/deprecated.js"],"names":["deprecateComponent","name","Wrapped","staticsToHoist","Component","props","ref","since","alternative","forEach","staticName","deprecateFunction","func","args","RichText","RootRichText","isEmpty","Autocomplete","RootAutocomplete","AlignmentToolbar","RootAlignmentToolbar","BlockAlignmentToolbar","RootBlockAlignmentToolbar","BlockControls","RootBlockControls","BlockEdit","RootBlockEdit","BlockEditorKeyboardShortcuts","RootBlockEditorKeyboardShortcuts","BlockFormatControls","RootBlockFormatControls","BlockIcon","RootBlockIcon","BlockInspector","RootBlockInspector","BlockList","RootBlockList","BlockMover","RootBlockMover","BlockNavigationDropdown","RootBlockNavigationDropdown","BlockSelectionClearer","RootBlockSelectionClearer","BlockSettingsMenu","RootBlockSettingsMenu","BlockTitle","RootBlockTitle","BlockToolbar","RootBlockToolbar","ColorPalette","RootColorPalette","ContrastChecker","RootContrastChecker","CopyHandler","RootCopyHandler","DefaultBlockAppender","RootDefaultBlockAppender","FontSizePicker","RootFontSizePicker","Inserter","RootInserter","InnerBlocks","RootInnerBlocks","InspectorAdvancedControls","RootInspectorAdvancedControls","InspectorControls","RootInspectorControls","PanelColorSettings","RootPanelColorSettings","PlainText","RootPlainText","RichTextShortcut","RootRichTextShortcut","RichTextToolbarButton","RootRichTextToolbarButton","__unstableRichTextInputEvent","__unstableRootRichTextInputEvent","MediaPlaceholder","RootMediaPlaceholder","MediaUpload","RootMediaUpload","MediaUploadCheck","RootMediaUploadCheck","MultiSelectScrollIntoView","RootMultiSelectScrollIntoView","NavigableToolbar","RootNavigableToolbar","ObserveTyping","RootObserveTyping","PreserveScrollInReorder","RootPreserveScrollInReorder","SkipToSelectedBlock","RootSkipToSelectedBlock","URLInput","RootURLInput","URLInputButton","RootURLInputButton","URLPopover","RootURLPopover","Warning","RootWarning","WritingFlow","RootWritingFlow","createCustomColorsHOC","rootCreateCustomColorsHOC","getColorClassName","rootGetColorClassName","getColorObjectByAttributeValues","rootGetColorObjectByAttributeValues","getColorObjectByColorValue","rootGetColorObjectByColorValue","getFontSize","rootGetFontSize","getFontSizeClass","rootGetFontSizeClass","withColorContext","rootWithColorContext","withColors","rootWithColors","withFontSizes","rootWithFontSizes"],"mappings":";;;;;;;;;;;;;;;AAKA;;;;AADA;;AAEA;;AAwDA;;AA9DA;;AACA;AACA;AACA;AA6DA,SAASA,kBAAT,CAA6BC,IAA7B,EAAmCC,OAAnC,EAA4CC,cAAc,GAAG,EAA7D,EAAkE;AACjE,QAAMC,SAAS,GAAG,yBAAY,CAAEC,KAAF,EAASC,GAAT,KAAkB;AAC/C,6BAAY,eAAeL,IAA3B,EAAiC;AAChCM,MAAAA,KAAK,EAAE,KADyB;AAEhCC,MAAAA,WAAW,EAAE,oBAAoBP;AAFD,KAAjC;AAKA,WAAO,4BAAC,OAAD;AAAS,MAAA,GAAG,EAAGK;AAAf,OAA0BD,KAA1B,EAAP;AACA,GAPiB,CAAlB;AASAF,EAAAA,cAAc,CAACM,OAAf,CAA0BC,UAAF,IAAkB;AACzCN,IAAAA,SAAS,CAAEM,UAAF,CAAT,GAA0BV,kBAAkB,CAC3CC,IAAI,GAAG,GAAP,GAAaS,UAD8B,EAE3CR,OAAO,CAAEQ,UAAF,CAFoC,CAA5C;AAIA,GALD;AAOA,SAAON,SAAP;AACA;;AAED,SAASO,iBAAT,CAA4BV,IAA5B,EAAkCW,IAAlC,EAAyC;AACxC,SAAO,CAAE,GAAGC,IAAL,KAAe;AACrB,6BAAY,eAAeZ,IAA3B,EAAiC;AAChCM,MAAAA,KAAK,EAAE,KADyB;AAEhCC,MAAAA,WAAW,EAAE,oBAAoBP;AAFD,KAA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AAqB,GAAG5F,iBAAiB,CACrD,uBADqD,EAErD6F,kCAFqD,CAA/C;;AAIA,MAAMC,iBAAiB,GAAG9F,iBAAiB,CACjD,mBADiD,EAEjD+F,8BAFiD,CAA3C;;AAIA,MAAMC,+BAA+B,GAAGhG,iBAAiB,CAC/D,iCAD+D,EAE/DiG,4CAF+D,CAAzD;;AAIA,MAAMC,0BAA0B,GAAGlG,iBAAiB,CAC1D,4BAD0D,EAE1DmG,uCAF0D,CAApD;;AAIA,MAAMC,WAAW,GAAGpG,iBAAiB,CAAE,aAAF,EAAiBqG,wBAAjB,CAArC;;AACA,MAAMC,gBAAgB,GAAGtG,iBAAiB,CAChD,kBADgD,EAEhDuG,6BAFgD,CAA1C;;AAIA,MAAMC,gBAAgB,GAAGxG,iBAAiB,CAChD,kBADgD,EAEhDyG,6BAFgD,CAA1C;;AAIA,MAAMC,UAAU,GAAG1G,iBAAiB,CAAE,YAAF,EAAgB2G,uBAAhB,CAApC;;AACA,MAAMC,aAAa,GAAG5G,iBAAiB,CAC7C,eAD6C,EAE7C6G,0BAF6C,CAAvC","sourcesContent":["// Block Creation Components\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\nimport {\n\tAutocomplete as RootAutocomplete,\n\tAlignmentToolbar as RootAlignmentToolbar,\n\tBlockAlignmentToolbar as RootBlockAlignmentToolbar,\n\tBlockControls as RootBlockControls,\n\tBlockEdit as RootBlockEdit,\n\tBlockEditorKeyboardShortcuts as RootBlockEditorKeyboardShortcuts,\n\tBlockFormatControls as RootBlockFormatControls,\n\tBlockIcon as RootBlockIcon,\n\tBlockInspector as RootBlockInspector,\n\tBlockList as RootBlockList,\n\tBlockMover as RootBlockMover,\n\tBlockNavigationDropdown as RootBlockNavigationDropdown,\n\tBlockSelectionClearer as RootBlockSelectionClearer,\n\tBlockSettingsMenu as RootBlockSettingsMenu,\n\tBlockTitle as RootBlockTitle,\n\tBlockToolbar as RootBlockToolbar,\n\tColorPalette as RootColorPalette,\n\tContrastChecker as RootContrastChecker,\n\tCopyHandler as RootCopyHandler,\n\tcreateCustomColorsHOC as rootCreateCustomColorsHOC,\n\tDefaultBlockAppender as RootDefaultBlockAppender,\n\tFontSizePicker as RootFontSizePicker,\n\tgetColorClassName as rootGetColorClassName,\n\tgetColorObjectByAttributeValues as rootGetColorObjectByAttributeValues,\n\tgetColorObjectByColorValue as rootGetColorObjectByColorValue,\n\tgetFontSize as rootGetFontSize,\n\tgetFontSizeClass as rootGetFontSizeClass,\n\tInserter as RootInserter,\n\tInnerBlocks as RootInnerBlocks,\n\tInspectorAdvancedControls as RootInspectorAdvancedControls,\n\tInspectorControls as RootInspectorControls,\n\tPanelColorSettings as RootPanelColorSettings,\n\tPlainText as RootPlainText,\n\tRichText as RootRichText,\n\tRichTextShortcut as RootRichTextShortcut,\n\tRichTextToolbarButton as RootRichTextToolbarButton,\n\t__unstableRichTextInputEvent as __unstableRootRichTextInputEvent,\n\tMediaPlaceholder as RootMediaPlaceholder,\n\tMediaUpload as RootMediaUpload,\n\tMediaUploadCheck as RootMediaUploadCheck,\n\tMultiSelectScrollIntoView as RootMultiSelectScrollIntoView,\n\tNavigableToolbar as RootNavigableToolbar,\n\tObserveTyping as RootObserveTyping,\n\tPreserveScrollInReorder as RootPreserveScrollInReorder,\n\tSkipToSelectedBlock as RootSkipToSelectedBlock,\n\tURLInput as RootURLInput,\n\tURLInputButton as RootURLInputButton,\n\tURLPopover as RootURLPopover,\n\tWarning as RootWarning,\n\tWritingFlow as RootWritingFlow,\n\twithColorContext as rootWithColorContext,\n\twithColors as rootWithColors,\n\twithFontSizes as rootWithFontSizes,\n} from '@wordpress/block-editor';\n\nexport { default as ServerSideRender } from '@wordpress/server-side-render';\n\nfunction deprecateComponent( name, Wrapped, staticsToHoist = [] ) {\n\tconst Component = forwardRef( ( props, ref ) => {\n\t\tdeprecated( 'wp.editor.' + name, {\n\t\t\tsince: '5.3',\n\t\t\talternative: 'wp.blockEditor.' + name,\n\t\t} );\n\n\t\treturn <Wrapped ref={ ref } { ...props } />;\n\t} );\n\n\tstaticsToHoist.forEach( ( staticName ) => {\n\t\tComponent[ staticName ] = deprecateComponent(\n\t\t\tname + '.' + staticName,\n\t\t\tWrapped[ staticName ]\n\t\t);\n\t} );\n\n\treturn Component;\n}\n\nfunction deprecateFunction( name, func ) {\n\treturn ( ...args ) => {\n\t\tdeprecated( 'wp.editor.' + name, {\n\t\t\tsince: '5.3',\n\t\t\talternative: 'wp.blockEditor.' + name,\n\t\t} );\n\n\t\treturn func( ...args );\n\t};\n}\n\nconst RichText = deprecateComponent( 'RichText', RootRichText, [ 'Content' ] );\nRichText.isEmpty = deprecateFunction(\n\t'RichText.isEmpty',\n\tRootRichText.isEmpty\n);\n\nexport { RichText };\nexport const Autocomplete = deprecateComponent(\n\t'Autocomplete',\n\tRootAutocomplete\n);\nexport const AlignmentToolbar = deprecateComponent(\n\t'AlignmentToolbar',\n\tRootAlignmentToolbar\n);\nexport const BlockAlignmentToolbar = deprecateComponent(\n\t'BlockAlignmentToolbar',\n\tRootBlockAlignmentToolbar\n);\nexport const BlockControls = deprecateComponent(\n\t'BlockControls',\n\tRootBlockControls,\n\t[ 'Slot' ]\n);\nexport const BlockEdit = deprecateComponent( 'BlockEdit', RootBlockEdit );\nexport const BlockEditorKeyboardShortcuts = deprecateComponent(\n\t'BlockEditorKeyboardShortcuts',\n\tRootBlockEditorKeyboardShortcuts\n);\nexport const BlockFormatControls = deprecateComponent(\n\t'BlockFormatControls',\n\tRootBlockFormatControls,\n\t[ 'Slot' ]\n);\nexport const BlockIcon = deprecateComponent( 'BlockIcon', RootBlockIcon );\nexport const BlockInspector = deprecateComponent(\n\t'BlockInspector',\n\tRootBlockInspector\n);\nexport const BlockList = deprecateComponent( 'BlockList', RootBlockList );\nexport const BlockMover = deprecateComponent( 'BlockMover', RootBlockMover );\nexport const BlockNavigationDropdown = deprecateComponent(\n\t'BlockNavigationDropdown',\n\tRootBlockNavigationDropdown\n);\nexport const BlockSelectionClearer = deprecateComponent(\n\t'BlockSelectionClearer',\n\tRootBlockSelectionClearer\n);\nexport const BlockSettingsMenu = deprecateComponent(\n\t'BlockSettingsMenu',\n\tRootBlockSettingsMenu\n);\nexport const BlockTitle = deprecateComponent( 'BlockTitle', RootBlockTitle );\nexport const BlockToolbar = deprecateComponent(\n\t'BlockToolbar',\n\tRootBlockToolbar\n);\nexport const ColorPalette = deprecateComponent(\n\t'ColorPalette',\n\tRootColorPalette\n);\nexport const ContrastChecker = deprecateComponent(\n\t'ContrastChecker',\n\tRootContrastChecker\n);\nexport const CopyHandler = deprecateComponent( 'CopyHandler', RootCopyHandler );\nexport const DefaultBlockAppender = deprecateComponent(\n\t'DefaultBlockAppender',\n\tRootDefaultBlockAppender\n);\nexport const FontSizePicker = deprecateComponent(\n\t'FontSizePicker',\n\tRootFontSizePicker\n);\nexport const Inserter = deprecateComponent( 'Inserter', RootInserter );\nexport const InnerBlocks = deprecateComponent( 'InnerBlocks', RootInnerBlocks, [\n\t'ButtonBlockAppender',\n\t'DefaultBlockAppender',\n\t'Content',\n] );\nexport const InspectorAdvancedControls = deprecateComponent(\n\t'InspectorAdvancedControls',\n\tRootInspectorAdvancedControls,\n\t[ 'Slot' ]\n);\nexport const InspectorControls = deprecateComponent(\n\t'InspectorControls',\n\tRootInspectorControls,\n\t[ 'Slot' ]\n);\nexport const PanelColorSettings = deprecateComponent(\n\t'PanelColorSettings',\n\tRootPanelColorSettings\n);\nexport const PlainText = deprecateComponent( 'PlainText', RootPlainText );\nexport const RichTextShortcut = deprecateComponent(\n\t'RichTextShortcut',\n\tRootRichTextShortcut\n);\nexport const RichTextToolbarButton = deprecateComponent(\n\t'RichTextToolbarButton',\n\tRootRichTextToolbarButton\n);\nexport const __unstableRichTextInputEvent = deprecateComponent(\n\t'__unstableRichTextInputEvent',\n\t__unstableRootRichTextInputEvent\n);\nexport const MediaPlaceholder = deprecateComponent(\n\t'MediaPlaceholder',\n\tRootMediaPlaceholder\n);\nexport const MediaUpload = deprecateComponent( 'MediaUpload', RootMediaUpload );\nexport const MediaUploadCheck = deprecateComponent(\n\t'MediaUploadCheck',\n\tRootMediaUploadCheck\n);\nexport const MultiSelectScrollIntoView = deprecateComponent(\n\t'MultiSelectScrollIntoView',\n\tRootMultiSelectScrollIntoView\n);\nexport const NavigableToolbar = deprecateComponent(\n\t'NavigableToolbar',\n\tRootNavigableToolbar\n);\nexport const ObserveTyping = deprecateComponent(\n\t'ObserveTyping',\n\tRootObserveTyping\n);\nexport const PreserveScrollInReorder = deprecateComponent(\n\t'PreserveScrollInReorder',\n\tRootPreserveScrollInReorder\n);\nexport const SkipToSelectedBlock = deprecateComponent(\n\t'SkipToSelectedBlock',\n\tRootSkipToSelectedBlock\n);\nexport const URLInput = deprecateComponent( 'URLInput', RootURLInput );\nexport const URLInputButton = deprecateComponent(\n\t'URLInputButton',\n\tRootURLInputButton\n);\nexport const URLPopover = deprecateComponent( 'URLPopover', RootURLPopover );\nexport const Warning = deprecateComponent( 'Warning', RootWarning );\nexport const WritingFlow = deprecateComponent( 'WritingFlow', RootWritingFlow );\n\nexport const createCustomColorsHOC = deprecateFunction(\n\t'createCustomColorsHOC',\n\trootCreateCustomColorsHOC\n);\nexport const getColorClassName = deprecateFunction(\n\t'getColorClassName',\n\trootGetColorClassName\n);\nexport const getColorObjectByAttributeValues = deprecateFunction(\n\t'getColorObjectByAttributeValues',\n\trootGetColorObjectByAttributeValues\n);\nexport const getColorObjectByColorValue = deprecateFunction(\n\t'getColorObjectByColorValue',\n\trootGetColorObjectByColorValue\n);\nexport const getFontSize = deprecateFunction( 'getFontSize', rootGetFontSize );\nexport const getFontSizeClass = deprecateFunction(\n\t'getFontSizeClass',\n\trootGetFontSizeClass\n);\nexport const withColorContext = deprecateFunction(\n\t'withColorContext',\n\trootWithColorContext\n);\nexport const withColors = deprecateFunction( 'withColors', rootWithColors );\nexport const withFontSizes = deprecateFunction(\n\t'withFontSizes',\n\trootWithFontSizes\n);\n"]}
|
|
1
|
+
{"version":3,"sources":["@wordpress/editor/src/components/deprecated.js"],"names":["deprecateComponent","name","Wrapped","staticsToHoist","Component","props","ref","since","alternative","forEach","staticName","deprecateFunction","func","RichText","RootRichText","isEmpty","Autocomplete","RootAutocomplete","AlignmentToolbar","RootAlignmentToolbar","BlockAlignmentToolbar","RootBlockAlignmentToolbar","BlockControls","RootBlockControls","BlockEdit","RootBlockEdit","BlockEditorKeyboardShortcuts","RootBlockEditorKeyboardShortcuts","BlockFormatControls","RootBlockFormatControls","BlockIcon","RootBlockIcon","BlockInspector","RootBlockInspector","BlockList","RootBlockList","BlockMover","RootBlockMover","BlockNavigationDropdown","RootBlockNavigationDropdown","BlockSelectionClearer","RootBlockSelectionClearer","BlockSettingsMenu","RootBlockSettingsMenu","BlockTitle","RootBlockTitle","BlockToolbar","RootBlockToolbar","ColorPalette","RootColorPalette","ContrastChecker","RootContrastChecker","CopyHandler","RootCopyHandler","DefaultBlockAppender","RootDefaultBlockAppender","FontSizePicker","RootFontSizePicker","Inserter","RootInserter","InnerBlocks","RootInnerBlocks","InspectorAdvancedControls","RootInspectorAdvancedControls","InspectorControls","RootInspectorControls","PanelColorSettings","RootPanelColorSettings","PlainText","RootPlainText","RichTextShortcut","RootRichTextShortcut","RichTextToolbarButton","RootRichTextToolbarButton","__unstableRichTextInputEvent","__unstableRootRichTextInputEvent","MediaPlaceholder","RootMediaPlaceholder","MediaUpload","RootMediaUpload","MediaUploadCheck","RootMediaUploadCheck","MultiSelectScrollIntoView","RootMultiSelectScrollIntoView","NavigableToolbar","RootNavigableToolbar","ObserveTyping","RootObserveTyping","PreserveScrollInReorder","RootPreserveScrollInReorder","SkipToSelectedBlock","RootSkipToSelectedBlock","URLInput","RootURLInput","URLInputButton","RootURLInputButton","URLPopover","RootURLPopover","Warning","RootWarning","WritingFlow","RootWritingFlow","createCustomColorsHOC","rootCreateCustomColorsHOC","getColorClassName","rootGetColorClassName","getColorObjectByAttributeValues","rootGetColorObjectByAttributeValues","getColorObjectByColorValue","rootGetColorObjectByColorValue","getFontSize","rootGetFontSize","getFontSizeClass","rootGetFontSizeClass","withColorContext","rootWithColorContext","withColors","rootWithColors","withFontSizes","rootWithFontSizes"],"mappings":";;;;;;;;;;;;;;;;AAKA;;;;AADA;;AAEA;;AAwDA;;AA9DA;;AACA;AACA;AACA;AA6DA,SAASA,kBAAT,CAA6BC,IAA7B,EAAmCC,OAAnC,EAAkE;AAAA,MAAtBC,cAAsB,uEAAL,EAAK;AACjE,QAAMC,SAAS,GAAG,yBAAY,CAAEC,KAAF,EAASC,GAAT,KAAkB;AAC/C,6BAAY,eAAeL,IAA3B,EAAiC;AAChCM,MAAAA,KAAK,EAAE,KADyB;AAEhCC,MAAAA,WAAW,EAAE,oBAAoBP;AAFD,KAAjC;AAKA,WAAO,4BAAC,OAAD;AAAS,MAAA,GAAG,EAAGK;AAAf,OAA0BD,KAA1B,EAAP;AACA,GAPiB,CAAlB;AASAF,EAAAA,cAAc,CAACM,OAAf,CAA0BC,UAAF,IAAkB;AACzCN,IAAAA,SAAS,CAAEM,UAAF,CAAT,GAA0BV,kBAAkB,CAC3CC,IAAI,GAAG,GAAP,GAAaS,UAD8B,EAE3CR,OAAO,CAAEQ,UAAF,CAFoC,CAA5C;AAIA,GALD;AAOA,SAAON,SAAP;AACA;;AAED,SAASO,iBAAT,CAA4BV,IAA5B,EAAkCW,IAAlC,EAAyC;AACxC,SAAO,YAAe;AACrB,6BAAY,eAAeX,IAA3B,EAAiC;AAChCM,MAAAA,KAAK,EAAE,KADyB;AAEhCC,MAAAA,WAAW,EAAE,oBAAoBP;AAFD,KAAjC;AAKA,WAAOW,IAAI,CAAE,YAAF,CAAX;AACA,GAPD;AAQA;;AAED,MAAMC,QAAQ,GAAGb,kBAAkB,CAAE,UAAF,EAAcc,qBAAd,EAA4B,CAAE,SAAF,CAA5B,CAAnC;;AACAD,QAAQ,CAACE,OAAT,GAAmBJ,iBAAiB,CACnC,kBADmC,EAEnCG,s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MAAMC,0BAA0B,GAAGjG,iBAAiB,CAC1D,4BAD0D,EAE1DkG,uCAF0D,CAApD;;AAIA,MAAMC,WAAW,GAAGnG,iBAAiB,CAAE,aAAF,EAAiBoG,wBAAjB,CAArC;;AACA,MAAMC,gBAAgB,GAAGrG,iBAAiB,CAChD,kBADgD,EAEhDsG,6BAFgD,CAA1C;;AAIA,MAAMC,gBAAgB,GAAGvG,iBAAiB,CAChD,kBADgD,EAEhDwG,6BAFgD,CAA1C;;AAIA,MAAMC,UAAU,GAAGzG,iBAAiB,CAAE,YAAF,EAAgB0G,uBAAhB,CAApC;;AACA,MAAMC,aAAa,GAAG3G,iBAAiB,CAC7C,eAD6C,EAE7C4G,0BAF6C,CAAvC","sourcesContent":["// Block Creation Components\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\nimport {\n\tAutocomplete as RootAutocomplete,\n\tAlignmentToolbar as RootAlignmentToolbar,\n\tBlockAlignmentToolbar as RootBlockAlignmentToolbar,\n\tBlockControls as RootBlockControls,\n\tBlockEdit as RootBlockEdit,\n\tBlockEditorKeyboardShortcuts as RootBlockEditorKeyboardShortcuts,\n\tBlockFormatControls as RootBlockFormatControls,\n\tBlockIcon as RootBlockIcon,\n\tBlockInspector as RootBlockInspector,\n\tBlockList as RootBlockList,\n\tBlockMover as RootBlockMover,\n\tBlockNavigationDropdown as RootBlockNavigationDropdown,\n\tBlockSelectionClearer as RootBlockSelectionClearer,\n\tBlockSettingsMenu as RootBlockSettingsMenu,\n\tBlockTitle as RootBlockTitle,\n\tBlockToolbar as RootBlockToolbar,\n\tColorPalette as RootColorPalette,\n\tContrastChecker as RootContrastChecker,\n\tCopyHandler as RootCopyHandler,\n\tcreateCustomColorsHOC as rootCreateCustomColorsHOC,\n\tDefaultBlockAppender as RootDefaultBlockAppender,\n\tFontSizePicker as RootFontSizePicker,\n\tgetColorClassName as rootGetColorClassName,\n\tgetColorObjectByAttributeValues as rootGetColorObjectByAttributeValues,\n\tgetColorObjectByColorValue as rootGetColorObjectByColorValue,\n\tgetFontSize as rootGetFontSize,\n\tgetFontSizeClass as rootGetFontSizeClass,\n\tInserter as RootInserter,\n\tInnerBlocks as RootInnerBlocks,\n\tInspectorAdvancedControls as RootInspectorAdvancedControls,\n\tInspectorControls as RootInspectorControls,\n\tPanelColorSettings as RootPanelColorSettings,\n\tPlainText as RootPlainText,\n\tRichText as RootRichText,\n\tRichTextShortcut as RootRichTextShortcut,\n\tRichTextToolbarButton as RootRichTextToolbarButton,\n\t__unstableRichTextInputEvent as __unstableRootRichTextInputEvent,\n\tMediaPlaceholder as RootMediaPlaceholder,\n\tMediaUpload as RootMediaUpload,\n\tMediaUploadCheck as RootMediaUploadCheck,\n\tMultiSelectScrollIntoView as RootMultiSelectScrollIntoView,\n\tNavigableToolbar as RootNavigableToolbar,\n\tObserveTyping as RootObserveTyping,\n\tPreserveScrollInReorder as RootPreserveScrollInReorder,\n\tSkipToSelectedBlock as RootSkipToSelectedBlock,\n\tURLInput as RootURLInput,\n\tURLInputButton as RootURLInputButton,\n\tURLPopover as RootURLPopover,\n\tWarning as RootWarning,\n\tWritingFlow as RootWritingFlow,\n\twithColorContext as rootWithColorContext,\n\twithColors as rootWithColors,\n\twithFontSizes as rootWithFontSizes,\n} from '@wordpress/block-editor';\n\nexport { default as ServerSideRender } from '@wordpress/server-side-render';\n\nfunction deprecateComponent( name, Wrapped, staticsToHoist = [] ) {\n\tconst Component = forwardRef( ( props, ref ) => {\n\t\tdeprecated( 'wp.editor.' + name, {\n\t\t\tsince: '5.3',\n\t\t\talternative: 'wp.blockEditor.' + name,\n\t\t} );\n\n\t\treturn <Wrapped ref={ ref } { ...props } />;\n\t} );\n\n\tstaticsToHoist.forEach( ( staticName ) => {\n\t\tComponent[ staticName ] = deprecateComponent(\n\t\t\tname + '.' + staticName,\n\t\t\tWrapped[ staticName ]\n\t\t);\n\t} );\n\n\treturn Component;\n}\n\nfunction deprecateFunction( name, func ) {\n\treturn ( ...args ) => {\n\t\tdeprecated( 'wp.editor.' + name, {\n\t\t\tsince: '5.3',\n\t\t\talternative: 'wp.blockEditor.' + name,\n\t\t} );\n\n\t\treturn func( ...args );\n\t};\n}\n\nconst RichText = deprecateComponent( 'RichText', RootRichText, [ 'Content' ] );\nRichText.isEmpty = deprecateFunction(\n\t'RichText.isEmpty',\n\tRootRichText.isEmpty\n);\n\nexport { RichText };\nexport const Autocomplete = deprecateComponent(\n\t'Autocomplete',\n\tRootAutocomplete\n);\nexport const AlignmentToolbar = deprecateComponent(\n\t'AlignmentToolbar',\n\tRootAlignmentToolbar\n);\nexport const BlockAlignmentToolbar = deprecateComponent(\n\t'BlockAlignmentToolbar',\n\tRootBlockAlignmentToolbar\n);\nexport const BlockControls = deprecateComponent(\n\t'BlockControls',\n\tRootBlockControls,\n\t[ 'Slot' ]\n);\nexport const BlockEdit = deprecateComponent( 'BlockEdit', RootBlockEdit );\nexport const BlockEditorKeyboardShortcuts = deprecateComponent(\n\t'BlockEditorKeyboardShortcuts',\n\tRootBlockEditorKeyboardShortcuts\n);\nexport const BlockFormatControls = deprecateComponent(\n\t'BlockFormatControls',\n\tRootBlockFormatControls,\n\t[ 'Slot' ]\n);\nexport const BlockIcon = deprecateComponent( 'BlockIcon', RootBlockIcon );\nexport const BlockInspector = deprecateComponent(\n\t'BlockInspector',\n\tRootBlockInspector\n);\nexport const BlockList = deprecateComponent( 'BlockList', RootBlockList );\nexport const BlockMover = deprecateComponent( 'BlockMover', RootBlockMover );\nexport const BlockNavigationDropdown = deprecateComponent(\n\t'BlockNavigationDropdown',\n\tRootBlockNavigationDropdown\n);\nexport const BlockSelectionClearer = deprecateComponent(\n\t'BlockSelectionClearer',\n\tRootBlockSelectionClearer\n);\nexport const BlockSettingsMenu = deprecateComponent(\n\t'BlockSettingsMenu',\n\tRootBlockSettingsMenu\n);\nexport const BlockTitle = deprecateComponent( 'BlockTitle', RootBlockTitle );\nexport const BlockToolbar = deprecateComponent(\n\t'BlockToolbar',\n\tRootBlockToolbar\n);\nexport const ColorPalette = deprecateComponent(\n\t'ColorPalette',\n\tRootColorPalette\n);\nexport const ContrastChecker = deprecateComponent(\n\t'ContrastChecker',\n\tRootContrastChecker\n);\nexport const CopyHandler = deprecateComponent( 'CopyHandler', RootCopyHandler );\nexport const DefaultBlockAppender = deprecateComponent(\n\t'DefaultBlockAppender',\n\tRootDefaultBlockAppender\n);\nexport const FontSizePicker = deprecateComponent(\n\t'FontSizePicker',\n\tRootFontSizePicker\n);\nexport const Inserter = deprecateComponent( 'Inserter', RootInserter );\nexport const InnerBlocks = deprecateComponent( 'InnerBlocks', RootInnerBlocks, [\n\t'ButtonBlockAppender',\n\t'DefaultBlockAppender',\n\t'Content',\n] );\nexport const InspectorAdvancedControls = deprecateComponent(\n\t'InspectorAdvancedControls',\n\tRootInspectorAdvancedControls,\n\t[ 'Slot' ]\n);\nexport const InspectorControls = deprecateComponent(\n\t'InspectorControls',\n\tRootInspectorControls,\n\t[ 'Slot' ]\n);\nexport const PanelColorSettings = deprecateComponent(\n\t'PanelColorSettings',\n\tRootPanelColorSettings\n);\nexport const PlainText = deprecateComponent( 'PlainText', RootPlainText );\nexport const RichTextShortcut = deprecateComponent(\n\t'RichTextShortcut',\n\tRootRichTextShortcut\n);\nexport const RichTextToolbarButton = deprecateComponent(\n\t'RichTextToolbarButton',\n\tRootRichTextToolbarButton\n);\nexport const __unstableRichTextInputEvent = deprecateComponent(\n\t'__unstableRichTextInputEvent',\n\t__unstableRootRichTextInputEvent\n);\nexport const MediaPlaceholder = deprecateComponent(\n\t'MediaPlaceholder',\n\tRootMediaPlaceholder\n);\nexport const MediaUpload = deprecateComponent( 'MediaUpload', RootMediaUpload );\nexport const MediaUploadCheck = deprecateComponent(\n\t'MediaUploadCheck',\n\tRootMediaUploadCheck\n);\nexport const MultiSelectScrollIntoView = deprecateComponent(\n\t'MultiSelectScrollIntoView',\n\tRootMultiSelectScrollIntoView\n);\nexport const NavigableToolbar = deprecateComponent(\n\t'NavigableToolbar',\n\tRootNavigableToolbar\n);\nexport const ObserveTyping = deprecateComponent(\n\t'ObserveTyping',\n\tRootObserveTyping\n);\nexport const PreserveScrollInReorder = deprecateComponent(\n\t'PreserveScrollInReorder',\n\tRootPreserveScrollInReorder\n);\nexport const SkipToSelectedBlock = deprecateComponent(\n\t'SkipToSelectedBlock',\n\tRootSkipToSelectedBlock\n);\nexport const URLInput = deprecateComponent( 'URLInput', RootURLInput );\nexport const URLInputButton = deprecateComponent(\n\t'URLInputButton',\n\tRootURLInputButton\n);\nexport const URLPopover = deprecateComponent( 'URLPopover', RootURLPopover );\nexport const Warning = deprecateComponent( 'Warning', RootWarning );\nexport const WritingFlow = deprecateComponent( 'WritingFlow', RootWritingFlow );\n\nexport const createCustomColorsHOC = deprecateFunction(\n\t'createCustomColorsHOC',\n\trootCreateCustomColorsHOC\n);\nexport const getColorClassName = deprecateFunction(\n\t'getColorClassName',\n\trootGetColorClassName\n);\nexport const getColorObjectByAttributeValues = deprecateFunction(\n\t'getColorObjectByAttributeValues',\n\trootGetColorObjectByAttributeValues\n);\nexport const getColorObjectByColorValue = deprecateFunction(\n\t'getColorObjectByColorValue',\n\trootGetColorObjectByColorValue\n);\nexport const getFontSize = deprecateFunction( 'getFontSize', rootGetFontSize );\nexport const getFontSizeClass = deprecateFunction(\n\t'getFontSizeClass',\n\trootGetFontSizeClass\n);\nexport const withColorContext = deprecateFunction(\n\t'withColorContext',\n\trootWithColorContext\n);\nexport const withColors = deprecateFunction( 'withColors', rootWithColors );\nexport const withFontSizes = deprecateFunction(\n\t'withFontSizes',\n\trootWithFontSizes\n);\n"]}
|
|
@@ -27,82 +27,82 @@ Object.defineProperty(exports, "DefaultBlockAppender", {
|
|
|
27
27
|
return _blockEditor.DefaultBlockAppender;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
Object.defineProperty(exports, "
|
|
30
|
+
Object.defineProperty(exports, "InspectorControls", {
|
|
31
31
|
enumerable: true,
|
|
32
32
|
get: function () {
|
|
33
|
-
return _blockEditor.
|
|
33
|
+
return _blockEditor.InspectorControls;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
Object.defineProperty(exports, "
|
|
36
|
+
Object.defineProperty(exports, "MediaPlaceholder", {
|
|
37
37
|
enumerable: true,
|
|
38
38
|
get: function () {
|
|
39
|
-
return _blockEditor.
|
|
39
|
+
return _blockEditor.MediaPlaceholder;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
Object.defineProperty(exports, "
|
|
42
|
+
Object.defineProperty(exports, "PlainText", {
|
|
43
43
|
enumerable: true,
|
|
44
44
|
get: function () {
|
|
45
|
-
return _blockEditor.
|
|
45
|
+
return _blockEditor.PlainText;
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
|
-
Object.defineProperty(exports, "
|
|
48
|
+
Object.defineProperty(exports, "RichText", {
|
|
49
49
|
enumerable: true,
|
|
50
50
|
get: function () {
|
|
51
|
-
return _blockEditor.
|
|
51
|
+
return _blockEditor.RichText;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
-
Object.defineProperty(exports, "
|
|
54
|
+
Object.defineProperty(exports, "RichTextInserterItem", {
|
|
55
55
|
enumerable: true,
|
|
56
56
|
get: function () {
|
|
57
|
-
return _blockEditor.
|
|
57
|
+
return _blockEditor.RichTextInserterItem;
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
|
-
Object.defineProperty(exports, "
|
|
60
|
+
Object.defineProperty(exports, "RichTextShortcut", {
|
|
61
61
|
enumerable: true,
|
|
62
62
|
get: function () {
|
|
63
|
-
return _blockEditor.
|
|
63
|
+
return _blockEditor.RichTextShortcut;
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
|
-
Object.defineProperty(exports, "
|
|
66
|
+
Object.defineProperty(exports, "RichTextToolbarButton", {
|
|
67
67
|
enumerable: true,
|
|
68
68
|
get: function () {
|
|
69
|
-
return _blockEditor.
|
|
69
|
+
return _blockEditor.RichTextToolbarButton;
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
|
-
Object.defineProperty(exports, "
|
|
72
|
+
Object.defineProperty(exports, "URLInput", {
|
|
73
73
|
enumerable: true,
|
|
74
74
|
get: function () {
|
|
75
|
-
return _blockEditor.
|
|
75
|
+
return _blockEditor.URLInput;
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
|
-
Object.defineProperty(exports, "
|
|
78
|
+
Object.defineProperty(exports, "__unstableRichTextInputEvent", {
|
|
79
79
|
enumerable: true,
|
|
80
80
|
get: function () {
|
|
81
|
-
return _blockEditor.
|
|
81
|
+
return _blockEditor.__unstableRichTextInputEvent;
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
|
-
Object.defineProperty(exports, "
|
|
84
|
+
Object.defineProperty(exports, "createCustomColorsHOC", {
|
|
85
85
|
enumerable: true,
|
|
86
86
|
get: function () {
|
|
87
|
-
return _blockEditor.
|
|
87
|
+
return _blockEditor.createCustomColorsHOC;
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
|
-
Object.defineProperty(exports, "
|
|
90
|
+
Object.defineProperty(exports, "getColorClassName", {
|
|
91
91
|
enumerable: true,
|
|
92
92
|
get: function () {
|
|
93
|
-
return _blockEditor.
|
|
93
|
+
return _blockEditor.getColorClassName;
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
|
-
Object.defineProperty(exports, "
|
|
96
|
+
Object.defineProperty(exports, "getColorObjectByAttributeValues", {
|
|
97
97
|
enumerable: true,
|
|
98
98
|
get: function () {
|
|
99
|
-
return _blockEditor.
|
|
99
|
+
return _blockEditor.getColorObjectByAttributeValues;
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
|
-
Object.defineProperty(exports, "
|
|
102
|
+
Object.defineProperty(exports, "getColorObjectByColorValue", {
|
|
103
103
|
enumerable: true,
|
|
104
104
|
get: function () {
|
|
105
|
-
return _blockEditor.
|
|
105
|
+
return _blockEditor.getColorObjectByColorValue;
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
108
|
Object.defineProperty(exports, "withColors", {
|
|
@@ -18,10 +18,11 @@ var _blockEditor = require("@wordpress/block-editor");
|
|
|
18
18
|
/**
|
|
19
19
|
* WordPress dependencies
|
|
20
20
|
*/
|
|
21
|
-
function DocumentOutlineCheck({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
function DocumentOutlineCheck(_ref) {
|
|
22
|
+
let {
|
|
23
|
+
blocks,
|
|
24
|
+
children
|
|
25
|
+
} = _ref;
|
|
25
26
|
const headings = (0, _lodash.filter)(blocks, block => block.name === 'core/heading');
|
|
26
27
|
|
|
27
28
|
if (headings.length < 1) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/editor/src/components/document-outline/check.js"],"names":["DocumentOutlineCheck","blocks","children","headings","block","name","length","select","blockEditorStore","getBlocks"],"mappings":";;;;;;;AAGA;;AAKA;;AACA;;AATA;AACA;AACA;;AAGA;AACA;AACA;AAIA,SAASA,oBAAT,
|
|
1
|
+
{"version":3,"sources":["@wordpress/editor/src/components/document-outline/check.js"],"names":["DocumentOutlineCheck","blocks","children","headings","block","name","length","select","blockEditorStore","getBlocks"],"mappings":";;;;;;;AAGA;;AAKA;;AACA;;AATA;AACA;AACA;;AAGA;AACA;AACA;AAIA,SAASA,oBAAT,OAAsD;AAAA,MAAvB;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,GAAuB;AACrD,QAAMC,QAAQ,GAAG,oBAChBF,MADgB,EAEdG,KAAF,IAAaA,KAAK,CAACC,IAAN,KAAe,cAFZ,CAAjB;;AAKA,MAAKF,QAAQ,CAACG,MAAT,GAAkB,CAAvB,EAA2B;AAC1B,WAAO,IAAP;AACA;;AAED,SAAOJ,QAAP;AACA;;eAEc,sBAAcK,MAAF,KAAgB;AAC1CN,EAAAA,MAAM,EAAEM,MAAM,CAAEC,kBAAF,CAAN,CAA2BC,SAA3B;AADkC,CAAhB,CAAZ,EAERT,oBAFQ,C","sourcesContent":["/**\n * External dependencies\n */\nimport { filter } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\nfunction DocumentOutlineCheck( { blocks, children } ) {\n\tconst headings = filter(\n\t\tblocks,\n\t\t( block ) => block.name === 'core/heading'\n\t);\n\n\tif ( headings.length < 1 ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default withSelect( ( select ) => ( {\n\tblocks: select( blockEditorStore ).getBlocks(),\n} ) )( DocumentOutlineCheck );\n"]}
|
|
@@ -68,8 +68,11 @@ const multipleH1Headings = [(0, _element.createElement)("br", {
|
|
|
68
68
|
* @return {Array} An array of heading blocks enhanced with the properties described above.
|
|
69
69
|
*/
|
|
70
70
|
|
|
71
|
-
const computeOutlineHeadings = (
|
|
72
|
-
|
|
71
|
+
const computeOutlineHeadings = function () {
|
|
72
|
+
let blocks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
73
|
+
return (0, _lodash.flatMap)(blocks, function () {
|
|
74
|
+
let block = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
75
|
+
|
|
73
76
|
if (block.name === 'core/heading') {
|
|
74
77
|
return { ...block,
|
|
75
78
|
level: block.attributes.level,
|
|
@@ -83,13 +86,14 @@ const computeOutlineHeadings = (blocks = []) => {
|
|
|
83
86
|
|
|
84
87
|
const isEmptyHeading = heading => !heading.attributes.content || heading.attributes.content.length === 0;
|
|
85
88
|
|
|
86
|
-
const DocumentOutline =
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
const DocumentOutline = _ref => {
|
|
90
|
+
let {
|
|
91
|
+
blocks = [],
|
|
92
|
+
title,
|
|
93
|
+
onSelect,
|
|
94
|
+
isTitleSupported,
|
|
95
|
+
hasOutlineItemsDisabled
|
|
96
|
+
} = _ref;
|
|
93
97
|
const headings = computeOutlineHeadings(blocks);
|
|
94
98
|
|
|
95
99
|
if (headings.length < 1) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/editor/src/components/document-outline/index.js"],"names":["emptyHeadingContent","incorrectLevelContent","singleH1Headings","multipleH1Headings","computeOutlineHeadings","blocks","block","name","level","attributes","isEmpty","isEmptyHeading","innerBlocks","heading","content","length","DocumentOutline","title","onSelect","isTitleSupported","hasOutlineItemsDisabled","headings","prevHeadingLevel","titleNode","document","querySelector","hasTitle","countByLevel","hasMultipleH1","id","map","item","index","isIncorrectLevel","isValid","clientId","html","select","getBlocks","blockEditorStore","getEditedPostAttribute","editorStore","getPostType","coreStore","postType"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AAnBA;AACA;AACA;;AAGA;AACA;AACA;;AAQA;AACA;AACA;;AAIA;AACA;AACA;AACA,MAAMA,mBAAmB,GAAG,wCAAM,cAAI,iBAAJ,CAAN,CAA5B;AACA,MAAMC,qBAAqB,GAAG,CAC7B;AAAI,EAAA,GAAG,EAAC;AAAR,EAD6B,EAE7B;AAAI,EAAA,GAAG,EAAC;AAAR,GAA8B,cAAI,2BAAJ,CAA9B,CAF6B,CAA9B;AAIA,MAAMC,gBAAgB,GAAG,CACxB;AAAI,EAAA,GAAG,EAAC;AAAR,EADwB,EAExB;AAAI,EAAA,GAAG,EAAC;AAAR,GACG,cAAI,sDAAJ,CADH,CAFwB,CAAzB;AAMA,MAAMC,kBAAkB,GAAG,CAC1B;AAAI,EAAA,GAAG,EAAC;AAAR,EAD0B,EAE1B;AAAI,EAAA,GAAG,EAAC;AAAR,GACG,cAAI,4CAAJ,CADH,CAF0B,CAA3B;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,sBAAsB,GAAG,
|
|
1
|
+
{"version":3,"sources":["@wordpress/editor/src/components/document-outline/index.js"],"names":["emptyHeadingContent","incorrectLevelContent","singleH1Headings","multipleH1Headings","computeOutlineHeadings","blocks","block","name","level","attributes","isEmpty","isEmptyHeading","innerBlocks","heading","content","length","DocumentOutline","title","onSelect","isTitleSupported","hasOutlineItemsDisabled","headings","prevHeadingLevel","titleNode","document","querySelector","hasTitle","countByLevel","hasMultipleH1","id","map","item","index","isIncorrectLevel","isValid","clientId","html","select","getBlocks","blockEditorStore","getEditedPostAttribute","editorStore","getPostType","coreStore","postType"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AAnBA;AACA;AACA;;AAGA;AACA;AACA;;AAQA;AACA;AACA;;AAIA;AACA;AACA;AACA,MAAMA,mBAAmB,GAAG,wCAAM,cAAI,iBAAJ,CAAN,CAA5B;AACA,MAAMC,qBAAqB,GAAG,CAC7B;AAAI,EAAA,GAAG,EAAC;AAAR,EAD6B,EAE7B;AAAI,EAAA,GAAG,EAAC;AAAR,GAA8B,cAAI,2BAAJ,CAA9B,CAF6B,CAA9B;AAIA,MAAMC,gBAAgB,GAAG,CACxB;AAAI,EAAA,GAAG,EAAC;AAAR,EADwB,EAExB;AAAI,EAAA,GAAG,EAAC;AAAR,GACG,cAAI,sDAAJ,CADH,CAFwB,CAAzB;AAMA,MAAMC,kBAAkB,GAAG,CAC1B;AAAI,EAAA,GAAG,EAAC;AAAR,EAD0B,EAE1B;AAAI,EAAA,GAAG,EAAC;AAAR,GACG,cAAI,4CAAJ,CADH,CAF0B,CAA3B;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,sBAAsB,GAAG,YAAmB;AAAA,MAAjBC,MAAiB,uEAAR,EAAQ;AACjD,SAAO,qBAASA,MAAT,EAAiB,YAAkB;AAAA,QAAhBC,KAAgB,uEAAR,EAAQ;;AACzC,QAAKA,KAAK,CAACC,IAAN,KAAe,cAApB,EAAqC;AACpC,aAAO,EACN,GAAGD,KADG;AAENE,QAAAA,KAAK,EAAEF,KAAK,CAACG,U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AAF,MAAkBL,MAAM,CAAEM,eAAF,CAA9B;AACA,QAAMC,QAAQ,GAAGF,WAAW,CAAEF,sBAAsB,CAAE,MAAF,CAAxB,CAA5B;AAEA,SAAO;AACNvB,IAAAA,KAAK,EAAEuB,sBAAsB,CAAE,OAAF,CADvB;AAENnC,IAAAA,MAAM,EAAEiC,SAAS,EAFX;AAGNnB,IAAAA,gBAAgB,EAAE,iBAAKyB,QAAL,EAAe,CAAE,UAAF,EAAc,OAAd,CAAf,EAAwC,KAAxC;AAHZ,GAAP;AAKA,CAXD,CADc,EAaZ5B,eAbY,C","sourcesContent":["/**\n * External dependencies\n */\nimport { countBy, flatMap, get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { compose } from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\nimport { create, getTextContent } from '@wordpress/rich-text';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport DocumentOutlineItem from './item';\nimport { store as editorStore } from '../../store';\n\n/**\n * Module constants\n */\nconst emptyHeadingContent = <em>{ __( '(Empty heading)' ) }</em>;\nconst incorrectLevelContent = [\n\t<br key=\"incorrect-break\" />,\n\t<em key=\"incorrect-message\">{ __( '(Incorrect heading level)' ) }</em>,\n];\nconst singleH1Headings = [\n\t<br key=\"incorrect-break-h1\" />,\n\t<em key=\"incorrect-message-h1\">\n\t\t{ __( '(Your theme may already use a H1 for the post title)' ) }\n\t</em>,\n];\nconst multipleH1Headings = [\n\t<br key=\"incorrect-break-multiple-h1\" />,\n\t<em key=\"incorrect-message-multiple-h1\">\n\t\t{ __( '(Multiple H1 headings are not recommended)' ) }\n\t</em>,\n];\n\n/**\n * Returns an array of heading blocks enhanced with the following properties:\n * level - An integer with the heading level.\n * isEmpty - Flag indicating if the heading has no content.\n *\n * @param {?Array} blocks An array of blocks.\n *\n * @return {Array} An array of heading blocks enhanced with the properties described above.\n */\nconst computeOutlineHeadings = ( blocks = [] ) => {\n\treturn flatMap( blocks, ( block = {} ) => {\n\t\tif ( block.name === 'core/heading' ) {\n\t\t\treturn {\n\t\t\t\t...block,\n\t\t\t\tlevel: block.attributes.level,\n\t\t\t\tisEmpty: isEmptyHeading( block ),\n\t\t\t};\n\t\t}\n\t\treturn computeOutlineHeadings( block.innerBlocks );\n\t} );\n};\n\nconst isEmptyHeading = ( heading ) =>\n\t! heading.attributes.content || heading.attributes.content.length === 0;\n\nexport const DocumentOutline = ( {\n\tblocks = [],\n\ttitle,\n\tonSelect,\n\tisTitleSupported,\n\thasOutlineItemsDisabled,\n} ) => {\n\tconst headings = computeOutlineHeadings( blocks );\n\n\tif ( headings.length < 1 ) {\n\t\treturn null;\n\t}\n\n\tlet prevHeadingLevel = 1;\n\n\t// Not great but it's the simplest way to locate the title right now.\n\tconst titleNode = document.querySelector( '.editor-post-title__input' );\n\tconst hasTitle = isTitleSupported && title && titleNode;\n\tconst countByLevel = countBy( headings, 'level' );\n\tconst hasMultipleH1 = countByLevel[ 1 ] > 1;\n\n\treturn (\n\t\t<div className=\"document-outline\">\n\t\t\t<ul>\n\t\t\t\t{ hasTitle && (\n\t\t\t\t\t<DocumentOutlineItem\n\t\t\t\t\t\tlevel={ __( 'Title' ) }\n\t\t\t\t\t\tisValid\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\thref={ `#${ titleNode.id }` }\n\t\t\t\t\t\tisDisabled={ hasOutlineItemsDisabled }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</DocumentOutlineItem>\n\t\t\t\t) }\n\t\t\t\t{ headings.map( ( item, index ) => {\n\t\t\t\t\t// Headings remain the same, go up by one, or down by any amount.\n\t\t\t\t\t// Otherwise there are missing levels.\n\t\t\t\t\tconst isIncorrectLevel = item.level > prevHeadingLevel + 1;\n\n\t\t\t\t\tconst isValid =\n\t\t\t\t\t\t! item.isEmpty &&\n\t\t\t\t\t\t! isIncorrectLevel &&\n\t\t\t\t\t\t!! item.level &&\n\t\t\t\t\t\t( item.level !== 1 ||\n\t\t\t\t\t\t\t( ! hasMultipleH1 && ! hasTitle ) );\n\t\t\t\t\tprevHeadingLevel = item.level;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<DocumentOutlineItem\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tlevel={ `H${ item.level }` }\n\t\t\t\t\t\t\tisValid={ isValid }\n\t\t\t\t\t\t\tisDisabled={ hasOutlineItemsDisabled }\n\t\t\t\t\t\t\thref={ `#block-${ item.clientId }` }\n\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ item.isEmpty\n\t\t\t\t\t\t\t\t? emptyHeadingContent\n\t\t\t\t\t\t\t\t: getTextContent(\n\t\t\t\t\t\t\t\t\t\tcreate( {\n\t\t\t\t\t\t\t\t\t\t\thtml: item.attributes.content,\n\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t ) }\n\t\t\t\t\t\t\t{ isIncorrectLevel && incorrectLevelContent }\n\t\t\t\t\t\t\t{ item.level === 1 &&\n\t\t\t\t\t\t\t\thasMultipleH1 &&\n\t\t\t\t\t\t\t\tmultipleH1Headings }\n\t\t\t\t\t\t\t{ hasTitle &&\n\t\t\t\t\t\t\t\titem.level === 1 &&\n\t\t\t\t\t\t\t\t! hasMultipleH1 &&\n\t\t\t\t\t\t\t\tsingleH1Headings }\n\t\t\t\t\t\t</DocumentOutlineItem>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</ul>\n\t\t</div>\n\t);\n};\n\nexport default compose(\n\twithSelect( ( select ) => {\n\t\tconst { getBlocks } = select( blockEditorStore );\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\t\tconst postType = getPostType( getEditedPostAttribute( 'type' ) );\n\n\t\treturn {\n\t\t\ttitle: getEditedPostAttribute( 'title' ),\n\t\t\tblocks: getBlocks(),\n\t\t\tisTitleSupported: get( postType, [ 'supports', 'title' ], false ),\n\t\t};\n\t} )\n)( DocumentOutline );\n"]}
|
|
@@ -14,28 +14,31 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
14
14
|
/**
|
|
15
15
|
* External dependencies
|
|
16
16
|
*/
|
|
17
|
-
const TableOfContentsItem =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
},
|
|
17
|
+
const TableOfContentsItem = _ref => {
|
|
18
|
+
let {
|
|
19
|
+
children,
|
|
20
|
+
isValid,
|
|
21
|
+
level,
|
|
22
|
+
href,
|
|
23
|
+
onSelect
|
|
24
|
+
} = _ref;
|
|
25
|
+
return (0, _element.createElement)("li", {
|
|
26
|
+
className: (0, _classnames.default)('document-outline__item', `is-${level.toLowerCase()}`, {
|
|
27
|
+
'is-invalid': !isValid
|
|
28
|
+
})
|
|
29
|
+
}, (0, _element.createElement)("a", {
|
|
30
|
+
href: href,
|
|
31
|
+
className: "document-outline__button",
|
|
32
|
+
onClick: onSelect
|
|
33
|
+
}, (0, _element.createElement)("span", {
|
|
34
|
+
className: "document-outline__emdash",
|
|
35
|
+
"aria-hidden": "true"
|
|
36
|
+
}), (0, _element.createElement)("strong", {
|
|
37
|
+
className: "document-outline__level"
|
|
38
|
+
}, level), (0, _element.createElement)("span", {
|
|
39
|
+
className: "document-outline__item-content"
|
|
40
|
+
}, children)));
|
|
41
|
+
};
|
|
39
42
|
|
|
40
43
|
var _default = TableOfContentsItem;
|
|
41
44
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/editor/src/components/document-outline/item.js"],"names":["TableOfContentsItem","children","isValid","level","href","onSelect","toLowerCase"],"mappings":";;;;;;;;;;;AAGA;;AAHA;AACA;AACA;AAGA,MAAMA,mBAAmB,GAAG,
|
|
1
|
+
{"version":3,"sources":["@wordpress/editor/src/components/document-outline/item.js"],"names":["TableOfContentsItem","children","isValid","level","href","onSelect","toLowerCase"],"mappings":";;;;;;;;;;;AAGA;;AAHA;AACA;AACA;AAGA,MAAMA,mBAAmB,GAAG;AAAA,MAAE;AAC7BC,IAAAA,QAD6B;AAE7BC,IAAAA,OAF6B;AAG7BC,IAAAA,KAH6B;AAI7BC,IAAAA,IAJ6B;AAK7BC,IAAAA;AAL6B,GAAF;AAAA,SAO3B;AACC,IAAA,SAAS,EAAG,yBACX,wBADW,EAEV,MAAMF,KAAK,CAACG,WAAN,EAAqB,EAFjB,EAGX;AACC,oBAAc,CAAEJ;AADjB,KAHW;AADb,KASC;AACC,IAAA,IAAI,EAAGE,IADR;AAEC,IAAA,SAAS,EAAC,0BAFX;AAGC,IAAA,OAAO,EAAGC;AAHX,KAKC;AACC,IAAA,SAAS,EAAC,0BADX;AAEC,mBAAY;AAFb,IALD,EASC;AAAQ,IAAA,SAAS,EAAC;AAAlB,KAA8CF,KAA9C,CATD,EAUC;AAAM,IAAA,SAAS,EAAC;AAAhB,KAAmDF,QAAnD,CAVD,CATD,CAP2B;AAAA,CAA5B;;eA+BeD,mB","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\nconst TableOfContentsItem = ( {\n\tchildren,\n\tisValid,\n\tlevel,\n\thref,\n\tonSelect,\n} ) => (\n\t<li\n\t\tclassName={ classnames(\n\t\t\t'document-outline__item',\n\t\t\t`is-${ level.toLowerCase() }`,\n\t\t\t{\n\t\t\t\t'is-invalid': ! isValid,\n\t\t\t}\n\t\t) }\n\t>\n\t\t<a\n\t\t\thref={ href }\n\t\t\tclassName=\"document-outline__button\"\n\t\t\tonClick={ onSelect }\n\t\t>\n\t\t\t<span\n\t\t\t\tclassName=\"document-outline__emdash\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t></span>\n\t\t\t<strong className=\"document-outline__level\">{ level }</strong>\n\t\t\t<span className=\"document-outline__item-content\">{ children }</span>\n\t\t</a>\n\t</li>\n);\n\nexport default TableOfContentsItem;\n"]}
|
|
@@ -30,10 +30,11 @@ var _style = _interopRequireDefault(require("./style.scss"));
|
|
|
30
30
|
/**
|
|
31
31
|
* Internal dependencies
|
|
32
32
|
*/
|
|
33
|
-
const HelpDetailNavigationScreen =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
const HelpDetailNavigationScreen = _ref => {
|
|
34
|
+
let {
|
|
35
|
+
content,
|
|
36
|
+
label
|
|
37
|
+
} = _ref;
|
|
37
38
|
const navigation = (0, _native.useNavigation)();
|
|
38
39
|
const {
|
|
39
40
|
listProps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/editor/src/components/editor-help/help-detail-navigation-screen.native.js"],"names":["HelpDetailNavigationScreen","content","label","navigation","listProps","BottomSheetContext","contentContainerStyle","StyleSheet","flatten","styles","container","goBack","paddingBottom","Math","max","safeAreaBottomInset","marginTop"],"mappings":";;;;;;;;;AAeA;;;;AAZA;;AAMA;;AAKA;;AAMA;;AApBA;AACA;AACA;;AASA;AACA;AACA;;AAIA;AACA;AACA;AAGA,MAAMA,0BAA0B,GAAG,
|
|
1
|
+
{"version":3,"sources":["@wordpress/editor/src/components/editor-help/help-detail-navigation-screen.native.js"],"names":["HelpDetailNavigationScreen","content","label","navigation","listProps","BottomSheetContext","contentContainerStyle","StyleSheet","flatten","styles","container","goBack","paddingBottom","Math","max","safeAreaBottomInset","marginTop"],"mappings":";;;;;;;;;AAeA;;;;AAZA;;AAMA;;AAKA;;AAMA;;AApBA;AACA;AACA;;AASA;AACA;AACA;;AAIA;AACA;AACA;AAGA,MAAMA,0BAA0B,GAAG,QAA0B;AAAA,MAAxB;AAAEC,IAAAA,OAAF;AAAWC,IAAAA;AAAX,GAAwB;AAC5D,QAAMC,UAAU,GAAG,4BAAnB;AAEA,QAAM;AAAEC,IAAAA;AAAF,MAAgB,yBAAYC,8BAAZ,CAAtB;;AACA,QAAMC,qBAAqB,GAAGC,wBAAWC,OAAX,CAC7BJ,SAAS,CAACE,qBADmB,CAA9B;;AAIA,SACC,4BAAC,uBAAD,CAAa,gBAAb;AAA8B,IAAA,YAAY,MAA1C;AAA2C,IAAA,UAAU;AAArD,KACC,4BAAC,iBAAD;AAAM,IAAA,KAAK,EAAGG,eAAOC;AAArB,KACC,4BAAC,uBAAD,CAAa,MAAb,QACC,4BAAC,uBAAD,CAAa,MAAb,CAAoB,UAApB;AACC,IAAA,OAAO,EAAGP,UAAU,CAACQ;AADtB,IADD,EAIC,4BAAC,uBAAD,CAAa,MAAb,CAAoB,OAApB,QACGT,KADH,CAJD,CADD,EASC,4BAAC,uBAAD,6BACME,SADN;AAEC,IAAA,qBAAqB,EAAG,EACvB,GAAGE,qBADoB;AAEvBM,MAAAA,aAAa,EAAEC,IAAI,CAACC,GAAL,CACdV,SAAS,CAACW,mBADI,EAEdT,qBAAqB,CAACM,aAFR,CAFQ;;AAMvB;AACN;AACA;AACA;AACA;AACMI,MAAAA,SAAS,EAAE;AAXY;AAFzB,MAgBC,4BAAC,qCAAD;AAA0B,IAAA,UAAU,EAAG;AAAvC,KACC,4BAAC,iBAAD,QAAQf,OAAR,CADD,CAhBD,CATD,CADD,CADD;AAkCA,CA1CD;;eA4CeD,0B","sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tScrollView,\n\tStyleSheet,\n\tTouchableWithoutFeedback,\n\tView,\n} from 'react-native';\nimport { useNavigation } from '@react-navigation/native';\n\n/**\n * WordPress dependencies\n */\nimport { BottomSheet, BottomSheetContext } from '@wordpress/components';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nconst HelpDetailNavigationScreen = ( { content, label } ) => {\n\tconst navigation = useNavigation();\n\n\tconst { listProps } = useContext( BottomSheetContext );\n\tconst contentContainerStyle = StyleSheet.flatten(\n\t\tlistProps.contentContainerStyle\n\t);\n\n\treturn (\n\t\t<BottomSheet.NavigationScreen isScrollable fullScreen>\n\t\t\t<View style={ styles.container }>\n\t\t\t\t<BottomSheet.NavBar>\n\t\t\t\t\t<BottomSheet.NavBar.BackButton\n\t\t\t\t\t\tonPress={ navigation.goBack }\n\t\t\t\t\t/>\n\t\t\t\t\t<BottomSheet.NavBar.Heading>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</BottomSheet.NavBar.Heading>\n\t\t\t\t</BottomSheet.NavBar>\n\t\t\t\t<ScrollView\n\t\t\t\t\t{ ...listProps }\n\t\t\t\t\tcontentContainerStyle={ {\n\t\t\t\t\t\t...contentContainerStyle,\n\t\t\t\t\t\tpaddingBottom: Math.max(\n\t\t\t\t\t\t\tlistProps.safeAreaBottomInset,\n\t\t\t\t\t\t\tcontentContainerStyle.paddingBottom\n\t\t\t\t\t\t),\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Remove margin set via `hideHeader`. Combining a header\n\t\t\t\t\t\t * and navigation in this bottom sheet is at odds with the\n\t\t\t\t\t\t * current `BottomSheet` implementation.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tmarginTop: 0,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<TouchableWithoutFeedback accessible={ false }>\n\t\t\t\t\t\t<View>{ content }</View>\n\t\t\t\t\t</TouchableWithoutFeedback>\n\t\t\t\t</ScrollView>\n\t\t\t</View>\n\t\t</BottomSheet.NavigationScreen>\n\t);\n};\n\nexport default HelpDetailNavigationScreen;\n"]}
|
|
@@ -26,10 +26,11 @@ var _style = _interopRequireDefault(require("./style.scss"));
|
|
|
26
26
|
/**
|
|
27
27
|
* Internal dependencies
|
|
28
28
|
*/
|
|
29
|
-
const HelpGetSupportButton =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
const HelpGetSupportButton = _ref => {
|
|
30
|
+
let {
|
|
31
|
+
onPress,
|
|
32
|
+
title
|
|
33
|
+
} = _ref;
|
|
33
34
|
const buttonStyle = (0, _compose.usePreferredColorSchemeStyle)(_style.default.button, _style.default.buttonDark);
|
|
34
35
|
const textStyle = (0, _compose.usePreferredColorSchemeStyle)(_style.default.buttonText, _style.default.buttonTextDark);
|
|
35
36
|
return (0, _element.createElement)(_reactNative.Pressable, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/editor/src/components/editor-help/help-get-support-button.native.js"],"names":["HelpGetSupportButton","onPress","title","buttonStyle","styles","button","buttonDark","textStyle","buttonText","buttonTextDark"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AAKA;;AAbA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AAGA,MAAMA,oBAAoB,GAAG,
|
|
1
|
+
{"version":3,"sources":["@wordpress/editor/src/components/editor-help/help-get-support-button.native.js"],"names":["HelpGetSupportButton","onPress","title","buttonStyle","styles","button","buttonDark","textStyle","buttonText","buttonTextDark"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AAKA;;AAbA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AAGA,MAAMA,oBAAoB,GAAG,QAA0B;AAAA,MAAxB;AAAEC,IAAAA,OAAF;AAAWC,IAAAA;AAAX,GAAwB;AACtD,QAAMC,WAAW,GAAG,2CACnBC,eAAOC,MADY,EAEnBD,eAAOE,UAFY,CAApB;AAKA,QAAMC,SAAS,GAAG,2CACjBH,eAAOI,UADU,EAEjBJ,eAAOK,cAFU,CAAlB;AAKA,SACC,4BAAC,sBAAD;AACC,IAAA,KAAK,EAAGN,WADT;AAEC,IAAA,OAAO,EAAGF,OAFX;AAGC,IAAA,iBAAiB,EAAG;AAHrB,KAKC,4BAAC,iBAAD;AAAM,IAAA,KAAK,EAAGM;AAAd,KAA4BL,KAA5B,CALD,CADD;AASA,CApBD;;eAsBeF,oB","sourcesContent":["/**\n * External dependencies\n */\nimport { Pressable, Text } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nconst HelpGetSupportButton = ( { onPress, title } ) => {\n\tconst buttonStyle = usePreferredColorSchemeStyle(\n\t\tstyles.button,\n\t\tstyles.buttonDark\n\t);\n\n\tconst textStyle = usePreferredColorSchemeStyle(\n\t\tstyles.buttonText,\n\t\tstyles.buttonTextDark\n\t);\n\n\treturn (\n\t\t<Pressable\n\t\t\tstyle={ buttonStyle }\n\t\t\tonPress={ onPress }\n\t\t\taccessibilityRole={ 'button' }\n\t\t>\n\t\t\t<Text style={ textStyle }>{ title }</Text>\n\t\t</Pressable>\n\t);\n};\n\nexport default HelpGetSupportButton;\n"]}
|
|
@@ -20,11 +20,12 @@ var _icons = require("@wordpress/icons");
|
|
|
20
20
|
/**
|
|
21
21
|
* WordPress dependencies
|
|
22
22
|
*/
|
|
23
|
-
const HelpTopicRow =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
const HelpTopicRow = _ref => {
|
|
24
|
+
let {
|
|
25
|
+
label,
|
|
26
|
+
icon,
|
|
27
|
+
screenName
|
|
28
|
+
} = _ref;
|
|
28
29
|
const navigation = (0, _native.useNavigation)();
|
|
29
30
|
|
|
30
31
|
const openSubSheet = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/editor/src/components/editor-help/help-topic-row.native.js"],"names":["HelpTopicRow","label","icon","screenName","navigation","openSubSheet","navigate","chevronRight"],"mappings":";;;;;;;;;AAGA;;AAKA;;AACA;;AATA;AACA;AACA;;AAGA;AACA;AACA;AAIA,MAAMA,YAAY,GAAG,
|
|
1
|
+
{"version":3,"sources":["@wordpress/editor/src/components/editor-help/help-topic-row.native.js"],"names":["HelpTopicRow","label","icon","screenName","navigation","openSubSheet","navigate","chevronRight"],"mappings":";;;;;;;;;AAGA;;AAKA;;AACA;;AATA;AACA;AACA;;AAGA;AACA;AACA;AAIA,MAAMA,YAAY,GAAG,QAAmC;AAAA,MAAjC;AAAEC,IAAAA,KAAF;AAASC,IAAAA,IAAT;AAAeC,IAAAA;AAAf,GAAiC;AACvD,QAAMC,UAAU,GAAG,4BAAnB;;AAEA,QAAMC,YAAY,GAAG,MAAM;AAC1BD,IAAAA,UAAU,CAACE,QAAX,CAAqBH,UAArB;AACA,GAFD;;AAIA,SACC,4BAAC,uBAAD;AACC,IAAA,aAAa,EAAC,YADf;AAEC,IAAA,kBAAkB,MAFnB;AAGC,IAAA,SAAS,MAHV;AAIC,IAAA,OAAO,EAAGE,YAJX;AAKC,IAAA,KAAK,EAAGJ,KALT;AAMC,IAAA,IAAI,EAAGC;AANR,KAQC,4BAAC,gBAAD;AAAM,IAAA,IAAI,EAAGK;AAAb,IARD,CADD;AAYA,CAnBD;;eAqBeP,Y","sourcesContent":["/**\n * External dependencies\n */\nimport { useNavigation } from '@react-navigation/native';\n\n/**\n * WordPress dependencies\n */\nimport { TextControl, Icon } from '@wordpress/components';\nimport { chevronRight } from '@wordpress/icons';\n\nconst HelpTopicRow = ( { label, icon, screenName } ) => {\n\tconst navigation = useNavigation();\n\n\tconst openSubSheet = () => {\n\t\tnavigation.navigate( screenName );\n\t};\n\n\treturn (\n\t\t<TextControl\n\t\t\tseparatorType=\"leftMargin\"\n\t\t\tcustomActionButton\n\t\t\tleftAlign\n\t\t\tonPress={ openSubSheet }\n\t\t\tlabel={ label }\n\t\t\ticon={ icon }\n\t\t>\n\t\t\t<Icon icon={ chevronRight } />\n\t\t</TextControl>\n\t);\n};\n\nexport default HelpTopicRow;\n"]}
|