@strapi/content-manager 5.0.0-rc.3 → 5.0.0-rc.30

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 (120) hide show
  1. package/dist/_chunks/{ComponentConfigurationPage-BAgyHiMm.mjs → ComponentConfigurationPage-DfFSZQxe.mjs} +3 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-BAgyHiMm.mjs.map → ComponentConfigurationPage-DfFSZQxe.mjs.map} +1 -1
  3. package/dist/_chunks/{ComponentConfigurationPage-5ukroXAh.js → ComponentConfigurationPage-FqfsxQ1j.js} +3 -3
  4. package/dist/_chunks/{ComponentConfigurationPage-5ukroXAh.js.map → ComponentConfigurationPage-FqfsxQ1j.js.map} +1 -1
  5. package/dist/_chunks/{EditConfigurationPage-Xp7lun0f.js → EditConfigurationPage-Cn0e8t3I.js} +3 -3
  6. package/dist/_chunks/{EditConfigurationPage-Xp7lun0f.js.map → EditConfigurationPage-Cn0e8t3I.js.map} +1 -1
  7. package/dist/_chunks/{EditConfigurationPage-DmoXawIh.mjs → EditConfigurationPage-DdPNAbl3.mjs} +3 -3
  8. package/dist/_chunks/{EditConfigurationPage-DmoXawIh.mjs.map → EditConfigurationPage-DdPNAbl3.mjs.map} +1 -1
  9. package/dist/_chunks/{EditViewPage-BLsjc5F-.mjs → EditViewPage-B82x_x1b.mjs} +30 -9
  10. package/dist/_chunks/EditViewPage-B82x_x1b.mjs.map +1 -0
  11. package/dist/_chunks/{EditViewPage-C-ukDOB7.js → EditViewPage-DlxEHhUt.js} +30 -9
  12. package/dist/_chunks/EditViewPage-DlxEHhUt.js.map +1 -0
  13. package/dist/_chunks/{Field-Bfph5SOd.js → Field-COL25JiC.js} +174 -102
  14. package/dist/_chunks/Field-COL25JiC.js.map +1 -0
  15. package/dist/_chunks/{Field-Cs7duwWd.mjs → Field-DufHXW17.mjs} +172 -100
  16. package/dist/_chunks/Field-DufHXW17.mjs.map +1 -0
  17. package/dist/_chunks/{Form-CPYqIWDG.js → Form-BssUwrTO.js} +36 -17
  18. package/dist/_chunks/Form-BssUwrTO.js.map +1 -0
  19. package/dist/_chunks/{Form-Dg_GS5TQ.mjs → Form-u_kAOhwB.mjs} +36 -17
  20. package/dist/_chunks/Form-u_kAOhwB.mjs.map +1 -0
  21. package/dist/_chunks/{History-DNQkXANT.js → History-C9t9UqpO.js} +23 -10
  22. package/dist/_chunks/History-C9t9UqpO.js.map +1 -0
  23. package/dist/_chunks/{History-wrnHqf09.mjs → History-DRwA3oMM.mjs} +24 -11
  24. package/dist/_chunks/History-DRwA3oMM.mjs.map +1 -0
  25. package/dist/_chunks/{ListConfigurationPage-CUQxfpjT.js → ListConfigurationPage-BXYPohh-.js} +14 -4
  26. package/dist/_chunks/ListConfigurationPage-BXYPohh-.js.map +1 -0
  27. package/dist/_chunks/{ListConfigurationPage-DScmJVkW.mjs → ListConfigurationPage-BxfQJzPk.mjs} +14 -4
  28. package/dist/_chunks/ListConfigurationPage-BxfQJzPk.mjs.map +1 -0
  29. package/dist/_chunks/{ListViewPage-C4IvrMgY.mjs → ListViewPage-CELx2ysp.mjs} +47 -38
  30. package/dist/_chunks/ListViewPage-CELx2ysp.mjs.map +1 -0
  31. package/dist/_chunks/{ListViewPage-BsLiH2-2.js → ListViewPage-D2VD8Szg.js} +49 -40
  32. package/dist/_chunks/ListViewPage-D2VD8Szg.js.map +1 -0
  33. package/dist/_chunks/{NoContentTypePage-BZ-PnGAf.js → NoContentTypePage-BV9IjJSM.js} +2 -2
  34. package/dist/_chunks/{NoContentTypePage-BZ-PnGAf.js.map → NoContentTypePage-BV9IjJSM.js.map} +1 -1
  35. package/dist/_chunks/{NoContentTypePage-Djg8nPlj.mjs → NoContentTypePage-DtJ9jcfk.mjs} +2 -2
  36. package/dist/_chunks/{NoContentTypePage-Djg8nPlj.mjs.map → NoContentTypePage-DtJ9jcfk.mjs.map} +1 -1
  37. package/dist/_chunks/{NoPermissionsPage-DSP7R-hv.mjs → NoPermissionsPage-DWleVYK7.mjs} +2 -2
  38. package/dist/_chunks/{NoPermissionsPage-DSP7R-hv.mjs.map → NoPermissionsPage-DWleVYK7.mjs.map} +1 -1
  39. package/dist/_chunks/{NoPermissionsPage-_lUqjGW3.js → NoPermissionsPage-Dp8NpF9I.js} +2 -2
  40. package/dist/_chunks/{NoPermissionsPage-_lUqjGW3.js.map → NoPermissionsPage-Dp8NpF9I.js.map} +1 -1
  41. package/dist/_chunks/{Relations-BZr8tL0R.mjs → Relations-BTcf5xaw.mjs} +33 -24
  42. package/dist/_chunks/Relations-BTcf5xaw.mjs.map +1 -0
  43. package/dist/_chunks/{Relations-CtELXYIK.js → Relations-DR7EUgyC.js} +33 -24
  44. package/dist/_chunks/Relations-DR7EUgyC.js.map +1 -0
  45. package/dist/_chunks/{en-uOUIxfcQ.js → en-Bm0D0IWz.js} +13 -12
  46. package/dist/_chunks/{en-uOUIxfcQ.js.map → en-Bm0D0IWz.js.map} +1 -1
  47. package/dist/_chunks/{en-BrCTWlZv.mjs → en-DKV44jRb.mjs} +13 -12
  48. package/dist/_chunks/{en-BrCTWlZv.mjs.map → en-DKV44jRb.mjs.map} +1 -1
  49. package/dist/_chunks/{index-OerGjbAN.js → index-BdMf2lfT.js} +1921 -1758
  50. package/dist/_chunks/index-BdMf2lfT.js.map +1 -0
  51. package/dist/_chunks/{index-c_5DdJi-.mjs → index-wnqzm4Q8.mjs} +1941 -1778
  52. package/dist/_chunks/index-wnqzm4Q8.mjs.map +1 -0
  53. package/dist/_chunks/{layout-oPBiO7RY.mjs → layout-2CfjL0T9.mjs} +22 -9
  54. package/dist/_chunks/layout-2CfjL0T9.mjs.map +1 -0
  55. package/dist/_chunks/{layout-Ci7qHlFb.js → layout-B2MyZU-_.js} +21 -8
  56. package/dist/_chunks/layout-B2MyZU-_.js.map +1 -0
  57. package/dist/_chunks/{relations-COBpStiF.js → relations-BH7JJGGe.js} +2 -2
  58. package/dist/_chunks/{relations-COBpStiF.js.map → relations-BH7JJGGe.js.map} +1 -1
  59. package/dist/_chunks/{relations-BIdWFjdq.mjs → relations-C0w0GcXi.mjs} +2 -2
  60. package/dist/_chunks/{relations-BIdWFjdq.mjs.map → relations-C0w0GcXi.mjs.map} +1 -1
  61. package/dist/_chunks/{usePrev-B9w_-eYc.js → useDebounce-CtcjDB3L.js} +14 -1
  62. package/dist/_chunks/useDebounce-CtcjDB3L.js.map +1 -0
  63. package/dist/_chunks/useDebounce-DmuSJIF3.mjs +29 -0
  64. package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +1 -0
  65. package/dist/admin/index.js +2 -1
  66. package/dist/admin/index.js.map +1 -1
  67. package/dist/admin/index.mjs +5 -4
  68. package/dist/admin/src/exports.d.ts +1 -1
  69. package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
  70. package/dist/admin/src/hooks/useDocument.d.ts +32 -1
  71. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.d.ts +2 -2
  72. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.d.ts +2 -2
  73. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +4 -48
  74. package/dist/admin/src/pages/EditView/components/Header.d.ts +11 -11
  75. package/dist/admin/src/services/api.d.ts +1 -1
  76. package/dist/admin/src/services/components.d.ts +2 -2
  77. package/dist/admin/src/services/contentTypes.d.ts +3 -3
  78. package/dist/admin/src/services/documents.d.ts +19 -17
  79. package/dist/admin/src/services/init.d.ts +1 -1
  80. package/dist/admin/src/services/relations.d.ts +2 -2
  81. package/dist/admin/src/services/uid.d.ts +3 -3
  82. package/dist/admin/src/utils/validation.d.ts +4 -1
  83. package/dist/server/index.js +170 -92
  84. package/dist/server/index.js.map +1 -1
  85. package/dist/server/index.mjs +171 -93
  86. package/dist/server/index.mjs.map +1 -1
  87. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  88. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  89. package/dist/server/src/history/services/history.d.ts.map +1 -1
  90. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  91. package/dist/server/src/history/services/utils.d.ts +2 -1
  92. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  93. package/dist/server/src/policies/hasPermissions.d.ts.map +1 -1
  94. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  95. package/dist/server/src/services/permission-checker.d.ts.map +1 -1
  96. package/dist/shared/contracts/collection-types.d.ts +3 -1
  97. package/dist/shared/contracts/collection-types.d.ts.map +1 -1
  98. package/package.json +12 -12
  99. package/dist/_chunks/EditViewPage-BLsjc5F-.mjs.map +0 -1
  100. package/dist/_chunks/EditViewPage-C-ukDOB7.js.map +0 -1
  101. package/dist/_chunks/Field-Bfph5SOd.js.map +0 -1
  102. package/dist/_chunks/Field-Cs7duwWd.mjs.map +0 -1
  103. package/dist/_chunks/Form-CPYqIWDG.js.map +0 -1
  104. package/dist/_chunks/Form-Dg_GS5TQ.mjs.map +0 -1
  105. package/dist/_chunks/History-DNQkXANT.js.map +0 -1
  106. package/dist/_chunks/History-wrnHqf09.mjs.map +0 -1
  107. package/dist/_chunks/ListConfigurationPage-CUQxfpjT.js.map +0 -1
  108. package/dist/_chunks/ListConfigurationPage-DScmJVkW.mjs.map +0 -1
  109. package/dist/_chunks/ListViewPage-BsLiH2-2.js.map +0 -1
  110. package/dist/_chunks/ListViewPage-C4IvrMgY.mjs.map +0 -1
  111. package/dist/_chunks/Relations-BZr8tL0R.mjs.map +0 -1
  112. package/dist/_chunks/Relations-CtELXYIK.js.map +0 -1
  113. package/dist/_chunks/index-OerGjbAN.js.map +0 -1
  114. package/dist/_chunks/index-c_5DdJi-.mjs.map +0 -1
  115. package/dist/_chunks/layout-Ci7qHlFb.js.map +0 -1
  116. package/dist/_chunks/layout-oPBiO7RY.mjs.map +0 -1
  117. package/dist/_chunks/usePrev-B9w_-eYc.js.map +0 -1
  118. package/dist/_chunks/usePrev-DH6iah0A.mjs +0 -16
  119. package/dist/_chunks/usePrev-DH6iah0A.mjs.map +0 -1
  120. package/strapi-server.js +0 -3
