@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
@@ -1,17 +1,17 @@
1
- import { ClockCounterClockwise, CrossCircle, More, WarningCircle, ListPlus, Pencil, Trash, Check, CheckCircle, ArrowsCounterClockwise, ChevronRight, Duplicate, Feather } from "@strapi/icons";
1
+ import { CrossCircle, More, WarningCircle, ListPlus, Pencil, Trash, Check, 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, 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";
6
+ import { Menu, Button, VisuallyHidden, Flex, Typography, Dialog, Modal, Radio, Status, Box, SingleSelect, SingleSelectOption, Loader, IconButton, Tooltip, LinkButton } from "@strapi/design-system";
7
+ import { useIntl } from "react-intl";
8
+ import { useParams, Navigate, useNavigate, useMatch, useLocation, Link, NavLink } from "react-router-dom";
10
9
  import { styled } from "styled-components";
11
10
  import * as yup from "yup";
12
11
  import { ValidationError } from "yup";
13
12
  import pipe from "lodash/fp/pipe";
14
13
  import { intervalToDuration, isPast } from "date-fns";
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";
@@ -208,7 +172,12 @@ const documentApi = contentManagerApi.injectEndpoints({
208
172
  params: query
209
173
  }
210
174
  }),
211
- invalidatesTags: (_result, _error, { model }) => [{ type: "Document", id: `${model}_LIST` }]
175
+ invalidatesTags: (_result, error, { model }) => {
176
+ if (error) {
177
+ return [];
178
+ }
179
+ return [{ type: "Document", id: `${model}_LIST` }];
180
+ }
212
181
  }),
