@firecms/collection_editor 3.0.0-canary.46 → 3.0.0-canary.47
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 +228 -217
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +14 -14
- package/src/ui/collection_editor/CollectionDetailsForm.tsx +10 -1
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 J, SearchIconsView as vr, toSnakeCase as Nt, singular as yr, IconForView as st, ArrayContainer as br, serializeRegExp as Cr, useSnackbarController as Ve, resolveEnumValues as Nr, isPropertyBuilder as re, useCustomizationController as Se, getFieldConfig as je, ErrorBoundary as pe, PropertyConfigBadge as qe, unslugify as xt, useNavigationController as Te, mergeDeep as
|
|
2
|
+
import { FieldCaption as J, SearchIconsView as vr, toSnakeCase as Nt, singular as yr, IconForView as st, ArrayContainer as br, serializeRegExp as Cr, useSnackbarController as Ve, resolveEnumValues as Nr, isPropertyBuilder as re, useCustomizationController as Se, getFieldConfig as je, ErrorBoundary as pe, PropertyConfigBadge as qe, unslugify as xt, useNavigationController as Te, mergeDeep as W, DEFAULT_FIELD_CONFIGS as Wt, isValidRegExp as Pr, getFieldId as Gt, DeleteConfirmationDialog as dt, useLargeLayout as xr, makePropertiesEditable as Le, resolveEntityView as wr, useSelectionController as Tr, CircularProgressCenter as ct, EntityCollectionTable as kr, slugify as Or, useAuthController as Ie, randomString as _t, removeUndefined as Ft, ErrorView as Kt, removeInitialAndTrailingSlashes as Vr, getDefaultPropertiesOrder as Ir, joinCollectionLists as _r } from "@firecms/core";
|
|
3
3
|
import * as ze from "react";
|
|
4
|
-
import
|
|
4
|
+
import G, { useState as j, useEffect as ce, useMemo as Zt, useRef as Re, useDeferredValue as Fr, useCallback as Er, useContext as Jt } from "react";
|
|
5
5
|
import ve from "react-fast-compare";
|
|
6
|
-
import { useAutoComplete as Sr, Container as mt, Typography as V, Tooltip as ee, IconButton as
|
|
6
|
+
import { useAutoComplete as Sr, Container as mt, Typography as V, Tooltip as ee, IconButton as ie, Chip as Pt, TextField as we, cn as he, DebouncedTextField as K, Autocomplete as Ar, AutocompleteItem as Dr, ExpandablePanel as wt, SettingsIcon as $e, ClearIcon as Br, Select as be, SelectItem as X, BooleanSwitchWithLabel as ut, Dialog as _e, AutoAwesomeIcon as ht, Badge as Mr, ListIcon as zr, Button as z, CircularProgress as He, Paper as fe, DialogContent as Ae, DialogActions as De, RuleIcon as Rr, FileUploadIcon as Ur, MultiSelect as jr, MultiSelectItem as Et, Checkbox as St, cardMixin as Qt, cardClickableMixin as Xt, cardSelectedMixin as er, FunctionsIcon as qr, RemoveCircleIcon as Lr, defaultBorderMixin as Tt, RemoveIcon as $r, DragHandleIcon as Hr, AddIcon as de, SelectGroup as At, InfoLabel as Yr, DeleteIcon as pt, ContentCopyIcon as Wr, CodeIcon as Gr, Table as Dt, TableBody as Bt, TableRow as bt, TableCell as Me, Alert as Kr, Icon as rt, Card as tr, coolIconKeys as Mt, Tabs as Zr, Tab as Ct, ArrowBackIcon as it, LoadingButton as zt, DoneIcon as Jr, Menu as Qr, MoreVertIcon as Xr, MenuItem as ei, SaveIcon as ti, UndoIcon as ri } from "@firecms/ui";
|
|
7
7
|
import * as nt from "yup";
|
|
8
8
|
import { useFormex as Y, Field as $, getIn as I, useCreateFormex as kt, Formex as Ot } 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 ii, buildPropertyFromData as ni, buildEntityPropertiesFromData as ai } from "@firecms/schema_inference";
|
|
10
|
+
import { DragDropContext as oi, Droppable as li, Draggable as si } from "@hello-pangea/dnd";
|
|
11
|
+
import di from "json5";
|
|
12
|
+
import { Highlight as ci, themes as ui } from "prism-react-renderer";
|
|
13
|
+
import { ImportFileUpload as pi, DataNewPropertiesMapping as mi, ImportNewPropertyFieldPreview as hi, getInferenceType as rr, convertDataToEntity as fi, useImportConfig as gi, ImportSaveInProgress as vi } from "@firecms/data_import_export";
|
|
14
|
+
import { useNavigate as yi } from "react-router";
|
|
15
|
+
const bi = nt.object().shape({
|
|
16
16
|
id: nt.string().required("Required"),
|
|
17
17
|
name: nt.string().required("Required"),
|
|
18
18
|
path: nt.string().required("Required")
|
|
19
19
|
});
|
|
20
|
-
function
|
|
20
|
+
function Ci({
|
|
21
21
|
isNewCollection: t,
|
|
22
22
|
reservedGroups: r,
|
|
23
23
|
existingPaths: n,
|
|
@@ -25,7 +25,7 @@ function bi({
|
|
|
25
25
|
groups: l,
|
|
26
26
|
parentCollection: o
|
|
27
27
|
}) {
|
|
28
|
-
const d =
|
|
28
|
+
const d = G.useRef(null), {
|
|
29
29
|
values: c,
|
|
30
30
|
setFieldValue: u,
|
|
31
31
|
handleChange: m,
|
|
@@ -59,7 +59,7 @@ function bi({
|
|
|
59
59
|
children: [
|
|
60
60
|
/* @__PURE__ */ e(V, { variant: t ? "h4" : "h5", className: "flex-grow", children: t ? "New collection" : `${c?.name} collection` }),
|
|
61
61
|
/* @__PURE__ */ e(ee, { title: "Change icon", children: /* @__PURE__ */ e(
|
|
62
|
-
|
|
62
|
+
ie,
|
|
63
63
|
{
|
|
64
64
|
shape: "square",
|
|
65
65
|
onClick: () => P(!0),
|
|
@@ -191,8 +191,19 @@ function bi({
|
|
|
191
191
|
onChange: (h) => {
|
|
192
192
|
f("sideDialogWidth", !0);
|
|
193
193
|
const D = h.target.value;
|
|
194
|
-
D ? isNaN(Number(D)) || u("sideDialogWidth", Number(D)) : u("sideDialogWidth",
|
|
194
|
+
D ? isNaN(Number(D)) || u("sideDialogWidth", Number(D)) : u("sideDialogWidth", null);
|
|
195
195
|
},
|
|
196
|
+
endAdornment: /* @__PURE__ */ e(
|
|
197
|
+
ie,
|
|
198
|
+
{
|
|
199
|
+
size: "small",
|
|
200
|
+
onClick: () => {
|
|
201
|
+
u("sideDialogWidth", null);
|
|
202
|
+
},
|
|
203
|
+
disabled: !c.sideDialogWidth,
|
|
204
|
+
children: /* @__PURE__ */ e(Br, { size: "small" })
|
|
205
|
+
}
|
|
206
|
+
),
|
|
196
207
|
value: c.sideDialogWidth ?? "",
|
|
197
208
|
label: "Side dialog width"
|
|
198
209
|
}
|
|
@@ -313,14 +324,14 @@ function ir(t) {
|
|
|
313
324
|
function ye(t) {
|
|
314
325
|
return t ? "properties." + t.replaceAll(".", ".properties.") + ".propertiesOrder" : "propertiesOrder";
|
|
315
326
|
}
|
|
316
|
-
function
|
|
327
|
+
function ne(t, r) {
|
|
317
328
|
return r ? `${r}.${t}` : t;
|
|
318
329
|
}
|
|
319
330
|
function nr(t, r) {
|
|
320
331
|
const n = r ? `${r}.${t}` : t;
|
|
321
332
|
return me(n);
|
|
322
333
|
}
|
|
323
|
-
function
|
|
334
|
+
function Ni({
|
|
324
335
|
enumValues: t,
|
|
325
336
|
onValuesChanged: r,
|
|
326
337
|
onError: n,
|
|
@@ -344,7 +355,7 @@ function Ci({
|
|
|
344
355
|
return ce(() => {
|
|
345
356
|
r && r(u.enumValues);
|
|
346
357
|
}, [u.enumValues]), /* @__PURE__ */ e(Ot, { value: c, children: /* @__PURE__ */ e(
|
|
347
|
-
|
|
358
|
+
Pi,
|
|
348
359
|
{
|
|
349
360
|
enumValuesPath: "enumValues",
|
|
350
361
|
values: u,
|
|
@@ -356,7 +367,7 @@ function Ci({
|
|
|
356
367
|
}
|
|
357
368
|
) });
|
|
358
369
|
}
|
|
359
|
-
function
|
|
370
|
+
function Pi({
|
|
360
371
|
values: t,
|
|
361
372
|
errors: r,
|
|
362
373
|
disabled: n,
|
|
@@ -367,10 +378,10 @@ function Ni({
|
|
|
367
378
|
}) {
|
|
368
379
|
const {
|
|
369
380
|
setFieldValue: c
|
|
370
|
-
} = Y(), [u, m] =
|
|
381
|
+
} = Y(), [u, m] = G.useState(), [p, s] = G.useState(), [f, g] = G.useState(!1), y = G.useRef(/* @__PURE__ */ new Set()).current, P = (b, T) => {
|
|
371
382
|
const w = u === T, C = r?.enumValues && r?.enumValues[b];
|
|
372
383
|
return /* @__PURE__ */ e(
|
|
373
|
-
|
|
384
|
+
xi,
|
|
374
385
|
{
|
|
375
386
|
index: b,
|
|
376
387
|
disabled: n,
|
|
@@ -386,7 +397,7 @@ function Ni({
|
|
|
386
397
|
};
|
|
387
398
|
return /* @__PURE__ */ a("div", { className: "col-span-12", children: [
|
|
388
399
|
/* @__PURE__ */ a("div", { className: "ml-3.5 flex flex-row items-center", children: [
|
|
389
|
-
/* @__PURE__ */ e(
|
|
400
|
+
/* @__PURE__ */ e(zr, {}),
|
|
390
401
|
/* @__PURE__ */ e(
|
|
391
402
|
V,
|
|
392
403
|
{
|
|
@@ -406,7 +417,7 @@ function Ni({
|
|
|
406
417
|
d && (g(!0), d?.().then((b) => {
|
|
407
418
|
if (!b)
|
|
408
419
|
return;
|
|
409
|
-
const T = b.flat(), w = Array.from(new Set(T)), C = t.enumValues, N =
|
|
420
|
+
const T = b.flat(), w = Array.from(new Set(T)), C = t.enumValues, N = ii(w).filter((F) => !C?.some((B) => B.id === F.id));
|
|
410
421
|
N.forEach((F) => {
|
|
411
422
|
y.add(F.id);
|
|
412
423
|
}), c(i, [...N, ...C], !0);
|
|
@@ -438,7 +449,7 @@ function Ni({
|
|
|
438
449
|
}
|
|
439
450
|
),
|
|
440
451
|
/* @__PURE__ */ e(
|
|
441
|
-
|
|
452
|
+
wi,
|
|
442
453
|
{
|
|
443
454
|
index: p,
|
|
444
455
|
open: p !== void 0,
|
|
@@ -449,7 +460,7 @@ function Ni({
|
|
|
449
460
|
] })
|
|
450
461
|
] });
|
|
451
462
|
}
|
|
452
|
-
const
|
|
463
|
+
const xi = G.memo(
|
|
453
464
|
function({
|
|
454
465
|
index: r,
|
|
455
466
|
shouldUpdateId: n,
|
|
@@ -466,8 +477,8 @@ const Pi = W.memo(
|
|
|
466
477
|
errors: s,
|
|
467
478
|
setFieldValue: f,
|
|
468
479
|
touched: g
|
|
469
|
-
} = Y(), x =
|
|
470
|
-
return
|
|
480
|
+
} = Y(), x = G.useRef(!I(m, `${i}[${r}].id`)), y = n || x.current, P = I(m, `${i}[${r}].id`), v = I(m, `${i}[${r}].label`), b = G.useRef(v);
|
|
481
|
+
return G.useEffect(() => {
|
|
471
482
|
(b.current === P || !P) && y && f(`${i}[${r}].id`, v), b.current = v;
|
|
472
483
|
}, [v]), /* @__PURE__ */ a(R, { children: [
|
|
473
484
|
/* @__PURE__ */ a("div", { className: "flex w-full align-center justify-center", children: [
|
|
@@ -486,8 +497,8 @@ const Pi = W.memo(
|
|
|
486
497
|
error: !!u?.label
|
|
487
498
|
}
|
|
488
499
|
),
|
|
489
|
-
!d && /* @__PURE__ */ e(
|
|
490
|
-
|
|
500
|
+
!d && /* @__PURE__ */ e(Mr, { color: "error", invisible: !u?.id, children: /* @__PURE__ */ e(
|
|
501
|
+
ie,
|
|
491
502
|
{
|
|
492
503
|
size: "small",
|
|
493
504
|
"aria-label": "edit",
|
|
@@ -519,7 +530,7 @@ const Pi = W.memo(
|
|
|
519
530
|
return r.index === n.index && r.enumValuesPath === n.enumValuesPath && r.shouldUpdateId === n.shouldUpdateId && r.inferredEntry === n.inferredEntry && ve(r.entryError, n.entryError) && r.autoFocus === n.autoFocus;
|
|
520
531
|
}
|
|
521
532
|
);
|
|
522
|
-
function
|
|
533
|
+
function wi({
|
|
523
534
|
index: t,
|
|
524
535
|
open: r,
|
|
525
536
|
onClose: n,
|
|
@@ -814,7 +825,7 @@ function Ce({
|
|
|
814
825
|
asField: !0,
|
|
815
826
|
className: "p-4",
|
|
816
827
|
title: /* @__PURE__ */ a("div", { className: "flex flex-row text-gray-500", children: [
|
|
817
|
-
/* @__PURE__ */ e(
|
|
828
|
+
/* @__PURE__ */ e(Rr, {}),
|
|
818
829
|
/* @__PURE__ */ e(
|
|
819
830
|
V,
|
|
820
831
|
{
|
|
@@ -843,7 +854,7 @@ function Rt({
|
|
|
843
854
|
} = Y(), m = Ve(), p = t ? "of.enumValues" : "enumValues", s = I(d, "defaultValue"), f = I(d, p), g = Zt(() => !f || typeof f == "boolean" ? [] : Nr(f) ?? [], [f]);
|
|
844
855
|
return /* @__PURE__ */ a(R, { children: [
|
|
845
856
|
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(
|
|
846
|
-
|
|
857
|
+
Ni,
|
|
847
858
|
{
|
|
848
859
|
enumValues: g,
|
|
849
860
|
updateIds: r,
|
|
@@ -919,7 +930,7 @@ function Ut({
|
|
|
919
930
|
wt,
|
|
920
931
|
{
|
|
921
932
|
title: /* @__PURE__ */ a("div", { className: "flex flex-row text-gray-500", children: [
|
|
922
|
-
/* @__PURE__ */ e(
|
|
933
|
+
/* @__PURE__ */ e(Ur, {}),
|
|
923
934
|
/* @__PURE__ */ e(
|
|
924
935
|
V,
|
|
925
936
|
{
|
|
@@ -931,7 +942,7 @@ function Ut({
|
|
|
931
942
|
] }),
|
|
932
943
|
children: /* @__PURE__ */ a("div", { className: "grid grid-cols-12 gap-2 p-4", children: [
|
|
933
944
|
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ a(
|
|
934
|
-
|
|
945
|
+
jr,
|
|
935
946
|
{
|
|
936
947
|
disabled: n,
|
|
937
948
|
name: d,
|
|
@@ -1040,14 +1051,14 @@ function Ue(t) {
|
|
|
1040
1051
|
return r.dataType === "array" && typeof r.of == "function" || r.dataType === "array" && Array.isArray(r.of) ? !1 : !!r.editable;
|
|
1041
1052
|
}
|
|
1042
1053
|
}
|
|
1043
|
-
function
|
|
1054
|
+
function Ti(t) {
|
|
1044
1055
|
return Object.entries(t).filter(([r, n]) => Ue(n)).map(([r, n]) => {
|
|
1045
1056
|
const i = n;
|
|
1046
1057
|
if (Ue(i))
|
|
1047
1058
|
return i.dataType === "map" && i.properties ? {
|
|
1048
1059
|
[r]: {
|
|
1049
1060
|
...i,
|
|
1050
|
-
properties:
|
|
1061
|
+
properties: Ti(i.properties)
|
|
1051
1062
|
}
|
|
1052
1063
|
} : { [r]: i };
|
|
1053
1064
|
}).filter((r) => !!r).reduce((r, n) => ({ ...r, ...n }), {});
|
|
@@ -1123,7 +1134,7 @@ function ar({
|
|
|
1123
1134
|
}
|
|
1124
1135
|
) });
|
|
1125
1136
|
}
|
|
1126
|
-
function
|
|
1137
|
+
function ki({
|
|
1127
1138
|
name: t,
|
|
1128
1139
|
selected: r,
|
|
1129
1140
|
onClick: n,
|
|
@@ -1142,10 +1153,10 @@ function Ti({
|
|
|
1142
1153
|
"div",
|
|
1143
1154
|
{
|
|
1144
1155
|
className: "h-8 w-8 p-1 rounded-full shadow text-white bg-gray-500",
|
|
1145
|
-
children: /* @__PURE__ */ e(
|
|
1156
|
+
children: /* @__PURE__ */ e(qr, { color: "inherit", size: "medium" })
|
|
1146
1157
|
}
|
|
1147
1158
|
),
|
|
1148
|
-
/* @__PURE__ */ e(
|
|
1159
|
+
/* @__PURE__ */ e(Lr, { color: "disabled", size: "small", className: "absolute -right-2 -top-2" })
|
|
1149
1160
|
] }),
|
|
1150
1161
|
/* @__PURE__ */ e(
|
|
1151
1162
|
fe,
|
|
@@ -1214,7 +1225,7 @@ function Ti({
|
|
|
1214
1225
|
}
|
|
1215
1226
|
);
|
|
1216
1227
|
}
|
|
1217
|
-
const ft =
|
|
1228
|
+
const ft = G.memo(
|
|
1218
1229
|
function({
|
|
1219
1230
|
namespace: r,
|
|
1220
1231
|
selectedPropertyKey: n,
|
|
@@ -1230,12 +1241,12 @@ const ft = W.memo(
|
|
|
1230
1241
|
collectionEditable: f
|
|
1231
1242
|
}) {
|
|
1232
1243
|
const g = o ?? Object.keys(l);
|
|
1233
|
-
return /* @__PURE__ */ e(R, { children: /* @__PURE__ */ e(
|
|
1244
|
+
return /* @__PURE__ */ e(R, { children: /* @__PURE__ */ e(oi, { onDragEnd: (y) => {
|
|
1234
1245
|
if (!y.destination)
|
|
1235
1246
|
return;
|
|
1236
1247
|
const P = y.source.index, v = y.destination.index, b = Array.from(g), [T] = b.splice(P, 1);
|
|
1237
1248
|
b.splice(v, 0, T), u && u(b, r);
|
|
1238
|
-
}, children: /* @__PURE__ */ e(
|
|
1249
|
+
}, children: /* @__PURE__ */ e(li, { droppableId: `droppable_${r}`, children: (y, P) => /* @__PURE__ */ a(
|
|
1239
1250
|
"div",
|
|
1240
1251
|
{
|
|
1241
1252
|
...y.droppableProps,
|
|
@@ -1245,12 +1256,12 @@ const ft = W.memo(
|
|
|
1245
1256
|
g && g.map((v, b) => {
|
|
1246
1257
|
const T = l[v], w = d?.find((C) => C.key === v);
|
|
1247
1258
|
return !T && !w ? (console.warn(`Property ${v} not found in properties or additionalFields`), null) : /* @__PURE__ */ e(
|
|
1248
|
-
|
|
1259
|
+
si,
|
|
1249
1260
|
{
|
|
1250
1261
|
draggableId: `array_field_${r}_${v}}`,
|
|
1251
1262
|
index: b,
|
|
1252
1263
|
children: (C, O) => /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(
|
|
1253
|
-
|
|
1264
|
+
Oi,
|
|
1254
1265
|
{
|
|
1255
1266
|
propertyKey: v,
|
|
1256
1267
|
propertyOrBuilder: T,
|
|
@@ -1282,7 +1293,7 @@ const ft = W.memo(
|
|
|
1282
1293
|
t.namespace === r.namespace && t.collectionEditable === r.collectionEditable;
|
|
1283
1294
|
}
|
|
1284
1295
|
);
|
|
1285
|
-
function
|
|
1296
|
+
function Oi({
|
|
1286
1297
|
propertyKey: t,
|
|
1287
1298
|
namespace: r,
|
|
1288
1299
|
propertyOrBuilder: n,
|
|
@@ -1296,7 +1307,7 @@ function ki({
|
|
|
1296
1307
|
inferredPropertyKeys: p,
|
|
1297
1308
|
collectionEditable: s
|
|
1298
1309
|
}) {
|
|
1299
|
-
const f = p?.includes(r ? `${r}.${t}` : t), g =
|
|
1310
|
+
const f = p?.includes(r ? `${r}.${t}` : t), g = ne(t, r), y = nr(t, r) in d;
|
|
1300
1311
|
let P;
|
|
1301
1312
|
if (typeof n == "object") {
|
|
1302
1313
|
const T = n;
|
|
@@ -1345,7 +1356,7 @@ function ki({
|
|
|
1345
1356
|
hasError: y
|
|
1346
1357
|
}
|
|
1347
1358
|
) : /* @__PURE__ */ e(
|
|
1348
|
-
|
|
1359
|
+
ki,
|
|
1349
1360
|
{
|
|
1350
1361
|
name: t,
|
|
1351
1362
|
property: n,
|
|
@@ -1356,20 +1367,20 @@ function ki({
|
|
|
1356
1367
|
/* @__PURE__ */ a("div", { className: "absolute top-2 right-2 flex flex-row ", children: [
|
|
1357
1368
|
f && /* @__PURE__ */ e(ee, { title: "Inferred property", children: /* @__PURE__ */ e(ht, { size: "small", className: "p-2" }) }),
|
|
1358
1369
|
m && /* @__PURE__ */ e(ee, { title: "Remove", children: /* @__PURE__ */ e(
|
|
1359
|
-
|
|
1370
|
+
ie,
|
|
1360
1371
|
{
|
|
1361
1372
|
size: "small",
|
|
1362
1373
|
color: "inherit",
|
|
1363
1374
|
onClick: () => m(t, r),
|
|
1364
|
-
children: /* @__PURE__ */ e(
|
|
1375
|
+
children: /* @__PURE__ */ e($r, { size: "small" })
|
|
1365
1376
|
}
|
|
1366
1377
|
) }),
|
|
1367
1378
|
u && /* @__PURE__ */ e(ee, { title: "Move", children: /* @__PURE__ */ e(
|
|
1368
|
-
|
|
1379
|
+
ie,
|
|
1369
1380
|
{
|
|
1370
1381
|
component: "span",
|
|
1371
1382
|
size: "small",
|
|
1372
|
-
children: /* @__PURE__ */ e(
|
|
1383
|
+
children: /* @__PURE__ */ e(Hr, { size: "small" })
|
|
1373
1384
|
}
|
|
1374
1385
|
) })
|
|
1375
1386
|
] }),
|
|
@@ -1378,7 +1389,7 @@ function ki({
|
|
|
1378
1389
|
}
|
|
1379
1390
|
);
|
|
1380
1391
|
}
|
|
1381
|
-
function
|
|
1392
|
+
function Vi({ disabled: t, getData: r, allowDataInference: n, propertyConfigs: i, collectionEditable: l }) {
|
|
1382
1393
|
const {
|
|
1383
1394
|
values: o,
|
|
1384
1395
|
setFieldValue: d
|
|
@@ -1395,12 +1406,12 @@ function Oi({ disabled: t, getData: r, allowDataInference: n, propertyConfigs: i
|
|
|
1395
1406
|
const O = o.propertiesOrder ?? Object.keys(o.properties ?? {}), N = O.includes(w) ? O : [...O, w];
|
|
1396
1407
|
d("propertiesOrder", N, !1), u(!1);
|
|
1397
1408
|
}, y = (w, C) => {
|
|
1398
|
-
const O = w ?
|
|
1409
|
+
const O = w ? ne(w, C) : void 0;
|
|
1399
1410
|
if (!O)
|
|
1400
1411
|
throw Error("collection editor miss config");
|
|
1401
1412
|
const N = me(O), F = ye(C), B = I(o, F) ?? Object.keys(I(o, ir(C)));
|
|
1402
1413
|
d(N, void 0, !1), d(F, B.filter((_) => _ !== w), !1), u(!1), p(void 0), f(void 0);
|
|
1403
|
-
}, P = m ?
|
|
1414
|
+
}, P = m ? ne(m, s) : void 0, v = P ? I(o.properties, P.replaceAll(".", ".properties.")) : void 0, b = !g || g.length < 1, T = (w, C) => {
|
|
1404
1415
|
d(ye(C), w, !1);
|
|
1405
1416
|
};
|
|
1406
1417
|
return /* @__PURE__ */ a(R, { children: [
|
|
@@ -1487,7 +1498,7 @@ function Oi({ disabled: t, getData: r, allowDataInference: n, propertyConfigs: i
|
|
|
1487
1498
|
)
|
|
1488
1499
|
] });
|
|
1489
1500
|
}
|
|
1490
|
-
function
|
|
1501
|
+
function Ii({
|
|
1491
1502
|
showErrors: t,
|
|
1492
1503
|
existing: r,
|
|
1493
1504
|
disabled: n,
|
|
@@ -1564,7 +1575,7 @@ function Vi({
|
|
|
1564
1575
|
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(Ce, { children: /* @__PURE__ */ e(Vt, { disabled: n }) }) })
|
|
1565
1576
|
] });
|
|
1566
1577
|
}
|
|
1567
|
-
const
|
|
1578
|
+
const _i = G.forwardRef(
|
|
1568
1579
|
function({
|
|
1569
1580
|
showErrors: r,
|
|
1570
1581
|
disabledId: n,
|
|
@@ -1638,7 +1649,7 @@ const Ii = W.forwardRef(
|
|
|
1638
1649
|
] });
|
|
1639
1650
|
}
|
|
1640
1651
|
);
|
|
1641
|
-
function
|
|
1652
|
+
function Fi({
|
|
1642
1653
|
widgetId: t,
|
|
1643
1654
|
disabled: r,
|
|
1644
1655
|
showErrors: n
|
|
@@ -1711,7 +1722,7 @@ function _i({
|
|
|
1711
1722
|
) })
|
|
1712
1723
|
] });
|
|
1713
1724
|
}
|
|
1714
|
-
function
|
|
1725
|
+
function Ei({ disabled: t }) {
|
|
1715
1726
|
const { values: r } = Y(), n = I(r, "defaultValue");
|
|
1716
1727
|
return /* @__PURE__ */ a(R, { children: [
|
|
1717
1728
|
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(Ce, { children: /* @__PURE__ */ e(Fe, { disabled: t }) }) }),
|
|
@@ -1733,7 +1744,7 @@ function Fi({ disabled: t }) {
|
|
|
1733
1744
|
) })
|
|
1734
1745
|
] });
|
|
1735
1746
|
}
|
|
1736
|
-
function
|
|
1747
|
+
function Si({
|
|
1737
1748
|
disabled: t,
|
|
1738
1749
|
getData: r,
|
|
1739
1750
|
allowDataInference: n,
|
|
@@ -1755,8 +1766,8 @@ function Ei({
|
|
|
1755
1766
|
}, !1);
|
|
1756
1767
|
const C = o.oneOf?.propertiesOrder ?? Object.keys(o.oneOf?.properties ?? {}), O = C.includes(T) ? C : [...C, T];
|
|
1757
1768
|
d("oneOf.propertiesOrder", O, !1), u(!1);
|
|
1758
|
-
}, x = m ?
|
|
1759
|
-
const C = T ?
|
|
1769
|
+
}, x = m ? ne(m, s) : void 0, y = x ? I(o.oneOf?.properties, x.replaceAll(".", ".properties.")) : void 0, P = (T, w) => {
|
|
1770
|
+
const C = T ? ne(T, w) : void 0;
|
|
1760
1771
|
if (!C)
|
|
1761
1772
|
throw Error("collection editor miss config");
|
|
1762
1773
|
d(`oneOf.${me(C)}`, void 0, !1);
|
|
@@ -1829,7 +1840,7 @@ function Ei({
|
|
|
1829
1840
|
)
|
|
1830
1841
|
] });
|
|
1831
1842
|
}
|
|
1832
|
-
function
|
|
1843
|
+
function Ai({ disabled: t }) {
|
|
1833
1844
|
const {
|
|
1834
1845
|
values: r,
|
|
1835
1846
|
handleChange: n
|
|
@@ -1934,10 +1945,10 @@ function Si({ disabled: t }) {
|
|
|
1934
1945
|
) })
|
|
1935
1946
|
] });
|
|
1936
1947
|
}
|
|
1937
|
-
function
|
|
1948
|
+
function Di({ disabled: t }) {
|
|
1938
1949
|
const { values: r, setFieldValue: n } = Y();
|
|
1939
1950
|
return /* @__PURE__ */ a(R, { children: [
|
|
1940
|
-
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(Ce, { children: /* @__PURE__ */ e(
|
|
1951
|
+
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(Ce, { children: /* @__PURE__ */ e(Ai, { disabled: t }) }) }),
|
|
1941
1952
|
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(
|
|
1942
1953
|
we,
|
|
1943
1954
|
{
|
|
@@ -1977,11 +1988,11 @@ function jt({
|
|
|
1977
1988
|
value: m,
|
|
1978
1989
|
error: p,
|
|
1979
1990
|
handleChange: o,
|
|
1980
|
-
as:
|
|
1991
|
+
as: Bi
|
|
1981
1992
|
}
|
|
1982
1993
|
) }) });
|
|
1983
1994
|
}
|
|
1984
|
-
function
|
|
1995
|
+
function Bi({
|
|
1985
1996
|
disabled: t,
|
|
1986
1997
|
pathPath: r,
|
|
1987
1998
|
value: n,
|
|
@@ -2071,7 +2082,7 @@ function Di({
|
|
|
2071
2082
|
/* @__PURE__ */ e(J, { children: "You can only edit the reference collection upon field creation." })
|
|
2072
2083
|
] });
|
|
2073
2084
|
}
|
|
2074
|
-
function
|
|
2085
|
+
function Mi({ disabled: t }) {
|
|
2075
2086
|
const {
|
|
2076
2087
|
values: r,
|
|
2077
2088
|
errors: n,
|
|
@@ -2137,7 +2148,7 @@ function Bi({ disabled: t }) {
|
|
|
2137
2148
|
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(Ce, { children: /* @__PURE__ */ e(Fe, { disabled: t }) }) })
|
|
2138
2149
|
] });
|
|
2139
2150
|
}
|
|
2140
|
-
function
|
|
2151
|
+
function zi({ disabled: t }) {
|
|
2141
2152
|
return /* @__PURE__ */ a("div", { className: "grid grid-cols-12 gap-2", children: [
|
|
2142
2153
|
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e($, { type: "checkbox", name: "hideFromCollection", children: ({ field: i, form: l }) => /* @__PURE__ */ e(
|
|
2143
2154
|
oe,
|
|
@@ -2168,12 +2179,12 @@ function Mi({ disabled: t }) {
|
|
|
2168
2179
|
) })
|
|
2169
2180
|
] });
|
|
2170
2181
|
}
|
|
2171
|
-
function
|
|
2182
|
+
function Ri({ disabled: t }) {
|
|
2172
2183
|
return /* @__PURE__ */ e(R, { children: /* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(Ce, { children: /* @__PURE__ */ e(Fe, { disabled: t }) }) }) });
|
|
2173
2184
|
}
|
|
2174
2185
|
function or(t, r, n) {
|
|
2175
2186
|
let i;
|
|
2176
|
-
return r === "text_field" ? i =
|
|
2187
|
+
return r === "text_field" ? i = W(
|
|
2177
2188
|
t,
|
|
2178
2189
|
{
|
|
2179
2190
|
dataType: "string",
|
|
@@ -2186,7 +2197,7 @@ function or(t, r, n) {
|
|
|
2186
2197
|
url: void 0,
|
|
2187
2198
|
enumValues: void 0
|
|
2188
2199
|
}
|
|
2189
|
-
) : r === "multiline" ? i =
|
|
2200
|
+
) : r === "multiline" ? i = W(
|
|
2190
2201
|
t,
|
|
2191
2202
|
{
|
|
2192
2203
|
dataType: "string",
|
|
@@ -2199,7 +2210,7 @@ function or(t, r, n) {
|
|
|
2199
2210
|
url: void 0,
|
|
2200
2211
|
enumValues: void 0
|
|
2201
2212
|
}
|
|
2202
|
-
) : r === "markdown" ? i =
|
|
2213
|
+
) : r === "markdown" ? i = W(
|
|
2203
2214
|
t,
|
|
2204
2215
|
{
|
|
2205
2216
|
dataType: "string",
|
|
@@ -2211,7 +2222,7 @@ function or(t, r, n) {
|
|
|
2211
2222
|
email: void 0,
|
|
2212
2223
|
url: void 0
|
|
2213
2224
|
}
|
|
2214
|
-
) : r === "url" ? i =
|
|
2225
|
+
) : r === "url" ? i = W(
|
|
2215
2226
|
t,
|
|
2216
2227
|
{
|
|
2217
2228
|
dataType: "string",
|
|
@@ -2224,7 +2235,7 @@ function or(t, r, n) {
|
|
|
2224
2235
|
url: !0,
|
|
2225
2236
|
enumValues: void 0
|
|
2226
2237
|
}
|
|
2227
|
-
) : r === "email" ? i =
|
|
2238
|
+
) : r === "email" ? i = W(
|
|
2228
2239
|
t,
|
|
2229
2240
|
{
|
|
2230
2241
|
dataType: "string",
|
|
@@ -2237,7 +2248,7 @@ function or(t, r, n) {
|
|
|
2237
2248
|
url: void 0,
|
|
2238
2249
|
enumValues: void 0
|
|
2239
2250
|
}
|
|
2240
|
-
) : r === "select" ? i =
|
|
2251
|
+
) : r === "select" ? i = W(
|
|
2241
2252
|
t,
|
|
2242
2253
|
{
|
|
2243
2254
|
dataType: "string",
|
|
@@ -2250,7 +2261,7 @@ function or(t, r, n) {
|
|
|
2250
2261
|
url: void 0,
|
|
2251
2262
|
enumValues: t.enumValues ?? []
|
|
2252
2263
|
}
|
|
2253
|
-
) : r === "multi_select" ? i =
|
|
2264
|
+
) : r === "multi_select" ? i = W(
|
|
2254
2265
|
t,
|
|
2255
2266
|
{
|
|
2256
2267
|
dataType: "array",
|
|
@@ -2261,7 +2272,7 @@ function or(t, r, n) {
|
|
|
2261
2272
|
enumValues: t.of?.enumValues ?? []
|
|
2262
2273
|
}
|
|
2263
2274
|
}
|
|
2264
|
-
) : r === "number_input" ? i =
|
|
2275
|
+
) : r === "number_input" ? i = W(
|
|
2265
2276
|
t,
|
|
2266
2277
|
{
|
|
2267
2278
|
dataType: "number",
|
|
@@ -2269,7 +2280,7 @@ function or(t, r, n) {
|
|
|
2269
2280
|
editable: t.editable !== void 0 ? t.editable : !0,
|
|
2270
2281
|
enumValues: void 0
|
|
2271
2282
|
}
|
|
2272
|
-
) : r === "number_select" ? i =
|
|
2283
|
+
) : r === "number_select" ? i = W(
|
|
2273
2284
|
t,
|
|
2274
2285
|
{
|
|
2275
2286
|
dataType: "number",
|
|
@@ -2277,7 +2288,7 @@ function or(t, r, n) {
|
|
|
2277
2288
|
editable: t.editable !== void 0 ? t.editable : !0,
|
|
2278
2289
|
enumValues: t.enumValues ?? []
|
|
2279
2290
|
}
|
|
2280
|
-
) : r === "multi_number_select" ? i =
|
|
2291
|
+
) : r === "multi_number_select" ? i = W(
|
|
2281
2292
|
t,
|
|
2282
2293
|
{
|
|
2283
2294
|
dataType: "array",
|
|
@@ -2288,7 +2299,7 @@ function or(t, r, n) {
|
|
|
2288
2299
|
enumValues: t.of?.enumValues ?? []
|
|
2289
2300
|
}
|
|
2290
2301
|
}
|
|
2291
|
-
) : r === "file_upload" ? i =
|
|
2302
|
+
) : r === "file_upload" ? i = W(
|
|
2292
2303
|
t,
|
|
2293
2304
|
{
|
|
2294
2305
|
dataType: "string",
|
|
@@ -2298,7 +2309,7 @@ function or(t, r, n) {
|
|
|
2298
2309
|
storagePath: "/"
|
|
2299
2310
|
}
|
|
2300
2311
|
}
|
|
2301
|
-
) : r === "multi_file_upload" ? i =
|
|
2312
|
+
) : r === "multi_file_upload" ? i = W(
|
|
2302
2313
|
t,
|
|
2303
2314
|
{
|
|
2304
2315
|
dataType: "array",
|
|
@@ -2311,7 +2322,7 @@ function or(t, r, n) {
|
|
|
2311
2322
|
}
|
|
2312
2323
|
}
|
|
2313
2324
|
}
|
|
2314
|
-
) : r === "group" ? i =
|
|
2325
|
+
) : r === "group" ? i = W(
|
|
2315
2326
|
t,
|
|
2316
2327
|
{
|
|
2317
2328
|
dataType: "map",
|
|
@@ -2320,7 +2331,7 @@ function or(t, r, n) {
|
|
|
2320
2331
|
keyValue: !1,
|
|
2321
2332
|
properties: t.properties ?? {}
|
|
2322
2333
|
}
|
|
2323
|
-
) : r === "key_value" ? i =
|
|
2334
|
+
) : r === "key_value" ? i = W(
|
|
2324
2335
|
t,
|
|
2325
2336
|
{
|
|
2326
2337
|
dataType: "map",
|
|
@@ -2329,14 +2340,14 @@ function or(t, r, n) {
|
|
|
2329
2340
|
keyValue: !0,
|
|
2330
2341
|
properties: void 0
|
|
2331
2342
|
}
|
|
2332
|
-
) : r === "reference" ? i =
|
|
2343
|
+
) : r === "reference" ? i = W(
|
|
2333
2344
|
t,
|
|
2334
2345
|
{
|
|
2335
2346
|
dataType: "reference",
|
|
2336
2347
|
propertyConfig: "reference",
|
|
2337
2348
|
editable: t.editable !== void 0 ? t.editable : !0
|
|
2338
2349
|
}
|
|
2339
|
-
) : r === "multi_references" ? i =
|
|
2350
|
+
) : r === "multi_references" ? i = W(
|
|
2340
2351
|
t,
|
|
2341
2352
|
{
|
|
2342
2353
|
dataType: "array",
|
|
@@ -2346,14 +2357,14 @@ function or(t, r, n) {
|
|
|
2346
2357
|
dataType: "reference"
|
|
2347
2358
|
}
|
|
2348
2359
|
}
|
|
2349
|
-
) : r === "switch" ? i =
|
|
2360
|
+
) : r === "switch" ? i = W(
|
|
2350
2361
|
t,
|
|
2351
2362
|
{
|
|
2352
2363
|
dataType: "boolean",
|
|
2353
2364
|
propertyConfig: "switch",
|
|
2354
2365
|
editable: t.editable !== void 0 ? t.editable : !0
|
|
2355
2366
|
}
|
|
2356
|
-
) : r === "date_time" ? i =
|
|
2367
|
+
) : r === "date_time" ? i = W(
|
|
2357
2368
|
t,
|
|
2358
2369
|
{
|
|
2359
2370
|
dataType: "date",
|
|
@@ -2361,14 +2372,14 @@ function or(t, r, n) {
|
|
|
2361
2372
|
editable: t.editable !== void 0 ? t.editable : !0,
|
|
2362
2373
|
mode: "date_time"
|
|
2363
2374
|
}
|
|
2364
|
-
) : r === "repeat" ? i =
|
|
2375
|
+
) : r === "repeat" ? i = W(
|
|
2365
2376
|
t,
|
|
2366
2377
|
{
|
|
2367
2378
|
dataType: "array",
|
|
2368
2379
|
propertyConfig: "repeat",
|
|
2369
2380
|
editable: t.editable !== void 0 ? t.editable : !0
|
|
2370
2381
|
}
|
|
2371
|
-
) : r === "block" ? i =
|
|
2382
|
+
) : r === "block" ? i = W(
|
|
2372
2383
|
t,
|
|
2373
2384
|
{
|
|
2374
2385
|
dataType: "array",
|
|
@@ -2417,7 +2428,7 @@ function lr({ value: t, optionDisabled: r, propertyConfig: n, existing: i }) {
|
|
|
2417
2428
|
}
|
|
2418
2429
|
);
|
|
2419
2430
|
}
|
|
2420
|
-
function
|
|
2431
|
+
function Ui({
|
|
2421
2432
|
disabled: t,
|
|
2422
2433
|
showErrors: r
|
|
2423
2434
|
}) {
|
|
@@ -2477,7 +2488,7 @@ function Ri({
|
|
|
2477
2488
|
) })
|
|
2478
2489
|
] });
|
|
2479
2490
|
}
|
|
2480
|
-
const
|
|
2491
|
+
const ji = [
|
|
2481
2492
|
"text_field",
|
|
2482
2493
|
"multiline",
|
|
2483
2494
|
"markdown",
|
|
@@ -2498,7 +2509,7 @@ const Ui = [
|
|
|
2498
2509
|
"key_value",
|
|
2499
2510
|
"repeat",
|
|
2500
2511
|
"block"
|
|
2501
|
-
], sr = Object.entries(
|
|
2512
|
+
], sr = Object.entries(Wt).filter(([t]) => ji.includes(t)).map(([t, r]) => ({ [t]: r })).reduce((t, r) => ({ ...t, ...r }), {}), dr = G.memo(
|
|
2502
2513
|
function(r) {
|
|
2503
2514
|
const {
|
|
2504
2515
|
includeIdAndName: n = !0,
|
|
@@ -2561,13 +2572,13 @@ const Ui = [
|
|
|
2561
2572
|
if (!E.name)
|
|
2562
2573
|
h.name = "Required";
|
|
2563
2574
|
else {
|
|
2564
|
-
const D =
|
|
2575
|
+
const D = Hi(E.name);
|
|
2565
2576
|
D && (h.name = D);
|
|
2566
2577
|
}
|
|
2567
2578
|
if (!E.id)
|
|
2568
2579
|
h.id = "Required";
|
|
2569
2580
|
else {
|
|
2570
|
-
const D =
|
|
2581
|
+
const D = $i(E.id, u);
|
|
2571
2582
|
D && (h.id = D);
|
|
2572
2583
|
}
|
|
2573
2584
|
}
|
|
@@ -2579,7 +2590,7 @@ const Ui = [
|
|
|
2579
2590
|
return ce(() => {
|
|
2580
2591
|
b?.(_);
|
|
2581
2592
|
}, [_, b]), /* @__PURE__ */ e(Ot, { value: _, children: /* @__PURE__ */ e(
|
|
2582
|
-
|
|
2593
|
+
qi,
|
|
2583
2594
|
{
|
|
2584
2595
|
onPropertyChanged: f ? B : void 0,
|
|
2585
2596
|
onDelete: g,
|
|
@@ -2669,7 +2680,7 @@ function Oe({
|
|
|
2669
2680
|
}
|
|
2670
2681
|
);
|
|
2671
2682
|
}
|
|
2672
|
-
function
|
|
2683
|
+
function qi({
|
|
2673
2684
|
values: t,
|
|
2674
2685
|
errors: r,
|
|
2675
2686
|
setValues: n,
|
|
@@ -2689,7 +2700,7 @@ function ji({
|
|
|
2689
2700
|
propertyConfigs: P,
|
|
2690
2701
|
collectionEditable: v
|
|
2691
2702
|
}) {
|
|
2692
|
-
const [b, T] = j(o), [w, C] = j(!1), [O, N] = j(t?.dataType ?
|
|
2703
|
+
const [b, T] = j(o), [w, C] = j(!1), [O, N] = j(t?.dataType ? Gt(t) : void 0), F = Object.entries(sr).concat(Object.entries(P)), B = g ? F.filter(([Z, H]) => !re(H.property) && H.property?.dataType !== "array") : F, _ = Fr(t), E = Re(null), h = Re(t), D = s && I(r, "selectedWidget");
|
|
2693
2704
|
ce(() => {
|
|
2694
2705
|
if (c && (!d || _.id)) {
|
|
2695
2706
|
const {
|
|
@@ -2712,14 +2723,14 @@ function ji({
|
|
|
2712
2723
|
};
|
|
2713
2724
|
let q;
|
|
2714
2725
|
return O === "text_field" || O === "multiline" || O === "markdown" || O === "email" ? q = /* @__PURE__ */ e(
|
|
2715
|
-
|
|
2726
|
+
Fi,
|
|
2716
2727
|
{
|
|
2717
2728
|
widgetId: O,
|
|
2718
2729
|
disabled: f,
|
|
2719
2730
|
showErrors: s
|
|
2720
2731
|
}
|
|
2721
2732
|
) : O === "url" ? q = /* @__PURE__ */ e(
|
|
2722
|
-
|
|
2733
|
+
Ui,
|
|
2723
2734
|
{
|
|
2724
2735
|
disabled: f,
|
|
2725
2736
|
showErrors: s
|
|
@@ -2758,8 +2769,8 @@ function ji({
|
|
|
2758
2769
|
multiple: !0,
|
|
2759
2770
|
disabled: f
|
|
2760
2771
|
}
|
|
2761
|
-
) : O === "switch" ? q = /* @__PURE__ */ e(
|
|
2762
|
-
|
|
2772
|
+
) : O === "switch" ? q = /* @__PURE__ */ e(Ei, { disabled: f }) : O === "number_input" ? q = /* @__PURE__ */ e(Di, { disabled: f }) : O === "group" ? q = /* @__PURE__ */ e(
|
|
2773
|
+
Vi,
|
|
2763
2774
|
{
|
|
2764
2775
|
disabled: f,
|
|
2765
2776
|
getData: x,
|
|
@@ -2768,7 +2779,7 @@ function ji({
|
|
|
2768
2779
|
propertyConfigs: P
|
|
2769
2780
|
}
|
|
2770
2781
|
) : O === "block" ? q = /* @__PURE__ */ e(
|
|
2771
|
-
|
|
2782
|
+
Si,
|
|
2772
2783
|
{
|
|
2773
2784
|
disabled: f,
|
|
2774
2785
|
getData: x,
|
|
@@ -2784,7 +2795,7 @@ function ji({
|
|
|
2784
2795
|
multiple: !1,
|
|
2785
2796
|
disabled: f
|
|
2786
2797
|
}
|
|
2787
|
-
) : O === "date_time" ? q = /* @__PURE__ */ e(
|
|
2798
|
+
) : O === "date_time" ? q = /* @__PURE__ */ e(Mi, { disabled: f }) : O === "multi_references" ? q = /* @__PURE__ */ e(
|
|
2788
2799
|
jt,
|
|
2789
2800
|
{
|
|
2790
2801
|
showErrors: s,
|
|
@@ -2793,7 +2804,7 @@ function ji({
|
|
|
2793
2804
|
disabled: f
|
|
2794
2805
|
}
|
|
2795
2806
|
) : O === "repeat" ? q = /* @__PURE__ */ e(
|
|
2796
|
-
|
|
2807
|
+
Ii,
|
|
2797
2808
|
{
|
|
2798
2809
|
showErrors: s,
|
|
2799
2810
|
existing: i,
|
|
@@ -2803,8 +2814,8 @@ function ji({
|
|
|
2803
2814
|
collectionEditable: v,
|
|
2804
2815
|
propertyConfigs: P
|
|
2805
2816
|
}
|
|
2806
|
-
) : O === "key_value" ? q = /* @__PURE__ */ e(
|
|
2807
|
-
f && /* @__PURE__ */ a(
|
|
2817
|
+
) : O === "key_value" ? q = /* @__PURE__ */ e(Ri, { disabled: f }) : q = null, /* @__PURE__ */ a(R, { children: [
|
|
2818
|
+
f && /* @__PURE__ */ a(Yr, { mode: "warn", children: [
|
|
2808
2819
|
/* @__PURE__ */ e(V, { children: "This property can't be edited" }),
|
|
2809
2820
|
/* @__PURE__ */ a(V, { variant: "caption", children: [
|
|
2810
2821
|
"You may not have permission to edit it or it is defined in code with no ",
|
|
@@ -2827,7 +2838,7 @@ function ji({
|
|
|
2827
2838
|
renderValue: (Z) => {
|
|
2828
2839
|
if (!Z)
|
|
2829
2840
|
return /* @__PURE__ */ e("em", { children: "Select a property widget" });
|
|
2830
|
-
const H = Z, Q =
|
|
2841
|
+
const H = Z, Q = Wt[H] ?? P[H], le = Q.property, Be = le && !re(le) ? je(le, P) : void 0, Pe = re(le) || i && le.dataType !== t?.dataType, se = Be ? W(Be, Q) : Q;
|
|
2831
2842
|
return /* @__PURE__ */ a(
|
|
2832
2843
|
"div",
|
|
2833
2844
|
{
|
|
@@ -2884,7 +2895,7 @@ function ji({
|
|
|
2884
2895
|
)
|
|
2885
2896
|
] }),
|
|
2886
2897
|
u && t?.id && /* @__PURE__ */ e(
|
|
2887
|
-
|
|
2898
|
+
ie,
|
|
2888
2899
|
{
|
|
2889
2900
|
variant: "ghost",
|
|
2890
2901
|
className: "m-4",
|
|
@@ -2896,7 +2907,7 @@ function ji({
|
|
|
2896
2907
|
] }),
|
|
2897
2908
|
/* @__PURE__ */ a("div", { className: "grid grid-cols-12 gap-y-12 mt-8 mb-8", children: [
|
|
2898
2909
|
d && /* @__PURE__ */ e(
|
|
2899
|
-
|
|
2910
|
+
_i,
|
|
2900
2911
|
{
|
|
2901
2912
|
showErrors: s,
|
|
2902
2913
|
disabledId: i,
|
|
@@ -2907,7 +2918,7 @@ function ji({
|
|
|
2907
2918
|
}
|
|
2908
2919
|
),
|
|
2909
2920
|
q,
|
|
2910
|
-
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(
|
|
2921
|
+
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(zi, { disabled: f }) })
|
|
2911
2922
|
] }),
|
|
2912
2923
|
u && /* @__PURE__ */ e(
|
|
2913
2924
|
dt,
|
|
@@ -2925,26 +2936,26 @@ function ji({
|
|
|
2925
2936
|
)
|
|
2926
2937
|
] });
|
|
2927
2938
|
}
|
|
2928
|
-
const
|
|
2929
|
-
function
|
|
2939
|
+
const Li = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
|
|
2940
|
+
function $i(t, r) {
|
|
2930
2941
|
let n;
|
|
2931
|
-
return t || (n = "You must specify an id for the field"), t && !t.match(
|
|
2942
|
+
return t || (n = "You must specify an id for the field"), t && !t.match(Li) && (n = "The id can only contain letters, numbers and underscores (_), and not start with a number"), t && r && r.includes(t) && (n = "There is another field with this ID already"), n;
|
|
2932
2943
|
}
|
|
2933
|
-
function
|
|
2944
|
+
function Hi(t) {
|
|
2934
2945
|
let r;
|
|
2935
2946
|
return t || (r = "You must specify a title for the field"), r;
|
|
2936
2947
|
}
|
|
2937
|
-
function
|
|
2948
|
+
function Yi(t) {
|
|
2938
2949
|
return t ? (t.slice(0, 1).toLowerCase() + t.slice(1)).replace(/([-_ ]){1,}/g, " ").split(/[-_ ]/).reduce((r, n) => r + n[0].toUpperCase() + n.substring(1), "") : "";
|
|
2939
2950
|
}
|
|
2940
|
-
function
|
|
2951
|
+
function Wi({
|
|
2941
2952
|
collection: t,
|
|
2942
2953
|
onOpenChange: r,
|
|
2943
2954
|
open: n
|
|
2944
2955
|
}) {
|
|
2945
2956
|
const i = Ve(), l = t ? `import { EntityCollection } from "firecms";
|
|
2946
2957
|
|
|
2947
|
-
const ` + (t?.name ?
|
|
2958
|
+
const ` + (t?.name ? Yi(t.name) : "my") + "Collection:EntityCollection = " + di.stringify(cr(t), null, " ") : "No collection selected";
|
|
2948
2959
|
return /* @__PURE__ */ a(
|
|
2949
2960
|
_e,
|
|
2950
2961
|
{
|
|
@@ -2970,9 +2981,9 @@ const ` + (t?.name ? Hi(t.name) : "my") + "Collection:EntityCollection = " + si.
|
|
|
2970
2981
|
"."
|
|
2971
2982
|
] }),
|
|
2972
2983
|
/* @__PURE__ */ e(
|
|
2973
|
-
|
|
2984
|
+
ci,
|
|
2974
2985
|
{
|
|
2975
|
-
theme:
|
|
2986
|
+
theme: ui.vsDark,
|
|
2976
2987
|
code: l,
|
|
2977
2988
|
language: "typescript",
|
|
2978
2989
|
children: ({
|
|
@@ -2996,7 +3007,7 @@ const ` + (t?.name ? Hi(t.name) : "my") + "Collection:EntityCollection = " + si.
|
|
|
2996
3007
|
message: "Copied"
|
|
2997
3008
|
}), navigator.clipboard.writeText(l)),
|
|
2998
3009
|
children: [
|
|
2999
|
-
/* @__PURE__ */ e(
|
|
3010
|
+
/* @__PURE__ */ e(Wr, { size: "small" }),
|
|
3000
3011
|
"Copy to clipboard"
|
|
3001
3012
|
]
|
|
3002
3013
|
}
|
|
@@ -3057,7 +3068,7 @@ function Gi({
|
|
|
3057
3068
|
setFieldTouched: y,
|
|
3058
3069
|
errors: P,
|
|
3059
3070
|
dirty: v
|
|
3060
|
-
} = Y(), b = Ve(), T = xr(), w = !T, [C, O] = j(), [N, F] = j(), [B, _] = j(), E = N ?
|
|
3071
|
+
} = Y(), b = Ve(), T = xr(), w = !T, [C, O] = j(), [N, F] = j(), [B, _] = j(), E = N ? ne(N, B) : void 0, h = E ? I(f.properties, E.replaceAll(".", ".properties.")) : void 0, [D, ae] = j(!1), [q, Z] = j(!1), [H, Q] = j(!1), [le, Be] = j([]), Pe = G.useRef(f.propertiesOrder ? { "": f.propertiesOrder } : {});
|
|
3061
3072
|
ce(() => {
|
|
3062
3073
|
l && l(v);
|
|
3063
3074
|
}, [v]);
|
|
@@ -3093,7 +3104,7 @@ function Gi({
|
|
|
3093
3104
|
const k = ye(U);
|
|
3094
3105
|
g(k, A, !1), Pe.current[U ?? ""] = A;
|
|
3095
3106
|
}, ke = (A, U) => {
|
|
3096
|
-
const k = A ?
|
|
3107
|
+
const k = A ? ne(A, U) : void 0;
|
|
3097
3108
|
if (!k)
|
|
3098
3109
|
throw Error("collection editor miss config");
|
|
3099
3110
|
g(me(k), void 0, !1);
|
|
@@ -3119,7 +3130,7 @@ function Gi({
|
|
|
3119
3130
|
previousId: k,
|
|
3120
3131
|
namespace: S
|
|
3121
3132
|
}) => {
|
|
3122
|
-
const M = A ?
|
|
3133
|
+
const M = A ? ne(A, S) : void 0, L = M ? me(M) : void 0;
|
|
3123
3134
|
if (k && k !== A) {
|
|
3124
3135
|
console.debug("onPropertyChanged, id change", {
|
|
3125
3136
|
id: A,
|
|
@@ -3127,7 +3138,7 @@ function Gi({
|
|
|
3127
3138
|
previousId: k,
|
|
3128
3139
|
namespace: S
|
|
3129
3140
|
});
|
|
3130
|
-
const ge =
|
|
3141
|
+
const ge = ne(k, S), Xe = me(ge), It = te(S).map((tt) => tt === k ? A : tt).filter((tt) => tt !== void 0);
|
|
3131
3142
|
xe(It, S), A && (O(It.indexOf(A)), F(A)), g(Xe, void 0, !1), y(Xe, !1, !1);
|
|
3132
3143
|
}
|
|
3133
3144
|
console.debug("onPropertyChanged", {
|
|
@@ -3137,8 +3148,8 @@ function Gi({
|
|
|
3137
3148
|
namespace: S,
|
|
3138
3149
|
propertyPath: L
|
|
3139
3150
|
}), L && (g(L, U, !1), y(L, !0, !1));
|
|
3140
|
-
},
|
|
3141
|
-
const S = A ?
|
|
3151
|
+
}, We = (A, U, k) => {
|
|
3152
|
+
const S = A ? ne(A, U) : void 0;
|
|
3142
3153
|
if (console.debug("onPropertyErrorInternal", {
|
|
3143
3154
|
id: A,
|
|
3144
3155
|
namespace: U,
|
|
@@ -3148,7 +3159,7 @@ function Gi({
|
|
|
3148
3159
|
const M = k && Object.keys(k).length > 0;
|
|
3149
3160
|
i(A, U, M ? k : void 0), x(me(S), M ? "Property error" : void 0);
|
|
3150
3161
|
}
|
|
3151
|
-
},
|
|
3162
|
+
}, Ge = () => {
|
|
3152
3163
|
O(void 0), F(void 0);
|
|
3153
3164
|
}, Ke = N && n?.current?.properties ? n.current.properties[N] : void 0, Ze = f?.propertiesOrder === void 0 || f.propertiesOrder.length === 0, Je = f.propertiesOrder ? f.propertiesOrder : Object.keys(f.properties), Qe = Zt(() => f.ownerId && c ? c(f.ownerId) : null, [c, f.ownerId]), vt = (A, U) => {
|
|
3154
3165
|
console.debug("CollectionEditor: onPropertyClick", {
|
|
@@ -3193,7 +3204,7 @@ function Gi({
|
|
|
3193
3204
|
d && /* @__PURE__ */ e("div", { className: "ml-4", children: d }),
|
|
3194
3205
|
/* @__PURE__ */ a("div", { className: "ml-1 mt-2 flex flex-row gap-2", children: [
|
|
3195
3206
|
/* @__PURE__ */ e(ee, { title: "Get the code for this collection", children: /* @__PURE__ */ e(
|
|
3196
|
-
|
|
3207
|
+
ie,
|
|
3197
3208
|
{
|
|
3198
3209
|
variant: "filled",
|
|
3199
3210
|
disabled: q,
|
|
@@ -3202,7 +3213,7 @@ function Gi({
|
|
|
3202
3213
|
}
|
|
3203
3214
|
) }),
|
|
3204
3215
|
se && /* @__PURE__ */ e(ee, { title: "Add new properties based on data", children: /* @__PURE__ */ e(
|
|
3205
|
-
|
|
3216
|
+
ie,
|
|
3206
3217
|
{
|
|
3207
3218
|
variant: "filled",
|
|
3208
3219
|
disabled: q,
|
|
@@ -3225,7 +3236,7 @@ function Gi({
|
|
|
3225
3236
|
{
|
|
3226
3237
|
className: "pl-8",
|
|
3227
3238
|
inferredPropertyKeys: le,
|
|
3228
|
-
selectedPropertyKey: N ?
|
|
3239
|
+
selectedPropertyKey: N ? ne(N, B) : void 0,
|
|
3229
3240
|
properties: f.properties,
|
|
3230
3241
|
additionalFields: f.additionalFields,
|
|
3231
3242
|
propertiesOrder: Je,
|
|
@@ -3267,7 +3278,7 @@ function Gi({
|
|
|
3267
3278
|
property: h,
|
|
3268
3279
|
onPropertyChanged: ue,
|
|
3269
3280
|
onDelete: ke,
|
|
3270
|
-
onError:
|
|
3281
|
+
onError: We,
|
|
3271
3282
|
forceShowErrors: t,
|
|
3272
3283
|
initialErrors: Ke,
|
|
3273
3284
|
getData: u,
|
|
@@ -3308,13 +3319,13 @@ function Gi({
|
|
|
3308
3319
|
property: h,
|
|
3309
3320
|
onPropertyChanged: ue,
|
|
3310
3321
|
onDelete: ke,
|
|
3311
|
-
onError:
|
|
3322
|
+
onError: We,
|
|
3312
3323
|
forceShowErrors: t,
|
|
3313
3324
|
initialErrors: Ke,
|
|
3314
3325
|
getData: u,
|
|
3315
3326
|
propertyConfigs: p,
|
|
3316
3327
|
collectionEditable: s,
|
|
3317
|
-
onOkClicked: w ?
|
|
3328
|
+
onOkClicked: w ? Ge : void 0
|
|
3318
3329
|
},
|
|
3319
3330
|
`edit_view_${C}`
|
|
3320
3331
|
)
|
|
@@ -3340,7 +3351,7 @@ function Gi({
|
|
|
3340
3351
|
}
|
|
3341
3352
|
),
|
|
3342
3353
|
/* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(
|
|
3343
|
-
|
|
3354
|
+
Wi,
|
|
3344
3355
|
{
|
|
3345
3356
|
collection: f,
|
|
3346
3357
|
open: D,
|
|
@@ -3349,7 +3360,7 @@ function Gi({
|
|
|
3349
3360
|
) })
|
|
3350
3361
|
] });
|
|
3351
3362
|
}
|
|
3352
|
-
function
|
|
3363
|
+
function Ki({
|
|
3353
3364
|
open: t,
|
|
3354
3365
|
handleOk: r,
|
|
3355
3366
|
handleCancel: n,
|
|
@@ -3377,7 +3388,7 @@ function Wi({
|
|
|
3377
3388
|
}
|
|
3378
3389
|
);
|
|
3379
3390
|
}
|
|
3380
|
-
function
|
|
3391
|
+
function Zi({ open: t, onClose: r }) {
|
|
3381
3392
|
const {
|
|
3382
3393
|
entityViews: n
|
|
3383
3394
|
} = Se();
|
|
@@ -3411,7 +3422,7 @@ function Ki({ open: t, onClose: r }) {
|
|
|
3411
3422
|
}
|
|
3412
3423
|
);
|
|
3413
3424
|
}
|
|
3414
|
-
function
|
|
3425
|
+
function Ji({
|
|
3415
3426
|
collection: t,
|
|
3416
3427
|
parentCollection: r,
|
|
3417
3428
|
configController: n,
|
|
@@ -3419,7 +3430,7 @@ function Zi({
|
|
|
3419
3430
|
getUser: l,
|
|
3420
3431
|
parentCollectionIds: o
|
|
3421
3432
|
}) {
|
|
3422
|
-
const { entityViews: d } = Se(), [c, u] =
|
|
3433
|
+
const { entityViews: d } = Se(), [c, u] = G.useState(), [m, p] = G.useState(!1), [s, f] = G.useState(), [g, x] = G.useState(), {
|
|
3423
3434
|
values: y,
|
|
3424
3435
|
setFieldValue: P
|
|
3425
3436
|
} = Y(), v = t.subcollections ?? [], b = y.entityViews?.filter((C) => typeof C == "string").map((C) => wr(C, d)).filter(Boolean) ?? [], T = t.entityViews?.filter((C) => typeof C != "string") ?? [], w = b.length + T.length;
|
|
@@ -3451,7 +3462,7 @@ function Zi({
|
|
|
3451
3462
|
{
|
|
3452
3463
|
align: "right",
|
|
3453
3464
|
children: /* @__PURE__ */ e(ee, { title: "Remove", children: /* @__PURE__ */ e(
|
|
3454
|
-
|
|
3465
|
+
ie,
|
|
3455
3466
|
{
|
|
3456
3467
|
size: "small",
|
|
3457
3468
|
onClick: (O) => {
|
|
@@ -3484,7 +3495,7 @@ function Zi({
|
|
|
3484
3495
|
] }),
|
|
3485
3496
|
/* @__PURE__ */ a("div", { className: "flex-grow flex flex-col gap-4 items-start", children: [
|
|
3486
3497
|
/* @__PURE__ */ e(V, { variant: "h5", children: "Custom views" }),
|
|
3487
|
-
w === 0 && /* @__PURE__ */ e(
|
|
3498
|
+
w === 0 && /* @__PURE__ */ e(Kr, { action: /* @__PURE__ */ e(
|
|
3488
3499
|
z,
|
|
3489
3500
|
{
|
|
3490
3501
|
variant: "text",
|
|
@@ -3511,7 +3522,7 @@ function Zi({
|
|
|
3511
3522
|
{
|
|
3512
3523
|
align: "right",
|
|
3513
3524
|
children: /* @__PURE__ */ e(ee, { title: "Remove", children: /* @__PURE__ */ e(
|
|
3514
|
-
|
|
3525
|
+
ie,
|
|
3515
3526
|
{
|
|
3516
3527
|
size: "small",
|
|
3517
3528
|
onClick: (O) => {
|
|
@@ -3606,7 +3617,7 @@ function Zi({
|
|
|
3606
3617
|
}
|
|
3607
3618
|
),
|
|
3608
3619
|
/* @__PURE__ */ e(
|
|
3609
|
-
|
|
3620
|
+
Zi,
|
|
3610
3621
|
{
|
|
3611
3622
|
open: m,
|
|
3612
3623
|
onClose: (C) => {
|
|
@@ -4038,7 +4049,7 @@ const qt = {
|
|
|
4038
4049
|
}
|
|
4039
4050
|
}
|
|
4040
4051
|
};
|
|
4041
|
-
function
|
|
4052
|
+
function Qi({
|
|
4042
4053
|
path: t,
|
|
4043
4054
|
pathSuggestions: r,
|
|
4044
4055
|
parentCollection: n,
|
|
@@ -4162,7 +4173,7 @@ function Ji({
|
|
|
4162
4173
|
children: "● Create a collection from a file (csv, json, xls, xslx...)"
|
|
4163
4174
|
}
|
|
4164
4175
|
),
|
|
4165
|
-
/* @__PURE__ */ e(
|
|
4176
|
+
/* @__PURE__ */ e(pi, { onDataAdded: (g, x) => i(g, x) })
|
|
4166
4177
|
] }),
|
|
4167
4178
|
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(z, { variant: "text", onClick: () => i(), className: "my-2", children: "Continue from scratch" }) })
|
|
4168
4179
|
] }) });
|
|
@@ -4190,7 +4201,7 @@ function ot({
|
|
|
4190
4201
|
}
|
|
4191
4202
|
) });
|
|
4192
4203
|
}
|
|
4193
|
-
function
|
|
4204
|
+
function Xi({
|
|
4194
4205
|
importConfig: t,
|
|
4195
4206
|
propertyConfigs: r,
|
|
4196
4207
|
collectionEditable: n
|
|
@@ -4199,18 +4210,18 @@ function Qi({
|
|
|
4199
4210
|
setFieldValue: i,
|
|
4200
4211
|
setFieldTouched: l,
|
|
4201
4212
|
values: o
|
|
4202
|
-
} = Y(), [d, c] = j(void 0), u =
|
|
4213
|
+
} = Y(), [d, c] = j(void 0), u = G.useRef(o.propertiesOrder ? { "": o.propertiesOrder } : {}), m = d ? d.id : void 0, p = d || void 0, s = ({
|
|
4203
4214
|
id: g,
|
|
4204
4215
|
property: x,
|
|
4205
4216
|
previousId: y,
|
|
4206
4217
|
namespace: P
|
|
4207
4218
|
}) => {
|
|
4208
|
-
const v = g ?
|
|
4219
|
+
const v = g ? ne(g, P) : void 0, b = v ? me(v) : void 0, T = (C) => C ? u.current[C] ?? I(o, ye(C)) : u.current[""], w = (C, O) => {
|
|
4209
4220
|
const N = ye(O);
|
|
4210
4221
|
i(N, C, !1), u.current[O ?? ""] = C;
|
|
4211
4222
|
};
|
|
4212
4223
|
if (y && y !== g) {
|
|
4213
|
-
const C =
|
|
4224
|
+
const C = ne(y, P), O = me(C), F = T(P).map((_) => _ === y ? g : _).filter((_) => _ !== void 0);
|
|
4214
4225
|
w(F, P);
|
|
4215
4226
|
const B = { ...t.headersMapping };
|
|
4216
4227
|
Object.keys(B).forEach((_) => {
|
|
@@ -4224,8 +4235,8 @@ function Qi({
|
|
|
4224
4235
|
property: y,
|
|
4225
4236
|
namespace: P
|
|
4226
4237
|
}) => {
|
|
4227
|
-
const v = g ?
|
|
4228
|
-
...
|
|
4238
|
+
const v = g ? ne(g, P) : void 0, b = v ? me(v) : void 0, T = t.importData.map((C) => I(C, x)), w = {
|
|
4239
|
+
...ni(T, y, rr),
|
|
4229
4240
|
editable: !0
|
|
4230
4241
|
};
|
|
4231
4242
|
b && (w ? i(b, w, !1) : i(b, y, !1), l(b, !0, !1));
|
|
@@ -4234,7 +4245,7 @@ function Qi({
|
|
|
4234
4245
|
/* @__PURE__ */ a(mt, { maxWidth: "6xl", className: "flex flex-col gap-4 p-8 m-auto", children: [
|
|
4235
4246
|
/* @__PURE__ */ e(V, { variant: "h6", className: "my-4 ml-3.5", children: "Data property mapping" }),
|
|
4236
4247
|
/* @__PURE__ */ e(
|
|
4237
|
-
|
|
4248
|
+
mi,
|
|
4238
4249
|
{
|
|
4239
4250
|
importConfig: t,
|
|
4240
4251
|
destinationProperties: o.properties,
|
|
@@ -4244,7 +4255,7 @@ function Qi({
|
|
|
4244
4255
|
importKey: y,
|
|
4245
4256
|
isIdColumn: P
|
|
4246
4257
|
}) => P ? /* @__PURE__ */ e(V, { children: " This column will be used as ID" }) : /* @__PURE__ */ e(
|
|
4247
|
-
|
|
4258
|
+
hi,
|
|
4248
4259
|
{
|
|
4249
4260
|
property: g,
|
|
4250
4261
|
propertyKey: x,
|
|
@@ -4257,7 +4268,7 @@ function Qi({
|
|
|
4257
4268
|
});
|
|
4258
4269
|
},
|
|
4259
4270
|
propertyTypeView: /* @__PURE__ */ e(
|
|
4260
|
-
|
|
4271
|
+
en,
|
|
4261
4272
|
{
|
|
4262
4273
|
property: g,
|
|
4263
4274
|
disabled: !1,
|
|
@@ -4299,14 +4310,14 @@ function Qi({
|
|
|
4299
4310
|
/* @__PURE__ */ e("div", { style: { height: "52px" } })
|
|
4300
4311
|
] });
|
|
4301
4312
|
}
|
|
4302
|
-
function
|
|
4313
|
+
function en({
|
|
4303
4314
|
property: t,
|
|
4304
4315
|
onPropertyChanged: r,
|
|
4305
4316
|
propertyKey: n,
|
|
4306
4317
|
propertyConfigs: i,
|
|
4307
4318
|
disabled: l
|
|
4308
4319
|
}) {
|
|
4309
|
-
const o = t ?
|
|
4320
|
+
const o = t ? Gt(t) : null, d = t ? je(t, i) : null, [c, u] = j(!1);
|
|
4310
4321
|
return /* @__PURE__ */ e(
|
|
4311
4322
|
ee,
|
|
4312
4323
|
{
|
|
@@ -4349,14 +4360,14 @@ function Xi({
|
|
|
4349
4360
|
}
|
|
4350
4361
|
);
|
|
4351
4362
|
}
|
|
4352
|
-
function
|
|
4363
|
+
function tn({
|
|
4353
4364
|
importConfig: t,
|
|
4354
4365
|
properties: r,
|
|
4355
4366
|
propertiesOrder: n
|
|
4356
4367
|
}) {
|
|
4357
4368
|
const [i, l] = j(!1);
|
|
4358
4369
|
async function o() {
|
|
4359
|
-
const c = t.importData.map((u) =>
|
|
4370
|
+
const c = t.importData.map((u) => fi(u, t.idColumn, t.headersMapping, r, "TEMP_PATH", t.defaultValues));
|
|
4360
4371
|
t.setEntities(c);
|
|
4361
4372
|
}
|
|
4362
4373
|
ce(() => {
|
|
@@ -4437,7 +4448,7 @@ function pr(t) {
|
|
|
4437
4448
|
onOpenChange: (c) => c ? void 0 : d(),
|
|
4438
4449
|
children: [
|
|
4439
4450
|
r && /* @__PURE__ */ e(
|
|
4440
|
-
|
|
4451
|
+
rn,
|
|
4441
4452
|
{
|
|
4442
4453
|
...t,
|
|
4443
4454
|
handleCancel: d,
|
|
@@ -4445,7 +4456,7 @@ function pr(t) {
|
|
|
4445
4456
|
}
|
|
4446
4457
|
),
|
|
4447
4458
|
/* @__PURE__ */ e(
|
|
4448
|
-
|
|
4459
|
+
Ki,
|
|
4449
4460
|
{
|
|
4450
4461
|
open: l,
|
|
4451
4462
|
handleOk: () => t.handleClose(void 0),
|
|
@@ -4457,7 +4468,7 @@ function pr(t) {
|
|
|
4457
4468
|
}
|
|
4458
4469
|
);
|
|
4459
4470
|
}
|
|
4460
|
-
function
|
|
4471
|
+
function rn(t) {
|
|
4461
4472
|
const { propertyConfigs: r } = Se(), n = Te(), i = Ie(), {
|
|
4462
4473
|
topLevelNavigation: l,
|
|
4463
4474
|
collections: o
|
|
@@ -4475,7 +4486,7 @@ function tn(t) {
|
|
|
4475
4486
|
} = l, P = s ? {
|
|
4476
4487
|
...s,
|
|
4477
4488
|
id: s.id ?? s.path ?? _t(16)
|
|
4478
|
-
} : void 0, v = P ?
|
|
4489
|
+
} : void 0, v = P ? an(P, r) : {
|
|
4479
4490
|
id: d?.path ?? _t(16),
|
|
4480
4491
|
path: d?.path ?? "",
|
|
4481
4492
|
name: d?.name ?? "",
|
|
@@ -4486,7 +4497,7 @@ function tn(t) {
|
|
|
4486
4497
|
ownerId: i.user?.uid ?? ""
|
|
4487
4498
|
};
|
|
4488
4499
|
return g ? !t.isNewCollection && (!n.initialised || !g) ? /* @__PURE__ */ e(ct, {}) : /* @__PURE__ */ e(
|
|
4489
|
-
|
|
4500
|
+
nn,
|
|
4490
4501
|
{
|
|
4491
4502
|
...t,
|
|
4492
4503
|
initialValues: v,
|
|
@@ -4500,7 +4511,7 @@ function tn(t) {
|
|
|
4500
4511
|
}
|
|
4501
4512
|
) : /* @__PURE__ */ e(ct, {});
|
|
4502
4513
|
}
|
|
4503
|
-
function
|
|
4514
|
+
function nn({
|
|
4504
4515
|
isNewCollection: t,
|
|
4505
4516
|
configController: r,
|
|
4506
4517
|
editedCollectionId: n,
|
|
@@ -4525,7 +4536,7 @@ function rn({
|
|
|
4525
4536
|
propertyConfigs: C,
|
|
4526
4537
|
groups: O
|
|
4527
4538
|
}) {
|
|
4528
|
-
const N =
|
|
4539
|
+
const N = gi(), F = Te(), B = Ve(), _ = Re({}), E = t ? v ? "welcome" : "details" : "properties", [h, D] = j(E), [ae, q] = ze.useState(), Z = (k) => {
|
|
4529
4540
|
const S = k.id || k.path;
|
|
4530
4541
|
return r.saveCollection({
|
|
4531
4542
|
id: S,
|
|
@@ -4595,7 +4606,7 @@ function rn({
|
|
|
4595
4606
|
},
|
|
4596
4607
|
validation: (k) => {
|
|
4597
4608
|
let S = {};
|
|
4598
|
-
const M = (h === "properties" || h === "subcollections" || h === "details") &&
|
|
4609
|
+
const M = (h === "properties" || h === "subcollections" || h === "details") && bi;
|
|
4599
4610
|
if (M)
|
|
4600
4611
|
try {
|
|
4601
4612
|
M.validateSync(k, { abortEarly: !1 });
|
|
@@ -4607,7 +4618,7 @@ function rn({
|
|
|
4607
4618
|
if (h === "properties" && (S = { ...S, ..._.current }), h === "details") {
|
|
4608
4619
|
const L = Yt(k.path, t, y, k.id);
|
|
4609
4620
|
L && (S.path = L);
|
|
4610
|
-
const ge =
|
|
4621
|
+
const ge = on(k.id, t, y, P);
|
|
4611
4622
|
ge && (S.id = ge);
|
|
4612
4623
|
}
|
|
4613
4624
|
return S;
|
|
@@ -4618,12 +4629,12 @@ function rn({
|
|
|
4618
4629
|
isSubmitting: ke,
|
|
4619
4630
|
dirty: Ye,
|
|
4620
4631
|
submitCount: gt
|
|
4621
|
-
} = se, ue = te.path,
|
|
4632
|
+
} = se, ue = te.path, We = l?.includes("/") ? l?.split("/").slice(0, -1).join("/") + "/" + ue : ue, Ge = Yt(ue, t, y, te.id), Ke = !Ge && i ? F.convertIdsToPaths(i) : void 0, Ze = Ge ? void 0 : F.resolveAliasesFrom(We), Je = Ze && x ? () => x(Ze, Ke ?? []) : void 0;
|
|
4622
4633
|
ce(() => {
|
|
4623
4634
|
p(Ye);
|
|
4624
4635
|
}, [Ye]);
|
|
4625
4636
|
function Qe(k, S) {
|
|
4626
|
-
N.setInUse(!0),
|
|
4637
|
+
N.setInUse(!0), ai(k, rr).then((M) => {
|
|
4627
4638
|
const L = ur(M);
|
|
4628
4639
|
N.setIdColumn(L.idColumn), N.setImportData(k), N.setHeadersMapping(L.headersMapping);
|
|
4629
4640
|
const ge = (S ?? []).filter((et) => L.headersMapping[et]) ?? Object.keys(L.properties);
|
|
@@ -4638,7 +4649,7 @@ function rn({
|
|
|
4638
4649
|
}, U = b?.editable === void 0 || b?.editable === !0 || t;
|
|
4639
4650
|
return /* @__PURE__ */ e(Ae, { fullHeight: !0, children: /* @__PURE__ */ e(Ot, { value: se, children: /* @__PURE__ */ a(R, { children: [
|
|
4640
4651
|
!t && /* @__PURE__ */ a(
|
|
4641
|
-
|
|
4652
|
+
Zr,
|
|
4642
4653
|
{
|
|
4643
4654
|
value: h,
|
|
4644
4655
|
className: he(Tt, "justify-end bg-gray-50 dark:bg-gray-950 border-b"),
|
|
@@ -4663,7 +4674,7 @@ function rn({
|
|
|
4663
4674
|
h === "loading" && /* @__PURE__ */ e(ct, {}),
|
|
4664
4675
|
h === "extra_view" && ue && u?.View && /* @__PURE__ */ e(u.View, { path: ue }),
|
|
4665
4676
|
h === "welcome" && /* @__PURE__ */ e(
|
|
4666
|
-
|
|
4677
|
+
Qi,
|
|
4667
4678
|
{
|
|
4668
4679
|
path: ue,
|
|
4669
4680
|
onContinue: (k, S) => {
|
|
@@ -4675,7 +4686,7 @@ function rn({
|
|
|
4675
4686
|
}
|
|
4676
4687
|
),
|
|
4677
4688
|
h === "import_data_mapping" && N && /* @__PURE__ */ e(
|
|
4678
|
-
|
|
4689
|
+
Xi,
|
|
4679
4690
|
{
|
|
4680
4691
|
importConfig: N,
|
|
4681
4692
|
collectionEditable: U,
|
|
@@ -4683,7 +4694,7 @@ function rn({
|
|
|
4683
4694
|
}
|
|
4684
4695
|
),
|
|
4685
4696
|
h === "import_data_preview" && N && /* @__PURE__ */ e(
|
|
4686
|
-
|
|
4697
|
+
tn,
|
|
4687
4698
|
{
|
|
4688
4699
|
importConfig: N,
|
|
4689
4700
|
properties: te.properties,
|
|
@@ -4691,7 +4702,7 @@ function rn({
|
|
|
4691
4702
|
}
|
|
4692
4703
|
),
|
|
4693
4704
|
h === "import_data_saving" && N && /* @__PURE__ */ e(
|
|
4694
|
-
|
|
4705
|
+
vi,
|
|
4695
4706
|
{
|
|
4696
4707
|
importConfig: N,
|
|
4697
4708
|
collection: te,
|
|
@@ -4705,7 +4716,7 @@ function rn({
|
|
|
4705
4716
|
}
|
|
4706
4717
|
),
|
|
4707
4718
|
h === "details" && /* @__PURE__ */ e(
|
|
4708
|
-
|
|
4719
|
+
Ci,
|
|
4709
4720
|
{
|
|
4710
4721
|
existingPaths: y,
|
|
4711
4722
|
existingIds: P,
|
|
@@ -4716,7 +4727,7 @@ function rn({
|
|
|
4716
4727
|
}
|
|
4717
4728
|
),
|
|
4718
4729
|
h === "subcollections" && b && /* @__PURE__ */ e(
|
|
4719
|
-
|
|
4730
|
+
Ji,
|
|
4720
4731
|
{
|
|
4721
4732
|
parentCollection: g,
|
|
4722
4733
|
configController: r,
|
|
@@ -4745,7 +4756,7 @@ function rn({
|
|
|
4745
4756
|
propertyConfigs: C,
|
|
4746
4757
|
collectionEditable: U,
|
|
4747
4758
|
extraIcon: u?.icon && /* @__PURE__ */ e(
|
|
4748
|
-
|
|
4759
|
+
ie,
|
|
4749
4760
|
{
|
|
4750
4761
|
color: "primary",
|
|
4751
4762
|
onClick: () => D("extra_view"),
|
|
@@ -4848,7 +4859,7 @@ function rn({
|
|
|
4848
4859
|
type: "submit",
|
|
4849
4860
|
loading: ke,
|
|
4850
4861
|
disabled: ke || h === "details" && !vt,
|
|
4851
|
-
startIcon: h === "properties" ? /* @__PURE__ */ e(
|
|
4862
|
+
startIcon: h === "properties" ? /* @__PURE__ */ e(Jr, {}) : void 0,
|
|
4852
4863
|
children: [
|
|
4853
4864
|
h === "details" && "Next",
|
|
4854
4865
|
h === "properties" && "Create collection"
|
|
@@ -4873,7 +4884,7 @@ function rn({
|
|
|
4873
4884
|
)
|
|
4874
4885
|
] }) }) });
|
|
4875
4886
|
}
|
|
4876
|
-
function
|
|
4887
|
+
function an(t, r) {
|
|
4877
4888
|
const {
|
|
4878
4889
|
properties: n,
|
|
4879
4890
|
...i
|
|
@@ -4891,7 +4902,7 @@ function mr(t, r) {
|
|
|
4891
4902
|
const i = r[n.propertyConfig];
|
|
4892
4903
|
if (i && re(i.property))
|
|
4893
4904
|
n = i.property;
|
|
4894
|
-
else if (i && (n =
|
|
4905
|
+
else if (i && (n = W(i.property, n)), !re(n) && n.dataType === "map" && n.properties) {
|
|
4895
4906
|
const l = {};
|
|
4896
4907
|
Object.keys(n.properties).forEach((o) => {
|
|
4897
4908
|
l[o] = mr(n.properties[o], r);
|
|
@@ -4906,12 +4917,12 @@ function mr(t, r) {
|
|
|
4906
4917
|
const Yt = (t, r, n, i) => {
|
|
4907
4918
|
let l;
|
|
4908
4919
|
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"), Vr(t).split("/").length % 2 === 0 && (l = `Collection paths must have an odd number of segments: ${t}`), l;
|
|
4909
|
-
},
|
|
4920
|
+
}, on = (t, r, n, i) => {
|
|
4910
4921
|
if (!t)
|
|
4911
4922
|
return;
|
|
4912
4923
|
let l;
|
|
4913
4924
|
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;
|
|
4914
|
-
}, hr =
|
|
4925
|
+
}, hr = G.createContext({}), fr = G.createContext({}), ln = G.memo(
|
|
4915
4926
|
function({
|
|
4916
4927
|
children: r,
|
|
4917
4928
|
collectionConfigController: n,
|
|
@@ -4924,7 +4935,7 @@ const Yt = (t, r, n, i) => {
|
|
|
4924
4935
|
getData: m,
|
|
4925
4936
|
onAnalyticsEvent: p
|
|
4926
4937
|
}) {
|
|
4927
|
-
const s = Te(), f =
|
|
4938
|
+
const s = Te(), f = yi(), g = Ve(), { propertyConfigs: x } = Se(), [y, P] = G.useState(), [v, b] = G.useState(), T = Er(() => ({
|
|
4928
4939
|
createCollections: !0,
|
|
4929
4940
|
editCollections: !0,
|
|
4930
4941
|
deleteCollections: !0
|
|
@@ -5103,7 +5114,7 @@ const Yt = (t, r, n, i) => {
|
|
|
5103
5114
|
},
|
|
5104
5115
|
ve
|
|
5105
5116
|
), Ne = () => Jt(fr);
|
|
5106
|
-
function
|
|
5117
|
+
function sn({
|
|
5107
5118
|
path: t,
|
|
5108
5119
|
parentCollectionIds: r,
|
|
5109
5120
|
collection: n,
|
|
@@ -5118,7 +5129,7 @@ function ln({
|
|
|
5118
5129
|
{
|
|
5119
5130
|
title: u ? "Edit collection" : "You don't have permissions to edit this collection",
|
|
5120
5131
|
children: /* @__PURE__ */ e(
|
|
5121
|
-
|
|
5132
|
+
ie,
|
|
5122
5133
|
{
|
|
5123
5134
|
color: "primary",
|
|
5124
5135
|
disabled: !u,
|
|
@@ -5130,7 +5141,7 @@ function ln({
|
|
|
5130
5141
|
) });
|
|
5131
5142
|
}
|
|
5132
5143
|
const gr = () => Jt(hr);
|
|
5133
|
-
function
|
|
5144
|
+
function dn({
|
|
5134
5145
|
path: t,
|
|
5135
5146
|
collection: r
|
|
5136
5147
|
}) {
|
|
@@ -5150,10 +5161,10 @@ function sn({
|
|
|
5150
5161
|
return /* @__PURE__ */ a(R, { children: [
|
|
5151
5162
|
/* @__PURE__ */ a("div", { children: [
|
|
5152
5163
|
d.deleteCollections && /* @__PURE__ */ e(
|
|
5153
|
-
|
|
5164
|
+
Qr,
|
|
5154
5165
|
{
|
|
5155
|
-
trigger: /* @__PURE__ */ e(
|
|
5156
|
-
children: /* @__PURE__ */ a(
|
|
5166
|
+
trigger: /* @__PURE__ */ e(ie, { children: /* @__PURE__ */ e(Xr, { size: "small" }) }),
|
|
5167
|
+
children: /* @__PURE__ */ a(ei, { onClick: (s) => {
|
|
5157
5168
|
s.preventDefault(), s.stopPropagation(), m(!0);
|
|
5158
5169
|
}, children: [
|
|
5159
5170
|
/* @__PURE__ */ e(pt, {}),
|
|
@@ -5162,7 +5173,7 @@ function sn({
|
|
|
5162
5173
|
}
|
|
5163
5174
|
),
|
|
5164
5175
|
d.editCollections && /* @__PURE__ */ e(
|
|
5165
|
-
|
|
5176
|
+
ie,
|
|
5166
5177
|
{
|
|
5167
5178
|
onClick: (s) => {
|
|
5168
5179
|
c();
|
|
@@ -5187,7 +5198,7 @@ function sn({
|
|
|
5187
5198
|
)
|
|
5188
5199
|
] });
|
|
5189
5200
|
}
|
|
5190
|
-
function
|
|
5201
|
+
function cn({
|
|
5191
5202
|
propertyKey: t,
|
|
5192
5203
|
onHover: r,
|
|
5193
5204
|
property: n,
|
|
@@ -5197,7 +5208,7 @@ function dn({
|
|
|
5197
5208
|
}) {
|
|
5198
5209
|
const d = Ne();
|
|
5199
5210
|
return /* @__PURE__ */ e(ee, { title: "Edit", children: /* @__PURE__ */ e(
|
|
5200
|
-
|
|
5211
|
+
ie,
|
|
5201
5212
|
{
|
|
5202
5213
|
className: r ? "bg-white dark:bg-gray-950" : "hidden",
|
|
5203
5214
|
onClick: () => {
|
|
@@ -5214,7 +5225,7 @@ function dn({
|
|
|
5214
5225
|
}
|
|
5215
5226
|
) });
|
|
5216
5227
|
}
|
|
5217
|
-
function
|
|
5228
|
+
function un({
|
|
5218
5229
|
fullPath: t,
|
|
5219
5230
|
parentCollectionIds: r,
|
|
5220
5231
|
collection: n
|
|
@@ -5239,7 +5250,7 @@ function cn({
|
|
|
5239
5250
|
}
|
|
5240
5251
|
) });
|
|
5241
5252
|
}
|
|
5242
|
-
function
|
|
5253
|
+
function pn() {
|
|
5243
5254
|
const t = Ne();
|
|
5244
5255
|
return /* @__PURE__ */ e("div", { className: "bg-gray-50 dark:bg-gray-900 min-w-fit rounded", children: /* @__PURE__ */ a(
|
|
5245
5256
|
z,
|
|
@@ -5258,7 +5269,7 @@ function un() {
|
|
|
5258
5269
|
}
|
|
5259
5270
|
) });
|
|
5260
5271
|
}
|
|
5261
|
-
function
|
|
5272
|
+
function mn({
|
|
5262
5273
|
path: t,
|
|
5263
5274
|
parentCollectionIds: r,
|
|
5264
5275
|
collection: n,
|
|
@@ -5283,7 +5294,7 @@ function pn({
|
|
|
5283
5294
|
onClick: () => d?.saveCollection({
|
|
5284
5295
|
id: n.id,
|
|
5285
5296
|
parentCollectionIds: r,
|
|
5286
|
-
collectionData:
|
|
5297
|
+
collectionData: W(
|
|
5287
5298
|
n,
|
|
5288
5299
|
{
|
|
5289
5300
|
initialFilter: i.filterValues ?? null,
|
|
@@ -5296,7 +5307,7 @@ function pn({
|
|
|
5296
5307
|
message: "Default config saved"
|
|
5297
5308
|
});
|
|
5298
5309
|
}),
|
|
5299
|
-
children: /* @__PURE__ */ e(
|
|
5310
|
+
children: /* @__PURE__ */ e(ti, {})
|
|
5300
5311
|
}
|
|
5301
5312
|
)
|
|
5302
5313
|
}
|
|
@@ -5314,7 +5325,7 @@ function pn({
|
|
|
5314
5325
|
onClick: () => {
|
|
5315
5326
|
i.clearFilter?.(), n?.initialFilter && i.setFilterValues?.(n?.initialFilter), n?.initialSort && i.setSortBy?.(n?.initialSort);
|
|
5316
5327
|
},
|
|
5317
|
-
children: /* @__PURE__ */ e(
|
|
5328
|
+
children: /* @__PURE__ */ e(ri, {})
|
|
5318
5329
|
}
|
|
5319
5330
|
)
|
|
5320
5331
|
}
|
|
@@ -5324,7 +5335,7 @@ function pn({
|
|
|
5324
5335
|
function lt(t) {
|
|
5325
5336
|
return t && Object.keys(t).length === 0 ? t : t ?? null;
|
|
5326
5337
|
}
|
|
5327
|
-
function
|
|
5338
|
+
function hn({
|
|
5328
5339
|
group: t,
|
|
5329
5340
|
context: r
|
|
5330
5341
|
}) {
|
|
@@ -5365,7 +5376,7 @@ function mn({
|
|
|
5365
5376
|
}
|
|
5366
5377
|
);
|
|
5367
5378
|
}
|
|
5368
|
-
function
|
|
5379
|
+
function In({
|
|
5369
5380
|
collectionConfigController: t,
|
|
5370
5381
|
configPermissions: r,
|
|
5371
5382
|
reservedGroups: n,
|
|
@@ -5380,7 +5391,7 @@ function Vn({
|
|
|
5380
5391
|
key: "collection_editor",
|
|
5381
5392
|
loading: t.loading,
|
|
5382
5393
|
provider: {
|
|
5383
|
-
Component:
|
|
5394
|
+
Component: ln,
|
|
5384
5395
|
props: {
|
|
5385
5396
|
collectionConfigController: t,
|
|
5386
5397
|
configPermissions: r,
|
|
@@ -5394,21 +5405,21 @@ function Vn({
|
|
|
5394
5405
|
}
|
|
5395
5406
|
},
|
|
5396
5407
|
homePage: {
|
|
5397
|
-
additionalActions: /* @__PURE__ */ e(
|
|
5398
|
-
additionalChildrenStart: /* @__PURE__ */ e(
|
|
5408
|
+
additionalActions: /* @__PURE__ */ e(pn, {}),
|
|
5409
|
+
additionalChildrenStart: /* @__PURE__ */ e(fn, {}),
|
|
5399
5410
|
// additionalChildrenEnd: <RootCollectionSuggestions introMode={introMode}/>,
|
|
5400
|
-
CollectionActions:
|
|
5401
|
-
AdditionalCards:
|
|
5411
|
+
CollectionActions: dn,
|
|
5412
|
+
AdditionalCards: hn
|
|
5402
5413
|
},
|
|
5403
5414
|
collectionView: {
|
|
5404
|
-
CollectionActionsStart:
|
|
5405
|
-
CollectionActions:
|
|
5406
|
-
HeaderAction:
|
|
5407
|
-
AddColumnComponent:
|
|
5415
|
+
CollectionActionsStart: mn,
|
|
5416
|
+
CollectionActions: sn,
|
|
5417
|
+
HeaderAction: cn,
|
|
5418
|
+
AddColumnComponent: un
|
|
5408
5419
|
}
|
|
5409
5420
|
};
|
|
5410
5421
|
}
|
|
5411
|
-
function
|
|
5422
|
+
function fn({}) {
|
|
5412
5423
|
const t = Te();
|
|
5413
5424
|
if (!t.topLevelNavigation)
|
|
5414
5425
|
throw Error("Navigation not ready in FireCMSHomePage");
|
|
@@ -5441,7 +5452,7 @@ function hn({}) {
|
|
|
5441
5452
|
}
|
|
5442
5453
|
);
|
|
5443
5454
|
}
|
|
5444
|
-
const
|
|
5455
|
+
const _n = (t, r, n) => {
|
|
5445
5456
|
const i = (d) => {
|
|
5446
5457
|
Le(d.properties), d.subcollections?.forEach(i);
|
|
5447
5458
|
}, l = r ?? [];
|
|
@@ -5449,8 +5460,8 @@ const In = (t, r, n) => {
|
|
|
5449
5460
|
const o = _r(t, l, [], n);
|
|
5450
5461
|
return console.debug("Collections after joining:", o), o;
|
|
5451
5462
|
};
|
|
5452
|
-
function
|
|
5453
|
-
const r = Te(), n =
|
|
5463
|
+
function Fn({ path: t }) {
|
|
5464
|
+
const r = Te(), n = gn(t), i = r.getParentCollectionIds(t), l = Ne();
|
|
5454
5465
|
return /* @__PURE__ */ a("div", { className: "p-1 flex flex-col items-center", children: [
|
|
5455
5466
|
/* @__PURE__ */ e(Kt, { error: "No collection for path: " + n }),
|
|
5456
5467
|
/* @__PURE__ */ e(
|
|
@@ -5472,22 +5483,22 @@ function _n({ path: t }) {
|
|
|
5472
5483
|
)
|
|
5473
5484
|
] });
|
|
5474
5485
|
}
|
|
5475
|
-
function
|
|
5486
|
+
function gn(t) {
|
|
5476
5487
|
const r = t.split("/");
|
|
5477
5488
|
return r[r.length - 1];
|
|
5478
5489
|
}
|
|
5479
5490
|
export {
|
|
5480
|
-
|
|
5491
|
+
Fn as MissingReferenceWidget,
|
|
5481
5492
|
Ue as editableProperty,
|
|
5482
|
-
|
|
5493
|
+
ne as getFullId,
|
|
5483
5494
|
nr as getFullIdPath,
|
|
5484
5495
|
me as idToPropertiesPath,
|
|
5485
|
-
|
|
5496
|
+
_n as mergeCollections,
|
|
5486
5497
|
ye as namespaceToPropertiesOrderPath,
|
|
5487
5498
|
ir as namespaceToPropertiesPath,
|
|
5488
|
-
|
|
5499
|
+
Ti as removeNonEditableProperties,
|
|
5489
5500
|
Ne as useCollectionEditorController,
|
|
5490
|
-
|
|
5501
|
+
In as useCollectionEditorPlugin,
|
|
5491
5502
|
gr as useCollectionsConfigController
|
|
5492
5503
|
};
|
|
5493
5504
|
//# sourceMappingURL=index.es.js.map
|