@wordpress/core-data 7.37.0 → 7.37.1-next.ba3aee3a2.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 +0 -2
- package/LICENSE.md +1 -1
- package/README.md +0 -1
- package/build/{actions.js → actions.cjs} +8 -8
- package/build/batch/{create-batch.js → create-batch.cjs} +2 -2
- package/build/batch/{default-processor.js → default-processor.cjs} +1 -1
- package/build/batch/{index.js → index.cjs} +3 -3
- package/build/{dynamic-entities.js → dynamic-entities.cjs} +1 -1
- package/build/{entities.js → entities.cjs} +3 -3
- package/build/{entity-context.js → entity-context.cjs} +1 -1
- package/build/{entity-provider.js → entity-provider.cjs} +2 -2
- package/build/entity-types/{attachment.js → attachment.cjs} +1 -1
- package/build/entity-types/{base-entity-records.js → base-entity-records.cjs} +1 -1
- package/build/entity-types/{base.js → base.cjs} +1 -1
- package/build/entity-types/{comment.js → comment.cjs} +1 -1
- package/build/entity-types/{font-collection.js → font-collection.cjs} +1 -1
- package/build/entity-types/{font-family.js → font-family.cjs} +1 -1
- package/build/entity-types/{global-styles-revision.js → global-styles-revision.cjs} +1 -1
- package/build/entity-types/{helpers.js → helpers.cjs} +1 -1
- package/build/entity-types/{index.js → index.cjs} +1 -1
- package/build/entity-types/{menu-location.js → menu-location.cjs} +1 -1
- package/build/entity-types/{nav-menu-item.js → nav-menu-item.cjs} +1 -1
- package/build/entity-types/{nav-menu.js → nav-menu.cjs} +1 -1
- package/build/entity-types/{page.js → page.cjs} +1 -1
- package/build/entity-types/{plugin.js → plugin.cjs} +1 -1
- package/build/entity-types/{post-revision.js → post-revision.cjs} +1 -1
- package/build/entity-types/{post-status.js → post-status.cjs} +1 -1
- package/build/entity-types/{post.js → post.cjs} +1 -1
- package/build/entity-types/{settings.js → settings.cjs} +1 -1
- package/build/entity-types/{sidebar.js → sidebar.cjs} +1 -1
- package/build/entity-types/{taxonomy.js → taxonomy.cjs} +1 -1
- package/build/entity-types/{term.js → term.cjs} +1 -1
- package/build/entity-types/{theme.js → theme.cjs} +1 -1
- package/build/entity-types/{type.js → type.cjs} +1 -1
- package/build/entity-types/{user.js → user.cjs} +1 -1
- package/build/entity-types/{widget-type.js → widget-type.cjs} +1 -1
- package/build/entity-types/{widget.js → widget.cjs} +1 -1
- package/build/entity-types/{wp-template-part.js → wp-template-part.cjs} +1 -1
- package/build/entity-types/{wp-template.js → wp-template.cjs} +1 -1
- package/build/fetch/{__experimental-fetch-link-suggestions.js → __experimental-fetch-link-suggestions.cjs} +1 -1
- package/build/fetch/{__experimental-fetch-url-data.js → __experimental-fetch-url-data.cjs} +1 -1
- package/build/fetch/{index.js → index.cjs} +3 -3
- package/build/footnotes/{get-footnotes-order.js → get-footnotes-order.cjs} +2 -2
- package/build/footnotes/{get-rich-text-values-cached.js → get-rich-text-values-cached.cjs} +2 -2
- package/build/footnotes/{index.js → index.cjs} +2 -2
- package/build/hooks/{constants.js → constants.cjs} +1 -1
- package/build/hooks/{index.js → index.cjs} +7 -7
- package/build/hooks/{memoize.js → memoize.cjs} +1 -1
- package/build/hooks/{use-entity-block-editor.js → use-entity-block-editor.cjs} +4 -4
- package/build/hooks/{use-entity-id.js → use-entity-id.cjs} +2 -2
- package/build/hooks/{use-entity-prop.js → use-entity-prop.cjs} +3 -3
- package/build/hooks/{use-entity-record.js → use-entity-record.cjs} +3 -3
- package/build/hooks/{use-entity-record.js.map → use-entity-record.cjs.map} +2 -2
- package/build/hooks/{use-entity-records.js → use-entity-records.cjs} +5 -5
- package/build/hooks/{use-query-select.js → use-query-select.cjs} +3 -3
- package/build/hooks/{use-resource-permissions.js → use-resource-permissions.cjs} +4 -4
- package/build/{index.js → index.cjs} +24 -24
- package/build/{index.js.map → index.cjs.map} +1 -1
- package/build/{lock-unlock.js → lock-unlock.cjs} +1 -1
- package/build/locks/{actions.js → actions.cjs} +2 -2
- package/build/locks/{engine.js → engine.cjs} +3 -3
- package/build/locks/{reducer.js → reducer.cjs} +2 -2
- package/build/locks/{selectors.js → selectors.cjs} +2 -2
- package/build/locks/{utils.js → utils.cjs} +1 -1
- package/build/{name.js → name.cjs} +1 -1
- package/build/{private-actions.js → private-actions.cjs} +2 -2
- package/build/{private-apis.js → private-apis.cjs} +4 -4
- package/build/{private-selectors.js → private-selectors.cjs} +6 -6
- package/build/queried-data/{actions.js → actions.cjs} +1 -1
- package/build/queried-data/{get-query-parts.js → get-query-parts.cjs} +2 -2
- package/build/queried-data/{index.js → index.cjs} +6 -6
- package/build/queried-data/{index.js.map → index.cjs.map} +1 -1
- package/build/queried-data/{reducer.js → reducer.cjs} +4 -4
- package/build/queried-data/{selectors.js → selectors.cjs} +3 -3
- package/build/{reducer.js → reducer.cjs} +4 -4
- package/build/{resolvers.js → resolvers.cjs} +6 -6
- package/build/{selectors.js → selectors.cjs} +7 -7
- package/build/{selectors.js.map → selectors.cjs.map} +2 -2
- package/build/{sync.js → sync.cjs} +1 -1
- package/build/{types.js → types.cjs} +1 -1
- package/build/utils/{conservative-map-item.js → conservative-map-item.cjs} +1 -1
- package/build/utils/{crdt-blocks.js → crdt-blocks.cjs} +7 -6
- package/build/utils/{crdt-blocks.js.map → crdt-blocks.cjs.map} +2 -2
- package/build/utils/{crdt.js → crdt.cjs} +4 -4
- package/build/utils/{crdt.js.map → crdt.cjs.map} +2 -2
- package/build/utils/{forward-resolver.js → forward-resolver.cjs} +1 -1
- package/build/utils/{get-nested-value.js → get-nested-value.cjs} +1 -1
- package/build/utils/{get-normalized-comma-separable.js → get-normalized-comma-separable.cjs} +1 -1
- package/build/utils/{if-matching-action.js → if-matching-action.cjs} +1 -1
- package/build/utils/{index.js → index.cjs} +14 -14
- package/build/utils/{is-numeric-id.js → is-numeric-id.cjs} +1 -1
- package/build/utils/{is-raw-attribute.js → is-raw-attribute.cjs} +1 -1
- package/build/utils/{log-entity-deprecation.js → log-entity-deprecation.cjs} +2 -2
- package/build/utils/{on-sub-key.js → on-sub-key.cjs} +1 -1
- package/build/utils/{receive-intermediate-results.js → receive-intermediate-results.cjs} +2 -2
- package/build/utils/{replace-action.js → replace-action.cjs} +1 -1
- package/build/utils/{set-nested-value.js → set-nested-value.cjs} +1 -1
- package/build/utils/{user-permissions.js → user-permissions.cjs} +1 -1
- package/build/utils/{with-weak-map-cache.js → with-weak-map-cache.cjs} +1 -1
- package/build-module/{actions.js → actions.mjs} +8 -8
- package/build-module/batch/{create-batch.js → create-batch.mjs} +2 -2
- package/build-module/batch/{default-processor.js → default-processor.mjs} +1 -1
- package/build-module/batch/index.mjs +8 -0
- package/build-module/{dynamic-entities.js → dynamic-entities.mjs} +1 -1
- package/build-module/{entities.js → entities.mjs} +3 -3
- package/build-module/{entity-context.js → entity-context.mjs} +1 -1
- package/build-module/{entity-provider.js → entity-provider.mjs} +2 -2
- package/build-module/entity-types/attachment.mjs +1 -0
- package/build-module/entity-types/base-entity-records.mjs +1 -0
- package/build-module/entity-types/base.mjs +1 -0
- package/build-module/entity-types/comment.mjs +1 -0
- package/build-module/entity-types/font-collection.mjs +1 -0
- package/build-module/entity-types/font-family.mjs +1 -0
- package/build-module/entity-types/global-styles-revision.mjs +1 -0
- package/build-module/entity-types/helpers.mjs +1 -0
- package/build-module/entity-types/index.mjs +1 -0
- package/build-module/entity-types/menu-location.mjs +1 -0
- package/build-module/entity-types/nav-menu-item.mjs +1 -0
- package/build-module/entity-types/nav-menu.mjs +1 -0
- package/build-module/entity-types/page.mjs +1 -0
- package/build-module/entity-types/plugin.mjs +1 -0
- package/build-module/entity-types/post-revision.mjs +1 -0
- package/build-module/entity-types/post-status.mjs +1 -0
- package/build-module/entity-types/post.mjs +1 -0
- package/build-module/entity-types/settings.mjs +1 -0
- package/build-module/entity-types/sidebar.mjs +1 -0
- package/build-module/entity-types/taxonomy.mjs +1 -0
- package/build-module/entity-types/term.mjs +1 -0
- package/build-module/entity-types/theme.mjs +1 -0
- package/build-module/entity-types/type.mjs +1 -0
- package/build-module/entity-types/user.mjs +1 -0
- package/build-module/entity-types/widget-type.mjs +1 -0
- package/build-module/entity-types/widget.mjs +1 -0
- package/build-module/entity-types/wp-template-part.mjs +1 -0
- package/build-module/entity-types/wp-template.mjs +1 -0
- package/build-module/fetch/{__experimental-fetch-link-suggestions.js → __experimental-fetch-link-suggestions.mjs} +1 -1
- package/build-module/fetch/{__experimental-fetch-url-data.js → __experimental-fetch-url-data.mjs} +1 -1
- package/build-module/fetch/{index.js → index.mjs} +3 -3
- package/build-module/footnotes/{get-footnotes-order.js → get-footnotes-order.mjs} +2 -2
- package/build-module/footnotes/{get-rich-text-values-cached.js → get-rich-text-values-cached.mjs} +2 -2
- package/build-module/footnotes/{index.js → index.mjs} +2 -2
- package/build-module/hooks/{constants.js → constants.mjs} +1 -1
- package/build-module/hooks/{index.js → index.mjs} +7 -7
- package/build-module/hooks/{memoize.js → memoize.mjs} +1 -1
- package/build-module/hooks/{use-entity-block-editor.js → use-entity-block-editor.mjs} +4 -4
- package/build-module/hooks/{use-entity-id.js → use-entity-id.mjs} +2 -2
- package/build-module/hooks/{use-entity-prop.js → use-entity-prop.mjs} +3 -3
- package/build-module/hooks/{use-entity-record.js → use-entity-record.mjs} +3 -3
- package/build-module/hooks/{use-entity-record.js.map → use-entity-record.mjs.map} +2 -2
- package/build-module/hooks/{use-entity-records.js → use-entity-records.mjs} +5 -5
- package/build-module/hooks/{use-query-select.js → use-query-select.mjs} +3 -3
- package/build-module/hooks/{use-resource-permissions.js → use-resource-permissions.mjs} +4 -4
- package/build-module/{index.js → index.mjs} +19 -19
- package/build-module/{lock-unlock.js → lock-unlock.mjs} +1 -1
- package/build-module/locks/{actions.js → actions.mjs} +2 -2
- package/build-module/locks/{engine.js → engine.mjs} +3 -3
- package/build-module/locks/{reducer.js → reducer.mjs} +2 -2
- package/build-module/locks/{selectors.js → selectors.mjs} +2 -2
- package/build-module/locks/{utils.js → utils.mjs} +1 -1
- package/build-module/{name.js → name.mjs} +1 -1
- package/build-module/{private-actions.js → private-actions.mjs} +2 -2
- package/build-module/{private-apis.js → private-apis.mjs} +4 -4
- package/build-module/{private-selectors.js → private-selectors.mjs} +6 -6
- package/build-module/queried-data/{actions.js → actions.mjs} +1 -1
- package/build-module/queried-data/{get-query-parts.js → get-query-parts.mjs} +2 -2
- package/build-module/queried-data/index.mjs +8 -0
- package/build-module/queried-data/{reducer.js → reducer.mjs} +4 -4
- package/build-module/queried-data/{selectors.js → selectors.mjs} +3 -3
- package/build-module/{reducer.js → reducer.mjs} +4 -4
- package/build-module/{resolvers.js → resolvers.mjs} +6 -6
- package/build-module/{selectors.js → selectors.mjs} +7 -7
- package/build-module/{selectors.js.map → selectors.mjs.map} +2 -2
- package/build-module/{sync.js → sync.mjs} +1 -1
- package/build-module/types.mjs +1 -0
- package/build-module/utils/{conservative-map-item.js → conservative-map-item.mjs} +1 -1
- package/build-module/utils/{crdt-blocks.js → crdt-blocks.mjs} +7 -6
- package/build-module/utils/{crdt-blocks.js.map → crdt-blocks.mjs.map} +2 -2
- package/build-module/utils/{crdt.js → crdt.mjs} +4 -4
- package/build-module/utils/{crdt.js.map → crdt.mjs.map} +2 -2
- package/build-module/utils/{forward-resolver.js → forward-resolver.mjs} +1 -1
- package/build-module/utils/{get-nested-value.js → get-nested-value.mjs} +1 -1
- package/build-module/utils/{get-normalized-comma-separable.js → get-normalized-comma-separable.mjs} +1 -1
- package/build-module/utils/{if-matching-action.js → if-matching-action.mjs} +1 -1
- package/build-module/utils/{index.js → index.mjs} +14 -14
- package/build-module/utils/{is-numeric-id.js → is-numeric-id.mjs} +1 -1
- package/build-module/utils/{is-raw-attribute.js → is-raw-attribute.mjs} +1 -1
- package/build-module/utils/{log-entity-deprecation.js → log-entity-deprecation.mjs} +2 -2
- package/build-module/utils/{on-sub-key.js → on-sub-key.mjs} +1 -1
- package/build-module/utils/{receive-intermediate-results.js → receive-intermediate-results.mjs} +2 -2
- package/build-module/utils/{replace-action.js → replace-action.mjs} +1 -1
- package/build-module/utils/{set-nested-value.js → set-nested-value.mjs} +1 -1
- package/build-module/utils/{user-permissions.js → user-permissions.mjs} +1 -1
- package/build-module/utils/{with-weak-map-cache.js → with-weak-map-cache.mjs} +1 -1
- package/build-types/hooks/use-entity-record.d.ts +0 -1
- package/build-types/hooks/use-entity-record.d.ts.map +1 -1
- package/build-types/index.d.ts +9 -9
- package/build-types/index.d.ts.map +1 -1
- package/build-types/selectors.d.ts +2 -1
- package/build-types/selectors.d.ts.map +1 -1
- package/build-types/utils/crdt-blocks.d.ts.map +1 -1
- package/package.json +34 -24
- package/src/hooks/use-entity-record.ts +0 -1
- package/src/selectors.ts +11 -1
- package/src/utils/crdt-blocks.ts +8 -6
- package/src/utils/crdt.ts +3 -3
- package/src/utils/test/crdt-blocks.ts +99 -0
- package/src/utils/test/crdt.ts +42 -3
- package/build-module/batch/index.js +0 -8
- package/build-module/entity-types/attachment.js +0 -1
- package/build-module/entity-types/base-entity-records.js +0 -1
- package/build-module/entity-types/base.js +0 -1
- package/build-module/entity-types/comment.js +0 -1
- package/build-module/entity-types/font-collection.js +0 -1
- package/build-module/entity-types/font-family.js +0 -1
- package/build-module/entity-types/global-styles-revision.js +0 -1
- package/build-module/entity-types/helpers.js +0 -1
- package/build-module/entity-types/index.js +0 -1
- package/build-module/entity-types/menu-location.js +0 -1
- package/build-module/entity-types/nav-menu-item.js +0 -1
- package/build-module/entity-types/nav-menu.js +0 -1
- package/build-module/entity-types/page.js +0 -1
- package/build-module/entity-types/plugin.js +0 -1
- package/build-module/entity-types/post-revision.js +0 -1
- package/build-module/entity-types/post-status.js +0 -1
- package/build-module/entity-types/post.js +0 -1
- package/build-module/entity-types/settings.js +0 -1
- package/build-module/entity-types/sidebar.js +0 -1
- package/build-module/entity-types/taxonomy.js +0 -1
- package/build-module/entity-types/term.js +0 -1
- package/build-module/entity-types/theme.js +0 -1
- package/build-module/entity-types/type.js +0 -1
- package/build-module/entity-types/user.js +0 -1
- package/build-module/entity-types/widget-type.js +0 -1
- package/build-module/entity-types/widget.js +0 -1
- package/build-module/entity-types/wp-template-part.js +0 -1
- package/build-module/entity-types/wp-template.js +0 -1
- package/build-module/queried-data/index.js +0 -8
- package/build-module/types.js +0 -1
- package/tsconfig.json +0 -25
- package/tsconfig.tsbuildinfo +0 -1
- /package/build/{actions.js.map → actions.cjs.map} +0 -0
- /package/build/batch/{create-batch.js.map → create-batch.cjs.map} +0 -0
- /package/build/batch/{default-processor.js.map → default-processor.cjs.map} +0 -0
- /package/build/batch/{index.js.map → index.cjs.map} +0 -0
- /package/build/{dynamic-entities.js.map → dynamic-entities.cjs.map} +0 -0
- /package/build/{entities.js.map → entities.cjs.map} +0 -0
- /package/build/{entity-context.js.map → entity-context.cjs.map} +0 -0
- /package/build/{entity-provider.js.map → entity-provider.cjs.map} +0 -0
- /package/build/entity-types/{attachment.js.map → attachment.cjs.map} +0 -0
- /package/build/entity-types/{base-entity-records.js.map → base-entity-records.cjs.map} +0 -0
- /package/build/entity-types/{base.js.map → base.cjs.map} +0 -0
- /package/build/entity-types/{comment.js.map → comment.cjs.map} +0 -0
- /package/build/entity-types/{font-collection.js.map → font-collection.cjs.map} +0 -0
- /package/build/entity-types/{font-family.js.map → font-family.cjs.map} +0 -0
- /package/build/entity-types/{global-styles-revision.js.map → global-styles-revision.cjs.map} +0 -0
- /package/build/entity-types/{helpers.js.map → helpers.cjs.map} +0 -0
- /package/build/entity-types/{index.js.map → index.cjs.map} +0 -0
- /package/build/entity-types/{menu-location.js.map → menu-location.cjs.map} +0 -0
- /package/build/entity-types/{nav-menu-item.js.map → nav-menu-item.cjs.map} +0 -0
- /package/build/entity-types/{nav-menu.js.map → nav-menu.cjs.map} +0 -0
- /package/build/entity-types/{page.js.map → page.cjs.map} +0 -0
- /package/build/entity-types/{plugin.js.map → plugin.cjs.map} +0 -0
- /package/build/entity-types/{post-revision.js.map → post-revision.cjs.map} +0 -0
- /package/build/entity-types/{post-status.js.map → post-status.cjs.map} +0 -0
- /package/build/entity-types/{post.js.map → post.cjs.map} +0 -0
- /package/build/entity-types/{settings.js.map → settings.cjs.map} +0 -0
- /package/build/entity-types/{sidebar.js.map → sidebar.cjs.map} +0 -0
- /package/build/entity-types/{taxonomy.js.map → taxonomy.cjs.map} +0 -0
- /package/build/entity-types/{term.js.map → term.cjs.map} +0 -0
- /package/build/entity-types/{theme.js.map → theme.cjs.map} +0 -0
- /package/build/entity-types/{type.js.map → type.cjs.map} +0 -0
- /package/build/entity-types/{user.js.map → user.cjs.map} +0 -0
- /package/build/entity-types/{widget-type.js.map → widget-type.cjs.map} +0 -0
- /package/build/entity-types/{widget.js.map → widget.cjs.map} +0 -0
- /package/build/entity-types/{wp-template-part.js.map → wp-template-part.cjs.map} +0 -0
- /package/build/entity-types/{wp-template.js.map → wp-template.cjs.map} +0 -0
- /package/build/fetch/{__experimental-fetch-link-suggestions.js.map → __experimental-fetch-link-suggestions.cjs.map} +0 -0
- /package/build/fetch/{__experimental-fetch-url-data.js.map → __experimental-fetch-url-data.cjs.map} +0 -0
- /package/build/fetch/{index.js.map → index.cjs.map} +0 -0
- /package/build/footnotes/{get-footnotes-order.js.map → get-footnotes-order.cjs.map} +0 -0
- /package/build/footnotes/{get-rich-text-values-cached.js.map → get-rich-text-values-cached.cjs.map} +0 -0
- /package/build/footnotes/{index.js.map → index.cjs.map} +0 -0
- /package/build/hooks/{constants.js.map → constants.cjs.map} +0 -0
- /package/build/hooks/{index.js.map → index.cjs.map} +0 -0
- /package/build/hooks/{memoize.js.map → memoize.cjs.map} +0 -0
- /package/build/hooks/{use-entity-block-editor.js.map → use-entity-block-editor.cjs.map} +0 -0
- /package/build/hooks/{use-entity-id.js.map → use-entity-id.cjs.map} +0 -0
- /package/build/hooks/{use-entity-prop.js.map → use-entity-prop.cjs.map} +0 -0
- /package/build/hooks/{use-entity-records.js.map → use-entity-records.cjs.map} +0 -0
- /package/build/hooks/{use-query-select.js.map → use-query-select.cjs.map} +0 -0
- /package/build/hooks/{use-resource-permissions.js.map → use-resource-permissions.cjs.map} +0 -0
- /package/build/{lock-unlock.js.map → lock-unlock.cjs.map} +0 -0
- /package/build/locks/{actions.js.map → actions.cjs.map} +0 -0
- /package/build/locks/{engine.js.map → engine.cjs.map} +0 -0
- /package/build/locks/{reducer.js.map → reducer.cjs.map} +0 -0
- /package/build/locks/{selectors.js.map → selectors.cjs.map} +0 -0
- /package/build/locks/{utils.js.map → utils.cjs.map} +0 -0
- /package/build/{name.js.map → name.cjs.map} +0 -0
- /package/build/{private-actions.js.map → private-actions.cjs.map} +0 -0
- /package/build/{private-apis.js.map → private-apis.cjs.map} +0 -0
- /package/build/{private-selectors.js.map → private-selectors.cjs.map} +0 -0
- /package/build/queried-data/{actions.js.map → actions.cjs.map} +0 -0
- /package/build/queried-data/{get-query-parts.js.map → get-query-parts.cjs.map} +0 -0
- /package/build/queried-data/{reducer.js.map → reducer.cjs.map} +0 -0
- /package/build/queried-data/{selectors.js.map → selectors.cjs.map} +0 -0
- /package/build/{reducer.js.map → reducer.cjs.map} +0 -0
- /package/build/{resolvers.js.map → resolvers.cjs.map} +0 -0
- /package/build/{sync.js.map → sync.cjs.map} +0 -0
- /package/build/{types.js.map → types.cjs.map} +0 -0
- /package/build/utils/{conservative-map-item.js.map → conservative-map-item.cjs.map} +0 -0
- /package/build/utils/{forward-resolver.js.map → forward-resolver.cjs.map} +0 -0
- /package/build/utils/{get-nested-value.js.map → get-nested-value.cjs.map} +0 -0
- /package/build/utils/{get-normalized-comma-separable.js.map → get-normalized-comma-separable.cjs.map} +0 -0
- /package/build/utils/{if-matching-action.js.map → if-matching-action.cjs.map} +0 -0
- /package/build/utils/{index.js.map → index.cjs.map} +0 -0
- /package/build/utils/{is-numeric-id.js.map → is-numeric-id.cjs.map} +0 -0
- /package/build/utils/{is-raw-attribute.js.map → is-raw-attribute.cjs.map} +0 -0
- /package/build/utils/{log-entity-deprecation.js.map → log-entity-deprecation.cjs.map} +0 -0
- /package/build/utils/{on-sub-key.js.map → on-sub-key.cjs.map} +0 -0
- /package/build/utils/{receive-intermediate-results.js.map → receive-intermediate-results.cjs.map} +0 -0
- /package/build/utils/{replace-action.js.map → replace-action.cjs.map} +0 -0
- /package/build/utils/{set-nested-value.js.map → set-nested-value.cjs.map} +0 -0
- /package/build/utils/{user-permissions.js.map → user-permissions.cjs.map} +0 -0
- /package/build/utils/{with-weak-map-cache.js.map → with-weak-map-cache.cjs.map} +0 -0
- /package/build-module/{actions.js.map → actions.mjs.map} +0 -0
- /package/build-module/batch/{create-batch.js.map → create-batch.mjs.map} +0 -0
- /package/build-module/batch/{default-processor.js.map → default-processor.mjs.map} +0 -0
- /package/build-module/batch/{index.js.map → index.mjs.map} +0 -0
- /package/build-module/{dynamic-entities.js.map → dynamic-entities.mjs.map} +0 -0
- /package/build-module/{entities.js.map → entities.mjs.map} +0 -0
- /package/build-module/{entity-context.js.map → entity-context.mjs.map} +0 -0
- /package/build-module/{entity-provider.js.map → entity-provider.mjs.map} +0 -0
- /package/build-module/entity-types/{attachment.js.map → attachment.mjs.map} +0 -0
- /package/build-module/entity-types/{base-entity-records.js.map → base-entity-records.mjs.map} +0 -0
- /package/build-module/entity-types/{base.js.map → base.mjs.map} +0 -0
- /package/build-module/entity-types/{comment.js.map → comment.mjs.map} +0 -0
- /package/build-module/entity-types/{font-collection.js.map → font-collection.mjs.map} +0 -0
- /package/build-module/entity-types/{font-family.js.map → font-family.mjs.map} +0 -0
- /package/build-module/entity-types/{global-styles-revision.js.map → global-styles-revision.mjs.map} +0 -0
- /package/build-module/entity-types/{helpers.js.map → helpers.mjs.map} +0 -0
- /package/build-module/entity-types/{index.js.map → index.mjs.map} +0 -0
- /package/build-module/entity-types/{menu-location.js.map → menu-location.mjs.map} +0 -0
- /package/build-module/entity-types/{nav-menu-item.js.map → nav-menu-item.mjs.map} +0 -0
- /package/build-module/entity-types/{nav-menu.js.map → nav-menu.mjs.map} +0 -0
- /package/build-module/entity-types/{page.js.map → page.mjs.map} +0 -0
- /package/build-module/entity-types/{plugin.js.map → plugin.mjs.map} +0 -0
- /package/build-module/entity-types/{post-revision.js.map → post-revision.mjs.map} +0 -0
- /package/build-module/entity-types/{post-status.js.map → post-status.mjs.map} +0 -0
- /package/build-module/entity-types/{post.js.map → post.mjs.map} +0 -0
- /package/build-module/entity-types/{settings.js.map → settings.mjs.map} +0 -0
- /package/build-module/entity-types/{sidebar.js.map → sidebar.mjs.map} +0 -0
- /package/build-module/entity-types/{taxonomy.js.map → taxonomy.mjs.map} +0 -0
- /package/build-module/entity-types/{term.js.map → term.mjs.map} +0 -0
- /package/build-module/entity-types/{theme.js.map → theme.mjs.map} +0 -0
- /package/build-module/entity-types/{type.js.map → type.mjs.map} +0 -0
- /package/build-module/entity-types/{user.js.map → user.mjs.map} +0 -0
- /package/build-module/entity-types/{widget-type.js.map → widget-type.mjs.map} +0 -0
- /package/build-module/entity-types/{widget.js.map → widget.mjs.map} +0 -0
- /package/build-module/entity-types/{wp-template-part.js.map → wp-template-part.mjs.map} +0 -0
- /package/build-module/entity-types/{wp-template.js.map → wp-template.mjs.map} +0 -0
- /package/build-module/fetch/{__experimental-fetch-link-suggestions.js.map → __experimental-fetch-link-suggestions.mjs.map} +0 -0
- /package/build-module/fetch/{__experimental-fetch-url-data.js.map → __experimental-fetch-url-data.mjs.map} +0 -0
- /package/build-module/fetch/{index.js.map → index.mjs.map} +0 -0
- /package/build-module/footnotes/{get-footnotes-order.js.map → get-footnotes-order.mjs.map} +0 -0
- /package/build-module/footnotes/{get-rich-text-values-cached.js.map → get-rich-text-values-cached.mjs.map} +0 -0
- /package/build-module/footnotes/{index.js.map → index.mjs.map} +0 -0
- /package/build-module/hooks/{constants.js.map → constants.mjs.map} +0 -0
- /package/build-module/hooks/{index.js.map → index.mjs.map} +0 -0
- /package/build-module/hooks/{memoize.js.map → memoize.mjs.map} +0 -0
- /package/build-module/hooks/{use-entity-block-editor.js.map → use-entity-block-editor.mjs.map} +0 -0
- /package/build-module/hooks/{use-entity-id.js.map → use-entity-id.mjs.map} +0 -0
- /package/build-module/hooks/{use-entity-prop.js.map → use-entity-prop.mjs.map} +0 -0
- /package/build-module/hooks/{use-entity-records.js.map → use-entity-records.mjs.map} +0 -0
- /package/build-module/hooks/{use-query-select.js.map → use-query-select.mjs.map} +0 -0
- /package/build-module/hooks/{use-resource-permissions.js.map → use-resource-permissions.mjs.map} +0 -0
- /package/build-module/{index.js.map → index.mjs.map} +0 -0
- /package/build-module/{lock-unlock.js.map → lock-unlock.mjs.map} +0 -0
- /package/build-module/locks/{actions.js.map → actions.mjs.map} +0 -0
- /package/build-module/locks/{engine.js.map → engine.mjs.map} +0 -0
- /package/build-module/locks/{reducer.js.map → reducer.mjs.map} +0 -0
- /package/build-module/locks/{selectors.js.map → selectors.mjs.map} +0 -0
- /package/build-module/locks/{utils.js.map → utils.mjs.map} +0 -0
- /package/build-module/{name.js.map → name.mjs.map} +0 -0
- /package/build-module/{private-actions.js.map → private-actions.mjs.map} +0 -0
- /package/build-module/{private-apis.js.map → private-apis.mjs.map} +0 -0
- /package/build-module/{private-selectors.js.map → private-selectors.mjs.map} +0 -0
- /package/build-module/queried-data/{actions.js.map → actions.mjs.map} +0 -0
- /package/build-module/queried-data/{get-query-parts.js.map → get-query-parts.mjs.map} +0 -0
- /package/build-module/queried-data/{index.js.map → index.mjs.map} +0 -0
- /package/build-module/queried-data/{reducer.js.map → reducer.mjs.map} +0 -0
- /package/build-module/queried-data/{selectors.js.map → selectors.mjs.map} +0 -0
- /package/build-module/{reducer.js.map → reducer.mjs.map} +0 -0
- /package/build-module/{resolvers.js.map → resolvers.mjs.map} +0 -0
- /package/build-module/{sync.js.map → sync.mjs.map} +0 -0
- /package/build-module/{types.js.map → types.mjs.map} +0 -0
- /package/build-module/utils/{conservative-map-item.js.map → conservative-map-item.mjs.map} +0 -0
- /package/build-module/utils/{forward-resolver.js.map → forward-resolver.mjs.map} +0 -0
- /package/build-module/utils/{get-nested-value.js.map → get-nested-value.mjs.map} +0 -0
- /package/build-module/utils/{get-normalized-comma-separable.js.map → get-normalized-comma-separable.mjs.map} +0 -0
- /package/build-module/utils/{if-matching-action.js.map → if-matching-action.mjs.map} +0 -0
- /package/build-module/utils/{index.js.map → index.mjs.map} +0 -0
- /package/build-module/utils/{is-numeric-id.js.map → is-numeric-id.mjs.map} +0 -0
- /package/build-module/utils/{is-raw-attribute.js.map → is-raw-attribute.mjs.map} +0 -0
- /package/build-module/utils/{log-entity-deprecation.js.map → log-entity-deprecation.mjs.map} +0 -0
- /package/build-module/utils/{on-sub-key.js.map → on-sub-key.mjs.map} +0 -0
- /package/build-module/utils/{receive-intermediate-results.js.map → receive-intermediate-results.mjs.map} +0 -0
- /package/build-module/utils/{replace-action.js.map → replace-action.mjs.map} +0 -0
- /package/build-module/utils/{set-nested-value.js.map → set-nested-value.mjs.map} +0 -0
- /package/build-module/utils/{user-permissions.js.map → user-permissions.mjs.map} +0 -0
- /package/build-module/utils/{with-weak-map-cache.js.map → with-weak-map-cache.mjs.map} +0 -0
package/CHANGELOG.md
CHANGED
package/LICENSE.md
CHANGED
package/README.md
CHANGED
|
@@ -64,13 +64,13 @@ var import_uuid = require("uuid");
|
|
|
64
64
|
var import_api_fetch = __toESM(require("@wordpress/api-fetch"));
|
|
65
65
|
var import_url = require("@wordpress/url");
|
|
66
66
|
var import_deprecated = __toESM(require("@wordpress/deprecated"));
|
|
67
|
-
var import_utils = require("./utils");
|
|
68
|
-
var import_queried_data = require("./queried-data");
|
|
69
|
-
var import_entities = require("./entities");
|
|
70
|
-
var import_batch = require("./batch");
|
|
71
|
-
var import_name = require("./name");
|
|
72
|
-
var import_sync = require("./sync");
|
|
73
|
-
var import_log_entity_deprecation = __toESM(require("./utils/log-entity-deprecation"));
|
|
67
|
+
var import_utils = require("./utils/index.cjs");
|
|
68
|
+
var import_queried_data = require("./queried-data/index.cjs");
|
|
69
|
+
var import_entities = require("./entities.cjs");
|
|
70
|
+
var import_batch = require("./batch/index.cjs");
|
|
71
|
+
var import_name = require("./name.cjs");
|
|
72
|
+
var import_sync = require("./sync.cjs");
|
|
73
|
+
var import_log_entity_deprecation = __toESM(require("./utils/log-entity-deprecation.cjs"));
|
|
74
74
|
function receiveUserQuery(queryID, users) {
|
|
75
75
|
return {
|
|
76
76
|
type: "RECEIVE_USER_QUERY",
|
|
@@ -658,4 +658,4 @@ var receiveRevisions = (kind, name, recordKey, records, query, invalidateCache =
|
|
|
658
658
|
saveEntityRecord,
|
|
659
659
|
undo
|
|
660
660
|
});
|
|
661
|
-
//# sourceMappingURL=actions.
|
|
661
|
+
//# sourceMappingURL=actions.cjs.map
|
|
@@ -33,7 +33,7 @@ __export(create_batch_exports, {
|
|
|
33
33
|
default: () => createBatch
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(create_batch_exports);
|
|
36
|
-
var import_default_processor = __toESM(require("./default-processor"));
|
|
36
|
+
var import_default_processor = __toESM(require("./default-processor.cjs"));
|
|
37
37
|
function createBatch(processor = import_default_processor.default) {
|
|
38
38
|
let lastId = 0;
|
|
39
39
|
let queue = [];
|
|
@@ -157,4 +157,4 @@ var ObservableSet = class {
|
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
159
|
};
|
|
160
|
-
//# sourceMappingURL=create-batch.
|
|
160
|
+
//# sourceMappingURL=create-batch.cjs.map
|
|
@@ -34,11 +34,11 @@ __export(batch_exports, {
|
|
|
34
34
|
defaultProcessor: () => import_default_processor.default
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(batch_exports);
|
|
37
|
-
var import_create_batch = __toESM(require("./create-batch"));
|
|
38
|
-
var import_default_processor = __toESM(require("./default-processor"));
|
|
37
|
+
var import_create_batch = __toESM(require("./create-batch.cjs"));
|
|
38
|
+
var import_default_processor = __toESM(require("./default-processor.cjs"));
|
|
39
39
|
// Annotate the CommonJS export names for ESM import in node:
|
|
40
40
|
0 && (module.exports = {
|
|
41
41
|
createBatch,
|
|
42
42
|
defaultProcessor
|
|
43
43
|
});
|
|
44
|
-
//# sourceMappingURL=index.
|
|
44
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -42,8 +42,8 @@ var import_change_case = require("change-case");
|
|
|
42
42
|
var import_api_fetch = __toESM(require("@wordpress/api-fetch"));
|
|
43
43
|
var import_blocks = require("@wordpress/blocks");
|
|
44
44
|
var import_i18n = require("@wordpress/i18n");
|
|
45
|
-
var import_sync = require("./sync");
|
|
46
|
-
var import_crdt = require("./utils/crdt");
|
|
45
|
+
var import_sync = require("./sync.cjs");
|
|
46
|
+
var import_crdt = require("./utils/crdt.cjs");
|
|
47
47
|
var DEFAULT_ENTITY_KEY = "id";
|
|
48
48
|
var POST_RAW_ATTRIBUTES = ["title", "excerpt", "content"];
|
|
49
49
|
var blocksTransientEdits = {
|
|
@@ -413,4 +413,4 @@ var getMethodName = (kind, name, prefix = "get") => {
|
|
|
413
413
|
prePersistPostType,
|
|
414
414
|
rootEntitiesConfig
|
|
415
415
|
});
|
|
416
|
-
//# sourceMappingURL=entities.
|
|
416
|
+
//# sourceMappingURL=entities.cjs.map
|
|
@@ -24,7 +24,7 @@ __export(entity_provider_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(entity_provider_exports);
|
|
26
26
|
var import_element = require("@wordpress/element");
|
|
27
|
-
var import_entity_context = require("./entity-context");
|
|
27
|
+
var import_entity_context = require("./entity-context.cjs");
|
|
28
28
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
29
|
function EntityProvider({ kind, type: name, id, children }) {
|
|
30
30
|
const parent = (0, import_element.useContext)(import_entity_context.EntityContext);
|
|
@@ -40,4 +40,4 @@ function EntityProvider({ kind, type: name, id, children }) {
|
|
|
40
40
|
);
|
|
41
41
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_entity_context.EntityContext.Provider, { value: childContext, children });
|
|
42
42
|
}
|
|
43
|
-
//# sourceMappingURL=entity-provider.
|
|
43
|
+
//# sourceMappingURL=entity-provider.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/attachment.ts
|
|
17
17
|
var attachment_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(attachment_exports);
|
|
19
|
-
//# sourceMappingURL=attachment.
|
|
19
|
+
//# sourceMappingURL=attachment.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/base-entity-records.ts
|
|
17
17
|
var base_entity_records_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(base_entity_records_exports);
|
|
19
|
-
//# sourceMappingURL=base-entity-records.
|
|
19
|
+
//# sourceMappingURL=base-entity-records.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/base.ts
|
|
17
17
|
var base_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(base_exports);
|
|
19
|
-
//# sourceMappingURL=base.
|
|
19
|
+
//# sourceMappingURL=base.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/comment.ts
|
|
17
17
|
var comment_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(comment_exports);
|
|
19
|
-
//# sourceMappingURL=comment.
|
|
19
|
+
//# sourceMappingURL=comment.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/font-collection.ts
|
|
17
17
|
var font_collection_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(font_collection_exports);
|
|
19
|
-
//# sourceMappingURL=font-collection.
|
|
19
|
+
//# sourceMappingURL=font-collection.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/font-family.ts
|
|
17
17
|
var font_family_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(font_family_exports);
|
|
19
|
-
//# sourceMappingURL=font-family.
|
|
19
|
+
//# sourceMappingURL=font-family.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/global-styles-revision.ts
|
|
17
17
|
var global_styles_revision_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(global_styles_revision_exports);
|
|
19
|
-
//# sourceMappingURL=global-styles-revision.
|
|
19
|
+
//# sourceMappingURL=global-styles-revision.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/helpers.ts
|
|
17
17
|
var helpers_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(helpers_exports);
|
|
19
|
-
//# sourceMappingURL=helpers.
|
|
19
|
+
//# sourceMappingURL=helpers.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/index.ts
|
|
17
17
|
var entity_types_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(entity_types_exports);
|
|
19
|
-
//# sourceMappingURL=index.
|
|
19
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/menu-location.ts
|
|
17
17
|
var menu_location_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(menu_location_exports);
|
|
19
|
-
//# sourceMappingURL=menu-location.
|
|
19
|
+
//# sourceMappingURL=menu-location.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/nav-menu-item.ts
|
|
17
17
|
var nav_menu_item_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(nav_menu_item_exports);
|
|
19
|
-
//# sourceMappingURL=nav-menu-item.
|
|
19
|
+
//# sourceMappingURL=nav-menu-item.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/nav-menu.ts
|
|
17
17
|
var nav_menu_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(nav_menu_exports);
|
|
19
|
-
//# sourceMappingURL=nav-menu.
|
|
19
|
+
//# sourceMappingURL=nav-menu.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/page.ts
|
|
17
17
|
var page_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(page_exports);
|
|
19
|
-
//# sourceMappingURL=page.
|
|
19
|
+
//# sourceMappingURL=page.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/plugin.ts
|
|
17
17
|
var plugin_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(plugin_exports);
|
|
19
|
-
//# sourceMappingURL=plugin.
|
|
19
|
+
//# sourceMappingURL=plugin.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/post-revision.ts
|
|
17
17
|
var post_revision_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(post_revision_exports);
|
|
19
|
-
//# sourceMappingURL=post-revision.
|
|
19
|
+
//# sourceMappingURL=post-revision.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/post-status.ts
|
|
17
17
|
var post_status_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(post_status_exports);
|
|
19
|
-
//# sourceMappingURL=post-status.
|
|
19
|
+
//# sourceMappingURL=post-status.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/post.ts
|
|
17
17
|
var post_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(post_exports);
|
|
19
|
-
//# sourceMappingURL=post.
|
|
19
|
+
//# sourceMappingURL=post.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/settings.ts
|
|
17
17
|
var settings_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(settings_exports);
|
|
19
|
-
//# sourceMappingURL=settings.
|
|
19
|
+
//# sourceMappingURL=settings.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/sidebar.ts
|
|
17
17
|
var sidebar_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(sidebar_exports);
|
|
19
|
-
//# sourceMappingURL=sidebar.
|
|
19
|
+
//# sourceMappingURL=sidebar.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/taxonomy.ts
|
|
17
17
|
var taxonomy_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(taxonomy_exports);
|
|
19
|
-
//# sourceMappingURL=taxonomy.
|
|
19
|
+
//# sourceMappingURL=taxonomy.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/term.ts
|
|
17
17
|
var term_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(term_exports);
|
|
19
|
-
//# sourceMappingURL=term.
|
|
19
|
+
//# sourceMappingURL=term.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/theme.ts
|
|
17
17
|
var theme_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(theme_exports);
|
|
19
|
-
//# sourceMappingURL=theme.
|
|
19
|
+
//# sourceMappingURL=theme.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/type.ts
|
|
17
17
|
var type_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(type_exports);
|
|
19
|
-
//# sourceMappingURL=type.
|
|
19
|
+
//# sourceMappingURL=type.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/user.ts
|
|
17
17
|
var user_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(user_exports);
|
|
19
|
-
//# sourceMappingURL=user.
|
|
19
|
+
//# sourceMappingURL=user.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/widget-type.ts
|
|
17
17
|
var widget_type_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(widget_type_exports);
|
|
19
|
-
//# sourceMappingURL=widget-type.
|
|
19
|
+
//# sourceMappingURL=widget-type.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/widget.ts
|
|
17
17
|
var widget_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(widget_exports);
|
|
19
|
-
//# sourceMappingURL=widget.
|
|
19
|
+
//# sourceMappingURL=widget.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/wp-template-part.ts
|
|
17
17
|
var wp_template_part_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(wp_template_part_exports);
|
|
19
|
-
//# sourceMappingURL=wp-template-part.
|
|
19
|
+
//# sourceMappingURL=wp-template-part.cjs.map
|
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/wp-template.ts
|
|
17
17
|
var wp_template_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(wp_template_exports);
|
|
19
|
-
//# sourceMappingURL=wp-template.
|
|
19
|
+
//# sourceMappingURL=wp-template.cjs.map
|
|
@@ -37,8 +37,8 @@ __export(fetch_exports, {
|
|
|
37
37
|
module.exports = __toCommonJS(fetch_exports);
|
|
38
38
|
var import_change_case = require("change-case");
|
|
39
39
|
var import_api_fetch = __toESM(require("@wordpress/api-fetch"));
|
|
40
|
-
var import_experimental_fetch_link_suggestions = __toESM(require("./__experimental-fetch-link-suggestions"));
|
|
41
|
-
var import_experimental_fetch_url_data = __toESM(require("./__experimental-fetch-url-data"));
|
|
40
|
+
var import_experimental_fetch_link_suggestions = __toESM(require("./__experimental-fetch-link-suggestions.cjs"));
|
|
41
|
+
var import_experimental_fetch_url_data = __toESM(require("./__experimental-fetch-url-data.cjs"));
|
|
42
42
|
async function fetchBlockPatterns() {
|
|
43
43
|
const restPatterns = await (0, import_api_fetch.default)({
|
|
44
44
|
path: "/wp/v2/block-patterns/patterns"
|
|
@@ -61,4 +61,4 @@ async function fetchBlockPatterns() {
|
|
|
61
61
|
__experimentalFetchUrlData,
|
|
62
62
|
fetchBlockPatterns
|
|
63
63
|
});
|
|
64
|
-
//# sourceMappingURL=index.
|
|
64
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -33,7 +33,7 @@ __export(get_footnotes_order_exports, {
|
|
|
33
33
|
default: () => getFootnotesOrder
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(get_footnotes_order_exports);
|
|
36
|
-
var import_get_rich_text_values_cached = __toESM(require("./get-rich-text-values-cached"));
|
|
36
|
+
var import_get_rich_text_values_cached = __toESM(require("./get-rich-text-values-cached.cjs"));
|
|
37
37
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
38
38
|
function getBlockFootnotesOrder(block) {
|
|
39
39
|
if (!cache.has(block)) {
|
|
@@ -55,4 +55,4 @@ function getBlockFootnotesOrder(block) {
|
|
|
55
55
|
function getFootnotesOrder(blocks) {
|
|
56
56
|
return blocks.flatMap(getBlockFootnotesOrder);
|
|
57
57
|
}
|
|
58
|
-
//# sourceMappingURL=get-footnotes-order.
|
|
58
|
+
//# sourceMappingURL=get-footnotes-order.cjs.map
|
|
@@ -24,7 +24,7 @@ __export(get_rich_text_values_cached_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(get_rich_text_values_cached_exports);
|
|
26
26
|
var import_block_editor = require("@wordpress/block-editor");
|
|
27
|
-
var import_lock_unlock = require("../lock-unlock");
|
|
27
|
+
var import_lock_unlock = require("../lock-unlock.cjs");
|
|
28
28
|
var unlockedApis;
|
|
29
29
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
30
30
|
function getRichTextValuesCached(block) {
|
|
@@ -37,4 +37,4 @@ function getRichTextValuesCached(block) {
|
|
|
37
37
|
}
|
|
38
38
|
return cache.get(block);
|
|
39
39
|
}
|
|
40
|
-
//# sourceMappingURL=get-rich-text-values-cached.
|
|
40
|
+
//# sourceMappingURL=get-rich-text-values-cached.cjs.map
|
|
@@ -34,7 +34,7 @@ __export(footnotes_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(footnotes_exports);
|
|
36
36
|
var import_rich_text = require("@wordpress/rich-text");
|
|
37
|
-
var import_get_footnotes_order = __toESM(require("./get-footnotes-order"));
|
|
37
|
+
var import_get_footnotes_order = __toESM(require("./get-footnotes-order.cjs"));
|
|
38
38
|
var oldFootnotes = {};
|
|
39
39
|
function updateFootnotesFromMeta(blocks, meta) {
|
|
40
40
|
const output = { blocks };
|
|
@@ -131,4 +131,4 @@ function updateFootnotesFromMeta(blocks, meta) {
|
|
|
131
131
|
0 && (module.exports = {
|
|
132
132
|
updateFootnotesFromMeta
|
|
133
133
|
});
|
|
134
|
-
//# sourceMappingURL=index.
|
|
134
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -41,12 +41,12 @@ __export(hooks_exports, {
|
|
|
41
41
|
useResourcePermissions: () => import_use_resource_permissions.default
|
|
42
42
|
});
|
|
43
43
|
module.exports = __toCommonJS(hooks_exports);
|
|
44
|
-
var import_use_entity_record = __toESM(require("./use-entity-record"));
|
|
45
|
-
var import_use_entity_records = __toESM(require("./use-entity-records"));
|
|
46
|
-
var import_use_resource_permissions = __toESM(require("./use-resource-permissions"));
|
|
47
|
-
var import_use_entity_block_editor = __toESM(require("./use-entity-block-editor"));
|
|
48
|
-
var import_use_entity_id = __toESM(require("./use-entity-id"));
|
|
49
|
-
var import_use_entity_prop = __toESM(require("./use-entity-prop"));
|
|
44
|
+
var import_use_entity_record = __toESM(require("./use-entity-record.cjs"));
|
|
45
|
+
var import_use_entity_records = __toESM(require("./use-entity-records.cjs"));
|
|
46
|
+
var import_use_resource_permissions = __toESM(require("./use-resource-permissions.cjs"));
|
|
47
|
+
var import_use_entity_block_editor = __toESM(require("./use-entity-block-editor.cjs"));
|
|
48
|
+
var import_use_entity_id = __toESM(require("./use-entity-id.cjs"));
|
|
49
|
+
var import_use_entity_prop = __toESM(require("./use-entity-prop.cjs"));
|
|
50
50
|
// Annotate the CommonJS export names for ESM import in node:
|
|
51
51
|
0 && (module.exports = {
|
|
52
52
|
__experimentalUseEntityRecord,
|
|
@@ -59,4 +59,4 @@ var import_use_entity_prop = __toESM(require("./use-entity-prop"));
|
|
|
59
59
|
useEntityRecords,
|
|
60
60
|
useResourcePermissions
|
|
61
61
|
});
|
|
62
|
-
//# sourceMappingURL=index.
|
|
62
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -36,9 +36,9 @@ module.exports = __toCommonJS(use_entity_block_editor_exports);
|
|
|
36
36
|
var import_element = require("@wordpress/element");
|
|
37
37
|
var import_data = require("@wordpress/data");
|
|
38
38
|
var import_blocks = require("@wordpress/blocks");
|
|
39
|
-
var import_name = require("../name");
|
|
40
|
-
var import_use_entity_id = __toESM(require("./use-entity-id"));
|
|
41
|
-
var import_footnotes = require("../footnotes");
|
|
39
|
+
var import_name = require("../name.cjs");
|
|
40
|
+
var import_use_entity_id = __toESM(require("./use-entity-id.cjs"));
|
|
41
|
+
var import_footnotes = require("../footnotes/index.cjs");
|
|
42
42
|
var EMPTY_ARRAY = [];
|
|
43
43
|
var parsedBlocksCache = /* @__PURE__ */ new WeakMap();
|
|
44
44
|
function useEntityBlockEditor(kind, name, { id: _id } = {}) {
|
|
@@ -130,4 +130,4 @@ function useEntityBlockEditor(kind, name, { id: _id } = {}) {
|
|
|
130
130
|
);
|
|
131
131
|
return [blocks, onInput, onChange];
|
|
132
132
|
}
|
|
133
|
-
//# sourceMappingURL=use-entity-block-editor.
|
|
133
|
+
//# sourceMappingURL=use-entity-block-editor.cjs.map
|
|
@@ -24,9 +24,9 @@ __export(use_entity_id_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(use_entity_id_exports);
|
|
26
26
|
var import_element = require("@wordpress/element");
|
|
27
|
-
var import_entity_context = require("../entity-context");
|
|
27
|
+
var import_entity_context = require("../entity-context.cjs");
|
|
28
28
|
function useEntityId(kind, name) {
|
|
29
29
|
const context = (0, import_element.useContext)(import_entity_context.EntityContext);
|
|
30
30
|
return context?.[kind]?.[name];
|
|
31
31
|
}
|
|
32
|
-
//# sourceMappingURL=use-entity-id.
|
|
32
|
+
//# sourceMappingURL=use-entity-id.cjs.map
|
|
@@ -35,8 +35,8 @@ __export(use_entity_prop_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(use_entity_prop_exports);
|
|
36
36
|
var import_element = require("@wordpress/element");
|
|
37
37
|
var import_data = require("@wordpress/data");
|
|
38
|
-
var import_name = require("../name");
|
|
39
|
-
var import_use_entity_id = __toESM(require("./use-entity-id"));
|
|
38
|
+
var import_name = require("../name.cjs");
|
|
39
|
+
var import_use_entity_id = __toESM(require("./use-entity-id.cjs"));
|
|
40
40
|
function useEntityProp(kind, name, prop, _id) {
|
|
41
41
|
const providerId = (0, import_use_entity_id.default)(kind, name);
|
|
42
42
|
const id = _id ?? providerId;
|
|
@@ -63,4 +63,4 @@ function useEntityProp(kind, name, prop, _id) {
|
|
|
63
63
|
);
|
|
64
64
|
return [value, setValue, fullValue];
|
|
65
65
|
}
|
|
66
|
-
//# sourceMappingURL=use-entity-prop.
|
|
66
|
+
//# sourceMappingURL=use-entity-prop.cjs.map
|
|
@@ -37,8 +37,8 @@ module.exports = __toCommonJS(use_entity_record_exports);
|
|
|
37
37
|
var import_data = require("@wordpress/data");
|
|
38
38
|
var import_deprecated = __toESM(require("@wordpress/deprecated"));
|
|
39
39
|
var import_element = require("@wordpress/element");
|
|
40
|
-
var import_use_query_select = __toESM(require("./use-query-select"));
|
|
41
|
-
var import__ = require("../");
|
|
40
|
+
var import_use_query_select = __toESM(require("./use-query-select.cjs"));
|
|
41
|
+
var import__ = require("../index.cjs");
|
|
42
42
|
var EMPTY_OBJECT = {};
|
|
43
43
|
function useEntityRecord(kind, name, recordId, options = { enabled: true }) {
|
|
44
44
|
const { editEntityRecord, saveEditedEntityRecord } = (0, import_data.useDispatch)(import__.store);
|
|
@@ -112,4 +112,4 @@ function __experimentalUseEntityRecord(kind, name, recordId, options) {
|
|
|
112
112
|
0 && (module.exports = {
|
|
113
113
|
__experimentalUseEntityRecord
|
|
114
114
|
});
|
|
115
|
-
//# sourceMappingURL=use-entity-record.
|
|
115
|
+
//# sourceMappingURL=use-entity-record.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/hooks/use-entity-record.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport useQuerySelect from './use-query-select';\nimport { store as coreStore } from '../';\nimport type { Status } from './constants';\n\nexport interface EntityRecordResolution< RecordType > {\n\t/** The requested entity record */\n\trecord: RecordType | null;\n\n\t/** The edited entity record */\n\teditedRecord: Partial< RecordType >;\n\n\t/** The edits to the edited entity record */\n\tedits: Partial< RecordType >;\n\n\t/** Apply local (in-browser) edits to the edited entity record */\n\tedit: ( diff: Partial< RecordType > ) => void;\n\n\t/** Persist the edits to the server */\n\tsave: () => Promise< void >;\n\n\t/**\n\t * Is the record still being resolved?\n\t */\n\tisResolving: boolean;\n\n\t/**\n\t * Does the record have any local edits?\n\t */\n\thasEdits: boolean;\n\n\t/**\n\t * Is the record resolved by now?\n\t */\n\thasResolved: boolean;\n\n\t/** Resolution status */\n\tstatus: Status;\n}\n\nexport interface Options {\n\t/**\n\t * Whether to run the query or short-circuit and return null.\n\t *\n\t * @default true\n\t */\n\tenabled: boolean;\n}\n\nconst EMPTY_OBJECT = {};\n\n/**\n * Resolves the specified entity record.\n *\n * @since 6.1.0 Introduced in WordPress core.\n *\n * @param kind Kind of the entity, e.g. `root` or a `postType`. See rootEntitiesConfig in ../entities.ts for a list of available kinds.\n * @param name Name of the entity, e.g. `plugin` or a `post`. See rootEntitiesConfig in ../entities.ts for a list of available names.\n * @param recordId ID of the requested entity record.\n * @param options Optional hook options.\n * @example\n * ```js\n * import { useEntityRecord } from '@wordpress/core-data';\n *\n * function PageTitleDisplay( { id } ) {\n * const { record, isResolving } = useEntityRecord( 'postType', 'page', id );\n *\n * if ( isResolving ) {\n * return 'Loading...';\n * }\n *\n * return record.title;\n * }\n *\n * // Rendered in the application:\n * // <PageTitleDisplay id={ 1 } />\n * ```\n *\n * In the above example, when `PageTitleDisplay` is rendered into an\n * application, the page and the resolution details will be retrieved from\n * the store state using `getEntityRecord()`, or resolved if missing.\n *\n * @example\n * ```js\n * import { useCallback } from 'react';\n * import { useDispatch } from '@wordpress/data';\n * import { __ } from '@wordpress/i18n';\n * import { TextControl } from '@wordpress/components';\n * import { store as noticeStore } from '@wordpress/notices';\n * import { useEntityRecord } from '@wordpress/core-data';\n *\n * function PageRenameForm( { id } ) {\n * \tconst page = useEntityRecord( 'postType', 'page', id );\n * \tconst { createSuccessNotice, createErrorNotice } =\n * \t\tuseDispatch( noticeStore );\n *\n * \tconst setTitle = useCallback( ( title ) => {\n * \t\tpage.edit( { title } );\n * \t}, [ page.edit ] );\n *\n * \tif ( page.isResolving ) {\n * \t\treturn 'Loading...';\n * \t}\n *\n * \tasync function onRename( event ) {\n * \t\tevent.preventDefault();\n * \t\ttry {\n * \t\t\tawait page.save();\n * \t\t\tcreateSuccessNotice( __( 'Page renamed.' ), {\n * \t\t\t\ttype: 'snackbar',\n * \t\t\t} );\n * \t\t} catch ( error ) {\n * \t\t\tcreateErrorNotice( error.message, { type: 'snackbar' } );\n * \t\t}\n * \t}\n *\n * \treturn (\n * \t\t<form onSubmit={ onRename }>\n * \t\t\t<TextControl\n *\t\t\t\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAuC;AACvC,wBAAuB;AACvB,qBAAwB;AAKxB,8BAA2B;AAC3B,eAAmC;AA+CnC,IAAM,eAAe,CAAC;
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport useQuerySelect from './use-query-select';\nimport { store as coreStore } from '../';\nimport type { Status } from './constants';\n\nexport interface EntityRecordResolution< RecordType > {\n\t/** The requested entity record */\n\trecord: RecordType | null;\n\n\t/** The edited entity record */\n\teditedRecord: Partial< RecordType >;\n\n\t/** The edits to the edited entity record */\n\tedits: Partial< RecordType >;\n\n\t/** Apply local (in-browser) edits to the edited entity record */\n\tedit: ( diff: Partial< RecordType > ) => void;\n\n\t/** Persist the edits to the server */\n\tsave: () => Promise< void >;\n\n\t/**\n\t * Is the record still being resolved?\n\t */\n\tisResolving: boolean;\n\n\t/**\n\t * Does the record have any local edits?\n\t */\n\thasEdits: boolean;\n\n\t/**\n\t * Is the record resolved by now?\n\t */\n\thasResolved: boolean;\n\n\t/** Resolution status */\n\tstatus: Status;\n}\n\nexport interface Options {\n\t/**\n\t * Whether to run the query or short-circuit and return null.\n\t *\n\t * @default true\n\t */\n\tenabled: boolean;\n}\n\nconst EMPTY_OBJECT = {};\n\n/**\n * Resolves the specified entity record.\n *\n * @since 6.1.0 Introduced in WordPress core.\n *\n * @param kind Kind of the entity, e.g. `root` or a `postType`. See rootEntitiesConfig in ../entities.ts for a list of available kinds.\n * @param name Name of the entity, e.g. `plugin` or a `post`. See rootEntitiesConfig in ../entities.ts for a list of available names.\n * @param recordId ID of the requested entity record.\n * @param options Optional hook options.\n * @example\n * ```js\n * import { useEntityRecord } from '@wordpress/core-data';\n *\n * function PageTitleDisplay( { id } ) {\n * const { record, isResolving } = useEntityRecord( 'postType', 'page', id );\n *\n * if ( isResolving ) {\n * return 'Loading...';\n * }\n *\n * return record.title;\n * }\n *\n * // Rendered in the application:\n * // <PageTitleDisplay id={ 1 } />\n * ```\n *\n * In the above example, when `PageTitleDisplay` is rendered into an\n * application, the page and the resolution details will be retrieved from\n * the store state using `getEntityRecord()`, or resolved if missing.\n *\n * @example\n * ```js\n * import { useCallback } from 'react';\n * import { useDispatch } from '@wordpress/data';\n * import { __ } from '@wordpress/i18n';\n * import { TextControl } from '@wordpress/components';\n * import { store as noticeStore } from '@wordpress/notices';\n * import { useEntityRecord } from '@wordpress/core-data';\n *\n * function PageRenameForm( { id } ) {\n * \tconst page = useEntityRecord( 'postType', 'page', id );\n * \tconst { createSuccessNotice, createErrorNotice } =\n * \t\tuseDispatch( noticeStore );\n *\n * \tconst setTitle = useCallback( ( title ) => {\n * \t\tpage.edit( { title } );\n * \t}, [ page.edit ] );\n *\n * \tif ( page.isResolving ) {\n * \t\treturn 'Loading...';\n * \t}\n *\n * \tasync function onRename( event ) {\n * \t\tevent.preventDefault();\n * \t\ttry {\n * \t\t\tawait page.save();\n * \t\t\tcreateSuccessNotice( __( 'Page renamed.' ), {\n * \t\t\t\ttype: 'snackbar',\n * \t\t\t} );\n * \t\t} catch ( error ) {\n * \t\t\tcreateErrorNotice( error.message, { type: 'snackbar' } );\n * \t\t}\n * \t}\n *\n * \treturn (\n * \t\t<form onSubmit={ onRename }>\n * \t\t\t<TextControl\n *\t\t\t\t__next40pxDefaultSize\n * \t\t\t\tlabel={ __( 'Name' ) }\n * \t\t\t\tvalue={ page.editedRecord.title }\n * \t\t\t\tonChange={ setTitle }\n * \t\t\t/>\n * \t\t\t<button type=\"submit\">{ __( 'Save' ) }</button>\n * \t\t</form>\n * \t);\n * }\n *\n * // Rendered in the application:\n * // <PageRenameForm id={ 1 } />\n * ```\n *\n * In the above example, updating and saving the page title is handled\n * via the `edit()` and `save()` mutation helpers provided by\n * `useEntityRecord()`;\n *\n * @return Entity record data.\n * @template RecordType\n */\nexport default function useEntityRecord< RecordType >(\n\tkind: string,\n\tname: string,\n\trecordId: string | number,\n\toptions: Options = { enabled: true }\n): EntityRecordResolution< RecordType > {\n\tconst { editEntityRecord, saveEditedEntityRecord } =\n\t\tuseDispatch( coreStore );\n\n\tconst mutations = useMemo(\n\t\t() => ( {\n\t\t\tedit: ( record, editOptions: any = {} ) =>\n\t\t\t\teditEntityRecord( kind, name, recordId, record, editOptions ),\n\t\t\tsave: ( saveOptions: any = {} ) =>\n\t\t\t\tsaveEditedEntityRecord( kind, name, recordId, {\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t\t...saveOptions,\n\t\t\t\t} ),\n\t\t} ),\n\t\t[ editEntityRecord, kind, name, recordId, saveEditedEntityRecord ]\n\t);\n\n\tconst { editedRecord, hasEdits, edits } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! options.enabled ) {\n\t\t\t\treturn {\n\t\t\t\t\teditedRecord: EMPTY_OBJECT,\n\t\t\t\t\thasEdits: false,\n\t\t\t\t\tedits: EMPTY_OBJECT,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\teditedRecord: select( coreStore ).getEditedEntityRecord(\n\t\t\t\t\tkind,\n\t\t\t\t\tname,\n\t\t\t\t\trecordId\n\t\t\t\t),\n\t\t\t\thasEdits: select( coreStore ).hasEditsForEntityRecord(\n\t\t\t\t\tkind,\n\t\t\t\t\tname,\n\t\t\t\t\trecordId\n\t\t\t\t),\n\t\t\t\tedits: select( coreStore ).getEntityRecordNonTransientEdits(\n\t\t\t\t\tkind,\n\t\t\t\t\tname,\n\t\t\t\t\trecordId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ kind, name, recordId, options.enabled ]\n\t);\n\n\tconst { data: record, ...querySelectRest } = useQuerySelect(\n\t\t( query ) => {\n\t\t\tif ( ! options.enabled ) {\n\t\t\t\treturn {\n\t\t\t\t\tdata: null,\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn query( coreStore ).getEntityRecord( kind, name, recordId );\n\t\t},\n\t\t[ kind, name, recordId, options.enabled ]\n\t);\n\n\treturn {\n\t\trecord,\n\t\teditedRecord,\n\t\thasEdits,\n\t\tedits,\n\t\t...querySelectRest,\n\t\t...mutations,\n\t};\n}\n\nexport function __experimentalUseEntityRecord(\n\tkind: string,\n\tname: string,\n\trecordId: any,\n\toptions: any\n) {\n\tdeprecated( `wp.data.__experimentalUseEntityRecord`, {\n\t\talternative: 'wp.data.useEntityRecord',\n\t\tsince: '6.1',\n\t} );\n\treturn useEntityRecord( kind, name, recordId, options );\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAuC;AACvC,wBAAuB;AACvB,qBAAwB;AAKxB,8BAA2B;AAC3B,eAAmC;AA+CnC,IAAM,eAAe,CAAC;AA2FP,SAAR,gBACN,MACA,MACA,UACA,UAAmB,EAAE,SAAS,KAAK,GACI;AACvC,QAAM,EAAE,kBAAkB,uBAAuB,QAChD,yBAAa,SAAAA,KAAU;AAExB,QAAM,gBAAY;AAAA,IACjB,OAAQ;AAAA,MACP,MAAM,CAAEC,SAAQ,cAAmB,CAAC,MACnC,iBAAkB,MAAM,MAAM,UAAUA,SAAQ,WAAY;AAAA,MAC7D,MAAM,CAAE,cAAmB,CAAC,MAC3B,uBAAwB,MAAM,MAAM,UAAU;AAAA,QAC7C,cAAc;AAAA,QACd,GAAG;AAAA,MACJ,CAAE;AAAA,IACJ;AAAA,IACA,CAAE,kBAAkB,MAAM,MAAM,UAAU,sBAAuB;AAAA,EAClE;AAEA,QAAM,EAAE,cAAc,UAAU,MAAM,QAAI;AAAA,IACzC,CAAE,WAAY;AACb,UAAK,CAAE,QAAQ,SAAU;AACxB,eAAO;AAAA,UACN,cAAc;AAAA,UACd,UAAU;AAAA,UACV,OAAO;AAAA,QACR;AAAA,MACD;AAEA,aAAO;AAAA,QACN,cAAc,OAAQ,SAAAD,KAAU,EAAE;AAAA,UACjC;AAAA,UACA;AAAA,UACA;AAAA,QACD;AAAA,QACA,UAAU,OAAQ,SAAAA,KAAU,EAAE;AAAA,UAC7B;AAAA,UACA;AAAA,UACA;AAAA,QACD;AAAA,QACA,OAAO,OAAQ,SAAAA,KAAU,EAAE;AAAA,UAC1B;AAAA,UACA;AAAA,UACA;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,IACA,CAAE,MAAM,MAAM,UAAU,QAAQ,OAAQ;AAAA,EACzC;AAEA,QAAM,EAAE,MAAM,QAAQ,GAAG,gBAAgB,QAAI,wBAAAE;AAAA,IAC5C,CAAE,UAAW;AACZ,UAAK,CAAE,QAAQ,SAAU;AACxB,eAAO;AAAA,UACN,MAAM;AAAA,QACP;AAAA,MACD;AACA,aAAO,MAAO,SAAAF,KAAU,EAAE,gBAAiB,MAAM,MAAM,QAAS;AAAA,IACjE;AAAA,IACA,CAAE,MAAM,MAAM,UAAU,QAAQ,OAAQ;AAAA,EACzC;AAEA,SAAO;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,IACH,GAAG;AAAA,EACJ;AACD;AAEO,SAAS,8BACf,MACA,MACA,UACA,SACC;AACD,wBAAAG,SAAY,yCAAyC;AAAA,IACpD,aAAa;AAAA,IACb,OAAO;AAAA,EACR,CAAE;AACF,SAAO,gBAAiB,MAAM,MAAM,UAAU,OAAQ;AACvD;",
|
|
6
6
|
"names": ["coreStore", "record", "useQuerySelect", "deprecated"]
|
|
7
7
|
}
|
|
@@ -39,10 +39,10 @@ var import_url = require("@wordpress/url");
|
|
|
39
39
|
var import_deprecated = __toESM(require("@wordpress/deprecated"));
|
|
40
40
|
var import_data = require("@wordpress/data");
|
|
41
41
|
var import_element = require("@wordpress/element");
|
|
42
|
-
var import_use_query_select = __toESM(require("./use-query-select"));
|
|
43
|
-
var import__ = require("../");
|
|
44
|
-
var import_lock_unlock = require("../lock-unlock");
|
|
45
|
-
var import_utils = require("../utils");
|
|
42
|
+
var import_use_query_select = __toESM(require("./use-query-select.cjs"));
|
|
43
|
+
var import__ = require("../index.cjs");
|
|
44
|
+
var import_lock_unlock = require("../lock-unlock.cjs");
|
|
45
|
+
var import_utils = require("../utils/index.cjs");
|
|
46
46
|
var EMPTY_ARRAY = [];
|
|
47
47
|
function useEntityRecords(kind, name, queryArgs = {}, options = { enabled: true }) {
|
|
48
48
|
const queryAsString = (0, import_url.addQueryArgs)("", queryArgs);
|
|
@@ -150,4 +150,4 @@ function useEntityRecordsWithPermissions(kind, name, queryArgs = {}, options = {
|
|
|
150
150
|
__experimentalUseEntityRecords,
|
|
151
151
|
useEntityRecordsWithPermissions
|
|
152
152
|
});
|
|
153
|
-
//# sourceMappingURL=use-entity-records.
|
|
153
|
+
//# sourceMappingURL=use-entity-records.cjs.map
|