@firecms/collection_editor 3.0.0-canary.43 → 3.0.0-canary.45
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 +324 -317
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +6 -6
- package/src/ui/collection_editor/import/CollectionEditorImportDataPreview.tsx +2 -1
- package/src/ui/collection_editor/properties/BlockPropertyField.tsx +9 -3
package/dist/index.es.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { jsx as e, jsxs as a, Fragment as R } from "react/jsx-runtime";
|
|
2
|
-
import { FieldCaption as X, SearchIconsView as
|
|
2
|
+
import { FieldCaption as X, SearchIconsView as yr, toSnakeCase as Pt, singular as br, IconForView as dt, ArrayContainer as Cr, serializeRegExp as Nr, useSnackbarController as Ie, resolveEnumValues as Pr, isPropertyBuilder as ie, useCustomizationController as Ae, getFieldConfig as Le, ErrorBoundary as me, PropertyConfigBadge as $e, unslugify as wt, useNavigationController as Te, mergeDeep as K, DEFAULT_FIELD_CONFIGS as Kt, isValidRegExp as xr, getFieldId as Wt, DeleteConfirmationDialog as ct, useLargeLayout as wr, makePropertiesEditable as He, resolveEntityView as Tr, useSelectionController as kr, CircularProgressCenter as ut, EntityCollectionTable as Or, slugify as Vr, useAuthController as _e, randomString as Ft, removeUndefined as Et, ErrorView as Zt, removeInitialAndTrailingSlashes as Ir, getDefaultPropertiesOrder as _r, joinCollectionLists as Fr } from "@firecms/core";
|
|
3
3
|
import * as Ue from "react";
|
|
4
|
-
import Y, { useState as j, useEffect as ue, useMemo as Jt, useCallback as J, useRef as je, useDeferredValue as
|
|
4
|
+
import Y, { useState as j, useEffect as ue, useMemo as Jt, useCallback as J, useRef as je, useDeferredValue as Er, useContext as Qt } from "react";
|
|
5
5
|
import be from "react-fast-compare";
|
|
6
|
-
import { useAutoComplete as
|
|
6
|
+
import { useAutoComplete as Sr, Container as ht, Typography as V, Tooltip as te, IconButton as ae, Chip as xt, TextField as Oe, cn as fe, DebouncedTextField as W, Autocomplete as Ar, AutocompleteItem as Dr, ExpandablePanel as Tt, SettingsIcon as Ye, Select as Ne, SelectItem as ee, BooleanSwitchWithLabel as pt, Dialog as Fe, AutoAwesomeIcon as ft, Badge as Br, ListIcon as Mr, Button as z, CircularProgress as Ge, Paper as ge, DialogContent as De, DialogActions as Be, RuleIcon as zr, FileUploadIcon as Rr, MultiSelect as Ur, MultiSelectItem as St, Checkbox as At, cardMixin as Xt, cardClickableMixin as er, cardSelectedMixin as tr, FunctionsIcon as jr, RemoveCircleIcon as qr, defaultBorderMixin as kt, RemoveIcon as Lr, DragHandleIcon as $r, AddIcon as ce, SelectGroup as Dt, InfoLabel as Hr, DeleteIcon as mt, ContentCopyIcon as Yr, CodeIcon as Gr, Table as Bt, TableBody as Mt, TableRow as Ct, TableCell as Re, Alert as Kr, Icon as it, Card as rr, coolIconKeys as zt, Tabs as Wr, Tab as Nt, ArrowBackIcon as nt, LoadingButton as Rt, DoneIcon as Zr, Menu as Jr, MoreVertIcon as Qr, MenuItem as Xr, SaveIcon as ei, UndoIcon as ti } from "@firecms/ui";
|
|
7
7
|
import * as at from "yup";
|
|
8
8
|
import { useFormex as G, Field as $, getIn as I, useCreateFormex as Ot, Formex as Vt } from "@firecms/formex";
|
|
9
|
-
import { extractEnumFromValues as
|
|
10
|
-
import { DragDropContext as
|
|
11
|
-
import
|
|
12
|
-
import { Highlight as
|
|
13
|
-
import { ImportFileUpload as
|
|
14
|
-
import { useNavigate as
|
|
15
|
-
const
|
|
9
|
+
import { extractEnumFromValues as ri, buildPropertyFromData as ii, buildEntityPropertiesFromData as ni } from "@firecms/schema_inference";
|
|
10
|
+
import { DragDropContext as ai, Droppable as oi, Draggable as li } from "@hello-pangea/dnd";
|
|
11
|
+
import si from "json5";
|
|
12
|
+
import { Highlight as di, themes as ci } from "prism-react-renderer";
|
|
13
|
+
import { ImportFileUpload as ui, DataNewPropertiesMapping as pi, ImportNewPropertyFieldPreview as mi, getInferenceType as ir, convertDataToEntity as hi, useImportConfig as fi, ImportSaveInProgress as gi } from "@firecms/data_import_export";
|
|
14
|
+
import { useNavigate as vi } from "react-router";
|
|
15
|
+
const yi = at.object().shape({
|
|
16
16
|
id: at.string().required("Required"),
|
|
17
17
|
name: at.string().required("Required"),
|
|
18
18
|
path: at.string().required("Required")
|
|
19
19
|
});
|
|
20
|
-
function
|
|
20
|
+
function bi({
|
|
21
21
|
isNewCollection: t,
|
|
22
22
|
reservedGroups: r,
|
|
23
23
|
existingPaths: n,
|
|
@@ -33,23 +33,23 @@ function yi({
|
|
|
33
33
|
errors: s,
|
|
34
34
|
setFieldTouched: f,
|
|
35
35
|
isSubmitting: g,
|
|
36
|
-
submitCount:
|
|
37
|
-
} = G(), [y,
|
|
38
|
-
u("name", h), !I(p, "path") && t && h && u("path",
|
|
36
|
+
submitCount: x
|
|
37
|
+
} = G(), [y, P] = j(!1), [v, b] = j(!1), T = (h) => {
|
|
38
|
+
u("name", h), !I(p, "path") && t && h && u("path", Pt(h)), !I(p, "id") && t && h && u("id", Pt(h)), !I(p, "singularName") && t && h && u("singularName", br(h));
|
|
39
39
|
};
|
|
40
40
|
ue(() => {
|
|
41
41
|
s.id && b(!0);
|
|
42
42
|
}, [s.id]);
|
|
43
|
-
const
|
|
43
|
+
const w = /* @__PURE__ */ e(dt, { collectionOrView: c }), C = l?.filter((h) => !r?.includes(h)), {
|
|
44
44
|
inputFocused: O,
|
|
45
45
|
autoCompleteOpen: N,
|
|
46
46
|
setAutoCompleteOpen: F
|
|
47
|
-
} =
|
|
47
|
+
} = Sr({
|
|
48
48
|
ref: d
|
|
49
49
|
}), D = !!o;
|
|
50
50
|
let _;
|
|
51
51
|
typeof c.customId == "object" ? _ = "code_defined" : c.customId === !0 ? _ = "true" : c.customId === !1 ? _ = "false" : c.customId === "optional" && (_ = "optional");
|
|
52
|
-
const S =
|
|
52
|
+
const S = x > 0;
|
|
53
53
|
return /* @__PURE__ */ e("div", { className: "overflow-auto my-auto", children: /* @__PURE__ */ a(ht, { maxWidth: "4xl", className: "flex flex-col gap-4 p-8 m-auto", children: [
|
|
54
54
|
/* @__PURE__ */ a("div", { children: [
|
|
55
55
|
/* @__PURE__ */ a(
|
|
@@ -62,14 +62,14 @@ function yi({
|
|
|
62
62
|
ae,
|
|
63
63
|
{
|
|
64
64
|
shape: "square",
|
|
65
|
-
onClick: () =>
|
|
66
|
-
children:
|
|
65
|
+
onClick: () => P(!0),
|
|
66
|
+
children: w
|
|
67
67
|
}
|
|
68
68
|
) })
|
|
69
69
|
]
|
|
70
70
|
}
|
|
71
71
|
),
|
|
72
|
-
o && /* @__PURE__ */ e(
|
|
72
|
+
o && /* @__PURE__ */ e(xt, { colorScheme: "tealDarker", children: /* @__PURE__ */ a(V, { variant: "caption", children: [
|
|
73
73
|
"This is a subcollection of ",
|
|
74
74
|
/* @__PURE__ */ e("b", { children: o.name })
|
|
75
75
|
] }) })
|
|
@@ -80,7 +80,7 @@ function yi({
|
|
|
80
80
|
Oe,
|
|
81
81
|
{
|
|
82
82
|
value: c.name ?? "",
|
|
83
|
-
onChange: (h) =>
|
|
83
|
+
onChange: (h) => T(h.target.value),
|
|
84
84
|
label: "Name",
|
|
85
85
|
required: !0,
|
|
86
86
|
error: S && !!s.name
|
|
@@ -117,12 +117,12 @@ function yi({
|
|
|
117
117
|
}
|
|
118
118
|
),
|
|
119
119
|
/* @__PURE__ */ e(
|
|
120
|
-
|
|
120
|
+
Ar,
|
|
121
121
|
{
|
|
122
122
|
open: N && (C ?? []).length > 0,
|
|
123
123
|
setOpen: F,
|
|
124
124
|
children: C?.map((h, B) => /* @__PURE__ */ e(
|
|
125
|
-
|
|
125
|
+
Dr,
|
|
126
126
|
{
|
|
127
127
|
onClick: () => {
|
|
128
128
|
F(!1), u("group", h ?? null);
|
|
@@ -269,15 +269,15 @@ function yi({
|
|
|
269
269
|
Fe,
|
|
270
270
|
{
|
|
271
271
|
open: y,
|
|
272
|
-
onOpenChange:
|
|
272
|
+
onOpenChange: P,
|
|
273
273
|
maxWidth: "xl",
|
|
274
274
|
fullWidth: !0,
|
|
275
275
|
children: /* @__PURE__ */ e("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ e(
|
|
276
|
-
|
|
276
|
+
yr,
|
|
277
277
|
{
|
|
278
278
|
selectedIcon: c.icon,
|
|
279
279
|
onIconSelected: (h) => {
|
|
280
|
-
|
|
280
|
+
P(!1), u("icon", h);
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
) })
|
|
@@ -288,7 +288,7 @@ function yi({
|
|
|
288
288
|
function he(t) {
|
|
289
289
|
return "properties." + t.replaceAll(".", ".properties.");
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function nr(t) {
|
|
292
292
|
return t ? "properties." + t.replaceAll(".", ".properties.") + ".properties" : "properties";
|
|
293
293
|
}
|
|
294
294
|
function Ce(t) {
|
|
@@ -297,7 +297,7 @@ function Ce(t) {
|
|
|
297
297
|
function ne(t, r) {
|
|
298
298
|
return r ? `${r}.${t}` : t;
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function ar(t, r) {
|
|
301
301
|
const n = r ? `${r}.${t}` : t;
|
|
302
302
|
return he(n);
|
|
303
303
|
}
|
|
@@ -315,8 +315,8 @@ function Ci({
|
|
|
315
315
|
validateOnChange: !0,
|
|
316
316
|
validation: (p) => {
|
|
317
317
|
const s = {};
|
|
318
|
-
p.enumValues && p.enumValues.forEach((g,
|
|
319
|
-
g?.label || (s.enumValues = s.enumValues ?? [], s.enumValues[
|
|
318
|
+
p.enumValues && p.enumValues.forEach((g, x) => {
|
|
319
|
+
g?.label || (s.enumValues = s.enumValues ?? [], s.enumValues[x] = s.enumValues[x] ?? {}, s.enumValues[x].label = "You must specify a label for this enum value entry"), g?.id || (s.enumValues = s.enumValues ?? [], s.enumValues[x] = s.enumValues[x] ?? {}, s.enumValues[x].id = "You must specify an ID for this enum value entry");
|
|
320
320
|
});
|
|
321
321
|
const f = !!(s?.enumValues && Object.keys(s?.enumValues).length > 0);
|
|
322
322
|
return n?.(f), s;
|
|
@@ -348,26 +348,26 @@ function Ni({
|
|
|
348
348
|
}) {
|
|
349
349
|
const {
|
|
350
350
|
setFieldValue: c
|
|
351
|
-
} = G(), [u, m] = Y.useState(), [p, s] = Y.useState(), [f, g] = Y.useState(!1), y = Y.useRef(/* @__PURE__ */ new Set()).current,
|
|
352
|
-
const
|
|
351
|
+
} = G(), [u, m] = Y.useState(), [p, s] = Y.useState(), [f, g] = Y.useState(!1), y = Y.useRef(/* @__PURE__ */ new Set()).current, P = (b, T) => {
|
|
352
|
+
const w = u === T, C = r?.enumValues && r?.enumValues[b];
|
|
353
353
|
return /* @__PURE__ */ e(
|
|
354
|
-
|
|
354
|
+
Pi,
|
|
355
355
|
{
|
|
356
356
|
index: b,
|
|
357
357
|
disabled: n,
|
|
358
358
|
enumValuesPath: i,
|
|
359
|
-
autoFocus:
|
|
359
|
+
autoFocus: w,
|
|
360
360
|
entryError: C,
|
|
361
|
-
shouldUpdateId: l ||
|
|
361
|
+
shouldUpdateId: l || w,
|
|
362
362
|
onDialogOpen: () => s(b),
|
|
363
363
|
inferredEntry: y.has(t.enumValues[b]?.id)
|
|
364
364
|
},
|
|
365
|
-
`${
|
|
365
|
+
`${T}`
|
|
366
366
|
);
|
|
367
367
|
};
|
|
368
368
|
return /* @__PURE__ */ a("div", { className: "col-span-12", children: [
|
|
369
369
|
/* @__PURE__ */ a("div", { className: "ml-3.5 flex flex-row items-center", children: [
|
|
370
|
-
/* @__PURE__ */ e(
|
|
370
|
+
/* @__PURE__ */ e(Mr, {}),
|
|
371
371
|
/* @__PURE__ */ e(
|
|
372
372
|
V,
|
|
373
373
|
{
|
|
@@ -387,7 +387,7 @@ function Ni({
|
|
|
387
387
|
d && (g(!0), d?.().then((b) => {
|
|
388
388
|
if (!b)
|
|
389
389
|
return;
|
|
390
|
-
const
|
|
390
|
+
const T = b.flat(), w = Array.from(new Set(T)), C = t.enumValues, N = ri(w).filter((F) => !C?.some((D) => D.id === F.id));
|
|
391
391
|
N.forEach((F) => {
|
|
392
392
|
y.add(F.id);
|
|
393
393
|
}), c(i, [...N, ...C], !0);
|
|
@@ -404,14 +404,14 @@ function Ni({
|
|
|
404
404
|
] }),
|
|
405
405
|
/* @__PURE__ */ a(ge, { className: "p-4 m-1", children: [
|
|
406
406
|
/* @__PURE__ */ e(
|
|
407
|
-
|
|
407
|
+
Cr,
|
|
408
408
|
{
|
|
409
409
|
droppableId: i,
|
|
410
410
|
addLabel: "Add enum value",
|
|
411
411
|
value: t.enumValues,
|
|
412
412
|
disabled: n,
|
|
413
413
|
size: "small",
|
|
414
|
-
buildEntry:
|
|
414
|
+
buildEntry: P,
|
|
415
415
|
onInternalIdAdded: m,
|
|
416
416
|
includeAddButton: !0,
|
|
417
417
|
onValueChange: (b) => c(i, b),
|
|
@@ -419,7 +419,7 @@ function Ni({
|
|
|
419
419
|
}
|
|
420
420
|
),
|
|
421
421
|
/* @__PURE__ */ e(
|
|
422
|
-
|
|
422
|
+
xi,
|
|
423
423
|
{
|
|
424
424
|
index: p,
|
|
425
425
|
open: p !== void 0,
|
|
@@ -430,7 +430,7 @@ function Ni({
|
|
|
430
430
|
] })
|
|
431
431
|
] });
|
|
432
432
|
}
|
|
433
|
-
const
|
|
433
|
+
const Pi = Y.memo(
|
|
434
434
|
function({
|
|
435
435
|
index: r,
|
|
436
436
|
shouldUpdateId: n,
|
|
@@ -447,9 +447,9 @@ const xi = Y.memo(
|
|
|
447
447
|
errors: s,
|
|
448
448
|
setFieldValue: f,
|
|
449
449
|
touched: g
|
|
450
|
-
} = G(),
|
|
450
|
+
} = G(), x = Y.useRef(!I(m, `${i}[${r}].id`)), y = n || x.current, P = I(m, `${i}[${r}].id`), v = I(m, `${i}[${r}].label`), b = Y.useRef(v);
|
|
451
451
|
return Y.useEffect(() => {
|
|
452
|
-
(b.current ===
|
|
452
|
+
(b.current === P || !P) && y && f(`${i}[${r}].id`, v), b.current = v;
|
|
453
453
|
}, [v]), /* @__PURE__ */ a(R, { children: [
|
|
454
454
|
/* @__PURE__ */ a("div", { className: "flex w-full align-center justify-center", children: [
|
|
455
455
|
/* @__PURE__ */ e(
|
|
@@ -467,7 +467,7 @@ const xi = Y.memo(
|
|
|
467
467
|
error: !!u?.label
|
|
468
468
|
}
|
|
469
469
|
),
|
|
470
|
-
!d && /* @__PURE__ */ e(
|
|
470
|
+
!d && /* @__PURE__ */ e(Br, { color: "error", invisible: !u?.id, children: /* @__PURE__ */ e(
|
|
471
471
|
ae,
|
|
472
472
|
{
|
|
473
473
|
size: "small",
|
|
@@ -500,7 +500,7 @@ const xi = Y.memo(
|
|
|
500
500
|
return r.index === n.index && r.enumValuesPath === n.enumValuesPath && r.shouldUpdateId === n.shouldUpdateId && r.inferredEntry === n.inferredEntry && be(r.entryError, n.entryError) && r.autoFocus === n.autoFocus;
|
|
501
501
|
}
|
|
502
502
|
);
|
|
503
|
-
function
|
|
503
|
+
function xi({
|
|
504
504
|
index: t,
|
|
505
505
|
open: r,
|
|
506
506
|
onClose: n,
|
|
@@ -640,7 +640,7 @@ function Se({
|
|
|
640
640
|
values: m,
|
|
641
641
|
handleChange: p,
|
|
642
642
|
errors: s
|
|
643
|
-
} = G(), f = "validation.length", g = "validation.min",
|
|
643
|
+
} = G(), f = "validation.length", g = "validation.min", x = "validation.max", y = "validation.trim", P = "validation.matches", v = "validation.lowercase", b = "validation.uppercase", T = I(s, P), w = I(m, P), C = typeof w == "string" ? w : Nr(w);
|
|
644
644
|
return /* @__PURE__ */ a("div", { className: "grid grid-cols-12 gap-2", children: [
|
|
645
645
|
/* @__PURE__ */ e(Ee, { disabled: c }),
|
|
646
646
|
/* @__PURE__ */ a("div", { className: "grid grid-cols-12 gap-2 col-span-12", children: [
|
|
@@ -721,9 +721,9 @@ function Se({
|
|
|
721
721
|
i && /* @__PURE__ */ e("div", { className: "col-span-4", children: /* @__PURE__ */ e(
|
|
722
722
|
W,
|
|
723
723
|
{
|
|
724
|
-
value: I(m,
|
|
724
|
+
value: I(m, x),
|
|
725
725
|
label: "Max length",
|
|
726
|
-
name:
|
|
726
|
+
name: x,
|
|
727
727
|
type: "number",
|
|
728
728
|
size: "small",
|
|
729
729
|
disabled: c,
|
|
@@ -735,16 +735,16 @@ function Se({
|
|
|
735
735
|
/* @__PURE__ */ e(
|
|
736
736
|
$,
|
|
737
737
|
{
|
|
738
|
-
name:
|
|
738
|
+
name: P,
|
|
739
739
|
as: W,
|
|
740
740
|
label: "Matches regex",
|
|
741
741
|
size: "small",
|
|
742
742
|
disabled: c,
|
|
743
743
|
value: C,
|
|
744
|
-
error: !!
|
|
744
|
+
error: !!T
|
|
745
745
|
}
|
|
746
746
|
),
|
|
747
|
-
/* @__PURE__ */ e(X, { error: !!
|
|
747
|
+
/* @__PURE__ */ e(X, { error: !!T, children: T ? "Not a valid regexp" : "e.g. /^\\d+$/ for digits only" })
|
|
748
748
|
] })
|
|
749
749
|
] });
|
|
750
750
|
}
|
|
@@ -785,7 +785,7 @@ function It({
|
|
|
785
785
|
) })
|
|
786
786
|
] });
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function Pe({
|
|
789
789
|
children: t
|
|
790
790
|
}) {
|
|
791
791
|
return /* @__PURE__ */ e(
|
|
@@ -795,7 +795,7 @@ function xe({
|
|
|
795
795
|
asField: !0,
|
|
796
796
|
className: "p-4",
|
|
797
797
|
title: /* @__PURE__ */ a("div", { className: "flex flex-row text-gray-500", children: [
|
|
798
|
-
/* @__PURE__ */ e(
|
|
798
|
+
/* @__PURE__ */ e(zr, {}),
|
|
799
799
|
/* @__PURE__ */ e(
|
|
800
800
|
V,
|
|
801
801
|
{
|
|
@@ -821,7 +821,7 @@ function Ut({
|
|
|
821
821
|
values: d,
|
|
822
822
|
setFieldError: c,
|
|
823
823
|
setFieldValue: u
|
|
824
|
-
} = G(), m = Ie(), p = t ? "of.enumValues" : "enumValues", s = I(d, "defaultValue"), f = I(d, p), g = Jt(() => !f || typeof f == "boolean" ? [] :
|
|
824
|
+
} = G(), m = Ie(), p = t ? "of.enumValues" : "enumValues", s = I(d, "defaultValue"), f = I(d, p), g = Jt(() => !f || typeof f == "boolean" ? [] : Pr(f) ?? [], [f]);
|
|
825
825
|
return /* @__PURE__ */ a(R, { children: [
|
|
826
826
|
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(
|
|
827
827
|
Ci,
|
|
@@ -833,11 +833,11 @@ function Ut({
|
|
|
833
833
|
onError: (y) => {
|
|
834
834
|
c(p, y ? "This enum property is missing some values" : void 0);
|
|
835
835
|
},
|
|
836
|
-
getData: o ? () => o().then((y) => y.map((
|
|
836
|
+
getData: o ? () => o().then((y) => y.map((P) => d.id && I(P, d.id)).filter(Boolean)) : void 0,
|
|
837
837
|
onValuesChanged: (y) => {
|
|
838
838
|
if (d && (u(p, y), !t)) {
|
|
839
|
-
const
|
|
840
|
-
s && !
|
|
839
|
+
const P = y.filter((v) => !!v?.id).map((v) => v.id);
|
|
840
|
+
s && !P.includes(s) && (u("defaultValue", void 0), m.open({
|
|
841
841
|
type: "warning",
|
|
842
842
|
message: "Default value was cleared"
|
|
843
843
|
}));
|
|
@@ -845,7 +845,7 @@ function Ut({
|
|
|
845
845
|
}
|
|
846
846
|
}
|
|
847
847
|
) }),
|
|
848
|
-
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ a(
|
|
848
|
+
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ a(Pe, { children: [
|
|
849
849
|
!t && /* @__PURE__ */ e(
|
|
850
850
|
Se,
|
|
851
851
|
{
|
|
@@ -892,15 +892,15 @@ function jt({
|
|
|
892
892
|
const {
|
|
893
893
|
values: i,
|
|
894
894
|
setFieldValue: l
|
|
895
|
-
} = G(), o = t ? "of.storage" : "storage", d = `${o}.acceptedFiles`, c = `${o}.fileName`, u = `${o}.storagePath`, m = `${o}.storeUrl`, p = I(i, c) ?? "{rand}_{file}", s = I(i, u) ?? "/", f = I(i, d), g = Array.isArray(f) ? f : void 0,
|
|
896
|
-
b ? b.includes("all") || b.length >= Object.keys(ot).length ? l(d, void 0) :
|
|
897
|
-
},
|
|
895
|
+
} = G(), o = t ? "of.storage" : "storage", d = `${o}.acceptedFiles`, c = `${o}.fileName`, u = `${o}.storagePath`, m = `${o}.storeUrl`, p = I(i, c) ?? "{rand}_{file}", s = I(i, u) ?? "/", f = I(i, d), g = Array.isArray(f) ? f : void 0, x = !g || g.length === 0, y = (b) => {
|
|
896
|
+
b ? b.includes("all") || b.length >= Object.keys(ot).length ? l(d, void 0) : x ? l(d, Object.keys(ot).filter((T) => !b.includes(T))) : l(d, b) : l(d, void 0);
|
|
897
|
+
}, P = typeof p == "function", v = typeof s == "function";
|
|
898
898
|
return /* @__PURE__ */ a(R, { children: [
|
|
899
899
|
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(
|
|
900
900
|
Tt,
|
|
901
901
|
{
|
|
902
902
|
title: /* @__PURE__ */ a("div", { className: "flex flex-row text-gray-500", children: [
|
|
903
|
-
/* @__PURE__ */ e(
|
|
903
|
+
/* @__PURE__ */ e(Rr, {}),
|
|
904
904
|
/* @__PURE__ */ e(
|
|
905
905
|
V,
|
|
906
906
|
{
|
|
@@ -912,14 +912,14 @@ function jt({
|
|
|
912
912
|
] }),
|
|
913
913
|
children: /* @__PURE__ */ a("div", { className: "grid grid-cols-12 gap-2 p-4", children: [
|
|
914
914
|
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ a(
|
|
915
|
-
|
|
915
|
+
Ur,
|
|
916
916
|
{
|
|
917
917
|
disabled: n,
|
|
918
918
|
name: d,
|
|
919
919
|
value: g ?? [],
|
|
920
920
|
onMultiValueChange: y,
|
|
921
|
-
label:
|
|
922
|
-
renderValues: (b) => !b || b.length === 0 ? "All file types allowed" : b.map((
|
|
921
|
+
label: x ? void 0 : "Allowed file types",
|
|
922
|
+
renderValues: (b) => !b || b.length === 0 ? "All file types allowed" : b.map((T) => ot[T]).filter((T) => !!T).join(", "),
|
|
923
923
|
children: [
|
|
924
924
|
/* @__PURE__ */ a(St, { value: "all", className: "flex items-center gap-2", children: [
|
|
925
925
|
/* @__PURE__ */ e(
|
|
@@ -930,20 +930,20 @@ function jt({
|
|
|
930
930
|
),
|
|
931
931
|
"All"
|
|
932
932
|
] }, "all"),
|
|
933
|
-
Object.entries(ot).map(([b,
|
|
933
|
+
Object.entries(ot).map(([b, T]) => /* @__PURE__ */ a(St, { value: b, className: "flex items-center gap-2", children: [
|
|
934
934
|
/* @__PURE__ */ e(
|
|
935
935
|
At,
|
|
936
936
|
{
|
|
937
|
-
checked:
|
|
937
|
+
checked: x || g.indexOf(b) > -1
|
|
938
938
|
}
|
|
939
939
|
),
|
|
940
|
-
/* @__PURE__ */ e("div", { className: "flex-grow", children:
|
|
940
|
+
/* @__PURE__ */ e("div", { className: "flex-grow", children: T }),
|
|
941
941
|
/* @__PURE__ */ e(
|
|
942
942
|
z,
|
|
943
943
|
{
|
|
944
944
|
size: "small",
|
|
945
945
|
variant: "outlined",
|
|
946
|
-
onClick: (
|
|
946
|
+
onClick: (w) => (w.preventDefault(), w.stopPropagation(), l(d, [b])),
|
|
947
947
|
children: "Only"
|
|
948
948
|
}
|
|
949
949
|
)
|
|
@@ -958,8 +958,8 @@ function jt({
|
|
|
958
958
|
as: W,
|
|
959
959
|
label: "File name",
|
|
960
960
|
size: "small",
|
|
961
|
-
disabled:
|
|
962
|
-
value:
|
|
961
|
+
disabled: P || n,
|
|
962
|
+
value: P ? "-" : p
|
|
963
963
|
}
|
|
964
964
|
) }),
|
|
965
965
|
/* @__PURE__ */ a("div", { className: "col-span-12", children: [
|
|
@@ -991,12 +991,12 @@ function jt({
|
|
|
991
991
|
{
|
|
992
992
|
name: m,
|
|
993
993
|
type: "checkbox",
|
|
994
|
-
children: ({ field: b, form:
|
|
994
|
+
children: ({ field: b, form: T }) => /* @__PURE__ */ e(
|
|
995
995
|
le,
|
|
996
996
|
{
|
|
997
997
|
label: "Save URL instead of storage path",
|
|
998
998
|
disabled: r || n,
|
|
999
|
-
form:
|
|
999
|
+
form: T,
|
|
1000
1000
|
field: b
|
|
1001
1001
|
}
|
|
1002
1002
|
)
|
|
@@ -1007,7 +1007,7 @@ function jt({
|
|
|
1007
1007
|
] })
|
|
1008
1008
|
}
|
|
1009
1009
|
) }),
|
|
1010
|
-
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ a(
|
|
1010
|
+
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ a(Pe, { children: [
|
|
1011
1011
|
!t && /* @__PURE__ */ e("div", { className: "grid grid-cols-12 gap-2", children: /* @__PURE__ */ e(Ee, { disabled: n }) }),
|
|
1012
1012
|
t && /* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(It, { disabled: n }) })
|
|
1013
1013
|
] }) })
|
|
@@ -1033,7 +1033,7 @@ function wi(t) {
|
|
|
1033
1033
|
} : { [r]: i };
|
|
1034
1034
|
}).filter((r) => !!r).reduce((r, n) => ({ ...r, ...n }), {});
|
|
1035
1035
|
}
|
|
1036
|
-
function
|
|
1036
|
+
function or({
|
|
1037
1037
|
property: t,
|
|
1038
1038
|
onClick: r,
|
|
1039
1039
|
hasError: n,
|
|
@@ -1123,10 +1123,10 @@ function Ti({
|
|
|
1123
1123
|
"div",
|
|
1124
1124
|
{
|
|
1125
1125
|
className: "h-8 w-8 p-1 rounded-full shadow text-white bg-gray-500",
|
|
1126
|
-
children: /* @__PURE__ */ e(
|
|
1126
|
+
children: /* @__PURE__ */ e(jr, { color: "inherit", size: "medium" })
|
|
1127
1127
|
}
|
|
1128
1128
|
),
|
|
1129
|
-
/* @__PURE__ */ e(
|
|
1129
|
+
/* @__PURE__ */ e(qr, { color: "disabled", size: "small", className: "absolute -right-2 -top-2" })
|
|
1130
1130
|
] }),
|
|
1131
1131
|
/* @__PURE__ */ e(
|
|
1132
1132
|
ge,
|
|
@@ -1210,13 +1210,13 @@ const gt = Y.memo(
|
|
|
1210
1210
|
inferredPropertyKeys: s,
|
|
1211
1211
|
collectionEditable: f
|
|
1212
1212
|
}) {
|
|
1213
|
-
const g = o ?? Object.keys(l),
|
|
1213
|
+
const g = o ?? Object.keys(l), x = J((y) => {
|
|
1214
1214
|
if (!y.destination)
|
|
1215
1215
|
return;
|
|
1216
|
-
const
|
|
1217
|
-
b.splice(v, 0,
|
|
1216
|
+
const P = y.source.index, v = y.destination.index, b = Array.from(g), [T] = b.splice(P, 1);
|
|
1217
|
+
b.splice(v, 0, T), u && u(b, r);
|
|
1218
1218
|
}, [r, u, g]);
|
|
1219
|
-
return /* @__PURE__ */ e(R, { children: /* @__PURE__ */ e(
|
|
1219
|
+
return /* @__PURE__ */ e(R, { children: /* @__PURE__ */ e(ai, { onDragEnd: x, children: /* @__PURE__ */ e(oi, { droppableId: `droppable_${r}`, children: (y, P) => /* @__PURE__ */ a(
|
|
1220
1220
|
"div",
|
|
1221
1221
|
{
|
|
1222
1222
|
...y.droppableProps,
|
|
@@ -1224,9 +1224,9 @@ const gt = Y.memo(
|
|
|
1224
1224
|
className: p,
|
|
1225
1225
|
children: [
|
|
1226
1226
|
g && g.map((v, b) => {
|
|
1227
|
-
const
|
|
1228
|
-
return !
|
|
1229
|
-
|
|
1227
|
+
const T = l[v], w = d?.find((C) => C.key === v);
|
|
1228
|
+
return !T && !w ? (console.warn(`Property ${v} not found in properties or additionalFields`), null) : /* @__PURE__ */ e(
|
|
1229
|
+
li,
|
|
1230
1230
|
{
|
|
1231
1231
|
draggableId: `array_field_${r}_${v}}`,
|
|
1232
1232
|
index: b,
|
|
@@ -1234,8 +1234,8 @@ const gt = Y.memo(
|
|
|
1234
1234
|
ki,
|
|
1235
1235
|
{
|
|
1236
1236
|
propertyKey: v,
|
|
1237
|
-
propertyOrBuilder:
|
|
1238
|
-
additionalField:
|
|
1237
|
+
propertyOrBuilder: T,
|
|
1238
|
+
additionalField: w,
|
|
1239
1239
|
provided: C,
|
|
1240
1240
|
errors: c,
|
|
1241
1241
|
namespace: r,
|
|
@@ -1277,17 +1277,17 @@ function ki({
|
|
|
1277
1277
|
inferredPropertyKeys: p,
|
|
1278
1278
|
collectionEditable: s
|
|
1279
1279
|
}) {
|
|
1280
|
-
const f = p?.includes(r ? `${r}.${t}` : t), g = ne(t, r), y =
|
|
1281
|
-
let
|
|
1280
|
+
const f = p?.includes(r ? `${r}.${t}` : t), g = ne(t, r), y = ar(t, r) in d;
|
|
1281
|
+
let P;
|
|
1282
1282
|
if (typeof n == "object") {
|
|
1283
|
-
const
|
|
1284
|
-
|
|
1283
|
+
const T = n;
|
|
1284
|
+
T.dataType === "map" && T.properties && (P = /* @__PURE__ */ e(
|
|
1285
1285
|
gt,
|
|
1286
1286
|
{
|
|
1287
1287
|
selectedPropertyKey: o,
|
|
1288
1288
|
namespace: g,
|
|
1289
|
-
properties:
|
|
1290
|
-
propertiesOrder:
|
|
1289
|
+
properties: T.properties,
|
|
1290
|
+
propertiesOrder: T.propertiesOrder,
|
|
1291
1291
|
errors: d,
|
|
1292
1292
|
onPropertyClick: c,
|
|
1293
1293
|
onPropertyMove: u,
|
|
@@ -1305,7 +1305,7 @@ function ki({
|
|
|
1305
1305
|
...l.dragHandleProps,
|
|
1306
1306
|
className: "relative -ml-8",
|
|
1307
1307
|
children: [
|
|
1308
|
-
|
|
1308
|
+
P && /* @__PURE__ */ e(
|
|
1309
1309
|
"div",
|
|
1310
1310
|
{
|
|
1311
1311
|
className: "absolute border-l " + kt,
|
|
@@ -1317,7 +1317,7 @@ function ki({
|
|
|
1317
1317
|
}
|
|
1318
1318
|
),
|
|
1319
1319
|
!ie(n) && !i && b ? /* @__PURE__ */ e(
|
|
1320
|
-
|
|
1320
|
+
or,
|
|
1321
1321
|
{
|
|
1322
1322
|
property: n,
|
|
1323
1323
|
onClick: c ? () => c(t, r) : void 0,
|
|
@@ -1342,7 +1342,7 @@ function ki({
|
|
|
1342
1342
|
size: "small",
|
|
1343
1343
|
color: "inherit",
|
|
1344
1344
|
onClick: () => m(t, r),
|
|
1345
|
-
children: /* @__PURE__ */ e(
|
|
1345
|
+
children: /* @__PURE__ */ e(Lr, { size: "small" })
|
|
1346
1346
|
}
|
|
1347
1347
|
) }),
|
|
1348
1348
|
u && /* @__PURE__ */ e(te, { title: "Move", children: /* @__PURE__ */ e(
|
|
@@ -1350,11 +1350,11 @@ function ki({
|
|
|
1350
1350
|
{
|
|
1351
1351
|
component: "span",
|
|
1352
1352
|
size: "small",
|
|
1353
|
-
children: /* @__PURE__ */ e(
|
|
1353
|
+
children: /* @__PURE__ */ e($r, { size: "small" })
|
|
1354
1354
|
}
|
|
1355
1355
|
) })
|
|
1356
1356
|
] }),
|
|
1357
|
-
|
|
1357
|
+
P && /* @__PURE__ */ e("div", { className: "ml-16", children: P })
|
|
1358
1358
|
]
|
|
1359
1359
|
}
|
|
1360
1360
|
);
|
|
@@ -1363,26 +1363,26 @@ function Oi({ disabled: t, getData: r, allowDataInference: n, propertyConfigs: i
|
|
|
1363
1363
|
const {
|
|
1364
1364
|
values: o,
|
|
1365
1365
|
setFieldValue: d
|
|
1366
|
-
} = G(), [c, u] = j(!1), [m, p] = j(), [s, f] = j(), g = o.propertiesOrder ?? Object.keys(o.properties ?? {}),
|
|
1367
|
-
id:
|
|
1366
|
+
} = G(), [c, u] = j(!1), [m, p] = j(), [s, f] = j(), g = o.propertiesOrder ?? Object.keys(o.properties ?? {}), x = ({
|
|
1367
|
+
id: w,
|
|
1368
1368
|
property: C
|
|
1369
1369
|
}) => {
|
|
1370
|
-
if (!
|
|
1370
|
+
if (!w)
|
|
1371
1371
|
throw Error();
|
|
1372
1372
|
d("properties", {
|
|
1373
1373
|
...o.properties ?? {},
|
|
1374
|
-
[
|
|
1374
|
+
[w]: C
|
|
1375
1375
|
}, !1);
|
|
1376
|
-
const O = o.propertiesOrder ?? Object.keys(o.properties ?? {}), N = O.includes(
|
|
1376
|
+
const O = o.propertiesOrder ?? Object.keys(o.properties ?? {}), N = O.includes(w) ? O : [...O, w];
|
|
1377
1377
|
d("propertiesOrder", N, !1), u(!1);
|
|
1378
|
-
}, y = J((
|
|
1379
|
-
const O =
|
|
1378
|
+
}, y = J((w, C) => {
|
|
1379
|
+
const O = w ? ne(w, C) : void 0;
|
|
1380
1380
|
if (!O)
|
|
1381
1381
|
throw Error("collection editor miss config");
|
|
1382
|
-
const N = he(O), F = Ce(C), D = I(o, F) ?? Object.keys(I(o,
|
|
1383
|
-
d(N, void 0, !1), d(F, D.filter((_) => _ !==
|
|
1384
|
-
}, [d, o]),
|
|
1385
|
-
d(Ce(C),
|
|
1382
|
+
const N = he(O), F = Ce(C), D = I(o, F) ?? Object.keys(I(o, nr(C)));
|
|
1383
|
+
d(N, void 0, !1), d(F, D.filter((_) => _ !== w), !1), u(!1), p(void 0), f(void 0);
|
|
1384
|
+
}, [d, o]), P = m ? ne(m, s) : void 0, v = P ? I(o.properties, P.replaceAll(".", ".properties.")) : void 0, b = !g || g.length < 1, T = J((w, C) => {
|
|
1385
|
+
d(Ce(C), w, !1);
|
|
1386
1386
|
}, []);
|
|
1387
1387
|
return /* @__PURE__ */ a(R, { children: [
|
|
1388
1388
|
/* @__PURE__ */ a("div", { className: "col-span-12", children: [
|
|
@@ -1410,10 +1410,10 @@ function Oi({ disabled: t, getData: r, allowDataInference: n, propertyConfigs: i
|
|
|
1410
1410
|
propertiesOrder: g,
|
|
1411
1411
|
errors: {},
|
|
1412
1412
|
collectionEditable: l,
|
|
1413
|
-
onPropertyClick: (
|
|
1414
|
-
p(
|
|
1413
|
+
onPropertyClick: (w, C) => {
|
|
1414
|
+
p(w), f(C), u(!0);
|
|
1415
1415
|
},
|
|
1416
|
-
onPropertyMove:
|
|
1416
|
+
onPropertyMove: T
|
|
1417
1417
|
}
|
|
1418
1418
|
),
|
|
1419
1419
|
b && /* @__PURE__ */ e(
|
|
@@ -1433,7 +1433,7 @@ function Oi({ disabled: t, getData: r, allowDataInference: n, propertyConfigs: i
|
|
|
1433
1433
|
position: "start",
|
|
1434
1434
|
size: "small",
|
|
1435
1435
|
label: "Spread children as columns",
|
|
1436
|
-
onValueChange: (
|
|
1436
|
+
onValueChange: (w) => d("spreadChildren", w),
|
|
1437
1437
|
value: o.spreadChildren ?? !1
|
|
1438
1438
|
}
|
|
1439
1439
|
),
|
|
@@ -1461,7 +1461,7 @@ function Oi({ disabled: t, getData: r, allowDataInference: n, propertyConfigs: i
|
|
|
1461
1461
|
existingProperty: !!m,
|
|
1462
1462
|
autoUpdateId: !m,
|
|
1463
1463
|
autoOpenTypeSelect: !m,
|
|
1464
|
-
onPropertyChanged:
|
|
1464
|
+
onPropertyChanged: x,
|
|
1465
1465
|
existingPropertyKeys: m ? void 0 : g,
|
|
1466
1466
|
propertyConfigs: i
|
|
1467
1467
|
}
|
|
@@ -1483,9 +1483,9 @@ function Vi({
|
|
|
1483
1483
|
errors: m,
|
|
1484
1484
|
setFieldValue: p,
|
|
1485
1485
|
touched: s
|
|
1486
|
-
} = G(), [f, g] = j(!1),
|
|
1487
|
-
console.log("onPropertyChanged", b,
|
|
1488
|
-
}, v =
|
|
1486
|
+
} = G(), [f, g] = j(!1), x = I(c, "of"), y = I(s, "of") && I(m, "of"), P = ({ id: b, property: T, namespace: w }) => {
|
|
1487
|
+
console.log("onPropertyChanged", b, T, w), p("of", T);
|
|
1488
|
+
}, v = x && Le(x, o);
|
|
1489
1489
|
return /* @__PURE__ */ a(R, { children: [
|
|
1490
1490
|
/* @__PURE__ */ a("div", { className: "col-span-12", children: [
|
|
1491
1491
|
/* @__PURE__ */ e(V, { variant: "subtitle2", children: "Repeat component" }),
|
|
@@ -1493,12 +1493,12 @@ function Vi({
|
|
|
1493
1493
|
$,
|
|
1494
1494
|
{
|
|
1495
1495
|
name: "of",
|
|
1496
|
-
value:
|
|
1496
|
+
value: x,
|
|
1497
1497
|
children: ({}) => /* @__PURE__ */ a(ge, { className: "p-2 mt-4", children: [
|
|
1498
|
-
|
|
1499
|
-
|
|
1498
|
+
x && /* @__PURE__ */ e(
|
|
1499
|
+
or,
|
|
1500
1500
|
{
|
|
1501
|
-
property:
|
|
1501
|
+
property: x,
|
|
1502
1502
|
onClick: n ? void 0 : () => g(!0),
|
|
1503
1503
|
includeName: !1,
|
|
1504
1504
|
includeEditButton: !0,
|
|
@@ -1506,7 +1506,7 @@ function Vi({
|
|
|
1506
1506
|
hasError: !1
|
|
1507
1507
|
}
|
|
1508
1508
|
),
|
|
1509
|
-
!n && !
|
|
1509
|
+
!n && !x && /* @__PURE__ */ a(
|
|
1510
1510
|
z,
|
|
1511
1511
|
{
|
|
1512
1512
|
variant: "text",
|
|
@@ -1530,9 +1530,9 @@ function Vi({
|
|
|
1530
1530
|
autoOpenTypeSelect: !r,
|
|
1531
1531
|
onOkClicked: () => g(!1),
|
|
1532
1532
|
allowDataInference: l,
|
|
1533
|
-
property:
|
|
1533
|
+
property: x,
|
|
1534
1534
|
includeIdAndName: !1,
|
|
1535
|
-
onPropertyChanged:
|
|
1535
|
+
onPropertyChanged: P,
|
|
1536
1536
|
forceShowErrors: t,
|
|
1537
1537
|
propertyConfigs: o,
|
|
1538
1538
|
collectionEditable: d
|
|
@@ -1542,7 +1542,7 @@ function Vi({
|
|
|
1542
1542
|
}
|
|
1543
1543
|
)
|
|
1544
1544
|
] }),
|
|
1545
|
-
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(
|
|
1545
|
+
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(Pe, { children: /* @__PURE__ */ e(It, { disabled: n }) }) })
|
|
1546
1546
|
] });
|
|
1547
1547
|
}
|
|
1548
1548
|
const Ii = Y.forwardRef(
|
|
@@ -1560,7 +1560,7 @@ const Ii = Y.forwardRef(
|
|
|
1560
1560
|
setFieldTouched: p,
|
|
1561
1561
|
touched: s,
|
|
1562
1562
|
validate: f
|
|
1563
|
-
} = G(), g = "name",
|
|
1563
|
+
} = G(), g = "name", x = r && I(c, g), y = "id", P = r && I(c, y), v = "description", b = r && I(c, v);
|
|
1564
1564
|
return /* @__PURE__ */ a("div", { className: "flex flex-col gap-2 col-span-12", children: [
|
|
1565
1565
|
/* @__PURE__ */ a("div", { children: [
|
|
1566
1566
|
/* @__PURE__ */ e(
|
|
@@ -1570,18 +1570,18 @@ const Ii = Y.forwardRef(
|
|
|
1570
1570
|
inputRef: d,
|
|
1571
1571
|
as: W,
|
|
1572
1572
|
value: u[g],
|
|
1573
|
-
onChange: (
|
|
1574
|
-
const
|
|
1575
|
-
!I(s, y) && l && m(y,
|
|
1573
|
+
onChange: (T) => {
|
|
1574
|
+
const w = T.target.value;
|
|
1575
|
+
!I(s, y) && l && m(y, w ? Pt(w) : "", !1), m(g, w, !0), p(g, !0);
|
|
1576
1576
|
},
|
|
1577
1577
|
style: { fontSize: 20 },
|
|
1578
1578
|
placeholder: "Field name",
|
|
1579
1579
|
required: !0,
|
|
1580
1580
|
disabled: i,
|
|
1581
|
-
error: !!
|
|
1581
|
+
error: !!x
|
|
1582
1582
|
}
|
|
1583
1583
|
),
|
|
1584
|
-
/* @__PURE__ */ e(X, { error: !!
|
|
1584
|
+
/* @__PURE__ */ e(X, { error: !!x, children: x })
|
|
1585
1585
|
] }),
|
|
1586
1586
|
/* @__PURE__ */ a("div", { children: [
|
|
1587
1587
|
/* @__PURE__ */ e(
|
|
@@ -1591,17 +1591,17 @@ const Ii = Y.forwardRef(
|
|
|
1591
1591
|
as: W,
|
|
1592
1592
|
label: "ID",
|
|
1593
1593
|
value: u[y],
|
|
1594
|
-
onChange: (
|
|
1595
|
-
const
|
|
1596
|
-
!I(s, g) && l && m(g,
|
|
1594
|
+
onChange: (T) => {
|
|
1595
|
+
const w = T.target.value;
|
|
1596
|
+
!I(s, g) && l && m(g, w ? wt(w) : ""), m(y, w, !0), p(y, !0);
|
|
1597
1597
|
},
|
|
1598
1598
|
disabled: n || i,
|
|
1599
1599
|
required: !0,
|
|
1600
1600
|
size: "small",
|
|
1601
|
-
error: !!
|
|
1601
|
+
error: !!P
|
|
1602
1602
|
}
|
|
1603
1603
|
),
|
|
1604
|
-
/* @__PURE__ */ e(X, { error: !!
|
|
1604
|
+
/* @__PURE__ */ e(X, { error: !!P, children: P })
|
|
1605
1605
|
] }),
|
|
1606
1606
|
/* @__PURE__ */ a("div", { children: [
|
|
1607
1607
|
/* @__PURE__ */ e(
|
|
@@ -1626,7 +1626,7 @@ function _i({
|
|
|
1626
1626
|
}) {
|
|
1627
1627
|
const { values: i, setFieldValue: l } = G();
|
|
1628
1628
|
return /* @__PURE__ */ a(R, { children: [
|
|
1629
|
-
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ a(
|
|
1629
|
+
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ a(Pe, { children: [
|
|
1630
1630
|
t === "text_field" && /* @__PURE__ */ e(
|
|
1631
1631
|
Se,
|
|
1632
1632
|
{
|
|
@@ -1695,7 +1695,7 @@ function _i({
|
|
|
1695
1695
|
function Fi({ disabled: t }) {
|
|
1696
1696
|
const { values: r } = G(), n = I(r, "defaultValue");
|
|
1697
1697
|
return /* @__PURE__ */ a(R, { children: [
|
|
1698
|
-
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(
|
|
1698
|
+
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(Pe, { children: /* @__PURE__ */ e(Ee, { disabled: t }) }) }),
|
|
1699
1699
|
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(
|
|
1700
1700
|
$,
|
|
1701
1701
|
{
|
|
@@ -1714,29 +1714,35 @@ function Fi({ disabled: t }) {
|
|
|
1714
1714
|
) })
|
|
1715
1715
|
] });
|
|
1716
1716
|
}
|
|
1717
|
-
function Ei({
|
|
1717
|
+
function Ei({
|
|
1718
|
+
disabled: t,
|
|
1719
|
+
getData: r,
|
|
1720
|
+
allowDataInference: n,
|
|
1721
|
+
propertyConfigs: i,
|
|
1722
|
+
collectionEditable: l
|
|
1723
|
+
}) {
|
|
1718
1724
|
const {
|
|
1719
1725
|
values: o,
|
|
1720
1726
|
setFieldValue: d
|
|
1721
1727
|
} = G(), [c, u] = j(!1), [m, p] = j(), [s, f] = j(), g = ({
|
|
1722
|
-
id:
|
|
1723
|
-
property:
|
|
1728
|
+
id: T,
|
|
1729
|
+
property: w
|
|
1724
1730
|
}) => {
|
|
1725
|
-
if (!
|
|
1731
|
+
if (!T)
|
|
1726
1732
|
throw Error();
|
|
1727
1733
|
d("oneOf.properties", {
|
|
1728
1734
|
...o.oneOf?.properties ?? {},
|
|
1729
|
-
[
|
|
1735
|
+
[T]: w
|
|
1730
1736
|
}, !1);
|
|
1731
|
-
const C = o.oneOf?.propertiesOrder ?? Object.keys(o.oneOf?.properties ?? {}), O = C.includes(
|
|
1737
|
+
const C = o.oneOf?.propertiesOrder ?? Object.keys(o.oneOf?.properties ?? {}), O = C.includes(T) ? C : [...C, T];
|
|
1732
1738
|
d("oneOf.propertiesOrder", O, !1), u(!1);
|
|
1733
|
-
},
|
|
1734
|
-
const C =
|
|
1739
|
+
}, x = m ? ne(m, s) : void 0, y = x ? I(o.oneOf?.properties, x.replaceAll(".", ".properties.")) : void 0, P = J((T, w) => {
|
|
1740
|
+
const C = T ? ne(T, w) : void 0;
|
|
1735
1741
|
if (!C)
|
|
1736
1742
|
throw Error("collection editor miss config");
|
|
1737
1743
|
d(`oneOf.${he(C)}`, void 0, !1);
|
|
1738
|
-
const O = `oneOf.${Ce(
|
|
1739
|
-
d(O, N.filter((F) => F !==
|
|
1744
|
+
const O = `oneOf.${Ce(w)}`, N = I(o, O) ?? Object.keys(I(o, nr(w)));
|
|
1745
|
+
d(O, N.filter((F) => F !== T), !1), u(!1), p(void 0), f(void 0);
|
|
1740
1746
|
}, [d, o]), v = /* @__PURE__ */ a(
|
|
1741
1747
|
z,
|
|
1742
1748
|
{
|
|
@@ -1749,8 +1755,8 @@ function Ei({ disabled: t, getData: r, allowDataInference: n, propertyConfigs: i
|
|
|
1749
1755
|
o.name ?? "this block"
|
|
1750
1756
|
]
|
|
1751
1757
|
}
|
|
1752
|
-
), b = J((
|
|
1753
|
-
d(`oneOf.${Ce(
|
|
1758
|
+
), b = J((T, w) => {
|
|
1759
|
+
d(`oneOf.${Ce(w)}`, T, !1);
|
|
1754
1760
|
}, []);
|
|
1755
1761
|
return /* @__PURE__ */ a(R, { children: [
|
|
1756
1762
|
/* @__PURE__ */ a("div", { className: "col-span-12", children: [
|
|
@@ -1766,8 +1772,8 @@ function Ei({ disabled: t, getData: r, allowDataInference: n, propertyConfigs: i
|
|
|
1766
1772
|
propertiesOrder: o.oneOf?.propertiesOrder,
|
|
1767
1773
|
errors: {},
|
|
1768
1774
|
collectionEditable: l,
|
|
1769
|
-
onPropertyClick: t ? void 0 : (
|
|
1770
|
-
p(
|
|
1775
|
+
onPropertyClick: t ? void 0 : (T, w) => {
|
|
1776
|
+
p(T), f(w), u(!0);
|
|
1771
1777
|
},
|
|
1772
1778
|
onPropertyMove: t ? void 0 : b
|
|
1773
1779
|
}
|
|
@@ -1790,7 +1796,7 @@ function Ei({ disabled: t, getData: r, allowDataInference: n, propertyConfigs: i
|
|
|
1790
1796
|
u(!1), p(void 0), f(void 0);
|
|
1791
1797
|
},
|
|
1792
1798
|
collectionEditable: l,
|
|
1793
|
-
onDelete:
|
|
1799
|
+
onDelete: P,
|
|
1794
1800
|
propertyKey: m,
|
|
1795
1801
|
propertyNamespace: s,
|
|
1796
1802
|
property: y,
|
|
@@ -1912,7 +1918,7 @@ function Si({ disabled: t }) {
|
|
|
1912
1918
|
function Ai({ disabled: t }) {
|
|
1913
1919
|
const { values: r, setFieldValue: n } = G();
|
|
1914
1920
|
return /* @__PURE__ */ a(R, { children: [
|
|
1915
|
-
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(
|
|
1921
|
+
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(Pe, { children: /* @__PURE__ */ e(Si, { disabled: t }) }) }),
|
|
1916
1922
|
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(
|
|
1917
1923
|
Oe,
|
|
1918
1924
|
{
|
|
@@ -2109,7 +2115,7 @@ function Bi({ disabled: t }) {
|
|
|
2109
2115
|
),
|
|
2110
2116
|
/* @__PURE__ */ e(X, { error: !!p, children: p ?? "Update this field automatically when creating or updating the entity" })
|
|
2111
2117
|
] }),
|
|
2112
|
-
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(
|
|
2118
|
+
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(Pe, { children: /* @__PURE__ */ e(Ee, { disabled: t }) }) })
|
|
2113
2119
|
] });
|
|
2114
2120
|
}
|
|
2115
2121
|
function Mi({ disabled: t }) {
|
|
@@ -2144,9 +2150,9 @@ function Mi({ disabled: t }) {
|
|
|
2144
2150
|
] });
|
|
2145
2151
|
}
|
|
2146
2152
|
function zi({ disabled: t }) {
|
|
2147
|
-
return /* @__PURE__ */ e(R, { children: /* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(
|
|
2153
|
+
return /* @__PURE__ */ e(R, { children: /* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(Pe, { children: /* @__PURE__ */ e(Ee, { disabled: t }) }) }) });
|
|
2148
2154
|
}
|
|
2149
|
-
function
|
|
2155
|
+
function lr(t, r, n) {
|
|
2150
2156
|
let i;
|
|
2151
2157
|
return r === "text_field" ? i = K(
|
|
2152
2158
|
t,
|
|
@@ -2358,7 +2364,7 @@ function or(t, r, n) {
|
|
|
2358
2364
|
propertyConfig: r
|
|
2359
2365
|
}), i;
|
|
2360
2366
|
}
|
|
2361
|
-
function
|
|
2367
|
+
function sr({ value: t, optionDisabled: r, propertyConfig: n, existing: i }) {
|
|
2362
2368
|
return /* @__PURE__ */ e(
|
|
2363
2369
|
ee,
|
|
2364
2370
|
{
|
|
@@ -2428,7 +2434,7 @@ function Ri({
|
|
|
2428
2434
|
]
|
|
2429
2435
|
}
|
|
2430
2436
|
) }),
|
|
2431
|
-
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(
|
|
2437
|
+
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(Pe, { children: /* @__PURE__ */ e(
|
|
2432
2438
|
Se,
|
|
2433
2439
|
{
|
|
2434
2440
|
disabled: t,
|
|
@@ -2473,7 +2479,7 @@ const Ui = [
|
|
|
2473
2479
|
"key_value",
|
|
2474
2480
|
"repeat",
|
|
2475
2481
|
"block"
|
|
2476
|
-
],
|
|
2482
|
+
], dr = Object.entries(Kt).filter(([t]) => Ui.includes(t)).map(([t, r]) => ({ [t]: r })).reduce((t, r) => ({ ...t, ...r }), {}), cr = Y.memo(
|
|
2477
2483
|
function(r) {
|
|
2478
2484
|
const {
|
|
2479
2485
|
includeIdAndName: n = !0,
|
|
@@ -2488,13 +2494,13 @@ const Ui = [
|
|
|
2488
2494
|
onPropertyChanged: s,
|
|
2489
2495
|
onPropertyChangedImmediate: f = !0,
|
|
2490
2496
|
onDelete: g,
|
|
2491
|
-
onError:
|
|
2497
|
+
onError: x,
|
|
2492
2498
|
initialErrors: y,
|
|
2493
|
-
forceShowErrors:
|
|
2499
|
+
forceShowErrors: P,
|
|
2494
2500
|
allowDataInference: v,
|
|
2495
2501
|
getController: b,
|
|
2496
|
-
getData:
|
|
2497
|
-
propertyConfigs:
|
|
2502
|
+
getData: T,
|
|
2503
|
+
propertyConfigs: w,
|
|
2498
2504
|
collectionEditable: C
|
|
2499
2505
|
} = r, O = {
|
|
2500
2506
|
id: "",
|
|
@@ -2560,16 +2566,16 @@ const Ui = [
|
|
|
2560
2566
|
onDelete: g,
|
|
2561
2567
|
includeIdAndTitle: n,
|
|
2562
2568
|
propertyNamespace: m,
|
|
2563
|
-
onError:
|
|
2564
|
-
showErrors:
|
|
2569
|
+
onError: x,
|
|
2570
|
+
showErrors: P || _.submitCount > 0,
|
|
2565
2571
|
existing: l,
|
|
2566
2572
|
autoUpdateId: o,
|
|
2567
2573
|
inArray: d,
|
|
2568
2574
|
autoOpenTypeSelect: i,
|
|
2569
2575
|
disabled: N,
|
|
2570
|
-
getData:
|
|
2576
|
+
getData: T,
|
|
2571
2577
|
allowDataInference: v,
|
|
2572
|
-
propertyConfigs:
|
|
2578
|
+
propertyConfigs: w,
|
|
2573
2579
|
collectionEditable: C,
|
|
2574
2580
|
..._
|
|
2575
2581
|
}
|
|
@@ -2603,7 +2609,7 @@ function Ve({
|
|
|
2603
2609
|
},
|
|
2604
2610
|
children: [
|
|
2605
2611
|
/* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(
|
|
2606
|
-
|
|
2612
|
+
cr,
|
|
2607
2613
|
{
|
|
2608
2614
|
...d,
|
|
2609
2615
|
onPropertyChanged: (m) => {
|
|
@@ -2659,12 +2665,12 @@ function ji({
|
|
|
2659
2665
|
showErrors: s,
|
|
2660
2666
|
disabled: f,
|
|
2661
2667
|
inArray: g,
|
|
2662
|
-
getData:
|
|
2668
|
+
getData: x,
|
|
2663
2669
|
allowDataInference: y,
|
|
2664
|
-
propertyConfigs:
|
|
2670
|
+
propertyConfigs: P,
|
|
2665
2671
|
collectionEditable: v
|
|
2666
2672
|
}) {
|
|
2667
|
-
const [b,
|
|
2673
|
+
const [b, T] = j(o), [w, C] = j(!1), [O, N] = j(t?.dataType ? Wt(t) : void 0), F = Object.entries(dr).concat(Object.entries(P)), D = g ? F.filter(([Z, H]) => !ie(H.property) && H.property?.dataType !== "array") : F, _ = Er(t), S = je(null), h = je(t), B = s && I(r, "selectedWidget");
|
|
2668
2674
|
ue(() => {
|
|
2669
2675
|
if (c && (!d || _.id)) {
|
|
2670
2676
|
const {
|
|
@@ -2681,7 +2687,7 @@ function ji({
|
|
|
2681
2687
|
t?.id && p && p(t?.id, m, r);
|
|
2682
2688
|
}, [r, p, m, t?.id]);
|
|
2683
2689
|
const oe = (Z) => {
|
|
2684
|
-
N(Z), n(
|
|
2690
|
+
N(Z), n(lr(t, Z, P)), setTimeout(() => {
|
|
2685
2691
|
S.current?.focus();
|
|
2686
2692
|
}, 0);
|
|
2687
2693
|
};
|
|
@@ -2706,7 +2712,7 @@ function ji({
|
|
|
2706
2712
|
allowDataInference: y,
|
|
2707
2713
|
updateIds: !i,
|
|
2708
2714
|
disabled: f,
|
|
2709
|
-
getData:
|
|
2715
|
+
getData: x,
|
|
2710
2716
|
showErrors: s
|
|
2711
2717
|
}
|
|
2712
2718
|
) : O === "multi_select" || O === "multi_number_select" ? q = /* @__PURE__ */ e(
|
|
@@ -2716,7 +2722,7 @@ function ji({
|
|
|
2716
2722
|
updateIds: !i,
|
|
2717
2723
|
disabled: f,
|
|
2718
2724
|
allowDataInference: y,
|
|
2719
|
-
getData:
|
|
2725
|
+
getData: x,
|
|
2720
2726
|
showErrors: s
|
|
2721
2727
|
}
|
|
2722
2728
|
) : O === "file_upload" ? q = /* @__PURE__ */ e(
|
|
@@ -2737,19 +2743,19 @@ function ji({
|
|
|
2737
2743
|
Oi,
|
|
2738
2744
|
{
|
|
2739
2745
|
disabled: f,
|
|
2740
|
-
getData:
|
|
2746
|
+
getData: x,
|
|
2741
2747
|
allowDataInference: y,
|
|
2742
2748
|
collectionEditable: v,
|
|
2743
|
-
propertyConfigs:
|
|
2749
|
+
propertyConfigs: P
|
|
2744
2750
|
}
|
|
2745
2751
|
) : O === "block" ? q = /* @__PURE__ */ e(
|
|
2746
2752
|
Ei,
|
|
2747
2753
|
{
|
|
2748
2754
|
disabled: f,
|
|
2749
|
-
getData:
|
|
2755
|
+
getData: x,
|
|
2750
2756
|
allowDataInference: y,
|
|
2751
2757
|
collectionEditable: v,
|
|
2752
|
-
propertyConfigs:
|
|
2758
|
+
propertyConfigs: P
|
|
2753
2759
|
}
|
|
2754
2760
|
) : O === "reference" ? q = /* @__PURE__ */ e(
|
|
2755
2761
|
qt,
|
|
@@ -2772,14 +2778,14 @@ function ji({
|
|
|
2772
2778
|
{
|
|
2773
2779
|
showErrors: s,
|
|
2774
2780
|
existing: i,
|
|
2775
|
-
getData:
|
|
2781
|
+
getData: x,
|
|
2776
2782
|
allowDataInference: y,
|
|
2777
2783
|
disabled: f,
|
|
2778
2784
|
collectionEditable: v,
|
|
2779
|
-
propertyConfigs:
|
|
2785
|
+
propertyConfigs: P
|
|
2780
2786
|
}
|
|
2781
2787
|
) : O === "key_value" ? q = /* @__PURE__ */ e(zi, { disabled: f }) : q = null, /* @__PURE__ */ a(R, { children: [
|
|
2782
|
-
f && /* @__PURE__ */ a(
|
|
2788
|
+
f && /* @__PURE__ */ a(Hr, { mode: "warn", children: [
|
|
2783
2789
|
/* @__PURE__ */ e(V, { children: "This property can't be edited" }),
|
|
2784
2790
|
/* @__PURE__ */ a(V, { variant: "caption", children: [
|
|
2785
2791
|
"You may not have permission to edit it or it is defined in code with no ",
|
|
@@ -2796,13 +2802,13 @@ function ji({
|
|
|
2796
2802
|
value: O ?? "",
|
|
2797
2803
|
placeholder: "Select a property widget",
|
|
2798
2804
|
open: b,
|
|
2799
|
-
onOpenChange:
|
|
2805
|
+
onOpenChange: T,
|
|
2800
2806
|
position: "item-aligned",
|
|
2801
2807
|
disabled: f,
|
|
2802
2808
|
renderValue: (Z) => {
|
|
2803
2809
|
if (!Z)
|
|
2804
2810
|
return /* @__PURE__ */ e("em", { children: "Select a property widget" });
|
|
2805
|
-
const H = Z, Q = Kt[H] ??
|
|
2811
|
+
const H = Z, Q = Kt[H] ?? P[H], se = Q.property, Me = se && !ie(se) ? Le(se, P) : void 0, we = ie(se) || i && se.dataType !== t?.dataType, de = Me ? K(Me, Q) : Q;
|
|
2806
2812
|
return /* @__PURE__ */ a(
|
|
2807
2813
|
"div",
|
|
2808
2814
|
{
|
|
@@ -2836,7 +2842,7 @@ function ji({
|
|
|
2836
2842
|
children: D.map(([Z, H]) => {
|
|
2837
2843
|
const Q = H.property, se = i && !ie(Q) && Q.dataType !== t?.dataType;
|
|
2838
2844
|
return /* @__PURE__ */ e(
|
|
2839
|
-
|
|
2845
|
+
sr,
|
|
2840
2846
|
{
|
|
2841
2847
|
value: Z,
|
|
2842
2848
|
optionDisabled: se,
|
|
@@ -2887,7 +2893,7 @@ function ji({
|
|
|
2887
2893
|
u && /* @__PURE__ */ e(
|
|
2888
2894
|
ct,
|
|
2889
2895
|
{
|
|
2890
|
-
open:
|
|
2896
|
+
open: w,
|
|
2891
2897
|
onAccept: () => u(t?.id, m),
|
|
2892
2898
|
onCancel: () => C(!1),
|
|
2893
2899
|
title: /* @__PURE__ */ e("div", { children: "Delete this property?" }),
|
|
@@ -2919,7 +2925,7 @@ function Yi({
|
|
|
2919
2925
|
}) {
|
|
2920
2926
|
const i = Ie(), l = t ? `import { EntityCollection } from "firecms";
|
|
2921
2927
|
|
|
2922
|
-
const ` + (t?.name ? Hi(t.name) : "my") + "Collection:EntityCollection = " +
|
|
2928
|
+
const ` + (t?.name ? Hi(t.name) : "my") + "Collection:EntityCollection = " + si.stringify(ur(t), null, " ") : "No collection selected";
|
|
2923
2929
|
return /* @__PURE__ */ a(
|
|
2924
2930
|
Fe,
|
|
2925
2931
|
{
|
|
@@ -2945,9 +2951,9 @@ const ` + (t?.name ? Hi(t.name) : "my") + "Collection:EntityCollection = " + li.
|
|
|
2945
2951
|
"."
|
|
2946
2952
|
] }),
|
|
2947
2953
|
/* @__PURE__ */ e(
|
|
2948
|
-
|
|
2954
|
+
di,
|
|
2949
2955
|
{
|
|
2950
|
-
theme:
|
|
2956
|
+
theme: ci.vsDark,
|
|
2951
2957
|
code: l,
|
|
2952
2958
|
language: "typescript",
|
|
2953
2959
|
children: ({
|
|
@@ -2971,7 +2977,7 @@ const ` + (t?.name ? Hi(t.name) : "my") + "Collection:EntityCollection = " + li.
|
|
|
2971
2977
|
message: "Copied"
|
|
2972
2978
|
}), navigator.clipboard.writeText(l)),
|
|
2973
2979
|
children: [
|
|
2974
|
-
/* @__PURE__ */ e(
|
|
2980
|
+
/* @__PURE__ */ e(Yr, { size: "small" }),
|
|
2975
2981
|
"Copy to clipboard"
|
|
2976
2982
|
]
|
|
2977
2983
|
}
|
|
@@ -2982,7 +2988,7 @@ const ` + (t?.name ? Hi(t.name) : "my") + "Collection:EntityCollection = " + li.
|
|
|
2982
2988
|
}
|
|
2983
2989
|
);
|
|
2984
2990
|
}
|
|
2985
|
-
function
|
|
2991
|
+
function ur(t) {
|
|
2986
2992
|
const r = (n) => {
|
|
2987
2993
|
const i = {
|
|
2988
2994
|
...n
|
|
@@ -3008,7 +3014,7 @@ function cr(t) {
|
|
|
3008
3014
|
properties: Object.entries(t.properties ?? {}).map(([n, i]) => ({
|
|
3009
3015
|
[n]: r(i)
|
|
3010
3016
|
})).reduce((n, i) => ({ ...n, ...i }), {}),
|
|
3011
|
-
subcollections: (t.subcollections ?? []).map(
|
|
3017
|
+
subcollections: (t.subcollections ?? []).map(ur)
|
|
3012
3018
|
};
|
|
3013
3019
|
}
|
|
3014
3020
|
function Gi({
|
|
@@ -3028,11 +3034,11 @@ function Gi({
|
|
|
3028
3034
|
const {
|
|
3029
3035
|
values: f,
|
|
3030
3036
|
setFieldValue: g,
|
|
3031
|
-
setFieldError:
|
|
3037
|
+
setFieldError: x,
|
|
3032
3038
|
setFieldTouched: y,
|
|
3033
|
-
errors:
|
|
3039
|
+
errors: P,
|
|
3034
3040
|
dirty: v
|
|
3035
|
-
} = G(), b = Ie(),
|
|
3041
|
+
} = G(), b = Ie(), T = wr(), w = !T, [C, O] = j(), [N, F] = j(), [D, _] = j(), S = N ? ne(N, D) : void 0, h = S ? I(f.properties, S.replaceAll(".", ".properties.")) : void 0, [B, oe] = j(!1), [q, Z] = j(!1), [H, Q] = j(!1), [se, Me] = j([]), we = Y.useRef(f.propertiesOrder ? { "": f.propertiesOrder } : {});
|
|
3036
3042
|
ue(() => {
|
|
3037
3043
|
l && l(v);
|
|
3038
3044
|
}, [v]);
|
|
@@ -3087,7 +3093,7 @@ function Gi({
|
|
|
3087
3093
|
[A]: U
|
|
3088
3094
|
}, !1);
|
|
3089
3095
|
const k = [...f.propertiesOrder ?? Object.keys(f.properties), A];
|
|
3090
|
-
ve(k), Q(!1),
|
|
3096
|
+
ve(k), Q(!1), T && (O(k.indexOf(A)), F(A)), _(void 0);
|
|
3091
3097
|
}, pe = ({
|
|
3092
3098
|
id: A,
|
|
3093
3099
|
property: U,
|
|
@@ -3121,7 +3127,7 @@ function Gi({
|
|
|
3121
3127
|
propertyPath: E
|
|
3122
3128
|
}), E) {
|
|
3123
3129
|
const M = k && Object.keys(k).length > 0;
|
|
3124
|
-
i(A, U, M ? k : void 0),
|
|
3130
|
+
i(A, U, M ? k : void 0), x(he(E), M ? "Property error" : void 0);
|
|
3125
3131
|
}
|
|
3126
3132
|
}, []), Ze = () => {
|
|
3127
3133
|
O(void 0), F(void 0);
|
|
@@ -3134,7 +3140,7 @@ function Gi({
|
|
|
3134
3140
|
/* @__PURE__ */ a("div", { className: fe(
|
|
3135
3141
|
"p-4 md:p-8 pb-20 md:pb-20",
|
|
3136
3142
|
"col-span-12 lg:col-span-5 h-full overflow-auto",
|
|
3137
|
-
!
|
|
3143
|
+
!w && "border-r " + kt
|
|
3138
3144
|
), children: [
|
|
3139
3145
|
/* @__PURE__ */ a("div", { className: "flex my-2", children: [
|
|
3140
3146
|
/* @__PURE__ */ a("div", { className: "flex-grow mb-4", children: [
|
|
@@ -3149,7 +3155,7 @@ function Gi({
|
|
|
3149
3155
|
placeholder: "Collection name",
|
|
3150
3156
|
size: "small",
|
|
3151
3157
|
required: !0,
|
|
3152
|
-
error: !!
|
|
3158
|
+
error: !!P?.name
|
|
3153
3159
|
}
|
|
3154
3160
|
),
|
|
3155
3161
|
Xe && /* @__PURE__ */ a(
|
|
@@ -3173,7 +3179,7 @@ function Gi({
|
|
|
3173
3179
|
variant: "filled",
|
|
3174
3180
|
disabled: q,
|
|
3175
3181
|
onClick: () => oe(!0),
|
|
3176
|
-
children: /* @__PURE__ */ e(
|
|
3182
|
+
children: /* @__PURE__ */ e(Gr, {})
|
|
3177
3183
|
}
|
|
3178
3184
|
) }),
|
|
3179
3185
|
de && /* @__PURE__ */ e(te, { title: "Add new properties based on data", children: /* @__PURE__ */ e(
|
|
@@ -3208,7 +3214,7 @@ function Gi({
|
|
|
3208
3214
|
onPropertyMove: Ke,
|
|
3209
3215
|
onPropertyRemove: r ? ke : void 0,
|
|
3210
3216
|
collectionEditable: s,
|
|
3211
|
-
errors:
|
|
3217
|
+
errors: P
|
|
3212
3218
|
}
|
|
3213
3219
|
) }),
|
|
3214
3220
|
/* @__PURE__ */ e(
|
|
@@ -3224,13 +3230,13 @@ function Gi({
|
|
|
3224
3230
|
}
|
|
3225
3231
|
)
|
|
3226
3232
|
] }),
|
|
3227
|
-
!
|
|
3233
|
+
!w && /* @__PURE__ */ e("div", { className: "col-span-12 lg:col-span-7 p-4 md:py-8 md:px-4 h-full overflow-auto pb-20 md:pb-20", children: /* @__PURE__ */ a(
|
|
3228
3234
|
ge,
|
|
3229
3235
|
{
|
|
3230
3236
|
className: "sticky top-8 p-4 min-h-full border border-transparent w-full flex flex-col justify-center ",
|
|
3231
3237
|
children: [
|
|
3232
3238
|
S && h && !ie(h) && /* @__PURE__ */ e(
|
|
3233
|
-
|
|
3239
|
+
cr,
|
|
3234
3240
|
{
|
|
3235
3241
|
inArray: !1,
|
|
3236
3242
|
existingProperty: !r,
|
|
@@ -3269,7 +3275,7 @@ function Gi({
|
|
|
3269
3275
|
]
|
|
3270
3276
|
}
|
|
3271
3277
|
) }),
|
|
3272
|
-
|
|
3278
|
+
w && /* @__PURE__ */ e(
|
|
3273
3279
|
Ve,
|
|
3274
3280
|
{
|
|
3275
3281
|
inArray: !1,
|
|
@@ -3289,7 +3295,7 @@ function Gi({
|
|
|
3289
3295
|
getData: u,
|
|
3290
3296
|
propertyConfigs: p,
|
|
3291
3297
|
collectionEditable: s,
|
|
3292
|
-
onOkClicked:
|
|
3298
|
+
onOkClicked: w ? Ze : void 0
|
|
3293
3299
|
},
|
|
3294
3300
|
`edit_view_${C}`
|
|
3295
3301
|
)
|
|
@@ -3394,10 +3400,10 @@ function Zi({
|
|
|
3394
3400
|
getUser: l,
|
|
3395
3401
|
parentCollectionIds: o
|
|
3396
3402
|
}) {
|
|
3397
|
-
const { entityViews: d } = Ae(), [c, u] = Y.useState(), [m, p] = Y.useState(!1), [s, f] = Y.useState(), [g,
|
|
3403
|
+
const { entityViews: d } = Ae(), [c, u] = Y.useState(), [m, p] = Y.useState(!1), [s, f] = Y.useState(), [g, x] = Y.useState(), {
|
|
3398
3404
|
values: y,
|
|
3399
|
-
setFieldValue:
|
|
3400
|
-
} = G(), v = t.subcollections ?? [], b = y.entityViews?.filter((C) => typeof C == "string").map((C) =>
|
|
3405
|
+
setFieldValue: P
|
|
3406
|
+
} = G(), v = t.subcollections ?? [], b = y.entityViews?.filter((C) => typeof C == "string").map((C) => Tr(C, d)).filter(Boolean) ?? [], T = t.entityViews?.filter((C) => typeof C != "string") ?? [], w = b.length + T.length;
|
|
3401
3407
|
return /* @__PURE__ */ a("div", { className: "overflow-auto my-auto", children: [
|
|
3402
3408
|
/* @__PURE__ */ e(ht, { maxWidth: "2xl", className: "flex flex-col gap-4 p-8 m-auto", children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-16", children: [
|
|
3403
3409
|
/* @__PURE__ */ a("div", { className: "flex-grow flex flex-col gap-4 items-start", children: [
|
|
@@ -3409,7 +3415,7 @@ function Zi({
|
|
|
3409
3415
|
v && v.length > 0 && /* @__PURE__ */ e(Bt, { children: /* @__PURE__ */ e(Mt, { children: v.map((C) => /* @__PURE__ */ a(
|
|
3410
3416
|
Ct,
|
|
3411
3417
|
{
|
|
3412
|
-
onClick: () =>
|
|
3418
|
+
onClick: () => x({
|
|
3413
3419
|
isNewCollection: !1,
|
|
3414
3420
|
editedCollectionId: C.id
|
|
3415
3421
|
}),
|
|
@@ -3446,7 +3452,7 @@ function Zi({
|
|
|
3446
3452
|
z,
|
|
3447
3453
|
{
|
|
3448
3454
|
onClick: () => {
|
|
3449
|
-
|
|
3455
|
+
x({
|
|
3450
3456
|
isNewCollection: !0
|
|
3451
3457
|
});
|
|
3452
3458
|
},
|
|
@@ -3459,7 +3465,7 @@ function Zi({
|
|
|
3459
3465
|
] }),
|
|
3460
3466
|
/* @__PURE__ */ a("div", { className: "flex-grow flex flex-col gap-4 items-start", children: [
|
|
3461
3467
|
/* @__PURE__ */ e(V, { variant: "h5", children: "Custom views" }),
|
|
3462
|
-
|
|
3468
|
+
w === 0 && /* @__PURE__ */ e(Kr, { action: /* @__PURE__ */ e(
|
|
3463
3469
|
z,
|
|
3464
3470
|
{
|
|
3465
3471
|
variant: "text",
|
|
@@ -3499,7 +3505,7 @@ function Zi({
|
|
|
3499
3505
|
}
|
|
3500
3506
|
)
|
|
3501
3507
|
] }, C.key)),
|
|
3502
|
-
|
|
3508
|
+
T.map((C) => /* @__PURE__ */ e(Ct, { children: /* @__PURE__ */ a(
|
|
3503
3509
|
Re,
|
|
3504
3510
|
{
|
|
3505
3511
|
align: "left",
|
|
@@ -3553,7 +3559,7 @@ function Zi({
|
|
|
3553
3559
|
{
|
|
3554
3560
|
open: !!s,
|
|
3555
3561
|
onAccept: () => {
|
|
3556
|
-
|
|
3562
|
+
P("entityViews", y.entityViews?.filter((C) => C !== s)), f(void 0);
|
|
3557
3563
|
},
|
|
3558
3564
|
onCancel: () => f(void 0),
|
|
3559
3565
|
title: /* @__PURE__ */ e(R, { children: "Remove this view?" }),
|
|
@@ -3565,7 +3571,7 @@ function Zi({
|
|
|
3565
3571
|
}
|
|
3566
3572
|
),
|
|
3567
3573
|
/* @__PURE__ */ e(
|
|
3568
|
-
|
|
3574
|
+
mr,
|
|
3569
3575
|
{
|
|
3570
3576
|
open: !!g,
|
|
3571
3577
|
configController: n,
|
|
@@ -3576,7 +3582,7 @@ function Zi({
|
|
|
3576
3582
|
...g,
|
|
3577
3583
|
getUser: l,
|
|
3578
3584
|
handleClose: () => {
|
|
3579
|
-
|
|
3585
|
+
x(void 0);
|
|
3580
3586
|
}
|
|
3581
3587
|
}
|
|
3582
3588
|
),
|
|
@@ -3585,7 +3591,7 @@ function Zi({
|
|
|
3585
3591
|
{
|
|
3586
3592
|
open: m,
|
|
3587
3593
|
onClose: (C) => {
|
|
3588
|
-
C &&
|
|
3594
|
+
C && P("entityViews", [...y.entityViews ?? [], C]), p(!1);
|
|
3589
3595
|
}
|
|
3590
3596
|
}
|
|
3591
3597
|
)
|
|
@@ -4023,8 +4029,8 @@ function Ji({
|
|
|
4023
4029
|
const [o, d] = j(!1), [c, u] = j();
|
|
4024
4030
|
ue(() => {
|
|
4025
4031
|
r && l && (d(!0), r(t).then((g) => {
|
|
4026
|
-
const
|
|
4027
|
-
u(
|
|
4032
|
+
const x = g.filter((y) => !(l ?? []).find((P) => P.trim().toLowerCase() === y.trim().toLowerCase()));
|
|
4033
|
+
u(x);
|
|
4028
4034
|
}).finally(() => d(!1)));
|
|
4029
4035
|
}, [l, t, r]);
|
|
4030
4036
|
const {
|
|
@@ -4041,7 +4047,7 @@ function Ji({
|
|
|
4041
4047
|
children: /* @__PURE__ */ e(V, { variant: "h4", className: "flex-grow", children: "New collection" })
|
|
4042
4048
|
}
|
|
4043
4049
|
),
|
|
4044
|
-
n && /* @__PURE__ */ e(
|
|
4050
|
+
n && /* @__PURE__ */ e(xt, { colorScheme: "tealDarker", children: /* @__PURE__ */ a(V, { variant: "caption", children: [
|
|
4045
4051
|
"This is a subcollection of ",
|
|
4046
4052
|
/* @__PURE__ */ e("b", { children: n.name })
|
|
4047
4053
|
] }) }),
|
|
@@ -4056,8 +4062,8 @@ function Ji({
|
|
|
4056
4062
|
),
|
|
4057
4063
|
/* @__PURE__ */ a("div", { className: "flex flex-wrap gap-x-2 gap-y-1 items-center my-2 min-h-7", children: [
|
|
4058
4064
|
o && !c && /* @__PURE__ */ e(Ge, { size: "small" }),
|
|
4059
|
-
c?.map((g,
|
|
4060
|
-
|
|
4065
|
+
c?.map((g, x) => /* @__PURE__ */ e(
|
|
4066
|
+
xt,
|
|
4061
4067
|
{
|
|
4062
4068
|
colorScheme: "cyanLighter",
|
|
4063
4069
|
onClick: () => {
|
|
@@ -4137,7 +4143,7 @@ function Ji({
|
|
|
4137
4143
|
children: "● Create a collection from a file (csv, json, xls, xslx...)"
|
|
4138
4144
|
}
|
|
4139
4145
|
),
|
|
4140
|
-
/* @__PURE__ */ e(
|
|
4146
|
+
/* @__PURE__ */ e(ui, { onDataAdded: (g, x) => i(g, x) })
|
|
4141
4147
|
] }),
|
|
4142
4148
|
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(z, { variant: "text", onClick: () => i(), className: "my-2", children: "Continue from scratch" }) })
|
|
4143
4149
|
] }) });
|
|
@@ -4176,58 +4182,58 @@ function Qi({
|
|
|
4176
4182
|
values: o
|
|
4177
4183
|
} = G(), [d, c] = j(void 0), u = Y.useRef(o.propertiesOrder ? { "": o.propertiesOrder } : {}), m = d ? d.id : void 0, p = d || void 0, s = ({
|
|
4178
4184
|
id: g,
|
|
4179
|
-
property:
|
|
4185
|
+
property: x,
|
|
4180
4186
|
previousId: y,
|
|
4181
|
-
namespace:
|
|
4187
|
+
namespace: P
|
|
4182
4188
|
}) => {
|
|
4183
|
-
const v = g ? ne(g,
|
|
4189
|
+
const v = g ? ne(g, P) : void 0, b = v ? he(v) : void 0, T = (C) => C ? u.current[C] ?? I(o, Ce(C)) : u.current[""], w = (C, O) => {
|
|
4184
4190
|
const N = Ce(O);
|
|
4185
4191
|
i(N, C, !1), u.current[O ?? ""] = C;
|
|
4186
4192
|
};
|
|
4187
4193
|
if (y && y !== g) {
|
|
4188
|
-
const C = ne(y,
|
|
4189
|
-
|
|
4194
|
+
const C = ne(y, P), O = he(C), F = T(P).map((_) => _ === y ? g : _).filter((_) => _ !== void 0);
|
|
4195
|
+
w(F, P);
|
|
4190
4196
|
const D = { ...t.headersMapping };
|
|
4191
4197
|
Object.keys(D).forEach((_) => {
|
|
4192
4198
|
D[_] === y && (D[_] = g ?? "");
|
|
4193
4199
|
}), t.setHeadersMapping(D), i(O, void 0, !1), l(O, !1, !1);
|
|
4194
4200
|
}
|
|
4195
|
-
b && (i(b,
|
|
4201
|
+
b && (i(b, x, !1), l(b, !0, !1));
|
|
4196
4202
|
}, f = async ({
|
|
4197
4203
|
id: g,
|
|
4198
|
-
importKey:
|
|
4204
|
+
importKey: x,
|
|
4199
4205
|
property: y,
|
|
4200
|
-
namespace:
|
|
4206
|
+
namespace: P
|
|
4201
4207
|
}) => {
|
|
4202
|
-
const v = g ? ne(g,
|
|
4203
|
-
...
|
|
4208
|
+
const v = g ? ne(g, P) : void 0, b = v ? he(v) : void 0, T = t.importData.map((C) => I(C, x)), w = {
|
|
4209
|
+
...ii(T, y, ir),
|
|
4204
4210
|
editable: !0
|
|
4205
4211
|
};
|
|
4206
|
-
b && (
|
|
4212
|
+
b && (w ? i(b, w, !1) : i(b, y, !1), l(b, !0, !1));
|
|
4207
4213
|
};
|
|
4208
4214
|
return /* @__PURE__ */ a("div", { className: "overflow-auto my-auto", children: [
|
|
4209
4215
|
/* @__PURE__ */ a(ht, { maxWidth: "6xl", className: "flex flex-col gap-4 p-8 m-auto", children: [
|
|
4210
4216
|
/* @__PURE__ */ e(V, { variant: "h6", className: "my-4 ml-3.5", children: "Data property mapping" }),
|
|
4211
4217
|
/* @__PURE__ */ e(
|
|
4212
|
-
|
|
4218
|
+
pi,
|
|
4213
4219
|
{
|
|
4214
4220
|
importConfig: t,
|
|
4215
4221
|
destinationProperties: o.properties,
|
|
4216
4222
|
buildPropertyView: ({
|
|
4217
4223
|
property: g,
|
|
4218
|
-
propertyKey:
|
|
4224
|
+
propertyKey: x,
|
|
4219
4225
|
importKey: y,
|
|
4220
|
-
isIdColumn:
|
|
4221
|
-
}) =>
|
|
4222
|
-
|
|
4226
|
+
isIdColumn: P
|
|
4227
|
+
}) => P ? /* @__PURE__ */ e(V, { children: " This column will be used as ID" }) : /* @__PURE__ */ e(
|
|
4228
|
+
mi,
|
|
4223
4229
|
{
|
|
4224
4230
|
property: g,
|
|
4225
|
-
propertyKey:
|
|
4231
|
+
propertyKey: x,
|
|
4226
4232
|
onPropertyNameChanged: (v, b) => i(`properties.${v}.name`, b, !1),
|
|
4227
4233
|
onEditClick: () => {
|
|
4228
|
-
!
|
|
4234
|
+
!x || !g || c({
|
|
4229
4235
|
...g,
|
|
4230
|
-
id:
|
|
4236
|
+
id: x,
|
|
4231
4237
|
editable: !0
|
|
4232
4238
|
});
|
|
4233
4239
|
},
|
|
@@ -4240,7 +4246,7 @@ function Qi({
|
|
|
4240
4246
|
...v,
|
|
4241
4247
|
importKey: y
|
|
4242
4248
|
}),
|
|
4243
|
-
propertyKey:
|
|
4249
|
+
propertyKey: x,
|
|
4244
4250
|
propertyConfigs: r
|
|
4245
4251
|
}
|
|
4246
4252
|
)
|
|
@@ -4301,7 +4307,7 @@ function Xi({
|
|
|
4301
4307
|
position: "item-aligned",
|
|
4302
4308
|
renderValue: (m) => d ? /* @__PURE__ */ e($e, { propertyConfig: d }) : null,
|
|
4303
4309
|
onValueChange: (m) => {
|
|
4304
|
-
const p =
|
|
4310
|
+
const p = lr(t, m, i);
|
|
4305
4311
|
n && r({
|
|
4306
4312
|
id: n,
|
|
4307
4313
|
property: p,
|
|
@@ -4309,8 +4315,8 @@ function Xi({
|
|
|
4309
4315
|
namespace: void 0
|
|
4310
4316
|
});
|
|
4311
4317
|
},
|
|
4312
|
-
children: Object.entries(
|
|
4313
|
-
|
|
4318
|
+
children: Object.entries(dr).map(([m, p]) => /* @__PURE__ */ e(
|
|
4319
|
+
sr,
|
|
4314
4320
|
{
|
|
4315
4321
|
value: m,
|
|
4316
4322
|
optionDisabled: !1,
|
|
@@ -4331,15 +4337,15 @@ function en({
|
|
|
4331
4337
|
}) {
|
|
4332
4338
|
const [i, l] = j(!1);
|
|
4333
4339
|
async function o() {
|
|
4334
|
-
const c = t.importData.map((u) =>
|
|
4340
|
+
const c = t.importData.map((u) => hi(u, t.idColumn, t.headersMapping, r, "TEMP_PATH", t.defaultValues));
|
|
4335
4341
|
t.setEntities(c);
|
|
4336
4342
|
}
|
|
4337
4343
|
ue(() => {
|
|
4338
4344
|
o().finally(() => l(!1));
|
|
4339
4345
|
}, []);
|
|
4340
|
-
const d =
|
|
4346
|
+
const d = kr();
|
|
4341
4347
|
return i ? /* @__PURE__ */ e(ut, {}) : /* @__PURE__ */ e(
|
|
4342
|
-
|
|
4348
|
+
Or,
|
|
4343
4349
|
{
|
|
4344
4350
|
title: /* @__PURE__ */ a("div", { children: [
|
|
4345
4351
|
/* @__PURE__ */ e(V, { variant: "subtitle2", children: "Imported data preview" }),
|
|
@@ -4358,15 +4364,16 @@ function en({
|
|
|
4358
4364
|
key: c,
|
|
4359
4365
|
disabled: !1
|
|
4360
4366
|
})),
|
|
4361
|
-
properties: r
|
|
4367
|
+
properties: r,
|
|
4368
|
+
enablePopupIcon: !1
|
|
4362
4369
|
}
|
|
4363
4370
|
);
|
|
4364
4371
|
}
|
|
4365
|
-
function
|
|
4372
|
+
function pr(t, r = "") {
|
|
4366
4373
|
const n = Object.keys(t).reduce((o, d) => {
|
|
4367
|
-
const c = t[d], u =
|
|
4374
|
+
const c = t[d], u = Vr(d), m = r ? `${r}.${u}` : u;
|
|
4368
4375
|
if (c.dataType === "map" && c.properties) {
|
|
4369
|
-
const f =
|
|
4376
|
+
const f = pr(c.properties, m);
|
|
4370
4377
|
return {
|
|
4371
4378
|
headersMapping: { ...o.headersMapping, [d]: m },
|
|
4372
4379
|
properties: {
|
|
@@ -4394,7 +4401,7 @@ function ur(t, r = "") {
|
|
|
4394
4401
|
idColumn: l
|
|
4395
4402
|
};
|
|
4396
4403
|
}
|
|
4397
|
-
function
|
|
4404
|
+
function mr(t) {
|
|
4398
4405
|
const r = t.open, [n, i] = Ue.useState(!1), [l, o] = Ue.useState(!1), d = J(() => {
|
|
4399
4406
|
n ? o(!0) : t.handleClose(void 0);
|
|
4400
4407
|
}, [n, t.handleClose]);
|
|
@@ -4435,10 +4442,10 @@ function tn(t) {
|
|
|
4435
4442
|
const { propertyConfigs: r } = Ae(), n = Te(), i = _e(), {
|
|
4436
4443
|
topLevelNavigation: l,
|
|
4437
4444
|
collections: o
|
|
4438
|
-
} = n, d = t.initialValues, c = !d?.path && (t.parentCollectionIds ?? []).length === 0, u = (t.parentCollection ? t.parentCollection.subcollections : o) ?? [], m = u.map((b) => b.path.trim().toLowerCase()), p = u.map((b) => b.id?.trim().toLowerCase()).filter(Boolean), [s, f] = Ue.useState(), [g,
|
|
4445
|
+
} = n, d = t.initialValues, c = !d?.path && (t.parentCollectionIds ?? []).length === 0, u = (t.parentCollection ? t.parentCollection.subcollections : o) ?? [], m = u.map((b) => b.path.trim().toLowerCase()), p = u.map((b) => b.id?.trim().toLowerCase()).filter(Boolean), [s, f] = Ue.useState(), [g, x] = Ue.useState(!1);
|
|
4439
4446
|
if (ue(() => {
|
|
4440
4447
|
try {
|
|
4441
|
-
n.initialised && (t.editedCollectionId ? f(n.getCollectionFromPaths([...t.parentCollectionIds ?? [], t.editedCollectionId])) : f(void 0),
|
|
4448
|
+
n.initialised && (t.editedCollectionId ? f(n.getCollectionFromPaths([...t.parentCollectionIds ?? [], t.editedCollectionId])) : f(void 0), x(!0));
|
|
4442
4449
|
} catch (b) {
|
|
4443
4450
|
console.error(b);
|
|
4444
4451
|
}
|
|
@@ -4446,10 +4453,10 @@ function tn(t) {
|
|
|
4446
4453
|
throw Error("Internal: Navigation not ready in collection editor");
|
|
4447
4454
|
const {
|
|
4448
4455
|
groups: y
|
|
4449
|
-
} = l,
|
|
4456
|
+
} = l, P = s ? {
|
|
4450
4457
|
...s,
|
|
4451
4458
|
id: s.id ?? s.path ?? Ft(16)
|
|
4452
|
-
} : void 0, v =
|
|
4459
|
+
} : void 0, v = P ? nn(P, r) : {
|
|
4453
4460
|
id: d?.path ?? Ft(16),
|
|
4454
4461
|
path: d?.path ?? "",
|
|
4455
4462
|
name: d?.name ?? "",
|
|
@@ -4489,17 +4496,17 @@ function rn({
|
|
|
4489
4496
|
pathSuggestions: s,
|
|
4490
4497
|
getUser: f,
|
|
4491
4498
|
parentCollection: g,
|
|
4492
|
-
getData:
|
|
4499
|
+
getData: x,
|
|
4493
4500
|
existingPaths: y,
|
|
4494
|
-
existingIds:
|
|
4501
|
+
existingIds: P,
|
|
4495
4502
|
includeTemplates: v,
|
|
4496
4503
|
collection: b,
|
|
4497
|
-
setCollection:
|
|
4498
|
-
initialValues:
|
|
4504
|
+
setCollection: T,
|
|
4505
|
+
initialValues: w,
|
|
4499
4506
|
propertyConfigs: C,
|
|
4500
4507
|
groups: O
|
|
4501
4508
|
}) {
|
|
4502
|
-
const N =
|
|
4509
|
+
const N = fi(), F = Te(), D = Ie(), _ = je({}), S = t ? v ? "welcome" : "details" : "properties", [h, B] = j(S), [oe, q] = Ue.useState(), Z = (k) => {
|
|
4503
4510
|
const E = k.id || k.path;
|
|
4504
4511
|
return r.saveCollection({
|
|
4505
4512
|
id: E,
|
|
@@ -4518,15 +4525,15 @@ function rn({
|
|
|
4518
4525
|
}, [o, i]), se = J(async (k) => {
|
|
4519
4526
|
try {
|
|
4520
4527
|
if (!Q)
|
|
4521
|
-
return
|
|
4528
|
+
return T(k), Promise.resolve(k);
|
|
4522
4529
|
B("loading");
|
|
4523
4530
|
const E = await Q?.(k);
|
|
4524
4531
|
if (!E)
|
|
4525
|
-
return
|
|
4532
|
+
return T(k), Promise.resolve(k);
|
|
4526
4533
|
const M = {
|
|
4527
4534
|
...k ?? {}
|
|
4528
4535
|
};
|
|
4529
|
-
return Object.keys(E.properties ?? {}).length > 0 && (M.properties = E.properties, M.propertiesOrder = E.propertiesOrder), M.propertiesOrder ? (
|
|
4536
|
+
return Object.keys(E.properties ?? {}).length > 0 && (M.properties = E.properties, M.propertiesOrder = E.propertiesOrder), M.propertiesOrder ? (T(M), console.debug("Inferred collection", {
|
|
4530
4537
|
newCollection: k ?? {},
|
|
4531
4538
|
values: M
|
|
4532
4539
|
}), M) : (M.propertiesOrder = Object.keys(M.properties), M);
|
|
@@ -4537,13 +4544,13 @@ function rn({
|
|
|
4537
4544
|
}), k;
|
|
4538
4545
|
}
|
|
4539
4546
|
}, [i, Q]), de = Ot({
|
|
4540
|
-
initialValues:
|
|
4547
|
+
initialValues: w,
|
|
4541
4548
|
onSubmit: (k, E) => {
|
|
4542
4549
|
console.log("Submitting collection", k);
|
|
4543
4550
|
try {
|
|
4544
4551
|
if (!t) {
|
|
4545
4552
|
Z(k).then(() => {
|
|
4546
|
-
E.resetForm({ values:
|
|
4553
|
+
E.resetForm({ values: w }), d(k);
|
|
4547
4554
|
});
|
|
4548
4555
|
return;
|
|
4549
4556
|
}
|
|
@@ -4558,7 +4565,7 @@ function rn({
|
|
|
4558
4565
|
}).finally(() => {
|
|
4559
4566
|
H();
|
|
4560
4567
|
}) : (E.resetForm({ values: k }), H()) : h === "extra_view" ? (H(), E.resetForm({ values: k })) : h === "import_data_mapping" || h === "import_data_preview" ? H() : h === "properties" ? Z(k).then(() => {
|
|
4561
|
-
E.resetForm({ values:
|
|
4568
|
+
E.resetForm({ values: w }), H(), d(k);
|
|
4562
4569
|
}) : (H(), E.resetForm({ values: k }));
|
|
4563
4570
|
} catch (M) {
|
|
4564
4571
|
D.open({
|
|
@@ -4569,7 +4576,7 @@ function rn({
|
|
|
4569
4576
|
},
|
|
4570
4577
|
validation: (k) => {
|
|
4571
4578
|
let E = {};
|
|
4572
|
-
const M = (h === "properties" || h === "subcollections" || h === "details") &&
|
|
4579
|
+
const M = (h === "properties" || h === "subcollections" || h === "details") && yi;
|
|
4573
4580
|
if (M)
|
|
4574
4581
|
try {
|
|
4575
4582
|
M.validateSync(k, { abortEarly: !1 });
|
|
@@ -4581,7 +4588,7 @@ function rn({
|
|
|
4581
4588
|
if (h === "properties" && (E = { ...E, ..._.current }), h === "details") {
|
|
4582
4589
|
const L = Gt(k.path, t, y, k.id);
|
|
4583
4590
|
L && (E.path = L);
|
|
4584
|
-
const ye = an(k.id, t, y,
|
|
4591
|
+
const ye = an(k.id, t, y, P);
|
|
4585
4592
|
ye && (E.id = ye);
|
|
4586
4593
|
}
|
|
4587
4594
|
return E;
|
|
@@ -4592,13 +4599,13 @@ function rn({
|
|
|
4592
4599
|
isSubmitting: ke,
|
|
4593
4600
|
dirty: Ke,
|
|
4594
4601
|
submitCount: vt
|
|
4595
|
-
} = de, pe = re.path, We = l?.includes("/") ? l?.split("/").slice(0, -1).join("/") + "/" + pe : pe, Ze = Gt(pe, t, y, re.id), Je = !Ze && i ? F.convertIdsToPaths(i) : void 0, Qe = Ze ? void 0 : F.resolveAliasesFrom(We), ze = Qe &&
|
|
4602
|
+
} = de, pe = re.path, We = l?.includes("/") ? l?.split("/").slice(0, -1).join("/") + "/" + pe : pe, Ze = Gt(pe, t, y, re.id), Je = !Ze && i ? F.convertIdsToPaths(i) : void 0, Qe = Ze ? void 0 : F.resolveAliasesFrom(We), ze = Qe && x ? () => x(Qe, Je ?? []) : void 0;
|
|
4596
4603
|
ue(() => {
|
|
4597
4604
|
p(Ke);
|
|
4598
4605
|
}, [Ke]);
|
|
4599
4606
|
function Xe(k, E) {
|
|
4600
|
-
N.setInUse(!0),
|
|
4601
|
-
const L =
|
|
4607
|
+
N.setInUse(!0), ni(k, ir).then((M) => {
|
|
4608
|
+
const L = pr(M);
|
|
4602
4609
|
N.setIdColumn(L.idColumn), N.setImportData(k), N.setHeadersMapping(L.headersMapping);
|
|
4603
4610
|
const ye = (E ?? []).filter((tt) => L.headersMapping[tt]) ?? Object.keys(L.properties);
|
|
4604
4611
|
N.setHeadingsOrder(ye), N.setOriginProperties(L.properties);
|
|
@@ -4612,7 +4619,7 @@ function rn({
|
|
|
4612
4619
|
}, U = b?.editable === void 0 || b?.editable === !0 || t;
|
|
4613
4620
|
return /* @__PURE__ */ e(De, { fullHeight: !0, children: /* @__PURE__ */ e(Vt, { value: de, children: /* @__PURE__ */ a(R, { children: [
|
|
4614
4621
|
!t && /* @__PURE__ */ a(
|
|
4615
|
-
|
|
4622
|
+
Wr,
|
|
4616
4623
|
{
|
|
4617
4624
|
value: h,
|
|
4618
4625
|
className: fe(kt, "justify-end bg-gray-50 dark:bg-gray-950 border-b"),
|
|
@@ -4665,7 +4672,7 @@ function rn({
|
|
|
4665
4672
|
}
|
|
4666
4673
|
),
|
|
4667
4674
|
h === "import_data_saving" && N && /* @__PURE__ */ e(
|
|
4668
|
-
|
|
4675
|
+
gi,
|
|
4669
4676
|
{
|
|
4670
4677
|
importConfig: N,
|
|
4671
4678
|
collection: re,
|
|
@@ -4679,10 +4686,10 @@ function rn({
|
|
|
4679
4686
|
}
|
|
4680
4687
|
),
|
|
4681
4688
|
h === "details" && /* @__PURE__ */ e(
|
|
4682
|
-
|
|
4689
|
+
bi,
|
|
4683
4690
|
{
|
|
4684
4691
|
existingPaths: y,
|
|
4685
|
-
existingIds:
|
|
4692
|
+
existingIds: P,
|
|
4686
4693
|
groups: O,
|
|
4687
4694
|
parentCollectionIds: i,
|
|
4688
4695
|
parentCollection: g,
|
|
@@ -4709,7 +4716,7 @@ function rn({
|
|
|
4709
4716
|
onPropertyError: (k, E, M) => {
|
|
4710
4717
|
const L = Et({
|
|
4711
4718
|
..._.current,
|
|
4712
|
-
[
|
|
4719
|
+
[ar(k, E)]: Et(M, !0)
|
|
4713
4720
|
}, !0);
|
|
4714
4721
|
_.current = L, de.validate();
|
|
4715
4722
|
},
|
|
@@ -4822,7 +4829,7 @@ function rn({
|
|
|
4822
4829
|
type: "submit",
|
|
4823
4830
|
loading: ke,
|
|
4824
4831
|
disabled: ke || h === "details" && !yt,
|
|
4825
|
-
startIcon: h === "properties" ? /* @__PURE__ */ e(
|
|
4832
|
+
startIcon: h === "properties" ? /* @__PURE__ */ e(Zr, {}) : void 0,
|
|
4826
4833
|
children: [
|
|
4827
4834
|
h === "details" && "Next",
|
|
4828
4835
|
h === "properties" && "Create collection"
|
|
@@ -4853,13 +4860,13 @@ function nn(t, r) {
|
|
|
4853
4860
|
...i
|
|
4854
4861
|
} = t, l = {};
|
|
4855
4862
|
return n && Object.keys(n).forEach((o) => {
|
|
4856
|
-
l[o] =
|
|
4863
|
+
l[o] = hr(n[o], r);
|
|
4857
4864
|
}), {
|
|
4858
4865
|
...i,
|
|
4859
4866
|
properties: l
|
|
4860
4867
|
};
|
|
4861
4868
|
}
|
|
4862
|
-
function
|
|
4869
|
+
function hr(t, r) {
|
|
4863
4870
|
let n = t;
|
|
4864
4871
|
if (r && typeof n == "object" && n.propertyConfig) {
|
|
4865
4872
|
const i = r[n.propertyConfig];
|
|
@@ -4868,7 +4875,7 @@ function mr(t, r) {
|
|
|
4868
4875
|
else if (i && (n = K(i.property, n)), !ie(n) && n.dataType === "map" && n.properties) {
|
|
4869
4876
|
const l = {};
|
|
4870
4877
|
Object.keys(n.properties).forEach((o) => {
|
|
4871
|
-
l[o] =
|
|
4878
|
+
l[o] = hr(n.properties[o], r);
|
|
4872
4879
|
}), n = {
|
|
4873
4880
|
...n,
|
|
4874
4881
|
properties: l
|
|
@@ -4879,13 +4886,13 @@ function mr(t, r) {
|
|
|
4879
4886
|
}
|
|
4880
4887
|
const Gt = (t, r, n, i) => {
|
|
4881
4888
|
let l;
|
|
4882
|
-
return t || (l = "You must specify a path in the database for this collection"), r && n?.includes(t.trim().toLowerCase()) && !i && (l = "There is already a collection with the specified path. If you want to have multiple collections referring to the same database path, make sure the have different ids"),
|
|
4889
|
+
return t || (l = "You must specify a path in the database for this collection"), r && n?.includes(t.trim().toLowerCase()) && !i && (l = "There is already a collection with the specified path. If you want to have multiple collections referring to the same database path, make sure the have different ids"), Ir(t).split("/").length % 2 === 0 && (l = `Collection paths must have an odd number of segments: ${t}`), l;
|
|
4883
4890
|
}, an = (t, r, n, i) => {
|
|
4884
4891
|
if (!t)
|
|
4885
4892
|
return;
|
|
4886
4893
|
let l;
|
|
4887
4894
|
return r && n?.includes(t.trim().toLowerCase()) && (l = "There is already a collection that uses this value as a path"), r && i?.includes(t.trim().toLowerCase()) && (l = "There is already a collection which uses this id"), l;
|
|
4888
|
-
},
|
|
4895
|
+
}, fr = Y.createContext({}), gr = Y.createContext({}), on = Y.memo(
|
|
4889
4896
|
function({
|
|
4890
4897
|
children: r,
|
|
4891
4898
|
collectionConfigController: n,
|
|
@@ -4898,11 +4905,11 @@ const Gt = (t, r, n, i) => {
|
|
|
4898
4905
|
getData: m,
|
|
4899
4906
|
onAnalyticsEvent: p
|
|
4900
4907
|
}) {
|
|
4901
|
-
const s = Te(), f =
|
|
4908
|
+
const s = Te(), f = vi(), g = Ie(), { propertyConfigs: x } = Ae(), [y, P] = Y.useState(), [v, b] = Y.useState(), T = J(() => ({
|
|
4902
4909
|
createCollections: !0,
|
|
4903
4910
|
editCollections: !0,
|
|
4904
4911
|
deleteCollections: !0
|
|
4905
|
-
}), []),
|
|
4912
|
+
}), []), w = J(({
|
|
4906
4913
|
id: N,
|
|
4907
4914
|
fullPath: F,
|
|
4908
4915
|
parentCollectionIds: D,
|
|
@@ -4911,7 +4918,7 @@ const Gt = (t, r, n, i) => {
|
|
|
4911
4918
|
console.debug("Edit collection", N, F, D, _), p?.("edit_collection", {
|
|
4912
4919
|
id: N,
|
|
4913
4920
|
fullPath: F
|
|
4914
|
-
}),
|
|
4921
|
+
}), P({
|
|
4915
4922
|
editedCollectionId: N,
|
|
4916
4923
|
fullPath: F,
|
|
4917
4924
|
parentCollectionIds: D,
|
|
@@ -4960,7 +4967,7 @@ const Gt = (t, r, n, i) => {
|
|
|
4960
4967
|
initialValues: D,
|
|
4961
4968
|
redirect: _,
|
|
4962
4969
|
sourceClick: S
|
|
4963
|
-
}),
|
|
4970
|
+
}), P({
|
|
4964
4971
|
isNewCollection: !0,
|
|
4965
4972
|
parentCollectionIds: N,
|
|
4966
4973
|
parentCollection: F,
|
|
@@ -4968,20 +4975,20 @@ const Gt = (t, r, n, i) => {
|
|
|
4968
4975
|
redirect: _
|
|
4969
4976
|
});
|
|
4970
4977
|
}, []);
|
|
4971
|
-
return /* @__PURE__ */ e(
|
|
4972
|
-
|
|
4978
|
+
return /* @__PURE__ */ e(fr.Provider, { value: n, children: /* @__PURE__ */ a(
|
|
4979
|
+
gr.Provider,
|
|
4973
4980
|
{
|
|
4974
4981
|
value: {
|
|
4975
|
-
editCollection:
|
|
4982
|
+
editCollection: w,
|
|
4976
4983
|
createCollection: O,
|
|
4977
4984
|
editProperty: C,
|
|
4978
|
-
configPermissions: i ??
|
|
4985
|
+
configPermissions: i ?? T,
|
|
4979
4986
|
getPathSuggestions: c
|
|
4980
4987
|
},
|
|
4981
4988
|
children: [
|
|
4982
4989
|
r,
|
|
4983
4990
|
/* @__PURE__ */ e(
|
|
4984
|
-
|
|
4991
|
+
mr,
|
|
4985
4992
|
{
|
|
4986
4993
|
open: !!y,
|
|
4987
4994
|
configController: n,
|
|
@@ -4998,7 +5005,7 @@ const Gt = (t, r, n, i) => {
|
|
|
4998
5005
|
const F = s.buildUrlCollectionPath(N.id ?? N.path);
|
|
4999
5006
|
f(F);
|
|
5000
5007
|
}
|
|
5001
|
-
|
|
5008
|
+
P(void 0);
|
|
5002
5009
|
}
|
|
5003
5010
|
}
|
|
5004
5011
|
),
|
|
@@ -5066,7 +5073,7 @@ const Gt = (t, r, n, i) => {
|
|
|
5066
5073
|
forceShowErrors: !1,
|
|
5067
5074
|
existingPropertyKeys: [],
|
|
5068
5075
|
allowDataInference: !0,
|
|
5069
|
-
propertyConfigs:
|
|
5076
|
+
propertyConfigs: x,
|
|
5070
5077
|
property: v?.property,
|
|
5071
5078
|
propertyKey: v?.propertyKey
|
|
5072
5079
|
}
|
|
@@ -5076,14 +5083,14 @@ const Gt = (t, r, n, i) => {
|
|
|
5076
5083
|
) });
|
|
5077
5084
|
},
|
|
5078
5085
|
be
|
|
5079
|
-
),
|
|
5086
|
+
), xe = () => Qt(gr);
|
|
5080
5087
|
function ln({
|
|
5081
5088
|
path: t,
|
|
5082
5089
|
parentCollectionIds: r,
|
|
5083
5090
|
collection: n,
|
|
5084
5091
|
tableController: i
|
|
5085
5092
|
}) {
|
|
5086
|
-
const l = _e(), o = Te(), d =
|
|
5093
|
+
const l = _e(), o = Te(), d = xe(), c = o.getCollectionFromIds(r), u = d.configPermissions ? d.configPermissions({
|
|
5087
5094
|
user: l.user,
|
|
5088
5095
|
collection: n
|
|
5089
5096
|
}).editCollections : !0;
|
|
@@ -5103,12 +5110,12 @@ function ln({
|
|
|
5103
5110
|
}
|
|
5104
5111
|
) });
|
|
5105
5112
|
}
|
|
5106
|
-
const
|
|
5113
|
+
const vr = () => Qt(fr);
|
|
5107
5114
|
function sn({
|
|
5108
5115
|
path: t,
|
|
5109
5116
|
collection: r
|
|
5110
5117
|
}) {
|
|
5111
|
-
const n = Ie(), i = _e(), l =
|
|
5118
|
+
const n = Ie(), i = _e(), l = vr(), o = xe(), d = o.configPermissions({
|
|
5112
5119
|
user: i.user,
|
|
5113
5120
|
collection: r
|
|
5114
5121
|
}), c = J(() => {
|
|
@@ -5124,10 +5131,10 @@ function sn({
|
|
|
5124
5131
|
return /* @__PURE__ */ a(R, { children: [
|
|
5125
5132
|
/* @__PURE__ */ a("div", { children: [
|
|
5126
5133
|
d.deleteCollections && /* @__PURE__ */ e(
|
|
5127
|
-
|
|
5134
|
+
Jr,
|
|
5128
5135
|
{
|
|
5129
|
-
trigger: /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(
|
|
5130
|
-
children: /* @__PURE__ */ a(
|
|
5136
|
+
trigger: /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(Qr, { size: "small" }) }),
|
|
5137
|
+
children: /* @__PURE__ */ a(Xr, { onClick: (s) => {
|
|
5131
5138
|
s.preventDefault(), s.stopPropagation(), m(!0);
|
|
5132
5139
|
}, children: [
|
|
5133
5140
|
/* @__PURE__ */ e(mt, {}),
|
|
@@ -5169,7 +5176,7 @@ function dn({
|
|
|
5169
5176
|
parentCollectionIds: l,
|
|
5170
5177
|
collection: o
|
|
5171
5178
|
}) {
|
|
5172
|
-
const d =
|
|
5179
|
+
const d = xe();
|
|
5173
5180
|
return /* @__PURE__ */ e(te, { title: "Edit", children: /* @__PURE__ */ e(
|
|
5174
5181
|
ae,
|
|
5175
5182
|
{
|
|
@@ -5193,7 +5200,7 @@ function cn({
|
|
|
5193
5200
|
parentCollectionIds: r,
|
|
5194
5201
|
collection: n
|
|
5195
5202
|
}) {
|
|
5196
|
-
const i = _e(), l =
|
|
5203
|
+
const i = _e(), l = xe(), o = l.configPermissions ? l.configPermissions({
|
|
5197
5204
|
user: i.user,
|
|
5198
5205
|
collection: n
|
|
5199
5206
|
}).editCollections : !0;
|
|
@@ -5205,7 +5212,7 @@ function cn({
|
|
|
5205
5212
|
l.editProperty({
|
|
5206
5213
|
editedCollectionId: n.id,
|
|
5207
5214
|
parentCollectionIds: r,
|
|
5208
|
-
currentPropertiesOrder:
|
|
5215
|
+
currentPropertiesOrder: _r(n),
|
|
5209
5216
|
collection: n
|
|
5210
5217
|
});
|
|
5211
5218
|
},
|
|
@@ -5214,7 +5221,7 @@ function cn({
|
|
|
5214
5221
|
) });
|
|
5215
5222
|
}
|
|
5216
5223
|
function un() {
|
|
5217
|
-
const t =
|
|
5224
|
+
const t = xe();
|
|
5218
5225
|
return /* @__PURE__ */ e("div", { className: "bg-gray-50 dark:bg-gray-900 min-w-fit rounded", children: /* @__PURE__ */ a(
|
|
5219
5226
|
z,
|
|
5220
5227
|
{
|
|
@@ -5238,7 +5245,7 @@ function pn({
|
|
|
5238
5245
|
collection: n,
|
|
5239
5246
|
tableController: i
|
|
5240
5247
|
}) {
|
|
5241
|
-
const l = _e(), o =
|
|
5248
|
+
const l = _e(), o = xe(), d = vr(), c = Ie(), u = o.configPermissions ? o.configPermissions({
|
|
5242
5249
|
user: l.user,
|
|
5243
5250
|
collection: n
|
|
5244
5251
|
}).editCollections : !0;
|
|
@@ -5270,7 +5277,7 @@ function pn({
|
|
|
5270
5277
|
message: "Default config saved"
|
|
5271
5278
|
});
|
|
5272
5279
|
}),
|
|
5273
|
-
children: /* @__PURE__ */ e(
|
|
5280
|
+
children: /* @__PURE__ */ e(ei, {})
|
|
5274
5281
|
}
|
|
5275
5282
|
)
|
|
5276
5283
|
}
|
|
@@ -5288,7 +5295,7 @@ function pn({
|
|
|
5288
5295
|
onClick: () => {
|
|
5289
5296
|
i.clearFilter?.(), n?.initialFilter && i.setFilterValues?.(n?.initialFilter), n?.initialSort && i.setSortBy?.(n?.initialSort);
|
|
5290
5297
|
},
|
|
5291
|
-
children: /* @__PURE__ */ e(
|
|
5298
|
+
children: /* @__PURE__ */ e(ti, {})
|
|
5292
5299
|
}
|
|
5293
5300
|
)
|
|
5294
5301
|
}
|
|
@@ -5304,7 +5311,7 @@ function mn({
|
|
|
5304
5311
|
}) {
|
|
5305
5312
|
if (!r.navigation.topLevelNavigation)
|
|
5306
5313
|
throw Error("Navigation not ready in FireCMSHomePage");
|
|
5307
|
-
const n = _e(), i =
|
|
5314
|
+
const n = _e(), i = xe(), l = i.configPermissions ? i.configPermissions({
|
|
5308
5315
|
user: n.user
|
|
5309
5316
|
}).createCollections : !0;
|
|
5310
5317
|
return /* @__PURE__ */ e(
|
|
@@ -5386,7 +5393,7 @@ function hn({}) {
|
|
|
5386
5393
|
const t = Te();
|
|
5387
5394
|
if (!t.topLevelNavigation)
|
|
5388
5395
|
throw Error("Navigation not ready in FireCMSHomePage");
|
|
5389
|
-
const r = _e(), n =
|
|
5396
|
+
const r = _e(), n = xe(), i = n.configPermissions ? n.configPermissions({
|
|
5390
5397
|
user: r.user
|
|
5391
5398
|
}).createCollections : !0;
|
|
5392
5399
|
return !t.initialised || t.collections === void 0 || (t.collections ?? []).length > 0 ? null : /* @__PURE__ */ a(
|
|
@@ -5420,11 +5427,11 @@ const In = (t, r, n) => {
|
|
|
5420
5427
|
He(d.properties), d.subcollections?.forEach(i);
|
|
5421
5428
|
}, l = r ?? [];
|
|
5422
5429
|
l.forEach(i), console.debug("Collections specified in code:", t), console.debug("Collections stored in the backend", l);
|
|
5423
|
-
const o =
|
|
5430
|
+
const o = Fr(t, l, [], n);
|
|
5424
5431
|
return console.debug("Collections after joining:", o), o;
|
|
5425
5432
|
};
|
|
5426
5433
|
function _n({ path: t }) {
|
|
5427
|
-
const r = Te(), n = fn(t), i = r.getParentCollectionIds(t), l =
|
|
5434
|
+
const r = Te(), n = fn(t), i = r.getParentCollectionIds(t), l = xe();
|
|
5428
5435
|
return /* @__PURE__ */ a("div", { className: "p-1 flex flex-col items-center", children: [
|
|
5429
5436
|
/* @__PURE__ */ e(Zt, { error: "No collection for path: " + n }),
|
|
5430
5437
|
/* @__PURE__ */ e(
|
|
@@ -5454,14 +5461,14 @@ export {
|
|
|
5454
5461
|
_n as MissingReferenceWidget,
|
|
5455
5462
|
qe as editableProperty,
|
|
5456
5463
|
ne as getFullId,
|
|
5457
|
-
|
|
5464
|
+
ar as getFullIdPath,
|
|
5458
5465
|
he as idToPropertiesPath,
|
|
5459
5466
|
In as mergeCollections,
|
|
5460
5467
|
Ce as namespaceToPropertiesOrderPath,
|
|
5461
|
-
|
|
5468
|
+
nr as namespaceToPropertiesPath,
|
|
5462
5469
|
wi as removeNonEditableProperties,
|
|
5463
|
-
|
|
5470
|
+
xe as useCollectionEditorController,
|
|
5464
5471
|
Vn as useCollectionEditorPlugin,
|
|
5465
|
-
|
|
5472
|
+
vr as useCollectionsConfigController
|
|
5466
5473
|
};
|
|
5467
5474
|
//# sourceMappingURL=index.es.js.map
|