@strapi/content-manager 0.0.0-experimental.2a7cb5ff33df35e8ccde5ef918f9f9a4a3ee9a08 → 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 (126) hide show
  1. package/LICENSE +18 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-BvHtG7uH.js → ComponentConfigurationPage-BfOUhLa9.js} +3 -3
  3. package/dist/_chunks/{ComponentConfigurationPage-BvHtG7uH.js.map → ComponentConfigurationPage-BfOUhLa9.js.map} +1 -1
  4. package/dist/_chunks/{ComponentConfigurationPage-DHNM3YBz.mjs → ComponentConfigurationPage-DgDrdk-k.mjs} +3 -3
  5. package/dist/_chunks/{ComponentConfigurationPage-DHNM3YBz.mjs.map → ComponentConfigurationPage-DgDrdk-k.mjs.map} +1 -1
  6. package/dist/_chunks/{EditConfigurationPage-DOmfCEMo.js → EditConfigurationPage-BcXQLYY9.js} +3 -3
  7. package/dist/_chunks/{EditConfigurationPage-DOmfCEMo.js.map → EditConfigurationPage-BcXQLYY9.js.map} +1 -1
  8. package/dist/_chunks/{EditConfigurationPage-Cp6HAEzN.mjs → EditConfigurationPage-CjV1kPAw.mjs} +3 -3
  9. package/dist/_chunks/{EditConfigurationPage-Cp6HAEzN.mjs.map → EditConfigurationPage-CjV1kPAw.mjs.map} +1 -1
  10. package/dist/_chunks/{EditViewPage-BqNpC6hO.js → EditViewPage-BOeuvemd.js} +19 -8
  11. package/dist/_chunks/EditViewPage-BOeuvemd.js.map +1 -0
  12. package/dist/_chunks/{EditViewPage-BtkEx339.mjs → EditViewPage-s_bjnR0M.mjs} +19 -8
  13. package/dist/_chunks/EditViewPage-s_bjnR0M.mjs.map +1 -0
  14. package/dist/_chunks/{Field-lsPFnAmH.js → Field-CvfOxLel.js} +196 -143
  15. package/dist/_chunks/Field-CvfOxLel.js.map +1 -0
  16. package/dist/_chunks/{Field-R5NbffTB.mjs → Field-D9nHkdjy.mjs} +194 -141
  17. package/dist/_chunks/Field-D9nHkdjy.mjs.map +1 -0
  18. package/dist/_chunks/{Form-CcGboku8.js → Form-BKnDhP2B.js} +35 -16
  19. package/dist/_chunks/Form-BKnDhP2B.js.map +1 -0
  20. package/dist/_chunks/{Form-BHmXSfyy.mjs → Form-G4C35wJ4.mjs} +35 -16
  21. package/dist/_chunks/Form-G4C35wJ4.mjs.map +1 -0
  22. package/dist/_chunks/{History-Bsud8jwh.js → History-BIYOzHws.js} +28 -18
  23. package/dist/_chunks/History-BIYOzHws.js.map +1 -0
  24. package/dist/_chunks/{History-ByUPL3T3.mjs → History-FWwaCNUD.mjs} +28 -18
  25. package/dist/_chunks/History-FWwaCNUD.mjs.map +1 -0
  26. package/dist/_chunks/{ListConfigurationPage-Bm5HACXf.mjs → ListConfigurationPage-BbOp66T2.mjs} +20 -8
  27. package/dist/_chunks/ListConfigurationPage-BbOp66T2.mjs.map +1 -0
  28. package/dist/_chunks/{ListConfigurationPage-DiT463qx.js → ListConfigurationPage-N7prXhOp.js} +20 -8
  29. package/dist/_chunks/ListConfigurationPage-N7prXhOp.js.map +1 -0
  30. package/dist/_chunks/{ListViewPage-JSyNAAYu.mjs → ListViewPage-DTSW3r3X.mjs} +46 -37
  31. package/dist/_chunks/ListViewPage-DTSW3r3X.mjs.map +1 -0
  32. package/dist/_chunks/{ListViewPage-CsrC9L_d.js → ListViewPage-Djc5M_c0.js} +48 -39
  33. package/dist/_chunks/ListViewPage-Djc5M_c0.js.map +1 -0
  34. package/dist/_chunks/{NoContentTypePage-CsrQUpBE.mjs → NoContentTypePage-A-6Pk0le.mjs} +2 -2
  35. package/dist/_chunks/{NoContentTypePage-CsrQUpBE.mjs.map → NoContentTypePage-A-6Pk0le.mjs.map} +1 -1
  36. package/dist/_chunks/{NoContentTypePage-Bsvng4II.js → NoContentTypePage-DCX-hEMB.js} +2 -2
  37. package/dist/_chunks/{NoContentTypePage-Bsvng4II.js.map → NoContentTypePage-DCX-hEMB.js.map} +1 -1
  38. package/dist/_chunks/{NoPermissionsPage-DNmf_pj0.mjs → NoPermissionsPage-B0vWytDx.mjs} +2 -2
  39. package/dist/_chunks/{NoPermissionsPage-DNmf_pj0.mjs.map → NoPermissionsPage-B0vWytDx.mjs.map} +1 -1
  40. package/dist/_chunks/{NoPermissionsPage-CdHNJtEf.js → NoPermissionsPage-PfJfspJV.js} +2 -2
  41. package/dist/_chunks/{NoPermissionsPage-CdHNJtEf.js.map → NoPermissionsPage-PfJfspJV.js.map} +1 -1
  42. package/dist/_chunks/{Relations-CghaPv2D.js → Relations--9jwQ8HV.js} +4 -4
  43. package/dist/_chunks/Relations--9jwQ8HV.js.map +1 -0
  44. package/dist/_chunks/{Relations-u8-37jK0.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-CaE6NG4a.mjs → index-BwqXeHiv.mjs} +439 -205
  51. package/dist/_chunks/index-BwqXeHiv.mjs.map +1 -0
  52. package/dist/_chunks/{index-BOZx6IMg.js → index-jun-ZqyN.js} +420 -186
  53. package/dist/_chunks/index-jun-ZqyN.js.map +1 -0
  54. package/dist/_chunks/{layout-Bx7svTbY.mjs → layout-BV5oiZQ9.mjs} +23 -10
  55. package/dist/_chunks/layout-BV5oiZQ9.mjs.map +1 -0
  56. package/dist/_chunks/{layout-Ciz224q5.js → layout-T2xBqmuZ.js} +22 -9
  57. package/dist/_chunks/layout-T2xBqmuZ.js.map +1 -0
  58. package/dist/_chunks/{relations-CP8sB2YZ.js → relations-D8jegO_8.js} +2 -2
  59. package/dist/_chunks/{relations-CP8sB2YZ.js.map → relations-D8jegO_8.js.map} +1 -1
  60. package/dist/_chunks/{relations-Cxc1cEv3.mjs → relations-wAeF76DP.mjs} +2 -2
  61. package/dist/_chunks/{relations-Cxc1cEv3.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 +4 -4
  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/Relations.d.ts +20 -0
  73. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.d.ts +2 -2
  74. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.d.ts +2 -2
  75. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +4 -48
  76. package/dist/admin/src/pages/EditView/components/Header.d.ts +10 -11
  77. package/dist/admin/src/services/api.d.ts +1 -1
  78. package/dist/admin/src/services/components.d.ts +2 -2
  79. package/dist/admin/src/services/contentTypes.d.ts +3 -3
  80. package/dist/admin/src/services/documents.d.ts +19 -17
  81. package/dist/admin/src/services/init.d.ts +1 -1
  82. package/dist/admin/src/services/relations.d.ts +2 -2
  83. package/dist/admin/src/services/uid.d.ts +3 -3
  84. package/dist/admin/src/utils/validation.d.ts +4 -1
  85. package/dist/server/index.js +177 -107
  86. package/dist/server/index.js.map +1 -1
  87. package/dist/server/index.mjs +178 -108
  88. package/dist/server/index.mjs.map +1 -1
  89. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  90. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  91. package/dist/server/src/controllers/uid.d.ts.map +1 -1
  92. package/dist/server/src/controllers/validation/dimensions.d.ts +4 -2
  93. package/dist/server/src/controllers/validation/dimensions.d.ts.map +1 -1
  94. package/dist/server/src/history/services/history.d.ts.map +1 -1
  95. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  96. package/dist/server/src/history/services/utils.d.ts +2 -1
  97. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  98. package/dist/server/src/policies/hasPermissions.d.ts.map +1 -1
  99. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  100. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  101. package/dist/server/src/services/permission-checker.d.ts.map +1 -1
  102. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  103. package/dist/shared/contracts/collection-types.d.ts +3 -1
  104. package/dist/shared/contracts/collection-types.d.ts.map +1 -1
  105. package/package.json +9 -9
  106. package/dist/_chunks/EditViewPage-BqNpC6hO.js.map +0 -1
  107. package/dist/_chunks/EditViewPage-BtkEx339.mjs.map +0 -1
  108. package/dist/_chunks/Field-R5NbffTB.mjs.map +0 -1
  109. package/dist/_chunks/Field-lsPFnAmH.js.map +0 -1
  110. package/dist/_chunks/Form-BHmXSfyy.mjs.map +0 -1
  111. package/dist/_chunks/Form-CcGboku8.js.map +0 -1
  112. package/dist/_chunks/History-Bsud8jwh.js.map +0 -1
  113. package/dist/_chunks/History-ByUPL3T3.mjs.map +0 -1
  114. package/dist/_chunks/ListConfigurationPage-Bm5HACXf.mjs.map +0 -1
  115. package/dist/_chunks/ListConfigurationPage-DiT463qx.js.map +0 -1
  116. package/dist/_chunks/ListViewPage-CsrC9L_d.js.map +0 -1
  117. package/dist/_chunks/ListViewPage-JSyNAAYu.mjs.map +0 -1
  118. package/dist/_chunks/Relations-CghaPv2D.js.map +0 -1
  119. package/dist/_chunks/Relations-u8-37jK0.mjs.map +0 -1
  120. package/dist/_chunks/index-BOZx6IMg.js.map +0 -1
  121. package/dist/_chunks/index-CaE6NG4a.mjs.map +0 -1
  122. package/dist/_chunks/layout-Bx7svTbY.mjs.map +0 -1
  123. package/dist/_chunks/layout-Ciz224q5.js.map +0 -1
  124. package/dist/_chunks/usePrev-B9w_-eYc.js.map +0 -1
  125. package/dist/_chunks/usePrev-DH6iah0A.mjs +0 -16
  126. 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, Box, Typography, Dialog, Modal, Radio, Status, SingleSelect, SingleSelectOption, 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,7 +158,8 @@ 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({
@@ -208,7 +173,12 @@ const documentApi = contentManagerApi.injectEndpoints({
208
173
  params: query
209
174
  }
210
175
  }),
211
- 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
+ }
212
182
  }),
