@firecms/collection_editor 3.0.0-rc.4 → 3.0.0-tw4.13

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.umd.js CHANGED
@@ -499,7 +499,7 @@
499
499
  }
500
500
  let t41;
501
501
  if ($[66] === Symbol.for("react.memo_cache_sentinel")) {
502
- t41 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row text-surface-500", children: [
502
+ t41 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row text-surface-500 text-text-secondary dark:text-text-secondary-dark", children: [
503
503
  /* @__PURE__ */ jsxRuntime.jsx(ui.SettingsIcon, {}),
504
504
  /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "ml-2", children: "Advanced" })
505
505
  ] });
@@ -1995,7 +1995,7 @@
1995
1995
  } = t0;
1996
1996
  let t1;
1997
1997
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1998
- t1 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row text-surface-500", children: [
1998
+ t1 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row text-surface-500 text-text-secondary dark:text-text-secondary-dark", children: [
1999
1999
  /* @__PURE__ */ jsxRuntime.jsx(ui.RuleIcon, {}),
2000
2000
  /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "ml-4", children: "Validation" })
2001
2001
  ] });
@@ -2190,7 +2190,7 @@
2190
2190
  t21 = "col-span-12";
2191
2191
  T1 = ui.ExpandablePanel;
2192
2192
  if ($[55] === Symbol.for("react.memo_cache_sentinel")) {
2193
- t20 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row text-surface-500", children: [
2193
+ t20 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row text-surface-500 text-text-secondary dark:text-text-secondary-dark", children: [
2194
2194
  /* @__PURE__ */ jsxRuntime.jsx(ui.CloudUploadIcon, {}),
2195
2195
  /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "ml-4", children: "File upload config" })
2196
2196
  ] });
@@ -2783,7 +2783,7 @@
2783
2783
  }
2784
2784
  const propertyConfig = t1;
2785
2785
  editableProperty(property);
2786
- const borderColorClass = hasError ? "border-red-500 dark:border-red-500 border-opacity-100 dark:border-opacity-100 ring-0 dark:ring-0" : selected ? "border-primary" : "border-transparent";
2786
+ const borderColorClass = hasError ? "border-red-500 dark:border-red-500 border-opacity-100 dark:border-opacity-100 border-red-500/100 dark:border-red-500/100 ring-0 dark:ring-0" : selected ? "border-primary" : "border-transparent";
2787
2787
  let t2;
2788
2788
  if ($[3] !== propertyConfig) {
2789
2789
  t2 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "m-4", children: /* @__PURE__ */ jsxRuntime.jsx(core.PropertyConfigBadge, { propertyConfig }) });
@@ -3978,7 +3978,7 @@
3978
3978
  const newIdValue = e_0.target.value;
3979
3979
  const nameTouched = formex.getIn(touched, "name");
3980
3980
  if (!nameTouched && autoUpdateId) {
3981
- setFieldValue("name", newIdValue ? core.unslugify(newIdValue) : "");
3981
+ setFieldValue("name", newIdValue ? core.prettifyIdentifier(newIdValue) : "");
3982
3982
  }
3983
3983
  setFieldValue("id", newIdValue, true);
3984
3984
  setFieldTouched("id", true);
@@ -7501,7 +7501,7 @@
7501
7501
  setSelectedPropertyKey(propertyKey_2);
7502
7502
  setSelectedPropertyNamespace(namespace_5);
7503
7503
  };
7504
- const body = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 gap-2 h-full bg-white dark:bg-surface-950", children: [
7504
+ const body = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 gap-2 h-full bg-surface dark:bg-surface-dark", children: [
7505
7505
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cls("bg-surface-50 dark:bg-surface-900", "p-4 md:p-8 pb-20 md:pb-20", "col-span-12 lg:col-span-5 h-full overflow-auto", !asDialog && "border-r " + ui.defaultBorderMixin), children: [
7506
7506
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex my-2", children: [
7507
7507
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-grow mb-4", children: [
@@ -8593,265 +8593,202 @@
8593
8593
  }
8594
8594
  };
