@strapi/content-manager 0.0.0-experimental.c592deb623aed3f74ef7fdacfad9757ed59d34f7 → 0.0.0-experimental.cb74730ce5154c26404d4dccca14976a22319002

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 (183) 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-7-qB29e7.mjs → ComponentConfigurationPage-BgCLcjXO.mjs} +4 -4
  4. package/dist/_chunks/{ComponentConfigurationPage-7-qB29e7.mjs.map → ComponentConfigurationPage-BgCLcjXO.mjs.map} +1 -1
  5. package/dist/_chunks/{ComponentConfigurationPage-DP7AC0UU.js → ComponentConfigurationPage-DywpTZeV.js} +5 -6
  6. package/dist/_chunks/{ComponentConfigurationPage-DP7AC0UU.js.map → ComponentConfigurationPage-DywpTZeV.js.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-CI4XoymK.mjs → EditConfigurationPage-BNjOAHNS.mjs} +4 -4
  11. package/dist/_chunks/{EditConfigurationPage-CI4XoymK.mjs.map → EditConfigurationPage-BNjOAHNS.mjs.map} +1 -1
  12. package/dist/_chunks/{EditConfigurationPage-DITVliEI.js → EditConfigurationPage-CxRlP5if.js} +5 -6
  13. package/dist/_chunks/{EditConfigurationPage-DITVliEI.js.map → EditConfigurationPage-CxRlP5if.js.map} +1 -1
  14. package/dist/_chunks/{EditViewPage-CUS2EAhB.js → EditViewPage-BRewdTqE.js} +45 -10
  15. package/dist/_chunks/EditViewPage-BRewdTqE.js.map +1 -0
  16. package/dist/_chunks/{EditViewPage-Dzpno8xI.mjs → EditViewPage-CD_hqc1J.mjs} +45 -9
  17. package/dist/_chunks/EditViewPage-CD_hqc1J.mjs.map +1 -0
  18. package/dist/_chunks/{Field-B_jG_EV9.mjs → Field-BPkQ-3Ku.mjs} +102 -70
  19. package/dist/_chunks/Field-BPkQ-3Ku.mjs.map +1 -0
  20. package/dist/_chunks/{Field-CtUU1Fg8.js → Field-DwvmENVf.js} +103 -72
  21. package/dist/_chunks/Field-DwvmENVf.js.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-DTqO0ymI.js → Form-C_Gwv8P_.js} +6 -7
  25. package/dist/_chunks/Form-C_Gwv8P_.js.map +1 -0
  26. package/dist/_chunks/{Form-BXHao2mZ.mjs → Form-Czi0cf_2.mjs} +4 -4
  27. package/dist/_chunks/Form-Czi0cf_2.mjs.map +1 -0
  28. package/dist/_chunks/{History-C_uSGzO5.js → History-C1TKAig-.js} +42 -100
  29. package/dist/_chunks/History-C1TKAig-.js.map +1 -0
  30. package/dist/_chunks/{History-2Ah2CQ4T.mjs → History-CIQHyi4T.mjs} +43 -100
  31. package/dist/_chunks/History-CIQHyi4T.mjs.map +1 -0
  32. package/dist/_chunks/{ListConfigurationPage-nyuP7OSy.js → ListConfigurationPage-D-NGRLYu.js} +7 -7
  33. package/dist/_chunks/ListConfigurationPage-D-NGRLYu.js.map +1 -0
  34. package/dist/_chunks/{ListConfigurationPage-BjSJlaoC.mjs → ListConfigurationPage-DcZsfyEL.mjs} +7 -6
  35. package/dist/_chunks/ListConfigurationPage-DcZsfyEL.mjs.map +1 -0
  36. package/dist/_chunks/{ListViewPage-B75x3nz2.mjs → ListViewPage-C10McTK1.mjs} +62 -39
  37. package/dist/_chunks/ListViewPage-C10McTK1.mjs.map +1 -0
  38. package/dist/_chunks/{ListViewPage-DHgHD8Xg.js → ListViewPage-xv5IQoZp.js} +63 -41
  39. package/dist/_chunks/ListViewPage-xv5IQoZp.js.map +1 -0
  40. package/dist/_chunks/{NoContentTypePage-DUacQSyF.mjs → NoContentTypePage-CPc0Cd3S.mjs} +2 -2
  41. package/dist/_chunks/{NoContentTypePage-DUacQSyF.mjs.map → NoContentTypePage-CPc0Cd3S.mjs.map} +1 -1
  42. package/dist/_chunks/{NoContentTypePage-CDUKdZ7d.js → NoContentTypePage-Dzw5Yj5u.js} +2 -2
  43. package/dist/_chunks/{NoContentTypePage-CDUKdZ7d.js.map → NoContentTypePage-Dzw5Yj5u.js.map} +1 -1
  44. package/dist/_chunks/{NoPermissionsPage-zwIZydDI.js → NoPermissionsPage-DAe5CDCC.js} +2 -2
  45. package/dist/_chunks/{NoPermissionsPage-zwIZydDI.js.map → NoPermissionsPage-DAe5CDCC.js.map} +1 -1
  46. package/dist/_chunks/{NoPermissionsPage-SFllMekk.mjs → NoPermissionsPage-wfPBh2_0.mjs} +2 -2
  47. package/dist/_chunks/{NoPermissionsPage-SFllMekk.mjs.map → NoPermissionsPage-wfPBh2_0.mjs.map} +1 -1
  48. package/dist/_chunks/Preview-B7LyGT_b.js +290 -0
  49. package/dist/_chunks/Preview-B7LyGT_b.js.map +1 -0
  50. package/dist/_chunks/Preview-BVFFm7uB.mjs +272 -0
  51. package/dist/_chunks/Preview-BVFFm7uB.mjs.map +1 -0
  52. package/dist/_chunks/{Relations-NFLaRNPr.js → Relations-BmYR1AjY.js} +68 -39
  53. package/dist/_chunks/Relations-BmYR1AjY.js.map +1 -0
  54. package/dist/_chunks/{Relations-D2NRW8fC.mjs → Relations-JPhWxk-s.mjs} +68 -38
  55. package/dist/_chunks/Relations-JPhWxk-s.mjs.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-ovJRE1FM.js → index-C2Q_PLWj.js} +294 -167
  70. package/dist/_chunks/index-C2Q_PLWj.js.map +1 -0
  71. package/dist/_chunks/{index-C9HxCo5R.mjs → index-DLIkNVnQ.mjs} +297 -170
  72. package/dist/_chunks/index-DLIkNVnQ.mjs.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-UNWstw_s.js → layout-7AsWJzZJ.js} +5 -6
  78. package/dist/_chunks/{layout-UNWstw_s.js.map → layout-7AsWJzZJ.js.map} +1 -1
  79. package/dist/_chunks/{layout-DaUjDiWQ.mjs → layout-qE8qkNH_.mjs} +4 -4
  80. package/dist/_chunks/{layout-DaUjDiWQ.mjs.map → layout-qE8qkNH_.mjs.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-D8iFAeRu.mjs → relations-BjHH_1Am.mjs} +6 -7
  86. package/dist/_chunks/relations-BjHH_1Am.mjs.map +1 -0
  87. package/dist/_chunks/{relations-NN3coOG5.js → relations-EifVzf_2.js} +6 -7
  88. package/dist/_chunks/relations-EifVzf_2.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/pages/EditView/EditViewPage.d.ts +9 -1
  98. package/dist/admin/src/pages/EditView/components/DocumentStatus.d.ts +2 -2
  99. package/dist/admin/src/preview/components/PreviewContent.d.ts +2 -0
  100. package/dist/admin/src/preview/components/PreviewHeader.d.ts +2 -0
  101. package/dist/admin/src/preview/components/PreviewSidePanel.d.ts +3 -0
  102. package/dist/admin/src/preview/constants.d.ts +1 -0
  103. package/dist/admin/src/preview/index.d.ts +4 -0
  104. package/dist/admin/src/preview/pages/Preview.d.ts +11 -0
  105. package/dist/admin/src/preview/routes.d.ts +3 -0
  106. package/dist/admin/src/preview/services/preview.d.ts +3 -0
  107. package/dist/admin/src/router.d.ts +1 -1
  108. package/dist/admin/src/services/documents.d.ts +0 -3
  109. package/dist/server/index.js +426 -190
  110. package/dist/server/index.js.map +1 -1
  111. package/dist/server/index.mjs +426 -189
  112. package/dist/server/index.mjs.map +1 -1
  113. package/dist/server/src/bootstrap.d.ts.map +1 -1
  114. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  115. package/dist/server/src/controllers/index.d.ts.map +1 -1
  116. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  117. package/dist/server/src/controllers/utils/metadata.d.ts +15 -1
  118. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -1
  119. package/dist/server/src/history/services/history.d.ts.map +1 -1
  120. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  121. package/dist/server/src/history/services/utils.d.ts +2 -3
  122. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  123. package/dist/server/src/index.d.ts +4 -4
  124. package/dist/server/src/preview/constants.d.ts +2 -0
  125. package/dist/server/src/preview/constants.d.ts.map +1 -0
  126. package/dist/server/src/preview/controllers/index.d.ts +2 -0
  127. package/dist/server/src/preview/controllers/index.d.ts.map +1 -0
  128. package/dist/server/src/preview/controllers/preview.d.ts +13 -0
  129. package/dist/server/src/preview/controllers/preview.d.ts.map +1 -0
  130. package/dist/server/src/preview/controllers/validation/preview.d.ts +6 -0
  131. package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -0
  132. package/dist/server/src/preview/index.d.ts +4 -0
  133. package/dist/server/src/preview/index.d.ts.map +1 -0
  134. package/dist/server/src/preview/routes/index.d.ts +8 -0
  135. package/dist/server/src/preview/routes/index.d.ts.map +1 -0
  136. package/dist/server/src/preview/routes/preview.d.ts +4 -0
  137. package/dist/server/src/preview/routes/preview.d.ts.map +1 -0
  138. package/dist/server/src/preview/services/index.d.ts +16 -0
  139. package/dist/server/src/preview/services/index.d.ts.map +1 -0
  140. package/dist/server/src/preview/services/preview-config.d.ts +32 -0
  141. package/dist/server/src/preview/services/preview-config.d.ts.map +1 -0
  142. package/dist/server/src/preview/services/preview.d.ts +12 -0
  143. package/dist/server/src/preview/services/preview.d.ts.map +1 -0
  144. package/dist/server/src/preview/utils.d.ts +19 -0
  145. package/dist/server/src/preview/utils.d.ts.map +1 -0
  146. package/dist/server/src/register.d.ts.map +1 -1
  147. package/dist/server/src/routes/index.d.ts.map +1 -1
  148. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  149. package/dist/server/src/services/document-metadata.d.ts +8 -8
  150. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  151. package/dist/server/src/services/index.d.ts +4 -4
  152. package/dist/server/src/services/index.d.ts.map +1 -1
  153. package/dist/server/src/services/utils/configuration/index.d.ts +2 -2
  154. package/dist/server/src/services/utils/configuration/layouts.d.ts +2 -2
  155. package/dist/server/src/utils/index.d.ts +2 -0
  156. package/dist/server/src/utils/index.d.ts.map +1 -1
  157. package/dist/shared/contracts/index.d.ts +1 -0
  158. package/dist/shared/contracts/index.d.ts.map +1 -1
  159. package/dist/shared/contracts/preview.d.ts +27 -0
  160. package/dist/shared/contracts/preview.d.ts.map +1 -0
  161. package/dist/shared/index.js +4 -0
  162. package/dist/shared/index.js.map +1 -1
  163. package/dist/shared/index.mjs +4 -0
  164. package/dist/shared/index.mjs.map +1 -1
  165. package/package.json +12 -12
  166. package/dist/_chunks/EditViewPage-CUS2EAhB.js.map +0 -1
  167. package/dist/_chunks/EditViewPage-Dzpno8xI.mjs.map +0 -1
  168. package/dist/_chunks/Field-B_jG_EV9.mjs.map +0 -1
  169. package/dist/_chunks/Field-CtUU1Fg8.js.map +0 -1
  170. package/dist/_chunks/Form-BXHao2mZ.mjs.map +0 -1
  171. package/dist/_chunks/Form-DTqO0ymI.js.map +0 -1
  172. package/dist/_chunks/History-2Ah2CQ4T.mjs.map +0 -1
  173. package/dist/_chunks/History-C_uSGzO5.js.map +0 -1
  174. package/dist/_chunks/ListConfigurationPage-BjSJlaoC.mjs.map +0 -1
  175. package/dist/_chunks/ListConfigurationPage-nyuP7OSy.js.map +0 -1
  176. package/dist/_chunks/ListViewPage-B75x3nz2.mjs.map +0 -1
  177. package/dist/_chunks/ListViewPage-DHgHD8Xg.js.map +0 -1
  178. package/dist/_chunks/Relations-D2NRW8fC.mjs.map +0 -1
  179. package/dist/_chunks/Relations-NFLaRNPr.js.map +0 -1
  180. package/dist/_chunks/index-C9HxCo5R.mjs.map +0 -1
  181. package/dist/_chunks/index-ovJRE1FM.js.map +0 -1
  182. package/dist/_chunks/relations-D8iFAeRu.mjs.map +0 -1
  183. package/dist/_chunks/relations-NN3coOG5.js.map +0 -1