213
182
  cloneDocument: builder.mutation({
214
183
  query: ({ model, sourceId, data, params }) => ({
@@ -295,6 +264,7 @@ const documentApi = contentManagerApi.injectEndpoints({
295
264
  }),
296
265
  providesTags: (result, _error, arg) => {
297
266
  return [
267
+ { type: "Document", id: `ALL_LIST` },
298
268
  { type: "Document", id: `${arg.model}_LIST` },
299
269
  ...result?.results.map(({ documentId }) => ({
300
270
  type: "Document",
@@ -333,6 +303,11 @@ const documentApi = contentManagerApi.injectEndpoints({
333
303
  {
334
304
  type: "Document",
335
305
  id: collectionType !== SINGLE_TYPES ? `${model}_${result && "documentId" in result ? result.documentId : documentId}` : model
306
+ },
307
+ // Make it easy to invalidate all individual documents queries for a model
308
+ {
309
+ type: "Document",
310
+ id: `${model}_ALL_ITEMS`
336
311
  }
337
312
  ];
338
313
  }
@@ -398,6 +373,18 @@ const documentApi = contentManagerApi.injectEndpoints({
398
373
  },
399
374
  "Relations"
400
375
  ];
376
+ },
377
+ async onQueryStarted({ data, ...patch }, { dispatch, queryFulfilled }) {
378
+ const patchResult = dispatch(
379
+ documentApi.util.updateQueryData("getDocument", patch, (draft) => {
380
+ Object.assign(draft.data, data);
381
+ })
382
+ );
383
+ try {
384
+ await queryFulfilled;
385
+ } catch {
386
+ patchResult.undo();
387
+ }
401
388
  }
402
389
  }),
403
390
  unpublishDocument: builder.mutation({
@@ -581,6 +568,14 @@ const createAttributeSchema = (attribute) => {
581
568
  if (!value || typeof value === "string" && value.length === 0) {
582
569
  return true;
583
570
  }
571
+ if (typeof value === "object") {
572
+ try {
573
+ JSON.stringify(value);
574
+ return true;
575
+ } catch (err) {
576
+ return false;
577
+ }
578
+ }
584
579
  try {
585
580
  JSON.parse(value);
586
581
  return true;
@@ -600,11 +595,11 @@ const createAttributeSchema = (attribute) => {
600
595
  }
601
596
  };
602
597
  const addRequiredValidation = (attribute) => (schema) => {
603
- if (attribute.required) {
604
- return schema.required({
605
- id: translatedErrors.required.id,
606
- defaultMessage: "This field is required."
607
- });
598
+ if ((attribute.type === "component" && attribute.repeatable || attribute.type === "dynamiczone") && attribute.required && "min" in schema) {
599
+ return schema.min(1, translatedErrors.required);
600
+ }
601
+ if (attribute.required && attribute.type !== "relation") {
602
+ return schema.required(translatedErrors.required);
608
603
  }
609
604
  return schema?.nullable ? schema.nullable() : (
610
605
  // In some cases '.nullable' will not be available on the schema.
@@ -638,6 +633,28 @@ const addMaxLengthValidation = (attribute) => (schema) => {
638
633
  const addMinValidation = (attribute) => (schema) => {
639
634
  if ("min" in attribute) {
640
635
  const min = toInteger(attribute.min);
636
+ if (attribute.type === "component" && attribute.repeatable || attribute.type === "dynamiczone") {
637
+ if (!attribute.required && "test" in schema && min) {
638
+ return schema.test(
639
+ "custom-min",
640
+ {
641
+ ...translatedErrors.min,
642
+ values: {
643
+ min: attribute.min
644
+ }
645
+ },
646
+ (value) => {
647
+ if (!value) {
648
+ return true;
649
+ }
650
+ if (Array.isArray(value) && value.length === 0) {
651
+ return true;
652
+ }
653
+ return value.length >= min;
654
+ }
655
+ );
656
+ }
657
+ }
641
658
  if ("min" in schema && min) {
642
659
  return schema.min(min, {
643
660
  ...translatedErrors.min,
@@ -764,7 +781,10 @@ const useDocument = (args, opts) => {
764
781
  isLoading: isLoadingDocument,
765
782
  isFetching: isFetchingDocument,
766
783
  error
767
- } = useGetDocumentQuery(args, opts);
784
+ } = useGetDocumentQuery(args, {
785
+ ...opts,
786
+ skip: !args.documentId && args.collectionType !== SINGLE_TYPES || opts?.skip
787
+ });
768
788
  const { components, schema, isLoading: isLoadingSchema } = useContentTypeSchema(args.model);
769
789
  React.useEffect(() => {
770
790
  if (error) {
@@ -1185,7 +1205,6 @@ const useDocumentActions = () => {
1185
1205
  sourceId
1186
1206
  });
1187
1207
  if ("error" in res) {
1188
- toggleNotification({ type: "danger", message: formatAPIError(res.error) });
1189
1208
  return { error: res.error };
1190
1209
  }
1191
1210
  toggleNotification({
@@ -1266,7 +1285,7 @@ const useDocumentActions = () => {
1266
1285
  };
1267
1286
  };
1268
1287
  const ProtectedHistoryPage = lazy(
1269
- () => import("./History-Bru_KoeP.mjs").then((mod) => ({ default: mod.ProtectedHistoryPage }))
1288
+ () => import("./History-DR2txJLE.mjs").then((mod) => ({ default: mod.ProtectedHistoryPage }))
1270
1289
  );
1271
1290
  const routes$1 = [
1272
1291
  {
@@ -1279,31 +1298,31 @@ const routes$1 = [
1279
1298
  }
1280
1299
  ];
1281
1300
  const ProtectedEditViewPage = lazy(
1282
- () => import("./EditViewPage-CPj61RMh.mjs").then((mod) => ({ default: mod.ProtectedEditViewPage }))
1301
+ () => import("./EditViewPage-B7VgwJaG.mjs").then((mod) => ({ default: mod.ProtectedEditViewPage }))
1283
1302
  );
1284
1303
  const ProtectedListViewPage = lazy(
1285
- () => import("./ListViewPage-SID6TRb9.mjs").then((mod) => ({ default: mod.ProtectedListViewPage }))
1304
+ () => import("./ListViewPage-B_GaWgRH.mjs").then((mod) => ({ default: mod.ProtectedListViewPage }))
1286
1305
  );
1287
1306
  const ProtectedListConfiguration = lazy(
1288
- () => import("./ListConfigurationPage-D8wGABj0.mjs").then((mod) => ({
1307
+ () => import("./ListConfigurationPage-voFVtXu6.mjs").then((mod) => ({
1289
1308
  default: mod.ProtectedListConfiguration
1290
1309
  }))
1291
1310
  );
1292
1311
  const ProtectedEditConfigurationPage = lazy(
1293
- () => import("./EditConfigurationPage-JT3E7NZy.mjs").then((mod) => ({
1312
+ () => import("./EditConfigurationPage-D7PrLO8j.mjs").then((mod) => ({
1294
1313
  default: mod.ProtectedEditConfigurationPage
1295
1314
  }))
1296
1315
  );
1297
1316
  const ProtectedComponentConfigurationPage = lazy(
1298
- () => import("./ComponentConfigurationPage-DmwmiFQy.mjs").then((mod) => ({
1317
+ () => import("./ComponentConfigurationPage-B3yDbeU1.mjs").then((mod) => ({
1299
1318
  default: mod.ProtectedComponentConfigurationPage
1300
1319
  }))
1301
1320
  );
1302
1321
  const NoPermissions = lazy(
1303
- () => import("./NoPermissionsPage-B7syEq5E.mjs").then((mod) => ({ default: mod.NoPermissions }))
1322
+ () => import("./NoPermissionsPage-B5baIHal.mjs").then((mod) => ({ default: mod.NoPermissions }))
1304
1323
  );
1305
1324
  const NoContentType = lazy(
1306
- () => import("./NoContentTypePage-CJ7UXwrQ.mjs").then((mod) => ({ default: mod.NoContentType }))
1325
+ () => import("./NoContentTypePage-CYiGpsbj.mjs").then((mod) => ({ default: mod.NoContentType }))
1307
1326
  );
1308
1327
  const CollectionTypePages = () => {
1309
1328
  const { collectionType } = useParams();
@@ -1417,12 +1436,14 @@ const DocumentActionButton = (action) => {
1417
1436
  /* @__PURE__ */ jsx(
1418
1437
  Button,
1419
1438
  {
1420
- flex: 1,
1439
+ flex: "auto",
1421
1440
  startIcon: action.icon,
1422
1441
  disabled: action.disabled,
1423
1442
  onClick: handleClick(action),
1424
1443
  justifyContent: "center",
1425
1444
  variant: action.variant || "default",
1445
+ paddingTop: "7px",
1446
+ paddingBottom: "7px",
1426
1447
  children: action.label
1427
1448
  }
1428
1449
  ),
@@ -1430,7 +1451,7 @@ const DocumentActionButton = (action) => {
1430
1451
  DocumentActionConfirmDialog,
1431
1452
  {
1432
1453
  ...action.dialog,
1433
- variant: action.variant,
1454
+ variant: action.dialog?.variant ?? action.variant,
1434
1455
  isOpen: dialogId === action.id,
1435
1456
  onClose: handleClose
1436
1457
  }
@@ -1482,14 +1503,14 @@ const DocumentActionsMenu = ({
1482
1503
  };
1483
1504
  return /* @__PURE__ */ jsxs(Menu.Root, { open: isOpen, onOpenChange: setIsOpen, children: [
1484
1505
  /* @__PURE__ */ jsxs(
1485
- Menu.Trigger,
1506
+ StyledMoreButton,
1486
1507
  {
1487
1508
  disabled: isDisabled,
1488
1509
  size: "S",
1489
1510
  endIcon: null,
1490
- paddingTop: "7px",
1491
- paddingLeft: "9px",
1492
- paddingRight: "9px",
1511
+ paddingTop: "4px",
1512
+ paddingLeft: "7px",
1513
+ paddingRight: "7px",
1493
1514
  variant,
1494
1515
  children: [
1495
1516
  /* @__PURE__ */ jsx(More, { "aria-hidden": true, focusable: false }),
@@ -1509,10 +1530,25 @@ const DocumentActionsMenu = ({
1509
1530
  onSelect: handleClick(action),
1510
1531
  display: "block",
1511
1532
  children: /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", gap: 4, children: [
1512
- /* @__PURE__ */ jsxs(Flex, { color: convertActionVariantToColor(action.variant), gap: 2, tag: "span", children: [
1513
- /* @__PURE__ */ jsx(Box, { tag: "span", color: convertActionVariantToIconColor(action.variant), children: action.icon }),
1514
- action.label
1515
- ] }),
1533
+ /* @__PURE__ */ jsxs(
1534
+ Flex,
1535
+ {
1536
+ color: !action.disabled ? convertActionVariantToColor(action.variant) : "inherit",
1537
+ gap: 2,
1538
+ tag: "span",
1539
+ children: [
1540
+ /* @__PURE__ */ jsx(
1541
+ Flex,
1542
+ {
1543
+ tag: "span",
1544
+ color: !action.disabled ? convertActionVariantToIconColor(action.variant) : "inherit",
1545
+ children: action.icon
1546
+ }
1547
+ ),
1548
+ action.label
1549
+ ]
1550
+ }
1551
+ ),
1516
1552
  action.id.startsWith("HistoryAction") && /* @__PURE__ */ jsx(
1517
1553
  Flex,
1518
1554
  {
@@ -1583,6 +1619,11 @@ const convertActionVariantToIconColor = (variant = "secondary") => {
1583
1619
  return "primary600";
1584
1620
  }
1585
1621
  };
1622
+ const StyledMoreButton = styled(Menu.Trigger)`
1623
+ & > span {
1624
+ display: flex;
1625
+ }
1626
+ `;
1586
1627
  const DocumentActionConfirmDialog = ({
1587
1628
  onClose,
1588
1629
  onCancel,
@@ -1659,6 +1700,12 @@ const PublishAction$1 = ({
1659
1700
  ({ canPublish: canPublish2, canCreate: canCreate2, canUpdate: canUpdate2 }) => ({ canPublish: canPublish2, canCreate: canCreate2, canUpdate: canUpdate2 })
1660
1701
  );
1661
1702
  const { publish } = useDocumentActions();
1703
+ const [
1704
+ countDraftRelations,
1705
+ { isLoading: isLoadingDraftRelations, isError: isErrorDraftRelations }
1706
+ ] = useLazyGetDraftRelationCountQuery();
1707
+ const [localCountOfDraftRelations, setLocalCountOfDraftRelations] = React.useState(0);
1708
+ const [serverCountOfDraftRelations, setServerCountOfDraftRelations] = React.useState(0);
1662
1709
  const [{ query, rawQuery }] = useQueryParams();
1663
1710
  const params = React.useMemo(() => buildValidParams(query), [query]);
1664
1711
  const modified = useForm("PublishAction", ({ modified: modified2 }) => modified2);
@@ -1667,10 +1714,101 @@ const PublishAction$1 = ({
1667
1714
  const validate = useForm("PublishAction", (state) => state.validate);
1668
1715
  const setErrors = useForm("PublishAction", (state) => state.setErrors);
1669
1716
  const formValues = useForm("PublishAction", ({ values }) => values);
1717
+ React.useEffect(() => {
1718
+ if (isErrorDraftRelations) {
1719
+ toggleNotification({
1720
+ type: "danger",
1721
+ message: formatMessage({
1722
+ id: getTranslation("error.records.fetch-draft-relatons"),
1723
+ defaultMessage: "An error occurred while fetching draft relations on this document."
1724
+ })
1725
+ });
1726
+ }
1727
+ }, [isErrorDraftRelations, toggleNotification, formatMessage]);
1728
+ React.useEffect(() => {
1729
+ const localDraftRelations = /* @__PURE__ */ new Set();
1730
+ const extractDraftRelations = (data) => {
1731
+ const relations = data.connect || [];
1732
+ relations.forEach((relation) => {
1733
+ if (relation.status === "draft") {
1734
+ localDraftRelations.add(relation.id);
1735
+ }
1736
+ });
1737
+ };
1738
+ const traverseAndExtract = (data) => {
1739
+ Object.entries(data).forEach(([key, value]) => {
1740
+ if (key === "connect" && Array.isArray(value)) {
1741
+ extractDraftRelations({ connect: value });
1742
+ } else if (typeof value === "object" && value !== null) {
1743
+ traverseAndExtract(value);
1744
+ }
1745
+ });
1746
+ };
1747
+ if (!documentId || modified) {
1748
+ traverseAndExtract(formValues);
1749
+ setLocalCountOfDraftRelations(localDraftRelations.size);
1750
+ }
1751
+ }, [documentId, modified, formValues, setLocalCountOfDraftRelations]);
1752
+ React.useEffect(() => {
1753
+ if (documentId) {
1754
+ const fetchDraftRelationsCount = async () => {
1755
+ const { data, error } = await countDraftRelations({
1756
+ collectionType,
1757
+ model,
1758
+ documentId,
1759
+ params
1760
+ });
1761
+ if (error) {
1762
+ throw error;
1763
+ }
1764
+ if (data) {
1765
+ setServerCountOfDraftRelations(data.data);
1766
+ }
1767
+ };
1768
+ fetchDraftRelationsCount();
1769
+ }
1770
+ }, [documentId, countDraftRelations, collectionType, model, params]);
1670
1771
  const isDocumentPublished = (document?.[PUBLISHED_AT_ATTRIBUTE_NAME] || meta?.availableStatus.some((doc) => doc[PUBLISHED_AT_ATTRIBUTE_NAME] !== null)) && document?.status !== "modified";
1671
1772
  if (!schema?.options?.draftAndPublish) {
1672
1773
  return null;
1673
1774
  }
1775
+ const performPublish = async () => {
1776
+ setSubmitting(true);
1777
+ try {
1778
+ const { errors } = await validate();
1779
+ if (errors) {
1780
+ toggleNotification({
1781
+ type: "danger",
1782
+ message: formatMessage({
1783
+ id: "content-manager.validation.error",
1784
+ defaultMessage: "There are validation errors in your document. Please fix them before saving."
1785
+ })
1786
+ });
1787
+ return;
1788
+ }
1789
+ const res = await publish(
1790
+ {
1791
+ collectionType,
1792
+ model,
1793
+ documentId,
1794
+ params
1795
+ },
1796
+ formValues
1797
+ );
1798
+ if ("data" in res && collectionType !== SINGLE_TYPES) {
1799
+ navigate({
1800
+ pathname: `../${collectionType}/${model}/${res.data.documentId}`,
1801
+ search: rawQuery
1802
+ });
1803
+ } else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
1804
+ setErrors(formatValidationErrors(res.error));
1805
+ }
1806
+ } finally {
1807
+ setSubmitting(false);
1808
+ }
1809
+ };
1810
+ const totalDraftRelations = localCountOfDraftRelations + serverCountOfDraftRelations;
1811
+ const hasDraftRelations = totalDraftRelations > 0;
1674
1812
  return {
1675
1813
  /**
1676
1814
  * Disabled when:
@@ -1680,49 +1818,39 @@ const PublishAction$1 = ({
1680
1818
  * - the document is already published & not modified
1681
1819
  * - the document is being created & not modified
1682
1820
  * - the user doesn't have the permission to publish
1683
- * - the user doesn't have the permission to create a new document
1684
- * - the user doesn't have the permission to update the document
1685
1821
  */
1686
- disabled: isCloning || isSubmitting || activeTab === "published" || !modified && isDocumentPublished || !modified && !document?.documentId || !canPublish || Boolean(!document?.documentId && !canCreate || document?.documentId && !canUpdate),
1822
+ disabled: isCloning || isSubmitting || isLoadingDraftRelations || activeTab === "published" || !modified && isDocumentPublished || !modified && !document?.documentId || !canPublish,
1687
1823
  label: formatMessage({
1688
1824
  id: "app.utils.publish",
1689
1825
  defaultMessage: "Publish"
1690
1826
  }),
1691
1827
  onClick: async () => {
1692
- setSubmitting(true);
1693
- try {
1694
- const { errors } = await validate();
1695
- if (errors) {
1696
- toggleNotification({
1697
- type: "danger",
1698
- message: formatMessage({
1699
- id: "content-manager.validation.error",
1700
- defaultMessage: "There are validation errors in your document. Please fix them before saving."
1701
- })
1702
- });
1703
- return;
1704
- }
1705
- const res = await publish(
1706
- {
1707
- collectionType,
1708
- model,
1709
- documentId,
1710
- params
1711
- },
1712
- formValues
1713
- );
1714
- if ("data" in res && collectionType !== SINGLE_TYPES) {
1715
- navigate({
1716
- pathname: `../${collectionType}/${model}/${res.data.documentId}`,
1717
- search: rawQuery
1718
- });
1719
- } else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
1720
- setErrors(formatValidationErrors(res.error));
1828
+ if (hasDraftRelations) {
1829
+ return;
1830
+ }
1831
+ await performPublish();
1832
+ },
1833
+ dialog: hasDraftRelations ? {
1834
+ type: "dialog",
1835
+ variant: "danger",
1836
+ footer: null,
1837
+ title: formatMessage({
1838
+ id: getTranslation(`popUpwarning.warning.bulk-has-draft-relations.title`),
1839
+ defaultMessage: "Confirmation"
1840
+ }),
1841
+ content: formatMessage(
1842
+ {
1843
+ id: getTranslation(`popUpwarning.warning.bulk-has-draft-relations.message`),
1844
+ defaultMessage: "This entry is related to {count, plural, one {# draft entry} other {# draft entries}}. Publishing it could leave broken links in your app."
1845
+ },
1846
+ {
1847
+ count: totalDraftRelations
1721
1848
  }
1722
- } finally {
1723
- setSubmitting(false);
1849
+ ),
1850
+ onConfirm: async () => {
1851
+ await performPublish();
1724
1852
  }
1725
- }
1853
+ } : void 0
1726
1854
  };
1727
1855
  };
1728
1856
  PublishAction$1.type = "publish";
@@ -1738,7 +1866,7 @@ const UpdateAction = ({
1738
1866
  const cloneMatch = useMatch(CLONE_PATH);
1739
1867
  const isCloning = cloneMatch !== null;
1740
1868
  const { formatMessage } = useIntl();
1741
- const { canCreate, canUpdate } = useDocumentRBAC("UpdateAction", ({ canCreate: canCreate2, canUpdate: canUpdate2 }) => ({
1869
+ useDocumentRBAC("UpdateAction", ({ canCreate: canCreate2, canUpdate: canUpdate2 }) => ({
1742
1870
  canCreate: canCreate2,
1743
1871
  canUpdate: canUpdate2
1744
1872
  }));
@@ -1758,10 +1886,8 @@ const UpdateAction = ({
1758
1886
  * - the form is submitting
1759
1887
  * - the document is not modified & we're not cloning (you can save a clone entity straight away)
1760
1888
  * - the active tab is the published tab
1761
- * - the user doesn't have the permission to create a new document
1762
- * - the user doesn't have the permission to update the document
1763
1889
  */
1764
- disabled: isSubmitting || !modified && !isCloning || activeTab === "published" || Boolean(!documentId && !canCreate || documentId && !canUpdate),
1890
+ disabled: isSubmitting || !modified && !isCloning || activeTab === "published",
1765
1891
  label: formatMessage({
1766
1892
  id: "content-manager.containers.Edit.save",
1767
1893
  defaultMessage: "Save"
@@ -1790,10 +1916,13 @@ const UpdateAction = ({
1790
1916
  document
1791
1917
  );
1792
1918
  if ("data" in res) {
1793
- navigate({
1794
- pathname: `../${collectionType}/${model}/${res.data.documentId}`,
1795
- search: rawQuery
1796
- });
1919
+ navigate(
1920
+ {
1921
+ pathname: `../${res.data.documentId}`,
1922
+ search: rawQuery
1923
+ },
1924
+ { relative: "path" }
1925
+ );
1797
1926
  } else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
1798
1927
  setErrors(formatValidationErrors(res.error));
1799
1928
  }
@@ -1821,10 +1950,13 @@ const UpdateAction = ({
1821
1950
  document
1822
1951
  );
1823
1952
  if ("data" in res && collectionType !== SINGLE_TYPES) {
1824
- navigate({
1825
- pathname: `../${collectionType}/${model}/${res.data.documentId}`,
1826
- search: rawQuery
1827
- });
1953
+ navigate(
1954
+ {
1955
+ pathname: `../${res.data.documentId}`,
1956
+ search: rawQuery
1957
+ },
1958
+ { replace: true, relative: "path" }
1959
+ );
1828
1960
  } else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
1829
1961
  setErrors(formatValidationErrors(res.error));
1830
1962
  }
@@ -2070,23 +2202,13 @@ const Header = ({ isCreating, status, title: documentTitle = "Untitled" }) => {
2070
2202
  id: "content-manager.containers.edit.title.new",
2071
2203
  defaultMessage: "Create an entry"
2072
2204
  }) : documentTitle;
2073
- return /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "flex-start", paddingTop: 8, paddingBottom: 4, gap: 3, children: [
2205
+ return /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "flex-start", paddingTop: 6, paddingBottom: 4, gap: 2, children: [
2074
2206
  /* @__PURE__ */ jsx(BackButton, {}),
2075
- /* @__PURE__ */ jsxs(
2076
- Flex,
2077
- {
2078
- width: "100%",
2079
- justifyContent: "space-between",
2080
- paddingTop: 1,
2081
- gap: "80px",
2082
- alignItems: "flex-start",
2083
- children: [
2084
- /* @__PURE__ */ jsx(Typography, { variant: "alpha", tag: "h1", children: title }),
2085
- /* @__PURE__ */ jsx(HeaderToolbar, {})
2086
- ]
2087
- }
2088
- ),
2089
- status ? /* @__PURE__ */ jsx(DocumentStatus, { status: isCloning ? "draft" : status }) : null
2207
+ /* @__PURE__ */ jsxs(Flex, { width: "100%", justifyContent: "space-between", gap: "80px", alignItems: "flex-start", children: [
2208
+ /* @__PURE__ */ jsx(Typography, { variant: "alpha", tag: "h1", children: title }),
2209
+ /* @__PURE__ */ jsx(HeaderToolbar, {})
2210
+ ] }),
2211
+ status ? /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(DocumentStatus, { status: isCloning ? "draft" : status }) }) : null
2090
2212
  ] });
2091
2213
  };
2092
2214
  const HeaderToolbar = () => {
@@ -2777,7 +2899,7 @@ const ConfirmBulkActionDialog = ({
2777
2899
  endAction
2778
2900
  }) => {
2779
2901
  const { formatMessage } = useIntl();
2780
- return /* @__PURE__ */ jsx(Dialog.Root, { onOpenChange: onToggleDialog, open: isOpen, children: /* @__PURE__ */ jsxs(Dialog.Content, { children: [
2902
+ return /* @__PURE__ */ jsx(Dialog.Root, { open: isOpen, children: /* @__PURE__ */ jsxs(Dialog.Content, { children: [
2781
2903
  /* @__PURE__ */ jsx(Dialog.Header, { children: formatMessage({
2782
2904
  id: "app.components.ConfirmDialog.title",
2783
2905
  defaultMessage: "Confirmation"
@@ -2898,7 +3020,14 @@ const formatErrorMessages = (errors, parentKey, formatMessage) => {
2898
3020
  )
2899
3021
  );
2900
3022
  } else {
2901
- messages.push(...formatErrorMessages(value, currentKey, formatMessage));
3023
+ messages.push(
3024
+ ...formatErrorMessages(
3025
+ // @ts-expect-error TODO: check why value is not compatible with FormErrors
3026
+ value,
3027
+ currentKey,
3028
+ formatMessage
3029
+ )
3030
+ );
2902
3031
  }
2903
3032
  } else {
2904
3033
  messages.push(
@@ -3561,8 +3690,7 @@ class ContentManagerPlugin {
3561
3690
  documentActions = [
3562
3691
  ...DEFAULT_ACTIONS,
3563
3692
  ...DEFAULT_TABLE_ROW_ACTIONS,
3564
- ...DEFAULT_HEADER_ACTIONS,
3565
- HistoryAction
3693
+ ...DEFAULT_HEADER_ACTIONS
3566
3694
  ];
3567
3695
  editViewSidePanels = [ActionsPanel];
3568
3696
  headerActions = [];
@@ -3651,6 +3779,52 @@ const getPrintableType = (value) => {
3651
3779
  }
3652
3780
  return nativeType;
3653
3781
  };
3782
+ const HistoryAction = ({ model, document }) => {
3783
+ const { formatMessage } = useIntl();
3784
+ const [{ query }] = useQueryParams();
3785
+ const navigate = useNavigate();
3786
+ const pluginsQueryParams = stringify({ plugins: query.plugins }, { encode: false });
3787
+ if (!window.strapi.features.isEnabled("cms-content-history")) {
3788
+ return null;
3789
+ }
3790
+ return {
3791
+ icon: /* @__PURE__ */ jsx(ClockCounterClockwise, {}),
3792
+ label: formatMessage({
3793
+ id: "content-manager.history.document-action",
3794
+ defaultMessage: "Content History"
3795
+ }),
3796
+ onClick: () => navigate({ pathname: "history", search: pluginsQueryParams }),
3797
+ disabled: (
3798
+ /**
3799
+ * The user is creating a new document.
3800
+ * It hasn't been saved yet, so there's no history to go to
3801
+ */
3802
+ !document || /**
3803
+ * The document has been created but the current dimension has never been saved.
3804
+ * For example, the user is creating a new locale in an existing document,
3805
+ * so there's no history for the document in that locale
3806
+ */
3807
+ !document.id || /**
3808
+ * History is only available for content types created by the user.
3809
+ * These have the `api::` prefix, as opposed to the ones created by Strapi or plugins,
3810
+ * which start with `admin::` or `plugin::`
3811
+ */
3812
+ !model.startsWith("api::")
3813
+ ),
3814
+ position: "header"
3815
+ };
3816
+ };
3817
+ HistoryAction.type = "history";
3818
+ const historyAdmin = {
3819
+ bootstrap(app) {
3820
+ const { addDocumentAction } = app.getPlugin("content-manager").apis;
3821
+ addDocumentAction((actions2) => {
3822
+ const indexOfDeleteAction = actions2.findIndex((action) => action.type === "delete");
3823
+ actions2.splice(indexOfDeleteAction, 0, HistoryAction);
3824
+ return actions2;
3825
+ });
3826
+ }
3827
+ };
3654
3828
  const initialState = {
3655
3829
  collectionTypeLinks: [],
3656
3830
  components: [],
@@ -3706,7 +3880,7 @@ const index = {
3706
3880
  app.router.addRoute({
3707
3881
  path: "content-manager/*",
3708
3882
  lazy: async () => {
3709
- const { Layout } = await import("./layout-Bau7ZfLV.mjs");
3883
+ const { Layout } = await import("./layout-BNqvLR_b.mjs");
3710
3884
  return {
3711
3885
  Component: Layout
3712
3886
  };
@@ -3715,10 +3889,15 @@ const index = {
3715
3889
  });
3716
3890
  app.registerPlugin(cm.config);
3717
3891
  },
3892
+ bootstrap(app) {
3893
+ if (typeof historyAdmin.bootstrap === "function") {
3894
+ historyAdmin.bootstrap(app);
3895
+ }
3896
+ },
3718
3897
  async registerTrads({ locales }) {
3719
3898
  const importedTrads = await Promise.all(
3720
3899
  locales.map((locale) => {
3721
- 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 }) => {
3900
+ 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-BrCTWlZv.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 }) => {
3722
3901
  return {
3723
3902
  data: prefixPluginTranslations(data, PLUGIN_ID),
3724
3903
  locale
@@ -3777,4 +3956,4 @@ export {
3777
3956
  useUpdateContentTypeConfigurationMutation as y,
3778
3957
  extractContentTypeComponents as z
3779
3958
  };
3780
- //# sourceMappingURL=index-DJXJw9V5.mjs.map
3959
+ //# sourceMappingURL=index-C9TJPyni.mjs.map