@strapi/content-manager 5.50.0 → 5.50.1

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.
Files changed (190) hide show
  1. package/dist/admin/components/ComponentIcon.js.map +1 -1
  2. package/dist/admin/components/ComponentIcon.mjs.map +1 -1
  3. package/dist/admin/components/ConfigurationForm/Fields.js.map +1 -1
  4. package/dist/admin/components/ConfigurationForm/Fields.mjs.map +1 -1
  5. package/dist/admin/components/DragLayer.js.map +1 -1
  6. package/dist/admin/components/DragLayer.mjs.map +1 -1
  7. package/dist/admin/components/LeftMenu.js +66 -67
  8. package/dist/admin/components/LeftMenu.js.map +1 -1
  9. package/dist/admin/components/LeftMenu.mjs +68 -69
  10. package/dist/admin/components/LeftMenu.mjs.map +1 -1
  11. package/dist/admin/history/components/VersionInputRenderer.js +3 -3
  12. package/dist/admin/history/components/VersionInputRenderer.js.map +1 -1
  13. package/dist/admin/history/components/VersionInputRenderer.mjs +3 -3
  14. package/dist/admin/history/components/VersionInputRenderer.mjs.map +1 -1
  15. package/dist/admin/history/routes.js.map +1 -1
  16. package/dist/admin/history/routes.mjs.map +1 -1
  17. package/dist/admin/hooks/useDocumentActions.js +15 -8
  18. package/dist/admin/hooks/useDocumentActions.js.map +1 -1
  19. package/dist/admin/hooks/useDocumentActions.mjs +15 -8
  20. package/dist/admin/hooks/useDocumentActions.mjs.map +1 -1
  21. package/dist/admin/hooks/useDocumentContext.js.map +1 -1
  22. package/dist/admin/hooks/useDocumentContext.mjs.map +1 -1
  23. package/dist/admin/index.js.map +1 -1
  24. package/dist/admin/index.mjs.map +1 -1
  25. package/dist/admin/layout.js +18 -6
  26. package/dist/admin/layout.js.map +1 -1
  27. package/dist/admin/layout.mjs +18 -6
  28. package/dist/admin/layout.mjs.map +1 -1
  29. package/dist/admin/pages/ComponentConfigurationPage.js.map +1 -1
  30. package/dist/admin/pages/ComponentConfigurationPage.mjs.map +1 -1
  31. package/dist/admin/pages/EditView/components/DocumentActions.js +7 -6
  32. package/dist/admin/pages/EditView/components/DocumentActions.js.map +1 -1
  33. package/dist/admin/pages/EditView/components/DocumentActions.mjs +7 -6
  34. package/dist/admin/pages/EditView/components/DocumentActions.mjs.map +1 -1
  35. package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/List.js +6 -3
  36. package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/List.js.map +1 -1
  37. package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/List.mjs +6 -3
  38. package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/List.mjs.map +1 -1
  39. package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksInput.js +1 -1
  40. package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksInput.js.map +1 -1
  41. package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksInput.mjs +1 -1
  42. package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksInput.mjs.map +1 -1
  43. package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksToolbar.js.map +1 -1
  44. package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksToolbar.mjs.map +1 -1
  45. package/dist/admin/pages/EditView/components/FormInputs/Component/Initializer.js.map +1 -1
  46. package/dist/admin/pages/EditView/components/FormInputs/Component/Initializer.mjs.map +1 -1
  47. package/dist/admin/pages/EditView/components/FormInputs/Component/Input.js +1 -1
  48. package/dist/admin/pages/EditView/components/FormInputs/Component/Input.js.map +1 -1
  49. package/dist/admin/pages/EditView/components/FormInputs/Component/Input.mjs +1 -1
  50. package/dist/admin/pages/EditView/components/FormInputs/Component/Input.mjs.map +1 -1
  51. package/dist/admin/pages/EditView/components/FormInputs/Component/Repeatable.js +2 -1
  52. package/dist/admin/pages/EditView/components/FormInputs/Component/Repeatable.js.map +1 -1
  53. package/dist/admin/pages/EditView/components/FormInputs/Component/Repeatable.mjs +2 -1
  54. package/dist/admin/pages/EditView/components/FormInputs/Component/Repeatable.mjs.map +1 -1
  55. package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.js.map +1 -1
  56. package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.mjs.map +1 -1
  57. package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.js +8 -5
  58. package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.js.map +1 -1
  59. package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.mjs +8 -5
  60. package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.mjs.map +1 -1
  61. package/dist/admin/pages/EditView/components/FormInputs/UID.js +5 -4
  62. package/dist/admin/pages/EditView/components/FormInputs/UID.js.map +1 -1
  63. package/dist/admin/pages/EditView/components/FormInputs/UID.mjs +5 -4
  64. package/dist/admin/pages/EditView/components/FormInputs/UID.mjs.map +1 -1
  65. package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/Editor.js.map +1 -1
  66. package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/Editor.mjs.map +1 -1
  67. package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/Field.js +2 -2
  68. package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/Field.js.map +1 -1
  69. package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/Field.mjs +2 -2
  70. package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/Field.mjs.map +1 -1
  71. package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/utils/utils.js.map +1 -1
  72. package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/utils/utils.mjs.map +1 -1
  73. package/dist/admin/pages/EditView/components/Panels.js.map +1 -1
  74. package/dist/admin/pages/EditView/components/Panels.mjs.map +1 -1
  75. package/dist/admin/pages/EditView/utils/data.js.map +1 -1
  76. package/dist/admin/pages/EditView/utils/data.mjs.map +1 -1
  77. package/dist/admin/pages/ListConfiguration/components/Settings.js.map +1 -1
  78. package/dist/admin/pages/ListConfiguration/components/Settings.mjs.map +1 -1
  79. package/dist/admin/pages/ListConfiguration/components/SortDisplayedFields.js.map +1 -1
  80. package/dist/admin/pages/ListConfiguration/components/SortDisplayedFields.mjs.map +1 -1
  81. package/dist/admin/pages/ListView/ListViewPage.js +71 -11
  82. package/dist/admin/pages/ListView/ListViewPage.js.map +1 -1
  83. package/dist/admin/pages/ListView/ListViewPage.mjs +73 -13
  84. package/dist/admin/pages/ListView/ListViewPage.mjs.map +1 -1
  85. package/dist/admin/pages/ListView/components/BulkActions/Actions.js +2 -1
  86. package/dist/admin/pages/ListView/components/BulkActions/Actions.js.map +1 -1
  87. package/dist/admin/pages/ListView/components/BulkActions/Actions.mjs +2 -1
  88. package/dist/admin/pages/ListView/components/BulkActions/Actions.mjs.map +1 -1
  89. package/dist/admin/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.js.map +1 -1
  90. package/dist/admin/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.mjs.map +1 -1
  91. package/dist/admin/pages/ListView/components/BulkActions/PublishAction.js.map +1 -1
  92. package/dist/admin/pages/ListView/components/BulkActions/PublishAction.mjs.map +1 -1
  93. package/dist/admin/pages/ListView/components/Filters.js +5 -3
  94. package/dist/admin/pages/ListView/components/Filters.js.map +1 -1
  95. package/dist/admin/pages/ListView/components/Filters.mjs +5 -3
  96. package/dist/admin/pages/ListView/components/Filters.mjs.map +1 -1
  97. package/dist/admin/pages/ListView/components/TableActions.js +37 -0
  98. package/dist/admin/pages/ListView/components/TableActions.js.map +1 -1
  99. package/dist/admin/pages/ListView/components/TableActions.mjs +39 -2
  100. package/dist/admin/pages/ListView/components/TableActions.mjs.map +1 -1
  101. package/dist/admin/pages/ListView/components/TableCells/CellContent.js +26 -1
  102. package/dist/admin/pages/ListView/components/TableCells/CellContent.js.map +1 -1
  103. package/dist/admin/pages/ListView/components/TableCells/CellContent.mjs +26 -2
  104. package/dist/admin/pages/ListView/components/TableCells/CellContent.mjs.map +1 -1
  105. package/dist/admin/pages/ListView/components/TableCells/CellValue.js +8 -7
  106. package/dist/admin/pages/ListView/components/TableCells/CellValue.js.map +1 -1
  107. package/dist/admin/pages/ListView/components/TableCells/CellValue.mjs +8 -7
  108. package/dist/admin/pages/ListView/components/TableCells/CellValue.mjs.map +1 -1
  109. package/dist/admin/pages/ListView/components/TableCells/Components.js.map +1 -1
  110. package/dist/admin/pages/ListView/components/TableCells/Components.mjs.map +1 -1
  111. package/dist/admin/preview/pages/Preview.js +2 -0
  112. package/dist/admin/preview/pages/Preview.js.map +1 -1
  113. package/dist/admin/preview/pages/Preview.mjs +2 -0
  114. package/dist/admin/preview/pages/Preview.mjs.map +1 -1
  115. package/dist/admin/preview/routes.js.map +1 -1
  116. package/dist/admin/preview/routes.mjs.map +1 -1
  117. package/dist/admin/preview/utils/fieldUtils.js.map +1 -1
  118. package/dist/admin/preview/utils/fieldUtils.mjs.map +1 -1
  119. package/dist/admin/router.js.map +1 -1
  120. package/dist/admin/router.mjs.map +1 -1
  121. package/dist/admin/services/documents.js.map +1 -1
  122. package/dist/admin/services/documents.mjs.map +1 -1
  123. package/dist/admin/src/components/ComponentIcon.d.ts +4 -3
  124. package/dist/admin/src/components/DragLayer.d.ts +1 -1
  125. package/dist/admin/src/history/routes.d.ts +2 -2
  126. package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
  127. package/dist/admin/src/hooks/useDocumentActions.d.ts +17 -16
  128. package/dist/admin/src/hooks/useDocumentContext.d.ts +1 -1
  129. package/dist/admin/src/index.d.ts +1 -1
  130. package/dist/admin/src/pages/EditView/components/FormInputs/UID.d.ts +1 -1
  131. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/Editor.d.ts +1 -1
  132. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/utils/utils.d.ts +7 -1
  133. package/dist/admin/src/pages/ListView/components/TableCells/CellContent.d.ts +11 -2
  134. package/dist/admin/src/pages/ListView/components/TableCells/CellValue.d.ts +1 -1
  135. package/dist/admin/src/preview/routes.d.ts +2 -2
  136. package/dist/admin/src/preview/services/preview.d.ts +1 -1
  137. package/dist/admin/src/router.d.ts +2 -2
  138. package/dist/admin/src/services/api.d.ts +1 -1
  139. package/dist/admin/src/services/components.d.ts +2 -2
  140. package/dist/admin/src/services/contentTypes.d.ts +3 -3
  141. package/dist/admin/src/services/documents.d.ts +19 -19
  142. package/dist/admin/src/services/homepage.d.ts +1 -1
  143. package/dist/admin/src/services/init.d.ts +1 -1
  144. package/dist/admin/src/services/relations.d.ts +2 -2
  145. package/dist/admin/src/services/uid.d.ts +3 -3
  146. package/dist/admin/src/utils/api.d.ts +2 -2
  147. package/dist/admin/src/utils/conditionalFields.d.ts +1 -0
  148. package/dist/admin/src/utils/objects.d.ts +7 -4
  149. package/dist/admin/src/utils/validation.d.ts +2 -1
  150. package/dist/admin/translations/en.json.js +1 -0
  151. package/dist/admin/translations/en.json.js.map +1 -1
  152. package/dist/admin/translations/en.json.mjs +1 -0
  153. package/dist/admin/translations/en.json.mjs.map +1 -1
  154. package/dist/admin/utils/api.js +6 -1
  155. package/dist/admin/utils/api.js.map +1 -1
  156. package/dist/admin/utils/api.mjs +6 -1
  157. package/dist/admin/utils/api.mjs.map +1 -1
  158. package/dist/admin/utils/conditionalFields.js.map +1 -1
  159. package/dist/admin/utils/conditionalFields.mjs.map +1 -1
  160. package/dist/admin/utils/objects.js +43 -13
  161. package/dist/admin/utils/objects.js.map +1 -1
  162. package/dist/admin/utils/objects.mjs +43 -13
  163. package/dist/admin/utils/objects.mjs.map +1 -1
  164. package/dist/admin/utils/validation.js.map +1 -1
  165. package/dist/admin/utils/validation.mjs.map +1 -1
  166. package/dist/server/controllers/collection-types.js +4 -1
  167. package/dist/server/controllers/collection-types.js.map +1 -1
  168. package/dist/server/controllers/collection-types.mjs +4 -1
  169. package/dist/server/controllers/collection-types.mjs.map +1 -1
  170. package/dist/server/controllers/relations.js +5 -4
  171. package/dist/server/controllers/relations.js.map +1 -1
  172. package/dist/server/controllers/relations.mjs +5 -4
  173. package/dist/server/controllers/relations.mjs.map +1 -1
  174. package/dist/server/controllers/validation/model-configuration.js +3 -1
  175. package/dist/server/controllers/validation/model-configuration.js.map +1 -1
  176. package/dist/server/controllers/validation/model-configuration.mjs +3 -1
  177. package/dist/server/controllers/validation/model-configuration.mjs.map +1 -1
  178. package/dist/server/homepage/services/homepage.js +27 -7
  179. package/dist/server/homepage/services/homepage.js.map +1 -1
  180. package/dist/server/homepage/services/homepage.mjs +27 -7
  181. package/dist/server/homepage/services/homepage.mjs.map +1 -1
  182. package/dist/server/services/permission.js +4 -3
  183. package/dist/server/services/permission.js.map +1 -1
  184. package/dist/server/services/permission.mjs +4 -3
  185. package/dist/server/services/permission.mjs.map +1 -1
  186. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  187. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  188. package/dist/server/src/homepage/services/homepage.d.ts.map +1 -1
  189. package/dist/server/src/services/permission.d.ts.map +1 -1
  190. package/package.json +6 -6
