@firecms/collection_editor 3.0.0-tw4.1 → 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/ConfigControllerProvider.d.ts +1 -0
- package/dist/index.es.js +284 -336
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +283 -335
- package/dist/index.umd.js.map +1 -1
- package/dist/types/collection_editor_controller.d.ts +1 -0
- package/dist/ui/collection_editor/CollectionEditorDialog.d.ts +0 -1
- package/dist/ui/collection_editor/CollectionEditorWelcomeView.d.ts +2 -3
- package/dist/useCollectionEditorPlugin.d.ts +2 -1
- package/package.json +8 -8
- package/src/ConfigControllerProvider.tsx +10 -3
- package/src/types/collection_editor_controller.tsx +2 -0
- package/src/ui/MissingReferenceWidget.tsx +2 -2
- package/src/ui/collection_editor/CollectionEditorDialog.tsx +21 -18
- package/src/ui/collection_editor/CollectionEditorWelcomeView.tsx +12 -40
- package/src/ui/collection_editor/properties/CommonPropertyFields.tsx +2 -2
- package/src/useCollectionEditorPlugin.tsx +5 -1
package/dist/index.umd.js
CHANGED
|
@@ -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.
|
|
3981
|
+
setFieldValue("name", newIdValue ? core.prettifyIdentifier(newIdValue) : "");
|
|
3982
3982
|
}
|
|
3983
3983
|
setFieldValue("id", newIdValue, true);
|
|
3984
3984
|
setFieldTouched("id", true);
|
|
@@ -8593,265 +8593,202 @@
|
|
|
8593
8593
|
}
|
|
8594
8594
|
};
|
|
8595
8595
|
function CollectionEditorWelcomeView(t0) {
|
|
8596
|
-
const $ = reactCompilerRuntime.c(
|
|
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
|
|
8605
|
-
|
|
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 ($[
|
|
8609
|
-
|
|
8610
|
-
|
|
8611
|
-
|
|
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
|
-
|
|
8626
|
-
t2 = $[4];
|
|
8619
|
+
t2 = $[3];
|
|
8627
8620
|
}
|
|
8628
|
-
|
|
8621
|
+
const filteredSuggestions = t1.filter(t2);
|
|
8629
8622
|
const {
|
|
8630
8623
|
setFieldValue,
|
|
8631
8624
|
setValues
|
|
8632
8625
|
} = formex.useFormex();
|
|
8633
|
-
const
|
|
8634
|
-
|
|
8635
|
-
|
|
8636
|
-
|
|
8637
|
-
let
|
|
8638
|
-
if ($[
|
|
8639
|
-
|
|
8640
|
-
$[
|
|
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
|
-
|
|
8635
|
+
t6 = $[4];
|
|
8643
8636
|
}
|
|
8644
|
-
let
|
|
8645
|
-
if ($[
|
|
8646
|
-
|
|
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
|
-
$[
|
|
8651
|
-
$[
|
|
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
|
-
|
|
8646
|
+
t7 = $[6];
|
|
8670
8647
|
}
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
setFieldValue("name", core.
|
|
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
|
-
|
|
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 ($[
|
|
8698
|
-
t9 = /* @__PURE__ */ jsxRuntime.
|
|
8699
|
-
|
|
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 = $[
|
|
8663
|
+
t9 = $[7];
|
|
8712
8664
|
}
|
|
8713
8665
|
let t10;
|
|
8714
|
-
if ($[
|
|
8715
|
-
t10 = /* @__PURE__ */ jsxRuntime.jsx(ui.
|
|
8716
|
-
$[
|
|
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 = $[
|
|
8670
|
+
t10 = $[8];
|
|
8719
8671
|
}
|
|
8720
8672
|
let t11;
|
|
8721
|
-
if ($[
|
|
8722
|
-
t11 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
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
|
-
$[
|
|
8734
|
-
$[
|
|
8735
|
-
$[
|
|
8678
|
+
$[9] = onContinue;
|
|
8679
|
+
$[10] = setValues;
|
|
8680
|
+
$[11] = t11;
|
|
8736
8681
|
} else {
|
|
8737
|
-
|
|
8682
|
+
t11 = $[11];
|
|
8738
8683
|
}
|
|
8739
|
-
let
|
|
8740
|
-
if ($[
|
|
8741
|
-
|
|
8742
|
-
$[
|
|
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
|
-
|
|
8689
|
+
t12 = $[12];
|
|
8745
8690
|
}
|
|
8746
|
-
let
|
|
8747
|
-
if ($[
|
|
8748
|
-
|
|
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
|
-
$[
|
|
8753
|
-
$[
|
|
8754
|
-
$[
|
|
8697
|
+
$[13] = onContinue;
|
|
8698
|
+
$[14] = setValues;
|
|
8699
|
+
$[15] = t13;
|
|
8755
8700
|
} else {
|
|
8756
|
-
|
|
8701
|
+
t13 = $[15];
|
|
8757
8702
|
}
|
|
8758
|
-
let
|
|
8759
|
-
if ($[
|
|
8760
|
-
|
|
8761
|
-
$[
|
|
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
|
-
|
|
8708
|
+
t14 = $[16];
|
|
8764
8709
|
}
|
|
8765
|
-
let
|
|
8766
|
-
if ($[
|
|
8767
|
-
|
|
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
|
-
$[
|
|
8772
|
-
$[
|
|
8773
|
-
$[
|
|
8716
|
+
$[17] = onContinue;
|
|
8717
|
+
$[18] = setValues;
|
|
8718
|
+
$[19] = t15;
|
|
8774
8719
|
} else {
|
|
8775
|
-
|
|
8720
|
+
t15 = $[19];
|
|
8776
8721
|
}
|
|
8777
|
-
let
|
|
8778
|
-
if ($[
|
|
8779
|
-
|
|
8780
|
-
$[
|
|
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
|
-
|
|
8727
|
+
t16 = $[20];
|
|
8783
8728
|
}
|
|
8784
|
-
let
|
|
8785
|
-
if ($[
|
|
8786
|
-
|
|
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
|
-
$[
|
|
8791
|
-
$[
|
|
8792
|
-
$[
|
|
8735
|
+
$[21] = onContinue;
|
|
8736
|
+
$[22] = setValues;
|
|
8737
|
+
$[23] = t17;
|
|
8793
8738
|
} else {
|
|
8794
|
-
|
|
8739
|
+
t17 = $[23];
|
|
8795
8740
|
}
|
|
8796
|
-
let
|
|
8797
|
-
if ($[
|
|
8798
|
-
|
|
8799
|
-
|
|
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
|
-
|
|
8802
|
-
|
|
8803
|
-
|
|
8804
|
-
|
|
8746
|
+
t11,
|
|
8747
|
+
t13,
|
|
8748
|
+
t15,
|
|
8749
|
+
t17
|
|
8805
8750
|
] })
|
|
8806
8751
|
] });
|
|
8807
|
-
$[
|
|
8808
|
-
$[
|
|
8809
|
-
$[
|
|
8810
|
-
$[
|
|
8811
|
-
$[
|
|
8752
|
+
$[24] = t11;
|
|
8753
|
+
$[25] = t13;
|
|
8754
|
+
$[26] = t15;
|
|
8755
|
+
$[27] = t17;
|
|
8756
|
+
$[28] = t18;
|
|
8812
8757
|
} else {
|
|
8813
|
-
|
|
8758
|
+
t18 = $[28];
|
|
8814
8759
|
}
|
|
8815
|
-
let
|
|
8816
|
-
if ($[
|
|
8817
|
-
|
|
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
|
-
$[
|
|
8822
|
-
$[
|
|
8823
|
-
$[
|
|
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
|
-
|
|
8770
|
+
t19 = $[31];
|
|
8834
8771
|
}
|
|
8835
|
-
let
|
|
8836
|
-
if ($[
|
|
8837
|
-
|
|
8838
|
-
|
|
8839
|
-
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
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
|
-
$[
|
|
8846
|
-
$[
|
|
8847
|
-
$[
|
|
8848
|
-
$[
|
|
8849
|
-
$[
|
|
8850
|
-
$[
|
|
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
|
-
|
|
8789
|
+
t20 = $[38];
|
|
8853
8790
|
}
|
|
8854
|
-
return
|
|
8791
|
+
return t20;
|
|
8855
8792
|
}
|
|
8856
8793
|
function TemplateButton(t0) {
|
|
8857
8794
|
const $ = reactCompilerRuntime.c(10);
|
|
@@ -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:
|
|
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
|
-
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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(
|
|
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] =
|
|
10410
|
+
$[1] = pathSuggestions;
|
|
10411
|
+
$[2] = t1;
|
|
10471
10412
|
} else {
|
|
10472
|
-
t1 = $[
|
|
10413
|
+
t1 = $[2];
|
|
10473
10414
|
}
|
|
10474
10415
|
const editCollection = t1;
|
|
10475
10416
|
let t2;
|
|
10476
|
-
if ($[
|
|
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
|
-
$[
|
|
10506
|
-
$[
|
|
10446
|
+
$[3] = onAnalyticsEvent;
|
|
10447
|
+
$[4] = t2;
|
|
10507
10448
|
} else {
|
|
10508
|
-
t2 = $[
|
|
10449
|
+
t2 = $[4];
|
|
10509
10450
|
}
|
|
10510
10451
|
const editProperty = t2;
|
|
10511
10452
|
let t3;
|
|
10512
|
-
if ($[
|
|
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
|
-
$[
|
|
10544
|
-
$[
|
|
10485
|
+
$[5] = onAnalyticsEvent;
|
|
10486
|
+
$[6] = pathSuggestions;
|
|
10487
|
+
$[7] = t3;
|
|
10545
10488
|
} else {
|
|
10546
|
-
t3 = $[
|
|
10489
|
+
t3 = $[7];
|
|
10547
10490
|
}
|
|
10548
10491
|
const createCollection = t3;
|
|
10549
10492
|
const t4 = configPermissions ?? defaultConfigPermissions;
|
|
10550
10493
|
let t5;
|
|
10551
|
-
if ($[
|
|
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
|
-
$[
|
|
10559
|
-
$[
|
|
10560
|
-
$[
|
|
10561
|
-
$[
|
|
10562
|
-
$[
|
|
10502
|
+
$[8] = createCollection;
|
|
10503
|
+
$[9] = editCollection;
|
|
10504
|
+
$[10] = editProperty;
|
|
10505
|
+
$[11] = pathSuggestions;
|
|
10506
|
+
$[12] = t4;
|
|
10507
|
+
$[13] = t5;
|
|
10563
10508
|
} else {
|
|
10564
|
-
t5 = $[
|
|
10509
|
+
t5 = $[13];
|
|
10565
10510
|
}
|
|
10566
10511
|
const t6 = Boolean(currentDialog);
|
|
10567
10512
|
let t7;
|
|
10568
|
-
if ($[
|
|
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
|
-
$[
|
|
10579
|
-
$[
|
|
10580
|
-
$[
|
|
10581
|
-
$[
|
|
10523
|
+
$[14] = currentDialog;
|
|
10524
|
+
$[15] = navigate;
|
|
10525
|
+
$[16] = navigation;
|
|
10526
|
+
$[17] = t7;
|
|
10582
10527
|
} else {
|
|
10583
|
-
t7 = $[
|
|
10528
|
+
t7 = $[17];
|
|
10584
10529
|
}
|
|
10585
10530
|
let t8;
|
|
10586
|
-
if ($[
|
|
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
|
-
$[
|
|
10589
|
-
$[
|
|
10590
|
-
$[
|
|
10591
|
-
$[
|
|
10592
|
-
$[
|
|
10593
|
-
$[
|
|
10594
|
-
$[
|
|
10595
|
-
$[
|
|
10596
|
-
$[
|
|
10597
|
-
$[
|
|
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 = $[
|
|
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 ($[
|
|
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
|
-
$[
|
|
10614
|
-
$[
|
|
10615
|
-
$[
|
|
10616
|
-
$[
|
|
10558
|
+
$[28] = currentPropertyDialog;
|
|
10559
|
+
$[29] = getData;
|
|
10560
|
+
$[30] = navigation;
|
|
10561
|
+
$[31] = t14;
|
|
10617
10562
|
} else {
|
|
10618
|
-
t14 = $[
|
|
10563
|
+
t14 = $[31];
|
|
10619
10564
|
}
|
|
10620
10565
|
let t15;
|
|
10621
|
-
if ($[
|
|
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
|
-
$[
|
|
10651
|
-
$[
|
|
10652
|
-
$[
|
|
10653
|
-
$[
|
|
10595
|
+
$[32] = collectionConfigController;
|
|
10596
|
+
$[33] = currentPropertyDialog;
|
|
10597
|
+
$[34] = snackbarController;
|
|
10598
|
+
$[35] = t15;
|
|
10654
10599
|
} else {
|
|
10655
|
-
t15 = $[
|
|
10600
|
+
t15 = $[35];
|
|
10656
10601
|
}
|
|
10657
10602
|
let t16;
|
|
10658
|
-
if ($[
|
|
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
|
-
$[
|
|
10682
|
-
$[
|
|
10683
|
-
$[
|
|
10684
|
-
$[
|
|
10685
|
-
$[
|
|
10686
|
-
$[
|
|
10687
|
-
$[
|
|
10688
|
-
$[
|
|
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 = $[
|
|
10635
|
+
t16 = $[43];
|
|
10691
10636
|
}
|
|
10692
10637
|
let t17;
|
|
10693
10638
|
let t18;
|
|
10694
10639
|
let t19;
|
|
10695
|
-
if ($[
|
|
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
|
-
$[
|
|
10704
|
-
$[
|
|
10705
|
-
$[
|
|
10648
|
+
$[44] = t17;
|
|
10649
|
+
$[45] = t18;
|
|
10650
|
+
$[46] = t19;
|
|
10706
10651
|
} else {
|
|
10707
|
-
t17 = $[
|
|
10708
|
-
t18 = $[
|
|
10709
|
-
t19 = $[
|
|
10652
|
+
t17 = $[44];
|
|
10653
|
+
t18 = $[45];
|
|
10654
|
+
t19 = $[46];
|
|
10710
10655
|
}
|
|
10711
10656
|
let t20;
|
|
10712
|
-
if ($[
|
|
10657
|
+
if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10713
10658
|
t20 = [];
|
|
10714
|
-
$[
|
|
10659
|
+
$[47] = t20;
|
|
10715
10660
|
} else {
|
|
10716
|
-
t20 = $[
|
|
10661
|
+
t20 = $[47];
|
|
10717
10662
|
}
|
|
10718
10663
|
const t21 = currentPropertyDialog?.property;
|
|
10719
10664
|
const t22 = currentPropertyDialog?.propertyKey;
|
|
10720
10665
|
let t23;
|
|
10721
|
-
if ($[
|
|
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
|
-
$[
|
|
10724
|
-
$[
|
|
10725
|
-
$[
|
|
10726
|
-
$[
|
|
10727
|
-
$[
|
|
10728
|
-
$[
|
|
10729
|
-
$[
|
|
10730
|
-
$[
|
|
10731
|
-
$[
|
|
10732
|
-
$[
|
|
10733
|
-
$[
|
|
10734
|
-
$[
|
|
10735
|
-
} else {
|
|
10736
|
-
t23 = $[
|
|
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 ($[
|
|
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
|
-
$[
|
|
10746
|
-
$[
|
|
10747
|
-
$[
|
|
10748
|
-
$[
|
|
10749
|
-
$[
|
|
10690
|
+
$[60] = children;
|
|
10691
|
+
$[61] = t23;
|
|
10692
|
+
$[62] = t5;
|
|
10693
|
+
$[63] = t8;
|
|
10694
|
+
$[64] = t24;
|
|
10750
10695
|
} else {
|
|
10751
|
-
t24 = $[
|
|
10696
|
+
t24 = $[64];
|
|
10752
10697
|
}
|
|
10753
10698
|
let t25;
|
|
10754
|
-
if ($[
|
|
10699
|
+
if ($[65] !== collectionConfigController || $[66] !== t24) {
|
|
10755
10700
|
t25 = /* @__PURE__ */ jsxRuntime.jsx(ConfigControllerContext.Provider, { value: collectionConfigController, children: t24 });
|
|
10756
|
-
$[
|
|
10757
|
-
$[
|
|
10758
|
-
$[
|
|
10701
|
+
$[65] = collectionConfigController;
|
|
10702
|
+
$[66] = t24;
|
|
10703
|
+
$[67] = t25;
|
|
10759
10704
|
} else {
|
|
10760
|
-
t25 = $[
|
|
10705
|
+
t25 = $[67];
|
|
10761
10706
|
}
|
|
10762
10707
|
return t25;
|
|
10763
10708
|
}, equal);
|
|
@@ -11464,7 +11409,7 @@
|
|
|
11464
11409
|
return t9;
|
|
11465
11410
|
}
|
|
11466
11411
|
function useCollectionEditorPlugin(t0) {
|
|
11467
|
-
const $ = reactCompilerRuntime.c(
|
|
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] =
|
|
11503
|
-
$[8] =
|
|
11449
|
+
$[7] = pathSuggestions;
|
|
11450
|
+
$[8] = reservedGroups;
|
|
11451
|
+
$[9] = t2;
|
|
11504
11452
|
} else {
|
|
11505
|
-
t2 = $[
|
|
11453
|
+
t2 = $[9];
|
|
11506
11454
|
}
|
|
11507
11455
|
let t3;
|
|
11508
|
-
if ($[
|
|
11456
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
11509
11457
|
t3 = /* @__PURE__ */ jsxRuntime.jsx(NewCollectionButton, {});
|
|
11510
|
-
$[
|
|
11458
|
+
$[10] = t3;
|
|
11511
11459
|
} else {
|
|
11512
|
-
t3 = $[
|
|
11460
|
+
t3 = $[10];
|
|
11513
11461
|
}
|
|
11514
11462
|
let t4;
|
|
11515
|
-
if ($[
|
|
11463
|
+
if ($[11] !== includeIntroView) {
|
|
11516
11464
|
t4 = includeIntroView ? /* @__PURE__ */ jsxRuntime.jsx(IntroWidget, {}) : void 0;
|
|
11517
|
-
$[
|
|
11518
|
-
$[
|
|
11465
|
+
$[11] = includeIntroView;
|
|
11466
|
+
$[12] = t4;
|
|
11519
11467
|
} else {
|
|
11520
|
-
t4 = $[
|
|
11468
|
+
t4 = $[12];
|
|
11521
11469
|
}
|
|
11522
11470
|
let t5;
|
|
11523
|
-
if ($[
|
|
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
|
-
$[
|
|
11534
|
-
$[
|
|
11535
|
-
$[
|
|
11536
|
-
$[
|
|
11481
|
+
$[13] = collectionConfigController.navigationEntries;
|
|
11482
|
+
$[14] = collectionConfigController.saveNavigationEntries;
|
|
11483
|
+
$[15] = t4;
|
|
11484
|
+
$[16] = t5;
|
|
11537
11485
|
} else {
|
|
11538
|
-
t5 = $[
|
|
11486
|
+
t5 = $[16];
|
|
11539
11487
|
}
|
|
11540
11488
|
let t6;
|
|
11541
11489
|
let t7;
|
|
11542
|
-
if ($[
|
|
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
|
-
$[
|
|
11553
|
-
$[
|
|
11500
|
+
$[17] = t6;
|
|
11501
|
+
$[18] = t7;
|
|
11554
11502
|
} else {
|
|
11555
|
-
t6 = $[
|
|
11556
|
-
t7 = $[
|
|
11503
|
+
t6 = $[17];
|
|
11504
|
+
t7 = $[18];
|
|
11557
11505
|
}
|
|
11558
11506
|
let t8;
|
|
11559
|
-
if ($[
|
|
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
|
-
$[
|
|
11569
|
-
$[
|
|
11570
|
-
$[
|
|
11571
|
-
$[
|
|
11516
|
+
$[19] = collectionConfigController.loading;
|
|
11517
|
+
$[20] = t2;
|
|
11518
|
+
$[21] = t5;
|
|
11519
|
+
$[22] = t8;
|
|
11572
11520
|
} else {
|
|
11573
|
-
t8 = $[
|
|
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.
|
|
11653
|
+
name: core.prettifyIdentifier(path)
|
|
11706
11654
|
},
|
|
11707
11655
|
parentCollectionIds,
|
|
11708
11656
|
redirect: false,
|