@strapi/content-manager 0.0.0-experimental.81dfdf02b1367004c7deed9e01afa9d3a15d0fa5 → 0.0.0-experimental.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 (198) 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-qemkOlnj.mjs → ComponentConfigurationPage-CzVt9QCC.mjs} +4 -4
  4. package/dist/_chunks/{ComponentConfigurationPage-qemkOlnj.mjs.map → ComponentConfigurationPage-CzVt9QCC.mjs.map} +1 -1
  5. package/dist/_chunks/{ComponentConfigurationPage-D_M8iBw5.js → ComponentConfigurationPage-DYq8aqos.js} +5 -6
  6. package/dist/_chunks/{ComponentConfigurationPage-D_M8iBw5.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-BePwPuHy.js → EditConfigurationPage-C9IATpr0.js} +5 -6
  11. package/dist/_chunks/{EditConfigurationPage-BePwPuHy.js.map → EditConfigurationPage-C9IATpr0.js.map} +1 -1
  12. package/dist/_chunks/{EditConfigurationPage-CjUrEewK.mjs → EditConfigurationPage-CLDwrUv5.mjs} +4 -4
  13. package/dist/_chunks/{EditConfigurationPage-CjUrEewK.mjs.map → EditConfigurationPage-CLDwrUv5.mjs.map} +1 -1
  14. package/dist/_chunks/{EditViewPage-B-RJeiJD.js → EditViewPage-Ch-uBvbv.js} +50 -11
  15. package/dist/_chunks/EditViewPage-Ch-uBvbv.js.map +1 -0
  16. package/dist/_chunks/{EditViewPage-De8GyU8P.mjs → EditViewPage-DtKM7Jgw.mjs} +50 -10
  17. package/dist/_chunks/EditViewPage-DtKM7Jgw.mjs.map +1 -0
  18. package/dist/_chunks/{Field-dq8Tg1M_.js → Field-B9ADaInZ.js} +153 -148
  19. package/dist/_chunks/Field-B9ADaInZ.js.map +1 -0
  20. package/dist/_chunks/{Field-pb2o8uBe.mjs → Field-Bn1jgMeF.mjs} +148 -142
  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-DJn0Dxha.mjs → Form-BB5i9Pxl.mjs} +17 -9
  25. package/dist/_chunks/Form-BB5i9Pxl.mjs.map +1 -0
  26. package/dist/_chunks/{Form-DGIf4jQU.js → Form-C3kjKrPw.js} +19 -12
  27. package/dist/_chunks/Form-C3kjKrPw.js.map +1 -0
  28. package/dist/_chunks/{History-Dh2NEHnR.js → History-AwrK0-SA.js} +42 -100
  29. package/dist/_chunks/History-AwrK0-SA.js.map +1 -0
  30. package/dist/_chunks/{History-BowL3JKP.mjs → History-Cw2Q7OQL.mjs} +43 -100
  31. package/dist/_chunks/History-Cw2Q7OQL.mjs.map +1 -0
  32. package/dist/_chunks/{ListConfigurationPage-BpVOB-hn.mjs → ListConfigurationPage-B47JIu1e.mjs} +7 -6
  33. package/dist/_chunks/ListConfigurationPage-B47JIu1e.mjs.map +1 -0
  34. package/dist/_chunks/{ListConfigurationPage-BxYCWz9e.js → ListConfigurationPage-CNTJ0DBm.js} +7 -7
  35. package/dist/_chunks/ListConfigurationPage-CNTJ0DBm.js.map +1 -0
  36. package/dist/_chunks/{ListViewPage-4XsciqHZ.js → ListViewPage-Be_UEBar.js} +103 -77
  37. package/dist/_chunks/ListViewPage-Be_UEBar.js.map +1 -0
  38. package/dist/_chunks/{ListViewPage-CXFUjZQC.mjs → ListViewPage-DuvjX6ra.mjs} +99 -72
  39. package/dist/_chunks/ListViewPage-DuvjX6ra.mjs.map +1 -0
  40. package/dist/_chunks/{NoContentTypePage-C8OpoHeU.js → NoContentTypePage-B1J0KUCO.js} +2 -2
  41. package/dist/_chunks/{NoContentTypePage-C8OpoHeU.js.map → NoContentTypePage-B1J0KUCO.js.map} +1 -1
  42. package/dist/_chunks/{NoContentTypePage-DuhOTp3x.mjs → NoContentTypePage-C6M-Q0Tv.mjs} +2 -2
  43. package/dist/_chunks/{NoContentTypePage-DuhOTp3x.mjs.map → NoContentTypePage-C6M-Q0Tv.mjs.map} +1 -1
  44. package/dist/_chunks/{NoPermissionsPage-DVz3mzDz.mjs → NoPermissionsPage-CAi3zCAD.mjs} +2 -2
  45. package/dist/_chunks/{NoPermissionsPage-DVz3mzDz.mjs.map → NoPermissionsPage-CAi3zCAD.mjs.map} +1 -1
  46. package/dist/_chunks/{NoPermissionsPage-y_r7DVA2.js → NoPermissionsPage-CN34TlEE.js} +2 -2
  47. package/dist/_chunks/{NoPermissionsPage-y_r7DVA2.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-CVNLrn1Y.mjs → Relations-_K-HYOiM.mjs} +75 -41
  53. package/dist/_chunks/Relations-_K-HYOiM.mjs.map +1 -0
  54. package/dist/_chunks/{Relations-DPFCAa7b.js → Relations-xtKZHtTN.js} +75 -42
  55. package/dist/_chunks/Relations-xtKZHtTN.js.map +1 -0
  56. package/dist/_chunks/{en-uOUIxfcQ.js → en-BK8Xyl5I.js} +28 -15
  57. package/dist/_chunks/{en-uOUIxfcQ.js.map → en-BK8Xyl5I.js.map} +1 -1
  58. package/dist/_chunks/{en-BrCTWlZv.mjs → en-Dtk_ot79.mjs} +28 -15
  59. package/dist/_chunks/{en-BrCTWlZv.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-C3fJE-1-.js → index-BlX-OdHL.js} +1276 -995
  70. package/dist/_chunks/index-BlX-OdHL.js.map +1 -0
  71. package/dist/_chunks/{index-DiMrfcfy.mjs → index-tETMKK2G.mjs} +1279 -998
  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-ls3gxfpH.mjs → layout-BaQBaz56.mjs} +6 -5
  78. package/dist/_chunks/{layout-ls3gxfpH.mjs.map → layout-BaQBaz56.mjs.map} +1 -1
  79. package/dist/_chunks/{layout-C788OmNr.js → layout-D8Sz3KxF.js} +7 -7
  80. package/dist/_chunks/{layout-C788OmNr.js.map → layout-D8Sz3KxF.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-DYeotliT.js → relations-CAbbX8Sa.js} +6 -7
  86. package/dist/_chunks/relations-CAbbX8Sa.js.map +1 -0
  87. package/dist/_chunks/{relations-CLcOmGO0.mjs → relations-CsfmCqOU.mjs} +6 -7
  88. package/dist/_chunks/relations-CsfmCqOU.mjs.map +1 -0
  89. package/dist/_chunks/{usePrev-B9w_-eYc.js → useDebounce-CtcjDB3L.js} +14 -1
  90. package/dist/_chunks/useDebounce-CtcjDB3L.js.map +1 -0
  91. package/dist/_chunks/useDebounce-DmuSJIF3.mjs +29 -0
  92. package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +1 -0
  93. package/dist/_chunks/{useDragAndDrop-J0TUUbR6.js → useDragAndDrop-BMtgCYzL.js} +5 -9
  94. package/dist/_chunks/{useDragAndDrop-J0TUUbR6.js.map → useDragAndDrop-BMtgCYzL.js.map} +1 -1
  95. package/dist/_chunks/{useDragAndDrop-DdHgKsqq.mjs → useDragAndDrop-DJ6jqvZN.mjs} +4 -7
  96. package/dist/_chunks/{useDragAndDrop-DdHgKsqq.mjs.map → useDragAndDrop-DJ6jqvZN.mjs.map} +1 -1
  97. package/dist/admin/index.js +2 -1
  98. package/dist/admin/index.js.map +1 -1
  99. package/dist/admin/index.mjs +4 -3
  100. package/dist/admin/src/content-manager.d.ts +3 -2
  101. package/dist/admin/src/exports.d.ts +1 -1
  102. package/dist/admin/src/hooks/useDocument.d.ts +32 -1
  103. package/dist/admin/src/pages/EditView/EditViewPage.d.ts +9 -1
  104. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +1 -1
  105. package/dist/admin/src/pages/EditView/components/DocumentStatus.d.ts +2 -2
  106. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +0 -32
  107. package/dist/admin/src/pages/EditView/components/Header.d.ts +11 -11
  108. package/dist/admin/src/preview/components/PreviewContent.d.ts +2 -0
  109. package/dist/admin/src/preview/components/PreviewHeader.d.ts +2 -0
  110. package/dist/admin/src/preview/components/PreviewSidePanel.d.ts +3 -0
  111. package/dist/admin/src/preview/constants.d.ts +1 -0
  112. package/dist/admin/src/preview/index.d.ts +4 -0
  113. package/dist/admin/src/preview/pages/Preview.d.ts +11 -0
  114. package/dist/admin/src/preview/routes.d.ts +3 -0
  115. package/dist/admin/src/preview/services/preview.d.ts +3 -0
  116. package/dist/admin/src/router.d.ts +1 -1
  117. package/dist/admin/src/services/documents.d.ts +3 -4
  118. package/dist/server/index.js +457 -201
  119. package/dist/server/index.js.map +1 -1
  120. package/dist/server/index.mjs +457 -200
  121. package/dist/server/index.mjs.map +1 -1
  122. package/dist/server/src/bootstrap.d.ts.map +1 -1
  123. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  124. package/dist/server/src/controllers/index.d.ts.map +1 -1
  125. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  126. package/dist/server/src/controllers/utils/metadata.d.ts +15 -1
  127. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -1
  128. package/dist/server/src/history/services/history.d.ts.map +1 -1
  129. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  130. package/dist/server/src/history/services/utils.d.ts +3 -3
  131. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  132. package/dist/server/src/index.d.ts +4 -4
  133. package/dist/server/src/preview/constants.d.ts +2 -0
  134. package/dist/server/src/preview/constants.d.ts.map +1 -0
  135. package/dist/server/src/preview/controllers/index.d.ts +2 -0
  136. package/dist/server/src/preview/controllers/index.d.ts.map +1 -0
  137. package/dist/server/src/preview/controllers/preview.d.ts +13 -0
  138. package/dist/server/src/preview/controllers/preview.d.ts.map +1 -0
  139. package/dist/server/src/preview/controllers/validation/preview.d.ts +6 -0
  140. package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -0
  141. package/dist/server/src/preview/index.d.ts +4 -0
  142. package/dist/server/src/preview/index.d.ts.map +1 -0
  143. package/dist/server/src/preview/routes/index.d.ts +8 -0
  144. package/dist/server/src/preview/routes/index.d.ts.map +1 -0
  145. package/dist/server/src/preview/routes/preview.d.ts +4 -0
  146. package/dist/server/src/preview/routes/preview.d.ts.map +1 -0
  147. package/dist/server/src/preview/services/index.d.ts +16 -0
  148. package/dist/server/src/preview/services/index.d.ts.map +1 -0
  149. package/dist/server/src/preview/services/preview-config.d.ts +32 -0
  150. package/dist/server/src/preview/services/preview-config.d.ts.map +1 -0
  151. package/dist/server/src/preview/services/preview.d.ts +12 -0
  152. package/dist/server/src/preview/services/preview.d.ts.map +1 -0
  153. package/dist/server/src/preview/utils.d.ts +19 -0
  154. package/dist/server/src/preview/utils.d.ts.map +1 -0
  155. package/dist/server/src/register.d.ts.map +1 -1
  156. package/dist/server/src/routes/index.d.ts.map +1 -1
  157. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  158. package/dist/server/src/services/document-metadata.d.ts +8 -8
  159. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  160. package/dist/server/src/services/index.d.ts +4 -4
  161. package/dist/server/src/services/index.d.ts.map +1 -1
  162. package/dist/server/src/services/utils/configuration/index.d.ts +2 -2
  163. package/dist/server/src/services/utils/configuration/layouts.d.ts +2 -2
  164. package/dist/server/src/utils/index.d.ts +2 -0
  165. package/dist/server/src/utils/index.d.ts.map +1 -1
  166. package/dist/shared/contracts/collection-types.d.ts +3 -1
  167. package/dist/shared/contracts/collection-types.d.ts.map +1 -1
  168. package/dist/shared/contracts/index.d.ts +1 -0
  169. package/dist/shared/contracts/index.d.ts.map +1 -1
  170. package/dist/shared/contracts/preview.d.ts +27 -0
  171. package/dist/shared/contracts/preview.d.ts.map +1 -0
  172. package/dist/shared/index.js +4 -0
  173. package/dist/shared/index.js.map +1 -1
  174. package/dist/shared/index.mjs +4 -0
  175. package/dist/shared/index.mjs.map +1 -1
  176. package/package.json +15 -15
  177. package/dist/_chunks/EditViewPage-B-RJeiJD.js.map +0 -1
  178. package/dist/_chunks/EditViewPage-De8GyU8P.mjs.map +0 -1
  179. package/dist/_chunks/Field-dq8Tg1M_.js.map +0 -1
  180. package/dist/_chunks/Field-pb2o8uBe.mjs.map +0 -1
  181. package/dist/_chunks/Form-DGIf4jQU.js.map +0 -1
  182. package/dist/_chunks/Form-DJn0Dxha.mjs.map +0 -1
  183. package/dist/_chunks/History-BowL3JKP.mjs.map +0 -1
  184. package/dist/_chunks/History-Dh2NEHnR.js.map +0 -1
  185. package/dist/_chunks/ListConfigurationPage-BpVOB-hn.mjs.map +0 -1
  186. package/dist/_chunks/ListConfigurationPage-BxYCWz9e.js.map +0 -1
  187. package/dist/_chunks/ListViewPage-4XsciqHZ.js.map +0 -1
  188. package/dist/_chunks/ListViewPage-CXFUjZQC.mjs.map +0 -1
  189. package/dist/_chunks/Relations-CVNLrn1Y.mjs.map +0 -1
  190. package/dist/_chunks/Relations-DPFCAa7b.js.map +0 -1
  191. package/dist/_chunks/index-C3fJE-1-.js.map +0 -1
  192. package/dist/_chunks/index-DiMrfcfy.mjs.map +0 -1
  193. package/dist/_chunks/relations-CLcOmGO0.mjs.map +0 -1
  194. package/dist/_chunks/relations-DYeotliT.js.map +0 -1
  195. package/dist/_chunks/usePrev-B9w_-eYc.js.map +0 -1
  196. package/dist/_chunks/usePrev-DH6iah0A.mjs +0 -16
  197. package/dist/_chunks/usePrev-DH6iah0A.mjs.map +0 -1
  198. package/strapi-server.js +0 -3
