@wordpress/core-data 6.21.1-next.f8d8eceb.0 → 6.23.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 +4 -0
- package/README.md +26 -0
- package/build/actions.js +17 -0
- package/build/actions.js.map +1 -1
- package/build/entity-provider.js +7 -1
- package/build/entity-provider.js.map +1 -1
- package/build/queried-data/reducer.js +3 -1
- package/build/queried-data/reducer.js.map +1 -1
- package/build/queried-data/selectors.js +3 -1
- package/build/queried-data/selectors.js.map +1 -1
- package/build/reducer.js +22 -1
- package/build/reducer.js.map +1 -1
- package/build/resolvers.js +12 -1
- package/build/resolvers.js.map +1 -1
- package/build/selectors.js +13 -0
- package/build/selectors.js.map +1 -1
- package/build-module/actions.js +16 -0
- package/build-module/actions.js.map +1 -1
- package/build-module/entity-provider.js +7 -1
- package/build-module/entity-provider.js.map +1 -1
- package/build-module/queried-data/reducer.js +3 -1
- package/build-module/queried-data/reducer.js.map +1 -1
- package/build-module/queried-data/selectors.js +3 -1
- package/build-module/queried-data/selectors.js.map +1 -1
- package/build-module/reducer.js +21 -1
- package/build-module/reducer.js.map +1 -1
- package/build-module/resolvers.js +10 -0
- package/build-module/resolvers.js.map +1 -1
- package/build-module/selectors.js +12 -0
- package/build-module/selectors.js.map +1 -1
- package/build-types/actions.d.ts +9 -0
- package/build-types/actions.d.ts.map +1 -1
- package/build-types/entity-provider.d.ts.map +1 -1
- package/build-types/index.d.ts +6 -0
- package/build-types/index.d.ts.map +1 -1
- package/build-types/queried-data/selectors.d.ts.map +1 -1
- package/build-types/reducer.d.ts +10 -0
- package/build-types/reducer.d.ts.map +1 -1
- package/build-types/resolvers.d.ts +3 -0
- package/build-types/resolvers.d.ts.map +1 -1
- package/build-types/selectors.d.ts +15 -0
- package/build-types/selectors.d.ts.map +1 -1
- package/package.json +17 -17
- package/src/actions.js +16 -0
- package/src/entity-provider.js +8 -1
- package/src/queried-data/reducer.js +3 -3
- package/src/queried-data/selectors.js +3 -1
- package/src/queried-data/test/reducer.js +11 -0
- package/src/reducer.js +21 -0
- package/src/resolvers.js +11 -0
- package/src/selectors.ts +22 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["camelCase","addQueryArgs","decodeEntities","apiFetch","STORE_NAME","getOrLoadEntitiesConfig","DEFAULT_ENTITY_KEY","forwardResolver","getNormalizedCommaSeparable","getSyncProvider","getAuthors","query","dispatch","path","users","receiveUserQuery","getCurrentUser","currentUser","receiveCurrentUser","getEntityRecord","kind","name","key","select","configs","entityConfig","find","config","__experimentalNoFetch","lock","__unstableAcquireStoreLock","exclusive","window","__experimentalEnableSync","syncConfig","process","env","IS_GUTENBERG_PLUGIN","objectId","getSyncObjectId","bootstrap","syncObjectType","record","receiveEntityRecords","type","recordId","edits","meta","undo","undefined","_fields","Set","join","baseURL","baseURLParams","include","hasRecords","hasEntityRecords","__unstableReleaseStoreLock","getRawEntityRecord","getEditedEntityRecord","getEntityRecords","records","supportsPagination","per_page","response","parse","Object","values","json","totalItems","parseInt","headers","get","map","split","forEach","field","hasOwnProperty","context","resolutionsArgs","filter","selectorName","args","shouldInvalidate","action","invalidateCache","getCurrentTheme","resolveSelect","activeThemes","status","receiveCurrentTheme","getThemeSupports","getEmbedPreview","url","embedProxyResponse","receiveEmbedPreview","error","canUser","requestedAction","resource","id","registry","hasStartedResolution","resourcePath","retrievedActions","includes","Error","relatedAction","isAlreadyResolving","method","allowHeader","allowedMethods","allow","permissions","methods","create","read","update","delete","actionName","methodName","entries","receiveUserPermission","canUserEditEntityRecord","__unstable_rest_base","getAutosaves","postType","postId","rest_base","restBase","rest_namespace","restNamespace","getPostType","autosaves","length","receiveAutosaves","getAutosave","__experimentalGetTemplateForLink","link","template","then","data","e","__experimentalGetCurrentGlobalStylesId","globalStylesURL","_links","href","globalStylesObject","__experimentalReceiveCurrentGlobalStylesId","__experimentalGetCurrentThemeBaseGlobalStyles","currentTheme","themeGlobalStyles","stylesheet","__experimentalReceiveThemeBaseGlobalStyles","__experimentalGetCurrentThemeGlobalStylesVariations","variations","__experimentalReceiveThemeGlobalStyleVariations","getCurrentThemeGlobalStylesRevisions","globalStylesId","revisionsURL","resetRevisions","revisions","revision","fromEntries","value","receiveThemeGlobalStyleRevisions","getBlockPatterns","restPatterns","patterns","pattern","getBlockPatternCategories","categories","getUserPatternCategories","patternCategories","mappedPatternCategories","userCategory","label","slug","getNavigationFallbackId","fallback","_embed","_embedded","self","receiveNavigationFallbackId","existingFallbackEntityRecord","invalidateNavigationQueries","finishResolution"],"sources":["@wordpress/core-data/src/resolvers.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { camelCase } from 'change-case';\n\n/**\n * WordPress dependencies\n */\nimport { addQueryArgs } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n * Internal dependencies\n */\nimport { STORE_NAME } from './name';\nimport { getOrLoadEntitiesConfig, DEFAULT_ENTITY_KEY } from './entities';\nimport { forwardResolver, getNormalizedCommaSeparable } from './utils';\nimport { getSyncProvider } from './sync';\n\n/**\n * Requests authors from the REST API.\n *\n * @param {Object|undefined} query Optional object of query parameters to\n * include with request.\n */\nexport const getAuthors =\n\t( query ) =>\n\tasync ( { dispatch } ) => {\n\t\tconst path = addQueryArgs(\n\t\t\t'/wp/v2/users/?who=authors&per_page=100',\n\t\t\tquery\n\t\t);\n\t\tconst users = await apiFetch( { path } );\n\t\tdispatch.receiveUserQuery( path, users );\n\t};\n\n/**\n * Requests the current user from the REST API.\n */\nexport const getCurrentUser =\n\t() =>\n\tasync ( { dispatch } ) => {\n\t\tconst currentUser = await apiFetch( { path: '/wp/v2/users/me' } );\n\t\tdispatch.receiveCurrentUser( currentUser );\n\t};\n\n/**\n * Requests an entity's record from the REST API.\n *\n * @param {string} kind Entity kind.\n * @param {string} name Entity name.\n * @param {number|string} key Record's key\n * @param {Object|undefined} query Optional object of query parameters to\n * include with request. If requesting specific\n * fields, fields must always include the ID.\n */\nexport const getEntityRecord =\n\t( kind, name, key = '', query ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = configs.find(\n\t\t\t( config ) => config.name === name && config.kind === kind\n\t\t);\n\t\tif ( ! entityConfig || entityConfig?.__experimentalNoFetch ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst lock = await dispatch.__unstableAcquireStoreLock(\n\t\t\tSTORE_NAME,\n\t\t\t[ 'entities', 'records', kind, name, key ],\n\t\t\t{ exclusive: false }\n\t\t);\n\n\t\ttry {\n\t\t\t// Entity supports configs,\n\t\t\t// use the sync algorithm instead of the old fetch behavior.\n\t\t\tif (\n\t\t\t\twindow.__experimentalEnableSync &&\n\t\t\t\tentityConfig.syncConfig &&\n\t\t\t\t! query\n\t\t\t) {\n\t\t\t\tif ( process.env.IS_GUTENBERG_PLUGIN ) {\n\t\t\t\t\tconst objectId = entityConfig.getSyncObjectId( key );\n\n\t\t\t\t\t// Loads the persisted document.\n\t\t\t\t\tawait getSyncProvider().bootstrap(\n\t\t\t\t\t\tentityConfig.syncObjectType,\n\t\t\t\t\t\tobjectId,\n\t\t\t\t\t\t( record ) => {\n\t\t\t\t\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\t\t\t\t\tkind,\n\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\trecord,\n\t\t\t\t\t\t\t\tquery\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\n\t\t\t\t\t// Boostraps the edited document as well (and load from peers).\n\t\t\t\t\tawait getSyncProvider().bootstrap(\n\t\t\t\t\t\tentityConfig.syncObjectType + '--edit',\n\t\t\t\t\t\tobjectId,\n\t\t\t\t\t\t( record ) => {\n\t\t\t\t\t\t\tdispatch( {\n\t\t\t\t\t\t\t\ttype: 'EDIT_ENTITY_RECORD',\n\t\t\t\t\t\t\t\tkind,\n\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\trecordId: key,\n\t\t\t\t\t\t\t\tedits: record,\n\t\t\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\t\t\tundo: undefined,\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);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( query !== undefined && query._fields ) {\n\t\t\t\t\t// If requesting specific fields, items and query association to said\n\t\t\t\t\t// records are stored by ID reference. Thus, fields must always include\n\t\t\t\t\t// the ID.\n\t\t\t\t\tquery = {\n\t\t\t\t\t\t...query,\n\t\t\t\t\t\t_fields: [\n\t\t\t\t\t\t\t...new Set( [\n\t\t\t\t\t\t\t\t...( getNormalizedCommaSeparable(\n\t\t\t\t\t\t\t\t\tquery._fields\n\t\t\t\t\t\t\t\t) || [] ),\n\t\t\t\t\t\t\t\tentityConfig.key || DEFAULT_ENTITY_KEY,\n\t\t\t\t\t\t\t] ),\n\t\t\t\t\t\t].join(),\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Disable reason: While true that an early return could leave `path`\n\t\t\t\t// unused, it's important that path is derived using the query prior to\n\t\t\t\t// additional query modifications in the condition below, since those\n\t\t\t\t// modifications are relevant to how the data is tracked in state, and not\n\t\t\t\t// for how the request is made to the REST API.\n\n\t\t\t\t// eslint-disable-next-line @wordpress/no-unused-vars-before-return\n\t\t\t\tconst path = addQueryArgs(\n\t\t\t\t\tentityConfig.baseURL + ( key ? '/' + key : '' ),\n\t\t\t\t\t{\n\t\t\t\t\t\t...entityConfig.baseURLParams,\n\t\t\t\t\t\t...query,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tif ( query !== undefined ) {\n\t\t\t\t\tquery = { ...query, include: [ key ] };\n\n\t\t\t\t\t// The resolution cache won't consider query as reusable based on the\n\t\t\t\t\t// fields, so it's tested here, prior to initiating the REST request,\n\t\t\t\t\t// and without causing `getEntityRecords` resolution to occur.\n\t\t\t\t\tconst hasRecords = select.hasEntityRecords(\n\t\t\t\t\t\tkind,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tquery\n\t\t\t\t\t);\n\t\t\t\t\tif ( hasRecords ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst record = await apiFetch( { path } );\n\t\t\t\tdispatch.receiveEntityRecords( kind, name, record, query );\n\t\t\t}\n\t\t} finally {\n\t\t\tdispatch.__unstableReleaseStoreLock( lock );\n\t\t}\n\t};\n\n/**\n * Requests an entity's record from the REST API.\n */\nexport const getRawEntityRecord = forwardResolver( 'getEntityRecord' );\n\n/**\n * Requests an entity's record from the REST API.\n */\nexport const getEditedEntityRecord = forwardResolver( 'getEntityRecord' );\n\n/**\n * Requests the entity's records from the REST API.\n *\n * @param {string} kind Entity kind.\n * @param {string} name Entity name.\n * @param {Object?} query Query Object. If requesting specific fields, fields\n * must always include the ID.\n */\nexport const getEntityRecords =\n\t( kind, name, query = {} ) =>\n\tasync ( { dispatch } ) => {\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = configs.find(\n\t\t\t( config ) => config.name === name && config.kind === kind\n\t\t);\n\t\tif ( ! entityConfig || entityConfig?.__experimentalNoFetch ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst lock = await dispatch.__unstableAcquireStoreLock(\n\t\t\tSTORE_NAME,\n\t\t\t[ 'entities', 'records', kind, name ],\n\t\t\t{ exclusive: false }\n\t\t);\n\n\t\ttry {\n\t\t\tif ( query._fields ) {\n\t\t\t\t// If requesting specific fields, items and query association to said\n\t\t\t\t// records are stored by ID reference. Thus, fields must always include\n\t\t\t\t// the ID.\n\t\t\t\tquery = {\n\t\t\t\t\t...query,\n\t\t\t\t\t_fields: [\n\t\t\t\t\t\t...new Set( [\n\t\t\t\t\t\t\t...( getNormalizedCommaSeparable( query._fields ) ||\n\t\t\t\t\t\t\t\t[] ),\n\t\t\t\t\t\t\tentityConfig.key || DEFAULT_ENTITY_KEY,\n\t\t\t\t\t\t] ),\n\t\t\t\t\t].join(),\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst path = addQueryArgs( entityConfig.baseURL, {\n\t\t\t\t...entityConfig.baseURLParams,\n\t\t\t\t...query,\n\t\t\t} );\n\n\t\t\tlet records, meta;\n\t\t\tif ( entityConfig.supportsPagination && query.per_page !== -1 ) {\n\t\t\t\tconst response = await apiFetch( { path, parse: false } );\n\t\t\t\trecords = Object.values( await response.json() );\n\t\t\t\tmeta = {\n\t\t\t\t\ttotalItems: parseInt(\n\t\t\t\t\t\tresponse.headers.get( 'X-WP-Total' )\n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\trecords = Object.values( await apiFetch( { path } ) );\n\t\t\t}\n\n\t\t\t// If we request fields but the result doesn't contain the fields,\n\t\t\t// explicitly set these fields as \"undefined\"\n\t\t\t// that way we consider the query \"fullfilled\".\n\t\t\tif ( query._fields ) {\n\t\t\t\trecords = records.map( ( record ) => {\n\t\t\t\t\tquery._fields.split( ',' ).forEach( ( field ) => {\n\t\t\t\t\t\tif ( ! record.hasOwnProperty( field ) ) {\n\t\t\t\t\t\t\trecord[ field ] = undefined;\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t\treturn record;\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecords,\n\t\t\t\tquery,\n\t\t\t\tfalse,\n\t\t\t\tundefined,\n\t\t\t\tmeta\n\t\t\t);\n\n\t\t\t// When requesting all fields, the list of results can be used to\n\t\t\t// resolve the `getEntityRecord` selector in addition to `getEntityRecords`.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/26575\n\t\t\tif ( ! query?._fields && ! query.context ) {\n\t\t\t\tconst key = entityConfig.key || DEFAULT_ENTITY_KEY;\n\t\t\t\tconst resolutionsArgs = records\n\t\t\t\t\t.filter( ( record ) => record[ key ] )\n\t\t\t\t\t.map( ( record ) => [ kind, name, record[ key ] ] );\n\n\t\t\t\tdispatch( {\n\t\t\t\t\ttype: 'START_RESOLUTIONS',\n\t\t\t\t\tselectorName: 'getEntityRecord',\n\t\t\t\t\targs: resolutionsArgs,\n\t\t\t\t} );\n\t\t\t\tdispatch( {\n\t\t\t\t\ttype: 'FINISH_RESOLUTIONS',\n\t\t\t\t\tselectorName: 'getEntityRecord',\n\t\t\t\t\targs: resolutionsArgs,\n\t\t\t\t} );\n\t\t\t}\n\t\t} finally {\n\t\t\tdispatch.__unstableReleaseStoreLock( lock );\n\t\t}\n\t};\n\ngetEntityRecords.shouldInvalidate = ( action, kind, name ) => {\n\treturn (\n\t\t( action.type === 'RECEIVE_ITEMS' || action.type === 'REMOVE_ITEMS' ) &&\n\t\taction.invalidateCache &&\n\t\tkind === action.kind &&\n\t\tname === action.name\n\t);\n};\n\n/**\n * Requests the current theme.\n */\nexport const getCurrentTheme =\n\t() =>\n\tasync ( { dispatch, resolveSelect } ) => {\n\t\tconst activeThemes = await resolveSelect.getEntityRecords(\n\t\t\t'root',\n\t\t\t'theme',\n\t\t\t{ status: 'active' }\n\t\t);\n\n\t\tdispatch.receiveCurrentTheme( activeThemes[ 0 ] );\n\t};\n\n/**\n * Requests theme supports data from the index.\n */\nexport const getThemeSupports = forwardResolver( 'getCurrentTheme' );\n\n/**\n * Requests a preview from the from the Embed API.\n *\n * @param {string} url URL to get the preview for.\n */\nexport const getEmbedPreview =\n\t( url ) =>\n\tasync ( { dispatch } ) => {\n\t\ttry {\n\t\t\tconst embedProxyResponse = await apiFetch( {\n\t\t\t\tpath: addQueryArgs( '/oembed/1.0/proxy', { url } ),\n\t\t\t} );\n\t\t\tdispatch.receiveEmbedPreview( url, embedProxyResponse );\n\t\t} catch ( error ) {\n\t\t\t// Embed API 404s if the URL cannot be embedded, so we have to catch the error from the apiRequest here.\n\t\t\tdispatch.receiveEmbedPreview( url, false );\n\t\t}\n\t};\n\n/**\n * Checks whether the current user can perform the given action on the given\n * REST resource.\n *\n * @param {string} requestedAction Action to check. One of: 'create', 'read', 'update',\n * 'delete'.\n * @param {string} resource REST resource to check, e.g. 'media' or 'posts'.\n * @param {?string} id ID of the rest resource to check.\n */\nexport const canUser =\n\t( requestedAction, resource, id ) =>\n\tasync ( { dispatch, registry } ) => {\n\t\tconst { hasStartedResolution } = registry.select( STORE_NAME );\n\n\t\tconst resourcePath = id ? `${ resource }/${ id }` : resource;\n\t\tconst retrievedActions = [ 'create', 'read', 'update', 'delete' ];\n\n\t\tif ( ! retrievedActions.includes( requestedAction ) ) {\n\t\t\tthrow new Error( `'${ requestedAction }' is not a valid action.` );\n\t\t}\n\n\t\t// Prevent resolving the same resource twice.\n\t\tfor ( const relatedAction of retrievedActions ) {\n\t\t\tif ( relatedAction === requestedAction ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst isAlreadyResolving = hasStartedResolution( 'canUser', [\n\t\t\t\trelatedAction,\n\t\t\t\tresource,\n\t\t\t\tid,\n\t\t\t] );\n\t\t\tif ( isAlreadyResolving ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tlet response;\n\t\ttry {\n\t\t\tresponse = await apiFetch( {\n\t\t\t\tpath: `/wp/v2/${ resourcePath }`,\n\t\t\t\tmethod: 'OPTIONS',\n\t\t\t\tparse: false,\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\t// Do nothing if our OPTIONS request comes back with an API error (4xx or\n\t\t\t// 5xx). The previously determined isAllowed value will remain in the store.\n\t\t\treturn;\n\t\t}\n\n\t\t// Optional chaining operator is used here because the API requests don't\n\t\t// return the expected result in the native version. Instead, API requests\n\t\t// only return the result, without including response properties like the headers.\n\t\tconst allowHeader = response.headers?.get( 'allow' );\n\t\tconst allowedMethods = allowHeader?.allow || allowHeader || '';\n\n\t\tconst permissions = {};\n\t\tconst methods = {\n\t\t\tcreate: 'POST',\n\t\t\tread: 'GET',\n\t\t\tupdate: 'PUT',\n\t\t\tdelete: 'DELETE',\n\t\t};\n\t\tfor ( const [ actionName, methodName ] of Object.entries( methods ) ) {\n\t\t\tpermissions[ actionName ] = allowedMethods.includes( methodName );\n\t\t}\n\n\t\tfor ( const action of retrievedActions ) {\n\t\t\tdispatch.receiveUserPermission(\n\t\t\t\t`${ action }/${ resourcePath }`,\n\t\t\t\tpermissions[ action ]\n\t\t\t);\n\t\t}\n\t};\n\n/**\n * Checks whether the current user can perform the given action on the given\n * REST resource.\n *\n * @param {string} kind Entity kind.\n * @param {string} name Entity name.\n * @param {string} recordId Record's id.\n */\nexport const canUserEditEntityRecord =\n\t( kind, name, recordId ) =>\n\tasync ( { dispatch } ) => {\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = configs.find(\n\t\t\t( config ) => config.name === name && config.kind === kind\n\t\t);\n\t\tif ( ! entityConfig ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst resource = entityConfig.__unstable_rest_base;\n\t\tawait dispatch( canUser( 'update', resource, recordId ) );\n\t};\n\n/**\n * Request autosave data from the REST API.\n *\n * @param {string} postType The type of the parent post.\n * @param {number} postId The id of the parent post.\n */\nexport const getAutosaves =\n\t( postType, postId ) =>\n\tasync ( { dispatch, resolveSelect } ) => {\n\t\tconst { rest_base: restBase, rest_namespace: restNamespace = 'wp/v2' } =\n\t\t\tawait resolveSelect.getPostType( postType );\n\t\tconst autosaves = await apiFetch( {\n\t\t\tpath: `/${ restNamespace }/${ restBase }/${ postId }/autosaves?context=edit`,\n\t\t} );\n\n\t\tif ( autosaves && autosaves.length ) {\n\t\t\tdispatch.receiveAutosaves( postId, autosaves );\n\t\t}\n\t};\n\n/**\n * Request autosave data from the REST API.\n *\n * This resolver exists to ensure the underlying autosaves are fetched via\n * `getAutosaves` when a call to the `getAutosave` selector is made.\n *\n * @param {string} postType The type of the parent post.\n * @param {number} postId The id of the parent post.\n */\nexport const getAutosave =\n\t( postType, postId ) =>\n\tasync ( { resolveSelect } ) => {\n\t\tawait resolveSelect.getAutosaves( postType, postId );\n\t};\n\n/**\n * Retrieve the frontend template used for a given link.\n *\n * @param {string} link Link.\n */\nexport const __experimentalGetTemplateForLink =\n\t( link ) =>\n\tasync ( { dispatch, resolveSelect } ) => {\n\t\tlet template;\n\t\ttry {\n\t\t\t// This is NOT calling a REST endpoint but rather ends up with a response from\n\t\t\t// an Ajax function which has a different shape from a WP_REST_Response.\n\t\t\ttemplate = await apiFetch( {\n\t\t\t\turl: addQueryArgs( link, {\n\t\t\t\t\t'_wp-find-template': true,\n\t\t\t\t} ),\n\t\t\t} ).then( ( { data } ) => data );\n\t\t} catch ( e ) {\n\t\t\t// For non-FSE themes, it is possible that this request returns an error.\n\t\t}\n\n\t\tif ( ! template ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst record = await resolveSelect.getEntityRecord(\n\t\t\t'postType',\n\t\t\t'wp_template',\n\t\t\ttemplate.id\n\t\t);\n\n\t\tif ( record ) {\n\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\t'postType',\n\t\t\t\t'wp_template',\n\t\t\t\t[ record ],\n\t\t\t\t{\n\t\t\t\t\t'find-template': link,\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t};\n\n__experimentalGetTemplateForLink.shouldInvalidate = ( action ) => {\n\treturn (\n\t\t( action.type === 'RECEIVE_ITEMS' || action.type === 'REMOVE_ITEMS' ) &&\n\t\taction.invalidateCache &&\n\t\taction.kind === 'postType' &&\n\t\taction.name === 'wp_template'\n\t);\n};\n\nexport const __experimentalGetCurrentGlobalStylesId =\n\t() =>\n\tasync ( { dispatch, resolveSelect } ) => {\n\t\tconst activeThemes = await resolveSelect.getEntityRecords(\n\t\t\t'root',\n\t\t\t'theme',\n\t\t\t{ status: 'active' }\n\t\t);\n\t\tconst globalStylesURL =\n\t\t\tactiveThemes?.[ 0 ]?._links?.[ 'wp:user-global-styles' ]?.[ 0 ]\n\t\t\t\t?.href;\n\t\tif ( globalStylesURL ) {\n\t\t\tconst globalStylesObject = await apiFetch( {\n\t\t\t\turl: globalStylesURL,\n\t\t\t} );\n\t\t\tdispatch.__experimentalReceiveCurrentGlobalStylesId(\n\t\t\t\tglobalStylesObject.id\n\t\t\t);\n\t\t}\n\t};\n\nexport const __experimentalGetCurrentThemeBaseGlobalStyles =\n\t() =>\n\tasync ( { resolveSelect, dispatch } ) => {\n\t\tconst currentTheme = await resolveSelect.getCurrentTheme();\n\t\tconst themeGlobalStyles = await apiFetch( {\n\t\t\tpath: `/wp/v2/global-styles/themes/${ currentTheme.stylesheet }`,\n\t\t} );\n\t\tdispatch.__experimentalReceiveThemeBaseGlobalStyles(\n\t\t\tcurrentTheme.stylesheet,\n\t\t\tthemeGlobalStyles\n\t\t);\n\t};\n\nexport const __experimentalGetCurrentThemeGlobalStylesVariations =\n\t() =>\n\tasync ( { resolveSelect, dispatch } ) => {\n\t\tconst currentTheme = await resolveSelect.getCurrentTheme();\n\t\tconst variations = await apiFetch( {\n\t\t\tpath: `/wp/v2/global-styles/themes/${ currentTheme.stylesheet }/variations`,\n\t\t} );\n\t\tdispatch.__experimentalReceiveThemeGlobalStyleVariations(\n\t\t\tcurrentTheme.stylesheet,\n\t\t\tvariations\n\t\t);\n\t};\n\n/**\n * Fetches and returns the revisions of the current global styles theme.\n */\nexport const getCurrentThemeGlobalStylesRevisions =\n\t() =>\n\tasync ( { resolveSelect, dispatch } ) => {\n\t\tconst globalStylesId =\n\t\t\tawait resolveSelect.__experimentalGetCurrentGlobalStylesId();\n\t\tconst record = globalStylesId\n\t\t\t? await resolveSelect.getEntityRecord(\n\t\t\t\t\t'root',\n\t\t\t\t\t'globalStyles',\n\t\t\t\t\tglobalStylesId\n\t\t\t )\n\t\t\t: undefined;\n\t\tconst revisionsURL = record?._links?.[ 'version-history' ]?.[ 0 ]?.href;\n\n\t\tif ( revisionsURL ) {\n\t\t\tconst resetRevisions = await apiFetch( {\n\t\t\t\turl: revisionsURL,\n\t\t\t} );\n\t\t\tconst revisions = resetRevisions?.map( ( revision ) =>\n\t\t\t\tObject.fromEntries(\n\t\t\t\t\tObject.entries( revision ).map( ( [ key, value ] ) => [\n\t\t\t\t\t\tcamelCase( key ),\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t] )\n\t\t\t\t)\n\t\t\t);\n\t\t\tdispatch.receiveThemeGlobalStyleRevisions(\n\t\t\t\tglobalStylesId,\n\t\t\t\trevisions\n\t\t\t);\n\t\t}\n\t};\n\ngetCurrentThemeGlobalStylesRevisions.shouldInvalidate = ( action ) => {\n\treturn (\n\t\taction.type === 'SAVE_ENTITY_RECORD_FINISH' &&\n\t\taction.kind === 'root' &&\n\t\t! action.error &&\n\t\taction.name === 'globalStyles'\n\t);\n};\n\nexport const getBlockPatterns =\n\t() =>\n\tasync ( { dispatch } ) => {\n\t\tconst restPatterns = await apiFetch( {\n\t\t\tpath: '/wp/v2/block-patterns/patterns',\n\t\t} );\n\t\tconst patterns = restPatterns?.map( ( pattern ) =>\n\t\t\tObject.fromEntries(\n\t\t\t\tObject.entries( pattern ).map( ( [ key, value ] ) => [\n\t\t\t\t\tcamelCase( key ),\n\t\t\t\t\tvalue,\n\t\t\t\t] )\n\t\t\t)\n\t\t);\n\t\tdispatch( { type: 'RECEIVE_BLOCK_PATTERNS', patterns } );\n\t};\n\nexport const getBlockPatternCategories =\n\t() =>\n\tasync ( { dispatch } ) => {\n\t\tconst categories = await apiFetch( {\n\t\t\tpath: '/wp/v2/block-patterns/categories',\n\t\t} );\n\t\tdispatch( { type: 'RECEIVE_BLOCK_PATTERN_CATEGORIES', categories } );\n\t};\n\nexport const getUserPatternCategories =\n\t() =>\n\tasync ( { dispatch, resolveSelect } ) => {\n\t\tconst patternCategories = await resolveSelect.getEntityRecords(\n\t\t\t'taxonomy',\n\t\t\t'wp_pattern_category',\n\t\t\t{\n\t\t\t\tper_page: -1,\n\t\t\t\t_fields: 'id,name,description,slug',\n\t\t\t\tcontext: 'view',\n\t\t\t}\n\t\t);\n\n\t\tconst mappedPatternCategories =\n\t\t\tpatternCategories?.map( ( userCategory ) => ( {\n\t\t\t\t...userCategory,\n\t\t\t\tlabel: decodeEntities( userCategory.name ),\n\t\t\t\tname: userCategory.slug,\n\t\t\t} ) ) || [];\n\n\t\tdispatch( {\n\t\t\ttype: 'RECEIVE_USER_PATTERN_CATEGORIES',\n\t\t\tpatternCategories: mappedPatternCategories,\n\t\t} );\n\t};\n\nexport const getNavigationFallbackId =\n\t() =>\n\tasync ( { dispatch, select } ) => {\n\t\tconst fallback = await apiFetch( {\n\t\t\tpath: addQueryArgs( '/wp-block-editor/v1/navigation-fallback', {\n\t\t\t\t_embed: true,\n\t\t\t} ),\n\t\t} );\n\n\t\tconst record = fallback?._embedded?.self;\n\n\t\tdispatch.receiveNavigationFallbackId( fallback?.id );\n\n\t\tif ( record ) {\n\t\t\t// If the fallback is already in the store, don't invalidate navigation queries.\n\t\t\t// Otherwise, invalidate the cache for the scenario where there were no Navigation\n\t\t\t// posts in the state and the fallback created one.\n\t\t\tconst existingFallbackEntityRecord = select.getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'wp_navigation',\n\t\t\t\tfallback?.id\n\t\t\t);\n\t\t\tconst invalidateNavigationQueries = ! existingFallbackEntityRecord;\n\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\t'postType',\n\t\t\t\t'wp_navigation',\n\t\t\t\trecord,\n\t\t\t\tundefined,\n\t\t\t\tinvalidateNavigationQueries\n\t\t\t);\n\n\t\t\t// Resolve to avoid further network requests.\n\t\t\tdispatch.finishResolution( 'getEntityRecord', [\n\t\t\t\t'postType',\n\t\t\t\t'wp_navigation',\n\t\t\t\tfallback?.id,\n\t\t\t] );\n\t\t}\n\t};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,aAAa;;AAEvC;AACA;AACA;AACA,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,cAAc,QA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K,QAAQ,CAAC+K,gBAAgB,CAAE,iBAAiB,EAAE,CAC7C,UAAU,EACV,eAAe,EACfP,QAAQ,EAAE/E,EAAE,CACX,CAAC;EACJ;AACD,CAAC"}
|
|
1
|
+
{"version":3,"names":["camelCase","addQueryArgs","decodeEntities","apiFetch","STORE_NAME","getOrLoadEntitiesConfig","DEFAULT_ENTITY_KEY","forwardResolver","getNormalizedCommaSeparable","getSyncProvider","getAuthors","query","dispatch","path","users","receiveUserQuery","getCurrentUser","currentUser","receiveCurrentUser","getEntityRecord","kind","name","key","select","configs","entityConfig","find","config","__experimentalNoFetch","lock","__unstableAcquireStoreLock","exclusive","window","__experimentalEnableSync","syncConfig","process","env","IS_GUTENBERG_PLUGIN","objectId","getSyncObjectId","bootstrap","syncObjectType","record","receiveEntityRecords","type","recordId","edits","meta","undo","undefined","_fields","Set","join","baseURL","baseURLParams","include","hasRecords","hasEntityRecords","__unstableReleaseStoreLock","getRawEntityRecord","getEditedEntityRecord","getEntityRecords","records","supportsPagination","per_page","response","parse","Object","values","json","totalItems","parseInt","headers","get","map","split","forEach","field","hasOwnProperty","context","resolutionsArgs","filter","selectorName","args","shouldInvalidate","action","invalidateCache","getCurrentTheme","resolveSelect","activeThemes","status","receiveCurrentTheme","getThemeSupports","getEmbedPreview","url","embedProxyResponse","receiveEmbedPreview","error","canUser","requestedAction","resource","id","registry","hasStartedResolution","resourcePath","retrievedActions","includes","Error","relatedAction","isAlreadyResolving","method","allowHeader","allowedMethods","allow","permissions","methods","create","read","update","delete","actionName","methodName","entries","receiveUserPermission","canUserEditEntityRecord","__unstable_rest_base","getAutosaves","postType","postId","rest_base","restBase","rest_namespace","restNamespace","getPostType","autosaves","length","receiveAutosaves","getAutosave","__experimentalGetTemplateForLink","link","template","then","data","e","__experimentalGetCurrentGlobalStylesId","globalStylesURL","_links","href","globalStylesObject","__experimentalReceiveCurrentGlobalStylesId","__experimentalGetCurrentThemeBaseGlobalStyles","currentTheme","themeGlobalStyles","stylesheet","__experimentalReceiveThemeBaseGlobalStyles","__experimentalGetCurrentThemeGlobalStylesVariations","variations","__experimentalReceiveThemeGlobalStyleVariations","getCurrentThemeGlobalStylesRevisions","globalStylesId","revisionsURL","resetRevisions","revisions","revision","fromEntries","value","receiveThemeGlobalStyleRevisions","getBlockPatterns","restPatterns","patterns","pattern","getBlockPatternCategories","categories","getUserPatternCategories","patternCategories","mappedPatternCategories","userCategory","label","slug","getNavigationFallbackId","fallback","_embed","_embedded","self","receiveNavigationFallbackId","existingFallbackEntityRecord","invalidateNavigationQueries","finishResolution","getDefaultTemplateId","receiveDefaultTemplateId"],"sources":["@wordpress/core-data/src/resolvers.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { camelCase } from 'change-case';\n\n/**\n * WordPress dependencies\n */\nimport { addQueryArgs } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n * Internal dependencies\n */\nimport { STORE_NAME } from './name';\nimport { getOrLoadEntitiesConfig, DEFAULT_ENTITY_KEY } from './entities';\nimport { forwardResolver, getNormalizedCommaSeparable } from './utils';\nimport { getSyncProvider } from './sync';\n\n/**\n * Requests authors from the REST API.\n *\n * @param {Object|undefined} query Optional object of query parameters to\n * include with request.\n */\nexport const getAuthors =\n\t( query ) =>\n\tasync ( { dispatch } ) => {\n\t\tconst path = addQueryArgs(\n\t\t\t'/wp/v2/users/?who=authors&per_page=100',\n\t\t\tquery\n\t\t);\n\t\tconst users = await apiFetch( { path } );\n\t\tdispatch.receiveUserQuery( path, users );\n\t};\n\n/**\n * Requests the current user from the REST API.\n */\nexport const getCurrentUser =\n\t() =>\n\tasync ( { dispatch } ) => {\n\t\tconst currentUser = await apiFetch( { path: '/wp/v2/users/me' } );\n\t\tdispatch.receiveCurrentUser( currentUser );\n\t};\n\n/**\n * Requests an entity's record from the REST API.\n *\n * @param {string} kind Entity kind.\n * @param {string} name Entity name.\n * @param {number|string} key Record's key\n * @param {Object|undefined} query Optional object of query parameters to\n * include with request. If requesting specific\n * fields, fields must always include the ID.\n */\nexport const getEntityRecord =\n\t( kind, name, key = '', query ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = configs.find(\n\t\t\t( config ) => config.name === name && config.kind === kind\n\t\t);\n\t\tif ( ! entityConfig || entityConfig?.__experimentalNoFetch ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst lock = await dispatch.__unstableAcquireStoreLock(\n\t\t\tSTORE_NAME,\n\t\t\t[ 'entities', 'records', kind, name, key ],\n\t\t\t{ exclusive: false }\n\t\t);\n\n\t\ttry {\n\t\t\t// Entity supports configs,\n\t\t\t// use the sync algorithm instead of the old fetch behavior.\n\t\t\tif (\n\t\t\t\twindow.__experimentalEnableSync &&\n\t\t\t\tentityConfig.syncConfig &&\n\t\t\t\t! query\n\t\t\t) {\n\t\t\t\tif ( process.env.IS_GUTENBERG_PLUGIN ) {\n\t\t\t\t\tconst objectId = entityConfig.getSyncObjectId( key );\n\n\t\t\t\t\t// Loads the persisted document.\n\t\t\t\t\tawait getSyncProvider().bootstrap(\n\t\t\t\t\t\tentityConfig.syncObjectType,\n\t\t\t\t\t\tobjectId,\n\t\t\t\t\t\t( record ) => {\n\t\t\t\t\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\t\t\t\t\tkind,\n\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\trecord,\n\t\t\t\t\t\t\t\tquery\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\n\t\t\t\t\t// Boostraps the edited document as well (and load from peers).\n\t\t\t\t\tawait getSyncProvider().bootstrap(\n\t\t\t\t\t\tentityConfig.syncObjectType + '--edit',\n\t\t\t\t\t\tobjectId,\n\t\t\t\t\t\t( record ) => {\n\t\t\t\t\t\t\tdispatch( {\n\t\t\t\t\t\t\t\ttype: 'EDIT_ENTITY_RECORD',\n\t\t\t\t\t\t\t\tkind,\n\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\trecordId: key,\n\t\t\t\t\t\t\t\tedits: record,\n\t\t\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\t\t\tundo: undefined,\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);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( query !== undefined && query._fields ) {\n\t\t\t\t\t// If requesting specific fields, items and query association to said\n\t\t\t\t\t// records are stored by ID reference. Thus, fields must always include\n\t\t\t\t\t// the ID.\n\t\t\t\t\tquery = {\n\t\t\t\t\t\t...query,\n\t\t\t\t\t\t_fields: [\n\t\t\t\t\t\t\t...new Set( [\n\t\t\t\t\t\t\t\t...( getNormalizedCommaSeparable(\n\t\t\t\t\t\t\t\t\tquery._fields\n\t\t\t\t\t\t\t\t) || [] ),\n\t\t\t\t\t\t\t\tentityConfig.key || DEFAULT_ENTITY_KEY,\n\t\t\t\t\t\t\t] ),\n\t\t\t\t\t\t].join(),\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Disable reason: While true that an early return could leave `path`\n\t\t\t\t// unused, it's important that path is derived using the query prior to\n\t\t\t\t// additional query modifications in the condition below, since those\n\t\t\t\t// modifications are relevant to how the data is tracked in state, and not\n\t\t\t\t// for how the request is made to the REST API.\n\n\t\t\t\t// eslint-disable-next-line @wordpress/no-unused-vars-before-return\n\t\t\t\tconst path = addQueryArgs(\n\t\t\t\t\tentityConfig.baseURL + ( key ? '/' + key : '' ),\n\t\t\t\t\t{\n\t\t\t\t\t\t...entityConfig.baseURLParams,\n\t\t\t\t\t\t...query,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tif ( query !== undefined ) {\n\t\t\t\t\tquery = { ...query, include: [ key ] };\n\n\t\t\t\t\t// The resolution cache won't consider query as reusable based on the\n\t\t\t\t\t// fields, so it's tested here, prior to initiating the REST request,\n\t\t\t\t\t// and without causing `getEntityRecords` resolution to occur.\n\t\t\t\t\tconst hasRecords = select.hasEntityRecords(\n\t\t\t\t\t\tkind,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tquery\n\t\t\t\t\t);\n\t\t\t\t\tif ( hasRecords ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst record = await apiFetch( { path } );\n\t\t\t\tdispatch.receiveEntityRecords( kind, name, record, query );\n\t\t\t}\n\t\t} finally {\n\t\t\tdispatch.__unstableReleaseStoreLock( lock );\n\t\t}\n\t};\n\n/**\n * Requests an entity's record from the REST API.\n */\nexport const getRawEntityRecord = forwardResolver( 'getEntityRecord' );\n\n/**\n * Requests an entity's record from the REST API.\n */\nexport const getEditedEntityRecord = forwardResolver( 'getEntityRecord' );\n\n/**\n * Requests the entity's records from the REST API.\n *\n * @param {string} kind Entity kind.\n * @param {string} name Entity name.\n * @param {Object?} query Query Object. If requesting specific fields, fields\n * must always include the ID.\n */\nexport const getEntityRecords =\n\t( kind, name, query = {} ) =>\n\tasync ( { dispatch } ) => {\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = configs.find(\n\t\t\t( config ) => config.name === name && config.kind === kind\n\t\t);\n\t\tif ( ! entityConfig || entityConfig?.__experimentalNoFetch ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst lock = await dispatch.__unstableAcquireStoreLock(\n\t\t\tSTORE_NAME,\n\t\t\t[ 'entities', 'records', kind, name ],\n\t\t\t{ exclusive: false }\n\t\t);\n\n\t\ttry {\n\t\t\tif ( query._fields ) {\n\t\t\t\t// If requesting specific fields, items and query association to said\n\t\t\t\t// records are stored by ID reference. Thus, fields must always include\n\t\t\t\t// the ID.\n\t\t\t\tquery = {\n\t\t\t\t\t...query,\n\t\t\t\t\t_fields: [\n\t\t\t\t\t\t...new Set( [\n\t\t\t\t\t\t\t...( getNormalizedCommaSeparable( query._fields ) ||\n\t\t\t\t\t\t\t\t[] ),\n\t\t\t\t\t\t\tentityConfig.key || DEFAULT_ENTITY_KEY,\n\t\t\t\t\t\t] ),\n\t\t\t\t\t].join(),\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst path = addQueryArgs( entityConfig.baseURL, {\n\t\t\t\t...entityConfig.baseURLParams,\n\t\t\t\t...query,\n\t\t\t} );\n\n\t\t\tlet records, meta;\n\t\t\tif ( entityConfig.supportsPagination && query.per_page !== -1 ) {\n\t\t\t\tconst response = await apiFetch( { path, parse: false } );\n\t\t\t\trecords = Object.values( await response.json() );\n\t\t\t\tmeta = {\n\t\t\t\t\ttotalItems: parseInt(\n\t\t\t\t\t\tresponse.headers.get( 'X-WP-Total' )\n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\trecords = Object.values( await apiFetch( { path } ) );\n\t\t\t}\n\n\t\t\t// If we request fields but the result doesn't contain the fields,\n\t\t\t// explicitly set these fields as \"undefined\"\n\t\t\t// that way we consider the query \"fullfilled\".\n\t\t\tif ( query._fields ) {\n\t\t\t\trecords = records.map( ( record ) => {\n\t\t\t\t\tquery._fields.split( ',' ).forEach( ( field ) => {\n\t\t\t\t\t\tif ( ! record.hasOwnProperty( field ) ) {\n\t\t\t\t\t\t\trecord[ field ] = undefined;\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t\treturn record;\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecords,\n\t\t\t\tquery,\n\t\t\t\tfalse,\n\t\t\t\tundefined,\n\t\t\t\tmeta\n\t\t\t);\n\n\t\t\t// When requesting all fields, the list of results can be used to\n\t\t\t// resolve the `getEntityRecord` selector in addition to `getEntityRecords`.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/26575\n\t\t\tif ( ! query?._fields && ! query.context ) {\n\t\t\t\tconst key = entityConfig.key || DEFAULT_ENTITY_KEY;\n\t\t\t\tconst resolutionsArgs = records\n\t\t\t\t\t.filter( ( record ) => record[ key ] )\n\t\t\t\t\t.map( ( record ) => [ kind, name, record[ key ] ] );\n\n\t\t\t\tdispatch( {\n\t\t\t\t\ttype: 'START_RESOLUTIONS',\n\t\t\t\t\tselectorName: 'getEntityRecord',\n\t\t\t\t\targs: resolutionsArgs,\n\t\t\t\t} );\n\t\t\t\tdispatch( {\n\t\t\t\t\ttype: 'FINISH_RESOLUTIONS',\n\t\t\t\t\tselectorName: 'getEntityRecord',\n\t\t\t\t\targs: resolutionsArgs,\n\t\t\t\t} );\n\t\t\t}\n\t\t} finally {\n\t\t\tdispatch.__unstableReleaseStoreLock( lock );\n\t\t}\n\t};\n\ngetEntityRecords.shouldInvalidate = ( action, kind, name ) => {\n\treturn (\n\t\t( action.type === 'RECEIVE_ITEMS' || action.type === 'REMOVE_ITEMS' ) &&\n\t\taction.invalidateCache &&\n\t\tkind === action.kind &&\n\t\tname === action.name\n\t);\n};\n\n/**\n * Requests the current theme.\n */\nexport const getCurrentTheme =\n\t() =>\n\tasync ( { dispatch, resolveSelect } ) => {\n\t\tconst activeThemes = await resolveSelect.getEntityRecords(\n\t\t\t'root',\n\t\t\t'theme',\n\t\t\t{ status: 'active' }\n\t\t);\n\n\t\tdispatch.receiveCurrentTheme( activeThemes[ 0 ] );\n\t};\n\n/**\n * Requests theme supports data from the index.\n */\nexport const getThemeSupports = forwardResolver( 'getCurrentTheme' );\n\n/**\n * Requests a preview from the from the Embed API.\n *\n * @param {string} url URL to get the preview for.\n */\nexport const getEmbedPreview =\n\t( url ) =>\n\tasync ( { dispatch } ) => {\n\t\ttry {\n\t\t\tconst embedProxyResponse = await apiFetch( {\n\t\t\t\tpath: addQueryArgs( '/oembed/1.0/proxy', { url } ),\n\t\t\t} );\n\t\t\tdispatch.receiveEmbedPreview( url, embedProxyResponse );\n\t\t} catch ( error ) {\n\t\t\t// Embed API 404s if the URL cannot be embedded, so we have to catch the error from the apiRequest here.\n\t\t\tdispatch.receiveEmbedPreview( url, false );\n\t\t}\n\t};\n\n/**\n * Checks whether the current user can perform the given action on the given\n * REST resource.\n *\n * @param {string} requestedAction Action to check. One of: 'create', 'read', 'update',\n * 'delete'.\n * @param {string} resource REST resource to check, e.g. 'media' or 'posts'.\n * @param {?string} id ID of the rest resource to check.\n */\nexport const canUser =\n\t( requestedAction, resource, id ) =>\n\tasync ( { dispatch, registry } ) => {\n\t\tconst { hasStartedResolution } = registry.select( STORE_NAME );\n\n\t\tconst resourcePath = id ? `${ resource }/${ id }` : resource;\n\t\tconst retrievedActions = [ 'create', 'read', 'update', 'delete' ];\n\n\t\tif ( ! retrievedActions.includes( requestedAction ) ) {\n\t\t\tthrow new Error( `'${ requestedAction }' is not a valid action.` );\n\t\t}\n\n\t\t// Prevent resolving the same resource twice.\n\t\tfor ( const relatedAction of retrievedActions ) {\n\t\t\tif ( relatedAction === requestedAction ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst isAlreadyResolving = hasStartedResolution( 'canUser', [\n\t\t\t\trelatedAction,\n\t\t\t\tresource,\n\t\t\t\tid,\n\t\t\t] );\n\t\t\tif ( isAlreadyResolving ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tlet response;\n\t\ttry {\n\t\t\tresponse = await apiFetch( {\n\t\t\t\tpath: `/wp/v2/${ resourcePath }`,\n\t\t\t\tmethod: 'OPTIONS',\n\t\t\t\tparse: false,\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\t// Do nothing if our OPTIONS request comes back with an API error (4xx or\n\t\t\t// 5xx). The previously determined isAllowed value will remain in the store.\n\t\t\treturn;\n\t\t}\n\n\t\t// Optional chaining operator is used here because the API requests don't\n\t\t// return the expected result in the native version. Instead, API requests\n\t\t// only return the result, without including response properties like the headers.\n\t\tconst allowHeader = response.headers?.get( 'allow' );\n\t\tconst allowedMethods = allowHeader?.allow || allowHeader || '';\n\n\t\tconst permissions = {};\n\t\tconst methods = {\n\t\t\tcreate: 'POST',\n\t\t\tread: 'GET',\n\t\t\tupdate: 'PUT',\n\t\t\tdelete: 'DELETE',\n\t\t};\n\t\tfor ( const [ actionName, methodName ] of Object.entries( methods ) ) {\n\t\t\tpermissions[ actionName ] = allowedMethods.includes( methodName );\n\t\t}\n\n\t\tfor ( const action of retrievedActions ) {\n\t\t\tdispatch.receiveUserPermission(\n\t\t\t\t`${ action }/${ resourcePath }`,\n\t\t\t\tpermissions[ action ]\n\t\t\t);\n\t\t}\n\t};\n\n/**\n * Checks whether the current user can perform the given action on the given\n * REST resource.\n *\n * @param {string} kind Entity kind.\n * @param {string} name Entity name.\n * @param {string} recordId Record's id.\n */\nexport const canUserEditEntityRecord =\n\t( kind, name, recordId ) =>\n\tasync ( { dispatch } ) => {\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = configs.find(\n\t\t\t( config ) => config.name === name && config.kind === kind\n\t\t);\n\t\tif ( ! entityConfig ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst resource = entityConfig.__unstable_rest_base;\n\t\tawait dispatch( canUser( 'update', resource, recordId ) );\n\t};\n\n/**\n * Request autosave data from the REST API.\n *\n * @param {string} postType The type of the parent post.\n * @param {number} postId The id of the parent post.\n */\nexport const getAutosaves =\n\t( postType, postId ) =>\n\tasync ( { dispatch, resolveSelect } ) => {\n\t\tconst { rest_base: restBase, rest_namespace: restNamespace = 'wp/v2' } =\n\t\t\tawait resolveSelect.getPostType( postType );\n\t\tconst autosaves = await apiFetch( {\n\t\t\tpath: `/${ restNamespace }/${ restBase }/${ postId }/autosaves?context=edit`,\n\t\t} );\n\n\t\tif ( autosaves && autosaves.length ) {\n\t\t\tdispatch.receiveAutosaves( postId, autosaves );\n\t\t}\n\t};\n\n/**\n * Request autosave data from the REST API.\n *\n * This resolver exists to ensure the underlying autosaves are fetched via\n * `getAutosaves` when a call to the `getAutosave` selector is made.\n *\n * @param {string} postType The type of the parent post.\n * @param {number} postId The id of the parent post.\n */\nexport const getAutosave =\n\t( postType, postId ) =>\n\tasync ( { resolveSelect } ) => {\n\t\tawait resolveSelect.getAutosaves( postType, postId );\n\t};\n\n/**\n * Retrieve the frontend template used for a given link.\n *\n * @param {string} link Link.\n */\nexport const __experimentalGetTemplateForLink =\n\t( link ) =>\n\tasync ( { dispatch, resolveSelect } ) => {\n\t\tlet template;\n\t\ttry {\n\t\t\t// This is NOT calling a REST endpoint but rather ends up with a response from\n\t\t\t// an Ajax function which has a different shape from a WP_REST_Response.\n\t\t\ttemplate = await apiFetch( {\n\t\t\t\turl: addQueryArgs( link, {\n\t\t\t\t\t'_wp-find-template': true,\n\t\t\t\t} ),\n\t\t\t} ).then( ( { data } ) => data );\n\t\t} catch ( e ) {\n\t\t\t// For non-FSE themes, it is possible that this request returns an error.\n\t\t}\n\n\t\tif ( ! template ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst record = await resolveSelect.getEntityRecord(\n\t\t\t'postType',\n\t\t\t'wp_template',\n\t\t\ttemplate.id\n\t\t);\n\n\t\tif ( record ) {\n\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\t'postType',\n\t\t\t\t'wp_template',\n\t\t\t\t[ record ],\n\t\t\t\t{\n\t\t\t\t\t'find-template': link,\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t};\n\n__experimentalGetTemplateForLink.shouldInvalidate = ( action ) => {\n\treturn (\n\t\t( action.type === 'RECEIVE_ITEMS' || action.type === 'REMOVE_ITEMS' ) &&\n\t\taction.invalidateCache &&\n\t\taction.kind === 'postType' &&\n\t\taction.name === 'wp_template'\n\t);\n};\n\nexport const __experimentalGetCurrentGlobalStylesId =\n\t() =>\n\tasync ( { dispatch, resolveSelect } ) => {\n\t\tconst activeThemes = await resolveSelect.getEntityRecords(\n\t\t\t'root',\n\t\t\t'theme',\n\t\t\t{ status: 'active' }\n\t\t);\n\t\tconst globalStylesURL =\n\t\t\tactiveThemes?.[ 0 ]?._links?.[ 'wp:user-global-styles' ]?.[ 0 ]\n\t\t\t\t?.href;\n\t\tif ( globalStylesURL ) {\n\t\t\tconst globalStylesObject = await apiFetch( {\n\t\t\t\turl: globalStylesURL,\n\t\t\t} );\n\t\t\tdispatch.__experimentalReceiveCurrentGlobalStylesId(\n\t\t\t\tglobalStylesObject.id\n\t\t\t);\n\t\t}\n\t};\n\nexport const __experimentalGetCurrentThemeBaseGlobalStyles =\n\t() =>\n\tasync ( { resolveSelect, dispatch } ) => {\n\t\tconst currentTheme = await resolveSelect.getCurrentTheme();\n\t\tconst themeGlobalStyles = await apiFetch( {\n\t\t\tpath: `/wp/v2/global-styles/themes/${ currentTheme.stylesheet }`,\n\t\t} );\n\t\tdispatch.__experimentalReceiveThemeBaseGlobalStyles(\n\t\t\tcurrentTheme.stylesheet,\n\t\t\tthemeGlobalStyles\n\t\t);\n\t};\n\nexport const __experimentalGetCurrentThemeGlobalStylesVariations =\n\t() =>\n\tasync ( { resolveSelect, dispatch } ) => {\n\t\tconst currentTheme = await resolveSelect.getCurrentTheme();\n\t\tconst variations = await apiFetch( {\n\t\t\tpath: `/wp/v2/global-styles/themes/${ currentTheme.stylesheet }/variations`,\n\t\t} );\n\t\tdispatch.__experimentalReceiveThemeGlobalStyleVariations(\n\t\t\tcurrentTheme.stylesheet,\n\t\t\tvariations\n\t\t);\n\t};\n\n/**\n * Fetches and returns the revisions of the current global styles theme.\n */\nexport const getCurrentThemeGlobalStylesRevisions =\n\t() =>\n\tasync ( { resolveSelect, dispatch } ) => {\n\t\tconst globalStylesId =\n\t\t\tawait resolveSelect.__experimentalGetCurrentGlobalStylesId();\n\t\tconst record = globalStylesId\n\t\t\t? await resolveSelect.getEntityRecord(\n\t\t\t\t\t'root',\n\t\t\t\t\t'globalStyles',\n\t\t\t\t\tglobalStylesId\n\t\t\t )\n\t\t\t: undefined;\n\t\tconst revisionsURL = record?._links?.[ 'version-history' ]?.[ 0 ]?.href;\n\n\t\tif ( revisionsURL ) {\n\t\t\tconst resetRevisions = await apiFetch( {\n\t\t\t\turl: revisionsURL,\n\t\t\t} );\n\t\t\tconst revisions = resetRevisions?.map( ( revision ) =>\n\t\t\t\tObject.fromEntries(\n\t\t\t\t\tObject.entries( revision ).map( ( [ key, value ] ) => [\n\t\t\t\t\t\tcamelCase( key ),\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t] )\n\t\t\t\t)\n\t\t\t);\n\t\t\tdispatch.receiveThemeGlobalStyleRevisions(\n\t\t\t\tglobalStylesId,\n\t\t\t\trevisions\n\t\t\t);\n\t\t}\n\t};\n\ngetCurrentThemeGlobalStylesRevisions.shouldInvalidate = ( action ) => {\n\treturn (\n\t\taction.type === 'SAVE_ENTITY_RECORD_FINISH' &&\n\t\taction.kind === 'root' &&\n\t\t! action.error &&\n\t\taction.name === 'globalStyles'\n\t);\n};\n\nexport const getBlockPatterns =\n\t() =>\n\tasync ( { dispatch } ) => {\n\t\tconst restPatterns = await apiFetch( {\n\t\t\tpath: '/wp/v2/block-patterns/patterns',\n\t\t} );\n\t\tconst patterns = restPatterns?.map( ( pattern ) =>\n\t\t\tObject.fromEntries(\n\t\t\t\tObject.entries( pattern ).map( ( [ key, value ] ) => [\n\t\t\t\t\tcamelCase( key ),\n\t\t\t\t\tvalue,\n\t\t\t\t] )\n\t\t\t)\n\t\t);\n\t\tdispatch( { type: 'RECEIVE_BLOCK_PATTERNS', patterns } );\n\t};\n\nexport const getBlockPatternCategories =\n\t() =>\n\tasync ( { dispatch } ) => {\n\t\tconst categories = await apiFetch( {\n\t\t\tpath: '/wp/v2/block-patterns/categories',\n\t\t} );\n\t\tdispatch( { type: 'RECEIVE_BLOCK_PATTERN_CATEGORIES', categories } );\n\t};\n\nexport const getUserPatternCategories =\n\t() =>\n\tasync ( { dispatch, resolveSelect } ) => {\n\t\tconst patternCategories = await resolveSelect.getEntityRecords(\n\t\t\t'taxonomy',\n\t\t\t'wp_pattern_category',\n\t\t\t{\n\t\t\t\tper_page: -1,\n\t\t\t\t_fields: 'id,name,description,slug',\n\t\t\t\tcontext: 'view',\n\t\t\t}\n\t\t);\n\n\t\tconst mappedPatternCategories =\n\t\t\tpatternCategories?.map( ( userCategory ) => ( {\n\t\t\t\t...userCategory,\n\t\t\t\tlabel: decodeEntities( userCategory.name ),\n\t\t\t\tname: userCategory.slug,\n\t\t\t} ) ) || [];\n\n\t\tdispatch( {\n\t\t\ttype: 'RECEIVE_USER_PATTERN_CATEGORIES',\n\t\t\tpatternCategories: mappedPatternCategories,\n\t\t} );\n\t};\n\nexport const getNavigationFallbackId =\n\t() =>\n\tasync ( { dispatch, select } ) => {\n\t\tconst fallback = await apiFetch( {\n\t\t\tpath: addQueryArgs( '/wp-block-editor/v1/navigation-fallback', {\n\t\t\t\t_embed: true,\n\t\t\t} ),\n\t\t} );\n\n\t\tconst record = fallback?._embedded?.self;\n\n\t\tdispatch.receiveNavigationFallbackId( fallback?.id );\n\n\t\tif ( record ) {\n\t\t\t// If the fallback is already in the store, don't invalidate navigation queries.\n\t\t\t// Otherwise, invalidate the cache for the scenario where there were no Navigation\n\t\t\t// posts in the state and the fallback created one.\n\t\t\tconst existingFallbackEntityRecord = select.getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'wp_navigation',\n\t\t\t\tfallback?.id\n\t\t\t);\n\t\t\tconst invalidateNavigationQueries = ! existingFallbackEntityRecord;\n\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\t'postType',\n\t\t\t\t'wp_navigation',\n\t\t\t\trecord,\n\t\t\t\tundefined,\n\t\t\t\tinvalidateNavigationQueries\n\t\t\t);\n\n\t\t\t// Resolve to avoid further network requests.\n\t\t\tdispatch.finishResolution( 'getEntityRecord', [\n\t\t\t\t'postType',\n\t\t\t\t'wp_navigation',\n\t\t\t\tfallback?.id,\n\t\t\t] );\n\t\t}\n\t};\n\nexport const getDefaultTemplateId =\n\t( query ) =>\n\tasync ( { dispatch } ) => {\n\t\tconst template = await apiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/templates/lookup', query ),\n\t\t}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U,EACV,eAAe,EACfiK,QAAQ,EAAE/E,EACX,CAAC;IACD,MAAMqF,2BAA2B,GAAG,CAAED,4BAA4B;IAClE7K,QAAQ,CAAC+B,oBAAoB,CAC5B,UAAU,EACV,eAAe,EACfD,MAAM,EACNO,SAAS,EACTyI,2BACD,CAAC;;IAED;IACA9K,QAAQ,CAAC+K,gBAAgB,CAAE,iBAAiB,EAAE,CAC7C,UAAU,EACV,eAAe,EACfP,QAAQ,EAAE/E,EAAE,CACX,CAAC;EACJ;AACD,CAAC;AAEF,OAAO,MAAMuF,oBAAoB,GAC9BjL,KAAK,IACP,OAAQ;EAAEC;AAAS,CAAC,KAAM;EACzB,MAAMgI,QAAQ,GAAG,MAAMzI,QAAQ,CAAE;IAChCU,IAAI,EAAEZ,YAAY,CAAE,yBAAyB,EAAEU,KAAM;EACtD,CAAE,CAAC;EACH,IAAKiI,QAAQ,EAAG;IACfhI,QAAQ,CAACiL,wBAAwB,CAAElL,KAAK,EAAEiI,QAAQ,CAACvC,EAAG,CAAC;EACxD;AACD,CAAC"}
|
|
@@ -936,4 +936,16 @@ export function getCurrentThemeGlobalStylesRevisions(state) {
|
|
|
936
936
|
}
|
|
937
937
|
return state.themeGlobalStyleRevisions[currentGlobalStylesId];
|
|
938
938
|
}
|
|
939
|
+
|
|
940
|
+
/**
|
|
941
|
+
* Returns the default template use to render a given query.
|
|
942
|
+
*
|
|
943
|
+
* @param state Data state.
|
|
944
|
+
* @param query Query.
|
|
945
|
+
*
|
|
946
|
+
* @return The default template id for the given query.
|
|
947
|
+
*/
|
|
948
|
+
export function getDefaultTemplateId(state, query) {
|
|
949
|
+
return state.defaultTemplates[JSON.stringify(query)];
|
|
950
|
+
}
|
|
939
951
|
//# sourceMappingURL=selectors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createSelector","createRegistrySelector","addQueryArgs","deprecated","STORE_NAME","getQueriedItems","getQueriedTotalItems","DEFAULT_ENTITY_KEY","getNormalizedCommaSeparable","isRawAttribute","setNestedValue","isNumericID","EMPTY_OBJECT","isRequestingEmbedPreview","select","state","url","isResolving","getAuthors","query","since","alternative","path","getUserQueryResults","getCurrentUser","currentUser","queryID","_state$users$queries$","queryResults","users","queries","map","id","byId","getEntitiesByKind","kind","getEntitiesConfig","entities","config","filter","entity","getEntity","name","getEntityConfig","find","getEntityRecord","key","_query$context","queriedState","records","queriedData","undefined","context","itemIsComplete","items","item","_fields","_getNormalizedCommaSe","filteredItem","fields","f","length","field","split","value","forEach","fieldName","recordId","_query$context2","__unstableNormalizeArgs","args","newArgs","recordKey","Number","__experimentalGetEntityRecordNoResolver","getRawEntityRecord","record","Object","keys","reduce","accumulator","_key","_record$_key$raw","raw","_query$context3","hasEntityRecords","Array","isArray","getEntityRecords","getEntityRecordsTotalItems","getEntityRecordsTotalPages","per_page","totalItems","Math","ceil","__experimentalGetDirtyEntityRecords","dirtyRecords","primaryKeys","edits","primaryKey","hasEditsForEntityRecord","entityConfig","entityRecord","getEditedEntityRecord","push","title","getTitle","__experimentalGetEntitiesBeingSaved","recordsBeingSaved","saving","isSavingEntityRecord","getEntityRecordEdits","getEntityRecordNonTransientEdits","transientEdits","acc","_query$context4","isAutosavingEntityRecord","_state$entities$recor","pending","isAutosave","Boolean","_state$entities$recor2","isDeletingEntityRecord","_state$entities$recor3","deleting","getLastEntitySaveError","error","getLastEntityDeleteError","getUndoEdit","getRedoEdit","hasUndo","undoManager","hasRedo","getCurrentTheme","currentTheme","__experimentalGetCurrentGlobalStylesId","currentGlobalStylesId","getThemeSupports","_getCurrentTheme$them","theme_supports","getEmbedPreview","embedPreviews","isPreviewEmbedFallback","preview","oEmbedLinkCheck","html","canUser","action","resource","join","userPermissions","canUserEditEntityRecord","__unstable_rest_base","getAutosaves","postType","postId","autosaves","getAutosave","authorId","autosave","author","hasFetchedAutosaves","hasFinishedResolution","getReferenceByDistinctEdits","editsReference","__experimentalGetTemplateForLink","link","__experimentalGetCurrentThemeBaseGlobalStyles","themeBaseGlobalStyles","stylesheet","__experimentalGetCurrentThemeGlobalStylesVariations","themeGlobalStyleVariations","getBlockPatterns","blockPatterns","getBlockPatternCategories","blockPatternCategories","getUserPatternCategories","userPatternCategories","getCurrentThemeGlobalStylesRevisions","themeGlobalStyleRevisions"],"sources":["@wordpress/core-data/src/selectors.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport createSelector from 'rememo';\n\n/**\n * WordPress dependencies\n */\nimport { createRegistrySelector } from '@wordpress/data';\nimport { addQueryArgs } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { STORE_NAME } from './name';\nimport { getQueriedItems, getQueriedTotalItems } from './queried-data';\nimport { DEFAULT_ENTITY_KEY } from './entities';\nimport {\n\tgetNormalizedCommaSeparable,\n\tisRawAttribute,\n\tsetNestedValue,\n\tisNumericID,\n} from './utils';\nimport type * as ET from './entity-types';\nimport type { UndoManager } from '@wordpress/undo-manager';\n\n// This is an incomplete, high-level approximation of the State type.\n// It makes the selectors slightly more safe, but is intended to evolve\n// into a more detailed representation over time.\n// See https://github.com/WordPress/gutenberg/pull/40025#discussion_r865410589 for more context.\nexport interface State {\n\tautosaves: Record< string | number, Array< unknown > >;\n\tblockPatterns: Array< unknown >;\n\tblockPatternCategories: Array< unknown >;\n\tcurrentGlobalStylesId: string;\n\tcurrentTheme: string;\n\tcurrentUser: ET.User< 'edit' >;\n\tembedPreviews: Record< string, { html: string } >;\n\tentities: EntitiesState;\n\tthemeBaseGlobalStyles: Record< string, Object >;\n\tthemeGlobalStyleVariations: Record< string, string >;\n\tthemeGlobalStyleRevisions: Record< number, Object >;\n\tundoManager: UndoManager;\n\tuserPermissions: Record< string, boolean >;\n\tusers: UserState;\n\tnavigationFallbackId: EntityRecordKey;\n\tuserPatternCategories: Array< UserPatternCategory >;\n}\n\ntype EntityRecordKey = string | number;\n\ninterface EntitiesState {\n\tconfig: EntityConfig[];\n\trecords: Record< string, Record< string, EntityState< ET.EntityRecord > > >;\n}\n\ninterface QueriedData {\n\titems: Record< ET.Context, Record< number, ET.EntityRecord > >;\n\titemIsComplete: Record< ET.Context, Record< number, boolean > >;\n\tqueries: Record< ET.Context, Record< string, Array< number > > >;\n}\n\ninterface EntityState< EntityRecord extends ET.EntityRecord > {\n\tedits: Record< string, Partial< EntityRecord > >;\n\tsaving: Record<\n\t\tstring,\n\t\tPartial< { pending: boolean; isAutosave: boolean; error: Error } >\n\t>;\n\tdeleting: Record< string, Partial< { pending: boolean; error: Error } > >;\n\tqueriedData: QueriedData;\n}\n\ninterface EntityConfig {\n\tname: string;\n\tkind: string;\n}\n\ninterface UserState {\n\tqueries: Record< string, EntityRecordKey[] >;\n\tbyId: Record< EntityRecordKey, ET.User< 'edit' > >;\n}\n\nexport interface UserPatternCategory {\n\tid: number;\n\tname: string;\n\tlabel: string;\n\tslug: string;\n\tdescription: string;\n}\n\ntype Optional< T > = T | undefined;\n\n/**\n * HTTP Query parameters sent with the API request to fetch the entity records.\n */\ntype GetRecordsHttpQuery = Record< string, any >;\n\n/**\n * Arguments for EntityRecord selectors.\n */\ntype EntityRecordArgs =\n\t| [ string, string, EntityRecordKey ]\n\t| [ string, string, EntityRecordKey, GetRecordsHttpQuery ];\n\n/**\n * Shared reference to an empty object for cases where it is important to avoid\n * returning a new object reference on every invocation, as in a connected or\n * other pure component which performs `shouldComponentUpdate` check on props.\n * This should be used as a last resort, since the normalized data should be\n * maintained by the reducer result in state.\n */\nconst EMPTY_OBJECT = {};\n\n/**\n * Returns true if a request is in progress for embed preview data, or false\n * otherwise.\n *\n * @param state Data state.\n * @param url URL the preview would be for.\n *\n * @return Whether a request is in progress for an embed preview.\n */\nexport const isRequestingEmbedPreview = createRegistrySelector(\n\t( select: any ) =>\n\t\t( state: State, url: string ): boolean => {\n\t\t\treturn select( STORE_NAME ).isResolving( 'getEmbedPreview', [\n\t\t\t\turl,\n\t\t\t] );\n\t\t}\n);\n\n/**\n * Returns all available authors.\n *\n * @deprecated since 11.3. Callers should use `select( 'core' ).getUsers({ who: 'authors' })` instead.\n *\n * @param state Data state.\n * @param query Optional object of query parameters to\n * include with request. For valid query parameters see the [Users page](https://developer.wordpress.org/rest-api/reference/users/) in the REST API Handbook and see the arguments for [List Users](https://developer.wordpress.org/rest-api/reference/users/#list-users) and [Retrieve a User](https://developer.wordpress.org/rest-api/reference/users/#retrieve-a-user).\n * @return Authors list.\n */\nexport function getAuthors(\n\tstate: State,\n\tquery?: GetRecordsHttpQuery\n): ET.User[] {\n\tdeprecated( \"select( 'core' ).getAuthors()\", {\n\t\tsince: '5.9',\n\t\talternative: \"select( 'core' ).getUsers({ who: 'authors' })\",\n\t} );\n\n\tconst path = addQueryArgs(\n\t\t'/wp/v2/users/?who=authors&per_page=100',\n\t\tquery\n\t);\n\treturn getUserQueryResults( state, path );\n}\n\n/**\n * Returns the current user.\n *\n * @param state Data state.\n *\n * @return Current user object.\n */\nexport function getCurrentUser( state: State ): ET.User< 'edit' > {\n\treturn state.currentUser;\n}\n\n/**\n * Returns all the users returned by a query ID.\n *\n * @param state Data state.\n * @param queryID Query ID.\n *\n * @return Users list.\n */\nexport const getUserQueryResults = createSelector(\n\t( state: State, queryID: string ): ET.User< 'edit' >[] => {\n\t\tconst queryResults = state.users.queries[ queryID ] ?? [];\n\n\t\treturn queryResults.map( ( id ) => state.users.byId[ id ] );\n\t},\n\t( state: State, queryID: string ) => [\n\t\tstate.users.queries[ queryID ],\n\t\tstate.users.byId,\n\t]\n);\n\n/**\n * Returns the loaded entities for the given kind.\n *\n * @deprecated since WordPress 6.0. Use getEntitiesConfig instead\n * @param state Data state.\n * @param kind Entity kind.\n *\n * @return Array of entities with config matching kind.\n */\nexport function getEntitiesByKind( state: State, kind: string ): Array< any > {\n\tdeprecated( \"wp.data.select( 'core' ).getEntitiesByKind()\", {\n\t\tsince: '6.0',\n\t\talternative: \"wp.data.select( 'core' ).getEntitiesConfig()\",\n\t} );\n\treturn getEntitiesConfig( state, kind );\n}\n\n/**\n * Returns the loaded entities for the given kind.\n *\n * @param state Data state.\n * @param kind Entity kind.\n *\n * @return Array of entities with config matching kind.\n */\nexport function getEntitiesConfig( state: State, kind: string ): Array< any > {\n\treturn state.entities.config.filter( ( entity ) => entity.kind === kind );\n}\n\n/**\n * Returns the entity config given its kind and name.\n *\n * @deprecated since WordPress 6.0. Use getEntityConfig instead\n * @param state Data state.\n * @param kind Entity kind.\n * @param name Entity name.\n *\n * @return Entity config\n */\nexport function getEntity( state: State, kind: string, name: string ): any {\n\tdeprecated( \"wp.data.select( 'core' ).getEntity()\", {\n\t\tsince: '6.0',\n\t\talternative: \"wp.data.select( 'core' ).getEntityConfig()\",\n\t} );\n\treturn getEntityConfig( state, kind, name );\n}\n\n/**\n * Returns the entity config given its kind and name.\n *\n * @param state Data state.\n * @param kind Entity kind.\n * @param name Entity name.\n *\n * @return Entity config\n */\nexport function getEntityConfig(\n\tstate: State,\n\tkind: string,\n\tname: string\n): any {\n\treturn state.entities.config?.find(\n\t\t( config ) => config.kind === kind && config.name === name\n\t);\n}\n\n/**\n * GetEntityRecord is declared as a *callable interface* with\n * two signatures to work around the fact that TypeScript doesn't\n * allow currying generic functions:\n *\n * ```ts\n * \t\ttype CurriedState = F extends ( state: any, ...args: infer P ) => infer R\n * \t\t\t? ( ...args: P ) => R\n * \t\t\t: F;\n * \t\ttype Selector = <K extends string | number>(\n * state: any,\n * kind: K,\n * key: K extends string ? 'string value' : false\n * ) => K;\n * \t\ttype BadlyInferredSignature = CurriedState< Selector >\n * // BadlyInferredSignature evaluates to:\n * // (kind: string number, key: false | \"string value\") => string number\n * ```\n *\n * The signature without the state parameter shipped as CurriedSignature\n * is used in the return value of `select( coreStore )`.\n *\n * See https://github.com/WordPress/gutenberg/pull/41578 for more details.\n */\nexport interface GetEntityRecord {\n\t<\n\t\tEntityRecord extends\n\t\t\t| ET.EntityRecord< any >\n\t\t\t| Partial< ET.EntityRecord< any > >,\n\t>(\n\t\tstate: State,\n\t\tkind: string,\n\t\tname: string,\n\t\tkey: EntityRecordKey,\n\t\tquery?: GetRecordsHttpQuery\n\t): EntityRecord | undefined;\n\n\tCurriedSignature: <\n\t\tEntityRecord extends\n\t\t\t| ET.EntityRecord< any >\n\t\t\t| Partial< ET.EntityRecord< any > >,\n\t>(\n\t\tkind: string,\n\t\tname: string,\n\t\tkey: EntityRecordKey,\n\t\tquery?: GetRecordsHttpQuery\n\t) => EntityRecord | undefined;\n\t__unstableNormalizeArgs?: ( args: EntityRecordArgs ) => EntityRecordArgs;\n}\n\n/**\n * Returns the Entity's record object by key. Returns `null` if the value is not\n * yet received, undefined if the value entity is known to not exist, or the\n * entity object if it exists and is received.\n *\n * @param state State tree\n * @param kind Entity kind.\n * @param name Entity name.\n * @param key Record's key\n * @param query Optional query. If requesting specific\n * fields, fields must always include the ID. For valid query parameters see the [Reference](https://developer.wordpress.org/rest-api/reference/) in the REST API Handbook and select the entity kind. Then see the arguments available \"Retrieve a [Entity kind]\".\n *\n * @return Record.\n */\nexport const getEntityRecord = createSelector(\n\t( <\n\t\tEntityRecord extends\n\t\t\t| ET.EntityRecord< any >\n\t\t\t| Partial< ET.EntityRecord< any > >,\n\t>(\n\t\tstate: State,\n\t\tkind: string,\n\t\tname: string,\n\t\tkey: EntityRecordKey,\n\t\tquery?: GetRecordsHttpQuery\n\t): EntityRecord | undefined => {\n\t\tconst queriedState =\n\t\t\tstate.entities.records?.[ kind ]?.[ name ]?.queriedData;\n\t\tif ( ! queriedState ) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst context = query?.context ?? 'default';\n\n\t\tif ( query === undefined ) {\n\t\t\t// If expecting a complete item, validate that completeness.\n\t\t\tif ( ! queriedState.itemIsComplete[ context ]?.[ key ] ) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\treturn queriedState.items[ context ][ key ];\n\t\t}\n\n\t\tconst item = queriedState.items[ context ]?.[ key ];\n\t\tif ( item && query._fields ) {\n\t\t\tconst filteredItem = {};\n\t\t\tconst fields = getNormalizedCommaSeparable( query._fields ) ?? [];\n\t\t\tfor ( let f = 0; f < fields.length; f++ ) {\n\t\t\t\tconst field = fields[ f ].split( '.' );\n\t\t\t\tlet value = item;\n\t\t\t\tfield.forEach( ( fieldName ) => {\n\t\t\t\t\tvalue = value?.[ fieldName ];\n\t\t\t\t} );\n\t\t\t\tsetNestedValue( filteredItem, field, value );\n\t\t\t}\n\t\t\treturn filteredItem as EntityRecord;\n\t\t}\n\n\t\treturn item;\n\t} ) as GetEntityRecord,\n\t( state: State, kind, name, recordId, query ) => {\n\t\tconst context = query?.context ?? 'default';\n\t\treturn [\n\t\t\tstate.entities.records?.[ kind ]?.[ name ]?.queriedData?.items[\n\t\t\t\tcontext\n\t\t\t]?.[ recordId ],\n\t\t\tstate.entities.records?.[ kind ]?.[ name ]?.queriedData\n\t\t\t\t?.itemIsComplete[ context ]?.[ recordId ],\n\t\t];\n\t}\n) as GetEntityRecord;\n\n/**\n * Normalizes `recordKey`s that look like numeric IDs to numbers.\n *\n * @param args EntityRecordArgs the selector arguments.\n * @return EntityRecordArgs the normalized arguments.\n */\ngetEntityRecord.__unstableNormalizeArgs = (\n\targs: EntityRecordArgs\n): EntityRecordArgs => {\n\tconst newArgs = [ ...args ] as EntityRecordArgs;\n\tconst recordKey = newArgs?.[ 2 ];\n\n\t// If recordKey looks to be a numeric ID then coerce to number.\n\tnewArgs[ 2 ] = isNumericID( recordKey ) ? Number( recordKey ) : recordKey;\n\n\treturn newArgs;\n};\n\n/**\n * Returns the Entity's record object by key. Doesn't trigger a resolver nor requests the entity records from the API if the entity record isn't available in the local state.\n *\n * @param state State tree\n * @param kind Entity kind.\n * @param name Entity name.\n * @param key Record's key\n *\n * @return Record.\n */\nexport function __experimentalGetEntityRecordNoResolver<\n\tEntityRecord extends ET.EntityRecord< any >,\n>( state: State, kind: string, name: string, key: EntityRecordKey ) {\n\treturn getEntityRecord< EntityRecord >( state, kind, name, key );\n}\n\n/**\n * Returns the entity's record object by key,\n * with its attributes mapped to their raw values.\n *\n * @param state State tree.\n * @param kind Entity kind.\n * @param name Entity name.\n * @param key Record's key.\n *\n * @return Object with the entity's raw attributes.\n */\nexport const getRawEntityRecord = createSelector(\n\t< EntityRecord extends ET.EntityRecord< any > >(\n\t\tstate: State,\n\t\tkind: string,\n\t\tname: string,\n\t\tkey: EntityRecordKey\n\t): EntityRecord | undefined => {\n\t\tconst record = getEntityRecord< EntityRecord >(\n\t\t\tstate,\n\t\t\tkind,\n\t\t\tname,\n\t\t\tkey\n\t\t);\n\t\treturn (\n\t\t\trecord &&\n\t\t\tObject.keys( record ).reduce( ( accumulator, _key ) => {\n\t\t\t\tif (\n\t\t\t\t\tisRawAttribute( getEntityConfig( state, kind, name ), _key )\n\t\t\t\t) {\n\t\t\t\t\t// Because edits are the \"raw\" attribute values,\n\t\t\t\t\t// we return those from record selectors to make rendering,\n\t\t\t\t\t// comparisons, and joins with edits easier.\n\t\t\t\t\taccumulator[ _key ] = record[ _key ]?.raw ?? record[ _key ];\n\t\t\t\t} else {\n\t\t\t\t\taccumulator[ _key ] = record[ _key ];\n\t\t\t\t}\n\t\t\t\treturn accumulator;\n\t\t\t}, {} as any )\n\t\t);\n\t},\n\t(\n\t\tstate: State,\n\t\tkind: string,\n\t\tname: string,\n\t\trecordId: EntityRecordKey,\n\t\tquery?: GetRecordsHttpQuery\n\t) => {\n\t\tconst context = query?.context ?? 'default';\n\t\treturn [\n\t\t\tstate.entities.config,\n\t\t\tstate.entities.records?.[ kind ]?.[ name ]?.queriedData?.items[\n\t\t\t\tcontext\n\t\t\t]?.[ recordId ],\n\t\t\tstate.entities.records?.[ kind ]?.[ name ]?.queriedData\n\t\t\t\t?.itemIsComplete[ context ]?.[ recordId ],\n\t\t];\n\t}\n);\n\n/**\n * Returns true if records have been received for the given set of parameters,\n * or false otherwise.\n *\n * @param state State tree\n * @param kind Entity kind.\n * @param name Entity name.\n * @param query Optional terms query. For valid query parameters see the [Reference](https://developer.wordpress.org/rest-api/reference/) in the REST API Handbook and select the entity kind. Then see the arguments available for \"List [Entity kind]s\".\n *\n * @return Whether entity records have been received.\n */\nexport function hasEntityRecords(\n\tstate: State,\n\tkind: string,\n\tname: string,\n\tquery?: GetRecordsHttpQuery\n): boolean {\n\treturn Array.isArray( getEntityRecords( state, kind, name, query ) );\n}\n\n/**\n * GetEntityRecord is declared as a *callable interface* with\n * two signatures to work around the fact that TypeScript doesn't\n * allow currying generic functions.\n *\n * @see GetEntityRecord\n * @see https://github.com/WordPress/gutenberg/pull/41578\n */\nexport interface GetEntityRecords {\n\t<\n\t\tEntityRecord extends\n\t\t\t| ET.EntityRecord< any >\n\t\t\t| Partial< ET.EntityRecord< any > >,\n\t>(\n\t\tstate: State,\n\t\tkind: string,\n\t\tname: string,\n\t\tquery?: GetRecordsHttpQuery\n\t): EntityRecord[] | null;\n\n\tCurriedSignature: <\n\t\tEntityRecord extends\n\t\t\t| ET.EntityRecord< any >\n\t\t\t| Partial< ET.EntityRecord< any > >,\n\t>(\n\t\tkind: string,\n\t\tname: string,\n\t\tquery?: GetRecordsHttpQuery\n\t) => EntityRecord[] | null;\n}\n\n/**\n * Returns the Entity's records.\n *\n * @param state State tree\n * @param kind Entity kind.\n * @param name Entity name.\n * @param query Optional terms query. If requesting specific\n * fields, fields must always include the ID. For valid query parameters see the [Reference](https://developer.wordpress.org/rest-api/reference/) in the REST API Handbook and select the entity kind. Then see the arguments available for \"List [Entity kind]s\".\n *\n * @return Records.\n */\nexport const getEntityRecords = ( <\n\tEntityRecord extends\n\t\t| ET.EntityRecord< any >\n\t\t| Partial< ET.EntityRecord< any > >,\n>(\n\tstate: State,\n\tkind: string,\n\tname: string,\n\tquery: GetRecordsHttpQuery\n): EntityRecord[] | null => {\n\t// Queried data state is prepopulated for all known entities. If this is not\n\t// assigned for the given parameters, then it is known to not exist.\n\tconst queriedState =\n\t\tstate.entities.records?.[ kind ]?.[ name ]?.queriedData;\n\tif ( ! queriedState ) {\n\t\treturn null;\n\t}\n\treturn getQueriedItems( queriedState, query );\n} ) as GetEntityRecords;\n\n/**\n * Returns the Entity's total available records for a given query (ignoring pagination).\n *\n * @param state State tree\n * @param kind Entity kind.\n * @param name Entity name.\n * @param query Optional terms query. If requesting specific\n * fields, fields must always include the ID. For valid query parameters see the [Reference](https://developer.wordpress.org/rest-api/reference/) in the REST API Handbook and select the entity kind. Then see the arguments available for \"List [Entity kind]s\".\n *\n * @return number | null.\n */\nexport const getEntityRecordsTotalItems = (\n\tstate: State,\n\tkind: string,\n\tname: string,\n\tquery: GetRecordsHttpQuery\n): number | null => {\n\t// Queried data state is prepopulated for all known entities. If this is not\n\t// assigned for the given parameters, then it is known to not exist.\n\tconst queriedState =\n\t\tstate.entities.records?.[ kind ]?.[ name ]?.queriedData;\n\tif ( ! queriedState ) {\n\t\treturn null;\n\t}\n\treturn getQueriedTotalItems( queriedState, query );\n};\n\n/**\n * Returns the number of available pages for the given query.\n *\n * @param state State tree\n * @param kind Entity kind.\n * @param name Entity name.\n * @param query Optional terms query. If requesting specific\n * fields, fields must always include the ID. For valid query parameters see the [Reference](https://developer.wordpress.org/rest-api/reference/) in the REST API Handbook and select the entity kind. Then see the arguments available for \"List [Entity kind]s\".\n *\n * @return number | null.\n */\nexport const getEntityRecordsTotalPages = (\n\tstate: State,\n\tkind: string,\n\tname: string,\n\tquery: GetRecordsHttpQuery\n): number | null => {\n\t// Queried data state is prepopulated for all known entities. If this is not\n\t// assigned for the given parameters, then it is known to not exist.\n\tconst queriedState =\n\t\tstate.entities.records?.[ kind ]?.[ name ]?.queriedData;\n\tif ( ! queriedState ) {\n\t\treturn null;\n\t}\n\tif ( query.per_page === -1 ) return 1;\n\tconst totalItems = getQueriedTotalItems( queriedState, query );\n\tif ( ! totalItems ) return totalItems;\n\treturn Math.ceil( totalItems / query.per_page );\n};\n\ntype DirtyEntityRecord = {\n\ttitle: string;\n\tkey: EntityRecordKey;\n\tname: string;\n\tkind: string;\n};\n/**\n * Returns the list of dirty entity records.\n *\n * @param state State tree.\n *\n * @return The list of updated records\n */\nexport const __experimentalGetDirtyEntityRecords = createSelector(\n\t( state: State ): Array< DirtyEntityRecord > => {\n\t\tconst {\n\t\t\tentities: { records },\n\t\t} = state;\n\t\tconst dirtyRecords: DirtyEntityRecord[] = [];\n\t\tObject.keys( records ).forEach( ( kind ) => {\n\t\t\tObject.keys( records[ kind ] ).forEach( ( name ) => {\n\t\t\t\tconst primaryKeys = (\n\t\t\t\t\tObject.keys( records[ kind ][ name ].edits ) as string[]\n\t\t\t\t ).filter(\n\t\t\t\t\t( primaryKey ) =>\n\t\t\t\t\t\t// The entity record must exist (not be deleted),\n\t\t\t\t\t\t// and it must have edits.\n\t\t\t\t\t\tgetEntityRecord( state, kind, name, primaryKey ) &&\n\t\t\t\t\t\thasEditsForEntityRecord( state, kind, name, primaryKey )\n\t\t\t\t);\n\n\t\t\t\tif ( primaryKeys.length ) {\n\t\t\t\t\tconst entityConfig = getEntityConfig( state, kind, name );\n\t\t\t\t\tprimaryKeys.forEach( ( primaryKey ) => {\n\t\t\t\t\t\tconst entityRecord = getEditedEntityRecord(\n\t\t\t\t\t\t\tstate,\n\t\t\t\t\t\t\tkind,\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tprimaryKey\n\t\t\t\t\t\t);\n\t\t\t\t\t\tdirtyRecords.push( {\n\t\t\t\t\t\t\t// We avoid using primaryKey because it's transformed into a string\n\t\t\t\t\t\t\t// when it's used as an object key.\n\t\t\t\t\t\t\tkey: entityRecord\n\t\t\t\t\t\t\t\t? entityRecord[\n\t\t\t\t\t\t\t\t\t\tentityConfig.key || DEFAULT_ENTITY_KEY\n\t\t\t\t\t\t\t\t ]\n\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\ttitle:\n\t\t\t\t\t\t\t\tentityConfig?.getTitle?.( entityRecord ) || '',\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tkind,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\n\t\treturn dirtyRecords;\n\t},\n\t( state ) => [ state.entities.records ]\n);\n\n/**\n * Returns the list of entities currently being saved.\n *\n * @param state State tree.\n *\n * @return The list of records being saved.\n */\nexport const __experimentalGetEntitiesBeingSaved = createSelector(\n\t( state: State ): Array< DirtyEntityRecord > => {\n\t\tconst {\n\t\t\tentities: { records },\n\t\t} = state;\n\t\tconst recordsBeingSaved: DirtyEntityRecord[] = [];\n\t\tObject.keys( records ).forEach( ( kind ) => {\n\t\t\tObject.keys( records[ kind ] ).forEach( ( name ) => {\n\t\t\t\tconst primaryKeys = (\n\t\t\t\t\tObject.keys( records[ kind ][ name ].saving ) as string[]\n\t\t\t\t ).filter( ( primaryKey ) =>\n\t\t\t\t\tisSavingEntityRecord( state, kind, name, primaryKey )\n\t\t\t\t);\n\n\t\t\t\tif ( primaryKeys.length ) {\n\t\t\t\t\tconst entityConfig = getEntityConfig( state, kind, name );\n\t\t\t\t\tprimaryKeys.forEach( ( primaryKey ) => {\n\t\t\t\t\t\tconst entityRecord = getEditedEntityRecord(\n\t\t\t\t\t\t\tstate,\n\t\t\t\t\t\t\tkind,\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tprimaryKey\n\t\t\t\t\t\t);\n\t\t\t\t\t\trecordsBeingSaved.push( {\n\t\t\t\t\t\t\t// We avoid using primaryKey because it's transformed into a string\n\t\t\t\t\t\t\t// when it's used as an object key.\n\t\t\t\t\t\t\tkey: entityRecord\n\t\t\t\t\t\t\t\t? entityRecord[\n\t\t\t\t\t\t\t\t\t\tentityConfig.key || DEFAULT_ENTITY_KEY\n\t\t\t\t\t\t\t\t ]\n\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\ttitle:\n\t\t\t\t\t\t\t\tentityConfig?.getTitle?.( entityRecord ) || '',\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tkind,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t\treturn recordsBeingSaved;\n\t},\n\t( state ) => [ state.entities.records ]\n);\n\n/**\n * Returns the specified entity record's edits.\n *\n * @param state State tree.\n * @param kind Entity kind.\n * @param name Entity name.\n * @param recordId Record ID.\n *\n * @return The entity record's edits.\n */\nexport function getEntityRecordEdits(\n\tstate: State,\n\tkind: string,\n\tname: string,\n\trecordId: EntityRecordKey\n): Optional< any > {\n\treturn state.entities.records?.[ kind ]?.[ name ]?.edits?.[\n\t\trecordId as string | number\n\t];\n}\n\n/**\n * Returns the specified entity record's non transient edits.\n *\n * Transient edits don't create an undo level, and\n * are not considered for change detection.\n * They are defined in the entity's config.\n *\n * @param state State tree.\n * @param kind Entity kind.\n * @param name Entity name.\n * @param recordId Record ID.\n *\n * @return The entity record's non transient edits.\n */\nexport const getEntityRecordNonTransientEdits = createSelector(\n\t(\n\t\tstate: State,\n\t\tkind: string,\n\t\tname: string,\n\t\trecordId: EntityRecordKey\n\t): Optional< any > => {\n\t\tconst { transientEdits } = getEntityConfig( state, kind, name ) || {};\n\t\tconst edits = getEntityRecordEdits( state, kind, name, recordId ) || {};\n\t\tif ( ! transientEdits ) {\n\t\t\treturn edits;\n\t\t}\n\t\treturn Object.keys( edits ).reduce( ( acc, key ) => {\n\t\t\tif ( ! transientEdits[ key ] ) {\n\t\t\t\tacc[ key ] = edits[ key ];\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, {} );\n\t},\n\t( state: State, kind: string, name: string, recordId: EntityRecordKey ) => [\n\t\tstate.entities.config,\n\t\tstate.entities.records?.[ kind ]?.[ name ]?.edits?.[ recordId ],\n\t]\n);\n\n/**\n * Returns true if the specified entity record has edits,\n * and false otherwise.\n *\n * @param state State tree.\n * @param kind Entity kind.\n * @param name Entity name.\n * @param recordId Record ID.\n *\n * @return Whether the entity record has edits or not.\n */\nexport function hasEditsForEntityRecord(\n\tstate: State,\n\tkind: string,\n\tname: string,\n\trecordId: EntityRecordKey\n): boolean {\n\treturn (\n\t\tisSavingEntityRecord( state, kind, name, recordId ) ||\n\t\tObject.keys(\n\t\t\tgetEntityRecordNonTransientEdits( state, kind, name, recordId )\n\t\t).length > 0\n\t);\n}\n\n/**\n * Returns the specified entity record, merged with its edits.\n *\n * @param state State tree.\n * @param kind Entity kind.\n * @param name Entity name.\n * @param recordId Record ID.\n *\n * @return The entity record, merged with its edits.\n */\nexport const getEditedEntityRecord = createSelector(\n\t< EntityRecord extends ET.EntityRecord< any > >(\n\t\tstate: State,\n\t\tkind: string,\n\t\tname: string,\n\t\trecordId: EntityRecordKey\n\t): ET.Updatable< EntityRecord > | undefined => ( {\n\t\t...getRawEntityRecord( state, kind, name, recordId ),\n\t\t...getEntityRecordEdits( state, kind, name, recordId ),\n\t} ),\n\t(\n\t\tstate: State,\n\t\tkind: string,\n\t\tname: string,\n\t\trecordId: EntityRecordKey,\n\t\tquery?: GetRecordsHttpQuery\n\t) => {\n\t\tconst context = query?.context ?? 'default';\n\t\treturn [\n\t\t\tstate.entities.config,\n\t\t\tstate.entities.records?.[ kind ]?.[ name ]?.queriedData.items[\n\t\t\t\tcontext\n\t\t\t]?.[ recordId ],\n\t\t\tstate.entities.records?.[ kind ]?.[ name ]?.queriedData\n\t\t\t\t.itemIsComplete[ context ]?.[ recordId ],\n\t\t\tstate.entities.records?.[ kind ]?.[ name ]?.edits?.[ recordId ],\n\t\t];\n\t}\n);\n\n/**\n * Returns true if the specified entity record is autosaving, and false otherwise.\n *\n * @param state State tree.\n * @param kind Entity kind.\n * @param name Entity name.\n * @param recordId Record ID.\n *\n * @return Whether the entity record is autosaving or not.\n */\nexport function isAutosavingEntityRecord(\n\tstate: State,\n\tkind: string,\n\tname: string,\n\trecordId: EntityRecordKey\n): boolean {\n\tconst { pending, isAutosave } =\n\t\tstate.entities.records?.[ kind ]?.[ name ]?.saving?.[ recordId ] ?? {};\n\treturn Boolean( pending && isAutosave );\n}\n\n/**\n * Returns true if the specified entity record is saving, and false otherwise.\n *\n * @param state State tree.\n * @param kind Entity kind.\n * @param name Entity name.\n * @param recordId Record ID.\n *\n * @return Whether the entity record is saving or not.\n */\nexport function isSavingEntityRecord(\n\tstate: State,\n\tkind: string,\n\tname: string,\n\trecordId: EntityRecordKey\n): boolean {\n\treturn (\n\t\tstate.entities.records?.[ kind ]?.[ name ]?.saving?.[\n\t\t\trecordId as EntityRecordKey\n\t\t]?.pending ?? false\n\t);\n}\n\n/**\n * Returns true if the specified entity record is deleting, and false otherwise.\n *\n * @param state State tree.\n * @param kind Entity kind.\n * @param name Entity name.\n * @param recordId Record ID.\n *\n * @return Whether the entity record is deleting or not.\n */\nexport function isDeletingEntityRecord(\n\tstate: State,\n\tkind: string,\n\tname: string,\n\trecordId: EntityRecordKey\n): boolean {\n\treturn (\n\t\tstate.entities.records?.[ kind ]?.[ name ]?.deleting?.[\n\t\t\trecordId as EntityRecordKey\n\t\t]?.pending ?? false\n\t);\n}\n\n/**\n * Returns the specified entity record's last save error.\n *\n * @param state State tree.\n * @param kind Entity kind.\n * @param name Entity name.\n * @param recordId Record ID.\n *\n * @return The entity record's save error.\n */\nexport function getLastEntitySaveError(\n\tstate: State,\n\tkind: string,\n\tname: string,\n\trecordId: EntityRecordKey\n): any {\n\treturn state.entities.records?.[ kind ]?.[ name ]?.saving?.[ recordId ]\n\t\t?.error;\n}\n\n/**\n * Returns the specified entity record's last delete error.\n *\n * @param state State tree.\n * @param kind Entity kind.\n * @param name Entity name.\n * @param recordId Record ID.\n *\n * @return The entity record's save error.\n */\nexport function getLastEntityDeleteError(\n\tstate: State,\n\tkind: string,\n\tname: string,\n\trecordId: EntityRecordKey\n): any {\n\treturn state.entities.records?.[ kind ]?.[ name ]?.deleting?.[ recordId ]\n\t\t?.error;\n}\n\n/**\n * Returns the previous edit from the current undo offset\n * for the entity records edits history, if any.\n *\n * @deprecated since 6.3\n *\n * @param state State tree.\n *\n * @return The edit.\n */\nexport function getUndoEdit( state: State ): Optional< any > {\n\tdeprecated( \"select( 'core' ).getUndoEdit()\", {\n\t\tsince: '6.3',\n\t} );\n\treturn undefined;\n}\n\n/**\n * Returns the next edit from the current undo offset\n * for the entity records edits history, if any.\n *\n * @deprecated since 6.3\n *\n * @param state State tree.\n *\n * @return The edit.\n */\nexport function getRedoEdit( state: State ): Optional< any > {\n\tdeprecated( \"select( 'core' ).getRedoEdit()\", {\n\t\tsince: '6.3',\n\t} );\n\treturn undefined;\n}\n\n/**\n * Returns true if there is a previous edit from the current undo offset\n * for the entity records edits history, and false otherwise.\n *\n * @param state State tree.\n *\n * @return Whether there is a previous edit or not.\n */\nexport function hasUndo( state: State ): boolean {\n\treturn state.undoManager.hasUndo();\n}\n\n/**\n * Returns true if there is a next edit from the current undo offset\n * for the entity records edits history, and false otherwise.\n *\n * @param state State tree.\n *\n * @return Whether there is a next edit or not.\n */\nexport function hasRedo( state: State ): boolean {\n\treturn state.undoManager.hasRedo();\n}\n\n/**\n * Return the current theme.\n *\n * @param state Data state.\n *\n * @return The current theme.\n */\nexport function getCurrentTheme( state: State ): any {\n\tif ( ! state.currentTheme ) {\n\t\treturn null;\n\t}\n\treturn getEntityRecord( state, 'root', 'theme', state.currentTheme );\n}\n\n/**\n * Return the ID of the current global styles object.\n *\n * @param state Data state.\n *\n * @return The current global styles ID.\n */\nexport function __experimentalGetCurrentGlobalStylesId( state: State ): string {\n\treturn state.currentGlobalStylesId;\n}\n\n/**\n * Return theme supports data in the index.\n *\n * @param state Data state.\n *\n * @return Index data.\n */\nexport function getThemeSupports( state: State ): any {\n\treturn getCurrentTheme( state )?.theme_supports ?? EMPTY_OBJECT;\n}\n\n/**\n * Returns the embed preview for the given URL.\n *\n * @param state Data state.\n * @param url Embedded URL.\n *\n * @return Undefined if the preview has not been fetched, otherwise, the preview fetched from the embed preview API.\n */\nexport function getEmbedPreview( state: State, url: string ): any {\n\treturn state.embedPreviews[ url ];\n}\n\n/**\n * Determines if the returned preview is an oEmbed link fallback.\n *\n * WordPress can be configured to return a simple link to a URL if it is not embeddable.\n * We need to be able to determine if a URL is embeddable or not, based on what we\n * get back from the oEmbed preview API.\n *\n * @param state Data state.\n * @param url Embedded URL.\n *\n * @return Is the preview for the URL an oEmbed link fallback.\n */\nexport function isPreviewEmbedFallback( state: State, url: string ): boolean {\n\tconst preview = state.embedPreviews[ url ];\n\tconst oEmbedLinkCheck = '<a href=\"' + url + '\">' + url + '</a>';\n\tif ( ! preview ) {\n\t\treturn false;\n\t}\n\treturn preview.html === oEmbedLinkCheck;\n}\n\n/**\n * Returns whether the current user can perform the given action on the given\n * REST resource.\n *\n * Calling this may trigger an OPTIONS request to the REST API via the\n * `canUser()` resolver.\n *\n * https://developer.wordpress.org/rest-api/reference/\n *\n * @param state Data state.\n * @param action Action to check. One of: 'create', 'read', 'update', 'delete'.\n * @param resource REST resource to check, e.g. 'media' or 'posts'.\n * @param id Optional ID of the rest resource to check.\n *\n * @return Whether or not the user can perform the action,\n * or `undefined` if the OPTIONS request is still being made.\n */\nexport function canUser(\n\tstate: State,\n\taction: string,\n\tresource: string,\n\tid?: EntityRecordKey\n): boolean | undefined {\n\tconst key = [ action, resource, id ].filter( Boolean ).join( '/' );\n\treturn state.userPermissions[ key ];\n}\n\n/**\n * Returns whether the current user can edit the given entity.\n *\n * Calling this may trigger an OPTIONS request to the REST API via the\n * `canUser()` resolver.\n *\n * https://developer.wordpress.org/rest-api/reference/\n *\n * @param state Data state.\n * @param kind Entity kind.\n * @param name Entity name.\n * @param recordId Record's id.\n * @return Whether or not the user can edit,\n * or `undefined` if the OPTIONS request is still being made.\n */\nexport function canUserEditEntityRecord(\n\tstate: State,\n\tkind: string,\n\tname: string,\n\trecordId: EntityRecordKey\n): boolean | undefined {\n\tconst entityConfig = getEntityConfig( state, kind, name );\n\tif ( ! entityConfig ) {\n\t\treturn false;\n\t}\n\tconst resource = entityConfig.__unstable_rest_base;\n\n\treturn canUser( state, 'update', resource, recordId );\n}\n\n/**\n * Returns the latest autosaves for the post.\n *\n * May return multiple autosaves since the backend stores one autosave per\n * author for each post.\n *\n * @param state State tree.\n * @param postType The type of the parent post.\n * @param postId The id of the parent post.\n *\n * @return An array of autosaves for the post, or undefined if there is none.\n */\nexport function getAutosaves(\n\tstate: State,\n\tpostType: string,\n\tpostId: EntityRecordKey\n): Array< any > | undefined {\n\treturn state.autosaves[ postId ];\n}\n\n/**\n * Returns the autosave for the post and author.\n *\n * @param state State tree.\n * @param postType The type of the parent post.\n * @param postId The id of the parent post.\n * @param authorId The id of the author.\n *\n * @return The autosave for the post and author.\n */\nexport function getAutosave< EntityRecord extends ET.EntityRecord< any > >(\n\tstate: State,\n\tpostType: string,\n\tpostId: EntityRecordKey,\n\tauthorId: EntityRecordKey\n): EntityRecord | undefined {\n\tif ( authorId === undefined ) {\n\t\treturn;\n\t}\n\n\tconst autosaves = state.autosaves[ postId ];\n\n\treturn autosaves?.find(\n\t\t( autosave: any ) => autosave.author === authorId\n\t) as EntityRecord | undefined;\n}\n\n/**\n * Returns true if the REST request for autosaves has completed.\n *\n * @param state State tree.\n * @param postType The type of the parent post.\n * @param postId The id of the parent post.\n *\n * @return True if the REST request was completed. False otherwise.\n */\nexport const hasFetchedAutosaves = createRegistrySelector(\n\t( select ) =>\n\t\t(\n\t\t\tstate: State,\n\t\t\tpostType: string,\n\t\t\tpostId: EntityRecordKey\n\t\t): boolean => {\n\t\t\treturn select( STORE_NAME ).hasFinishedResolution( 'getAutosaves', [\n\t\t\t\tpostType,\n\t\t\t\tpostId,\n\t\t\t] );\n\t\t}\n);\n\n/**\n * Returns a new reference when edited values have changed. This is useful in\n * inferring where an edit has been made between states by comparison of the\n * return values using strict equality.\n *\n * @example\n *\n * ```\n * const hasEditOccurred = (\n * getReferenceByDistinctEdits( beforeState ) !==\n * getReferenceByDistinctEdits( afterState )\n * );\n * ```\n *\n * @param state Editor state.\n *\n * @return A value whose reference will change only when an edit occurs.\n */\nexport function getReferenceByDistinctEdits( state ) {\n\treturn state.editsReference;\n}\n\n/**\n * Retrieve the frontend template used for a given link.\n *\n * @param state Editor state.\n * @param link Link.\n *\n * @return The template record.\n */\nexport function __experimentalGetTemplateForLink(\n\tstate: State,\n\tlink: string\n): Optional< ET.Updatable< ET.WpTemplate > > | null {\n\tconst records = getEntityRecords< ET.WpTemplate >(\n\t\tstate,\n\t\t'postType',\n\t\t'wp_template',\n\t\t{\n\t\t\t'find-template': link,\n\t\t}\n\t);\n\n\tif ( records?.length ) {\n\t\treturn getEditedEntityRecord< ET.WpTemplate >(\n\t\t\tstate,\n\t\t\t'postType',\n\t\t\t'wp_template',\n\t\t\trecords[ 0 ].id\n\t\t);\n\t}\n\treturn null;\n}\n\n/**\n * Retrieve the current theme's base global styles\n *\n * @param state Editor state.\n *\n * @return The Global Styles object.\n */\nexport function __experimentalGetCurrentThemeBaseGlobalStyles(\n\tstate: State\n): any {\n\tconst currentTheme = getCurrentTheme( state );\n\tif ( ! currentTheme ) {\n\t\treturn null;\n\t}\n\treturn state.themeBaseGlobalStyles[ currentTheme.stylesheet ];\n}\n\n/**\n * Return the ID of the current global styles object.\n *\n * @param state Data state.\n *\n * @return The current global styles ID.\n */\nexport function __experimentalGetCurrentThemeGlobalStylesVariations(\n\tstate: State\n): string | null {\n\tconst currentTheme = getCurrentTheme( state );\n\tif ( ! currentTheme ) {\n\t\treturn null;\n\t}\n\treturn state.themeGlobalStyleVariations[ currentTheme.stylesheet ];\n}\n\n/**\n * Retrieve the list of registered block patterns.\n *\n * @param state Data state.\n *\n * @return Block pattern list.\n */\nexport function getBlockPatterns( state: State ): Array< any > {\n\treturn state.blockPatterns;\n}\n\n/**\n * Retrieve the list of registered block pattern categories.\n *\n * @param state Data state.\n *\n * @return Block pattern category list.\n */\nexport function getBlockPatternCategories( state: State ): Array< any > {\n\treturn state.blockPatternCategories;\n}\n\n/**\n * Retrieve the registered user pattern categories.\n *\n * @param state Data state.\n *\n * @return User patterns category array.\n */\n\nexport function getUserPatternCategories(\n\tstate: State\n): Array< UserPatternCategory > {\n\treturn state.userPatternCategories;\n}\n\n/**\n * Returns the revisions of the current global styles theme.\n *\n * @param state Data state.\n *\n * @return The current global styles.\n */\nexport function getCurrentThemeGlobalStylesRevisions(\n\tstate: State\n): Array< object > | null {\n\tconst currentGlobalStylesId =\n\t\t__experimentalGetCurrentGlobalStylesId( state );\n\n\tif ( ! currentGlobalStylesId ) {\n\t\treturn null;\n\t}\n\n\treturn state.themeGlobalStyleRevisions[ currentGlobalStylesId ];\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,cAAc,MAAM,QAAQ;;AAEnC;AACA;AACA;AACA,SAASC,sBAAsB,QAAQ,iBAAiB;AACxD,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,OAAOC,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;AACA,SAASC,UAAU,QAAQ,QAAQ;AACnC,SAASC,eAAe,EAAEC,oBAAoB,QAAQ,gBAAgB;AACtE,SAASC,kBAAkB,QAAQ,YAAY;AAC/C,SACCC,2BAA2B,EAC3BC,cAAc,EACdC,cAAc,EACdC,WAAW,QACL,SAAS;AAkFhB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,YAAY,GAAG,CAAC,CAAC;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,wBAAwB,GAAGZ,sBAAsB,CAC3Da,MAAW,IACZ,CAAEC,KAAY,EAAEC,GAAW,KAAe;EACzC,OAAOF,MAAM,CAAEV,UAAW,CAAC,CAACa,WAAW,CAAE,iBAAiB,EAAE,CAC3DD,GAAG,CACF,CAAC;AACJ,CACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,UAAUA,CACzBH,KAAY,EACZI,KAA2B,EACf;EACZhB,UAAU,CAAE,+BAA+B,EAAE;IAC5CiB,KAAK,EAAE,KAAK;IACZC,WAAW,EAAE;EACd,CAAE,CAAC;EAEH,MAAMC,IAAI,GAAGpB,YAAY,CACxB,wCAAwC,EACxCiB,KACD,CAAC;EACD,OAAOI,mBAAmB,CAAER,KAAK,EAAE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AI;EACZ;EAEA,OAAOzH,KAAK,CAACoK,yBAAyB,CAAE3C,qBAAqB,CAAE;AAChE"}
|
|
1
|
+
{"version":3,"names":["createSelector","createRegistrySelector","addQueryArgs","deprecated","STORE_NAME","getQueriedItems","getQueriedTotalItems","DEFAULT_ENTITY_KEY","getNormalizedCommaSeparable","isRawAttribute","setNestedValue","isNumericID","EMPTY_OBJECT","isRequestingEmbedPreview","select","state","url","isResolving","getAuthors","query","since","alternative","path","getUserQueryResults","getCurrentUser","currentUser","queryID","_state$users$queries$","queryResults","users","queries","map","id","byId","getEntitiesByKind","kind","getEntitiesConfig","entities","config","filter","entity","getEntity","name","getEntityConfig","find","getEntityRecord","key","_query$context","queriedState","records","queriedData","undefined","context","itemIsComplete","items","item","_fields","_getNormalizedCommaSe","filteredItem","fields","f","length","field","split","value","forEach","fieldName","recordId","_query$context2","__unstableNormalizeArgs","args","newArgs","recordKey","Number","__experimentalGetEntityRecordNoResolver","getRawEntityRecord","record","Object","keys","reduce","accumulator","_key","_record$_key$raw","raw","_query$context3","hasEntityRecords","Array","isArray","getEntityRecords","getEntityRecordsTotalItems","getEntityRecordsTotalPages","per_page","totalItems","Math","ceil","__experimentalGetDirtyEntityRecords","dirtyRecords","primaryKeys","edits","primaryKey","hasEditsForEntityRecord","entityConfig","entityRecord","getEditedEntityRecord","push","title","getTitle","__experimentalGetEntitiesBeingSaved","recordsBeingSaved","saving","isSavingEntityRecord","getEntityRecordEdits","getEntityRecordNonTransientEdits","transientEdits","acc","_query$context4","isAutosavingEntityRecord","_state$entities$recor","pending","isAutosave","Boolean","_state$entities$recor2","isDeletingEntityRecord","_state$entities$recor3","deleting","getLastEntitySaveError","error","getLastEntityDeleteError","getUndoEdit","getRedoEdit","hasUndo","undoManager","hasRedo","getCurrentTheme","currentTheme","__experimentalGetCurrentGlobalStylesId","currentGlobalStylesId","getThemeSupports","_getCurrentTheme$them","theme_supports","getEmbedPreview","embedPreviews","isPreviewEmbedFallback","preview","oEmbedLinkCheck","html","canUser","action","resource","join","userPermissions","canUserEditEntityRecord","__unstable_rest_base","getAutosaves","postType","postId","autosaves","getAutosave","authorId","autosave","author","hasFetchedAutosaves","hasFinishedResolution","getReferenceByDistinctEdits","editsReference","__experimentalGetTemplateForLink","link","__experimentalGetCurrentThemeBaseGlobalStyles","themeBaseGlobalStyles","stylesheet","__experimentalGetCurrentThemeGlobalStylesVariations","themeGlobalStyleVariations","getBlockPatterns","blockPatterns","getBlockPatternCategories","blockPatternCategories","getUserPatternCategories","userPatternCategories","getCurrentThemeGlobalStylesRevisions","themeGlobalStyleRevisions","getDefaultTemplateId","defaultTemplates","JSON","stringify"],"sources":["@wordpress/core-data/src/selectors.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport createSelector from 'rememo';\n\n/**\n * WordPress dependencies\n */\nimport { createRegistrySelector } from '@wordpress/data';\nimport { addQueryArgs } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { STORE_NAME } from './name';\nimport { getQueriedItems, getQueriedTotalItems } from './queried-data';\nimport { DEFAULT_ENTITY_KEY } from './entities';\nimport {\n\tgetNormalizedCommaSeparable,\n\tisRawAttribute,\n\tsetNestedValue,\n\tisNumericID,\n} from './utils';\nimport type * as ET from './entity-types';\nimport type { UndoManager } from '@wordpress/undo-manager';\n\n// This is an incomplete, high-level approximation of the State type.\n// It makes the selectors slightly more safe, but is intended to evolve\n// into a more detailed representation over time.\n// See https://github.com/WordPress/gutenberg/pull/40025#discussion_r865410589 for more context.\nexport interface State {\n\tautosaves: Record< string | number, Array< unknown > >;\n\tblockPatterns: Array< unknown >;\n\tblockPatternCategories: Array< unknown >;\n\tcurrentGlobalStylesId: string;\n\tcurrentTheme: string;\n\tcurrentUser: ET.User< 'edit' >;\n\tembedPreviews: Record< string, { html: string } >;\n\tentities: EntitiesState;\n\tthemeBaseGlobalStyles: Record< string, Object >;\n\tthemeGlobalStyleVariations: Record< string, string >;\n\tthemeGlobalStyleRevisions: Record< number, Object >;\n\tundoManager: UndoManager;\n\tuserPermissions: Record< string, boolean >;\n\tusers: UserState;\n\tnavigationFallbackId: EntityRecordKey;\n\tuserPatternCategories: Array< UserPatternCategory >;\n\tdefaultTemplates: Record< string, string >;\n}\n\ntype EntityRecordKey = string | number;\n\ninterface EntitiesState {\n\tconfig: EntityConfig[];\n\trecords: Record< string, Record< string, EntityState< ET.EntityRecord > > >;\n}\n\ninterface QueriedData {\n\titems: Record< ET.Context, Record< number, ET.EntityRecord > >;\n\titemIsComplete: Record< ET.Context, Record< number, boolean > >;\n\tqueries: Record< ET.Context, Record< string, Array< number > > >;\n}\n\ninterface EntityState< EntityRecord extends ET.EntityRecord > {\n\tedits: Record< string, Partial< EntityRecord > >;\n\tsaving: Record<\n\t\tstring,\n\t\tPartial< { pending: boolean; isAutosave: boolean; error: Error } >\n\t>;\n\tdeleting: Record< string, Partial< { pending: boolean; error: Error } > >;\n\tqueriedData: QueriedData;\n}\n\ninterface EntityConfig {\n\tname: string;\n\tkind: string;\n}\n\ninterface UserState {\n\tqueries: Record< string, EntityRecordKey[] >;\n\tbyId: Record< EntityRecordKey, ET.User< 'edit' > >;\n}\n\ntype TemplateQuery = {\n\tslug?: string;\n\tis_custom?: boolean;\n\tignore_empty?: boolean;\n};\n\nexport interface UserPatternCategory {\n\tid: number;\n\tname: string;\n\tlabel: string;\n\tslug: string;\n\tdescription: string;\n}\n\ntype Optional< T > = T | undefined;\n\n/**\n * HTTP Query parameters sent with the API request to fetch the entity records.\n */\ntype GetRecordsHttpQuery = Record< string, any >;\n\n/**\n * Arguments for EntityRecord selectors.\n */\ntype EntityRecordArgs =\n\t| [ string, string, EntityRecordKey ]\n\t| [ string, string, EntityRecordKey, GetRecordsHttpQuery ];\n\n/**\n * Shared reference to an empty object for cases where it is important to avoid\n * returning a new object reference on every invocation, as in a connected or\n * other pure component which performs `shouldComponentUpdate` check on props.\n * This should be used as a last resort, since the normalized data should be\n * maintained by the reducer result in state.\n */\nconst EMPTY_OBJECT = {};\n\n/**\n * Returns true if a request is in progress for embed preview data, or false\n * otherwise.\n *\n * @param state Data state.\n * @param url URL the preview would be for.\n *\n * @return Whether a request is in progress for an embed preview.\n */\nexport const isRequestingEmbedPreview = createRegistrySelector(\n\t( select: any ) =>\n\t\t( state: State, url: string ): boolean => {\n\t\t\treturn select( STORE_NAME ).isResolving( 'getEmbedPreview', [\n\t\t\t\turl,\n\t\t\t] );\n\t\t}\n);\n\n/**\n * Returns all available authors.\n *\n * @deprecated since 11.3. Callers should use `select( 'core' ).getUsers({ who: 'authors' })` instead.\n *\n * @param state Data state.\n * @param query Optional object of query parameters to\n * include with request. For valid query parameters see the [Users page](https://developer.wordpress.org/rest-api/reference/users/) in the REST API Handbook and see the arguments for [List Users](https://developer.wordpress.org/rest-api/reference/users/#list-users) and [Retrieve a User](https://developer.wordpress.org/rest-api/reference/users/#retrieve-a-user).\n * @return Authors list.\n */\nexport function getAuthors(\n\tstate: State,\n\tquery?: GetRecordsHttpQuery\n): ET.User[] {\n\tdeprecated( \"select( 'core' ).getAuthors()\", {\n\t\tsince: '5.9',\n\t\talternative: \"select( 'core' ).getUsers({ who: 'authors' })\",\n\t} );\n\n\tconst path = addQueryArgs(\n\t\t'/wp/v2/users/?who=authors&per_page=100',\n\t\tquery\n\t);\n\treturn getUserQueryResults( state, path );\n}\n\n/**\n * Returns the current user.\n *\n * @param state Data state.\n *\n * @return Current user object.\n */\nexport function getCurrentUser( state: State ): ET.User< 'edit' > {\n\treturn state.currentUser;\n}\n\n/**\n * Returns all the users returned by a query ID.\n *\n * @param state Data state.\n * @param queryID Query ID.\n *\n * @return Users list.\n */\nexport const getUserQueryResults = createSelector(\n\t( state: State, queryID: string ): ET.User< 'edit' >[] => {\n\t\tconst queryResults = state.users.queries[ queryID ] ?? [];\n\n\t\treturn queryResults.map( ( id ) => state.users.byId[ id ] );\n\t},\n\t( state: State, queryID: string ) => [\n\t\tstate.users.queries[ queryID ],\n\t\tstate.users.byId,\n\t]\n);\n\n/**\n * Returns the loaded entities for the given kind.\n *\n * @deprecated since WordPress 6.0. Use getEntitiesConfig instead\n * @param state Data state.\n * @param kind Entity kind.\n *\n * @return Array of entities with config matching kind.\n */\nexport function getEntitiesByKind( state: State, kind: string ): Array< any > {\n\tdeprecated( \"wp.data.select( 'core' ).getEntitiesByKind()\", {\n\t\tsince: '6.0',\n\t\talternative: \"wp.data.select( 'core' ).getEntitiesConfig()\",\n\t} );\n\treturn getEntitiesConfig( state, kind );\n}\n\n/**\n * Returns the loaded entities for the given kind.\n *\n * @param state Data state.\n * @param kind Entity kind.\n *\n * @return Array of entities with config matching kind.\n */\nexport function getEntitiesConfig( state: State, kind: string ): Array< any > {\n\treturn state.entities.config.filter( ( entity ) => entity.kind === kind );\n}\n\n/**\n * Returns the entity config given its kind and name.\n *\n * @deprecated since WordPress 6.0. Use getEntityConfig instead\n * @param state Data state.\n * @param kind Entity kind.\n * @param name Entity name.\n *\n * @return Entity config\n */\nexport function getEntity( state: State, kind: string, name: string ): any {\n\tdeprecated( \"wp.data.select( 'core' ).getEntity()\", {\n\t\tsince: '6.0',\n\t\talternative: \"wp.data.select( 'core' ).getEntityConfig()\",\n\t} );\n\treturn getEntityConfig( state, kind, name );\n}\n\n/**\n * Returns the entity config given its kind and name.\n *\n * @param state Data state.\n * @param kind Entity kind.\n * @param name Entity name.\n *\n * @return Entity config\n */\nexport function getEntityConfig(\n\tstate: State,\n\tkind: string,\n\tname: string\n): any {\n\treturn state.entities.config?.find(\n\t\t( config ) => config.kind === kind && config.name === name\n\t);\n}\n\n/**\n * GetEntityRecord is declared as a *callable interface* with\n * two signatures to work around the fact that TypeScript doesn't\n * allow currying generic functions:\n *\n * ```ts\n * \t\ttype CurriedState = F extends ( state: any, ...args: infer P ) => infer R\n * \t\t\t? ( ...args: P ) => R\n * \t\t\t: F;\n * \t\ttype Selector = <K extends string | number>(\n * state: any,\n * kind: K,\n * key: K extends string ? 'string value' : false\n * ) => K;\n * \t\ttype BadlyInferredSignature = CurriedState< Selector >\n * // BadlyInferredSignature evaluates to:\n * // (kind: string number, key: false | \"string value\") => string number\n * ```\n *\n * The signature without the state parameter shipped as CurriedSignature\n * is used in the return value of `select( coreStore )`.\n *\n * See https://github.com/WordPress/gutenberg/pull/41578 for more details.\n */\nexport interface GetEntityRecord {\n\t<\n\t\tEntityRecord extends\n\t\t\t| ET.EntityRecord< any >\n\t\t\t| Partial< ET.EntityRecord< any > >,\n\t>(\n\t\tstate: State,\n\t\tkind: string,\n\t\tname: string,\n\t\tkey: EntityRecordKey,\n\t\tquery?: GetRecordsHttpQuery\n\t): EntityRecord | undefined;\n\n\tCurriedSignature: <\n\t\tEntityRecord extends\n\t\t\t| ET.EntityRecord< any >\n\t\t\t| Partial< ET.EntityRecord< any > >,\n\t>(\n\t\tkind: string,\n\t\tname: string,\n\t\tkey: EntityRecordKey,\n\t\tquery?: GetRecordsHttpQuery\n\t) => EntityRecord | undefined;\n\t__unstableNormalizeArgs?: ( args: EntityRecordArgs ) => EntityRecordArgs;\n}\n\n/**\n * Returns the Entity's record object by key. Returns `null` if the value is not\n * yet received, undefined if the value entity is known to not exist, or the\n * entity object if it exists and is received.\n *\n * @param state State tree\n * @param kind Entity kind.\n * @param name Entity name.\n * @param key Record's key\n * @param query Optional query. If requesting specific\n * fields, fields must always include the ID. For valid query parameters see the [Reference](https://developer.wordpress.org/rest-api/reference/) in the REST API Handbook and select the entity kind. Then see the arguments available \"Retrieve a [Entity kind]\".\n *\n * @return Record.\n */\nexport const getEntityRecord = createSelector(\n\t( <\n\t\tEntityRecord extends\n\t\t\t| ET.EntityRecord< any >\n\t\t\t| Partial< ET.EntityRecord< any > >,\n\t>(\n\t\tstate: State,\n\t\tkind: string,\n\t\tname: string,\n\t\tkey: EntityRecordKey,\n\t\tquery?: GetRecordsHttpQuery\n\t): EntityRecord | undefined => {\n\t\tconst queriedState =\n\t\t\tstate.entities.records?.[ kind ]?.[ name ]?.queriedData;\n\t\tif ( ! queriedState ) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst context = query?.context ?? 'default';\n\n\t\tif ( query === undefined ) {\n\t\t\t// If expecting a complete item, validate that completeness.\n\t\t\tif ( ! queriedState.itemIsComplete[ context ]?.[ key ] ) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\treturn queriedState.items[ context ][ key ];\n\t\t}\n\n\t\tconst item = queriedState.items[ context ]?.[ key ];\n\t\tif ( item && query._fields ) {\n\t\t\tconst filteredItem = {};\n\t\t\tconst fields = getNormalizedCommaSeparable( query._fields ) ?? [];\n\t\t\tfor ( let f = 0; f < fields.length; f++ ) {\n\t\t\t\tconst field = fields[ f ].split( '.' );\n\t\t\t\tlet value = item;\n\t\t\t\tfield.forEach( ( fieldName ) => {\n\t\t\t\t\tvalue = value?.[ fieldName ];\n\t\t\t\t} );\n\t\t\t\tsetNestedValue( filteredItem, field, value );\n\t\t\t}\n\t\t\treturn filteredItem as EntityRecord;\n\t\t}\n\n\t\treturn item;\n\t} ) as GetEntityRecord,\n\t( state: State, kind, name, recordId, query ) => {\n\t\tconst context = query?.context ?? 'default';\n\t\treturn [\n\t\t\tstate.entities.records?.[ kind ]?.[ name ]?.queriedData?.items[\n\t\t\t\tcontext\n\t\t\t]?.[ recordId ],\n\t\t\tstate.entities.records?.[ kind ]?.[ name ]?.queriedData\n\t\t\t\t?.itemIsComplete[ context ]?.[ recordId ],\n\t\t];\n\t}\n) as GetEntityRecord;\n\n/**\n * Normalizes `recordKey`s that look like numeric IDs to numbers.\n *\n * @param args EntityRecordArgs the selector arguments.\n * @return EntityRecordArgs the normalized arguments.\n */\ngetEntityRecord.__unstableNormalizeArgs = (\n\targs: EntityRecordArgs\n): EntityRecordArgs => {\n\tconst newArgs = [ ...args ] as EntityRecordArgs;\n\tconst recordKey = newArgs?.[ 2 ];\n\n\t// If recordKey looks to be a numeric ID then coerce to number.\n\tnewArgs[ 2 ] = isNumericID( recordKey ) ? Number( recordKey ) : recordKey;\n\n\treturn newArgs;\n};\n\n/**\n * Returns the Entity's record object by key. Doesn't trigger a resolver nor requests the entity records from the API if the entity record isn't available in the local state.\n *\n * @param state State tree\n * @param kind Entity kind.\n * @param name Entity name.\n * @param key Record's key\n *\n * @return Record.\n */\nexport function __experimentalGetEntityRecordNoResolver<\n\tEntityRecord extends ET.EntityRecord< any >,\n>( state: State, kind: string, name: string, key: EntityRecordKey ) {\n\treturn getEntityRecord< EntityRecord >( state, kind, name, key );\n}\n\n/**\n * Returns the entity's record object by key,\n * with its attributes mapped to their raw values.\n *\n * @param state State tree.\n * @param kind Entity kind.\n * @param name Entity name.\n * @param key Record's key.\n *\n * @return Object with the entity's raw attributes.\n */\nexport const getRawEntityRecord = createSelector(\n\t< EntityRecord extends ET.EntityRecord< any > >(\n\t\tstate: State,\n\t\tkind: string,\n\t\tname: string,\n\t\tkey: EntityRecordKey\n\t): EntityRecord | undefined => {\n\t\tconst record = getEntityRecord< EntityRecord >(\n\t\t\tstate,\n\t\t\tkind,\n\t\t\tname,\n\t\t\tkey\n\t\t);\n\t\treturn (\n\t\t\trecord &&\n\t\t\tObject.keys( record ).reduce( ( accumulator, _key ) => {\n\t\t\t\tif (\n\t\t\t\t\tisRawAttribute( getEntityConfig( state, kind, name ), _key )\n\t\t\t\t) {\n\t\t\t\t\t// Because edits are the \"raw\" attribute values,\n\t\t\t\t\t// we return those from record selectors to make rendering,\n\t\t\t\t\t// comparisons, and joins with edits easier.\n\t\t\t\t\taccumulator[ _key ] = record[ _key ]?.raw ?? record[ _key ];\n\t\t\t\t} else {\n\t\t\t\t\taccumulator[ _key ] = record[ _key ];\n\t\t\t\t}\n\t\t\t\treturn accumulator;\n\t\t\t}, {} as any )\n\t\t);\n\t},\n\t(\n\t\tstate: State,\n\t\tkind: string,\n\t\tname: string,\n\t\trecordId: EntityRecordKey,\n\t\tquery?: GetRecordsHttpQuery\n\t) => {\n\t\tconst context = query?.context ?? 'default';\n\t\treturn [\n\t\t\tstate.entities.config,\n\t\t\tstate.entities.records?.[ kind ]?.[ name ]?.queriedData?.items[\n\t\t\t\tcontext\n\t\t\t]?.[ recordId ],\n\t\t\tstate.entities.records?.[ kind ]?.[ name ]?.queriedData\n\t\t\t\t?.itemIsComplete[ context ]?.[ recordId ],\n\t\t];\n\t}\n);\n\n/**\n * Returns true if records have been received for the given set of parameters,\n * or false otherwise.\n *\n * @param state State tree\n * @param kind Entity kind.\n * @param name Entity name.\n * @param query Optional terms query. For valid query parameters see the [Reference](https://developer.wordpress.org/rest-api/reference/) in the REST API Handbook and select the entity kind. Then see the arguments available for \"List [Entity kind]s\".\n *\n * @return Whether entity records have been received.\n */\nexport function hasEntityRecords(\n\tstate: State,\n\tkind: string,\n\tname: string,\n\tquery?: GetRecordsHttpQuery\n): boolean {\n\treturn Array.isArray( getEntityRecords( state, kind, name, query ) );\n}\n\n/**\n * GetEntityRecord is declared as a *callable interface* with\n * two signatures to work around the fact that TypeScript doesn't\n * allow currying generic functions.\n *\n * @see GetEntityRecord\n * @see https://github.com/WordPress/gutenberg/pull/41578\n */\nexport interface GetEntityRecords {\n\t<\n\t\tEntityRecord extends\n\t\t\t| ET.EntityRecord< any >\n\t\t\t| Partial< ET.EntityRecord< any > >,\n\t>(\n\t\tstate: State,\n\t\tkind: string,\n\t\tname: string,\n\t\tquery?: GetRecordsHttpQuery\n\t): EntityRecord[] | null;\n\n\tCurriedSignature: <\n\t\tEntityRecord extends\n\t\t\t| ET.EntityRecord< any >\n\t\t\t| Partial< ET.EntityRecord< any > >,\n\t>(\n\t\tkind: string,\n\t\tname: string,\n\t\tquery?: GetRecordsHttpQuery\n\t) => EntityRecord[] | null;\n}\n\n/**\n * Returns the Entity's records.\n *\n * @param state State tree\n * @param kind Entity kind.\n * @param name Entity name.\n * @param query Optional terms query. If requesting specific\n * fields, fields must always include the ID. For valid query parameters see the [Reference](https://developer.wordpress.org/rest-api/reference/) in the REST API Handbook and select the entity kind. Then see the arguments available for \"List [Entity kind]s\".\n *\n * @return Records.\n */\nexport const getEntityRecords = ( <\n\tEntityRecord extends\n\t\t| ET.EntityRecord< any >\n\t\t| Partial< ET.EntityRecord< any > >,\n>(\n\tstate: State,\n\tkind: string,\n\tname: string,\n\tquery: GetRecordsHttpQuery\n): EntityRecord[] | null => {\n\t// Queried data state is prepopulated for all known entities. If this is not\n\t// assigned for the given parameters, then it is known to not exist.\n\tconst queriedState =\n\t\tstate.entities.records?.[ kind ]?.[ name ]?.queriedData;\n\tif ( ! queriedState ) {\n\t\treturn null;\n\t}\n\treturn getQueriedItems( queriedState, query );\n} ) as GetEntityRecords;\n\n/**\n * Returns the Entity's total available records for a given query (ignoring pagination).\n *\n * @param state State tree\n * @param kind Entity kind.\n * @param name Entity name.\n * @param query Optional terms query. If requesting specific\n * fields, fields must always include the ID. For valid query parameters see the [Reference](https://developer.wordpress.org/rest-api/reference/) in the REST API Handbook and select the entity kind. Then see the arguments available for \"List [Entity kind]s\".\n *\n * @return number | null.\n */\nexport const getEntityRecordsTotalItems = (\n\tstate: State,\n\tkind: string,\n\tname: string,\n\tquery: GetRecordsHttpQuery\n): number | null => {\n\t// Queried data state is prepopulated for all known entities. If this is not\n\t// assigned for the given parameters, then it is known to not exist.\n\tconst queriedState =\n\t\tstate.entities.records?.[ kind ]?.[ name ]?.queriedData;\n\tif ( ! queriedState ) {\n\t\treturn null;\n\t}\n\treturn getQueriedTotalItems( queriedState, query );\n};\n\n/**\n * Returns the number of available pages for the given query.\n *\n * @param state State tree\n * @param kind Entity kind.\n * @param name Entity name.\n * @param query Optional terms query. If requesting specific\n * fields, fields must always include the ID. For valid query parameters see the [Reference](https://developer.wordpress.org/rest-api/reference/) in the REST API Handbook and select the entity kind. Then see the arguments available for \"List [Entity kind]s\".\n *\n * @return number | null.\n */\nexport const getEntityRecordsTotalPages = (\n\tstate: State,\n\tkind: string,\n\tname: string,\n\tquery: GetRecordsHttpQuery\n): number | null => {\n\t// Queried data state is prepopulated for all known entities. If this is not\n\t// assigned for the given parameters, then it is known to not exist.\n\tconst queriedState =\n\t\tstate.entities.records?.[ kind ]?.[ name ]?.queriedData;\n\tif ( ! queriedState ) {\n\t\treturn null;\n\t}\n\tif ( query.per_page === -1 ) return 1;\n\tconst totalItems = getQueriedTotalItems( queriedState, query );\n\tif ( ! totalItems ) return totalItems;\n\treturn Math.ceil( totalItems / query.per_page );\n};\n\ntype DirtyEntityRecord = {\n\ttitle: string;\n\tkey: EntityRecordKey;\n\tname: string;\n\tkind: string;\n};\n/**\n * Returns the list of dirty entity records.\n *\n * @param state State tree.\n *\n * @return The list of updated records\n */\nexport const __experimentalGetDirtyEntityRecords = createSelector(\n\t( state: State ): Array< DirtyEntityRecord > => {\n\t\tconst {\n\t\t\tentities: { records },\n\t\t} = state;\n\t\tconst dirtyRecords: DirtyEntityRecord[] = [];\n\t\tObject.keys( records ).forEach( ( kind ) => {\n\t\t\tObject.keys( records[ kind ] ).forEach( ( name ) => {\n\t\t\t\tconst primaryKeys = (\n\t\t\t\t\tObject.keys( records[ kind ][ name ].edits ) as string[]\n\t\t\t\t ).filter(\n\t\t\t\t\t( primaryKey ) =>\n\t\t\t\t\t\t// The entity record must exist (not be deleted),\n\t\t\t\t\t\t// and it must have edits.\n\t\t\t\t\t\tgetEntityRecord( state, kind, name, primaryKey ) &&\n\t\t\t\t\t\thasEditsForEntityRecord( state, kind, name, primaryKey )\n\t\t\t\t);\n\n\t\t\t\tif ( primaryKeys.length ) {\n\t\t\t\t\tconst entityConfig = getEntityConfig( state, kind, name );\n\t\t\t\t\tprimaryKeys.forEach( ( primaryKey ) => {\n\t\t\t\t\t\tconst entityRecord = getEditedEntityRecord(\n\t\t\t\t\t\t\tstate,\n\t\t\t\t\t\t\tkind,\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tprimaryKey\n\t\t\t\t\t\t);\n\t\t\t\t\t\tdirtyRecords.push( {\n\t\t\t\t\t\t\t// We avoid using primaryKey because it's transformed into a string\n\t\t\t\t\t\t\t// when it's used as an object key.\n\t\t\t\t\t\t\tkey: entityRecord\n\t\t\t\t\t\t\t\t? entityRecord[\n\t\t\t\t\t\t\t\t\t\tentityConfig.key || DEFAULT_ENTITY_KEY\n\t\t\t\t\t\t\t\t ]\n\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\ttitle:\n\t\t\t\t\t\t\t\tentityConfig?.getTitle?.( entityRecord ) || '',\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tkind,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\n\t\treturn dirtyRecords;\n\t},\n\t( state ) => [ state.entities.records ]\n);\n\n/**\n * Returns the list of entities currently being saved.\n *\n * @param state State tree.\n *\n * @return The list of records being saved.\n */\nexport const __experimentalGetEntitiesBeingSaved = createSelector(\n\t( state: State ): Array< DirtyEntityRecord > => {\n\t\tconst {\n\t\t\tentities: { records },\n\t\t} = state;\n\t\tconst recordsBeingSaved: DirtyEntityRecord[] = [];\n\t\tObject.keys( records ).forEach( ( kind ) => {\n\t\t\tObject.keys( records[ kind ] ).forEach( ( name ) => {\n\t\t\t\tconst primaryKeys = (\n\t\t\t\t\tObject.keys( records[ kind ][ name ].saving ) as string[]\n\t\t\t\t ).filter( ( primaryKey ) =>\n\t\t\t\t\tisSavingEntityRecord( state, kind, name, primaryKey )\n\t\t\t\t);\n\n\t\t\t\tif ( primaryKeys.length ) {\n\t\t\t\t\tconst entityConfig = getEntityConfig( state, kind, name );\n\t\t\t\t\tprimaryKeys.forEach( ( primaryKey ) => {\n\t\t\t\t\t\tconst entityRecord = getEditedEntityRecord(\n\t\t\t\t\t\t\tstate,\n\t\t\t\t\t\t\tkind,\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tprimaryKey\n\t\t\t\t\t\t);\n\t\t\t\t\t\trecordsBeingSaved.push( {\n\t\t\t\t\t\t\t// We avoid using primaryKey because it's transformed into a string\n\t\t\t\t\t\t\t// when it's used as an object key.\n\t\t\t\t\t\t\tkey: entityRecord\n\t\t\t\t\t\t\t\t? entityRecord[\n\t\t\t\t\t\t\t\t\t\tentityConfig.key || DEFAULT_ENTITY_KEY\n\t\t\t\t\t\t\t\t ]\n\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\ttitle:\n\t\t\t\t\t\t\t\tentityConfig?.getTitle?.( entityRecord ) || '',\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tkind,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t\treturn recordsBeingSaved;\n\t},\n\t( state ) => [ state.entities.records ]\n);\n\n/**\n * Returns the specified entity record's edits.\n *\n * @param state State tree.\n * @param kind Entity kind.\n * @param name Entity name.\n * @param recordId Record ID.\n *\n * @return The entity record's edits.\n */\nexport function getEntityRecordEdits(\n\tstate: State,\n\tkind: string,\n\tname: string,\n\trecordId: EntityRecordKey\n): Optional< any > {\n\treturn state.entities.records?.[ kind ]?.[ name ]?.edits?.[\n\t\trecordId as string | number\n\t];\n}\n\n/**\n * Returns the specified entity record's non transient edits.\n *\n * Transient edits don't create an undo level, and\n * are not considered for change detection.\n * They are defined in the entity's config.\n *\n * @param state State tree.\n * @param kind Entity kind.\n * @param name Entity name.\n * @param recordId Record ID.\n *\n * @return The entity record's non transient edits.\n */\nexport const getEntityRecordNonTransientEdits = createSelector(\n\t(\n\t\tstate: State,\n\t\tkind: string,\n\t\tname: string,\n\t\trecordId: EntityRecordKey\n\t): Optional< any > => {\n\t\tconst { transientEdits } = getEntityConfig( state, kind, name ) || {};\n\t\tconst edits = getEntityRecordEdits( state, kind, name, recordId ) || {};\n\t\tif ( ! transientEdits ) {\n\t\t\treturn edits;\n\t\t}\n\t\treturn Object.keys( edits ).reduce( ( acc, key ) => {\n\t\t\tif ( ! transientEdits[ key ] ) {\n\t\t\t\tacc[ key ] = edits[ key ];\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, {} );\n\t},\n\t( state: State, kind: string, name: string, recordId: EntityRecordKey ) => [\n\t\tstate.entities.config,\n\t\tstate.entities.records?.[ kind ]?.[ name ]?.edits?.[ recordId ],\n\t]\n);\n\n/**\n * Returns true if the specified entity record has edits,\n * and false otherwise.\n *\n * @param state State tree.\n * @param kind Entity kind.\n * @param name Entity name.\n * @param recordId Record ID.\n *\n * @return Whether the entity record has edits or not.\n */\nexport function hasEditsForEntityRecord(\n\tstate: State,\n\tkind: string,\n\tname: string,\n\trecordId: EntityRecordKey\n): boolean {\n\treturn (\n\t\tisSavingEntityRecord( state, kind, name, recordId ) ||\n\t\tObject.keys(\n\t\t\tgetEntityRecordNonTransientEdits( state, kind, name, recordId )\n\t\t).length > 0\n\t);\n}\n\n/**\n * Returns the specified entity record, merged with its edits.\n *\n * @param state State tree.\n * @param kind Entity kind.\n * @param name Entity name.\n * @param recordId Record ID.\n *\n * @return The entity record, merged with its edits.\n */\nexport const getEditedEntityRecord = createSelector(\n\t< EntityRecord extends ET.EntityRecord< any > >(\n\t\tstate: State,\n\t\tkind: string,\n\t\tname: string,\n\t\trecordId: EntityRecordKey\n\t): ET.Updatable< EntityRecord > | undefined => ( {\n\t\t...getRawEntityRecord( state, kind, name, recordId ),\n\t\t...getEntityRecordEdits( state, kind, name, recordId ),\n\t} ),\n\t(\n\t\tstate: State,\n\t\tkind: string,\n\t\tname: string,\n\t\trecordId: EntityRecordKey,\n\t\tquery?: GetRecordsHttpQuery\n\t) => {\n\t\tconst context = query?.context ?? 'default';\n\t\treturn [\n\t\t\tstate.entities.config,\n\t\t\tstate.entities.records?.[ kind ]?.[ name ]?.queriedData.items[\n\t\t\t\tcontext\n\t\t\t]?.[ recordId ],\n\t\t\tstate.entities.records?.[ kind ]?.[ name ]?.queriedData\n\t\t\t\t.itemIsComplete[ context ]?.[ recordId ],\n\t\t\tstate.entities.records?.[ kind ]?.[ name ]?.edits?.[ recordId ],\n\t\t];\n\t}\n);\n\n/**\n * Returns true if the specified entity record is autosaving, and false otherwise.\n *\n * @param state State tree.\n * @param kind Entity kind.\n * @param name Entity name.\n * @param recordId Record ID.\n *\n * @return Whether the entity record is autosaving or not.\n */\nexport function isAutosavingEntityRecord(\n\tstate: State,\n\tkind: string,\n\tname: string,\n\trecordId: EntityRecordKey\n): boolean {\n\tconst { pending, isAutosave } =\n\t\tstate.entities.records?.[ kind ]?.[ name ]?.saving?.[ recordId ] ?? {};\n\treturn Boolean( pending && isAutosave );\n}\n\n/**\n * Returns true if the specified entity record is saving, and false otherwise.\n *\n * @param state State tree.\n * @param kind Entity kind.\n * @param name Entity name.\n * @param recordId Record ID.\n *\n * @return Whether the entity record is saving or not.\n */\nexport function isSavingEntityRecord(\n\tstate: State,\n\tkind: string,\n\tname: string,\n\trecordId: EntityRecordKey\n): boolean {\n\treturn (\n\t\tstate.entities.records?.[ kind ]?.[ name ]?.saving?.[\n\t\t\trecordId as EntityRecordKey\n\t\t]?.pending ?? false\n\t);\n}\n\n/**\n * Returns true if the specified entity record is deleting, and false otherwise.\n *\n * @param state State tree.\n * @param kind Entity kind.\n * @param name Entity name.\n * @param recordId Record ID.\n *\n * @return Whether the entity record is deleting or not.\n */\nexport function isDeletingEntityRecord(\n\tstate: State,\n\tkind: string,\n\tname: string,\n\trecordId: EntityRecordKey\n): boolean {\n\treturn (\n\t\tstate.entities.records?.[ kind ]?.[ name ]?.deleting?.[\n\t\t\trecordId as EntityRecordKey\n\t\t]?.pending ?? false\n\t);\n}\n\n/**\n * Returns the specified entity record's last save error.\n *\n * @param state State tree.\n * @param kind Entity kind.\n * @param name Entity name.\n * @param recordId Record ID.\n *\n * @return The entity record's save error.\n */\nexport function getLastEntitySaveError(\n\tstate: State,\n\tkind: string,\n\tname: string,\n\trecordId: EntityRecordKey\n): any {\n\treturn state.entities.records?.[ kind ]?.[ name ]?.saving?.[ recordId ]\n\t\t?.error;\n}\n\n/**\n * Returns the specified entity record's last delete error.\n *\n * @param state State tree.\n * @param kind Entity kind.\n * @param name Entity name.\n * @param recordId Record ID.\n *\n * @return The entity record's save error.\n */\nexport function getLastEntityDeleteError(\n\tstate: State,\n\tkind: string,\n\tname: string,\n\trecordId: EntityRecordKey\n): any {\n\treturn state.entities.records?.[ kind ]?.[ name ]?.deleting?.[ recordId ]\n\t\t?.error;\n}\n\n/**\n * Returns the previous edit from the current undo offset\n * for the entity records edits history, if any.\n *\n * @deprecated since 6.3\n *\n * @param state State tree.\n *\n * @return The edit.\n */\nexport function getUndoEdit( state: State ): Optional< any > {\n\tdeprecated( \"select( 'core' ).getUndoEdit()\", {\n\t\tsince: '6.3',\n\t} );\n\treturn undefined;\n}\n\n/**\n * Returns the next edit from the current undo offset\n * for the entity records edits history, if any.\n *\n * @deprecated since 6.3\n *\n * @param state State tree.\n *\n * @return The edit.\n */\nexport function getRedoEdit( state: State ): Optional< any > {\n\tdeprecated( \"select( 'core' ).getRedoEdit()\", {\n\t\tsince: '6.3',\n\t} );\n\treturn undefined;\n}\n\n/**\n * Returns true if there is a previous edit from the current undo offset\n * for the entity records edits history, and false otherwise.\n *\n * @param state State tree.\n *\n * @return Whether there is a previous edit or not.\n */\nexport function hasUndo( state: State ): boolean {\n\treturn state.undoManager.hasUndo();\n}\n\n/**\n * Returns true if there is a next edit from the current undo offset\n * for the entity records edits history, and false otherwise.\n *\n * @param state State tree.\n *\n * @return Whether there is a next edit or not.\n */\nexport function hasRedo( state: State ): boolean {\n\treturn state.undoManager.hasRedo();\n}\n\n/**\n * Return the current theme.\n *\n * @param state Data state.\n *\n * @return The current theme.\n */\nexport function getCurrentTheme( state: State ): any {\n\tif ( ! state.currentTheme ) {\n\t\treturn null;\n\t}\n\treturn getEntityRecord( state, 'root', 'theme', state.currentTheme );\n}\n\n/**\n * Return the ID of the current global styles object.\n *\n * @param state Data state.\n *\n * @return The current global styles ID.\n */\nexport function __experimentalGetCurrentGlobalStylesId( state: State ): string {\n\treturn state.currentGlobalStylesId;\n}\n\n/**\n * Return theme supports data in the index.\n *\n * @param state Data state.\n *\n * @return Index data.\n */\nexport function getThemeSupports( state: State ): any {\n\treturn getCurrentTheme( state )?.theme_supports ?? EMPTY_OBJECT;\n}\n\n/**\n * Returns the embed preview for the given URL.\n *\n * @param state Data state.\n * @param url Embedded URL.\n *\n * @return Undefined if the preview has not been fetched, otherwise, the preview fetched from the embed preview API.\n */\nexport function getEmbedPreview( state: State, url: string ): any {\n\treturn state.embedPreviews[ url ];\n}\n\n/**\n * Determines if the returned preview is an oEmbed link fallback.\n *\n * WordPress can be configured to return a simple link to a URL if it is not embeddable.\n * We need to be able to determine if a URL is embeddable or not, based on what we\n * get back from the oEmbed preview API.\n *\n * @param state Data state.\n * @param url Embedded URL.\n *\n * @return Is the preview for the URL an oEmbed link fallback.\n */\nexport function isPreviewEmbedFallback( state: State, url: string ): boolean {\n\tconst preview = state.embedPreviews[ url ];\n\tconst oEmbedLinkCheck = '<a href=\"' + url + '\">' + url + '</a>';\n\tif ( ! preview ) {\n\t\treturn false;\n\t}\n\treturn preview.html === oEmbedLinkCheck;\n}\n\n/**\n * Returns whether the current user can perform the given action on the given\n * REST resource.\n *\n * Calling this may trigger an OPTIONS request to the REST API via the\n * `canUser()` resolver.\n *\n * https://developer.wordpress.org/rest-api/reference/\n *\n * @param state Data state.\n * @param action Action to check. One of: 'create', 'read', 'update', 'delete'.\n * @param resource REST resource to check, e.g. 'media' or 'posts'.\n * @param id Optional ID of the rest resource to check.\n *\n * @return Whether or not the user can perform the action,\n * or `undefined` if the OPTIONS request is still being made.\n */\nexport function canUser(\n\tstate: State,\n\taction: string,\n\tresource: string,\n\tid?: EntityRecordKey\n): boolean | undefined {\n\tconst key = [ action, resource, id ].filter( Boolean ).join( '/' );\n\treturn state.userPermissions[ key ];\n}\n\n/**\n * Returns whether the current user can edit the given entity.\n *\n * Calling this may trigger an OPTIONS request to the REST API via the\n * `canUser()` resolver.\n *\n * https://developer.wordpress.org/rest-api/reference/\n *\n * @param state Data state.\n * @param kind Entity kind.\n * @param name Entity name.\n * @param recordId Record's id.\n * @return Whether or not the user can edit,\n * or `undefined` if the OPTIONS request is still being made.\n */\nexport function canUserEditEntityRecord(\n\tstate: State,\n\tkind: string,\n\tname: string,\n\trecordId: EntityRecordKey\n): boolean | undefined {\n\tconst entityConfig = getEntityConfig( state, kind, name );\n\tif ( ! entityConfig ) {\n\t\treturn false;\n\t}\n\tconst resource = entityConfig.__unstable_rest_base;\n\n\treturn canUser( state, 'update', resource, recordId );\n}\n\n/**\n * Returns the latest autosaves for the post.\n *\n * May return multiple autosaves since the backend stores one autosave per\n * author for each post.\n *\n * @param state State tree.\n * @param postType The type of the parent post.\n * @param postId The id of the parent post.\n *\n * @return An array of autosaves for the post, or undefined if there is none.\n */\nexport function getAutosaves(\n\tstate: State,\n\tpostType: string,\n\tpostId: EntityRecordKey\n): Array< any > | undefined {\n\treturn state.autosaves[ postId ];\n}\n\n/**\n * Returns the autosave for the post and author.\n *\n * @param state State tree.\n * @param postType The type of the parent post.\n * @param postId The id of the parent post.\n * @param authorId The id of the author.\n *\n * @return The autosave for the post and author.\n */\nexport function getAutosave< EntityRecord extends ET.EntityRecord< any > >(\n\tstate: State,\n\tpostType: string,\n\tpostId: EntityRecordKey,\n\tauthorId: EntityRecordKey\n): EntityRecord | undefined {\n\tif ( authorId === undefined ) {\n\t\treturn;\n\t}\n\n\tconst autosaves = state.autosaves[ postId ];\n\n\treturn autosaves?.find(\n\t\t( autosave: any ) => autosave.author === authorId\n\t) as EntityRecord | undefined;\n}\n\n/**\n * Returns true if the REST request for autosaves has completed.\n *\n * @param state State tree.\n * @param postType The type of the parent post.\n * @param postId The id of the parent post.\n *\n * @return True if the REST request was completed. False otherwise.\n */\nexport const hasFetchedAutosaves = createRegistrySelector(\n\t( select ) =>\n\t\t(\n\t\t\tstate: State,\n\t\t\tpostType: string,\n\t\t\tpostId: EntityRecordKey\n\t\t): boolean => {\n\t\t\treturn select( STORE_NAME ).hasFinishedResolution( 'getAutosaves', [\n\t\t\t\tpostType,\n\t\t\t\tpostId,\n\t\t\t] );\n\t\t}\n);\n\n/**\n * Returns a new reference when edited values have changed. This is useful in\n * inferring where an edit has been made between states by comparison of the\n * return values using strict equality.\n *\n * @example\n *\n * ```\n * const hasEditOccurred = (\n * getReferenceByDistinctEdits( beforeState ) !==\n * getReferenceByDistinctEdits( afterState )\n * );\n * ```\n *\n * @param state Editor state.\n *\n * @return A value whose reference will change only when an edit occurs.\n */\nexport function getReferenceByDistinctEdits( state ) {\n\treturn state.editsReference;\n}\n\n/**\n * Retrieve the frontend template used for a given link.\n *\n * @param state Editor state.\n * @param link Link.\n *\n * @return The template record.\n */\nexport function __experimentalGetTemplateForLink(\n\tstate: State,\n\tlink: string\n): Optional< ET.Updatable< ET.WpTemplate > > | null {\n\tconst records = getEntityRecords< ET.WpTemplate >(\n\t\tstate,\n\t\t'postType',\n\t\t'wp_template',\n\t\t{\n\t\t\t'find-template': link,\n\t\t}\n\t);\n\n\tif ( records?.length ) {\n\t\treturn getEditedEntityRecord< ET.WpTemplate >(\n\t\t\tstate,\n\t\t\t'postType',\n\t\t\t'wp_template',\n\t\t\trecords[ 0 ].id\n\t\t);\n\t}\n\treturn null;\n}\n\n/**\n * Retrieve the current theme's base global styles\n *\n * @param state Editor state.\n *\n * @return The Global Styles object.\n */\nexport function __experimentalGetCurrentThemeBaseGlobalStyles(\n\tstate: State\n): any {\n\tconst currentTheme = getCurrentTheme( state );\n\tif ( ! currentTheme ) {\n\t\treturn null;\n\t}\n\treturn state.themeBaseGlobalStyles[ currentTheme.stylesheet ];\n}\n\n/**\n * Return the ID of the current global styles object.\n *\n * @param state Data state.\n *\n * @return The current global styles ID.\n */\nexport function __experimentalGetCurrentThemeGlobalStylesVariations(\n\tstate: State\n): string | null {\n\tconst currentTheme = getCurrentTheme( state );\n\tif ( ! currentTheme ) {\n\t\treturn null;\n\t}\n\treturn state.themeGlobalStyleVariations[ currentTheme.stylesheet ];\n}\n\n/**\n * Retrieve the list of registered block patterns.\n *\n * @param state Data state.\n *\n * @return Block pattern list.\n */\nexport function getBlockPatterns( state: State ): Array< any > {\n\treturn state.blockPatterns;\n}\n\n/**\n * Retrieve the list of registered block pattern categories.\n *\n * @param state Data state.\n *\n * @return Block pattern category list.\n */\nexport function getBlockPatternCategories( state: State ): Array< any > {\n\treturn state.blockPatternCategories;\n}\n\n/**\n * Retrieve the registered user pattern categories.\n *\n * @param state Data state.\n *\n * @return User patterns category array.\n */\n\nexport function getUserPatternCategories(\n\tstate: State\n): Array< UserPatternCategory > {\n\treturn state.userPatternCategories;\n}\n\n/**\n * Returns the revisions of the current global styles theme.\n *\n * @param state Data state.\n *\n * @return The current global styles.\n */\nexport function getCurrentThemeGlobalStylesRevisions(\n\tstate: State\n): Array< object > | null {\n\tconst currentGlobalStylesId =\n\t\t__experimentalGetCurrentGlobalStylesId( state );\n\n\tif ( ! currentGlobalStylesId ) {\n\t\treturn null;\n\t}\n\n\treturn state.themeGlobalStyleRevisions[ currentGlobalStylesId ];\n}\n\n/**\n * Returns the default template use to render a given query.\n *\n * @param state Data state.\n * @param query Query.\n *\n * @return The default template id for the given query.\n */\nexport function getDefaultTemplateId(\n\tstate: State,\n\tquery: TemplateQuery\n): string {\n\treturn state.defaultTemplates[ JSON.stringify( query ) ];\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,cAAc,MAAM,QAAQ;;AAEnC;AACA;AACA;AACA,SAASC,sBAAsB,QAAQ,iBAAiB;AACxD,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,OAAOC,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;AACA,SAASC,UAAU,QAAQ,QAAQ;AACnC,SAASC,eAAe,EAAEC,oBAAoB,QAAQ,gBAAgB;AACtE,SAASC,kBAAkB,QAAQ,YAAY;AAC/C,SACCC,2BAA2B,EAC3BC,cAAc,EACdC,cAAc,EACdC,WAAW,QACL,SAAS;AAyFhB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,YAAY,GAAG,CAAC,CAAC;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,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Y,EAAiB;EAC9D,OAAOA,KAAK,CAAC8J,aAAa;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,yBAAyBA,CAAE/J,KAAY,EAAiB;EACvE,OAAOA,KAAK,CAACgK,sBAAsB;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASC,wBAAwBA,CACvCjK,KAAY,EACmB;EAC/B,OAAOA,KAAK,CAACkK,qBAAqB;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,oCAAoCA,CACnDnK,KAAY,EACa;EACzB,MAAMyH,qBAAqB,GAC1BD,sCAAsC,CAAExH,KAAM,CAAC;EAEhD,IAAK,CAAEyH,qBAAqB,EAAG;IAC9B,OAAO,IAAI;EACZ;EAEA,OAAOzH,KAAK,CAACoK,yBAAyB,CAAE3C,qBAAqB,CAAE;AAChE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS4C,oBAAoBA,CACnCrK,KAAY,EACZI,KAAoB,EACX;EACT,OAAOJ,KAAK,CAACsK,gBAAgB,CAAEC,IAAI,CAACC,SAAS,CAAEpK,KAAM,CAAC,CAAE;AACzD"}
|
package/build-types/actions.d.ts
CHANGED
|
@@ -165,6 +165,15 @@ export function receiveAutosaves(postId: number, autosaves: any[] | any): any;
|
|
|
165
165
|
* @return {Object} Action object.
|
|
166
166
|
*/
|
|
167
167
|
export function receiveNavigationFallbackId(fallbackId: integer): any;
|
|
168
|
+
/**
|
|
169
|
+
* Returns an action object used to set the template for a given query.
|
|
170
|
+
*
|
|
171
|
+
* @param {Object} query The lookup query.
|
|
172
|
+
* @param {string} templateId The resolved template id.
|
|
173
|
+
*
|
|
174
|
+
* @return {Object} Action object.
|
|
175
|
+
*/
|
|
176
|
+
export function receiveDefaultTemplateId(query: any, templateId: string): any;
|
|
168
177
|
export function deleteEntityRecord(kind: string, name: string, recordId: string, query: any | null, { __unstableFetch, throwOnError }?: {
|
|
169
178
|
__unstableFetch?: Function | undefined;
|
|
170
179
|
throwOnError?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.js"],"names":[],"mappings":"AAuBA;;;;;;;;;;GAUG;AACH,0CALW,MAAM,SACN,WAAY,OAUtB;AAED;;;;;;;;;GASG;AACH,0DAKC;AAED;;;;;;GAMG;AACH,kDAKC;AAED;;;;;;;;;;;GAWG;AACH,2CATW,MAAM,QACN,MAAM,WACN,WAAY,4GAuCtB;AAED;;;;;;;;;GASG;AACH,4DAKC;AAED;;;;;;;;;GASG;AACH,kFAJW,MAAM,OAWhB;AAED;;;;;;;;;;GAUG;AACH,uEALW,MAAM,0BAchB;AAED;;;;;;;;;;GAUG;AACH,4EALW,MAAM,0BAchB;AAED;;;;;;GAMG;AACH,4CAQC;AAED;;;;;;;;;;GAUG;AACH,4DALW,MAAM,yBAWhB;AAED;;;;;;;;;;;GAWG;AACH,yCALW,MAAM,qBAWhB;AA0kBD;;;;;;;;GAQG;AACH,+DAJW,OAAO,OAWjB;AAED;;;;;;;;;;;GAWG;AACH,2CALW,MAAM,aACN,OAAO,OAUjB;AAED;;;;;;;;;;;GAWG;AACH,yCALW,MAAM,aACN,WAAY,OAUtB;AAED;;;;;;GAMG;AACH,sEAKC;AA/
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.js"],"names":[],"mappings":"AAuBA;;;;;;;;;;GAUG;AACH,0CALW,MAAM,SACN,WAAY,OAUtB;AAED;;;;;;;;;GASG;AACH,0DAKC;AAED;;;;;;GAMG;AACH,kDAKC;AAED;;;;;;;;;;;GAWG;AACH,2CATW,MAAM,QACN,MAAM,WACN,WAAY,4GAuCtB;AAED;;;;;;;;;GASG;AACH,4DAKC;AAED;;;;;;;;;GASG;AACH,kFAJW,MAAM,OAWhB;AAED;;;;;;;;;;GAUG;AACH,uEALW,MAAM,0BAchB;AAED;;;;;;;;;;GAUG;AACH,4EALW,MAAM,0BAchB;AAED;;;;;;GAMG;AACH,4CAQC;AAED;;;;;;;;;;GAUG;AACH,4DALW,MAAM,yBAWhB;AAED;;;;;;;;;;;GAWG;AACH,yCALW,MAAM,qBAWhB;AA0kBD;;;;;;;;GAQG;AACH,+DAJW,OAAO,OAWjB;AAED;;;;;;;;;;;GAWG;AACH,2CALW,MAAM,aACN,OAAO,OAUjB;AAED;;;;;;;;;;;GAWG;AACH,yCALW,MAAM,aACN,WAAY,OAUtB;AAED;;;;;;GAMG;AACH,sEAKC;AAED;;;;;;;GAOG;AACH,iEAJW,MAAM,OAUhB;AA/oBM,yCAZI,MAAM,QACN,MAAM,YACN,MAAM;;;;;mCA8Ef;AAeK,uCATI,MAAM,QACN,MAAM,YACN,MAAM,GAAC,MAAM;IAGW,UAAU;QA0E3C;AAMK;;;WAWL;AAMK;;;WAWL;AAOK,iDAIL;AAgBK,uCAXI,MAAM,QACN,MAAM;IAGa,UAAU;IACV,eAAe;IAGf,YAAY;;;;;mBAwNxC;AAwBK,uFAoCL;AAUK,6CALI,MAAM,QACN,MAAM;;;mBA0Bf;AAWK,6DANI,MAAM,QACN,MAAM;;;mBA0Cf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-provider.d.ts","sourceRoot":"","sources":["../src/entity-provider.js"],"names":[],"mappings":"AAwDA;;;;;;;;;;;;GAYG;AACH;IARyB,IAAI,EAAlB,MAAM;IACQ,IAAI,EAAlB,MAAM;IACQ,EAAE,EAAhB,MAAM;IACQ,QAAQ;QAQhC;AAED;;;;;;GAMG;AACH,kCAHW,MAAM,QACN,MAAM,OAIhB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,oCAZW,MAAM,QACN,MAAM,QACN,MAAM,6BAGL,oBAAgB,CAqC3B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,2CAPW,MAAM,QACN,MAAM;IAEW,EAAE;IAElB,CAAC,OAAO,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"entity-provider.d.ts","sourceRoot":"","sources":["../src/entity-provider.js"],"names":[],"mappings":"AAwDA;;;;;;;;;;;;GAYG;AACH;IARyB,IAAI,EAAlB,MAAM;IACQ,IAAI,EAAlB,MAAM;IACQ,EAAE,EAAhB,MAAM;IACQ,QAAQ;QAQhC;AAED;;;;;;GAMG;AACH,kCAHW,MAAM,QACN,MAAM,OAIhB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,oCAZW,MAAM,QACN,MAAM,QACN,MAAM,6BAGL,oBAAgB,CAqC3B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,2CAPW,MAAM,QACN,MAAM;IAEW,EAAE;IAElB,CAAC,OAAO,EAAE,qBAAqB,CAqF1C"}
|
package/build-types/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export const store: import("@wordpress/data/build-types/types").StoreDescriptor<
|
|
|
24
24
|
receiveUserPermission(key: string, isAllowed: boolean): any;
|
|
25
25
|
receiveAutosaves(postId: number, autosaves: any): any;
|
|
26
26
|
receiveNavigationFallbackId(fallbackId: integer): any;
|
|
27
|
+
receiveDefaultTemplateId(query: any, templateId: string): any;
|
|
27
28
|
deleteEntityRecord: (kind: string, name: string, recordId: string, query: any, { __unstableFetch, throwOnError }?: {
|
|
28
29
|
__unstableFetch?: Function | undefined;
|
|
29
30
|
throwOnError?: boolean | undefined;
|
|
@@ -101,6 +102,11 @@ export const store: import("@wordpress/data/build-types/types").StoreDescriptor<
|
|
|
101
102
|
getBlockPatternCategories(state: selectors.State): any[];
|
|
102
103
|
getUserPatternCategories(state: selectors.State): selectors.UserPatternCategory[];
|
|
103
104
|
getCurrentThemeGlobalStylesRevisions(state: selectors.State): object[] | null;
|
|
105
|
+
getDefaultTemplateId(state: selectors.State, query: {
|
|
106
|
+
slug?: string | undefined;
|
|
107
|
+
is_custom?: boolean | undefined;
|
|
108
|
+
ignore_empty?: boolean | undefined;
|
|
109
|
+
}): string;
|
|
104
110
|
isRequestingEmbedPreview: Function;
|
|
105
111
|
getUserQueryResults: ((state: selectors.State, queryID: string) => import("./entity-types").User<"edit">[]) & import("rememo").EnhancedSelector;
|
|
106
112
|
getEntityRecord: selectors.GetEntityRecord;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":";AA4DA;;;;GAIG;AACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":";AA4DA;;;;GAIG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAmE;;;;;;2BAxDxC,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../src/queried-data/selectors.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../src/queried-data/selectors.js"],"names":[],"mappings":";AA2HA,kEAIC;AAlCD;;;;;;;;;;;;GAYG;AACH,qGAeI"}
|