@strapi/content-manager 0.0.0-experimental.25e22c6cc9bc6b35392bb55d09f641a0a65e7403 → 0.0.0-experimental.312e2942332daff7ae98a4f357d1913a4ae5e1ef

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 (127) hide show
  1. package/LICENSE +18 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-WRPUXGd6.js → ComponentConfigurationPage-BfOUhLa9.js} +3 -3
  3. package/dist/_chunks/{ComponentConfigurationPage-WRPUXGd6.js.map → ComponentConfigurationPage-BfOUhLa9.js.map} +1 -1
  4. package/dist/_chunks/{ComponentConfigurationPage-gdUj_t-O.mjs → ComponentConfigurationPage-DgDrdk-k.mjs} +3 -3
  5. package/dist/_chunks/{ComponentConfigurationPage-gdUj_t-O.mjs.map → ComponentConfigurationPage-DgDrdk-k.mjs.map} +1 -1
  6. package/dist/_chunks/{EditConfigurationPage-C1vjMBgy.js → EditConfigurationPage-BcXQLYY9.js} +3 -3
  7. package/dist/_chunks/{EditConfigurationPage-C1vjMBgy.js.map → EditConfigurationPage-BcXQLYY9.js.map} +1 -1
  8. package/dist/_chunks/{EditConfigurationPage-BwuIPOJG.mjs → EditConfigurationPage-CjV1kPAw.mjs} +3 -3
  9. package/dist/_chunks/{EditConfigurationPage-BwuIPOJG.mjs.map → EditConfigurationPage-CjV1kPAw.mjs.map} +1 -1
  10. package/dist/_chunks/{EditViewPage-DbcGfyqK.js → EditViewPage-BOeuvemd.js} +19 -8
  11. package/dist/_chunks/EditViewPage-BOeuvemd.js.map +1 -0
  12. package/dist/_chunks/{EditViewPage-0MiFkXa8.mjs → EditViewPage-s_bjnR0M.mjs} +19 -8
  13. package/dist/_chunks/EditViewPage-s_bjnR0M.mjs.map +1 -0
  14. package/dist/_chunks/{Field-BG1xu38N.js → Field-CvfOxLel.js} +465 -145
  15. package/dist/_chunks/Field-CvfOxLel.js.map +1 -0
  16. package/dist/_chunks/{Field-BDMSCcy5.mjs → Field-D9nHkdjy.mjs} +463 -143
  17. package/dist/_chunks/Field-D9nHkdjy.mjs.map +1 -0
  18. package/dist/_chunks/{Form-9BnFyUjy.js → Form-BKnDhP2B.js} +39 -17
  19. package/dist/_chunks/Form-BKnDhP2B.js.map +1 -0
  20. package/dist/_chunks/{Form-CPVWavB8.mjs → Form-G4C35wJ4.mjs} +39 -17
  21. package/dist/_chunks/Form-G4C35wJ4.mjs.map +1 -0
  22. package/dist/_chunks/{History-BWWxLt2Z.js → History-BIYOzHws.js} +44 -19
  23. package/dist/_chunks/History-BIYOzHws.js.map +1 -0
  24. package/dist/_chunks/{History-BVpd8LP3.mjs → History-FWwaCNUD.mjs} +44 -19
  25. package/dist/_chunks/History-FWwaCNUD.mjs.map +1 -0
  26. package/dist/_chunks/{ListConfigurationPage-DozVMKcR.mjs → ListConfigurationPage-BbOp66T2.mjs} +20 -8
  27. package/dist/_chunks/ListConfigurationPage-BbOp66T2.mjs.map +1 -0
  28. package/dist/_chunks/{ListConfigurationPage-6swzjdAZ.js → ListConfigurationPage-N7prXhOp.js} +20 -8
  29. package/dist/_chunks/ListConfigurationPage-N7prXhOp.js.map +1 -0
  30. package/dist/_chunks/{ListViewPage-Ds0ulgfG.mjs → ListViewPage-DTSW3r3X.mjs} +58 -40
  31. package/dist/_chunks/ListViewPage-DTSW3r3X.mjs.map +1 -0
  32. package/dist/_chunks/{ListViewPage-BlzfjS2Q.js → ListViewPage-Djc5M_c0.js} +60 -42
  33. package/dist/_chunks/ListViewPage-Djc5M_c0.js.map +1 -0
  34. package/dist/_chunks/{NoContentTypePage-BH11kaKt.mjs → NoContentTypePage-A-6Pk0le.mjs} +2 -2
  35. package/dist/_chunks/{NoContentTypePage-BH11kaKt.mjs.map → NoContentTypePage-A-6Pk0le.mjs.map} +1 -1
  36. package/dist/_chunks/{NoContentTypePage-D2nCCWEl.js → NoContentTypePage-DCX-hEMB.js} +2 -2
  37. package/dist/_chunks/{NoContentTypePage-D2nCCWEl.js.map → NoContentTypePage-DCX-hEMB.js.map} +1 -1
  38. package/dist/_chunks/{NoPermissionsPage-BT2Tn0D_.mjs → NoPermissionsPage-B0vWytDx.mjs} +2 -2
  39. package/dist/_chunks/{NoPermissionsPage-BT2Tn0D_.mjs.map → NoPermissionsPage-B0vWytDx.mjs.map} +1 -1
  40. package/dist/_chunks/{NoPermissionsPage-DN_JlsU2.js → NoPermissionsPage-PfJfspJV.js} +2 -2
  41. package/dist/_chunks/{NoPermissionsPage-DN_JlsU2.js.map → NoPermissionsPage-PfJfspJV.js.map} +1 -1
  42. package/dist/_chunks/{Relations-CcgFTcWo.js → Relations--9jwQ8HV.js} +4 -4
  43. package/dist/_chunks/Relations--9jwQ8HV.js.map +1 -0
  44. package/dist/_chunks/{Relations-Dnag3fhV.mjs → Relations-Ccdfw1dU.mjs} +4 -4
  45. package/dist/_chunks/Relations-Ccdfw1dU.mjs.map +1 -0
  46. package/dist/_chunks/{en-fbKQxLGn.js → en-BVzUkPxZ.js} +10 -8
  47. package/dist/_chunks/{en-fbKQxLGn.js.map → en-BVzUkPxZ.js.map} +1 -1
  48. package/dist/_chunks/{en-Ux26r5pl.mjs → en-CPTj6CjC.mjs} +10 -8
  49. package/dist/_chunks/{en-Ux26r5pl.mjs.map → en-CPTj6CjC.mjs.map} +1 -1
  50. package/dist/_chunks/{index-JNNNKUHs.mjs → index-BwqXeHiv.mjs} +464 -196
  51. package/dist/_chunks/index-BwqXeHiv.mjs.map +1 -0
  52. package/dist/_chunks/{index-CWpLBSt0.js → index-jun-ZqyN.js} +457 -189
  53. package/dist/_chunks/index-jun-ZqyN.js.map +1 -0
  54. package/dist/_chunks/{layout-DC503LnF.mjs → layout-BV5oiZQ9.mjs} +27 -14
  55. package/dist/_chunks/layout-BV5oiZQ9.mjs.map +1 -0
  56. package/dist/_chunks/{layout--iHdZzRk.js → layout-T2xBqmuZ.js} +25 -12
  57. package/dist/_chunks/layout-T2xBqmuZ.js.map +1 -0
  58. package/dist/_chunks/{relations-BbHizA5K.js → relations-D8jegO_8.js} +2 -2
  59. package/dist/_chunks/{relations-BbHizA5K.js.map → relations-D8jegO_8.js.map} +1 -1
  60. package/dist/_chunks/{relations-CTje5t-a.mjs → relations-wAeF76DP.mjs} +2 -2
  61. package/dist/_chunks/{relations-CTje5t-a.mjs.map → relations-wAeF76DP.mjs.map} +1 -1
  62. package/dist/_chunks/{usePrev-B9w_-eYc.js → useDebounce-CtcjDB3L.js} +14 -1
  63. package/dist/_chunks/useDebounce-CtcjDB3L.js.map +1 -0
  64. package/dist/_chunks/useDebounce-DmuSJIF3.mjs +29 -0
  65. package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +1 -0
  66. package/dist/admin/index.js +1 -1
  67. package/dist/admin/index.mjs +1 -1
  68. package/dist/admin/src/history/index.d.ts +3 -0
  69. package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
  70. package/dist/admin/src/index.d.ts +1 -0
  71. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +1 -0
  72. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/utils/constants.d.ts +4 -0
  73. package/dist/admin/src/pages/EditView/components/FormInputs/Relations.d.ts +20 -0
  74. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.d.ts +2 -2
  75. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.d.ts +2 -2
  76. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +4 -48
  77. package/dist/admin/src/pages/EditView/components/Header.d.ts +10 -11
  78. package/dist/admin/src/services/api.d.ts +1 -1
  79. package/dist/admin/src/services/components.d.ts +2 -2
  80. package/dist/admin/src/services/contentTypes.d.ts +3 -3
  81. package/dist/admin/src/services/documents.d.ts +19 -17
  82. package/dist/admin/src/services/init.d.ts +1 -1
  83. package/dist/admin/src/services/relations.d.ts +2 -2
  84. package/dist/admin/src/services/uid.d.ts +3 -3
  85. package/dist/admin/src/utils/validation.d.ts +4 -1
  86. package/dist/server/index.js +184 -112
  87. package/dist/server/index.js.map +1 -1
  88. package/dist/server/index.mjs +185 -113
  89. package/dist/server/index.mjs.map +1 -1
  90. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  91. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  92. package/dist/server/src/controllers/uid.d.ts.map +1 -1
  93. package/dist/server/src/controllers/validation/dimensions.d.ts +4 -2
  94. package/dist/server/src/controllers/validation/dimensions.d.ts.map +1 -1
  95. package/dist/server/src/history/services/history.d.ts.map +1 -1
  96. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  97. package/dist/server/src/history/services/utils.d.ts +2 -1
  98. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  99. package/dist/server/src/policies/hasPermissions.d.ts.map +1 -1
  100. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  101. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  102. package/dist/server/src/services/permission-checker.d.ts.map +1 -1
  103. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  104. package/dist/shared/contracts/collection-types.d.ts +3 -1
  105. package/dist/shared/contracts/collection-types.d.ts.map +1 -1
  106. package/package.json +9 -9
  107. package/dist/_chunks/EditViewPage-0MiFkXa8.mjs.map +0 -1
  108. package/dist/_chunks/EditViewPage-DbcGfyqK.js.map +0 -1
  109. package/dist/_chunks/Field-BDMSCcy5.mjs.map +0 -1
  110. package/dist/_chunks/Field-BG1xu38N.js.map +0 -1
  111. package/dist/_chunks/Form-9BnFyUjy.js.map +0 -1
  112. package/dist/_chunks/Form-CPVWavB8.mjs.map +0 -1
  113. package/dist/_chunks/History-BVpd8LP3.mjs.map +0 -1
  114. package/dist/_chunks/History-BWWxLt2Z.js.map +0 -1
  115. package/dist/_chunks/ListConfigurationPage-6swzjdAZ.js.map +0 -1
  116. package/dist/_chunks/ListConfigurationPage-DozVMKcR.mjs.map +0 -1
  117. package/dist/_chunks/ListViewPage-BlzfjS2Q.js.map +0 -1
  118. package/dist/_chunks/ListViewPage-Ds0ulgfG.mjs.map +0 -1
  119. package/dist/_chunks/Relations-CcgFTcWo.js.map +0 -1
  120. package/dist/_chunks/Relations-Dnag3fhV.mjs.map +0 -1
  121. package/dist/_chunks/index-CWpLBSt0.js.map +0 -1
  122. package/dist/_chunks/index-JNNNKUHs.mjs.map +0 -1
  123. package/dist/_chunks/layout--iHdZzRk.js.map +0 -1
  124. package/dist/_chunks/layout-DC503LnF.mjs.map +0 -1
  125. package/dist/_chunks/usePrev-B9w_-eYc.js.map +0 -1
  126. package/dist/_chunks/usePrev-DH6iah0A.mjs +0 -16
  127. package/dist/_chunks/usePrev-DH6iah0A.mjs.map +0 -1