8595
8595
  function CollectionEditorWelcomeView(t0) {
8596
- const $ = reactCompilerRuntime.c(56);
8596
+ const $ = reactCompilerRuntime.c(39);
8597
8597
  const {
8598
- path,
8599
- pathSuggestions,
8600
8598
  parentCollection,
8601
8599
  onContinue,
8602
8600
  existingCollectionPaths
8603
8601
  } = t0;
8604
- const [loadingPathSuggestions, setLoadingPathSuggestions] = React.useState(false);
8605
- const [filteredPathSuggestions, setFilteredPathSuggestions] = React.useState();
8602
+ const {
8603
+ pathSuggestions
8604
+ } = useCollectionEditorController();
8606
8605
  let t1;
8606
+ if ($[0] !== pathSuggestions) {
8607
+ t1 = pathSuggestions ?? [];
8608
+ $[0] = pathSuggestions;
8609
+ $[1] = t1;
8610
+ } else {
8611
+ t1 = $[1];
8612
+ }
8607
8613
  let t2;
8608
- if ($[0] !== existingCollectionPaths || $[1] !== path || $[2] !== pathSuggestions) {
8609
- t1 = () => {
8610
- if (pathSuggestions && existingCollectionPaths) {
8611
- setLoadingPathSuggestions(true);
8612
- pathSuggestions(path).then((suggestions) => {
8613
- const filteredSuggestions = suggestions.filter((s) => !(existingCollectionPaths ?? []).find((c) => c.trim().toLowerCase() === s.trim().toLowerCase()));
8614
- setFilteredPathSuggestions(filteredSuggestions);
8615
- }).finally(() => setLoadingPathSuggestions(false));
8616
- }
8617
- };
8618
- t2 = [existingCollectionPaths, path, pathSuggestions];
8619
- $[0] = existingCollectionPaths;
8620
- $[1] = path;
8621
- $[2] = pathSuggestions;
8622
- $[3] = t1;
8623
- $[4] = t2;
8614
+ if ($[2] !== existingCollectionPaths) {
8615
+ t2 = (s) => !(existingCollectionPaths ?? []).find((c) => c.trim().toLowerCase() === s.trim().toLowerCase());
8616
+ $[2] = existingCollectionPaths;
8617
+ $[3] = t2;
8624
8618
  } else {
8625
- t1 = $[3];
8626
- t2 = $[4];
8619
+ t2 = $[3];
8627
8620
  }
8628
- React.useEffect(t1, t2);
8621
+ const filteredSuggestions = t1.filter(t2);
8629
8622
  const {
8630
8623
  setFieldValue,
8631
8624
  setValues
8632
8625
  } = formex.useFormex();
8633
- const noSuggestions = !loadingPathSuggestions && (filteredPathSuggestions ?? [])?.length === 0;
8634
- if (!noSuggestions) {
8635
- return null;
8636
- }
8637
- let t3;
8638
- if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
8639
- t3 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row py-2 pt-3 items-center", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "h4", className: "flex-grow", children: "New collection" }) });
8640
- $[5] = t3;
8626
+ const t3 = "overflow-auto my-auto";
8627
+ const T0 = ui.Container;
8628
+ const t4 = "4xl";
8629
+ const t5 = "flex flex-col gap-4 p-8 m-auto";
8630
+ let t6;
8631
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
8632
+ t6 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row py-2 pt-3 items-center", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "h4", className: "flex-grow", children: "New collection" }) });
8633
+ $[4] = t6;
8641
8634
  } else {
8642
- t3 = $[5];
8635
+ t6 = $[4];
8643
8636
  }
8644
- let t4;
8645
- if ($[6] !== parentCollection) {
8646
- t4 = parentCollection && /* @__PURE__ */ jsxRuntime.jsx(ui.Chip, { colorScheme: "tealDarker", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "caption", children: [
8637
+ let t7;
8638
+ if ($[5] !== parentCollection) {
8639
+ t7 = parentCollection && /* @__PURE__ */ jsxRuntime.jsx(ui.Chip, { colorScheme: "tealDarker", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "caption", children: [
8647
8640
  "This is a subcollection of ",
8648
8641
  /* @__PURE__ */ jsxRuntime.jsx("b", { children: parentCollection.name })
8649
8642
  ] }) });
8650
- $[6] = parentCollection;
8651
- $[7] = t4;
8652
- } else {
8653
- t4 = $[7];
8654
- }
8655
- let t5;
8656
- if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
8657
- t5 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", children: "● Use one of the existing paths in your database:" });
8658
- $[8] = t5;
8659
- } else {
8660
- t5 = $[8];
8661
- }
8662
- let t6;
8663
- if ($[9] !== filteredPathSuggestions || $[10] !== loadingPathSuggestions) {
8664
- t6 = loadingPathSuggestions && !filteredPathSuggestions && /* @__PURE__ */ jsxRuntime.jsx(ui.CircularProgress, { size: "small" });
8665
- $[9] = filteredPathSuggestions;
8666
- $[10] = loadingPathSuggestions;
8667
- $[11] = t6;
8643
+ $[5] = parentCollection;
8644
+ $[6] = t7;
8668
8645
  } else {
8669
- t6 = $[11];
8646
+ t7 = $[6];
8670
8647
  }
8671
- let t7;
8672
- if ($[12] !== filteredPathSuggestions || $[13] !== onContinue || $[14] !== setFieldValue) {
8673
- t7 = filteredPathSuggestions?.map((suggestion, index) => /* @__PURE__ */ jsxRuntime.jsx(ui.Chip, { colorScheme: "cyanLighter", onClick: () => {
8674
- setFieldValue("name", core.unslugify(suggestion));
8648
+ const t8 = (filteredSuggestions ?? []).length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-2", children: [
8649
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", children: "● Use one of the existing paths in your database:" }),
8650
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-x-2 gap-y-1 items-center my-2 min-h-7", children: filteredSuggestions?.map((suggestion, index) => /* @__PURE__ */ jsxRuntime.jsx(ui.Chip, { colorScheme: "cyanLighter", onClick: () => {
8651
+ setFieldValue("name", core.prettifyIdentifier(suggestion));
8675
8652
  setFieldValue("id", suggestion);
8676
8653
  setFieldValue("path", suggestion);
8677
8654
  setFieldValue("properties", void 0);
8678
8655
  onContinue();
8679
- }, size: "small", children: suggestion }, suggestion));
8680
- $[12] = filteredPathSuggestions;
8681
- $[13] = onContinue;
8682
- $[14] = setFieldValue;
8683
- $[15] = t7;
8684
- } else {
8685
- t7 = $[15];
8686
- }
8687
- let t8;
8688
- if ($[16] !== filteredPathSuggestions || $[17] !== loadingPathSuggestions) {
8689
- t8 = (filteredPathSuggestions ?? []).length === 0 && !loadingPathSuggestions && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", children: "No existing paths found" });
8690
- $[16] = filteredPathSuggestions;
8691
- $[17] = loadingPathSuggestions;
8692
- $[18] = t8;
8693
- } else {
8694
- t8 = $[18];
8695
- }
8656
+ }, size: "small", children: suggestion }, suggestion)) })
8657
+ ] });
8696
8658
  let t9;
8697
- if ($[19] !== t6 || $[20] !== t7 || $[21] !== t8) {
8698
- t9 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-2", children: [
8699
- t5,
8700
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-x-2 gap-y-1 items-center my-2 min-h-7", children: [
8701
- t6,
8702
- t7,
8703
- t8
8704
- ] })
8705
- ] });
8706
- $[19] = t6;
8707
- $[20] = t7;
8708
- $[21] = t8;
8709
- $[22] = t9;
8659
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
8660
+ t9 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", children: "● Select a template:" });
8661
+ $[7] = t9;
8710
8662
  } else {
8711
- t9 = $[22];
8663
+ t9 = $[7];
8712
8664
  }
8713
8665
  let t10;
8714
- if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
8715
- t10 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", children: "● Select a template:" });
8716
- $[23] = t10;
8666
+ if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
8667
+ t10 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: productsCollectionTemplate.icon });
8668
+ $[8] = t10;
8717
8669
  } else {
8718
- t10 = $[23];
8670
+ t10 = $[8];
8719
8671
  }
8720
8672
  let t11;
8721
- if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
8722
- t11 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: productsCollectionTemplate.icon });
8723
- $[24] = t11;
8724
- } else {
8725
- t11 = $[24];
8726
- }
8727
- let t12;
8728
- if ($[25] !== onContinue || $[26] !== setValues) {
8729
- t12 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Products", subtitle: "A collection of products with images, prices and stock", icon: t11, onClick: () => {
8673
+ if ($[9] !== onContinue || $[10] !== setValues) {
8674
+ t11 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Products", subtitle: "A collection of products with images, prices and stock", icon: t10, onClick: () => {
8730
8675
  setValues(productsCollectionTemplate);
8731
8676
  onContinue();
8732
8677
  } });
8733
- $[25] = onContinue;
8734
- $[26] = setValues;
8735
- $[27] = t12;
8678
+ $[9] = onContinue;
8679
+ $[10] = setValues;
8680
+ $[11] = t11;
8736
8681
  } else {
8737
- t12 = $[27];
8682
+ t11 = $[11];
8738
8683
  }
