@strapi/content-type-builder 5.0.0-rc.2 → 5.0.0-rc.21

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 (34) hide show
  1. package/dist/_chunks/{ListView-XE65NvP8.js → ListView-BJkF062E.js} +21 -16
  2. package/dist/_chunks/ListView-BJkF062E.js.map +1 -0
  3. package/dist/_chunks/{ListView-yYLey9cN.mjs → ListView-ChHlVW9E.mjs} +21 -16
  4. package/dist/_chunks/ListView-ChHlVW9E.mjs.map +1 -0
  5. package/dist/_chunks/{index-BUl4iZYG.mjs → index-CclXDFWL.mjs} +10 -9
  6. package/dist/_chunks/{index-BUl4iZYG.mjs.map → index-CclXDFWL.mjs.map} +1 -1
  7. package/dist/_chunks/{index--5pQbGLD.js → index-DJuRylRg.js} +170 -60
  8. package/dist/_chunks/index-DJuRylRg.js.map +1 -0
  9. package/dist/_chunks/{index-b5GKS0j7.mjs → index-DoESWWlo.mjs} +171 -61
  10. package/dist/_chunks/index-DoESWWlo.mjs.map +1 -0
  11. package/dist/_chunks/{index-CcKr65ti.js → index-DrmFbRLA.js} +10 -9
  12. package/dist/_chunks/{index-CcKr65ti.js.map → index-DrmFbRLA.js.map} +1 -1
  13. package/dist/admin/index.js +1 -1
  14. package/dist/admin/index.mjs +1 -1
  15. package/dist/admin/src/components/FormModalNavigationProvider/constants.d.ts +1 -0
  16. package/dist/admin/src/contexts/FormModalNavigationContext.d.ts +2 -0
  17. package/dist/admin/src/utils/parseDateValue.d.ts +1 -0
  18. package/dist/admin/src/utils/timeFormat.d.ts +16 -0
  19. package/dist/server/index.js +91 -54
  20. package/dist/server/index.js.map +1 -1
  21. package/dist/server/index.mjs +92 -55
  22. package/dist/server/index.mjs.map +1 -1
  23. package/dist/server/src/controllers/validation/model-schema.d.ts.map +1 -1
  24. package/dist/server/src/services/builder.d.ts +4 -0
  25. package/dist/server/src/services/builder.d.ts.map +1 -1
  26. package/dist/server/src/services/constants.d.ts +0 -1
  27. package/dist/server/src/services/constants.d.ts.map +1 -1
  28. package/dist/server/src/services/schema-builder/content-type-builder.d.ts.map +1 -1
  29. package/package.json +9 -8
  30. package/dist/_chunks/ListView-XE65NvP8.js.map +0 -1
  31. package/dist/_chunks/ListView-yYLey9cN.mjs.map +0 -1
  32. package/dist/_chunks/index--5pQbGLD.js.map +0 -1
  33. package/dist/_chunks/index-b5GKS0j7.mjs.map +0 -1
  34. package/strapi-server.js +0 -3
@@ -9,7 +9,7 @@ const Icons = require("@strapi/icons");
9
9
  const reactDom = require("react-dom");
10
10
  const styledComponents = require("styled-components");
11
11
  const upperFirst = require("lodash/upperFirst");
12
- const index$1 = require("./index-CcKr65ti.js");
12
+ const index$1 = require("./index-DrmFbRLA.js");
13
13
  const isEqual = require("lodash/isEqual");
14
14
  const get = require("lodash/get");
15
15
  const groupBy = require("lodash/groupBy");
@@ -377,6 +377,17 @@ const useContentTypeBuilderMenu = () => {
377
377
  onSearchChange: setSearch
378
378
  };
379
379
  };
380
+ const SubNavLinkCustom = styledComponents.styled(designSystem.SubNavLink)`
381
+ div {
382
+ width: inherit;
383
+ span:nth-child(2) {
384
+ white-space: nowrap;
385
+ overflow: hidden;
386
+ text-overflow: ellipsis;
387
+ width: inherit;
388
+ }
389
+ }
390
+ `;
380
391
  const ContentTypeBuilderNav = () => {
381
392
  const { menu, searchValue, onSearchChange } = useContentTypeBuilderMenu();
382
393
  const { formatMessage } = reactIntl.useIntl();
@@ -425,7 +436,17 @@ const ContentTypeBuilderNav = () => {
425
436
  subLink.name
426
437
  )) }, link.name);
427
438
  }