@@ -1,17 +1,17 @@
1
- import { ClockCounterClockwise, CrossCircle, More, WarningCircle, ListPlus, Pencil, Trash, Check, CheckCircle, ArrowsCounterClockwise, ChevronRight, Duplicate, Feather } from "@strapi/icons";
1
+ import { More, Cross, WarningCircle, ListPlus, Pencil, Trash, Check, CrossCircle, CheckCircle, ArrowsCounterClockwise, ChevronRight, Duplicate, ClockCounterClockwise, Feather } from "@strapi/icons";
2
2
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
3
- import { useStrapiApp, useQueryParams, createContext, useAuth, useRBAC, Page, adminApi, translatedErrors, useNotification, useAPIErrorHandler, getYupValidationErrors, useTracking, useForm, BackButton, DescriptionComponentRenderer, useTable, Table } from "@strapi/admin/strapi-admin";
4
- import { stringify } from "qs";
5
- import { useIntl } from "react-intl";
6
- import { useNavigate, useParams, Navigate, useMatch, useLocation, Link, NavLink } from "react-router-dom";
3
+ import { useStrapiApp, createContext, useAuth, useRBAC, Page, adminApi, translatedErrors, useNotification, useAPIErrorHandler, getYupValidationErrors, useQueryParams, useTracking, useGuidedTour, useForm, BackButton, DescriptionComponentRenderer, useTable, Table } from "@strapi/admin/strapi-admin";
7
4
  import * as React from "react";
8
5
  import { lazy } from "react";
9
- import { Button, Menu, VisuallyHidden, Flex, Typography, Dialog, Modal, Radio, Status, SingleSelect, SingleSelectOption, Box, Loader, IconButton, Tooltip, LinkButton } from "@strapi/design-system";
10
- import { styled } from "styled-components";
6
+ import { Button, Menu, VisuallyHidden, Flex, Typography, Dialog, Modal, Radio, Status, Box, SingleSelect, SingleSelectOption, IconButton, Loader, Tooltip, LinkButton } from "@strapi/design-system";
7
+ import { useIntl } from "react-intl";
8
+ import { useParams, useNavigate, Navigate, useMatch, useLocation, Link, NavLink } from "react-router-dom";
11
9
  import * as yup from "yup";
12
10
  import { ValidationError } from "yup";
13
11
  import pipe from "lodash/fp/pipe";
14
12
  import { intervalToDuration, isPast } from "date-fns";
13
+ import { styled } from "styled-components";
14
+ import { stringify } from "qs";
15
15
  import { createSlice, combineReducers } from "@reduxjs/toolkit";
16
16
  const __variableDynamicImportRuntimeHelper = (glob, path) => {
17
17
  const v = glob[path];
@@ -49,42 +49,6 @@ const useInjectionZone = (area) => {
49
49
  const [page, position] = area.split(".");
50
50
  return contentManagerPlugin.getInjectedComponents(page, position);
51
51
  };
52
- const HistoryAction = ({ model, document }) => {
53
- const { formatMessage } = useIntl();
54
- const [{ query }] = useQueryParams();
55
- const navigate = useNavigate();
56
- const pluginsQueryParams = stringify({ plugins: query.plugins }, { encode: false });
57
- if (!window.strapi.features.isEnabled("cms-content-history")) {
58
- return null;
59
- }
60
- return {
61
- icon: /* @__PURE__ */ jsx(ClockCounterClockwise, {}),
62
- label: formatMessage({
63
- id: "content-manager.history.document-action",
64
- defaultMessage: "Content History"
65
- }),
66
- onClick: () => navigate({ pathname: "history", search: pluginsQueryParams }),
67
- disabled: (
68
- /**
69
- * The user is creating a new document.
70
- * It hasn't been saved yet, so there's no history to go to
71
- */
72
- !document || /**
73
- * The document has been created but the current dimension has never been saved.
74
- * For example, the user is creating a new locale in an existing document,
75
- * so there's no history for the document in that locale
76
- */
77
- !document.id || /**
78
- * History is only available for content types created by the user.
79
- * These have the `api::` prefix, as opposed to the ones created by Strapi or plugins,
80
- * which start with `admin::` or `plugin::`
81
- */
82
- !model.startsWith("api::")
83
- ),
84
- position: "header"
85
- };
86
- };
87
- HistoryAction.type = "history";
88
52
  const ID = "id";
89
53
  const CREATED_BY_ATTRIBUTE_NAME = "createdBy";
90
54
  const UPDATED_BY_ATTRIBUTE_NAME = "updatedBy";
@@ -194,10 +158,12 @@ const contentManagerApi = adminApi.enhanceEndpoints({
194
158
  "Document",
195
159
  "InitialData",
196
160
  "HistoryVersion",
197
- "Relations"
161
+ "Relations",
162
+ "UidAvailability"
198
163
  ]
199
164
  });