@@ -5,19 +5,19 @@ 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, o as useDocLayout } from "./index-DiMrfcfy.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-CVNLrn1Y.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";
16
- import { g as getIn } from "./objects-mKMAmfec.mjs";
15
+ import { a as DIRECTIONS, u as useDragAndDrop, I as ItemTypes } from "./useDragAndDrop-DJ6jqvZN.mjs";
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";
19
19
  import { useFocused, useSelected, ReactEditor, Editable, useSlate, Slate, withReact } from "slate-react";
20
- import { p as prefixFileUrlWithBackendUrl, u as usePrev } from "./usePrev-DH6iah0A.mjs";
20
+ import { p as prefixFileUrlWithBackendUrl, u as usePrev, a as useDebounce } from "./useDebounce-DmuSJIF3.mjs";
21
21
  import * as Toolbar from "@radix-ui/react-toolbar";
22
22
  import { useLocation, useMatch } from "react-router-dom";
23
23
  import CodeMirror from "codemirror5";
@@ -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") {
@@ -1407,7 +1400,7 @@ const ToolbarButton = ({
1407
1400
  width: 7,
1408
1401
  height: 7,
1409
1402
  hasRadius: true,
1410
- children: /* @__PURE__ */ jsx(Icon, { width: "1.2rem", height: "1.2rem", fill: disabled ? "neutral300" : enabledColor })
1403
+ children: /* @__PURE__ */ jsx(Icon, { fill: disabled ? "neutral300" : enabledColor })
1411
1404
  }
1412
1405
  )