428
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.SubNavLink, { tag: reactRouterDom.NavLink, to: link.to, active: link.active, children: upperFirst__default.default(formatMessage({ id: link.name, defaultMessage: link.title })) }, link.name);
439
+ return /* @__PURE__ */ jsxRuntime.jsx(
440
+ SubNavLinkCustom,
441
+ {
442
+ tag: reactRouterDom.NavLink,
443
+ to: link.to,
444
+ active: link.active,
445
+ width: "100%",
446
+ children: upperFirst__default.default(formatMessage({ id: link.name, defaultMessage: link.title }))
447
+ },
448
+ link.name
449
+ );
429
450
  })
430
451
  }
431
452
  ),
@@ -604,7 +625,7 @@ const AttributeOption = ({ type = "text" }) => {
604
625
  const AttributeList = ({ attributes }) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.KeyboardNavigable, { tagName: "button", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 8, children: attributes.map((attributeRow, index2) => {
605
626
  return (
606
627
  // eslint-disable-next-line react/no-array-index-key
607
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 3, children: attributeRow.map((attribute) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: 6, children: /* @__PURE__ */ jsxRuntime.jsx(AttributeOption, { type: attribute }) }, attribute)) }, index2)
628
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 3, children: attributeRow.map((attribute) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: 6, direction: "column", alignItems: "stretch", children: /* @__PURE__ */ jsxRuntime.jsx(AttributeOption, { type: attribute }) }, attribute)) }, index2)
608
629
  );
609
630
  }) }) });
