@wordpress/editor 12.0.1 → 12.0.5
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 +7 -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 +23 -18
- 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 +30 -20
- package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
- package/build/components/entities-saved-states/index.js +51 -26
- 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 +155 -211
- 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.js +4 -2
- package/build/components/post-title/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/provider/use-block-editor-settings.js +1 -1
- package/build/components/provider/use-block-editor-settings.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 +7 -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 +23 -19
- 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 +31 -19
- package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
- package/build-module/components/entities-saved-states/index.js +50 -25
- 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 +157 -214
- 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.js +4 -2
- package/build-module/components/post-title/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/provider/use-block-editor-settings.js +1 -1
- package/build-module/components/provider/use-block-editor-settings.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/autosave-monitor/index.js +5 -0
- package/src/components/autosave-monitor/test/index.js +10 -4
- package/src/components/editor-help/index.native.js +116 -110
- package/src/components/entities-saved-states/entity-type-list.js +29 -10
- package/src/components/entities-saved-states/index.js +38 -8
- package/src/components/post-taxonomies/flat-term-selector.js +220 -254
- package/src/components/post-title/index.js +4 -2
- package/src/components/provider/use-block-editor-settings.js +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/editor",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.5",
|
|
4
4
|
"description": "Enhanced block editor for WordPress posts.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -30,35 +30,35 @@
|
|
|
30
30
|
"{src,build,build-module}/{index.js,store/index.js,hooks/**}"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@babel/runtime": "^7.
|
|
34
|
-
"@wordpress/a11y": "^3.2.
|
|
35
|
-
"@wordpress/api-fetch": "^5.2.
|
|
36
|
-
"@wordpress/autop": "^3.2.
|
|
37
|
-
"@wordpress/blob": "^3.2.
|
|
38
|
-
"@wordpress/block-editor": "^
|
|
39
|
-
"@wordpress/blocks": "^11.1.
|
|
40
|
-
"@wordpress/components": "^19.0.
|
|
41
|
-
"@wordpress/compose": "^5.0.
|
|
42
|
-
"@wordpress/core-data": "^4.0.
|
|
43
|
-
"@wordpress/data": "^6.1.
|
|
44
|
-
"@wordpress/data-controls": "^2.2.
|
|
45
|
-
"@wordpress/date": "^4.2.
|
|
46
|
-
"@wordpress/deprecated": "^3.2.
|
|
47
|
-
"@wordpress/element": "^4.0.
|
|
48
|
-
"@wordpress/hooks": "^3.2.
|
|
49
|
-
"@wordpress/html-entities": "^3.2.
|
|
50
|
-
"@wordpress/i18n": "^4.2.
|
|
51
|
-
"@wordpress/icons": "^6.
|
|
52
|
-
"@wordpress/is-shallow-equal": "^4.2.
|
|
53
|
-
"@wordpress/keyboard-shortcuts": "^3.0.
|
|
54
|
-
"@wordpress/keycodes": "^3.2.
|
|
55
|
-
"@wordpress/media-utils": "^3.0.
|
|
56
|
-
"@wordpress/notices": "^3.2.
|
|
57
|
-
"@wordpress/reusable-blocks": "^3.0.
|
|
58
|
-
"@wordpress/rich-text": "^5.0.
|
|
59
|
-
"@wordpress/server-side-render": "^3.0.
|
|
60
|
-
"@wordpress/url": "^3.
|
|
61
|
-
"@wordpress/wordcount": "^3.2.
|
|
33
|
+
"@babel/runtime": "^7.16.0",
|
|
34
|
+
"@wordpress/a11y": "^3.2.4",
|
|
35
|
+
"@wordpress/api-fetch": "^5.2.6",
|
|
36
|
+
"@wordpress/autop": "^3.2.3",
|
|
37
|
+
"@wordpress/blob": "^3.2.2",
|
|
38
|
+
"@wordpress/block-editor": "^8.0.2",
|
|
39
|
+
"@wordpress/blocks": "^11.1.4",
|
|
40
|
+
"@wordpress/components": "^19.0.2",
|
|
41
|
+
"@wordpress/compose": "^5.0.6",
|
|
42
|
+
"@wordpress/core-data": "^4.0.7",
|
|
43
|
+
"@wordpress/data": "^6.1.4",
|
|
44
|
+
"@wordpress/data-controls": "^2.2.7",
|
|
45
|
+
"@wordpress/date": "^4.2.3",
|
|
46
|
+
"@wordpress/deprecated": "^3.2.3",
|
|
47
|
+
"@wordpress/element": "^4.0.4",
|
|
48
|
+
"@wordpress/hooks": "^3.2.2",
|
|
49
|
+
"@wordpress/html-entities": "^3.2.3",
|
|
50
|
+
"@wordpress/i18n": "^4.2.4",
|
|
51
|
+
"@wordpress/icons": "^6.1.1",
|
|
52
|
+
"@wordpress/is-shallow-equal": "^4.2.1",
|
|
53
|
+
"@wordpress/keyboard-shortcuts": "^3.0.6",
|
|
54
|
+
"@wordpress/keycodes": "^3.2.4",
|
|
55
|
+
"@wordpress/media-utils": "^3.0.5",
|
|
56
|
+
"@wordpress/notices": "^3.2.7",
|
|
57
|
+
"@wordpress/reusable-blocks": "^3.0.8",
|
|
58
|
+
"@wordpress/rich-text": "^5.0.6",
|
|
59
|
+
"@wordpress/server-side-render": "^3.0.6",
|
|
60
|
+
"@wordpress/url": "^3.3.1",
|
|
61
|
+
"@wordpress/wordcount": "^3.2.3",
|
|
62
62
|
"classnames": "^2.3.1",
|
|
63
63
|
"lodash": "^4.17.21",
|
|
64
64
|
"memize": "^1.1.0",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "9a1dd3474d937468e4cf9caf9886ad61ef0a8f50"
|
|
72
72
|
}
|
|
@@ -42,6 +42,11 @@ export class AutosaveMonitor extends Component {
|
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
if ( this.props.interval !== prevProps.interval ) {
|
|
46
|
+
clearTimeout( this.timerId );
|
|
47
|
+
this.setAutosaveTimer();
|
|
48
|
+
}
|
|
49
|
+
|
|
45
50
|
if ( ! this.props.isDirty ) {
|
|
46
51
|
this.needsAutosave = false;
|
|
47
52
|
return;
|
|
@@ -36,6 +36,12 @@ describe( 'AutosaveMonitor', () => {
|
|
|
36
36
|
} );
|
|
37
37
|
|
|
38
38
|
describe( '#componentDidUpdate()', () => {
|
|
39
|
+
it( 'should clear and restart autosave timer when the interval changes', () => {
|
|
40
|
+
wrapper.setProps( { interval: 999 } );
|
|
41
|
+
expect( clearTimeout ).toHaveBeenCalled();
|
|
42
|
+
expect( setAutosaveTimerSpy ).toHaveBeenCalledTimes( 2 );
|
|
43
|
+
} );
|
|
44
|
+
|
|
39
45
|
it( 'should set needsAutosave=true when editReference changes', () => {
|
|
40
46
|
expect( wrapper.instance().needsAutosave ).toBe( false );
|
|
41
47
|
wrapper.setProps( {
|
|
@@ -95,9 +101,9 @@ describe( 'AutosaveMonitor', () => {
|
|
|
95
101
|
isAutosaveable: true,
|
|
96
102
|
interval: 5,
|
|
97
103
|
} );
|
|
98
|
-
expect( setAutosaveTimerSpy ).toHaveBeenCalledTimes( 1 );
|
|
99
|
-
wrapper.instance().autosaveTimerHandler();
|
|
100
104
|
expect( setAutosaveTimerSpy ).toHaveBeenCalledTimes( 2 );
|
|
105
|
+
wrapper.instance().autosaveTimerHandler();
|
|
106
|
+
expect( setAutosaveTimerSpy ).toHaveBeenCalledTimes( 3 );
|
|
101
107
|
expect( setTimeout ).lastCalledWith( expect.any( Function ), 5000 );
|
|
102
108
|
} );
|
|
103
109
|
|
|
@@ -106,9 +112,9 @@ describe( 'AutosaveMonitor', () => {
|
|
|
106
112
|
isAutosaveable: false,
|
|
107
113
|
interval: 5,
|
|
108
114
|
} );
|
|
109
|
-
expect( setAutosaveTimerSpy ).toHaveBeenCalledTimes( 1 );
|
|
110
|
-
wrapper.instance().autosaveTimerHandler();
|
|
111
115
|
expect( setAutosaveTimerSpy ).toHaveBeenCalledTimes( 2 );
|
|
116
|
+
wrapper.instance().autosaveTimerHandler();
|
|
117
|
+
expect( setAutosaveTimerSpy ).toHaveBeenCalledTimes( 3 );
|
|
112
118
|
expect( setTimeout ).lastCalledWith( expect.any( Function ), 1000 );
|
|
113
119
|
} );
|
|
114
120
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { kebabCase } from 'lodash';
|
|
5
|
-
import { Text, ScrollView, StyleSheet, View } from 'react-native';
|
|
5
|
+
import { Text, SafeAreaView, ScrollView, StyleSheet, View } from 'react-native';
|
|
6
6
|
import { TransitionPresets } from '@react-navigation/stack';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -86,119 +86,125 @@ function EditorHelpTopics( { close, isVisible, onClose } ) {
|
|
|
86
86
|
contentStyle={ styles.contentContainer }
|
|
87
87
|
testID="editor-help-modal"
|
|
88
88
|
>
|
|
89
|
-
<
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
<BottomSheet.NavigationScreen
|
|
95
|
-
isScrollable
|
|
96
|
-
fullScreen
|
|
97
|
-
name="help-topics"
|
|
89
|
+
<SafeAreaView>
|
|
90
|
+
<BottomSheet.NavigationContainer
|
|
91
|
+
animate
|
|
92
|
+
main
|
|
93
|
+
style={ styles.navigationContainer }
|
|
98
94
|
>
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
<BottomSheet.NavBar
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
contentContainerStyle
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
( { label, icon } ) => {
|
|
138
|
-
const labelSlug = kebabCase(
|
|
139
|
-
label
|
|
140
|
-
);
|
|
141
|
-
return (
|
|
142
|
-
<HelpTopicRow
|
|
143
|
-
key={ labelSlug }
|
|
144
|
-
label={ label }
|
|
145
|
-
icon={ icon }
|
|
146
|
-
screenName={
|
|
147
|
-
labelSlug
|
|
148
|
-
}
|
|
149
|
-
/>
|
|
150
|
-
);
|
|
151
|
-
}
|
|
152
|
-
) }
|
|
153
|
-
{
|
|
95
|
+
<BottomSheet.NavigationScreen
|
|
96
|
+
isScrollable
|
|
97
|
+
fullScreen
|
|
98
|
+
name="help-topics"
|
|
99
|
+
>
|
|
100
|
+
<View style={ styles.container }>
|
|
101
|
+
<BottomSheet.NavBar>
|
|
102
|
+
<BottomSheet.NavBar.DismissButton
|
|
103
|
+
onPress={ close }
|
|
104
|
+
iosText={ __( 'Close' ) }
|
|
105
|
+
/>
|
|
106
|
+
<BottomSheet.NavBar.Heading>
|
|
107
|
+
{ title }
|
|
108
|
+
</BottomSheet.NavBar.Heading>
|
|
109
|
+
</BottomSheet.NavBar>
|
|
110
|
+
<BottomSheetConsumer>
|
|
111
|
+
{ ( { listProps } ) => {
|
|
112
|
+
const contentContainerStyle = StyleSheet.flatten(
|
|
113
|
+
listProps.contentContainerStyle
|
|
114
|
+
);
|
|
115
|
+
return (
|
|
116
|
+
<ScrollView
|
|
117
|
+
{ ...listProps }
|
|
118
|
+
contentContainerStyle={ {
|
|
119
|
+
...contentContainerStyle,
|
|
120
|
+
paddingBottom: Math.max(
|
|
121
|
+
listProps.safeAreaBottomInset,
|
|
122
|
+
contentContainerStyle.paddingBottom
|
|
123
|
+
),
|
|
124
|
+
/**
|
|
125
|
+
* Remove margin set via `hideHeader`. Combining a header
|
|
126
|
+
* and navigation in this bottom sheet is at odds with the
|
|
127
|
+
* current `BottomSheet` implementation.
|
|
128
|
+
*/
|
|
129
|
+
marginTop: 0,
|
|
130
|
+
} }
|
|
131
|
+
>
|
|
132
|
+
<PanelBody>
|
|
154
133
|
<Text style={ sectionTitle }>
|
|
155
|
-
{ __( '
|
|
134
|
+
{ __( 'The basics' ) }
|
|
156
135
|
</Text>
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
136
|
+
{ /* Print out help topics */ }
|
|
137
|
+
{ HELP_TOPICS.map(
|
|
138
|
+
( { label, icon } ) => {
|
|
139
|
+
const labelSlug = kebabCase(
|
|
140
|
+
label
|
|
141
|
+
);
|
|
142
|
+
return (
|
|
143
|
+
<HelpTopicRow
|
|
144
|
+
key={
|
|
145
|
+
labelSlug
|
|
146
|
+
}
|
|
147
|
+
label={ label }
|
|
148
|
+
icon={ icon }
|
|
149
|
+
screenName={
|
|
150
|
+
labelSlug
|
|
151
|
+
}
|
|
152
|
+
/>
|
|
153
|
+
);
|
|
165
154
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
'
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
155
|
+
) }
|
|
156
|
+
{
|
|
157
|
+
<Text
|
|
158
|
+
style={ sectionTitle }
|
|
159
|
+
>
|
|
160
|
+
{ __( 'Get support' ) }
|
|
161
|
+
</Text>
|
|
162
|
+
}
|
|
163
|
+
{
|
|
164
|
+
<HelpGetSupportButton
|
|
165
|
+
title={ __(
|
|
166
|
+
'Contact support'
|
|
167
|
+
) }
|
|
168
|
+
onPress={
|
|
169
|
+
requestContactCustomerSupport
|
|
170
|
+
}
|
|
171
|
+
/>
|
|
172
|
+
}
|
|
173
|
+
{
|
|
174
|
+
<HelpGetSupportButton
|
|
175
|
+
title={ __(
|
|
176
|
+
'More support options'
|
|
177
|
+
) }
|
|
178
|
+
onPress={
|
|
179
|
+
requestGotoCustomerSupportOptions
|
|
180
|
+
}
|
|
181
|
+
/>
|
|
182
|
+
}
|
|
183
|
+
</PanelBody>
|
|
184
|
+
</ScrollView>
|
|
185
|
+
);
|
|
186
|
+
} }
|
|
187
|
+
</BottomSheetConsumer>
|
|
188
|
+
</View>
|
|
189
|
+
</BottomSheet.NavigationScreen>
|
|
190
|
+
{ /* Print out help detail screens */ }
|
|
191
|
+
{ HELP_TOPICS.map( ( { view, label } ) => {
|
|
192
|
+
const labelSlug = kebabCase( label );
|
|
193
|
+
return (
|
|
194
|
+
<HelpDetailNavigationScreen
|
|
195
|
+
key={ labelSlug }
|
|
196
|
+
name={ labelSlug }
|
|
197
|
+
content={ view }
|
|
198
|
+
label={ label }
|
|
199
|
+
options={ {
|
|
200
|
+
gestureEnabled: true,
|
|
201
|
+
...TransitionPresets.DefaultTransition,
|
|
202
|
+
} }
|
|
203
|
+
/>
|
|
204
|
+
);
|
|
205
|
+
} ) }
|
|
206
|
+
</BottomSheet.NavigationContainer>
|
|
207
|
+
</SafeAreaView>
|
|
202
208
|
</BottomSheet>
|
|
203
209
|
);
|
|
204
210
|
}
|
|
@@ -6,9 +6,9 @@ import { some } from 'lodash';
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
|
+
import { __, _n } from '@wordpress/i18n';
|
|
9
10
|
import { useSelect } from '@wordpress/data';
|
|
10
|
-
import { PanelBody } from '@wordpress/components';
|
|
11
|
-
import { page, layout } from '@wordpress/icons';
|
|
11
|
+
import { PanelBody, PanelRow } from '@wordpress/components';
|
|
12
12
|
import { store as coreStore } from '@wordpress/core-data';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -16,10 +16,25 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
16
16
|
*/
|
|
17
17
|
import EntityRecordItem from './entity-record-item';
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
function getEntityDescription( entity, length ) {
|
|
20
|
+
switch ( entity ) {
|
|
21
|
+
case 'site':
|
|
22
|
+
return _n(
|
|
23
|
+
'This change will affect your whole site.',
|
|
24
|
+
'These changes will affect your whole site.',
|
|
25
|
+
length
|
|
26
|
+
);
|
|
27
|
+
case 'wp_template':
|
|
28
|
+
return _n(
|
|
29
|
+
'This change will affect pages and posts that use this template.',
|
|
30
|
+
'These changes will affect pages and posts that use these templates.',
|
|
31
|
+
length
|
|
32
|
+
);
|
|
33
|
+
case 'page':
|
|
34
|
+
case 'post':
|
|
35
|
+
return __( 'The following content has been modified.' );
|
|
36
|
+
}
|
|
37
|
+
}
|
|
23
38
|
|
|
24
39
|
export default function EntityTypeList( {
|
|
25
40
|
list,
|
|
@@ -33,13 +48,17 @@ export default function EntityTypeList( {
|
|
|
33
48
|
select( coreStore ).getEntity( firstRecord.kind, firstRecord.name ),
|
|
34
49
|
[ firstRecord.kind, firstRecord.name ]
|
|
35
50
|
);
|
|
36
|
-
|
|
37
|
-
// Set icon based on type of entity.
|
|
38
51
|
const { name } = firstRecord;
|
|
39
|
-
const
|
|
52
|
+
const entityLabel =
|
|
53
|
+
name === 'wp_template_part'
|
|
54
|
+
? _n( 'Template Part', 'Template Parts', list.length )
|
|
55
|
+
: entity.label;
|
|
56
|
+
// Set description based on type of entity.
|
|
57
|
+
const description = getEntityDescription( name, list.length );
|
|
40
58
|
|
|
41
59
|
return (
|
|
42
|
-
<PanelBody title={
|
|
60
|
+
<PanelBody title={ entityLabel } initialOpen={ true }>
|
|
61
|
+
{ description && <PanelRow>{ description }</PanelRow> }
|
|
43
62
|
{ list.map( ( record ) => {
|
|
44
63
|
return (
|
|
45
64
|
<EntityRecordItem
|
|
@@ -19,7 +19,7 @@ import { close as closeIcon } from '@wordpress/icons';
|
|
|
19
19
|
*/
|
|
20
20
|
import EntityTypeList from './entity-type-list';
|
|
21
21
|
|
|
22
|
-
const
|
|
22
|
+
const TRANSLATED_SITE_PROPERTIES = {
|
|
23
23
|
title: __( 'Title' ),
|
|
24
24
|
description: __( 'Tagline' ),
|
|
25
25
|
site_logo: __( 'Logo' ),
|
|
@@ -27,6 +27,13 @@ const TRANSLATED_SITE_PROTPERTIES = {
|
|
|
27
27
|
page_on_front: __( 'Page on front' ),
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
+
const PUBLISH_ON_SAVE_ENTITIES = [
|
|
31
|
+
{
|
|
32
|
+
kind: 'postType',
|
|
33
|
+
name: 'wp_navigation',
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
|
|
30
37
|
export default function EntitiesSavedStates( { close } ) {
|
|
31
38
|
const saveButtonRef = useRef();
|
|
32
39
|
const { dirtyEntityRecords } = useSelect( ( select ) => {
|
|
@@ -49,7 +56,7 @@ export default function EntitiesSavedStates( { close } ) {
|
|
|
49
56
|
siteEditsAsEntities.push( {
|
|
50
57
|
kind: 'root',
|
|
51
58
|
name: 'site',
|
|
52
|
-
title:
|
|
59
|
+
title: TRANSLATED_SITE_PROPERTIES[ property ] || property,
|
|
53
60
|
property,
|
|
54
61
|
} );
|
|
55
62
|
}
|
|
@@ -63,14 +70,27 @@ export default function EntitiesSavedStates( { close } ) {
|
|
|
63
70
|
};
|
|
64
71
|
}, [] );
|
|
65
72
|
const {
|
|
73
|
+
editEntityRecord,
|
|
66
74
|
saveEditedEntityRecord,
|
|
67
75
|
__experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits,
|
|
68
76
|
} = useDispatch( coreStore );
|
|
69
77
|
|
|
70
78
|
// To group entities by type.
|
|
71
|
-
const partitionedSavables =
|
|
72
|
-
|
|
73
|
-
|
|
79
|
+
const partitionedSavables = groupBy( dirtyEntityRecords, 'name' );
|
|
80
|
+
|
|
81
|
+
// Sort entity groups.
|
|
82
|
+
const {
|
|
83
|
+
site: siteSavables,
|
|
84
|
+
wp_template: templateSavables,
|
|
85
|
+
wp_template_part: templatePartSavables,
|
|
86
|
+
...contentSavables
|
|
87
|
+
} = partitionedSavables;
|
|
88
|
+
const sortedPartitionedSavables = [
|
|
89
|
+
siteSavables,
|
|
90
|
+
templateSavables,
|
|
91
|
+
templatePartSavables,
|
|
92
|
+
...Object.values( contentSavables ),
|
|
93
|
+
].filter( Array.isArray );
|
|
74
94
|
|
|
75
95
|
// Unchecked entities to be ignored by save function.
|
|
76
96
|
const [ unselectedEntities, _setUnselectedEntities ] = useState( [] );
|
|
@@ -118,6 +138,16 @@ export default function EntitiesSavedStates( { close } ) {
|
|
|
118
138
|
if ( 'root' === kind && 'site' === name ) {
|
|
119
139
|
siteItemsToSave.push( property );
|
|
120
140
|
} else {
|
|
141
|
+
if (
|
|
142
|
+
PUBLISH_ON_SAVE_ENTITIES.some(
|
|
143
|
+
( typeToPublish ) =>
|
|
144
|
+
typeToPublish.kind === kind &&
|
|
145
|
+
typeToPublish.name === name
|
|
146
|
+
)
|
|
147
|
+
) {
|
|
148
|
+
editEntityRecord( kind, name, key, { status: 'publish' } );
|
|
149
|
+
}
|
|
150
|
+
|
|
121
151
|
saveEditedEntityRecord( kind, name, key );
|
|
122
152
|
}
|
|
123
153
|
} );
|
|
@@ -160,15 +190,15 @@ export default function EntitiesSavedStates( { close } ) {
|
|
|
160
190
|
</div>
|
|
161
191
|
|
|
162
192
|
<div className="entities-saved-states__text-prompt">
|
|
163
|
-
<strong>{ __( '
|
|
193
|
+
<strong>{ __( 'Are you ready to save?' ) }</strong>
|
|
164
194
|
<p>
|
|
165
195
|
{ __(
|
|
166
|
-
'
|
|
196
|
+
'The following changes have been made to your site, templates, and content.'
|
|
167
197
|
) }
|
|
168
198
|
</p>
|
|
169
199
|
</div>
|
|
170
200
|
|
|
171
|
-
{
|
|
201
|
+
{ sortedPartitionedSavables.map( ( list ) => {
|
|
172
202
|
return (
|
|
173
203
|
<EntityTypeList
|
|
174
204
|
key={ list[ 0 ].name }
|