@wordpress/editor 12.0.1 → 12.0.2

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.
Files changed (37) hide show
  1. package/build/components/autosave-monitor/index.js +5 -0
  2. package/build/components/autosave-monitor/index.js.map +1 -1
  3. package/build/components/editor-help/index.native.js +2 -2
  4. package/build/components/editor-help/index.native.js.map +1 -1
  5. package/build/components/entities-saved-states/entity-type-list.js +22 -13
  6. package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
  7. package/build/components/entities-saved-states/index.js +23 -4
  8. package/build/components/entities-saved-states/index.js.map +1 -1
  9. package/build/components/post-taxonomies/flat-term-selector.js +154 -211
  10. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  11. package/build/components/post-title/index.js +4 -2
  12. package/build/components/post-title/index.js.map +1 -1
  13. package/build/components/provider/use-block-editor-settings.js +1 -1
  14. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  15. package/build-module/components/autosave-monitor/index.js +5 -0
  16. package/build-module/components/autosave-monitor/index.js.map +1 -1
  17. package/build-module/components/editor-help/index.native.js +3 -3
  18. package/build-module/components/editor-help/index.native.js.map +1 -1
  19. package/build-module/components/entities-saved-states/entity-type-list.js +24 -13
  20. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  21. package/build-module/components/entities-saved-states/index.js +23 -4
  22. package/build-module/components/entities-saved-states/index.js.map +1 -1
  23. package/build-module/components/post-taxonomies/flat-term-selector.js +156 -214
  24. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  25. package/build-module/components/post-title/index.js +4 -2
  26. package/build-module/components/post-title/index.js.map +1 -1
  27. package/build-module/components/provider/use-block-editor-settings.js +1 -1
  28. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  29. package/package.json +18 -18
  30. package/src/components/autosave-monitor/index.js +5 -0
  31. package/src/components/autosave-monitor/test/index.js +10 -4
  32. package/src/components/editor-help/index.native.js +116 -110
  33. package/src/components/entities-saved-states/entity-type-list.js +29 -10
  34. package/src/components/entities-saved-states/index.js +38 -8
  35. package/src/components/post-taxonomies/flat-term-selector.js +220 -254
  36. package/src/components/post-title/index.js +4 -2
  37. package/src/components/provider/use-block-editor-settings.js +0 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/provider/use-block-editor-settings.js"],"names":["pick","defaultTo","Platform","useMemo","useDispatch","useSelect","store","coreStore","__experimentalFetchLinkSuggestions","fetchLinkSuggestions","__experimentalFetchUrlData","fetchUrlData","__","mediaUpload","editorStore","useBlockEditorSettings","settings","hasTemplate","reusableBlocks","hasUploadPermissions","canUseUnfilteredHTML","userCanCreatePages","select","canUserUseUnfilteredHTML","isWeb","OS","canUser","getUnstableBase","hasFinishedResolution","siteData","hasFinishedResolvingSiteData","getEntityRecords","per_page","hasResolvedLocalSiteData","baseUrl","url","undo","saveEntityRecord","createPageEntity","options","Promise","reject","message","undefined","__experimentalReusableBlocks","search","searchOptions","__experimentalFetchRichUrlData","__experimentalCanUserUseUnfilteredHTML","__experimentalUndo","outlineMode","__experimentalCreatePageEntity","__experimentalUserCanCreatePages"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAT,EAAeC,SAAf,QAAgC,QAAhC;AAEA;AACA;AACA;;AACA,SAASC,QAAT,EAAmBC,OAAnB,QAAkC,oBAAlC;AACA,SAASC,WAAT,EAAsBC,SAAtB,QAAuC,iBAAvC;AACA,SACCC,KAAK,IAAIC,SADV,EAECC,kCAAkC,IAAIC,oBAFvC,EAGCC,0BAA0B,IAAIC,YAH/B,QAIO,sBAJP;AAKA,SAASC,EAAT,QAAmB,iBAAnB;AAEA;AACA;AACA;;AACA,SAASC,WAAT,QAA4B,aAA5B;AACA,SAASP,KAAK,IAAIQ,WAAlB,QAAqC,aAArC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,sBAAT,CAAiCC,QAAjC,EAA2CC,WAA3C,EAAyD;AACxD,QAAM;AACLC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9CzB;AA+CPqC,IAAAA,sCAAsC,EAAE5B,oBA/CjC;AAgDP6B,IAAAA,kBAAkB,EAAEb,IAhDb;AAiDPc,IAAAA,WAAW,EAAEjC,WAjDN;AAkDPkC,IAAAA,8BAA8B,EAAEb,gBAlDzB;AAmDPc,IAAAA,gCAAgC,EAAE/B;AAnD3B,GAAR,CADa,EAsDb,CACCL,QADD,EAECG,oBAFD,EAGCD,cAHD,EAICE,oBAJD,EAKCgB,IALD,EAMCnB,WAND,EAOCI,kBAPD,CAtDa,CAAd;AAgEA;;AAED,eAAeN,sBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { pick, defaultTo } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Platform, useMemo } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tstore as coreStore,\n\t__experimentalFetchLinkSuggestions as fetchLinkSuggestions,\n\t__experimentalFetchUrlData as fetchUrlData,\n} from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { mediaUpload } from '../../utils';\nimport { store as editorStore } from '../../store';\n\n/**\n * React hook used to compute the block editor settings to use for the post editor.\n *\n * @param {Object} settings EditorProvider settings prop.\n * @param {boolean} hasTemplate Whether template mode is enabled.\n *\n * @return {Object} Block Editor Settings.\n */\nfunction useBlockEditorSettings( settings, hasTemplate ) {\n\tconst {\n\t\treusableBlocks,\n\t\thasUploadPermissions,\n\t\tcanUseUnfilteredHTML,\n\t\tuserCanCreatePages,\n\t} = useSelect( ( select ) => {\n\t\tconst { canUserUseUnfilteredHTML } = select( editorStore );\n\t\tconst isWeb = Platform.OS === 'web';\n\t\tconst { canUser, getUnstableBase, hasFinishedResolution } = select(\n\t\t\tcoreStore\n\t\t);\n\n\t\tconst siteData = getUnstableBase();\n\n\t\tconst hasFinishedResolvingSiteData = hasFinishedResolution(\n\t\t\t'getUnstableBase'\n\t\t);\n\n\t\treturn {\n\t\t\tcanUseUnfilteredHTML: canUserUseUnfilteredHTML(),\n\t\t\treusableBlocks: isWeb\n\t\t\t\t? select( coreStore ).getEntityRecords(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t'wp_block',\n\t\t\t\t\t\t{ per_page: -1 }\n\t\t\t\t )\n\t\t\t\t: [], // Reusable blocks are fetched in the native version of this hook.\n\t\t\thasUploadPermissions: defaultTo(\n\t\t\t\tcanUser( 'create', 'media' ),\n\t\t\t\ttrue\n\t\t\t),\n\t\t\thasResolvedLocalSiteData: hasFinishedResolvingSiteData,\n\t\t\tbaseUrl: siteData?.url || '',\n\t\t\tuserCanCreatePages: canUser( 'create', 'pages' ),\n\t\t};\n\t}, [] );\n\n\tconst { undo } = useDispatch( editorStore );\n\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\n\t/**\n\t * Creates a Post entity.\n\t * This is utilised by the Link UI to allow for on-the-fly creation of Posts/Pages.\n\t *\n\t * @param {Object} options parameters for the post being created. These mirror those used on 3rd param of saveEntityRecord.\n\t * @return {Object} the post type object that was created.\n\t */\n\tconst createPageEntity = ( options ) => {\n\t\tif ( ! userCanCreatePages ) {\n\t\t\treturn Promise.reject( {\n\t\t\t\tmessage: __( 'You do not have permission to create Pages.' ),\n\t\t\t} );\n\t\t}\n\t\treturn saveEntityRecord( 'postType', 'page', options );\n\t};\n\n\treturn useMemo(\n\t\t() => ( {\n\t\t\t...pick( settings, [\n\t\t\t\t'__experimentalBlockDirectory',\n\t\t\t\t'__experimentalBlockPatternCategories',\n\t\t\t\t'__experimentalBlockPatterns',\n\t\t\t\t'__experimentalFeatures',\n\t\t\t\t'__experimentalGlobalStylesBaseConfig',\n\t\t\t\t'__experimentalGlobalStylesUserEntityId',\n\t\t\t\t'__experimentalPreferredStyleVariations',\n\t\t\t\t'__experimentalSetIsInserterOpened',\n\t\t\t\t'__unstableGalleryWithImageBlocks',\n\t\t\t\t'alignWide',\n\t\t\t\t'allowedBlockTypes',\n\t\t\t\t'bodyPlaceholder',\n\t\t\t\t'codeEditingEnabled',\n\t\t\t\t'colors',\n\t\t\t\t'disableCustomColors',\n\t\t\t\t'disableCustomFontSizes',\n\t\t\t\t'disableCustomGradients',\n\t\t\t\t'enableCustomLineHeight',\n\t\t\t\t'enableCustomSpacing',\n\t\t\t\t'enableCustomUnits',\n\t\t\t\t'focusMode',\n\t\t\t\t'fontSizes',\n\t\t\t\t'gradients',\n\t\t\t\t'hasFixedToolbar',\n\t\t\t\t'hasReducedUI',\n\t\t\t\t'imageDefaultSize',\n\t\t\t\t'imageDimensions',\n\t\t\t\t'imageEditing',\n\t\t\t\t'imageSizes',\n\t\t\t\t'isRTL',\n\t\t\t\t'keepCaretInsideBlock',\n\t\t\t\t'maxWidth',\n\t\t\t\t'onUpdateDefaultBlockStyles',\n\t\t\t\t'styles',\n\t\t\t\t'template',\n\t\t\t\t'templateLock',\n\t\t\t\t'titlePlaceholder',\n\t\t\t\t'supportsLayout',\n\t\t\t\t'widgetTypesToHideFromLegacyWidgetBlock',\n\t\t\t] ),\n\t\t\tmediaUpload: hasUploadPermissions ? mediaUpload : undefined,\n\t\t\t__experimentalReusableBlocks: reusableBlocks,\n\t\t\t__experimentalFetchLinkSuggestions: ( search, searchOptions ) =>\n\t\t\t\tfetchLinkSuggestions( search, searchOptions, settings ),\n\t\t\t__experimentalFetchRichUrlData: fetchUrlData,\n\t\t\t__experimentalCanUserUseUnfilteredHTML: canUseUnfilteredHTML,\n\t\t\t__experimentalUndo: undo,\n\t\t\toutlineMode: hasTemplate,\n\t\t\t__experimentalCreatePageEntity: createPageEntity,\n\t\t\t__experimentalUserCanCreatePages: userCanCreatePages,\n\t\t} ),\n\t\t[\n\t\t\tsettings,\n\t\t\thasUploadPermissions,\n\t\t\treusableBlocks,\n\t\t\tcanUseUnfilteredHTML,\n\t\t\tundo,\n\t\t\thasTemplate,\n\t\t\tuserCanCreatePages,\n\t\t]\n\t);\n}\n\nexport default useBlockEditorSettings;\n"]}