1413
1406
  }
@@ -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),
@@ -1749,6 +1740,7 @@ const DragItem = styled(Flex)`
1749
1740
  }
1750
1741
  `;
1751
1742
  const DragIconButton = styled(IconButton)`
1743
+ user-select: none;
1752
1744
  display: flex;
1753
1745
  align-items: center;
1754
1746
  justify-content: center;
@@ -1820,8 +1812,7 @@ const DragAndDropElement = ({
1820
1812
  displayedValue: children
1821
1813
  },
1822
1814
  onDropItem(currentIndex, newIndex) {
1823
- if (newIndex)
1824
- handleMoveBlock(newIndex, currentIndex);
1815
+ if (newIndex) handleMoveBlock(newIndex, currentIndex);
1825
1816
  }
1826
1817
  });
1827
1818
  const composedBoxRefs = useComposedRefs(blockRef, dropRef);
@@ -1877,6 +1868,7 @@ const DragAndDropElement = ({
1877
1868
  DragIconButton,
1878
1869
  {
1879
1870
  tag: "div",
1871
+ contentEditable: false,
1880
1872
  role: "button",
1881
1873
  tabIndex: 0,
1882
1874
  withTooltip: false,
@@ -1964,8 +1956,7 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
1964
1956
  [modifiers2]
1965
1957
  );
1966
1958
  const handleMoveBlocks = (editor2, event) => {
1967
- if (!editor2.selection)
1968
- return;
1959
+ if (!editor2.selection) return;
1969
1960
  const start = Range.start(editor2.selection);
1970
1961
  const currentIndex = [start.path[0]];
1971
1962
  let newIndexPosition = 0;
@@ -2102,8 +2093,7 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
2102
2093
  }
2103
2094
  };
2104
2095
  const handleScrollSelectionIntoView = () => {
2105
- if (!editor.selection)
2106
- return;
2096
+ if (!editor.selection) return;
2107
2097
  const domRange = ReactEditor.toDOMRange(editor, editor.selection);
2108
2098
  const domRect = domRange.getBoundingClientRect();
2109
2099
  const blocksInput = blocksRef.current;
@@ -2297,8 +2287,7 @@ const InlineCode = styled.code`
2297
2287
  `;
2298
2288
  const baseCheckIsActive = (editor, name2) => {
2299
2289
  const marks = Editor$1.marks(editor);
2300
- if (!marks)
2301
- return false;
2290
+ if (!marks) return false;
2302
2291
  return Boolean(marks[name2]);
2303
2292
  };
2304
2293
  const baseHandleToggle = (editor, name2) => {
@@ -2622,7 +2611,7 @@ const Initializer = ({ disabled, name: name2, onClick }) => {
2622
2611
  Box,
2623
2612
  {
2624
2613
  tag: "button",
2625
- background: "neutral100",
2614
+ background: disabled ? "neutral150" : "neutral100",
2626
2615
  borderColor: field.error ? "danger600" : "neutral200",
2627
2616
  hasRadius: true,
2628
2617
  disabled,
@@ -2630,32 +2619,32 @@ const Initializer = ({ disabled, name: name2, onClick }) => {
2630
2619
  paddingTop: 9,
2631
2620
  paddingBottom: 9,
2632
2621
  type: "button",
2622
+ style: { cursor: disabled ? "not-allowed" : "pointer" },
2633
2623
  children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: 2, children: [
2634
- /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(CircleIcon, {}) }),
2635
- /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Typography, { textColor: "primary600", variant: "pi", fontWeight: "bold", children: formatMessage({
2636
- id: getTranslation("components.empty-repeatable"),
2637
- defaultMessage: "No entry yet. Click on the button below to add one."
2638
- }) }) })
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
+ ) })
2639
2637
  ] })
2640
2638
  }
2641
2639
  ) });
2642
2640
  };
2643
- const CircleIcon = styled(PlusCircle)`
2644
- width: 2.4rem;
2645
- height: 2.4rem;
2646
- > circle {
2647
- fill: ${({ theme }) => theme.colors.primary200};
2648
- }
2649
- > path {
2650
- fill: ${({ theme }) => theme.colors.primary600};
2651
- }
2652
- `;
2653
2641
  const NonRepeatableComponent = ({
2654
2642
  attribute,
2655
2643
  name: name2,
2656
2644
  children,
2657
2645
  layout
2658
2646
  }) => {
2647
+ const { formatMessage } = useIntl();
2659
2648
  const { value } = useField(name2);
2660
2649
  const level = useComponent("NonRepeatableComponent", (state) => state.level);
2661
2650
  const isNested = level > 0;
@@ -2672,6 +2661,10 @@ const NonRepeatableComponent = ({
2672
2661
  children: /* @__PURE__ */ jsx(Flex, { direction: "column", alignItems: "stretch", gap: 6, children: layout.map((row, index) => {
2673
2662
  return /* @__PURE__ */ jsx(Grid$1.Root, { gap: 4, children: row.map(({ size, ...field }) => {
2674
2663
  const completeFieldName = `${name2}.${field.name}`;
2664
+ const translatedLabel = formatMessage({
2665
+ id: `content-manager.components.${attribute.component}.${field.name}`,
2666
+ defaultMessage: field.label
2667
+ });
2675
2668
  return /* @__PURE__ */ jsx(
2676
2669
  Grid$1.Item,
2677
2670
  {
@@ -2680,7 +2673,7 @@ const NonRepeatableComponent = ({
2680
2673
  xs: 12,
2681
2674
  direction: "column",
2682
2675
  alignItems: "stretch",
2683
- children: children({ ...field, name: completeFieldName })
2676
+ children: children({ ...field, label: translatedLabel, name: completeFieldName })
2684
2677
  },
2685
2678
  completeFieldName
2686
2679
  );
@@ -2702,13 +2695,34 @@ const RepeatableComponent = ({
2702
2695
  const { search: searchString } = useLocation();
2703
2696
  const search = React.useMemo(() => new URLSearchParams(searchString), [searchString]);
2704
2697
  const { components } = useDoc();
2705
- const { value = [], error } = useField(name2);
2698
+ const {
2699
+ value = [],
2700
+ error,
2701
+ rawError
2702
+ } = useField(name2);
2706
2703
  const addFieldRow = useForm("RepeatableComponent", (state) => state.addFieldRow);
2707
2704
  const moveFieldRow = useForm("RepeatableComponent", (state) => state.moveFieldRow);
2708
2705
  const removeFieldRow = useForm("RepeatableComponent", (state) => state.removeFieldRow);
2709
2706
  const { max = Infinity } = attribute;
2710
2707
  const [collapseToOpen, setCollapseToOpen] = React.useState("");
2711
2708
  const [liveText, setLiveText] = React.useState("");
2709
+ React.useEffect(() => {
2710
+ const hasNestedErrors = rawError && Array.isArray(rawError) && rawError.length > 0;
2711
+ const hasNestedValue = value && Array.isArray(value) && value.length > 0;
2712
+ if (hasNestedErrors && hasNestedValue) {
2713
+ const errorOpenItems = rawError.map((_, idx) => {
2714
+ return value[idx] ? value[idx].__temp_key__ : null;
2715
+ }).filter((value2) => !!value2);
2716
+ if (errorOpenItems && errorOpenItems.length > 0) {
2717
+ setCollapseToOpen((collapseToOpen2) => {
2718
+ if (!errorOpenItems.includes(collapseToOpen2)) {
2719
+ return errorOpenItems[0];
2720
+ }
2721
+ return collapseToOpen2;
2722
+ });
2723
+ }
2724
+ }
2725
+ }, [rawError, value]);
2712
2726
  const componentTmpKeyWithFocussedField = React.useMemo(() => {
2713
2727
  if (search.has("field")) {
2714
2728
  const fieldParam = search.get("field");
@@ -2861,6 +2875,10 @@ const RepeatableComponent = ({
2861
2875
  children: layout.map((row, index2) => {
2862
2876
  return /* @__PURE__ */ jsx(Grid$1.Root, { gap: 4, children: row.map(({ size, ...field }) => {
2863
2877
  const completeFieldName = `${nameWithIndex}.${field.name}`;
2878
+ const translatedLabel = formatMessage({
2879
+ id: `content-manager.components.${attribute.component}.${field.name}`,
2880
+ defaultMessage: field.label
2881
+ });
2864
2882
  return /* @__PURE__ */ jsx(
2865
2883
  Grid$1.Item,
2866
2884
  {
@@ -2869,7 +2887,11 @@ const RepeatableComponent = ({
2869
2887
  xs: 12,
2870
2888
  direction: "column",
2871
2889
  alignItems: "stretch",
2872
- children: children({ ...field, name: completeFieldName })
2890
+ children: children({
2891
+ ...field,
2892
+ label: translatedLabel,
2893
+ name: completeFieldName
2894
+ })
2873
2895
  },
2874
2896
  completeFieldName
2875
2897
  );
@@ -3256,18 +3278,6 @@ const NotAllowedInput = ({ hint, label, required, name: name2 }) => {
3256
3278
  /* @__PURE__ */ jsx(Field.Hint, {})
3257
3279
  ] });
3258
3280
  };
3259
- function useDebounce(value, delay) {
3260
- const [debouncedValue, setDebouncedValue] = useState(value);
3261
- useEffect(() => {
3262
- const handler = setTimeout(() => {
3263
- setDebouncedValue(value);
3264
- }, delay);
3265
- return () => {
3266
- clearTimeout(handler);
3267
- };
3268
- }, [value, delay]);
3269
- return debouncedValue;
3270
- }
3271
3281
  const uidApi = contentManagerApi.injectEndpoints({
3272
3282
  endpoints: (builder) => ({
3273
3283
  getDefaultUID: builder.query({
@@ -3725,8 +3735,7 @@ const Wrapper = styled.div`
3725
3735
  `;
3726
3736
  var listRE = /^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/, emptyListRE = /^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/, unorderedListRE = /[*+-]\s/;
3727
3737
  function newlineAndIndentContinueMarkdownList(cm) {
3728
- if (cm.getOption("disableInput"))
3729
- return CodeMirror.Pass;
3738
+ if (cm.getOption("disableInput")) return CodeMirror.Pass;
3730
3739
  var ranges = cm.listSelections(), replacements = [];
3731
3740
  for (var i = 0; i < ranges.length; i++) {
3732
3741
  var pos = ranges[i].head;
@@ -3760,8 +3769,7 @@ function newlineAndIndentContinueMarkdownList(cm) {
3760
3769
  var numbered = !(unorderedListRE.test(match[2]) || match[2].indexOf(">") >= 0);
3761
3770
  var bullet = numbered ? parseInt(match[3], 10) + 1 + match[4] : match[2].replace("x", " ");
3762
3771
  replacements[i] = "\n" + indent + bullet + after;
3763
- if (numbered)
3764
- incrementRemainingMarkdownListNumbers(cm, pos);
3772
+ if (numbered) incrementRemainingMarkdownListNumbers(cm, pos);
3765
3773
  }
3766
3774
  }
3767
3775
  cm.replaceSelections(replacements);
@@ -3779,10 +3787,8 @@ function incrementRemainingMarkdownListNumbers(cm, pos) {
3779
3787
  var newNumber = parseInt(startItem[3], 10) + lookAhead - skipCount;
3780
3788
  var nextNumber = parseInt(nextItem[3], 10), itemNumber = nextNumber;
3781
3789
  if (startIndent === nextIndent && !isNaN(nextNumber)) {
3782
- if (newNumber === nextNumber)
3783
- itemNumber = nextNumber + 1;
3784
- if (newNumber > nextNumber)
3785
- itemNumber = newNumber + 1;
3790
+ if (newNumber === nextNumber) itemNumber = nextNumber + 1;
3791
+ if (newNumber > nextNumber) itemNumber = newNumber + 1;
3786
3792
  cm.replaceRange(
3787
3793
  nextLine.replace(listRE, nextIndent + itemNumber + nextItem[4] + nextItem[5]),
3788
3794
  {
@@ -3795,10 +3801,8 @@ function incrementRemainingMarkdownListNumbers(cm, pos) {
3795
3801
  }
3796
3802
  );
3797
3803
  } else {
3798
- if (startIndent.length > nextIndent.length)
3799
- return;
3800
- if (startIndent.length < nextIndent.length && lookAhead === 1)
3801
- return;
3804
+ if (startIndent.length > nextIndent.length) return;
3805
+ if (startIndent.length < nextIndent.length && lookAhead === 1) return;
3802
3806
  skipCount += 1;
3803
3807
  }
3804
3808
  }
@@ -4585,31 +4589,11 @@ const quoteAndCodeHandler = (editor, markdownType) => {
4585
4589
  insertWithoutTextToEdit(editor, markdownType, line, contentLength);
4586
4590
  }
4587
4591
  };
4588
- const CustomIconButton = styled(IconButton)`
4589
- padding: ${({ theme }) => theme.spaces[2]};
4590
-
4591
- svg {
4592
- width: 1.8rem;
4593
- height: 1.8rem;
4594
- }
4595
- `;
4596
- const CustomLinkIconButton = styled(CustomIconButton)`
4597
- svg {
4598
- width: 0.8rem;
4599
- height: 0.8rem;
4600
- }
4601
- `;
4602
4592
  const MainButtons = styled(IconButtonGroup)`
