@firecms/collection_editor 3.0.0-tw4.2 → 3.0.0-tw4.3

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
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { c } from "react-compiler-runtime";
3
- import { toSnakeCase, singular, IconForView, FieldCaption, SearchIconsView, ArrayContainer, serializeRegExp, useSnackbarController, resolveEnumValues, isPropertyBuilder, useCustomizationController, getFieldConfig, ErrorBoundary, PropertyConfigBadge, unslugify, useNavigationController, mergeDeep, DEFAULT_FIELD_CONFIGS, getFieldId, ConfirmationDialog, isValidRegExp, isEmptyObject, useLargeLayout, makePropertiesEditable, resolveEntityView, useAuthController, useSelectionController, CircularProgressCenter, EntityCollectionTable, slugify, resolveEntityAction, randomString, removeUndefined, ErrorView, removeInitialAndTrailingSlashes, getDefaultPropertiesOrder, joinCollectionLists } from "@firecms/core";
3
+ import { toSnakeCase, singular, IconForView, FieldCaption, SearchIconsView, ArrayContainer, serializeRegExp, useSnackbarController, resolveEnumValues, isPropertyBuilder, useCustomizationController, getFieldConfig, ErrorBoundary, PropertyConfigBadge, prettifyIdentifier, useNavigationController, mergeDeep, DEFAULT_FIELD_CONFIGS, getFieldId, ConfirmationDialog, isValidRegExp, isEmptyObject, useLargeLayout, makePropertiesEditable, resolveEntityView, useAuthController, useSelectionController, CircularProgressCenter, EntityCollectionTable, slugify, resolveEntityAction, randomString, removeUndefined, ErrorView, removeInitialAndTrailingSlashes, getDefaultPropertiesOrder, joinCollectionLists } from "@firecms/core";
4
4
  import * as React from "react";
5
5
  import React__default, { useContext, useState, useEffect, useMemo, useRef, useDeferredValue } from "react";
6
6
  import equal from "react-fast-compare";
@@ -3974,7 +3974,7 @@ const CommonPropertyFields = React__default.forwardRef(function CommonPropertyFi
3974
3974
  const newIdValue = e_0.target.value;
3975
3975
  const nameTouched = getIn(touched, "name");
3976
3976
  if (!nameTouched && autoUpdateId) {
3977
- setFieldValue("name", newIdValue ? unslugify(newIdValue) : "");
3977
+ setFieldValue("name", newIdValue ? prettifyIdentifier(newIdValue) : "");
3978
3978
  }
3979
3979
  setFieldValue("id", newIdValue, true);
3980
3980
  setFieldTouched("id", true);
@@ -8589,265 +8589,202 @@ const pagesCollectionTemplate = {
8589
8589
  }
8590
8590
  };
8591
8591
  function CollectionEditorWelcomeView(t0) {
8592
- const $ = c(56);
8592
+ const $ = c(39);
8593
8593
  const {
8594
- path,
8595
- pathSuggestions,
8596
8594
  parentCollection,
8597
8595
  onContinue,
8598
8596
  existingCollectionPaths
8599
8597
  } = t0;
8600
- const [loadingPathSuggestions, setLoadingPathSuggestions] = useState(false);
8601
- const [filteredPathSuggestions, setFilteredPathSuggestions] = useState();
8598
+ const {
8599
+ pathSuggestions
8600
+ } = useCollectionEditorController();
8602
8601
  let t1;
8602
+ if ($[0] !== pathSuggestions) {
8603
+ t1 = pathSuggestions ?? [];
8604
+ $[0] = pathSuggestions;
8605
+ $[1] = t1;
8606
+ } else {
8607
+ t1 = $[1];
8608
+ }
8603
8609
  let t2;
8604
- if ($[0] !== existingCollectionPaths || $[1] !== path || $[2] !== pathSuggestions) {
8605
- t1 = () => {
8606
- if (pathSuggestions && existingCollectionPaths) {
8607
- setLoadingPathSuggestions(true);
8608
- pathSuggestions(path).then((suggestions) => {
8609
- const filteredSuggestions = suggestions.filter((s) => !(existingCollectionPaths ?? []).find((c2) => c2.trim().toLowerCase() === s.trim().toLowerCase()));
8610
- setFilteredPathSuggestions(filteredSuggestions);
8611
- }).finally(() => setLoadingPathSuggestions(false));
8612
- }
8613
- };
8614
- t2 = [existingCollectionPaths, path, pathSuggestions];
8615
- $[0] = existingCollectionPaths;
8616
- $[1] = path;
8617
- $[2] = pathSuggestions;
8618
- $[3] = t1;
8619
- $[4] = t2;
8610
+ if ($[2] !== existingCollectionPaths) {
8611
+ t2 = (s) => !(existingCollectionPaths ?? []).find((c2) => c2.trim().toLowerCase() === s.trim().toLowerCase());
8612
+ $[2] = existingCollectionPaths;
8613
+ $[3] = t2;
8620
8614
  } else {
8621
- t1 = $[3];
8622
- t2 = $[4];
8615
+ t2 = $[3];
8623
8616
  }
8624
- useEffect(t1, t2);
8617
+ const filteredSuggestions = t1.filter(t2);
8625
8618
  const {
8626
8619
  setFieldValue,
8627
8620
  setValues
8628
8621
  } = useFormex();
8629
- const noSuggestions = !loadingPathSuggestions && (filteredPathSuggestions ?? [])?.length === 0;
8630
- if (!noSuggestions) {
8631
- return null;
8632
- }
8633
- let t3;
8634
- if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
8635
- t3 = /* @__PURE__ */ jsx("div", { className: "flex flex-row py-2 pt-3 items-center", children: /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "flex-grow", children: "New collection" }) });
8636
- $[5] = t3;
8622
+ const t3 = "overflow-auto my-auto";
8623
+ const T0 = Container;
8624
+ const t4 = "4xl";
8625
+ const t5 = "flex flex-col gap-4 p-8 m-auto";
8626
+ let t6;
8627
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
8628
+ t6 = /* @__PURE__ */ jsx("div", { className: "flex flex-row py-2 pt-3 items-center", children: /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "flex-grow", children: "New collection" }) });
8629
+ $[4] = t6;
8637
8630
  } else {
8638
- t3 = $[5];
8631
+ t6 = $[4];
8639
8632
  }