1
+ {"version":3,"sources":["@wordpress/editor/src/components/provider/use-block-editor-settings.js"],"names":["pick","defaultTo","Platform","useMemo","useDispatch","useSelect","store","coreStore","__experimentalFetchLinkSuggestions","fetchLinkSuggestions","__experimentalFetchUrlData","fetchUrlData","__","mediaUpload","editorStore","useBlockEditorSettings","settings","hasTemplate","reusableBlocks","hasUploadPermissions","canUseUnfilteredHTML","userCanCreatePages","select","canUserUseUnfilteredHTML","isWeb","OS","canUser","getUnstableBase","hasFinishedResolution","siteData","hasFinishedResolvingSiteData","getEntityRecords","per_page","hasResolvedLocalSiteData","baseUrl","url","undo","saveEntityRecord","createPageEntity","options","Promise","reject","message","undefined","__experimentalReusableBlocks","search","searchOptions","__experimentalFetchRichUrlData","__experimentalCanUserUseUnfilteredHTML","__experimentalUndo","outlineMode","__experimentalCreatePageEntity","__experimentalUserCanCreatePages"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAT,EAAeC,SAAf,QAAgC,QAAhC;AAEA;AACA;AACA;;AACA,SAASC,QAAT,EAAmBC,OAAnB,QAAkC,oBAAlC;AACA,SAASC,WAAT,EAAsBC,SAAtB,QAAuC,iBAAvC;AACA,SACCC,KAAK,IAAIC,SADV,EAECC,kCAAkC,IAAIC,oBAFvC,EAGCC,0BAA0B,IAAIC,YAH/B,QAIO,sBAJP;AAKA,SAASC,EAAT,QAAmB,iBAAnB;AAEA;AACA;AACA;;AACA,SAASC,WAAT,QAA4B,aAA5B;AACA,SAASP,KAAK,IAAIQ,WAAlB,QAAqC,aAArC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,sBAAT,CAAiCC,QAAjC,EAA2CC,WAA3C,EAAyD;AACxD,QAAM;AACLC,IAAAA,cADK;AAELC,IAAAA,oBAFK;AAGLC,IAAAA,oBAHK;AAILC,IAAAA;AAJK,MAKFhB,SAAS,CAAIiB,MAAF,IAAc;AAC5B,UAAM;AAAEC,MAAAA;AAAF,QAA+BD,MAAM,CAAER,WAAF,CAA3C;AACA,UAAMU,KAAK,GAAGtB,QAAQ,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,oBAFD,EAGCD,cAHD,EAICE,oBAJD,EAKCgB,IALD,EAMCnB,WAND,EAOCI,kBAPD,CApDa,CAAd;AA8DA;;AAED,eAAeN,sBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { pick, defaultTo } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Platform, useMemo } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tstore as coreStore,\n\t__experimentalFetchLinkSuggestions as fetchLinkSuggestions,\n\t__experimentalFetchUrlData as fetchUrlData,\n} from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { mediaUpload } from '../../utils';\nimport { store as editorStore } from '../../store';\n\n/**\n * React hook used to compute the block editor settings to use for the post editor.\n *\n * @param {Object} settings EditorProvider settings prop.\n * @param {boolean} hasTemplate Whether template mode is enabled.\n *\n * @return {Object} Block Editor Settings.\n */\nfunction useBlockEditorSettings( settings, hasTemplate ) {\n\tconst {\n\t\treusableBlocks,\n\t\thasUploadPermissions,\n\t\tcanUseUnfilteredHTML,\n\t\tuserCanCreatePages,\n\t} = useSelect( ( select ) => {\n\t\tconst { canUserUseUnfilteredHTML } = select( editorStore );\n\t\tconst isWeb = Platform.OS === 'web';\n\t\tconst { canUser, getUnstableBase, hasFinishedResolution } = select(\n\t\t\tcoreStore\n\t\t);\n\n\t\tconst siteData = getUnstableBase();\n\n\t\tconst hasFinishedResolvingSiteData = hasFinishedResolution(\n\t\t\t'getUnstableBase'\n\t\t);\n\n\t\treturn {\n\t\t\tcanUseUnfilteredHTML: canUserUseUnfilteredHTML(),\n\t\t\treusableBlocks: isWeb\n\t\t\t\t? select( coreStore ).getEntityRecords(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t'wp_block',\n\t\t\t\t\t\t{ per_page: -1 }\n\t\t\t\t )\n\t\t\t\t: [], // Reusable blocks are fetched in the native version of this hook.\n\t\t\thasUploadPermissions: defaultTo(\n\t\t\t\tcanUser( 'create', 'media' ),\n\t\t\t\ttrue\n\t\t\t),\n\t\t\thasResolvedLocalSiteData: hasFinishedResolvingSiteData,\n\t\t\tbaseUrl: siteData?.url || '',\n\t\t\tuserCanCreatePages: canUser( 'create', 'pages' ),\n\t\t};\n\t}, [] );\n\n\tconst { undo } = useDispatch( editorStore );\n\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\n\t/**\n\t * Creates a Post entity.\n\t * This is utilised by the Link UI to allow for on-the-fly creation of Posts/Pages.\n\t *\n\t * @param {Object} options parameters for the post being created. These mirror those used on 3rd param of saveEntityRecord.\n\t * @return {Object} the post type object that was created.\n\t */\n\tconst createPageEntity = ( options ) => {\n\t\tif ( ! userCanCreatePages ) {\n\t\t\treturn Promise.reject( {\n\t\t\t\tmessage: __( 'You do not have permission to create Pages.' ),\n\t\t\t} );\n\t\t}\n\t\treturn saveEntityRecord( 'postType', 'page', options );\n\t};\n\n\treturn useMemo(\n\t\t() => ( {\n\t\t\t...pick( settings, [\n\t\t\t\t'__experimentalBlockDirectory',\n\t\t\t\t'__experimentalBlockPatternCategories',\n\t\t\t\t'__experimentalBlockPatterns',\n\t\t\t\t'__experimentalFeatures',\n\t\t\t\t'__experimentalPreferredStyleVariations',\n\t\t\t\t'__experimentalSetIsInserterOpened',\n\t\t\t\t'__unstableGalleryWithImageBlocks',\n\t\t\t\t'alignWide',\n\t\t\t\t'allowedBlockTypes',\n\t\t\t\t'bodyPlaceholder',\n\t\t\t\t'codeEditingEnabled',\n\t\t\t\t'colors',\n\t\t\t\t'disableCustomColors',\n\t\t\t\t'disableCustomFontSizes',\n\t\t\t\t'disableCustomGradients',\n\t\t\t\t'enableCustomLineHeight',\n\t\t\t\t'enableCustomSpacing',\n\t\t\t\t'enableCustomUnits',\n\t\t\t\t'focusMode',\n\t\t\t\t'fontSizes',\n\t\t\t\t'gradients',\n\t\t\t\t'hasFixedToolbar',\n\t\t\t\t'hasReducedUI',\n\t\t\t\t'imageDefaultSize',\n\t\t\t\t'imageDimensions',\n\t\t\t\t'imageEditing',\n\t\t\t\t'imageSizes',\n\t\t\t\t'isRTL',\n\t\t\t\t'keepCaretInsideBlock',\n\t\t\t\t'maxWidth',\n\t\t\t\t'onUpdateDefaultBlockStyles',\n\t\t\t\t'styles',\n\t\t\t\t'template',\n\t\t\t\t'templateLock',\n\t\t\t\t'titlePlaceholder',\n\t\t\t\t'supportsLayout',\n\t\t\t\t'widgetTypesToHideFromLegacyWidgetBlock',\n\t\t\t] ),\n\t\t\tmediaUpload: hasUploadPermissions ? mediaUpload : undefined,\n\t\t\t__experimentalReusableBlocks: reusableBlocks,\n\t\t\t__experimentalFetchLinkSuggestions: ( search, searchOptions ) =>\n\t\t\t\tfetchLinkSuggestions( search, searchOptions, settings ),\n\t\t\t__experimentalFetchRichUrlData: fetchUrlData,\n\t\t\t__experimentalCanUserUseUnfilteredHTML: canUseUnfilteredHTML,\n\t\t\t__experimentalUndo: undo,\n\t\t\toutlineMode: hasTemplate,\n\t\t\t__experimentalCreatePageEntity: createPageEntity,\n\t\t\t__experimentalUserCanCreatePages: userCanCreatePages,\n\t\t} ),\n\t\t[\n\t\t\tsettings,\n\t\t\thasUploadPermissions,\n\t\t\treusableBlocks,\n\t\t\tcanUseUnfilteredHTML,\n\t\t\tundo,\n\t\t\thasTemplate,\n\t\t\tuserCanCreatePages,\n\t\t]\n\t);\n}\n\nexport default useBlockEditorSettings;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/editor",
3
- "version": "12.0.1",
3
+ "version": "12.0.2",
4
4
  "description": "Enhanced block editor for WordPress posts.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -32,32 +32,32 @@
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.13.10",
34
34
  "@wordpress/a11y": "^3.2.3",
35
- "@wordpress/api-fetch": "^5.2.4",
35
+ "@wordpress/api-fetch": "^5.2.5",
36
36
  "@wordpress/autop": "^3.2.2",
37
37
  "@wordpress/blob": "^3.2.1",
38
- "@wordpress/block-editor": "^7.0.4",
39
- "@wordpress/blocks": "^11.1.2",
40
- "@wordpress/components": "^19.0.0",
41
- "@wordpress/compose": "^5.0.4",
42
- "@wordpress/core-data": "^4.0.4",
43
- "@wordpress/data": "^6.1.2",
44
- "@wordpress/data-controls": "^2.2.5",
38
+ "@wordpress/block-editor": "^8.0.0",
39
+ "@wordpress/blocks": "^11.1.3",
40
+ "@wordpress/components": "^19.0.1",
41
+ "@wordpress/compose": "^5.0.5",
42
+ "@wordpress/core-data": "^4.0.5",
43
+ "@wordpress/data": "^6.1.3",
44
+ "@wordpress/data-controls": "^2.2.6",
45
45
  "@wordpress/date": "^4.2.2",
46
46
  "@wordpress/deprecated": "^3.2.2",
47
47
  "@wordpress/element": "^4.0.3",
48
48
  "@wordpress/hooks": "^3.2.1",
49
49
  "@wordpress/html-entities": "^3.2.2",
50
50
  "@wordpress/i18n": "^4.2.3",
51
- "@wordpress/icons": "^6.0.1",
51
+ "@wordpress/icons": "^6.1.0",
52
52
  "@wordpress/is-shallow-equal": "^4.2.0",
53
- "@wordpress/keyboard-shortcuts": "^3.0.4",
53
+ "@wordpress/keyboard-shortcuts": "^3.0.5",
54
54
  "@wordpress/keycodes": "^3.2.3",
55
- "@wordpress/media-utils": "^3.0.3",
56
- "@wordpress/notices": "^3.2.5",
57
- "@wordpress/reusable-blocks": "^3.0.4",
58
- "@wordpress/rich-text": "^5.0.4",
59
- "@wordpress/server-side-render": "^3.0.4",
60
- "@wordpress/url": "^3.2.3",
55
+ "@wordpress/media-utils": "^3.0.4",
56
+ "@wordpress/notices": "^3.2.6",
57
+ "@wordpress/reusable-blocks": "^3.0.5",
58
+ "@wordpress/rich-text": "^5.0.5",
59
+ "@wordpress/server-side-render": "^3.0.5",
60
+ "@wordpress/url": "^3.3.0",
61
61
  "@wordpress/wordcount": "^3.2.2",
62
62
  "classnames": "^2.3.1",
63
63
  "lodash": "^4.17.21",
@@ -68,5 +68,5 @@
68
68
  "publishConfig": {
69
69
  "access": "public"
70
70
  },
71
- "gitHead": "157f4ae53ab98e574af01f72213ae5a9613159ff"
71
+ "gitHead": "393c2b5533837fd637e998d23f0124c081a10df0"
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
- <BottomSheet.NavigationContainer
90
- animate
91
- main
92
- style={ styles.navigationContainer }
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
- <View style={ styles.container }>
100
- <BottomSheet.NavBar>
101
- <BottomSheet.NavBar.DismissButton
102
- onPress={ close }
103
- iosText={ __( 'Close' ) }
104
- />
105
- <BottomSheet.NavBar.Heading>
106
- { title }
107
- </BottomSheet.NavBar.Heading>
108
- </BottomSheet.NavBar>
109
- <BottomSheetConsumer>
110
- { ( { listProps } ) => {
111
- const contentContainerStyle = StyleSheet.flatten(
112
- listProps.contentContainerStyle
113
- );
114
- return (
115
- <ScrollView
116
- { ...listProps }
117
- contentContainerStyle={ {
118
- ...contentContainerStyle,
119
- paddingBottom: Math.max(
120
- listProps.safeAreaBottomInset,
121
- contentContainerStyle.paddingBottom
122
- ),
123
- /**
124
- * Remove margin set via `hideHeader`. Combining a header
125
- * and navigation in this bottom sheet is at odds with the
126
- * current `BottomSheet` implementation.
127
- */
128
- marginTop: 0,
129
- } }
130
- >
131
- <PanelBody>
132
- <Text style={ sectionTitle }>
133
- { __( 'The basics' ) }
134
- </Text>
135
- { /* Print out help topics */ }
136
- { HELP_TOPICS.map(
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
- { __( 'Get support' ) }
134
+ { __( 'The basics' ) }
156
135
  </Text>
157
- }
158
- {
159
- <HelpGetSupportButton
160
- title={ __(
161
- 'Contact support'
162
- ) }
163
- onPress={
164
- requestContactCustomerSupport
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
- <HelpGetSupportButton
170
- title={ __(
171
- 'More support options'
172
- ) }
173
- onPress={
174
- requestGotoCustomerSupportOptions
175
- }
176
- />
177
- }
178
- </PanelBody>
179
- </ScrollView>
180
- );
181
- } }
182
- </BottomSheetConsumer>
183
- </View>
184
- </BottomSheet.NavigationScreen>
185
- { /* Print out help detail screens */ }
186
- { HELP_TOPICS.map( ( { view, label } ) => {
187
- const labelSlug = kebabCase( label );
188
- return (
189
- <HelpDetailNavigationScreen
190
- key={ labelSlug }
191
- name={ labelSlug }
192
- content={ view }
193
- label={ label }
194
- options={ {
195
- gestureEnabled: true,
196
- ...TransitionPresets.DefaultTransition,
197
- } }
198
- />
199
- );
200
- } ) }
201
- </BottomSheet.NavigationContainer>
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
- const ENTITY_NAME_ICONS = {
20
- site: layout,
21
- page,
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 icon = ENTITY_NAME_ICONS[ name ];
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={ entity.label } initialOpen={ true } icon={ icon }>
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 TRANSLATED_SITE_PROTPERTIES = {
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: TRANSLATED_SITE_PROTPERTIES[ property ] || property,
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 = Object.values(
72
- groupBy( dirtyEntityRecords, 'name' )
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>{ __( 'Select the changes you want to save' ) }</strong>
193
+ <strong>{ __( 'Are you ready to save?' ) }</strong>
164
194
  <p>
165
195
  { __(
166
- 'Some changes may affect other areas of your site.'
196
+ 'The following changes have been made to your site, templates, and content.'
167
197
  ) }
168
198
  </p>
169
199
  </div>
170
200
 
171
- { partitionedSavables.map( ( list ) => {
201
+ { sortedPartitionedSavables.map( ( list ) => {
172
202
  return (
173
203
  <EntityTypeList
174
204
  key={ list[ 0 ].name }