@strapi/content-manager 0.0.0-next.7f1333f1967e625c57ab16648c057aea08c9dddb → 0.0.0-next.820adfc37c687bbcc4a213ae6929c541358b71e8

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 (163) 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-CIjXcRAB.mjs → ComponentConfigurationPage-CzVt9QCC.mjs} +3 -3
  4. package/dist/_chunks/{ComponentConfigurationPage-CIjXcRAB.mjs.map → ComponentConfigurationPage-CzVt9QCC.mjs.map} +1 -1
  5. package/dist/_chunks/{ComponentConfigurationPage-gsCd80MU.js → ComponentConfigurationPage-DYq8aqos.js} +4 -5
  6. package/dist/_chunks/{ComponentConfigurationPage-gsCd80MU.js.map → ComponentConfigurationPage-DYq8aqos.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-DHDQKBzw.js → EditConfigurationPage-C9IATpr0.js} +4 -5
  11. package/dist/_chunks/{EditConfigurationPage-DHDQKBzw.js.map → EditConfigurationPage-C9IATpr0.js.map} +1 -1
  12. package/dist/_chunks/{EditConfigurationPage-BglmD_BF.mjs → EditConfigurationPage-CLDwrUv5.mjs} +3 -3
  13. package/dist/_chunks/{EditConfigurationPage-BglmD_BF.mjs.map → EditConfigurationPage-CLDwrUv5.mjs.map} +1 -1
  14. package/dist/_chunks/{EditViewPage-C4iTxUPU.js → EditViewPage-Ch-uBvbv.js} +38 -9
  15. package/dist/_chunks/EditViewPage-Ch-uBvbv.js.map +1 -0
  16. package/dist/_chunks/{EditViewPage-CiwVPMaK.mjs → EditViewPage-DtKM7Jgw.mjs} +38 -8
  17. package/dist/_chunks/EditViewPage-DtKM7Jgw.mjs.map +1 -0
  18. package/dist/_chunks/{Field-DhXEK8y1.js → Field-B9ADaInZ.js} +66 -67
  19. package/dist/_chunks/Field-B9ADaInZ.js.map +1 -0
  20. package/dist/_chunks/{Field-DIjL1b5d.mjs → Field-Bn1jgMeF.mjs} +65 -65
  21. package/dist/_chunks/Field-Bn1jgMeF.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-CmNesrvR.mjs → Form-BB5i9Pxl.mjs} +3 -3
  25. package/dist/_chunks/{Form-CmNesrvR.mjs.map → Form-BB5i9Pxl.mjs.map} +1 -1
  26. package/dist/_chunks/{Form-CwmJ4sWe.js → Form-C3kjKrPw.js} +5 -6
  27. package/dist/_chunks/{Form-CwmJ4sWe.js.map → Form-C3kjKrPw.js.map} +1 -1
  28. package/dist/_chunks/{History-BLCCNgCt.js → History-AwrK0-SA.js} +22 -93
  29. package/dist/_chunks/History-AwrK0-SA.js.map +1 -0
  30. package/dist/_chunks/{History-D-99Wh30.mjs → History-Cw2Q7OQL.mjs} +22 -92
  31. package/dist/_chunks/History-Cw2Q7OQL.mjs.map +1 -0
  32. package/dist/_chunks/{ListConfigurationPage-JPWZz7Kg.mjs → ListConfigurationPage-B47JIu1e.mjs} +6 -5
  33. package/dist/_chunks/ListConfigurationPage-B47JIu1e.mjs.map +1 -0
  34. package/dist/_chunks/{ListConfigurationPage-DxWpeZrO.js → ListConfigurationPage-CNTJ0DBm.js} +6 -6
  35. package/dist/_chunks/ListConfigurationPage-CNTJ0DBm.js.map +1 -0
  36. package/dist/_chunks/{ListViewPage-CIQekSFz.js → ListViewPage-Be_UEBar.js} +64 -53
  37. package/dist/_chunks/ListViewPage-Be_UEBar.js.map +1 -0
  38. package/dist/_chunks/{ListViewPage-DSK3f0ST.mjs → ListViewPage-DuvjX6ra.mjs} +63 -51
  39. package/dist/_chunks/ListViewPage-DuvjX6ra.mjs.map +1 -0
  40. package/dist/_chunks/{NoContentTypePage-C5cxKvC2.js → NoContentTypePage-B1J0KUCO.js} +2 -2
  41. package/dist/_chunks/{NoContentTypePage-C5cxKvC2.js.map → NoContentTypePage-B1J0KUCO.js.map} +1 -1
  42. package/dist/_chunks/{NoContentTypePage-D99LU1YP.mjs → NoContentTypePage-C6M-Q0Tv.mjs} +2 -2
  43. package/dist/_chunks/{NoContentTypePage-D99LU1YP.mjs.map → NoContentTypePage-C6M-Q0Tv.mjs.map} +1 -1
  44. package/dist/_chunks/{NoPermissionsPage-DBrBw-0y.mjs → NoPermissionsPage-CAi3zCAD.mjs} +2 -2
  45. package/dist/_chunks/{NoPermissionsPage-DBrBw-0y.mjs.map → NoPermissionsPage-CAi3zCAD.mjs.map} +1 -1
  46. package/dist/_chunks/{NoPermissionsPage-Oy4tmUrW.js → NoPermissionsPage-CN34TlEE.js} +2 -2
  47. package/dist/_chunks/{NoPermissionsPage-Oy4tmUrW.js.map → NoPermissionsPage-CN34TlEE.js.map} +1 -1
  48. package/dist/_chunks/Preview-BrBRcL10.mjs +293 -0
  49. package/dist/_chunks/Preview-BrBRcL10.mjs.map +1 -0
  50. package/dist/_chunks/Preview-DOqm5jcJ.js +311 -0
  51. package/dist/_chunks/Preview-DOqm5jcJ.js.map +1 -0
  52. package/dist/_chunks/{Relations-BBmhcWFV.mjs → Relations-_K-HYOiM.mjs} +9 -8
  53. package/dist/_chunks/Relations-_K-HYOiM.mjs.map +1 -0
  54. package/dist/_chunks/{Relations-eG-9p_qS.js → Relations-xtKZHtTN.js} +10 -10
  55. package/dist/_chunks/Relations-xtKZHtTN.js.map +1 -0
  56. package/dist/_chunks/{en-Bm0D0IWz.js → en-BK8Xyl5I.js} +16 -4
  57. package/dist/_chunks/{en-Bm0D0IWz.js.map → en-BK8Xyl5I.js.map} +1 -1
  58. package/dist/_chunks/{en-DKV44jRb.mjs → en-Dtk_ot79.mjs} +16 -4
  59. package/dist/_chunks/{en-DKV44jRb.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-BIWDoFLK.js → index-BlX-OdHL.js} +325 -178
  70. package/dist/_chunks/index-BlX-OdHL.js.map +1 -0
  71. package/dist/_chunks/{index-BrUzbQ30.mjs → index-tETMKK2G.mjs} +328 -180
  72. package/dist/_chunks/index-tETMKK2G.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-_5-cXs34.mjs → layout-BaQBaz56.mjs} +4 -4
  78. package/dist/_chunks/{layout-_5-cXs34.mjs.map → layout-BaQBaz56.mjs.map} +1 -1
  79. package/dist/_chunks/{layout-lMc9i1-Z.js → layout-D8Sz3KxF.js} +5 -6
  80. package/dist/_chunks/{layout-lMc9i1-Z.js.map → layout-D8Sz3KxF.js.map} +1 -1
  81. package/dist/_chunks/objects-BcXOv6_9.js.map +1 -1
  82. package/dist/_chunks/objects-D6yBsdmx.mjs.map +1 -1
  83. package/dist/_chunks/{relations-BRHithi8.js → relations-CAbbX8Sa.js} +6 -3
  84. package/dist/_chunks/relations-CAbbX8Sa.js.map +1 -0
  85. package/dist/_chunks/{relations-B_VLk-DD.mjs → relations-CsfmCqOU.mjs} +6 -3
  86. package/dist/_chunks/relations-CsfmCqOU.mjs.map +1 -0
  87. package/dist/_chunks/useDebounce-CtcjDB3L.js.map +1 -1
  88. package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +1 -1
  89. package/dist/_chunks/{useDragAndDrop-J0TUUbR6.js → useDragAndDrop-BMtgCYzL.js} +5 -9
  90. package/dist/_chunks/{useDragAndDrop-J0TUUbR6.js.map → useDragAndDrop-BMtgCYzL.js.map} +1 -1
  91. package/dist/_chunks/{useDragAndDrop-DdHgKsqq.mjs → useDragAndDrop-DJ6jqvZN.mjs} +4 -7
  92. package/dist/_chunks/{useDragAndDrop-DdHgKsqq.mjs.map → useDragAndDrop-DJ6jqvZN.mjs.map} +1 -1
  93. package/dist/admin/index.js +1 -1
  94. package/dist/admin/index.mjs +4 -4
  95. package/dist/admin/src/content-manager.d.ts +3 -2
  96. package/dist/admin/src/pages/EditView/EditViewPage.d.ts +9 -1
  97. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +1 -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/index.d.ts +1 -1
  103. package/dist/admin/src/preview/pages/Preview.d.ts +11 -0
  104. package/dist/admin/src/preview/routes.d.ts +3 -0
  105. package/dist/admin/src/preview/services/preview.d.ts +3 -0
  106. package/dist/admin/src/router.d.ts +1 -1
  107. package/dist/admin/src/services/documents.d.ts +0 -3
  108. package/dist/server/index.js +362 -172
  109. package/dist/server/index.js.map +1 -1
  110. package/dist/server/index.mjs +362 -171
  111. package/dist/server/index.mjs.map +1 -1
  112. package/dist/server/src/controllers/index.d.ts.map +1 -1
  113. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  114. package/dist/server/src/history/services/utils.d.ts +2 -3
  115. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  116. package/dist/server/src/preview/controllers/index.d.ts +2 -0
  117. package/dist/server/src/preview/controllers/index.d.ts.map +1 -0
  118. package/dist/server/src/preview/controllers/preview.d.ts +13 -0
  119. package/dist/server/src/preview/controllers/preview.d.ts.map +1 -0
  120. package/dist/server/src/preview/controllers/validation/preview.d.ts +6 -0
  121. package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -0
  122. package/dist/server/src/preview/index.d.ts.map +1 -1
  123. package/dist/server/src/preview/routes/index.d.ts +8 -0
  124. package/dist/server/src/preview/routes/index.d.ts.map +1 -0
  125. package/dist/server/src/preview/routes/preview.d.ts +4 -0
  126. package/dist/server/src/preview/routes/preview.d.ts.map +1 -0
  127. package/dist/server/src/preview/services/index.d.ts +16 -0
  128. package/dist/server/src/preview/services/index.d.ts.map +1 -0
  129. package/dist/server/src/preview/services/preview-config.d.ts +32 -0
  130. package/dist/server/src/preview/services/preview-config.d.ts.map +1 -0
  131. package/dist/server/src/preview/services/preview.d.ts +12 -0
  132. package/dist/server/src/preview/services/preview.d.ts.map +1 -0
  133. package/dist/server/src/preview/utils.d.ts +19 -0
  134. package/dist/server/src/preview/utils.d.ts.map +1 -0
  135. package/dist/server/src/register.d.ts.map +1 -1
  136. package/dist/server/src/routes/index.d.ts.map +1 -1
  137. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  138. package/dist/server/src/services/index.d.ts.map +1 -1
  139. package/dist/shared/contracts/index.d.ts +1 -0
  140. package/dist/shared/contracts/index.d.ts.map +1 -1
  141. package/dist/shared/contracts/preview.d.ts +27 -0
  142. package/dist/shared/contracts/preview.d.ts.map +1 -0
  143. package/dist/shared/index.js +4 -0
  144. package/dist/shared/index.js.map +1 -1
  145. package/dist/shared/index.mjs +4 -0
  146. package/dist/shared/index.mjs.map +1 -1
  147. package/package.json +11 -11
  148. package/dist/_chunks/EditViewPage-C4iTxUPU.js.map +0 -1
  149. package/dist/_chunks/EditViewPage-CiwVPMaK.mjs.map +0 -1
  150. package/dist/_chunks/Field-DIjL1b5d.mjs.map +0 -1
  151. package/dist/_chunks/Field-DhXEK8y1.js.map +0 -1
  152. package/dist/_chunks/History-BLCCNgCt.js.map +0 -1
  153. package/dist/_chunks/History-D-99Wh30.mjs.map +0 -1
  154. package/dist/_chunks/ListConfigurationPage-DxWpeZrO.js.map +0 -1
  155. package/dist/_chunks/ListConfigurationPage-JPWZz7Kg.mjs.map +0 -1
  156. package/dist/_chunks/ListViewPage-CIQekSFz.js.map +0 -1
  157. package/dist/_chunks/ListViewPage-DSK3f0ST.mjs.map +0 -1
  158. package/dist/_chunks/Relations-BBmhcWFV.mjs.map +0 -1
  159. package/dist/_chunks/Relations-eG-9p_qS.js.map +0 -1
  160. package/dist/_chunks/index-BIWDoFLK.js.map +0 -1
  161. package/dist/_chunks/index-BrUzbQ30.mjs.map +0 -1
  162. package/dist/_chunks/relations-BRHithi8.js.map +0 -1
  163. package/dist/_chunks/relations-B_VLk-DD.mjs.map +0 -1
