@wordpress/edit-site 7.3.2-next.v.202608281122.0 → 7.4.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 +17 -1
- package/build/components/add-new-template/add-custom-template-modal-content.cjs +3 -1
- package/build/components/add-new-template/add-custom-template-modal-content.cjs.map +2 -2
- package/build/components/add-new-template/index.cjs +6 -4
- package/build/components/add-new-template/index.cjs.map +2 -2
- package/build/components/add-new-template/utils.cjs +84 -9
- package/build/components/add-new-template/utils.cjs.map +2 -2
- package/build/components/dataviews-actions/index.cjs +2 -55
- package/build/components/dataviews-actions/index.cjs.map +3 -3
- package/build/components/layout/index.cjs +2 -2
- package/build/components/layout/index.cjs.map +2 -2
- package/build/components/more-menu/welcome-guide-menu-item.cjs +10 -2
- package/build/components/more-menu/welcome-guide-menu-item.cjs.map +3 -3
- package/build/components/page-templates/fields.cjs +2 -126
- package/build/components/page-templates/fields.cjs.map +3 -3
- package/build/components/page-templates/index.cjs +46 -230
- package/build/components/page-templates/index.cjs.map +3 -3
- package/build/components/post-list/index.cjs +7 -17
- package/build/components/post-list/index.cjs.map +2 -2
- package/build/components/sidebar-global-styles/index.cjs +2 -2
- package/build/components/sidebar-global-styles/index.cjs.map +2 -2
- package/build/components/sidebar-identity/index.cjs +17 -22
- package/build/components/sidebar-identity/index.cjs.map +2 -2
- package/build/components/sidebar-navigation-item/index.cjs +1 -8
- package/build/components/sidebar-navigation-item/index.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-templates-browse/content.cjs +34 -72
- package/build/components/sidebar-navigation-screen-templates-browse/content.cjs.map +3 -3
- package/build/components/sidebar-navigation-screen-templates-browse/index.cjs +1 -2
- package/build/components/sidebar-navigation-screen-templates-browse/index.cjs.map +3 -3
- package/build/components/site-editor-routes/templates.cjs +2 -4
- package/build/components/site-editor-routes/templates.cjs.map +3 -3
- package/build/index.cjs +0 -1
- package/build/index.cjs.map +2 -2
- package/build-module/components/add-new-template/add-custom-template-modal-content.mjs +3 -1
- package/build-module/components/add-new-template/add-custom-template-modal-content.mjs.map +2 -2
- package/build-module/components/add-new-template/index.mjs +7 -4
- package/build-module/components/add-new-template/index.mjs.map +2 -2
- package/build-module/components/add-new-template/utils.mjs +84 -9
- package/build-module/components/add-new-template/utils.mjs.map +2 -2
- package/build-module/components/dataviews-actions/index.mjs +1 -53
- package/build-module/components/dataviews-actions/index.mjs.map +2 -2
- package/build-module/components/layout/index.mjs +2 -2
- package/build-module/components/layout/index.mjs.map +2 -2
- package/build-module/components/more-menu/welcome-guide-menu-item.mjs +10 -2
- package/build-module/components/more-menu/welcome-guide-menu-item.mjs.map +2 -2
- package/build-module/components/page-templates/fields.mjs +3 -129
- package/build-module/components/page-templates/fields.mjs.map +3 -3
- package/build-module/components/page-templates/index.mjs +52 -253
- package/build-module/components/page-templates/index.mjs.map +2 -2
- package/build-module/components/post-list/index.mjs +8 -18
- package/build-module/components/post-list/index.mjs.map +2 -2
- package/build-module/components/sidebar-global-styles/index.mjs +2 -2
- package/build-module/components/sidebar-global-styles/index.mjs.map +2 -2
- package/build-module/components/sidebar-identity/index.mjs +17 -22
- package/build-module/components/sidebar-identity/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-item/index.mjs +1 -8
- package/build-module/components/sidebar-navigation-item/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.mjs +42 -75
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.mjs +1 -2
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.mjs.map +2 -2
- package/build-module/components/site-editor-routes/templates.mjs +2 -4
- package/build-module/components/site-editor-routes/templates.mjs.map +2 -2
- package/build-module/index.mjs +0 -1
- package/build-module/index.mjs.map +2 -2
- package/build-style/style-rtl.css +38 -81
- package/build-style/style.css +38 -81
- package/package.json +41 -38
- package/src/components/add-new-template/add-custom-template-modal-content.jsx +3 -1
- package/src/components/add-new-template/index.jsx +9 -4
- package/src/components/add-new-template/style.scss +8 -21
- package/src/components/add-new-template/utils.js +118 -9
- package/src/components/dataviews-actions/index.js +0 -61
- package/src/components/layout/index.jsx +5 -2
- package/src/components/more-menu/welcome-guide-menu-item.jsx +8 -3
- package/src/components/page-templates/fields.jsx +2 -146
- package/src/components/page-templates/index.jsx +30 -256
- package/src/components/post-list/index.jsx +7 -20
- package/src/components/sidebar-global-styles/index.jsx +7 -5
- package/src/components/sidebar-global-styles/style.scss +6 -0
- package/src/components/sidebar-identity/index.jsx +23 -19
- package/src/components/sidebar-identity/style.scss +7 -0
- package/src/components/sidebar-navigation-item/index.jsx +1 -7
- package/src/components/sidebar-navigation-screen-templates-browse/content.jsx +45 -80
- package/src/components/sidebar-navigation-screen-templates-browse/index.jsx +1 -8
- package/src/components/site-editor-routes/templates.jsx +2 -19
- package/src/components/welcome-guide/style.scss +1 -1
- package/src/index.jsx +0 -1
- package/src/style.scss +1 -1
- package/src/utils/test/get-filtered-template-parts.js +1 -0
- package/build/components/add-new-template-legacy/add-custom-generic-template-modal-content.cjs +0 -107
- package/build/components/add-new-template-legacy/add-custom-generic-template-modal-content.cjs.map +0 -7
- package/build/components/add-new-template-legacy/add-custom-template-modal-content.cjs +0 -327
- package/build/components/add-new-template-legacy/add-custom-template-modal-content.cjs.map +0 -7
- package/build/components/add-new-template-legacy/index.cjs +0 -390
- package/build/components/add-new-template-legacy/index.cjs.map +0 -7
- package/build/components/add-new-template-legacy/utils.cjs +0 -623
- package/build/components/add-new-template-legacy/utils.cjs.map +0 -7
- package/build/components/page-templates/hooks.cjs +0 -94
- package/build/components/page-templates/hooks.cjs.map +0 -7
- package/build/components/page-templates/index-legacy.cjs +0 -167
- package/build/components/page-templates/index-legacy.cjs.map +0 -7
- package/build/components/page-templates/view-utils.cjs +0 -79
- package/build/components/page-templates/view-utils.cjs.map +0 -7
- package/build/components/sidebar-navigation-screen-templates-browse/content-legacy.cjs +0 -78
- package/build/components/sidebar-navigation-screen-templates-browse/content-legacy.cjs.map +0 -7
- package/build-module/components/add-new-template-legacy/add-custom-generic-template-modal-content.mjs +0 -91
- package/build-module/components/add-new-template-legacy/add-custom-generic-template-modal-content.mjs.map +0 -7
- package/build-module/components/add-new-template-legacy/add-custom-template-modal-content.mjs +0 -315
- package/build-module/components/add-new-template-legacy/add-custom-template-modal-content.mjs.map +0 -7
- package/build-module/components/add-new-template-legacy/index.mjs +0 -391
- package/build-module/components/add-new-template-legacy/index.mjs.map +0 -7
- package/build-module/components/add-new-template-legacy/utils.mjs +0 -592
- package/build-module/components/add-new-template-legacy/utils.mjs.map +0 -7
- package/build-module/components/page-templates/hooks.mjs +0 -74
- package/build-module/components/page-templates/hooks.mjs.map +0 -7
- package/build-module/components/page-templates/index-legacy.mjs +0 -136
- package/build-module/components/page-templates/index-legacy.mjs.map +0 -7
- package/build-module/components/page-templates/view-utils.mjs +0 -52
- package/build-module/components/page-templates/view-utils.mjs.map +0 -7
- package/build-module/components/sidebar-navigation-screen-templates-browse/content-legacy.mjs +0 -52
- package/build-module/components/sidebar-navigation-screen-templates-browse/content-legacy.mjs.map +0 -7
- package/src/components/add-new-template-legacy/add-custom-generic-template-modal-content.jsx +0 -85
- package/src/components/add-new-template-legacy/add-custom-template-modal-content.jsx +0 -306
- package/src/components/add-new-template-legacy/index.jsx +0 -440
- package/src/components/add-new-template-legacy/utils.js +0 -757
- package/src/components/page-templates/hooks.js +0 -93
- package/src/components/page-templates/index-legacy.jsx +0 -143
- package/src/components/page-templates/view-utils.js +0 -50
- package/src/components/sidebar-navigation-screen-templates-browse/content-legacy.jsx +0 -52
- package/src/components/sidebar-navigation-screen-templates-browse/style.scss +0 -6
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/add-new-template-legacy/utils.js"],
|
|
4
|
-
"sourcesContent": ["import { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { blockMeta, post, archive } from '@wordpress/icons';\nimport { safeDecodeURI } from '@wordpress/url';\nimport { TEMPLATE_POST_TYPE } from '../../utils/constants';\n\nconst EMPTY_OBJECT = {};\n\n/**\n * @typedef IHasNameAndId\n * @property {string|number} id The entity's id.\n * @property {string} name The entity's name.\n */\n\nconst getValueFromObjectPath = ( object, path ) => {\n\tlet value = object;\n\tpath.split( '.' ).forEach( ( fieldName ) => {\n\t\tvalue = value?.[ fieldName ];\n\t} );\n\treturn value;\n};\n\n/**\n * Helper that adds a prefix to a post slug. The slug needs to be URL-decoded first,\n * so that we have raw Unicode characters there. The server will truncate the slug to\n * 200 characters, respecing Unicode char boundary. On the other hand, the server\n * doesn't detect urlencoded octet boundary and can possibly construct slugs that\n * are not valid urlencoded strings.\n * @param {string} prefix The prefix to add to the slug.\n * @param {string} slug The slug to add the prefix to.\n * @return {string} The slug with the prefix.\n */\nfunction prefixSlug( prefix, slug ) {\n\treturn `${ prefix }-${ safeDecodeURI( slug ) }`;\n}\n\n/**\n * Helper util to map records to add a `name` prop from a\n * provided path, in order to handle all entities in the same\n * fashion(implementing`IHasNameAndId` interface).\n *\n * @param {Object[]} entities The array of entities.\n * @param {string} path The path to map a `name` property from the entity.\n * @return {IHasNameAndId[]} An array of entities that now implement the `IHasNameAndId` interface.\n */\nexport const mapToIHasNameAndId = ( entities, path ) => {\n\treturn ( entities || [] ).map( ( entity ) => ( {\n\t\t...entity,\n\t\tname: decodeEntities( getValueFromObjectPath( entity, path ) ),\n\t} ) );\n};\n\n/**\n * @typedef {Object} EntitiesInfo\n * @property {boolean} hasEntities If an entity has available records(posts, terms, etc..).\n * @property {number[]} existingEntitiesIds An array of the existing entities ids.\n */\n\nexport const useExistingTemplates = () => {\n\treturn useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityRecords(\n\t\t\t\t'postType',\n\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t{\n\t\t\t\t\tper_page: -1,\n\t\t\t\t}\n\t\t\t),\n\t\t[]\n\t);\n};\n\nexport const useDefaultTemplateTypes = () => {\n\treturn useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getCurrentTheme()?.default_template_types || [],\n\t\t[]\n\t);\n};\n\nconst usePublicPostTypes = () => {\n\tconst postTypes = useSelect(\n\t\t( select ) => select( coreStore ).getPostTypes( { per_page: -1 } ),\n\t\t[]\n\t);\n\treturn useMemo( () => {\n\t\tconst excludedPostTypes = [ 'attachment' ];\n\t\treturn postTypes\n\t\t\t?.filter(\n\t\t\t\t( { viewable, slug } ) =>\n\t\t\t\t\tviewable && ! excludedPostTypes.includes( slug )\n\t\t\t)\n\t\t\t.sort( ( a, b ) => {\n\t\t\t\t// Sort post types alphabetically by name,\n\t\t\t\t// but exclude the built-in 'post' type from sorting.\n\t\t\t\tif ( a.slug === 'post' || b.slug === 'post' ) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn a.name.localeCompare( b.name );\n\t\t\t} );\n\t}, [ postTypes ] );\n};\n\nconst usePublicTaxonomies = () => {\n\tconst taxonomies = useSelect(\n\t\t( select ) => select( coreStore ).getTaxonomies( { per_page: -1 } ),\n\t\t[]\n\t);\n\treturn useMemo( () => {\n\t\treturn taxonomies?.filter(\n\t\t\t( { visibility } ) => visibility?.publicly_queryable\n\t\t);\n\t}, [ taxonomies ] );\n};\n\nexport function usePostTypeArchiveMenuItems() {\n\tconst publicPostTypes = usePublicPostTypes();\n\tconst postTypesWithArchives = useMemo(\n\t\t() => publicPostTypes?.filter( ( postType ) => postType.has_archive ),\n\t\t[ publicPostTypes ]\n\t);\n\tconst existingTemplates = useExistingTemplates();\n\t// We need to keep track of naming conflicts. If a conflict\n\t// occurs, we need to add slug.\n\tconst postTypeLabels = useMemo(\n\t\t() =>\n\t\t\tpublicPostTypes?.reduce( ( accumulator, { labels } ) => {\n\t\t\t\tconst singularName = labels.singular_name.toLowerCase();\n\t\t\t\taccumulator[ singularName ] =\n\t\t\t\t\t( accumulator[ singularName ] || 0 ) + 1;\n\t\t\t\treturn accumulator;\n\t\t\t}, {} ),\n\t\t[ publicPostTypes ]\n\t);\n\tconst needsUniqueIdentifier = useCallback(\n\t\t( { labels, slug } ) => {\n\t\t\tconst singularName = labels.singular_name.toLowerCase();\n\t\t\treturn postTypeLabels[ singularName ] > 1 && singularName !== slug;\n\t\t},\n\t\t[ postTypeLabels ]\n\t);\n\treturn useMemo(\n\t\t() =>\n\t\t\tpostTypesWithArchives\n\t\t\t\t?.filter(\n\t\t\t\t\t( postType ) =>\n\t\t\t\t\t\t! ( existingTemplates || [] ).some(\n\t\t\t\t\t\t\t( existingTemplate ) =>\n\t\t\t\t\t\t\t\texistingTemplate.slug ===\n\t\t\t\t\t\t\t\t'archive-' + postType.slug\n\t\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t.map( ( postType ) => {\n\t\t\t\t\tlet title;\n\t\t\t\t\tif ( needsUniqueIdentifier( postType ) ) {\n\t\t\t\t\t\ttitle = sprintf(\n\t\t\t\t\t\t\t// translators: %1s: Name of the post type e.g: \"Post\"; %2s: Slug of the post type e.g: \"book\".\n\t\t\t\t\t\t\t__( 'Archive: %1$s (%2$s)' ),\n\t\t\t\t\t\t\tpostType.labels.singular_name,\n\t\t\t\t\t\t\tpostType.slug\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttitle = sprintf(\n\t\t\t\t\t\t\t// translators: %s: Name of the post type e.g: \"Post\".\n\t\t\t\t\t\t\t__( 'Archive: %s' ),\n\t\t\t\t\t\t\tpostType.labels.singular_name\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\tslug: 'archive-' + postType.slug,\n\t\t\t\t\t\tdescription: sprintf(\n\t\t\t\t\t\t\t// translators: %s: Name of the post type e.g: \"Post\".\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'Displays an archive with the latest posts of type: %s.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tpostType.labels.singular_name\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t// `icon` is the `menu_icon` property of a post type. We\n\t\t\t\t\t\t// only handle `dashicons` for now, even if the `menu_icon`\n\t\t\t\t\t\t// also supports urls and svg as values.\n\t\t\t\t\t\ticon:\n\t\t\t\t\t\t\ttypeof postType.icon === 'string' &&\n\t\t\t\t\t\t\tpostType.icon.startsWith( 'dashicons-' )\n\t\t\t\t\t\t\t\t? postType.icon.slice( 10 )\n\t\t\t\t\t\t\t\t: archive,\n\t\t\t\t\t\ttemplatePrefix: 'archive',\n\t\t\t\t\t};\n\t\t\t\t} ) || [],\n\t\t[ postTypesWithArchives, existingTemplates, needsUniqueIdentifier ]\n\t);\n}\n\nexport const usePostTypeMenuItems = ( onClickMenuItem ) => {\n\tconst publicPostTypes = usePublicPostTypes();\n\tconst existingTemplates = useExistingTemplates();\n\tconst defaultTemplateTypes = useDefaultTemplateTypes();\n\t// We need to keep track of naming conflicts. If a conflict\n\t// occurs, we need to add slug.\n\tconst templateLabels = useMemo(\n\t\t() =>\n\t\t\tpublicPostTypes?.reduce( ( accumulator, { labels } ) => {\n\t\t\t\tconst templateName = (\n\t\t\t\t\tlabels.template_name || labels.singular_name\n\t\t\t\t).toLowerCase();\n\t\t\t\taccumulator[ templateName ] =\n\t\t\t\t\t( accumulator[ templateName ] || 0 ) + 1;\n\t\t\t\treturn accumulator;\n\t\t\t}, {} ),\n\t\t[ publicPostTypes ]\n\t);\n\tconst needsUniqueIdentifier = useCallback(\n\t\t( { labels, slug } ) => {\n\t\t\tconst templateName = (\n\t\t\t\tlabels.template_name || labels.singular_name\n\t\t\t).toLowerCase();\n\t\t\treturn templateLabels[ templateName ] > 1 && templateName !== slug;\n\t\t},\n\t\t[ templateLabels ]\n\t);\n\n\t// `page`is a special case in template hierarchy.\n\tconst templatePrefixes = useMemo(\n\t\t() =>\n\t\t\tpublicPostTypes?.reduce( ( accumulator, { slug } ) => {\n\t\t\t\tlet suffix = slug;\n\t\t\t\tif ( slug !== 'page' ) {\n\t\t\t\t\tsuffix = `single-${ suffix }`;\n\t\t\t\t}\n\t\t\t\taccumulator[ slug ] = suffix;\n\t\t\t\treturn accumulator;\n\t\t\t}, {} ),\n\t\t[ publicPostTypes ]\n\t);\n\tconst postTypesInfo = useEntitiesInfo( 'postType', templatePrefixes );\n\tconst existingTemplateSlugs = ( existingTemplates || [] ).map(\n\t\t( { slug } ) => slug\n\t);\n\tconst menuItems = ( publicPostTypes || [] ).reduce(\n\t\t( accumulator, postType ) => {\n\t\t\tconst { slug, labels, icon } = postType;\n\t\t\t// We need to check if the general template is part of the\n\t\t\t// defaultTemplateTypes. If it is, just use that info and\n\t\t\t// augment it with the specific template functionality.\n\t\t\tconst generalTemplateSlug = templatePrefixes[ slug ];\n\t\t\tconst defaultTemplateType = defaultTemplateTypes?.find(\n\t\t\t\t( { slug: _slug } ) => _slug === generalTemplateSlug\n\t\t\t);\n\t\t\tconst hasGeneralTemplate =\n\t\t\t\texistingTemplateSlugs?.includes( generalTemplateSlug );\n\t\t\tconst _needsUniqueIdentifier = needsUniqueIdentifier( postType );\n\t\t\tlet menuItemTitle =\n\t\t\t\tlabels.template_name ||\n\t\t\t\tsprintf(\n\t\t\t\t\t// translators: %s: Name of the post type e.g: \"Post\".\n\t\t\t\t\t__( 'Single item: %s' ),\n\t\t\t\t\tlabels.singular_name\n\t\t\t\t);\n\t\t\tif ( _needsUniqueIdentifier ) {\n\t\t\t\tmenuItemTitle = labels.template_name\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t// translators: 1: Name of the template e.g: \"Single Item: Post\". 2: Slug of the post type e.g: \"book\".\n\t\t\t\t\t\t\t_x( '%1$s (%2$s)', 'post type menu label' ),\n\t\t\t\t\t\t\tlabels.template_name,\n\t\t\t\t\t\t\tslug\n\t\t\t\t\t )\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t// translators: 1: Name of the post type e.g: \"Post\". 2: Slug of the post type e.g: \"book\".\n\t\t\t\t\t\t\t_x(\n\t\t\t\t\t\t\t\t'Single item: %1$s (%2$s)',\n\t\t\t\t\t\t\t\t'post type menu label'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tlabels.singular_name,\n\t\t\t\t\t\t\tslug\n\t\t\t\t\t );\n\t\t\t}\n\t\t\tconst menuItem = defaultTemplateType\n\t\t\t\t? {\n\t\t\t\t\t\t...defaultTemplateType,\n\t\t\t\t\t\ttemplatePrefix: templatePrefixes[ slug ],\n\t\t\t\t }\n\t\t\t\t: {\n\t\t\t\t\t\tslug: generalTemplateSlug,\n\t\t\t\t\t\ttitle: menuItemTitle,\n\t\t\t\t\t\tdescription: sprintf(\n\t\t\t\t\t\t\t// translators: %s: Name of the post type e.g: \"Post\".\n\t\t\t\t\t\t\t__( 'Displays a single item: %s.' ),\n\t\t\t\t\t\t\tlabels.singular_name\n\t\t\t\t\t\t),\n\t\t\t\t\t\t// `icon` is the `menu_icon` property of a post type. We\n\t\t\t\t\t\t// only handle `dashicons` for now, even if the `menu_icon`\n\t\t\t\t\t\t// also supports urls and svg as values.\n\t\t\t\t\t\ticon:\n\t\t\t\t\t\t\ttypeof icon === 'string' &&\n\t\t\t\t\t\t\ticon.startsWith( 'dashicons-' )\n\t\t\t\t\t\t\t\t? icon.slice( 10 )\n\t\t\t\t\t\t\t\t: post,\n\t\t\t\t\t\ttemplatePrefix: templatePrefixes[ slug ],\n\t\t\t\t };\n\t\t\tconst hasEntities = postTypesInfo?.[ slug ]?.hasEntities;\n\t\t\t// We have a different template creation flow only if they have entities.\n\t\t\tif ( hasEntities ) {\n\t\t\t\tmenuItem.onClick = ( template ) => {\n\t\t\t\t\tonClickMenuItem( {\n\t\t\t\t\t\ttype: 'postType',\n\t\t\t\t\t\tslug,\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\trecordNamePath: 'title.rendered',\n\t\t\t\t\t\t\tqueryArgs: ( { search } ) => {\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\t_fields: 'id,title,slug,link',\n\t\t\t\t\t\t\t\t\torderBy: search ? 'relevance' : 'modified',\n\t\t\t\t\t\t\t\t\texclude:\n\t\t\t\t\t\t\t\t\t\tpostTypesInfo[ slug ]\n\t\t\t\t\t\t\t\t\t\t\t.existingEntitiesIds,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tgetSpecificTemplate: ( suggestion ) => {\n\t\t\t\t\t\t\t\tconst templateSlug = prefixSlug(\n\t\t\t\t\t\t\t\t\ttemplatePrefixes[ slug ],\n\t\t\t\t\t\t\t\t\tsuggestion.slug\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\ttitle: templateSlug,\n\t\t\t\t\t\t\t\t\tslug: templateSlug,\n\t\t\t\t\t\t\t\t\ttemplatePrefix: templatePrefixes[ slug ],\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\t\tlabels,\n\t\t\t\t\t\thasGeneralTemplate,\n\t\t\t\t\t\ttemplate,\n\t\t\t\t\t} );\n\t\t\t\t};\n\t\t\t}\n\t\t\t// We don't need to add the menu item if there are no\n\t\t\t// entities and the general template exists.\n\t\t\tif ( ! hasGeneralTemplate || hasEntities ) {\n\t\t\t\taccumulator.push( menuItem );\n\t\t\t}\n\t\t\treturn accumulator;\n\t\t},\n\t\t[]\n\t);\n\t// Split menu items into two groups: one for the default post types\n\t// and one for the rest.\n\tconst postTypesMenuItems = useMemo(\n\t\t() =>\n\t\t\tmenuItems.reduce(\n\t\t\t\t( accumulator, postType ) => {\n\t\t\t\t\tconst { slug } = postType;\n\t\t\t\t\tlet key = 'postTypesMenuItems';\n\t\t\t\t\tif ( slug === 'page' ) {\n\t\t\t\t\t\tkey = 'defaultPostTypesMenuItems';\n\t\t\t\t\t}\n\t\t\t\t\taccumulator[ key ].push( postType );\n\t\t\t\t\treturn accumulator;\n\t\t\t\t},\n\t\t\t\t{ defaultPostTypesMenuItems: [], postTypesMenuItems: [] }\n\t\t\t),\n\t\t[ menuItems ]\n\t);\n\treturn postTypesMenuItems;\n};\n\nexport const useTaxonomiesMenuItems = ( onClickMenuItem ) => {\n\tconst publicTaxonomies = usePublicTaxonomies();\n\tconst existingTemplates = useExistingTemplates();\n\tconst defaultTemplateTypes = useDefaultTemplateTypes();\n\t// `category` and `post_tag` are special cases in template hierarchy.\n\tconst templatePrefixes = useMemo(\n\t\t() =>\n\t\t\tpublicTaxonomies?.reduce( ( accumulator, { slug } ) => {\n\t\t\t\tlet suffix = slug;\n\t\t\t\tif ( ! [ 'category', 'post_tag' ].includes( slug ) ) {\n\t\t\t\t\tsuffix = `taxonomy-${ suffix }`;\n\t\t\t\t}\n\t\t\t\tif ( slug === 'post_tag' ) {\n\t\t\t\t\tsuffix = `tag`;\n\t\t\t\t}\n\t\t\t\taccumulator[ slug ] = suffix;\n\t\t\t\treturn accumulator;\n\t\t\t}, {} ),\n\t\t[ publicTaxonomies ]\n\t);\n\t// We need to keep track of naming conflicts. If a conflict\n\t// occurs, we need to add slug.\n\tconst taxonomyLabels = publicTaxonomies?.reduce(\n\t\t( accumulator, { labels } ) => {\n\t\t\tconst templateName = (\n\t\t\t\tlabels.template_name || labels.singular_name\n\t\t\t).toLowerCase();\n\t\t\taccumulator[ templateName ] =\n\t\t\t\t( accumulator[ templateName ] || 0 ) + 1;\n\t\t\treturn accumulator;\n\t\t},\n\t\t{}\n\t);\n\tconst needsUniqueIdentifier = ( labels, slug ) => {\n\t\tif ( [ 'category', 'post_tag' ].includes( slug ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tconst templateName = (\n\t\t\tlabels.template_name || labels.singular_name\n\t\t).toLowerCase();\n\t\treturn taxonomyLabels[ templateName ] > 1 && templateName !== slug;\n\t};\n\tconst taxonomiesInfo = useEntitiesInfo( 'taxonomy', templatePrefixes );\n\tconst existingTemplateSlugs = ( existingTemplates || [] ).map(\n\t\t( { slug } ) => slug\n\t);\n\tconst menuItems = ( publicTaxonomies || [] ).reduce(\n\t\t( accumulator, taxonomy ) => {\n\t\t\tconst { slug, labels } = taxonomy;\n\t\t\t// We need to check if the general template is part of the\n\t\t\t// defaultTemplateTypes. If it is, just use that info and\n\t\t\t// augment it with the specific template functionality.\n\t\t\tconst generalTemplateSlug = templatePrefixes[ slug ];\n\t\t\tconst defaultTemplateType = defaultTemplateTypes?.find(\n\t\t\t\t( { slug: _slug } ) => _slug === generalTemplateSlug\n\t\t\t);\n\t\t\tconst hasGeneralTemplate =\n\t\t\t\texistingTemplateSlugs?.includes( generalTemplateSlug );\n\t\t\tconst _needsUniqueIdentifier = needsUniqueIdentifier(\n\t\t\t\tlabels,\n\t\t\t\tslug\n\t\t\t);\n\t\t\tlet menuItemTitle = labels.template_name || labels.singular_name;\n\t\t\tif ( _needsUniqueIdentifier ) {\n\t\t\t\tmenuItemTitle = labels.template_name\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t// translators: 1: Name of the template e.g: \"Products by Category\". 2: Slug of the taxonomy e.g: \"product_cat\".\n\t\t\t\t\t\t\t_x( '%1$s (%2$s)', 'taxonomy template menu label' ),\n\t\t\t\t\t\t\tlabels.template_name,\n\t\t\t\t\t\t\tslug\n\t\t\t\t\t )\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t// translators: 1: Name of the taxonomy e.g: \"Category\". 2: Slug of the taxonomy e.g: \"product_cat\".\n\t\t\t\t\t\t\t_x( '%1$s (%2$s)', 'taxonomy menu label' ),\n\t\t\t\t\t\t\tlabels.singular_name,\n\t\t\t\t\t\t\tslug\n\t\t\t\t\t );\n\t\t\t}\n\t\t\tconst menuItem = defaultTemplateType\n\t\t\t\t? {\n\t\t\t\t\t\t...defaultTemplateType,\n\t\t\t\t\t\ttemplatePrefix: templatePrefixes[ slug ],\n\t\t\t\t }\n\t\t\t\t: {\n\t\t\t\t\t\tslug: generalTemplateSlug,\n\t\t\t\t\t\ttitle: menuItemTitle,\n\t\t\t\t\t\tdescription: sprintf(\n\t\t\t\t\t\t\t// translators: %s: Name of the taxonomy e.g: \"Product Categories\".\n\t\t\t\t\t\t\t__( 'Displays taxonomy: %s.' ),\n\t\t\t\t\t\t\tlabels.singular_name\n\t\t\t\t\t\t),\n\t\t\t\t\t\ticon: blockMeta,\n\t\t\t\t\t\ttemplatePrefix: templatePrefixes[ slug ],\n\t\t\t\t };\n\t\t\tconst hasEntities = taxonomiesInfo?.[ slug ]?.hasEntities;\n\t\t\t// We have a different template creation flow only if they have entities.\n\t\t\tif ( hasEntities ) {\n\t\t\t\tmenuItem.onClick = ( template ) => {\n\t\t\t\t\tonClickMenuItem( {\n\t\t\t\t\t\ttype: 'taxonomy',\n\t\t\t\t\t\tslug,\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tqueryArgs: ( { search } ) => {\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\t_fields: 'id,name,slug,link',\n\t\t\t\t\t\t\t\t\torderBy: search ? 'name' : 'count',\n\t\t\t\t\t\t\t\t\texclude:\n\t\t\t\t\t\t\t\t\t\ttaxonomiesInfo[ slug ]\n\t\t\t\t\t\t\t\t\t\t\t.existingEntitiesIds,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tgetSpecificTemplate: ( suggestion ) => {\n\t\t\t\t\t\t\t\tconst templateSlug = prefixSlug(\n\t\t\t\t\t\t\t\t\ttemplatePrefixes[ slug ],\n\t\t\t\t\t\t\t\t\tsuggestion.slug\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\ttitle: templateSlug,\n\t\t\t\t\t\t\t\t\tslug: templateSlug,\n\t\t\t\t\t\t\t\t\ttemplatePrefix: templatePrefixes[ slug ],\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\t\tlabels,\n\t\t\t\t\t\thasGeneralTemplate,\n\t\t\t\t\t\ttemplate,\n\t\t\t\t\t} );\n\t\t\t\t};\n\t\t\t}\n\t\t\t// We don't need to add the menu item if there are no\n\t\t\t// entities and the general template exists.\n\t\t\tif ( ! hasGeneralTemplate || hasEntities ) {\n\t\t\t\taccumulator.push( menuItem );\n\t\t\t}\n\t\t\treturn accumulator;\n\t\t},\n\t\t[]\n\t);\n\t// Split menu items into two groups: one for the default taxonomies\n\t// and one for the rest.\n\tconst taxonomiesMenuItems = useMemo(\n\t\t() =>\n\t\t\tmenuItems.reduce(\n\t\t\t\t( accumulator, taxonomy ) => {\n\t\t\t\t\tconst { slug } = taxonomy;\n\t\t\t\t\tlet key = 'taxonomiesMenuItems';\n\t\t\t\t\tif ( [ 'category', 'tag' ].includes( slug ) ) {\n\t\t\t\t\t\tkey = 'defaultTaxonomiesMenuItems';\n\t\t\t\t\t}\n\t\t\t\t\taccumulator[ key ].push( taxonomy );\n\t\t\t\t\treturn accumulator;\n\t\t\t\t},\n\t\t\t\t{ defaultTaxonomiesMenuItems: [], taxonomiesMenuItems: [] }\n\t\t\t),\n\t\t[ menuItems ]\n\t);\n\treturn taxonomiesMenuItems;\n};\n\nconst USE_AUTHOR_MENU_ITEM_TEMPLATE_PREFIX = { user: 'author' };\nconst USE_AUTHOR_MENU_ITEM_QUERY_PARAMETERS = { user: { who: 'authors' } };\nexport function useAuthorMenuItem( onClickMenuItem ) {\n\tconst existingTemplates = useExistingTemplates();\n\tconst defaultTemplateTypes = useDefaultTemplateTypes();\n\tconst authorInfo = useEntitiesInfo(\n\t\t'root',\n\t\tUSE_AUTHOR_MENU_ITEM_TEMPLATE_PREFIX,\n\t\tUSE_AUTHOR_MENU_ITEM_QUERY_PARAMETERS\n\t);\n\tlet authorMenuItem = defaultTemplateTypes?.find(\n\t\t( { slug } ) => slug === 'author'\n\t);\n\tif ( ! authorMenuItem ) {\n\t\tauthorMenuItem = {\n\t\t\tdescription: __(\n\t\t\t\t'Displays latest posts written by a single author.'\n\t\t\t),\n\t\t\tslug: 'author',\n\t\t\ttitle: 'Author',\n\t\t};\n\t}\n\tconst hasGeneralTemplate = !! existingTemplates?.find(\n\t\t( { slug } ) => slug === 'author'\n\t);\n\tif ( authorInfo.user?.hasEntities ) {\n\t\tauthorMenuItem = { ...authorMenuItem, templatePrefix: 'author' };\n\t\tauthorMenuItem.onClick = ( template ) => {\n\t\t\tonClickMenuItem( {\n\t\t\t\ttype: 'root',\n\t\t\t\tslug: 'user',\n\t\t\t\tconfig: {\n\t\t\t\t\tqueryArgs: ( { search } ) => {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t_fields: 'id,name,slug,link',\n\t\t\t\t\t\t\torderBy: search ? 'name' : 'registered_date',\n\t\t\t\t\t\t\texclude: authorInfo.user.existingEntitiesIds,\n\t\t\t\t\t\t\twho: 'authors',\n\t\t\t\t\t\t};\n\t\t\t\t\t},\n\t\t\t\t\tgetSpecificTemplate: ( suggestion ) => {\n\t\t\t\t\t\tconst templateSlug = prefixSlug(\n\t\t\t\t\t\t\t'author',\n\t\t\t\t\t\t\tsuggestion.slug\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\ttitle: templateSlug,\n\t\t\t\t\t\t\tslug: templateSlug,\n\t\t\t\t\t\t\ttemplatePrefix: 'author',\n\t\t\t\t\t\t};\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tlabels: {\n\t\t\t\t\tsingular_name: __( 'Author' ),\n\t\t\t\t\tsearch_items: __( 'Search Authors' ),\n\t\t\t\t\tnot_found: __( 'No authors found.' ),\n\t\t\t\t\tall_items: __( 'All Authors' ),\n\t\t\t\t},\n\t\t\t\thasGeneralTemplate,\n\t\t\t\ttemplate,\n\t\t\t} );\n\t\t};\n\t}\n\tif ( ! hasGeneralTemplate || authorInfo.user?.hasEntities ) {\n\t\treturn authorMenuItem;\n\t}\n}\n\n/**\n * Helper hook that filters all the existing templates by the given\n * object with the entity's slug as key and the template prefix as value.\n *\n * Example:\n * `existingTemplates` is: [ { slug: 'tag-apple' }, { slug: 'page-about' }, { slug: 'tag' } ]\n * `templatePrefixes` is: { post_tag: 'tag' }\n * It will return: { post_tag: ['apple'] }\n *\n * Note: We append the `-` to the given template prefix in this function for our checks.\n *\n * @param {Record<string,string>} templatePrefixes An object with the entity's slug as key and the template prefix as value.\n * @return {Record<string,string[]>} An object with the entity's slug as key and an array with the existing template slugs as value.\n */\nconst useExistingTemplateSlugs = ( templatePrefixes ) => {\n\tconst existingTemplates = useExistingTemplates();\n\tconst existingSlugs = useMemo( () => {\n\t\treturn Object.entries( templatePrefixes || {} ).reduce(\n\t\t\t( accumulator, [ slug, prefix ] ) => {\n\t\t\t\tconst slugsWithTemplates = ( existingTemplates || [] ).reduce(\n\t\t\t\t\t( _accumulator, existingTemplate ) => {\n\t\t\t\t\t\tconst _prefix = `${ prefix }-`;\n\t\t\t\t\t\tif ( existingTemplate.slug.startsWith( _prefix ) ) {\n\t\t\t\t\t\t\t_accumulator.push(\n\t\t\t\t\t\t\t\texistingTemplate.slug.substring(\n\t\t\t\t\t\t\t\t\t_prefix.length\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\t\treturn _accumulator;\n\t\t\t\t\t},\n\t\t\t\t\t[]\n\t\t\t\t);\n\t\t\t\tif ( slugsWithTemplates.length ) {\n\t\t\t\t\taccumulator[ slug ] = slugsWithTemplates;\n\t\t\t\t}\n\t\t\t\treturn accumulator;\n\t\t\t},\n\t\t\t{}\n\t\t);\n\t}, [ templatePrefixes, existingTemplates ] );\n\treturn existingSlugs;\n};\n\n/**\n * Helper hook that finds the existing records with an associated template,\n * as they need to be excluded from the template suggestions.\n *\n * @param {string} entityName The entity's name.\n * @param {Record<string,string>} templatePrefixes An object with the entity's slug as key and the template prefix as value.\n * @param {Record<string,Object>} additionalQueryParameters An object with the entity's slug as key and additional query parameters as value.\n * @return {Record<string,EntitiesInfo>} An object with the entity's slug as key and the existing records as value.\n */\nconst useTemplatesToExclude = (\n\tentityName,\n\ttemplatePrefixes,\n\tadditionalQueryParameters = {}\n) => {\n\tconst slugsToExcludePerEntity =\n\t\tuseExistingTemplateSlugs( templatePrefixes );\n\tconst recordsToExcludePerEntity = useSelect(\n\t\t( select ) => {\n\t\t\treturn Object.entries( slugsToExcludePerEntity || {} ).reduce(\n\t\t\t\t( accumulator, [ slug, slugsWithTemplates ] ) => {\n\t\t\t\t\tconst entitiesWithTemplates = select(\n\t\t\t\t\t\tcoreStore\n\t\t\t\t\t).getEntityRecords( entityName, slug, {\n\t\t\t\t\t\t_fields: 'id',\n\t\t\t\t\t\tcontext: 'view',\n\t\t\t\t\t\tslug: slugsWithTemplates,\n\t\t\t\t\t\t...additionalQueryParameters[ slug ],\n\t\t\t\t\t} );\n\t\t\t\t\tif ( entitiesWithTemplates?.length ) {\n\t\t\t\t\t\taccumulator[ slug ] = entitiesWithTemplates;\n\t\t\t\t\t}\n\t\t\t\t\treturn accumulator;\n\t\t\t\t},\n\t\t\t\t{}\n\t\t\t);\n\t\t},\n\t\t[ slugsToExcludePerEntity ]\n\t);\n\treturn recordsToExcludePerEntity;\n};\n\n/**\n * Helper hook that returns information about an entity having\n * records that we can create a specific template for.\n *\n * For example we can search for `terms` in `taxonomy` entity or\n * `posts` in `postType` entity.\n *\n * First we need to find the existing records with an associated template,\n * to query afterwards for any remaining record, by excluding them.\n *\n * @param {string} entityName The entity's name.\n * @param {Record<string,string>} templatePrefixes An object with the entity's slug as key and the template prefix as value.\n * @param {Record<string,Object>} additionalQueryParameters An object with the entity's slug as key and additional query parameters as value.\n * @return {Record<string,EntitiesInfo>} An object with the entity's slug as key and the EntitiesInfo as value.\n */\nconst useEntitiesInfo = (\n\tentityName,\n\ttemplatePrefixes,\n\tadditionalQueryParameters = EMPTY_OBJECT\n) => {\n\tconst recordsToExcludePerEntity = useTemplatesToExclude(\n\t\tentityName,\n\t\ttemplatePrefixes,\n\t\tadditionalQueryParameters\n\t);\n\tconst entitiesHasRecords = useSelect(\n\t\t( select ) => {\n\t\t\treturn Object.keys( templatePrefixes || {} ).reduce(\n\t\t\t\t( accumulator, slug ) => {\n\t\t\t\t\tconst existingEntitiesIds =\n\t\t\t\t\t\trecordsToExcludePerEntity?.[ slug ]?.map(\n\t\t\t\t\t\t\t( { id } ) => id\n\t\t\t\t\t\t) || [];\n\t\t\t\t\tconst records = select( coreStore ).getEntityRecords(\n\t\t\t\t\t\tentityName,\n\t\t\t\t\t\tslug,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tper_page: 1,\n\t\t\t\t\t\t\t_fields: 'id',\n\t\t\t\t\t\t\tcontext: 'view',\n\t\t\t\t\t\t\texclude: existingEntitiesIds,\n\t\t\t\t\t\t\t...additionalQueryParameters[ slug ],\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\taccumulator[ slug ] =\n\t\t\t\t\t\trecords === null || records.length > 0;\n\t\t\t\t\treturn accumulator;\n\t\t\t\t},\n\t\t\t\t{}\n\t\t\t);\n\t\t},\n\t\t[\n\t\t\ttemplatePrefixes,\n\t\t\trecordsToExcludePerEntity,\n\t\t\tentityName,\n\t\t\tadditionalQueryParameters,\n\t\t]\n\t);\n\tconst entitiesInfo = useMemo( () => {\n\t\treturn Object.keys( templatePrefixes || {} ).reduce(\n\t\t\t( accumulator, slug ) => {\n\t\t\t\tconst existingEntitiesIds =\n\t\t\t\t\trecordsToExcludePerEntity?.[ slug ]?.map(\n\t\t\t\t\t\t( { id } ) => id\n\t\t\t\t\t) || [];\n\t\t\t\taccumulator[ slug ] = {\n\t\t\t\t\thasEntities: entitiesHasRecords[ slug ],\n\t\t\t\t\texistingEntitiesIds,\n\t\t\t\t};\n\t\t\t\treturn accumulator;\n\t\t\t},\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AM,yBAAqB;AAAA,IAC1B,CAAE,WAAY;AACb,aAAO,OAAO,KAAM,oBAAoB,CAAC,CAAE,EAAE;AAAA,QAC5C,CAAE,aAAa,SAAU;AACxB,gBAAM,sBACL,4BAA6B,IAAK,GAAG;AAAA,YACpC,CAAE,EAAE,GAAG,MAAO;AAAA,UACf,KAAK,CAAC;AACP,gBAAM,UAAU,OAAQ,iBAAAA,KAAU,EAAE;AAAA,YACnC;AAAA,YACA;AAAA,YACA;AAAA,cACC,UAAU;AAAA,cACV,SAAS;AAAA,cACT,SAAS;AAAA,cACT,SAAS;AAAA,cACT,GAAG,0BAA2B,IAAK;AAAA,YACpC;AAAA,UACD;AACA,sBAAa,IAAK,IACjB,YAAY,QAAQ,QAAQ,SAAS;AACtC,iBAAO;AAAA,QACR;AAAA,QACA,CAAC;AAAA,MACF;AAAA,IACD;AAAA,IACA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,EACD;AACA,QAAM,mBAAe,wBAAS,MAAM;AACnC,WAAO,OAAO,KAAM,oBAAoB,CAAC,CAAE,EAAE;AAAA,MAC5C,CAAE,aAAa,SAAU;AACxB,cAAM,sBACL,4BAA6B,IAAK,GAAG;AAAA,UACpC,CAAE,EAAE,GAAG,MAAO;AAAA,QACf,KAAK,CAAC;AACP,oBAAa,IAAK,IAAI;AAAA,UACrB,aAAa,mBAAoB,IAAK;AAAA,UACtC;AAAA,QACD;AACA,eAAO;AAAA,MACR;AAAA,MACA,CAAC;AAAA,IACF;AAAA,EACD,GAAG,CAAE,kBAAkB,2BAA2B,kBAAmB,CAAE;AACvE,SAAO;AACR;",
|
|
6
|
-
"names": ["coreStore"]
|
|
7
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// packages/edit-site/src/components/page-templates/hooks.js
|
|
21
|
-
var hooks_exports = {};
|
|
22
|
-
__export(hooks_exports, {
|
|
23
|
-
useAddedBy: () => useAddedBy
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(hooks_exports);
|
|
26
|
-
var import_core_data = require("@wordpress/core-data");
|
|
27
|
-
var import_data = require("@wordpress/data");
|
|
28
|
-
var import_icons = require("@wordpress/icons");
|
|
29
|
-
var import_constants = require("../../utils/constants.cjs");
|
|
30
|
-
function useAddedBy(postType, postId) {
|
|
31
|
-
return (0, import_data.useSelect)(
|
|
32
|
-
(select) => {
|
|
33
|
-
const { getEntityRecord, getUser, getEditedEntityRecord } = select(import_core_data.store);
|
|
34
|
-
const template = getEditedEntityRecord(
|
|
35
|
-
"postType",
|
|
36
|
-
postType,
|
|
37
|
-
postId
|
|
38
|
-
);
|
|
39
|
-
const originalSource = template?.original_source;
|
|
40
|
-
const authorText = template?.author_text;
|
|
41
|
-
switch (originalSource) {
|
|
42
|
-
case "theme": {
|
|
43
|
-
return {
|
|
44
|
-
type: originalSource,
|
|
45
|
-
icon: import_icons.layout,
|
|
46
|
-
text: authorText,
|
|
47
|
-
isCustomized: template.source === import_constants.TEMPLATE_ORIGINS.custom
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
case "plugin": {
|
|
51
|
-
return {
|
|
52
|
-
type: originalSource,
|
|
53
|
-
icon: import_icons.plugins,
|
|
54
|
-
text: authorText,
|
|
55
|
-
isCustomized: template.source === import_constants.TEMPLATE_ORIGINS.custom
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
case "site": {
|
|
59
|
-
const siteData = getEntityRecord(
|
|
60
|
-
"root",
|
|
61
|
-
"__unstableBase"
|
|
62
|
-
);
|
|
63
|
-
return {
|
|
64
|
-
type: originalSource,
|
|
65
|
-
icon: import_icons.globe,
|
|
66
|
-
imageUrl: siteData?.site_logo ? getEntityRecord(
|
|
67
|
-
"postType",
|
|
68
|
-
"attachment",
|
|
69
|
-
siteData.site_logo
|
|
70
|
-
)?.source_url : void 0,
|
|
71
|
-
text: authorText,
|
|
72
|
-
isCustomized: false
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
default: {
|
|
76
|
-
const user = getUser(template.author);
|
|
77
|
-
return {
|
|
78
|
-
type: "user",
|
|
79
|
-
icon: import_icons.commentAuthorAvatar,
|
|
80
|
-
imageUrl: user?.avatar_urls?.[48],
|
|
81
|
-
text: authorText ?? user?.name,
|
|
82
|
-
isCustomized: false
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
[postType, postId]
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
91
|
-
0 && (module.exports = {
|
|
92
|
-
useAddedBy
|
|
93
|
-
});
|
|
94
|
-
//# sourceMappingURL=hooks.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/page-templates/hooks.js"],
|
|
4
|
-
"sourcesContent": ["import { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tcommentAuthorAvatar as authorIcon,\n\tlayout as themeIcon,\n\tplugins as pluginIcon,\n\tglobe as globeIcon,\n} from '@wordpress/icons';\nimport { TEMPLATE_ORIGINS } from '../../utils/constants';\n\n/** @typedef {'wp_template'|'wp_template_part'} TemplateType */\n\n/**\n * @typedef {'theme'|'plugin'|'site'|'user'} AddedByType\n *\n * @typedef AddedByData\n * @type {Object}\n * @property {AddedByType} type The type of the data.\n * @property {React.JSX.Element} icon The icon to display.\n * @property {string} [imageUrl] The optional image URL to display.\n * @property {string} [text] The text to display.\n * @property {boolean} isCustomized Whether the template has been customized.\n *\n * @param {TemplateType} postType The template post type.\n * @param {number} postId The template post id.\n * @return {AddedByData} The added by object or null.\n */\nexport function useAddedBy( postType, postId ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, getUser, getEditedEntityRecord } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst template = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t);\n\t\t\tconst originalSource = template?.original_source;\n\t\t\tconst authorText = template?.author_text;\n\n\t\t\tswitch ( originalSource ) {\n\t\t\t\tcase 'theme': {\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: originalSource,\n\t\t\t\t\t\ticon: themeIcon,\n\t\t\t\t\t\ttext: authorText,\n\t\t\t\t\t\tisCustomized:\n\t\t\t\t\t\t\ttemplate.source === TEMPLATE_ORIGINS.custom,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tcase 'plugin': {\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: originalSource,\n\t\t\t\t\t\ticon: pluginIcon,\n\t\t\t\t\t\ttext: authorText,\n\t\t\t\t\t\tisCustomized:\n\t\t\t\t\t\t\ttemplate.source === TEMPLATE_ORIGINS.custom,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tcase 'site': {\n\t\t\t\t\tconst siteData = getEntityRecord(\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'__unstableBase'\n\t\t\t\t\t);\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: originalSource,\n\t\t\t\t\t\ticon: globeIcon,\n\t\t\t\t\t\timageUrl: siteData?.site_logo\n\t\t\t\t\t\t\t? getEntityRecord(\n\t\t\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\t\t\t'attachment',\n\t\t\t\t\t\t\t\t\tsiteData.site_logo\n\t\t\t\t\t\t\t )?.source_url\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\ttext: authorText,\n\t\t\t\t\t\tisCustomized: false,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tconst user = getUser( template.author );\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: 'user',\n\t\t\t\t\t\ticon: authorIcon,\n\t\t\t\t\t\timageUrl: user?.avatar_urls?.[ 48 ],\n\t\t\t\t\t\ttext: authorText ?? user?.name,\n\t\t\t\t\t\tisCustomized: false,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[ postType, postId ]\n\t);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAmC;AACnC,kBAA0B;AAC1B,mBAKO;AACP,uBAAiC;AAmB1B,SAAS,WAAY,UAAU,QAAS;AAC9C,aAAO;AAAA,IACN,CAAE,WAAY;AACb,YAAM,EAAE,iBAAiB,SAAS,sBAAsB,IACvD,OAAQ,iBAAAA,KAAU;AACnB,YAAM,WAAW;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,MACD;AACA,YAAM,iBAAiB,UAAU;AACjC,YAAM,aAAa,UAAU;AAE7B,cAAS,gBAAiB;AAAA,QACzB,KAAK,SAAS;AACb,iBAAO;AAAA,YACN,MAAM;AAAA,YACN,MAAM,aAAAC;AAAA,YACN,MAAM;AAAA,YACN,cACC,SAAS,WAAW,kCAAiB;AAAA,UACvC;AAAA,QACD;AAAA,QACA,KAAK,UAAU;AACd,iBAAO;AAAA,YACN,MAAM;AAAA,YACN,MAAM,aAAAC;AAAA,YACN,MAAM;AAAA,YACN,cACC,SAAS,WAAW,kCAAiB;AAAA,UACvC;AAAA,QACD;AAAA,QACA,KAAK,QAAQ;AACZ,gBAAM,WAAW;AAAA,YAChB;AAAA,YACA;AAAA,UACD;AACA,iBAAO;AAAA,YACN,MAAM;AAAA,YACN,MAAM,aAAAC;AAAA,YACN,UAAU,UAAU,YACjB;AAAA,cACA;AAAA,cACA;AAAA,cACA,SAAS;AAAA,YACT,GAAG,aACH;AAAA,YACH,MAAM;AAAA,YACN,cAAc;AAAA,UACf;AAAA,QACD;AAAA,QACA,SAAS;AACR,gBAAM,OAAO,QAAS,SAAS,MAAO;AACtC,iBAAO;AAAA,YACN,MAAM;AAAA,YACN,MAAM,aAAAC;AAAA,YACN,UAAU,MAAM,cAAe,EAAG;AAAA,YAClC,MAAM,cAAc,MAAM;AAAA,YAC1B,cAAc;AAAA,UACf;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,IACA,CAAE,UAAU,MAAO;AAAA,EACpB;AACD;",
|
|
6
|
-
"names": ["coreStore", "themeIcon", "pluginIcon", "globeIcon", "authorIcon"]
|
|
7
|
-
}
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// packages/edit-site/src/components/page-templates/index-legacy.jsx
|
|
31
|
-
var index_legacy_exports = {};
|
|
32
|
-
__export(index_legacy_exports, {
|
|
33
|
-
default: () => PageTemplates
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(index_legacy_exports);
|
|
36
|
-
var import_admin_ui = require("@wordpress/admin-ui");
|
|
37
|
-
var import_i18n = require("@wordpress/i18n");
|
|
38
|
-
var import_element = require("@wordpress/element");
|
|
39
|
-
var import_core_data = require("@wordpress/core-data");
|
|
40
|
-
var import_dataviews = require("@wordpress/dataviews");
|
|
41
|
-
var import_router = require("@wordpress/router");
|
|
42
|
-
var import_editor = require("@wordpress/editor");
|
|
43
|
-
var import_url = require("@wordpress/url");
|
|
44
|
-
var import_compose = require("@wordpress/compose");
|
|
45
|
-
var import_views = require("@wordpress/views");
|
|
46
|
-
var import_add_new_template_legacy = __toESM(require("../add-new-template-legacy/index.cjs"));
|
|
47
|
-
var import_constants = require("../../utils/constants.cjs");
|
|
48
|
-
var import_lock_unlock = require("../../lock-unlock.cjs");
|
|
49
|
-
var import_dataviews_actions = require("../dataviews-actions/index.cjs");
|
|
50
|
-
var import_fields = require("./fields.cjs");
|
|
51
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
52
|
-
var { usePostActions, usePostFields } = (0, import_lock_unlock.unlock)(import_editor.privateApis);
|
|
53
|
-
var { useHistory, useLocation } = (0, import_lock_unlock.unlock)(import_router.privateApis);
|
|
54
|
-
var { useEntityRecordsWithPermissions } = (0, import_lock_unlock.unlock)(import_core_data.privateApis);
|
|
55
|
-
var VIEW_CONFIG_FIELDS = ["default_view", "default_layouts", "view_list"];
|
|
56
|
-
function PageTemplates() {
|
|
57
|
-
const { path, query } = useLocation();
|
|
58
|
-
const { activeView = "all", postId } = query;
|
|
59
|
-
const [selection, setSelection] = (0, import_element.useState)([postId]);
|
|
60
|
-
const {
|
|
61
|
-
default_view: defaultView,
|
|
62
|
-
default_layouts: defaultLayouts,
|
|
63
|
-
view_list: viewList
|
|
64
|
-
} = (0, import_views.useViewConfig)({
|
|
65
|
-
kind: "postType",
|
|
66
|
-
name: import_constants.TEMPLATE_POST_TYPE,
|
|
67
|
-
fields: VIEW_CONFIG_FIELDS
|
|
68
|
-
});
|
|
69
|
-
const activeViewOverrides = (0, import_element.useMemo)(
|
|
70
|
-
() => viewList?.find((v) => v.slug === activeView)?.view ?? {},
|
|
71
|
-
[viewList, activeView]
|
|
72
|
-
);
|
|
73
|
-
const { view, updateView, isModified, resetToDefault } = (0, import_views.useView)({
|
|
74
|
-
kind: "postType",
|
|
75
|
-
name: import_constants.TEMPLATE_POST_TYPE,
|
|
76
|
-
slug: "default",
|
|
77
|
-
defaultView,
|
|
78
|
-
activeViewOverrides,
|
|
79
|
-
defaultLayouts,
|
|
80
|
-
queryParams: {
|
|
81
|
-
page: query.pageNumber,
|
|
82
|
-
search: query.search
|
|
83
|
-
},
|
|
84
|
-
onChangeQueryParams: (newQueryParams) => {
|
|
85
|
-
history.navigate(
|
|
86
|
-
(0, import_url.addQueryArgs)(path, {
|
|
87
|
-
...query,
|
|
88
|
-
pageNumber: newQueryParams.page,
|
|
89
|
-
search: newQueryParams.search || void 0
|
|
90
|
-
})
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
const { records, isResolving: isLoadingData } = useEntityRecordsWithPermissions("postType", import_constants.TEMPLATE_POST_TYPE, {
|
|
95
|
-
per_page: -1
|
|
96
|
-
});
|
|
97
|
-
const history = useHistory();
|
|
98
|
-
const onChangeSelection = (0, import_element.useCallback)(
|
|
99
|
-
(items) => {
|
|
100
|
-
setSelection(items);
|
|
101
|
-
if (view?.type === "list") {
|
|
102
|
-
history.navigate(
|
|
103
|
-
(0, import_url.addQueryArgs)(path, {
|
|
104
|
-
postId: items.length === 1 ? items[0] : void 0
|
|
105
|
-
})
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
[history, path, view?.type]
|
|
110
|
-
);
|
|
111
|
-
const postFields = usePostFields({ postType: import_constants.TEMPLATE_POST_TYPE });
|
|
112
|
-
const fields = (0, import_element.useMemo)(() => {
|
|
113
|
-
return [import_fields.previewField, ...postFields || []];
|
|
114
|
-
}, [postFields]);
|
|
115
|
-
const { data, paginationInfo } = (0, import_element.useMemo)(() => {
|
|
116
|
-
return (0, import_dataviews.filterSortAndPaginate)(records, view, fields);
|
|
117
|
-
}, [records, view, fields]);
|
|
118
|
-
const postTypeActions = usePostActions({
|
|
119
|
-
postType: import_constants.TEMPLATE_POST_TYPE,
|
|
120
|
-
context: "list"
|
|
121
|
-
});
|
|
122
|
-
const editAction = (0, import_dataviews_actions.useEditPostAction)();
|
|
123
|
-
const actions = (0, import_element.useMemo)(
|
|
124
|
-
() => [editAction, ...postTypeActions],
|
|
125
|
-
[postTypeActions, editAction]
|
|
126
|
-
);
|
|
127
|
-
const onChangeView = (0, import_compose.useEvent)((newView) => {
|
|
128
|
-
updateView(newView);
|
|
129
|
-
if (newView.type !== view.type) {
|
|
130
|
-
history.invalidate();
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
134
|
-
import_admin_ui.Page,
|
|
135
|
-
{
|
|
136
|
-
className: "edit-site-page-templates",
|
|
137
|
-
title: (0, import_i18n.__)("Templates"),
|
|
138
|
-
headingLevel: 2,
|
|
139
|
-
actions: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_add_new_template_legacy.default, {}),
|
|
140
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
141
|
-
import_dataviews.DataViews,
|
|
142
|
-
{
|
|
143
|
-
paginationInfo,
|
|
144
|
-
fields,
|
|
145
|
-
actions,
|
|
146
|
-
data,
|
|
147
|
-
isLoading: isLoadingData,
|
|
148
|
-
view,
|
|
149
|
-
onChangeView,
|
|
150
|
-
onChangeSelection,
|
|
151
|
-
isItemClickable: () => true,
|
|
152
|
-
onClickItem: ({ id }) => {
|
|
153
|
-
history.navigate(`/wp_template/${id}?canvas=edit`);
|
|
154
|
-
},
|
|
155
|
-
selection,
|
|
156
|
-
defaultLayouts,
|
|
157
|
-
onReset: isModified ? () => {
|
|
158
|
-
resetToDefault();
|
|
159
|
-
history.invalidate();
|
|
160
|
-
} : false
|
|
161
|
-
},
|
|
162
|
-
activeView
|
|
163
|
-
)
|
|
164
|
-
}
|
|
165
|
-
);
|
|
166
|
-
}
|
|
167
|
-
//# sourceMappingURL=index-legacy.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/page-templates/index-legacy.jsx"],
|
|
4
|
-
"sourcesContent": ["import { Page } from '@wordpress/admin-ui';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useMemo, useCallback } from '@wordpress/element';\nimport { privateApis as corePrivateApis } from '@wordpress/core-data';\nimport { DataViews, filterSortAndPaginate } from '@wordpress/dataviews';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { addQueryArgs } from '@wordpress/url';\nimport { useEvent } from '@wordpress/compose';\nimport { useView, useViewConfig } from '@wordpress/views';\nimport AddNewTemplate from '../add-new-template-legacy';\nimport { TEMPLATE_POST_TYPE } from '../../utils/constants';\nimport { unlock } from '../../lock-unlock';\nimport { useEditPostAction } from '../dataviews-actions';\nimport { previewField } from './fields';\n\nconst { usePostActions, usePostFields } = unlock( editorPrivateApis );\nconst { useHistory, useLocation } = unlock( routerPrivateApis );\nconst { useEntityRecordsWithPermissions } = unlock( corePrivateApis );\n\nconst VIEW_CONFIG_FIELDS = [ 'default_view', 'default_layouts', 'view_list' ];\n\nexport default function PageTemplates() {\n\tconst { path, query } = useLocation();\n\tconst { activeView = 'all', postId } = query;\n\tconst [ selection, setSelection ] = useState( [ postId ] );\n\n\tconst {\n\t\tdefault_view: defaultView,\n\t\tdefault_layouts: defaultLayouts,\n\t\tview_list: viewList,\n\t} = useViewConfig( {\n\t\tkind: 'postType',\n\t\tname: TEMPLATE_POST_TYPE,\n\t\tfields: VIEW_CONFIG_FIELDS,\n\t} );\n\tconst activeViewOverrides = useMemo(\n\t\t() => viewList?.find( ( v ) => v.slug === activeView )?.view ?? {},\n\t\t[ viewList, activeView ]\n\t);\n\tconst { view, updateView, isModified, resetToDefault } = useView( {\n\t\tkind: 'postType',\n\t\tname: TEMPLATE_POST_TYPE,\n\t\tslug: 'default',\n\t\tdefaultView,\n\t\tactiveViewOverrides,\n\t\tdefaultLayouts,\n\t\tqueryParams: {\n\t\t\tpage: query.pageNumber,\n\t\t\tsearch: query.search,\n\t\t},\n\t\tonChangeQueryParams: ( newQueryParams ) => {\n\t\t\thistory.navigate(\n\t\t\t\taddQueryArgs( path, {\n\t\t\t\t\t...query,\n\t\t\t\t\tpageNumber: newQueryParams.page,\n\t\t\t\t\tsearch: newQueryParams.search || undefined,\n\t\t\t\t} )\n\t\t\t);\n\t\t},\n\t} );\n\n\tconst { records, isResolving: isLoadingData } =\n\t\tuseEntityRecordsWithPermissions( 'postType', TEMPLATE_POST_TYPE, {\n\t\t\tper_page: -1,\n\t\t} );\n\tconst history = useHistory();\n\tconst onChangeSelection = useCallback(\n\t\t( items ) => {\n\t\t\tsetSelection( items );\n\t\t\tif ( view?.type === 'list' ) {\n\t\t\t\thistory.navigate(\n\t\t\t\t\taddQueryArgs( path, {\n\t\t\t\t\t\tpostId: items.length === 1 ? items[ 0 ] : undefined,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ history, path, view?.type ]\n\t);\n\n\tconst postFields = usePostFields( { postType: TEMPLATE_POST_TYPE } );\n\tconst fields = useMemo( () => {\n\t\treturn [ previewField, ...( postFields || [] ) ];\n\t}, [ postFields ] );\n\n\tconst { data, paginationInfo } = useMemo( () => {\n\t\treturn filterSortAndPaginate( records, view, fields );\n\t}, [ records, view, fields ] );\n\n\tconst postTypeActions = usePostActions( {\n\t\tpostType: TEMPLATE_POST_TYPE,\n\t\tcontext: 'list',\n\t} );\n\tconst editAction = useEditPostAction();\n\tconst actions = useMemo(\n\t\t() => [ editAction, ...postTypeActions ],\n\t\t[ postTypeActions, editAction ]\n\t);\n\n\tconst onChangeView = useEvent( ( newView ) => {\n\t\tupdateView( newView );\n\t\tif ( newView.type !== view.type ) {\n\t\t\t// Retrigger the routing areas resolution.\n\t\t\thistory.invalidate();\n\t\t}\n\t} );\n\n\treturn (\n\t\t<Page\n\t\t\tclassName=\"edit-site-page-templates\"\n\t\t\ttitle={ __( 'Templates' ) }\n\t\t\theadingLevel={ 2 }\n\t\t\tactions={ <AddNewTemplate /> }\n\t\t>\n\t\t\t<DataViews\n\t\t\t\tkey={ activeView }\n\t\t\t\tpaginationInfo={ paginationInfo }\n\t\t\t\tfields={ fields }\n\t\t\t\tactions={ actions }\n\t\t\t\tdata={ data }\n\t\t\t\tisLoading={ isLoadingData }\n\t\t\t\tview={ view }\n\t\t\t\tonChangeView={ onChangeView }\n\t\t\t\tonChangeSelection={ onChangeSelection }\n\t\t\t\tisItemClickable={ () => true }\n\t\t\t\tonClickItem={ ( { id } ) => {\n\t\t\t\t\thistory.navigate( `/wp_template/${ id }?canvas=edit` );\n\t\t\t\t} }\n\t\t\t\tselection={ selection }\n\t\t\t\tdefaultLayouts={ defaultLayouts }\n\t\t\t\tonReset={\n\t\t\t\t\tisModified\n\t\t\t\t\t\t? () => {\n\t\t\t\t\t\t\t\tresetToDefault();\n\t\t\t\t\t\t\t\thistory.invalidate();\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: false\n\t\t\t\t}\n\t\t\t/>\n\t\t</Page>\n\t);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAqB;AACrB,kBAAmB;AACnB,qBAA+C;AAC/C,uBAA+C;AAC/C,uBAAiD;AACjD,oBAAiD;AACjD,oBAAiD;AACjD,iBAA6B;AAC7B,qBAAyB;AACzB,mBAAuC;AACvC,qCAA2B;AAC3B,uBAAmC;AACnC,yBAAuB;AACvB,+BAAkC;AAClC,oBAA6B;AAmGhB;AAjGb,IAAM,EAAE,gBAAgB,cAAc,QAAI,2BAAQ,cAAAA,WAAkB;AACpE,IAAM,EAAE,YAAY,YAAY,QAAI,2BAAQ,cAAAC,WAAkB;AAC9D,IAAM,EAAE,gCAAgC,QAAI,2BAAQ,iBAAAC,WAAgB;AAEpE,IAAM,qBAAqB,CAAE,gBAAgB,mBAAmB,WAAY;AAE7D,SAAR,gBAAiC;AACvC,QAAM,EAAE,MAAM,MAAM,IAAI,YAAY;AACpC,QAAM,EAAE,aAAa,OAAO,OAAO,IAAI;AACvC,QAAM,CAAE,WAAW,YAAa,QAAI,yBAAU,CAAE,MAAO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
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// packages/edit-site/src/components/page-templates/view-utils.js
|
|
21
|
-
var view_utils_exports = {};
|
|
22
|
-
__export(view_utils_exports, {
|
|
23
|
-
DEFAULT_VIEW: () => DEFAULT_VIEW,
|
|
24
|
-
defaultLayouts: () => defaultLayouts,
|
|
25
|
-
getActiveViewOverridesForTab: () => getActiveViewOverridesForTab
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(view_utils_exports);
|
|
28
|
-
var defaultLayouts = {
|
|
29
|
-
table: {
|
|
30
|
-
showMedia: false
|
|
31
|
-
},
|
|
32
|
-
grid: {
|
|
33
|
-
showMedia: true
|
|
34
|
-
},
|
|
35
|
-
list: {
|
|
36
|
-
showMedia: false
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
var DEFAULT_VIEW = {
|
|
40
|
-
type: "grid",
|
|
41
|
-
perPage: 20,
|
|
42
|
-
sort: {
|
|
43
|
-
field: "title",
|
|
44
|
-
direction: "asc"
|
|
45
|
-
},
|
|
46
|
-
titleField: "title",
|
|
47
|
-
descriptionField: "description",
|
|
48
|
-
mediaField: "preview",
|
|
49
|
-
fields: ["author", "active", "slug", "theme"],
|
|
50
|
-
filters: [],
|
|
51
|
-
...defaultLayouts.grid
|
|
52
|
-
};
|
|
53
|
-
function getActiveViewOverridesForTab(activeView) {
|
|
54
|
-
if (activeView === "user") {
|
|
55
|
-
return {
|
|
56
|
-
sort: { field: "date", direction: "desc" }
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
if (activeView === "active") {
|
|
60
|
-
return {};
|
|
61
|
-
}
|
|
62
|
-
return {
|
|
63
|
-
filters: [
|
|
64
|
-
{
|
|
65
|
-
field: "author",
|
|
66
|
-
operator: "is",
|
|
67
|
-
value: activeView,
|
|
68
|
-
isLocked: true
|
|
69
|
-
}
|
|
70
|
-
]
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
74
|
-
0 && (module.exports = {
|
|
75
|
-
DEFAULT_VIEW,
|
|
76
|
-
defaultLayouts,
|
|
77
|
-
getActiveViewOverridesForTab
|
|
78
|
-
});
|
|
79
|
-
//# sourceMappingURL=view-utils.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/page-templates/view-utils.js"],
|
|
4
|
-
"sourcesContent": ["export const defaultLayouts = {\n\ttable: {\n\t\tshowMedia: false,\n\t},\n\tgrid: {\n\t\tshowMedia: true,\n\t},\n\tlist: {\n\t\tshowMedia: false,\n\t},\n};\n\nexport const DEFAULT_VIEW = {\n\ttype: 'grid',\n\tperPage: 20,\n\tsort: {\n\t\tfield: 'title',\n\t\tdirection: 'asc',\n\t},\n\ttitleField: 'title',\n\tdescriptionField: 'description',\n\tmediaField: 'preview',\n\tfields: [ 'author', 'active', 'slug', 'theme' ],\n\tfilters: [],\n\t...defaultLayouts.grid,\n};\n\nexport function getActiveViewOverridesForTab( activeView ) {\n\t// User view: sort by date, newest first\n\tif ( activeView === 'user' ) {\n\t\treturn {\n\t\t\tsort: { field: 'date', direction: 'desc' },\n\t\t};\n\t}\n\t// Active view: no overrides\n\tif ( activeView === 'active' ) {\n\t\treturn {};\n\t}\n\t// Author-based view: filter by author\n\treturn {\n\t\tfilters: [\n\t\t\t{\n\t\t\t\tfield: 'author',\n\t\t\t\toperator: 'is',\n\t\t\t\tvalue: activeView,\n\t\t\t\tisLocked: true,\n\t\t\t},\n\t\t],\n\t};\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,iBAAiB;AAAA,EAC7B,OAAO;AAAA,IACN,WAAW;AAAA,EACZ;AAAA,EACA,MAAM;AAAA,IACL,WAAW;AAAA,EACZ;AAAA,EACA,MAAM;AAAA,IACL,WAAW;AAAA,EACZ;AACD;AAEO,IAAM,eAAe;AAAA,EAC3B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,IACL,OAAO;AAAA,IACP,WAAW;AAAA,EACZ;AAAA,EACA,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,YAAY;AAAA,EACZ,QAAQ,CAAE,UAAU,UAAU,QAAQ,OAAQ;AAAA,EAC9C,SAAS,CAAC;AAAA,EACV,GAAG,eAAe;AACnB;AAEO,SAAS,6BAA8B,YAAa;AAE1D,MAAK,eAAe,QAAS;AAC5B,WAAO;AAAA,MACN,MAAM,EAAE,OAAO,QAAQ,WAAW,OAAO;AAAA,IAC1C;AAAA,EACD;AAEA,MAAK,eAAe,UAAW;AAC9B,WAAO,CAAC;AAAA,EACT;AAEA,SAAO;AAAA,IACN,SAAS;AAAA,MACR;AAAA,QACC,OAAO;AAAA,QACP,UAAU;AAAA,QACV,OAAO;AAAA,QACP,UAAU;AAAA,MACX;AAAA,IACD;AAAA,EACD;AACD;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// packages/edit-site/src/components/sidebar-navigation-screen-templates-browse/content-legacy.jsx
|
|
31
|
-
var content_legacy_exports = {};
|
|
32
|
-
__export(content_legacy_exports, {
|
|
33
|
-
default: () => DataviewsTemplatesSidebarContent
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(content_legacy_exports);
|
|
36
|
-
var import_core_data = require("@wordpress/core-data");
|
|
37
|
-
var import_data = require("@wordpress/data");
|
|
38
|
-
var import_icons = require("@wordpress/icons");
|
|
39
|
-
var import_constants = require("../../utils/constants.cjs");
|
|
40
|
-
var import_sidebar_dataviews = __toESM(require("../sidebar-dataviews/index.cjs"));
|
|
41
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
|
-
var SOURCE_TO_ICON = {
|
|
43
|
-
user: import_icons.commentAuthorAvatar,
|
|
44
|
-
theme: import_icons.layout,
|
|
45
|
-
plugin: import_icons.plugins,
|
|
46
|
-
site: import_icons.globe
|
|
47
|
-
};
|
|
48
|
-
function DataviewsTemplatesSidebarContent() {
|
|
49
|
-
const authorSourceMap = (0, import_data.useSelect)((select) => {
|
|
50
|
-
const templates = select(import_core_data.store).getEntityRecords(
|
|
51
|
-
"postType",
|
|
52
|
-
import_constants.TEMPLATE_POST_TYPE,
|
|
53
|
-
{ per_page: -1 }
|
|
54
|
-
);
|
|
55
|
-
if (!templates) {
|
|
56
|
-
return {};
|
|
57
|
-
}
|
|
58
|
-
const map = {};
|
|
59
|
-
for (const template of templates) {
|
|
60
|
-
if (template.author_text && template.original_source && !map[template.author_text]) {
|
|
61
|
-
map[template.author_text] = template.original_source;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
return map;
|
|
65
|
-
}, []);
|
|
66
|
-
const resolveIcon = (view) => {
|
|
67
|
-
const source = authorSourceMap[view.slug];
|
|
68
|
-
return SOURCE_TO_ICON[source] ?? import_icons.layout;
|
|
69
|
-
};
|
|
70
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
71
|
-
import_sidebar_dataviews.default,
|
|
72
|
-
{
|
|
73
|
-
postType: import_constants.TEMPLATE_POST_TYPE,
|
|
74
|
-
resolveIcon
|
|
75
|
-
}
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
//# sourceMappingURL=content-legacy.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/sidebar-navigation-screen-templates-browse/content-legacy.jsx"],
|
|
4
|
-
"sourcesContent": ["import { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tcommentAuthorAvatar,\n\tlayout,\n\tplugins as pluginIcon,\n\tglobe,\n} from '@wordpress/icons';\nimport { TEMPLATE_POST_TYPE } from '../../utils/constants';\nimport DataViewsSidebarContent from '../sidebar-dataviews';\n\nconst SOURCE_TO_ICON = {\n\tuser: commentAuthorAvatar,\n\ttheme: layout,\n\tplugin: pluginIcon,\n\tsite: globe,\n};\nexport default function DataviewsTemplatesSidebarContent() {\n\tconst authorSourceMap = useSelect( ( select ) => {\n\t\tconst templates = select( coreStore ).getEntityRecords(\n\t\t\t'postType',\n\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t{ per_page: -1 }\n\t\t);\n\t\tif ( ! templates ) {\n\t\t\treturn {};\n\t\t}\n\t\tconst map = {};\n\t\tfor ( const template of templates ) {\n\t\t\tif (\n\t\t\t\ttemplate.author_text &&\n\t\t\t\ttemplate.original_source &&\n\t\t\t\t! map[ template.author_text ]\n\t\t\t) {\n\t\t\t\tmap[ template.author_text ] = template.original_source;\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}, [] );\n\n\tconst resolveIcon = ( view ) => {\n\t\tconst source = authorSourceMap[ view.slug ];\n\t\treturn SOURCE_TO_ICON[ source ] ?? layout;\n\t};\n\n\treturn (\n\t\t<DataViewsSidebarContent\n\t\t\tpostType={ TEMPLATE_POST_TYPE }\n\t\t\tresolveIcon={ resolveIcon }\n\t\t/>\n\t);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAmC;AACnC,kBAA0B;AAC1B,mBAKO;AACP,uBAAmC;AACnC,+BAAoC;AAqClC;AAnCF,IAAM,iBAAiB;AAAA,EACtB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ,aAAAA;AAAA,EACR,MAAM;AACP;AACe,SAAR,mCAAoD;AAC1D,QAAM,sBAAkB,uBAAW,CAAE,WAAY;AAChD,UAAM,YAAY,OAAQ,iBAAAC,KAAU,EAAE;AAAA,MACrC;AAAA,MACA;AAAA,MACA,EAAE,UAAU,GAAG;AAAA,IAChB;AACA,QAAK,CAAE,WAAY;AAClB,aAAO,CAAC;AAAA,IACT;AACA,UAAM,MAAM,CAAC;AACb,eAAY,YAAY,WAAY;AACnC,UACC,SAAS,eACT,SAAS,mBACT,CAAE,IAAK,SAAS,WAAY,GAC3B;AACD,YAAK,SAAS,WAAY,IAAI,SAAS;AAAA,MACxC;AAAA,IACD;AACA,WAAO;AAAA,EACR,GAAG,CAAC,CAAE;AAEN,QAAM,cAAc,CAAE,SAAU;AAC/B,UAAM,SAAS,gBAAiB,KAAK,IAAK;AAC1C,WAAO,eAAgB,MAAO,KAAK;AAAA,EACpC;AAEA,SACC;AAAA,IAAC,yBAAAC;AAAA,IAAA;AAAA,MACA,UAAW;AAAA,MACX;AAAA;AAAA,EACD;AAEF;",
|
|
6
|
-
"names": ["pluginIcon", "coreStore", "DataViewsSidebarContent"]
|
|
7
|
-
}
|