@strapi/content-manager 0.0.0-experimental.7b750d18de359d0a42233cb8707e3c31c5983345 → 0.0.0-experimental.7bc5339b0393e53f9f568301594621e7fb466e2f

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 (187) hide show
  1. package/dist/_chunks/CardDragPreview-C0QyJgRA.js.map +1 -1
  2. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs.map +1 -1
  3. package/dist/_chunks/{ComponentConfigurationPage-DnnZJc1F.js → ComponentConfigurationPage-BPiQrhZ6.js} +5 -6
  4. package/dist/_chunks/{ComponentConfigurationPage-DnnZJc1F.js.map → ComponentConfigurationPage-BPiQrhZ6.js.map} +1 -1
  5. package/dist/_chunks/{ComponentConfigurationPage-hLMNf7KI.mjs → ComponentConfigurationPage-viOAdZM6.mjs} +4 -4
  6. package/dist/_chunks/{ComponentConfigurationPage-hLMNf7KI.mjs.map → ComponentConfigurationPage-viOAdZM6.mjs.map} +1 -1
  7. package/dist/_chunks/{ComponentIcon-BXdiCGQp.js → ComponentIcon-CRbtQEUV.js} +2 -3
  8. package/dist/_chunks/{ComponentIcon-BXdiCGQp.js.map → ComponentIcon-CRbtQEUV.js.map} +1 -1
  9. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs.map +1 -1
  10. package/dist/_chunks/{EditConfigurationPage-CpLj5gYZ.js → EditConfigurationPage-CZRKq8CN.js} +5 -6
  11. package/dist/_chunks/{EditConfigurationPage-CpLj5gYZ.js.map → EditConfigurationPage-CZRKq8CN.js.map} +1 -1
  12. package/dist/_chunks/{EditConfigurationPage-Dh6sq-G4.mjs → EditConfigurationPage-DKtPyjs_.mjs} +4 -4
  13. package/dist/_chunks/{EditConfigurationPage-Dh6sq-G4.mjs.map → EditConfigurationPage-DKtPyjs_.mjs.map} +1 -1
  14. package/dist/_chunks/{EditViewPage-D2QVRr_2.js → EditViewPage-C-TZmK5r.js} +50 -11
  15. package/dist/_chunks/EditViewPage-C-TZmK5r.js.map +1 -0
  16. package/dist/_chunks/{EditViewPage-BU1ugeVi.mjs → EditViewPage-D2FPb5Mh.mjs} +50 -10
  17. package/dist/_chunks/EditViewPage-D2FPb5Mh.mjs.map +1 -0
  18. package/dist/_chunks/{Field-BEDX9i_V.js → Field-IMBnqF-k.js} +130 -87
  19. package/dist/_chunks/Field-IMBnqF-k.js.map +1 -0
  20. package/dist/_chunks/{Field-VSPY6uzs.mjs → Field-hD0Y00Mt.mjs} +129 -85
  21. package/dist/_chunks/Field-hD0Y00Mt.mjs.map +1 -0
  22. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs.map +1 -1
  23. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js.map +1 -1
  24. package/dist/_chunks/{Form-DCaY8xBX.js → Form-BaURS01O.js} +6 -7
  25. package/dist/_chunks/Form-BaURS01O.js.map +1 -0
  26. package/dist/_chunks/{Form-05Oaes1N.mjs → Form-ZQ9fzWkd.mjs} +4 -4
  27. package/dist/_chunks/Form-ZQ9fzWkd.mjs.map +1 -0
  28. package/dist/_chunks/{History-BrJ1tUvt.js → History-BqRQm2Lc.js} +42 -100
  29. package/dist/_chunks/History-BqRQm2Lc.js.map +1 -0
  30. package/dist/_chunks/{History-BqO2G3MV.mjs → History-C4X3jiQJ.mjs} +43 -100
  31. package/dist/_chunks/History-C4X3jiQJ.mjs.map +1 -0
  32. package/dist/_chunks/{ListConfigurationPage-Eane5LKE.js → ListConfigurationPage-BT69-TvF.js} +7 -7
  33. package/dist/_chunks/ListConfigurationPage-BT69-TvF.js.map +1 -0
  34. package/dist/_chunks/{ListConfigurationPage-C6rsFlme.mjs → ListConfigurationPage-CwMU6tWQ.mjs} +7 -6
  35. package/dist/_chunks/ListConfigurationPage-CwMU6tWQ.mjs.map +1 -0
  36. package/dist/_chunks/{ListViewPage-Coj-RPsx.js → ListViewPage-CYkrfWsm.js} +63 -41
  37. package/dist/_chunks/ListViewPage-CYkrfWsm.js.map +1 -0
  38. package/dist/_chunks/{ListViewPage-yE_zYhcI.mjs → ListViewPage-CvxfiNTc.mjs} +62 -39
  39. package/dist/_chunks/ListViewPage-CvxfiNTc.mjs.map +1 -0
  40. package/dist/_chunks/{NoContentTypePage-BDJ0dshy.js → NoContentTypePage-BZMfRsrg.js} +2 -2
  41. package/dist/_chunks/{NoContentTypePage-BDJ0dshy.js.map → NoContentTypePage-BZMfRsrg.js.map} +1 -1
  42. package/dist/_chunks/{NoContentTypePage-NW_FSVdY.mjs → NoContentTypePage-Dy6sa9LT.mjs} +2 -2
  43. package/dist/_chunks/{NoContentTypePage-NW_FSVdY.mjs.map → NoContentTypePage-Dy6sa9LT.mjs.map} +1 -1
  44. package/dist/_chunks/{NoPermissionsPage-h0I3ImsX.mjs → NoPermissionsPage-DiW-TIzq.mjs} +2 -2
  45. package/dist/_chunks/{NoPermissionsPage-h0I3ImsX.mjs.map → NoPermissionsPage-DiW-TIzq.mjs.map} +1 -1
  46. package/dist/_chunks/{NoPermissionsPage-BOtb5FTM.js → NoPermissionsPage-DjUdvhJ6.js} +2 -2
  47. package/dist/_chunks/{NoPermissionsPage-BOtb5FTM.js.map → NoPermissionsPage-DjUdvhJ6.js.map} +1 -1
  48. package/dist/_chunks/Preview-BqRUSbFU.js +296 -0
  49. package/dist/_chunks/Preview-BqRUSbFU.js.map +1 -0
  50. package/dist/_chunks/Preview-DwWET-X7.mjs +278 -0
  51. package/dist/_chunks/Preview-DwWET-X7.mjs.map +1 -0
  52. package/dist/_chunks/{Relations-FP0uWpBz.mjs → Relations-BOTC_ZqE.mjs} +75 -41
  53. package/dist/_chunks/Relations-BOTC_ZqE.mjs.map +1 -0
  54. package/dist/_chunks/{Relations-CVh0DOKv.js → Relations-DnCdLzq_.js} +75 -42
  55. package/dist/_chunks/Relations-DnCdLzq_.js.map +1 -0
  56. package/dist/_chunks/{en-BlhnxQfj.js → en-BK8Xyl5I.js} +22 -10
  57. package/dist/_chunks/{en-BlhnxQfj.js.map → en-BK8Xyl5I.js.map} +1 -1
  58. package/dist/_chunks/{en-C8YBvRrK.mjs → en-Dtk_ot79.mjs} +22 -10
  59. package/dist/_chunks/{en-C8YBvRrK.mjs.map → en-Dtk_ot79.mjs.map} +1 -1
  60. package/dist/_chunks/{es-EUonQTon.js → es-9K52xZIr.js} +2 -2
  61. package/dist/_chunks/{ja-CcFe8diO.js.map → es-9K52xZIr.js.map} +1 -1
  62. package/dist/_chunks/{es-CeXiYflN.mjs → es-D34tqjMw.mjs} +2 -2
  63. package/dist/_chunks/{es-CeXiYflN.mjs.map → es-D34tqjMw.mjs.map} +1 -1
  64. package/dist/_chunks/{fr-CD9VFbPM.mjs → fr--pg5jUbt.mjs} +13 -3
  65. package/dist/_chunks/{fr-CD9VFbPM.mjs.map → fr--pg5jUbt.mjs.map} +1 -1
  66. package/dist/_chunks/{fr-B7kGGg3E.js → fr-B2Kyv8Z9.js} +13 -3
  67. package/dist/_chunks/{fr-B7kGGg3E.js.map → fr-B2Kyv8Z9.js.map} +1 -1
  68. package/dist/_chunks/hooks-BAaaKPS_.js.map +1 -1
  69. package/dist/_chunks/{index-CPCHQ3X_.mjs → index-BeYsz0Vi.mjs} +325 -178
  70. package/dist/_chunks/index-BeYsz0Vi.mjs.map +1 -0
  71. package/dist/_chunks/{index-DTKVhcla.js → index-CptTdHNy.js} +322 -175
  72. package/dist/_chunks/index-CptTdHNy.js.map +1 -0
  73. package/dist/_chunks/{ja-CcFe8diO.js → ja-7sfIbjxE.js} +2 -2
  74. package/dist/_chunks/{es-EUonQTon.js.map → ja-7sfIbjxE.js.map} +1 -1
  75. package/dist/_chunks/{ja-CtsUxOvk.mjs → ja-BHqhDq4V.mjs} +2 -2
  76. package/dist/_chunks/{ja-CtsUxOvk.mjs.map → ja-BHqhDq4V.mjs.map} +1 -1
  77. package/dist/_chunks/{layout-B4UhJ8MJ.mjs → layout-CzSSEy9b.mjs} +4 -4
  78. package/dist/_chunks/{layout-B4UhJ8MJ.mjs.map → layout-CzSSEy9b.mjs.map} +1 -1
  79. package/dist/_chunks/{layout-CWgZzMYf.js → layout-szfTCeYm.js} +5 -6
  80. package/dist/_chunks/{layout-CWgZzMYf.js.map → layout-szfTCeYm.js.map} +1 -1
  81. package/dist/_chunks/{objects-gigeqt7s.js → objects-BcXOv6_9.js} +2 -4
  82. package/dist/_chunks/{objects-gigeqt7s.js.map → objects-BcXOv6_9.js.map} +1 -1
  83. package/dist/_chunks/{objects-mKMAmfec.mjs → objects-D6yBsdmx.mjs} +2 -4
  84. package/dist/_chunks/{objects-mKMAmfec.mjs.map → objects-D6yBsdmx.mjs.map} +1 -1
  85. package/dist/_chunks/{relations-B83Ge9a7.mjs → relations-DvzmDbWc.mjs} +6 -7
  86. package/dist/_chunks/relations-DvzmDbWc.mjs.map +1 -0
  87. package/dist/_chunks/{relations-D81a_2zw.js → relations-qssSbh1V.js} +6 -7
  88. package/dist/_chunks/relations-qssSbh1V.js.map +1 -0
  89. package/dist/_chunks/useDebounce-CtcjDB3L.js.map +1 -1
  90. package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +1 -1
  91. package/dist/_chunks/{useDragAndDrop-J0TUUbR6.js → useDragAndDrop-BMtgCYzL.js} +5 -9
  92. package/dist/_chunks/{useDragAndDrop-J0TUUbR6.js.map → useDragAndDrop-BMtgCYzL.js.map} +1 -1
  93. package/dist/_chunks/{useDragAndDrop-DdHgKsqq.mjs → useDragAndDrop-DJ6jqvZN.mjs} +4 -7
  94. package/dist/_chunks/{useDragAndDrop-DdHgKsqq.mjs.map → useDragAndDrop-DJ6jqvZN.mjs.map} +1 -1
  95. package/dist/admin/index.js +1 -1
  96. package/dist/admin/index.mjs +4 -4
  97. package/dist/admin/src/content-manager.d.ts +3 -2
  98. package/dist/admin/src/hooks/useDocument.d.ts +2 -0
  99. package/dist/admin/src/pages/EditView/EditViewPage.d.ts +9 -1
  100. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +1 -1
  101. package/dist/admin/src/pages/EditView/components/DocumentStatus.d.ts +2 -2
  102. package/dist/admin/src/pages/EditView/components/Header.d.ts +1 -0
  103. package/dist/admin/src/preview/components/PreviewContent.d.ts +2 -0
  104. package/dist/admin/src/preview/components/PreviewHeader.d.ts +2 -0
  105. package/dist/admin/src/preview/components/PreviewSidePanel.d.ts +3 -0
  106. package/dist/admin/src/preview/constants.d.ts +1 -0
  107. package/dist/admin/src/preview/index.d.ts +4 -0
  108. package/dist/admin/src/preview/pages/Preview.d.ts +11 -0
  109. package/dist/admin/src/preview/routes.d.ts +3 -0
  110. package/dist/admin/src/preview/services/preview.d.ts +3 -0
  111. package/dist/admin/src/router.d.ts +1 -1
  112. package/dist/admin/src/services/documents.d.ts +0 -3
  113. package/dist/server/index.js +435 -193
  114. package/dist/server/index.js.map +1 -1
  115. package/dist/server/index.mjs +435 -192
  116. package/dist/server/index.mjs.map +1 -1
  117. package/dist/server/src/bootstrap.d.ts.map +1 -1
  118. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  119. package/dist/server/src/controllers/index.d.ts.map +1 -1
  120. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  121. package/dist/server/src/controllers/utils/metadata.d.ts +15 -1
  122. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -1
  123. package/dist/server/src/history/services/history.d.ts.map +1 -1
  124. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  125. package/dist/server/src/history/services/utils.d.ts +2 -3
  126. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  127. package/dist/server/src/index.d.ts +4 -4
  128. package/dist/server/src/preview/constants.d.ts +2 -0
  129. package/dist/server/src/preview/constants.d.ts.map +1 -0
  130. package/dist/server/src/preview/controllers/index.d.ts +2 -0
  131. package/dist/server/src/preview/controllers/index.d.ts.map +1 -0
  132. package/dist/server/src/preview/controllers/preview.d.ts +13 -0
  133. package/dist/server/src/preview/controllers/preview.d.ts.map +1 -0
  134. package/dist/server/src/preview/controllers/validation/preview.d.ts +6 -0
  135. package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -0
  136. package/dist/server/src/preview/index.d.ts +4 -0
  137. package/dist/server/src/preview/index.d.ts.map +1 -0
  138. package/dist/server/src/preview/routes/index.d.ts +8 -0
  139. package/dist/server/src/preview/routes/index.d.ts.map +1 -0
  140. package/dist/server/src/preview/routes/preview.d.ts +4 -0
  141. package/dist/server/src/preview/routes/preview.d.ts.map +1 -0
  142. package/dist/server/src/preview/services/index.d.ts +16 -0
  143. package/dist/server/src/preview/services/index.d.ts.map +1 -0
  144. package/dist/server/src/preview/services/preview-config.d.ts +32 -0
  145. package/dist/server/src/preview/services/preview-config.d.ts.map +1 -0
  146. package/dist/server/src/preview/services/preview.d.ts +12 -0
  147. package/dist/server/src/preview/services/preview.d.ts.map +1 -0
  148. package/dist/server/src/preview/utils.d.ts +19 -0
  149. package/dist/server/src/preview/utils.d.ts.map +1 -0
  150. package/dist/server/src/register.d.ts.map +1 -1
  151. package/dist/server/src/routes/index.d.ts.map +1 -1
  152. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  153. package/dist/server/src/services/document-metadata.d.ts +8 -8
  154. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  155. package/dist/server/src/services/index.d.ts +4 -4
  156. package/dist/server/src/services/index.d.ts.map +1 -1
  157. package/dist/server/src/services/utils/configuration/index.d.ts +2 -2
  158. package/dist/server/src/services/utils/configuration/layouts.d.ts +2 -2
  159. package/dist/server/src/utils/index.d.ts +2 -0
  160. package/dist/server/src/utils/index.d.ts.map +1 -1
  161. package/dist/shared/contracts/index.d.ts +1 -0
  162. package/dist/shared/contracts/index.d.ts.map +1 -1
  163. package/dist/shared/contracts/preview.d.ts +27 -0
  164. package/dist/shared/contracts/preview.d.ts.map +1 -0
  165. package/dist/shared/index.js +4 -0
  166. package/dist/shared/index.js.map +1 -1
  167. package/dist/shared/index.mjs +4 -0
  168. package/dist/shared/index.mjs.map +1 -1
  169. package/package.json +12 -12
  170. package/dist/_chunks/EditViewPage-BU1ugeVi.mjs.map +0 -1
  171. package/dist/_chunks/EditViewPage-D2QVRr_2.js.map +0 -1
  172. package/dist/_chunks/Field-BEDX9i_V.js.map +0 -1
  173. package/dist/_chunks/Field-VSPY6uzs.mjs.map +0 -1
  174. package/dist/_chunks/Form-05Oaes1N.mjs.map +0 -1
  175. package/dist/_chunks/Form-DCaY8xBX.js.map +0 -1
  176. package/dist/_chunks/History-BqO2G3MV.mjs.map +0 -1
  177. package/dist/_chunks/History-BrJ1tUvt.js.map +0 -1
  178. package/dist/_chunks/ListConfigurationPage-C6rsFlme.mjs.map +0 -1
  179. package/dist/_chunks/ListConfigurationPage-Eane5LKE.js.map +0 -1
  180. package/dist/_chunks/ListViewPage-Coj-RPsx.js.map +0 -1
  181. package/dist/_chunks/ListViewPage-yE_zYhcI.mjs.map +0 -1
  182. package/dist/_chunks/Relations-CVh0DOKv.js.map +0 -1
  183. package/dist/_chunks/Relations-FP0uWpBz.mjs.map +0 -1
  184. package/dist/_chunks/index-CPCHQ3X_.mjs.map +0 -1
  185. package/dist/_chunks/index-DTKVhcla.js.map +0 -1
  186. package/dist/_chunks/relations-B83Ge9a7.mjs.map +0 -1
  187. package/dist/_chunks/relations-D81a_2zw.js.map +0 -1
