@strapi/content-manager 0.0.0-experimental.5b211b38912691ee2eab22d47b5095ea2fcfec76 → 0.0.0-experimental.5e04dee5c96cd68273df3b3cadf4635e19dc2afc

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 (103) hide show
  1. package/LICENSE +18 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-DmwmiFQy.mjs → ComponentConfigurationPage-B3yDbeU1.mjs} +3 -3
  3. package/dist/_chunks/{ComponentConfigurationPage-DmwmiFQy.mjs.map → ComponentConfigurationPage-B3yDbeU1.mjs.map} +1 -1
  4. package/dist/_chunks/{ComponentConfigurationPage-C-49MccQ.js → ComponentConfigurationPage-KXSuLnQD.js} +3 -3
  5. package/dist/_chunks/{ComponentConfigurationPage-C-49MccQ.js.map → ComponentConfigurationPage-KXSuLnQD.js.map} +1 -1
  6. package/dist/_chunks/{EditConfigurationPage-DjFJw56M.js → EditConfigurationPage-BQ17--5R.js} +3 -3
  7. package/dist/_chunks/{EditConfigurationPage-DjFJw56M.js.map → EditConfigurationPage-BQ17--5R.js.map} +1 -1
  8. package/dist/_chunks/{EditConfigurationPage-JT3E7NZy.mjs → EditConfigurationPage-D7PrLO8j.mjs} +3 -3
  9. package/dist/_chunks/{EditConfigurationPage-JT3E7NZy.mjs.map → EditConfigurationPage-D7PrLO8j.mjs.map} +1 -1
  10. package/dist/_chunks/{EditViewPage-CPj61RMh.mjs → EditViewPage-B7VgwJaG.mjs} +18 -7
  11. package/dist/_chunks/EditViewPage-B7VgwJaG.mjs.map +1 -0
  12. package/dist/_chunks/{EditViewPage-zT3fBr4Y.js → EditViewPage-BgjdnGz2.js} +18 -7
  13. package/dist/_chunks/EditViewPage-BgjdnGz2.js.map +1 -0
  14. package/dist/_chunks/{Field-Boxf9Ajp.js → Field-CdK7ZLmv.js} +165 -81
  15. package/dist/_chunks/Field-CdK7ZLmv.js.map +1 -0
  16. package/dist/_chunks/{Field-dha5VnIQ.mjs → Field-tHCw4lGA.mjs} +166 -82
  17. package/dist/_chunks/Field-tHCw4lGA.mjs.map +1 -0
  18. package/dist/_chunks/{Form-DHrru2AV.mjs → Form-BJxdTv3Q.mjs} +22 -11
  19. package/dist/_chunks/Form-BJxdTv3Q.mjs.map +1 -0
  20. package/dist/_chunks/{Form-y5g1SRsh.js → Form-C_0KTVvV.js} +22 -11
  21. package/dist/_chunks/Form-C_0KTVvV.js.map +1 -0
  22. package/dist/_chunks/{History-Bru_KoeP.mjs → History-DR2txJLE.mjs} +44 -19
  23. package/dist/_chunks/History-DR2txJLE.mjs.map +1 -0
  24. package/dist/_chunks/{History-CqN6K7SX.js → History-nuEzM5qm.js} +44 -19
  25. package/dist/_chunks/History-nuEzM5qm.js.map +1 -0
  26. package/dist/_chunks/{ListConfigurationPage-R_p-SbHZ.js → ListConfigurationPage-CnB86Psm.js} +20 -8
  27. package/dist/_chunks/ListConfigurationPage-CnB86Psm.js.map +1 -0
  28. package/dist/_chunks/{ListConfigurationPage-D8wGABj0.mjs → ListConfigurationPage-voFVtXu6.mjs} +20 -8
  29. package/dist/_chunks/ListConfigurationPage-voFVtXu6.mjs.map +1 -0
  30. package/dist/_chunks/{ListViewPage-SID6TRb9.mjs → ListViewPage-B_GaWgRH.mjs} +22 -8
  31. package/dist/_chunks/ListViewPage-B_GaWgRH.mjs.map +1 -0
  32. package/dist/_chunks/{ListViewPage-pEw_zug9.js → ListViewPage-SXIXm-RM.js} +21 -7
  33. package/dist/_chunks/ListViewPage-SXIXm-RM.js.map +1 -0
  34. package/dist/_chunks/{NoContentTypePage-C5dcQojD.js → NoContentTypePage-BzsQ3hLZ.js} +2 -2
  35. package/dist/_chunks/{NoContentTypePage-C5dcQojD.js.map → NoContentTypePage-BzsQ3hLZ.js.map} +1 -1
  36. package/dist/_chunks/{NoContentTypePage-CJ7UXwrQ.mjs → NoContentTypePage-CYiGpsbj.mjs} +2 -2
  37. package/dist/_chunks/{NoContentTypePage-CJ7UXwrQ.mjs.map → NoContentTypePage-CYiGpsbj.mjs.map} +1 -1
  38. package/dist/_chunks/{NoPermissionsPage-B7syEq5E.mjs → NoPermissionsPage-B5baIHal.mjs} +2 -2
  39. package/dist/_chunks/{NoPermissionsPage-B7syEq5E.mjs.map → NoPermissionsPage-B5baIHal.mjs.map} +1 -1
  40. package/dist/_chunks/{NoPermissionsPage-BtPrImPP.js → NoPermissionsPage-IGkId4C5.js} +2 -2
  41. package/dist/_chunks/{NoPermissionsPage-BtPrImPP.js.map → NoPermissionsPage-IGkId4C5.js.map} +1 -1
  42. package/dist/_chunks/{Relations-B9Crnhnn.mjs → Relations-CIYDdKU-.mjs} +4 -4
  43. package/dist/_chunks/Relations-CIYDdKU-.mjs.map +1 -0
  44. package/dist/_chunks/{Relations-DjTQ5kGB.js → Relations-Dhuurpx2.js} +4 -4
  45. package/dist/_chunks/Relations-Dhuurpx2.js.map +1 -0
  46. package/dist/_chunks/{en-Ux26r5pl.mjs → en-BrCTWlZv.mjs} +5 -4
  47. package/dist/_chunks/{en-Ux26r5pl.mjs.map → en-BrCTWlZv.mjs.map} +1 -1
  48. package/dist/_chunks/{en-fbKQxLGn.js → en-uOUIxfcQ.js} +5 -4
  49. package/dist/_chunks/{en-fbKQxLGn.js.map → en-uOUIxfcQ.js.map} +1 -1
  50. package/dist/_chunks/{index-DJXJw9V5.mjs → index-C9TJPyni.mjs} +317 -138
  51. package/dist/_chunks/index-C9TJPyni.mjs.map +1 -0
  52. package/dist/_chunks/{index-DVPWZkbS.js → index-CdT0kHZ8.js} +314 -135
  53. package/dist/_chunks/index-CdT0kHZ8.js.map +1 -0
  54. package/dist/_chunks/{layout-Bau7ZfLV.mjs → layout-BNqvLR_b.mjs} +23 -11
  55. package/dist/_chunks/layout-BNqvLR_b.mjs.map +1 -0
  56. package/dist/_chunks/{layout-Dm6fbiQj.js → layout-C6dxWYT7.js} +22 -10
  57. package/dist/_chunks/layout-C6dxWYT7.js.map +1 -0
  58. package/dist/_chunks/{relations-BH_kBSJ0.mjs → relations-CkKqKw65.mjs} +2 -2
  59. package/dist/_chunks/{relations-BH_kBSJ0.mjs.map → relations-CkKqKw65.mjs.map} +1 -1
  60. package/dist/_chunks/{relations-CKnpRgrN.js → relations-DtFaDnP1.js} +2 -2
  61. package/dist/_chunks/{relations-CKnpRgrN.js.map → relations-DtFaDnP1.js.map} +1 -1
  62. package/dist/admin/index.js +1 -1
  63. package/dist/admin/index.mjs +1 -1
  64. package/dist/admin/src/history/index.d.ts +3 -0
  65. package/dist/admin/src/index.d.ts +1 -0
  66. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +1 -0
  67. package/dist/admin/src/pages/EditView/components/FormInputs/Relations.d.ts +20 -0
  68. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.d.ts +2 -2
  69. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.d.ts +2 -2
  70. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +10 -22
  71. package/dist/server/index.js +134 -85
  72. package/dist/server/index.js.map +1 -1
  73. package/dist/server/index.mjs +135 -86
  74. package/dist/server/index.mjs.map +1 -1
  75. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  76. package/dist/server/src/controllers/uid.d.ts.map +1 -1
  77. package/dist/server/src/controllers/validation/dimensions.d.ts +4 -2
  78. package/dist/server/src/controllers/validation/dimensions.d.ts.map +1 -1
  79. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  80. package/dist/server/src/history/services/utils.d.ts +1 -1
  81. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  82. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  83. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  84. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  85. package/package.json +8 -8
  86. package/dist/_chunks/EditViewPage-CPj61RMh.mjs.map +0 -1
  87. package/dist/_chunks/EditViewPage-zT3fBr4Y.js.map +0 -1
  88. package/dist/_chunks/Field-Boxf9Ajp.js.map +0 -1
  89. package/dist/_chunks/Field-dha5VnIQ.mjs.map +0 -1
  90. package/dist/_chunks/Form-DHrru2AV.mjs.map +0 -1
  91. package/dist/_chunks/Form-y5g1SRsh.js.map +0 -1
  92. package/dist/_chunks/History-Bru_KoeP.mjs.map +0 -1
  93. package/dist/_chunks/History-CqN6K7SX.js.map +0 -1
  94. package/dist/_chunks/ListConfigurationPage-D8wGABj0.mjs.map +0 -1
  95. package/dist/_chunks/ListConfigurationPage-R_p-SbHZ.js.map +0 -1
  96. package/dist/_chunks/ListViewPage-SID6TRb9.mjs.map +0 -1
  97. package/dist/_chunks/ListViewPage-pEw_zug9.js.map +0 -1
  98. package/dist/_chunks/Relations-B9Crnhnn.mjs.map +0 -1
  99. package/dist/_chunks/Relations-DjTQ5kGB.js.map +0 -1
  100. package/dist/_chunks/index-DJXJw9V5.mjs.map +0 -1
  101. package/dist/_chunks/index-DVPWZkbS.js.map +0 -1
  102. package/dist/_chunks/layout-Bau7ZfLV.mjs.map +0 -1
  103. package/dist/_chunks/layout-Dm6fbiQj.js.map +0 -1
