@strapi/content-type-builder 5.0.0-rc.8 → 5.0.0-rc.9

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.
@@ -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-DgZgByqn.js");
12
+ const index$1 = require("./index-nJaZni0J.js");
13
13
  const isEqual = require("lodash/isEqual");
14
14
  const get = require("lodash/get");
15
15
  const groupBy = require("lodash/groupBy");
@@ -625,7 +625,7 @@ const AttributeOption = ({ type = "text" }) => {
625
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) => {
626
626
  return (
627
627
  // eslint-disable-next-line react/no-array-index-key
628
- /* @__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)
629
629
  );
630
630
  }) }) });
631
631
  const CustomFieldOption = ({ customFieldUid, customField }) => {
@@ -706,7 +706,7 @@ const CustomFieldsList = () => {
706
706
  (a, b) => a[1].name > b[1].name ? 1 : -1
707
707
  );
708
708
  return /* @__PURE__ */ jsxRuntime.jsx(designSystem.KeyboardNavigable, { tagName: "button", children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 3, children: [
709
- /* @__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)) }),
710
710
  /* @__PURE__ */ jsxRuntime.jsx(
711
711
  designSystem.Link,
712
712
  {
@@ -992,10 +992,19 @@ const DraftAndPublishToggle = ({
992
992
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Checkbox, { checked: value, disabled, onCheckedChange: handleChange, children: label }),
993
993
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, {})
994
994
  ] }),
995
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Root, { open: showWarning, onOpenChange: (isOpen) => setShowWarning(isOpen), children: /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.ConfirmDialog, { onConfirm: handleConfirm, children: formatMessage({
996
- id: getTrad("popUpWarning.draft-publish.message"),
997
- defaultMessage: "If you disable the draft & publish, your drafts will be deleted."
998
- }) }) })
995
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Root, { open: showWarning, onOpenChange: (isOpen) => setShowWarning(isOpen), children: /* @__PURE__ */ jsxRuntime.jsx(
996
+ strapiAdmin.ConfirmDialog,
997
+ {
998
+ endAction: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: handleConfirm, variant: "danger", width: "100%", justifyContent: "center", children: formatMessage({
999
+ id: getTrad("popUpWarning.draft-publish.button.confirm"),
1000
+ defaultMessage: "Yes, disable"
1001
+ }) }),
1002
+ children: formatMessage({
1003
+ id: getTrad("popUpWarning.draft-publish.message"),
1004
+ defaultMessage: "If you disable the draft & publish, your drafts will be deleted."
1005
+ })
1006
+ }
1007
+ ) })
999
1008
  ] });
1000
1009
  };
1001
1010
  const FormModalEndActions = ({
@@ -1760,7 +1769,7 @@ const IconPicker = ({ intlLabel, name, onChange, value = "" }) => {
1760
1769
  id: getTrad("IconPicker.search.button.label"),
1761
1770
  defaultMessage: "Search icon button"
1762
1771
  }),
1763
- borderWidth: 0,
1772
+ variant: "ghost",
1764
1773
  children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Search, {})
1765
1774
  }
1766
1775
  ),
@@ -1780,7 +1789,7 @@ const IconPicker = ({ intlLabel, name, onChange, value = "" }) => {
1780
1789
  id: getTrad("IconPicker.remove.button"),
1781
1790
  defaultMessage: "Remove the selected icon"
1782
1791
  }),
1783
- borderWidth: 0,
1792
+ variant: "ghost",
1784
1793
  children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Trash, {})
1785
1794
  }
1786
1795
  )
@@ -2871,18 +2880,36 @@ const TabForm = ({
2871
2880
  null
2872
2881
  );
2873
2882
  if (input.type === "pushRight") {
2874
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: input.size || 6, children: /* @__PURE__ */ jsxRuntime.jsx("div", {}) }, input.name || key);
2883
+ return /* @__PURE__ */ jsxRuntime.jsx(
2884
+ designSystem.Grid.Item,
2885
+ {
2886
+ col: input.size || 6,
2887
+ direction: "column",
2888
+ alignItems: "stretch",
2889
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", {})
2890
+ },
2891
+ input.name || key
2892
+ );
2875
2893
  }
2876
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: input.size || 6, children: /* @__PURE__ */ jsxRuntime.jsx(
2877
- MemoizedGenericInput,
2894
+ return /* @__PURE__ */ jsxRuntime.jsx(
2895
+ designSystem.Grid.Item,
2878
2896
  {
2879
- ...input,
2880
- ...genericInputProps,
2881
- error: errorId,
2882
- onChange,
2883
- value
2884
- }
2885
- ) }, input.name || key);
2897
+ col: input.size || 6,
2898
+ direction: "column",
2899
+ alignItems: "stretch",
2900
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2901
+ MemoizedGenericInput,
2902
+ {
2903
+ ...input,
2904
+ ...genericInputProps,
2905
+ error: errorId,
2906
+ onChange,
2907
+ value
2908
+ }
2909
+ )
2910
+ },
2911
+ input.name || key
2912
+ );
2886
2913
  }) })
2887
2914
  ] }, sectionIndex);
2888
2915
  }) });
@@ -6748,11 +6775,11 @@ const FormModalNavigationProvider = ({ children }) => {
6748
6775
  }
6749
6776
  );
6750
6777
  };
6751
- const ListView$1 = React.lazy(() => Promise.resolve().then(() => require("./ListView-BlRO0hDC.js")));
6778
+ const ListView$1 = React.lazy(() => Promise.resolve().then(() => require("./ListView-BUKiiZrv.js")));
6752
6779
  const RecursivePath = () => {
6753
6780
  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, {}) }) }) });
6754
6781
  };
6755
- const ListView = React.lazy(() => Promise.resolve().then(() => require("./ListView-BlRO0hDC.js")));
6782
+ const ListView = React.lazy(() => Promise.resolve().then(() => require("./ListView-BUKiiZrv.js")));
6756
6783
  const App = () => {
6757
6784
  const { formatMessage } = reactIntl.useIntl();
6758
6785
  const title = formatMessage({
@@ -6784,4 +6811,4 @@ exports.getTrad = getTrad;
6784
6811
  exports.index = index;
6785
6812
  exports.useDataManager = useDataManager;
6786
6813
  exports.useFormModalNavigation = useFormModalNavigation;
6787
- //# sourceMappingURL=index-BLF1AIxt.js.map
6814
+ //# sourceMappingURL=index-Hl6JWkwo.js.map