@wordpress/core-data 7.37.0 → 7.37.1-next.06ee73755.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} +9 -9
- package/build/actions.cjs.map +7 -0
- 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} +5 -5
- package/build/reducer.cjs.map +7 -0
- 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} +2 -2
- package/build/utils/conservative-map-item.cjs.map +7 -0
- package/build/utils/{crdt-blocks.js → crdt-blocks.cjs} +8 -7
- package/build/utils/crdt-blocks.cjs.map +7 -0
- package/build/utils/{crdt.js → crdt.cjs} +5 -5
- package/build/utils/crdt.cjs.map +7 -0
- 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} +9 -9
- package/build-module/actions.mjs.map +7 -0
- 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} +5 -5
- package/build-module/reducer.mjs.map +7 -0
- 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} +2 -2
- package/build-module/utils/conservative-map-item.mjs.map +7 -0
- package/build-module/utils/{crdt-blocks.js → crdt-blocks.mjs} +8 -7
- package/build-module/utils/crdt-blocks.mjs.map +7 -0
- package/build-module/utils/{crdt.js → crdt.mjs} +5 -5
- package/build-module/utils/crdt.mjs.map +7 -0
- 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/actions.js +1 -1
- package/src/hooks/use-entity-record.ts +0 -1
- package/src/reducer.js +1 -1
- package/src/selectors.ts +11 -1
- package/src/utils/conservative-map-item.js +1 -1
- package/src/utils/crdt-blocks.ts +9 -7
- package/src/utils/crdt.ts +4 -4
- package/src/utils/test/crdt-blocks.ts +99 -0
- package/src/utils/test/crdt.ts +42 -3
- package/build/actions.js.map +0 -7
- package/build/reducer.js.map +0 -7
- package/build/utils/conservative-map-item.js.map +0 -7
- package/build/utils/crdt-blocks.js.map +0 -7
- package/build/utils/crdt.js.map +0 -7
- package/build-module/actions.js.map +0 -7
- 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/reducer.js.map +0 -7
- package/build-module/types.js +0 -1
- package/build-module/utils/conservative-map-item.js.map +0 -7
- package/build-module/utils/crdt-blocks.js.map +0 -7
- package/build-module/utils/crdt.js.map +0 -7
- package/tsconfig.json +0 -25
- package/tsconfig.tsbuildinfo +0 -1
- /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/{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/{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/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/{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/{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
|
@@ -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": ";;;;;;;;;;;;;;;;;;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W;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
|
|
@@ -35,8 +35,8 @@ __export(use_query_select_exports, {
|
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(use_query_select_exports);
|
|
37
37
|
var import_data = require("@wordpress/data");
|
|
38
|
-
var import_memoize = __toESM(require("./memoize"));
|
|
39
|
-
var import_constants = require("./constants");
|
|
38
|
+
var import_memoize = __toESM(require("./memoize.cjs"));
|
|
39
|
+
var import_constants = require("./constants.cjs");
|
|
40
40
|
var META_SELECTORS = [
|
|
41
41
|
"getIsResolving",
|
|
42
42
|
"hasStartedResolution",
|
|
@@ -94,4 +94,4 @@ var enrichSelectors = (0, import_memoize.default)(((selectors) => {
|
|
|
94
94
|
0 && (module.exports = {
|
|
95
95
|
META_SELECTORS
|
|
96
96
|
});
|
|
97
|
-
//# sourceMappingURL=use-query-select.
|
|
97
|
+
//# sourceMappingURL=use-query-select.cjs.map
|
|
@@ -36,9 +36,9 @@ __export(use_resource_permissions_exports, {
|
|
|
36
36
|
module.exports = __toCommonJS(use_resource_permissions_exports);
|
|
37
37
|
var import_deprecated = __toESM(require("@wordpress/deprecated"));
|
|
38
38
|
var import_warning = __toESM(require("@wordpress/warning"));
|
|
39
|
-
var import__ = require("../");
|
|
40
|
-
var import_constants = require("./constants");
|
|
41
|
-
var import_use_query_select = __toESM(require("./use-query-select"));
|
|
39
|
+
var import__ = require("../index.cjs");
|
|
40
|
+
var import_constants = require("./constants.cjs");
|
|
41
|
+
var import_use_query_select = __toESM(require("./use-query-select.cjs"));
|
|
42
42
|
function useResourcePermissions(resource, id) {
|
|
43
43
|
const isEntity = typeof resource === "object";
|
|
44
44
|
const resourceAsString = isEntity ? JSON.stringify(resource) : resource;
|
|
@@ -109,4 +109,4 @@ function __experimentalUseResourcePermissions(resource, id) {
|
|
|
109
109
|
0 && (module.exports = {
|
|
110
110
|
__experimentalUseResourcePermissions
|
|
111
111
|
});
|
|
112
|
-
//# sourceMappingURL=use-resource-permissions.
|
|
112
|
+
//# sourceMappingURL=use-resource-permissions.cjs.map
|
|
@@ -36,24 +36,24 @@ __export(index_exports, {
|
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(index_exports);
|
|
38
38
|
var import_data = require("@wordpress/data");
|
|
39
|
-
var import_reducer = __toESM(require("./reducer"));
|
|
40
|
-
var selectors = __toESM(require("./selectors"));
|
|
41
|
-
var privateSelectors = __toESM(require("./private-selectors"));
|
|
42
|
-
var actions = __toESM(require("./actions"));
|
|
43
|
-
var privateActions = __toESM(require("./private-actions"));
|
|
44
|
-
var resolvers = __toESM(require("./resolvers"));
|
|
45
|
-
var import_actions = __toESM(require("./locks/actions"));
|
|
46
|
-
var import_entities = require("./entities");
|
|
47
|
-
var import_name = require("./name");
|
|
48
|
-
var import_lock_unlock = require("./lock-unlock");
|
|
49
|
-
var import_dynamic_entities = require("./dynamic-entities");
|
|
50
|
-
var import_log_entity_deprecation = __toESM(require("./utils/log-entity-deprecation"));
|
|
51
|
-
var import_entity_provider = __toESM(require("./entity-provider"));
|
|
52
|
-
__reExport(index_exports, require("./entity-provider"), module.exports);
|
|
53
|
-
__reExport(index_exports, require("./entity-types"), module.exports);
|
|
54
|
-
__reExport(index_exports, require("./fetch"), module.exports);
|
|
55
|
-
__reExport(index_exports, require("./hooks"), module.exports);
|
|
56
|
-
__reExport(index_exports, require("./private-apis"), module.exports);
|
|
39
|
+
var import_reducer = __toESM(require("./reducer.cjs"));
|
|
40
|
+
var selectors = __toESM(require("./selectors.cjs"));
|
|
41
|
+
var privateSelectors = __toESM(require("./private-selectors.cjs"));
|
|
42
|
+
var actions = __toESM(require("./actions.cjs"));
|
|
43
|
+
var privateActions = __toESM(require("./private-actions.cjs"));
|
|
44
|
+
var resolvers = __toESM(require("./resolvers.cjs"));
|
|
45
|
+
var import_actions = __toESM(require("./locks/actions.cjs"));
|
|
46
|
+
var import_entities = require("./entities.cjs");
|
|
47
|
+
var import_name = require("./name.cjs");
|
|
48
|
+
var import_lock_unlock = require("./lock-unlock.cjs");
|
|
49
|
+
var import_dynamic_entities = require("./dynamic-entities.cjs");
|
|
50
|
+
var import_log_entity_deprecation = __toESM(require("./utils/log-entity-deprecation.cjs"));
|
|
51
|
+
var import_entity_provider = __toESM(require("./entity-provider.cjs"));
|
|
52
|
+
__reExport(index_exports, require("./entity-provider.cjs"), module.exports);
|
|
53
|
+
__reExport(index_exports, require("./entity-types/index.cjs"), module.exports);
|
|
54
|
+
__reExport(index_exports, require("./fetch/index.cjs"), module.exports);
|
|
55
|
+
__reExport(index_exports, require("./hooks/index.cjs"), module.exports);
|
|
56
|
+
__reExport(index_exports, require("./private-apis.cjs"), module.exports);
|
|
57
57
|
var entitiesConfig = [
|
|
58
58
|
...import_entities.rootEntitiesConfig,
|
|
59
59
|
...import_entities.additionalEntityConfigLoaders.filter((config) => !!config.name)
|
|
@@ -146,10 +146,10 @@ var store = (0, import_data.createReduxStore)(import_name.STORE_NAME, storeConfi
|
|
|
146
146
|
0 && (module.exports = {
|
|
147
147
|
EntityProvider,
|
|
148
148
|
store,
|
|
149
|
-
...require("./entity-provider"),
|
|
150
|
-
...require("./entity-types"),
|
|
151
|
-
...require("./fetch"),
|
|
152
|
-
...require("./hooks"),
|
|
153
|
-
...require("./private-apis")
|
|
149
|
+
...require("./entity-provider.cjs"),
|
|
150
|
+
...require("./entity-types/index.cjs"),
|
|
151
|
+
...require("./fetch/index.cjs"),
|
|
152
|
+
...require("./hooks/index.cjs"),
|
|
153
|
+
...require("./private-apis.cjs")
|
|
154
154
|
});
|
|
155
|
-
//# sourceMappingURL=index.
|
|
155
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as selectors from './selectors';\nimport * as privateSelectors from './private-selectors';\nimport * as actions from './actions';\nimport * as privateActions from './private-actions';\nimport * as resolvers from './resolvers';\nimport createLocksActions from './locks/actions';\nimport {\n\trootEntitiesConfig,\n\tadditionalEntityConfigLoaders,\n\tgetMethodName,\n} from './entities';\nimport { STORE_NAME } from './name';\nimport { unlock } from './lock-unlock';\nimport { dynamicActions, dynamicSelectors } from './dynamic-entities';\nimport logEntityDeprecation from './utils/log-entity-deprecation';\n\n// The entity selectors/resolvers and actions are shortcuts to their generic equivalents\n// (getEntityRecord, getEntityRecords, updateEntityRecord, updateEntityRecords)\n// Instead of getEntityRecord, the consumer could use more user-friendly named selector: getPostType, getTaxonomy...\n// The \"kind\" and the \"name\" of the entity are combined to generate these shortcuts.\nconst entitiesConfig = [\n\t...rootEntitiesConfig,\n\t...additionalEntityConfigLoaders.filter( ( config ) => !! config.name ),\n];\n\nconst entitySelectors = entitiesConfig.reduce( ( result, entity ) => {\n\tconst { kind, name, plural } = entity;\n\n\tconst getEntityRecordMethodName = getMethodName( kind, name );\n\tresult[ getEntityRecordMethodName ] = ( state, key, query ) => {\n\t\tlogEntityDeprecation( kind, name, getEntityRecordMethodName, {\n\t\t\tisShorthandSelector: true,\n\t\t\talternativeFunctionName: 'getEntityRecord',\n\t\t} );\n\t\treturn selectors.getEntityRecord( state, kind, name, key, query );\n\t};\n\n\tif ( plural ) {\n\t\tconst getEntityRecordsMethodName = getMethodName( kind, plural, 'get' );\n\t\tresult[ getEntityRecordsMethodName ] = ( state, query ) => {\n\t\t\tlogEntityDeprecation( kind, name, getEntityRecordsMethodName, {\n\t\t\t\tisShorthandSelector: true,\n\t\t\t\talternativeFunctionName: 'getEntityRecords',\n\t\t\t} );\n\t\t\treturn selectors.getEntityRecords( state, kind, name, query );\n\t\t};\n\t}\n\treturn result;\n}, {} );\n\nconst entityResolvers = entitiesConfig.reduce( ( result, entity ) => {\n\tconst { kind, name, plural } = entity;\n\tconst getEntityRecordMethodName = getMethodName( kind, name );\n\tresult[ getEntityRecordMethodName ] = ( key, query ) => {\n\t\tlogEntityDeprecation( kind, name, getEntityRecordMethodName, {\n\t\t\tisShorthandSelector: true,\n\t\t\talternativeFunctionName: 'getEntityRecord',\n\t\t} );\n\t\treturn resolvers.getEntityRecord( kind, name, key, query );\n\t};\n\n\tif ( plural ) {\n\t\tconst getEntityRecordsMethodName = getMethodName( kind, plural, 'get' );\n\t\tresult[ getEntityRecordsMethodName ] = ( ...args ) => {\n\t\t\tlogEntityDeprecation( kind, plural, getEntityRecordsMethodName, {\n\t\t\t\tisShorthandSelector: true,\n\t\t\t\talternativeFunctionName: 'getEntityRecords',\n\t\t\t} );\n\t\t\treturn resolvers.getEntityRecords( kind, name, ...args );\n\t\t};\n\t\tresult[ getEntityRecordsMethodName ].shouldInvalidate = ( action ) =>\n\t\t\tresolvers.getEntityRecords.shouldInvalidate( action, kind, name );\n\t}\n\treturn result;\n}, {} );\n\nconst entityActions = entitiesConfig.reduce( ( result, entity ) => {\n\tconst { kind, name } = entity;\n\n\tconst saveEntityRecordMethodName = getMethodName( kind, name, 'save' );\n\tresult[ saveEntityRecordMethodName ] = ( record, options ) => {\n\t\tlogEntityDeprecation( kind, name, saveEntityRecordMethodName, {\n\t\t\tisShorthandSelector: true,\n\t\t\talternativeFunctionName: 'saveEntityRecord',\n\t\t} );\n\t\treturn actions.saveEntityRecord( kind, name, record, options );\n\t};\n\n\tconst deleteEntityRecordMethodName = getMethodName( kind, name, 'delete' );\n\tresult[ deleteEntityRecordMethodName ] = ( key, query, options ) => {\n\t\tlogEntityDeprecation( kind, name, deleteEntityRecordMethodName, {\n\t\t\tisShorthandSelector: true,\n\t\t\talternativeFunctionName: 'deleteEntityRecord',\n\t\t} );\n\t\treturn actions.deleteEntityRecord( kind, name, key, query, options );\n\t};\n\n\treturn result;\n}, {} );\n\nconst storeConfig = () => ( {\n\treducer,\n\tactions: {\n\t\t...dynamicActions,\n\t\t...actions,\n\t\t...entityActions,\n\t\t...createLocksActions(),\n\t},\n\tselectors: {\n\t\t...dynamicSelectors,\n\t\t...selectors,\n\t\t...entitySelectors,\n\t},\n\tresolvers: { ...resolvers, ...entityResolvers },\n} );\n\n/**\n * Store definition for the code data namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n */\nexport const store = createReduxStore( STORE_NAME, storeConfig() );\nunlock( store ).registerPrivateSelectors( privateSelectors );\nunlock( store ).registerPrivateActions( privateActions );\nregister( store ); // Register store after unlocking private selectors to allow resolvers to use them.\n\nexport { default as EntityProvider } from './entity-provider';\nexport * from './entity-provider';\nexport * from './entity-types';\nexport * from './fetch';\nexport * from './hooks';\nexport * from './private-apis';\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAA2C;AAK3C,qBAAoB;AACpB,gBAA2B;AAC3B,uBAAkC;AAClC,cAAyB;AACzB,qBAAgC;AAChC,gBAA2B;AAC3B,qBAA+B;AAC/B,sBAIO;AACP,kBAA2B;AAC3B,yBAAuB;AACvB,8BAAiD;AACjD,oCAAiC;AAgHjC,6BAA0C;AAC1C,0BAAc,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAA2C;AAK3C,qBAAoB;AACpB,gBAA2B;AAC3B,uBAAkC;AAClC,cAAyB;AACzB,qBAAgC;AAChC,gBAA2B;AAC3B,qBAA+B;AAC/B,sBAIO;AACP,kBAA2B;AAC3B,yBAAuB;AACvB,8BAAiD;AACjD,oCAAiC;AAgHjC,6BAA0C;AAC1C,0BAAc,kCAxId;AAyIA,0BAAc,qCAzId;AA0IA,0BAAc,8BA1Id;AA2IA,0BAAc,8BA3Id;AA4IA,0BAAc,+BA5Id;AA6BA,I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AM,YAAQ,8BAAkB,wBAAY,YAAY,CAAE;AAAA,IACjE,2BAAQ,KAAM,EAAE,yBAA0B,gBAAiB;AAAA,IAC3D,2BAAQ,KAAM,EAAE,uBAAwB,cAAe;AAAA,IACvD,sBAAU,KAAM;",
|
|
6
6
|
"names": ["logEntityDeprecation", "reducer", "createLocksActions"]
|
|
7
7
|
}
|
|
@@ -33,7 +33,7 @@ __export(actions_exports, {
|
|
|
33
33
|
default: () => createLocksActions
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(actions_exports);
|
|
36
|
-
var import_engine = __toESM(require("./engine"));
|
|
36
|
+
var import_engine = __toESM(require("./engine.cjs"));
|
|
37
37
|
function createLocksActions() {
|
|
38
38
|
const locks = (0, import_engine.default)();
|
|
39
39
|
function __unstableAcquireStoreLock(store, path, { exclusive }) {
|
|
@@ -44,4 +44,4 @@ function createLocksActions() {
|
|
|
44
44
|
}
|
|
45
45
|
return { __unstableAcquireStoreLock, __unstableReleaseStoreLock };
|
|
46
46
|
}
|
|
47
|
-
//# sourceMappingURL=actions.
|
|
47
|
+
//# sourceMappingURL=actions.cjs.map
|
|
@@ -33,8 +33,8 @@ __export(engine_exports, {
|
|
|
33
33
|
default: () => createLocks
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(engine_exports);
|
|
36
|
-
var import_reducer = __toESM(require("./reducer"));
|
|
37
|
-
var import_selectors = require("./selectors");
|
|
36
|
+
var import_reducer = __toESM(require("./reducer.cjs"));
|
|
37
|
+
var import_selectors = require("./selectors.cjs");
|
|
38
38
|
function createLocks() {
|
|
39
39
|
let state = (0, import_reducer.default)(void 0, { type: "@@INIT" });
|
|
40
40
|
function processPendingLockRequests() {
|
|
@@ -69,4 +69,4 @@ function createLocks() {
|
|
|
69
69
|
}
|
|
70
70
|
return { acquire, release };
|
|
71
71
|
}
|
|
72
|
-
//# sourceMappingURL=engine.
|
|
72
|
+
//# sourceMappingURL=engine.cjs.map
|
|
@@ -23,7 +23,7 @@ __export(reducer_exports, {
|
|
|
23
23
|
default: () => locks
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(reducer_exports);
|
|
26
|
-
var import_utils = require("./utils");
|
|
26
|
+
var import_utils = require("./utils.cjs");
|
|
27
27
|
var DEFAULT_STATE = {
|
|
28
28
|
requests: [],
|
|
29
29
|
tree: {
|
|
@@ -67,4 +67,4 @@ function locks(state = DEFAULT_STATE, action) {
|
|
|
67
67
|
}
|
|
68
68
|
return state;
|
|
69
69
|
}
|
|
70
|
-
//# sourceMappingURL=reducer.
|
|
70
|
+
//# sourceMappingURL=reducer.cjs.map
|
|
@@ -24,7 +24,7 @@ __export(selectors_exports, {
|
|
|
24
24
|
isLockAvailable: () => isLockAvailable
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(selectors_exports);
|
|
27
|
-
var import_utils = require("./utils");
|
|
27
|
+
var import_utils = require("./utils.cjs");
|
|
28
28
|
function getPendingLockRequests(state) {
|
|
29
29
|
return state.requests;
|
|
30
30
|
}
|
|
@@ -52,4 +52,4 @@ function isLockAvailable(state, store, path, { exclusive }) {
|
|
|
52
52
|
getPendingLockRequests,
|
|
53
53
|
isLockAvailable
|
|
54
54
|
});
|
|
55
|
-
//# sourceMappingURL=selectors.
|
|
55
|
+
//# sourceMappingURL=selectors.cjs.map
|
|
@@ -37,7 +37,7 @@ __export(private_actions_exports, {
|
|
|
37
37
|
});
|
|
38
38
|
module.exports = __toCommonJS(private_actions_exports);
|
|
39
39
|
var import_api_fetch = __toESM(require("@wordpress/api-fetch"));
|
|
40
|
-
var import_name = require("./name");
|
|
40
|
+
var import_name = require("./name.cjs");
|
|
41
41
|
function receiveRegisteredPostMeta(postType, registeredPostMeta) {
|
|
42
42
|
return {
|
|
43
43
|
type: "RECEIVE_REGISTERED_POST_META",
|
|
@@ -132,4 +132,4 @@ function receiveEditorAssets(assets) {
|
|
|
132
132
|
receiveEditorSettings,
|
|
133
133
|
receiveRegisteredPostMeta
|
|
134
134
|
});
|
|
135
|
-
//# sourceMappingURL=private-actions.
|
|
135
|
+
//# sourceMappingURL=private-actions.cjs.map
|
|
@@ -23,9 +23,9 @@ __export(private_apis_exports, {
|
|
|
23
23
|
privateApis: () => privateApis
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(private_apis_exports);
|
|
26
|
-
var import_use_entity_records = require("./hooks/use-entity-records");
|
|
27
|
-
var import_utils = require("./utils");
|
|
28
|
-
var import_lock_unlock = require("./lock-unlock");
|
|
26
|
+
var import_use_entity_records = require("./hooks/use-entity-records.cjs");
|
|
27
|
+
var import_utils = require("./utils/index.cjs");
|
|
28
|
+
var import_lock_unlock = require("./lock-unlock.cjs");
|
|
29
29
|
var privateApis = {};
|
|
30
30
|
(0, import_lock_unlock.lock)(privateApis, {
|
|
31
31
|
useEntityRecordsWithPermissions: import_use_entity_records.useEntityRecordsWithPermissions,
|
|
@@ -35,4 +35,4 @@ var privateApis = {};
|
|
|
35
35
|
0 && (module.exports = {
|
|
36
36
|
privateApis
|
|
37
37
|
});
|
|
38
|
-
//# sourceMappingURL=private-apis.
|
|
38
|
+
//# sourceMappingURL=private-apis.cjs.map
|
|
@@ -44,11 +44,11 @@ __export(private_selectors_exports, {
|
|
|
44
44
|
});
|
|
45
45
|
module.exports = __toCommonJS(private_selectors_exports);
|
|
46
46
|
var import_data = require("@wordpress/data");
|
|
47
|
-
var import_selectors = require("./selectors");
|
|
48
|
-
var import_name = require("./name");
|
|
49
|
-
var import_lock_unlock = require("./lock-unlock");
|
|
50
|
-
var import_sync = require("./sync");
|
|
51
|
-
var import_log_entity_deprecation = __toESM(require("./utils/log-entity-deprecation"));
|
|
47
|
+
var import_selectors = require("./selectors.cjs");
|
|
48
|
+
var import_name = require("./name.cjs");
|
|
49
|
+
var import_lock_unlock = require("./lock-unlock.cjs");
|
|
50
|
+
var import_sync = require("./sync.cjs");
|
|
51
|
+
var import_log_entity_deprecation = __toESM(require("./utils/log-entity-deprecation.cjs"));
|
|
52
52
|
function getUndoManager(state) {
|
|
53
53
|
if (window.__experimentalEnableSync) {
|
|
54
54
|
if (globalThis.IS_GUTENBERG_PLUGIN) {
|
|
@@ -222,4 +222,4 @@ function getEditorAssets(state) {
|
|
|
222
222
|
getTemplateId,
|
|
223
223
|
getUndoManager
|
|
224
224
|
});
|
|
225
|
-
//# sourceMappingURL=private-selectors.
|
|
225
|
+
//# sourceMappingURL=private-selectors.cjs.map
|
|
@@ -25,7 +25,7 @@ __export(get_query_parts_exports, {
|
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(get_query_parts_exports);
|
|
27
27
|
var import_url = require("@wordpress/url");
|
|
28
|
-
var import_utils = require("../utils");
|
|
28
|
+
var import_utils = require("../utils/index.cjs");
|
|
29
29
|
function getQueryParts(query) {
|
|
30
30
|
const parts = {
|
|
31
31
|
stableKey: "",
|
|
@@ -71,4 +71,4 @@ var get_query_parts_default = (0, import_utils.withWeakMapCache)(getQueryParts);
|
|
|
71
71
|
0 && (module.exports = {
|
|
72
72
|
getQueryParts
|
|
73
73
|
});
|
|
74
|
-
//# sourceMappingURL=get-query-parts.
|
|
74
|
+
//# sourceMappingURL=get-query-parts.cjs.map
|
|
@@ -34,13 +34,13 @@ __export(queried_data_exports, {
|
|
|
34
34
|
reducer: () => import_reducer.default
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(queried_data_exports);
|
|
37
|
-
__reExport(queried_data_exports, require("./actions"), module.exports);
|
|
38
|
-
__reExport(queried_data_exports, require("./selectors"), module.exports);
|
|
39
|
-
var import_reducer = __toESM(require("./reducer"));
|
|
37
|
+
__reExport(queried_data_exports, require("./actions.cjs"), module.exports);
|
|
38
|
+
__reExport(queried_data_exports, require("./selectors.cjs"), module.exports);
|
|
39
|
+
var import_reducer = __toESM(require("./reducer.cjs"));
|
|
40
40
|
// Annotate the CommonJS export names for ESM import in node:
|
|
41
41
|
0 && (module.exports = {
|
|
42
42
|
reducer,
|
|
43
|
-
...require("./actions"),
|
|
44
|
-
...require("./selectors")
|
|
43
|
+
...require("./actions.cjs"),
|
|
44
|
+
...require("./selectors.cjs")
|
|
45
45
|
});
|
|
46
|
-
//# sourceMappingURL=index.
|
|
46
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/queried-data/index.js"],
|
|
4
4
|
"sourcesContent": ["export * from './actions';\nexport * from './selectors';\nexport { default as reducer } from './reducer';\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCAAc,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCAAc,0BAAd;AACA,iCAAc,4BADd;AAEA,qBAAmC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -38,9 +38,9 @@ __export(reducer_exports, {
|
|
|
38
38
|
module.exports = __toCommonJS(reducer_exports);
|
|
39
39
|
var import_data = require("@wordpress/data");
|
|
40
40
|
var import_compose = require("@wordpress/compose");
|
|
41
|
-
var import_utils = require("../utils");
|
|
42
|
-
var import_entities = require("../entities");
|
|
43
|
-
var import_get_query_parts = __toESM(require("./get-query-parts"));
|
|
41
|
+
var import_utils = require("../utils/index.cjs");
|
|
42
|
+
var import_entities = require("../entities.cjs");
|
|
43
|
+
var import_get_query_parts = __toESM(require("./get-query-parts.cjs"));
|
|
44
44
|
function getContextFromAction(action) {
|
|
45
45
|
const { query } = action;
|
|
46
46
|
if (!query) {
|
|
@@ -214,4 +214,4 @@ var reducer_default = (0, import_data.combineReducers)({
|
|
|
214
214
|
itemIsComplete,
|
|
215
215
|
items
|
|
216
216
|
});
|
|
217
|
-
//# sourceMappingURL=reducer.
|
|
217
|
+
//# sourceMappingURL=reducer.cjs.map
|
|
@@ -37,8 +37,8 @@ __export(selectors_exports, {
|
|
|
37
37
|
module.exports = __toCommonJS(selectors_exports);
|
|
38
38
|
var import_equivalent_key_map = __toESM(require("equivalent-key-map"));
|
|
39
39
|
var import_data = require("@wordpress/data");
|
|
40
|
-
var import_get_query_parts = __toESM(require("./get-query-parts"));
|
|
41
|
-
var import_utils = require("../utils");
|
|
40
|
+
var import_get_query_parts = __toESM(require("./get-query-parts.cjs"));
|
|
41
|
+
var import_utils = require("../utils/index.cjs");
|
|
42
42
|
var queriedItemsCacheByState = /* @__PURE__ */ new WeakMap();
|
|
43
43
|
function getQueriedItemsUncached(state, query) {
|
|
44
44
|
const { stableKey, page, perPage, include, fields, context } = (0, import_get_query_parts.default)(query);
|
|
@@ -114,4 +114,4 @@ function getQueriedTotalPages(state, query = {}) {
|
|
|
114
114
|
getQueriedTotalItems,
|
|
115
115
|
getQueriedTotalPages
|
|
116
116
|
});
|
|
117
|
-
//# sourceMappingURL=selectors.
|
|
117
|
+
//# sourceMappingURL=selectors.cjs.map
|
|
@@ -55,13 +55,13 @@ __export(reducer_exports, {
|
|
|
55
55
|
users: () => users
|
|
56
56
|
});
|
|
57
57
|
module.exports = __toCommonJS(reducer_exports);
|
|
58
|
-
var import_es6 = __toESM(require("fast-deep-equal/es6"));
|
|
58
|
+
var import_es6 = __toESM(require("fast-deep-equal/es6/index.js"));
|
|
59
59
|
var import_compose = require("@wordpress/compose");
|
|
60
60
|
var import_data = require("@wordpress/data");
|
|
61
61
|
var import_undo_manager = require("@wordpress/undo-manager");
|
|
62
|
-
var import_utils = require("./utils");
|
|
63
|
-
var import_queried_data = require("./queried-data");
|
|
64
|
-
var import_entities = require("./entities");
|
|
62
|
+
var import_utils = require("./utils/index.cjs");
|
|
63
|
+
var import_queried_data = require("./queried-data/index.cjs");
|
|
64
|
+
var import_entities = require("./entities.cjs");
|
|
65
65
|
function users(state = { byId: {}, queries: {} }, action) {
|
|
66
66
|
switch (action.type) {
|
|
67
67
|
case "RECEIVE_USER_QUERY":
|
|
@@ -502,4 +502,4 @@ var reducer_default = (0, import_data.combineReducers)({
|
|
|
502
502
|
userPermissions,
|
|
503
503
|
users
|
|
504
504
|
});
|
|
505
|
-
//# sourceMappingURL=reducer.
|
|
505
|
+
//# sourceMappingURL=reducer.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/reducer.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6/index.js';\n\n/**\n * WordPress dependencies\n */\nimport { compose } from '@wordpress/compose';\nimport { combineReducers } from '@wordpress/data';\nimport { createUndoManager } from '@wordpress/undo-manager';\n\n/**\n * Internal dependencies\n */\nimport { ifMatchingAction, replaceAction } from './utils';\nimport { reducer as queriedDataReducer } from './queried-data';\nimport { rootEntitiesConfig, DEFAULT_ENTITY_KEY } from './entities';\n\n/** @typedef {import('./types').AnyFunction} AnyFunction */\n\n/**\n * Reducer managing authors state. Keyed by id.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function users( state = { byId: {}, queries: {} }, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_USER_QUERY':\n\t\t\treturn {\n\t\t\t\tbyId: {\n\t\t\t\t\t...state.byId,\n\t\t\t\t\t// Key users by their ID.\n\t\t\t\t\t...action.users.reduce(\n\t\t\t\t\t\t( newUsers, user ) => ( {\n\t\t\t\t\t\t\t...newUsers,\n\t\t\t\t\t\t\t[ user.id ]: user,\n\t\t\t\t\t\t} ),\n\t\t\t\t\t\t{}\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\tqueries: {\n\t\t\t\t\t...state.queries,\n\t\t\t\t\t[ action.queryID ]: action.users.map( ( user ) => user.id ),\n\t\t\t\t},\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer managing current user state.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function currentUser( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_CURRENT_USER':\n\t\t\treturn action.currentUser;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer managing the current theme.\n *\n * @param {string|undefined} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {string|undefined} Updated state.\n */\nexport function currentTheme( state = undefined, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_CURRENT_THEME':\n\t\t\treturn action.currentTheme.stylesheet;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer managing the current global styles id.\n *\n * @param {string|undefined} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {string|undefined} Updated state.\n */\nexport function currentGlobalStylesId( state = undefined, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_CURRENT_GLOBAL_STYLES_ID':\n\t\t\treturn action.id;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer managing the theme base global styles.\n *\n * @param {Record<string, object>} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Record<string, object>} Updated state.\n */\nexport function themeBaseGlobalStyles( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_THEME_GLOBAL_STYLES':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.stylesheet ]: action.globalStyles,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer managing the theme global styles variations.\n *\n * @param {Record<string, object>} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Record<string, object>} Updated state.\n */\nexport function themeGlobalStyleVariations( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.stylesheet ]: action.variations,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\nconst withMultiEntityRecordEdits = ( reducer ) => ( state, action ) => {\n\tif ( action.type === 'UNDO' || action.type === 'REDO' ) {\n\t\tconst { record } = action;\n\n\t\tlet newState = state;\n\t\trecord.forEach( ( { id: { kind, name, recordId }, changes } ) => {\n\t\t\tnewState = reducer( newState, {\n\t\t\t\ttype: 'EDIT_ENTITY_RECORD',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\tedits: Object.entries( changes ).reduce(\n\t\t\t\t\t( acc, [ key, value ] ) => {\n\t\t\t\t\t\tacc[ key ] =\n\t\t\t\t\t\t\taction.type === 'UNDO' ? value.from : value.to;\n\t\t\t\t\t\treturn acc;\n\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 newState;\n\t}\n\n\treturn reducer( state, action );\n};\n\n/**\n * Higher Order Reducer for a given entity config. It supports:\n *\n * - Fetching\n * - Editing\n * - Saving\n *\n * @param {Object} entityConfig Entity config.\n *\n * @return {AnyFunction} Reducer.\n */\nfunction entity( entityConfig ) {\n\treturn compose( [\n\t\twithMultiEntityRecordEdits,\n\n\t\t// Limit to matching action type so we don't attempt to replace action on\n\t\t// an unhandled action.\n\t\tifMatchingAction(\n\t\t\t( action ) =>\n\t\t\t\taction.name &&\n\t\t\t\taction.kind &&\n\t\t\t\taction.name === entityConfig.name &&\n\t\t\t\taction.kind === entityConfig.kind\n\t\t),\n\n\t\t// Inject the entity config into the action.\n\t\treplaceAction( ( action ) => {\n\t\t\treturn {\n\t\t\t\tkey: entityConfig.key || DEFAULT_ENTITY_KEY,\n\t\t\t\t...action,\n\t\t\t};\n\t\t} ),\n\t] )(\n\t\tcombineReducers( {\n\t\t\tqueriedData: queriedDataReducer,\n\t\t\tedits: ( state = {}, action ) => {\n\t\t\t\tswitch ( action.type ) {\n\t\t\t\t\tcase 'RECEIVE_ITEMS':\n\t\t\t\t\t\tconst context = action?.query?.context ?? 'default';\n\t\t\t\t\t\tif ( context !== 'default' ) {\n\t\t\t\t\t\t\treturn state;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst nextState = { ...state };\n\n\t\t\t\t\t\tfor ( const record of action.items ) {\n\t\t\t\t\t\t\tconst recordId = record?.[ action.key ];\n\t\t\t\t\t\t\tconst edits = nextState[ recordId ];\n\t\t\t\t\t\t\tif ( ! edits ) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst nextEdits = Object.keys( edits ).reduce(\n\t\t\t\t\t\t\t\t( acc, key ) => {\n\t\t\t\t\t\t\t\t\t// If the edited value is still different to the persisted value,\n\t\t\t\t\t\t\t\t\t// keep the edited value in edits.\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t// Edits are the \"raw\" attribute values, but records may have\n\t\t\t\t\t\t\t\t\t\t// objects with more properties, so we use `get` here for the\n\t\t\t\t\t\t\t\t\t\t// comparison.\n\t\t\t\t\t\t\t\t\t\t! fastDeepEqual(\n\t\t\t\t\t\t\t\t\t\t\tedits[ key ],\n\t\t\t\t\t\t\t\t\t\t\trecord[ key ]?.raw ?? record[ key ]\n\t\t\t\t\t\t\t\t\t\t) &&\n\t\t\t\t\t\t\t\t\t\t// Sometimes the server alters the sent value which means\n\t\t\t\t\t\t\t\t\t\t// we need to also remove the edits before the api request.\n\t\t\t\t\t\t\t\t\t\t( ! action.persistedEdits ||\n\t\t\t\t\t\t\t\t\t\t\t! fastDeepEqual(\n\t\t\t\t\t\t\t\t\t\t\t\tedits[ key ],\n\t\t\t\t\t\t\t\t\t\t\t\taction.persistedEdits[ key ]\n\t\t\t\t\t\t\t\t\t\t\t) )\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\tacc[ key ] = edits[ key ];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{}\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif ( Object.keys( nextEdits ).length ) {\n\t\t\t\t\t\t\t\tnextState[ recordId ] = nextEdits;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdelete nextState[ recordId ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn nextState;\n\n\t\t\t\t\tcase 'EDIT_ENTITY_RECORD':\n\t\t\t\t\t\tconst nextEdits = {\n\t\t\t\t\t\t\t...state[ action.recordId ],\n\t\t\t\t\t\t\t...action.edits,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tObject.keys( nextEdits ).forEach( ( key ) => {\n\t\t\t\t\t\t\t// Delete cleared edits so that the properties\n\t\t\t\t\t\t\t// are not considered dirty.\n\t\t\t\t\t\t\tif ( nextEdits[ key ] === undefined ) {\n\t\t\t\t\t\t\t\tdelete nextEdits[ key ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t[ action.recordId ]: nextEdits,\n\t\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treturn state;\n\t\t\t},\n\n\t\t\tsaving: ( state = {}, action ) => {\n\t\t\t\tswitch ( action.type ) {\n\t\t\t\t\tcase 'SAVE_ENTITY_RECORD_START':\n\t\t\t\t\tcase 'SAVE_ENTITY_RECORD_FINISH':\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t[ action.recordId ]: {\n\t\t\t\t\t\t\t\tpending:\n\t\t\t\t\t\t\t\t\taction.type === 'SAVE_ENTITY_RECORD_START',\n\t\t\t\t\t\t\t\terror: action.error,\n\t\t\t\t\t\t\t\tisAutosave: action.isAutosave,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treturn state;\n\t\t\t},\n\n\t\t\tdeleting: ( state = {}, action ) => {\n\t\t\t\tswitch ( action.type ) {\n\t\t\t\t\tcase 'DELETE_ENTITY_RECORD_START':\n\t\t\t\t\tcase 'DELETE_ENTITY_RECORD_FINISH':\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t[ action.recordId ]: {\n\t\t\t\t\t\t\t\tpending:\n\t\t\t\t\t\t\t\t\taction.type ===\n\t\t\t\t\t\t\t\t\t'DELETE_ENTITY_RECORD_START',\n\t\t\t\t\t\t\t\terror: action.error,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treturn state;\n\t\t\t},\n\n\t\t\trevisions: ( state = {}, action ) => {\n\t\t\t\t// Use the same queriedDataReducer shape for revisions.\n\t\t\t\tif ( action.type === 'RECEIVE_ITEM_REVISIONS' ) {\n\t\t\t\t\tconst recordKey = action.recordKey;\n\t\t\t\t\tdelete action.recordKey;\n\t\t\t\t\tconst newState = queriedDataReducer( state[ recordKey ], {\n\t\t\t\t\t\t...action,\n\t\t\t\t\t\ttype: 'RECEIVE_ITEMS',\n\t\t\t\t\t} );\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...state,\n\t\t\t\t\t\t[ recordKey ]: newState,\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tif ( action.type === 'REMOVE_ITEMS' ) {\n\t\t\t\t\treturn Object.fromEntries(\n\t\t\t\t\t\tObject.entries( state ).filter(\n\t\t\t\t\t\t\t( [ id ] ) =>\n\t\t\t\t\t\t\t\t! action.itemIds.some( ( itemId ) => {\n\t\t\t\t\t\t\t\t\tif ( Number.isInteger( itemId ) ) {\n\t\t\t\t\t\t\t\t\t\treturn itemId === +id;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn itemId === id;\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn state;\n\t\t\t},\n\t\t} )\n\t);\n}\n\n/**\n * Reducer keeping track of the registered entities.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function entitiesConfig( state = rootEntitiesConfig, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'ADD_ENTITIES':\n\t\t\treturn [ ...state, ...action.entities ];\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer keeping track of the registered entities config and data.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport const entities = ( state = {}, action ) => {\n\tconst newConfig = entitiesConfig( state.config, action );\n\n\t// Generates a reducer for the entities nested by `kind` and `name`.\n\t// A config array with shape:\n\t// ```\n\t// [\n\t// { kind: 'taxonomy', name: 'category' },\n\t// { kind: 'taxonomy', name: 'post_tag' },\n\t// { kind: 'postType', name: 'post' },\n\t// { kind: 'postType', name: 'page' },\n\t// ]\n\t// ```\n\t// generates a reducer for state tree with shape:\n\t// ```\n\t// {\n\t// taxonomy: {\n\t// category,\n\t// post_tag,\n\t// },\n\t// postType: {\n\t// post,\n\t// page,\n\t// },\n\t// }\n\t// ```\n\tlet entitiesDataReducer = state.reducer;\n\tif ( ! entitiesDataReducer || newConfig !== state.config ) {\n\t\tconst entitiesByKind = newConfig.reduce( ( acc, record ) => {\n\t\t\tconst { kind } = record;\n\t\t\tif ( ! acc[ kind ] ) {\n\t\t\t\tacc[ kind ] = [];\n\t\t\t}\n\t\t\tacc[ kind ].push( record );\n\t\t\treturn acc;\n\t\t}, {} );\n\n\t\tentitiesDataReducer = combineReducers(\n\t\t\tObject.fromEntries(\n\t\t\t\tObject.entries( entitiesByKind ).map(\n\t\t\t\t\t( [ kind, subEntities ] ) => {\n\t\t\t\t\t\tconst kindReducer = combineReducers(\n\t\t\t\t\t\t\tObject.fromEntries(\n\t\t\t\t\t\t\t\tsubEntities.map( ( entityConfig ) => [\n\t\t\t\t\t\t\t\t\tentityConfig.name,\n\t\t\t\t\t\t\t\t\tentity( entityConfig ),\n\t\t\t\t\t\t\t\t] )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn [ kind, kindReducer ];\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}\n\n\tconst newData = entitiesDataReducer( state.records, action );\n\n\tif (\n\t\tnewData === state.records &&\n\t\tnewConfig === state.config &&\n\t\tentitiesDataReducer === state.reducer\n\t) {\n\t\treturn state;\n\t}\n\n\treturn {\n\t\treducer: entitiesDataReducer,\n\t\trecords: newData,\n\t\tconfig: newConfig,\n\t};\n};\n\n/**\n * @type {UndoManager}\n */\nexport function undoManager( state = createUndoManager() ) {\n\treturn state;\n}\n\nexport function editsReference( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'EDIT_ENTITY_RECORD':\n\t\tcase 'UNDO':\n\t\tcase 'REDO':\n\t\t\treturn {};\n\t}\n\treturn state;\n}\n\n/**\n * Reducer managing embed preview data.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function embedPreviews( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_EMBED_PREVIEW':\n\t\t\tconst { url, preview } = action;\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ url ]: preview,\n\t\t\t};\n\t}\n\treturn state;\n}\n\n/**\n * State which tracks whether the user can perform an action on a REST\n * resource.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function userPermissions( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_USER_PERMISSION':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.key ]: action.isAllowed,\n\t\t\t};\n\t\tcase 'RECEIVE_USER_PERMISSIONS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t...action.permissions,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning autosaves keyed by their parent's post id.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function autosaves( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_AUTOSAVES':\n\t\t\tconst { postId, autosaves: autosavesData } = action;\n\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ postId ]: autosavesData,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\nexport function blockPatterns( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_BLOCK_PATTERNS':\n\t\t\treturn action.patterns;\n\t}\n\n\treturn state;\n}\n\nexport function blockPatternCategories( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_BLOCK_PATTERN_CATEGORIES':\n\t\t\treturn action.categories;\n\t}\n\n\treturn state;\n}\n\nexport function userPatternCategories( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_USER_PATTERN_CATEGORIES':\n\t\t\treturn action.patternCategories;\n\t}\n\treturn state;\n}\n\nexport function navigationFallbackId( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_NAVIGATION_FALLBACK_ID':\n\t\t\treturn action.fallbackId;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer managing the theme global styles revisions.\n *\n * @param {Record<string, object>} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Record<string, object>} Updated state.\n */\nexport function themeGlobalStyleRevisions( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_THEME_GLOBAL_STYLE_REVISIONS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.currentId ]: action.revisions,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer managing the template lookup per query.\n *\n * @param {Record<string, string>} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Record<string, string>} Updated state.\n */\nexport function defaultTemplates( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_DEFAULT_TEMPLATE':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ JSON.stringify( action.query ) ]: action.templateId,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning an object of registered post meta.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function registeredPostMeta( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_REGISTERED_POST_META':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.postType ]: action.registeredPostMeta,\n\t\t\t};\n\t}\n\treturn state;\n}\n\n/**\n * Reducer managing editor settings.\n *\n * @param {Object} state Current state.\n * @param {Object} action Action object.\n *\n * @return {Object} Updated state.\n */\nexport function editorSettings( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_EDITOR_SETTINGS':\n\t\t\treturn action.settings;\n\t}\n\treturn state;\n}\n\n/**\n * Reducer managing editor assets.\n *\n * @param {Object} state Current state.\n * @param {Object} action Action object.\n *\n * @return {Object} Updated state.\n */\nexport function editorAssets( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_EDITOR_ASSETS':\n\t\t\treturn action.assets;\n\t}\n\treturn state;\n}\n\nexport default combineReducers( {\n\tusers,\n\tcurrentTheme,\n\tcurrentGlobalStylesId,\n\tcurrentUser,\n\tthemeGlobalStyleVariations,\n\tthemeBaseGlobalStyles,\n\tthemeGlobalStyleRevisions,\n\tentities,\n\teditsReference,\n\tundoManager,\n\tembedPreviews,\n\tuserPermissions,\n\tautosaves,\n\tblockPatterns,\n\tblockPatternCategories,\n\tuserPatternCategories,\n\tnavigationFallbackId,\n\tdefaultTemplates,\n\tregisteredPostMeta,\n\teditorSettings,\n\teditorAssets,\n} );\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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AA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAE;",
|
|
6
|
+
"names": ["queriedDataReducer", "nextEdits", "fastDeepEqual"]
|
|
7
|
+
}
|
|
@@ -66,11 +66,11 @@ var import_change_case = require("change-case");
|
|
|
66
66
|
var import_url = require("@wordpress/url");
|
|
67
67
|
var import_html_entities = require("@wordpress/html-entities");
|
|
68
68
|
var import_api_fetch = __toESM(require("@wordpress/api-fetch"));
|
|
69
|
-
var import_name = require("./name");
|
|
70
|
-
var import_entities = require("./entities");
|
|
71
|
-
var import_sync = require("./sync");
|
|
72
|
-
var import_utils = require("./utils");
|
|
73
|
-
var import_fetch = require("./fetch");
|
|
69
|
+
var import_name = require("./name.cjs");
|
|
70
|
+
var import_entities = require("./entities.cjs");
|
|
71
|
+
var import_sync = require("./sync.cjs");
|
|
72
|
+
var import_utils = require("./utils/index.cjs");
|
|
73
|
+
var import_fetch = require("./fetch/index.cjs");
|
|
74
74
|
var getAuthors = (query) => async ({ dispatch }) => {
|
|
75
75
|
const path = (0, import_url.addQueryArgs)(
|
|
76
76
|
"/wp/v2/users/?who=authors&per_page=100",
|
|
@@ -832,4 +832,4 @@ var getEditorAssets = () => async ({ dispatch }) => {
|
|
|
832
832
|
getThemeSupports,
|
|
833
833
|
getUserPatternCategories
|
|
834
834
|
});
|
|
835
|
-
//# sourceMappingURL=resolvers.
|
|
835
|
+
//# sourceMappingURL=resolvers.cjs.map
|