@@ -5,15 +5,15 @@ const strapiAdmin = require("@strapi/admin/strapi-admin");
5
5
  const designSystem = require("@strapi/design-system");
6
6
  const pipe$1 = require("lodash/fp/pipe");
7
7
  const reactIntl = require("react-intl");
8
- const index = require("./index-ovJRE1FM.js");
8
+ const index = require("./index-C2Q_PLWj.js");
9
9
  const fractionalIndexing = require("fractional-indexing");
10
- const Relations = require("./Relations-NFLaRNPr.js");
10
+ const Relations = require("./Relations-BmYR1AjY.js");
11
11
  const Icons = require("@strapi/icons");
12
12
  const styledComponents = require("styled-components");
13
- const ComponentIcon = require("./ComponentIcon-BXdiCGQp.js");
13
+ const ComponentIcon = require("./ComponentIcon-CRbtQEUV.js");
14
14
  const reactDndHtml5Backend = require("react-dnd-html5-backend");
15
- const useDragAndDrop = require("./useDragAndDrop-J0TUUbR6.js");
16
- const objects = require("./objects-gigeqt7s.js");
15
+ const useDragAndDrop = require("./useDragAndDrop-BMtgCYzL.js");
16
+ const objects = require("./objects-BcXOv6_9.js");
17
17
  const slate = require("slate");