@@ -5,9 +5,9 @@ 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-OerGjbAN.js");
8
+ const index = require("./index-BdMf2lfT.js");
9
9
  const fractionalIndexing = require("fractional-indexing");
10
- const Relations = require("./Relations-CtELXYIK.js");
10
+ const Relations = require("./Relations-DR7EUgyC.js");
11
11
  const Icons = require("@strapi/icons");
12
12
  const styledComponents = require("styled-components");
13
13
  const ComponentIcon = require("./ComponentIcon-BXdiCGQp.js");
@@ -17,7 +17,7 @@ const objects = require("./objects-gigeqt7s.js");
17
17
  const slate = require("slate");
18
18
  const slateHistory = require("slate-history");
19
19
  const slateReact = require("slate-react");
20
- const usePrev = require("./usePrev-B9w_-eYc.js");
20
+ const useDebounce = require("./useDebounce-CtcjDB3L.js");
21
21
  const Toolbar = require("@radix-ui/react-toolbar");
22
22
  const reactRouterDom = require("react-router-dom");
23
23
  const CodeMirror = require("codemirror5");
@@ -768,7 +768,7 @@ const ImageDialog = () => {
768
768
  const nodeImage = {
769
769
  ...expectedImage,
770
770
  alternativeText: expectedImage.alternativeText || expectedImage.name,
771
- url: usePrev.prefixFileUrlWithBackendUrl(image.url)
771
+ url: useDebounce.prefixFileUrlWithBackendUrl(image.url)
772
772
  };
773
773
  return nodeImage;
774
774
  });