8739
- let t13;
8740
- if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
8741
- t13 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: usersCollectionTemplate.icon });
8742
- $[28] = t13;
8684
+ let t12;
8685
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
8686
+ t12 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: usersCollectionTemplate.icon });
8687
+ $[12] = t12;
8743
8688
  } else {
8744
- t13 = $[28];
8689
+ t12 = $[12];
8745
8690
  }
8746
- let t14;
8747
- if ($[29] !== onContinue || $[30] !== setValues) {
8748
- t14 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Users", subtitle: "A collection of users with emails, names and roles", icon: t13, onClick: () => {
8691
+ let t13;
8692
+ if ($[13] !== onContinue || $[14] !== setValues) {
8693
+ t13 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Users", subtitle: "A collection of users with emails, names and roles", icon: t12, onClick: () => {
8749
8694
  setValues(usersCollectionTemplate);
8750
8695
  onContinue();
8751
8696
  } });
8752
- $[29] = onContinue;
8753
- $[30] = setValues;
8754
- $[31] = t14;
8697
+ $[13] = onContinue;
8698
+ $[14] = setValues;
8699
+ $[15] = t13;
8755
8700
  } else {
8756
- t14 = $[31];
8701
+ t13 = $[15];
8757
8702
  }
8758
- let t15;
8759
- if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
8760
- t15 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: blogCollectionTemplate.icon });
8761
- $[32] = t15;
8703
+ let t14;
8704
+ if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
8705
+ t14 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: blogCollectionTemplate.icon });
8706
+ $[16] = t14;
8762
8707
  } else {
8763
- t15 = $[32];
8708
+ t14 = $[16];
8764
8709
  }
8765
- let t16;
8766
- if ($[33] !== onContinue || $[34] !== setValues) {
8767
- t16 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Blog posts", subtitle: "A collection of blog posts with images, authors and complex content", icon: t15, onClick: () => {
8710
+ let t15;
8711
+ if ($[17] !== onContinue || $[18] !== setValues) {
8712
+ t15 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Blog posts", subtitle: "A collection of blog posts with images, authors and complex content", icon: t14, onClick: () => {
8768
8713
  setValues(blogCollectionTemplate);
8769
8714
  onContinue();
8770
8715
  } });
8771
- $[33] = onContinue;
8772
- $[34] = setValues;
8773
- $[35] = t16;
8716
+ $[17] = onContinue;
8717
+ $[18] = setValues;
8718
+ $[19] = t15;
8774
8719
  } else {
8775
- t16 = $[35];
8720
+ t15 = $[19];
8776
8721
  }
8777
- let t17;
8778
- if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
8779
- t17 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: pagesCollectionTemplate.icon });
8780
- $[36] = t17;
8722
+ let t16;
8723
+ if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
8724
+ t16 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: pagesCollectionTemplate.icon });
8725
+ $[20] = t16;
8781
8726
  } else {
8782
- t17 = $[36];
8727
+ t16 = $[20];
8783
8728
  }
8784
- let t18;
8785
- if ($[37] !== onContinue || $[38] !== setValues) {
8786
- t18 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Pages", subtitle: "A collection of pages with images, authors and complex content", icon: t17, onClick: () => {
8729
+ let t17;
8730
+ if ($[21] !== onContinue || $[22] !== setValues) {
8731
+ t17 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Pages", subtitle: "A collection of pages with images, authors and complex content", icon: t16, onClick: () => {
8787
8732
  setValues(pagesCollectionTemplate);
8788
8733
  onContinue();
8789
8734
  } });
8790
- $[37] = onContinue;
8791
- $[38] = setValues;
8792
- $[39] = t18;
8735
+ $[21] = onContinue;
8736
+ $[22] = setValues;
8737
+ $[23] = t17;
8793
8738
  } else {
8794
- t18 = $[39];
8739
+ t17 = $[23];
8795
8740
  }
8796
- let t19;
8797
- if ($[40] !== t12 || $[41] !== t14 || $[42] !== t16 || $[43] !== t18) {
8798
- t19 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-2", children: [
8799
- t10,
8741
+ let t18;
8742
+ if ($[24] !== t11 || $[25] !== t13 || $[26] !== t15 || $[27] !== t17) {
8743
+ t18 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-2", children: [
8744
+ t9,
8800
8745
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4", children: [
8801
- t12,
8802
- t14,
8803
- t16,
8804
- t18
8746
+ t11,
8747
+ t13,
8748
+ t15,
8749
+ t17
8805
8750
  ] })
8806
8751
  ] });
8807
- $[40] = t12;
8808
- $[41] = t14;
8809
- $[42] = t16;
8810
- $[43] = t18;
8811
- $[44] = t19;
8752
+ $[24] = t11;
8753
+ $[25] = t13;
8754
+ $[26] = t15;
8755
+ $[27] = t17;
8756
+ $[28] = t18;
8812
8757
  } else {
8813
- t19 = $[44];
8758
+ t18 = $[28];
8814
8759
  }
8815
- let t20;
8816
- if ($[45] !== onContinue || $[46] !== parentCollection) {
8817
- t20 = !parentCollection && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
8760
+ let t19;
8761
+ if ($[29] !== onContinue || $[30] !== parentCollection) {
8762
+ t19 = !parentCollection && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
8818
8763
  /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", className: "mb-2", children: "● Create a collection from a file (csv, json, xls, xslx...)" }),
8819
8764
  /* @__PURE__ */ jsxRuntime.jsx(data_import.ImportFileUpload, { onDataAdded: (data, propertiesOrder) => onContinue(data, propertiesOrder) })
8820
8765
  ] });
8821
- $[45] = onContinue;
8822
- $[46] = parentCollection;
8823
- $[47] = t20;
8824
- } else {
8825
- t20 = $[47];
8826
- }
8827
- let t21;
8828
- if ($[48] !== onContinue) {
8829
- t21 = /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", onClick: () => onContinue(), className: "my-2", children: "Continue from scratch" }) });
8830
- $[48] = onContinue;
8831
- $[49] = t21;
8766
+ $[29] = onContinue;
8767
+ $[30] = parentCollection;
8768
+ $[31] = t19;
8832
8769
  } else {
8833
- t21 = $[49];
8770
+ t19 = $[31];
8834
8771
  }