4603
4593
  margin-left: ${({ theme }) => theme.spaces[4]};
4604
4594
  `;
4605
4595
  const MoreButton = styled(IconButton)`
4606
4596
  margin: ${({ theme }) => `0 ${theme.spaces[2]}`};
4607
- padding: ${({ theme }) => theme.spaces[2]};
4608
-
4609
- svg {
4610
- width: 1.8rem;
4611
- height: 1.8rem;
4612
- }
4613
4597
  `;
4614
4598
  const IconButtonGroupMargin = styled(IconButtonGroup)`
4615
4599
  margin-right: ${({ theme }) => `${theme.spaces[2]}`};
@@ -4693,9 +4677,9 @@ const WysiwygNav = ({
4693
4677
  }
4694
4678
  ) }),
4695
4679
  /* @__PURE__ */ jsxs(MainButtons, { children: [
4696
- /* @__PURE__ */ jsx(CustomIconButton, { disabled: true, label: "Bold", name: "Bold", children: /* @__PURE__ */ jsx(Bold, {}) }),
4697
- /* @__PURE__ */ jsx(CustomIconButton, { disabled: true, label: "Italic", name: "Italic", children: /* @__PURE__ */ jsx(Italic, {}) }),
4698
- /* @__PURE__ */ jsx(CustomIconButton, { disabled: true, label: "Underline", name: "Underline", children: /* @__PURE__ */ jsx(Underline, {}) })
4680
+ /* @__PURE__ */ jsx(IconButton, { disabled: true, label: "Bold", name: "Bold", children: /* @__PURE__ */ jsx(Bold, {}) }),
4681
+ /* @__PURE__ */ jsx(IconButton, { disabled: true, label: "Italic", name: "Italic", children: /* @__PURE__ */ jsx(Italic, {}) }),
4682
+ /* @__PURE__ */ jsx(IconButton, { disabled: true, label: "Underline", name: "Underline", children: /* @__PURE__ */ jsx(Underline, {}) })
4699
4683
  ] }),