213
183
  cloneDocument: builder.mutation({
214
184
  query: ({ model, sourceId, data, params }) => ({
@@ -219,7 +189,10 @@ const documentApi = contentManagerApi.injectEndpoints({
219
189
  params
220
190
  }
221
191
  }),
222
- 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
+ ]
223
196
  }),
224
197
  /**
225
198
  * Creates a new collection-type document. This should ONLY be used for collection-types.
@@ -236,7 +209,8 @@ const documentApi = contentManagerApi.injectEndpoints({
236
209
  }),
237
210
  invalidatesTags: (result, _error, { model }) => [
238
211
  { type: "Document", id: `${model}_LIST` },
239
- "Relations"
212
+ "Relations",
213
+ { type: "UidAvailability", id: model }
240
214
  ]
241
215
  }),
242
216
  deleteDocument: builder.mutation({
@@ -277,7 +251,8 @@ const documentApi = contentManagerApi.injectEndpoints({
277
251
  id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model
278
252
  },
279
253
  { type: "Document", id: `${model}_LIST` },
280
- "Relations"
254
+ "Relations",
255
+ { type: "UidAvailability", id: model }
281
256
  ];
282
257
  }
283
258
  }),
@@ -295,6 +270,7 @@ const documentApi = contentManagerApi.injectEndpoints({
295
270
  }),
296
271
  providesTags: (result, _error, arg) => {
297
272
  return [
273
+ { type: "Document", id: `ALL_LIST` },
298
274
  { type: "Document", id: `${arg.model}_LIST` },
299
275
  ...result?.results.map(({ documentId }) => ({
300
276
  type: "Document",
@@ -333,6 +309,11 @@ const documentApi = contentManagerApi.injectEndpoints({
333
309
  {
334
310
  type: "Document",
335
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`
336
317
  }
337
318
  ];
338
319
  }
@@ -396,8 +377,21 @@ const documentApi = contentManagerApi.injectEndpoints({
396
377
  type: "Document",
397
378
  id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model
398
379
  },
399
- "Relations"
380
+ "Relations",
381
+ { type: "UidAvailability", id: model }
400
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
+ }
401
395
  }
402
396
  }),
403
397
  unpublishDocument: builder.mutation({
@@ -467,7 +461,7 @@ const buildValidParams = (query) => {
467
461
  const isBaseQueryError = (error) => {
468
462
  return error.name !== void 0;
469
463
  };
470
- const createYupSchema = (attributes = {}, components = {}) => {
464
+ const createYupSchema = (attributes = {}, components = {}, options = { status: null }) => {
471
465
  const createModelSchema = (attributes2) => yup.object().shape(
472
466
  Object.entries(attributes2).reduce((acc, [name, attribute]) => {
473
467
  if (DOCUMENT_META_FIELDS.includes(name)) {
@@ -480,7 +474,7 @@ const createYupSchema = (attributes = {}, components = {}) => {
480
474
  addMinValidation,
481
475
  addMaxValidation,
482
476
  addRegexValidation
483
- ].map((fn) => fn(attribute));
477
+ ].map((fn) => fn(attribute, options));
484
478
  const transformSchema = pipe(...validations);
485
479
  switch (attribute.type) {
486
480
  case "component": {
@@ -581,6 +575,14 @@ const createAttributeSchema = (attribute) => {
581
575
  if (!value || typeof value === "string" && value.length === 0) {
582
576
  return true;
583
577
  }
578
+ if (typeof value === "object") {
579
+ try {
580
+ JSON.stringify(value);
581
+ return true;
582
+ } catch (err) {
583
+ return false;
584
+ }
585
+ }
584
586
  try {
585
587
  JSON.parse(value);
586
588
  return true;
@@ -599,13 +601,7 @@ const createAttributeSchema = (attribute) => {
599
601
  return yup.mixed();
600
602
  }
601
603
  };
602
- const addRequiredValidation = (attribute) => (schema) => {
603
- if (attribute.required && attribute.type !== "relation") {
604
- return schema.required({
605
- id: translatedErrors.required.id,
606
- defaultMessage: "This field is required."
607
- });
608
- }
604
+ const nullableSchema = (schema) => {
609
605
  return schema?.nullable ? schema.nullable() : (
610
606
  // In some cases '.nullable' will not be available on the schema.
611
607
  // e.g. when the schema has been built using yup.lazy (e.g. for relations).
@@ -613,7 +609,22 @@ const addRequiredValidation = (attribute) => (schema) => {
613
609
  schema
614
610
  );
615
611
  };
616
- 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
+ }
617
628
  if ("minLength" in attribute && attribute.minLength && Number.isInteger(attribute.minLength) && "min" in schema) {
618
629
  return schema.min(attribute.minLength, {
619
630
  ...translatedErrors.minLength,
@@ -635,9 +646,31 @@ const addMaxLengthValidation = (attribute) => (schema) => {
635
646
  }
636
647
  return schema;
637
648
  };
638
- const addMinValidation = (attribute) => (schema) => {
649
+ const addMinValidation = (attribute, options) => (schema) => {
639
650
  if ("min" in attribute) {
640
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
+ }
641
674
  if ("min" in schema && min) {
642
675
  return schema.min(min, {
643
676
  ...translatedErrors.min,
@@ -853,6 +886,8 @@ const useDocumentActions = () => {
853
886
  const { formatMessage } = useIntl();
854
887
  const { trackUsage } = useTracking();
855
888
  const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();
889
+ const navigate = useNavigate();
890
+ const setCurrentStep = useGuidedTour("useDocumentActions", (state) => state.setCurrentStep);
856
891
  const [deleteDocument] = useDeleteDocumentMutation();
857
892
  const _delete = React.useCallback(
858
893
  async ({ collectionType, model, documentId, params }, trackerProperty) => {
@@ -1167,6 +1202,7 @@ const useDocumentActions = () => {
1167
1202
  defaultMessage: "Saved document"
1168
1203
  })
1169
1204
  });
1205
+ setCurrentStep("contentManager.success");
1170
1206
  return res.data;
1171
1207
  } catch (err) {
1172
1208
  toggleNotification({
@@ -1188,7 +1224,6 @@ const useDocumentActions = () => {
1188
1224
  sourceId
1189
1225
  });
1190
1226
  if ("error" in res) {
1191
- toggleNotification({ type: "danger", message: formatAPIError(res.error) });
1192
1227
  return { error: res.error };
1193
1228
  }
1194
1229
  toggleNotification({
@@ -1207,7 +1242,7 @@ const useDocumentActions = () => {
1207
1242
  throw err;
1208
1243
  }
1209
1244
  },
1210
- [autoCloneDocument, formatAPIError, formatMessage, toggleNotification]
1245
+ [autoCloneDocument, formatMessage, toggleNotification]
1211
1246
  );
1212
1247
  const [cloneDocument] = useCloneDocumentMutation();
1213
1248
  const clone = React.useCallback(
@@ -1233,6 +1268,7 @@ const useDocumentActions = () => {
1233
1268
  defaultMessage: "Cloned document"
1234
1269
  })
1235
1270
  });
1271
+ navigate(`../../${res.data.data.documentId}`, { relative: "path" });
1236
1272
  return res.data;
1237
1273
  } catch (err) {
1238
1274
  toggleNotification({
@@ -1243,7 +1279,7 @@ const useDocumentActions = () => {
1243
1279
  throw err;
1244
1280
  }
1245
1281
  },
1246
- [cloneDocument, trackUsage, toggleNotification, formatMessage, formatAPIError]
1282
+ [cloneDocument, trackUsage, toggleNotification, formatMessage, formatAPIError, navigate]
1247
1283
  );
1248
1284
  const [getDoc] = useLazyGetDocumentQuery();
1249
1285
  const getDocument = React.useCallback(
@@ -1269,7 +1305,7 @@ const useDocumentActions = () => {
1269
1305
  };
1270
1306
  };
1271
1307
  const ProtectedHistoryPage = lazy(
1272
- () => import("./History-ByUPL3T3.mjs").then((mod) => ({ default: mod.ProtectedHistoryPage }))
1308
+ () => import("./History-FWwaCNUD.mjs").then((mod) => ({ default: mod.ProtectedHistoryPage }))
1273
1309
  );
1274
1310
  const routes$1 = [
1275
1311
  {
@@ -1282,31 +1318,31 @@ const routes$1 = [
1282
1318
  }
1283
1319
  ];
1284
1320
  const ProtectedEditViewPage = lazy(
1285
- () => import("./EditViewPage-BtkEx339.mjs").then((mod) => ({ default: mod.ProtectedEditViewPage }))
1321
+ () => import("./EditViewPage-s_bjnR0M.mjs").then((mod) => ({ default: mod.ProtectedEditViewPage }))
1286
1322
  );
1287
1323
  const ProtectedListViewPage = lazy(
1288
- () => import("./ListViewPage-JSyNAAYu.mjs").then((mod) => ({ default: mod.ProtectedListViewPage }))
1324
+ () => import("./ListViewPage-DTSW3r3X.mjs").then((mod) => ({ default: mod.ProtectedListViewPage }))
1289
1325
  );
1290
1326
  const ProtectedListConfiguration = lazy(
1291
- () => import("./ListConfigurationPage-Bm5HACXf.mjs").then((mod) => ({
1327
+ () => import("./ListConfigurationPage-BbOp66T2.mjs").then((mod) => ({
1292
1328
  default: mod.ProtectedListConfiguration
1293
1329
  }))
1294
1330
  );
1295
1331
  const ProtectedEditConfigurationPage = lazy(
1296
- () => import("./EditConfigurationPage-Cp6HAEzN.mjs").then((mod) => ({
1332
+ () => import("./EditConfigurationPage-CjV1kPAw.mjs").then((mod) => ({
1297
1333
  default: mod.ProtectedEditConfigurationPage
1298
1334
  }))
1299
1335
  );
1300
1336
  const ProtectedComponentConfigurationPage = lazy(
1301
- () => import("./ComponentConfigurationPage-DHNM3YBz.mjs").then((mod) => ({
1337
+ () => import("./ComponentConfigurationPage-DgDrdk-k.mjs").then((mod) => ({
1302
1338
  default: mod.ProtectedComponentConfigurationPage
1303
1339
  }))
1304
1340
  );
1305
1341
  const NoPermissions = lazy(
1306
- () => import("./NoPermissionsPage-DNmf_pj0.mjs").then((mod) => ({ default: mod.NoPermissions }))
1342
+ () => import("./NoPermissionsPage-B0vWytDx.mjs").then((mod) => ({ default: mod.NoPermissions }))
1307
1343
  );
1308
1344
  const NoContentType = lazy(
1309
- () => import("./NoContentTypePage-CsrQUpBE.mjs").then((mod) => ({ default: mod.NoContentType }))
1345
+ () => import("./NoContentTypePage-A-6Pk0le.mjs").then((mod) => ({ default: mod.NoContentType }))
1310
1346
  );
1311
1347
  const CollectionTypePages = () => {
1312
1348
  const { collectionType } = useParams();
@@ -1420,12 +1456,14 @@ const DocumentActionButton = (action) => {
1420
1456
  /* @__PURE__ */ jsx(
1421
1457
  Button,
1422
1458
  {
1423
- flex: 1,
1459
+ flex: "auto",
1424
1460
  startIcon: action.icon,
1425
1461
  disabled: action.disabled,
1426
1462
  onClick: handleClick(action),
1427
1463
  justifyContent: "center",
1428
1464
  variant: action.variant || "default",
1465
+ paddingTop: "7px",
1466
+ paddingBottom: "7px",
1429
1467
  children: action.label
1430
1468
  }
1431
1469
  ),
