@firecms/collection_editor 3.0.0-canary.225 → 3.0.0-canary.226

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.
package/dist/index.es.js CHANGED
@@ -699,19 +699,8 @@ function CollectionDetailsForm(t0) {
699
699
  t80 = (v) => {
700
700
  if (v === "code_defined") {
701
701
  throw new Error("This should not happen");
702
- } else {
703
- if (v === "true") {
704
- setFieldValue("customId", true);
705
- } else {
706
- if (v === "false") {
707
- setFieldValue("customId", false);
708
- } else {
709
- if (v === "optional") {
710
- setFieldValue("customId", "optional");
711
- }
712
- }
713
- }
714
702
  }
703
+ setFieldValue("customId", v);
715
704
  };
716
705
  $[116] = setFieldValue;
717
706
  $[117] = t80;
@@ -759,7 +748,7 @@ function CollectionDetailsForm(t0) {
759
748
  const t87 = values.collectionGroup ?? false;
760
749
  let t88;
761
750
  if ($[127] !== t86 || $[128] !== t87) {
762
- t88 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", label: "Collection group", onValueChange: t86, value: t87 });
751
+ t88 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "large", label: "Collection group", onValueChange: t86, value: t87 });
763
752
  $[127] = t86;
764
753
  $[128] = t87;
765
754
  $[129] = t88;
@@ -775,7 +764,7 @@ function CollectionDetailsForm(t0) {
775
764
  }
776
765
  let t90;
777
766
  if ($[131] !== t88) {
778
- t90 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
767
+ t90 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 mt-4", children: [
779
768
  t88,
780
769
  t89
781
770
  ] });
@@ -795,7 +784,7 @@ function CollectionDetailsForm(t0) {
795
784
  const t92 = values.textSearchEnabled ?? false;
796
785
  let t93;
797
786
  if ($[135] !== t91 || $[136] !== t92) {
798
- t93 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", label: "Enable text search for this collection", onValueChange: t91, value: t92 });
787
+ t93 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "large", label: "Enable text search for this collection", onValueChange: t91, value: t92 });
799
788
  $[135] = t91;
800
789
  $[136] = t92;
801
790
  $[137] = t93;
@@ -6603,9 +6592,11 @@ function WidgetSelectViewItem(t0) {
6603
6592
  }
6604
6593
  function camelCase(str) {
6605
6594
  if (!str) return "";
6606
- return (str.slice(0, 1).toLowerCase() + str.slice(1)).replace(/([-_ ]){1,}/g, " ").split(/[-_ ]/).reduce((cur, acc) => {
6607
- return cur + acc[0].toUpperCase() + acc.substring(1);
6608
- }, "");
6595
+ if (str.length === 1) return str.toLowerCase();
6596
+ const parts = str.split(/[-_ ]+/).filter(Boolean);
6597
+ if (parts.length === 0) return "";
6598
+ return parts[0].toLowerCase() + // Transform remaining parts to have first letter uppercase
6599
+ parts.slice(1).map((part) => part.charAt(0).toUpperCase() + part.substring(1).toLowerCase()).join("");
6609
6600
  }
6610
6601
  function GetCodeDialog(t0) {
6611
6602
  const $ = c(22);