4700
4684
  /* @__PURE__ */ jsx(MoreButton, { disabled: true, label: "More", children: /* @__PURE__ */ jsx(More, {}) })
4701
4685
  ] }),
@@ -4734,17 +4718,9 @@ const WysiwygNav = ({
4734
4718
  }
4735
4719
  ) }),
4736
4720
  /* @__PURE__ */ jsxs(MainButtons, { children: [
4721
+ /* @__PURE__ */ jsx(IconButton, { onClick: () => onActionClick("Bold", editorRef), label: "Bold", name: "Bold", children: /* @__PURE__ */ jsx(Bold, {}) }),
4737
4722
  /* @__PURE__ */ jsx(
4738
- CustomIconButton,
4739
- {
4740
- onClick: () => onActionClick("Bold", editorRef),
4741
- label: "Bold",
4742
- name: "Bold",
4743
- children: /* @__PURE__ */ jsx(Bold, {})
4744
- }
4745
- ),
4746
- /* @__PURE__ */ jsx(
4747
- CustomIconButton,
4723
+ IconButton,
4748
4724
  {
4749
4725
  onClick: () => onActionClick("Italic", editorRef),
4750
4726
  label: "Italic",
@@ -4753,7 +4729,7 @@ const WysiwygNav = ({
4753
4729
  }
4754
4730
  ),
4755
4731
  /* @__PURE__ */ jsx(
4756
- CustomIconButton,
4732
+ IconButton,
4757
4733
  {
4758
4734
  onClick: () => onActionClick("Underline", editorRef),
4759
4735
  label: "Underline",
@@ -4767,7 +4743,7 @@ const WysiwygNav = ({
4767
4743
  /* @__PURE__ */ jsx(Popover.Content, { sideOffset: 12, children: /* @__PURE__ */ jsxs(Flex, { padding: 2, children: [
4768
4744
  /* @__PURE__ */ jsxs(IconButtonGroupMargin, { children: [
4769
4745
  /* @__PURE__ */ jsx(
4770
- CustomIconButton,
4746
+ IconButton,
4771
4747
  {
4772
4748
  onClick: () => onActionClick("Strikethrough", editorRef, handleTogglePopover),
4773
4749
  label: "Strikethrough",
@@ -4776,7 +4752,7 @@ const WysiwygNav = ({
4776
4752
  }
4777
4753
  ),
4778
4754
  /* @__PURE__ */ jsx(
4779
- CustomIconButton,
4755
+ IconButton,
4780
4756
  {
4781
4757
  onClick: () => onActionClick("BulletList", editorRef, handleTogglePopover),
4782
4758
  label: "BulletList",
@@ -4785,7 +4761,7 @@ const WysiwygNav = ({
4785
4761
  }
4786
4762
  ),
4787
4763
  /* @__PURE__ */ jsx(
4788
- CustomIconButton,
4764
+ IconButton,
4789
4765
  {
4790
4766
  onClick: () => onActionClick("NumberList", editorRef, handleTogglePopover),
4791
4767
  label: "NumberList",
@@ -4796,7 +4772,7 @@ const WysiwygNav = ({
4796
4772
  ] }),
4797
4773
  /* @__PURE__ */ jsxs(IconButtonGroup, { children: [
4798
4774
  /* @__PURE__ */ jsx(
4799
- CustomIconButton,
4775
+ IconButton,
4800
4776
  {
4801
4777
  onClick: () => onActionClick("Code", editorRef, handleTogglePopover),
4802
4778
  label: "Code",
@@ -4805,7 +4781,7 @@ const WysiwygNav = ({
4805
4781
  }
4806
4782
  ),
4807
4783
  /* @__PURE__ */ jsx(
4808
- CustomIconButton,
4784
+ IconButton,
4809
4785
  {
4810
4786
  onClick: () => {
4811
4787
  handleTogglePopover();
@@ -4817,7 +4793,7 @@ const WysiwygNav = ({
4817
4793
  }
4818
4794
  ),
4819
4795
  /* @__PURE__ */ jsx(
4820
- CustomLinkIconButton,
4796
+ IconButton,
4821
4797
  {
4822
4798
  onClick: () => onActionClick("Link", editorRef, handleTogglePopover),
4823
4799
  label: "Link",
@@ -4826,7 +4802,7 @@ const WysiwygNav = ({
4826
4802
  }
4827
4803
  ),
4828
4804
  /* @__PURE__ */ jsx(
4829
- CustomIconButton,
4805
+ IconButton,
4830
4806
  {
4831
4807
  onClick: () => onActionClick("Quote", editorRef, handleTogglePopover),
4832
4808
  label: "Quote",
@@ -4963,15 +4939,19 @@ const Wysiwyg = React.forwardRef(
4963
4939
  );
4964
4940
  const MemoizedWysiwyg = React.memo(Wysiwyg);
4965
4941
  const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
4966
- const { id } = useDoc();
4942
+ const { id, document: document2, collectionType } = useDoc();
4967
4943
  const isFormDisabled = useForm("InputRenderer", (state) => state.disabled);
4968
4944
  const isInDynamicZone = useDynamicZone("isInDynamicZone", (state) => state.isInDynamicZone);
4969
4945
  const canCreateFields = useDocumentRBAC("InputRenderer", (rbac) => rbac.canCreateFields);
4970
4946
  const canReadFields = useDocumentRBAC("InputRenderer", (rbac) => rbac.canReadFields);
4971
4947
  const canUpdateFields = useDocumentRBAC("InputRenderer", (rbac) => rbac.canUpdateFields);
4972
4948
  const canUserAction = useDocumentRBAC("InputRenderer", (rbac) => rbac.canUserAction);
4973
- const editableFields = id ? canUpdateFields : canCreateFields;
4974
- const readableFields = id ? canReadFields : canCreateFields;
4949
+ let idToCheck = id;
4950
+ if (collectionType === SINGLE_TYPES) {
4951
+ idToCheck = document2?.documentId;
4952
+ }
4953
+ const editableFields = idToCheck ? canUpdateFields : canCreateFields;
4954
+ const readableFields = idToCheck ? canReadFields : canCreateFields;
4975
4955
  const canUserReadField = canUserAction(props.name, readableFields, props.type);
4976
4956
  const canUserEditField = canUserAction(props.name, editableFields, props.type);
4977
4957
  const fields = useStrapiApp("InputRenderer", (app) => app.fields);
@@ -4982,6 +4962,7 @@ const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
4982
4962
  const {
4983
4963
  edit: { components }
4984
4964
  } = useDocLayout();
4965
+ const field = useField(props.name);
4985
4966
  if (!visible) {
4986
4967
  return null;
4987
4968
  }
@@ -4992,7 +4973,7 @@ const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
4992
4973
  if (attributeHasCustomFieldProperty(props.attribute)) {
4993
4974
  const CustomInput = lazyComponentStore[props.attribute.customField];
4994
4975
  if (CustomInput) {
4995
- return /* @__PURE__ */ jsx(CustomInput, { ...props, hint, disabled: fieldIsDisabled });
4976
+ return /* @__PURE__ */ jsx(CustomInput, { ...props, ...field, hint, disabled: fieldIsDisabled });
4996
4977
  }
4997
4978
  return /* @__PURE__ */ jsx(
4998
4979
  InputRenderer$1,
@@ -5153,6 +5134,14 @@ const DynamicComponent = ({
5153
5134
  React.useEffect(() => {
5154
5135
  dragPreviewRef(getEmptyImage(), { captureDraggingState: false });
5155
5136
  }, [dragPreviewRef, index]);
5137
+ const accordionValue = React.useId();
5138
+ const { value = [], rawError } = useField(`${name2}.${index}`);
5139
+ const [collapseToOpen, setCollapseToOpen] = React.useState("");
5140
+ React.useEffect(() => {
5141
+ if (rawError && value) {
5142
+ setCollapseToOpen(accordionValue);
5143
+ }
5144
+ }, [rawError, value, accordionValue]);
5156
5145
  const composedBoxRefs = useComposedRefs(boxRef, dropRef);
5157
5146
  const accordionActions = disabled ? null : /* @__PURE__ */ jsxs(Fragment, { children: [
5158
5147
  /* @__PURE__ */ jsx(
@@ -5218,10 +5207,9 @@ const DynamicComponent = ({
5218
5207
  ] })
5219
5208
  ] });
5220
5209
  const accordionTitle = title ? `${displayName} ${title}` : displayName;
5221
- const accordionValue = React.useId();
5222
5210
  return /* @__PURE__ */ jsxs(ComponentContainer, { tag: "li", width: "100%", children: [
5223
5211
  /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Rectangle, { background: "neutral200" }) }),
5224
- /* @__PURE__ */ jsx(StyledBox, { ref: composedBoxRefs, hasRadius: true, children: isDragging ? /* @__PURE__ */ jsx(Preview, {}) : /* @__PURE__ */ jsx(Accordion.Root, { children: /* @__PURE__ */ jsxs(Accordion.Item, { value: accordionValue, children: [
5212
+ /* @__PURE__ */ jsx(StyledBox, { ref: composedBoxRefs, hasRadius: true, children: isDragging ? /* @__PURE__ */ jsx(Preview, {}) : /* @__PURE__ */ jsx(Accordion.Root, { value: collapseToOpen, onValueChange: setCollapseToOpen, children: /* @__PURE__ */ jsxs(Accordion.Item, { value: accordionValue, children: [
5225
5213
  /* @__PURE__ */ jsxs(Accordion.Header, { children: [
5226
5214
  /* @__PURE__ */ jsx(
5227
5215
  Accordion.Trigger,
@@ -5232,21 +5220,39 @@ const DynamicComponent = ({
5232
5220
  ),
5233
5221
  /* @__PURE__ */ jsx(Accordion.Actions, { children: accordionActions })
5234
5222
  ] }),
5235
- /* @__PURE__ */ jsx(Accordion.Content, { children: /* @__PURE__ */ jsx(AccordionContentRadius, { background: "neutral0", children: /* @__PURE__ */ jsx(Box, { paddingLeft: 6, paddingRight: 6, paddingTop: 6, paddingBottom: 6, children: components[componentUid]?.layout?.map((row, rowInd) => /* @__PURE__ */ jsx(Grid$1.Root, { gap: 4, children: row.map(({ size, ...field }) => {
5236
- const fieldName = `${name2}.${index}.${field.name}`;
5237
- return /* @__PURE__ */ jsx(
5238
- Grid$1.Item,
5239
- {
5240
- col: size,
5241
- s: 12,
5242
- xs: 12,
5243
- direction: "column",
5244
- alignItems: "stretch",
5245
- children: /* @__PURE__ */ jsx(MemoizedInputRenderer, { ...field, name: fieldName })
5246
- },
5247
- fieldName
5248
- );
5249
- }) }, rowInd)) }) }) })
5223
+ /* @__PURE__ */ jsx(Accordion.Content, { children: /* @__PURE__ */ jsx(AccordionContentRadius, { background: "neutral0", children: /* @__PURE__ */ jsx(Box, { paddingLeft: 6, paddingRight: 6, paddingTop: 6, paddingBottom: 6, children: /* @__PURE__ */ jsx(Grid$1.Root, { gap: 4, children: components[componentUid]?.layout?.map((row, rowInd) => /* @__PURE__ */ jsx(
5224
+ Grid$1.Item,
5225
+ {
5226
+ col: 12,
5227
+ s: 12,
5228
+ xs: 12,
5229
+ direction: "column",
5230
+ alignItems: "stretch",
5231
+ children: /* @__PURE__ */ jsx(Grid$1.Root, { gap: 4, children: row.map(({ size, ...field }) => {
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
+ return /* @__PURE__ */ jsx(
5241
+ Grid$1.Item,
5242
+ {
5243
+ col: size,
5244
+ s: 12,
5245
+ xs: 12,
5246
+ direction: "column",
5247
+ alignItems: "stretch",
5248
+ children: /* @__PURE__ */ jsx(MemoizedInputRenderer, { ...fieldWithTranslatedLabel, name: fieldName })
5249
+ },
5250
+ fieldName
5251
+ );
5252
+ }) })
5253
+ },
5254
+ rowInd
5255
+ )) }) }) }) })
5250
5256
  ] }) }) })
5251
5257
  ] });
5252
5258
  };
@@ -5554,4 +5560,4 @@ export {
5554
5560
  transformDocument as t,
5555
5561
  useLazyComponents as u
5556
5562
  };
5557
- //# sourceMappingURL=Field-pb2o8uBe.mjs.map
5563
+ //# sourceMappingURL=Field-Bn1jgMeF.mjs.map