@@ -1433,7 +1471,7 @@ const DocumentActionButton = (action) => {
1433
1471
  DocumentActionConfirmDialog,
1434
1472
  {
1435
1473
  ...action.dialog,
1436
- variant: action.variant,
1474
+ variant: action.dialog?.variant ?? action.variant,
1437
1475
  isOpen: dialogId === action.id,
1438
1476
  onClose: handleClose
1439
1477
  }
@@ -1490,9 +1528,9 @@ const DocumentActionsMenu = ({
1490
1528
  disabled: isDisabled,
1491
1529
  size: "S",
1492
1530
  endIcon: null,
1493
- paddingTop: "7px",
1494
- paddingLeft: "9px",
1495
- paddingRight: "9px",
1531
+ paddingTop: "4px",
1532
+ paddingLeft: "7px",
1533
+ paddingRight: "7px",
1496
1534
  variant,
1497
1535
  children: [
1498
1536
  /* @__PURE__ */ jsx(More, { "aria-hidden": true, focusable: false }),
@@ -1503,7 +1541,7 @@ const DocumentActionsMenu = ({
1503
1541
  ]
1504
1542
  }
1505
1543
  ),
1506
- /* @__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: [
1507
1545
  actions2.map((action) => {
1508
1546
  return /* @__PURE__ */ jsx(
1509
1547
  Menu.Item,
@@ -1512,10 +1550,25 @@ const DocumentActionsMenu = ({
1512
1550
  onSelect: handleClick(action),
1513
1551
  display: "block",
1514
1552
  children: /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", gap: 4, children: [
1515
- /* @__PURE__ */ jsxs(Flex, { color: convertActionVariantToColor(action.variant), gap: 2, tag: "span", children: [
1516
- /* @__PURE__ */ jsx(Box, { tag: "span", color: convertActionVariantToIconColor(action.variant), children: action.icon }),
1517
- action.label
1518
- ] }),
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
+ ),
1519
1572
  action.id.startsWith("HistoryAction") && /* @__PURE__ */ jsx(
1520
1573
  Flex,
1521
1574
  {
@@ -1612,11 +1665,11 @@ const DocumentActionConfirmDialog = ({
1612
1665
  /* @__PURE__ */ jsx(Dialog.Header, { children: title }),
1613
1666
  /* @__PURE__ */ jsx(Dialog.Body, { children: content }),
1614
1667
  /* @__PURE__ */ jsxs(Dialog.Footer, { children: [
1615
- /* @__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({
1616
1669
  id: "app.components.Button.cancel",
1617
1670
  defaultMessage: "Cancel"
1618
1671
  }) }) }),
1619
- /* @__PURE__ */ jsx(Button, { onClick: handleConfirm, variant, children: formatMessage({
1672
+ /* @__PURE__ */ jsx(Button, { onClick: handleConfirm, variant, fullWidth: true, children: formatMessage({
1620
1673
  id: "app.components.Button.confirm",
1621
1674
  defaultMessage: "Confirm"
1622
1675
  }) })
@@ -1639,8 +1692,8 @@ const DocumentActionModal = ({
1639
1692
  };
1640
1693
  return /* @__PURE__ */ jsx(Modal.Root, { open: isOpen, onOpenChange: handleClose, children: /* @__PURE__ */ jsxs(Modal.Content, { children: [
1641
1694
  /* @__PURE__ */ jsx(Modal.Header, { children: /* @__PURE__ */ jsx(Modal.Title, { children: title }) }),
1642
- /* @__PURE__ */ jsx(Modal.Body, { children: typeof Content === "function" ? /* @__PURE__ */ jsx(Content, { onClose: handleClose }) : Content }),
1643
- /* @__PURE__ */ jsx(Modal.Footer, { children: typeof Footer === "function" ? /* @__PURE__ */ jsx(Footer, { onClose: handleClose }) : Footer })
1695
+ typeof Content === "function" ? /* @__PURE__ */ jsx(Content, { onClose: handleClose }) : /* @__PURE__ */ jsx(Modal.Body, { children: Content }),
1696
+ typeof Footer === "function" ? /* @__PURE__ */ jsx(Footer, { onClose: handleClose }) : Footer
1644
1697
  ] }) });
1645
1698
  };
1646
1699
  const PublishAction$1 = ({
@@ -1655,13 +1708,17 @@ const PublishAction$1 = ({
1655
1708
  const navigate = useNavigate();
1656
1709
  const { toggleNotification } = useNotification();
1657
1710
  const { _unstableFormatValidationErrors: formatValidationErrors } = useAPIErrorHandler();
1711
+ const isListView = useMatch(LIST_PATH) !== null;
1658
1712
  const isCloning = useMatch(CLONE_PATH) !== null;
1659
1713
  const { formatMessage } = useIntl();
1660
- const { canPublish, canCreate, canUpdate } = useDocumentRBAC(
1661
- "PublishAction",
1662
- ({ canPublish: canPublish2, canCreate: canCreate2, canUpdate: canUpdate2 }) => ({ canPublish: canPublish2, canCreate: canCreate2, canUpdate: canUpdate2 })
1663
- );
1714
+ const canPublish = useDocumentRBAC("PublishAction", ({ canPublish: canPublish2 }) => canPublish2);
1664
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);
1665
1722
  const [{ query, rawQuery }] = useQueryParams();
1666
1723
  const params = React.useMemo(() => buildValidParams(query), [query]);
1667
1724
  const modified = useForm("PublishAction", ({ modified: modified2 }) => modified2);
@@ -1670,10 +1727,103 @@ const PublishAction$1 = ({
1670
1727
  const validate = useForm("PublishAction", (state) => state.validate);
1671
1728
  const setErrors = useForm("PublishAction", (state) => state.setErrors);
1672
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]);
1673
1785
  const isDocumentPublished = (document?.[PUBLISHED_AT_ATTRIBUTE_NAME] || meta?.availableStatus.some((doc) => doc[PUBLISHED_AT_ATTRIBUTE_NAME] !== null)) && document?.status !== "modified";
1674
1786
  if (!schema?.options?.draftAndPublish) {
1675
1787
  return null;
1676
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;
1677
1827
  return {
1678
1828
  /**
1679
1829
  * Disabled when:
@@ -1683,49 +1833,36 @@ const PublishAction$1 = ({
1683
1833
  * - the document is already published & not modified
1684
1834
  * - the document is being created & not modified
1685
1835
  * - the user doesn't have the permission to publish
1686
- * - the user doesn't have the permission to create a new document
1687
- * - the user doesn't have the permission to update the document
1688
1836
  */
1689
- 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,
1690
1838
  label: formatMessage({
1691
1839
  id: "app.utils.publish",
1692
1840
  defaultMessage: "Publish"
1693
1841
  }),
1694
1842
  onClick: async () => {
1695
- setSubmitting(true);
1696
- try {
1697
- const { errors } = await validate();
1698
- if (errors) {
1699
- toggleNotification({
1700
- type: "danger",
1701
- message: formatMessage({
1702
- id: "content-manager.validation.error",
1703
- defaultMessage: "There are validation errors in your document. Please fix them before saving."
1704
- })
1705
- });
1706
- return;
1707
- }
1708
- const res = await publish(
1709
- {
1710
- collectionType,
1711
- model,
1712
- documentId,
1713
- params
1714
- },
1715
- formValues
1716
- );
1717
- if ("data" in res && collectionType !== SINGLE_TYPES) {
1718
- navigate({
1719
- pathname: `../${collectionType}/${model}/${res.data.documentId}`,
1720
- search: rawQuery
1721
- });
1722
- } else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
1723
- 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
1724
1860
  }
1725
- } finally {
1726
- setSubmitting(false);
1861
+ ),
1862
+ onConfirm: async () => {
1863
+ await performPublish();
1727
1864
  }
1728
- }
1865
+ } : void 0
1729
1866
  };
1730
1867
  };
1731
1868
  PublishAction$1.type = "publish";
@@ -1741,10 +1878,6 @@ const UpdateAction = ({
1741
1878
  const cloneMatch = useMatch(CLONE_PATH);
1742
1879
  const isCloning = cloneMatch !== null;
1743
1880
  const { formatMessage } = useIntl();
1744
- const { canCreate, canUpdate } = useDocumentRBAC("UpdateAction", ({ canCreate: canCreate2, canUpdate: canUpdate2 }) => ({
1745
- canCreate: canCreate2,
1746
- canUpdate: canUpdate2
1747
- }));
1748
1881
  const { create, update, clone } = useDocumentActions();
1749
1882
  const [{ query, rawQuery }] = useQueryParams();
1750
1883
  const params = React.useMemo(() => buildValidParams(query), [query]);
@@ -1761,10 +1894,8 @@ const UpdateAction = ({
1761
1894
  * - the form is submitting
1762
1895
  * - the document is not modified & we're not cloning (you can save a clone entity straight away)
1763
1896
  * - the active tab is the published tab
1764
- * - the user doesn't have the permission to create a new document
1765
- * - the user doesn't have the permission to update the document
1766
1897
  */
1767
- disabled: isSubmitting || !modified && !isCloning || activeTab === "published" || Boolean(!documentId && !canCreate || documentId && !canUpdate),
1898
+ disabled: isSubmitting || !modified && !isCloning || activeTab === "published",
1768
1899
  label: formatMessage({
1769
1900
  id: "content-manager.containers.Edit.save",
1770
1901
  defaultMessage: "Save"
@@ -1772,16 +1903,18 @@ const UpdateAction = ({
1772
1903
  onClick: async () => {
1773
1904
  setSubmitting(true);
1774
1905
  try {
1775
- const { errors } = await validate();
1776
- if (errors) {
1777
- toggleNotification({
1778
- type: "danger",
1779
- message: formatMessage({
1780
- id: "content-manager.validation.error",
1781
- defaultMessage: "There are validation errors in your document. Please fix them before saving."
1782
- })
1783
- });
1784
- 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
+ }
1785
1918
  }
1786
1919
  if (isCloning) {
1787
1920
  const res = await clone(
@@ -1793,10 +1926,13 @@ const UpdateAction = ({
1793
1926
  document
1794
1927
  );
1795
1928
  if ("data" in res) {
1796
- navigate({
1797
- pathname: `../${collectionType}/${model}/${res.data.documentId}`,
1798
- search: rawQuery
1799
- });
1929
+ navigate(
1930
+ {
1931
+ pathname: `../${res.data.documentId}`,
1932
+ search: rawQuery
1933
+ },
1934
+ { relative: "path" }
1935
+ );
1800
1936
  } else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
1801
1937
  setErrors(formatValidationErrors(res.error));
1802
1938
  }
@@ -1826,10 +1962,10 @@ const UpdateAction = ({
1826
1962
  if ("data" in res && collectionType !== SINGLE_TYPES) {
1827
1963
  navigate(
1828
1964
  {
1829
- pathname: `../${collectionType}/${model}/${res.data.documentId}`,
1965
+ pathname: `../${res.data.documentId}`,
1830
1966
  search: rawQuery
1831
1967
  },
1832
- { replace: true }
1968
+ { replace: true, relative: "path" }
1833
1969
  );
1834
1970
  } else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
1835
1971
  setErrors(formatValidationErrors(res.error));
@@ -1874,7 +2010,7 @@ const UnpublishAction$1 = ({
1874
2010
  id: "app.utils.unpublish",
1875
2011
  defaultMessage: "Unpublish"
1876
2012
  }),
1877
- icon: /* @__PURE__ */ jsx(StyledCrossCircle, {}),
2013
+ icon: /* @__PURE__ */ jsx(Cross, {}),
1878
2014
  onClick: async () => {
1879
2015
  if (!documentId && collectionType !== SINGLE_TYPES || isDocumentModified) {
1880
2016
  if (!documentId) {
@@ -1986,7 +2122,7 @@ const DiscardAction = ({
1986
2122
  id: "content-manager.actions.discard.label",
1987
2123
  defaultMessage: "Discard changes"
1988
2124
  }),
1989
- icon: /* @__PURE__ */ jsx(StyledCrossCircle, {}),
2125
+ icon: /* @__PURE__ */ jsx(Cross, {}),
1990
2126
  position: ["panel", "table-row"],
1991
2127
  variant: "danger",
1992
2128
  dialog: {
@@ -2014,11 +2150,6 @@ const DiscardAction = ({
2014
2150
  };
2015
2151
  };
2016
2152
  DiscardAction.type = "discard";
2017
- const StyledCrossCircle = styled(CrossCircle)`
2018
- path {
2019
- fill: currentColor;
2020
- }
2021
- `;
2022
2153
  const DEFAULT_ACTIONS = [PublishAction$1, UpdateAction, UnpublishAction$1, DiscardAction];
2023
2154
  const intervals = ["years", "months", "days", "hours", "minutes", "seconds"];
2024
2155
  const RelativeTime = React.forwardRef(
@@ -2066,7 +2197,7 @@ const getDisplayName = ({
2066
2197
  };
2067
2198
  const capitalise = (str) => str.charAt(0).toUpperCase() + str.slice(1);
2068
2199
  const DocumentStatus = ({ status = "draft", ...restProps }) => {
2069
- const statusVariant = status === "draft" ? "primary" : status === "published" ? "success" : "alternative";
2200
+ const statusVariant = status === "draft" ? "secondary" : status === "published" ? "success" : "alternative";
2070
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) }) });
2071
2202
  };
2072
2203
  const Header = ({ isCreating, status, title: documentTitle = "Untitled" }) => {
@@ -2076,23 +2207,13 @@ const Header = ({ isCreating, status, title: documentTitle = "Untitled" }) => {
2076
2207
  id: "content-manager.containers.edit.title.new",
2077
2208
  defaultMessage: "Create an entry"
2078
2209
  }) : documentTitle;
2079
- 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: [
2080
2211
  /* @__PURE__ */ jsx(BackButton, {}),
2081
- /* @__PURE__ */ jsxs(
2082
- Flex,
2083
- {
2084
- width: "100%",
2085
- justifyContent: "space-between",
2086
- paddingTop: 1,
2087
- gap: "80px",
2088
- alignItems: "flex-start",
2089
- children: [
2090
- /* @__PURE__ */ jsx(Typography, { variant: "alpha", tag: "h1", children: title }),
2091
- /* @__PURE__ */ jsx(HeaderToolbar, {})
2092
- ]
2093
- }
2094
- ),
2095
- 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
2096
2217
  ] });
2097
2218
  };
2098
2219
  const HeaderToolbar = () => {
@@ -2259,8 +2380,22 @@ const Information = ({ activeTab }) => {
2259
2380
  );
2260
2381
  };
2261
2382
  const HeaderActions = ({ actions: actions2 }) => {
2262
- return /* @__PURE__ */ jsx(Flex, { children: actions2.map((action) => {
2263
- 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) {
2264
2399
  return /* @__PURE__ */ jsx(
2265
2400
  SingleSelect,
2266
2401
  {
@@ -2274,10 +2409,49 @@ const HeaderActions = ({ actions: actions2 }) => {
2274
2409
  action.id
2275
2410
  );
2276
2411
  } else {
2277
- 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
+ }
2278
2434
  }
2279
2435
  }) });
2280
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
+ };
2281
2455
  const ConfigureTheViewAction = ({ collectionType, model }) => {
2282
2456
  const navigate = useNavigate();
2283
2457
  const { formatMessage } = useIntl();
@@ -2413,7 +2587,7 @@ const ActionsPanel = () => {
2413
2587
  return {
2414
2588
  title: formatMessage({
2415
2589
  id: "content-manager.containers.edit.panels.default.title",
2416
- defaultMessage: "Document"
2590
+ defaultMessage: "Entry"
2417
2591
  }),
2418
2592
  content: /* @__PURE__ */ jsx(ActionsPanelContent, {})
2419
2593
  };
@@ -2657,7 +2831,8 @@ const formatEditLayout = (data, {
2657
2831
  layout: convertEditLayoutToFieldLayouts(
2658
2832
  configuration.layouts.edit,
2659
2833
  components[uid].attributes,
2660
- configuration.metadatas
2834
+ configuration.metadatas,
2835
+ { configurations: data.components, schemas: components }
2661
2836
  ),
2662
2837
  settings: {
2663
2838
  ...configuration.settings,
@@ -2783,7 +2958,7 @@ const ConfirmBulkActionDialog = ({
2783
2958
  endAction
2784
2959
  }) => {
2785
2960
  const { formatMessage } = useIntl();
2786
- 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: [
2787
2962
  /* @__PURE__ */ jsx(Dialog.Header, { children: formatMessage({
2788
2963
  id: "app.components.ConfirmDialog.title",
2789
2964
  defaultMessage: "Confirmation"
@@ -2814,6 +2989,7 @@ const ConfirmDialogPublishAll = ({
2814
2989
  const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler(getTranslation);
2815
2990
  const { model, schema } = useDoc();
2816
2991
  const [{ query }] = useQueryParams();
2992
+ const enableDraftRelationsCount = false;
2817
2993
  const {
2818
2994
  data: countDraftRelations = 0,
2819
2995
  isLoading,
@@ -2825,7 +3001,7 @@ const ConfirmDialogPublishAll = ({
2825
3001
  locale: query?.plugins?.i18n?.locale
2826
3002
  },
2827
3003
  {
2828
- skip: selectedEntries.length === 0
3004
+ skip: !enableDraftRelationsCount
2829
3005
  }
2830
3006
  );
2831
3007
  React.useEffect(() => {
@@ -3010,7 +3186,7 @@ const SelectedEntriesTableContent = ({
3010
3186
  status: row.status
3011
3187
  }
3012
3188
  ) }),
3013
- /* @__PURE__ */ jsx(Table.Cell, { children: /* @__PURE__ */ jsx(
3189
+ /* @__PURE__ */ jsx(Table.Cell, { children: /* @__PURE__ */ jsx(Flex, { children: /* @__PURE__ */ jsx(
3014
3190
  IconButton,
3015
3191
  {
3016
3192
  tag: Link,
@@ -3033,9 +3209,10 @@ const SelectedEntriesTableContent = ({
3033
3209
  ),
3034
3210
  target: "_blank",
3035
3211
  marginLeft: "auto",
3036
- children: /* @__PURE__ */ jsx(Pencil, {})
3212
+ variant: "ghost",
3213
+ children: /* @__PURE__ */ jsx(Pencil, { width: "1.6rem", height: "1.6rem" })
3037
3214
  }
3038
- ) })
3215
+ ) }) })
3039
3216
  ] }, row.id)) })
3040
3217
  ] });
3041
3218
  };
@@ -3072,7 +3249,13 @@ const SelectedEntriesModalContent = ({
3072
3249
  );
3073
3250
  const { rows, validationErrors } = React.useMemo(() => {
3074
3251
  if (data.length > 0 && schema) {
3075
- 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
+ );
3076
3259
  const validationErrors2 = {};
3077
3260
  const rows2 = data.map((entry) => {
3078
3261
  try {
@@ -3422,7 +3605,7 @@ const TableActions = ({ document }) => {
3422
3605
  DescriptionComponentRenderer,
3423
3606
  {
3424
3607
  props,
3425
- descriptions: plugins["content-manager"].apis.getDocumentActions(),
3608
+ descriptions: plugins["content-manager"].apis.getDocumentActions().filter((action) => action.name !== "PublishAction"),
3426
3609
  children: (actions2) => {
3427
3610
  const tableRowActions = actions2.filter((action) => {
3428
3611
  const positions = Array.isArray(action.position) ? action.position : [action.position];
@@ -3533,7 +3716,7 @@ const CloneAction = ({ model, documentId }) => {
3533
3716
  }),
3534
3717
  content: /* @__PURE__ */ jsx(AutoCloneFailureModalBody, { prohibitedFields }),
3535
3718
  footer: ({ onClose }) => {
3536
- return /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", children: [
3719
+ return /* @__PURE__ */ jsxs(Modal.Footer, { children: [
3537
3720
  /* @__PURE__ */ jsx(Button, { onClick: onClose, variant: "tertiary", children: formatMessage({
3538
3721
  id: "cancel",
3539
3722
  defaultMessage: "Cancel"
@@ -3574,8 +3757,7 @@ class ContentManagerPlugin {
3574
3757
  documentActions = [
3575
3758
  ...DEFAULT_ACTIONS,
3576
3759
  ...DEFAULT_TABLE_ROW_ACTIONS,
3577
- ...DEFAULT_HEADER_ACTIONS,
3578
- HistoryAction
3760
+ ...DEFAULT_HEADER_ACTIONS
3579
3761
  ];
3580
3762
  editViewSidePanels = [ActionsPanel];
3581
3763
  headerActions = [];
@@ -3664,6 +3846,52 @@ const getPrintableType = (value) => {
3664
3846
  }
3665
3847
  return nativeType;
3666
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
+ };
3667
3895
  const initialState = {
3668
3896
  collectionTypeLinks: [],
3669
3897
  components: [],
@@ -3719,7 +3947,7 @@ const index = {
3719
3947
  app.router.addRoute({
3720
3948
  path: "content-manager/*",
3721
3949
  lazy: async () => {
3722
- const { Layout } = await import("./layout-Bx7svTbY.mjs");
3950
+ const { Layout } = await import("./layout-BV5oiZQ9.mjs");
3723
3951
  return {
3724
3952
  Component: Layout
3725
3953
  };
@@ -3728,10 +3956,15 @@ const index = {
3728
3956
  });
3729
3957
  app.registerPlugin(cm.config);
3730
3958
  },
3959
+ bootstrap(app) {
3960
+ if (typeof historyAdmin.bootstrap === "function") {
3961
+ historyAdmin.bootstrap(app);
3962
+ }
3963
+ },
3731
3964
  async registerTrads({ locales }) {
3732
3965
  const importedTrads = await Promise.all(
3733
3966
  locales.map((locale) => {
3734
- 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 }) => {
3735
3968
  return {
3736
3969
  data: prefixPluginTranslations(data, PLUGIN_ID),
3737
3970
  locale
@@ -3752,13 +3985,14 @@ export {
3752
3985
  BulkActionsRenderer as B,
3753
3986
  COLLECTION_TYPES as C,
3754
3987
  DocumentStatus as D,
3755
- DEFAULT_SETTINGS as E,
3756
- convertEditLayoutToFieldLayouts as F,
3757
- useDocument as G,
3988
+ extractContentTypeComponents as E,
3989
+ DEFAULT_SETTINGS as F,
3990
+ convertEditLayoutToFieldLayouts as G,
3758
3991
  HOOKS as H,
3759
3992
  InjectionZone as I,
3760
- index as J,
3761
- useDocumentActions as K,
3993
+ useDocument as J,
3994
+ index as K,
3995
+ useDocumentActions as L,
3762
3996
  Panels as P,
3763
3997
  RelativeTime as R,
3764
3998
  SINGLE_TYPES as S,
@@ -3776,18 +4010,18 @@ export {
3776
4010
  PERMISSIONS as k,
3777
4011
  DocumentRBAC as l,
3778
4012
  DOCUMENT_META_FIELDS as m,
3779
- useDocLayout as n,
3780
- useGetContentTypeConfigurationQuery as o,
3781
- CREATOR_FIELDS as p,
3782
- getMainField as q,
3783
- getDisplayName as r,
4013
+ CLONE_PATH as n,
4014
+ useDocLayout as o,
4015
+ useGetContentTypeConfigurationQuery as p,
4016
+ CREATOR_FIELDS as q,
4017
+ getMainField as r,
3784
4018
  setInitialData as s,
3785
- checkIfAttributeIsDisplayable as t,
4019
+ getDisplayName as t,
3786
4020
  useContentTypeSchema as u,
3787
- useGetAllDocumentsQuery as v,
3788
- convertListLayoutToFieldLayouts as w,
3789
- capitalise as x,
3790
- useUpdateContentTypeConfigurationMutation as y,
3791
- extractContentTypeComponents as z
4021
+ checkIfAttributeIsDisplayable as v,
4022
+ useGetAllDocumentsQuery as w,
4023
+ convertListLayoutToFieldLayouts as x,
4024
+ capitalise as y,
4025
+ useUpdateContentTypeConfigurationMutation as z
3792
4026
  };
3793
- //# sourceMappingURL=index-CaE6NG4a.mjs.map
4027
+ //# sourceMappingURL=index-BwqXeHiv.mjs.map