@@ -1,40 +1,40 @@
1
1
  import type { Clone, Create, Delete, Find, FindOne, BulkDelete, BulkPublish, BulkUnpublish, Discard, CountDraftRelations, Publish, Unpublish, Update } from '../../../shared/contracts/collection-types';
2
2
  declare const useAutoCloneDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Clone.Params & {
3
3
  params?: Find.Request["query"] & Clone.Request["query"];
4
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", Clone.Response, "adminApi">>, useCloneDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Clone.Params & {
4
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", Clone.Response, "adminApi">>, useCloneDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Clone.Params & {
5
5
  data: Clone.Request["body"];
6
6
  params?: Clone.Request["query"];
7
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", Clone.Response, "adminApi">>, useCreateDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Create.Params & {
7
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", Clone.Response, "adminApi">>, useCreateDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Create.Params & {
8
8
  data: Create.Request["body"];
9
9
  params?: Create.Request["query"];
10
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", Create.Response, "adminApi">>, useDeleteDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Delete.Params, "model"> & Pick<Partial<Delete.Params>, "documentId"> & {
10
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", Create.Response, "adminApi">>, useDeleteDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Delete.Params, "model"> & Pick<Partial<Delete.Params>, "documentId"> & {
11
11
  collectionType: string;
12
12
  params?: Find.Request["query"];
13
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", Delete.Response, "adminApi">>, useDeleteManyDocumentsMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<BulkDelete.Params & {
13
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", Delete.Response, "adminApi">>, useDeleteManyDocumentsMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<BulkDelete.Params & {
14
14
  documentIds: import("@strapi/types/dist/modules/documents").ID[];
15
15
  } & {
16
16
  params?: Find.Request["query"];
17
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", BulkDelete.Response, "adminApi">>, useDiscardDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Discard.Params, "model"> & Partial<Pick<Discard.Params, "documentId">> & {
17
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", BulkDelete.Response, "adminApi">>, useDiscardDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Discard.Params, "model"> & Partial<Pick<Discard.Params, "documentId">> & {
18
18
  collectionType: string;
19
19
  params?: Find.Request["query"] & {
20
- [key: string]: any;
20
+ [key: string]: unknown;
21
21
  };
22
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", Discard.Response, "adminApi">>, useGetAllDocumentsQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<Find.Params & {
22
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", Discard.Response, "adminApi">>, useGetAllDocumentsQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<Find.Params & {
23
23
  params?: Find.Request["query"] & {
24
- [key: string]: any;
24
+ [key: string]: unknown;
25
25
  };
26
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", Find.Response, "adminApi">>, useGetDocumentsForValidationQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
26
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", Find.Response, "adminApi">>, useGetDocumentsForValidationQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
27
27
  model: string;
28
28
  documentIds: string[];
29
29
  locale?: string;
30
30
  sort?: string;
31
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", import("@strapi/types/dist/modules/documents").AnyDocument[], "adminApi">>, useLazyGetDocumentQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query").QueryDefinition<Pick<FindOne.Params, "model"> & Partial<Pick<FindOne.Params, "documentId">> & {
31
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", import("@strapi/types/dist/modules/documents").AnyDocument[], "adminApi">>, useLazyGetDocumentQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query").QueryDefinition<Pick<FindOne.Params, "model"> & Partial<Pick<FindOne.Params, "documentId">> & {
32
32
  collectionType: string;
33
33
  params?: FindOne.Request["query"];
34
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", FindOne.Response, "adminApi">>, useGetDocumentQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<Pick<FindOne.Params, "model"> & Partial<Pick<FindOne.Params, "documentId">> & {
34
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", FindOne.Response, "adminApi">>, useGetDocumentQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<Pick<FindOne.Params, "model"> & Partial<Pick<FindOne.Params, "documentId">> & {
35
35
  collectionType: string;
36
36
  params?: FindOne.Request["query"];
37
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", FindOne.Response, "adminApi">>, useLazyGetDraftRelationCountQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
37
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", FindOne.Response, "adminApi">>, useLazyGetDraftRelationCountQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
38
38
  collectionType: string;
39
39
  model: string;
40
40
  /**
@@ -42,30 +42,30 @@ declare const useAutoCloneDocumentMutation: import("@reduxjs/toolkit/dist/query/
42
42
  */
43
43
  documentId?: string;
44
44
  params?: CountDraftRelations.Request["query"];
45
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", CountDraftRelations.Response, "adminApi">>, useGetManyDraftRelationCountQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
45
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", CountDraftRelations.Response, "adminApi">>, useGetManyDraftRelationCountQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
46
46
  documentIds?: import("@strapi/types/dist/modules/documents").ID[];
47
47
  locale?: string | string[] | null;
48
48
  } & {
49
49
  model: string;
50
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", number, "adminApi">>, usePublishDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Publish.Params, "model"> & Partial<Pick<Publish.Params, "documentId">> & {
50
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", number, "adminApi">>, usePublishDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Publish.Params, "model"> & Partial<Pick<Publish.Params, "documentId">> & {
51
51
  collectionType: string;
52
52
  data: Publish.Request["body"];
53
53
  params?: Publish.Request["query"];
54
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", Publish.Response, "adminApi">>, usePublishManyDocumentsMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<BulkPublish.Params & {
54
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", Publish.Response, "adminApi">>, usePublishManyDocumentsMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<BulkPublish.Params & {
55
55
  documentIds: import("@strapi/types/dist/modules/documents").ID[];
56
56
  } & {
57
57
  params?: BulkPublish.Request["query"];
58
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", BulkPublish.Response, "adminApi">>, useUpdateDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Update.Params, "model"> & Partial<Pick<Update.Params, "documentId">> & {
58
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", BulkPublish.Response, "adminApi">>, useUpdateDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Update.Params, "model"> & Partial<Pick<Update.Params, "documentId">> & {
59
59
  collectionType: string;
60
60
  data: Update.Request["body"];
61
61
  params?: Update.Request["query"];
62
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", Update.Response, "adminApi">>, useUnpublishDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Unpublish.Params, "model"> & Partial<Pick<Unpublish.Params, "documentId">> & {
62
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", Update.Response, "adminApi">>, useUnpublishDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Unpublish.Params, "model"> & Partial<Pick<Unpublish.Params, "documentId">> & {
63
63
  collectionType: string;
64
64
  params?: Unpublish.Request["query"];
65
65
  data: Unpublish.Request["body"];
66
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", Unpublish.Response, "adminApi">>, useUnpublishManyDocumentsMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<BulkUnpublish.Params, "model"> & {
66
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", Unpublish.Response, "adminApi">>, useUnpublishManyDocumentsMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<BulkUnpublish.Params, "model"> & {
67
67
  documentIds: import("@strapi/types/dist/modules/documents").ID[];
68
68
  } & {
69
69
  params?: BulkUnpublish.Request["query"];
70
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", BulkUnpublish.Response, "adminApi">>;
70
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", BulkUnpublish.Response, "adminApi">>;
71
71
  export { useAutoCloneDocumentMutation, useCloneDocumentMutation, useCreateDocumentMutation, useDeleteDocumentMutation, useDeleteManyDocumentsMutation, useDiscardDocumentMutation, useGetAllDocumentsQuery, useGetDocumentsForValidationQuery, useLazyGetDocumentQuery, useGetDocumentQuery, useLazyGetDraftRelationCountQuery as useGetDraftRelationCountQuery, useGetManyDraftRelationCountQuery, usePublishDocumentMutation, usePublishManyDocumentsMutation, useUpdateDocumentMutation, useUnpublishDocumentMutation, useUnpublishManyDocumentsMutation, };
@@ -1,5 +1,5 @@
1
1
  import * as Homepage from '../../../shared/contracts/homepage';
2
2
  declare const useGetRecentDocumentsQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
3
3
  action: "update" | "publish";
4
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", Homepage.RecentDocument[], "adminApi">>;
4
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", Homepage.RecentDocument[], "adminApi">>;
5
5
  export { useGetRecentDocumentsQuery };
@@ -1,4 +1,4 @@
1
- declare const useGetInitialDataQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", {
1
+ declare const useGetInitialDataQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", {
2
2
  fieldSizes: Record<string, {
3
3
  default: number;
4
4
  isResizable: boolean;
@@ -20,9 +20,9 @@ type GetRelationsResponse = {
20
20
  };
21
21
  declare const useGetRelationsQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<FindExisting.Params & {
22
22
  params?: FindExisting.Request["query"];
23
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", GetRelationsResponse, "adminApi">>, useLazySearchRelationsQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query").QueryDefinition<FindAvailable.Params & {
23
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", GetRelationsResponse, "adminApi">>, useLazySearchRelationsQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query").QueryDefinition<FindAvailable.Params & {
24
24
  params?: FindAvailable.Request["query"];
25
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", {
25
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", {
26
26
  results: RelResult[];
27
27
  pagination: import("../../../shared/contracts/relations").Pagination;
28
28
  error?: never;
@@ -12,7 +12,7 @@ declare const useGenerateUIDMutation: import("@reduxjs/toolkit/dist/query/react/
12
12
  field: string;
13
13
  } & {
14
14
  params: GenerateUID.Request["query"];
15
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", string, "adminApi">>, useGetDefaultUIDQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
15
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", string, "adminApi">>, useGetDefaultUIDQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
16
16
  contentTypeUID: string;
17
17
  data: {
18
18
  id: import("@strapi/types/dist/modules/entity-service/params/attributes").ID;
@@ -22,11 +22,11 @@ declare const useGenerateUIDMutation: import("@reduxjs/toolkit/dist/query/react/
22
22
  field: string;
23
23
  } & {
24
24
  params: GenerateUID.Request["query"];
25
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", string, "adminApi">>, useGetAvailabilityQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
25
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", string, "adminApi">>, useGetAvailabilityQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
26
26
  contentTypeUID: string;
27
27
  field: string;
28
28
  value: string;
29
29
  } & {
30
30
  params: CheckUIDAvailability.Request["query"];
31
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", CheckUIDAvailability.Response, "adminApi">>;
31
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError | import("@reduxjs/toolkit").SerializedError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AiUsage" | "AiFeatureConfig" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList" | "AILocalizationJobs", CheckUIDAvailability.Response, "adminApi">>;
32
32
  export { useGenerateUIDMutation, useGetDefaultUIDQuery, useGetAvailabilityQuery };
@@ -3,14 +3,14 @@ import { ApiError, type UnknownApiError } from '@strapi/admin/strapi-admin';
3
3
  interface Query {
4
4
  plugins?: Record<string, unknown>;
5
5
  _q?: string;
6
- [key: string]: any;
6
+ [key: string]: unknown;
7
7
  }
8
8
  /**
9
9
  * This type extracts the plugin options from the query
10
10
  * and appends them to the root of the query
11
11
  */
12
12
  type TransformedQuery<TQuery extends Query> = Omit<TQuery, 'plugins'> & {
13
- [key: string]: string;
13
+ [key: string]: unknown;
14
14
  };
15
15
  /**
16
16
  * @description
@@ -10,3 +10,4 @@ declare const getVarDependencyPath: (operand: unknown) => string | null;
10
10
  declare const getConditionDependencyPaths: (condition: JsonLogicCondition) => string[] | null;
11
11
  declare const getConditionDependencySubscriptionValue: (values: unknown, conditionDependencyPaths: string[] | null) => unknown;
12
12
  export { CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR, CONDITIONAL_FIELD_STATIC_SUBSCRIPTION, getConditionDependencyPaths, getConditionDependencySubscriptionValue, getVarDependencyPath, serializeConditionDependency, };
13
+ export type { JsonLogicCondition };
@@ -1,11 +1,13 @@
1
+ type PathObject = Record<string, unknown>;
1
2
  /**
2
3
  * Deeply get a value from an object via its path.
3
4
  */
4
- export declare function getIn(obj: any, key: string | string[], def?: any, pathStartIndex?: number): any;
5
+ export declare function getIn<TValue>(obj: unknown, key: string | string[], def: TValue, pathStartIndex?: number): TValue;
6
+ export declare function getIn<TValue = unknown>(obj: unknown, key: string | string[], def?: TValue, pathStartIndex?: number): TValue | undefined;
5
7
  /** @internal is the given object an Object? */
6
- export declare const isObject: (obj: any) => obj is object;
8
+ export declare const isObject: (obj: unknown) => obj is PathObject;
7
9
  /** @internal is the given object an integer? */
8
- export declare const isInteger: (obj: any) => boolean;
10
+ export declare const isInteger: (obj: unknown) => boolean;
9
11
  /**
10
12
  * Deeply set a value from in object via its path. If the value at `path`
11
13
  * has changed, return a shallow copy of obj with `value` set at `path`.
@@ -30,4 +32,5 @@ export declare const isInteger: (obj: any) => boolean;
30
32
  * @see https://github.com/developit/linkstate
31
33
  * @see https://github.com/jaredpalmer/formik/pull/123
32
34
  */
33
- export declare function setIn(obj: any, path: string, value: any): any;
35
+ export declare function setIn<TValue>(obj: TValue, path: string, value: unknown): TValue;
36
+ export {};
@@ -1,5 +1,6 @@
1
1
  import * as yup from 'yup';
2
2
  import type { ComponentsDictionary, Schema } from '../hooks/useDocument';
3
+ import type { ObjectShape } from 'yup/lib/object';
3
4
  interface ValidationOptions {
4
5
  status: 'draft' | 'published' | null;
5
6
  removedAttributes?: string[];
@@ -7,5 +8,5 @@ interface ValidationOptions {
7
8
  /**
8
9
  * TODO: should we create a Map to store these based on the hash of the schema?
9
10
  */
10
- declare const createYupSchema: (attributes?: Schema["attributes"], components?: ComponentsDictionary, options?: ValidationOptions) => yup.ObjectSchema<any>;
11
+ declare const createYupSchema: (attributes?: Schema["attributes"], components?: ComponentsDictionary, options?: ValidationOptions) => yup.ObjectSchema<ObjectShape>;
11
12
  export { createYupSchema };
@@ -16,6 +16,7 @@ var en = {
16
16
  "actions.discard.dialog.body": "Are you sure you want to discard the changes? This action is irreversible.",
17
17
  "actions.edit.error": "An error occurred while trying to edit the document.",
18
18
  "actions.edit.label": "Edit",
19
+ "actions.open-in-new-tab.label": "Open in new tab",
19
20
  "actions.copy-documentId.label": "Copy document ID",
20
21
  "actions.copy-documentId.success": "Document ID copied to clipboard",
21
22
  "actions.unpublish.error": "An error occurred while trying to unpublish the document.",
@@ -1 +1 @@
1
- {"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -12,6 +12,7 @@ var en = {
12
12
  "actions.discard.dialog.body": "Are you sure you want to discard the changes? This action is irreversible.",
13
13
  "actions.edit.error": "An error occurred while trying to edit the document.",
14
14
  "actions.edit.label": "Edit",
15
+ "actions.open-in-new-tab.label": "Open in new tab",
15
16
  "actions.copy-documentId.label": "Copy document ID",
16
17
  "actions.copy-documentId.success": "Document ID copied to clipboard",
17
18
  "actions.unpublish.error": "An error occurred while trying to unpublish the document.",
@@ -1 +1 @@
1
- {"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -9,7 +9,12 @@
9
9
  // Extract pluginOptions from the query, they shouldn't be part of the URL
10
10
  const { plugins: _, ...validQueryParams } = {
11
11
  ...query,
12
- ...Object.values(query?.plugins ?? {}).reduce((acc, current)=>Object.assign(acc, current), {})
12
+ ...Object.values(query?.plugins ?? {}).reduce((acc, current)=>{
13
+ if (typeof current === 'object' && current !== null) {
14
+ return Object.assign(acc, current);
15
+ }
16
+ return acc;
17
+ }, {})
13
18
  };
14
19
  return validQueryParams;
15
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","sources":["../../../admin/src/utils/api.ts"],"sourcesContent":["import { SerializedError } from '@reduxjs/toolkit';\nimport { ApiError, type UnknownApiError } from '@strapi/admin/strapi-admin';\n\ninterface Query {\n plugins?: Record<string, unknown>;\n _q?: string;\n [key: string]: any;\n}\n\n/**\n * This type extracts the plugin options from the query\n * and appends them to the root of the query\n */\ntype TransformedQuery<TQuery extends Query> = Omit<TQuery, 'plugins'> & {\n [key: string]: string;\n};\n\n/**\n * @description\n * Creates a valid query params object for get requests\n * ie. plugins[i18n][locale]=en becomes locale=en\n */\nconst buildValidParams = <TQuery extends Query>(query: TQuery): TransformedQuery<TQuery> => {\n if (!query) return query;\n\n // Extract pluginOptions from the query, they shouldn't be part of the URL\n const { plugins: _, ...validQueryParams } = {\n ...query,\n ...Object.values(query?.plugins ?? {}).reduce<Record<string, string>>(\n (acc, current) => Object.assign(acc, current),\n {}\n ),\n };\n\n return validQueryParams;\n};\n\ntype BaseQueryError = ApiError | UnknownApiError;\n\nconst isBaseQueryError = (error: BaseQueryError | SerializedError): error is BaseQueryError => {\n return error.name !== undefined;\n};\n\nexport { isBaseQueryError, buildValidParams };\nexport type { BaseQueryError, UnknownApiError };\n"],"names":["buildValidParams","query","plugins","_","validQueryParams","Object","values","reduce","acc","current","assign","isBaseQueryError","error","name","undefined"],"mappings":";;AAiBA;;;;IAKA,MAAMA,mBAAmB,CAAuBC,KAAAA,GAAAA;IAC9C,IAAI,CAACA,OAAO,OAAOA,KAAAA;;AAGnB,IAAA,MAAM,EAAEC,OAAAA,EAASC,CAAC,EAAE,GAAGC,kBAAkB,GAAG;AAC1C,QAAA,GAAGH,KAAK;AACR,QAAA,GAAGI,OAAOC,MAAM,CAACL,OAAOC,OAAAA,IAAW,IAAIK,MAAM,CAC3C,CAACC,GAAAA,EAAKC,UAAYJ,MAAAA,CAAOK,MAAM,CAACF,GAAAA,EAAKC,OAAAA,CAAAA,EACrC,EAAC;AAEL,KAAA;IAEA,OAAOL,gBAAAA;AACT;AAIA,MAAMO,mBAAmB,CAACC,KAAAA,GAAAA;IACxB,OAAOA,KAAAA,CAAMC,IAAI,KAAKC,SAAAA;AACxB;;;;;"}
1
+ {"version":3,"file":"api.js","sources":["../../../admin/src/utils/api.ts"],"sourcesContent":["import { SerializedError } from '@reduxjs/toolkit';\nimport { ApiError, type UnknownApiError } from '@strapi/admin/strapi-admin';\n\ninterface Query {\n plugins?: Record<string, unknown>;\n _q?: string;\n [key: string]: unknown;\n}\n\n/**\n * This type extracts the plugin options from the query\n * and appends them to the root of the query\n */\ntype TransformedQuery<TQuery extends Query> = Omit<TQuery, 'plugins'> & {\n [key: string]: unknown;\n};\n\n/**\n * @description\n * Creates a valid query params object for get requests\n * ie. plugins[i18n][locale]=en becomes locale=en\n */\nconst buildValidParams = <TQuery extends Query>(query: TQuery): TransformedQuery<TQuery> => {\n if (!query) return query;\n\n // Extract pluginOptions from the query, they shouldn't be part of the URL\n const { plugins: _, ...validQueryParams } = {\n ...query,\n ...Object.values(query?.plugins ?? {}).reduce<Record<string, unknown>>((acc, current) => {\n if (typeof current === 'object' && current !== null) {\n return Object.assign(acc, current);\n }\n\n return acc;\n }, {}),\n };\n\n return validQueryParams;\n};\n\ntype BaseQueryError = ApiError | UnknownApiError;\n\nconst isBaseQueryError = (error: BaseQueryError | SerializedError): error is BaseQueryError => {\n return error.name !== undefined;\n};\n\nexport { isBaseQueryError, buildValidParams };\nexport type { BaseQueryError, UnknownApiError };\n"],"names":["buildValidParams","query","plugins","_","validQueryParams","Object","values","reduce","acc","current","assign","isBaseQueryError","error","name","undefined"],"mappings":";;AAiBA;;;;IAKA,MAAMA,mBAAmB,CAAuBC,KAAAA,GAAAA;IAC9C,IAAI,CAACA,OAAO,OAAOA,KAAAA;;AAGnB,IAAA,MAAM,EAAEC,OAAAA,EAASC,CAAC,EAAE,GAAGC,kBAAkB,GAAG;AAC1C,QAAA,GAAGH,KAAK;QACR,GAAGI,MAAAA,CAAOC,MAAM,CAACL,KAAAA,EAAOC,OAAAA,IAAW,EAAC,CAAA,CAAGK,MAAM,CAA0B,CAACC,GAAAA,EAAKC,OAAAA,GAAAA;AAC3E,YAAA,IAAI,OAAOA,OAAAA,KAAY,QAAA,IAAYA,OAAAA,KAAY,IAAA,EAAM;gBACnD,OAAOJ,MAAAA,CAAOK,MAAM,CAACF,GAAAA,EAAKC,OAAAA,CAAAA;AAC5B,YAAA;YAEA,OAAOD,GAAAA;AACT,QAAA,CAAA,EAAG,EAAC;AACN,KAAA;IAEA,OAAOJ,gBAAAA;AACT;AAIA,MAAMO,mBAAmB,CAACC,KAAAA,GAAAA;IACxB,OAAOA,KAAAA,CAAMC,IAAI,KAAKC,SAAAA;AACxB;;;;;"}
@@ -7,7 +7,12 @@
7
7
  // Extract pluginOptions from the query, they shouldn't be part of the URL
8
8
  const { plugins: _, ...validQueryParams } = {
9
9
  ...query,
10
- ...Object.values(query?.plugins ?? {}).reduce((acc, current)=>Object.assign(acc, current), {})
10
+ ...Object.values(query?.plugins ?? {}).reduce((acc, current)=>{
11
+ if (typeof current === 'object' && current !== null) {
12
+ return Object.assign(acc, current);
13
+ }
14
+ return acc;
15
+ }, {})
11
16
  };
12
17
  return validQueryParams;
13
18
  };
@@ -1 +1 @@
1
- {"version":3,"file":"api.mjs","sources":["../../../admin/src/utils/api.ts"],"sourcesContent":["import { SerializedError } from '@reduxjs/toolkit';\nimport { ApiError, type UnknownApiError } from '@strapi/admin/strapi-admin';\n\ninterface Query {\n plugins?: Record<string, unknown>;\n _q?: string;\n [key: string]: any;\n}\n\n/**\n * This type extracts the plugin options from the query\n * and appends them to the root of the query\n */\ntype TransformedQuery<TQuery extends Query> = Omit<TQuery, 'plugins'> & {\n [key: string]: string;\n};\n\n/**\n * @description\n * Creates a valid query params object for get requests\n * ie. plugins[i18n][locale]=en becomes locale=en\n */\nconst buildValidParams = <TQuery extends Query>(query: TQuery): TransformedQuery<TQuery> => {\n if (!query) return query;\n\n // Extract pluginOptions from the query, they shouldn't be part of the URL\n const { plugins: _, ...validQueryParams } = {\n ...query,\n ...Object.values(query?.plugins ?? {}).reduce<Record<string, string>>(\n (acc, current) => Object.assign(acc, current),\n {}\n ),\n };\n\n return validQueryParams;\n};\n\ntype BaseQueryError = ApiError | UnknownApiError;\n\nconst isBaseQueryError = (error: BaseQueryError | SerializedError): error is BaseQueryError => {\n return error.name !== undefined;\n};\n\nexport { isBaseQueryError, buildValidParams };\nexport type { BaseQueryError, UnknownApiError };\n"],"names":["buildValidParams","query","plugins","_","validQueryParams","Object","values","reduce","acc","current","assign","isBaseQueryError","error","name","undefined"],"mappings":"AAiBA;;;;IAKA,MAAMA,mBAAmB,CAAuBC,KAAAA,GAAAA;IAC9C,IAAI,CAACA,OAAO,OAAOA,KAAAA;;AAGnB,IAAA,MAAM,EAAEC,OAAAA,EAASC,CAAC,EAAE,GAAGC,kBAAkB,GAAG;AAC1C,QAAA,GAAGH,KAAK;AACR,QAAA,GAAGI,OAAOC,MAAM,CAACL,OAAOC,OAAAA,IAAW,IAAIK,MAAM,CAC3C,CAACC,GAAAA,EAAKC,UAAYJ,MAAAA,CAAOK,MAAM,CAACF,GAAAA,EAAKC,OAAAA,CAAAA,EACrC,EAAC;AAEL,KAAA;IAEA,OAAOL,gBAAAA;AACT;AAIA,MAAMO,mBAAmB,CAACC,KAAAA,GAAAA;IACxB,OAAOA,KAAAA,CAAMC,IAAI,KAAKC,SAAAA;AACxB;;;;"}
1
+ {"version":3,"file":"api.mjs","sources":["../../../admin/src/utils/api.ts"],"sourcesContent":["import { SerializedError } from '@reduxjs/toolkit';\nimport { ApiError, type UnknownApiError } from '@strapi/admin/strapi-admin';\n\ninterface Query {\n plugins?: Record<string, unknown>;\n _q?: string;\n [key: string]: unknown;\n}\n\n/**\n * This type extracts the plugin options from the query\n * and appends them to the root of the query\n */\ntype TransformedQuery<TQuery extends Query> = Omit<TQuery, 'plugins'> & {\n [key: string]: unknown;\n};\n\n/**\n * @description\n * Creates a valid query params object for get requests\n * ie. plugins[i18n][locale]=en becomes locale=en\n */\nconst buildValidParams = <TQuery extends Query>(query: TQuery): TransformedQuery<TQuery> => {\n if (!query) return query;\n\n // Extract pluginOptions from the query, they shouldn't be part of the URL\n const { plugins: _, ...validQueryParams } = {\n ...query,\n ...Object.values(query?.plugins ?? {}).reduce<Record<string, unknown>>((acc, current) => {\n if (typeof current === 'object' && current !== null) {\n return Object.assign(acc, current);\n }\n\n return acc;\n }, {}),\n };\n\n return validQueryParams;\n};\n\ntype BaseQueryError = ApiError | UnknownApiError;\n\nconst isBaseQueryError = (error: BaseQueryError | SerializedError): error is BaseQueryError => {\n return error.name !== undefined;\n};\n\nexport { isBaseQueryError, buildValidParams };\nexport type { BaseQueryError, UnknownApiError };\n"],"names":["buildValidParams","query","plugins","_","validQueryParams","Object","values","reduce","acc","current","assign","isBaseQueryError","error","name","undefined"],"mappings":"AAiBA;;;;IAKA,MAAMA,mBAAmB,CAAuBC,KAAAA,GAAAA;IAC9C,IAAI,CAACA,OAAO,OAAOA,KAAAA;;AAGnB,IAAA,MAAM,EAAEC,OAAAA,EAASC,CAAC,EAAE,GAAGC,kBAAkB,GAAG;AAC1C,QAAA,GAAGH,KAAK;QACR,GAAGI,MAAAA,CAAOC,MAAM,CAACL,KAAAA,EAAOC,OAAAA,IAAW,EAAC,CAAA,CAAGK,MAAM,CAA0B,CAACC,GAAAA,EAAKC,OAAAA,GAAAA;AAC3E,YAAA,IAAI,OAAOA,OAAAA,KAAY,QAAA,IAAYA,OAAAA,KAAY,IAAA,EAAM;gBACnD,OAAOJ,MAAAA,CAAOK,MAAM,CAACF,GAAAA,EAAKC,OAAAA,CAAAA;AAC5B,YAAA;YAEA,OAAOD,GAAAA;AACT,QAAA,CAAA,EAAG,EAAC;AACN,KAAA;IAEA,OAAOJ,gBAAAA;AACT;AAIA,MAAMO,mBAAmB,CAACC,KAAAA,GAAAA;IACxB,OAAOA,KAAAA,CAAMC,IAAI,KAAKC,SAAAA;AACxB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"conditionalFields.js","sources":["../../../admin/src/utils/conditionalFields.ts"],"sourcesContent":["import { type JsonLogicCondition } from '@strapi/admin/strapi-admin';\n\nimport { getIn } from './objects';\n\nconst CONDITIONAL_FIELD_STATIC_SUBSCRIPTION = '__strapi_conditional_static__';\nconst CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR = '||';\n\nconst serializeConditionDependency = (value: unknown) => {\n try {\n return `${typeof value}:${JSON.stringify(value)}`;\n } catch {\n return `${typeof value}:${String(value)}`;\n }\n};\n\n/**\n * `null` means \"fallback to broad subscription\" because we couldn't safely infer\n * dependency paths from the condition.\n */\nconst getVarDependencyPath = (operand: unknown): string | null => {\n if (typeof operand === 'string') {\n return operand.length > 0 ? operand : null;\n }\n\n if (Array.isArray(operand)) {\n const [path] = operand;\n\n if (typeof path === 'string') {\n return path.length > 0 ? path : null;\n }\n\n return null;\n }\n\n return null;\n};\n\nconst getConditionDependencyPaths = (condition: JsonLogicCondition): string[] | null => {\n const dependencies = new Set<string>();\n\n const collectDependencies = (value: unknown): boolean => {\n if (Array.isArray(value)) {\n return value.every(collectDependencies);\n }\n\n if (value === null || typeof value !== 'object') {\n return true;\n }\n\n return Object.entries(value).every(([key, operand]) => {\n if (key === 'var') {\n const dependencyPath = getVarDependencyPath(operand);\n\n if (dependencyPath === null) {\n return false;\n }\n\n if (dependencyPath) {\n dependencies.add(dependencyPath);\n }\n\n return true;\n }\n\n return collectDependencies(operand);\n });\n };\n\n return collectDependencies(condition) ? [...dependencies].sort() : null;\n};\n\nconst getConditionDependencySubscriptionValue = (\n values: unknown,\n conditionDependencyPaths: string[] | null\n) => {\n if (conditionDependencyPaths === null) {\n return values;\n }\n\n if (conditionDependencyPaths.length === 0) {\n return CONDITIONAL_FIELD_STATIC_SUBSCRIPTION;\n }\n\n if (conditionDependencyPaths.length === 1) {\n return serializeConditionDependency(getIn(values, conditionDependencyPaths[0]));\n }\n\n return conditionDependencyPaths\n .map((path) => serializeConditionDependency(getIn(values, path)))\n .join(CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR);\n};\n\nexport {\n CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR,\n CONDITIONAL_FIELD_STATIC_SUBSCRIPTION,\n getConditionDependencyPaths,\n getConditionDependencySubscriptionValue,\n getVarDependencyPath,\n serializeConditionDependency,\n};\n"],"names":["CONDITIONAL_FIELD_STATIC_SUBSCRIPTION","CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR","serializeConditionDependency","value","JSON","stringify","String","getVarDependencyPath","operand","length","Array","isArray","path","getConditionDependencyPaths","condition","dependencies","Set","collectDependencies","every","Object","entries","key","dependencyPath","add","sort","getConditionDependencySubscriptionValue","values","conditionDependencyPaths","getIn","map","join"],"mappings":";;;;AAIA,MAAMA,qCAAAA,GAAwC;AAC9C,MAAMC,qCAAAA,GAAwC;AAE9C,MAAMC,+BAA+B,CAACC,KAAAA,GAAAA;IACpC,IAAI;QACF,OAAO,CAAA,EAAG,OAAOA,KAAAA,CAAM,CAAC,EAAEC,IAAAA,CAAKC,SAAS,CAACF,KAAAA,CAAAA,CAAAA,CAAQ;AACnD,IAAA,CAAA,CAAE,OAAM;AACN,QAAA,OAAO,GAAG,OAAOA,KAAAA,CAAM,CAAC,EAAEG,OAAOH,KAAAA,CAAAA,CAAAA,CAAQ;AAC3C,IAAA;AACF;AAEA;;;IAIA,MAAMI,uBAAuB,CAACC,OAAAA,GAAAA;IAC5B,IAAI,OAAOA,YA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OAAAA,CAAAA;AAC7B,QAAA,CAAA,CAAA;AACF,IAAA,CAAA;AAEA,IAAA,OAAOS,oBAAoBH,SAAAA,CAAAA,GAAa;AAAIC,QAAAA,GAAAA;AAAa,KAAA,CAACS,IAAI,EAAA,GAAK,IAAA;AACrE;AAEA,MAAMC,uCAAAA,GAA0C,CAC9CC,MAAAA,EACAC,wBAAAA,GAAAA;AAEA,IAAA,IAAIA,6BAA6B,IAAA,EAAM;QACrC,OAAOD,MAAAA;AACT,IAAA;IAEA,IAAIC,wBAAAA,CAAyBlB,MAAM,KAAK,CAAA,EAAG;QACzC,OAAOT,qCAAAA;AACT,IAAA;IAEA,IAAI2B,wBAAAA,CAAyBlB,MAAM,KAAK,CAAA,EAAG;AACzC,QAAA,OAAOP,4BAAAA,CAA6B0B,aAAAA,CAAMF,MAAAA,EAAQC,wBAAwB,CAAC,CAAA,CAAE,CAAA,CAAA;AAC/E,IAAA;IAEA,OAAOA,wBAAAA,CACJE,GAAG,CAAC,CAACjB,IAAAA,GAASV,6BAA6B0B,aAAAA,CAAMF,MAAAA,EAAQd,IAAAA,CAAAA,CAAAA,CAAAA,CACzDkB,IAAI,CAAC7B,qCAAAA,CAAAA;AACV;;;;;;;;;"}
1
+ {"version":3,"file":"conditionalFields.js","sources":["../../../admin/src/utils/conditionalFields.ts"],"sourcesContent":["import { type JsonLogicCondition } from '@strapi/admin/strapi-admin';\n\nimport { getIn } from './objects';\n\nconst CONDITIONAL_FIELD_STATIC_SUBSCRIPTION = '__strapi_conditional_static__';\nconst CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR = '||';\n\nconst serializeConditionDependency = (value: unknown) => {\n try {\n return `${typeof value}:${JSON.stringify(value)}`;\n } catch {\n return `${typeof value}:${String(value)}`;\n }\n};\n\n/**\n * `null` means \"fallback to broad subscription\" because we couldn't safely infer\n * dependency paths from the condition.\n */\nconst getVarDependencyPath = (operand: unknown): string | null => {\n if (typeof operand === 'string') {\n return operand.length > 0 ? operand : null;\n }\n\n if (Array.isArray(operand)) {\n const [path] = operand;\n\n if (typeof path === 'string') {\n return path.length > 0 ? path : null;\n }\n\n return null;\n }\n\n return null;\n};\n\nconst getConditionDependencyPaths = (condition: JsonLogicCondition): string[] | null => {\n const dependencies = new Set<string>();\n\n const collectDependencies = (value: unknown): boolean => {\n if (Array.isArray(value)) {\n return value.every(collectDependencies);\n }\n\n if (value === null || typeof value !== 'object') {\n return true;\n }\n\n return Object.entries(value).every(([key, operand]) => {\n if (key === 'var') {\n const dependencyPath = getVarDependencyPath(operand);\n\n if (dependencyPath === null) {\n return false;\n }\n\n if (dependencyPath) {\n dependencies.add(dependencyPath);\n }\n\n return true;\n }\n\n return collectDependencies(operand);\n });\n };\n\n return collectDependencies(condition) ? [...dependencies].sort() : null;\n};\n\nconst getConditionDependencySubscriptionValue = (\n values: unknown,\n conditionDependencyPaths: string[] | null\n) => {\n if (conditionDependencyPaths === null) {\n return values;\n }\n\n if (conditionDependencyPaths.length === 0) {\n return CONDITIONAL_FIELD_STATIC_SUBSCRIPTION;\n }\n\n if (conditionDependencyPaths.length === 1) {\n return serializeConditionDependency(getIn(values, conditionDependencyPaths[0]));\n }\n\n return conditionDependencyPaths\n .map((path) => serializeConditionDependency(getIn(values, path)))\n .join(CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR);\n};\n\nexport {\n CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR,\n CONDITIONAL_FIELD_STATIC_SUBSCRIPTION,\n getConditionDependencyPaths,\n getConditionDependencySubscriptionValue,\n getVarDependencyPath,\n serializeConditionDependency,\n};\nexport type { JsonLogicCondition };\n"],"names":["CONDITIONAL_FIELD_STATIC_SUBSCRIPTION","CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR","serializeConditionDependency","value","JSON","stringify","String","getVarDependencyPath","operand","length","Array","isArray","path","getConditionDependencyPaths","condition","dependencies","Set","collectDependencies","every","Object","entries","key","dependencyPath","add","sort","getConditionDependencySubscriptionValue","values","conditionDependencyPaths","getI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@
1
- {"version":3,"file":"conditionalFields.mjs","sources":["../../../admin/src/utils/conditionalFields.ts"],"sourcesContent":["import { type JsonLogicCondition } from '@strapi/admin/strapi-admin';\n\nimport { getIn } from './objects';\n\nconst CONDITIONAL_FIELD_STATIC_SUBSCRIPTION = '__strapi_conditional_static__';\nconst CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR = '||';\n\nconst serializeConditionDependency = (value: unknown) => {\n try {\n return `${typeof value}:${JSON.stringify(value)}`;\n } catch {\n return `${typeof value}:${String(value)}`;\n }\n};\n\n/**\n * `null` means \"fallback to broad subscription\" because we couldn't safely infer\n * dependency paths from the condition.\n */\nconst getVarDependencyPath = (operand: unknown): string | null => {\n if (typeof operand === 'string') {\n return operand.length > 0 ? operand : null;\n }\n\n if (Array.isArray(operand)) {\n const [path] = operand;\n\n if (typeof path === 'string') {\n return path.length > 0 ? path : null;\n }\n\n return null;\n }\n\n return null;\n};\n\nconst getConditionDependencyPaths = (condition: JsonLogicCondition): string[] | null => {\n const dependencies = new Set<string>();\n\n const collectDependencies = (value: unknown): boolean => {\n if (Array.isArray(value)) {\n return value.every(collectDependencies);\n }\n\n if (value === null || typeof value !== 'object') {\n return true;\n }\n\n return Object.entries(value).every(([key, operand]) => {\n if (key === 'var') {\n const dependencyPath = getVarDependencyPath(operand);\n\n if (dependencyPath === null) {\n return false;\n }\n\n if (dependencyPath) {\n dependencies.add(dependencyPath);\n }\n\n return true;\n }\n\n return collectDependencies(operand);\n });\n };\n\n return collectDependencies(condition) ? [...dependencies].sort() : null;\n};\n\nconst getConditionDependencySubscriptionValue = (\n values: unknown,\n conditionDependencyPaths: string[] | null\n) => {\n if (conditionDependencyPaths === null) {\n return values;\n }\n\n if (conditionDependencyPaths.length === 0) {\n return CONDITIONAL_FIELD_STATIC_SUBSCRIPTION;\n }\n\n if (conditionDependencyPaths.length === 1) {\n return serializeConditionDependency(getIn(values, conditionDependencyPaths[0]));\n }\n\n return conditionDependencyPaths\n .map((path) => serializeConditionDependency(getIn(values, path)))\n .join(CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR);\n};\n\nexport {\n CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR,\n CONDITIONAL_FIELD_STATIC_SUBSCRIPTION,\n getConditionDependencyPaths,\n getConditionDependencySubscriptionValue,\n getVarDependencyPath,\n serializeConditionDependency,\n};\n"],"names":["CONDITIONAL_FIELD_STATIC_SUBSCRIPTION","CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR","serializeConditionDependency","value","JSON","stringify","String","getVarDependencyPath","operand","length","Array","isArray","path","getConditionDependencyPaths","condition","dependencies","Set","collectDependencies","every","Object","entries","key","dependencyPath","add","sort","getConditionDependencySubscriptionValue","values","conditionDependencyPaths","getIn","map","join"],"mappings":";;AAIA,MAAMA,qCAAAA,GAAwC;AAC9C,MAAMC,qCAAAA,GAAwC;AAE9C,MAAMC,+BAA+B,CAACC,KAAAA,GAAAA;IACpC,IAAI;QACF,OAAO,CAAA,EAAG,OAAOA,KAAAA,CAAM,CAAC,EAAEC,IAAAA,CAAKC,SAAS,CAACF,KAAAA,CAAAA,CAAAA,CAAQ;AACnD,IAAA,CAAA,CAAE,OAAM;AACN,QAAA,OAAO,GAAG,OAAOA,KAAAA,CAAM,CAAC,EAAEG,OAAOH,KAAAA,CAAAA,CAAAA,CAAQ;AAC3C,IAAA;AACF;AAEA;;;IAIA,MAAMI,uBAAuB,CAACC,OAAAA,GAAAA;IAC5B,IAAI,OAAOA,YAAY,QAAA,EAAU;AAC/B,QAAA,OAAOA,OAAAA,CAAQC,MAAM,GAAG,CAAA,GAAID,OAAAA,GAAU,IAAA;AACxC,IAAA;IAEA,IAAIE,KAAAA,CAAMC,OAAO,CAACH,OAAAA,CAAAA,EAAU;QAC1B,MAAM,CAACI,KAAK,GAAGJ,OAAAA;QAEf,IAAI,OAAOI,SAAS,QAAA,EAAU;AAC5B,YAAA,OAAOA,IAAAA,CAAKH,MAAM,GAAG,CAAA,GAAIG,IAAAA,GAAO,I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IAAIC,wBAAAA,CAAyBlB,MAAM,KAAK,CAAA,EAAG;QACzC,OAAOT,qCAAAA;AACT,IAAA;IAEA,IAAI2B,wBAAAA,CAAyBlB,MAAM,KAAK,CAAA,EAAG;AACzC,QAAA,OAAOP,4BAAAA,CAA6B0B,KAAAA,CAAMF,MAAAA,EAAQC,wBAAwB,CAAC,CAAA,CAAE,CAAA,CAAA;AAC/E,IAAA;IAEA,OAAOA,wBAAAA,CACJE,GAAG,CAAC,CAACjB,IAAAA,GAASV,6BAA6B0B,KAAAA,CAAMF,MAAAA,EAAQd,IAAAA,CAAAA,CAAAA,CAAAA,CACzDkB,IAAI,CAAC7B,qCAAAA,CAAAA;AACV;;;;"}
1
+ {"version":3,"file":"conditionalFields.mjs","sources":["../../../admin/src/utils/conditionalFields.ts"],"sourcesContent":["import { type JsonLogicCondition } from '@strapi/admin/strapi-admin';\n\nimport { getIn } from './objects';\n\nconst CONDITIONAL_FIELD_STATIC_SUBSCRIPTION = '__strapi_conditional_static__';\nconst CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR = '||';\n\nconst serializeConditionDependency = (value: unknown) => {\n try {\n return `${typeof value}:${JSON.stringify(value)}`;\n } catch {\n return `${typeof value}:${String(value)}`;\n }\n};\n\n/**\n * `null` means \"fallback to broad subscription\" because we couldn't safely infer\n * dependency paths from the condition.\n */\nconst getVarDependencyPath = (operand: unknown): string | null => {\n if (typeof operand === 'string') {\n return operand.length > 0 ? operand : null;\n }\n\n if (Array.isArray(operand)) {\n const [path] = operand;\n\n if (typeof path === 'string') {\n return path.length > 0 ? path : null;\n }\n\n return null;\n }\n\n return null;\n};\n\nconst getConditionDependencyPaths = (condition: JsonLogicCondition): string[] | null => {\n const dependencies = new Set<string>();\n\n const collectDependencies = (value: unknown): boolean => {\n if (Array.isArray(value)) {\n return value.every(collectDependencies);\n }\n\n if (value === null || typeof value !== 'object') {\n return true;\n }\n\n return Object.entries(value).every(([key, operand]) => {\n if (key === 'var') {\n const dependencyPath = getVarDependencyPath(operand);\n\n if (dependencyPath === null) {\n return false;\n }\n\n if (dependencyPath) {\n dependencies.add(dependencyPath);\n }\n\n return true;\n }\n\n return collectDependencies(operand);\n });\n };\n\n return collectDependencies(condition) ? [...dependencies].sort() : null;\n};\n\nconst getConditionDependencySubscriptionValue = (\n values: unknown,\n conditionDependencyPaths: string[] | null\n) => {\n if (conditionDependencyPaths === null) {\n return values;\n }\n\n if (conditionDependencyPaths.length === 0) {\n return CONDITIONAL_FIELD_STATIC_SUBSCRIPTION;\n }\n\n if (conditionDependencyPaths.length === 1) {\n return serializeConditionDependency(getIn(values, conditionDependencyPaths[0]));\n }\n\n return conditionDependencyPaths\n .map((path) => serializeConditionDependency(getIn(values, path)))\n .join(CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR);\n};\n\nexport {\n CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR,\n CONDITIONAL_FIELD_STATIC_SUBSCRIPTION,\n getConditionDependencyPaths,\n getConditionDependencySubscriptionValue,\n getVarDependencyPath,\n serializeConditionDependency,\n};\nexport type { JsonLogicCondition };\n"],"names":["CONDITIONAL_FIELD_STATIC_SUBSCRIPTION","CONDITIONAL_FIELD_MULTI_DEP_SEPARATOR","serializeConditionDependency","value","JSON","stringify","String","getVarDependencyPath","operand","length","Array","isArray","path","getConditionDependencyPaths","condition","dependencies","Set","collectDependencies","every","Object","entries","key","dependencyPath","add","sort","getConditionDependencySubscriptionValue","values","conditionDependencyPaths","getIn","map","join"],"mappings":";;AAIA,MAAMA,qCAAAA,GAAwC;AAC9C,MAAMC,qCAAAA,GAAwC;AAE9C,MAAMC,+BAA+B,CAACC,KAAAA,GAAAA;IACpC,IAAI;QACF,OAAO,CAAA,EAAG,OAAOA,KAAAA,CAAM,CAAC,EAAEC,IAAAA,CAAKC,SAAS,CAACF,KAAAA,CAAAA,CAAAA,CAAQ;AACnD,IAAA,CAAA,CAAE,OAAM;AACN,QAAA,OAAO,GAAG,OAAOA,KAAAA,CAAM,CAAC,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ClBP,oBAAAA,YAAAA,CAAaQ,GAAG,CAACD,cAAAA,CAAAA;AACnB,gBAAA;gBAEA,OAAO,IAAA;AACT,YAAA;AAEA,YAAA,OAAOL,mBAAAA,CAAoBT,OAAAA,CAAAA;AAC7B,QAAA,CAAA,CAAA;AACF,IAAA,CAAA;AAEA,IAAA,OAAOS,oBAAoBH,SAAAA,CAAAA,GAAa;AAAIC,QAAAA,GAAAA;AAAa,KAAA,CAACS,IAAI,EAAA,GAAK,IAAA;AACrE;AAEA,MAAMC,uCAAAA,GAA0C,CAC9CC,MAAAA,EACAC,wBAAAA,GAAAA;AAEA,IAAA,IAAIA,6BAA6B,IAAA,EAAM;QACrC,OAAOD,MAAAA;AACT,IAAA;IAEA,IAAIC,wBAAAA,CAAyBlB,MAAM,KAAK,CAAA,EAAG;QACzC,OAAOT,qCAAAA;AACT,IAAA;IAEA,IAAI2B,wBAAAA,CAAyBlB,MAAM,KAAK,CAAA,EAAG;AACzC,QAAA,OAAOP,4BAAAA,CAA6B0B,KAAAA,CAAMF,MAAAA,EAAQC,wBAAwB,CAAC,CAAA,CAAE,CAAA,CAAA;AAC/E,IAAA;IAEA,OAAOA,wBAAAA,CACJE,GAAG,CAAC,CAACjB,IAAAA,GAASV,6BAA6B0B,KAAAA,CAAMF,MAAAA,EAAQd,IAAAA,CAAAA,CAAAA,CAAAA,CACzDkB,IAAI,CAAC7B,qCAAAA,CAAAA;AACV;;;;"}
@@ -8,18 +8,43 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
8
  var clone__default = /*#__PURE__*/_interopDefault(clone);
9
9
  var toPath__default = /*#__PURE__*/_interopDefault(toPath);
10
10
 
11
- /**
12
- * Deeply get a value from an object via its path.
13
- */ function getIn(obj, key, def, pathStartIndex = 0) {
11
+ const isPathContainer = (obj)=>isObject(obj) || Array.isArray(obj);
12
+ const isPathTraversable = (obj)=>{
13
+ if (obj === null || obj === undefined) {
14
+ return false;
15
+ }
16
+ if (typeof obj === 'boolean') {
17
+ return obj === true;
18
+ }
19
+ if (typeof obj === 'number') {
20
+ return obj !== 0 && Number.isNaN(obj) === false;
21
+ }
22
+ if (typeof obj === 'bigint') {
23
+ return obj !== 0n;
24
+ }
25
+ if (typeof obj === 'string') {
26
+ return obj !== '';
27
+ }
28
+ return true;
29
+ };
30
+ const getPathValue = (container, key)=>Object(container)[key];
31
+ const setPathValue = (container, key, value)=>{
32
+ container[key] = value;
33
+ };
34
+ const deletePathValue = (container, key)=>{
35
+ delete container[key];
36
+ };
37
+ function getIn(obj, key, def, pathStartIndex = 0) {
14
38
  const path = toPath__default.default(key);
15
- while(obj && pathStartIndex < path.length){
16
- obj = obj[path[pathStartIndex++]];
39
+ let currentValue = obj;
40
+ while(isPathTraversable(currentValue) && pathStartIndex < path.length){
41
+ currentValue = getPathValue(currentValue, path[pathStartIndex++]);
17
42
  }
18
43
  // check if path is not in the end
19
- if (pathStartIndex !== path.length && !obj) {
44
+ if (pathStartIndex !== path.length && isPathTraversable(currentValue) === false) {
20
45
  return def;
21
46
  }
22
- return obj === undefined ? def : obj;
47
+ return currentValue === undefined ? def : currentValue;
23
48
  }
24
49
  /** @internal is the given object an Object? */ const isObject = (obj)=>obj !== null && typeof obj === 'object' && !Array.isArray(obj);
25
50
  /** @internal is the given object an integer? */ const isInteger = (obj)=>String(Math.floor(Number(obj))) === obj;
@@ -54,24 +79,29 @@ var toPath__default = /*#__PURE__*/_interopDefault(toPath);
54
79
  for(; i < pathArray.length - 1; i++){
55
80
  const currentPath = pathArray[i];
56
81
  const currentObj = getIn(obj, pathArray.slice(0, i + 1));
57
- if (currentObj && (isObject(currentObj) || Array.isArray(currentObj))) {
58
- resVal = resVal[currentPath] = clone__default.default(currentObj);
82
+ if (isObject(currentObj) || Array.isArray(currentObj)) {
83
+ const clonedValue = clone__default.default(currentObj);
84
+ setPathValue(resVal, currentPath, clonedValue);
85
+ resVal = clonedValue;
59
86
  } else {
60
87
  const nextPath = pathArray[i + 1];
61
- resVal = resVal[currentPath] = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};
88
+ const nextValue = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};
89
+ setPathValue(resVal, currentPath, nextValue);
90
+ resVal = nextValue;
62
91
  }
63
92
  }
64
93
  // Return original object if new value is the same as current
65
- if ((i === 0 ? obj : resVal)[pathArray[i]] === value) {
94
+ const currentValue = isPathContainer(obj) && i === 0 ? getPathValue(obj, pathArray[i]) : getPathValue(resVal, pathArray[i]);
95
+ if (currentValue === value) {
66
96
  return obj;
67
97
  }
68
98
  {
69
- delete resVal[pathArray[i]];
99
+ deletePathValue(resVal, pathArray[i]);
70
100
  }
71
101
  // If the path array has a single element, the loop did not run.
72
102
  // Deleting on `resVal` had no effect in this scenario, so we delete on the result instead.
73
103
  if (i === 0 && value === undefined) {
74
- delete res[pathArray[i]];
104
+ deletePathValue(res, pathArray[i]);
75
105
  }
76
106
  return res;
77
107
  }
@@ -1 +1 @@
1
- {"version":3,"file":"objects.js","sources":["../../../admin/src/utils/objects.ts"],"sourcesContent":["import clone from 'lodash/clone';\nimport toPath from 'lodash/toPath';\n\n/**\n * Deeply get a value from an object via its path.\n */\nexport function getIn(obj: any, key: string | string[], def?: any, pathStartIndex: number = 0) {\n const path = toPath(key);\n while (obj && pathStartIndex < path.length) {\n obj = obj[path[pathStartIndex++]];\n }\n\n // check if path is not in the end\n if (pathStartIndex !== path.length && !obj) {\n return def;\n }\n\n return obj === undefined ? def : obj;\n}\n\n/** @internal is the given object an Object? */\nexport const isObject = (obj: any): obj is object =>\n obj !== null && typeof obj === 'object' && !Array.isArray(obj);\n\n/** @internal is the given object an integer? */\nexport const isInteger = (obj: any): boolean => String(Math.floor(Number(obj))) === obj;\n\n/**\n * Deeply set a value from in object via its path. If the value at `path`\n * has changed, return a shallow copy of obj with `value` set at `path`.\n * If `value` has not changed, return the original `obj`.\n *\n * Existing objects / arrays along `path` are also shallow copied. Sibling\n * objects along path retain the same internal js reference. Since new\n * objects / arrays are only created along `path`, we can test if anything\n * changed in a nested structure by comparing the object's reference in\n * the old and new object, similar to how russian doll cache invalidation\n * works.\n *\n * In earlier versions of this function, which used cloneDeep, there were\n * issues whereby settings a nested value would mutate the parent\n * instead of creating a new object. `clone` avoids that bug making a\n * shallow copy of the objects along the update path\n * so no object is mutated in place.\n *\n * Before changing this function, please read through the following\n * discussions.\n *\n * @see https://github.com/developit/linkstate\n * @see https://github.com/jaredpalmer/formik/pull/123\n */\nexport function setIn(obj: any, path: string, value: any): any {\n const res: any = clone(obj); // this keeps inheritance when obj is a class\n let resVal: any = res;\n let i = 0;\n const pathArray = toPath(path);\n\n for (; i < pathArray.length - 1; i++) {\n const currentPath: string = pathArray[i];\n const currentObj: any = getIn(obj, pathArray.slice(0, i + 1));\n\n if (currentObj && (isObject(currentObj) || Array.isArray(currentObj))) {\n resVal = resVal[currentPath] = clone(currentObj);\n } else {\n const nextPath: string = pathArray[i + 1];\n resVal = resVal[currentPath] = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};\n }\n }\n\n // Return original object if new value is the same as current\n if ((i === 0 ? obj : resVal)[pathArray[i]] === value) {\n return obj;\n }\n\n if (value === undefined) {\n delete resVal[pathArray[i]];\n } else {\n resVal[pathArray[i]] = value;\n }\n\n // If the path array has a single element, the loop did not run.\n // Deleting on `resVal` had no effect in this scenario, so we delete on the result instead.\n if (i === 0 && value === undefined) {\n delete res[pathArray[i]];\n }\n\n return res;\n}\n"],"names":["getIn","obj","key","def","pathStartIndex","path","toPath","length","undefined","isObject","Array","isArray","isInteger","String","Math","floor","Number","setIn","value","res","clone","resVal","i","pathArray","currentPath","currentObj","slice","nextPath"],"mappings":";;;;;;;;;;AAGA;;IAGO,SAASA,KAAAA,CAAMC,GAAQ,EAAEC,GAAsB,EAAEC,GAAS,EAAEC,cAAAA,GAAyB,CAAC,EAAA;AAC3F,IAAA,MAAMC,OAAOC,uBAAAA,CAAOJ,GAAAA,CAAAA;AACpB,IAAA,MAAOD,GAAAA,IAAOG,cA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AMC,OAAO,CAACc,WAAU,CAAA,EAAI;AACrEJ,YAAAA,MAAAA,GAASA,MAAM,CAACG,WAAAA,CAAY,GAAGJ,sBAAAA,CAAMK,UAAAA,CAAAA;QACvC,CAAA,MAAO;AACL,YAAA,MAAME,QAAAA,GAAmBJ,SAAS,CAACD,CAAAA,GAAI,CAAA,CAAE;YACzCD,MAAAA,GAASA,MAAM,CAACG,WAAAA,CAAY,GAAGZ,SAAAA,CAAUe,QAAAA,CAAAA,IAAaX,MAAAA,CAAOW,QAAAA,CAAAA,IAAa,CAAA,GAAI,EAAE,GAAG,EAAC;AACtF,QAAA;AACF,IAAA;;AAGA,IAAA,IAAI,CAACL,CAAAA,KAAM,CAAA,GAAIrB,GAAAA,GAAMoB,MAAK,EAAGE,SAAS,CAACD,CAAAA,CAAE,CAAC,KAAKJ,KAAAA,EAAO;QACpD,OAAOjB,GAAAA;AACT,IAAA;AAEA,IAAyB;AACvB,QAAA,OAAOoB,MAAM,CAACE,SAAS,CAACD,EAAE,CAAC;IAC7B;;;IAMA,IAAIA,CAAAA,KAAM,CAAA,IAAKJ,KAAAA,KAAUV,SAAAA,EAAW;AAClC,QAAA,OAAOW,GAAG,CAACI,SAAS,CAACD,EAAE,CAAC;AAC1B,IAAA;IAEA,OAAOH,GAAAA;AACT;;;;;;;"}
1
+ {"version":3,"file":"objects.js","sources":["../../../admin/src/utils/objects.ts"],"sourcesContent":["import clone from 'lodash/clone';\nimport toPath from 'lodash/toPath';\n\ntype PathObject = Record<string, unknown>;\ntype PathContainer = PathObject | unknown[];\n\nconst isPathContainer = (obj: unknown): obj is PathContainer => isObject(obj) || Array.isArray(obj);\nconst isPathTraversable = (obj: unknown): boolean => {\n if (obj === null || obj === undefined) {\n return false;\n }\n\n if (typeof obj === 'boolean') {\n return obj === true;\n }\n\n if (typeof obj === 'number') {\n return obj !== 0 && Number.isNaN(obj) === false;\n }\n\n if (typeof obj === 'bigint') {\n return obj !== 0n;\n }\n\n if (typeof obj === 'string') {\n return obj !== '';\n }\n\n return true;\n};\nconst getPathValue = (container: unknown, key: string): unknown =>\n (Object(container) as PathObject)[key];\nconst setPathValue = (container: PathContainer, key: string, value: unknown) => {\n (container as PathObject)[key] = value;\n};\nconst deletePathValue = (container: PathContainer, key: string) => {\n delete (container as PathObject)[key];\n};\n\n/**\n * Deeply get a value from an object via its path.\n */\nexport function getIn<TValue>(\n obj: unknown,\n key: string | string[],\n def: TValue,\n pathStartIndex?: number\n): TValue;\nexport function getIn<TValue = unknown>(\n obj: unknown,\n key: string | string[],\n def?: TValue,\n pathStartIndex?: number\n): TValue | undefined;\nexport function getIn<TValue = unknown>(\n obj: unknown,\n key: string | string[],\n def?: TValue,\n pathStartIndex: number = 0\n): TValue | undefined {\n const path = toPath(key);\n let currentValue = obj;\n\n while (isPathTraversable(currentValue) && pathStartIndex < path.length) {\n currentValue = getPathValue(currentValue, path[pathStartIndex++]);\n }\n\n // check if path is not in the end\n if (pathStartIndex !== path.length && isPathTraversable(currentValue) === false) {\n return def;\n }\n\n return (currentValue === undefined ? def : currentValue) as TValue | undefined;\n}\n\n/** @internal is the given object an Object? */\nexport const isObject = (obj: unknown): obj is PathObject =>\n obj !== null && typeof obj === 'object' && !Array.isArray(obj);\n\n/** @internal is the given object an integer? */\nexport const isInteger = (obj: unknown): boolean => String(Math.floor(Number(obj))) === obj;\n\n/**\n * Deeply set a value from in object via its path. If the value at `path`\n * has changed, return a shallow copy of obj with `value` set at `path`.\n * If `value` has not changed, return the original `obj`.\n *\n * Existing objects / arrays along `path` are also shallow copied. Sibling\n * objects along path retain the same internal js reference. Since new\n * objects / arrays are only created along `path`, we can test if anything\n * changed in a nested structure by comparing the object's reference in\n * the old and new object, similar to how russian doll cache invalidation\n * works.\n *\n * In earlier versions of this function, which used cloneDeep, there were\n * issues whereby settings a nested value would mutate the parent\n * instead of creating a new object. `clone` avoids that bug making a\n * shallow copy of the objects along the update path\n * so no object is mutated in place.\n *\n * Before changing this function, please read through the following\n * discussions.\n *\n * @see https://github.com/developit/linkstate\n * @see https://github.com/jaredpalmer/formik/pull/123\n */\nexport function setIn<TValue>(obj: TValue, path: string, value: unknown): TValue {\n const res = clone(obj); // this keeps inheritance when obj is a class\n let resVal = res as PathContainer;\n let i = 0;\n const pathArray = toPath(path);\n\n for (; i < pathArray.length - 1; i++) {\n const currentPath: string = pathArray[i];\n const currentObj = getIn(obj, pathArray.slice(0, i + 1));\n\n if (isObject(currentObj) || Array.isArray(currentObj)) {\n const clonedValue = clone(currentObj) as PathContainer;\n setPathValue(resVal, currentPath, clonedValue);\n resVal = clonedValue;\n } else {\n const nextPath: string = pathArray[i + 1];\n const nextValue: PathContainer = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};\n setPathValue(resVal, currentPath, nextValue);\n resVal = nextValue;\n }\n }\n\n // Return original object if new value is the same as current\n const currentValue =\n isPathContainer(obj) && i === 0\n ? getPathValue(obj, pathArray[i])\n : getPathValue(resVal, pathArray[i]);\n if (currentValue === value) {\n return obj;\n }\n\n if (value === undefined) {\n deletePathValue(resVal, pathArray[i]);\n } else {\n setPathValue(resVal, pathArray[i], value);\n }\n\n // If the path array has a single element, the loop did not run.\n // Deleting on `resVal` had no effect in this scenario, so we delete on the result instead.\n if (i === 0 && value === undefined) {\n deletePathValue(res as PathContainer, pathArray[i]);\n }\n\n return res;\n}\n"],"names":["isPathContainer","obj","isObject","Array","isArray","isPathTraversable","undefined","Number","isNaN","getPathValue","container","key","Object","setPathValue","value","deletePathValue","getIn","def","pathStartIndex","path","toPath","currentValue","length","isInteger","String","Math","floor","setIn","res","clone","resVal","i","pathArray","currentPath","currentObj","slice","clonedValue","nextPath","nextValue"],"mappings":";;;;;;;;;;AAMA,MAAMA,kBAAkB,CAACC,GAAAA,GAAuCC,SAASD,GAAAA,CAAAA,IAAQE,KAAAA,CAAMC,OAAO,CAACH,GAAAA,CAAAA;AAC/F,MAAMI,oBAAoB,CAACJ,GAAAA,GAAAA;IACzB,IAAIA,GAAAA,KAAQ,IAAA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