8640
- let t4;
8641
- if ($[6] !== parentCollection) {
8642
- t4 = parentCollection && /* @__PURE__ */ jsx(Chip, { colorScheme: "tealDarker", children: /* @__PURE__ */ jsxs(Typography, { variant: "caption", children: [
8633
+ let t7;
8634
+ if ($[5] !== parentCollection) {
8635
+ t7 = parentCollection && /* @__PURE__ */ jsx(Chip, { colorScheme: "tealDarker", children: /* @__PURE__ */ jsxs(Typography, { variant: "caption", children: [
8643
8636
  "This is a subcollection of ",
8644
8637
  /* @__PURE__ */ jsx("b", { children: parentCollection.name })
8645
8638
  ] }) });
8646
- $[6] = parentCollection;
8647
- $[7] = t4;
8648
- } else {
8649
- t4 = $[7];
8650
- }
8651
- let t5;
8652
- if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
8653
- t5 = /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "● Use one of the existing paths in your database:" });
8654
- $[8] = t5;
8655
- } else {
8656
- t5 = $[8];
8657
- }
8658
- let t6;
8659
- if ($[9] !== filteredPathSuggestions || $[10] !== loadingPathSuggestions) {
8660
- t6 = loadingPathSuggestions && !filteredPathSuggestions && /* @__PURE__ */ jsx(CircularProgress, { size: "small" });
8661
- $[9] = filteredPathSuggestions;
8662
- $[10] = loadingPathSuggestions;
8663
- $[11] = t6;
8639
+ $[5] = parentCollection;
8640
+ $[6] = t7;
8664
8641
  } else {
8665
- t6 = $[11];
8642
+ t7 = $[6];
8666
8643
  }
8667
- let t7;
8668
- if ($[12] !== filteredPathSuggestions || $[13] !== onContinue || $[14] !== setFieldValue) {
8669
- t7 = filteredPathSuggestions?.map((suggestion, index) => /* @__PURE__ */ jsx(Chip, { colorScheme: "cyanLighter", onClick: () => {
8670
- setFieldValue("name", unslugify(suggestion));
8644
+ const t8 = (filteredSuggestions ?? []).length > 0 && /* @__PURE__ */ jsxs("div", { className: "my-2", children: [
8645
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "● Use one of the existing paths in your database:" }),
8646
+ /* @__PURE__ */ 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__ */ jsx(Chip, { colorScheme: "cyanLighter", onClick: () => {
8647
+ setFieldValue("name", prettifyIdentifier(suggestion));
8671
8648
  setFieldValue("id", suggestion);
8672
8649
  setFieldValue("path", suggestion);
8673
8650
  setFieldValue("properties", void 0);
8674
8651
  onContinue();
8675
- }, size: "small", children: suggestion }, suggestion));
8676
- $[12] = filteredPathSuggestions;
8677
- $[13] = onContinue;
8678
- $[14] = setFieldValue;
8679
- $[15] = t7;
8680
- } else {
8681
- t7 = $[15];
8682
- }
8683
- let t8;
8684
- if ($[16] !== filteredPathSuggestions || $[17] !== loadingPathSuggestions) {
8685
- t8 = (filteredPathSuggestions ?? []).length === 0 && !loadingPathSuggestions && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "No existing paths found" });
8686
- $[16] = filteredPathSuggestions;
8687
- $[17] = loadingPathSuggestions;
8688
- $[18] = t8;
8689
- } else {
8690
- t8 = $[18];
8691
- }
8652
+ }, size: "small", children: suggestion }, suggestion)) })
8653
+ ] });
8692
8654
  let t9;
8693
- if ($[19] !== t6 || $[20] !== t7 || $[21] !== t8) {
8694
- t9 = /* @__PURE__ */ jsxs("div", { className: "my-2", children: [
8695
- t5,
8696
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-x-2 gap-y-1 items-center my-2 min-h-7", children: [
8697
- t6,
8698
- t7,
8699
- t8
8700
- ] })
8701
- ] });
8702
- $[19] = t6;
8703
- $[20] = t7;
8704
- $[21] = t8;
8705
- $[22] = t9;
8655
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
8656
+ t9 = /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "● Select a template:" });
8657
+ $[7] = t9;
8706
8658
  } else {
8707
- t9 = $[22];
8659
+ t9 = $[7];
8708
8660
  }
8709
8661
  let t10;
8710
- if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
8711
- t10 = /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "● Select a template:" });
8712
- $[23] = t10;
8662
+ if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
8663
+ t10 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: productsCollectionTemplate.icon });
8664
+ $[8] = t10;
8713
8665
  } else {
8714
- t10 = $[23];
8666
+ t10 = $[8];
8715
8667
  }
8716
8668
  let t11;
8717
- if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
8718
- t11 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: productsCollectionTemplate.icon });
8719
- $[24] = t11;
8720
- } else {
8721
- t11 = $[24];
8722
- }
8723
- let t12;
8724
- if ($[25] !== onContinue || $[26] !== setValues) {
8725
- t12 = /* @__PURE__ */ jsx(TemplateButton, { title: "Products", subtitle: "A collection of products with images, prices and stock", icon: t11, onClick: () => {
8669
+ if ($[9] !== onContinue || $[10] !== setValues) {
8670
+ t11 = /* @__PURE__ */ jsx(TemplateButton, { title: "Products", subtitle: "A collection of products with images, prices and stock", icon: t10, onClick: () => {
8726
8671
  setValues(productsCollectionTemplate);
8727
8672
  onContinue();
8728
8673
  } });
8729
- $[25] = onContinue;
8730
- $[26] = setValues;
8731
- $[27] = t12;
8674
+ $[9] = onContinue;
8675
+ $[10] = setValues;
8676
+ $[11] = t11;
8732
8677
  } else {
8733
- t12 = $[27];
8678
+ t11 = $[11];
8734
8679
  }
8735
- let t13;
8736
- if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
8737
- t13 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: usersCollectionTemplate.icon });
8738
- $[28] = t13;
8680
+ let t12;
8681
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
8682
+ t12 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: usersCollectionTemplate.icon });
8683
+ $[12] = t12;
8739
8684
  } else {
8740
- t13 = $[28];
8685
+ t12 = $[12];
8741
8686
  }