200
165
  const documentApi = contentManagerApi.injectEndpoints({
166
+ overrideExisting: true,
201
167
  endpoints: (builder) => ({
202
168
  autoCloneDocument: builder.mutation({
203
169
  query: ({ model, sourceId, query }) => ({
@@ -207,7 +173,12 @@ const documentApi = contentManagerApi.injectEndpoints({
207
173
  params: query
208
174
  }
209
175
  }),
210
- invalidatesTags: (_result, _error, { model }) => [{ type: "Document", id: `${model}_LIST` }]
176
+ invalidatesTags: (_result, error, { model }) => {
177
+ if (error) {
178
+ return [];
179
+ }
180
+ return [{ type: "Document", id: `${model}_LIST` }];
181
+ }
211
182
  }),
212
183
  cloneDocument: builder.mutation({
213
184
  query: ({ model, sourceId, data, params }) => ({
@@ -218,7 +189,10 @@ const documentApi = contentManagerApi.injectEndpoints({
218
189
  params
219
190
  }
220
191
  }),
221
- invalidatesTags: (_result, _error, { model }) => [{ type: "Document", id: `${model}_LIST` }]
192
+ invalidatesTags: (_result, _error, { model }) => [
193
+ { type: "Document", id: `${model}_LIST` },
194
+ { type: "UidAvailability", id: model }
195
+ ]
222
196
  }),
223
197
  /**
224
198
  * Creates a new collection-type document. This should ONLY be used for collection-types.
@@ -235,7 +209,8 @@ const documentApi = contentManagerApi.injectEndpoints({
235
209
  }),
236
210
  invalidatesTags: (result, _error, { model }) => [
237
211
  { type: "Document", id: `${model}_LIST` },
238
- "Relations"
212
+ "Relations",
213
+ { type: "UidAvailability", id: model }
239
214
  ]
240
215
  }),
241
216
  deleteDocument: builder.mutation({
@@ -276,7 +251,8 @@ const documentApi = contentManagerApi.injectEndpoints({
276
251
  id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model
277
252
  },
278
253
  { type: "Document", id: `${model}_LIST` },
279
- "Relations"
254
+ "Relations",
255
+ { type: "UidAvailability", id: model }
280
256
  ];
281
257
  }
282
258
  }),
@@ -294,6 +270,7 @@ const documentApi = contentManagerApi.injectEndpoints({
294
270
  }),
295
271
  providesTags: (result, _error, arg) => {
296
272
  return [
273
+ { type: "Document", id: `ALL_LIST` },
297
274
  { type: "Document", id: `${arg.model}_LIST` },
298
275
  ...result?.results.map(({ documentId }) => ({
299
276
  type: "Document",
@@ -332,6 +309,11 @@ const documentApi = contentManagerApi.injectEndpoints({
332
309
  {
333
310
  type: "Document",
334
311
  id: collectionType !== SINGLE_TYPES ? `${model}_${result && "documentId" in result ? result.documentId : documentId}` : model
312
+ },
313
+ // Make it easy to invalidate all individual documents queries for a model
314
+ {
315
+ type: "Document",
316
+ id: `${model}_ALL_ITEMS`
335
317
  }
336
318
  ];
337
319
  }
@@ -395,8 +377,21 @@ const documentApi = contentManagerApi.injectEndpoints({
395
377
  type: "Document",
396
378
  id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model
397
379
  },
398
- "Relations"
380
+ "Relations",
381
+ { type: "UidAvailability", id: model }
399
382
  ];
383
+ },
384
+ async onQueryStarted({ data, ...patch }, { dispatch, queryFulfilled }) {
385
+ const patchResult = dispatch(
386
+ documentApi.util.updateQueryData("getDocument", patch, (draft) => {
387
+ Object.assign(draft.data, data);
388
+ })
389
+ );
390
+ try {
391
+ await queryFulfilled;
392
+ } catch {
393
+ patchResult.undo();
394
+ }
400
395
  }
401
396
  }),
402
397
  unpublishDocument: builder.mutation({
@@ -466,7 +461,7 @@ const buildValidParams = (query) => {
466
461
  const isBaseQueryError = (error) => {
467
462
  return error.name !== void 0;
468
463
  };
469
- const createYupSchema = (attributes = {}, components = {}) => {
464
+ const createYupSchema = (attributes = {}, components = {}, options = { status: null }) => {
470
465
  const createModelSchema = (attributes2) => yup.object().shape(
471
466
  Object.entries(attributes2).reduce((acc, [name, attribute]) => {
472
467
  if (DOCUMENT_META_FIELDS.includes(name)) {
@@ -479,7 +474,7 @@ const createYupSchema = (attributes = {}, components = {}) => {
479
474
  addMinValidation,
480
475
  addMaxValidation,
481
476
  addRegexValidation
482
- ].map((fn) => fn(attribute));
477
+ ].map((fn) => fn(attribute, options));
483
478
  const transformSchema = pipe(...validations);
484
479
  switch (attribute.type) {
485
480
  case "component": {
@@ -580,6 +575,14 @@ const createAttributeSchema = (attribute) => {
580
575
  if (!value || typeof value === "string" && value.length === 0) {
581
576
  return true;
582
577
  }
578
+ if (typeof value === "object") {
579
+ try {
580
+ JSON.stringify(value);
581
+ return true;
582
+ } catch (err) {
583
+ return false;
584
+ }
585
+ }
583
586
  try {
584
587
  JSON.parse(value);
585
588
  return true;
@@ -598,13 +601,7 @@ const createAttributeSchema = (attribute) => {
598
601
  return yup.mixed();
599
602
  }
600
603
  };
601
- const addRequiredValidation = (attribute) => (schema) => {
602
- if (attribute.required) {
603
- return schema.required({
604
- id: translatedErrors.required.id,
605
- defaultMessage: "This field is required."
606
- });
607
- }
604
+ const nullableSchema = (schema) => {
608
605
  return schema?.nullable ? schema.nullable() : (
609
606
  // In some cases '.nullable' will not be available on the schema.
610
607
  // e.g. when the schema has been built using yup.lazy (e.g. for relations).
@@ -612,7 +609,22 @@ const addRequiredValidation = (attribute) => (schema) => {
612
609
  schema
613
610
  );
614
611
  };
615
- const addMinLengthValidation = (attribute) => (schema) => {
612
+ const addRequiredValidation = (attribute, options) => (schema) => {
613
+ if (options.status === "draft") {
614
+ return nullableSchema(schema);
615
+ }
616
+ if ((attribute.type === "component" && attribute.repeatable || attribute.type === "dynamiczone") && attribute.required && "min" in schema) {
617
+ return schema.min(1, translatedErrors.required);
618
+ }
619
+ if (attribute.required && attribute.type !== "relation") {
620
+ return schema.required(translatedErrors.required);
621
+ }
622
+ return nullableSchema(schema);
623
+ };
624
+ const addMinLengthValidation = (attribute, options) => (schema) => {
625
+ if (options.status === "draft") {
626
+ return schema;
627
+ }
616
628
  if ("minLength" in attribute && attribute.minLength && Number.isInteger(attribute.minLength) && "min" in schema) {
617
629
  return schema.min(attribute.minLength, {
618
630
  ...translatedErrors.minLength,
@@ -634,9 +646,31 @@ const addMaxLengthValidation = (attribute) => (schema) => {
634
646
  }
635
647
  return schema;
636
648
  };
637
- const addMinValidation = (attribute) => (schema) => {
649
+ const addMinValidation = (attribute, options) => (schema) => {
638
650
  if ("min" in attribute) {
639
651
  const min = toInteger(attribute.min);
652
+ if (attribute.type === "component" && attribute.repeatable || attribute.type === "dynamiczone") {
653
+ if (options.status !== "draft" && !attribute.required && "test" in schema && min) {
654
+ return schema.test(
655
+ "custom-min",
656
+ {
657
+ ...translatedErrors.min,
658
+ values: {
659
+ min: attribute.min
660
+ }
661
+ },
662
+ (value) => {
663
+ if (!value) {
664
+ return true;
665
+ }
666
+ if (Array.isArray(value) && value.length === 0) {
667
+ return true;
668
+ }
669
+ return value.length >= min;
670
+ }
671
+ );
672
+ }
673
+ }
640
674
  if ("min" in schema && min) {
641
675
  return schema.min(min, {
642
676
  ...translatedErrors.min,
@@ -763,7 +797,10 @@ const useDocument = (args, opts) => {
763
797
  isLoading: isLoadingDocument,
764
798
  isFetching: isFetchingDocument,
765
799
  error
766
- } = useGetDocumentQuery(args, opts);
800
+ } = useGetDocumentQuery(args, {
801
+ ...opts,
802
+ skip: !args.documentId && args.collectionType !== SINGLE_TYPES || opts?.skip
803
+ });
767
804
  const { components, schema, isLoading: isLoadingSchema } = useContentTypeSchema(args.model);
768
805
  React.useEffect(() => {
769
806
  if (error) {
@@ -849,6 +886,8 @@ const useDocumentActions = () => {
849
886
  const { formatMessage } = useIntl();
850
887
  const { trackUsage } = useTracking();
851
888
  const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();
889
+ const navigate = useNavigate();
890
+ const setCurrentStep = useGuidedTour("useDocumentActions", (state) => state.setCurrentStep);
852
891
  const [deleteDocument] = useDeleteDocumentMutation();
853
892
  const _delete = React.useCallback(
854
893
  async ({ collectionType, model, documentId, params }, trackerProperty) => {
@@ -1163,6 +1202,7 @@ const useDocumentActions = () => {
1163
1202
  defaultMessage: "Saved document"
1164
1203
  })
1165
1204
  });
1205
+ setCurrentStep("contentManager.success");
1166
1206
  return res.data;
1167
1207
  } catch (err) {
1168
1208
  toggleNotification({
@@ -1184,7 +1224,6 @@ const useDocumentActions = () => {
1184
1224
  sourceId
1185
1225
  });
1186
1226
  if ("error" in res) {
1187
- toggleNotification({ type: "danger", message: formatAPIError(res.error) });
1188
1227
  return { error: res.error };
1189
1228
  }
1190
1229
  toggleNotification({
@@ -1203,7 +1242,7 @@ const useDocumentActions = () => {
1203
1242
  throw err;
1204
1243
  }
1205
1244
  },
1206
- [autoCloneDocument, formatAPIError, formatMessage, toggleNotification]
1245
+ [autoCloneDocument, formatMessage, toggleNotification]
1207
1246
  );
1208
1247
  const [cloneDocument] = useCloneDocumentMutation();
1209
1248
  const clone = React.useCallback(
@@ -1229,6 +1268,7 @@ const useDocumentActions = () => {
1229
1268
  defaultMessage: "Cloned document"
1230
1269
  })
1231
1270
  });
1271
+ navigate(`../../${res.data.data.documentId}`, { relative: "path" });
1232
1272
  return res.data;
1233
1273
  } catch (err) {
1234
1274
  toggleNotification({
@@ -1239,7 +1279,7 @@ const useDocumentActions = () => {
1239
1279
  throw err;
1240
1280
  }
1241
1281
  },
1242
- [cloneDocument, trackUsage, toggleNotification, formatMessage, formatAPIError]
1282
+ [cloneDocument, trackUsage, toggleNotification, formatMessage, formatAPIError, navigate]
1243
1283
  );
1244
1284
  const [getDoc] = useLazyGetDocumentQuery();
1245
1285
  const getDocument = React.useCallback(
@@ -1265,7 +1305,7 @@ const useDocumentActions = () => {
1265
1305
  };
1266
1306
  };
1267
1307
  const ProtectedHistoryPage = lazy(
1268
- () => import("./History-BVpd8LP3.mjs").then((mod) => ({ default: mod.ProtectedHistoryPage }))
1308
+ () => import("./History-FWwaCNUD.mjs").then((mod) => ({ default: mod.ProtectedHistoryPage }))
1269
1309
  );
1270
1310
  const routes$1 = [
1271
1311
  {
@@ -1278,31 +1318,31 @@ const routes$1 = [
1278
1318
  }
1279
1319
  ];
1280
1320
  const ProtectedEditViewPage = lazy(
1281
- () => import("./EditViewPage-0MiFkXa8.mjs").then((mod) => ({ default: mod.ProtectedEditViewPage }))
1321
+ () => import("./EditViewPage-s_bjnR0M.mjs").then((mod) => ({ default: mod.ProtectedEditViewPage }))
1282
1322
  );
1283
1323
  const ProtectedListViewPage = lazy(
1284
- () => import("./ListViewPage-Ds0ulgfG.mjs").then((mod) => ({ default: mod.ProtectedListViewPage }))
1324
+ () => import("./ListViewPage-DTSW3r3X.mjs").then((mod) => ({ default: mod.ProtectedListViewPage }))
1285
1325
  );
1286
1326
  const ProtectedListConfiguration = lazy(
1287
- () => import("./ListConfigurationPage-DozVMKcR.mjs").then((mod) => ({
1327
+ () => import("./ListConfigurationPage-BbOp66T2.mjs").then((mod) => ({
1288
1328
  default: mod.ProtectedListConfiguration
1289
1329
  }))
1290
1330
  );
1291
1331
  const ProtectedEditConfigurationPage = lazy(
1292
- () => import("./EditConfigurationPage-BwuIPOJG.mjs").then((mod) => ({
1332
+ () => import("./EditConfigurationPage-CjV1kPAw.mjs").then((mod) => ({
1293
1333
  default: mod.ProtectedEditConfigurationPage
1294
1334
  }))
1295
1335
  );
1296
1336
  const ProtectedComponentConfigurationPage = lazy(
1297
- () => import("./ComponentConfigurationPage-gdUj_t-O.mjs").then((mod) => ({
1337
+ () => import("./ComponentConfigurationPage-DgDrdk-k.mjs").then((mod) => ({
1298
1338
  default: mod.ProtectedComponentConfigurationPage
1299
1339
  }))
1300
1340
  );
1301
1341
  const NoPermissions = lazy(
1302
- () => import("./NoPermissionsPage-BT2Tn0D_.mjs").then((mod) => ({ default: mod.NoPermissions }))
1342
+ () => import("./NoPermissionsPage-B0vWytDx.mjs").then((mod) => ({ default: mod.NoPermissions }))
1303
1343
  );
1304
1344
  const NoContentType = lazy(
1305
- () => import("./NoContentTypePage-BH11kaKt.mjs").then((mod) => ({ default: mod.NoContentType }))
1345
+ () => import("./NoContentTypePage-A-6Pk0le.mjs").then((mod) => ({ default: mod.NoContentType }))
1306
1346
  );
1307
1347
  const CollectionTypePages = () => {
1308
1348
  const { collectionType } = useParams();
@@ -1416,12 +1456,14 @@ const DocumentActionButton = (action) => {
1416
1456
  /* @__PURE__ */ jsx(
1417
1457
  Button,
1418
1458
  {
1419
- flex: 1,
1459
+ flex: "auto",
1420
1460
  startIcon: action.icon,
1421
1461
  disabled: action.disabled,
1422
1462
  onClick: handleClick(action),
1423
1463
  justifyContent: "center",
1424
1464
  variant: action.variant || "default",
1465
+ paddingTop: "7px",
1466
+ paddingBottom: "7px",
1425
1467
  children: action.label
1426
1468
  }
1427
1469
  ),
@@ -1429,7 +1471,7 @@ const DocumentActionButton = (action) => {
1429
1471
  DocumentActionConfirmDialog,
1430
1472
  {
1431
1473
  ...action.dialog,
1432
- variant: action.variant,
1474
+ variant: action.dialog?.variant ?? action.variant,
1433
1475
  isOpen: dialogId === action.id,
1434
1476
  onClose: handleClose
1435
1477
  }
@@ -1486,9 +1528,9 @@ const DocumentActionsMenu = ({
1486
1528
  disabled: isDisabled,
1487
1529
  size: "S",
1488
1530
  endIcon: null,
1489
- paddingTop: "7px",
1490
- paddingLeft: "9px",
1491
- paddingRight: "9px",
1531
+ paddingTop: "4px",
1532
+ paddingLeft: "7px",
1533
+ paddingRight: "7px",
1492
1534
  variant,
1493
1535
  children: [
1494
1536
  /* @__PURE__ */ jsx(More, { "aria-hidden": true, focusable: false }),
@@ -1499,7 +1541,7 @@ const DocumentActionsMenu = ({
1499
1541
  ]
1500
1542
  }
1501
1543
  ),
1502
- /* @__PURE__ */ jsxs(Menu.Content, { top: "4px", maxHeight: void 0, popoverPlacement: "bottom-end", children: [
1544
+ /* @__PURE__ */ jsxs(Menu.Content, { maxHeight: void 0, popoverPlacement: "bottom-end", children: [
1503
1545
  actions2.map((action) => {
1504
1546
  return /* @__PURE__ */ jsx(
1505
1547
  Menu.Item,
@@ -1508,10 +1550,25 @@ const DocumentActionsMenu = ({
1508
1550
  onSelect: handleClick(action),
1509
1551
  display: "block",
1510
1552
  children: /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", gap: 4, children: [
1511
- /* @__PURE__ */ jsxs(Flex, { color: convertActionVariantToColor(action.variant), gap: 2, tag: "span", children: [
1512
- action.icon,
1513
- action.label
1514
- ] }),
1553
+ /* @__PURE__ */ jsxs(
1554
+ Flex,
1555
+ {
1556
+ color: !action.disabled ? convertActionVariantToColor(action.variant) : "inherit",
1557
+ gap: 2,
1558
+ tag: "span",
1559
+ children: [
1560
+ /* @__PURE__ */ jsx(
1561
+ Flex,
1562
+ {
1563
+ tag: "span",
1564
+ color: !action.disabled ? convertActionVariantToIconColor(action.variant) : "inherit",
1565
+ children: action.icon
1566
+ }
1567
+ ),
1568
+ action.label
1569
+ ]
1570
+ }
1571
+ ),
1515
1572
  action.id.startsWith("HistoryAction") && /* @__PURE__ */ jsx(
1516
1573
  Flex,
1517
1574
  {
@@ -1570,6 +1627,18 @@ const convertActionVariantToColor = (variant = "secondary") => {
1570
1627
  return "primary600";
1571
1628
  }
1572
1629
  };
1630
+ const convertActionVariantToIconColor = (variant = "secondary") => {
1631
+ switch (variant) {
1632
+ case "danger":
1633
+ return "danger600";
1634
+ case "secondary":
1635
+ return "neutral500";
1636
+ case "success":
1637
+ return "success600";
1638
+ default:
1639
+ return "primary600";
1640
+ }
1641
+ };
1573
1642
  const DocumentActionConfirmDialog = ({
1574
1643
  onClose,
1575
1644
  onCancel,
@@ -1596,11 +1665,11 @@ const DocumentActionConfirmDialog = ({
1596
1665
  /* @__PURE__ */ jsx(Dialog.Header, { children: title }),
1597
1666
  /* @__PURE__ */ jsx(Dialog.Body, { children: content }),
1598
1667
  /* @__PURE__ */ jsxs(Dialog.Footer, { children: [
1599
- /* @__PURE__ */ jsx(Dialog.Cancel, { children: /* @__PURE__ */ jsx(Button, { variant: "tertiary", children: formatMessage({
1668
+ /* @__PURE__ */ jsx(Dialog.Cancel, { children: /* @__PURE__ */ jsx(Button, { variant: "tertiary", fullWidth: true, children: formatMessage({
1600
1669
  id: "app.components.Button.cancel",
1601
1670
  defaultMessage: "Cancel"
1602
1671
  }) }) }),
1603
- /* @__PURE__ */ jsx(Button, { onClick: handleConfirm, variant, children: formatMessage({
1672
+ /* @__PURE__ */ jsx(Button, { onClick: handleConfirm, variant, fullWidth: true, children: formatMessage({
1604
1673
  id: "app.components.Button.confirm",
1605
1674
  defaultMessage: "Confirm"
1606
1675
  }) })
@@ -1639,13 +1708,17 @@ const PublishAction$1 = ({
1639
1708
  const navigate = useNavigate();
1640
1709
  const { toggleNotification } = useNotification();
1641
1710
  const { _unstableFormatValidationErrors: formatValidationErrors } = useAPIErrorHandler();
1711
+ const isListView = useMatch(LIST_PATH) !== null;
1642
1712
  const isCloning = useMatch(CLONE_PATH) !== null;
1643
1713
  const { formatMessage } = useIntl();
1644
- const { canPublish, canCreate, canUpdate } = useDocumentRBAC(
1645
- "PublishAction",
1646
- ({ canPublish: canPublish2, canCreate: canCreate2, canUpdate: canUpdate2 }) => ({ canPublish: canPublish2, canCreate: canCreate2, canUpdate: canUpdate2 })
1647
- );
1714
+ const canPublish = useDocumentRBAC("PublishAction", ({ canPublish: canPublish2 }) => canPublish2);
1648
1715
  const { publish } = useDocumentActions();
1716
+ const [
1717
+ countDraftRelations,
1718
+ { isLoading: isLoadingDraftRelations, isError: isErrorDraftRelations }
1719
+ ] = useLazyGetDraftRelationCountQuery();
1720
+ const [localCountOfDraftRelations, setLocalCountOfDraftRelations] = React.useState(0);
1721
+ const [serverCountOfDraftRelations, setServerCountOfDraftRelations] = React.useState(0);
1649
1722
  const [{ query, rawQuery }] = useQueryParams();
1650
1723
  const params = React.useMemo(() => buildValidParams(query), [query]);
1651
1724
  const modified = useForm("PublishAction", ({ modified: modified2 }) => modified2);
@@ -1654,10 +1727,103 @@ const PublishAction$1 = ({
1654
1727
  const validate = useForm("PublishAction", (state) => state.validate);
1655
1728
  const setErrors = useForm("PublishAction", (state) => state.setErrors);
1656
1729
  const formValues = useForm("PublishAction", ({ values }) => values);
1730
+ React.useEffect(() => {
1731
+ if (isErrorDraftRelations) {
1732
+ toggleNotification({
1733
+ type: "danger",
1734
+ message: formatMessage({
1735
+ id: getTranslation("error.records.fetch-draft-relatons"),
1736
+ defaultMessage: "An error occurred while fetching draft relations on this document."
1737
+ })
1738
+ });
1739
+ }
1740
+ }, [isErrorDraftRelations, toggleNotification, formatMessage]);
1741
+ React.useEffect(() => {
1742
+ const localDraftRelations = /* @__PURE__ */ new Set();
1743
+ const extractDraftRelations = (data) => {
1744
+ const relations = data.connect || [];
1745
+ relations.forEach((relation) => {
1746
+ if (relation.status === "draft") {
1747
+ localDraftRelations.add(relation.id);
1748
+ }
1749
+ });
1750
+ };
1751
+ const traverseAndExtract = (data) => {
1752
+ Object.entries(data).forEach(([key, value]) => {
1753
+ if (key === "connect" && Array.isArray(value)) {
1754
+ extractDraftRelations({ connect: value });
1755
+ } else if (typeof value === "object" && value !== null) {
1756
+ traverseAndExtract(value);
1757
+ }
1758
+ });
1759
+ };
1760
+ if (!documentId || modified) {
1761
+ traverseAndExtract(formValues);
1762
+ setLocalCountOfDraftRelations(localDraftRelations.size);
1763
+ }
1764
+ }, [documentId, modified, formValues, setLocalCountOfDraftRelations]);
1765
+ React.useEffect(() => {
1766
+ if (!document || !document.documentId || isListView) {
1767
+ return;
1768
+ }
1769
+ const fetchDraftRelationsCount = async () => {
1770
+ const { data, error } = await countDraftRelations({
1771
+ collectionType,
1772
+ model,
1773
+ documentId,
1774
+ params
1775
+ });
1776
+ if (error) {
1777
+ throw error;
1778
+ }
1779
+ if (data) {
1780
+ setServerCountOfDraftRelations(data.data);
1781
+ }
1782
+ };
1783
+ fetchDraftRelationsCount();
1784
+ }, [isListView, document, documentId, countDraftRelations, collectionType, model, params]);
1657
1785
  const isDocumentPublished = (document?.[PUBLISHED_AT_ATTRIBUTE_NAME] || meta?.availableStatus.some((doc) => doc[PUBLISHED_AT_ATTRIBUTE_NAME] !== null)) && document?.status !== "modified";
1658
1786
  if (!schema?.options?.draftAndPublish) {
1659
1787
  return null;
1660
1788
  }
1789
+ const performPublish = async () => {
1790
+ setSubmitting(true);
1791
+ try {
1792
+ const { errors } = await validate();
1793
+ if (errors) {
1794
+ toggleNotification({
1795
+ type: "danger",
1796
+ message: formatMessage({
1797
+ id: "content-manager.validation.error",
1798
+ defaultMessage: "There are validation errors in your document. Please fix them before saving."
1799
+ })
1800
+ });
1801
+ return;
1802
+ }
1803
+ const res = await publish(
1804
+ {
1805
+ collectionType,
1806
+ model,
1807
+ documentId,
1808
+ params
1809
+ },
1810
+ formValues
1811
+ );
1812
+ if ("data" in res && collectionType !== SINGLE_TYPES) {
1813
+ navigate({
1814
+ pathname: `../${collectionType}/${model}/${res.data.documentId}`,
1815
+ search: rawQuery
1816
+ });
1817
+ } else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
1818
+ setErrors(formatValidationErrors(res.error));
1819
+ }
1820
+ } finally {
1821
+ setSubmitting(false);
1822
+ }
1823
+ };
1824
+ const totalDraftRelations = localCountOfDraftRelations + serverCountOfDraftRelations;
1825
+ const enableDraftRelationsCount = false;
1826
+ const hasDraftRelations = enableDraftRelationsCount;
1661
1827
  return {
1662
1828
  /**
1663
1829
  * Disabled when:
@@ -1667,49 +1833,36 @@ const PublishAction$1 = ({
1667
1833
  * - the document is already published & not modified
1668
1834
  * - the document is being created & not modified
1669
1835
  * - the user doesn't have the permission to publish
1670
- * - the user doesn't have the permission to create a new document
1671
- * - the user doesn't have the permission to update the document
1672
1836
  */
1673
- disabled: isCloning || isSubmitting || activeTab === "published" || !modified && isDocumentPublished || !modified && !document?.documentId || !canPublish || Boolean(!document?.documentId && !canCreate || document?.documentId && !canUpdate),
1837
+ disabled: isCloning || isSubmitting || isLoadingDraftRelations || activeTab === "published" || !modified && isDocumentPublished || !modified && !document?.documentId || !canPublish,
1674
1838
  label: formatMessage({
1675
1839
  id: "app.utils.publish",
1676
1840
  defaultMessage: "Publish"
1677
1841
  }),
1678
1842
  onClick: async () => {
1679
- setSubmitting(true);
1680
- try {
1681
- const { errors } = await validate();
1682
- if (errors) {
1683
- toggleNotification({
1684
- type: "danger",
1685
- message: formatMessage({
1686
- id: "content-manager.validation.error",
1687
- defaultMessage: "There are validation errors in your document. Please fix them before saving."
1688
- })
1689
- });
1690
- return;
1691
- }
1692
- const res = await publish(
1693
- {
1694
- collectionType,
1695
- model,
1696
- documentId,
1697
- params
1698
- },
1699
- formValues
1700
- );
1701
- if ("data" in res && collectionType !== SINGLE_TYPES) {
1702
- navigate({
1703
- pathname: `../${collectionType}/${model}/${res.data.documentId}`,
1704
- search: rawQuery
1705
- });
1706
- } else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
1707
- setErrors(formatValidationErrors(res.error));
1843
+ await performPublish();
1844
+ },
1845
+ dialog: hasDraftRelations ? {
1846
+ type: "dialog",
1847
+ variant: "danger",
1848
+ footer: null,
1849
+ title: formatMessage({
1850
+ id: getTranslation(`popUpwarning.warning.bulk-has-draft-relations.title`),
1851
+ defaultMessage: "Confirmation"
1852
+ }),
1853
+ content: formatMessage(
1854
+ {
1855
+ id: getTranslation(`popUpwarning.warning.bulk-has-draft-relations.message`),
1856
+ defaultMessage: "This entry is related to {count, plural, one {# draft entry} other {# draft entries}}. Publishing it could leave broken links in your app."
1857
+ },
1858
+ {
1859
+ count: totalDraftRelations
1708
1860
  }
1709
- } finally {
1710
- setSubmitting(false);
1861
+ ),
1862
+ onConfirm: async () => {
1863
+ await performPublish();
1711
1864
  }
1712
- }
1865
+ } : void 0
1713
1866
  };
1714
1867
  };
1715
1868
  PublishAction$1.type = "publish";
@@ -1725,10 +1878,6 @@ const UpdateAction = ({
1725
1878
  const cloneMatch = useMatch(CLONE_PATH);
1726
1879
  const isCloning = cloneMatch !== null;
1727
1880
  const { formatMessage } = useIntl();
1728
- const { canCreate, canUpdate } = useDocumentRBAC("UpdateAction", ({ canCreate: canCreate2, canUpdate: canUpdate2 }) => ({
1729
- canCreate: canCreate2,
1730
- canUpdate: canUpdate2
1731
- }));
1732
1881
  const { create, update, clone } = useDocumentActions();
1733
1882
  const [{ query, rawQuery }] = useQueryParams();
1734
1883
  const params = React.useMemo(() => buildValidParams(query), [query]);
@@ -1745,10 +1894,8 @@ const UpdateAction = ({
1745
1894
  * - the form is submitting
1746
1895
  * - the document is not modified & we're not cloning (you can save a clone entity straight away)
1747
1896
  * - the active tab is the published tab
1748
- * - the user doesn't have the permission to create a new document
1749
- * - the user doesn't have the permission to update the document
1750
1897
  */
1751
- disabled: isSubmitting || !modified && !isCloning || activeTab === "published" || Boolean(!documentId && !canCreate || documentId && !canUpdate),
1898
+ disabled: isSubmitting || !modified && !isCloning || activeTab === "published",
1752
1899
  label: formatMessage({
1753
1900
  id: "content-manager.containers.Edit.save",
1754
1901
  defaultMessage: "Save"
@@ -1756,16 +1903,18 @@ const UpdateAction = ({
1756
1903
  onClick: async () => {
1757
1904
  setSubmitting(true);
1758
1905
  try {
1759
- const { errors } = await validate();
1760
- if (errors) {
1761
- toggleNotification({
1762
- type: "danger",
1763
- message: formatMessage({
1764
- id: "content-manager.validation.error",
1765
- defaultMessage: "There are validation errors in your document. Please fix them before saving."
1766
- })
1767
- });
1768
- return;
1906
+ if (activeTab !== "draft") {
1907
+ const { errors } = await validate();
1908
+ if (errors) {
1909
+ toggleNotification({
1910
+ type: "danger",
1911
+ message: formatMessage({
1912
+ id: "content-manager.validation.error",
1913
+ defaultMessage: "There are validation errors in your document. Please fix them before saving."
1914
+ })
1915
+ });
1916
+ return;
1917
+ }
1769
1918
  }
1770
1919
  if (isCloning) {
1771
1920
  const res = await clone(
@@ -1777,10 +1926,13 @@ const UpdateAction = ({
1777
1926
  document
1778
1927
  );
1779
1928
  if ("data" in res) {
1780
- navigate({
1781
- pathname: `../${collectionType}/${model}/${res.data.documentId}`,
1782
- search: rawQuery
1783
- });
1929
+ navigate(
1930
+ {
1931
+ pathname: `../${res.data.documentId}`,
1932
+ search: rawQuery
1933
+ },
1934
+ { relative: "path" }
1935
+ );
1784
1936
  } else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
1785
1937
  setErrors(formatValidationErrors(res.error));
1786
1938
  }
@@ -1808,10 +1960,13 @@ const UpdateAction = ({
1808
1960
  document
1809
1961
  );
1810
1962
  if ("data" in res && collectionType !== SINGLE_TYPES) {
1811
- navigate({
1812
- pathname: `../${collectionType}/${model}/${res.data.documentId}`,
1813
- search: rawQuery
1814
- });
1963
+ navigate(
1964
+ {
1965
+ pathname: `../${res.data.documentId}`,
1966
+ search: rawQuery
1967
+ },
1968
+ { replace: true, relative: "path" }
1969
+ );
1815
1970
  } else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
1816
1971
  setErrors(formatValidationErrors(res.error));
1817
1972
  }
@@ -1855,7 +2010,7 @@ const UnpublishAction$1 = ({
1855
2010
  id: "app.utils.unpublish",
1856
2011
  defaultMessage: "Unpublish"
1857
2012
  }),
1858
- icon: /* @__PURE__ */ jsx(StyledCrossCircle, {}),
2013
+ icon: /* @__PURE__ */ jsx(Cross, {}),
1859
2014
  onClick: async () => {
1860
2015
  if (!documentId && collectionType !== SINGLE_TYPES || isDocumentModified) {
1861
2016
  if (!documentId) {
@@ -1967,7 +2122,7 @@ const DiscardAction = ({
1967
2122
  id: "content-manager.actions.discard.label",
1968
2123
  defaultMessage: "Discard changes"
1969
2124
  }),
1970
- icon: /* @__PURE__ */ jsx(StyledCrossCircle, {}),
2125
+ icon: /* @__PURE__ */ jsx(Cross, {}),
1971
2126
  position: ["panel", "table-row"],
1972
2127
  variant: "danger",
1973
2128
  dialog: {
@@ -1995,11 +2150,6 @@ const DiscardAction = ({
1995
2150
  };
1996
2151
  };
1997
2152
  DiscardAction.type = "discard";
1998
- const StyledCrossCircle = styled(CrossCircle)`
1999
- path {
2000
- fill: currentColor;
2001
- }
2002
- `;
2003
2153
  const DEFAULT_ACTIONS = [PublishAction$1, UpdateAction, UnpublishAction$1, DiscardAction];
2004
2154
  const intervals = ["years", "months", "days", "hours", "minutes", "seconds"];
2005
2155
  const RelativeTime = React.forwardRef(
@@ -2047,7 +2197,7 @@ const getDisplayName = ({
2047
2197
  };
2048
2198
  const capitalise = (str) => str.charAt(0).toUpperCase() + str.slice(1);
2049
2199
  const DocumentStatus = ({ status = "draft", ...restProps }) => {
2050
- const statusVariant = status === "draft" ? "primary" : status === "published" ? "success" : "alternative";
2200
+ const statusVariant = status === "draft" ? "secondary" : status === "published" ? "success" : "alternative";
2051
2201
  return /* @__PURE__ */ jsx(Status, { ...restProps, showBullet: false, size: "S", variant: statusVariant, children: /* @__PURE__ */ jsx(Typography, { tag: "span", variant: "omega", fontWeight: "bold", children: capitalise(status) }) });
2052
2202
  };
2053
2203
  const Header = ({ isCreating, status, title: documentTitle = "Untitled" }) => {
@@ -2057,23 +2207,13 @@ const Header = ({ isCreating, status, title: documentTitle = "Untitled" }) => {
2057
2207
  id: "content-manager.containers.edit.title.new",
2058
2208
  defaultMessage: "Create an entry"
2059
2209
  }) : documentTitle;
2060
- return /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "flex-start", paddingTop: 8, paddingBottom: 4, gap: 3, children: [
2210
+ return /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "flex-start", paddingTop: 6, paddingBottom: 4, gap: 2, children: [
2061
2211
  /* @__PURE__ */ jsx(BackButton, {}),
2062
- /* @__PURE__ */ jsxs(
2063
- Flex,
2064
- {
2065
- width: "100%",
2066
- justifyContent: "space-between",
2067
- paddingTop: 1,
2068
- gap: "80px",
2069
- alignItems: "flex-start",
2070
- children: [
2071
- /* @__PURE__ */ jsx(Typography, { variant: "alpha", tag: "h1", children: title }),
2072
- /* @__PURE__ */ jsx(HeaderToolbar, {})
2073
- ]
2074
- }
2075
- ),
2076
- status ? /* @__PURE__ */ jsx(DocumentStatus, { status: isCloning ? "draft" : status }) : null
2212
+ /* @__PURE__ */ jsxs(Flex, { width: "100%", justifyContent: "space-between", gap: "80px", alignItems: "flex-start", children: [
2213
+ /* @__PURE__ */ jsx(Typography, { variant: "alpha", tag: "h1", children: title }),
2214
+ /* @__PURE__ */ jsx(HeaderToolbar, {})
2215
+ ] }),
2216
+ status ? /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(DocumentStatus, { status: isCloning ? "draft" : status }) }) : null
2077
2217
  ] });
2078
2218
  };
2079
2219
  const HeaderToolbar = () => {
@@ -2240,8 +2380,22 @@ const Information = ({ activeTab }) => {
2240
2380
  );
2241
2381
  };
2242
2382
  const HeaderActions = ({ actions: actions2 }) => {
2243
- return /* @__PURE__ */ jsx(Flex, { children: actions2.map((action) => {
2244
- if ("options" in action) {
2383
+ const [dialogId, setDialogId] = React.useState(null);
2384
+ const handleClick = (action) => async (e) => {
2385
+ if (!("options" in action)) {
2386
+ const { onClick = () => false, dialog, id } = action;
2387
+ const muteDialog = await onClick(e);
2388
+ if (dialog && !muteDialog) {
2389
+ e.preventDefault();
2390
+ setDialogId(id);
2391
+ }
2392
+ }
2393
+ };
2394
+ const handleClose = () => {
2395
+ setDialogId(null);
2396
+ };
2397
+ return /* @__PURE__ */ jsx(Flex, { gap: 1, children: actions2.map((action) => {
2398
+ if (action.options) {
2245
2399
  return /* @__PURE__ */ jsx(
2246
2400
  SingleSelect,
2247
2401
  {
@@ -2255,10 +2409,49 @@ const HeaderActions = ({ actions: actions2 }) => {
2255
2409
  action.id
2256
2410
  );
2257
2411
  } else {
2258
- return null;
2412
+ if (action.type === "icon") {
2413
+ return /* @__PURE__ */ jsxs(React.Fragment, { children: [
2414
+ /* @__PURE__ */ jsx(
2415
+ IconButton,
2416
+ {
2417
+ disabled: action.disabled,
2418
+ label: action.label,
2419
+ size: "S",
2420
+ onClick: handleClick(action),
2421
+ children: action.icon
2422
+ }
2423
+ ),
2424
+ action.dialog ? /* @__PURE__ */ jsx(
2425
+ HeaderActionDialog,
2426
+ {
2427
+ ...action.dialog,
2428
+ isOpen: dialogId === action.id,
2429
+ onClose: handleClose
2430
+ }
2431
+ ) : null
2432
+ ] }, action.id);
2433
+ }
2259
2434
  }
2260
2435
  }) });
2261
2436
  };
2437
+ const HeaderActionDialog = ({
2438
+ onClose,
2439
+ onCancel,
2440
+ title,
2441
+ content: Content,
2442
+ isOpen
2443
+ }) => {
2444
+ const handleClose = async () => {
2445
+ if (onCancel) {
2446
+ await onCancel();
2447
+ }
2448
+ onClose();
2449
+ };
2450
+ return /* @__PURE__ */ jsx(Dialog.Root, { open: isOpen, onOpenChange: handleClose, children: /* @__PURE__ */ jsxs(Dialog.Content, { children: [
2451
+ /* @__PURE__ */ jsx(Dialog.Header, { children: title }),
2452
+ typeof Content === "function" ? /* @__PURE__ */ jsx(Content, { onClose: handleClose }) : Content
2453
+ ] }) });
2454
+ };
2262
2455
  const ConfigureTheViewAction = ({ collectionType, model }) => {
2263
2456
  const navigate = useNavigate();
2264
2457
  const { formatMessage } = useIntl();
@@ -2394,7 +2587,7 @@ const ActionsPanel = () => {
2394
2587
  return {
2395
2588
  title: formatMessage({
2396
2589
  id: "content-manager.containers.edit.panels.default.title",
2397
- defaultMessage: "Document"
2590
+ defaultMessage: "Entry"
2398
2591
  }),
2399
2592
  content: /* @__PURE__ */ jsx(ActionsPanelContent, {})
2400
2593
  };
@@ -2638,7 +2831,8 @@ const formatEditLayout = (data, {
2638
2831
  layout: convertEditLayoutToFieldLayouts(
2639
2832
  configuration.layouts.edit,
2640
2833
  components[uid].attributes,
2641
- configuration.metadatas
2834
+ configuration.metadatas,
2835
+ { configurations: data.components, schemas: components }
2642
2836
  ),
2643
2837
  settings: {
2644
2838
  ...configuration.settings,
@@ -2764,7 +2958,7 @@ const ConfirmBulkActionDialog = ({
2764
2958
  endAction
2765
2959
  }) => {
2766
2960
  const { formatMessage } = useIntl();
2767
- return /* @__PURE__ */ jsx(Dialog.Root, { onOpenChange: onToggleDialog, open: isOpen, children: /* @__PURE__ */ jsxs(Dialog.Content, { children: [
2961
+ return /* @__PURE__ */ jsx(Dialog.Root, { open: isOpen, children: /* @__PURE__ */ jsxs(Dialog.Content, { children: [
2768
2962
  /* @__PURE__ */ jsx(Dialog.Header, { children: formatMessage({
2769
2963
  id: "app.components.ConfirmDialog.title",
2770
2964
  defaultMessage: "Confirmation"
@@ -2795,6 +2989,7 @@ const ConfirmDialogPublishAll = ({
2795
2989
  const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler(getTranslation);
2796
2990
  const { model, schema } = useDoc();
2797
2991
  const [{ query }] = useQueryParams();
2992
+ const enableDraftRelationsCount = false;
2798
2993
  const {
2799
2994
  data: countDraftRelations = 0,
2800
2995
  isLoading,
@@ -2806,7 +3001,7 @@ const ConfirmDialogPublishAll = ({
2806
3001
  locale: query?.plugins?.i18n?.locale
2807
3002
  },
2808
3003
  {
2809
- skip: selectedEntries.length === 0
3004
+ skip: !enableDraftRelationsCount
2810
3005
  }
2811
3006
  );
2812
3007
  React.useEffect(() => {
@@ -2885,7 +3080,14 @@ const formatErrorMessages = (errors, parentKey, formatMessage) => {
2885
3080
  )
2886
3081
  );
2887
3082
  } else {
2888
- messages.push(...formatErrorMessages(value, currentKey, formatMessage));
3083
+ messages.push(
3084
+ ...formatErrorMessages(
3085
+ // @ts-expect-error TODO: check why value is not compatible with FormErrors
3086
+ value,
3087
+ currentKey,
3088
+ formatMessage
3089
+ )
3090
+ );
2889
3091
  }
2890
3092
  } else {
2891
3093
  messages.push(
@@ -2984,7 +3186,7 @@ const SelectedEntriesTableContent = ({
2984
3186
  status: row.status
2985
3187
  }
2986
3188
  ) }),
2987
- /* @__PURE__ */ jsx(Table.Cell, { children: /* @__PURE__ */ jsx(
3189
+ /* @__PURE__ */ jsx(Table.Cell, { children: /* @__PURE__ */ jsx(Flex, { children: /* @__PURE__ */ jsx(
2988
3190
  IconButton,
2989
3191
  {
2990
3192
  tag: Link,
@@ -3007,9 +3209,10 @@ const SelectedEntriesTableContent = ({
3007
3209
  ),
3008
3210
  target: "_blank",
3009
3211
  marginLeft: "auto",
3010
- children: /* @__PURE__ */ jsx(Pencil, {})
3212
+ variant: "ghost",
3213
+ children: /* @__PURE__ */ jsx(Pencil, { width: "1.6rem", height: "1.6rem" })
3011
3214
  }
3012
- ) })
3215
+ ) }) })
3013
3216
  ] }, row.id)) })
3014
3217
  ] });
3015
3218
  };
@@ -3046,7 +3249,13 @@ const SelectedEntriesModalContent = ({
3046
3249
  );
3047
3250
  const { rows, validationErrors } = React.useMemo(() => {
3048
3251
  if (data.length > 0 && schema) {
3049
- const validate = createYupSchema(schema.attributes, components);
3252
+ const validate = createYupSchema(
3253
+ schema.attributes,
3254
+ components,
3255
+ // Since this is the "Publish" action, the validation
3256
+ // schema must enforce the rules for published entities
3257
+ { status: "published" }
3258
+ );
3050
3259
  const validationErrors2 = {};
3051
3260
  const rows2 = data.map((entry) => {
3052
3261
  try {
@@ -3396,7 +3605,7 @@ const TableActions = ({ document }) => {
3396
3605
  DescriptionComponentRenderer,
3397
3606
  {
3398
3607
  props,
3399
- descriptions: plugins["content-manager"].apis.getDocumentActions(),
3608
+ descriptions: plugins["content-manager"].apis.getDocumentActions().filter((action) => action.name !== "PublishAction"),
3400
3609
  children: (actions2) => {
3401
3610
  const tableRowActions = actions2.filter((action) => {
3402
3611
  const positions = Array.isArray(action.position) ? action.position : [action.position];
@@ -3507,7 +3716,7 @@ const CloneAction = ({ model, documentId }) => {
3507
3716
  }),
3508
3717
  content: /* @__PURE__ */ jsx(AutoCloneFailureModalBody, { prohibitedFields }),
3509
3718
  footer: ({ onClose }) => {
3510
- return /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", children: [
3719
+ return /* @__PURE__ */ jsxs(Modal.Footer, { children: [
3511
3720
  /* @__PURE__ */ jsx(Button, { onClick: onClose, variant: "tertiary", children: formatMessage({
3512
3721
  id: "cancel",
3513
3722
  defaultMessage: "Cancel"
@@ -3548,8 +3757,7 @@ class ContentManagerPlugin {
3548
3757
  documentActions = [
3549
3758
  ...DEFAULT_ACTIONS,
3550
3759
  ...DEFAULT_TABLE_ROW_ACTIONS,
3551
- ...DEFAULT_HEADER_ACTIONS,
3552
- HistoryAction
3760
+ ...DEFAULT_HEADER_ACTIONS
3553
3761
  ];
3554
3762
  editViewSidePanels = [ActionsPanel];
3555
3763
  headerActions = [];
@@ -3638,6 +3846,52 @@ const getPrintableType = (value) => {
3638
3846
  }
3639
3847
  return nativeType;
3640
3848
  };
3849
+ const HistoryAction = ({ model, document }) => {
3850
+ const { formatMessage } = useIntl();
3851
+ const [{ query }] = useQueryParams();
3852
+ const navigate = useNavigate();
3853
+ const pluginsQueryParams = stringify({ plugins: query.plugins }, { encode: false });
3854
+ if (!window.strapi.features.isEnabled("cms-content-history")) {
3855
+ return null;
3856
+ }
3857
+ return {
3858
+ icon: /* @__PURE__ */ jsx(ClockCounterClockwise, {}),
3859
+ label: formatMessage({
3860
+ id: "content-manager.history.document-action",
3861
+ defaultMessage: "Content History"
3862
+ }),
3863
+ onClick: () => navigate({ pathname: "history", search: pluginsQueryParams }),
3864
+ disabled: (
3865
+ /**
3866
+ * The user is creating a new document.
3867
+ * It hasn't been saved yet, so there's no history to go to
3868
+ */
3869
+ !document || /**
3870
+ * The document has been created but the current dimension has never been saved.
3871
+ * For example, the user is creating a new locale in an existing document,
3872
+ * so there's no history for the document in that locale
3873
+ */
3874
+ !document.id || /**
3875
+ * History is only available for content types created by the user.
3876
+ * These have the `api::` prefix, as opposed to the ones created by Strapi or plugins,
3877
+ * which start with `admin::` or `plugin::`
3878
+ */
3879
+ !model.startsWith("api::")
3880
+ ),
3881
+ position: "header"
3882
+ };
3883
+ };
3884
+ HistoryAction.type = "history";
3885
+ const historyAdmin = {
3886
+ bootstrap(app) {
3887
+ const { addDocumentAction } = app.getPlugin("content-manager").apis;
3888
+ addDocumentAction((actions2) => {
3889
+ const indexOfDeleteAction = actions2.findIndex((action) => action.type === "delete");
3890
+ actions2.splice(indexOfDeleteAction, 0, HistoryAction);
3891
+ return actions2;
3892
+ });
3893
+ }
3894
+ };
3641
3895
  const initialState = {
3642
3896
  collectionTypeLinks: [],
3643
3897
  components: [],
@@ -3688,15 +3942,29 @@ const index = {
3688
3942
  defaultMessage: "Content Manager"
3689
3943
  },
3690
3944
  permissions: [],
3691
- Component: () => import("./layout-DC503LnF.mjs").then((mod) => ({ default: mod.Layout })),
3692
3945
  position: 1
3693
3946
  });
3947
+ app.router.addRoute({
3948
+ path: "content-manager/*",
3949
+ lazy: async () => {
3950
+ const { Layout } = await import("./layout-BV5oiZQ9.mjs");
3951
+ return {
3952
+ Component: Layout
3953
+ };
3954
+ },
3955
+ children: routes
3956
+ });
3694
3957
  app.registerPlugin(cm.config);
3695
3958
  },
3959
+ bootstrap(app) {
3960
+ if (typeof historyAdmin.bootstrap === "function") {
3961
+ historyAdmin.bootstrap(app);
3962
+ }
3963
+ },
3696
3964
  async registerTrads({ locales }) {
3697
3965
  const importedTrads = await Promise.all(
3698
3966
  locales.map((locale) => {
3699
- return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/ar.json": () => import("./ar-CCEVvqGG.mjs"), "./translations/ca.json": () => import("./ca-5U32ON2v.mjs"), "./translations/cs.json": () => import("./cs-CM2aBUar.mjs"), "./translations/de.json": () => import("./de-C72KDNOl.mjs"), "./translations/en.json": () => import("./en-Ux26r5pl.mjs"), "./translations/es.json": () => import("./es-CeXiYflN.mjs"), "./translations/eu.json": () => import("./eu-CdALomew.mjs"), "./translations/fr.json": () => import("./fr-CD9VFbPM.mjs"), "./translations/gu.json": () => import("./gu-CNpaMDpH.mjs"), "./translations/hi.json": () => import("./hi-Dwvd04m3.mjs"), "./translations/hu.json": () => import("./hu-CeYvaaO0.mjs"), "./translations/id.json": () => import("./id-BtwA9WJT.mjs"), "./translations/it.json": () => import("./it-BrVPqaf1.mjs"), "./translations/ja.json": () => import("./ja-CtsUxOvk.mjs"), "./translations/ko.json": () => import("./ko-HVQRlfUI.mjs"), "./translations/ml.json": () => import("./ml-BihZwQit.mjs"), "./translations/ms.json": () => import("./ms-m_WjyWx7.mjs"), "./translations/nl.json": () => import("./nl-D4R9gHx5.mjs"), "./translations/pl.json": () => import("./pl-sbx9mSt_.mjs"), "./translations/pt-BR.json": () => import("./pt-BR-C71iDxnh.mjs"), "./translations/pt.json": () => import("./pt-BsaFvS8-.mjs"), "./translations/ru.json": () => import("./ru-BE6A4Exp.mjs"), "./translations/sa.json": () => import("./sa-Dag0k-Z8.mjs"), "./translations/sk.json": () => import("./sk-BFg-R8qJ.mjs"), "./translations/sv.json": () => import("./sv-CUnfWGsh.mjs"), "./translations/th.json": () => import("./th-BqbI8lIT.mjs"), "./translations/tr.json": () => import("./tr-CgeK3wJM.mjs"), "./translations/uk.json": () => import("./uk-CR-zDhAY.mjs"), "./translations/vi.json": () => import("./vi-DUXIk_fw.mjs"), "./translations/zh-Hans.json": () => import("./zh-Hans-BPQcRIyH.mjs"), "./translations/zh.json": () => import("./zh-BWZspA60.mjs") }), `./translations/${locale}.json`).then(({ default: data }) => {
3967
+ return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/ar.json": () => import("./ar-CCEVvqGG.mjs"), "./translations/ca.json": () => import("./ca-5U32ON2v.mjs"), "./translations/cs.json": () => import("./cs-CM2aBUar.mjs"), "./translations/de.json": () => import("./de-C72KDNOl.mjs"), "./translations/en.json": () => import("./en-CPTj6CjC.mjs"), "./translations/es.json": () => import("./es-CeXiYflN.mjs"), "./translations/eu.json": () => import("./eu-CdALomew.mjs"), "./translations/fr.json": () => import("./fr-CD9VFbPM.mjs"), "./translations/gu.json": () => import("./gu-CNpaMDpH.mjs"), "./translations/hi.json": () => import("./hi-Dwvd04m3.mjs"), "./translations/hu.json": () => import("./hu-CeYvaaO0.mjs"), "./translations/id.json": () => import("./id-BtwA9WJT.mjs"), "./translations/it.json": () => import("./it-BrVPqaf1.mjs"), "./translations/ja.json": () => import("./ja-CtsUxOvk.mjs"), "./translations/ko.json": () => import("./ko-HVQRlfUI.mjs"), "./translations/ml.json": () => import("./ml-BihZwQit.mjs"), "./translations/ms.json": () => import("./ms-m_WjyWx7.mjs"), "./translations/nl.json": () => import("./nl-D4R9gHx5.mjs"), "./translations/pl.json": () => import("./pl-sbx9mSt_.mjs"), "./translations/pt-BR.json": () => import("./pt-BR-C71iDxnh.mjs"), "./translations/pt.json": () => import("./pt-BsaFvS8-.mjs"), "./translations/ru.json": () => import("./ru-BE6A4Exp.mjs"), "./translations/sa.json": () => import("./sa-Dag0k-Z8.mjs"), "./translations/sk.json": () => import("./sk-BFg-R8qJ.mjs"), "./translations/sv.json": () => import("./sv-CUnfWGsh.mjs"), "./translations/th.json": () => import("./th-BqbI8lIT.mjs"), "./translations/tr.json": () => import("./tr-CgeK3wJM.mjs"), "./translations/uk.json": () => import("./uk-CR-zDhAY.mjs"), "./translations/vi.json": () => import("./vi-DUXIk_fw.mjs"), "./translations/zh-Hans.json": () => import("./zh-Hans-BPQcRIyH.mjs"), "./translations/zh.json": () => import("./zh-BWZspA60.mjs") }), `./translations/${locale}.json`).then(({ default: data }) => {
3700
3968
  return {
3701
3969
  data: prefixPluginTranslations(data, PLUGIN_ID),
3702
3970
  locale
@@ -3742,11 +4010,11 @@ export {
3742
4010
  PERMISSIONS as k,
3743
4011
  DocumentRBAC as l,
3744
4012
  DOCUMENT_META_FIELDS as m,
3745
- useDocLayout as n,
3746
- useGetContentTypeConfigurationQuery as o,
3747
- CREATOR_FIELDS as p,
3748
- getMainField as q,
3749
- routes as r,
4013
+ CLONE_PATH as n,
4014
+ useDocLayout as o,
4015
+ useGetContentTypeConfigurationQuery as p,
4016
+ CREATOR_FIELDS as q,
4017
+ getMainField as r,
3750
4018
  setInitialData as s,
3751
4019
  getDisplayName as t,
3752
4020
  useContentTypeSchema as u,
@@ -3756,4 +4024,4 @@ export {
3756
4024
  capitalise as y,
3757
4025
  useUpdateContentTypeConfigurationMutation as z
3758
4026
  };
3759
- //# sourceMappingURL=index-JNNNKUHs.mjs.map
4027
+ //# sourceMappingURL=index-BwqXeHiv.mjs.map