610
631
  const CustomFieldOption = ({ customFieldUid, customField }) => {
@@ -685,7 +706,7 @@ const CustomFieldsList = () => {
685
706
  (a, b) => a[1].name > b[1].name ? 1 : -1
686
707
  );
687
708
  return /* @__PURE__ */ jsxRuntime.jsx(designSystem.KeyboardNavigable, { tagName: "button", children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 3, children: [
688
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 3, children: sortedCustomFields.map(([uid, customField]) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: 6, children: /* @__PURE__ */ jsxRuntime.jsx(CustomFieldOption, { customFieldUid: uid, customField }, uid) }, uid)) }),
709
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 3, children: sortedCustomFields.map(([uid, customField]) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: 6, direction: "column", alignItems: "stretch", children: /* @__PURE__ */ jsxRuntime.jsx(CustomFieldOption, { customFieldUid: uid, customField }, uid) }, uid)) }),
689
710
  /* @__PURE__ */ jsxRuntime.jsx(
690
711
  designSystem.Link,
691
712
  {
@@ -757,6 +778,9 @@ const Wrapper$1 = styledComponents.styled(designSystem.Flex)`
757
778
  cursor: pointer;
758
779
  user-select: none;
759
780
  flex: 1;
781
+ border-radius: 4px;
782
+ border: 1px solid ${({ theme }) => theme.colors.neutral200};
783
+
760
784
  ${designSystem.inputFocusStyle()}
761
785
  }
762
786
 
@@ -768,7 +792,6 @@ const Wrapper$1 = styledComponents.styled(designSystem.Flex)`
768
792
  .option {
769
793
  height: 100%;
770
794
  border-radius: 4px;
771
- border: 1px solid ${({ theme }) => theme.colors.neutral200};
772
795
  will-change: transform, opacity;
773
796
  background: ${({ theme }) => theme.colors.neutral0};
774
797
 
@@ -805,7 +828,6 @@ const Wrapper$1 = styledComponents.styled(designSystem.Flex)`
805
828
  .container input:checked ~ div {
806
829
  background: ${({ theme }) => theme.colors.primary100};
807
830
  color: ${({ theme }) => theme.colors.primary600};
808
- border: 1px solid ${({ theme }) => theme.colors.primary200};
809
831
  .checkmark {
810
832
  border: solid 1px ${({ theme }) => theme.colors.primary600};
811
833
  &::after {
@@ -971,10 +993,19 @@ const DraftAndPublishToggle = ({
971
993
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Checkbox, { checked: value, disabled, onCheckedChange: handleChange, children: label }),
972
994
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, {})
973
995
  ] }),
974
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Root, { open: showWarning, onOpenChange: (isOpen) => setShowWarning(isOpen), children: /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.ConfirmDialog, { onConfirm: handleConfirm, children: formatMessage({
975
- id: getTrad("popUpWarning.draft-publish.message"),
976
- defaultMessage: "If you disable the draft & publish, your drafts will be deleted."
977
- }) }) })
996
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Root, { open: showWarning, onOpenChange: (isOpen) => setShowWarning(isOpen), children: /* @__PURE__ */ jsxRuntime.jsx(
997
+ strapiAdmin.ConfirmDialog,
998
+ {
999
+ endAction: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: handleConfirm, variant: "danger", width: "100%", justifyContent: "center", children: formatMessage({
1000
+ id: getTrad("popUpWarning.draft-publish.button.confirm"),
1001
+ defaultMessage: "Yes, disable"
1002
+ }) }),
1003
+ children: formatMessage({
1004
+ id: getTrad("popUpWarning.draft-publish.message"),
1005
+ defaultMessage: "If you disable the draft & publish, your drafts will be deleted."
1006
+ })
1007
+ }
1008
+ ) })
978
1009
  ] });
979
1010
  };
980
1011
  const FormModalEndActions = ({
@@ -1739,7 +1770,7 @@ const IconPicker = ({ intlLabel, name, onChange, value = "" }) => {
1739
1770
  id: getTrad("IconPicker.search.button.label"),
1740
1771
  defaultMessage: "Search icon button"
1741
1772
  }),
1742
- borderWidth: 0,
1773
+ variant: "ghost",
1743
1774
  children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Search, {})
1744
1775
  }
1745
1776
  ),
@@ -1759,7 +1790,7 @@ const IconPicker = ({ intlLabel, name, onChange, value = "" }) => {
1759
1790
  id: getTrad("IconPicker.remove.button"),
1760
1791
  defaultMessage: "Remove the selected icon"
1761
1792
  }),
1762
- borderWidth: 0,
1793
+ variant: "ghost",
1763
1794
  children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Trash, {})
1764
1795
  }
1765
1796
  )
@@ -1840,6 +1871,49 @@ const PluralName = ({
1840
1871
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Error, {})
1841
1872
  ] });
1842
1873
  };
1874
+ const parseDateValue = (value) => {
1875
+ if (value instanceof Date && isValidDate(value)) {
1876
+ return value;
1877
+ }
1878
+ if (typeof value === "string" || typeof value === "number") {
1879
+ const date = new Date(value);
1880
+ if (isValidDate(date)) {
1881
+ return date;
1882
+ }
1883
+ }
1884
+ };
1885
+ const isValidDate = (date) => !isNaN(date.getTime());
1886
+ const removeSeconds = (time) => {
1887
+ const [hours, minutes] = time.split(":");
1888
+ return `${hours}:${minutes}`;
1889
+ };
1890
+ const addSecondsAndMilliseconds = (time) => {
1891
+ return time.split(":").length === 2 ? `${time}:00.000` : time;
1892
+ };
1893
+ const formatTimeForInput = (value) => {
1894
+ if (!value)
1895
+ return;
1896
+ return value.split(":").length > 2 ? removeSeconds(value) : value;
1897
+ };
1898
+ const formatTimeForOutput = (value) => {
1899
+ if (!value)
1900
+ return void 0;
1901
+ return addSecondsAndMilliseconds(value);
1902
+ };
1903
+ const handleTimeChange = ({ value }) => {
1904
+ const formattedInputTime = formatTimeForInput(value);
1905
+ return formattedInputTime;
1906
+ };
1907
+ const handleTimeChangeEvent = (onChange, name, type, time) => {
1908
+ const formattedOutputTime = formatTimeForOutput(time);
1909
+ onChange({
1910
+ target: {
1911
+ name,
1912
+ value: formattedOutputTime,
1913
+ type
1914
+ }
1915
+ });
1916
+ };
1843
1917
  const GenericInput = ({
1844
1918
  autoComplete,
1845
1919
  customInputs,
@@ -1991,6 +2065,7 @@ const GenericInput = ({
1991
2065
  );
1992
2066
  }
1993
2067
  case "datetime": {
2068
+ const dateValue = parseDateValue(value);
1994
2069
  return /* @__PURE__ */ jsxRuntime.jsx(
1995
2070
  designSystem.DateTimePicker,
1996
2071
  {
@@ -2002,11 +2077,12 @@ const GenericInput = ({
2002
2077
  },
2003
2078
  onClear: () => onChange({ target: { name, value: null, type } }),
2004
2079
  placeholder: formattedPlaceholder,
2005
- value
2080
+ value: dateValue
2006
2081
  }
2007
2082
  );
2008
2083
  }
2009
2084
  case "date": {
2085
+ const dateValue = parseDateValue(value);
2010
2086
  return /* @__PURE__ */ jsxRuntime.jsx(
2011
2087
  designSystem.DatePicker,
2012
2088
  {
@@ -2023,7 +2099,7 @@ const GenericInput = ({
2023
2099
  },
2024
2100
  onClear: () => onChange({ target: { name, value: null, type } }),
2025
2101
  placeholder: formattedPlaceholder,
2026
- value
2102
+ value: dateValue
2027
2103
  }
2028
2104
  );
2029
2105
  }
@@ -2135,23 +2211,15 @@ const GenericInput = ({
2135
2211
  );
2136
2212
  }
2137
2213
  case "time": {
2138
- let time = value;
2139
- if (typeof value === "string" && value.split(":").length > 2) {
2140
- const [hour, minute] = value.split(":");
2141
- time = `${hour}:${minute}`;
2142
- }
2214
+ const formattedValue = handleTimeChange({ value, onChange, name, type });
2143
2215
  return /* @__PURE__ */ jsxRuntime.jsx(
2144
2216
  designSystem.TimePicker,
2145
2217
  {
2146
2218
  clearLabel: formatMessage({ id: "clearLabel", defaultMessage: "Clear" }),
2147
2219
  disabled,
2148
- onChange: (time2) => {
2149
- onChange({ target: { name, value: `${time2}`, type } });
2150
- },
2151
- onClear: () => {
2152
- onChange({ target: { name, value: null, type } });
2153
- },
2154
- value: time
2220
+ onChange: (time) => handleTimeChangeEvent(onChange, name, type, time),
2221
+ onClear: () => handleTimeChangeEvent(onChange, name, type, void 0),
2222
+ value: formattedValue
2155
2223
  }
2156
2224
  );
2157
2225
  }
@@ -2291,9 +2359,11 @@ const RelationTargetPicker = ({
2291
2359
  ] });
2292
2360
  };
2293
2361
  const MenuTrigger = styledComponents.styled(designSystem.Menu.Trigger)`
2294
- svg {
2295
- width: 0.6rem;
2296
- height: 0.4rem;
2362
+ max-width: 16.8rem;
2363
+ span {
2364
+ white-space: nowrap;
2365
+ overflow: hidden;
2366
+ text-overflow: ellipsis;
2297
2367
  }
2298
2368
  `;
2299
2369
  const RelationFormBox = ({
@@ -2844,18 +2914,36 @@ const TabForm = ({
2844
2914
  null
2845
2915
  );
2846
2916
  if (input.type === "pushRight") {
2847
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: input.size || 6, children: /* @__PURE__ */ jsxRuntime.jsx("div", {}) }, input.name || key);
2917
+ return /* @__PURE__ */ jsxRuntime.jsx(
2918
+ designSystem.Grid.Item,
2919
+ {
2920
+ col: input.size || 6,
2921
+ direction: "column",
2922
+ alignItems: "stretch",
2923
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", {})
2924
+ },
2925
+ input.name || key
2926
+ );
2848
2927
  }
2849
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: input.size || 6, children: /* @__PURE__ */ jsxRuntime.jsx(
2850
- MemoizedGenericInput,
2928
+ return /* @__PURE__ */ jsxRuntime.jsx(
2929
+ designSystem.Grid.Item,
2851
2930
  {
2852
- ...input,
2853
- ...genericInputProps,
2854
- error: errorId,
2855
- onChange,
2856
- value
2857
- }
2858
- ) }, input.name || key);
2931
+ col: input.size || 6,
2932
+ direction: "column",
2933
+ alignItems: "stretch",
2934
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2935
+ MemoizedGenericInput,
2936
+ {
2937
+ ...input,
2938
+ ...genericInputProps,
2939
+ error: errorId,
2940
+ onChange,
2941
+ value
2942
+ }
2943
+ )
2944
+ },
2945
+ input.name || key
2946
+ );
2859
2947
  }) })
2860
2948
  ] }, sectionIndex);
2861
2949
  }) });
@@ -5046,9 +5134,10 @@ const FormModal = () => {
5046
5134
  kind,
5047
5135
  step,
5048
5136
  targetUid,
5049
- showBackLink
5137
+ showBackLink,
5138
+ activeTab,
5139
+ setActiveTab
5050
5140
  } = useFormModalNavigation();
5051
- const [activeTab, setActiveTab] = React__namespace.useState("basic");
5052
5141
  const getPlugin = strapiAdmin.useStrapiApp("FormModal", (state) => state.getPlugin);
5053
5142
  const getCustomField = strapiAdmin.useStrapiApp("FormModal", (state) => state.customFields.get);
5054
5143
  const customField = getCustomField(customFieldUid);
@@ -6109,7 +6198,7 @@ const DataManagerProvider = ({ children }) => {
6109
6198
  } = reactRedux.useSelector(makeSelectDataManagerProvider());
6110
6199
  const { toggleNotification } = strapiAdmin.useNotification();
6111
6200
  const { lockAppWithAutoreload, unlockAppWithAutoreload } = useAutoReloadOverlayBlocker();
6112
- const setCurrentStep = strapiAdmin.useGuidedTour("DataManagerProvider", (state) => state.setCurrentStep);
6201
+ const { setCurrentStep, setStepState } = strapiAdmin.useGuidedTour("DataManagerProvider", (state) => state);
6113
6202
  const getPlugin = strapiAdmin.useStrapiApp("DataManagerProvider", (state) => state.getPlugin);
6114
6203
  const plugin = getPlugin(index$1.pluginId);
6115
6204
  const autoReload = strapiAdmin.useAppInfo("DataManagerProvider", (state) => state.autoReload);
@@ -6438,10 +6527,10 @@ const DataManagerProvider = ({ children }) => {
6438
6527
  } else {
6439
6528
  await put(requestURL, body);
6440
6529
  }
6441
- await serverRestartWatcher(true);
6442
- unlockAppWithAutoreload?.();
6443
6530
  if (isCreating && (initialData.contentType?.schema.kind === "collectionType" || initialData.contentType?.schema.kind === "singleType")) {
6444
- setCurrentStep("contentTypeBuilder.success");
6531
+ setStepState("contentTypeBuilder.success", true);
6532
+ trackUsage("didCreateGuidedTourCollectionType");
6533
+ setCurrentStep(null);
6445
6534
  }
6446
6535
  if (isInContentTypeView) {
6447
6536
  trackUsage("didSaveContentType");
@@ -6453,6 +6542,8 @@ const DataManagerProvider = ({ children }) => {
6453
6542
  } else {
6454
6543
  trackUsage("didSaveComponent");
6455
6544
  }
6545
+ await serverRestartWatcher(true);
6546
+ unlockAppWithAutoreload?.();
6456
6547
  await getDataRef.current();
6457
6548
  dispatch({ type: index$1.UPDATE_INITIAL_STATE });
6458
6549
  await updatePermissions();
@@ -6532,7 +6623,8 @@ const INITIAL_STATE_DATA = {
6532
6623
  kind: null,
6533
6624
  step: null,
6534
6625
  targetUid: null,
6535
- customFieldUid: null
6626
+ customFieldUid: null,
6627
+ activeTab: "basic"
6536
6628
  };
6537
6629
  const FormModalNavigationProvider = ({ children }) => {
6538
6630
  const [state, setFormModalNavigationState] = React__namespace.useState(INITIAL_STATE_DATA);
@@ -6544,7 +6636,8 @@ const FormModalNavigationProvider = ({ children }) => {
6544
6636
  actionType: "create",
6545
6637
  modalType: "customField",
6546
6638
  attributeType,
6547
- customFieldUid
6639
+ customFieldUid,
6640
+ activeTab: "basic"
6548
6641
  };
6549
6642
  });
6550
6643
  };
@@ -6559,7 +6652,8 @@ const FormModalNavigationProvider = ({ children }) => {
6559
6652
  modalType: "attribute",
6560
6653
  step,
6561
6654
  attributeType,
6562
- showBackLink: true
6655
+ showBackLink: true,
6656
+ activeTab: "basic"
6563
6657
  };
6564
6658
  });
6565
6659
  };
@@ -6586,13 +6680,14 @@ const FormModalNavigationProvider = ({ children }) => {
6586
6680
  targetUid,
6587
6681
  modalType: "chooseAttribute",
6588
6682
  isOpen: true,
6589
- showBackLink: false
6683
+ showBackLink: false,
6684
+ activeTab: "basic"
6590
6685
  };
6591
6686
  });
6592
6687
  };
6593
6688
  const onOpenModalCreateSchema = (nextState) => {
6594
6689
  setFormModalNavigationState((prevState) => {
6595
- return { ...prevState, ...nextState, isOpen: true };
6690
+ return { ...prevState, ...nextState, isOpen: true, activeTab: "basic" };
6596
6691
  });
6597
6692
  };
6598
6693
  const onOpenModalEditCategory = (categoryName) => {
@@ -6602,7 +6697,8 @@ const FormModalNavigationProvider = ({ children }) => {
6602
6697
  categoryName,
6603
6698
  actionType: "edit",
6604
6699
  modalType: "editCategory",
6605
- isOpen: true
6700
+ isOpen: true,
6701
+ activeTab: "basic"
6606
6702
  };
6607
6703
  });
6608
6704
  };
@@ -6623,7 +6719,8 @@ const FormModalNavigationProvider = ({ children }) => {
6623
6719
  targetUid,
6624
6720
  attributeName,
6625
6721
  attributeType,
6626
- isOpen: true
6722
+ isOpen: true,
6723
+ activeTab: "basic"
6627
6724
  };
6628
6725
  });
6629
6726
  };
@@ -6657,7 +6754,8 @@ const FormModalNavigationProvider = ({ children }) => {
6657
6754
  forTarget,
6658
6755
  targetUid,
6659
6756
  kind,
6660
- isOpen: true
6757
+ isOpen: true,
6758
+ activeTab: "basic"
6661
6759
  };
6662
6760
  });
6663
6761
  };
@@ -6670,7 +6768,8 @@ const FormModalNavigationProvider = ({ children }) => {
6670
6768
  ...prev,
6671
6769
  forTarget,
6672
6770
  targetUid,
6673
- modalType: "chooseAttribute"
6771
+ modalType: "chooseAttribute",
6772
+ activeTab: "basic"
6674
6773
  };
6675
6774
  });
6676
6775
  };
@@ -6680,7 +6779,8 @@ const FormModalNavigationProvider = ({ children }) => {
6680
6779
  ...prev,
6681
6780
  attributeType: "component",
6682
6781
  modalType: "attribute",
6683
- step: "2"
6782
+ step: "2",
6783
+ activeTab: "basic"
6684
6784
  };
6685
6785
  });
6686
6786
  };
@@ -6693,7 +6793,16 @@ const FormModalNavigationProvider = ({ children }) => {
6693
6793
  actionType: "create",
6694
6794
  step: "1",
6695
6795
  attributeType: null,
6696
- attributeName: null
6796
+ attributeName: null,
6797
+ activeTab: "basic"
6798
+ };
6799
+ });
6800
+ };
6801
+ const setActiveTab = (value) => {
6802
+ setFormModalNavigationState((prev) => {
6803
+ return {
6804
+ ...prev,
6805
+ activeTab: value
6697
6806
  };
6698
6807
  });
6699
6808
  };
@@ -6715,17 +6824,18 @@ const FormModalNavigationProvider = ({ children }) => {
6715
6824
  onOpenModalEditField,
6716
6825
  onOpenModalEditCustomField,
6717
6826
  onOpenModalEditSchema,
6718
- setFormModalNavigationState
6827
+ setFormModalNavigationState,
6828
+ setActiveTab
6719
6829
  },
6720
6830
  children
6721
6831
  }
6722
6832
  );
6723
6833
  };
6724
- const ListView$1 = React.lazy(() => Promise.resolve().then(() => require("./ListView-XE65NvP8.js")));
6834
+ const ListView$1 = React.lazy(() => Promise.resolve().then(() => require("./ListView-BJkF062E.js")));
6725
6835
  const RecursivePath = () => {
6726
6836
  return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Loading, {}), children: /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Routes, { children: /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Route, { path: `/:componentUid`, element: /* @__PURE__ */ jsxRuntime.jsx(ListView$1, {}) }) }) });
6727
6837
  };
6728
- const ListView = React.lazy(() => Promise.resolve().then(() => require("./ListView-XE65NvP8.js")));
6838
+ const ListView = React.lazy(() => Promise.resolve().then(() => require("./ListView-BJkF062E.js")));
6729
6839
  const App = () => {
6730
6840
  const { formatMessage } = reactIntl.useIntl();
6731
6841
  const title = formatMessage({
@@ -6757,4 +6867,4 @@ exports.getTrad = getTrad;
6757
6867
  exports.index = index;
6758
6868
  exports.useDataManager = useDataManager;
6759
6869
  exports.useFormModalNavigation = useFormModalNavigation;
6760
- //# sourceMappingURL=index--5pQbGLD.js.map
6870
+ //# sourceMappingURL=index-DJuRylRg.js.map