18
18
  const slateHistory = require("slate-history");
19
19
  const slateReact = require("slate-react");
@@ -37,8 +37,7 @@ require("highlight.js/styles/solarized-dark.css");
37
37
  require("codemirror5/addon/display/placeholder");
38
38
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
39
39
  function _interopNamespace(e) {
40
- if (e && e.__esModule)
41
- return e;
40
+ if (e && e.__esModule) return e;
42
41
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
43
42
  if (e) {
44
43
  for (const k in e) {
@@ -542,7 +541,7 @@ const CodeEditor = (props) => {
542
541
  const codeBlocks = {
543
542
  code: {
544
543
  renderElement: (props) => /* @__PURE__ */ jsxRuntime.jsx(CodeEditor, { ...props }),
545
- icon: Icons.Code,
544
+ icon: Icons.CodeBlock,
546
545
  label: {
547
546
  id: "components.Blocks.blocks.code",
548
547
  defaultMessage: "Code block"
@@ -731,8 +730,7 @@ const ImageDialog = () => {
731
730
  const [isOpen, setIsOpen] = React__namespace.useState(true);
732
731
  const { editor } = useBlocksEditorContext("ImageDialog");
733
732
  const components = strapiAdmin.useStrapiApp("ImageDialog", (state) => state.components);
734
- if (!components || !isOpen)
735
- return null;
733
+ if (!components || !isOpen) return null;
736
734
  const MediaLibraryDialog = components["media-library"];
737
735
  const insertImages = (images) => {
738
736
  slate.Transforms.unwrapNodes(editor, {
@@ -741,14 +739,12 @@ const ImageDialog = () => {
741
739
  });
742
740
  const nodeEntryBeingReplaced = slate.Editor.above(editor, {
743
741
  match(node) {
744
- if (slate.Editor.isEditor(node))
745
- return false;
742
+ if (slate.Editor.isEditor(node)) return false;
746
743
  const isInlineNode = ["text", "link"].includes(node.type);
747
744
  return !isInlineNode;
748
745
  }
749
746
  });
750
- if (!nodeEntryBeingReplaced)
751
- return;
747
+ if (!nodeEntryBeingReplaced) return;
752
748
  const [, pathToInsert] = nodeEntryBeingReplaced;
753
749
  slate.Transforms.removeNodes(editor);
754
750
  const nodesToInsert = images.map((image) => {
@@ -926,8 +922,7 @@ const LinkContent = React__namespace.forwardRef(
926
922
  slateReact.ReactEditor.focus(editor);
927
923
  };
928
924
  React__namespace.useEffect(() => {
929
- if (popoverOpen)
930
- linkInputRef.current?.focus();
925
+ if (popoverOpen) linkInputRef.current?.focus();
931
926
  }, [popoverOpen]);
932
927
  const inputNotDirty = !linkText || !linkUrl || link.url && link.url === linkUrl && elementText && elementText === linkText;
933
928
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Popover.Root, { open: popoverOpen, children: [
@@ -1082,8 +1077,7 @@ const isText$1 = (node) => {
1082
1077
  return slate.Node.isNode(node) && !slate.Editor.isEditor(node) && node.type === "text";
1083
1078
  };
1084
1079
  const handleBackspaceKeyOnList = (editor, event) => {
1085
- if (!editor.selection)
1086
- return;
1080
+ if (!editor.selection) return;
1087
1081
  const [currentListItem, currentListItemPath] = slate.Editor.parent(editor, editor.selection.anchor);
1088
1082
  const [currentList, currentListPath] = slate.Editor.parent(editor, currentListItemPath);
1089
1083
  const isListEmpty = currentList.children.length === 1 && isText$1(currentListItem.children[0]) && currentListItem.children[0].text === "";
@@ -1192,8 +1186,7 @@ const handleEnterKeyOnList = (editor) => {
1192
1186
  };
1193
1187
  const handleConvertToList = (editor, format) => {
1194
1188
  const convertedPath = baseHandleConvert(editor, { type: "list-item" });
1195
- if (!convertedPath)
1196
- return;
1189
+ if (!convertedPath) return;
1197
1190
  slate.Transforms.wrapNodes(editor, { type: "list", format, children: [] }, { at: convertedPath });
1198
1191
  };
1199
1192
  const handleTabOnList = (editor) => {
@@ -1205,8 +1198,7 @@ const handleTabOnList = (editor) => {
1205
1198
  }
1206
1199
  const [currentListItem, currentListItemPath] = currentListItemEntry;
1207
1200
  const [currentList] = slate.Editor.parent(editor, currentListItemPath);
1208
- if (currentListItem === currentList.children[0])
1209
- return;
1201
+ if (currentListItem === currentList.children[0]) return;
1210
1202
  const currentListItemIndex = currentList.children.findIndex((item) => item === currentListItem);
1211
1203
  const previousNode = currentList.children[currentListItemIndex - 1];
1212
1204
  if (previousNode.type === "list") {
@@ -1573,8 +1565,7 @@ const isListNode = (node) => {
1573
1565
  const ListButton = ({ block, format }) => {
1574
1566
  const { editor, disabled, blocks } = useBlocksEditorContext("ListButton");
1575
1567
  const isListActive = () => {
1576
- if (!editor.selection)
1577
- return false;
1568
+ if (!editor.selection) return false;
1578
1569
  const currentListEntry = slate.Editor.above(editor, {
1579
1570
  match: (node) => !slate.Editor.isEditor(node) && node.type === "list",
1580
1571
  at: editor.selection.anchor
@@ -1648,8 +1639,7 @@ const LinkButton = ({ disabled }) => {
1648
1639
  const { editor } = useBlocksEditorContext("LinkButton");
1649
1640
  const isLinkActive = () => {
1650
1641
  const { selection } = editor;
1651
- if (!selection)
1652
- return false;
1642
+ if (!selection) return false;
1653
1643
  const [match] = Array.from(
1654
1644
  slate.Editor.nodes(editor, {
1655
1645
  at: slate.Editor.unhangRange(editor, selection),
@@ -1855,8 +1845,7 @@ const DragAndDropElement = ({
1855
1845
  displayedValue: children
1856
1846
  },
1857
1847
  onDropItem(currentIndex, newIndex) {
1858
- if (newIndex)
1859
- handleMoveBlock(newIndex, currentIndex);
1848
+ if (newIndex) handleMoveBlock(newIndex, currentIndex);
1860
1849
  }
1861
1850
  });
1862
1851
  const composedBoxRefs = designSystem.useComposedRefs(blockRef, dropRef);
@@ -2000,8 +1989,7 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
2000
1989
  [modifiers2]
2001
1990
  );
2002
1991
  const handleMoveBlocks = (editor2, event) => {
2003
- if (!editor2.selection)
2004
- return;
1992
+ if (!editor2.selection) return;
2005
1993
  const start = slate.Range.start(editor2.selection);
2006
1994
  const currentIndex = [start.path[0]];
2007
1995
  let newIndexPosition = 0;
@@ -2138,8 +2126,7 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
2138
2126
  }
2139
2127
  };
2140
2128
  const handleScrollSelectionIntoView = () => {
2141
- if (!editor.selection)
2142
- return;
2129
+ if (!editor.selection) return;
2143
2130
  const domRange = slateReact.ReactEditor.toDOMRange(editor, editor.selection);
2144
2131
  const domRect = domRange.getBoundingClientRect();
2145
2132
  const blocksInput = blocksRef.current;
@@ -2333,8 +2320,7 @@ const InlineCode = styledComponents.styled.code`
2333
2320
  `;
2334
2321
  const baseCheckIsActive = (editor, name2) => {
2335
2322
  const marks = slate.Editor.marks(editor);
2336
- if (!marks)
2337
- return false;
2323
+ if (!marks) return false;
2338
2324
  return Boolean(marks[name2]);
2339
2325
  };
2340
2326
  const baseHandleToggle = (editor, name2) => {
@@ -2658,7 +2644,7 @@ const Initializer = ({ disabled, name: name2, onClick }) => {
2658
2644
  designSystem.Box,
2659
2645
  {
2660
2646
  tag: "button",
2661
- background: "neutral100",
2647
+ background: disabled ? "neutral150" : "neutral100",
2662
2648
  borderColor: field.error ? "danger600" : "neutral200",
2663
2649
  hasRadius: true,
2664
2650
  disabled,
@@ -2666,32 +2652,32 @@ const Initializer = ({ disabled, name: name2, onClick }) => {
2666
2652
  paddingTop: 9,
2667
2653
  paddingBottom: 9,
2668
2654
  type: "button",
2655
+ style: { cursor: disabled ? "not-allowed" : "pointer" },
2669
2656
  children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 2, children: [
2670
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(CircleIcon, {}) }),
2671
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "primary600", variant: "pi", fontWeight: "bold", children: formatMessage({
2672
- id: index.getTranslation("components.empty-repeatable"),
2673
- defaultMessage: "No entry yet. Click on the button below to add one."
2674
- }) }) })
2657
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", color: disabled ? "neutral500" : "primary600", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.PlusCircle, { width: "3.2rem", height: "3.2rem" }) }),
2658
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(
2659
+ designSystem.Typography,
2660
+ {
2661
+ textColor: disabled ? "neutral600" : "primary600",
2662
+ variant: "pi",
2663
+ fontWeight: "bold",
2664
+ children: formatMessage({
2665
+ id: index.getTranslation("components.empty-repeatable"),
2666
+ defaultMessage: "No entry yet. Click to add one."
2667
+ })
2668
+ }
2669
+ ) })
2675
2670
  ] })
2676
2671
  }
2677
2672
  ) });
2678
2673
  };
2679
- const CircleIcon = styledComponents.styled(Icons.PlusCircle)`
2680
- width: 2.4rem;
2681
- height: 2.4rem;
2682
- > circle {
2683
- fill: ${({ theme }) => theme.colors.primary200};
2684
- }
2685
- > path {
2686
- fill: ${({ theme }) => theme.colors.primary600};
2687
- }
2688
- `;
2689
2674
  const NonRepeatableComponent = ({
2690
2675
  attribute,
2691
2676
  name: name2,
2692
2677
  children,
2693
2678
  layout
2694
2679
  }) => {
2680
+ const { formatMessage } = reactIntl.useIntl();
2695
2681
  const { value } = strapiAdmin.useField(name2);
2696
2682
  const level = Relations.useComponent("NonRepeatableComponent", (state) => state.level);
2697
2683
  const isNested = level > 0;
@@ -2708,6 +2694,10 @@ const NonRepeatableComponent = ({
2708
2694
  children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 6, children: layout.map((row, index2) => {
2709
2695
  return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
2710
2696
  const completeFieldName = `${name2}.${field.name}`;
2697
+ const translatedLabel = formatMessage({
2698
+ id: `content-manager.components.${attribute.component}.${field.name}`,
2699
+ defaultMessage: field.label
2700
+ });
2711
2701
  return /* @__PURE__ */ jsxRuntime.jsx(
2712
2702
  designSystem.Grid.Item,
2713
2703
  {
@@ -2716,7 +2706,7 @@ const NonRepeatableComponent = ({
2716
2706
  xs: 12,
2717
2707
  direction: "column",
2718
2708
  alignItems: "stretch",
2719
- children: children({ ...field, name: completeFieldName })
2709
+ children: children({ ...field, label: translatedLabel, name: completeFieldName })
2720
2710
  },
2721
2711
  completeFieldName
2722
2712
  );
@@ -2738,13 +2728,34 @@ const RepeatableComponent = ({
2738
2728
  const { search: searchString } = reactRouterDom.useLocation();
2739
2729
  const search = React__namespace.useMemo(() => new URLSearchParams(searchString), [searchString]);
2740
2730
  const { components } = index.useDoc();
2741
- const { value = [], error } = strapiAdmin.useField(name2);
2731
+ const {
2732
+ value = [],
2733
+ error,
2734
+ rawError
2735
+ } = strapiAdmin.useField(name2);
2742
2736
  const addFieldRow = strapiAdmin.useForm("RepeatableComponent", (state) => state.addFieldRow);
2743
2737
  const moveFieldRow = strapiAdmin.useForm("RepeatableComponent", (state) => state.moveFieldRow);
2744
2738
  const removeFieldRow = strapiAdmin.useForm("RepeatableComponent", (state) => state.removeFieldRow);
2745
2739
  const { max = Infinity } = attribute;
2746
2740
  const [collapseToOpen, setCollapseToOpen] = React__namespace.useState("");
2747
2741
  const [liveText, setLiveText] = React__namespace.useState("");
2742
+ React__namespace.useEffect(() => {
2743
+ const hasNestedErrors = rawError && Array.isArray(rawError) && rawError.length > 0;
2744
+ const hasNestedValue = value && Array.isArray(value) && value.length > 0;
2745
+ if (hasNestedErrors && hasNestedValue) {
2746
+ const errorOpenItems = rawError.map((_, idx) => {
2747
+ return value[idx] ? value[idx].__temp_key__ : null;
2748
+ }).filter((value2) => !!value2);
2749
+ if (errorOpenItems && errorOpenItems.length > 0) {
2750
+ setCollapseToOpen((collapseToOpen2) => {
2751
+ if (!errorOpenItems.includes(collapseToOpen2)) {
2752
+ return errorOpenItems[0];
2753
+ }
2754
+ return collapseToOpen2;
2755
+ });
2756
+ }
2757
+ }
2758
+ }, [rawError, value]);
2748
2759
  const componentTmpKeyWithFocussedField = React__namespace.useMemo(() => {
2749
2760
  if (search.has("field")) {
2750
2761
  const fieldParam = search.get("field");
@@ -2897,6 +2908,10 @@ const RepeatableComponent = ({
2897
2908
  children: layout.map((row, index22) => {
2898
2909
  return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
2899
2910
  const completeFieldName = `${nameWithIndex}.${field.name}`;
2911
+ const translatedLabel = formatMessage({
2912
+ id: `content-manager.components.${attribute.component}.${field.name}`,
2913
+ defaultMessage: field.label
2914
+ });
2900
2915
  return /* @__PURE__ */ jsxRuntime.jsx(
2901
2916
  designSystem.Grid.Item,
2902
2917
  {
@@ -2905,7 +2920,11 @@ const RepeatableComponent = ({
2905
2920
  xs: 12,
2906
2921
  direction: "column",
2907
2922
  alignItems: "stretch",
2908
- children: children({ ...field, name: completeFieldName })
2923
+ children: children({
2924
+ ...field,
2925
+ label: translatedLabel,
2926
+ name: completeFieldName
2927
+ })
2909
2928
  },
2910
2929
  completeFieldName
2911
2930
  );
@@ -3749,8 +3768,7 @@ const Wrapper = styledComponents.styled.div`
3749
3768
  `;
3750
3769
  var listRE = /^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/, emptyListRE = /^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/, unorderedListRE = /[*+-]\s/;
3751
3770
  function newlineAndIndentContinueMarkdownList(cm) {
3752
- if (cm.getOption("disableInput"))
3753
- return CodeMirror__default.default.Pass;
3771
+ if (cm.getOption("disableInput")) return CodeMirror__default.default.Pass;
3754
3772
  var ranges = cm.listSelections(), replacements = [];
3755
3773
  for (var i = 0; i < ranges.length; i++) {
3756
3774
  var pos = ranges[i].head;
@@ -3784,8 +3802,7 @@ function newlineAndIndentContinueMarkdownList(cm) {
3784
3802
  var numbered = !(unorderedListRE.test(match[2]) || match[2].indexOf(">") >= 0);
3785
3803
  var bullet = numbered ? parseInt(match[3], 10) + 1 + match[4] : match[2].replace("x", " ");
3786
3804
  replacements[i] = "\n" + indent + bullet + after;
3787
- if (numbered)
3788
- incrementRemainingMarkdownListNumbers(cm, pos);
3805
+ if (numbered) incrementRemainingMarkdownListNumbers(cm, pos);
3789
3806
  }
3790
3807
  }
3791
3808
  cm.replaceSelections(replacements);
@@ -3803,10 +3820,8 @@ function incrementRemainingMarkdownListNumbers(cm, pos) {
3803
3820
  var newNumber = parseInt(startItem[3], 10) + lookAhead - skipCount;
3804
3821
  var nextNumber = parseInt(nextItem[3], 10), itemNumber = nextNumber;
3805
3822
  if (startIndent === nextIndent && !isNaN(nextNumber)) {
3806
- if (newNumber === nextNumber)
3807
- itemNumber = nextNumber + 1;
3808
- if (newNumber > nextNumber)
3809
- itemNumber = newNumber + 1;
3823
+ if (newNumber === nextNumber) itemNumber = nextNumber + 1;
3824
+ if (newNumber > nextNumber) itemNumber = newNumber + 1;
3810
3825
  cm.replaceRange(
3811
3826
  nextLine.replace(listRE, nextIndent + itemNumber + nextItem[4] + nextItem[5]),
3812
3827
  {
@@ -3819,10 +3834,8 @@ function incrementRemainingMarkdownListNumbers(cm, pos) {
3819
3834
  }
3820
3835
  );
3821
3836
  } else {
3822
- if (startIndent.length > nextIndent.length)
3823
- return;
3824
- if (startIndent.length < nextIndent.length && lookAhead === 1)
3825
- return;
3837
+ if (startIndent.length > nextIndent.length) return;
3838
+ if (startIndent.length < nextIndent.length && lookAhead === 1) return;
3826
3839
  skipCount += 1;
3827
3840
  }
3828
3841
  }
@@ -4959,15 +4972,19 @@ const Wysiwyg = React__namespace.forwardRef(
4959
4972
  );
4960
4973
  const MemoizedWysiwyg = React__namespace.memo(Wysiwyg);
4961
4974
  const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
4962
- const { id } = index.useDoc();
4975
+ const { id, document: document2, collectionType } = index.useDoc();
4963
4976
  const isFormDisabled = strapiAdmin.useForm("InputRenderer", (state) => state.disabled);
4964
4977
  const isInDynamicZone = useDynamicZone("isInDynamicZone", (state) => state.isInDynamicZone);
4965
4978
  const canCreateFields = index.useDocumentRBAC("InputRenderer", (rbac) => rbac.canCreateFields);
4966
4979
  const canReadFields = index.useDocumentRBAC("InputRenderer", (rbac) => rbac.canReadFields);
4967
4980
  const canUpdateFields = index.useDocumentRBAC("InputRenderer", (rbac) => rbac.canUpdateFields);
4968
4981
  const canUserAction = index.useDocumentRBAC("InputRenderer", (rbac) => rbac.canUserAction);
4969
- const editableFields = id ? canUpdateFields : canCreateFields;
4970
- const readableFields = id ? canReadFields : canCreateFields;
4982
+ let idToCheck = id;
4983
+ if (collectionType === index.SINGLE_TYPES) {
4984
+ idToCheck = document2?.documentId;
4985
+ }
4986
+ const editableFields = idToCheck ? canUpdateFields : canCreateFields;
4987
+ const readableFields = idToCheck ? canReadFields : canCreateFields;
4971
4988
  const canUserReadField = canUserAction(props.name, readableFields, props.type);
4972
4989
  const canUserEditField = canUserAction(props.name, editableFields, props.type);
4973
4990
  const fields = strapiAdmin.useStrapiApp("InputRenderer", (app) => app.fields);
@@ -5150,6 +5167,14 @@ const DynamicComponent = ({
5150
5167
  React__namespace.useEffect(() => {
5151
5168
  dragPreviewRef(reactDndHtml5Backend.getEmptyImage(), { captureDraggingState: false });
5152
5169
  }, [dragPreviewRef, index$1]);
5170
+ const accordionValue = React__namespace.useId();
5171
+ const { value = [], rawError } = strapiAdmin.useField(`${name2}.${index$1}`);
5172
+ const [collapseToOpen, setCollapseToOpen] = React__namespace.useState("");
5173
+ React__namespace.useEffect(() => {
5174
+ if (rawError && value) {
5175
+ setCollapseToOpen(accordionValue);
5176
+ }
5177
+ }, [rawError, value, accordionValue]);
5153
5178
  const composedBoxRefs = designSystem.useComposedRefs(boxRef, dropRef);
5154
5179
  const accordionActions = disabled ? null : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5155
5180
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -5215,10 +5240,9 @@ const DynamicComponent = ({
5215
5240
  ] })
5216
5241
  ] });
5217
5242
  const accordionTitle = title ? `${displayName} ${title}` : displayName;
5218
- const accordionValue = React__namespace.useId();
5219
5243
  return /* @__PURE__ */ jsxRuntime.jsxs(ComponentContainer, { tag: "li", width: "100%", children: [
5220
5244
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(Rectangle, { background: "neutral200" }) }),
5221
- /* @__PURE__ */ jsxRuntime.jsx(StyledBox, { ref: composedBoxRefs, hasRadius: true, children: isDragging ? /* @__PURE__ */ jsxRuntime.jsx(Preview, {}) : /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Root, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Accordion.Item, { value: accordionValue, children: [
5245
+ /* @__PURE__ */ jsxRuntime.jsx(StyledBox, { ref: composedBoxRefs, hasRadius: true, children: isDragging ? /* @__PURE__ */ jsxRuntime.jsx(Preview, {}) : /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Root, { value: collapseToOpen, onValueChange: setCollapseToOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Accordion.Item, { value: accordionValue, children: [
5222
5246
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Accordion.Header, { children: [
5223
5247
  /* @__PURE__ */ jsxRuntime.jsx(
5224
5248
  designSystem.Accordion.Trigger,
@@ -5239,6 +5263,13 @@ const DynamicComponent = ({
5239
5263
  alignItems: "stretch",
5240
5264
  children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
5241
5265
  const fieldName = `${name2}.${index$1}.${field.name}`;
5266
+ const fieldWithTranslatedLabel = {
5267
+ ...field,
5268
+ label: formatMessage({
5269
+ id: `content-manager.components.${componentUid}.${field.name}`,
5270
+ defaultMessage: field.label
5271
+ })
5272
+ };
5242
5273
  return /* @__PURE__ */ jsxRuntime.jsx(
5243
5274
  designSystem.Grid.Item,
5244
5275
  {
@@ -5247,7 +5278,7 @@ const DynamicComponent = ({
5247
5278
  xs: 12,
5248
5279
  direction: "column",
5249
5280
  alignItems: "stretch",
5250
- children: /* @__PURE__ */ jsxRuntime.jsx(MemoizedInputRenderer, { ...field, name: fieldName })
5281
+ children: /* @__PURE__ */ jsxRuntime.jsx(MemoizedInputRenderer, { ...fieldWithTranslatedLabel, name: fieldName })
5251
5282
  },
5252
5283
  fieldName
5253
5284
  );
@@ -5560,4 +5591,4 @@ exports.transformDocument = transformDocument;
5560
5591
  exports.useDynamicZone = useDynamicZone;
5561
5592
  exports.useFieldHint = useFieldHint;
5562
5593
  exports.useLazyComponents = useLazyComponents;
5563
- //# sourceMappingURL=Field-CtUU1Fg8.js.map
5594
+ //# sourceMappingURL=Field-DwvmENVf.js.map