@firecms/collection_editor 3.0.0-tw4.2 → 3.0.0-tw4.4
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.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,
|
|
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 ?
|
|
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(
|
|
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
|
|
8601
|
-
|
|
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 ($[
|
|
8605
|
-
|
|
8606
|
-
|
|
8607
|
-
|
|
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
|
-
|
|
8622
|
-
t2 = $[4];
|
|
8615
|
+
t2 = $[3];
|
|
8623
8616
|
}
|
|
8624
|
-
|
|
8617
|
+
const filteredSuggestions = t1.filter(t2);
|
|
8625
8618
|
const {
|
|
8626
8619
|
setFieldValue,
|
|
8627
8620
|
setValues
|
|
8628
8621
|
} = useFormex();
|
|
8629
|
-
const
|
|
8630
|
-
|
|
8631
|
-
|
|
8632
|
-
|
|
8633
|
-
let
|
|
8634
|
-
if ($[
|
|
8635
|
-
|
|
8636
|
-
$[
|
|
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
|
-
|
|
8631
|
+
t6 = $[4];
|
|
8639
8632
|
}
|
|
8640
|
-
let
|
|
8641
|
-
if ($[
|
|
8642
|
-
|
|
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
|
-
$[
|
|
8647
|
-
$[
|
|
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
|
-
|
|
8642
|
+
t7 = $[6];
|
|
8666
8643
|
}
|
|
8667
|
-
|
|
8668
|
-
|
|
8669
|
-
|
|
8670
|
-
setFieldValue("name",
|
|
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
|
-
|
|
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 ($[
|
|
8694
|
-
t9 = /* @__PURE__ */
|
|
8695
|
-
|
|
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 = $[
|
|
8659
|
+
t9 = $[7];
|
|
8708
8660
|
}
|
|
8709
8661
|
let t10;
|
|
8710
|
-
if ($[
|
|
8711
|
-
t10 = /* @__PURE__ */ jsx(
|
|
8712
|
-
$[
|
|
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 = $[
|
|
8666
|
+
t10 = $[8];
|
|
8715
8667
|
}
|
|
8716
8668
|
let t11;
|
|
8717
|
-
if ($[
|
|
8718
|
-
t11 = /* @__PURE__ */ jsx(
|
|
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
|
-
$[
|
|
8730
|
-
$[
|
|
8731
|
-
$[
|
|
8674
|
+
$[9] = onContinue;
|
|
8675
|
+
$[10] = setValues;
|
|
8676
|
+
$[11] = t11;
|
|
8732
8677
|
} else {
|
|
8733
|
-
|
|
8678
|
+
t11 = $[11];
|
|
8734
8679
|
}
|
|
8735
|
-
let
|
|
8736
|
-
if ($[
|
|
8737
|
-
|
|
8738
|
-
$[
|
|
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
|
-
|
|
8685
|
+
t12 = $[12];
|
|
8741
8686
|
}
|
|
8742
|
-
let
|
|
8743
|
-
if ($[
|
|
8744
|
-
|
|
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
|
-
$[
|
|
8749
|
-
$[
|
|
8750
|
-
$[
|
|
8693
|
+
$[13] = onContinue;
|
|
8694
|
+
$[14] = setValues;
|
|
8695
|
+
$[15] = t13;
|
|
8751
8696
|
} else {
|
|
8752
|
-
|
|
8697
|
+
t13 = $[15];
|
|
8753
8698
|
}
|
|
8754
|
-
let
|
|
8755
|
-
if ($[
|
|
8756
|
-
|
|
8757
|
-
$[
|
|
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
|
-
|
|
8704
|
+
t14 = $[16];
|
|
8760
8705
|
}
|
|
8761
|
-
let
|
|
8762
|
-
if ($[
|
|
8763
|
-
|
|
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
|
-
$[
|
|
8768
|
-
$[
|
|
8769
|
-
$[
|
|
8712
|
+
$[17] = onContinue;
|
|
8713
|
+
$[18] = setValues;
|
|
8714
|
+
$[19] = t15;
|
|
8770
8715
|
} else {
|
|
8771
|
-
|
|
8716
|
+
t15 = $[19];
|
|
8772
8717
|
}
|
|
8773
|
-
let
|
|
8774
|
-
if ($[
|
|
8775
|
-
|
|
8776
|
-
$[
|
|
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
|
-
|
|
8723
|
+
t16 = $[20];
|
|
8779
8724
|
}
|
|
8780
|
-
let
|
|
8781
|
-
if ($[
|
|
8782
|
-
|
|
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
|
-
$[
|
|
8787
|
-
$[
|
|
8788
|
-
$[
|
|
8731
|
+
$[21] = onContinue;
|
|
8732
|
+
$[22] = setValues;
|
|
8733
|
+
$[23] = t17;
|
|
8789
8734
|
} else {
|
|
8790
|
-
|
|
8735
|
+
t17 = $[23];
|
|
8791
8736
|
}
|
|
8792
|
-
let
|
|
8793
|
-
if ($[
|
|
8794
|
-
|
|
8795
|
-
|
|
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
|
-
|
|
8798
|
-
|
|
8799
|
-
|
|
8800
|
-
|
|
8742
|
+
t11,
|
|
8743
|
+
t13,
|
|
8744
|
+
t15,
|
|
8745
|
+
t17
|
|
8801
8746
|
] })
|
|
8802
8747
|
] });
|
|
8803
|
-
$[
|
|
8804
|
-
$[
|
|
8805
|
-
$[
|
|
8806
|
-
$[
|
|
8807
|
-
$[
|
|
8748
|
+
$[24] = t11;
|
|
8749
|
+
$[25] = t13;
|
|
8750
|
+
$[26] = t15;
|
|
8751
|
+
$[27] = t17;
|
|
8752
|
+
$[28] = t18;
|
|
8808
8753
|
} else {
|
|
8809
|
-
|
|
8754
|
+
t18 = $[28];
|
|
8810
8755
|
}
|
|
8811
|
-
let
|
|
8812
|
-
if ($[
|
|
8813
|
-
|
|
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
|
-
$[
|
|
8818
|
-
$[
|
|
8819
|
-
$[
|
|
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
|
-
|
|
8766
|
+
t19 = $[31];
|
|
8830
8767
|
}
|
|
8831
|
-
let
|
|
8832
|
-
if ($[
|
|
8833
|
-
|
|
8834
|
-
|
|
8835
|
-
|
|
8836
|
-
|
|
8837
|
-
|
|
8838
|
-
|
|
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
|
-
$[
|
|
8842
|
-
$[
|
|
8843
|
-
$[
|
|
8844
|
-
$[
|
|
8845
|
-
$[
|
|
8846
|
-
$[
|
|
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
|
-
|
|
8785
|
+
t20 = $[38];
|
|
8849
8786
|
}
|
|
8850
|
-
return
|
|
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:
|
|
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
|
-
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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(
|
|
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] =
|
|
10406
|
+
$[1] = pathSuggestions;
|
|
10407
|
+
$[2] = t1;
|
|
10467
10408
|
} else {
|
|
10468
|
-
t1 = $[
|
|
10409
|
+
t1 = $[2];
|
|
10469
10410
|
}
|
|
10470
10411
|
const editCollection = t1;
|
|
10471
10412
|
let t2;
|
|
10472
|
-
if ($[
|
|
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
|
-
$[
|
|
10502
|
-
$[
|
|
10442
|
+
$[3] = onAnalyticsEvent;
|
|
10443
|
+
$[4] = t2;
|
|
10503
10444
|
} else {
|
|
10504
|
-
t2 = $[
|
|
10445
|
+
t2 = $[4];
|
|
10505
10446
|
}
|
|
10506
10447
|
const editProperty = t2;
|
|
10507
10448
|
let t3;
|
|
10508
|
-
if ($[
|
|
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
|
-
$[
|
|
10540
|
-
$[
|
|
10481
|
+
$[5] = onAnalyticsEvent;
|
|
10482
|
+
$[6] = pathSuggestions;
|
|
10483
|
+
$[7] = t3;
|
|
10541
10484
|
} else {
|
|
10542
|
-
t3 = $[
|
|
10485
|
+
t3 = $[7];
|
|
10543
10486
|
}
|
|
10544
10487
|
const createCollection = t3;
|
|
10545
10488
|
const t4 = configPermissions ?? defaultConfigPermissions;
|
|
10546
10489
|
let t5;
|
|
10547
|
-
if ($[
|
|
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
|
-
$[
|
|
10555
|
-
$[
|
|
10556
|
-
$[
|
|
10557
|
-
$[
|
|
10558
|
-
$[
|
|
10498
|
+
$[8] = createCollection;
|
|
10499
|
+
$[9] = editCollection;
|
|
10500
|
+
$[10] = editProperty;
|
|
10501
|
+
$[11] = pathSuggestions;
|
|
10502
|
+
$[12] = t4;
|
|
10503
|
+
$[13] = t5;
|
|
10559
10504
|
} else {
|
|
10560
|
-
t5 = $[
|
|
10505
|
+
t5 = $[13];
|
|
10561
10506
|
}
|
|
10562
10507
|
const t6 = Boolean(currentDialog);
|
|
10563
10508
|
let t7;
|
|
10564
|
-
if ($[
|
|
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
|
-
$[
|
|
10575
|
-
$[
|
|
10576
|
-
$[
|
|
10577
|
-
$[
|
|
10519
|
+
$[14] = currentDialog;
|
|
10520
|
+
$[15] = navigate;
|
|
10521
|
+
$[16] = navigation;
|
|
10522
|
+
$[17] = t7;
|
|
10578
10523
|
} else {
|
|
10579
|
-
t7 = $[
|
|
10524
|
+
t7 = $[17];
|
|
10580
10525
|
}
|
|
10581
10526
|
let t8;
|
|
10582
|
-
if ($[
|
|
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
|
-
$[
|
|
10585
|
-
$[
|
|
10586
|
-
$[
|
|
10587
|
-
$[
|
|
10588
|
-
$[
|
|
10589
|
-
$[
|
|
10590
|
-
$[
|
|
10591
|
-
$[
|
|
10592
|
-
$[
|
|
10593
|
-
$[
|
|
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 = $[
|
|
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 ($[
|
|
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
|
-
$[
|
|
10610
|
-
$[
|
|
10611
|
-
$[
|
|
10612
|
-
$[
|
|
10554
|
+
$[28] = currentPropertyDialog;
|
|
10555
|
+
$[29] = getData;
|
|
10556
|
+
$[30] = navigation;
|
|
10557
|
+
$[31] = t14;
|
|
10613
10558
|
} else {
|
|
10614
|
-
t14 = $[
|
|
10559
|
+
t14 = $[31];
|
|
10615
10560
|
}
|
|
10616
10561
|
let t15;
|
|
10617
|
-
if ($[
|
|
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
|
-
$[
|
|
10647
|
-
$[
|
|
10648
|
-
$[
|
|
10649
|
-
$[
|
|
10591
|
+
$[32] = collectionConfigController;
|
|
10592
|
+
$[33] = currentPropertyDialog;
|
|
10593
|
+
$[34] = snackbarController;
|
|
10594
|
+
$[35] = t15;
|
|
10650
10595
|
} else {
|
|
10651
|
-
t15 = $[
|
|
10596
|
+
t15 = $[35];
|
|
10652
10597
|
}
|
|
10653
10598
|
let t16;
|
|
10654
|
-
if ($[
|
|
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
|
-
$[
|
|
10678
|
-
$[
|
|
10679
|
-
$[
|
|
10680
|
-
$[
|
|
10681
|
-
$[
|
|
10682
|
-
$[
|
|
10683
|
-
$[
|
|
10684
|
-
$[
|
|
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 = $[
|
|
10631
|
+
t16 = $[43];
|
|
10687
10632
|
}
|
|
10688
10633
|
let t17;
|
|
10689
10634
|
let t18;
|
|
10690
10635
|
let t19;
|
|
10691
|
-
if ($[
|
|
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
|
-
$[
|
|
10700
|
-
$[
|
|
10701
|
-
$[
|
|
10644
|
+
$[44] = t17;
|
|
10645
|
+
$[45] = t18;
|
|
10646
|
+
$[46] = t19;
|
|
10702
10647
|
} else {
|
|
10703
|
-
t17 = $[
|
|
10704
|
-
t18 = $[
|
|
10705
|
-
t19 = $[
|
|
10648
|
+
t17 = $[44];
|
|
10649
|
+
t18 = $[45];
|
|
10650
|
+
t19 = $[46];
|
|
10706
10651
|
}
|
|
10707
10652
|
let t20;
|
|
10708
|
-
if ($[
|
|
10653
|
+
if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10709
10654
|
t20 = [];
|
|
10710
|
-
$[
|
|
10655
|
+
$[47] = t20;
|
|
10711
10656
|
} else {
|
|
10712
|
-
t20 = $[
|
|
10657
|
+
t20 = $[47];
|
|
10713
10658
|
}
|
|
10714
10659
|
const t21 = currentPropertyDialog?.property;
|
|
10715
10660
|
const t22 = currentPropertyDialog?.propertyKey;
|
|
10716
10661
|
let t23;
|
|
10717
|
-
if ($[
|
|
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
|
-
$[
|
|
10720
|
-
$[
|
|
10721
|
-
$[
|
|
10722
|
-
$[
|
|
10723
|
-
$[
|
|
10724
|
-
$[
|
|
10725
|
-
$[
|
|
10726
|
-
$[
|
|
10727
|
-
$[
|
|
10728
|
-
$[
|
|
10729
|
-
$[
|
|
10730
|
-
$[
|
|
10731
|
-
} else {
|
|
10732
|
-
t23 = $[
|
|
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 ($[
|
|
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
|
-
$[
|
|
10742
|
-
$[
|
|
10743
|
-
$[
|
|
10744
|
-
$[
|
|
10745
|
-
$[
|
|
10686
|
+
$[60] = children;
|
|
10687
|
+
$[61] = t23;
|
|
10688
|
+
$[62] = t5;
|
|
10689
|
+
$[63] = t8;
|
|
10690
|
+
$[64] = t24;
|
|
10746
10691
|
} else {
|
|
10747
|
-
t24 = $[
|
|
10692
|
+
t24 = $[64];
|
|
10748
10693
|
}
|
|
10749
10694
|
let t25;
|
|
10750
|
-
if ($[
|
|
10695
|
+
if ($[65] !== collectionConfigController || $[66] !== t24) {
|
|
10751
10696
|
t25 = /* @__PURE__ */ jsx(ConfigControllerContext.Provider, { value: collectionConfigController, children: t24 });
|
|
10752
|
-
$[
|
|
10753
|
-
$[
|
|
10754
|
-
$[
|
|
10697
|
+
$[65] = collectionConfigController;
|
|
10698
|
+
$[66] = t24;
|
|
10699
|
+
$[67] = t25;
|
|
10755
10700
|
} else {
|
|
10756
|
-
t25 = $[
|
|
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(
|
|
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] =
|
|
11499
|
-
$[8] =
|
|
11445
|
+
$[7] = pathSuggestions;
|
|
11446
|
+
$[8] = reservedGroups;
|
|
11447
|
+
$[9] = t2;
|
|
11500
11448
|
} else {
|
|
11501
|
-
t2 = $[
|
|
11449
|
+
t2 = $[9];
|
|
11502
11450
|
}
|
|
11503
11451
|
let t3;
|
|
11504
|
-
if ($[
|
|
11452
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
11505
11453
|
t3 = /* @__PURE__ */ jsx(NewCollectionButton, {});
|
|
11506
|
-
$[
|
|
11454
|
+
$[10] = t3;
|
|
11507
11455
|
} else {
|
|
11508
|
-
t3 = $[
|
|
11456
|
+
t3 = $[10];
|
|
11509
11457
|
}
|
|
11510
11458
|
let t4;
|
|
11511
|
-
if ($[
|
|
11459
|
+
if ($[11] !== includeIntroView) {
|
|
11512
11460
|
t4 = includeIntroView ? /* @__PURE__ */ jsx(IntroWidget, {}) : void 0;
|
|
11513
|
-
$[
|
|
11514
|
-
$[
|
|
11461
|
+
$[11] = includeIntroView;
|
|
11462
|
+
$[12] = t4;
|
|
11515
11463
|
} else {
|
|
11516
|
-
t4 = $[
|
|
11464
|
+
t4 = $[12];
|
|
11517
11465
|
}
|
|
11518
11466
|
let t5;
|
|
11519
|
-
if ($[
|
|
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
|
-
$[
|
|
11530
|
-
$[
|
|
11531
|
-
$[
|
|
11532
|
-
$[
|
|
11477
|
+
$[13] = collectionConfigController.navigationEntries;
|
|
11478
|
+
$[14] = collectionConfigController.saveNavigationEntries;
|
|
11479
|
+
$[15] = t4;
|
|
11480
|
+
$[16] = t5;
|
|
11533
11481
|
} else {
|
|
11534
|
-
t5 = $[
|
|
11482
|
+
t5 = $[16];
|
|
11535
11483
|
}
|
|
11536
11484
|
let t6;
|
|
11537
11485
|
let t7;
|
|
11538
|
-
if ($[
|
|
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
|
-
$[
|
|
11549
|
-
$[
|
|
11496
|
+
$[17] = t6;
|
|
11497
|
+
$[18] = t7;
|
|
11550
11498
|
} else {
|
|
11551
|
-
t6 = $[
|
|
11552
|
-
t7 = $[
|
|
11499
|
+
t6 = $[17];
|
|
11500
|
+
t7 = $[18];
|
|
11553
11501
|
}
|
|
11554
11502
|
let t8;
|
|
11555
|
-
if ($[
|
|
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
|
-
$[
|
|
11565
|
-
$[
|
|
11566
|
-
$[
|
|
11567
|
-
$[
|
|
11512
|
+
$[19] = collectionConfigController.loading;
|
|
11513
|
+
$[20] = t2;
|
|
11514
|
+
$[21] = t5;
|
|
11515
|
+
$[22] = t8;
|
|
11568
11516
|
} else {
|
|
11569
|
-
t8 = $[
|
|
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:
|
|
11649
|
+
name: prettifyIdentifier(path)
|
|
11702
11650
|
},
|
|
11703
11651
|
parentCollectionIds,
|
|
11704
11652
|
redirect: false,
|