@@ -1441,7 +1441,7 @@ const ToolbarButton = ({
1441
1441
  width: 7,
1442
1442
  height: 7,
1443
1443
  hasRadius: true,
1444
- children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { width: "1.2rem", height: "1.2rem", fill: disabled ? "neutral300" : enabledColor })
1444
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { fill: disabled ? "neutral300" : enabledColor })
1445
1445
  }
1446
1446
  )
1447
1447
  }
@@ -1783,6 +1783,7 @@ const DragItem = styledComponents.styled(designSystem.Flex)`
1783
1783
  }
1784
1784
  `;
1785
1785
  const DragIconButton = styledComponents.styled(designSystem.IconButton)`
1786
+ user-select: none;
1786
1787
  display: flex;
1787
1788
  align-items: center;
1788
1789
  justify-content: center;
@@ -1911,6 +1912,7 @@ const DragAndDropElement = ({
1911
1912
  DragIconButton,
1912
1913
  {
1913
1914
  tag: "div",
1915
+ contentEditable: false,
1914
1916
  role: "button",
1915
1917
  tabIndex: 0,
1916
1918
  withTooltip: false,
@@ -2706,7 +2708,18 @@ const NonRepeatableComponent = ({
2706
2708
  children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 6, children: layout.map((row, index2) => {
2707
2709
  return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
2708
2710
  const completeFieldName = `${name2}.${field.name}`;
2709
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: size, s: 12, xs: 12, children: children({ ...field, name: completeFieldName }) }, completeFieldName);
2711
+ return /* @__PURE__ */ jsxRuntime.jsx(
2712
+ designSystem.Grid.Item,
2713
+ {
2714
+ col: size,
2715
+ s: 12,
2716
+ xs: 12,
2717
+ direction: "column",
2718
+ alignItems: "stretch",
2719
+ children: children({ ...field, name: completeFieldName })
2720
+ },
2721
+ completeFieldName
2722
+ );
2710
2723
  }) }, index2);
2711
2724
  }) })
2712
2725
  }
@@ -2725,13 +2738,34 @@ const RepeatableComponent = ({
2725
2738
  const { search: searchString } = reactRouterDom.useLocation();
2726
2739
  const search = React__namespace.useMemo(() => new URLSearchParams(searchString), [searchString]);
2727
2740
  const { components } = index.useDoc();
2728
- const { value = [], error } = strapiAdmin.useField(name2);
2741
+ const {
2742
+ value = [],
2743
+ error,
2744
+ rawError
2745
+ } = strapiAdmin.useField(name2);
2729
2746
  const addFieldRow = strapiAdmin.useForm("RepeatableComponent", (state) => state.addFieldRow);
2730
2747
  const moveFieldRow = strapiAdmin.useForm("RepeatableComponent", (state) => state.moveFieldRow);
2731
2748
  const removeFieldRow = strapiAdmin.useForm("RepeatableComponent", (state) => state.removeFieldRow);
2732
2749
  const { max = Infinity } = attribute;
2733
2750
  const [collapseToOpen, setCollapseToOpen] = React__namespace.useState("");
2734
2751
  const [liveText, setLiveText] = React__namespace.useState("");
2752
+ React__namespace.useEffect(() => {
2753
+ const hasNestedErrors = rawError && Array.isArray(rawError) && rawError.length > 0;
2754
+ const hasNestedValue = value && Array.isArray(value) && value.length > 0;
2755
+ if (hasNestedErrors && hasNestedValue) {
2756
+ const errorOpenItems = rawError.map((_, idx) => {
2757
+ return value[idx] ? value[idx].__temp_key__ : null;
2758
+ }).filter((value2) => !!value2);
2759
+ if (errorOpenItems && errorOpenItems.length > 0) {
2760
+ setCollapseToOpen((collapseToOpen2) => {
2761
+ if (!errorOpenItems.includes(collapseToOpen2)) {
2762
+ return errorOpenItems[0];
2763
+ }
2764
+ return collapseToOpen2;
2765
+ });
2766
+ }
2767
+ }
2768
+ }, [rawError, value]);
2735
2769
  const componentTmpKeyWithFocussedField = React__namespace.useMemo(() => {
2736
2770
  if (search.has("field")) {
2737
2771
  const fieldParam = search.get("field");
@@ -2746,7 +2780,7 @@ const RepeatableComponent = ({
2746
2780
  }
2747
2781
  return void 0;
2748
2782
  }, [search, name2, value]);
2749
- const prevValue = usePrev.usePrev(value);
2783
+ const prevValue = useDebounce.usePrev(value);
2750
2784
  React__namespace.useEffect(() => {
2751
2785
  if (prevValue && prevValue.length < value.length) {
2752
2786
  setCollapseToOpen(value[value.length - 1].__temp_key__);
@@ -2884,7 +2918,18 @@ const RepeatableComponent = ({
2884
2918
  children: layout.map((row, index22) => {
2885
2919
  return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
2886
2920
  const completeFieldName = `${nameWithIndex}.${field.name}`;
2887
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: size, s: 12, xs: 12, children: children({ ...field, name: completeFieldName }) }, completeFieldName);
2921
+ return /* @__PURE__ */ jsxRuntime.jsx(
2922
+ designSystem.Grid.Item,
2923
+ {
2924
+ col: size,
2925
+ s: 12,
2926
+ xs: 12,
2927
+ direction: "column",
2928
+ alignItems: "stretch",
2929
+ children: children({ ...field, name: completeFieldName })
2930
+ },
2931
+ completeFieldName
2932
+ );
2888
2933
  }) }, index22);
2889
2934
  })
2890
2935
  }
@@ -2979,7 +3024,7 @@ const Component = ({
2979
3024
  /* @__PURE__ */ jsxRuntime.jsx(
2980
3025
  designSystem.IconButton,
2981
3026
  {
2982
- borderWidth: 0,
3027
+ variant: "ghost",
2983
3028
  onClick: onDeleteComponent,
2984
3029
  label: formatMessage({
2985
3030
  id: index.getTranslation("containers.Edit.delete"),
@@ -2992,7 +3037,7 @@ const Component = ({
2992
3037
  designSystem.IconButton,
2993
3038
  {
2994
3039
  ref: composedAccordionRefs,
2995
- borderWidth: 0,
3040
+ variant: "ghost",
2996
3041
  onClick: (e) => e.stopPropagation(),
2997
3042
  "data-handler-id": handlerId,
2998
3043
  label: formatMessage({
@@ -3062,7 +3107,7 @@ const ComponentInput = ({
3062
3107
  id: index.getTranslation("components.reset-entry"),
3063
3108
  defaultMessage: "Reset Entry"
3064
3109
  }),
3065
- borderWidth: 0,
3110
+ variant: "ghost",
3066
3111
  onClick: () => {
3067
3112
  field.onChange(name2, null);
3068
3113
  },
@@ -3091,11 +3136,8 @@ const AddComponentButton = ({
3091
3136
  onClick,
3092
3137
  disabled: isDisabled,
3093
3138
  background: "neutral0",
3094
- paddingTop: 3,
3095
- paddingBottom: 3,
3096
- paddingLeft: 4,
3097
- paddingRight: 4,
3098
3139
  style: { cursor: isDisabled ? "not-allowed" : "pointer" },
3140
+ variant: "tertiary",
3099
3141
  children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { tag: "span", gap: 2, children: [
3100
3142
  /* @__PURE__ */ jsxRuntime.jsx(StyledAddIcon, { "aria-hidden": true, $isOpen: isOpen, $hasError: hasError && !isOpen }),
3101
3143
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3124,10 +3166,11 @@ const StyledAddIcon = styledComponents.styled(Icons.PlusCircle)`
3124
3166
  }