8742
- let t14;
8743
- if ($[29] !== onContinue || $[30] !== setValues) {
8744
- t14 = /* @__PURE__ */ jsx(TemplateButton, { title: "Users", subtitle: "A collection of users with emails, names and roles", icon: t13, onClick: () => {
8687
+ let t13;
8688
+ if ($[13] !== onContinue || $[14] !== setValues) {
8689
+ t13 = /* @__PURE__ */ jsx(TemplateButton, { title: "Users", subtitle: "A collection of users with emails, names and roles", icon: t12, onClick: () => {
8745
8690
  setValues(usersCollectionTemplate);
8746
8691
  onContinue();
8747
8692
  } });
8748
- $[29] = onContinue;
8749
- $[30] = setValues;
8750
- $[31] = t14;
8693
+ $[13] = onContinue;
8694
+ $[14] = setValues;
8695
+ $[15] = t13;
8751
8696
  } else {
8752
- t14 = $[31];
8697
+ t13 = $[15];
8753
8698
  }
8754
- let t15;
8755
- if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
8756
- t15 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: blogCollectionTemplate.icon });
8757
- $[32] = t15;
8699
+ let t14;
8700
+ if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
8701
+ t14 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: blogCollectionTemplate.icon });
8702
+ $[16] = t14;
8758
8703
  } else {
8759
- t15 = $[32];
8704
+ t14 = $[16];
8760
8705
  }
8761
- let t16;
8762
- if ($[33] !== onContinue || $[34] !== setValues) {
8763
- t16 = /* @__PURE__ */ jsx(TemplateButton, { title: "Blog posts", subtitle: "A collection of blog posts with images, authors and complex content", icon: t15, onClick: () => {
8706
+ let t15;
8707
+ if ($[17] !== onContinue || $[18] !== setValues) {
8708
+ t15 = /* @__PURE__ */ jsx(TemplateButton, { title: "Blog posts", subtitle: "A collection of blog posts with images, authors and complex content", icon: t14, onClick: () => {
8764
8709
  setValues(blogCollectionTemplate);
8765
8710
  onContinue();
8766
8711
  } });
8767
- $[33] = onContinue;
8768
- $[34] = setValues;
8769
- $[35] = t16;
8712
+ $[17] = onContinue;
8713
+ $[18] = setValues;
8714
+ $[19] = t15;
8770
8715
  } else {
8771
- t16 = $[35];
8716
+ t15 = $[19];
8772
8717
  }
8773
- let t17;
8774
- if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
8775
- t17 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: pagesCollectionTemplate.icon });
8776
- $[36] = t17;
8718
+ let t16;
8719
+ if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
8720
+ t16 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: pagesCollectionTemplate.icon });
8721
+ $[20] = t16;
8777
8722
  } else {
8778
- t17 = $[36];
8723
+ t16 = $[20];
8779
8724
  }