@@ -4,18 +4,18 @@ const jsxRuntime = require("react/jsx-runtime");
4
4
  const strapiAdmin = require("@strapi/admin/strapi-admin");
5
5
  const React = require("react");
6
6
  const designSystem = require("@strapi/design-system");
7
+ const mapValues = require("lodash/fp/mapValues");
7
8
  const reactIntl = require("react-intl");
8
9
  const reactRouterDom = require("react-router-dom");
10
+ const styledComponents = require("styled-components");
9
11
  const yup = require("yup");
12
+ const qs = require("qs");
10
13
  const pipe = require("lodash/fp/pipe");
11
14
  const dateFns = require("date-fns");
12
- const styledComponents = require("styled-components");
13
- const qs = require("qs");
14
15
  const toolkit = require("@reduxjs/toolkit");
15
16
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
16
17
  function _interopNamespace(e) {
17
- if (e && e.__esModule)
18
- return e;
18
+ if (e && e.__esModule) return e;
19
19
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
20
20
  if (e) {
21
21
  for (const k in e) {
@@ -32,15 +32,23 @@ function _interopNamespace(e) {
32
32
  return Object.freeze(n);
33
33
  }
34
34
  const React__namespace = /* @__PURE__ */ _interopNamespace(React);
35
+ const mapValues__default = /* @__PURE__ */ _interopDefault(mapValues);
35
36
  const yup__namespace = /* @__PURE__ */ _interopNamespace(yup);
36
37
  const pipe__default = /* @__PURE__ */ _interopDefault(pipe);
37
- const __variableDynamicImportRuntimeHelper = (glob, path) => {
38
+ const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
38
39
  const v = glob[path];
39
40
  if (v) {
40
41
  return typeof v === "function" ? v() : Promise.resolve(v);
41
42
  }
42
43
  return new Promise((_, reject) => {
43
- (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, new Error("Unknown variable dynamic import: " + path)));
44
+ (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
45
+ reject.bind(
46
+ null,
47
+ new Error(
48
+ "Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
49
+ )
50
+ )
51
+ );
44
52
  });
45
53
  };
46
54
  const PLUGIN_ID = "content-manager";
@@ -121,6 +129,7 @@ const DocumentRBAC = ({ children, permissions }) => {
121
129
  if (!slug) {
122
130
  throw new Error("Cannot find the slug param in the URL");
123
131
  }
132
+ const [{ rawQuery }] = strapiAdmin.useQueryParams();
124
133
  const userPermissions = strapiAdmin.useAuth("DocumentRBAC", (state) => state.permissions);
125
134
  const contentTypePermissions = React__namespace.useMemo(() => {
126
135
  const contentTypePermissions2 = userPermissions.filter(
@@ -131,7 +140,14 @@ const DocumentRBAC = ({ children, permissions }) => {
131
140
  return { ...acc, [action]: [permission] };
132
141
  }, {});
133
142
  }, [slug, userPermissions]);
134
- const { isLoading, allowedActions } = strapiAdmin.useRBAC(contentTypePermissions, permissions ?? void 0);
143
+ const { isLoading, allowedActions } = strapiAdmin.useRBAC(
144
+ contentTypePermissions,
145
+ permissions ?? void 0,
146
+ // TODO: useRBAC context should be typed and built differently
147
+ // We are passing raw query as context to the hook so that it can
148
+ // rely on the locale provided from DocumentRBAC for its permission calculations.
149
+ rawQuery
150
+ );
135
151
  const canCreateFields = !isLoading && allowedActions.canCreate ? extractAndDedupeFields(contentTypePermissions.create) : [];
136
152
  const canReadFields = !isLoading && allowedActions.canRead ? extractAndDedupeFields(contentTypePermissions.read) : [];
137
153
  const canUpdateFields = !isLoading && allowedActions.canUpdate ? extractAndDedupeFields(contentTypePermissions.update) : [];
@@ -286,7 +302,7 @@ const documentApi = contentManagerApi.injectEndpoints({
286
302
  url: `/content-manager/collection-types/${model}`,
287
303
  method: "GET",
288
304
  config: {
289
- params
305
+ params: qs.stringify(params, { encode: true })
290
306
  }
291
307
  }),
292
308
  providesTags: (result, _error, arg) => {
@@ -465,8 +481,7 @@ const {
465
481
  useUnpublishManyDocumentsMutation
466
482
  } = documentApi;
467
483
  const buildValidParams = (query) => {
468
- if (!query)
469
- return query;
484
+ if (!query) return query;
470
485
  const { plugins: _, ...validQueryParams } = {
471
486
  ...query,
472
487
  ...Object.values(query?.plugins ?? {}).reduce(
@@ -474,14 +489,29 @@ const buildValidParams = (query) => {
474
489
  {}
475
490
  )
476
491
  };
477
- if ("_q" in validQueryParams) {
478
- validQueryParams._q = encodeURIComponent(validQueryParams._q);
479
- }
480
492
  return validQueryParams;
481
493
  };
482
494
  const isBaseQueryError = (error) => {
483
495
  return error.name !== void 0;
484
496
  };
497
+ const arrayValidator = (attribute, options) => ({
498
+ message: strapiAdmin.translatedErrors.required,
499
+ test(value) {
500
+ if (options.status === "draft") {
501
+ return true;
502
+ }
503
+ if (!attribute.required) {
504
+ return true;
505
+ }
506
+ if (!value) {
507
+ return false;
508
+ }
509
+ if (Array.isArray(value) && value.length === 0) {
510
+ return false;
511
+ }
512
+ return true;
513
+ }
514
+ });
485
515
  const createYupSchema = (attributes = {}, components = {}, options = { status: null }) => {
486
516
  const createModelSchema = (attributes2) => yup__namespace.object().shape(
487
517
  Object.entries(attributes2).reduce((acc, [name, attribute]) => {
@@ -489,6 +519,7 @@ const createYupSchema = (attributes = {}, components = {}, options = { status: n
489
519
  return acc;
490
520
  }
491
521
  const validations = [
522
+ addNullableValidation,
492
523
  addRequiredValidation,
493
524
  addMinLengthValidation,
494
525
  addMaxLengthValidation,
@@ -505,12 +536,12 @@ const createYupSchema = (attributes = {}, components = {}, options = { status: n
505
536
  ...acc,
506
537
  [name]: transformSchema(
507
538
  yup__namespace.array().of(createModelSchema(attributes3).nullable(false))
508
- )
539
+ ).test(arrayValidator(attribute, options))
509
540
  };
510
541
  } else {
511
542
  return {
512
543
  ...acc,
513
- [name]: transformSchema(createModelSchema(attributes3))
544
+ [name]: transformSchema(createModelSchema(attributes3).nullable())
514
545
  };
515
546
  }
516
547
  }
@@ -532,7 +563,7 @@ const createYupSchema = (attributes = {}, components = {}, options = { status: n
532
563
  }
533
564
  )
534
565
  )
535
- )
566
+ ).test(arrayValidator(attribute, options))
536
567
  };
537
568
  case "relation":
538
569
  return {
@@ -544,7 +575,7 @@ const createYupSchema = (attributes = {}, components = {}, options = { status: n
544
575
  } else if (Array.isArray(value)) {
545
576
  return yup__namespace.array().of(
546
577
  yup__namespace.object().shape({
547
- id: yup__namespace.string().required()
578
+ id: yup__namespace.number().required()
548
579
  })
549
580
  );
550
581
  } else if (typeof value === "object") {
@@ -630,17 +661,17 @@ const nullableSchema = (schema) => {
630
661
  schema
631
662
  );
632
663
  };
664
+ const addNullableValidation = () => (schema) => {
665
+ return nullableSchema(schema);
666
+ };
633
667
  const addRequiredValidation = (attribute, options) => (schema) => {
634
- if (options.status === "draft") {
635
- return nullableSchema(schema);
636
- }
637
- if ((attribute.type === "component" && attribute.repeatable || attribute.type === "dynamiczone") && attribute.required && "min" in schema) {
638
- return schema.min(1, strapiAdmin.translatedErrors.required);
668
+ if (options.status === "draft" || !attribute.required) {
669
+ return schema;
639
670
  }
640
- if (attribute.required && attribute.type !== "relation") {
671
+ if (attribute.required && "required" in schema) {
641
672
  return schema.required(strapiAdmin.translatedErrors.required);
642
673
  }
643
- return nullableSchema(schema);
674
+ return schema;
644
675
  };
645
676
  const addMinLengthValidation = (attribute, options) => (schema) => {
646
677
  if (options.status === "draft") {
@@ -668,31 +699,12 @@ const addMaxLengthValidation = (attribute) => (schema) => {
668
699
  return schema;
669
700
  };
670
701
  const addMinValidation = (attribute, options) => (schema) => {
671
- if ("min" in attribute) {
702
+ if (options.status === "draft") {
703
+ return schema;
704
+ }
705
+ if ("min" in attribute && "min" in schema) {
672
706
  const min = toInteger(attribute.min);
673
- if (attribute.type === "component" && attribute.repeatable || attribute.type === "dynamiczone") {
674
- if (options.status !== "draft" && !attribute.required && "test" in schema && min) {
675
- return schema.test(
676
- "custom-min",
677
- {
678
- ...strapiAdmin.translatedErrors.min,
679
- values: {
680
- min: attribute.min
681
- }
682
- },
683
- (value) => {
684
- if (!value) {
685
- return true;
686
- }
687
- if (Array.isArray(value) && value.length === 0) {
688
- return true;
689
- }
690
- return value.length >= min;
691
- }
692
- );
693
- }
694
- }
695
- if ("min" in schema && min) {
707
+ if (min) {
696
708
  return schema.min(min, {
697
709
  ...strapiAdmin.translatedErrors.min,
698
710
  values: {
@@ -981,9 +993,10 @@ const formatEditLayout = (data, {
981
993
  currentPanelIndex += 2;
982
994
  } else {
983
995
  if (!panels[currentPanelIndex]) {
984
- panels.push([]);
996
+ panels.push([row]);
997
+ } else {
998
+ panels[currentPanelIndex].push(row);
985
999
  }
986
- panels[currentPanelIndex].push(row);
987
1000
  }
988
1001
  return panels;
989
1002
  }, []);
@@ -1165,11 +1178,13 @@ const useDocument = (args, opts) => {
1165
1178
  [validationSchema]
1166
1179
  );
1167
1180
  const isLoading = isLoadingDocument || isFetchingDocument || isLoadingSchema;
1181
+ const hasError = !!error;
1168
1182
  return {
1169
1183
  components,
1170
1184
  document: data?.data,
1171
1185
  meta: data?.meta,
1172
1186
  isLoading,
1187
+ hasError,
1173
1188
  schema,
1174
1189
  schemas,
1175
1190
  validate
@@ -1185,16 +1200,18 @@ const useDoc = () => {
1185
1200
  if (!slug) {
1186
1201
  throw new Error("Could not find model in url params");
1187
1202
  }
1203
+ const document = useDocument(
1204
+ { documentId: origin || id, model: slug, collectionType, params },
1205
+ {
1206
+ skip: id === "create" || !origin && !id && collectionType !== SINGLE_TYPES
1207
+ }
1208
+ );
1209
+ const returnId = origin || id === "create" ? void 0 : id;
1188
1210
  return {
1189
1211
  collectionType,
1190
1212
  model: slug,
1191
- id: origin || id === "create" ? void 0 : id,
1192
- ...useDocument(
1193
- { documentId: origin || id, model: slug, collectionType, params },
1194
- {
1195
- skip: id === "create" || !origin && !id && collectionType !== SINGLE_TYPES
1196
- }
1197
- )
1213
+ id: returnId,
1214
+ ...document
1198
1215
  };
1199
1216
  };
1200
1217
  const useContentManagerContext = () => {
@@ -1237,9 +1254,6 @@ const useContentManagerContext = () => {
1237
1254
  };
1238
1255
  };
1239
1256
  const prefixPluginTranslations = (trad, pluginId) => {
1240
- if (!pluginId) {
1241
- throw new TypeError("pluginId can't be empty");
1242
- }
1243
1257
  return Object.keys(trad).reduce((acc, current) => {
1244
1258
  acc[`${pluginId}.${current}`] = trad[current];
1245
1259
  return acc;
@@ -1673,10 +1687,10 @@ const useDocumentActions = () => {
1673
1687
  update
1674
1688
  };
1675
1689
  };
1676
- const ProtectedHistoryPage = React.lazy(
1677
- () => Promise.resolve().then(() => require("./History-BrJ1tUvt.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
1690
+ const ProtectedHistoryPage = React__namespace.lazy(
1691
+ () => Promise.resolve().then(() => require("./History-BqRQm2Lc.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
1678
1692
  );
1679
- const routes$1 = [
1693
+ const routes$2 = [
1680
1694
  {
1681
1695
  path: ":collectionType/:slug/:id/history",
1682
1696
  Component: ProtectedHistoryPage
@@ -1686,32 +1700,45 @@ const routes$1 = [
1686
1700
  Component: ProtectedHistoryPage
1687
1701
  }
1688
1702
  ];
1703
+ const ProtectedPreviewPage = React__namespace.lazy(
1704
+ () => Promise.resolve().then(() => require("./Preview-BqRUSbFU.js")).then((mod) => ({ default: mod.ProtectedPreviewPage }))
1705
+ );
1706
+ const routes$1 = [
1707
+ {
1708
+ path: ":collectionType/:slug/:id/preview",
1709
+ Component: ProtectedPreviewPage
1710
+ },
1711
+ {
1712
+ path: ":collectionType/:slug/preview",
1713
+ Component: ProtectedPreviewPage
1714
+ }
1715
+ ];
1689
1716
  const ProtectedEditViewPage = React.lazy(
1690
- () => Promise.resolve().then(() => require("./EditViewPage-D2QVRr_2.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
1717
+ () => Promise.resolve().then(() => require("./EditViewPage-C-TZmK5r.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
1691
1718
  );
1692
1719
  const ProtectedListViewPage = React.lazy(
1693
- () => Promise.resolve().then(() => require("./ListViewPage-Coj-RPsx.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
1720
+ () => Promise.resolve().then(() => require("./ListViewPage-CYkrfWsm.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
1694
1721
  );
1695
1722
  const ProtectedListConfiguration = React.lazy(
1696
- () => Promise.resolve().then(() => require("./ListConfigurationPage-Eane5LKE.js")).then((mod) => ({
1723
+ () => Promise.resolve().then(() => require("./ListConfigurationPage-BT69-TvF.js")).then((mod) => ({
1697
1724
  default: mod.ProtectedListConfiguration
1698
1725
  }))
1699
1726
  );
1700
1727
  const ProtectedEditConfigurationPage = React.lazy(
1701
- () => Promise.resolve().then(() => require("./EditConfigurationPage-CpLj5gYZ.js")).then((mod) => ({
1728
+ () => Promise.resolve().then(() => require("./EditConfigurationPage-CZRKq8CN.js")).then((mod) => ({
1702
1729
  default: mod.ProtectedEditConfigurationPage
1703
1730
  }))
1704
1731
  );
1705
1732
  const ProtectedComponentConfigurationPage = React.lazy(
1706
- () => Promise.resolve().then(() => require("./ComponentConfigurationPage-DnnZJc1F.js")).then((mod) => ({
1733
+ () => Promise.resolve().then(() => require("./ComponentConfigurationPage-BPiQrhZ6.js")).then((mod) => ({
1707
1734
  default: mod.ProtectedComponentConfigurationPage
1708
1735
  }))
1709
1736
  );
1710
1737
  const NoPermissions = React.lazy(
1711
- () => Promise.resolve().then(() => require("./NoPermissionsPage-BOtb5FTM.js")).then((mod) => ({ default: mod.NoPermissions }))
1738
+ () => Promise.resolve().then(() => require("./NoPermissionsPage-DjUdvhJ6.js")).then((mod) => ({ default: mod.NoPermissions }))
1712
1739
  );
1713
1740
  const NoContentType = React.lazy(
1714
- () => Promise.resolve().then(() => require("./NoContentTypePage-BDJ0dshy.js")).then((mod) => ({ default: mod.NoContentType }))
1741
+ () => Promise.resolve().then(() => require("./NoContentTypePage-BZMfRsrg.js")).then((mod) => ({ default: mod.NoContentType }))
1715
1742
  );
1716
1743
  const CollectionTypePages = () => {
1717
1744
  const { collectionType } = reactRouterDom.useParams();
@@ -1723,7 +1750,7 @@ const CollectionTypePages = () => {
1723
1750
  const CLONE_RELATIVE_PATH = ":collectionType/:slug/clone/:origin";
1724
1751
  const CLONE_PATH = `/content-manager/${CLONE_RELATIVE_PATH}`;
1725
1752
  const LIST_RELATIVE_PATH = ":collectionType/:slug";
1726
- const LIST_PATH = `/content-manager/${LIST_RELATIVE_PATH}`;
1753
+ const LIST_PATH = `/content-manager/collection-types/:slug`;
1727
1754
  const routes = [
1728
1755
  {
1729
1756
  path: LIST_RELATIVE_PATH,
@@ -1757,6 +1784,7 @@ const routes = [
1757
1784
  path: "no-content-types",
1758
1785
  Component: NoContentType
1759
1786
  },
1787
+ ...routes$2,
1760
1788
  ...routes$1
1761
1789
  ];
1762
1790
  const DocumentActions = ({ actions: actions2 }) => {
@@ -1855,6 +1883,11 @@ const DocumentActionButton = (action) => {
1855
1883
  ) : null
1856
1884
  ] });
1857
1885
  };
1886
+ const MenuItem = styledComponents.styled(designSystem.Menu.Item)`
1887
+ &:hover {
1888
+ background: ${({ theme, isVariantDanger, isDisabled }) => isVariantDanger && !isDisabled ? theme.colors.danger100 : "neutral"};
1889
+ }
1890
+ `;
1858
1891
  const DocumentActionsMenu = ({
1859
1892
  actions: actions2,
1860
1893
  children,
@@ -1913,48 +1946,32 @@ const DocumentActionsMenu = ({
1913
1946
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Content, { maxHeight: void 0, popoverPlacement: "bottom-end", children: [
1914
1947
  actions2.map((action) => {
1915
1948
  return /* @__PURE__ */ jsxRuntime.jsx(
1916
- designSystem.Menu.Item,
1949
+ MenuItem,
1917
1950
  {
1918
1951
  disabled: action.disabled,
1919
1952
  onSelect: handleClick(action),
1920
1953
  display: "block",
1921
- children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", gap: 4, children: [
1922
- /* @__PURE__ */ jsxRuntime.jsxs(
1923
- designSystem.Flex,
1924
- {
1925
- color: !action.disabled ? convertActionVariantToColor(action.variant) : "inherit",
1926
- gap: 2,
1927
- tag: "span",
1928
- children: [
1929
- /* @__PURE__ */ jsxRuntime.jsx(
1930
- designSystem.Flex,
1931
- {
1932
- tag: "span",
1933
- color: !action.disabled ? convertActionVariantToIconColor(action.variant) : "inherit",
1934
- children: action.icon
1935
- }
1936
- ),
1937
- action.label
1938
- ]
1939
- }
1940
- ),
1941
- action.id.startsWith("HistoryAction") && /* @__PURE__ */ jsxRuntime.jsx(
1942
- designSystem.Flex,
1943
- {
1944
- alignItems: "center",
1945
- background: "alternative100",
1946
- borderStyle: "solid",
1947
- borderColor: "alternative200",
1948
- borderWidth: "1px",
1949
- height: 5,
1950
- paddingLeft: 2,
1951
- paddingRight: 2,
1952
- hasRadius: true,
1953
- color: "alternative600",
1954
- children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", fontWeight: "bold", lineHeight: 1, children: formatMessage({ id: "global.new", defaultMessage: "New" }) })
1955
- }
1956
- )
1957
- ] })
1954
+ isVariantDanger: action.variant === "danger",
1955
+ isDisabled: action.disabled,
1956
+ children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "space-between", gap: 4, children: /* @__PURE__ */ jsxRuntime.jsxs(
1957
+ designSystem.Flex,
1958
+ {
1959
+ color: !action.disabled ? convertActionVariantToColor(action.variant) : "inherit",
1960
+ gap: 2,
1961
+ tag: "span",
1962
+ children: [
1963
+ /* @__PURE__ */ jsxRuntime.jsx(
1964
+ designSystem.Flex,
1965
+ {
1966
+ tag: "span",
1967
+ color: !action.disabled ? convertActionVariantToIconColor(action.variant) : "inherit",
1968
+ children: action.icon
1969
+ }
1970
+ ),
1971
+ action.label
1972
+ ]
1973
+ }
1974
+ ) })
1958
1975
  },
1959
1976
  action.id
1960
1977
  );
@@ -2065,6 +2082,18 @@ const DocumentActionModal = ({
2065
2082
  typeof Footer === "function" ? /* @__PURE__ */ jsxRuntime.jsx(Footer, { onClose: handleClose }) : Footer
2066
2083
  ] }) });
2067
2084
  };
2085
+ const transformData = (data) => {
2086
+ if (Array.isArray(data)) {
2087
+ return data.map(transformData);
2088
+ }
2089
+ if (typeof data === "object" && data !== null) {
2090
+ if ("apiData" in data) {
2091
+ return data.apiData;
2092
+ }
2093
+ return mapValues__default.default(transformData)(data);
2094
+ }
2095
+ return data;
2096
+ };
2068
2097
  const PublishAction$1 = ({
2069
2098
  activeTab,
2070
2099
  documentId,
@@ -2079,6 +2108,7 @@ const PublishAction$1 = ({
2079
2108
  const { _unstableFormatValidationErrors: formatValidationErrors } = strapiAdmin.useAPIErrorHandler();
2080
2109
  const isListView = reactRouterDom.useMatch(LIST_PATH) !== null;
2081
2110
  const isCloning = reactRouterDom.useMatch(CLONE_PATH) !== null;
2111
+ const { id } = reactRouterDom.useParams();
2082
2112
  const { formatMessage } = reactIntl.useIntl();
2083
2113
  const canPublish = useDocumentRBAC("PublishAction", ({ canPublish: canPublish2 }) => canPublish2);
2084
2114
  const { publish } = useDocumentActions();
@@ -2158,7 +2188,9 @@ const PublishAction$1 = ({
2158
2188
  const performPublish = async () => {
2159
2189
  setSubmitting(true);
2160
2190
  try {
2161
- const { errors } = await validate();
2191
+ const { errors } = await validate(true, {
2192
+ status: "published"
2193
+ });
2162
2194
  if (errors) {
2163
2195
  toggleNotification({
2164
2196
  type: "danger",
@@ -2176,13 +2208,15 @@ const PublishAction$1 = ({
2176
2208
  documentId,
2177
2209
  params
2178
2210
  },
2179
- formValues
2211
+ transformData(formValues)
2180
2212
  );
2181
2213
  if ("data" in res && collectionType !== SINGLE_TYPES) {
2182
- navigate({
2183
- pathname: `../${collectionType}/${model}/${res.data.documentId}`,
2184
- search: rawQuery
2185
- });
2214
+ if (id === "create") {
2215
+ navigate({
2216
+ pathname: `../${collectionType}/${model}/${res.data.documentId}`,
2217
+ search: rawQuery
2218
+ });
2219
+ }
2186
2220
  } else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
2187
2221
  setErrors(formatValidationErrors(res.error));
2188
2222
  }
@@ -2235,6 +2269,7 @@ const PublishAction$1 = ({
2235
2269
  };
2236
2270
  };
2237
2271
  PublishAction$1.type = "publish";
2272
+ PublishAction$1.position = "panel";
2238
2273
  const UpdateAction = ({
2239
2274
  activeTab,
2240
2275
  documentId,
@@ -2266,24 +2301,24 @@ const UpdateAction = ({
2266
2301
  */
2267
2302
  disabled: isSubmitting || !modified && !isCloning || activeTab === "published",
2268
2303
  label: formatMessage({
2269
- id: "content-manager.containers.Edit.save",
2304
+ id: "global.save",
2270
2305
  defaultMessage: "Save"
2271
2306
  }),
2272
2307
  onClick: async () => {
2273
2308
  setSubmitting(true);
2274
2309
  try {
2275
- if (activeTab !== "draft") {
2276
- const { errors } = await validate();
2277
- if (errors) {
2278
- toggleNotification({
2279
- type: "danger",
2280
- message: formatMessage({
2281
- id: "content-manager.validation.error",
2282
- defaultMessage: "There are validation errors in your document. Please fix them before saving."
2283
- })
2284
- });
2285
- return;
2286
- }
2310
+ const { errors } = await validate(true, {
2311
+ status: "draft"
2312
+ });
2313
+ if (errors) {
2314
+ toggleNotification({
2315
+ type: "danger",
2316
+ message: formatMessage({
2317
+ id: "content-manager.validation.error",
2318
+ defaultMessage: "There are validation errors in your document. Please fix them before saving."
2319
+ })
2320
+ });
2321
+ return;
2287
2322
  }
2288
2323
  if (isCloning) {
2289
2324
  const res = await clone(
@@ -2292,7 +2327,7 @@ const UpdateAction = ({
2292
2327
  documentId: cloneMatch.params.origin,
2293
2328
  params
2294
2329
  },
2295
- document
2330
+ transformData(document)
2296
2331
  );
2297
2332
  if ("data" in res) {
2298
2333
  navigate(
@@ -2313,7 +2348,7 @@ const UpdateAction = ({
2313
2348
  documentId,
2314
2349
  params
2315
2350
  },
2316
- document
2351
+ transformData(document)
2317
2352
  );
2318
2353
  if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
2319
2354
  setErrors(formatValidationErrors(res.error));
@@ -2326,7 +2361,7 @@ const UpdateAction = ({
2326
2361
  model,
2327
2362
  params
2328
2363
  },
2329
- document
2364
+ transformData(document)
2330
2365
  );
2331
2366
  if ("data" in res && collectionType !== SINGLE_TYPES) {
2332
2367
  navigate(
@@ -2347,6 +2382,7 @@ const UpdateAction = ({
2347
2382
  };
2348
2383
  };
2349
2384
  UpdateAction.type = "update";
2385
+ UpdateAction.position = "panel";
2350
2386
  const UNPUBLISH_DRAFT_OPTIONS = {
2351
2387
  KEEP: "keep",
2352
2388
  DISCARD: "discard"
@@ -2469,6 +2505,7 @@ const UnpublishAction$1 = ({
2469
2505
  };
2470
2506
  };
2471
2507
  UnpublishAction$1.type = "unpublish";
2508
+ UnpublishAction$1.position = "panel";
2472
2509
  const DiscardAction = ({
2473
2510
  activeTab,
2474
2511
  documentId,
@@ -2519,6 +2556,7 @@ const DiscardAction = ({
2519
2556
  };
2520
2557
  };
2521
2558
  DiscardAction.type = "discard";
2559
+ DiscardAction.position = "panel";
2522
2560
  const DEFAULT_ACTIONS = [PublishAction$1, UpdateAction, UnpublishAction$1, DiscardAction];
2523
2561
  const intervals = ["years", "months", "days", "hours", "minutes", "seconds"];
2524
2562
  const RelativeTime = React__namespace.forwardRef(
@@ -2531,7 +2569,7 @@ const RelativeTime = React__namespace.forwardRef(
2531
2569
  });
2532
2570
  const unit = intervals.find((intervalUnit) => {
2533
2571
  return interval[intervalUnit] > 0 && Object.keys(interval).includes(intervalUnit);
2534
- });
2572
+ }) ?? "seconds";
2535
2573
  const relativeTime = dateFns.isPast(timestamp) ? -interval[unit] : interval[unit];
2536
2574
  const customInterval = customIntervals.find(
2537
2575
  (custom) => interval[custom.unit] < custom.threshold
@@ -2565,19 +2603,29 @@ const getDisplayName = ({
2565
2603
  return email ?? "";
2566
2604
  };
2567
2605
  const capitalise = (str) => str.charAt(0).toUpperCase() + str.slice(1);
2568
- const DocumentStatus = ({ status = "draft", ...restProps }) => {
2606
+ const DocumentStatus = ({ status = "draft", size = "S", ...restProps }) => {
2569
2607
  const statusVariant = status === "draft" ? "secondary" : status === "published" ? "success" : "alternative";
2570
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Status, { ...restProps, showBullet: false, size: "S", variant: statusVariant, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "span", variant: "omega", fontWeight: "bold", children: capitalise(status) }) });
2608
+ const { formatMessage } = reactIntl.useIntl();
2609
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Status, { ...restProps, size, variant: statusVariant, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "span", variant: "omega", fontWeight: "bold", children: formatMessage({
2610
+ id: `content-manager.containers.List.${status}`,
2611
+ defaultMessage: capitalise(status)
2612
+ }) }) });
2571
2613
  };
2572
2614
  const Header = ({ isCreating, status, title: documentTitle = "Untitled" }) => {
2573
2615
  const { formatMessage } = reactIntl.useIntl();
2574
2616
  const isCloning = reactRouterDom.useMatch(CLONE_PATH) !== null;
2617
+ const params = reactRouterDom.useParams();
2575
2618
  const title = isCreating ? formatMessage({
2576
2619
  id: "content-manager.containers.edit.title.new",
2577
2620
  defaultMessage: "Create an entry"
2578
2621
  }) : documentTitle;
2579
2622
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", paddingTop: 6, paddingBottom: 4, gap: 2, children: [
2580
- /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.BackButton, {}),
2623
+ /* @__PURE__ */ jsxRuntime.jsx(
2624
+ strapiAdmin.BackButton,
2625
+ {
2626
+ fallback: params.collectionType === SINGLE_TYPES ? void 0 : `../${COLLECTION_TYPES}/${params.slug}`
2627
+ }
2628
+ ),
2581
2629
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { width: "100%", justifyContent: "space-between", gap: "80px", alignItems: "flex-start", children: [
2582
2630
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "alpha", tag: "h1", children: title }),
2583
2631
  /* @__PURE__ */ jsxRuntime.jsx(HeaderToolbar, {})
@@ -2628,7 +2676,7 @@ const HeaderToolbar = () => {
2628
2676
  meta: isCloning ? void 0 : meta,
2629
2677
  collectionType
2630
2678
  },
2631
- descriptions: plugins["content-manager"].apis.getDocumentActions(),
2679
+ descriptions: plugins["content-manager"].apis.getDocumentActions("header"),
2632
2680
  children: (actions2) => {
2633
2681
  const headerActions = actions2.filter((action) => {
2634
2682
  const positions = Array.isArray(action.position) ? action.position : [action.position];
@@ -2665,12 +2713,12 @@ const Information = ({ activeTab }) => {
2665
2713
  isDisplayed: !!publishDocument?.[PUBLISHED_AT_ATTRIBUTE_NAME],
2666
2714
  label: formatMessage({
2667
2715
  id: "content-manager.containers.edit.information.last-published.label",
2668
- defaultMessage: "Last published"
2716
+ defaultMessage: "Published"
2669
2717
  }),
2670
2718
  value: formatMessage(
2671
2719
  {
2672
2720
  id: "content-manager.containers.edit.information.last-published.value",
2673
- defaultMessage: `Published {time}{isAnonymous, select, true {} other { by {author}}}`
2721
+ defaultMessage: `{time}{isAnonymous, select, true {} other { by {author}}}`
2674
2722
  },
2675
2723
  {
2676
2724
  time: /* @__PURE__ */ jsxRuntime.jsx(RelativeTime, { timestamp: new Date(publishDocument?.[PUBLISHED_AT_ATTRIBUTE_NAME]) }),
@@ -2683,12 +2731,12 @@ const Information = ({ activeTab }) => {
2683
2731
  isDisplayed: !!createAndUpdateDocument?.[UPDATED_AT_ATTRIBUTE_NAME],
2684
2732
  label: formatMessage({
2685
2733
  id: "content-manager.containers.edit.information.last-draft.label",
2686
- defaultMessage: "Last draft"
2734
+ defaultMessage: "Updated"
2687
2735
  }),
2688
2736
  value: formatMessage(
2689
2737
  {
2690
2738
  id: "content-manager.containers.edit.information.last-draft.value",
2691
- defaultMessage: `Modified {time}{isAnonymous, select, true {} other { by {author}}}`
2739
+ defaultMessage: `{time}{isAnonymous, select, true {} other { by {author}}}`
2692
2740
  },
2693
2741
  {
2694
2742
  time: /* @__PURE__ */ jsxRuntime.jsx(
@@ -2706,12 +2754,12 @@ const Information = ({ activeTab }) => {
2706
2754
  isDisplayed: !!createAndUpdateDocument?.[CREATED_AT_ATTRIBUTE_NAME],
2707
2755
  label: formatMessage({
2708
2756
  id: "content-manager.containers.edit.information.document.label",
2709
- defaultMessage: "Document"
2757
+ defaultMessage: "Created"
2710
2758
  }),
2711
2759
  value: formatMessage(
2712
2760
  {
2713
2761
  id: "content-manager.containers.edit.information.document.value",
2714
- defaultMessage: `Created {time}{isAnonymous, select, true {} other { by {author}}}`
2762
+ defaultMessage: `{time}{isAnonymous, select, true {} other { by {author}}}`
2715
2763
  },
2716
2764
  {
2717
2765
  time: /* @__PURE__ */ jsxRuntime.jsx(
@@ -2769,10 +2817,9 @@ const HeaderActions = ({ actions: actions2 }) => {
2769
2817
  designSystem.SingleSelect,
2770
2818
  {
2771
2819
  size: "S",
2772
- disabled: action.disabled,
2773
- "aria-label": action.label,
2774
2820
  onChange: action.onSelect,
2775
- value: action.value,
2821
+ "aria-label": action.label,
2822
+ ...action,
2776
2823
  children: action.options.map(({ label, ...option }) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { ...option, children: label }, option.value))
2777
2824
  },
2778
2825
  action.id
@@ -2837,6 +2884,7 @@ const ConfigureTheViewAction = ({ collectionType, model }) => {
2837
2884
  };
2838
2885
  };
2839
2886
  ConfigureTheViewAction.type = "configure-the-view";
2887
+ ConfigureTheViewAction.position = "header";
2840
2888
  const EditTheModelAction = ({ model }) => {
2841
2889
  const navigate = reactRouterDom.useNavigate();
2842
2890
  const { formatMessage } = reactIntl.useIntl();
@@ -2853,6 +2901,7 @@ const EditTheModelAction = ({ model }) => {
2853
2901
  };
2854
2902
  };
2855
2903
  EditTheModelAction.type = "edit-the-model";
2904
+ EditTheModelAction.position = "header";
2856
2905
  const DeleteAction$1 = ({ documentId, model, collectionType, document }) => {
2857
2906
  const navigate = reactRouterDom.useNavigate();
2858
2907
  const { formatMessage } = reactIntl.useIntl();
@@ -2926,6 +2975,7 @@ const DeleteAction$1 = ({ documentId, model, collectionType, document }) => {
2926
2975
  };
2927
2976
  };
2928
2977
  DeleteAction$1.type = "delete";
2978
+ DeleteAction$1.position = ["header", "table-row"];
2929
2979
  const DEFAULT_HEADER_ACTIONS = [EditTheModelAction, ConfigureTheViewAction, DeleteAction$1];
2930
2980
  const Panels = () => {
2931
2981
  const isCloning = reactRouterDom.useMatch(CLONE_PATH) !== null;
@@ -2988,7 +3038,7 @@ const ActionsPanelContent = () => {
2988
3038
  strapiAdmin.DescriptionComponentRenderer,
2989
3039
  {
2990
3040
  props,
2991
- descriptions: plugins["content-manager"].apis.getDocumentActions(),
3041
+ descriptions: plugins["content-manager"].apis.getDocumentActions("panel"),
2992
3042
  children: (actions2) => /* @__PURE__ */ jsxRuntime.jsx(DocumentActions, { actions: actions2 })
2993
3043
  }
2994
3044
  ),
@@ -3015,7 +3065,7 @@ const Panel = React__namespace.forwardRef(({ children, title }, ref) => {
3015
3065
  justifyContent: "stretch",
3016
3066
  alignItems: "flex-start",
3017
3067
  children: [
3018
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "h2", variant: "sigma", textTransform: "uppercase", children: title }),
3068
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "h2", variant: "sigma", textTransform: "uppercase", textColor: "neutral600", children: title }),
3019
3069
  children
3020
3070
  ]
3021
3071
  }
@@ -3265,18 +3315,10 @@ const SelectedEntriesTableContent = ({
3265
3315
  search: row.locale && `?plugins[i18n][locale]=${row.locale}`
3266
3316
  },
3267
3317
  state: { from: pathname },
3268
- label: formatMessage(
3269
- { id: "app.component.HelperPluginTable.edit", defaultMessage: "Edit {target}" },
3270
- {
3271
- target: formatMessage(
3272
- {
3273
- id: "content-manager.components.ListViewHelperPluginTable.row-line",
3274
- defaultMessage: "item line {number}"
3275
- },
3276
- { number: index2 + 1 }
3277
- )
3278
- }
3279
- ),
3318
+ label: formatMessage({
3319
+ id: "content-manager.bulk-publish.edit",
3320
+ defaultMessage: "Edit"
3321
+ }),
3280
3322
  target: "_blank",
3281
3323
  marginLeft: "auto",
3282
3324
  variant: "ghost",
@@ -3450,8 +3492,7 @@ const PublishAction = ({ documents, model }) => {
3450
3492
  const refetchList = () => {
3451
3493
  contentManagerApi.util.invalidateTags([{ type: "Document", id: `${model}_LIST` }]);
3452
3494
  };
3453
- if (!showPublishButton)
3454
- return null;
3495
+ if (!showPublishButton) return null;
3455
3496
  return {
3456
3497
  actionType: "publish",
3457
3498
  variant: "tertiary",
@@ -3519,8 +3560,7 @@ const DeleteAction = ({ documents, model }) => {
3519
3560
  selectRow([]);
3520
3561
  }
3521
3562
  };
3522
- if (!hasDeletePermission)
3523
- return null;
3563
+ if (!hasDeletePermission) return null;
3524
3564
  return {
3525
3565
  variant: "danger-light",
3526
3566
  label: formatMessage({ id: "global.delete", defaultMessage: "Delete" }),
@@ -3569,8 +3609,7 @@ const UnpublishAction = ({ documents, model }) => {
3569
3609
  }
3570
3610
  };
3571
3611
  const showUnpublishButton = hasDraftAndPublishEnabled && hasPublishPermission && documents.some((entry) => entry.status === "published" || entry.status === "modified");
3572
- if (!showUnpublishButton)
3573
- return null;
3612
+ if (!showUnpublishButton) return null;
3574
3613
  return {
3575
3614
  variant: "tertiary",
3576
3615
  label: formatMessage({ id: "app.utils.unpublish", defaultMessage: "Unpublish" }),
@@ -3675,7 +3714,7 @@ const TableActions = ({ document }) => {
3675
3714
  strapiAdmin.DescriptionComponentRenderer,
3676
3715
  {
3677
3716
  props,
3678
- descriptions: plugins["content-manager"].apis.getDocumentActions().filter((action) => action.name !== "PublishAction"),
3717
+ descriptions: plugins["content-manager"].apis.getDocumentActions("table-row").filter((action) => action.name !== "PublishAction"),
3679
3718
  children: (actions2) => {
3680
3719
  const tableRowActions = actions2.filter((action) => {
3681
3720
  const positions = Array.isArray(action.position) ? action.position : [action.position];
@@ -3734,6 +3773,7 @@ const EditAction = ({ documentId }) => {
3734
3773
  };
3735
3774
  };
3736
3775
  EditAction.type = "edit";
3776
+ EditAction.position = "table-row";
3737
3777
  const StyledPencil = styledComponents.styled(Icons.Pencil)`
3738
3778
  path {
3739
3779
  fill: currentColor;
@@ -3810,6 +3850,7 @@ const CloneAction = ({ model, documentId }) => {
3810
3850
  };
3811
3851
  };
3812
3852
  CloneAction.type = "clone";
3853
+ CloneAction.position = "table-row";
3813
3854
  const StyledDuplicate = styledComponents.styled(Icons.Duplicate)`
3814
3855
  path {
3815
3856
  fill: currentColor;
@@ -3896,7 +3937,14 @@ class ContentManagerPlugin {
3896
3937
  addDocumentHeaderAction: this.addDocumentHeaderAction.bind(this),
3897
3938
  addEditViewSidePanel: this.addEditViewSidePanel.bind(this),
3898
3939
  getBulkActions: () => this.bulkActions,
3899
- getDocumentActions: () => this.documentActions,
3940
+ getDocumentActions: (position) => {
3941
+ if (position) {
3942
+ return this.documentActions.filter(
3943
+ (action) => action.position == void 0 || [action.position].flat().includes(position)
3944
+ );
3945
+ }
3946
+ return this.documentActions;
3947
+ },
3900
3948
  getEditViewSidePanels: () => this.editViewSidePanels,
3901
3949
  getHeaderActions: () => this.headerActions
3902
3950
  }
@@ -3906,10 +3954,8 @@ class ContentManagerPlugin {
3906
3954
  const getPrintableType = (value) => {
3907
3955
  const nativeType = typeof value;
3908
3956
  if (nativeType === "object") {
3909
- if (value === null)
3910
- return "null";
3911
- if (Array.isArray(value))
3912
- return "array";
3957
+ if (value === null) return "null";
3958
+ if (Array.isArray(value)) return "array";
3913
3959
  if (value instanceof Object && value.constructor.name !== "Object") {
3914
3960
  return value.constructor.name;
3915
3961
  }
@@ -3920,17 +3966,27 @@ const HistoryAction = ({ model, document }) => {
3920
3966
  const { formatMessage } = reactIntl.useIntl();
3921
3967
  const [{ query }] = strapiAdmin.useQueryParams();
3922
3968
  const navigate = reactRouterDom.useNavigate();
3969
+ const { trackUsage } = strapiAdmin.useTracking();
3970
+ const { pathname } = reactRouterDom.useLocation();
3923
3971
  const pluginsQueryParams = qs.stringify({ plugins: query.plugins }, { encode: false });
3924
3972
  if (!window.strapi.features.isEnabled("cms-content-history")) {
3925
3973
  return null;
3926
3974
  }
3975
+ const handleOnClick = () => {
3976
+ const destination = { pathname: "history", search: pluginsQueryParams };
3977
+ trackUsage("willNavigate", {
3978
+ from: pathname,
3979
+ to: `${pathname}/${destination.pathname}`
3980
+ });
3981
+ navigate(destination);
3982
+ };
3927
3983
  return {
3928
3984
  icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.ClockCounterClockwise, {}),
3929
3985
  label: formatMessage({
3930
3986
  id: "content-manager.history.document-action",
3931
3987
  defaultMessage: "Content History"
3932
3988
  }),
3933
- onClick: () => navigate({ pathname: "history", search: pluginsQueryParams }),
3989
+ onClick: handleOnClick,
3934
3990
  disabled: (
3935
3991
  /**
3936
3992
  * The user is creating a new document.
@@ -3952,6 +4008,7 @@ const HistoryAction = ({ model, document }) => {
3952
4008
  };
3953
4009
  };
3954
4010
  HistoryAction.type = "history";
4011
+ HistoryAction.position = "header";
3955
4012
  const historyAdmin = {
3956
4013
  bootstrap(app) {
3957
4014
  const { addDocumentAction } = app.getPlugin("content-manager").apis;
@@ -3998,6 +4055,92 @@ const { setInitialData } = actions;
3998
4055
  const reducer = toolkit.combineReducers({
3999
4056
  app: reducer$1
4000
4057
  });
4058
+ const previewApi = contentManagerApi.injectEndpoints({
4059
+ endpoints: (builder) => ({
4060
+ getPreviewUrl: builder.query({
4061
+ query({ query, params }) {
4062
+ return {
4063
+ url: `/content-manager/preview/url/${params.contentType}`,
4064
+ method: "GET",
4065
+ config: {
4066
+ params: query
4067
+ }
4068
+ };
4069
+ }
4070
+ })
4071
+ })
4072
+ });
4073
+ const { useGetPreviewUrlQuery } = previewApi;
4074
+ const ConditionalTooltip = ({ isShown, label, children }) => {
4075
+ if (isShown) {
4076
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tooltip, { label, children });
4077
+ }
4078
+ return children;
4079
+ };
4080
+ const PreviewSidePanel = ({ model, documentId, document }) => {
4081
+ const { formatMessage } = reactIntl.useIntl();
4082
+ const { trackUsage } = strapiAdmin.useTracking();
4083
+ const { pathname } = reactRouterDom.useLocation();
4084
+ const [{ query }] = strapiAdmin.useQueryParams();
4085
+ const isModified = strapiAdmin.useForm("PreviewSidePanel", (state) => state.modified);
4086
+ const { data, error } = useGetPreviewUrlQuery({
4087
+ params: {
4088
+ contentType: model
4089
+ },
4090
+ query: {
4091
+ documentId,
4092
+ locale: document?.locale,
4093
+ status: document?.status
4094
+ }
4095
+ });
4096
+ if (!data?.data?.url || error) {
4097
+ return null;
4098
+ }
4099
+ const trackNavigation = () => {
4100
+ const destinationPathname = pathname.replace(/\/$/, "") + "/preview";
4101
+ trackUsage("willNavigate", { from: pathname, to: destinationPathname });
4102
+ };
4103
+ return {
4104
+ title: formatMessage({ id: "content-manager.preview.panel.title", defaultMessage: "Preview" }),
4105
+ content: /* @__PURE__ */ jsxRuntime.jsx(
4106
+ ConditionalTooltip,
4107
+ {
4108
+ label: formatMessage({
4109
+ id: "content-manager.preview.panel.button-disabled-tooltip",
4110
+ defaultMessage: "Please save to open the preview"
4111
+ }),
4112
+ isShown: isModified,
4113
+ children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { cursor: "not-allowed", width: "100%", children: /* @__PURE__ */ jsxRuntime.jsx(
4114
+ designSystem.Button,
4115
+ {
4116
+ variant: "tertiary",
4117
+ tag: reactRouterDom.Link,
4118
+ to: { pathname: "preview", search: qs.stringify(query, { encode: false }) },
4119
+ onClick: trackNavigation,
4120
+ width: "100%",
4121
+ disabled: isModified,
4122
+ pointerEvents: isModified ? "none" : void 0,
4123
+ tabIndex: isModified ? -1 : void 0,
4124
+ children: formatMessage({
4125
+ id: "content-manager.preview.panel.button",
4126
+ defaultMessage: "Open preview"
4127
+ })
4128
+ }
4129
+ ) })
4130
+ }
4131
+ )
4132
+ };
4133
+ };
4134
+ const FEATURE_ID = "preview";
4135
+ const previewAdmin = {
4136
+ bootstrap(app) {
4137
+ if (!window.strapi.future.isEnabled(FEATURE_ID)) {
4138
+ return;
4139
+ }
4140
+ const contentManagerPluginApis = app.getPlugin("content-manager").apis;
4141
+ contentManagerPluginApis.addEditViewSidePanel([PreviewSidePanel]);
4142
+ }
4143
+ };
4001
4144
  const index = {
4002
4145
  register(app) {
4003
4146
  const cm = new ContentManagerPlugin();
@@ -4017,7 +4160,7 @@ const index = {
4017
4160
  app.router.addRoute({
4018
4161
  path: "content-manager/*",
4019
4162
  lazy: async () => {
4020
- const { Layout } = await Promise.resolve().then(() => require("./layout-CWgZzMYf.js"));
4163
+ const { Layout } = await Promise.resolve().then(() => require("./layout-szfTCeYm.js"));
4021
4164
  return {
4022
4165
  Component: Layout
4023
4166
  };
@@ -4030,11 +4173,14 @@ const index = {
4030
4173
  if (typeof historyAdmin.bootstrap === "function") {
4031
4174
  historyAdmin.bootstrap(app);
4032
4175
  }
4176
+ if (typeof previewAdmin.bootstrap === "function") {
4177
+ previewAdmin.bootstrap(app);
4178
+ }
4033
4179
  },
4034
4180
  async registerTrads({ locales }) {
4035
4181
  const importedTrads = await Promise.all(
4036
4182
  locales.map((locale) => {
4037
- 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-BlhnxQfj.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 }) => {
4183
+ 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-BK8Xyl5I.js")), "./translations/es.json": () => Promise.resolve().then(() => require("./es-9K52xZIr.js")), "./translations/eu.json": () => Promise.resolve().then(() => require("./eu-VDH-3ovk.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-B2Kyv8Z9.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-7sfIbjxE.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`, 3).then(({ default: data }) => {
4038
4184
  return {
4039
4185
  data: prefixPluginTranslations(data, PLUGIN_ID),
4040
4186
  locale
@@ -4092,5 +4238,6 @@ exports.useGetAllContentTypeSettingsQuery = useGetAllContentTypeSettingsQuery;
4092
4238
  exports.useGetAllDocumentsQuery = useGetAllDocumentsQuery;
4093
4239
  exports.useGetContentTypeConfigurationQuery = useGetContentTypeConfigurationQuery;
4094
4240
  exports.useGetInitialDataQuery = useGetInitialDataQuery;
4241
+ exports.useGetPreviewUrlQuery = useGetPreviewUrlQuery;
4095
4242
  exports.useUpdateContentTypeConfigurationMutation = useUpdateContentTypeConfigurationMutation;
4096
- //# sourceMappingURL=index-DTKVhcla.js.map
4243
+ //# sourceMappingURL=index-CptTdHNy.js.map