@@ -2,15 +2,15 @@
2
2
  const Icons = require("@strapi/icons");
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const strapiAdmin = require("@strapi/admin/strapi-admin");
5
- const qs = require("qs");
6
- const reactIntl = require("react-intl");
7
- const reactRouterDom = require("react-router-dom");
8
5
  const React = require("react");
9
6
  const designSystem = require("@strapi/design-system");
7
+ const reactIntl = require("react-intl");
8
+ const reactRouterDom = require("react-router-dom");
10
9
  const styledComponents = require("styled-components");
11
10
  const yup = require("yup");
12
11
  const pipe = require("lodash/fp/pipe");
13
12
  const dateFns = require("date-fns");
13
+ const qs = require("qs");
14
14
  const toolkit = require("@reduxjs/toolkit");
15
15
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
16
16
  function _interopNamespace(e) {
@@ -70,42 +70,6 @@ const useInjectionZone = (area) => {
70
70
  const [page, position] = area.split(".");
71
71
  return contentManagerPlugin.getInjectedComponents(page, position);
72
72
  };
73
- const HistoryAction = ({ model, document }) => {
74
- const { formatMessage } = reactIntl.useIntl();
75
- const [{ query }] = strapiAdmin.useQueryParams();
76
- const navigate = reactRouterDom.useNavigate();
77
- const pluginsQueryParams = qs.stringify({ plugins: query.plugins }, { encode: false });
78
- if (!window.strapi.features.isEnabled("cms-content-history")) {
79
- return null;
80
- }
81
- return {
82
- icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.ClockCounterClockwise, {}),
83
- label: formatMessage({
84
- id: "content-manager.history.document-action",
85
- defaultMessage: "Content History"
86
- }),
87
- onClick: () => navigate({ pathname: "history", search: pluginsQueryParams }),
88
- disabled: (
89
- /**
90
- * The user is creating a new document.
91
- * It hasn't been saved yet, so there's no history to go to
92
- */
93
- !document || /**
94
- * The document has been created but the current dimension has never been saved.
95
- * For example, the user is creating a new locale in an existing document,
96
- * so there's no history for the document in that locale
97
- */
98
- !document.id || /**
99
- * History is only available for content types created by the user.
100
- * These have the `api::` prefix, as opposed to the ones created by Strapi or plugins,
101
- * which start with `admin::` or `plugin::`
102
- */
103
- !model.startsWith("api::")
104
- ),
105
- position: "header"
106
- };
107
- };
108
- HistoryAction.type = "history";
109
73
  const ID = "id";