@@ -5,14 +5,14 @@ import { useStrapiApp, createContext, useField, useNotification, useForm, useAPI
5
5
  import { Box, SingleSelect, SingleSelectOption, Typography, Flex, BaseLink, Button, Popover, Field, Tooltip, IconButton, useComposedRefs, Portal, FocusTrap, Divider, VisuallyHidden, Grid as Grid$1, Accordion, TextButton, TextInput, IconButtonGroup, Menu, MenuItem } from "@strapi/design-system";
6
6
  import pipe$1 from "lodash/fp/pipe";
7
7
  import { useIntl } from "react-intl";
8
- import { m as DOCUMENT_META_FIELDS, g as getTranslation, c as useDoc, e as contentManagerApi, n as CLONE_PATH, d as buildValidParams, f as useDocumentRBAC, S as SINGLE_TYPES, o as useDocLayout } from "./index-BrUzbQ30.mjs";
8
+ import { m as DOCUMENT_META_FIELDS, g as getTranslation, c as useDoc, e as contentManagerApi, n as CLONE_PATH, d as buildValidParams, f as useDocumentRBAC, S as SINGLE_TYPES, o as useDocLayout } from "./index-tETMKK2G.mjs";
9
9
  import { generateNKeysBetween } from "fractional-indexing";
10
- import { u as useComponent, C as ComponentProvider, M as MemoizedRelationsField } from "./Relations-BBmhcWFV.mjs";
11
- import { Code, HeadingOne, HeadingTwo, HeadingThree, HeadingFour, HeadingFive, HeadingSix, Image as Image$1, NumberList, BulletList, Paragraph, Quotes, Link as Link$1, Drag, Collapse, Bold, Italic, Underline, StrikeThrough, Expand, PlusCircle, Plus, Trash, EyeStriked, CheckCircle, WarningCircle, Loader, ArrowClockwise, More } from "@strapi/icons";
10
+ import { u as useComponent, C as ComponentProvider, M as MemoizedRelationsField } from "./Relations-_K-HYOiM.mjs";
11
+ import { CodeBlock as CodeBlock$1, HeadingOne, HeadingTwo, HeadingThree, HeadingFour, HeadingFive, HeadingSix, Image as Image$1, NumberList, BulletList, Paragraph, Quotes, Link as Link$1, Drag, Collapse, Bold, Italic, Underline, StrikeThrough, Code, Expand, PlusCircle, Plus, Trash, EyeStriked, CheckCircle, WarningCircle, Loader, ArrowClockwise, More } from "@strapi/icons";
12
12
  import { styled, css, keyframes } from "styled-components";
13
13
  import { C as ComponentIcon, a as COMPONENT_ICONS } from "./ComponentIcon-u4bIXTFY.mjs";
14
14
  import { getEmptyImage } from "react-dnd-html5-backend";
15
- import { a as DIRECTIONS, u as useDragAndDrop, I as ItemTypes } from "./useDragAndDrop-DdHgKsqq.mjs";
15
+ import { a as DIRECTIONS, u as useDragAndDrop, I as ItemTypes } from "./useDragAndDrop-DJ6jqvZN.mjs";
16
16
  import { g as getIn } from "./objects-D6yBsdmx.mjs";
17
17
  import { Editor as Editor$1, Transforms, Node, Element, Range, Path, Point, createEditor } from "slate";
18
18
  import { withHistory } from "slate-history";
@@ -508,7 +508,7 @@ const CodeEditor = (props) => {
508
508
  const codeBlocks = {
509
509
  code: {
510
510
  renderElement: (props) => /* @__PURE__ */ jsx(CodeEditor, { ...props }),
511
- icon: Code,
511
+ icon: CodeBlock$1,
512
512
  label: {
513
513
  id: "components.Blocks.blocks.code",
514
514
  defaultMessage: "Code block"
@@ -697,8 +697,7 @@ const ImageDialog = () => {
697
697
  const [isOpen, setIsOpen] = React.useState(true);
698
698
  const { editor } = useBlocksEditorContext("ImageDialog");
699
699
  const components = useStrapiApp("ImageDialog", (state) => state.components);
700
- if (!components || !isOpen)
701
- return null;
700
+ if (!components || !isOpen) return null;
702
701
  const MediaLibraryDialog = components["media-library"];
703
702
  const insertImages = (images) => {
704
703
  Transforms.unwrapNodes(editor, {
@@ -707,14 +706,12 @@ const ImageDialog = () => {
707
706
  });
708
707
  const nodeEntryBeingReplaced = Editor$1.above(editor, {
709
708
  match(node) {
710
- if (Editor$1.isEditor(node))
711
- return false;
709
+ if (Editor$1.isEditor(node)) return false;
712
710
  const isInlineNode = ["text", "link"].includes(node.type);
713
711
  return !isInlineNode;
714
712
  }
715
713
  });
716
- if (!nodeEntryBeingReplaced)
717
- return;
714
+ if (!nodeEntryBeingReplaced) return;
718
715
  const [, pathToInsert] = nodeEntryBeingReplaced;
719
716
  Transforms.removeNodes(editor);
720
717
  const nodesToInsert = images.map((image) => {
@@ -892,8 +889,7 @@ const LinkContent = React.forwardRef(
892
889
  ReactEditor.focus(editor);
893
890
  };
894
891
  React.useEffect(() => {
895
- if (popoverOpen)
896
- linkInputRef.current?.focus();
892
+ if (popoverOpen) linkInputRef.current?.focus();
897
893
  }, [popoverOpen]);
898
894
  const inputNotDirty = !linkText || !linkUrl || link.url && link.url === linkUrl && elementText && elementText === linkText;
899
895
  return /* @__PURE__ */ jsxs(Popover.Root, { open: popoverOpen, children: [
@@ -963,11 +959,11 @@ const LinkContent = React.forwardRef(
963
959
  ),
964
960
  /* @__PURE__ */ jsxs(Flex, { gap: 2, children: [
965
961
  /* @__PURE__ */ jsx(Button, { variant: "tertiary", onClick: handleClose, children: formatMessage({
966
- id: "components.Blocks.popover.cancel",
962
+ id: "global.cancel",
967
963
  defaultMessage: "Cancel"
968
964
  }) }),
969
965
  /* @__PURE__ */ jsx(Button, { disabled: Boolean(inputNotDirty) || isSaveDisabled, onClick: handleSave, children: formatMessage({
970
- id: "components.Blocks.popover.save",
966
+ id: "global.save",
971
967
  defaultMessage: "Save"
972
968
  }) })
973
969
  ] })
@@ -1048,8 +1044,7 @@ const isText$1 = (node) => {
1048
1044
  return Node.isNode(node) && !Editor$1.isEditor(node) && node.type === "text";
1049
1045
  };
1050
1046
  const handleBackspaceKeyOnList = (editor, event) => {
1051
- if (!editor.selection)
1052
- return;
1047
+ if (!editor.selection) return;
1053
1048
  const [currentListItem, currentListItemPath] = Editor$1.parent(editor, editor.selection.anchor);
1054
1049
  const [currentList, currentListPath] = Editor$1.parent(editor, currentListItemPath);
1055
1050
  const isListEmpty = currentList.children.length === 1 && isText$1(currentListItem.children[0]) && currentListItem.children[0].text === "";
@@ -1158,8 +1153,7 @@ const handleEnterKeyOnList = (editor) => {
1158
1153
  };
1159
1154
  const handleConvertToList = (editor, format) => {
1160
1155
  const convertedPath = baseHandleConvert(editor, { type: "list-item" });
1161
- if (!convertedPath)
1162
- return;
1156
+ if (!convertedPath) return;
1163
1157
  Transforms.wrapNodes(editor, { type: "list", format, children: [] }, { at: convertedPath });
1164
1158
  };
1165
1159
  const handleTabOnList = (editor) => {
@@ -1171,8 +1165,7 @@ const handleTabOnList = (editor) => {
1171
1165
  }
1172
1166
  const [currentListItem, currentListItemPath] = currentListItemEntry;
1173
1167
  const [currentList] = Editor$1.parent(editor, currentListItemPath);
1174
- if (currentListItem === currentList.children[0])
1175
- return;
1168
+ if (currentListItem === currentList.children[0]) return;
1176
1169
  const currentListItemIndex = currentList.children.findIndex((item) => item === currentListItem);
1177
1170
  const previousNode = currentList.children[currentListItemIndex - 1];
1178
1171
  if (previousNode.type === "list") {
@@ -1539,8 +1532,7 @@ const isListNode = (node) => {
1539
1532
  const ListButton = ({ block, format }) => {
1540
1533
  const { editor, disabled, blocks } = useBlocksEditorContext("ListButton");
1541
1534
  const isListActive = () => {
1542
- if (!editor.selection)
1543
- return false;
1535
+ if (!editor.selection) return false;
1544
1536
  const currentListEntry = Editor$1.above(editor, {
1545
1537
  match: (node) => !Editor$1.isEditor(node) && node.type === "list",
1546
1538
  at: editor.selection.anchor
@@ -1614,8 +1606,7 @@ const LinkButton = ({ disabled }) => {
1614
1606
  const { editor } = useBlocksEditorContext("LinkButton");
1615
1607
  const isLinkActive = () => {
1616
1608
  const { selection } = editor;
1617
- if (!selection)
1618
- return false;
1609
+ if (!selection) return false;
1619
1610
  const [match] = Array.from(
1620
1611
  Editor$1.nodes(editor, {
1621
1612
  at: Editor$1.unhangRange(editor, selection),
@@ -1821,8 +1812,7 @@ const DragAndDropElement = ({
1821
1812
  displayedValue: children
1822
1813
  },
1823
1814
  onDropItem(currentIndex, newIndex) {
1824
- if (newIndex)
1825
- handleMoveBlock(newIndex, currentIndex);
1815
+ if (newIndex) handleMoveBlock(newIndex, currentIndex);
1826
1816
  }
1827
1817
  });
1828
1818
  const composedBoxRefs = useComposedRefs(blockRef, dropRef);
@@ -1966,8 +1956,7 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
1966
1956
  [modifiers2]
1967
1957
  );
1968
1958
  const handleMoveBlocks = (editor2, event) => {
1969
- if (!editor2.selection)
1970
- return;
1959
+ if (!editor2.selection) return;
1971
1960
  const start = Range.start(editor2.selection);
1972
1961
  const currentIndex = [start.path[0]];
1973
1962
  let newIndexPosition = 0;
@@ -2104,8 +2093,7 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
2104
2093
  }
2105
2094
  };
2106
2095
  const handleScrollSelectionIntoView = () => {
2107
- if (!editor.selection)
2108
- return;
2096
+ if (!editor.selection) return;
2109
2097
  const domRange = ReactEditor.toDOMRange(editor, editor.selection);
2110
2098
  const domRect = domRange.getBoundingClientRect();
2111
2099
  const blocksInput = blocksRef.current;
@@ -2299,8 +2287,7 @@ const InlineCode = styled.code`
2299
2287
  `;
2300
2288
  const baseCheckIsActive = (editor, name2) => {
2301
2289
  const marks = Editor$1.marks(editor);
2302
- if (!marks)
2303
- return false;
2290
+ if (!marks) return false;
2304
2291
  return Boolean(marks[name2]);
2305
2292
  };
2306
2293
  const baseHandleToggle = (editor, name2) => {
@@ -2624,7 +2611,7 @@ const Initializer = ({ disabled, name: name2, onClick }) => {
2624
2611
  Box,
2625
2612
  {
2626
2613
  tag: "button",
2627
- background: "neutral100",
2614
+ background: disabled ? "neutral150" : "neutral100",
2628
2615
  borderColor: field.error ? "danger600" : "neutral200",
2629
2616
  hasRadius: true,
2630
2617
  disabled,
@@ -2632,32 +2619,32 @@ const Initializer = ({ disabled, name: name2, onClick }) => {
2632
2619
  paddingTop: 9,
2633
2620
  paddingBottom: 9,
2634
2621
  type: "button",
2622
+ style: { cursor: disabled ? "not-allowed" : "pointer" },
2635
2623
  children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: 2, children: [
2636
- /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(CircleIcon, {}) }),
2637
- /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Typography, { textColor: "primary600", variant: "pi", fontWeight: "bold", children: formatMessage({
2638
- id: getTranslation("components.empty-repeatable"),
2639
- defaultMessage: "No entry yet. Click on the button below to add one."
2640
- }) }) })
2624
+ /* @__PURE__ */ jsx(Flex, { justifyContent: "center", color: disabled ? "neutral500" : "primary600", children: /* @__PURE__ */ jsx(PlusCircle, { width: "3.2rem", height: "3.2rem" }) }),
2625
+ /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(
2626
+ Typography,
2627
+ {
2628
+ textColor: disabled ? "neutral600" : "primary600",
2629
+ variant: "pi",
2630
+ fontWeight: "bold",
2631
+ children: formatMessage({
2632
+ id: getTranslation("components.empty-repeatable"),
2633
+ defaultMessage: "No entry yet. Click to add one."
2634
+ })
2635
+ }
2636
+ ) })
2641
2637
  ] })
2642
2638
  }
2643
2639
  ) });
2644
2640
  };
2645
- const CircleIcon = styled(PlusCircle)`
2646
- width: 2.4rem;
2647
- height: 2.4rem;
2648
- > circle {
2649
- fill: ${({ theme }) => theme.colors.primary200};
2650
- }
2651
- > path {
2652
- fill: ${({ theme }) => theme.colors.primary600};
2653
- }
2654
- `;
2655
2641
  const NonRepeatableComponent = ({
2656
2642
  attribute,
2657
2643
  name: name2,
2658
2644
  children,
2659
2645
  layout
2660
2646
  }) => {
2647
+ const { formatMessage } = useIntl();
2661
2648
  const { value } = useField(name2);
2662
2649
  const level = useComponent("NonRepeatableComponent", (state) => state.level);
2663
2650
  const isNested = level > 0;
@@ -2674,6 +2661,10 @@ const NonRepeatableComponent = ({
2674
2661
  children: /* @__PURE__ */ jsx(Flex, { direction: "column", alignItems: "stretch", gap: 6, children: layout.map((row, index) => {
2675
2662
  return /* @__PURE__ */ jsx(Grid$1.Root, { gap: 4, children: row.map(({ size, ...field }) => {
2676
2663
  const completeFieldName = `${name2}.${field.name}`;
2664
+ const translatedLabel = formatMessage({
2665
+ id: `content-manager.components.${attribute.component}.${field.name}`,
2666
+ defaultMessage: field.label
2667
+ });
2677
2668
  return /* @__PURE__ */ jsx(
2678
2669
  Grid$1.Item,
2679
2670
  {
@@ -2682,7 +2673,7 @@ const NonRepeatableComponent = ({
2682
2673
  xs: 12,
2683
2674
  direction: "column",
2684
2675
  alignItems: "stretch",
2685
- children: children({ ...field, name: completeFieldName })
2676
+ children: children({ ...field, label: translatedLabel, name: completeFieldName })
2686
2677
  },
2687
2678
  completeFieldName
2688
2679
  );
@@ -2884,6 +2875,10 @@ const RepeatableComponent = ({
2884
2875
  children: layout.map((row, index2) => {
2885
2876
  return /* @__PURE__ */ jsx(Grid$1.Root, { gap: 4, children: row.map(({ size, ...field }) => {
2886
2877
  const completeFieldName = `${nameWithIndex}.${field.name}`;
2878
+ const translatedLabel = formatMessage({
2879
+ id: `content-manager.components.${attribute.component}.${field.name}`,
2880
+ defaultMessage: field.label
2881
+ });
2887
2882
  return /* @__PURE__ */ jsx(
2888
2883
  Grid$1.Item,
2889
2884
  {
@@ -2892,7 +2887,11 @@ const RepeatableComponent = ({
2892
2887
  xs: 12,
2893
2888
  direction: "column",
2894
2889
  alignItems: "stretch",
2895
- children: children({ ...field, name: completeFieldName })
2890
+ children: children({
2891
+ ...field,
2892
+ label: translatedLabel,
2893
+ name: completeFieldName
2894
+ })
2896
2895
  },
2897
2896
  completeFieldName
2898
2897
  );
@@ -3736,8 +3735,7 @@ const Wrapper = styled.div`
3736
3735
  `;
3737
3736
  var listRE = /^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/, emptyListRE = /^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/, unorderedListRE = /[*+-]\s/;
3738
3737
  function newlineAndIndentContinueMarkdownList(cm) {
3739
- if (cm.getOption("disableInput"))
3740
- return CodeMirror.Pass;
3738
+ if (cm.getOption("disableInput")) return CodeMirror.Pass;
3741
3739
  var ranges = cm.listSelections(), replacements = [];
3742
3740
  for (var i = 0; i < ranges.length; i++) {
3743
3741
  var pos = ranges[i].head;
@@ -3771,8 +3769,7 @@ function newlineAndIndentContinueMarkdownList(cm) {
3771
3769
  var numbered = !(unorderedListRE.test(match[2]) || match[2].indexOf(">") >= 0);
3772
3770
  var bullet = numbered ? parseInt(match[3], 10) + 1 + match[4] : match[2].replace("x", " ");
3773
3771
  replacements[i] = "\n" + indent + bullet + after;
3774
- if (numbered)
3775
- incrementRemainingMarkdownListNumbers(cm, pos);
3772
+ if (numbered) incrementRemainingMarkdownListNumbers(cm, pos);
3776
3773
  }
3777
3774
  }
3778
3775
  cm.replaceSelections(replacements);
@@ -3790,10 +3787,8 @@ function incrementRemainingMarkdownListNumbers(cm, pos) {
3790
3787
  var newNumber = parseInt(startItem[3], 10) + lookAhead - skipCount;
3791
3788
  var nextNumber = parseInt(nextItem[3], 10), itemNumber = nextNumber;
3792
3789
  if (startIndent === nextIndent && !isNaN(nextNumber)) {
3793
- if (newNumber === nextNumber)
3794
- itemNumber = nextNumber + 1;
3795
- if (newNumber > nextNumber)
3796
- itemNumber = newNumber + 1;
3790
+ if (newNumber === nextNumber) itemNumber = nextNumber + 1;
3791
+ if (newNumber > nextNumber) itemNumber = newNumber + 1;
3797
3792
  cm.replaceRange(
3798
3793
  nextLine.replace(listRE, nextIndent + itemNumber + nextItem[4] + nextItem[5]),
3799
3794
  {
@@ -3806,10 +3801,8 @@ function incrementRemainingMarkdownListNumbers(cm, pos) {
3806
3801
  }
3807
3802
  );
3808
3803
  } else {
3809
- if (startIndent.length > nextIndent.length)
3810
- return;
3811
- if (startIndent.length < nextIndent.length && lookAhead === 1)
3812
- return;
3804
+ if (startIndent.length > nextIndent.length) return;
3805
+ if (startIndent.length < nextIndent.length && lookAhead === 1) return;
3813
3806
  skipCount += 1;
3814
3807
  }
3815
3808
  }
@@ -5237,6 +5230,13 @@ const DynamicComponent = ({
5237
5230
  alignItems: "stretch",
5238
5231
  children: /* @__PURE__ */ jsx(Grid$1.Root, { gap: 4, children: row.map(({ size, ...field }) => {
5239
5232
  const fieldName = `${name2}.${index}.${field.name}`;
5233
+ const fieldWithTranslatedLabel = {
5234
+ ...field,
5235
+ label: formatMessage({
5236
+ id: `content-manager.components.${componentUid}.${field.name}`,
5237
+ defaultMessage: field.label
5238
+ })
5239
+ };
5240
5240
  return /* @__PURE__ */ jsx(
5241
5241
  Grid$1.Item,
5242
5242
  {
@@ -5245,7 +5245,7 @@ const DynamicComponent = ({
5245
5245
  xs: 12,
5246
5246
  direction: "column",
5247
5247
  alignItems: "stretch",
5248
- children: /* @__PURE__ */ jsx(MemoizedInputRenderer, { ...field, name: fieldName })
5248
+ children: /* @__PURE__ */ jsx(MemoizedInputRenderer, { ...fieldWithTranslatedLabel, name: fieldName })
5249
5249
  },
5250
5250
  fieldName
5251
5251
  );
@@ -5560,4 +5560,4 @@ export {
5560
5560
  transformDocument as t,
5561
5561
  useLazyComponents as u
5562
5562
  };
5563
- //# sourceMappingURL=Field-DIjL1b5d.mjs.map
5563
+ //# sourceMappingURL=Field-Bn1jgMeF.mjs.map