3125
3167
  `;
3126
3168
  const AddComponentTitle = styledComponents.styled(designSystem.Typography)``;
3127
- const StyledButton = styledComponents.styled(designSystem.BaseButton)`
3169
+ const StyledButton = styledComponents.styled(designSystem.Button)`
3128
3170
  border-radius: 26px;
3129
3171
  border-color: ${({ theme }) => theme.colors.neutral150};
3130
3172
  box-shadow: ${({ theme }) => theme.shadows.filterShadow};
3173
+ height: 5rem;
3131
3174
 
3132
3175
  &:hover {
3133
3176
  ${AddComponentTitle} {
@@ -3139,7 +3182,7 @@ const StyledButton = styledComponents.styled(designSystem.BaseButton)`
3139
3182
  fill: ${({ theme }) => theme.colors.primary600};
3140
3183
  }
3141
3184
  > path {
3142
- fill: ${({ theme }) => theme.colors.neutral100};
3185
+ fill: ${({ theme }) => theme.colors.primary600};
3143
3186
  }
3144
3187
  }
3145
3188
  }
@@ -3270,18 +3313,6 @@ const NotAllowedInput = ({ hint, label, required, name: name2 }) => {
3270
3313
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, {})
3271
3314
  ] });
3272
3315
  };
3273
- function useDebounce(value, delay) {
3274
- const [debouncedValue, setDebouncedValue] = React.useState(value);
3275
- React.useEffect(() => {
3276
- const handler = setTimeout(() => {
3277
- setDebouncedValue(value);
3278
- }, delay);
3279
- return () => {
3280
- clearTimeout(handler);
3281
- };
3282
- }, [value, delay]);
3283
- return debouncedValue;
3284
- }
3285
3316
  const uidApi = index.contentManagerApi.injectEndpoints({
3286
3317
  endpoints: (builder) => ({
3287
3318
  getDefaultUID: builder.query({
@@ -3316,7 +3347,10 @@ const uidApi = index.contentManagerApi.injectEndpoints({
3316
3347
  config: {
3317
3348
  params
3318
3349
  }
3319
- })
3350
+ }),
3351
+ providesTags: (_res, _error, params) => [
3352
+ { type: "UidAvailability", id: params.contentTypeUID }
3353
+ ]
3320
3354
  })
3321
3355
  })
3322
3356
  });