8835
- let t22;
8836
- if ($[50] !== t19 || $[51] !== t20 || $[52] !== t21 || $[53] !== t4 || $[54] !== t9) {
8837
- t22 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-auto my-auto", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Container, { maxWidth: "4xl", className: "flex flex-col gap-4 p-8 m-auto", children: [
8838
- t3,
8839
- t4,
8840
- t9,
8841
- t19,
8842
- t20,
8843
- t21
8772
+ let t20;
8773
+ if ($[32] !== T0 || $[33] !== t18 || $[34] !== t19 || $[35] !== t6 || $[36] !== t7 || $[37] !== t8) {
8774
+ t20 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t3, children: /* @__PURE__ */ jsxRuntime.jsxs(T0, { maxWidth: t4, className: t5, children: [
8775
+ t6,
8776
+ t7,
8777
+ t8,
8778
+ t18,
8779
+ t19
8844
8780
  ] }) });
8845
- $[50] = t19;
8846
- $[51] = t20;
8847
- $[52] = t21;
8848
- $[53] = t4;
8849
- $[54] = t9;
8850
- $[55] = t22;
8781
+ $[32] = T0;
8782
+ $[33] = t18;
8783
+ $[34] = t19;
8784
+ $[35] = t6;
8785
+ $[36] = t7;
8786
+ $[37] = t8;
8787
+ $[38] = t20;
8851
8788
  } else {
8852
- t22 = $[55];
8789
+ t20 = $[38];
8853
8790
  }
8854
- return t22;
8791
+ return t20;
8855
8792
  }
8856
8793
  function TemplateButton(t0) {
8857
8794
  const $ = reactCompilerRuntime.c(10);
@@ -8863,7 +8800,7 @@
8863
8800
  } = t0;
8864
8801
  let t1;
8865
8802
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
8866
- t1 = ui.cls("my-2 rounded-md border mx-0 p-6 px-4 focus:outline-none transition ease-in-out duration-150 flex flex-row gap-4 items-center", "text-surface-700 dark:text-surface-accent-300", "hover:border-primary-dark hover:text-primary-dark dark:hover:text-primary focus:ring-primary hover:ring-1 hover:ring-primary", "border-surface-400 dark:border-surface-600 ");
8803
+ t1 = ui.cls("my-2 rounded-md border mx-0 p-6 px-4 focus:outline-none transition ease-in-out duration-150 flex flex-row gap-4 items-center", "text-text-secondary dark:text-text-secondary-dark", "hover:border-primary-dark hover:text-primary-dark dark:hover:text-primary focus:ring-primary hover:ring-1 hover:ring-primary", "border-surface-400 dark:border-surface-600 ");
8867
8804
  $[0] = t1;
8868
8805
  } else {
8869
8806
  t1 = $[0];
@@ -9989,7 +9926,6 @@
9989
9926
  extraView,
9990
9927
  handleCancel,
9991
9928
  setFormDirty,
9992
- pathSuggestions,
9993
9929
  getUser,
9994
9930
  parentCollection,
9995
9931
  getData,
@@ -10268,6 +10204,14 @@
10268
10204
  });
10269
10205
  });
10270
10206
  };
10207
+ const onWelcomeScreenContinue = (importData, propertiesOrder_0) => {
10208
+ if (importData) {
10209
+ onImportDataSet(importData, propertiesOrder_0);
10210
+ setCurrentView("import_data_mapping");
10211
+ } else {
10212
+ setCurrentView("details");
10213
+ }
10214
+ };
10271
10215
  return /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogContent, { fullHeight: true, children: [
10272
10216
  /* @__PURE__ */ jsxRuntime.jsx(formex.Formex, { value: formController, children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
10273
10217
  !isNewCollection && /* @__PURE__ */ jsxRuntime.jsxs(ui.Tabs, { value: currentView, innerClassName: ui.cls(ui.defaultBorderMixin, "px-4 h-14 w-full justify-end bg-surface-50 dark:bg-surface-950 border-b"), onValueChange: (v) => setCurrentView(v), children: [
@@ -10279,14 +10223,7 @@
10279
10223
  /* @__PURE__ */ jsxRuntime.jsxs("form", { noValidate: true, onSubmit: formController.handleSubmit, className: ui.cls(isNewCollection ? "h-full" : "h-[calc(100%-48px)]", "flex-grow flex flex-col relative"), children: [
10280
10224
  currentView === "loading" && /* @__PURE__ */ jsxRuntime.jsx(core.CircularProgressCenter, {}),
10281
10225
  currentView === "extra_view" && path && extraView?.View && /* @__PURE__ */ jsxRuntime.jsx(extraView.View, { path }),
10282
- currentView === "welcome" && /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorWelcomeView, { path, onContinue: (importData, propertiesOrder_0) => {
10283
- if (importData) {
10284
- onImportDataSet(importData, propertiesOrder_0);
10285
- setCurrentView("import_data_mapping");
10286
- } else {
10287
- setCurrentView("details");
10288
- }
10289
- }, existingCollectionPaths: existingPaths, parentCollection, pathSuggestions }),
10226
+ currentView === "welcome" && /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorWelcomeView, { path, onContinue: onWelcomeScreenContinue, existingCollectionPaths: existingPaths, parentCollection }),
10290
10227
  currentView === "import_data_mapping" && importConfig && /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorImportMapping, { importConfig, collectionEditable, propertyConfigs }),
10291
10228
  currentView === "import_data_preview" && importConfig && /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorImportDataPreview, { importConfig, properties: values_1.properties, propertiesOrder: values_1.propertiesOrder }),
10292
10229
  currentView === "import_data_saving" && importConfig && /* @__PURE__ */ jsxRuntime.jsx(data_import.ImportSaveInProgress, { importConfig, collection: values_1, path, onImportSuccess: async (importedCollection) => {
@@ -10313,7 +10250,7 @@
10313
10250
  propertyErrorsRef.current = current;
10314
10251
  formController.validate();
10315
10252
  }, getUser, getData: getDataWithPath, doCollectionInference, propertyConfigs, collectionEditable, extraIcon: extraView?.icon && /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { color: "primary", onClick: () => setCurrentView("extra_view"), children: extraView.icon }) }),
10316
- currentView !== "welcome" && /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogActions, { position: "absolute", children: [
10253
+ /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogActions, { position: "absolute", children: [
10317
10254
  error && /* @__PURE__ */ jsxRuntime.jsx(core.ErrorView, { error }),
10318
10255
  isNewCollection && includeTemplates && currentView === "import_data_mapping" && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", type: "button", color: "primary", onClick: () => {
10319
10256
  importConfig.setInUse(false);
@@ -10328,17 +10265,18 @@
10328
10265
  /* @__PURE__ */ jsxRuntime.jsx(ui.ArrowBackIcon, {}),
10329
10266
  "Back"
10330
10267
  ] }),
10331
- isNewCollection && includeTemplates && currentView === "details" && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", color: "primary", type: "button", onClick: () => setCurrentView("welcome"), children: [
10268
+ isNewCollection && includeTemplates && currentView === "details" && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", color: "neutral", type: "button", onClick: () => setCurrentView("welcome"), children: [
10332
10269
  /* @__PURE__ */ jsxRuntime.jsx(ui.ArrowBackIcon, {}),
10333
10270
  "Back"
10334
10271
  ] }),
10335
- isNewCollection && currentView === "properties" && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", type: "button", color: "primary", onClick: () => setCurrentView("details"), children: [
10272
+ isNewCollection && currentView === "properties" && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", type: "button", color: "neutral", onClick: () => setCurrentView("details"), children: [
10336
10273
  /* @__PURE__ */ jsxRuntime.jsx(ui.ArrowBackIcon, {}),
10337
10274
  "Back"
10338
10275
  ] }),
