@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.es.js
CHANGED
|
@@ -22,7 +22,7 @@ const useCollectionEditorController = () => {
|
|
|
22
22
|
return useContext(CollectionEditorContext);
|
|
23
23
|
};
|
|
24
24
|
function LayoutModeSwitch(t0) {
|
|
25
|
-
const $ = c(
|
|
25
|
+
const $ = c(29);
|
|
26
26
|
const {
|
|
27
27
|
value,
|
|
28
28
|
onChange,
|
|
@@ -140,26 +140,35 @@ function LayoutModeSwitch(t0) {
|
|
|
140
140
|
t16 = $[24];
|
|
141
141
|
}
|
|
142
142
|
let t17;
|
|
143
|
-
if ($[25]
|
|
144
|
-
t17 = /* @__PURE__ */
|
|
143
|
+
if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
|
|
144
|
+
t17 = /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", className: "ml-3.5", children: "Should documents be opened full screen or in an inline side dialog" });
|
|
145
|
+
$[25] = t17;
|
|
146
|
+
} else {
|
|
147
|
+
t17 = $[25];
|
|
148
|
+
}
|
|
149
|
+
let t18;
|
|
150
|
+
if ($[26] !== t1 || $[27] !== t16) {
|
|
151
|
+
t18 = /* @__PURE__ */ jsxs("div", { className: t1, children: [
|
|
145
152
|
t2,
|
|
146
|
-
t16
|
|
153
|
+
t16,
|
|
154
|
+
t17
|
|
147
155
|
] });
|
|
148
|
-
$[
|
|
149
|
-
$[
|
|
150
|
-
$[
|
|
156
|
+
$[26] = t1;
|
|
157
|
+
$[27] = t16;
|
|
158
|
+
$[28] = t18;
|
|
151
159
|
} else {
|
|
152
|
-
|
|
160
|
+
t18 = $[28];
|
|
153
161
|
}
|
|
154
|
-
return
|
|
162
|
+
return t18;
|
|
155
163
|
}
|
|
156
164
|
function CollectionDetailsForm(t0) {
|
|
157
|
-
const $ = c(
|
|
165
|
+
const $ = c(177);
|
|
158
166
|
const {
|
|
159
167
|
isNewCollection,
|
|
160
168
|
reservedGroups,
|
|
161
169
|
groups,
|
|
162
|
-
parentCollection
|
|
170
|
+
parentCollection,
|
|
171
|
+
children
|
|
163
172
|
} = t0;
|
|
164
173
|
const groupRef = React__default.useRef(null);
|
|
165
174
|
const {
|
|
@@ -839,7 +848,7 @@ function CollectionDetailsForm(t0) {
|
|
|
839
848
|
}
|
|
840
849
|
let t97;
|
|
841
850
|
if ($[151] !== advancedPanelExpanded || $[152] !== t96) {
|
|
842
|
-
t97 = /* @__PURE__ */ jsx(
|
|
851
|
+
t97 = /* @__PURE__ */ jsx(ExpandablePanel, { expanded: advancedPanelExpanded, onExpandedChange: setAdvancedPanelExpanded, title: t41, initiallyExpanded: false, children: t96 });
|
|
843
852
|
$[151] = advancedPanelExpanded;
|
|
844
853
|
$[152] = t96;
|
|
845
854
|
$[153] = t97;
|
|
@@ -847,78 +856,90 @@ function CollectionDetailsForm(t0) {
|
|
|
847
856
|
t97 = $[153];
|
|
848
857
|
}
|
|
849
858
|
let t98;
|
|
850
|
-
if ($[154] !==
|
|
851
|
-
t98 = /* @__PURE__ */ jsxs("div", { className:
|
|
859
|
+
if ($[154] !== children || $[155] !== t97) {
|
|
860
|
+
t98 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 mt-8", children: [
|
|
861
|
+
t97,
|
|
862
|
+
children
|
|
863
|
+
] });
|
|
864
|
+
$[154] = children;
|
|
865
|
+
$[155] = t97;
|
|
866
|
+
$[156] = t98;
|
|
867
|
+
} else {
|
|
868
|
+
t98 = $[156];
|
|
869
|
+
}
|
|
870
|
+
let t99;
|
|
871
|
+
if ($[157] !== t27 || $[158] !== t36 || $[159] !== t37 || $[160] !== t40 || $[161] !== t98) {
|
|
872
|
+
t99 = /* @__PURE__ */ jsxs("div", { className: t19, children: [
|
|
852
873
|
t27,
|
|
853
874
|
t36,
|
|
854
875
|
t37,
|
|
855
876
|
t40,
|
|
856
|
-
|
|
877
|
+
t98
|
|
857
878
|
] });
|
|
858
|
-
$[
|
|
859
|
-
$[
|
|
860
|
-
$[
|
|
861
|
-
$[
|
|
862
|
-
$[
|
|
863
|
-
$[
|
|
879
|
+
$[157] = t27;
|
|
880
|
+
$[158] = t36;
|
|
881
|
+
$[159] = t37;
|
|
882
|
+
$[160] = t40;
|
|
883
|
+
$[161] = t98;
|
|
884
|
+
$[162] = t99;
|
|
864
885
|
} else {
|
|
865
|
-
|
|
886
|
+
t99 = $[162];
|
|
866
887
|
}
|
|
867
|
-
let
|
|
868
|
-
if ($[
|
|
869
|
-
|
|
888
|
+
let t100;
|
|
889
|
+
if ($[163] === Symbol.for("react.memo_cache_sentinel")) {
|
|
890
|
+
t100 = /* @__PURE__ */ jsx("div", { style: {
|
|
870
891
|
height: "52px"
|
|
871
892
|
} });
|
|
872
|
-
$[
|
|
893
|
+
$[163] = t100;
|
|
873
894
|
} else {
|
|
874
|
-
|
|
895
|
+
t100 = $[163];
|
|
875
896
|
}
|
|
876
|
-
let
|
|
877
|
-
if ($[
|
|
878
|
-
|
|
897
|
+
let t101;
|
|
898
|
+
if ($[164] !== setFieldValue) {
|
|
899
|
+
t101 = (icon) => {
|
|
879
900
|
setIconDialogOpen(false);
|
|
880
901
|
setFieldValue("icon", icon);
|
|
881
902
|
};
|
|
882
|
-
$[
|
|
883
|
-
$[162] = t100;
|
|
884
|
-
} else {
|
|
885
|
-
t100 = $[162];
|
|
886
|
-
}
|
|
887
|
-
let t101;
|
|
888
|
-
if ($[163] !== t100 || $[164] !== values.icon) {
|
|
889
|
-
t101 = /* @__PURE__ */ jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsx(SearchIconsView, { selectedIcon: values.icon, onIconSelected: t100 }) });
|
|
890
|
-
$[163] = t100;
|
|
891
|
-
$[164] = values.icon;
|
|
903
|
+
$[164] = setFieldValue;
|
|
892
904
|
$[165] = t101;
|
|
893
905
|
} else {
|
|
894
906
|
t101 = $[165];
|
|
895
907
|
}
|
|
896
908
|
let t102;
|
|
897
|
-
if ($[166] !==
|
|
898
|
-
t102 = /* @__PURE__ */ jsx(
|
|
899
|
-
$[166] =
|
|
900
|
-
$[167] =
|
|
909
|
+
if ($[166] !== t101 || $[167] !== values.icon) {
|
|
910
|
+
t102 = /* @__PURE__ */ jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsx(SearchIconsView, { selectedIcon: values.icon, onIconSelected: t101 }) });
|
|
911
|
+
$[166] = t101;
|
|
912
|
+
$[167] = values.icon;
|
|
901
913
|
$[168] = t102;
|
|
902
914
|
} else {
|
|
903
915
|
t102 = $[168];
|
|
904
916
|
}
|
|
905
917
|
let t103;
|
|
906
|
-
if ($[169] !==
|
|
907
|
-
t103 = /* @__PURE__ */ jsx(
|
|
918
|
+
if ($[169] !== iconDialogOpen || $[170] !== t102) {
|
|
919
|
+
t103 = /* @__PURE__ */ jsx(Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t102 });
|
|
920
|
+
$[169] = iconDialogOpen;
|
|
921
|
+
$[170] = t102;
|
|
922
|
+
$[171] = t103;
|
|
923
|
+
} else {
|
|
924
|
+
t103 = $[171];
|
|
925
|
+
}
|
|
926
|
+
let t104;
|
|
927
|
+
if ($[172] !== T0 || $[173] !== t103 || $[174] !== t18 || $[175] !== t99) {
|
|
928
|
+
t104 = /* @__PURE__ */ jsx("div", { className: t7, children: /* @__PURE__ */ jsxs(T0, { maxWidth: t8, className: t9, children: [
|
|
908
929
|
t18,
|
|
909
|
-
t98,
|
|
910
930
|
t99,
|
|
911
|
-
|
|
931
|
+
t100,
|
|
932
|
+
t103
|
|
912
933
|
] }) });
|
|
913
|
-
$[
|
|
914
|
-
$[170] = t102;
|
|
915
|
-
$[171] = t18;
|
|
916
|
-
$[172] = t98;
|
|
934
|
+
$[172] = T0;
|
|
917
935
|
$[173] = t103;
|
|
936
|
+
$[174] = t18;
|
|
937
|
+
$[175] = t99;
|
|
938
|
+
$[176] = t104;
|
|
918
939
|
} else {
|
|
919
|
-
|
|
940
|
+
t104 = $[176];
|
|
920
941
|
}
|
|
921
|
-
return
|
|
942
|
+
return t104;
|
|
922
943
|
}
|
|
923
944
|
function _temp3$4(value_3) {
|
|
924
945
|
if (value_3 === "code_defined") {
|
|
@@ -8456,10 +8477,8 @@ function CollectionEditorImportMapping(t0) {
|
|
|
8456
8477
|
editable: true
|
|
8457
8478
|
};
|
|
8458
8479
|
if (propertyPath_0) {
|
|
8459
|
-
|
|
8480
|
+
{
|
|
8460
8481
|
setFieldValue(propertyPath_0, inferredNewProperty, false);
|
|
8461
|
-
} else {
|
|
8462
|
-
setFieldValue(propertyPath_0, property_1, false);
|
|
8463
8482
|
}
|
|
8464
8483
|
setFieldTouched(propertyPath_0, true, false);
|
|
8465
8484
|
}
|
|
@@ -9358,82 +9377,109 @@ function CollectionEditorInternal({
|
|
|
9358
9377
|
setNextMode();
|
|
9359
9378
|
};
|
|
9360
9379
|
const editable = collection?.editable === void 0 || collection?.editable === true;
|
|
9380
|
+
const isMergedCollection = collection?.merged ?? false;
|
|
9361
9381
|
const collectionEditable = editable || isNewCollection;
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
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
|
-
/* @__PURE__ */ jsx(
|
|
9406
|
-
"
|
|
9407
|
-
|
|
9408
|
-
|
|
9409
|
-
|
|
9410
|
-
|
|
9411
|
-
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
|
|
9420
|
-
|
|
9421
|
-
|
|
9422
|
-
|
|
9423
|
-
|
|
9424
|
-
|
|
9425
|
-
|
|
9426
|
-
|
|
9427
|
-
|
|
9428
|
-
|
|
9429
|
-
|
|
9430
|
-
|
|
9431
|
-
|
|
9432
|
-
|
|
9433
|
-
|
|
9382
|
+
const [deleteRequested, setDeleteRequested] = useState(false);
|
|
9383
|
+
const deleteCollection = () => {
|
|
9384
|
+
if (!collection) return;
|
|
9385
|
+
configController?.deleteCollection({
|
|
9386
|
+
id: collection.id
|
|
9387
|
+
}).then(() => {
|
|
9388
|
+
setDeleteRequested(false);
|
|
9389
|
+
handleCancel();
|
|
9390
|
+
snackbarController.open({
|
|
9391
|
+
message: "Collection deleted",
|
|
9392
|
+
type: "success"
|
|
9393
|
+
});
|
|
9394
|
+
});
|
|
9395
|
+
};
|
|
9396
|
+
return /* @__PURE__ */ jsxs(DialogContent, { fullHeight: true, children: [
|
|
9397
|
+
/* @__PURE__ */ jsx(Formex, { value: formController, children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9398
|
+
!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: [
|
|
9399
|
+
/* @__PURE__ */ jsx(Tab, { value: "details", children: "Details" }),
|
|
9400
|
+
/* @__PURE__ */ jsx(Tab, { value: "properties", children: "Properties" }),
|
|
9401
|
+
/* @__PURE__ */ jsx(Tab, { value: "subcollections", children: "Additional views" })
|
|
9402
|
+
] }),
|
|
9403
|
+
/* @__PURE__ */ jsxs("form", { noValidate: true, onSubmit: formController.handleSubmit, className: cls(isNewCollection ? "h-full" : "h-[calc(100%-48px)]", "flex-grow flex flex-col relative"), children: [
|
|
9404
|
+
currentView === "loading" && /* @__PURE__ */ jsx(CircularProgressCenter, {}),
|
|
9405
|
+
currentView === "extra_view" && path && extraView?.View && /* @__PURE__ */ jsx(extraView.View, { path }),
|
|
9406
|
+
currentView === "welcome" && /* @__PURE__ */ jsx(CollectionEditorWelcomeView, { path, onContinue: (importData, propertiesOrder_0) => {
|
|
9407
|
+
if (importData) {
|
|
9408
|
+
onImportDataSet(importData, propertiesOrder_0);
|
|
9409
|
+
setCurrentView("import_data_mapping");
|
|
9410
|
+
} else {
|
|
9411
|
+
setCurrentView("details");
|
|
9412
|
+
}
|
|
9413
|
+
}, existingCollectionPaths: existingPaths, parentCollection, pathSuggestions }),
|
|
9414
|
+
currentView === "import_data_mapping" && importConfig && /* @__PURE__ */ jsx(CollectionEditorImportMapping, { importConfig, collectionEditable, propertyConfigs }),
|
|
9415
|
+
currentView === "import_data_preview" && importConfig && /* @__PURE__ */ jsx(CollectionEditorImportDataPreview, { importConfig, properties: values_1.properties, propertiesOrder: values_1.propertiesOrder }),
|
|
9416
|
+
currentView === "import_data_saving" && importConfig && /* @__PURE__ */ jsx(ImportSaveInProgress, { importConfig, collection: values_1, path, onImportSuccess: async (importedCollection) => {
|
|
9417
|
+
snackbarController.open({
|
|
9418
|
+
type: "info",
|
|
9419
|
+
message: "Data imported successfully"
|
|
9420
|
+
});
|
|
9421
|
+
await saveCollection(values_1);
|
|
9422
|
+
handleClose(importedCollection);
|
|
9423
|
+
} }),
|
|
9424
|
+
currentView === "details" && /* @__PURE__ */ jsx(CollectionDetailsForm, { existingPaths, existingIds, groups, parentCollectionIds, parentCollection, isNewCollection, children: !isNewCollection && isMergedCollection && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 mt-8", children: [
|
|
9425
|
+
/* @__PURE__ */ jsx(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." }),
|
|
9426
|
+
/* @__PURE__ */ jsx(Button, { variant: "neutral", onClick: () => {
|
|
9427
|
+
setDeleteRequested(true);
|
|
9428
|
+
}, children: "Reset to code" })
|
|
9429
|
+
] }) }),
|
|
9430
|
+
currentView === "subcollections" && collection && /* @__PURE__ */ jsx(SubcollectionsEditTab, { parentCollection, configController, getUser, collectionInference, parentCollectionIds, collection }),
|
|
9431
|
+
currentView === "properties" && /* @__PURE__ */ jsx(CollectionPropertiesEditorForm, { showErrors: submitCount > 0, isNewCollection, reservedGroups, onPropertyError: (propertyKey, namespace, error_0) => {
|
|
9432
|
+
const current = removeUndefined({
|
|
9433
|
+
...propertyErrorsRef.current,
|
|
9434
|
+
[getFullIdPath(propertyKey, namespace)]: removeUndefined(error_0, true)
|
|
9435
|
+
}, true);
|
|
9436
|
+
propertyErrorsRef.current = current;
|
|
9437
|
+
formController.validate();
|
|
9438
|
+
}, getUser, getData: getDataWithPath, doCollectionInference, propertyConfigs, collectionEditable, extraIcon: extraView?.icon && /* @__PURE__ */ jsx(IconButton, { color: "primary", onClick: () => setCurrentView("extra_view"), children: extraView.icon }) }),
|
|
9439
|
+
currentView !== "welcome" && /* @__PURE__ */ jsxs(DialogActions, { position: "absolute", children: [
|
|
9440
|
+
error && /* @__PURE__ */ jsx(ErrorView, { error }),
|
|
9441
|
+
isNewCollection && includeTemplates && currentView === "import_data_mapping" && /* @__PURE__ */ jsxs(Button, { variant: "text", type: "button", onClick: () => {
|
|
9442
|
+
importConfig.setInUse(false);
|
|
9443
|
+
return setCurrentView("welcome");
|
|
9444
|
+
}, children: [
|
|
9445
|
+
/* @__PURE__ */ jsx(ArrowBackIcon, {}),
|
|
9446
|
+
"Back"
|
|
9447
|
+
] }),
|
|
9448
|
+
isNewCollection && includeTemplates && currentView === "import_data_preview" && /* @__PURE__ */ jsxs(Button, { variant: "text", type: "button", onClick: () => {
|
|
9449
|
+
setCurrentView("import_data_mapping");
|
|
9450
|
+
}, children: [
|
|
9451
|
+
/* @__PURE__ */ jsx(ArrowBackIcon, {}),
|
|
9452
|
+
"Back"
|
|
9453
|
+
] }),
|
|
9454
|
+
isNewCollection && includeTemplates && currentView === "details" && /* @__PURE__ */ jsxs(Button, { variant: "text", type: "button", onClick: () => setCurrentView("welcome"), children: [
|
|
9455
|
+
/* @__PURE__ */ jsx(ArrowBackIcon, {}),
|
|
9456
|
+
"Back"
|
|
9457
|
+
] }),
|
|
9458
|
+
isNewCollection && currentView === "properties" && /* @__PURE__ */ jsxs(Button, { variant: "text", type: "button", onClick: () => setCurrentView("details"), children: [
|
|
9459
|
+
/* @__PURE__ */ jsx(ArrowBackIcon, {}),
|
|
9460
|
+
"Back"
|
|
9461
|
+
] }),
|
|
9462
|
+
/* @__PURE__ */ jsx(Button, { variant: "text", onClick: () => {
|
|
9463
|
+
handleCancel();
|
|
9464
|
+
}, children: "Cancel" }),
|
|
9465
|
+
isNewCollection && currentView === "import_data_mapping" && /* @__PURE__ */ jsx(Button, { variant: "filled", color: "primary", onClick: onImportMappingComplete, children: "Next" }),
|
|
9466
|
+
isNewCollection && currentView === "import_data_preview" && /* @__PURE__ */ jsx(Button, { variant: "filled", color: "primary", onClick: () => {
|
|
9467
|
+
setNextMode();
|
|
9468
|
+
}, children: "Next" }),
|
|
9469
|
+
isNewCollection && (currentView === "details" || currentView === "properties") && /* @__PURE__ */ jsxs(LoadingButton, { variant: "filled", color: "primary", type: "submit", loading: isSubmitting, disabled: isSubmitting || currentView === "details" && !validValues, startIcon: currentView === "properties" ? /* @__PURE__ */ jsx(CheckIcon, {}) : void 0, children: [
|
|
9470
|
+
currentView === "details" && "Next",
|
|
9471
|
+
currentView === "properties" && "Create collection"
|
|
9472
|
+
] }),
|
|
9473
|
+
!isNewCollection && /* @__PURE__ */ jsx(LoadingButton, { variant: "filled", color: "primary", type: "submit", loading: isSubmitting, children: "Update collection" })
|
|
9474
|
+
] })
|
|
9434
9475
|
] })
|
|
9435
|
-
] })
|
|
9436
|
-
|
|
9476
|
+
] }) }),
|
|
9477
|
+
/* @__PURE__ */ jsx(ConfirmationDialog, { open: deleteRequested, onAccept: deleteCollection, onCancel: () => setDeleteRequested(false), title: /* @__PURE__ */ jsx(Fragment, { children: "Delete the stored config?" }), body: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9478
|
+
" This will ",
|
|
9479
|
+
/* @__PURE__ */ jsx("b", { children: "not delete any data" }),
|
|
9480
|
+
", only the stored config, and reset to the code state."
|
|
9481
|
+
] }) })
|
|
9482
|
+
] });
|
|
9437
9483
|
}
|
|
9438
9484
|
function applyPropertyConfigs(collection, propertyConfigs) {
|
|
9439
9485
|
const {
|
|
@@ -10610,18 +10656,19 @@ function IntroWidget(t0) {
|
|
|
10610
10656
|
}
|
|
10611
10657
|
return t6;
|
|
10612
10658
|
}
|
|
10613
|
-
const mergeCollections = (baseCollections, backendCollections, modifyCollection) => {
|
|
10659
|
+
const mergeCollections = (baseCollections, backendCollections = [], modifyCollection) => {
|
|
10614
10660
|
const markAsEditable = (c2) => {
|
|
10615
10661
|
makePropertiesEditable(c2.properties);
|
|
10616
10662
|
c2.subcollections?.forEach(markAsEditable);
|
|
10617
10663
|
};
|
|
10618
|
-
|
|
10619
|
-
|
|
10620
|
-
console.debug("Collections specified in code:", baseCollections);
|
|
10621
|
-
console.debug("Collections stored in the backend", storedCollections);
|
|
10622
|
-
const result = joinCollectionLists(baseCollections, storedCollections, [], modifyCollection);
|
|
10664
|
+
backendCollections.forEach(markAsEditable);
|
|
10665
|
+
const result = joinCollectionLists(baseCollections, backendCollections, [], modifyCollection);
|
|
10623
10666
|
result.sort((a, b) => baseCollections.findIndex((c2) => c2.id === a.id) - baseCollections.findIndex((c2) => c2.id === b.id));
|
|
10624
|
-
console.debug("Collections
|
|
10667
|
+
console.debug("Collections result", {
|
|
10668
|
+
baseCollections,
|
|
10669
|
+
backendCollections,
|
|
10670
|
+
result
|
|
10671
|
+
});
|
|
10625
10672
|
return result;
|
|
10626
10673
|
};
|
|
10627
10674
|
function MissingReferenceWidget(t0) {
|