110
74
  const CREATED_BY_ATTRIBUTE_NAME = "createdBy";
111
75
  const UPDATED_BY_ATTRIBUTE_NAME = "updatedBy";
@@ -229,7 +193,12 @@ const documentApi = contentManagerApi.injectEndpoints({
229
193
  params: query
230
194
  }
231
195
  }),
232
- invalidatesTags: (_result, _error, { model }) => [{ type: "Document", id: `${model}_LIST` }]
196
+ invalidatesTags: (_result, error, { model }) => {
197
+ if (error) {
198
+ return [];
199
+ }
200
+ return [{ type: "Document", id: `${model}_LIST` }];
201
+ }
233
202
  }),
234
203
  cloneDocument: builder.mutation({
235
204
  query: ({ model, sourceId, data, params }) => ({
@@ -316,6 +285,7 @@ const documentApi = contentManagerApi.injectEndpoints({
316
285
  }),
317
286
  providesTags: (result, _error, arg) => {
318
287
  return [
288
+ { type: "Document", id: `ALL_LIST` },
319
289
  { type: "Document", id: `${arg.model}_LIST` },
320
290
  ...result?.results.map(({ documentId }) => ({
321
291
  type: "Document",
@@ -354,6 +324,11 @@ const documentApi = contentManagerApi.injectEndpoints({
354
324
  {
355
325
  type: "Document",
356
326
  id: collectionType !== SINGLE_TYPES ? `${model}_${result && "documentId" in result ? result.documentId : documentId}` : model
327
+ },
328
+ // Make it easy to invalidate all individual documents queries for a model
329
+ {
330
+ type: "Document",
331
+ id: `${model}_ALL_ITEMS`
357
332
  }
358
333
  ];
359
334
  }
@@ -419,6 +394,18 @@ const documentApi = contentManagerApi.injectEndpoints({
419
394
  },
420
395
  "Relations"
421
396
  ];
397
+ },
398
+ async onQueryStarted({ data, ...patch }, { dispatch, queryFulfilled }) {
399
+ const patchResult = dispatch(
400
+ documentApi.util.updateQueryData("getDocument", patch, (draft) => {
401
+ Object.assign(draft.data, data);
402
+ })
403
+ );
404
+ try {
405
+ await queryFulfilled;
406
+ } catch {
407
+ patchResult.undo();
408
+ }
422
409
  }
423
410
  }),
424
411
  unpublishDocument: builder.mutation({
@@ -602,6 +589,14 @@ const createAttributeSchema = (attribute) => {
602
589
  if (!value || typeof value === "string" && value.length === 0) {
603
590
  return true;
604
591
  }
592
+ if (typeof value === "object") {
593
+ try {
594
+ JSON.stringify(value);
595
+ return true;
596
+ } catch (err) {
597
+ return false;
598
+ }
599
+ }
605
600
  try {
606
601
  JSON.parse(value);
607
602
  return true;
@@ -621,11 +616,11 @@ const createAttributeSchema = (attribute) => {
621
616
  }
622
617
  };
623
618
  const addRequiredValidation = (attribute) => (schema) => {
624
- if (attribute.required) {
625
- return schema.required({
626
- id: strapiAdmin.translatedErrors.required.id,
627
- defaultMessage: "This field is required."
628
- });
619
+ if ((attribute.type === "component" && attribute.repeatable || attribute.type === "dynamiczone") && attribute.required && "min" in schema) {
620
+ return schema.min(1, strapiAdmin.translatedErrors.required);
621
+ }
622
+ if (attribute.required && attribute.type !== "relation") {
623
+ return schema.required(strapiAdmin.translatedErrors.required);
629
624
  }
630
625
  return schema?.nullable ? schema.nullable() : (
631
626
  // In some cases '.nullable' will not be available on the schema.
@@ -659,6 +654,28 @@ const addMaxLengthValidation = (attribute) => (schema) => {
659
654
  const addMinValidation = (attribute) => (schema) => {
660
655
  if ("min" in attribute) {
661
656
  const min = toInteger(attribute.min);
657
+ if (attribute.type === "component" && attribute.repeatable || attribute.type === "dynamiczone") {
658
+ if (!attribute.required && "test" in schema && min) {
659
+ return schema.test(
660
+ "custom-min",
661
+ {
662
+ ...strapiAdmin.translatedErrors.min,
663
+ values: {
664
+ min: attribute.min
665
+ }
666
+ },
667
+ (value) => {
668
+ if (!value) {
669
+ return true;
670
+ }
671
+ if (Array.isArray(value) && value.length === 0) {
672
+ return true;
673
+ }
674
+ return value.length >= min;
675
+ }
676
+ );
677
+ }
678
+ }
662
679
  if ("min" in schema && min) {
663
680
  return schema.min(min, {
664
681
  ...strapiAdmin.translatedErrors.min,
@@ -785,7 +802,10 @@ const useDocument = (args, opts) => {
785
802
  isLoading: isLoadingDocument,
786
803
  isFetching: isFetchingDocument,
787
804
  error
788
- } = useGetDocumentQuery(args, opts);
805
+ } = useGetDocumentQuery(args, {
806
+ ...opts,
807
+ skip: !args.documentId && args.collectionType !== SINGLE_TYPES || opts?.skip
808
+ });
789
809
  const { components, schema, isLoading: isLoadingSchema } = useContentTypeSchema(args.model);
790
810
  React__namespace.useEffect(() => {
791
811
  if (error) {
@@ -1206,7 +1226,6 @@ const useDocumentActions = () => {
1206
1226
  sourceId
1207
1227
  });
1208
1228
  if ("error" in res) {
1209
- toggleNotification({ type: "danger", message: formatAPIError(res.error) });
1210
1229
  return { error: res.error };
1211
1230
  }
1212
1231
  toggleNotification({
@@ -1287,7 +1306,7 @@ const useDocumentActions = () => {
1287
1306
  };
1288
1307
  };
1289
1308
  const ProtectedHistoryPage = React.lazy(
1290
- () => Promise.resolve().then(() => require("./History-CqN6K7SX.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
1309
+ () => Promise.resolve().then(() => require("./History-nuEzM5qm.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
1291
1310
  );
1292
1311
  const routes$1 = [
1293
1312
  {
@@ -1300,31 +1319,31 @@ const routes$1 = [
1300
1319
  }
1301
1320
  ];
1302
1321
  const ProtectedEditViewPage = React.lazy(
1303
- () => Promise.resolve().then(() => require("./EditViewPage-zT3fBr4Y.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
1322
+ () => Promise.resolve().then(() => require("./EditViewPage-BgjdnGz2.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
1304
1323
  );
1305
1324
  const ProtectedListViewPage = React.lazy(
1306
- () => Promise.resolve().then(() => require("./ListViewPage-pEw_zug9.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
1325
+ () => Promise.resolve().then(() => require("./ListViewPage-SXIXm-RM.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
1307
1326
  );
1308
1327
  const ProtectedListConfiguration = React.lazy(
1309
- () => Promise.resolve().then(() => require("./ListConfigurationPage-R_p-SbHZ.js")).then((mod) => ({
1328
+ () => Promise.resolve().then(() => require("./ListConfigurationPage-CnB86Psm.js")).then((mod) => ({
1310
1329
  default: mod.ProtectedListConfiguration
1311
1330
  }))
1312
1331
  );
1313
1332
  const ProtectedEditConfigurationPage = React.lazy(
1314
- () => Promise.resolve().then(() => require("./EditConfigurationPage-DjFJw56M.js")).then((mod) => ({
1333
+ () => Promise.resolve().then(() => require("./EditConfigurationPage-BQ17--5R.js")).then((mod) => ({
1315
1334
  default: mod.ProtectedEditConfigurationPage
1316
1335
  }))
1317
1336
  );
1318
1337
  const ProtectedComponentConfigurationPage = React.lazy(
1319
- () => Promise.resolve().then(() => require("./ComponentConfigurationPage-C-49MccQ.js")).then((mod) => ({
1338
+ () => Promise.resolve().then(() => require("./ComponentConfigurationPage-KXSuLnQD.js")).then((mod) => ({
1320
1339
  default: mod.ProtectedComponentConfigurationPage
1321
1340
  }))
1322
1341
  );
1323
1342
  const NoPermissions = React.lazy(
1324
- () => Promise.resolve().then(() => require("./NoPermissionsPage-BtPrImPP.js")).then((mod) => ({ default: mod.NoPermissions }))
1343
+ () => Promise.resolve().then(() => require("./NoPermissionsPage-IGkId4C5.js")).then((mod) => ({ default: mod.NoPermissions }))
1325
1344
  );
1326
1345
  const NoContentType = React.lazy(
1327
- () => Promise.resolve().then(() => require("./NoContentTypePage-C5dcQojD.js")).then((mod) => ({ default: mod.NoContentType }))
1346
+ () => Promise.resolve().then(() => require("./NoContentTypePage-BzsQ3hLZ.js")).then((mod) => ({ default: mod.NoContentType }))
1328
1347
  );
1329
1348
  const CollectionTypePages = () => {
1330
1349
  const { collectionType } = reactRouterDom.useParams();
@@ -1438,12 +1457,14 @@ const DocumentActionButton = (action) => {
1438
1457
  /* @__PURE__ */ jsxRuntime.jsx(
1439
1458
  designSystem.Button,
1440
1459
  {
1441
- flex: 1,
1460
+ flex: "auto",
1442
1461
  startIcon: action.icon,
1443
1462
  disabled: action.disabled,
1444
1463
  onClick: handleClick(action),
1445
1464
  justifyContent: "center",
1446
1465
  variant: action.variant || "default",
1466
+ paddingTop: "7px",
1467
+ paddingBottom: "7px",
1447
1468
  children: action.label
1448
1469
  }
1449
1470
  ),
@@ -1451,7 +1472,7 @@ const DocumentActionButton = (action) => {
1451
1472
  DocumentActionConfirmDialog,
1452
1473
  {
1453
1474
  ...action.dialog,
1454
- variant: action.variant,
1475
+ variant: action.dialog?.variant ?? action.variant,
1455
1476
  isOpen: dialogId === action.id,
1456
1477
  onClose: handleClose
1457
1478
  }
@@ -1503,14 +1524,14 @@ const DocumentActionsMenu = ({
1503
1524
  };
1504
1525
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Root, { open: isOpen, onOpenChange: setIsOpen, children: [
1505
1526
  /* @__PURE__ */ jsxRuntime.jsxs(
1506
- designSystem.Menu.Trigger,
1527
+ StyledMoreButton,
1507
1528
  {
1508
1529
  disabled: isDisabled,
1509
1530
  size: "S",
1510
1531
  endIcon: null,
1511
- paddingTop: "7px",
1512
- paddingLeft: "9px",
1513
- paddingRight: "9px",
1532
+ paddingTop: "4px",
1533
+ paddingLeft: "7px",
1534
+ paddingRight: "7px",
1514
1535
  variant,
1515
1536
  children: [
1516
1537
  /* @__PURE__ */ jsxRuntime.jsx(Icons.More, { "aria-hidden": true, focusable: false }),
@@ -1530,10 +1551,25 @@ const DocumentActionsMenu = ({
1530
1551
  onSelect: handleClick(action),
1531
1552
  display: "block",
1532
1553
  children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", gap: 4, children: [
1533
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { color: convertActionVariantToColor(action.variant), gap: 2, tag: "span", children: [
1534
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { tag: "span", color: convertActionVariantToIconColor(action.variant), children: action.icon }),
1535
- action.label
1536
- ] }),
1554
+ /* @__PURE__ */ jsxRuntime.jsxs(
1555
+ designSystem.Flex,
1556
+ {
1557
+ color: !action.disabled ? convertActionVariantToColor(action.variant) : "inherit",
1558
+ gap: 2,
1559
+ tag: "span",
1560
+ children: [
1561
+ /* @__PURE__ */ jsxRuntime.jsx(
1562
+ designSystem.Flex,
1563
+ {
1564
+ tag: "span",
1565
+ color: !action.disabled ? convertActionVariantToIconColor(action.variant) : "inherit",
1566
+ children: action.icon
1567
+ }
1568
+ ),
1569
+ action.label
1570
+ ]
1571
+ }
1572
+ ),
1537
1573
  action.id.startsWith("HistoryAction") && /* @__PURE__ */ jsxRuntime.jsx(
1538
1574
  designSystem.Flex,
1539
1575
  {
@@ -1604,6 +1640,11 @@ const convertActionVariantToIconColor = (variant = "secondary") => {
1604
1640
  return "primary600";
1605
1641
  }
1606
1642
  };
1643
+ const StyledMoreButton = styledComponents.styled(designSystem.Menu.Trigger)`
1644
+ & > span {
1645
+ display: flex;
1646
+ }
1647
+ `;
1607
1648
  const DocumentActionConfirmDialog = ({
1608
1649
  onClose,
1609
1650
  onCancel,
@@ -1680,6 +1721,12 @@ const PublishAction$1 = ({
1680
1721
  ({ canPublish: canPublish2, canCreate: canCreate2, canUpdate: canUpdate2 }) => ({ canPublish: canPublish2, canCreate: canCreate2, canUpdate: canUpdate2 })
1681
1722
  );
1682
1723
  const { publish } = useDocumentActions();
1724
+ const [
1725
+ countDraftRelations,
1726
+ { isLoading: isLoadingDraftRelations, isError: isErrorDraftRelations }
1727
+ ] = useLazyGetDraftRelationCountQuery();
1728
+ const [localCountOfDraftRelations, setLocalCountOfDraftRelations] = React__namespace.useState(0);
1729
+ const [serverCountOfDraftRelations, setServerCountOfDraftRelations] = React__namespace.useState(0);
1683
1730
  const [{ query, rawQuery }] = strapiAdmin.useQueryParams();
1684
1731
  const params = React__namespace.useMemo(() => buildValidParams(query), [query]);
1685
1732
  const modified = strapiAdmin.useForm("PublishAction", ({ modified: modified2 }) => modified2);
@@ -1688,10 +1735,101 @@ const PublishAction$1 = ({
1688
1735
  const validate = strapiAdmin.useForm("PublishAction", (state) => state.validate);
1689
1736
  const setErrors = strapiAdmin.useForm("PublishAction", (state) => state.setErrors);
1690
1737
  const formValues = strapiAdmin.useForm("PublishAction", ({ values }) => values);
1738
+ React__namespace.useEffect(() => {
1739
+ if (isErrorDraftRelations) {
1740
+ toggleNotification({
1741
+ type: "danger",
1742
+ message: formatMessage({
1743
+ id: getTranslation("error.records.fetch-draft-relatons"),
1744
+ defaultMessage: "An error occurred while fetching draft relations on this document."
1745
+ })
1746
+ });
1747
+ }
1748
+ }, [isErrorDraftRelations, toggleNotification, formatMessage]);
1749
+ React__namespace.useEffect(() => {
1750
+ const localDraftRelations = /* @__PURE__ */ new Set();
1751
+ const extractDraftRelations = (data) => {
1752
+ const relations = data.connect || [];
1753
+ relations.forEach((relation) => {
1754
+ if (relation.status === "draft") {
1755
+ localDraftRelations.add(relation.id);
1756
+ }
1757
+ });
1758
+ };
1759
+ const traverseAndExtract = (data) => {
1760
+ Object.entries(data).forEach(([key, value]) => {
1761
+ if (key === "connect" && Array.isArray(value)) {
1762
+ extractDraftRelations({ connect: value });
1763
+ } else if (typeof value === "object" && value !== null) {
1764
+ traverseAndExtract(value);
1765
+ }
1766
+ });
1767
+ };
1768
+ if (!documentId || modified) {
1769
+ traverseAndExtract(formValues);
1770
+ setLocalCountOfDraftRelations(localDraftRelations.size);
1771
+ }
1772
+ }, [documentId, modified, formValues, setLocalCountOfDraftRelations]);
1773
+ React__namespace.useEffect(() => {
1774
+ if (documentId) {
1775
+ const fetchDraftRelationsCount = async () => {
1776
+ const { data, error } = await countDraftRelations({
1777
+ collectionType,
1778
+ model,
1779
+ documentId,
1780
+ params
1781
+ });
1782
+ if (error) {
1783
+ throw error;
1784
+ }
1785
+ if (data) {
1786
+ setServerCountOfDraftRelations(data.data);
1787
+ }
1788
+ };
1789
+ fetchDraftRelationsCount();
1790
+ }
1791
+ }, [documentId, countDraftRelations, collectionType, model, params]);
1691
1792
  const isDocumentPublished = (document?.[PUBLISHED_AT_ATTRIBUTE_NAME] || meta?.availableStatus.some((doc) => doc[PUBLISHED_AT_ATTRIBUTE_NAME] !== null)) && document?.status !== "modified";
1692
1793
  if (!schema?.options?.draftAndPublish) {
1693
1794
  return null;
1694
1795
  }
1796
+ const performPublish = async () => {
1797
+ setSubmitting(true);
1798
+ try {
1799
+ const { errors } = await validate();
1800
+ if (errors) {
1801
+ toggleNotification({
1802
+ type: "danger",
1803
+ message: formatMessage({
1804
+ id: "content-manager.validation.error",
1805
+ defaultMessage: "There are validation errors in your document. Please fix them before saving."
1806
+ })
1807
+ });
1808
+ return;
1809
+ }
1810
+ const res = await publish(
1811
+ {
1812
+ collectionType,
1813
+ model,
1814
+ documentId,
1815
+ params
1816
+ },
1817
+ formValues
1818
+ );
1819
+ if ("data" in res && collectionType !== SINGLE_TYPES) {
1820
+ navigate({
1821
+ pathname: `../${collectionType}/${model}/${res.data.documentId}`,
1822
+ search: rawQuery
1823
+ });
1824
+ } else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
1825
+ setErrors(formatValidationErrors(res.error));
1826
+ }
1827
+ } finally {
1828
+ setSubmitting(false);
1829
+ }
1830
+ };
1831
+ const totalDraftRelations = localCountOfDraftRelations + serverCountOfDraftRelations;
1832
+ const hasDraftRelations = totalDraftRelations > 0;
1695
1833
  return {
1696
1834
  /**
1697
1835
  * Disabled when:
@@ -1701,49 +1839,39 @@ const PublishAction$1 = ({
1701
1839
  * - the document is already published & not modified
1702
1840
  * - the document is being created & not modified
1703
1841
  * - the user doesn't have the permission to publish
1704
- * - the user doesn't have the permission to create a new document
1705
- * - the user doesn't have the permission to update the document
1706
1842
  */
1707
- disabled: isCloning || isSubmitting || activeTab === "published" || !modified && isDocumentPublished || !modified && !document?.documentId || !canPublish || Boolean(!document?.documentId && !canCreate || document?.documentId && !canUpdate),
1843
+ disabled: isCloning || isSubmitting || isLoadingDraftRelations || activeTab === "published" || !modified && isDocumentPublished || !modified && !document?.documentId || !canPublish,
1708
1844
  label: formatMessage({
1709
1845
  id: "app.utils.publish",
1710
1846
  defaultMessage: "Publish"
1711
1847
  }),
1712
1848
  onClick: async () => {
1713
- setSubmitting(true);
1714
- try {
1715
- const { errors } = await validate();
1716
- if (errors) {
1717
- toggleNotification({
1718
- type: "danger",
1719
- message: formatMessage({
1720
- id: "content-manager.validation.error",
1721
- defaultMessage: "There are validation errors in your document. Please fix them before saving."
1722
- })
1723
- });
1724
- return;
1725
- }
1726
- const res = await publish(
1727
- {
1728
- collectionType,
1729
- model,
1730
- documentId,
1731
- params
1732
- },
1733
- formValues
1734
- );
1735
- if ("data" in res && collectionType !== SINGLE_TYPES) {
1736
- navigate({
1737
- pathname: `../${collectionType}/${model}/${res.data.documentId}`,
1738
- search: rawQuery
1739
- });
1740
- } else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
1741
- setErrors(formatValidationErrors(res.error));
1849
+ if (hasDraftRelations) {
1850
+ return;
1851
+ }
1852
+ await performPublish();
1853
+ },
1854
+ dialog: hasDraftRelations ? {
1855
+ type: "dialog",
1856
+ variant: "danger",
1857
+ footer: null,
1858
+ title: formatMessage({
1859
+ id: getTranslation(`popUpwarning.warning.bulk-has-draft-relations.title`),
1860
+ defaultMessage: "Confirmation"
1861
+ }),
1862
+ content: formatMessage(
1863
+ {
1864
+ id: getTranslation(`popUpwarning.warning.bulk-has-draft-relations.message`),
1865
+ defaultMessage: "This entry is related to {count, plural, one {# draft entry} other {# draft entries}}. Publishing it could leave broken links in your app."
1866
+ },
1867
+ {
1868
+ count: totalDraftRelations
1742
1869
  }
1743
- } finally {
1744
- setSubmitting(false);
1870
+ ),
1871
+ onConfirm: async () => {
1872
+ await performPublish();
1745
1873
  }
1746
- }
1874
+ } : void 0
1747
1875
  };
1748
1876
  };
1749
1877
  PublishAction$1.type = "publish";
@@ -1759,7 +1887,7 @@ const UpdateAction = ({
1759
1887
  const cloneMatch = reactRouterDom.useMatch(CLONE_PATH);
1760
1888
  const isCloning = cloneMatch !== null;
1761
1889
  const { formatMessage } = reactIntl.useIntl();
1762
- const { canCreate, canUpdate } = useDocumentRBAC("UpdateAction", ({ canCreate: canCreate2, canUpdate: canUpdate2 }) => ({
1890
+ useDocumentRBAC("UpdateAction", ({ canCreate: canCreate2, canUpdate: canUpdate2 }) => ({
1763
1891
  canCreate: canCreate2,
1764
1892
  canUpdate: canUpdate2
1765
1893
  }));
@@ -1779,10 +1907,8 @@ const UpdateAction = ({
1779
1907
  * - the form is submitting
1780
1908
  * - the document is not modified & we're not cloning (you can save a clone entity straight away)
1781
1909
  * - the active tab is the published tab
1782
- * - the user doesn't have the permission to create a new document
1783
- * - the user doesn't have the permission to update the document
1784
1910
  */
1785
- disabled: isSubmitting || !modified && !isCloning || activeTab === "published" || Boolean(!documentId && !canCreate || documentId && !canUpdate),
1911
+ disabled: isSubmitting || !modified && !isCloning || activeTab === "published",
1786
1912
  label: formatMessage({
1787
1913
  id: "content-manager.containers.Edit.save",
1788
1914
  defaultMessage: "Save"
@@ -1811,10 +1937,13 @@ const UpdateAction = ({
1811
1937
  document
1812
1938
  );
1813
1939
  if ("data" in res) {
1814
- navigate({
1815
- pathname: `../${collectionType}/${model}/${res.data.documentId}`,
1816
- search: rawQuery
1817
- });
1940
+ navigate(
1941
+ {
1942
+ pathname: `../${res.data.documentId}`,
1943
+ search: rawQuery
1944
+ },
1945
+ { relative: "path" }
1946
+ );
1818
1947
  } else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
1819
1948
  setErrors(formatValidationErrors(res.error));
1820
1949
  }
@@ -1842,10 +1971,13 @@ const UpdateAction = ({
1842
1971
  document
1843
1972
  );
1844
1973
  if ("data" in res && collectionType !== SINGLE_TYPES) {
1845
- navigate({
1846
- pathname: `../${collectionType}/${model}/${res.data.documentId}`,
1847
- search: rawQuery
1848
- });
1974
+ navigate(
1975
+ {
1976
+ pathname: `../${res.data.documentId}`,
1977
+ search: rawQuery
1978
+ },
1979
+ { replace: true, relative: "path" }
1980
+ );
1849
1981
  } else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
1850
1982
  setErrors(formatValidationErrors(res.error));
1851
1983
  }
@@ -2091,23 +2223,13 @@ const Header = ({ isCreating, status, title: documentTitle = "Untitled" }) => {
2091
2223
  id: "content-manager.containers.edit.title.new",
2092
2224
  defaultMessage: "Create an entry"
2093
2225
  }) : documentTitle;
2094
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", paddingTop: 8, paddingBottom: 4, gap: 3, children: [
2226
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", paddingTop: 6, paddingBottom: 4, gap: 2, children: [
2095
2227
  /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.BackButton, {}),
2096
- /* @__PURE__ */ jsxRuntime.jsxs(
2097
- designSystem.Flex,
2098
- {
2099
- width: "100%",
2100
- justifyContent: "space-between",
2101
- paddingTop: 1,
2102
- gap: "80px",
2103
- alignItems: "flex-start",
2104
- children: [
2105
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "alpha", tag: "h1", children: title }),
2106
- /* @__PURE__ */ jsxRuntime.jsx(HeaderToolbar, {})
2107
- ]
2108
- }
2109
- ),
2110
- status ? /* @__PURE__ */ jsxRuntime.jsx(DocumentStatus, { status: isCloning ? "draft" : status }) : null
2228
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { width: "100%", justifyContent: "space-between", gap: "80px", alignItems: "flex-start", children: [
2229
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "alpha", tag: "h1", children: title }),
2230
+ /* @__PURE__ */ jsxRuntime.jsx(HeaderToolbar, {})
2231
+ ] }),
2232
+ status ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { marginTop: 1, children: /* @__PURE__ */ jsxRuntime.jsx(DocumentStatus, { status: isCloning ? "draft" : status }) }) : null
2111
2233
  ] });
2112
2234
  };
2113
2235
  const HeaderToolbar = () => {
@@ -2798,7 +2920,7 @@ const ConfirmBulkActionDialog = ({
2798
2920
  endAction
2799
2921
  }) => {
2800
2922
  const { formatMessage } = reactIntl.useIntl();
2801
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Root, { onOpenChange: onToggleDialog, open: isOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Content, { children: [
2923
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Root, { open: isOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Content, { children: [
2802
2924
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Header, { children: formatMessage({
2803
2925
  id: "app.components.ConfirmDialog.title",
2804
2926
  defaultMessage: "Confirmation"
@@ -2919,7 +3041,14 @@ const formatErrorMessages = (errors, parentKey, formatMessage) => {
2919
3041
  )
2920
3042
  );
2921
3043
  } else {
2922
- messages.push(...formatErrorMessages(value, currentKey, formatMessage));
3044
+ messages.push(
3045
+ ...formatErrorMessages(
3046
+ // @ts-expect-error TODO: check why value is not compatible with FormErrors
3047
+ value,
3048
+ currentKey,
3049
+ formatMessage
3050
+ )
3051
+ );
2923
3052
  }
2924
3053
  } else {
2925
3054
  messages.push(
@@ -3582,8 +3711,7 @@ class ContentManagerPlugin {
3582
3711
  documentActions = [
3583
3712
  ...DEFAULT_ACTIONS,
3584
3713
  ...DEFAULT_TABLE_ROW_ACTIONS,
3585
- ...DEFAULT_HEADER_ACTIONS,
3586
- HistoryAction
3714
+ ...DEFAULT_HEADER_ACTIONS
3587
3715
  ];
3588
3716
  editViewSidePanels = [ActionsPanel];
3589
3717
  headerActions = [];
@@ -3672,6 +3800,52 @@ const getPrintableType = (value) => {
3672
3800
  }
3673
3801
  return nativeType;
3674
3802
  };
3803
+ const HistoryAction = ({ model, document }) => {
3804
+ const { formatMessage } = reactIntl.useIntl();
3805
+ const [{ query }] = strapiAdmin.useQueryParams();
3806
+ const navigate = reactRouterDom.useNavigate();
3807
+ const pluginsQueryParams = qs.stringify({ plugins: query.plugins }, { encode: false });
3808
+ if (!window.strapi.features.isEnabled("cms-content-history")) {
3809
+ return null;
3810
+ }
3811
+ return {
3812
+ icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.ClockCounterClockwise, {}),
3813
+ label: formatMessage({
3814
+ id: "content-manager.history.document-action",
3815
+ defaultMessage: "Content History"
3816
+ }),
3817
+ onClick: () => navigate({ pathname: "history", search: pluginsQueryParams }),
3818
+ disabled: (
3819
+ /**
3820
+ * The user is creating a new document.
3821
+ * It hasn't been saved yet, so there's no history to go to
3822
+ */
3823
+ !document || /**
3824
+ * The document has been created but the current dimension has never been saved.
3825
+ * For example, the user is creating a new locale in an existing document,
3826
+ * so there's no history for the document in that locale
3827
+ */
3828
+ !document.id || /**
3829
+ * History is only available for content types created by the user.
3830
+ * These have the `api::` prefix, as opposed to the ones created by Strapi or plugins,
3831
+ * which start with `admin::` or `plugin::`
3832
+ */
3833
+ !model.startsWith("api::")
3834
+ ),
3835
+ position: "header"
3836
+ };
3837
+ };
3838
+ HistoryAction.type = "history";
3839
+ const historyAdmin = {
3840
+ bootstrap(app) {
3841
+ const { addDocumentAction } = app.getPlugin("content-manager").apis;
3842
+ addDocumentAction((actions2) => {
3843
+ const indexOfDeleteAction = actions2.findIndex((action) => action.type === "delete");
3844
+ actions2.splice(indexOfDeleteAction, 0, HistoryAction);
3845
+ return actions2;
3846
+ });
3847
+ }
3848
+ };
3675
3849
  const initialState = {
3676
3850
  collectionTypeLinks: [],
3677
3851
  components: [],
@@ -3727,7 +3901,7 @@ const index = {
3727
3901
  app.router.addRoute({
3728
3902
  path: "content-manager/*",
3729
3903
  lazy: async () => {
3730
- const { Layout } = await Promise.resolve().then(() => require("./layout-Dm6fbiQj.js"));
3904
+ const { Layout } = await Promise.resolve().then(() => require("./layout-C6dxWYT7.js"));
3731
3905
  return {
3732
3906
  Component: Layout
3733
3907
  };
@@ -3736,10 +3910,15 @@ const index = {
3736
3910
  });
3737
3911
  app.registerPlugin(cm.config);
3738
3912
  },
3913
+ bootstrap(app) {
3914
+ if (typeof historyAdmin.bootstrap === "function") {
3915
+ historyAdmin.bootstrap(app);
3916
+ }
3917
+ },
3739
3918
  async registerTrads({ locales }) {
3740
3919
  const importedTrads = await Promise.all(
3741
3920
  locales.map((locale) => {
3742
- return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/ar.json": () => Promise.resolve().then(() => require("./ar-BUUWXIYu.js")), "./translations/ca.json": () => Promise.resolve().then(() => require("./ca-Cmk45QO6.js")), "./translations/cs.json": () => Promise.resolve().then(() => require("./cs-CkJy6B2v.js")), "./translations/de.json": () => Promise.resolve().then(() => require("./de-CCEmbAah.js")), "./translations/en.json": () => Promise.resolve().then(() => require("./en-fbKQxLGn.js")), "./translations/es.json": () => Promise.resolve().then(() => require("./es-EUonQTon.js")), "./translations/eu.json": () => Promise.resolve().then(() => require("./eu-VDH-3ovk.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-B7kGGg3E.js")), "./translations/gu.json": () => Promise.resolve().then(() => require("./gu-BRmF601H.js")), "./translations/hi.json": () => Promise.resolve().then(() => require("./hi-CCJBptSq.js")), "./translations/hu.json": () => Promise.resolve().then(() => require("./hu-sNV_yLYy.js")), "./translations/id.json": () => Promise.resolve().then(() => require("./id-B5Ser98A.js")), "./translations/it.json": () => Promise.resolve().then(() => require("./it-DkBIs7vD.js")), "./translations/ja.json": () => Promise.resolve().then(() => require("./ja-CcFe8diO.js")), "./translations/ko.json": () => Promise.resolve().then(() => require("./ko-woFZPmLk.js")), "./translations/ml.json": () => Promise.resolve().then(() => require("./ml-C2W8N8k1.js")), "./translations/ms.json": () => Promise.resolve().then(() => require("./ms-BuFotyP_.js")), "./translations/nl.json": () => Promise.resolve().then(() => require("./nl-bbEOHChV.js")), "./translations/pl.json": () => Promise.resolve().then(() => require("./pl-uzwG-hk7.js")), "./translations/pt-BR.json": () => Promise.resolve().then(() => require("./pt-BR-BiOz37D9.js")), "./translations/pt.json": () => Promise.resolve().then(() => require("./pt-CeXQuq50.js")), "./translations/ru.json": () => Promise.resolve().then(() => require("./ru-BT3ybNny.js")), "./translations/sa.json": () => Promise.resolve().then(() => require("./sa-CcvkYInH.js")), "./translations/sk.json": () => Promise.resolve().then(() => require("./sk-CvY09Xjv.js")), "./translations/sv.json": () => Promise.resolve().then(() => require("./sv-MYDuzgvT.js")), "./translations/th.json": () => Promise.resolve().then(() => require("./th-D9_GfAjc.js")), "./translations/tr.json": () => Promise.resolve().then(() => require("./tr-D9UH-O_R.js")), "./translations/uk.json": () => Promise.resolve().then(() => require("./uk-C8EiqJY7.js")), "./translations/vi.json": () => Promise.resolve().then(() => require("./vi-CJlYDheJ.js")), "./translations/zh-Hans.json": () => Promise.resolve().then(() => require("./zh-Hans-9kOncHGw.js")), "./translations/zh.json": () => Promise.resolve().then(() => require("./zh-CQQfszqR.js")) }), `./translations/${locale}.json`).then(({ default: data }) => {
3921
+ return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/ar.json": () => Promise.resolve().then(() => require("./ar-BUUWXIYu.js")), "./translations/ca.json": () => Promise.resolve().then(() => require("./ca-Cmk45QO6.js")), "./translations/cs.json": () => Promise.resolve().then(() => require("./cs-CkJy6B2v.js")), "./translations/de.json": () => Promise.resolve().then(() => require("./de-CCEmbAah.js")), "./translations/en.json": () => Promise.resolve().then(() => require("./en-uOUIxfcQ.js")), "./translations/es.json": () => Promise.resolve().then(() => require("./es-EUonQTon.js")), "./translations/eu.json": () => Promise.resolve().then(() => require("./eu-VDH-3ovk.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-B7kGGg3E.js")), "./translations/gu.json": () => Promise.resolve().then(() => require("./gu-BRmF601H.js")), "./translations/hi.json": () => Promise.resolve().then(() => require("./hi-CCJBptSq.js")), "./translations/hu.json": () => Promise.resolve().then(() => require("./hu-sNV_yLYy.js")), "./translations/id.json": () => Promise.resolve().then(() => require("./id-B5Ser98A.js")), "./translations/it.json": () => Promise.resolve().then(() => require("./it-DkBIs7vD.js")), "./translations/ja.json": () => Promise.resolve().then(() => require("./ja-CcFe8diO.js")), "./translations/ko.json": () => Promise.resolve().then(() => require("./ko-woFZPmLk.js")), "./translations/ml.json": () => Promise.resolve().then(() => require("./ml-C2W8N8k1.js")), "./translations/ms.json": () => Promise.resolve().then(() => require("./ms-BuFotyP_.js")), "./translations/nl.json": () => Promise.resolve().then(() => require("./nl-bbEOHChV.js")), "./translations/pl.json": () => Promise.resolve().then(() => require("./pl-uzwG-hk7.js")), "./translations/pt-BR.json": () => Promise.resolve().then(() => require("./pt-BR-BiOz37D9.js")), "./translations/pt.json": () => Promise.resolve().then(() => require("./pt-CeXQuq50.js")), "./translations/ru.json": () => Promise.resolve().then(() => require("./ru-BT3ybNny.js")), "./translations/sa.json": () => Promise.resolve().then(() => require("./sa-CcvkYInH.js")), "./translations/sk.json": () => Promise.resolve().then(() => require("./sk-CvY09Xjv.js")), "./translations/sv.json": () => Promise.resolve().then(() => require("./sv-MYDuzgvT.js")), "./translations/th.json": () => Promise.resolve().then(() => require("./th-D9_GfAjc.js")), "./translations/tr.json": () => Promise.resolve().then(() => require("./tr-D9UH-O_R.js")), "./translations/uk.json": () => Promise.resolve().then(() => require("./uk-C8EiqJY7.js")), "./translations/vi.json": () => Promise.resolve().then(() => require("./vi-CJlYDheJ.js")), "./translations/zh-Hans.json": () => Promise.resolve().then(() => require("./zh-Hans-9kOncHGw.js")), "./translations/zh.json": () => Promise.resolve().then(() => require("./zh-CQQfszqR.js")) }), `./translations/${locale}.json`).then(({ default: data }) => {
3743
3922
  return {
3744
3923
  data: prefixPluginTranslations(data, PLUGIN_ID),
3745
3924
  locale
@@ -3796,4 +3975,4 @@ exports.useGetAllDocumentsQuery = useGetAllDocumentsQuery;
3796
3975
  exports.useGetContentTypeConfigurationQuery = useGetContentTypeConfigurationQuery;
3797
3976
  exports.useGetInitialDataQuery = useGetInitialDataQuery;
3798
3977
  exports.useUpdateContentTypeConfigurationMutation = useUpdateContentTypeConfigurationMutation;
3799
- //# sourceMappingURL=index-DVPWZkbS.js.map
3978
+ //# sourceMappingURL=index-CdT0kHZ8.js.map