@firecms/collection_editor 3.0.0-canary.178 → 3.0.0-canary.179
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 +185 -138
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +185 -138
- package/dist/index.umd.js.map +1 -1
- package/dist/ui/collection_editor/CollectionDetailsForm.d.ts +3 -1
- package/dist/utils/collections.d.ts +1 -1
- package/package.json +8 -8
- package/src/ui/collection_editor/CollectionDetailsForm.tsx +7 -1
- package/src/ui/collection_editor/CollectionEditorDialog.tsx +40 -2
- package/src/ui/collection_editor/LayoutModeSwitch.tsx +1 -0
- package/src/utils/collections.ts +9 -7
package/dist/index.umd.js
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
return React.useContext(CollectionEditorContext);
|
|
30
30
|
};
|
|
31
31
|
function LayoutModeSwitch(t0) {
|
|
32
|
-
const $ = reactCompilerRuntime.c(
|
|
32
|
+
const $ = reactCompilerRuntime.c(29);
|
|
33
33
|
const {
|
|
34
34
|
value,
|
|
35
35
|
onChange,
|
|
@@ -147,26 +147,35 @@
|
|
|
147
147
|
t16 = $[24];
|
|
148
148
|
}
|
|
149
149
|
let t17;
|
|
150
|
-
if ($[25]
|
|
151
|
-
t17 = /* @__PURE__ */ jsxRuntime.
|
|
150
|
+
if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
|
|
151
|
+
t17 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", className: "ml-3.5", children: "Should documents be opened full screen or in an inline side dialog" });
|
|
152
|
+
$[25] = t17;
|
|
153
|
+
} else {
|
|
154
|
+
t17 = $[25];
|
|
155
|
+
}
|
|
156
|
+
let t18;
|
|
157
|
+
if ($[26] !== t1 || $[27] !== t16) {
|
|
158
|
+
t18 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t1, children: [
|
|
152
159
|
t2,
|
|
153
|
-
t16
|
|
160
|
+
t16,
|
|
161
|
+
t17
|
|
154
162
|
] });
|
|
155
|
-
$[
|
|
156
|
-
$[
|
|
157
|
-
$[
|
|
163
|
+
$[26] = t1;
|
|
164
|
+
$[27] = t16;
|
|
165
|
+
$[28] = t18;
|
|
158
166
|
} else {
|
|
159
|
-
|
|
167
|
+
t18 = $[28];
|
|
160
168
|
}
|
|
161
|
-
return
|
|
169
|
+
return t18;
|
|
162
170
|
}
|
|
163
171
|
function CollectionDetailsForm(t0) {
|
|
164
|
-
const $ = reactCompilerRuntime.c(
|
|
172
|
+
const $ = reactCompilerRuntime.c(177);
|
|
165
173
|
const {
|
|
166
174
|
isNewCollection,
|
|
167
175
|
reservedGroups,
|
|
168
176
|
groups,
|
|
169
|
-
parentCollection
|
|
177
|
+
parentCollection,
|
|
178
|
+
children
|
|
170
179
|
} = t0;
|
|
171
180
|
const groupRef = React.useRef(null);
|
|
172
181
|
const {
|
|
@@ -846,7 +855,7 @@
|
|
|
846
855
|
}
|
|
847
856
|
let t97;
|
|
848
857
|
if ($[151] !== advancedPanelExpanded || $[152] !== t96) {
|
|
849
|
-
t97 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
858
|
+
t97 = /* @__PURE__ */ jsxRuntime.jsx(ui.ExpandablePanel, { expanded: advancedPanelExpanded, onExpandedChange: setAdvancedPanelExpanded, title: t41, initiallyExpanded: false, children: t96 });
|
|
850
859
|
$[151] = advancedPanelExpanded;
|
|
851
860
|
$[152] = t96;
|
|
852
861
|
$[153] = t97;
|
|
@@ -854,78 +863,90 @@
|
|
|
854
863
|
t97 = $[153];
|
|
855
864
|
}
|
|
856
865
|
let t98;
|
|
857
|
-
if ($[154] !==
|
|
858
|
-
t98 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
866
|
+
if ($[154] !== children || $[155] !== t97) {
|
|
867
|
+
t98 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-8", children: [
|
|
868
|
+
t97,
|
|
869
|
+
children
|
|
870
|
+
] });
|
|
871
|
+
$[154] = children;
|
|
872
|
+
$[155] = t97;
|
|
873
|
+
$[156] = t98;
|
|
874
|
+
} else {
|
|
875
|
+
t98 = $[156];
|
|
876
|
+
}
|
|
877
|
+
let t99;
|
|
878
|
+
if ($[157] !== t27 || $[158] !== t36 || $[159] !== t37 || $[160] !== t40 || $[161] !== t98) {
|
|
879
|
+
t99 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t19, children: [
|
|
859
880
|
t27,
|
|
860
881
|
t36,
|
|
861
882
|
t37,
|
|
862
883
|
t40,
|
|
863
|
-
|
|
884
|
+
t98
|
|
864
885
|
] });
|
|
865
|
-
$[
|
|
866
|
-
$[
|
|
867
|
-
$[
|
|
868
|
-
$[
|
|
869
|
-
$[
|
|
870
|
-
$[
|
|
886
|
+
$[157] = t27;
|
|
887
|
+
$[158] = t36;
|
|
888
|
+
$[159] = t37;
|
|
889
|
+
$[160] = t40;
|
|
890
|
+
$[161] = t98;
|
|
891
|
+
$[162] = t99;
|
|
871
892
|
} else {
|
|
872
|
-
|
|
893
|
+
t99 = $[162];
|
|
873
894
|
}
|
|
874
|
-
let
|
|
875
|
-
if ($[
|
|
876
|
-
|
|
895
|
+
let t100;
|
|
896
|
+
if ($[163] === Symbol.for("react.memo_cache_sentinel")) {
|
|
897
|
+
t100 = /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
877
898
|
height: "52px"
|
|
878
899
|
} });
|
|
879
|
-
$[
|
|
900
|
+
$[163] = t100;
|
|
880
901
|
} else {
|
|
881
|
-
|
|
902
|
+
t100 = $[163];
|
|
882
903
|
}
|
|
883
|
-
let
|
|
884
|
-
if ($[
|
|
885
|
-
|
|
904
|
+
let t101;
|
|
905
|
+
if ($[164] !== setFieldValue) {
|
|
906
|
+
t101 = (icon) => {
|
|
886
907
|
setIconDialogOpen(false);
|
|
887
908
|
setFieldValue("icon", icon);
|
|
888
909
|
};
|
|
889
|
-
$[
|
|
890
|
-
$[162] = t100;
|
|
891
|
-
} else {
|
|
892
|
-
t100 = $[162];
|
|
893
|
-
}
|
|
894
|
-
let t101;
|
|
895
|
-
if ($[163] !== t100 || $[164] !== values.icon) {
|
|
896
|
-
t101 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsxRuntime.jsx(core.SearchIconsView, { selectedIcon: values.icon, onIconSelected: t100 }) });
|
|
897
|
-
$[163] = t100;
|
|
898
|
-
$[164] = values.icon;
|
|
910
|
+
$[164] = setFieldValue;
|
|
899
911
|
$[165] = t101;
|
|
900
912
|
} else {
|
|
901
913
|
t101 = $[165];
|
|
902
914
|
}
|
|
903
915
|
let t102;
|
|
904
|
-
if ($[166] !==
|
|
905
|
-
t102 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
906
|
-
$[166] =
|
|
907
|
-
$[167] =
|
|
916
|
+
if ($[166] !== t101 || $[167] !== values.icon) {
|
|
917
|
+
t102 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsxRuntime.jsx(core.SearchIconsView, { selectedIcon: values.icon, onIconSelected: t101 }) });
|
|
918
|
+
$[166] = t101;
|
|
919
|
+
$[167] = values.icon;
|
|
908
920
|
$[168] = t102;
|
|
909
921
|
} else {
|
|
910
922
|
t102 = $[168];
|
|
911
923
|
}
|
|
912
924
|
let t103;
|
|
913
|
-
if ($[169] !==
|
|
914
|
-
t103 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
925
|
+
if ($[169] !== iconDialogOpen || $[170] !== t102) {
|
|
926
|
+
t103 = /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t102 });
|
|
927
|
+
$[169] = iconDialogOpen;
|
|
928
|
+
$[170] = t102;
|
|
929
|
+
$[171] = t103;
|
|
930
|
+
} else {
|
|
931
|
+
t103 = $[171];
|
|
932
|
+
}
|
|
933
|
+
let t104;
|
|
934
|
+
if ($[172] !== T0 || $[173] !== t103 || $[174] !== t18 || $[175] !== t99) {
|
|
935
|
+
t104 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t7, children: /* @__PURE__ */ jsxRuntime.jsxs(T0, { maxWidth: t8, className: t9, children: [
|
|
915
936
|
t18,
|
|
916
|
-
t98,
|
|
917
937
|
t99,
|
|
918
|
-
|
|
938
|
+
t100,
|
|
939
|
+
t103
|
|
919
940
|
] }) });
|
|
920
|
-
$[
|
|
921
|
-
$[170] = t102;
|
|
922
|
-
$[171] = t18;
|
|
923
|
-
$[172] = t98;
|
|
941
|
+
$[172] = T0;
|
|
924
942
|
$[173] = t103;
|
|
943
|
+
$[174] = t18;
|
|
944
|
+
$[175] = t99;
|
|
945
|
+
$[176] = t104;
|
|
925
946
|
} else {
|
|
926
|
-
|
|
947
|
+
t104 = $[176];
|
|
927
948
|
}
|
|
928
|
-
return
|
|
949
|
+
return t104;
|
|
929
950
|
}
|
|
930
951
|
function _temp3$4(value_3) {
|
|
931
952
|
if (value_3 === "code_defined") {
|
|
@@ -8463,10 +8484,8 @@
|
|
|
8463
8484
|
editable: true
|
|
8464
8485
|
};
|
|
8465
8486
|
if (propertyPath_0) {
|
|
8466
|
-
|
|
8487
|
+
{
|
|
8467
8488
|
setFieldValue(propertyPath_0, inferredNewProperty, false);
|
|
8468
|
-
} else {
|
|
8469
|
-
setFieldValue(propertyPath_0, property_1, false);
|
|
8470
8489
|
}
|
|
8471
8490
|
setFieldTouched(propertyPath_0, true, false);
|
|
8472
8491
|
}
|
|
@@ -9365,82 +9384,109 @@
|
|
|
9365
9384
|
setNextMode();
|
|
9366
9385
|
};
|
|
9367
9386
|
const editable = collection?.editable === void 0 || collection?.editable === true;
|
|
9387
|
+
const isMergedCollection = collection?.merged ?? false;
|
|
9368
9388
|
const collectionEditable = editable || isNewCollection;
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
|
|
9373
|
-
|
|
9374
|
-
|
|
9375
|
-
|
|
9376
|
-
|
|
9377
|
-
|
|
9378
|
-
|
|
9379
|
-
|
|
9380
|
-
|
|
9381
|
-
|
|
9382
|
-
|
|
9383
|
-
|
|
9384
|
-
|
|
9385
|
-
|
|
9386
|
-
|
|
9387
|
-
|
|
9388
|
-
|
|
9389
|
-
|
|
9390
|
-
|
|
9391
|
-
|
|
9392
|
-
})
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9396
|
-
|
|
9397
|
-
|
|
9398
|
-
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
|
|
9402
|
-
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
|
|
9406
|
-
|
|
9407
|
-
|
|
9408
|
-
|
|
9409
|
-
|
|
9410
|
-
|
|
9411
|
-
|
|
9412
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.
|
|
9413
|
-
"
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
|
|
9420
|
-
|
|
9421
|
-
|
|
9422
|
-
|
|
9423
|
-
|
|
9424
|
-
|
|
9425
|
-
|
|
9426
|
-
|
|
9427
|
-
|
|
9428
|
-
|
|
9429
|
-
|
|
9430
|
-
|
|
9431
|
-
|
|
9432
|
-
|
|
9433
|
-
|
|
9434
|
-
|
|
9435
|
-
|
|
9436
|
-
|
|
9437
|
-
|
|
9438
|
-
|
|
9439
|
-
|
|
9440
|
-
|
|
9389
|
+
const [deleteRequested, setDeleteRequested] = React.useState(false);
|
|
9390
|
+
const deleteCollection = () => {
|
|
9391
|
+
if (!collection) return;
|
|
9392
|
+
configController?.deleteCollection({
|
|
9393
|
+
id: collection.id
|
|
9394
|
+
}).then(() => {
|
|
9395
|
+
setDeleteRequested(false);
|
|
9396
|
+
handleCancel();
|
|
9397
|
+
snackbarController.open({
|
|
9398
|
+
message: "Collection deleted",
|
|
9399
|
+
type: "success"
|
|
9400
|
+
});
|
|
9401
|
+
});
|
|
9402
|
+
};
|
|
9403
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogContent, { fullHeight: true, children: [
|
|
9404
|
+
/* @__PURE__ */ jsxRuntime.jsx(formex.Formex, { value: formController, children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9405
|
+
!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: [
|
|
9406
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Tab, { value: "details", children: "Details" }),
|
|
9407
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Tab, { value: "properties", children: "Properties" }),
|
|
9408
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Tab, { value: "subcollections", children: "Additional views" })
|
|
9409
|
+
] }),
|
|
9410
|
+
/* @__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: [
|
|
9411
|
+
currentView === "loading" && /* @__PURE__ */ jsxRuntime.jsx(core.CircularProgressCenter, {}),
|
|
9412
|
+
currentView === "extra_view" && path && extraView?.View && /* @__PURE__ */ jsxRuntime.jsx(extraView.View, { path }),
|
|
9413
|
+
currentView === "welcome" && /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorWelcomeView, { path, onContinue: (importData, propertiesOrder_0) => {
|
|
9414
|
+
if (importData) {
|
|
9415
|
+
onImportDataSet(importData, propertiesOrder_0);
|
|
9416
|
+
setCurrentView("import_data_mapping");
|
|
9417
|
+
} else {
|
|
9418
|
+
setCurrentView("details");
|
|
9419
|
+
}
|
|
9420
|
+
}, existingCollectionPaths: existingPaths, parentCollection, pathSuggestions }),
|
|
9421
|
+
currentView === "import_data_mapping" && importConfig && /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorImportMapping, { importConfig, collectionEditable, propertyConfigs }),
|
|
9422
|
+
currentView === "import_data_preview" && importConfig && /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorImportDataPreview, { importConfig, properties: values_1.properties, propertiesOrder: values_1.propertiesOrder }),
|
|
9423
|
+
currentView === "import_data_saving" && importConfig && /* @__PURE__ */ jsxRuntime.jsx(data_import_export.ImportSaveInProgress, { importConfig, collection: values_1, path, onImportSuccess: async (importedCollection) => {
|
|
9424
|
+
snackbarController.open({
|
|
9425
|
+
type: "info",
|
|
9426
|
+
message: "Data imported successfully"
|
|
9427
|
+
});
|
|
9428
|
+
await saveCollection(values_1);
|
|
9429
|
+
handleClose(importedCollection);
|
|
9430
|
+
} }),
|
|
9431
|
+
currentView === "details" && /* @__PURE__ */ jsxRuntime.jsx(CollectionDetailsForm, { existingPaths, existingIds, groups, parentCollectionIds, parentCollection, isNewCollection, children: !isNewCollection && isMergedCollection && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 mt-8", children: [
|
|
9432
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body2", color: "secondary", children: "This collection is defined in code. The changes done in this editor will override the properties defined in code. You can delete the overridden values to revert to the state defined in code." }),
|
|
9433
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "neutral", onClick: () => {
|
|
9434
|
+
setDeleteRequested(true);
|
|
9435
|
+
}, children: "Reset to code" })
|
|
9436
|
+
] }) }),
|
|
9437
|
+
currentView === "subcollections" && collection && /* @__PURE__ */ jsxRuntime.jsx(SubcollectionsEditTab, { parentCollection, configController, getUser, collectionInference, parentCollectionIds, collection }),
|
|
9438
|
+
currentView === "properties" && /* @__PURE__ */ jsxRuntime.jsx(CollectionPropertiesEditorForm, { showErrors: submitCount > 0, isNewCollection, reservedGroups, onPropertyError: (propertyKey, namespace, error_0) => {
|
|
9439
|
+
const current = core.removeUndefined({
|
|
9440
|
+
...propertyErrorsRef.current,
|
|
9441
|
+
[getFullIdPath(propertyKey, namespace)]: core.removeUndefined(error_0, true)
|
|
9442
|
+
}, true);
|
|
9443
|
+
propertyErrorsRef.current = current;
|
|
9444
|
+
formController.validate();
|
|
9445
|
+
}, getUser, getData: getDataWithPath, doCollectionInference, propertyConfigs, collectionEditable, extraIcon: extraView?.icon && /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { color: "primary", onClick: () => setCurrentView("extra_view"), children: extraView.icon }) }),
|
|
9446
|
+
currentView !== "welcome" && /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogActions, { position: "absolute", children: [
|
|
9447
|
+
error && /* @__PURE__ */ jsxRuntime.jsx(core.ErrorView, { error }),
|
|
9448
|
+
isNewCollection && includeTemplates && currentView === "import_data_mapping" && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", type: "button", onClick: () => {
|
|
9449
|
+
importConfig.setInUse(false);
|
|
9450
|
+
return setCurrentView("welcome");
|
|
9451
|
+
}, children: [
|
|
9452
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.ArrowBackIcon, {}),
|
|
9453
|
+
"Back"
|
|
9454
|
+
] }),
|
|
9455
|
+
isNewCollection && includeTemplates && currentView === "import_data_preview" && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", type: "button", onClick: () => {
|
|
9456
|
+
setCurrentView("import_data_mapping");
|
|
9457
|
+
}, children: [
|
|
9458
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.ArrowBackIcon, {}),
|
|
9459
|
+
"Back"
|
|
9460
|
+
] }),
|
|
9461
|
+
isNewCollection && includeTemplates && currentView === "details" && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", type: "button", onClick: () => setCurrentView("welcome"), children: [
|
|
9462
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.ArrowBackIcon, {}),
|
|
9463
|
+
"Back"
|
|
9464
|
+
] }),
|
|
9465
|
+
isNewCollection && currentView === "properties" && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", type: "button", onClick: () => setCurrentView("details"), children: [
|
|
9466
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.ArrowBackIcon, {}),
|
|
9467
|
+
"Back"
|
|
9468
|
+
] }),
|
|
9469
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", onClick: () => {
|
|
9470
|
+
handleCancel();
|
|
9471
|
+
}, children: "Cancel" }),
|
|
9472
|
+
isNewCollection && currentView === "import_data_mapping" && /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "filled", color: "primary", onClick: onImportMappingComplete, children: "Next" }),
|
|
9473
|
+
isNewCollection && currentView === "import_data_preview" && /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "filled", color: "primary", onClick: () => {
|
|
9474
|
+
setNextMode();
|
|
9475
|
+
}, children: "Next" }),
|
|
9476
|
+
isNewCollection && (currentView === "details" || currentView === "properties") && /* @__PURE__ */ jsxRuntime.jsxs(ui.LoadingButton, { variant: "filled", color: "primary", type: "submit", loading: isSubmitting, disabled: isSubmitting || currentView === "details" && !validValues, startIcon: currentView === "properties" ? /* @__PURE__ */ jsxRuntime.jsx(ui.CheckIcon, {}) : void 0, children: [
|
|
9477
|
+
currentView === "details" && "Next",
|
|
9478
|
+
currentView === "properties" && "Create collection"
|
|
9479
|
+
] }),
|
|
9480
|
+
!isNewCollection && /* @__PURE__ */ jsxRuntime.jsx(ui.LoadingButton, { variant: "filled", color: "primary", type: "submit", loading: isSubmitting, children: "Update collection" })
|
|
9481
|
+
] })
|
|
9441
9482
|
] })
|
|
9442
|
-
] })
|
|
9443
|
-
|
|
9483
|
+
] }) }),
|
|
9484
|
+
/* @__PURE__ */ jsxRuntime.jsx(core.ConfirmationDialog, { open: deleteRequested, onAccept: deleteCollection, onCancel: () => setDeleteRequested(false), title: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: "Delete the stored config?" }), body: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9485
|
+
" This will ",
|
|
9486
|
+
/* @__PURE__ */ jsxRuntime.jsx("b", { children: "not delete any data" }),
|
|
9487
|
+
", only the stored config, and reset to the code state."
|
|
9488
|
+
] }) })
|
|
9489
|
+
] });
|
|
9444
9490
|
}
|
|
9445
9491
|
function applyPropertyConfigs(collection, propertyConfigs) {
|
|
9446
9492
|
const {
|
|
@@ -10617,18 +10663,19 @@
|
|
|
10617
10663
|
}
|
|
10618
10664
|
return t6;
|
|
10619
10665
|
}
|
|
10620
|
-
const mergeCollections = (baseCollections, backendCollections, modifyCollection) => {
|
|
10666
|
+
const mergeCollections = (baseCollections, backendCollections = [], modifyCollection) => {
|
|
10621
10667
|
const markAsEditable = (c) => {
|
|
10622
10668
|
core.makePropertiesEditable(c.properties);
|
|
10623
10669
|
c.subcollections?.forEach(markAsEditable);
|
|
10624
10670
|
};
|
|
10625
|
-
|
|
10626
|
-
|
|
10627
|
-
console.debug("Collections specified in code:", baseCollections);
|
|
10628
|
-
console.debug("Collections stored in the backend", storedCollections);
|
|
10629
|
-
const result = core.joinCollectionLists(baseCollections, storedCollections, [], modifyCollection);
|
|
10671
|
+
backendCollections.forEach(markAsEditable);
|
|
10672
|
+
const result = core.joinCollectionLists(baseCollections, backendCollections, [], modifyCollection);
|
|
10630
10673
|
result.sort((a, b) => baseCollections.findIndex((c) => c.id === a.id) - baseCollections.findIndex((c) => c.id === b.id));
|
|
10631
|
-
console.debug("Collections
|
|
10674
|
+
console.debug("Collections result", {
|
|
10675
|
+
baseCollections,
|
|
10676
|
+
backendCollections,
|
|
10677
|
+
result
|
|
10678
|
+
});
|
|
10632
10679
|
return result;
|
|
10633
10680
|
};
|
|
10634
10681
|
function MissingReferenceWidget(t0) {
|