10339
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", color: "primary", onClick: () => {
10276
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", color: "neutral", onClick: () => {
10340
10277
  handleCancel();
10341
10278
  }, children: "Cancel" }),
10279
+ currentView === "welcome" && /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", onClick: () => onWelcomeScreenContinue(), children: "Continue from scratch" }),
10342
10280
  isNewCollection && currentView === "import_data_mapping" && /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "filled", color: "primary", onClick: onImportMappingComplete, children: "Next" }),
10343
10281
  isNewCollection && currentView === "import_data_preview" && /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "filled", color: "primary", onClick: () => {
10344
10282
  setNextMode();
@@ -10420,7 +10358,7 @@
10420
10358
  const ConfigControllerContext = React.createContext({});
10421
10359
  const CollectionEditorContext = React.createContext({});
10422
10360
  const ConfigControllerProvider = React.memo(function ConfigControllerProvider2(t0) {
10423
- const $ = reactCompilerRuntime.c(65);
10361
+ const $ = reactCompilerRuntime.c(68);
10424
10362
  const {
10425
10363
  children,
10426
10364
  collectionConfigController,
@@ -10430,7 +10368,8 @@
10430
10368
  extraView,
10431
10369
  getUser,
10432
10370
  getData,
10433
- onAnalyticsEvent
10371
+ onAnalyticsEvent,
10372
+ pathSuggestions
10434
10373
  } = t0;
10435
10374
  const navigation = core.useNavigationController();
10436
10375
  const navigate = reactRouter.useNavigate();
@@ -10442,7 +10381,7 @@
10442
10381
  const [currentPropertyDialog, setCurrentPropertyDialog] = React.useState();
10443
10382
  const defaultConfigPermissions = _temp;
10444
10383
  let t1;
10445
- if ($[0] !== onAnalyticsEvent) {
10384
+ if ($[0] !== onAnalyticsEvent || $[1] !== pathSuggestions) {
10446
10385
  t1 = (t26) => {
10447
10386
  const {
10448
10387
  id,
@@ -10463,17 +10402,19 @@
10463
10402
  isNewCollection: false,
10464
10403
  parentCollection,
10465
10404
  redirect: false,
10466
- existingEntities
10405
+ existingEntities,
10406
+ pathSuggestions
10467
10407
  });
10468
10408
  };
10469
10409
  $[0] = onAnalyticsEvent;
10470
- $[1] = t1;
10410
+ $[1] = pathSuggestions;
10411
+ $[2] = t1;
10471
10412
  } else {
10472
- t1 = $[1];
10413
+ t1 = $[2];
10473
10414
  }
10474
10415
  const editCollection = t1;
10475
10416
  let t2;
10476
- if ($[2] !== onAnalyticsEvent) {
10417
+ if ($[3] !== onAnalyticsEvent) {
10477
10418
  t2 = (t32) => {
10478
10419
  const {
10479
10420
  propertyKey,
@@ -10502,14 +10443,14 @@
10502
10443
  existingEntities: existingEntities_0
10503
10444
  });
10504
10445
  };
10505
- $[2] = onAnalyticsEvent;
10506
- $[3] = t2;
10446
+ $[3] = onAnalyticsEvent;
10447
+ $[4] = t2;
10507
10448
  } else {
10508
- t2 = $[3];
10449
+ t2 = $[4];
10509
10450
  }
10510
10451
  const editProperty = t2;
10511
10452
  let t3;
10512
- if ($[4] !== onAnalyticsEvent) {
10453
+ if ($[5] !== onAnalyticsEvent || $[6] !== pathSuggestions) {
10513
10454
  t3 = (t42) => {
10514
10455
  const {
10515
10456
  parentCollectionIds: parentCollectionIds_1,
@@ -10537,35 +10478,39 @@
10537
10478
  parentCollectionIds: parentCollectionIds_1,
10538
10479
  parentCollection: parentCollection_0,
10539
10480
  initialValues,
10540
- redirect
10481
+ redirect,
10482
+ pathSuggestions
10541
10483
  });
10542
10484
  };
10543
- $[4] = onAnalyticsEvent;
10544
- $[5] = t3;
10485
+ $[5] = onAnalyticsEvent;
10486
+ $[6] = pathSuggestions;
10487
+ $[7] = t3;
10545
10488
  } else {
10546
- t3 = $[5];
10489
+ t3 = $[7];
10547
10490
  }
10548
10491
  const createCollection = t3;
10549
10492
  const t4 = configPermissions ?? defaultConfigPermissions;
10550
10493
  let t5;
10551
- if ($[6] !== createCollection || $[7] !== editCollection || $[8] !== editProperty || $[9] !== t4) {
10494
+ if ($[8] !== createCollection || $[9] !== editCollection || $[10] !== editProperty || $[11] !== pathSuggestions || $[12] !== t4) {
10552
10495
  t5 = {
10553
10496
  editCollection,
10554
10497
  createCollection,
10555
10498
  editProperty,
10556
- configPermissions: t4
10499
+ configPermissions: t4,
10500
+ pathSuggestions
10557
10501
  };
10558
- $[6] = createCollection;
10559
- $[7] = editCollection;
10560
- $[8] = editProperty;
10561
- $[9] = t4;
10562
- $[10] = t5;
10502
+ $[8] = createCollection;
10503
+ $[9] = editCollection;
10504
+ $[10] = editProperty;
10505
+ $[11] = pathSuggestions;
10506
+ $[12] = t4;
10507
+ $[13] = t5;
10563
10508
  } else {
10564
- t5 = $[10];
10509
+ t5 = $[13];
10565
10510
  }
10566
10511
  const t6 = Boolean(currentDialog);
10567
10512
  let t7;
10568
- if ($[11] !== currentDialog || $[12] !== navigate || $[13] !== navigation) {
10513
+ if ($[14] !== currentDialog || $[15] !== navigate || $[16] !== navigation) {
10569
10514
  t7 = (collection_0) => {
10570
10515
  if (currentDialog?.redirect) {
10571
10516
  if (collection_0 && currentDialog?.isNewCollection && !currentDialog.parentCollectionIds.length) {
@@ -10575,28 +10520,28 @@
10575
10520
  }
10576
10521
  setCurrentDialog(void 0);
10577
10522
  };
10578
- $[11] = currentDialog;
10579
- $[12] = navigate;
10580
- $[13] = navigation;
10581
- $[14] = t7;
10523
+ $[14] = currentDialog;
10524
+ $[15] = navigate;
10525
+ $[16] = navigation;
10526
+ $[17] = t7;
10582
10527
  } else {
10583
- t7 = $[14];
10528
+ t7 = $[17];
10584
10529
  }
10585
10530
  let t8;
10586
- if ($[15] !== collectionConfigController || $[16] !== collectionInference || $[17] !== currentDialog || $[18] !== extraView || $[19] !== getData || $[20] !== getUser || $[21] !== reservedGroups || $[22] !== t6 || $[23] !== t7) {
10531
+ if ($[18] !== collectionConfigController || $[19] !== collectionInference || $[20] !== currentDialog || $[21] !== extraView || $[22] !== getData || $[23] !== getUser || $[24] !== reservedGroups || $[25] !== t6 || $[26] !== t7) {
10587
10532
  t8 = /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorDialog, { open: t6, configController: collectionConfigController, isNewCollection: false, collectionInference, ...currentDialog, getData, reservedGroups, extraView, getUser, handleClose: t7 });
10588
- $[15] = collectionConfigController;
10589
- $[16] = collectionInference;
10590
- $[17] = currentDialog;
10591
- $[18] = extraView;
10592
- $[19] = getData;
10593
- $[20] = getUser;
10594
- $[21] = reservedGroups;
10595
- $[22] = t6;
10596
- $[23] = t7;
10597
- $[24] = t8;
10533
+ $[18] = collectionConfigController;
10534
+ $[19] = collectionInference;
10535
+ $[20] = currentDialog;
10536
+ $[21] = extraView;
10537
+ $[22] = getData;
10538
+ $[23] = getUser;
10539
+ $[24] = reservedGroups;
10540
+ $[25] = t6;
10541
+ $[26] = t7;
10542
+ $[27] = t8;
10598
10543
  } else {
10599
- t8 = $[24];
10544
+ t8 = $[27];
10600
10545
  }
10601
10546
  const t9 = Boolean(currentPropertyDialog);
10602
10547
  const t10 = Boolean(currentPropertyDialog?.propertyKey);
@@ -10604,21 +10549,21 @@
10604
10549
  const t12 = !currentPropertyDialog ? false : !currentPropertyDialog?.propertyKey;
10605
10550
  const t13 = currentPropertyDialog?.collectionEditable ?? false;
10606
10551
  let t14;
10607
- if ($[25] !== currentPropertyDialog || $[26] !== getData || $[27] !== navigation) {
10552
+ if ($[28] !== currentPropertyDialog || $[29] !== getData || $[30] !== navigation) {
10608
10553
  t14 = getData && currentPropertyDialog?.editedCollectionId ? () => {
10609
10554
  console.debug("get data for property", currentPropertyDialog?.editedCollectionId);
10610
10555
  const resolvedPath = navigation.resolveIdsFrom(currentPropertyDialog.editedCollectionId);
10611
10556
  return getData(resolvedPath, []);
10612
10557
  } : void 0;
10613
- $[25] = currentPropertyDialog;
10614
- $[26] = getData;
10615
- $[27] = navigation;
10616
- $[28] = t14;
10558
+ $[28] = currentPropertyDialog;
10559
+ $[29] = getData;
10560
+ $[30] = navigation;
10561
+ $[31] = t14;
10617
10562
  } else {
10618
- t14 = $[28];
10563
+ t14 = $[31];
10619
10564
  }
10620
10565
  let t15;
10621
- if ($[29] !== collectionConfigController || $[30] !== currentPropertyDialog || $[31] !== snackbarController) {
10566
+ if ($[32] !== collectionConfigController || $[33] !== currentPropertyDialog || $[34] !== snackbarController) {
10622
10567
  t15 = (t162) => {
10623
10568
  const {
10624
10569
  id: id_0,
@@ -10647,15 +10592,15 @@
10647
10592
  return false;
10648
10593
  });
10649
10594
  };
10650
- $[29] = collectionConfigController;
10651
- $[30] = currentPropertyDialog;
10652
- $[31] = snackbarController;
10653
- $[32] = t15;
10595
+ $[32] = collectionConfigController;
10596
+ $[33] = currentPropertyDialog;
10597
+ $[34] = snackbarController;
10598
+ $[35] = t15;
10654
10599
  } else {
10655
- t15 = $[32];
10600
+ t15 = $[35];
10656
10601
  }
10657
10602
  let t16;
10658
- if ($[33] !== collectionConfigController || $[34] !== currentPropertyDialog?.currentPropertiesOrder || $[35] !== currentPropertyDialog?.editedCollectionId || $[36] !== currentPropertyDialog?.namespace || $[37] !== currentPropertyDialog?.parentCollectionIds || $[38] !== currentPropertyDialog?.propertyKey || $[39] !== snackbarController) {
10603
+ if ($[36] !== collectionConfigController || $[37] !== currentPropertyDialog?.currentPropertiesOrder || $[38] !== currentPropertyDialog?.editedCollectionId || $[39] !== currentPropertyDialog?.namespace || $[40] !== currentPropertyDialog?.parentCollectionIds || $[41] !== currentPropertyDialog?.propertyKey || $[42] !== snackbarController) {
10659
10604
  t16 = () => {
10660
10605
  if (!currentPropertyDialog?.propertyKey) {
10661
10606
  return;
@@ -10678,21 +10623,21 @@
10678
10623
  return false;
10679
10624
  });
10680
10625
  };
10681
- $[33] = collectionConfigController;
10682
- $[34] = currentPropertyDialog?.currentPropertiesOrder;
10683
- $[35] = currentPropertyDialog?.editedCollectionId;
10684
- $[36] = currentPropertyDialog?.namespace;
10685
- $[37] = currentPropertyDialog?.parentCollectionIds;
10686
- $[38] = currentPropertyDialog?.propertyKey;
10687
- $[39] = snackbarController;
10688
- $[40] = t16;
10626
+ $[36] = collectionConfigController;
10627
+ $[37] = currentPropertyDialog?.currentPropertiesOrder;
10628
+ $[38] = currentPropertyDialog?.editedCollectionId;
10629
+ $[39] = currentPropertyDialog?.namespace;
10630
+ $[40] = currentPropertyDialog?.parentCollectionIds;
10631
+ $[41] = currentPropertyDialog?.propertyKey;
10632
+ $[42] = snackbarController;
10633
+ $[43] = t16;
10689
10634
  } else {
10690
- t16 = $[40];
10635
+ t16 = $[43];
10691
10636
  }
10692
10637
  let t17;
10693
10638
  let t18;
10694
10639
  let t19;
10695
- if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
10640
+ if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
10696
10641
  t17 = () => {
10697
10642
  setCurrentPropertyDialog(void 0);
10698
10643
  };
@@ -10700,64 +10645,64 @@
10700
10645
  setCurrentPropertyDialog(void 0);
10701
10646
  };
10702
10647
  t19 = {};
10703
- $[41] = t17;
10704
- $[42] = t18;
10705
- $[43] = t19;
10648
+ $[44] = t17;
10649
+ $[45] = t18;
10650
+ $[46] = t19;
10706
10651
  } else {
10707
- t17 = $[41];
10708
- t18 = $[42];
10709
- t19 = $[43];
10652
+ t17 = $[44];
10653
+ t18 = $[45];
10654
+ t19 = $[46];
10710
10655
  }
10711
10656
  let t20;
10712
- if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
10657
+ if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
10713
10658
  t20 = [];
10714
- $[44] = t20;
10659
+ $[47] = t20;
10715
10660
  } else {
10716
- t20 = $[44];
10661
+ t20 = $[47];
10717
10662
  }
10718
10663
  const t21 = currentPropertyDialog?.property;
10719
10664
  const t22 = currentPropertyDialog?.propertyKey;
10720
10665
  let t23;
10721
- if ($[45] !== propertyConfigs || $[46] !== t10 || $[47] !== t11 || $[48] !== t12 || $[49] !== t13 || $[50] !== t14 || $[51] !== t15 || $[52] !== t16 || $[53] !== t21 || $[54] !== t22 || $[55] !== t9) {
10666
+ if ($[48] !== propertyConfigs || $[49] !== t10 || $[50] !== t11 || $[51] !== t12 || $[52] !== t13 || $[53] !== t14 || $[54] !== t15 || $[55] !== t16 || $[56] !== t21 || $[57] !== t22 || $[58] !== t9) {
10722
10667
  t23 = /* @__PURE__ */ jsxRuntime.jsx(PropertyFormDialog, { open: t9, includeIdAndName: true, existingProperty: t10, autoUpdateId: t11, autoOpenTypeSelect: t12, inArray: false, collectionEditable: t13, getData: t14, onPropertyChanged: t15, onPropertyChangedImmediate: false, onDelete: t16, onError: _temp2, onOkClicked: t17, onCancel: t18, initialErrors: t19, forceShowErrors: false, existingPropertyKeys: t20, allowDataInference: true, propertyConfigs, property: t21, propertyKey: t22 });
10723
- $[45] = propertyConfigs;
10724
- $[46] = t10;
10725
- $[47] = t11;
10726
- $[48] = t12;
10727
- $[49] = t13;
10728
- $[50] = t14;
10729
- $[51] = t15;
10730
- $[52] = t16;
10731
- $[53] = t21;
10732
- $[54] = t22;
10733
- $[55] = t9;
10734
- $[56] = t23;
10735
- } else {
10736
- t23 = $[56];
10668
+ $[48] = propertyConfigs;
10669
+ $[49] = t10;
10670
+ $[50] = t11;
10671
+ $[51] = t12;
10672
+ $[52] = t13;
10673
+ $[53] = t14;
10674
+ $[54] = t15;
10675
+ $[55] = t16;
10676
+ $[56] = t21;
10677
+ $[57] = t22;
10678
+ $[58] = t9;
10679
+ $[59] = t23;
10680
+ } else {
10681
+ t23 = $[59];
10737
10682
  }
10738
10683
  let t24;
10739
- if ($[57] !== children || $[58] !== t23 || $[59] !== t5 || $[60] !== t8) {
10684
+ if ($[60] !== children || $[61] !== t23 || $[62] !== t5 || $[63] !== t8) {
10740
10685
  t24 = /* @__PURE__ */ jsxRuntime.jsxs(CollectionEditorContext.Provider, { value: t5, children: [
10741
10686
  children,
10742
10687
  t8,
10743
10688
  t23
10744
10689
  ] });
10745
- $[57] = children;
10746
- $[58] = t23;
10747
- $[59] = t5;
10748
- $[60] = t8;
10749
- $[61] = t24;
10690
+ $[60] = children;
10691
+ $[61] = t23;
10692
+ $[62] = t5;
10693
+ $[63] = t8;
10694
+ $[64] = t24;
10750
10695
  } else {
10751
- t24 = $[61];
10696
+ t24 = $[64];
10752
10697
  }
10753
10698
  let t25;
10754
- if ($[62] !== collectionConfigController || $[63] !== t24) {
10699
+ if ($[65] !== collectionConfigController || $[66] !== t24) {
10755
10700
  t25 = /* @__PURE__ */ jsxRuntime.jsx(ConfigControllerContext.Provider, { value: collectionConfigController, children: t24 });
10756
- $[62] = collectionConfigController;
10757
- $[63] = t24;
10758
- $[64] = t25;
10701
+ $[65] = collectionConfigController;
10702
+ $[66] = t24;
10703
+ $[67] = t25;
10759
10704
  } else {
10760
- t25 = $[64];
10705
+ t25 = $[67];
10761
10706
  }
10762
10707
  return t25;
10763
10708
  }, equal);
@@ -11103,7 +11048,7 @@
11103
11048
  }
11104
11049
  let t4;
11105
11050
  if ($[6] !== t2) {
11106
- t4 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-0.5 w-20 h-full flex items-center justify-center cursor-pointer bg-surface-100 bg-opacity-40 hover:bg-surface-100 dark:bg-surface-950 dark:bg-opacity-40 dark:hover:bg-surface-950", onClick: t2, children: t3 });
11051
+ t4 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-0.5 w-20 h-full flex items-center justify-center cursor-pointer bg-surface-100 bg-opacity-40 bg-surface-100/40 hover:bg-surface-100 dark:bg-surface-950 dark:bg-opacity-40 dark:bg-surface-950/40 dark:hover:bg-surface-950", onClick: t2, children: t3 });
11107
11052
  $[6] = t2;
11108
11053
  $[7] = t4;
11109
11054
  } else {
@@ -11464,7 +11409,7 @@
11464
11409
  return t9;
11465
11410
  }
11466
11411
  function useCollectionEditorPlugin(t0) {
11467
- const $ = reactCompilerRuntime.c(22);
11412
+ const $ = reactCompilerRuntime.c(23);
11468
11413
  const {
11469
11414
  collectionConfigController,
11470
11415
  configPermissions,
@@ -11474,11 +11419,12 @@
11474
11419
  collectionInference,
11475
11420
  getData,
11476
11421
  onAnalyticsEvent,
11477
- includeIntroView: t1
11422
+ includeIntroView: t1,
11423
+ pathSuggestions
11478
11424
  } = t0;
11479
11425
  const includeIntroView = t1 === void 0 ? true : t1;
11480
11426
  let t2;
11481
- if ($[0] !== collectionConfigController || $[1] !== collectionInference || $[2] !== configPermissions || $[3] !== extraView || $[4] !== getData || $[5] !== getUser || $[6] !== onAnalyticsEvent || $[7] !== reservedGroups) {
11427
+ if ($[0] !== collectionConfigController || $[1] !== collectionInference || $[2] !== configPermissions || $[3] !== extraView || $[4] !== getData || $[5] !== getUser || $[6] !== onAnalyticsEvent || $[7] !== pathSuggestions || $[8] !== reservedGroups) {
11482
11428
  t2 = {
11483
11429
  Component: ConfigControllerProvider,
11484
11430
  props: {
@@ -11489,7 +11435,8 @@
11489
11435
  extraView,
11490
11436
  getUser,
11491
11437
  getData,
11492
- onAnalyticsEvent
11438
+ onAnalyticsEvent,
11439
+ pathSuggestions
11493
11440
  }
11494
11441
  };
11495
11442
  $[0] = collectionConfigController;
@@ -11499,28 +11446,29 @@
11499
11446
  $[4] = getData;
11500
11447
  $[5] = getUser;
11501
11448
  $[6] = onAnalyticsEvent;
11502
- $[7] = reservedGroups;
11503
- $[8] = t2;
11449
+ $[7] = pathSuggestions;
11450
+ $[8] = reservedGroups;
11451
+ $[9] = t2;
11504
11452
  } else {
11505
- t2 = $[8];
11453
+ t2 = $[9];
11506
11454
  }
11507
11455
  let t3;
11508
- if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
11456
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
11509
11457
  t3 = /* @__PURE__ */ jsxRuntime.jsx(NewCollectionButton, {});
11510
- $[9] = t3;
11458
+ $[10] = t3;
11511
11459
  } else {
11512
- t3 = $[9];
11460
+ t3 = $[10];
11513
11461
  }
11514
11462
  let t4;
11515
- if ($[10] !== includeIntroView) {
11463
+ if ($[11] !== includeIntroView) {
11516
11464
  t4 = includeIntroView ? /* @__PURE__ */ jsxRuntime.jsx(IntroWidget, {}) : void 0;
11517
- $[10] = includeIntroView;
11518
- $[11] = t4;
11465
+ $[11] = includeIntroView;
11466
+ $[12] = t4;
11519
11467
  } else {
11520
- t4 = $[11];
11468
+ t4 = $[12];
11521
11469
  }
11522
11470
  let t5;
11523
- if ($[12] !== collectionConfigController.navigationEntries || $[13] !== collectionConfigController.saveNavigationEntries || $[14] !== t4) {
11471
+ if ($[13] !== collectionConfigController.navigationEntries || $[14] !== collectionConfigController.saveNavigationEntries || $[15] !== t4) {
11524
11472
  t5 = {
11525
11473
  additionalActions: t3,
11526
11474
  additionalChildrenStart: t4,
@@ -11530,16 +11478,16 @@
11530
11478
  navigationEntries: collectionConfigController.navigationEntries,
11531
11479
  onNavigationEntriesUpdate: collectionConfigController.saveNavigationEntries
11532
11480
  };
11533
- $[12] = collectionConfigController.navigationEntries;
11534
- $[13] = collectionConfigController.saveNavigationEntries;
11535
- $[14] = t4;
11536
- $[15] = t5;
11481
+ $[13] = collectionConfigController.navigationEntries;
11482
+ $[14] = collectionConfigController.saveNavigationEntries;
11483
+ $[15] = t4;
11484
+ $[16] = t5;
11537
11485
  } else {
11538
- t5 = $[15];
11486
+ t5 = $[16];
11539
11487
  }
11540
11488
  let t6;
11541
11489
  let t7;
11542
- if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
11490
+ if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
11543
11491
  t6 = {
11544
11492
  CollectionActionsStart: EditorCollectionActionStart,
11545
11493
  CollectionActions: EditorCollectionAction,
@@ -11549,14 +11497,14 @@
11549
11497
  t7 = {
11550
11498
  ActionsTop: EditorEntityAction
11551
11499
  };
11552
- $[16] = t6;
11553
- $[17] = t7;
11500
+ $[17] = t6;
11501
+ $[18] = t7;
11554
11502
  } else {
11555
- t6 = $[16];
11556
- t7 = $[17];
11503
+ t6 = $[17];
11504
+ t7 = $[18];
11557
11505
  }
11558
11506
  let t8;
11559
- if ($[18] !== collectionConfigController.loading || $[19] !== t2 || $[20] !== t5) {
11507
+ if ($[19] !== collectionConfigController.loading || $[20] !== t2 || $[21] !== t5) {
11560
11508
  t8 = {
11561
11509
  key: "collection_editor",
11562
11510
  loading: collectionConfigController.loading,
@@ -11565,12 +11513,12 @@
11565
11513
  collectionView: t6,
11566
11514
  form: t7
11567
11515
  };
11568
- $[18] = collectionConfigController.loading;
11569
- $[19] = t2;
11570
- $[20] = t5;
11571
- $[21] = t8;
11516
+ $[19] = collectionConfigController.loading;
11517
+ $[20] = t2;
11518
+ $[21] = t5;
11519
+ $[22] = t8;
11572
11520
  } else {
11573
- t8 = $[21];
11521
+ t8 = $[22];
11574
11522
  }
11575
11523
  return t8;
11576
11524
  }
@@ -11702,7 +11650,7 @@
11702
11650
  collectionEditor.createCollection({
11703
11651
  initialValues: {
11704
11652
  path,
11705
- name: core.unslugify(path)
11653
+ name: core.prettifyIdentifier(path)
11706
11654
  },
11707
11655
  parentCollectionIds,
11708
11656
  redirect: false,