@wordpress/core-data 6.23.0 → 6.25.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 +5 -0
- package/README.md +51 -2
- package/build/actions.js +38 -0
- package/build/actions.js.map +1 -1
- package/build/entities.js +7 -3
- package/build/entities.js.map +1 -1
- package/build/entity-types/global-styles-revision.js +6 -0
- package/build/entity-types/global-styles-revision.js.map +1 -0
- package/build/entity-types/index.js.map +1 -1
- package/build/entity-types/post-revision.js +6 -0
- package/build/entity-types/post-revision.js.map +1 -0
- package/build/footnotes/get-footnotes-order.js +2 -9
- package/build/footnotes/get-footnotes-order.js.map +1 -1
- package/build/footnotes/index.js +5 -10
- package/build/footnotes/index.js.map +1 -1
- package/build/hooks/use-entity-record.js +16 -5
- package/build/hooks/use-entity-record.js.map +1 -1
- package/build/queried-data/reducer.js +1 -1
- package/build/queried-data/reducer.js.map +1 -1
- package/build/reducer.js +26 -2
- package/build/reducer.js.map +1 -1
- package/build/resolvers.js +133 -3
- package/build/resolvers.js.map +1 -1
- package/build/selectors.js +79 -1
- package/build/selectors.js.map +1 -1
- package/build-module/actions.js +36 -0
- package/build-module/actions.js.map +1 -1
- package/build-module/entities.js +7 -3
- package/build-module/entities.js.map +1 -1
- package/build-module/entity-types/global-styles-revision.js +2 -0
- package/build-module/entity-types/global-styles-revision.js.map +1 -0
- package/build-module/entity-types/index.js.map +1 -1
- package/build-module/entity-types/post-revision.js +2 -0
- package/build-module/entity-types/post-revision.js.map +1 -0
- package/build-module/footnotes/get-footnotes-order.js +2 -9
- package/build-module/footnotes/get-footnotes-order.js.map +1 -1
- package/build-module/footnotes/index.js +6 -11
- package/build-module/footnotes/index.js.map +1 -1
- package/build-module/hooks/use-entity-record.js +16 -5
- package/build-module/hooks/use-entity-record.js.map +1 -1
- package/build-module/queried-data/reducer.js +1 -1
- package/build-module/queried-data/reducer.js.map +1 -1
- package/build-module/reducer.js +26 -2
- package/build-module/reducer.js.map +1 -1
- package/build-module/resolvers.js +130 -2
- package/build-module/resolvers.js.map +1 -1
- package/build-module/selectors.js +76 -1
- package/build-module/selectors.js.map +1 -1
- package/build-types/actions.d.ts +5 -0
- package/build-types/actions.d.ts.map +1 -1
- package/build-types/entities.d.ts +11 -1
- package/build-types/entities.d.ts.map +1 -1
- package/build-types/entity-types/global-styles-revision.d.ts +43 -0
- package/build-types/entity-types/global-styles-revision.d.ts.map +1 -0
- package/build-types/entity-types/index.d.ts +4 -2
- package/build-types/entity-types/index.d.ts.map +1 -1
- package/build-types/entity-types/post-revision.d.ts +76 -0
- package/build-types/entity-types/post-revision.d.ts.map +1 -0
- package/build-types/footnotes/get-footnotes-order.d.ts.map +1 -1
- package/build-types/footnotes/index.d.ts.map +1 -1
- package/build-types/hooks/use-entity-record.d.ts.map +1 -1
- package/build-types/index.d.ts +13 -4
- package/build-types/index.d.ts.map +1 -1
- package/build-types/reducer.d.ts.map +1 -1
- package/build-types/resolvers.d.ts +9 -0
- package/build-types/resolvers.d.ts.map +1 -1
- package/build-types/selectors.d.ts +39 -3
- package/build-types/selectors.d.ts.map +1 -1
- package/package.json +17 -17
- package/src/actions.js +45 -0
- package/src/entities.js +13 -1
- package/src/entity-types/global-styles-revision.ts +47 -0
- package/src/entity-types/index.ts +6 -0
- package/src/entity-types/post-revision.ts +93 -0
- package/src/footnotes/get-footnotes-order.js +5 -12
- package/src/footnotes/index.js +14 -8
- package/src/hooks/test/use-entity-record.js +41 -0
- package/src/hooks/use-entity-record.ts +30 -18
- package/src/queried-data/reducer.js +1 -1
- package/src/reducer.js +33 -2
- package/src/resolvers.js +182 -2
- package/src/selectors.ts +119 -1
- package/src/test/entities.js +9 -0
- package/src/test/reducer.js +235 -0
- package/src/test/selectors.js +96 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -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","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,wBAAwB,GAAGZ,sBAAsB,CAC3Da,MAAW,IACZ,CAAEC,KAAY,EAAEC,GAAW,KAAe;EACzC,OAAOF,MAAM,CAAEV,UAAW,CAAC,CAACa,WAAW,CAAE,iBAAiB,EAAE,CAC3DD,GAAG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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"}
|
|
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","getRevisions","queriedStateRevisions","revisions","getRevision","revisionKey","_query$context5","_getNormalizedCommaSe2","_query$context6"],"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\ntype RevisionRecord =\n\t| Record< ET.Context, Record< number, ET.PostRevision > >\n\t| Record< ET.Context, Record< number, ET.GlobalStylesRevision > >;\n\ninterface RevisionsQueriedData {\n\titems: RevisionRecord;\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\trevisions?: RevisionsQueriedData;\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 * @deprecated since WordPress 6.5.0. Callers should use `select( 'core' ).getRevisions( 'root', 'globalStyles', ${ recordKey } )` instead, where `recordKey` is the id of the global styles parent post.\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\tdeprecated( \"select( 'core' ).getCurrentThemeGlobalStylesRevisions()\", {\n\t\tsince: '6.5.0',\n\t\talternative:\n\t\t\t\"select( 'core' ).getRevisions( 'root', 'globalStyles', ${ recordKey } )\",\n\t} );\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\n/**\n * Returns an entity's revisions.\n *\n * @param state State tree\n * @param kind Entity kind.\n * @param name Entity name.\n * @param recordKey The key of the entity record whose revisions you want to fetch.\n * @param query Optional query. If requesting specific\n * fields, fields must always include the ID. For valid query parameters see revisions schema in [the REST API Handbook](https://developer.wordpress.org/rest-api/reference/). Then see the arguments available \"Retrieve a [Entity kind]\".\n *\n * @return Record.\n */\nexport const getRevisions = (\n\tstate: State,\n\tkind: string,\n\tname: string,\n\trecordKey: EntityRecordKey,\n\tquery?: GetRecordsHttpQuery\n): RevisionRecord[] | null => {\n\tconst queriedStateRevisions =\n\t\tstate.entities.records?.[ kind ]?.[ name ]?.revisions?.[ recordKey ];\n\tif ( ! queriedStateRevisions ) {\n\t\treturn null;\n\t}\n\n\treturn getQueriedItems( queriedStateRevisions, query );\n};\n\n/**\n * Returns a single, specific revision of a parent entity.\n *\n * @param state State tree\n * @param kind Entity kind.\n * @param name Entity name.\n * @param recordKey The key of the entity record whose revisions you want to fetch.\n * @param revisionKey The revision's key.\n * @param query Optional query. If requesting specific\n * fields, fields must always include the ID. For valid query parameters see revisions schema in [the REST API Handbook](https://developer.wordpress.org/rest-api/reference/). Then see the arguments available \"Retrieve a [entity kind]\".\n *\n * @return Record.\n */\nexport const getRevision = createSelector(\n\t(\n\t\tstate: State,\n\t\tkind: string,\n\t\tname: string,\n\t\trecordKey: EntityRecordKey,\n\t\trevisionKey: EntityRecordKey,\n\t\tquery?: GetRecordsHttpQuery\n\t): RevisionRecord | Record< PropertyKey, never > | undefined => {\n\t\tconst queriedState =\n\t\t\tstate.entities.records?.[ kind ]?.[ name ]?.revisions?.[\n\t\t\t\trecordKey\n\t\t\t];\n\n\t\tif ( ! queriedState ) {\n\t\t\treturn undefined;\n\t\t}\n\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 ]?.[ revisionKey ] ) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\treturn queriedState.items[ context ][ revisionKey ];\n\t\t}\n\n\t\tconst item = queriedState.items[ context ]?.[ revisionKey ];\n\t\tif ( item && query._fields ) {\n\t\t\tconst filteredItem = {};\n\t\t\tconst fields = getNormalizedCommaSeparable( query._fields ) ?? [];\n\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\n\t\t\treturn filteredItem;\n\t\t}\n\n\t\treturn item;\n\t},\n\t( state: State, kind, name, recordKey, revisionKey, query ) => {\n\t\tconst context = query?.context ?? 'default';\n\t\treturn [\n\t\t\tstate.entities.records?.[ kind ]?.[ name ]?.revisions?.[ recordKey ]\n\t\t\t\t?.items?.[ context ]?.[ revisionKey ],\n\t\t\tstate.entities.records?.[ kind ]?.[ name ]?.revisions?.[ recordKey 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,GAAId,IAAI,CAAE,GAAIO,IAAI,CAAE,EAAEgJ,SAAS,GAAIlH,SAAS,CAAE,EACjElB,KAAK,GAAIF,OAAO,CAAE,GAAIwI,WAAW,CAAE,EACtC7K,KAAK,CAACsB,QAAQ,CAACY,OAAO,GAAId,IAAI,CAAE,GAAIO,IAAI,CAAE,EAAEgJ,SAAS,GAAIlH,SAAS,CAAE,EACjEnB,cAAc,GAAID,OAAO,CAAE,GAAIwI,WAAW,CAAE,CAC/C;AACF,CACD,CAAC"}
|
package/build-types/actions.d.ts
CHANGED
|
@@ -100,6 +100,8 @@ export function receiveThemeSupports(): any;
|
|
|
100
100
|
* Returns an action object used in signalling that the theme global styles CPT post revisions have been received.
|
|
101
101
|
* Ignored from documentation as it's internal to the data store.
|
|
102
102
|
*
|
|
103
|
+
* @deprecated since WordPress 6.5.0. Callers should use `dispatch( 'core' ).receiveRevision` instead.
|
|
104
|
+
*
|
|
103
105
|
* @ignore
|
|
104
106
|
*
|
|
105
107
|
* @param {number} currentId The post id.
|
|
@@ -210,4 +212,7 @@ export function __experimentalSaveSpecifiedEntityEdits(kind: string, name: strin
|
|
|
210
212
|
select: any;
|
|
211
213
|
dispatch: any;
|
|
212
214
|
}) => Promise<any>;
|
|
215
|
+
export function receiveRevisions(kind: string, name: string, recordKey: number | string, records: any[] | any, query: any | null, invalidateCache: boolean | null | undefined, meta: any | null): ({ dispatch }: {
|
|
216
|
+
dispatch: any;
|
|
217
|
+
}) => Promise<void>;
|
|
213
218
|
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -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
|
|
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;;;;;;;;;;;;GAYG;AACH,4DALW,MAAM,yBAkBhB;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;AAqGK,uCARI,MAAM,QACN,MAAM,aACN,MAAM,GAAC,MAAM,WACb,WAAY;;oBA4BrB"}
|
|
@@ -21,6 +21,7 @@ export const rootEntitiesConfig: ({
|
|
|
21
21
|
rawAttributes?: undefined;
|
|
22
22
|
supportsPagination?: undefined;
|
|
23
23
|
transientEdits?: undefined;
|
|
24
|
+
getRevisionsUrl?: undefined;
|
|
24
25
|
} | {
|
|
25
26
|
label: string;
|
|
26
27
|
name: string;
|
|
@@ -40,6 +41,7 @@ export const rootEntitiesConfig: ({
|
|
|
40
41
|
rawAttributes?: undefined;
|
|
41
42
|
supportsPagination?: undefined;
|
|
42
43
|
transientEdits?: undefined;
|
|
44
|
+
getRevisionsUrl?: undefined;
|
|
43
45
|
} | {
|
|
44
46
|
label: string;
|
|
45
47
|
name: string;
|
|
@@ -62,6 +64,7 @@ export const rootEntitiesConfig: ({
|
|
|
62
64
|
rawAttributes?: undefined;
|
|
63
65
|
supportsPagination?: undefined;
|
|
64
66
|
transientEdits?: undefined;
|
|
67
|
+
getRevisionsUrl?: undefined;
|
|
65
68
|
} | {
|
|
66
69
|
name: string;
|
|
67
70
|
kind: string;
|
|
@@ -80,6 +83,7 @@ export const rootEntitiesConfig: ({
|
|
|
80
83
|
getTitle?: undefined;
|
|
81
84
|
key?: undefined;
|
|
82
85
|
transientEdits?: undefined;
|
|
86
|
+
getRevisionsUrl?: undefined;
|
|
83
87
|
} | {
|
|
84
88
|
name: string;
|
|
85
89
|
kind: string;
|
|
@@ -98,6 +102,7 @@ export const rootEntitiesConfig: ({
|
|
|
98
102
|
rawAttributes?: undefined;
|
|
99
103
|
supportsPagination?: undefined;
|
|
100
104
|
transientEdits?: undefined;
|
|
105
|
+
getRevisionsUrl?: undefined;
|
|
101
106
|
} | {
|
|
102
107
|
name: string;
|
|
103
108
|
kind: string;
|
|
@@ -118,6 +123,7 @@ export const rootEntitiesConfig: ({
|
|
|
118
123
|
key?: undefined;
|
|
119
124
|
rawAttributes?: undefined;
|
|
120
125
|
supportsPagination?: undefined;
|
|
126
|
+
getRevisionsUrl?: undefined;
|
|
121
127
|
} | {
|
|
122
128
|
name: string;
|
|
123
129
|
kind: string;
|
|
@@ -136,6 +142,7 @@ export const rootEntitiesConfig: ({
|
|
|
136
142
|
rawAttributes?: undefined;
|
|
137
143
|
supportsPagination?: undefined;
|
|
138
144
|
transientEdits?: undefined;
|
|
145
|
+
getRevisionsUrl?: undefined;
|
|
139
146
|
} | {
|
|
140
147
|
name: string;
|
|
141
148
|
kind: string;
|
|
@@ -154,6 +161,7 @@ export const rootEntitiesConfig: ({
|
|
|
154
161
|
key?: undefined;
|
|
155
162
|
supportsPagination?: undefined;
|
|
156
163
|
transientEdits?: undefined;
|
|
164
|
+
getRevisionsUrl?: undefined;
|
|
157
165
|
} | {
|
|
158
166
|
label: string;
|
|
159
167
|
name: string;
|
|
@@ -165,12 +173,13 @@ export const rootEntitiesConfig: ({
|
|
|
165
173
|
};
|
|
166
174
|
plural: string;
|
|
167
175
|
getTitle: (record: any) => any;
|
|
176
|
+
getRevisionsUrl: (parentId: any, revisionId: any) => string;
|
|
177
|
+
supportsPagination: boolean;
|
|
168
178
|
syncConfig?: undefined;
|
|
169
179
|
syncObjectType?: undefined;
|
|
170
180
|
getSyncObjectId?: undefined;
|
|
171
181
|
key?: undefined;
|
|
172
182
|
rawAttributes?: undefined;
|
|
173
|
-
supportsPagination?: undefined;
|
|
174
183
|
transientEdits?: undefined;
|
|
175
184
|
} | {
|
|
176
185
|
label: string;
|
|
@@ -190,6 +199,7 @@ export const rootEntitiesConfig: ({
|
|
|
190
199
|
rawAttributes?: undefined;
|
|
191
200
|
supportsPagination?: undefined;
|
|
192
201
|
transientEdits?: undefined;
|
|
202
|
+
getRevisionsUrl?: undefined;
|
|
193
203
|
})[];
|
|
194
204
|
export const additionalEntityConfigLoaders: {
|
|
195
205
|
kind: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../src/entities.js"],"names":[],"mappings":"AAiBA,sCAAuC;AAIvC
|
|
1
|
+
{"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../src/entities.js"],"names":[],"mappings":"AAiBA,sCAAuC;AAIvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2NE;AAEF;;;IAGE;AASK,0EAqBN;AA+GM,oCAPI,MAAM,QACN,MAAM,WACN,MAAM,cACN,OAAO,GAEN,MAAM,CAkBjB;AAkBM,8CAJI,MAAM,eAEO,MAAM,KAAK,cAAc,CAiC/C;AA9KF;;;;GAIG;AACH,sDA8DC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { Context, ContextualField, OmitNevers } from './helpers';
|
|
5
|
+
import type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';
|
|
6
|
+
declare module './base-entity-records' {
|
|
7
|
+
namespace BaseEntityRecords {
|
|
8
|
+
interface GlobalStylesRevision<C extends Context> {
|
|
9
|
+
/**
|
|
10
|
+
* The ID for the author of the global styles revision.
|
|
11
|
+
*/
|
|
12
|
+
author: number;
|
|
13
|
+
/**
|
|
14
|
+
* The date the post global styles revision published, in the site's timezone.
|
|
15
|
+
*/
|
|
16
|
+
date: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* The date the global styles revision was published, as GMT.
|
|
19
|
+
*/
|
|
20
|
+
date_gmt: ContextualField<string | null, 'view' | 'edit', C>;
|
|
21
|
+
/**
|
|
22
|
+
* Unique identifier for the revision.
|
|
23
|
+
*/
|
|
24
|
+
id: number;
|
|
25
|
+
/**
|
|
26
|
+
* The date the global styles revision was last modified, in the site's timezone.
|
|
27
|
+
*/
|
|
28
|
+
modified: ContextualField<string, 'view' | 'edit', C>;
|
|
29
|
+
/**
|
|
30
|
+
* The date the global styles revision was last modified, as GMT.
|
|
31
|
+
*/
|
|
32
|
+
modified_gmt: ContextualField<string, 'view' | 'edit', C>;
|
|
33
|
+
/**
|
|
34
|
+
* Identifier for the parent of the revision.
|
|
35
|
+
*/
|
|
36
|
+
parent: number;
|
|
37
|
+
styles: Record<string, Object>;
|
|
38
|
+
settings: Record<string, Object>;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export type GlobalStylesRevision<C extends Context = 'view'> = OmitNevers<_BaseEntityRecords.GlobalStylesRevision<C>>;
|
|
43
|
+
//# sourceMappingURL=global-styles-revision.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-styles-revision.d.ts","sourceRoot":"","sources":["../../src/entity-types/global-styles-revision.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEtE,OAAO,KAAK,EAAE,iBAAiB,IAAI,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAErF,OAAO,QAAQ,uBAAuB,CAAC;IACtC,UAAiB,iBAAiB,CAAC;QAClC,UAAiB,oBAAoB,CAAE,CAAC,SAAS,OAAO;YACvD;;eAEG;YACH,MAAM,EAAE,MAAM,CAAC;YACf;;eAEG;YACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;YACpB;;eAEG;YACH,QAAQ,EAAE,eAAe,CAAE,MAAM,GAAG,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAE,CAAC;YAC/D;;eAEG;YACH,EAAE,EAAE,MAAM,CAAC;YACX;;eAEG;YACH,QAAQ,EAAE,eAAe,CAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAE,CAAC;YACxD;;eAEG;YACH,YAAY,EAAE,eAAe,CAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAE,CAAC;YAC5D;;eAEG;YACH,MAAM,EAAE,MAAM,CAAC;YACf,MAAM,EAAE,MAAM,CAAE,MAAM,EAAE,MAAM,CAAE,CAAC;YACjC,QAAQ,EAAE,MAAM,CAAE,MAAM,EAAE,MAAM,CAAE,CAAC;SACnC;KACD;CACD;AAED,MAAM,MAAM,oBAAoB,CAAE,CAAC,SAAS,OAAO,GAAG,MAAM,IAAK,UAAU,CAC1E,kBAAkB,CAAC,oBAAoB,CAAE,CAAC,CAAE,CAC5C,CAAC"}
|
|
@@ -4,12 +4,14 @@
|
|
|
4
4
|
import type { Context, Updatable } from './helpers';
|
|
5
5
|
import type { Attachment } from './attachment';
|
|
6
6
|
import type { Comment } from './comment';
|
|
7
|
+
import type { GlobalStylesRevision } from './global-styles-revision';
|
|
7
8
|
import type { MenuLocation } from './menu-location';
|
|
8
9
|
import type { NavMenu } from './nav-menu';
|
|
9
10
|
import type { NavMenuItem } from './nav-menu-item';
|
|
10
11
|
import type { Page } from './page';
|
|
11
12
|
import type { Plugin } from './plugin';
|
|
12
13
|
import type { Post } from './post';
|
|
14
|
+
import type { PostRevision } from './post-revision';
|
|
13
15
|
import type { Settings } from './settings';
|
|
14
16
|
import type { Sidebar } from './sidebar';
|
|
15
17
|
import type { Taxonomy } from './taxonomy';
|
|
@@ -21,7 +23,7 @@ import type { WidgetType } from './widget-type';
|
|
|
21
23
|
import type { WpTemplate } from './wp-template';
|
|
22
24
|
import type { WpTemplatePart } from './wp-template-part';
|
|
23
25
|
export type { BaseEntityRecords } from './base-entity-records';
|
|
24
|
-
export type { Attachment, Comment, Context, MenuLocation, NavMenu, NavMenuItem, Page, Plugin, Post, Settings, Sidebar, Taxonomy, Theme, Updatable, User, Type, Widget, WidgetType, WpTemplate, WpTemplatePart, };
|
|
26
|
+
export type { Attachment, Comment, Context, GlobalStylesRevision, MenuLocation, NavMenu, NavMenuItem, Page, Plugin, Post, PostRevision, Settings, Sidebar, Taxonomy, Theme, Updatable, User, Type, Widget, WidgetType, WpTemplate, WpTemplatePart, };
|
|
25
27
|
/**
|
|
26
28
|
* An interface that may be extended to add types for new entities. Each entry
|
|
27
29
|
* must be a union of entity definitions adhering to the EntityInterface type.
|
|
@@ -55,7 +57,7 @@ export type { Attachment, Comment, Context, MenuLocation, NavMenu, NavMenuItem,
|
|
|
55
57
|
* ```
|
|
56
58
|
*/
|
|
57
59
|
export interface PerPackageEntityRecords<C extends Context> {
|
|
58
|
-
core: Attachment<C> | Comment<C> | MenuLocation<C> | NavMenu<C> | NavMenuItem<C> | Page<C> | Plugin<C> | Post<C> | Settings<C> | Sidebar<C> | Taxonomy<C> | Theme<C> | User<C> | Type<C> | Widget<C> | WidgetType<C> | WpTemplate<C> | WpTemplatePart<C>;
|
|
60
|
+
core: Attachment<C> | Comment<C> | GlobalStylesRevision<C> | MenuLocation<C> | NavMenu<C> | NavMenuItem<C> | Page<C> | Plugin<C> | Post<C> | PostRevision<C> | Settings<C> | Sidebar<C> | Taxonomy<C> | Theme<C> | User<C> | Type<C> | Widget<C> | WidgetType<C> | WpTemplate<C> | WpTemplatePart<C>;
|
|
59
61
|
}
|
|
60
62
|
/**
|
|
61
63
|
* A union of all known record types.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entity-types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CA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AC1D,IAAI,EACD,UAAU,CAAE,CAAC,CAAE,GACf,OAAO,CAAE,CAAC,CAAE,GACZ,oBAAoB,CAAE,CAAC,CAAE,GACzB,YAAY,CAAE,CAAC,CAAE,GACjB,OAAO,CAAE,CAAC,CAAE,GACZ,WAAW,CAAE,CAAC,CAAE,GAChB,IAAI,CAAE,CAAC,CAAE,GACT,MAAM,CAAE,CAAC,CAAE,GACX,IAAI,CAAE,CAAC,CAAE,GACT,YAAY,CAAE,CAAC,CAAE,GACjB,QAAQ,CAAE,CAAC,CAAE,GACb,OAAO,CAAE,CAAC,CAAE,GACZ,QAAQ,CAAE,CAAC,CAAE,GACb,KAAK,CAAE,CAAC,CAAE,GACV,IAAI,CAAE,CAAC,CAAE,GACT,IAAI,CAAE,CAAC,CAAE,GACT,MAAM,CAAE,CAAC,CAAE,GACX,UAAU,CAAE,CAAC,CAAE,GACf,UAAU,CAAE,CAAC,CAAE,GACf,cAAc,CAAE,CAAC,CAAE,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,CAAE,CAAC,SAAS,OAAO,GAAG,MAAM,IACnD,uBAAuB,CAAE,CAAC,CAAE,CAAE,MAAM,uBAAuB,CAAE,CAAC,CAAE,CAAE,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { Context, ContextualField, RenderedText, OmitNevers } from './helpers';
|
|
5
|
+
import type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';
|
|
6
|
+
declare module './base-entity-records' {
|
|
7
|
+
namespace BaseEntityRecords {
|
|
8
|
+
interface PostRevision<C extends Context> {
|
|
9
|
+
/**
|
|
10
|
+
* The ID for the author of the post revision.
|
|
11
|
+
*/
|
|
12
|
+
author: number;
|
|
13
|
+
/**
|
|
14
|
+
* The content for the post.
|
|
15
|
+
*/
|
|
16
|
+
content: ContextualField<RenderedText<C> & {
|
|
17
|
+
/**
|
|
18
|
+
* Whether the content is protected with a password.
|
|
19
|
+
*/
|
|
20
|
+
is_protected: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Version of the content block format used by the post.
|
|
23
|
+
*/
|
|
24
|
+
block_version: ContextualField<string, 'edit', C>;
|
|
25
|
+
}, 'view' | 'edit', C>;
|
|
26
|
+
/**
|
|
27
|
+
* The date the post was published, in the site's timezone.
|
|
28
|
+
*/
|
|
29
|
+
date: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* The date the post was published, as GMT.
|
|
32
|
+
*/
|
|
33
|
+
date_gmt: ContextualField<string | null, 'view' | 'edit', C>;
|
|
34
|
+
/**
|
|
35
|
+
* The excerpt for the post revision.
|
|
36
|
+
*/
|
|
37
|
+
excerpt: RenderedText<C> & {
|
|
38
|
+
protected: boolean;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* The globally unique identifier for the post.
|
|
42
|
+
*/
|
|
43
|
+
guid: ContextualField<RenderedText<C>, 'view' | 'edit', C>;
|
|
44
|
+
/**
|
|
45
|
+
* Unique identifier for the revision.
|
|
46
|
+
*/
|
|
47
|
+
id: number;
|
|
48
|
+
/**
|
|
49
|
+
* Meta fields.
|
|
50
|
+
*/
|
|
51
|
+
meta: ContextualField<Record<string, string>, 'view' | 'edit', C>;
|
|
52
|
+
/**
|
|
53
|
+
* The date the post was last modified, in the site's timezone.
|
|
54
|
+
*/
|
|
55
|
+
modified: ContextualField<string, 'view' | 'edit', C>;
|
|
56
|
+
/**
|
|
57
|
+
* The date the post revision was last modified, as GMT.
|
|
58
|
+
*/
|
|
59
|
+
modified_gmt: ContextualField<string, 'view' | 'edit', C>;
|
|
60
|
+
/**
|
|
61
|
+
* Identifier for the parent of the revision.
|
|
62
|
+
*/
|
|
63
|
+
parent: number;
|
|
64
|
+
/**
|
|
65
|
+
* An alphanumeric identifier for the post unique to its type.
|
|
66
|
+
*/
|
|
67
|
+
slug: string;
|
|
68
|
+
/**
|
|
69
|
+
* The title for the post revision.
|
|
70
|
+
*/
|
|
71
|
+
title: RenderedText<C>;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
export type PostRevision<C extends Context = 'view'> = OmitNevers<_BaseEntityRecords.PostRevision<C>>;
|
|
76
|
+
//# sourceMappingURL=post-revision.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-revision.d.ts","sourceRoot":"","sources":["../../src/entity-types/post-revision.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EACX,OAAO,EACP,eAAe,EACf,YAAY,EACZ,UAAU,EACV,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,iBAAiB,IAAI,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAErF,OAAO,QAAQ,uBAAuB,CAAC;IACtC,UAAiB,iBAAiB,CAAC;QAClC,UAAiB,YAAY,CAAE,CAAC,SAAS,OAAO;YAC/C;;eAEG;YACH,MAAM,EAAE,MAAM,CAAC;YACf;;eAEG;YACH,OAAO,EAAE,eAAe,CACvB,YAAY,CAAE,CAAC,CAAE,GAAG;gBACnB;;mBAEG;gBACH,YAAY,EAAE,OAAO,CAAC;gBACtB;;mBAEG;gBACH,aAAa,EAAE,eAAe,CAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAE,CAAC;aACpD,EACD,MAAM,GAAG,MAAM,EACf,CAAC,CACD,CAAC;YACF;;eAEG;YACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;YACpB;;eAEG;YACH,QAAQ,EAAE,eAAe,CAAE,MAAM,GAAG,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAE,CAAC;YAC/D;;eAEG;YACH,OAAO,EAAE,YAAY,CAAE,CAAC,CAAE,GAAG;gBAC5B,SAAS,EAAE,OAAO,CAAC;aACnB,CAAC;YACF;;eAEG;YACH,IAAI,EAAE,eAAe,CAAE,YAAY,CAAE,CAAC,CAAE,EAAE,MAAM,GAAG,MAA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