8780
- let t18;
8781
- if ($[37] !== onContinue || $[38] !== setValues) {
8782
- t18 = /* @__PURE__ */ jsx(TemplateButton, { title: "Pages", subtitle: "A collection of pages with images, authors and complex content", icon: t17, onClick: () => {
8725
+ let t17;
8726
+ if ($[21] !== onContinue || $[22] !== setValues) {
8727
+ t17 = /* @__PURE__ */ jsx(TemplateButton, { title: "Pages", subtitle: "A collection of pages with images, authors and complex content", icon: t16, onClick: () => {
8783
8728
  setValues(pagesCollectionTemplate);
8784
8729
  onContinue();
8785
8730
  } });
8786
- $[37] = onContinue;
8787
- $[38] = setValues;
8788
- $[39] = t18;
8731
+ $[21] = onContinue;
8732
+ $[22] = setValues;
8733
+ $[23] = t17;
8789
8734
  } else {
8790
- t18 = $[39];
8735
+ t17 = $[23];
8791
8736
  }
8792
- let t19;
8793
- if ($[40] !== t12 || $[41] !== t14 || $[42] !== t16 || $[43] !== t18) {
8794
- t19 = /* @__PURE__ */ jsxs("div", { className: "my-2", children: [
8795
- t10,
8737
+ let t18;
8738
+ if ($[24] !== t11 || $[25] !== t13 || $[26] !== t15 || $[27] !== t17) {
8739
+ t18 = /* @__PURE__ */ jsxs("div", { className: "my-2", children: [
8740
+ t9,
8796
8741
  /* @__PURE__ */ jsxs("div", { className: "flex gap-4", children: [
8797
- t12,
8798
- t14,
8799
- t16,
8800
- t18
8742
+ t11,
8743
+ t13,
8744
+ t15,
8745
+ t17
8801
8746
  ] })
8802
8747
  ] });
8803
- $[40] = t12;
8804
- $[41] = t14;
8805
- $[42] = t16;
8806
- $[43] = t18;
8807
- $[44] = t19;
8748
+ $[24] = t11;
8749
+ $[25] = t13;
8750
+ $[26] = t15;
8751
+ $[27] = t17;
8752
+ $[28] = t18;
8808
8753
  } else {
8809
- t19 = $[44];
8754
+ t18 = $[28];
8810
8755
  }
8811
- let t20;
8812
- if ($[45] !== onContinue || $[46] !== parentCollection) {
8813
- t20 = !parentCollection && /* @__PURE__ */ jsxs("div", { children: [
8756
+ let t19;
8757
+ if ($[29] !== onContinue || $[30] !== parentCollection) {
8758
+ t19 = !parentCollection && /* @__PURE__ */ jsxs("div", { children: [
8814
8759
  /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", className: "mb-2", children: "● Create a collection from a file (csv, json, xls, xslx...)" }),
8815
8760
  /* @__PURE__ */ jsx(ImportFileUpload, { onDataAdded: (data, propertiesOrder) => onContinue(data, propertiesOrder) })
8816
8761
  ] });
8817
- $[45] = onContinue;
8818
- $[46] = parentCollection;
8819
- $[47] = t20;
8820
- } else {
8821
- t20 = $[47];
8822
- }
8823
- let t21;
8824
- if ($[48] !== onContinue) {
8825
- t21 = /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Button, { variant: "text", onClick: () => onContinue(), className: "my-2", children: "Continue from scratch" }) });
8826
- $[48] = onContinue;
8827
- $[49] = t21;
8762
+ $[29] = onContinue;
8763
+ $[30] = parentCollection;
8764
+ $[31] = t19;
8828
8765
  } else {
8829
- t21 = $[49];
8766
+ t19 = $[31];
8830
8767
  }
8831
- let t22;
8832
- if ($[50] !== t19 || $[51] !== t20 || $[52] !== t21 || $[53] !== t4 || $[54] !== t9) {
8833
- t22 = /* @__PURE__ */ jsx("div", { className: "overflow-auto my-auto", children: /* @__PURE__ */ jsxs(Container, { maxWidth: "4xl", className: "flex flex-col gap-4 p-8 m-auto", children: [
8834
- t3,
8835
- t4,
8836
- t9,
8837
- t19,
8838
- t20,
8839
- t21
8768
+ let t20;
8769
+ if ($[32] !== T0 || $[33] !== t18 || $[34] !== t19 || $[35] !== t6 || $[36] !== t7 || $[37] !== t8) {
8770
+ t20 = /* @__PURE__ */ jsx("div", { className: t3, children: /* @__PURE__ */ jsxs(T0, { maxWidth: t4, className: t5, children: [
8771
+ t6,
8772
+ t7,
8773
+ t8,
8774
+ t18,
8775
+ t19
8840
8776
  ] }) });
8841
- $[50] = t19;
8842
- $[51] = t20;
8843
- $[52] = t21;
8844
- $[53] = t4;
8845
- $[54] = t9;
8846
- $[55] = t22;
8777
+ $[32] = T0;
8778
+ $[33] = t18;
8779
+ $[34] = t19;
8780
+ $[35] = t6;
8781
+ $[36] = t7;
8782
+ $[37] = t8;
8783
+ $[38] = t20;
8847
8784
  } else {
8848
- t22 = $[55];
8785
+ t20 = $[38];
8849
8786
  }
8850
- return t22;
8787
+ return t20;
8851
8788
  }
8852
8789
  function TemplateButton(t0) {
8853
8790
  const $ = c(10);
@@ -9985,7 +9922,6 @@ function CollectionEditorInternal({
9985
9922
  extraView,
9986
9923
  handleCancel,
9987
9924
  setFormDirty,
9988
- pathSuggestions,
9989
9925
  getUser,
9990
9926
  parentCollection,
9991
9927
  getData,
@@ -10264,6 +10200,14 @@ function CollectionEditorInternal({
10264
10200
  });
10265
10201
  });
10266
10202
  };
10203
+ const onWelcomeScreenContinue = (importData, propertiesOrder_0) => {
10204
+ if (importData) {
10205
+ onImportDataSet(importData, propertiesOrder_0);
10206
+ setCurrentView("import_data_mapping");
10207
+ } else {
10208
+ setCurrentView("details");
10209
+ }
10210
+ };
10267
10211
  return /* @__PURE__ */ jsxs(DialogContent, { fullHeight: true, children: [
10268
10212
  /* @__PURE__ */ jsx(Formex, { value: formController, children: /* @__PURE__ */ jsxs(Fragment, { children: [
10269
10213
  !isNewCollection && /* @__PURE__ */ jsxs(Tabs, { value: currentView, innerClassName: cls(defaultBorderMixin, "px-4 h-14 w-full justify-end bg-surface-50 dark:bg-surface-950 border-b"), onValueChange: (v) => setCurrentView(v), children: [
@@ -10275,14 +10219,7 @@ function CollectionEditorInternal({
10275
10219
  /* @__PURE__ */ jsxs("form", { noValidate: true, onSubmit: formController.handleSubmit, className: cls(isNewCollection ? "h-full" : "h-[calc(100%-48px)]", "flex-grow flex flex-col relative"), children: [
10276
10220
  currentView === "loading" && /* @__PURE__ */ jsx(CircularProgressCenter, {}),
10277
10221
  currentView === "extra_view" && path && extraView?.View && /* @__PURE__ */ jsx(extraView.View, { path }),
10278
- currentView === "welcome" && /* @__PURE__ */ jsx(CollectionEditorWelcomeView, { path, onContinue: (importData, propertiesOrder_0) => {
10279
- if (importData) {
10280
- onImportDataSet(importData, propertiesOrder_0);
10281
- setCurrentView("import_data_mapping");
10282
- } else {
10283
- setCurrentView("details");
10284
- }
10285
- }, existingCollectionPaths: existingPaths, parentCollection, pathSuggestions }),
10222
+ currentView === "welcome" && /* @__PURE__ */ jsx(CollectionEditorWelcomeView, { path, onContinue: onWelcomeScreenContinue, existingCollectionPaths: existingPaths, parentCollection }),
10286
10223
  currentView === "import_data_mapping" && importConfig && /* @__PURE__ */ jsx(CollectionEditorImportMapping, { importConfig, collectionEditable, propertyConfigs }),
10287
10224
  currentView === "import_data_preview" && importConfig && /* @__PURE__ */ jsx(CollectionEditorImportDataPreview, { importConfig, properties: values_1.properties, propertiesOrder: values_1.propertiesOrder }),
10288
10225
  currentView === "import_data_saving" && importConfig && /* @__PURE__ */ jsx(ImportSaveInProgress, { importConfig, collection: values_1, path, onImportSuccess: async (importedCollection) => {
@@ -10309,7 +10246,7 @@ function CollectionEditorInternal({
10309
10246
  propertyErrorsRef.current = current;
10310
10247
  formController.validate();
10311
10248
  }, getUser, getData: getDataWithPath, doCollectionInference, propertyConfigs, collectionEditable, extraIcon: extraView?.icon && /* @__PURE__ */ jsx(IconButton, { color: "primary", onClick: () => setCurrentView("extra_view"), children: extraView.icon }) }),
10312
- currentView !== "welcome" && /* @__PURE__ */ jsxs(DialogActions, { position: "absolute", children: [
10249
+ /* @__PURE__ */ jsxs(DialogActions, { position: "absolute", children: [
10313
10250
  error && /* @__PURE__ */ jsx(ErrorView, { error }),
10314
10251
  isNewCollection && includeTemplates && currentView === "import_data_mapping" && /* @__PURE__ */ jsxs(Button, { variant: "text", type: "button", color: "primary", onClick: () => {
10315
10252
  importConfig.setInUse(false);
@@ -10324,17 +10261,18 @@ function CollectionEditorInternal({
10324
10261
  /* @__PURE__ */ jsx(ArrowBackIcon, {}),
10325
10262
  "Back"
10326
10263
  ] }),
10327
- isNewCollection && includeTemplates && currentView === "details" && /* @__PURE__ */ jsxs(Button, { variant: "text", color: "primary", type: "button", onClick: () => setCurrentView("welcome"), children: [
10264
+ isNewCollection && includeTemplates && currentView === "details" && /* @__PURE__ */ jsxs(Button, { variant: "text", color: "neutral", type: "button", onClick: () => setCurrentView("welcome"), children: [
10328
10265
  /* @__PURE__ */ jsx(ArrowBackIcon, {}),
10329
10266
  "Back"
10330
10267
  ] }),
10331
- isNewCollection && currentView === "properties" && /* @__PURE__ */ jsxs(Button, { variant: "text", type: "button", color: "primary", onClick: () => setCurrentView("details"), children: [
10268
+ isNewCollection && currentView === "properties" && /* @__PURE__ */ jsxs(Button, { variant: "text", type: "button", color: "neutral", onClick: () => setCurrentView("details"), children: [
10332
10269
  /* @__PURE__ */ jsx(ArrowBackIcon, {}),
10333
10270
  "Back"
10334
10271
  ] }),
10335
- /* @__PURE__ */ jsx(Button, { variant: "text", color: "primary", onClick: () => {
10272
+ /* @__PURE__ */ jsx(Button, { variant: "text", color: "neutral", onClick: () => {
10336
10273
  handleCancel();
10337
10274
  }, children: "Cancel" }),
10275
+ currentView === "welcome" && /* @__PURE__ */ jsx(Button, { variant: "text", onClick: () => onWelcomeScreenContinue(), children: "Continue from scratch" }),
10338
10276
  isNewCollection && currentView === "import_data_mapping" && /* @__PURE__ */ jsx(Button, { variant: "filled", color: "primary", onClick: onImportMappingComplete, children: "Next" }),
10339
10277
  isNewCollection && currentView === "import_data_preview" && /* @__PURE__ */ jsx(Button, { variant: "filled", color: "primary", onClick: () => {
10340
10278
  setNextMode();
@@ -10416,7 +10354,7 @@ const validateId = (value, isNewCollection, existingPaths, existingIds) => {
10416
10354
  const ConfigControllerContext = React__default.createContext({});
10417
10355
  const CollectionEditorContext = React__default.createContext({});
10418
10356
  const ConfigControllerProvider = React__default.memo(function ConfigControllerProvider2(t0) {
10419
- const $ = c(65);
10357
+ const $ = c(68);
10420
10358
  const {
10421
10359
  children,
10422
10360
  collectionConfigController,
@@ -10426,7 +10364,8 @@ const ConfigControllerProvider = React__default.memo(function ConfigControllerPr
10426
10364
  extraView,
10427
10365
  getUser,
10428
10366
  getData,
10429
- onAnalyticsEvent
10367
+ onAnalyticsEvent,
10368
+ pathSuggestions
10430
10369
  } = t0;
10431
10370
  const navigation = useNavigationController();
10432
10371
  const navigate = useNavigate();
@@ -10438,7 +10377,7 @@ const ConfigControllerProvider = React__default.memo(function ConfigControllerPr
10438
10377
  const [currentPropertyDialog, setCurrentPropertyDialog] = React__default.useState();
10439
10378
  const defaultConfigPermissions = _temp;
10440
10379
  let t1;
10441
- if ($[0] !== onAnalyticsEvent) {
10380
+ if ($[0] !== onAnalyticsEvent || $[1] !== pathSuggestions) {
10442
10381
  t1 = (t26) => {
10443
10382
  const {
10444
10383
  id,
@@ -10459,17 +10398,19 @@ const ConfigControllerProvider = React__default.memo(function ConfigControllerPr
10459
10398
  isNewCollection: false,
10460
10399
  parentCollection,
10461
10400
  redirect: false,
10462
- existingEntities
10401
+ existingEntities,
10402
+ pathSuggestions
10463
10403
  });
10464
10404
  };
10465
10405
  $[0] = onAnalyticsEvent;
10466
- $[1] = t1;
10406
+ $[1] = pathSuggestions;
10407
+ $[2] = t1;
10467
10408
  } else {
10468
- t1 = $[1];
10409
+ t1 = $[2];
10469
10410
  }
10470
10411
  const editCollection = t1;
10471
10412
  let t2;
10472
- if ($[2] !== onAnalyticsEvent) {
10413
+ if ($[3] !== onAnalyticsEvent) {
10473
10414
  t2 = (t32) => {
10474
10415
  const {
10475
10416
  propertyKey,
@@ -10498,14 +10439,14 @@ const ConfigControllerProvider = React__default.memo(function ConfigControllerPr
10498
10439
  existingEntities: existingEntities_0
10499
10440
  });
10500
10441
  };
10501
- $[2] = onAnalyticsEvent;
10502
- $[3] = t2;
10442
+ $[3] = onAnalyticsEvent;
10443
+ $[4] = t2;
10503
10444
  } else {
10504
- t2 = $[3];
10445
+ t2 = $[4];
10505
10446
  }
10506
10447
  const editProperty = t2;
10507
10448
  let t3;
10508
- if ($[4] !== onAnalyticsEvent) {
10449
+ if ($[5] !== onAnalyticsEvent || $[6] !== pathSuggestions) {
10509
10450
  t3 = (t42) => {
10510
10451
  const {
10511
10452
  parentCollectionIds: parentCollectionIds_1,
@@ -10533,35 +10474,39 @@ const ConfigControllerProvider = React__default.memo(function ConfigControllerPr
10533
10474
  parentCollectionIds: parentCollectionIds_1,
10534
10475
  parentCollection: parentCollection_0,
10535
10476
  initialValues,
10536
- redirect
10477
+ redirect,
10478
+ pathSuggestions
10537
10479
  });
10538
10480
  };
10539
- $[4] = onAnalyticsEvent;
10540
- $[5] = t3;
10481
+ $[5] = onAnalyticsEvent;
10482
+ $[6] = pathSuggestions;
10483
+ $[7] = t3;
10541
10484
  } else {
10542
- t3 = $[5];
10485
+ t3 = $[7];
10543
10486
  }
10544
10487
  const createCollection = t3;
10545
10488
  const t4 = configPermissions ?? defaultConfigPermissions;
10546
10489
  let t5;
10547
- if ($[6] !== createCollection || $[7] !== editCollection || $[8] !== editProperty || $[9] !== t4) {
10490
+ if ($[8] !== createCollection || $[9] !== editCollection || $[10] !== editProperty || $[11] !== pathSuggestions || $[12] !== t4) {
10548
10491
  t5 = {
10549
10492
  editCollection,
10550
10493
  createCollection,
10551
10494
  editProperty,
10552
- configPermissions: t4
10495
+ configPermissions: t4,
10496
+ pathSuggestions
10553
10497
  };
10554
- $[6] = createCollection;
10555
- $[7] = editCollection;
10556
- $[8] = editProperty;
10557
- $[9] = t4;
10558
- $[10] = t5;
10498
+ $[8] = createCollection;
10499
+ $[9] = editCollection;
10500
+ $[10] = editProperty;
10501
+ $[11] = pathSuggestions;
10502
+ $[12] = t4;
10503
+ $[13] = t5;
10559
10504
  } else {
10560
- t5 = $[10];
10505
+ t5 = $[13];
10561
10506
  }
10562
10507
  const t6 = Boolean(currentDialog);
10563
10508
  let t7;
10564
- if ($[11] !== currentDialog || $[12] !== navigate || $[13] !== navigation) {
10509
+ if ($[14] !== currentDialog || $[15] !== navigate || $[16] !== navigation) {
10565
10510
  t7 = (collection_0) => {
10566
10511
  if (currentDialog?.redirect) {
10567
10512
  if (collection_0 && currentDialog?.isNewCollection && !currentDialog.parentCollectionIds.length) {
@@ -10571,28 +10516,28 @@ const ConfigControllerProvider = React__default.memo(function ConfigControllerPr
10571
10516
  }
10572
10517
  setCurrentDialog(void 0);
10573
10518
  };
10574
- $[11] = currentDialog;
10575
- $[12] = navigate;
10576
- $[13] = navigation;
10577
- $[14] = t7;
10519
+ $[14] = currentDialog;
10520
+ $[15] = navigate;
10521
+ $[16] = navigation;
10522
+ $[17] = t7;
10578
10523
  } else {
10579
- t7 = $[14];
10524
+ t7 = $[17];
10580
10525
  }
10581
10526
  let t8;
10582
- if ($[15] !== collectionConfigController || $[16] !== collectionInference || $[17] !== currentDialog || $[18] !== extraView || $[19] !== getData || $[20] !== getUser || $[21] !== reservedGroups || $[22] !== t6 || $[23] !== t7) {
10527
+ if ($[18] !== collectionConfigController || $[19] !== collectionInference || $[20] !== currentDialog || $[21] !== extraView || $[22] !== getData || $[23] !== getUser || $[24] !== reservedGroups || $[25] !== t6 || $[26] !== t7) {
10583
10528
  t8 = /* @__PURE__ */ jsx(CollectionEditorDialog, { open: t6, configController: collectionConfigController, isNewCollection: false, collectionInference, ...currentDialog, getData, reservedGroups, extraView, getUser, handleClose: t7 });
10584
- $[15] = collectionConfigController;
10585
- $[16] = collectionInference;
10586
- $[17] = currentDialog;
10587
- $[18] = extraView;
10588
- $[19] = getData;
10589
- $[20] = getUser;
10590
- $[21] = reservedGroups;
10591
- $[22] = t6;
10592
- $[23] = t7;
10593
- $[24] = t8;
10529
+ $[18] = collectionConfigController;
10530
+ $[19] = collectionInference;
10531
+ $[20] = currentDialog;
10532
+ $[21] = extraView;
10533
+ $[22] = getData;
10534
+ $[23] = getUser;
10535
+ $[24] = reservedGroups;
10536
+ $[25] = t6;
10537
+ $[26] = t7;
10538
+ $[27] = t8;
10594
10539
  } else {
10595
- t8 = $[24];
10540
+ t8 = $[27];
10596
10541
  }
10597
10542
  const t9 = Boolean(currentPropertyDialog);
10598
10543
  const t10 = Boolean(currentPropertyDialog?.propertyKey);
@@ -10600,21 +10545,21 @@ const ConfigControllerProvider = React__default.memo(function ConfigControllerPr
10600
10545
  const t12 = !currentPropertyDialog ? false : !currentPropertyDialog?.propertyKey;
10601
10546
  const t13 = currentPropertyDialog?.collectionEditable ?? false;
10602
10547
  let t14;
10603
- if ($[25] !== currentPropertyDialog || $[26] !== getData || $[27] !== navigation) {
10548
+ if ($[28] !== currentPropertyDialog || $[29] !== getData || $[30] !== navigation) {
10604
10549
  t14 = getData && currentPropertyDialog?.editedCollectionId ? () => {
10605
10550
  console.debug("get data for property", currentPropertyDialog?.editedCollectionId);
10606
10551
  const resolvedPath = navigation.resolveIdsFrom(currentPropertyDialog.editedCollectionId);
10607
10552
  return getData(resolvedPath, []);
10608
10553
  } : void 0;
10609
- $[25] = currentPropertyDialog;
10610
- $[26] = getData;
10611
- $[27] = navigation;
10612
- $[28] = t14;
10554
+ $[28] = currentPropertyDialog;
10555
+ $[29] = getData;
10556
+ $[30] = navigation;
10557
+ $[31] = t14;
10613
10558
  } else {
10614
- t14 = $[28];
10559
+ t14 = $[31];
10615
10560
  }
10616
10561
  let t15;
10617
- if ($[29] !== collectionConfigController || $[30] !== currentPropertyDialog || $[31] !== snackbarController) {
10562
+ if ($[32] !== collectionConfigController || $[33] !== currentPropertyDialog || $[34] !== snackbarController) {
10618
10563
  t15 = (t162) => {
10619
10564
  const {
10620
10565
  id: id_0,
@@ -10643,15 +10588,15 @@ const ConfigControllerProvider = React__default.memo(function ConfigControllerPr
10643
10588
  return false;
10644
10589
  });
10645
10590
  };
10646
- $[29] = collectionConfigController;
10647
- $[30] = currentPropertyDialog;
10648
- $[31] = snackbarController;
10649
- $[32] = t15;
10591
+ $[32] = collectionConfigController;
10592
+ $[33] = currentPropertyDialog;
10593
+ $[34] = snackbarController;
10594
+ $[35] = t15;
10650
10595
  } else {
10651
- t15 = $[32];
10596
+ t15 = $[35];
10652
10597
  }
10653
10598
  let t16;
10654
- if ($[33] !== collectionConfigController || $[34] !== currentPropertyDialog?.currentPropertiesOrder || $[35] !== currentPropertyDialog?.editedCollectionId || $[36] !== currentPropertyDialog?.namespace || $[37] !== currentPropertyDialog?.parentCollectionIds || $[38] !== currentPropertyDialog?.propertyKey || $[39] !== snackbarController) {
10599
+ if ($[36] !== collectionConfigController || $[37] !== currentPropertyDialog?.currentPropertiesOrder || $[38] !== currentPropertyDialog?.editedCollectionId || $[39] !== currentPropertyDialog?.namespace || $[40] !== currentPropertyDialog?.parentCollectionIds || $[41] !== currentPropertyDialog?.propertyKey || $[42] !== snackbarController) {
10655
10600
  t16 = () => {
10656
10601
  if (!currentPropertyDialog?.propertyKey) {
10657
10602
  return;
@@ -10674,21 +10619,21 @@ const ConfigControllerProvider = React__default.memo(function ConfigControllerPr
10674
10619
  return false;
10675
10620
  });
10676
10621
  };
10677
- $[33] = collectionConfigController;
10678
- $[34] = currentPropertyDialog?.currentPropertiesOrder;
10679
- $[35] = currentPropertyDialog?.editedCollectionId;
10680
- $[36] = currentPropertyDialog?.namespace;
10681
- $[37] = currentPropertyDialog?.parentCollectionIds;
10682
- $[38] = currentPropertyDialog?.propertyKey;
10683
- $[39] = snackbarController;
10684
- $[40] = t16;
10622
+ $[36] = collectionConfigController;
10623
+ $[37] = currentPropertyDialog?.currentPropertiesOrder;
10624
+ $[38] = currentPropertyDialog?.editedCollectionId;
10625
+ $[39] = currentPropertyDialog?.namespace;
10626
+ $[40] = currentPropertyDialog?.parentCollectionIds;
10627
+ $[41] = currentPropertyDialog?.propertyKey;
10628
+ $[42] = snackbarController;
10629
+ $[43] = t16;
10685
10630
  } else {
10686
- t16 = $[40];
10631
+ t16 = $[43];
10687
10632
  }
10688
10633
  let t17;
10689
10634
  let t18;
10690
10635
  let t19;
10691
- if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
10636
+ if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
10692
10637
  t17 = () => {
10693
10638
  setCurrentPropertyDialog(void 0);
10694
10639
  };
@@ -10696,64 +10641,64 @@ const ConfigControllerProvider = React__default.memo(function ConfigControllerPr
10696
10641
  setCurrentPropertyDialog(void 0);
10697
10642
  };
10698
10643
  t19 = {};
10699
- $[41] = t17;
10700
- $[42] = t18;
10701
- $[43] = t19;
10644
+ $[44] = t17;
10645
+ $[45] = t18;
10646
+ $[46] = t19;
10702
10647
  } else {
10703
- t17 = $[41];
10704
- t18 = $[42];
10705
- t19 = $[43];
10648
+ t17 = $[44];
10649
+ t18 = $[45];
10650
+ t19 = $[46];
10706
10651
  }
10707
10652
  let t20;
10708
- if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
10653
+ if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
10709
10654
  t20 = [];
10710
- $[44] = t20;
10655
+ $[47] = t20;
10711
10656
  } else {
10712
- t20 = $[44];
10657
+ t20 = $[47];
10713
10658
  }
10714
10659
  const t21 = currentPropertyDialog?.property;
10715
10660
  const t22 = currentPropertyDialog?.propertyKey;
10716
10661
  let t23;
10717
- if ($[45] !== propertyConfigs || $[46] !== t10 || $[47] !== t11 || $[48] !== t12 || $[49] !== t13 || $[50] !== t14 || $[51] !== t15 || $[52] !== t16 || $[53] !== t21 || $[54] !== t22 || $[55] !== t9) {
10662
+ if ($[48] !== propertyConfigs || $[49] !== t10 || $[50] !== t11 || $[51] !== t12 || $[52] !== t13 || $[53] !== t14 || $[54] !== t15 || $[55] !== t16 || $[56] !== t21 || $[57] !== t22 || $[58] !== t9) {
10718
10663
  t23 = /* @__PURE__ */ 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 });
10719
- $[45] = propertyConfigs;
10720
- $[46] = t10;
10721
- $[47] = t11;
10722
- $[48] = t12;
10723
- $[49] = t13;
10724
- $[50] = t14;
10725
- $[51] = t15;
10726
- $[52] = t16;
10727
- $[53] = t21;
10728
- $[54] = t22;
10729
- $[55] = t9;
10730
- $[56] = t23;
10731
- } else {
10732
- t23 = $[56];
10664
+ $[48] = propertyConfigs;
10665
+ $[49] = t10;
10666
+ $[50] = t11;
10667
+ $[51] = t12;
10668
+ $[52] = t13;
10669
+ $[53] = t14;
10670
+ $[54] = t15;
10671
+ $[55] = t16;
10672
+ $[56] = t21;
10673
+ $[57] = t22;
10674
+ $[58] = t9;
10675
+ $[59] = t23;
10676
+ } else {
10677
+ t23 = $[59];
10733
10678
  }
10734
10679
  let t24;
10735
- if ($[57] !== children || $[58] !== t23 || $[59] !== t5 || $[60] !== t8) {
10680
+ if ($[60] !== children || $[61] !== t23 || $[62] !== t5 || $[63] !== t8) {
10736
10681
  t24 = /* @__PURE__ */ jsxs(CollectionEditorContext.Provider, { value: t5, children: [
10737
10682
  children,
10738
10683
  t8,
10739
10684
  t23
10740
10685
  ] });
10741
- $[57] = children;
10742
- $[58] = t23;
10743
- $[59] = t5;
10744
- $[60] = t8;
10745
- $[61] = t24;
10686
+ $[60] = children;
10687
+ $[61] = t23;
10688
+ $[62] = t5;
10689
+ $[63] = t8;
10690
+ $[64] = t24;
10746
10691
  } else {
10747
- t24 = $[61];
10692
+ t24 = $[64];
10748
10693
  }
10749
10694
  let t25;
10750
- if ($[62] !== collectionConfigController || $[63] !== t24) {
10695
+ if ($[65] !== collectionConfigController || $[66] !== t24) {
10751
10696
  t25 = /* @__PURE__ */ jsx(ConfigControllerContext.Provider, { value: collectionConfigController, children: t24 });
10752
- $[62] = collectionConfigController;
10753
- $[63] = t24;
10754
- $[64] = t25;
10697
+ $[65] = collectionConfigController;
10698
+ $[66] = t24;
10699
+ $[67] = t25;
10755
10700
  } else {
10756
- t25 = $[64];
10701
+ t25 = $[67];
10757
10702
  }
10758
10703
  return t25;
10759
10704
  }, equal);
@@ -11460,7 +11405,7 @@ function EditorEntityAction(t0) {
11460
11405
  return t9;
11461
11406
  }
11462
11407
  function useCollectionEditorPlugin(t0) {
11463
- const $ = c(22);
11408
+ const $ = c(23);
11464
11409
  const {
11465
11410
  collectionConfigController,
11466
11411
  configPermissions,
@@ -11470,11 +11415,12 @@ function useCollectionEditorPlugin(t0) {
11470
11415
  collectionInference,
11471
11416
  getData,
11472
11417
  onAnalyticsEvent,
11473
- includeIntroView: t1
11418
+ includeIntroView: t1,
11419
+ pathSuggestions
11474
11420
  } = t0;
11475
11421
  const includeIntroView = t1 === void 0 ? true : t1;
11476
11422
  let t2;
11477
- if ($[0] !== collectionConfigController || $[1] !== collectionInference || $[2] !== configPermissions || $[3] !== extraView || $[4] !== getData || $[5] !== getUser || $[6] !== onAnalyticsEvent || $[7] !== reservedGroups) {
11423
+ if ($[0] !== collectionConfigController || $[1] !== collectionInference || $[2] !== configPermissions || $[3] !== extraView || $[4] !== getData || $[5] !== getUser || $[6] !== onAnalyticsEvent || $[7] !== pathSuggestions || $[8] !== reservedGroups) {
11478
11424
  t2 = {
11479
11425
  Component: ConfigControllerProvider,
11480
11426
  props: {
@@ -11485,7 +11431,8 @@ function useCollectionEditorPlugin(t0) {
11485
11431
  extraView,
11486
11432
  getUser,
11487
11433
  getData,
11488
- onAnalyticsEvent
11434
+ onAnalyticsEvent,
11435
+ pathSuggestions
11489
11436
  }
11490
11437
  };
11491
11438
  $[0] = collectionConfigController;
@@ -11495,28 +11442,29 @@ function useCollectionEditorPlugin(t0) {
11495
11442
  $[4] = getData;
11496
11443
  $[5] = getUser;
11497
11444
  $[6] = onAnalyticsEvent;
11498
- $[7] = reservedGroups;
11499
- $[8] = t2;
11445
+ $[7] = pathSuggestions;
11446
+ $[8] = reservedGroups;
11447
+ $[9] = t2;
11500
11448
  } else {
11501
- t2 = $[8];
11449
+ t2 = $[9];
11502
11450
  }
11503
11451
  let t3;
11504
- if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
11452
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
11505
11453
  t3 = /* @__PURE__ */ jsx(NewCollectionButton, {});
11506
- $[9] = t3;
11454
+ $[10] = t3;
11507
11455
  } else {
11508
- t3 = $[9];
11456
+ t3 = $[10];
11509
11457
  }
11510
11458
  let t4;
11511
- if ($[10] !== includeIntroView) {
11459
+ if ($[11] !== includeIntroView) {
11512
11460
  t4 = includeIntroView ? /* @__PURE__ */ jsx(IntroWidget, {}) : void 0;
11513
- $[10] = includeIntroView;
11514
- $[11] = t4;
11461
+ $[11] = includeIntroView;
11462
+ $[12] = t4;
11515
11463
  } else {
11516
- t4 = $[11];
11464
+ t4 = $[12];
11517
11465
  }
11518
11466
  let t5;
11519
- if ($[12] !== collectionConfigController.navigationEntries || $[13] !== collectionConfigController.saveNavigationEntries || $[14] !== t4) {
11467
+ if ($[13] !== collectionConfigController.navigationEntries || $[14] !== collectionConfigController.saveNavigationEntries || $[15] !== t4) {
11520
11468
  t5 = {
11521
11469
  additionalActions: t3,
11522
11470
  additionalChildrenStart: t4,
@@ -11526,16 +11474,16 @@ function useCollectionEditorPlugin(t0) {
11526
11474
  navigationEntries: collectionConfigController.navigationEntries,
11527
11475
  onNavigationEntriesUpdate: collectionConfigController.saveNavigationEntries
11528
11476
  };
11529
- $[12] = collectionConfigController.navigationEntries;
11530
- $[13] = collectionConfigController.saveNavigationEntries;
11531
- $[14] = t4;
11532
- $[15] = t5;
11477
+ $[13] = collectionConfigController.navigationEntries;
11478
+ $[14] = collectionConfigController.saveNavigationEntries;
11479
+ $[15] = t4;
11480
+ $[16] = t5;
11533
11481
  } else {
11534
- t5 = $[15];
11482
+ t5 = $[16];
11535
11483
  }
11536
11484
  let t6;
11537
11485
  let t7;
11538
- if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
11486
+ if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
11539
11487
  t6 = {
11540
11488
  CollectionActionsStart: EditorCollectionActionStart,
11541
11489
  CollectionActions: EditorCollectionAction,
@@ -11545,14 +11493,14 @@ function useCollectionEditorPlugin(t0) {
11545
11493
  t7 = {
11546
11494
  ActionsTop: EditorEntityAction
11547
11495
  };
11548
- $[16] = t6;
11549
- $[17] = t7;
11496
+ $[17] = t6;
11497
+ $[18] = t7;
11550
11498
  } else {
11551
- t6 = $[16];
11552
- t7 = $[17];
11499
+ t6 = $[17];
11500
+ t7 = $[18];
11553
11501
  }
11554
11502
  let t8;
11555
- if ($[18] !== collectionConfigController.loading || $[19] !== t2 || $[20] !== t5) {
11503
+ if ($[19] !== collectionConfigController.loading || $[20] !== t2 || $[21] !== t5) {
11556
11504
  t8 = {
11557
11505
  key: "collection_editor",
11558
11506
  loading: collectionConfigController.loading,
@@ -11561,12 +11509,12 @@ function useCollectionEditorPlugin(t0) {
11561
11509
  collectionView: t6,
11562
11510
  form: t7
11563
11511
  };
11564
- $[18] = collectionConfigController.loading;
11565
- $[19] = t2;
11566
- $[20] = t5;
11567
- $[21] = t8;
11512
+ $[19] = collectionConfigController.loading;
11513
+ $[20] = t2;
11514
+ $[21] = t5;
11515
+ $[22] = t8;
11568
11516
  } else {
11569
- t8 = $[21];
11517
+ t8 = $[22];
11570
11518
  }
11571
11519
  return t8;
11572
11520
  }
@@ -11698,7 +11646,7 @@ function MissingReferenceWidget(t0) {
11698
11646
  collectionEditor.createCollection({
11699
11647
  initialValues: {
11700
11648
  path,
11701
- name: unslugify(path)
11649
+ name: prettifyIdentifier(path)
11702
11650
  },
11703
11651
  parentCollectionIds,
11704
11652
  redirect: false,