@@ -3328,8 +3362,10 @@ const UIDInput = React__namespace.forwardRef(
3328
3362
  const allFormValues = strapiAdmin.useForm("InputUID", (form) => form.values);
3329
3363
  const [availability, setAvailability] = React__namespace.useState();
3330
3364
  const [showRegenerate, setShowRegenerate] = React__namespace.useState(false);
3365
+ const isCloning = reactRouterDom.useMatch(index.CLONE_PATH) !== null;
3331
3366
  const field = strapiAdmin.useField(name2);
3332
- const debouncedValue = useDebounce(field.value, 300);
3367
+ const debouncedValue = useDebounce.useDebounce(field.value, 300);
3368
+ const hasChanged = debouncedValue !== field.initialValue;
3333
3369
  const { toggleNotification } = strapiAdmin.useNotification();
3334
3370
  const { _unstableFormatAPIError: formatAPIError } = strapiAdmin.useAPIErrorHandler();
3335
3371
  const { formatMessage } = reactIntl.useIntl();
@@ -3405,8 +3441,9 @@ const UIDInput = React__namespace.forwardRef(
3405
3441
  params
3406
3442
  },
3407
3443
  {
3444
+ // Don't check availability if the value is empty or wasn't changed
3408
3445
  skip: !Boolean(
3409
- debouncedValue !== field.initialValue && debouncedValue && UID_REGEX.test(debouncedValue.trim())
3446
+ (hasChanged || isCloning) && debouncedValue && UID_REGEX.test(debouncedValue.trim())
3410
3447
  )
3411
3448
  }
3412
3449
  );
