@wordpress/editor 14.5.0 → 14.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/bindings/post-meta.js +2 -2
- package/build/bindings/post-meta.js.map +1 -1
- package/build/components/create-template-part-modal/index.js +1 -0
- package/build/components/create-template-part-modal/index.js.map +1 -1
- package/build/components/global-styles-provider/index.js +17 -4
- package/build/components/global-styles-provider/index.js.map +1 -1
- package/build/components/inserter-sidebar/index.js +5 -2
- package/build/components/inserter-sidebar/index.js.map +1 -1
- package/build/components/page-attributes/parent.js +6 -5
- package/build/components/page-attributes/parent.js.map +1 -1
- package/build/components/post-actions/actions.js +4 -499
- package/build/components/post-actions/actions.js.map +1 -1
- package/build/components/post-actions/index.js +8 -17
- package/build/components/post-actions/index.js.map +1 -1
- package/build/components/post-card-panel/index.js +20 -20
- package/build/components/post-card-panel/index.js.map +1 -1
- package/build/components/post-featured-image/index.js +2 -0
- package/build/components/post-featured-image/index.js.map +1 -1
- package/build/components/post-publish-panel/postpublish.js +4 -0
- package/build/components/post-publish-panel/postpublish.js.map +1 -1
- package/build/components/post-slug/index.js +1 -0
- package/build/components/post-slug/index.js.map +1 -1
- package/build/components/post-taxonomies/hierarchical-term-selector.js +2 -1
- package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build/components/post-url/index.js +6 -5
- package/build/components/post-url/index.js.map +1 -1
- package/build/components/sidebar/post-summary.js +10 -7
- package/build/components/sidebar/post-summary.js.map +1 -1
- package/build/components/template-content-panel/index.js +1 -1
- package/build/components/template-content-panel/index.js.map +1 -1
- package/build/dataviews/actions/duplicate-pattern.js +48 -0
- package/build/dataviews/actions/duplicate-pattern.js.map +1 -0
- package/build/dataviews/actions/duplicate-post.js +146 -0
- package/build/dataviews/actions/duplicate-post.js.map +1 -0
- package/build/dataviews/actions/duplicate-post.native.js +9 -0
- package/build/dataviews/actions/duplicate-post.native.js.map +1 -0
- package/build/dataviews/actions/duplicate-template-part.js +67 -0
- package/build/dataviews/actions/duplicate-template-part.js.map +1 -0
- package/build/dataviews/actions/rename-post.js +125 -0
- package/build/dataviews/actions/rename-post.js.map +1 -0
- package/build/dataviews/actions/reorder-page.js +116 -0
- package/build/dataviews/actions/reorder-page.js.map +1 -0
- package/build/dataviews/actions/reorder-page.native.js +9 -0
- package/build/dataviews/actions/reorder-page.native.js.map +1 -0
- package/build/dataviews/actions/reset-post.js +1 -1
- package/build/dataviews/actions/reset-post.js.map +1 -1
- package/build/dataviews/actions/utils.js +9 -1
- package/build/dataviews/actions/utils.js.map +1 -1
- package/build/dataviews/actions/view-post-revisions.js +49 -0
- package/build/dataviews/actions/view-post-revisions.js.map +1 -0
- package/build/dataviews/actions/view-post.js +36 -0
- package/build/dataviews/actions/view-post.js.map +1 -0
- package/build/dataviews/fields/index.js +32 -0
- package/build/dataviews/fields/index.js.map +1 -0
- package/build/dataviews/store/private-actions.js +16 -2
- package/build/dataviews/store/private-actions.js.map +1 -1
- package/build/dataviews/types.js.map +1 -1
- package/build/private-apis.js +2 -0
- package/build/private-apis.js.map +1 -1
- package/build/store/private-actions.js +1 -1
- package/build/store/private-actions.js.map +1 -1
- package/build/store/utils/is-template-revertable.js +1 -1
- package/build/store/utils/is-template-revertable.js.map +1 -1
- package/build-module/bindings/post-meta.js +2 -2
- package/build-module/bindings/post-meta.js.map +1 -1
- package/build-module/components/create-template-part-modal/index.js +1 -0
- package/build-module/components/create-template-part-modal/index.js.map +1 -1
- package/build-module/components/global-styles-provider/index.js +17 -4
- package/build-module/components/global-styles-provider/index.js.map +1 -1
- package/build-module/components/inserter-sidebar/index.js +5 -2
- package/build-module/components/inserter-sidebar/index.js.map +1 -1
- package/build-module/components/page-attributes/parent.js +6 -5
- package/build-module/components/page-attributes/parent.js.map +1 -1
- package/build-module/components/post-actions/actions.js +5 -501
- package/build-module/components/post-actions/actions.js.map +1 -1
- package/build-module/components/post-actions/index.js +8 -17
- package/build-module/components/post-actions/index.js.map +1 -1
- package/build-module/components/post-card-panel/index.js +20 -20
- package/build-module/components/post-card-panel/index.js.map +1 -1
- package/build-module/components/post-featured-image/index.js +2 -0
- package/build-module/components/post-featured-image/index.js.map +1 -1
- package/build-module/components/post-publish-panel/postpublish.js +4 -0
- package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
- package/build-module/components/post-slug/index.js +1 -0
- package/build-module/components/post-slug/index.js.map +1 -1
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js +3 -2
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build-module/components/post-url/index.js +7 -6
- package/build-module/components/post-url/index.js.map +1 -1
- package/build-module/components/sidebar/post-summary.js +10 -7
- package/build-module/components/sidebar/post-summary.js.map +1 -1
- package/build-module/components/template-content-panel/index.js +1 -1
- package/build-module/components/template-content-panel/index.js.map +1 -1
- package/build-module/dataviews/actions/duplicate-pattern.js +39 -0
- package/build-module/dataviews/actions/duplicate-pattern.js.map +1 -0
- package/build-module/dataviews/actions/duplicate-post.js +139 -0
- package/build-module/dataviews/actions/duplicate-post.js.map +1 -0
- package/build-module/dataviews/actions/duplicate-post.native.js +3 -0
- package/build-module/dataviews/actions/duplicate-post.native.js.map +1 -0
- package/build-module/dataviews/actions/duplicate-template-part.js +58 -0
- package/build-module/dataviews/actions/duplicate-template-part.js.map +1 -0
- package/build-module/dataviews/actions/rename-post.js +118 -0
- package/build-module/dataviews/actions/rename-post.js.map +1 -0
- package/build-module/dataviews/actions/reorder-page.js +111 -0
- package/build-module/dataviews/actions/reorder-page.js.map +1 -0
- package/build-module/dataviews/actions/reorder-page.native.js +3 -0
- package/build-module/dataviews/actions/reorder-page.native.js.map +1 -0
- package/build-module/dataviews/actions/reset-post.js +1 -1
- package/build-module/dataviews/actions/reset-post.js.map +1 -1
- package/build-module/dataviews/actions/utils.js +7 -1
- package/build-module/dataviews/actions/utils.js.map +1 -1
- package/build-module/dataviews/actions/view-post-revisions.js +43 -0
- package/build-module/dataviews/actions/view-post-revisions.js.map +1 -0
- package/build-module/dataviews/actions/view-post.js +30 -0
- package/build-module/dataviews/actions/view-post.js.map +1 -0
- package/build-module/dataviews/fields/index.js +26 -0
- package/build-module/dataviews/fields/index.js.map +1 -0
- package/build-module/dataviews/store/private-actions.js +16 -2
- package/build-module/dataviews/store/private-actions.js.map +1 -1
- package/build-module/dataviews/types.js.map +1 -1
- package/build-module/private-apis.js +2 -0
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/private-actions.js +1 -1
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/utils/is-template-revertable.js +1 -1
- package/build-module/store/utils/is-template-revertable.js.map +1 -1
- package/build-style/style-rtl.css +2 -31
- package/build-style/style.css +2 -31
- package/build-types/components/create-template-part-modal/index.d.ts.map +1 -1
- package/build-types/components/global-styles-provider/index.d.ts.map +1 -1
- package/build-types/components/inserter-sidebar/index.d.ts.map +1 -1
- package/build-types/components/page-attributes/parent.d.ts.map +1 -1
- package/build-types/components/post-actions/actions.d.ts +1 -26
- package/build-types/components/post-actions/actions.d.ts.map +1 -1
- package/build-types/components/post-actions/index.d.ts +3 -2
- package/build-types/components/post-actions/index.d.ts.map +1 -1
- package/build-types/components/post-card-panel/index.d.ts +4 -2
- package/build-types/components/post-card-panel/index.d.ts.map +1 -1
- package/build-types/components/post-slug/index.d.ts.map +1 -1
- package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts +1 -17
- package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts.map +1 -1
- package/build-types/components/post-url/index.d.ts.map +1 -1
- package/build-types/components/sidebar/post-summary.d.ts.map +1 -1
- package/build-types/components/template-content-panel/index.d.ts.map +1 -1
- package/build-types/dataviews/actions/duplicate-pattern.d.ts +5 -0
- package/build-types/dataviews/actions/duplicate-pattern.d.ts.map +1 -0
- package/build-types/dataviews/actions/duplicate-post.d.ts +5 -0
- package/build-types/dataviews/actions/duplicate-post.d.ts.map +1 -0
- package/build-types/dataviews/actions/duplicate-post.native.d.ts +3 -0
- package/build-types/dataviews/actions/duplicate-post.native.d.ts.map +1 -0
- package/build-types/dataviews/actions/duplicate-template-part.d.ts +5 -0
- package/build-types/dataviews/actions/duplicate-template-part.d.ts.map +1 -0
- package/build-types/dataviews/actions/rename-post.d.ts +5 -0
- package/build-types/dataviews/actions/rename-post.d.ts.map +1 -0
- package/build-types/dataviews/actions/reorder-page.d.ts +8 -0
- package/build-types/dataviews/actions/reorder-page.d.ts.map +1 -0
- package/build-types/dataviews/actions/reorder-page.native.d.ts +3 -0
- package/build-types/dataviews/actions/reorder-page.native.d.ts.map +1 -0
- package/build-types/dataviews/actions/reset-post.d.ts.map +1 -1
- package/build-types/dataviews/actions/utils.d.ts +5 -3
- package/build-types/dataviews/actions/utils.d.ts.map +1 -1
- package/build-types/dataviews/actions/view-post-revisions.d.ts +8 -0
- package/build-types/dataviews/actions/view-post-revisions.d.ts.map +1 -0
- package/build-types/dataviews/actions/view-post.d.ts +8 -0
- package/build-types/dataviews/actions/view-post.d.ts.map +1 -0
- package/build-types/dataviews/fields/index.d.ts +8 -0
- package/build-types/dataviews/fields/index.d.ts.map +1 -0
- package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
- package/build-types/dataviews/types.d.ts +57 -8
- package/build-types/dataviews/types.d.ts.map +1 -1
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/store/utils/is-template-revertable.d.ts.map +1 -1
- package/package.json +36 -36
- package/src/bindings/post-meta.js +2 -2
- package/src/components/block-manager/style.scss +2 -2
- package/src/components/create-template-part-modal/index.js +1 -0
- package/src/components/error-boundary/style.native.scss +1 -1
- package/src/components/error-boundary/style.scss +1 -1
- package/src/components/global-styles-provider/index.js +16 -3
- package/src/components/inserter-sidebar/index.js +10 -4
- package/src/components/page-attributes/parent.js +13 -9
- package/src/components/post-actions/actions.js +5 -616
- package/src/components/post-actions/index.js +16 -20
- package/src/components/post-card-panel/index.js +28 -27
- package/src/components/post-discussion/style.scss +0 -9
- package/src/components/post-featured-image/index.js +2 -0
- package/src/components/post-format/style.scss +0 -6
- package/src/components/post-publish-panel/postpublish.js +8 -2
- package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +8 -8
- package/src/components/post-slug/index.js +1 -0
- package/src/components/post-status/style.scss +0 -19
- package/src/components/post-taxonomies/hierarchical-term-selector.js +3 -1
- package/src/components/post-url/index.js +15 -9
- package/src/components/save-publish-panels/style.scss +3 -3
- package/src/components/sidebar/post-summary.js +20 -16
- package/src/components/site-discussion/style.scss +0 -14
- package/src/components/template-content-panel/index.js +4 -1
- package/src/dataviews/actions/duplicate-pattern.tsx +40 -0
- package/src/dataviews/actions/duplicate-post.native.tsx +3 -0
- package/src/dataviews/actions/duplicate-post.tsx +174 -0
- package/src/dataviews/actions/duplicate-template-part.tsx +70 -0
- package/src/dataviews/actions/rename-post.tsx +146 -0
- package/src/dataviews/actions/reorder-page.native.tsx +3 -0
- package/src/dataviews/actions/reorder-page.tsx +125 -0
- package/src/dataviews/actions/reset-post.tsx +2 -1
- package/src/dataviews/actions/utils.ts +14 -4
- package/src/dataviews/actions/view-post-revisions.tsx +47 -0
- package/src/dataviews/actions/view-post.tsx +30 -0
- package/src/dataviews/fields/index.ts +26 -0
- package/src/dataviews/store/private-actions.ts +42 -1
- package/src/dataviews/types.ts +47 -6
- package/src/private-apis.js +2 -0
- package/src/store/private-actions.js +1 -1
- package/src/store/utils/is-template-revertable.js +2 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["store","coreStore","doAction","deletePost","exportPattern","resetPost","trashPost","permanentlyDeletePost","restorePost","editorStore","unlock","registerEntityAction","kind","name","config","type","unregisterEntityAction","actionId","setIsReady","registerPostTypeActions","postType","registry","isReady","select","isEntityReady","dispatch","postTypeConfig","resolveSelect","getPostType","actions","
|
|
1
|
+
{"version":3,"names":["store","coreStore","doAction","deletePost","duplicatePattern","duplicateTemplatePart","exportPattern","resetPost","trashPost","permanentlyDeletePost","renamePost","reorderPage","restorePost","editorStore","unlock","duplicatePost","viewPostRevisions","viewPost","registerEntityAction","kind","name","config","type","unregisterEntityAction","actionId","setIsReady","registerPostTypeActions","postType","registry","isReady","select","isEntityReady","dispatch","postTypeConfig","resolveSelect","getPostType","canCreate","canUser","currentTheme","getCurrentTheme","actions","viewable","undefined","supports","revisions","globalThis","IS_GUTENBERG_PLUGIN","includes","slug","is_block_theme","title","batch","forEach","action"],"sources":["@wordpress/editor/src/dataviews/store/private-actions.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport type { Action } from '@wordpress/dataviews';\nimport { doAction } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport deletePost from '../actions/delete-post';\nimport duplicatePattern from '../actions/duplicate-pattern';\nimport duplicateTemplatePart from '../actions/duplicate-template-part';\nimport exportPattern from '../actions/export-pattern';\nimport resetPost from '../actions/reset-post';\nimport trashPost from '../actions/trash-post';\nimport permanentlyDeletePost from '../actions/permanently-delete-post';\nimport renamePost from '../actions/rename-post';\nimport reorderPage from '../actions/reorder-page';\nimport restorePost from '../actions/restore-post';\nimport type { PostType } from '../types';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport duplicatePost from '../actions/duplicate-post';\nimport viewPostRevisions from '../actions/view-post-revisions';\nimport viewPost from '../actions/view-post';\n\nexport function registerEntityAction< Item >(\n\tkind: string,\n\tname: string,\n\tconfig: Action< Item >\n) {\n\treturn {\n\t\ttype: 'REGISTER_ENTITY_ACTION' as const,\n\t\tkind,\n\t\tname,\n\t\tconfig,\n\t};\n}\n\nexport function unregisterEntityAction(\n\tkind: string,\n\tname: string,\n\tactionId: string\n) {\n\treturn {\n\t\ttype: 'UNREGISTER_ENTITY_ACTION' as const,\n\t\tkind,\n\t\tname,\n\t\tactionId,\n\t};\n}\n\nexport function setIsReady( kind: string, name: string ) {\n\treturn {\n\t\ttype: 'SET_IS_READY' as const,\n\t\tkind,\n\t\tname,\n\t};\n}\n\nexport const registerPostTypeActions =\n\t( postType: string ) =>\n\tasync ( { registry }: { registry: any } ) => {\n\t\tconst isReady = unlock( registry.select( editorStore ) ).isEntityReady(\n\t\t\t'postType',\n\t\t\tpostType\n\t\t);\n\t\tif ( isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\tunlock( registry.dispatch( editorStore ) ).setIsReady(\n\t\t\t'postType',\n\t\t\tpostType\n\t\t);\n\n\t\tconst postTypeConfig = ( await registry\n\t\t\t.resolveSelect( coreStore )\n\t\t\t.getPostType( postType ) ) as PostType;\n\n\t\tconst canCreate = await registry\n\t\t\t.resolveSelect( coreStore )\n\t\t\t.canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: postType,\n\t\t\t} );\n\t\tconst currentTheme = await registry\n\t\t\t.resolveSelect( coreStore )\n\t\t\t.getCurrentTheme();\n\n\t\tconst actions = [\n\t\t\tpostTypeConfig.viewable ? viewPost : undefined,\n\t\t\t!! postTypeConfig?.supports?.revisions\n\t\t\t\t? viewPostRevisions\n\t\t\t\t: undefined,\n\t\t\t// @ts-ignore\n\t\t\tglobalThis.IS_GUTENBERG_PLUGIN\n\t\t\t\t? ! [ 'wp_template', 'wp_block', 'wp_template_part' ].includes(\n\t\t\t\t\t\tpostTypeConfig.slug\n\t\t\t\t ) &&\n\t\t\t\t canCreate &&\n\t\t\t\t duplicatePost\n\t\t\t\t: undefined,\n\t\t\tpostTypeConfig.slug === 'wp_template_part' &&\n\t\t\tcanCreate &&\n\t\t\tcurrentTheme?.is_block_theme\n\t\t\t\t? duplicateTemplatePart\n\t\t\t\t: undefined,\n\t\t\tcanCreate && postTypeConfig.slug === 'wp_block'\n\t\t\t\t? duplicatePattern\n\t\t\t\t: undefined,\n\t\t\tpostTypeConfig.supports?.title ? renamePost : undefined,\n\t\t\tpostTypeConfig?.supports?.[ 'page-attributes' ]\n\t\t\t\t? reorderPage\n\t\t\t\t: undefined,\n\t\t\tpostTypeConfig.slug === 'wp_block' ? exportPattern : undefined,\n\t\t\tresetPost,\n\t\t\trestorePost,\n\t\t\tdeletePost,\n\t\t\ttrashPost,\n\t\t\tpermanentlyDeletePost,\n\t\t];\n\n\t\tregistry.batch( () => {\n\t\t\tactions.forEach( ( action ) => {\n\t\t\t\tif ( ! action ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tunlock( registry.dispatch( editorStore ) ).registerEntityAction(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\taction\n\t\t\t\t);\n\t\t\t} );\n\t\t} );\n\n\t\tdoAction( 'core.registerPostTypeActions', postType );\n\t};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AAEzD,SAASC,QAAQ,QAAQ,kBAAkB;;AAE3C;AACA;AACA;AACA,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,gBAAgB,MAAM,8BAA8B;AAC3D,OAAOC,qBAAqB,MAAM,oCAAoC;AACtE,OAAOC,aAAa,MAAM,2BAA2B;AACrD,OAAOC,SAAS,MAAM,uBAAuB;AAC7C,OAAOC,SAAS,MAAM,uBAAuB;AAC7C,OAAOC,qBAAqB,MAAM,oCAAoC;AACtE,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,WAAW,MAAM,yBAAyB;AACjD,OAAOC,WAAW,MAAM,yBAAyB;AAEjD,SAASZ,KAAK,IAAIa,WAAW,QAAQ,aAAa;AAClD,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,aAAa,MAAM,2BAA2B;AACrD,OAAOC,iBAAiB,MAAM,gCAAgC;AAC9D,OAAOC,QAAQ,MAAM,sBAAsB;AAE3C,OAAO,SAASC,oBAAoBA,CACnCC,IAAY,EACZC,IAAY,EACZC,MAAsB,EACrB;EACD,OAAO;IACNC,IAAI,EAAE,wBAAiC;IACvCH,IAAI;IACJC,IAAI;IACJC;EACD,CAAC;AACF;AAEA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AE,aAAa,EAAE,UAAU,EAAE,kBAAkB,CAAE,CAACC,QAAQ,CAC5Dd,cAAc,CAACe,IACf,CAAC,IACDZ,SAAS,IACTrB,aAAa,GACb2B,SAAS,EACZT,cAAc,CAACe,IAAI,KAAK,kBAAkB,IAC1CZ,SAAS,IACTE,YAAY,EAAEW,cAAc,GACzB5C,qBAAqB,GACrBqC,SAAS,EACZN,SAAS,IAAIH,cAAc,CAACe,IAAI,KAAK,UAAU,GAC5C5C,gBAAgB,GAChBsC,SAAS,EACZT,cAAc,CAACU,QAAQ,EAAEO,KAAK,GAAGxC,UAAU,GAAGgC,SAAS,EACvDT,cAAc,EAAEU,QAAQ,GAAI,iBAAiB,CAAE,GAC5ChC,WAAW,GACX+B,SAAS,EACZT,cAAc,CAACe,IAAI,KAAK,UAAU,GAAG1C,aAAa,GAAGoC,SAAS,EAC9DnC,SAAS,EACTK,WAAW,EACXT,UAAU,EACVK,SAAS,EACTC,qBAAqB,CACrB;EAEDmB,QAAQ,CAACuB,KAAK,CAAE,MAAM;IACrBX,OAAO,CAACY,OAAO,CAAIC,MAAM,IAAM;MAC9B,IAAK,CAAEA,MAAM,EAAG;QACf;MACD;MACAvC,MAAM,CAAEc,QAAQ,CAACI,QAAQ,CAAEnB,WAAY,CAAE,CAAC,CAACK,oBAAoB,CAC9D,UAAU,EACVS,QAAQ,EACR0B,MACD,CAAC;IACF,CAAE,CAAC;EACJ,CAAE,CAAC;EAEHnD,QAAQ,CAAE,8BAA8B,EAAEyB,QAAS,CAAC;AACrD,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/editor/src/dataviews/types.ts"],"sourcesContent":["type PostStatus =\n\t| 'published'\n\t| 'draft'\n\t| 'pending'\n\t| 'private'\n\t| 'future'\n\t| 'auto-draft'\n\t| 'trash';\n\nexport interface
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/editor/src/dataviews/types.ts"],"sourcesContent":["type PostStatus =\n\t| 'published'\n\t| 'draft'\n\t| 'pending'\n\t| 'private'\n\t| 'future'\n\t| 'auto-draft'\n\t| 'trash';\n\nexport interface CommonPost {\n\tstatus?: PostStatus;\n\ttitle: string | { rendered: string } | { raw: string };\n\tcontent: string | { raw: string; rendered: string };\n\ttype: string;\n\tid: string | number;\n\tblocks?: Object[];\n\t_links?: Links;\n}\n\ninterface Links {\n\t'predecessor-version'?: { href: string; id: number }[];\n\t'version-history'?: { href: string; count: number }[];\n\t[ key: string ]: { href: string }[] | undefined;\n}\n\nexport interface BasePost extends CommonPost {\n\tcomment_status?: 'open' | 'closed';\n\texcerpt?: string | { raw: string; rendered: string };\n\tmeta?: Record< string, any >;\n\tparent?: number;\n\tpassword?: string;\n\ttemplate?: string;\n\tformat?: string;\n\tfeatured_media?: number;\n\tmenu_order?: number;\n\tping_status?: 'open' | 'closed';\n\tlink?: string;\n}\n\nexport interface Template extends CommonPost {\n\ttype: 'wp_template';\n\tis_custom: boolean;\n\tsource: string;\n\torigin: string;\n\tplugin?: string;\n\thas_theme_file: boolean;\n\tid: string;\n}\n\nexport interface TemplatePart extends CommonPost {\n\ttype: 'wp_template_part';\n\tsource: string;\n\torigin: string;\n\thas_theme_file: boolean;\n\tid: string;\n\tarea: string;\n}\n\nexport interface Pattern extends CommonPost {\n\tslug: string;\n\ttitle: { raw: string };\n\twp_pattern_sync_status: string;\n}\n\nexport type Post = Template | TemplatePart | Pattern | BasePost;\n\nexport type PostWithPermissions = Post & {\n\tpermissions: {\n\t\tdelete: boolean;\n\t\tupdate: boolean;\n\t};\n};\n\nexport interface PostType {\n\tslug: string;\n\tviewable: boolean;\n\tsupports?: {\n\t\t'page-attributes'?: boolean;\n\t\ttitle?: boolean;\n\t\trevisions?: boolean;\n\t};\n}\n\n// Will be unnecessary after typescript 5.0 upgrade.\nexport type CoreDataError = { message?: string; code?: string };\n"],"mappings":"","ignoreList":[]}
|
|
@@ -14,6 +14,7 @@ import BackButton from './components/header/back-button';
|
|
|
14
14
|
import CreateTemplatePartModal from './components/create-template-part-modal';
|
|
15
15
|
import Editor from './components/editor';
|
|
16
16
|
import PluginPostExcerpt from './components/post-excerpt/plugin';
|
|
17
|
+
import PostCardPanel from './components/post-card-panel';
|
|
17
18
|
import PreferencesModal from './components/preferences-modal';
|
|
18
19
|
import { usePostActions } from './components/post-actions/actions';
|
|
19
20
|
import ToolsMoreMenuGroup from './components/more-menu/tools-more-menu-group';
|
|
@@ -35,6 +36,7 @@ lock(privateApis, {
|
|
|
35
36
|
GlobalStylesProvider,
|
|
36
37
|
mergeBaseAndUserConfigs,
|
|
37
38
|
PluginPostExcerpt,
|
|
39
|
+
PostCardPanel,
|
|
38
40
|
PreferencesModal,
|
|
39
41
|
usePostActions,
|
|
40
42
|
ToolsMoreMenuGroup,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["interfaceApis","lock","EntitiesSavedStatesExtensible","EditorContentSlotFill","useBlockEditorSettings","BackButton","CreateTemplatePartModal","Editor","PluginPostExcerpt","PreferencesModal","usePostActions","ToolsMoreMenuGroup","ViewMoreMenuGroup","ResizableEditor","mergeBaseAndUserConfigs","GlobalStylesProvider","registerCoreBlockBindingsSources","bootstrapBlockBindingsSourcesFromServer","store","interfaceStore","remainingInterfaceApis","privateApis"],"sources":["@wordpress/editor/src/private-apis.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport * as interfaceApis from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { lock } from './lock-unlock';\nimport { EntitiesSavedStatesExtensible } from './components/entities-saved-states';\nimport EditorContentSlotFill from './components/editor-interface/content-slot-fill';\nimport useBlockEditorSettings from './components/provider/use-block-editor-settings';\nimport BackButton from './components/header/back-button';\nimport CreateTemplatePartModal from './components/create-template-part-modal';\nimport Editor from './components/editor';\nimport PluginPostExcerpt from './components/post-excerpt/plugin';\nimport PreferencesModal from './components/preferences-modal';\nimport { usePostActions } from './components/post-actions/actions';\nimport ToolsMoreMenuGroup from './components/more-menu/tools-more-menu-group';\nimport ViewMoreMenuGroup from './components/more-menu/view-more-menu-group';\nimport ResizableEditor from './components/resizable-editor';\nimport {\n\tmergeBaseAndUserConfigs,\n\tGlobalStylesProvider,\n} from './components/global-styles-provider';\nimport {\n\tregisterCoreBlockBindingsSources,\n\tbootstrapBlockBindingsSourcesFromServer,\n} from './bindings/api';\n\nconst { store: interfaceStore, ...remainingInterfaceApis } = interfaceApis;\n\nexport const privateApis = {};\nlock( privateApis, {\n\tCreateTemplatePartModal,\n\tBackButton,\n\tEntitiesSavedStatesExtensible,\n\tEditor,\n\tEditorContentSlotFill,\n\tGlobalStylesProvider,\n\tmergeBaseAndUserConfigs,\n\tPluginPostExcerpt,\n\tPreferencesModal,\n\tusePostActions,\n\tToolsMoreMenuGroup,\n\tViewMoreMenuGroup,\n\tResizableEditor,\n\tregisterCoreBlockBindingsSources,\n\tbootstrapBlockBindingsSourcesFromServer,\n\n\t// This is a temporary private API while we're updating the site editor to use EditorProvider.\n\tuseBlockEditorSettings,\n\tinterfaceStore,\n\t...remainingInterfaceApis,\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,KAAKA,aAAa,MAAM,sBAAsB;;AAErD;AACA;AACA;AACA,SAASC,IAAI,QAAQ,eAAe;AACpC,SAASC,6BAA6B,QAAQ,oCAAoC;AAClF,OAAOC,qBAAqB,MAAM,iDAAiD;AACnF,OAAOC,sBAAsB,MAAM,iDAAiD;AACpF,OAAOC,UAAU,MAAM,iCAAiC;AACxD,OAAOC,uBAAuB,MAAM,yCAAyC;AAC7E,OAAOC,MAAM,MAAM,qBAAqB;AACxC,OAAOC,iBAAiB,MAAM,kCAAkC;AAChE,OAAOC,gBAAgB,MAAM,gCAAgC;AAC7D,SAASC,cAAc,QAAQ,mCAAmC;AAClE,OAAOC,kBAAkB,MAAM,8CAA8C;AAC7E,OAAOC,iBAAiB,MAAM,6CAA6C;AAC3E,OAAOC,eAAe,MAAM,+BAA+B;AAC3D,SACCC,uBAAuB,EACvBC,oBAAoB,QACd,qCAAqC;AAC5C,SACCC,gCAAgC,EAChCC,uCAAuC,QACjC,gBAAgB;AAEvB,MAAM;EAAEC,KAAK,EAAEC,cAAc;EAAE,GAAGC;AAAuB,CAAC,
|
|
1
|
+
{"version":3,"names":["interfaceApis","lock","EntitiesSavedStatesExtensible","EditorContentSlotFill","useBlockEditorSettings","BackButton","CreateTemplatePartModal","Editor","PluginPostExcerpt","PostCardPanel","PreferencesModal","usePostActions","ToolsMoreMenuGroup","ViewMoreMenuGroup","ResizableEditor","mergeBaseAndUserConfigs","GlobalStylesProvider","registerCoreBlockBindingsSources","bootstrapBlockBindingsSourcesFromServer","store","interfaceStore","remainingInterfaceApis","privateApis"],"sources":["@wordpress/editor/src/private-apis.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport * as interfaceApis from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { lock } from './lock-unlock';\nimport { EntitiesSavedStatesExtensible } from './components/entities-saved-states';\nimport EditorContentSlotFill from './components/editor-interface/content-slot-fill';\nimport useBlockEditorSettings from './components/provider/use-block-editor-settings';\nimport BackButton from './components/header/back-button';\nimport CreateTemplatePartModal from './components/create-template-part-modal';\nimport Editor from './components/editor';\nimport PluginPostExcerpt from './components/post-excerpt/plugin';\nimport PostCardPanel from './components/post-card-panel';\nimport PreferencesModal from './components/preferences-modal';\nimport { usePostActions } from './components/post-actions/actions';\nimport ToolsMoreMenuGroup from './components/more-menu/tools-more-menu-group';\nimport ViewMoreMenuGroup from './components/more-menu/view-more-menu-group';\nimport ResizableEditor from './components/resizable-editor';\nimport {\n\tmergeBaseAndUserConfigs,\n\tGlobalStylesProvider,\n} from './components/global-styles-provider';\nimport {\n\tregisterCoreBlockBindingsSources,\n\tbootstrapBlockBindingsSourcesFromServer,\n} from './bindings/api';\n\nconst { store: interfaceStore, ...remainingInterfaceApis } = interfaceApis;\n\nexport const privateApis = {};\nlock( privateApis, {\n\tCreateTemplatePartModal,\n\tBackButton,\n\tEntitiesSavedStatesExtensible,\n\tEditor,\n\tEditorContentSlotFill,\n\tGlobalStylesProvider,\n\tmergeBaseAndUserConfigs,\n\tPluginPostExcerpt,\n\tPostCardPanel,\n\tPreferencesModal,\n\tusePostActions,\n\tToolsMoreMenuGroup,\n\tViewMoreMenuGroup,\n\tResizableEditor,\n\tregisterCoreBlockBindingsSources,\n\tbootstrapBlockBindingsSourcesFromServer,\n\n\t// This is a temporary private API while we're updating the site editor to use EditorProvider.\n\tuseBlockEditorSettings,\n\tinterfaceStore,\n\t...remainingInterfaceApis,\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,KAAKA,aAAa,MAAM,sBAAsB;;AAErD;AACA;AACA;AACA,SAASC,IAAI,QAAQ,eAAe;AACpC,SAASC,6BAA6B,QAAQ,oCAAoC;AAClF,OAAOC,qBAAqB,MAAM,iDAAiD;AACnF,OAAOC,sBAAsB,MAAM,iDAAiD;AACpF,OAAOC,UAAU,MAAM,iCAAiC;AACxD,OAAOC,uBAAuB,MAAM,yCAAyC;AAC7E,OAAOC,MAAM,MAAM,qBAAqB;AACxC,OAAOC,iBAAiB,MAAM,kCAAkC;AAChE,OAAOC,aAAa,MAAM,8BAA8B;AACxD,OAAOC,gBAAgB,MAAM,gCAAgC;AAC7D,SAASC,cAAc,QAAQ,mCAAmC;AAClE,OAAOC,kBAAkB,MAAM,8CAA8C;AAC7E,OAAOC,iBAAiB,MAAM,6CAA6C;AAC3E,OAAOC,eAAe,MAAM,+BAA+B;AAC3D,SACCC,uBAAuB,EACvBC,oBAAoB,QACd,qCAAqC;AAC5C,SACCC,gCAAgC,EAChCC,uCAAuC,QACjC,gBAAgB;AAEvB,MAAM;EAAEC,KAAK,EAAEC,cAAc;EAAE,GAAGC;AAAuB,CAAC,GAAGrB,aAAa;AAE1E,OAAO,MAAMsB,WAAW,GAAG,CAAC,CAAC;AAC7BrB,IAAI,CAAEqB,WAAW,EAAE;EAClBhB,uBAAuB;EACvBD,UAAU;EACVH,6BAA6B;EAC7BK,MAAM;EACNJ,qBAAqB;EACrBa,oBAAoB;EACpBD,uBAAuB;EACvBP,iBAAiB;EACjBC,aAAa;EACbC,gBAAgB;EAChBC,cAAc;EACdC,kBAAkB;EAClBC,iBAAiB;EACjBC,eAAe;EACfG,gCAAgC;EAChCC,uCAAuC;EAEvC;EACAd,sBAAsB;EACtBgB,cAAc;EACd,GAAGC;AACJ,CAAE,CAAC","ignoreList":[]}
|
|
@@ -188,7 +188,7 @@ export const revertTemplate = (template, {
|
|
|
188
188
|
}
|
|
189
189
|
const fileTemplatePath = addQueryArgs(`${templateEntityConfig.baseURL}/${template.id}`, {
|
|
190
190
|
context: 'edit',
|
|
191
|
-
source:
|
|
191
|
+
source: template.origin
|
|
192
192
|
});
|
|
193
193
|
const fileTemplate = await apiFetch({
|
|
194
194
|
path: fileTemplatePath
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["store","coreStore","__","sprintf","noticesStore","blockEditorStore","preferencesStore","addQueryArgs","apiFetch","parse","__unstableSerializeAndClean","decodeEntities","isTemplateRevertable","setCurrentTemplateId","id","type","createTemplate","template","select","dispatch","registry","savedTemplate","saveEntityRecord","editEntityRecord","getCurrentPostType","getCurrentPostId","slug","createSuccessNotice","actions","label","onClick","setRenderingMode","getEditorSettings","defaultRenderingMode","showBlockTypes","blockNames","_registry$select$get","existingBlockNames","get","newBlockNames","filter","Array","isArray","includes","set","hideBlockTypes","_registry$select$get2","mergedBlockNames","Set","saveDirtyEntities","onSave","dirtyEntityRecords","entitiesToSkip","close","PUBLISH_ON_SAVE_ENTITIES","kind","name","saveNoticeId","homeUrl","getUnstableBase","home","removeNotice","entitiesToSave","key","property","some","elt","siteItemsToSave","pendingSavedRecords","forEach","push","typeToPublish","status","saveEditedEntityRecord","length","__experimentalSaveSpecifiedEntityEdits","undefined","__unstableMarkLastChangeAsPersistent","Promise","all","then","values","value","createErrorNotice","url","catch","error","revertTemplate","allowUndo","noticeId","templateEntityConfig","getEntityConfig","fileTemplatePath","baseURL","context","source","fileTemplate","path","serializeBlocks","blocks","blocksForSerialization","edited","getEditedEntityRecord","content","undoIgnore","raw","undoRevert","errorMessage","message","code","removeTemplates","items","isResetting","every","item","has_theme_file","promiseResult","allSettled","map","deleteEntityRecord","force","throwOnError","successMessage","title","rendered","reason","errorMessages","failedPromises","failedPromise","add","size","join"],"sources":["@wordpress/editor/src/store/private-actions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { addQueryArgs } from '@wordpress/url';\nimport apiFetch from '@wordpress/api-fetch';\nimport { parse, __unstableSerializeAndClean } from '@wordpress/blocks';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport isTemplateRevertable from './utils/is-template-revertable';\nexport * from '../dataviews/store/private-actions';\n\n/**\n * Returns an action object used to set which template is currently being used/edited.\n *\n * @param {string} id Template Id.\n *\n * @return {Object} Action object.\n */\nexport function setCurrentTemplateId( id ) {\n\treturn {\n\t\ttype: 'SET_CURRENT_TEMPLATE_ID',\n\t\tid,\n\t};\n}\n\n/**\n * Create a block based template.\n *\n * @param {Object?} template Template to create and assign.\n */\nexport const createTemplate =\n\t( template ) =>\n\tasync ( { select, dispatch, registry } ) => {\n\t\tconst savedTemplate = await registry\n\t\t\t.dispatch( coreStore )\n\t\t\t.saveEntityRecord( 'postType', 'wp_template', template );\n\t\tregistry\n\t\t\t.dispatch( coreStore )\n\t\t\t.editEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tselect.getCurrentPostType(),\n\t\t\t\tselect.getCurrentPostId(),\n\t\t\t\t{\n\t\t\t\t\ttemplate: savedTemplate.slug,\n\t\t\t\t}\n\t\t\t);\n\t\tregistry\n\t\t\t.dispatch( noticesStore )\n\t\t\t.createSuccessNotice(\n\t\t\t\t__( \"Custom template created. You're in template mode now.\" ),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Go back' ),\n\t\t\t\t\t\t\tonClick: () =>\n\t\t\t\t\t\t\t\tdispatch.setRenderingMode(\n\t\t\t\t\t\t\t\t\tselect.getEditorSettings()\n\t\t\t\t\t\t\t\t\t\t.defaultRenderingMode\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}\n\t\t\t);\n\t\treturn savedTemplate;\n\t};\n\n/**\n * Update the provided block types to be visible.\n *\n * @param {string[]} blockNames Names of block types to show.\n */\nexport const showBlockTypes =\n\t( blockNames ) =>\n\t( { registry } ) => {\n\t\tconst existingBlockNames =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core', 'hiddenBlockTypes' ) ?? [];\n\n\t\tconst newBlockNames = existingBlockNames.filter(\n\t\t\t( type ) =>\n\t\t\t\t! (\n\t\t\t\t\tArray.isArray( blockNames ) ? blockNames : [ blockNames ]\n\t\t\t\t).includes( type )\n\t\t);\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'hiddenBlockTypes', newBlockNames );\n\t};\n\n/**\n * Update the provided block types to be hidden.\n *\n * @param {string[]} blockNames Names of block types to hide.\n */\nexport const hideBlockTypes =\n\t( blockNames ) =>\n\t( { registry } ) => {\n\t\tconst existingBlockNames =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core', 'hiddenBlockTypes' ) ?? [];\n\n\t\tconst mergedBlockNames = new Set( [\n\t\t\t...existingBlockNames,\n\t\t\t...( Array.isArray( blockNames ) ? blockNames : [ blockNames ] ),\n\t\t] );\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'hiddenBlockTypes', [ ...mergedBlockNames ] );\n\t};\n\n/**\n * Save entity records marked as dirty.\n *\n * @param {Object} options Options for the action.\n * @param {Function} [options.onSave] Callback when saving happens.\n * @param {object[]} [options.dirtyEntityRecords] Array of dirty entities.\n * @param {object[]} [options.entitiesToSkip] Array of entities to skip saving.\n * @param {Function} [options.close] Callback when the actions is called. It should be consolidated with `onSave`.\n */\nexport const saveDirtyEntities =\n\t( { onSave, dirtyEntityRecords = [], entitiesToSkip = [], close } = {} ) =>\n\t( { registry } ) => {\n\t\tconst PUBLISH_ON_SAVE_ENTITIES = [\n\t\t\t{ kind: 'postType', name: 'wp_navigation' },\n\t\t];\n\t\tconst saveNoticeId = 'site-editor-save-success';\n\t\tconst homeUrl = registry.select( coreStore ).getUnstableBase()?.home;\n\t\tregistry.dispatch( noticesStore ).removeNotice( saveNoticeId );\n\t\tconst entitiesToSave = dirtyEntityRecords.filter(\n\t\t\t( { kind, name, key, property } ) => {\n\t\t\t\treturn ! entitiesToSkip.some(\n\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\telt.kind === kind &&\n\t\t\t\t\t\telt.name === name &&\n\t\t\t\t\t\telt.key === key &&\n\t\t\t\t\t\telt.property === property\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\t\tclose?.( entitiesToSave );\n\t\tconst siteItemsToSave = [];\n\t\tconst pendingSavedRecords = [];\n\t\tentitiesToSave.forEach( ( { kind, name, key, property } ) => {\n\t\t\tif ( 'root' === kind && 'site' === name ) {\n\t\t\t\tsiteItemsToSave.push( property );\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tPUBLISH_ON_SAVE_ENTITIES.some(\n\t\t\t\t\t\t( typeToPublish ) =>\n\t\t\t\t\t\t\ttypeToPublish.kind === kind &&\n\t\t\t\t\t\t\ttypeToPublish.name === name\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t\t.editEntityRecord( kind, name, key, {\n\t\t\t\t\t\t\tstatus: 'publish',\n\t\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tpendingSavedRecords.push(\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t\t.saveEditedEntityRecord( kind, name, key )\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\t\tif ( siteItemsToSave.length ) {\n\t\t\tpendingSavedRecords.push(\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t.__experimentalSaveSpecifiedEntityEdits(\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'site',\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\tsiteItemsToSave\n\t\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\tregistry\n\t\t\t.dispatch( blockEditorStore )\n\t\t\t.__unstableMarkLastChangeAsPersistent();\n\t\tPromise.all( pendingSavedRecords )\n\t\t\t.then( ( values ) => {\n\t\t\t\treturn onSave ? onSave( values ) : values;\n\t\t\t} )\n\t\t\t.then( ( values ) => {\n\t\t\t\tif (\n\t\t\t\t\tvalues.some( ( value ) => typeof value === 'undefined' )\n\t\t\t\t) {\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t\t.createErrorNotice( __( 'Saving failed.' ) );\n\t\t\t\t} else {\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t\t.createSuccessNotice( __( 'Site updated.' ), {\n\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\tid: saveNoticeId,\n\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: __( 'View site' ),\n\t\t\t\t\t\t\t\t\turl: homeUrl,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.catch( ( error ) =>\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createErrorNotice(\n\t\t\t\t\t\t`${ __( 'Saving failed.' ) } ${ error }`\n\t\t\t\t\t)\n\t\t\t);\n\t};\n\n/**\n * Reverts a template to its original theme-provided file.\n *\n * @param {Object} template The template to revert.\n * @param {Object} [options]\n * @param {boolean} [options.allowUndo] Whether to allow the user to undo\n * reverting the template. Default true.\n */\nexport const revertTemplate =\n\t( template, { allowUndo = true } = {} ) =>\n\tasync ( { registry } ) => {\n\t\tconst noticeId = 'edit-site-template-reverted';\n\t\tregistry.dispatch( noticesStore ).removeNotice( noticeId );\n\t\tif ( ! isTemplateRevertable( template ) ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice( __( 'This template is not revertable.' ), {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tconst templateEntityConfig = registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getEntityConfig( 'postType', template.type );\n\n\t\t\tif ( ! templateEntityConfig ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createErrorNotice(\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'The editor has encountered an unexpected error. Please reload.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{ type: 'snackbar' }\n\t\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst fileTemplatePath = addQueryArgs(\n\t\t\t\t`${ templateEntityConfig.baseURL }/${ template.id }`,\n\t\t\t\t{ context: 'edit', source: 'theme' }\n\t\t\t);\n\n\t\t\tconst fileTemplate = await apiFetch( { path: fileTemplatePath } );\n\t\t\tif ( ! fileTemplate ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createErrorNotice(\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'The editor has encountered an unexpected error. Please reload.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{ type: 'snackbar' }\n\t\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst serializeBlocks = ( {\n\t\t\t\tblocks: blocksForSerialization = [],\n\t\t\t} ) => __unstableSerializeAndClean( blocksForSerialization );\n\n\t\t\tconst edited = registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getEditedEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\ttemplate.type,\n\t\t\t\t\ttemplate.id\n\t\t\t\t);\n\n\t\t\t// We are fixing up the undo level here to make sure we can undo\n\t\t\t// the revert in the header toolbar correctly.\n\t\t\tregistry.dispatch( coreStore ).editEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\ttemplate.type,\n\t\t\t\ttemplate.id,\n\t\t\t\t{\n\t\t\t\t\tcontent: serializeBlocks, // Required to make the `undo` behave correctly.\n\t\t\t\t\tblocks: edited.blocks, // Required to revert the blocks in the editor.\n\t\t\t\t\tsource: 'custom', // required to avoid turning the editor into a dirty state\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tundoIgnore: true, // Required to merge this edit with the last undo level.\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tconst blocks = parse( fileTemplate?.content?.raw );\n\t\t\tregistry\n\t\t\t\t.dispatch( coreStore )\n\t\t\t\t.editEntityRecord( 'postType', template.type, fileTemplate.id, {\n\t\t\t\t\tcontent: serializeBlocks,\n\t\t\t\t\tblocks,\n\t\t\t\t\tsource: 'theme',\n\t\t\t\t} );\n\n\t\t\tif ( allowUndo ) {\n\t\t\t\tconst undoRevert = () => {\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t\t.editEntityRecord(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\ttemplate.type,\n\t\t\t\t\t\t\tedited.id,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcontent: serializeBlocks,\n\t\t\t\t\t\t\t\tblocks: edited.blocks,\n\t\t\t\t\t\t\t\tsource: 'custom',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t};\n\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createSuccessNotice( __( 'Template reset.' ), {\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\tid: noticeId,\n\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\t\tonClick: undoRevert,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t} );\n\t\t\t}\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __( 'Template revert failed. Please reload.' );\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t}\n\t};\n\n/**\n * Action that removes an array of templates, template parts or patterns.\n *\n * @param {Array} items An array of template,template part or pattern objects to remove.\n */\nexport const removeTemplates =\n\t( items ) =>\n\tasync ( { registry } ) => {\n\t\tconst isResetting = items.every( ( item ) => item?.has_theme_file );\n\n\t\tconst promiseResult = await Promise.allSettled(\n\t\t\titems.map( ( item ) => {\n\t\t\t\treturn registry\n\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t.deleteEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\titem.type,\n\t\t\t\t\t\titem.id,\n\t\t\t\t\t\t{ force: true },\n\t\t\t\t\t\t{ throwOnError: true }\n\t\t\t\t\t);\n\t\t\t} )\n\t\t);\n\n\t\t// If all the promises were fulfilled with sucess.\n\t\tif ( promiseResult.every( ( { status } ) => status === 'fulfilled' ) ) {\n\t\t\tlet successMessage;\n\n\t\t\tif ( items.length === 1 ) {\n\t\t\t\t// Depending on how the entity was retrieved its title might be\n\t\t\t\t// an object or simple string.\n\t\t\t\tlet title;\n\t\t\t\tif ( typeof items[ 0 ].title === 'string' ) {\n\t\t\t\t\ttitle = items[ 0 ].title;\n\t\t\t\t} else if ( typeof items[ 0 ].title?.rendered === 'string' ) {\n\t\t\t\t\ttitle = items[ 0 ].title?.rendered;\n\t\t\t\t} else if ( typeof items[ 0 ].title?.raw === 'string' ) {\n\t\t\t\t\ttitle = items[ 0 ].title?.raw;\n\t\t\t\t}\n\t\t\t\tsuccessMessage = isResetting\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t/* translators: The template/part's name. */\n\t\t\t\t\t\t\t__( '\"%s\" reset.' ),\n\t\t\t\t\t\t\tdecodeEntities( title )\n\t\t\t\t\t )\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t/* translators: The template/part's name. */\n\t\t\t\t\t\t\t__( '\"%s\" deleted.' ),\n\t\t\t\t\t\t\tdecodeEntities( title )\n\t\t\t\t\t );\n\t\t\t} else {\n\t\t\t\tsuccessMessage = isResetting\n\t\t\t\t\t? __( 'Items reset.' )\n\t\t\t\t\t: __( 'Items deleted.' );\n\t\t\t}\n\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createSuccessNotice( successMessage, {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tid: 'editor-template-deleted-success',\n\t\t\t\t} );\n\t\t} else {\n\t\t\t// If there was at lease one failure.\n\t\t\tlet errorMessage;\n\t\t\t// If we were trying to delete a single template.\n\t\t\tif ( promiseResult.length === 1 ) {\n\t\t\t\tif ( promiseResult[ 0 ].reason?.message ) {\n\t\t\t\t\terrorMessage = promiseResult[ 0 ].reason.message;\n\t\t\t\t} else {\n\t\t\t\t\terrorMessage = isResetting\n\t\t\t\t\t\t? __( 'An error occurred while reverting the item.' )\n\t\t\t\t\t\t: __( 'An error occurred while deleting the item.' );\n\t\t\t\t}\n\t\t\t\t// If we were trying to delete a multiple templates\n\t\t\t} else {\n\t\t\t\tconst errorMessages = new Set();\n\t\t\t\tconst failedPromises = promiseResult.filter(\n\t\t\t\t\t( { status } ) => status === 'rejected'\n\t\t\t\t);\n\t\t\t\tfor ( const failedPromise of failedPromises ) {\n\t\t\t\t\tif ( failedPromise.reason?.message ) {\n\t\t\t\t\t\terrorMessages.add( failedPromise.reason.message );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( errorMessages.size === 0 ) {\n\t\t\t\t\terrorMessage = __(\n\t\t\t\t\t\t'An error occurred while deleting the items.'\n\t\t\t\t\t);\n\t\t\t\t} else if ( errorMessages.size === 1 ) {\n\t\t\t\t\terrorMessage = isResetting\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: an error message */\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'An error occurred while reverting the items: %s'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t[ ...errorMessages ][ 0 ]\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: an error message */\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'An error occurred while deleting the items: %s'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t[ ...errorMessages ][ 0 ]\n\t\t\t\t\t\t );\n\t\t\t\t} else {\n\t\t\t\t\terrorMessage = isResetting\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: a list of comma separated error messages */\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'Some errors occurred while reverting the items: %s'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t[ ...errorMessages ].join( ',' )\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: a list of comma separated error messages */\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'Some errors occurred while deleting the items: %s'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t[ ...errorMessages ].join( ',' )\n\t\t\t\t\t\t );\n\t\t\t\t}\n\t\t\t}\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t}\n\t};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASH,KAAK,IAAII,YAAY,QAAQ,oBAAoB;AAC1D,SAASJ,KAAK,IAAIK,gBAAgB,QAAQ,yBAAyB;AACnE,SAASL,KAAK,IAAIM,gBAAgB,QAAQ,wBAAwB;AAClE,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,OAAOC,QAAQ,MAAM,sBAAsB;AAC3C,SAASC,KAAK,EAAEC,2BAA2B,QAAQ,mBAAmB;AACtE,SAASC,cAAc,QAAQ,0BAA0B;;AAEzD;AACA;AACA;AACA,OAAOC,oBAAoB,MAAM,gCAAgC;AACjE,cAAc,oCAAoC;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,oBAAoBA,CAAEC,EAAE,EAAG;EAC1C,OAAO;IACNC,IAAI,EAAE,yBAAyB;IAC/BD;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,cAAc,GACxBC,QAAQ,IACV,OAAQ;EAAEC,MAAM;EAAEC,QAAQ;EAAEC;AAAS,CAAC,KAAM;EAC3C,MAAMC,aAAa,GAAG,MAAMD,QAAQ,CAClCD,QAAQ,CAAElB,SAAU,CAAC,CACrBqB,gBAAgB,CAAE,UAAU,EAAE,aAAa,EAAEL,QAAS,CAAC;EACzDG,QAAQ,CACND,QAAQ,CAAElB,SAAU,CAAC,CACrBsB,gBAAgB,CAChB,UAAU,EACVL,MAAM,CAACM,k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M,KAAK,UAC9B,CAAC;MACD,KAAM,MAAMwD,aAAa,IAAID,cAAc,EAAG;QAC7C,IAAKC,aAAa,CAACH,MAAM,EAAEjB,OAAO,EAAG;UACpCkB,aAAa,CAACG,GAAG,CAAED,aAAa,CAACH,MAAM,CAACjB,OAAQ,CAAC;QAClD;MACD;MACA,IAAKkB,aAAa,CAACI,IAAI,KAAK,CAAC,EAAG;QAC/BvB,YAAY,GAAGzG,EAAE,CAChB,6CACD,CAAC;MACF,CAAC,MAAM,IAAK4H,aAAa,CAACI,IAAI,KAAK,CAAC,EAAG;QACtCvB,YAAY,GAAGK,WAAW,GACvB7G,OAAO,EACP;QACAD,EAAE,CACD,iDACD,CAAC,EACD,CAAE,GAAG4H,aAAa,CAAE,CAAE,CAAC,CACvB,CAAC,GACD3H,OAAO,EACP;QACAD,EAAE,CACD,gDACD,CAAC,EACD,CAAE,GAAG4H,aAAa,CAAE,CAAE,CAAC,CACvB,CAAC;MACL,CAAC,MAAM;QACNnB,YAAY,GAAGK,WAAW,GACvB7G,OAAO,EACP;QACAD,EAAE,CACD,oDACD,CAAC,EACD,CAAE,GAAG4H,aAAa,CAAE,CAACK,IAAI,CAAE,GAAI,CAC/B,CAAC,GACDhI,OAAO,EACP;QACAD,EAAE,CACD,mDACD,CAAC,EACD,CAAE,GAAG4H,aAAa,CAAE,CAACK,IAAI,CAAE,GAAI,CAC/B,CAAC;MACL;IACD;IACA/G,QAAQ,CACND,QAAQ,CAAEf,YAAa,CAAC,CACxB+E,iBAAiB,CAAEwB,YAAY,EAAE;MAAE5F,IAAI,EAAE;IAAW,CAAE,CAAC;EAC1D;AACD,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["store","coreStore","__","sprintf","noticesStore","blockEditorStore","preferencesStore","addQueryArgs","apiFetch","parse","__unstableSerializeAndClean","decodeEntities","isTemplateRevertable","setCurrentTemplateId","id","type","createTemplate","template","select","dispatch","registry","savedTemplate","saveEntityRecord","editEntityRecord","getCurrentPostType","getCurrentPostId","slug","createSuccessNotice","actions","label","onClick","setRenderingMode","getEditorSettings","defaultRenderingMode","showBlockTypes","blockNames","_registry$select$get","existingBlockNames","get","newBlockNames","filter","Array","isArray","includes","set","hideBlockTypes","_registry$select$get2","mergedBlockNames","Set","saveDirtyEntities","onSave","dirtyEntityRecords","entitiesToSkip","close","PUBLISH_ON_SAVE_ENTITIES","kind","name","saveNoticeId","homeUrl","getUnstableBase","home","removeNotice","entitiesToSave","key","property","some","elt","siteItemsToSave","pendingSavedRecords","forEach","push","typeToPublish","status","saveEditedEntityRecord","length","__experimentalSaveSpecifiedEntityEdits","undefined","__unstableMarkLastChangeAsPersistent","Promise","all","then","values","value","createErrorNotice","url","catch","error","revertTemplate","allowUndo","noticeId","templateEntityConfig","getEntityConfig","fileTemplatePath","baseURL","context","source","origin","fileTemplate","path","serializeBlocks","blocks","blocksForSerialization","edited","getEditedEntityRecord","content","undoIgnore","raw","undoRevert","errorMessage","message","code","removeTemplates","items","isResetting","every","item","has_theme_file","promiseResult","allSettled","map","deleteEntityRecord","force","throwOnError","successMessage","title","rendered","reason","errorMessages","failedPromises","failedPromise","add","size","join"],"sources":["@wordpress/editor/src/store/private-actions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { addQueryArgs } from '@wordpress/url';\nimport apiFetch from '@wordpress/api-fetch';\nimport { parse, __unstableSerializeAndClean } from '@wordpress/blocks';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport isTemplateRevertable from './utils/is-template-revertable';\nexport * from '../dataviews/store/private-actions';\n\n/**\n * Returns an action object used to set which template is currently being used/edited.\n *\n * @param {string} id Template Id.\n *\n * @return {Object} Action object.\n */\nexport function setCurrentTemplateId( id ) {\n\treturn {\n\t\ttype: 'SET_CURRENT_TEMPLATE_ID',\n\t\tid,\n\t};\n}\n\n/**\n * Create a block based template.\n *\n * @param {Object?} template Template to create and assign.\n */\nexport const createTemplate =\n\t( template ) =>\n\tasync ( { select, dispatch, registry } ) => {\n\t\tconst savedTemplate = await registry\n\t\t\t.dispatch( coreStore )\n\t\t\t.saveEntityRecord( 'postType', 'wp_template', template );\n\t\tregistry\n\t\t\t.dispatch( coreStore )\n\t\t\t.editEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tselect.getCurrentPostType(),\n\t\t\t\tselect.getCurrentPostId(),\n\t\t\t\t{\n\t\t\t\t\ttemplate: savedTemplate.slug,\n\t\t\t\t}\n\t\t\t);\n\t\tregistry\n\t\t\t.dispatch( noticesStore )\n\t\t\t.createSuccessNotice(\n\t\t\t\t__( \"Custom template created. You're in template mode now.\" ),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Go back' ),\n\t\t\t\t\t\t\tonClick: () =>\n\t\t\t\t\t\t\t\tdispatch.setRenderingMode(\n\t\t\t\t\t\t\t\t\tselect.getEditorSettings()\n\t\t\t\t\t\t\t\t\t\t.defaultRenderingMode\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}\n\t\t\t);\n\t\treturn savedTemplate;\n\t};\n\n/**\n * Update the provided block types to be visible.\n *\n * @param {string[]} blockNames Names of block types to show.\n */\nexport const showBlockTypes =\n\t( blockNames ) =>\n\t( { registry } ) => {\n\t\tconst existingBlockNames =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core', 'hiddenBlockTypes' ) ?? [];\n\n\t\tconst newBlockNames = existingBlockNames.filter(\n\t\t\t( type ) =>\n\t\t\t\t! (\n\t\t\t\t\tArray.isArray( blockNames ) ? blockNames : [ blockNames ]\n\t\t\t\t).includes( type )\n\t\t);\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'hiddenBlockTypes', newBlockNames );\n\t};\n\n/**\n * Update the provided block types to be hidden.\n *\n * @param {string[]} blockNames Names of block types to hide.\n */\nexport const hideBlockTypes =\n\t( blockNames ) =>\n\t( { registry } ) => {\n\t\tconst existingBlockNames =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core', 'hiddenBlockTypes' ) ?? [];\n\n\t\tconst mergedBlockNames = new Set( [\n\t\t\t...existingBlockNames,\n\t\t\t...( Array.isArray( blockNames ) ? blockNames : [ blockNames ] ),\n\t\t] );\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'hiddenBlockTypes', [ ...mergedBlockNames ] );\n\t};\n\n/**\n * Save entity records marked as dirty.\n *\n * @param {Object} options Options for the action.\n * @param {Function} [options.onSave] Callback when saving happens.\n * @param {object[]} [options.dirtyEntityRecords] Array of dirty entities.\n * @param {object[]} [options.entitiesToSkip] Array of entities to skip saving.\n * @param {Function} [options.close] Callback when the actions is called. It should be consolidated with `onSave`.\n */\nexport const saveDirtyEntities =\n\t( { onSave, dirtyEntityRecords = [], entitiesToSkip = [], close } = {} ) =>\n\t( { registry } ) => {\n\t\tconst PUBLISH_ON_SAVE_ENTITIES = [\n\t\t\t{ kind: 'postType', name: 'wp_navigation' },\n\t\t];\n\t\tconst saveNoticeId = 'site-editor-save-success';\n\t\tconst homeUrl = registry.select( coreStore ).getUnstableBase()?.home;\n\t\tregistry.dispatch( noticesStore ).removeNotice( saveNoticeId );\n\t\tconst entitiesToSave = dirtyEntityRecords.filter(\n\t\t\t( { kind, name, key, property } ) => {\n\t\t\t\treturn ! entitiesToSkip.some(\n\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\telt.kind === kind &&\n\t\t\t\t\t\telt.name === name &&\n\t\t\t\t\t\telt.key === key &&\n\t\t\t\t\t\telt.property === property\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\t\tclose?.( entitiesToSave );\n\t\tconst siteItemsToSave = [];\n\t\tconst pendingSavedRecords = [];\n\t\tentitiesToSave.forEach( ( { kind, name, key, property } ) => {\n\t\t\tif ( 'root' === kind && 'site' === name ) {\n\t\t\t\tsiteItemsToSave.push( property );\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tPUBLISH_ON_SAVE_ENTITIES.some(\n\t\t\t\t\t\t( typeToPublish ) =>\n\t\t\t\t\t\t\ttypeToPublish.kind === kind &&\n\t\t\t\t\t\t\ttypeToPublish.name === name\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t\t.editEntityRecord( kind, name, key, {\n\t\t\t\t\t\t\tstatus: 'publish',\n\t\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tpendingSavedRecords.push(\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t\t.saveEditedEntityRecord( kind, name, key )\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\t\tif ( siteItemsToSave.length ) {\n\t\t\tpendingSavedRecords.push(\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t.__experimentalSaveSpecifiedEntityEdits(\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'site',\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\tsiteItemsToSave\n\t\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\tregistry\n\t\t\t.dispatch( blockEditorStore )\n\t\t\t.__unstableMarkLastChangeAsPersistent();\n\t\tPromise.all( pendingSavedRecords )\n\t\t\t.then( ( values ) => {\n\t\t\t\treturn onSave ? onSave( values ) : values;\n\t\t\t} )\n\t\t\t.then( ( values ) => {\n\t\t\t\tif (\n\t\t\t\t\tvalues.some( ( value ) => typeof value === 'undefined' )\n\t\t\t\t) {\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t\t.createErrorNotice( __( 'Saving failed.' ) );\n\t\t\t\t} else {\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t\t.createSuccessNotice( __( 'Site updated.' ), {\n\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\tid: saveNoticeId,\n\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: __( 'View site' ),\n\t\t\t\t\t\t\t\t\turl: homeUrl,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.catch( ( error ) =>\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createErrorNotice(\n\t\t\t\t\t\t`${ __( 'Saving failed.' ) } ${ error }`\n\t\t\t\t\t)\n\t\t\t);\n\t};\n\n/**\n * Reverts a template to its original theme-provided file.\n *\n * @param {Object} template The template to revert.\n * @param {Object} [options]\n * @param {boolean} [options.allowUndo] Whether to allow the user to undo\n * reverting the template. Default true.\n */\nexport const revertTemplate =\n\t( template, { allowUndo = true } = {} ) =>\n\tasync ( { registry } ) => {\n\t\tconst noticeId = 'edit-site-template-reverted';\n\t\tregistry.dispatch( noticesStore ).removeNotice( noticeId );\n\t\tif ( ! isTemplateRevertable( template ) ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice( __( 'This template is not revertable.' ), {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tconst templateEntityConfig = registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getEntityConfig( 'postType', template.type );\n\n\t\t\tif ( ! templateEntityConfig ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createErrorNotice(\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'The editor has encountered an unexpected error. Please reload.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{ type: 'snackbar' }\n\t\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst fileTemplatePath = addQueryArgs(\n\t\t\t\t`${ templateEntityConfig.baseURL }/${ template.id }`,\n\t\t\t\t{ context: 'edit', source: template.origin }\n\t\t\t);\n\n\t\t\tconst fileTemplate = await apiFetch( { path: fileTemplatePath } );\n\t\t\tif ( ! fileTemplate ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createErrorNotice(\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'The editor has encountered an unexpected error. Please reload.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{ type: 'snackbar' }\n\t\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst serializeBlocks = ( {\n\t\t\t\tblocks: blocksForSerialization = [],\n\t\t\t} ) => __unstableSerializeAndClean( blocksForSerialization );\n\n\t\t\tconst edited = registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getEditedEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\ttemplate.type,\n\t\t\t\t\ttemplate.id\n\t\t\t\t);\n\n\t\t\t// We are fixing up the undo level here to make sure we can undo\n\t\t\t// the revert in the header toolbar correctly.\n\t\t\tregistry.dispatch( coreStore ).editEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\ttemplate.type,\n\t\t\t\ttemplate.id,\n\t\t\t\t{\n\t\t\t\t\tcontent: serializeBlocks, // Required to make the `undo` behave correctly.\n\t\t\t\t\tblocks: edited.blocks, // Required to revert the blocks in the editor.\n\t\t\t\t\tsource: 'custom', // required to avoid turning the editor into a dirty state\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tundoIgnore: true, // Required to merge this edit with the last undo level.\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tconst blocks = parse( fileTemplate?.content?.raw );\n\t\t\tregistry\n\t\t\t\t.dispatch( coreStore )\n\t\t\t\t.editEntityRecord( 'postType', template.type, fileTemplate.id, {\n\t\t\t\t\tcontent: serializeBlocks,\n\t\t\t\t\tblocks,\n\t\t\t\t\tsource: 'theme',\n\t\t\t\t} );\n\n\t\t\tif ( allowUndo ) {\n\t\t\t\tconst undoRevert = () => {\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t\t.editEntityRecord(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\ttemplate.type,\n\t\t\t\t\t\t\tedited.id,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcontent: serializeBlocks,\n\t\t\t\t\t\t\t\tblocks: edited.blocks,\n\t\t\t\t\t\t\t\tsource: 'custom',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t};\n\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createSuccessNotice( __( 'Template reset.' ), {\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\tid: noticeId,\n\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\t\tonClick: undoRevert,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t} );\n\t\t\t}\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __( 'Template revert failed. Please reload.' );\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t}\n\t};\n\n/**\n * Action that removes an array of templates, template parts or patterns.\n *\n * @param {Array} items An array of template,template part or pattern objects to remove.\n */\nexport const removeTemplates =\n\t( items ) =>\n\tasync ( { registry } ) => {\n\t\tconst isResetting = items.every( ( item ) => item?.has_theme_file );\n\n\t\tconst promiseResult = await Promise.allSettled(\n\t\t\titems.map( ( item ) => {\n\t\t\t\treturn registry\n\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t.deleteEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\titem.type,\n\t\t\t\t\t\titem.id,\n\t\t\t\t\t\t{ force: true },\n\t\t\t\t\t\t{ throwOnError: true }\n\t\t\t\t\t);\n\t\t\t} )\n\t\t);\n\n\t\t// If all the promises were fulfilled with sucess.\n\t\tif ( promiseResult.every( ( { status } ) => status === 'fulfilled' ) ) {\n\t\t\tlet successMessage;\n\n\t\t\tif ( items.length === 1 ) {\n\t\t\t\t// Depending on how the entity was retrieved its title might be\n\t\t\t\t// an object or simple string.\n\t\t\t\tlet title;\n\t\t\t\tif ( typeof items[ 0 ].title === 'string' ) {\n\t\t\t\t\ttitle = items[ 0 ].title;\n\t\t\t\t} else if ( typeof items[ 0 ].title?.rendered === 'string' ) {\n\t\t\t\t\ttitle = items[ 0 ].title?.rendered;\n\t\t\t\t} else if ( typeof items[ 0 ].title?.raw === 'string' ) {\n\t\t\t\t\ttitle = items[ 0 ].title?.raw;\n\t\t\t\t}\n\t\t\t\tsuccessMessage = isResetting\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t/* translators: The template/part's name. */\n\t\t\t\t\t\t\t__( '\"%s\" reset.' ),\n\t\t\t\t\t\t\tdecodeEntities( title )\n\t\t\t\t\t )\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t/* translators: The template/part's name. */\n\t\t\t\t\t\t\t__( '\"%s\" deleted.' ),\n\t\t\t\t\t\t\tdecodeEntities( title )\n\t\t\t\t\t );\n\t\t\t} else {\n\t\t\t\tsuccessMessage = isResetting\n\t\t\t\t\t? __( 'Items reset.' )\n\t\t\t\t\t: __( 'Items deleted.' );\n\t\t\t}\n\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createSuccessNotice( successMessage, {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tid: 'editor-template-deleted-success',\n\t\t\t\t} );\n\t\t} else {\n\t\t\t// If there was at lease one failure.\n\t\t\tlet errorMessage;\n\t\t\t// If we were trying to delete a single template.\n\t\t\tif ( promiseResult.length === 1 ) {\n\t\t\t\tif ( promiseResult[ 0 ].reason?.message ) {\n\t\t\t\t\terrorMessage = promiseResult[ 0 ].reason.message;\n\t\t\t\t} else {\n\t\t\t\t\terrorMessage = isResetting\n\t\t\t\t\t\t? __( 'An error occurred while reverting the item.' )\n\t\t\t\t\t\t: __( 'An error occurred while deleting the item.' );\n\t\t\t\t}\n\t\t\t\t// If we were trying to delete a multiple templates\n\t\t\t} else {\n\t\t\t\tconst errorMessages = new Set();\n\t\t\t\tconst failedPromises = promiseResult.filter(\n\t\t\t\t\t( { status } ) => status === 'rejected'\n\t\t\t\t);\n\t\t\t\tfor ( const failedPromise of failedPromises ) {\n\t\t\t\t\tif ( failedPromise.reason?.message ) {\n\t\t\t\t\t\terrorMessages.add( failedPromise.reason.message );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( errorMessages.size === 0 ) {\n\t\t\t\t\terrorMessage = __(\n\t\t\t\t\t\t'An error occurred while deleting the items.'\n\t\t\t\t\t);\n\t\t\t\t} else if ( errorMessages.size === 1 ) {\n\t\t\t\t\terrorMessage = isResetting\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: an error message */\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'An error occurred while reverting the items: %s'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t[ ...errorMessages ][ 0 ]\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: an error message */\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'An error occurred while deleting the items: %s'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t[ ...errorMessages ][ 0 ]\n\t\t\t\t\t\t );\n\t\t\t\t} else {\n\t\t\t\t\terrorMessage = isResetting\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: a list of comma separated error messages */\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'Some errors occurred while reverting the items: %s'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t[ ...errorMessages ].join( ',' )\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: a list of comma separated error messages */\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'Some errors occurred while deleting the items: %s'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t[ ...errorMessages ].join( ',' )\n\t\t\t\t\t\t );\n\t\t\t\t}\n\t\t\t}\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t}\n\t};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASH,KAAK,IAAII,YAAY,QAAQ,oBAAoB;AAC1D,SAASJ,KAAK,IAAIK,gBAAgB,QAAQ,yBAAyB;AACnE,SAASL,KAAK,IAAIM,gBAAgB,QAAQ,wBAAwB;AAClE,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,OAAOC,QAAQ,MAAM,sBAAsB;AAC3C,SAASC,KAAK,EAAEC,2BAA2B,QAAQ,mBAAmB;AACtE,SAASC,cAAc,QAAQ,0BAA0B;;AAEzD;AACA;AACA;AACA,OAAOC,oBAAoB,MAAM,gCAAgC;AACjE,cAAc,oCAAoC;;AAElD;AACA;AACA;AACA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I,CAC/B,CAAC,GACDjI,OAAO,EACP;QACAD,EAAE,CACD,mDACD,CAAC,EACD,CAAE,GAAG6H,aAAa,CAAE,CAACK,IAAI,CAAE,GAAI,CAC/B,CAAC;MACL;IACD;IACAhH,QAAQ,CACND,QAAQ,CAAEf,YAAa,CAAC,CACxB+E,iBAAiB,CAAEyB,YAAY,EAAE;MAAE7F,IAAI,EAAE;IAAW,CAAE,CAAC;EAC1D;AACD,CAAC","ignoreList":[]}
|
|
@@ -15,6 +15,6 @@ export default function isTemplateRevertable(templateOrTemplatePart) {
|
|
|
15
15
|
if (!templateOrTemplatePart) {
|
|
16
16
|
return false;
|
|
17
17
|
}
|
|
18
|
-
return templateOrTemplatePart.source === TEMPLATE_ORIGINS.custom && templateOrTemplatePart
|
|
18
|
+
return templateOrTemplatePart.source === TEMPLATE_ORIGINS.custom && (Boolean(templateOrTemplatePart?.plugin) || templateOrTemplatePart?.has_theme_file);
|
|
19
19
|
}
|
|
20
20
|
//# sourceMappingURL=is-template-revertable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TEMPLATE_ORIGINS","isTemplateRevertable","templateOrTemplatePart","source","custom","has_theme_file"],"sources":["@wordpress/editor/src/store/utils/is-template-revertable.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { TEMPLATE_ORIGINS } from '../constants';\n\n// Copy of the function from packages/edit-site/src/utils/is-template-revertable.js\n\n/**\n * Check if a template or template part is revertable to its original theme-provided file.\n *\n * @param {Object} templateOrTemplatePart The entity to check.\n * @return {boolean} Whether the entity is revertable.\n */\nexport default function isTemplateRevertable( templateOrTemplatePart ) {\n\tif ( ! templateOrTemplatePart ) {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\ttemplateOrTemplatePart.source === TEMPLATE_ORIGINS.custom &&\n\t\ttemplateOrTemplatePart
|
|
1
|
+
{"version":3,"names":["TEMPLATE_ORIGINS","isTemplateRevertable","templateOrTemplatePart","source","custom","Boolean","plugin","has_theme_file"],"sources":["@wordpress/editor/src/store/utils/is-template-revertable.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { TEMPLATE_ORIGINS } from '../constants';\n\n// Copy of the function from packages/edit-site/src/utils/is-template-revertable.js\n\n/**\n * Check if a template or template part is revertable to its original theme-provided file.\n *\n * @param {Object} templateOrTemplatePart The entity to check.\n * @return {boolean} Whether the entity is revertable.\n */\nexport default function isTemplateRevertable( templateOrTemplatePart ) {\n\tif ( ! templateOrTemplatePart ) {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\ttemplateOrTemplatePart.source === TEMPLATE_ORIGINS.custom &&\n\t\t( Boolean( templateOrTemplatePart?.plugin ) ||\n\t\t\ttemplateOrTemplatePart?.has_theme_file )\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gBAAgB,QAAQ,cAAc;;AAE/C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,oBAAoBA,CAAEC,sBAAsB,EAAG;EACtE,IAAK,CAAEA,sBAAsB,EAAG;IAC/B,OAAO,KAAK;EACb;EAEA,OACCA,sBAAsB,CAACC,MAAM,KAAKH,gBAAgB,CAACI,MAAM,KACvDC,OAAO,CAAEH,sBAAsB,EAAEI,MAAO,CAAC,IAC1CJ,sBAAsB,EAAEK,cAAc,CAAE;AAE3C","ignoreList":[]}
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
* Radius scale.
|
|
39
39
|
*/
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Elevation scale.
|
|
42
42
|
*/
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Dimensions.
|
|
45
45
|
*/
|
|
46
46
|
/**
|
|
47
47
|
* Editor widths.
|
|
@@ -1509,13 +1509,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
1509
1509
|
min-width: 248px;
|
|
1510
1510
|
margin: 8px;
|
|
1511
1511
|
}
|
|
1512
|
-
.editor-post-discussion__panel-dialog .editor-post-discussion .components-radio-control__option {
|
|
1513
|
-
align-items: flex-start;
|
|
1514
|
-
}
|
|
1515
|
-
.editor-post-discussion__panel-dialog .editor-post-discussion .components-radio-control__label .components-text {
|
|
1516
|
-
display: block;
|
|
1517
|
-
margin-top: 4px;
|
|
1518
|
-
}
|
|
1519
1512
|
|
|
1520
1513
|
.editor-post-discussion__panel-toggle .components-text {
|
|
1521
1514
|
color: inherit;
|
|
@@ -1635,10 +1628,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
1635
1628
|
margin: 8px;
|
|
1636
1629
|
}
|
|
1637
1630
|
|
|
1638
|
-
.editor-post-format__options .components-base-control__field > .components-v-stack {
|
|
1639
|
-
gap: 12px;
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
1631
|
.editor-post-last-edited-panel {
|
|
1643
1632
|
color: #757575;
|
|
1644
1633
|
}
|
|
@@ -2009,16 +1998,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
2009
1998
|
min-width: 320px;
|
|
2010
1999
|
padding: 16px;
|
|
2011
2000
|
}
|
|
2012
|
-
.editor-change-status__content .editor-change-status__options .components-base-control__field > .components-v-stack {
|
|
2013
|
-
gap: 12px;
|
|
2014
|
-
}
|
|
2015
|
-
.editor-change-status__content .editor-change-status__options .components-radio-control__option {
|
|
2016
|
-
align-items: flex-start;
|
|
2017
|
-
}
|
|
2018
|
-
.editor-change-status__content .editor-change-status__options label .components-text {
|
|
2019
|
-
display: block;
|
|
2020
|
-
margin-top: 4px;
|
|
2021
|
-
}
|
|
2022
2001
|
.editor-change-status__content .editor-change-status__password-legend {
|
|
2023
2002
|
padding: 0;
|
|
2024
2003
|
margin-bottom: 8px;
|
|
@@ -2513,14 +2492,6 @@ textarea.editor-post-text-editor:-ms-input-placeholder {
|
|
|
2513
2492
|
padding: 16px;
|
|
2514
2493
|
}
|
|
2515
2494
|
|
|
2516
|
-
.editor-site-discussion__options .components-radio-control__option {
|
|
2517
|
-
align-items: flex-start;
|
|
2518
|
-
}
|
|
2519
|
-
.editor-site-discussion__options label .components-text {
|
|
2520
|
-
display: block;
|
|
2521
|
-
margin-top: 4px;
|
|
2522
|
-
}
|
|
2523
|
-
|
|
2524
2495
|
.table-of-contents__popover.components-popover .components-popover__content {
|
|
2525
2496
|
min-width: 380px;
|
|
2526
2497
|
}
|
package/build-style/style.css
CHANGED
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
* Radius scale.
|
|
39
39
|
*/
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Elevation scale.
|
|
42
42
|
*/
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Dimensions.
|
|
45
45
|
*/
|
|
46
46
|
/**
|
|
47
47
|
* Editor widths.
|
|
@@ -1509,13 +1509,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
1509
1509
|
min-width: 248px;
|
|
1510
1510
|
margin: 8px;
|
|
1511
1511
|
}
|
|
1512
|
-
.editor-post-discussion__panel-dialog .editor-post-discussion .components-radio-control__option {
|
|
1513
|
-
align-items: flex-start;
|
|
1514
|
-
}
|
|
1515
|
-
.editor-post-discussion__panel-dialog .editor-post-discussion .components-radio-control__label .components-text {
|
|
1516
|
-
display: block;
|
|
1517
|
-
margin-top: 4px;
|
|
1518
|
-
}
|
|
1519
1512
|
|
|
1520
1513
|
.editor-post-discussion__panel-toggle .components-text {
|
|
1521
1514
|
color: inherit;
|
|
@@ -1635,10 +1628,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
1635
1628
|
margin: 8px;
|
|
1636
1629
|
}
|
|
1637
1630
|
|
|
1638
|
-
.editor-post-format__options .components-base-control__field > .components-v-stack {
|
|
1639
|
-
gap: 12px;
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
1631
|
.editor-post-last-edited-panel {
|
|
1643
1632
|
color: #757575;
|
|
1644
1633
|
}
|
|
@@ -2009,16 +1998,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
2009
1998
|
min-width: 320px;
|
|
2010
1999
|
padding: 16px;
|
|
2011
2000
|
}
|
|
2012
|
-
.editor-change-status__content .editor-change-status__options .components-base-control__field > .components-v-stack {
|
|
2013
|
-
gap: 12px;
|
|
2014
|
-
}
|
|
2015
|
-
.editor-change-status__content .editor-change-status__options .components-radio-control__option {
|
|
2016
|
-
align-items: flex-start;
|
|
2017
|
-
}
|
|
2018
|
-
.editor-change-status__content .editor-change-status__options label .components-text {
|
|
2019
|
-
display: block;
|
|
2020
|
-
margin-top: 4px;
|
|
2021
|
-
}
|
|
2022
2001
|
.editor-change-status__content .editor-change-status__password-legend {
|
|
2023
2002
|
padding: 0;
|
|
2024
2003
|
margin-bottom: 8px;
|
|
@@ -2517,14 +2496,6 @@ textarea.editor-post-text-editor:-ms-input-placeholder {
|
|
|
2517
2496
|
padding: 16px;
|
|
2518
2497
|
}
|
|
2519
2498
|
|
|
2520
|
-
.editor-site-discussion__options .components-radio-control__option {
|
|
2521
|
-
align-items: flex-start;
|
|
2522
|
-
}
|
|
2523
|
-
.editor-site-discussion__options label .components-text {
|
|
2524
|
-
display: block;
|
|
2525
|
-
margin-top: 4px;
|
|
2526
|
-
}
|
|
2527
|
-
|
|
2528
2499
|
.table-of-contents__popover.components-popover .components-popover__content {
|
|
2529
2500
|
min-width: 380px;
|
|
2530
2501
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/create-template-part-modal/index.js"],"names":[],"mappings":"AAwCA;;;gCAqBC;AAED;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/create-template-part-modal/index.js"],"names":[],"mappings":"AAwCA;;;gCAqBC;AAED;;;;;;;;gCAgJC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/global-styles-provider/index.js"],"names":[],"mappings":"AAuBA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/global-styles-provider/index.js"],"names":[],"mappings":"AAuBA,mEAoBC;AAqHD;;;;;;4BAtDa,WAAS,MAAM,YAEf,MAAM;;;;;;;4BAFN,WAAS,MAAM,YAEf,MAAM;EAmFlB;AAED;;uCAWC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/inserter-sidebar/index.js"],"names":[],"mappings":"AAsBA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/inserter-sidebar/index.js"],"names":[],"mappings":"AAsBA,uEA+FC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parent.d.ts","sourceRoot":"","sources":["../../../src/components/page-attributes/parent.js"],"names":[],"mappings":"AAsDA;;;;;GAKG;AACH,wCAFY,SAAS,GAAC,IAAI,CAqIzB;AAgCD,
|
|
1
|
+
{"version":3,"file":"parent.d.ts","sourceRoot":"","sources":["../../../src/components/page-attributes/parent.js"],"names":[],"mappings":"AAsDA;;;;;GAKG;AACH,wCAFY,SAAS,GAAC,IAAI,CAqIzB;AAgCD,yDA2EC;AAlQM,qEAYN"}
|
|
@@ -2,30 +2,5 @@ export function usePostActions({ postType, onActionPerformed, context }: {
|
|
|
2
2
|
postType: any;
|
|
3
3
|
onActionPerformed: any;
|
|
4
4
|
context: any;
|
|
5
|
-
}): any
|
|
6
|
-
export namespace duplicatePatternAction {
|
|
7
|
-
let id: string;
|
|
8
|
-
let label: string;
|
|
9
|
-
function isEligible(item: any): boolean;
|
|
10
|
-
let modalHeader: string;
|
|
11
|
-
function RenderModal({ items, closeModal }: {
|
|
12
|
-
items: any;
|
|
13
|
-
closeModal: any;
|
|
14
|
-
}): import("react").JSX.Element;
|
|
15
|
-
}
|
|
16
|
-
export namespace duplicateTemplatePartAction {
|
|
17
|
-
let id_1: string;
|
|
18
|
-
export { id_1 as id };
|
|
19
|
-
let label_1: string;
|
|
20
|
-
export { label_1 as label };
|
|
21
|
-
export function isEligible_1(item: any): boolean;
|
|
22
|
-
export { isEligible_1 as isEligible };
|
|
23
|
-
let modalHeader_1: string;
|
|
24
|
-
export { modalHeader_1 as modalHeader };
|
|
25
|
-
export function RenderModal_1({ items, closeModal }: {
|
|
26
|
-
items: any;
|
|
27
|
-
closeModal: any;
|
|
28
|
-
}): import("react").JSX.Element;
|
|
29
|
-
export { RenderModal_1 as RenderModal };
|
|
30
|
-
}
|
|
5
|
+
}): any;
|
|
31
6
|
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/components/post-actions/actions.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/components/post-actions/actions.js"],"names":[],"mappings":"AAYA;;;;QA+EC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export default function PostActions({
|
|
1
|
+
export default function PostActions({ postType, postId, onActionPerformed }: {
|
|
2
|
+
postType: any;
|
|
3
|
+
postId: any;
|
|
2
4
|
onActionPerformed: any;
|
|
3
|
-
buttonProps: any;
|
|
4
5
|
}): import("react").JSX.Element;
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-actions/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-actions/index.js"],"names":[],"mappings":"AA4BA;;;;gCA6DC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export default function PostCardPanel({
|
|
2
|
-
|
|
1
|
+
export default function PostCardPanel({ postType, postId, onActionPerformed, }: {
|
|
2
|
+
postType: any;
|
|
3
|
+
postId: any;
|
|
4
|
+
onActionPerformed: any;
|
|
3
5
|
}): import("react").JSX.Element;
|
|
4
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-card-panel/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-card-panel/index.js"],"names":[],"mappings":"AA8BA;;;;gCA0FC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-slug/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-slug/index.js"],"names":[],"mappings":"AA6DA;;;;GAIG;AACH,oCAFY,SAAS,CAQpB"}
|
|
@@ -50,23 +50,7 @@ declare const _default: {
|
|
|
50
50
|
};
|
|
51
51
|
shouldComponentUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
52
52
|
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
53
|
-
getSnapshotBeforeUpdate
|
|
54
|
-
/**
|
|
55
|
-
* Find term by parent id or name.
|
|
56
|
-
*
|
|
57
|
-
* @param {Object[]} terms Array of Terms.
|
|
58
|
-
* @param {number|string} parent id.
|
|
59
|
-
* @param {string} name Term name.
|
|
60
|
-
* @return {Object} Term object.
|
|
61
|
-
*/
|
|
62
|
-
? /**
|
|
63
|
-
* Find term by parent id or name.
|
|
64
|
-
*
|
|
65
|
-
* @param {Object[]} terms Array of Terms.
|
|
66
|
-
* @param {number|string} parent id.
|
|
67
|
-
* @param {string} name Term name.
|
|
68
|
-
* @return {Object} Term object.
|
|
69
|
-
*/(prevProps: Readonly<{}>, prevState: Readonly<{}>): any | null;
|
|
53
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>): any | null;
|
|
70
54
|
componentDidUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
71
55
|
componentWillMount?(): void;
|
|
72
56
|
UNSAFE_componentWillMount?(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hierarchical-term-selector.d.ts","sourceRoot":"","sources":["../../../src/components/post-taxonomies/hierarchical-term-selector.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hierarchical-term-selector.d.ts","sourceRoot":"","sources":["../../../src/components/post-taxonomies/hierarchical-term-selector.js"],"names":[],"mappings":"AA2CA;;;;;;;GAOG;AACH,0CALW,MAAM,EAAE,SACR,MAAM,EAAE,GAEP,MAAM,EAAE,CAqCnB;AAED;;;;;;;GAOG;AACH,gCALW,MAAM,EAAE,UACR,MAAM,GAAC,MAAM,QACb,MAAM,GACL,MAAM,CAUjB;AAED;;;;;GAKG;AACH,8CAHW,MAAM,GACL,CAAC,CAAS,IAAM,EAAN,MAAM,KAAG,CAAC,MAAM,GAAC,OAAO,CAAC,CAAC,CAmC/C;AAED;;;;;;GAMG;AACH,mDAHG;IAAsB,IAAI,EAAlB,MAAM;CACd,GAAS,OAAO,CAqUlB;;;;;;;yBAxae,OAAO;;wJASC,CAAC;4BAGS,CAAC;;;;kCAIJ,OAAO;;6BAIJ,CAAC;yBASjC,CAAC,iCAC6B,OAChC;+BACQ,CAAA;0BAMyB,CAAA,2DAE3B,CAAC;0BACJ,CAAC;iCAEM,CAAC;iCACP,CAAC;wCAGS,CAAA;2BACsB,CAAC;kCASpC,CAAD;;;;;yBAI0B,OACxB;;wJAOW,CAAC;4BACX,CAAC;;;;kCAIuB,OAAO;;6BAGiB,CAAC;yBAG7C,CAAC,iCACuB,OAAO;+BACjB,CAAC;0BAKmC,CAAC,2DAEtD,CAAC;0BAEoB,CAAC;iCAMzB,CAAD;iCAA2C,CAAC;wCAED,CAAC;2BAES,CAAA;kCAInD,CAAC;;yBAGgB,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-url/index.js"],"names":[],"mappings":"AAyBA;;;;;;;;;;;GAWG;AACH,wDAFY,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-url/index.js"],"names":[],"mappings":"AAyBA;;;;;;;;;;;GAWG;AACH,wDAFY,SAAS,CAiJpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-summary.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/post-summary.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"post-summary.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/post-summary.js"],"names":[],"mappings":"AAoCA;;gCA8DC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/template-content-panel/index.js"],"names":[],"mappings":"AA4BA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/template-content-panel/index.js"],"names":[],"mappings":"AA4BA,mFAkDC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"duplicate-pattern.d.ts","sourceRoot":"","sources":["../../../src/dataviews/actions/duplicate-pattern.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAMnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAMxC,QAAA,MAAM,gBAAgB,EAAE,MAAM,CAAE,OAAO,CAmBtC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"duplicate-post.d.ts","sourceRoot":"","sources":["../../../src/dataviews/actions/duplicate-post.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAMnD,OAAO,KAAK,EAAiB,QAAQ,EAAE,MAAM,UAAU,CAAC;AAQxD,QAAA,MAAM,aAAa,EAAE,MAAM,CAAE,QAAQ,CA8IpC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"duplicate-post.native.d.ts","sourceRoot":"","sources":["../../../src/dataviews/actions/duplicate-post.native.tsx"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa,WAAY,CAAC;AAEhC,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"duplicate-template-part.d.ts","sourceRoot":"","sources":["../../../src/dataviews/actions/duplicate-template-part.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAQnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,QAAA,MAAM,qBAAqB,EAAE,MAAM,CAAE,YAAY,CAgDhD,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rename-post.d.ts","sourceRoot":"","sources":["../../../src/dataviews/actions/rename-post.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAkBnD,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAKnE,QAAA,MAAM,UAAU,EAAE,MAAM,CAAE,mBAAmB,CAyG5C,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reorder-page.d.ts","sourceRoot":"","sources":["../../../src/dataviews/actions/reorder-page.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,MAAM,EAAoB,MAAM,sBAAsB,CAAC;AAErE;;GAEG;AACH,OAAO,KAAK,EAAiB,QAAQ,EAAE,MAAM,UAAU,CAAC;AAgGxD,QAAA,MAAM,WAAW,EAAE,MAAM,CAAE,QAAQ,CAOlC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|