@@ -3435,6 +3472,7 @@ const UIDInput = React__namespace.forwardRef(
3435
3472
  const isLoading = isGeneratingDefaultUID || isGeneratingUID || isCheckingAvailability;
3436
3473
  const fieldRef = strapiAdmin.useFocusInputField(name2);
3437
3474
  const composedRefs = designSystem.useComposedRefs(ref, fieldRef);
3475
+ const shouldShowAvailability = (hasChanged || isCloning) && debouncedValue != null && availability && !showRegenerate;
3438
3476
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { hint, name: name2, error: field.error, required, children: [
3439
3477
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { action: labelAction, children: label }),
3440
3478
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3443,7 +3481,7 @@ const UIDInput = React__namespace.forwardRef(
3443
3481
  ref: composedRefs,
3444
3482
  disabled: props.disabled,
3445
3483
  endAction: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { position: "relative", gap: 1, children: [
3446
- availability && !showRegenerate && /* @__PURE__ */ jsxRuntime.jsxs(
3484
+ shouldShowAvailability && /* @__PURE__ */ jsxRuntime.jsxs(
3447
3485
  TextValidation,
3448
3486
  {
3449
3487
  alignItems: "center",
@@ -4277,7 +4315,7 @@ const EditorLayout = ({
4277
4315
  justifyContent: "flex-end",
4278
4316
  shrink: 0,
4279
4317
  width: "100%",
4280
- children: /* @__PURE__ */ jsxRuntime.jsxs(ExpandButton$1, { onClick: onCollapse, children: [
4318
+ children: /* @__PURE__ */ jsxRuntime.jsxs(ExpandButton$1, { onClick: onCollapse, variant: "tertiary", size: "M", children: [
4281
4319
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: formatMessage({
4282
4320
  id: "components.Wysiwyg.collapse",
4283
4321
  defaultMessage: "Collapse"
@@ -4295,12 +4333,14 @@ const EditorLayout = ({
4295
4333
  ) }) });
4296
4334
  }
4297
4335
  return /* @__PURE__ */ jsxRuntime.jsx(
4298
- designSystem.Box,
4336
+ designSystem.Flex,
4299
4337
  {
4300
4338
  borderColor: error ? "danger600" : "neutral200",
4301
4339
  borderStyle: "solid",
4302
4340
  borderWidth: "1px",
4303
4341
  hasRadius: true,
4342
+ direction: "column",
4343
+ alignItems: "stretch",
4304
4344
  children
4305
4345
  }
4306
4346
  );
@@ -4311,11 +4351,19 @@ const ExpandWrapper = styledComponents.styled(designSystem.Flex)`
4311
4351
  const BoxWithBorder = styledComponents.styled(designSystem.Box)`
4312
4352
  border-right: 1px solid ${({ theme }) => theme.colors.neutral200};
4313
4353
  `;
4314
- const ExpandButton$1 = styledComponents.styled(designSystem.BaseButton)`
4354
+ const ExpandButton$1 = styledComponents.styled(designSystem.Button)`
4315
4355
  background-color: transparent;
4316
4356
  border: none;
4317
4357
  align-items: center;
4318
4358
 
4359
+ & > span {
4360
+ display: flex;
4361
+ justify-content: space-between;
4362
+ align-items: center;
4363
+ width: 100%;
4364
+ font-weight: ${({ theme }) => theme.fontWeights.regular};
4365
+ }
4366
+
4319
4367
  svg {
4320
4368
  margin-left: ${({ theme }) => `${theme.spaces[2]}`};
4321
4369
 
@@ -4582,40 +4630,28 @@ const quoteAndCodeHandler = (editor, markdownType) => {
4582
4630
  insertWithoutTextToEdit(editor, markdownType, line, contentLength);
4583
4631
  }
4584
4632
  };
4585
- const CustomIconButton = styledComponents.styled(designSystem.IconButton)`
4586
- padding: ${({ theme }) => theme.spaces[2]};
4587
-
4588
- svg {
4589
- width: 1.8rem;
4590
- height: 1.8rem;
4591
- }
4592
- `;
4593
- const CustomLinkIconButton = styledComponents.styled(CustomIconButton)`
4594
- svg {
4595
- width: 0.8rem;
4596
- height: 0.8rem;
4597
- }
4598
- `;
4599
4633
  const MainButtons = styledComponents.styled(designSystem.IconButtonGroup)`
4600
4634
  margin-left: ${({ theme }) => theme.spaces[4]};
4601
4635
  `;
4602
4636
  const MoreButton = styledComponents.styled(designSystem.IconButton)`
4603
4637
  margin: ${({ theme }) => `0 ${theme.spaces[2]}`};
4604
- padding: ${({ theme }) => theme.spaces[2]};
4605
-
4606
- svg {
4607
- width: 1.8rem;
4608
- height: 1.8rem;
4609
- }
4610
4638
  `;
4611
4639
  const IconButtonGroupMargin = styledComponents.styled(designSystem.IconButtonGroup)`
4612
4640
  margin-right: ${({ theme }) => `${theme.spaces[2]}`};
4613
4641
  `;
4614
- const ExpandButton = styledComponents.styled(designSystem.BaseButton)`
4642
+ const ExpandButton = styledComponents.styled(designSystem.Button)`
4615
4643
  background-color: transparent;
4616
4644
  border: none;
4617
4645
  align-items: center;
4618
4646
 
4647
+ & > span {
4648
+ display: flex;
4649
+ justify-content: space-between;
4650
+ align-items: center;
4651
+ width: 100%;
4652
+ font-weight: ${({ theme }) => theme.fontWeights.regular};
4653
+ }
4654
+
4619
4655
  svg {
4620
4656
  margin-left: ${({ theme }) => `${theme.spaces[2]}`};
4621
4657
  path {
@@ -4627,7 +4663,7 @@ const ExpandButton = styledComponents.styled(designSystem.BaseButton)`
4627
4663
  `;
4628
4664
  const WysiwygFooter = ({ onToggleExpand }) => {
4629
4665
  const { formatMessage } = reactIntl.useIntl();
4630
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 2, background: "neutral100", borderRadius: `0 0 0.4rem 0.4rem`, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "flex-end", alignItems: "flex-end", children: /* @__PURE__ */ jsxRuntime.jsxs(ExpandButton, { id: "expand", onClick: onToggleExpand, children: [
4666
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 2, background: "neutral100", borderRadius: `0 0 0.4rem 0.4rem`, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "flex-end", alignItems: "flex-end", children: /* @__PURE__ */ jsxRuntime.jsxs(ExpandButton, { id: "expand", onClick: onToggleExpand, variant: "tertiary", size: "M", children: [
4631
4667
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", children: formatMessage({
4632
4668
  id: "components.WysiwygBottomControls.fullscreen",
4633
4669
  defaultMessage: "Expand"
@@ -4664,18 +4700,27 @@ const WysiwygNav = ({
4664
4700
  borderRadius: `0.4rem 0.4rem 0 0`,
4665
4701
  children: [
4666
4702
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { children: [
4667
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.SingleSelect, { disabled: true, placeholder: selectPlaceholder, "aria-label": selectPlaceholder, children: [
4668
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h1", children: "h1" }),
4669
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h2", children: "h2" }),
4670
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h3", children: "h3" }),
4671
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h4", children: "h4" }),
4672
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h5", children: "h5" }),
4673
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h6", children: "h6" })
4674
- ] }) }),
4703
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { children: /* @__PURE__ */ jsxRuntime.jsxs(
4704
+ designSystem.SingleSelect,
4705
+ {
4706
+ disabled: true,
4707
+ placeholder: selectPlaceholder,
4708
+ "aria-label": selectPlaceholder,
4709
+ size: "S",
4710
+ children: [
4711
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h1", children: "h1" }),
4712
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h2", children: "h2" }),
4713
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h3", children: "h3" }),
4714
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h4", children: "h4" }),
4715
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h5", children: "h5" }),
4716
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h6", children: "h6" })
4717
+ ]
4718
+ }
4719
+ ) }),
4675
4720
  /* @__PURE__ */ jsxRuntime.jsxs(MainButtons, { children: [
4676
- /* @__PURE__ */ jsxRuntime.jsx(CustomIconButton, { disabled: true, label: "Bold", name: "Bold", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Bold, {}) }),
4677
- /* @__PURE__ */ jsxRuntime.jsx(CustomIconButton, { disabled: true, label: "Italic", name: "Italic", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Italic, {}) }),
4678
- /* @__PURE__ */ jsxRuntime.jsx(CustomIconButton, { disabled: true, label: "Underline", name: "Underline", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Underline, {}) })
4721
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.IconButton, { disabled: true, label: "Bold", name: "Bold", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Bold, {}) }),
4722
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.IconButton, { disabled: true, label: "Italic", name: "Italic", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Italic, {}) }),
4723
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.IconButton, { disabled: true, label: "Underline", name: "Underline", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Underline, {}) })
4679
4724
  ] }),
4680
4725
  /* @__PURE__ */ jsxRuntime.jsx(MoreButton, { disabled: true, label: "More", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.More, {}) })
4681
4726
  ] }),
@@ -4702,6 +4747,7 @@ const WysiwygNav = ({
4702
4747
  placeholder: selectPlaceholder,
4703
4748
  "aria-label": selectPlaceholder,
4704
4749
  onChange: (value) => onActionClick(value, editorRef),
4750
+ size: "S",
4705
4751
  children: [
4706
4752
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h1", children: "h1" }),
4707
4753
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h2", children: "h2" }),
@@ -4713,17 +4759,9 @@ const WysiwygNav = ({
4713
4759
  }
4714
4760
  ) }),
4715
4761
  /* @__PURE__ */ jsxRuntime.jsxs(MainButtons, { children: [
4762
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.IconButton, { onClick: () => onActionClick("Bold", editorRef), label: "Bold", name: "Bold", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Bold, {}) }),
4716
4763
  /* @__PURE__ */ jsxRuntime.jsx(
4717
- CustomIconButton,
4718
- {
4719
- onClick: () => onActionClick("Bold", editorRef),
4720
- label: "Bold",
4721
- name: "Bold",
4722
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Bold, {})
4723
- }
4724
- ),
4725
- /* @__PURE__ */ jsxRuntime.jsx(
4726
- CustomIconButton,
4764
+ designSystem.IconButton,
4727
4765
  {
4728
4766
  onClick: () => onActionClick("Italic", editorRef),
4729
4767
  label: "Italic",
@@ -4732,7 +4770,7 @@ const WysiwygNav = ({
4732
4770
  }
4733
4771
  ),
4734
4772
  /* @__PURE__ */ jsxRuntime.jsx(
4735
- CustomIconButton,
4773
+ designSystem.IconButton,
4736
4774
  {
4737
4775
  onClick: () => onActionClick("Underline", editorRef),
4738
4776
  label: "Underline",
@@ -4746,7 +4784,7 @@ const WysiwygNav = ({
4746
4784
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Content, { sideOffset: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { padding: 2, children: [
4747
4785
  /* @__PURE__ */ jsxRuntime.jsxs(IconButtonGroupMargin, { children: [
4748
4786
  /* @__PURE__ */ jsxRuntime.jsx(
4749
- CustomIconButton,
4787
+ designSystem.IconButton,
4750
4788
  {
4751
4789
  onClick: () => onActionClick("Strikethrough", editorRef, handleTogglePopover),
4752
4790
  label: "Strikethrough",
@@ -4755,7 +4793,7 @@ const WysiwygNav = ({
4755
4793
  }
4756
4794
  ),
4757
4795
  /* @__PURE__ */ jsxRuntime.jsx(
4758
- CustomIconButton,
4796
+ designSystem.IconButton,
4759
4797
  {
4760
4798
  onClick: () => onActionClick("BulletList", editorRef, handleTogglePopover),
4761
4799
  label: "BulletList",
@@ -4764,7 +4802,7 @@ const WysiwygNav = ({
4764
4802
  }
4765
4803
  ),
4766
4804
  /* @__PURE__ */ jsxRuntime.jsx(
4767
- CustomIconButton,
4805
+ designSystem.IconButton,
4768
4806
  {
4769
4807
  onClick: () => onActionClick("NumberList", editorRef, handleTogglePopover),
4770
4808
  label: "NumberList",
@@ -4775,7 +4813,7 @@ const WysiwygNav = ({
4775
4813
  ] }),
4776
4814
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.IconButtonGroup, { children: [
4777
4815
  /* @__PURE__ */ jsxRuntime.jsx(
4778
- CustomIconButton,
4816
+ designSystem.IconButton,
4779
4817
  {
4780
4818
  onClick: () => onActionClick("Code", editorRef, handleTogglePopover),
4781
4819
  label: "Code",
@@ -4784,7 +4822,7 @@ const WysiwygNav = ({
4784
4822
  }
4785
4823
  ),
4786
4824
  /* @__PURE__ */ jsxRuntime.jsx(
4787
- CustomIconButton,
4825
+ designSystem.IconButton,
4788
4826
  {
4789
4827
  onClick: () => {
4790
4828
  handleTogglePopover();
@@ -4796,7 +4834,7 @@ const WysiwygNav = ({
4796
4834
  }
4797
4835
  ),
4798
4836
  /* @__PURE__ */ jsxRuntime.jsx(
4799
- CustomLinkIconButton,
4837
+ designSystem.IconButton,
4800
4838
  {
4801
4839
  onClick: () => onActionClick("Link", editorRef, handleTogglePopover),
4802
4840
  label: "Link",
@@ -4805,7 +4843,7 @@ const WysiwygNav = ({
4805
4843
  }
4806
4844
  ),
4807
4845
  /* @__PURE__ */ jsxRuntime.jsx(
4808
- CustomIconButton,
4846
+ designSystem.IconButton,
4809
4847
  {
4810
4848
  onClick: () => onActionClick("Quote", editorRef, handleTogglePopover),
4811
4849
  label: "Quote",
@@ -4883,7 +4921,7 @@ const Wysiwyg = React__namespace.forwardRef(
4883
4921
  const handleSelectAssets = (files) => {
4884
4922
  const formattedFiles = files.map((f) => ({
4885
4923
  alt: f.alternativeText || f.name,
4886
- url: usePrev.prefixFileUrlWithBackendUrl(f.url),
4924
+ url: useDebounce.prefixFileUrlWithBackendUrl(f.url),
4887
4925
  mime: f.mime
4888
4926
  }));
4889
4927
  insertFile(editorRef, formattedFiles);
@@ -4942,15 +4980,19 @@ const Wysiwyg = React__namespace.forwardRef(
4942
4980
  );
4943
4981
  const MemoizedWysiwyg = React__namespace.memo(Wysiwyg);
4944
4982
  const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
4945
- const { id } = index.useDoc();
4983
+ const { id, document: document2, collectionType } = index.useDoc();
4946
4984
  const isFormDisabled = strapiAdmin.useForm("InputRenderer", (state) => state.disabled);
4947
4985
  const isInDynamicZone = useDynamicZone("isInDynamicZone", (state) => state.isInDynamicZone);
4948
4986
  const canCreateFields = index.useDocumentRBAC("InputRenderer", (rbac) => rbac.canCreateFields);
4949
4987
  const canReadFields = index.useDocumentRBAC("InputRenderer", (rbac) => rbac.canReadFields);
4950
4988
  const canUpdateFields = index.useDocumentRBAC("InputRenderer", (rbac) => rbac.canUpdateFields);
4951
4989
  const canUserAction = index.useDocumentRBAC("InputRenderer", (rbac) => rbac.canUserAction);
4952
- const editableFields = id ? canUpdateFields : canCreateFields;
4953
- const readableFields = id ? canReadFields : canCreateFields;
4990
+ let idToCheck = id;
4991
+ if (collectionType === index.SINGLE_TYPES) {
4992
+ idToCheck = document2?.documentId;
4993
+ }
4994
+ const editableFields = idToCheck ? canUpdateFields : canCreateFields;
4995
+ const readableFields = idToCheck ? canReadFields : canCreateFields;
4954
4996
  const canUserReadField = canUserAction(props.name, readableFields, props.type);
4955
4997
  const canUserEditField = canUserAction(props.name, editableFields, props.type);
4956
4998
  const fields = strapiAdmin.useStrapiApp("InputRenderer", (app) => app.fields);
@@ -4961,6 +5003,7 @@ const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
4961
5003
  const {
4962
5004
  edit: { components }
4963
5005
  } = index.useDocLayout();
5006
+ const field = strapiAdmin.useField(props.name);
4964
5007
  if (!visible) {
4965
5008
  return null;
4966
5009
  }
@@ -4971,7 +5014,7 @@ const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
4971
5014
  if (attributeHasCustomFieldProperty(props.attribute)) {
4972
5015
  const CustomInput = lazyComponentStore[props.attribute.customField];
4973
5016
  if (CustomInput) {
4974
- return /* @__PURE__ */ jsxRuntime.jsx(CustomInput, { ...props, hint, disabled: fieldIsDisabled });
5017
+ return /* @__PURE__ */ jsxRuntime.jsx(CustomInput, { ...props, ...field, hint, disabled: fieldIsDisabled });
4975
5018
  }
4976
5019
  return /* @__PURE__ */ jsxRuntime.jsx(
4977
5020
  strapiAdmin.InputRenderer,
@@ -5132,12 +5175,20 @@ const DynamicComponent = ({
5132
5175
  React__namespace.useEffect(() => {
5133
5176
  dragPreviewRef(reactDndHtml5Backend.getEmptyImage(), { captureDraggingState: false });
5134
5177
  }, [dragPreviewRef, index$1]);
5178
+ const accordionValue = React__namespace.useId();
5179
+ const { value = [], rawError } = strapiAdmin.useField(`${name2}.${index$1}`);
5180
+ const [collapseToOpen, setCollapseToOpen] = React__namespace.useState("");
5181
+ React__namespace.useEffect(() => {
5182
+ if (rawError && value) {
5183
+ setCollapseToOpen(accordionValue);
5184
+ }
5185
+ }, [rawError, value, accordionValue]);
5135
5186
  const composedBoxRefs = designSystem.useComposedRefs(boxRef, dropRef);
5136
5187
  const accordionActions = disabled ? null : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5137
5188
  /* @__PURE__ */ jsxRuntime.jsx(
5138
5189
  designSystem.IconButton,
5139
5190
  {
5140
- borderWidth: 0,
5191
+ variant: "ghost",
5141
5192
  label: formatMessage(
5142
5193
  {
5143
5194
  id: index.getTranslation("components.DynamicZone.delete-label"),
@@ -5152,7 +5203,7 @@ const DynamicComponent = ({
5152
5203
  /* @__PURE__ */ jsxRuntime.jsx(
5153
5204
  designSystem.IconButton,
5154
5205
  {
5155
- borderWidth: 0,
5206
+ variant: "ghost",
5156
5207
  onClick: (e) => e.stopPropagation(),
5157
5208
  "data-handler-id": handlerId,
5158
5209
  ref: dragRef,
@@ -5197,10 +5248,9 @@ const DynamicComponent = ({
5197
5248
  ] })
5198
5249
  ] });
5199
5250
  const accordionTitle = title ? `${displayName} ${title}` : displayName;
5200
- const accordionValue = React__namespace.useId();
5201
5251
  return /* @__PURE__ */ jsxRuntime.jsxs(ComponentContainer, { tag: "li", width: "100%", children: [
5202
5252
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(Rectangle, { background: "neutral200" }) }),
5203
- /* @__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: [
5253
+ /* @__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: [
5204
5254
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Accordion.Header, { children: [
5205
5255
  /* @__PURE__ */ jsxRuntime.jsx(
5206
5256
  designSystem.Accordion.Trigger,
@@ -5211,10 +5261,32 @@ const DynamicComponent = ({
5211
5261
  ),
5212
5262
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Actions, { children: accordionActions })
5213
5263
  ] }),
5214
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(AccordionContentRadius, { background: "neutral0", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingLeft: 6, paddingRight: 6, paddingTop: 6, paddingBottom: 6, children: components[componentUid]?.layout?.map((row, rowInd) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
5215
- const fieldName = `${name2}.${index$1}.${field.name}`;
5216
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: size, s: 12, xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(MemoizedInputRenderer, { ...field, name: fieldName }) }, fieldName);
5217
- }) }, rowInd)) }) }) })
5264
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(AccordionContentRadius, { background: "neutral0", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingLeft: 6, paddingRight: 6, paddingTop: 6, paddingBottom: 6, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: components[componentUid]?.layout?.map((row, rowInd) => /* @__PURE__ */ jsxRuntime.jsx(
5265
+ designSystem.Grid.Item,
5266
+ {
5267
+ col: 12,
5268
+ s: 12,
5269
+ xs: 12,
5270
+ direction: "column",
5271
+ alignItems: "stretch",
5272
+ children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
5273
+ const fieldName = `${name2}.${index$1}.${field.name}`;
5274
+ return /* @__PURE__ */ jsxRuntime.jsx(
5275
+ designSystem.Grid.Item,
5276
+ {
5277
+ col: size,
5278
+ s: 12,
5279
+ xs: 12,
5280
+ direction: "column",
5281
+ alignItems: "stretch",
5282
+ children: /* @__PURE__ */ jsxRuntime.jsx(MemoizedInputRenderer, { ...field, name: fieldName })
5283
+ },
5284
+ fieldName
5285
+ );
5286
+ }) })
5287
+ },
5288
+ rowInd
5289
+ )) }) }) }) })
5218
5290
  ] }) }) })
5219
5291
  ] });
5220
5292
  };
@@ -5520,4 +5592,4 @@ exports.transformDocument = transformDocument;
5520
5592
  exports.useDynamicZone = useDynamicZone;
5521
5593
  exports.useFieldHint = useFieldHint;
5522
5594
  exports.useLazyComponents = useLazyComponents;
5523
- //# sourceMappingURL=Field-Bfph5SOd.js.map
5595
+ //# sourceMappingURL=Field-COL25JiC.js.map