@firecms/collection_editor 3.0.0-canary.167 → 3.0.0-canary.169
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 +490 -338
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +489 -337
- package/dist/index.umd.js.map +1 -1
- package/dist/ui/collection_editor/LayoutModeSwitch.d.ts +5 -0
- package/package.json +8 -8
- package/src/ConfigControllerProvider.tsx +1 -1
- package/src/ui/collection_editor/CollectionDetailsForm.tsx +9 -1
- package/src/ui/collection_editor/CollectionEditorDialog.tsx +2 -2
- package/src/ui/collection_editor/EnumForm.tsx +1 -1
- package/src/ui/collection_editor/LayoutModeSwitch.tsx +53 -0
- package/src/ui/collection_editor/import/CollectionEditorImportDataPreview.tsx +1 -0
package/dist/index.es.js
CHANGED
|
@@ -4,7 +4,7 @@ import { FieldCaption, SearchIconsView, toSnakeCase, singular, IconForView, Arra
|
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import React__default, { useContext, useState, useEffect, useMemo, useRef, useDeferredValue } from "react";
|
|
6
6
|
import equal from "react-fast-compare";
|
|
7
|
-
import {
|
|
7
|
+
import { cls, Typography, VerticalSplitIcon, Tooltip, Card, SquareIcon, useAutoComplete, Chip, TextField, Autocomplete, AutocompleteItem, SelectItem, Container, IconButton, DebouncedTextField, SettingsIcon, CloseIcon, Select, BooleanSwitchWithLabel, ExpandablePanel, Dialog, Badge, AutorenewIcon, ListIcon, Button, CircularProgress, Paper, DialogTitle, DialogContent, DialogActions, RuleIcon, MultiSelectItem, CloudUploadIcon, MultiSelect, cardMixin, cardClickableMixin, cardSelectedMixin, FunctionsIcon, DoNotDisturbOnIcon, defaultBorderMixin, RemoveIcon, DragHandleIcon, AddIcon, SelectGroup, DeleteIcon, InfoLabel, fieldBackgroundMixin, fieldBackgroundDisabledMixin, fieldBackgroundHoverMixin, WarningIcon, ContentCopyIcon, CodeIcon, Table, TableBody, TableRow, TableCell, Alert, Icon, coolIconKeys, Tabs, Tab, ArrowBackIcon, LoadingButton, CheckIcon, Menu, MoreVertIcon, MenuItem, UndoIcon, SaveIcon } from "@firecms/ui";
|
|
8
8
|
import * as Yup from "yup";
|
|
9
9
|
import { useFormex, getIn, Field, useCreateFormex, Formex, clone } from "@firecms/formex";
|
|
10
10
|
import { extractEnumFromValues, buildPropertyFromData, buildEntityPropertiesFromData } from "@firecms/schema_inference";
|
|
@@ -21,8 +21,140 @@ const YupSchema = Yup.object().shape({
|
|
|
21
21
|
const useCollectionEditorController = () => {
|
|
22
22
|
return useContext(CollectionEditorContext);
|
|
23
23
|
};
|
|
24
|
+
function LayoutModeSwitch(t0) {
|
|
25
|
+
const $ = c(28);
|
|
26
|
+
const {
|
|
27
|
+
value,
|
|
28
|
+
onChange,
|
|
29
|
+
className
|
|
30
|
+
} = t0;
|
|
31
|
+
let t1;
|
|
32
|
+
if ($[0] !== className) {
|
|
33
|
+
t1 = cls(className);
|
|
34
|
+
$[0] = className;
|
|
35
|
+
$[1] = t1;
|
|
36
|
+
} else {
|
|
37
|
+
t1 = $[1];
|
|
38
|
+
}
|
|
39
|
+
let t2;
|
|
40
|
+
let t3;
|
|
41
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
42
|
+
t2 = /* @__PURE__ */ jsx(Typography, { variant: "label", color: "secondary", className: "ml-3.5", children: "Document view" });
|
|
43
|
+
t3 = cls("flex flex-row gap-4");
|
|
44
|
+
$[2] = t2;
|
|
45
|
+
$[3] = t3;
|
|
46
|
+
} else {
|
|
47
|
+
t2 = $[2];
|
|
48
|
+
t3 = $[3];
|
|
49
|
+
}
|
|
50
|
+
let t4;
|
|
51
|
+
if ($[4] !== onChange) {
|
|
52
|
+
t4 = () => onChange("side_panel");
|
|
53
|
+
$[4] = onChange;
|
|
54
|
+
$[5] = t4;
|
|
55
|
+
} else {
|
|
56
|
+
t4 = $[5];
|
|
57
|
+
}
|
|
58
|
+
const t5 = value === "side_panel" ? "border-primary dark:border-primary" : "border-surface-400 dark:border-surface-600";
|
|
59
|
+
let t6;
|
|
60
|
+
if ($[6] !== t5) {
|
|
61
|
+
t6 = cls("my-2 rounded-md mx-0 p-4 focus:outline-none transition ease-in-out duration-150 flex flex-row gap-4 items-center", "text-surface-700 dark:text-surface-accent-300", "hover:text-primary-dark dark:hover:text-primary focus:ring-primary hover:ring-1 hover:ring-primary", t5);
|
|
62
|
+
$[6] = t5;
|
|
63
|
+
$[7] = t6;
|
|
64
|
+
} else {
|
|
65
|
+
t6 = $[7];
|
|
66
|
+
}
|
|
67
|
+
let t7;
|
|
68
|
+
let t8;
|
|
69
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
70
|
+
t7 = /* @__PURE__ */ jsx(VerticalSplitIcon, {});
|
|
71
|
+
t8 = /* @__PURE__ */ jsx(Typography, { variant: "label", children: "Side panel" });
|
|
72
|
+
$[8] = t7;
|
|
73
|
+
$[9] = t8;
|
|
74
|
+
} else {
|
|
75
|
+
t7 = $[8];
|
|
76
|
+
t8 = $[9];
|
|
77
|
+
}
|
|
78
|
+
let t9;
|
|
79
|
+
if ($[10] !== t4 || $[11] !== t6) {
|
|
80
|
+
t9 = /* @__PURE__ */ jsx(Tooltip, { title: "Documents are open in a side panel", children: /* @__PURE__ */ jsxs(Card, { onClick: t4, className: t6, children: [
|
|
81
|
+
t7,
|
|
82
|
+
t8
|
|
83
|
+
] }) });
|
|
84
|
+
$[10] = t4;
|
|
85
|
+
$[11] = t6;
|
|
86
|
+
$[12] = t9;
|
|
87
|
+
} else {
|
|
88
|
+
t9 = $[12];
|
|
89
|
+
}
|
|
90
|
+
let t10;
|
|
91
|
+
if ($[13] !== onChange) {
|
|
92
|
+
t10 = () => onChange("full_screen");
|
|
93
|
+
$[13] = onChange;
|
|
94
|
+
$[14] = t10;
|
|
95
|
+
} else {
|
|
96
|
+
t10 = $[14];
|
|
97
|
+
}
|
|
98
|
+
const t11 = value === "full_screen" ? "border-primary dark:border-primary" : "border-surface-400 dark:border-surface-600";
|
|
99
|
+
let t12;
|
|
100
|
+
if ($[15] !== t11) {
|
|
101
|
+
t12 = cls("my-2 rounded-md mx-0 p-4 focus:outline-none transition ease-in-out duration-150 flex flex-row gap-4 items-center", "text-surface-700 dark:text-surface-accent-300", "hover:text-primary-dark dark:hover:text-primary focus:ring-primary hover:ring-1 hover:ring-primary", t11);
|
|
102
|
+
$[15] = t11;
|
|
103
|
+
$[16] = t12;
|
|
104
|
+
} else {
|
|
105
|
+
t12 = $[16];
|
|
106
|
+
}
|
|
107
|
+
let t13;
|
|
108
|
+
let t14;
|
|
109
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
110
|
+
t13 = /* @__PURE__ */ jsx(SquareIcon, {});
|
|
111
|
+
t14 = /* @__PURE__ */ jsx(Typography, { variant: "label", children: "Full screen" });
|
|
112
|
+
$[17] = t13;
|
|
113
|
+
$[18] = t14;
|
|
114
|
+
} else {
|
|
115
|
+
t13 = $[17];
|
|
116
|
+
t14 = $[18];
|
|
117
|
+
}
|
|
118
|
+
let t15;
|
|
119
|
+
if ($[19] !== t10 || $[20] !== t12) {
|
|
120
|
+
t15 = /* @__PURE__ */ jsx(Tooltip, { title: "Documents are open full-screen", children: /* @__PURE__ */ jsxs(Card, { onClick: t10, className: t12, children: [
|
|
121
|
+
t13,
|
|
122
|
+
t14
|
|
123
|
+
] }) });
|
|
124
|
+
$[19] = t10;
|
|
125
|
+
$[20] = t12;
|
|
126
|
+
$[21] = t15;
|
|
127
|
+
} else {
|
|
128
|
+
t15 = $[21];
|
|
129
|
+
}
|
|
130
|
+
let t16;
|
|
131
|
+
if ($[22] !== t15 || $[23] !== t9) {
|
|
132
|
+
t16 = /* @__PURE__ */ jsxs("div", { className: t3, children: [
|
|
133
|
+
t9,
|
|
134
|
+
t15
|
|
135
|
+
] });
|
|
136
|
+
$[22] = t15;
|
|
137
|
+
$[23] = t9;
|
|
138
|
+
$[24] = t16;
|
|
139
|
+
} else {
|
|
140
|
+
t16 = $[24];
|
|
141
|
+
}
|
|
142
|
+
let t17;
|
|
143
|
+
if ($[25] !== t1 || $[26] !== t16) {
|
|
144
|
+
t17 = /* @__PURE__ */ jsxs("div", { className: t1, children: [
|
|
145
|
+
t2,
|
|
146
|
+
t16
|
|
147
|
+
] });
|
|
148
|
+
$[25] = t1;
|
|
149
|
+
$[26] = t16;
|
|
150
|
+
$[27] = t17;
|
|
151
|
+
} else {
|
|
152
|
+
t17 = $[27];
|
|
153
|
+
}
|
|
154
|
+
return t17;
|
|
155
|
+
}
|
|
24
156
|
function CollectionDetailsForm(t0) {
|
|
25
|
-
const $ = c(
|
|
157
|
+
const $ = c(174);
|
|
26
158
|
const {
|
|
27
159
|
isNewCollection,
|
|
28
160
|
reservedGroups,
|
|
@@ -311,235 +443,253 @@ function CollectionDetailsForm(t0) {
|
|
|
311
443
|
}, children: /* @__PURE__ */ jsx("div", { className: "flex-grow", children: group_0 }) }, index + "_" + group_0)) }),
|
|
312
444
|
/* @__PURE__ */ jsx(FieldCaption, { children: showErrors && Boolean(errors.group) ? errors.group : "Group in the home page" })
|
|
313
445
|
] });
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
]
|
|
320
|
-
|
|
446
|
+
const t38 = values.openEntityMode ?? "side_panel";
|
|
447
|
+
let t39;
|
|
448
|
+
if ($[55] !== setFieldValue) {
|
|
449
|
+
t39 = (value) => setFieldValue("openEntityMode", value);
|
|
450
|
+
$[55] = setFieldValue;
|
|
451
|
+
$[56] = t39;
|
|
452
|
+
} else {
|
|
453
|
+
t39 = $[56];
|
|
454
|
+
}
|
|
455
|
+
let t40;
|
|
456
|
+
if ($[57] !== t38 || $[58] !== t39) {
|
|
457
|
+
t40 = /* @__PURE__ */ jsx(LayoutModeSwitch, { className: "col-span-12", value: t38, onChange: t39 });
|
|
458
|
+
$[57] = t38;
|
|
459
|
+
$[58] = t39;
|
|
460
|
+
$[59] = t40;
|
|
321
461
|
} else {
|
|
322
|
-
|
|
462
|
+
t40 = $[59];
|
|
323
463
|
}
|
|
324
|
-
const t39 = !isNewCollection;
|
|
325
|
-
const t40 = showErrors && Boolean(errors.id);
|
|
326
464
|
let t41;
|
|
327
|
-
if ($[
|
|
328
|
-
t41 = /* @__PURE__ */
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
465
|
+
if ($[60] === Symbol.for("react.memo_cache_sentinel")) {
|
|
466
|
+
t41 = /* @__PURE__ */ jsxs("div", { className: "flex flex-row text-surface-500", children: [
|
|
467
|
+
/* @__PURE__ */ jsx(SettingsIcon, {}),
|
|
468
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "ml-2", children: "Advanced" })
|
|
469
|
+
] });
|
|
470
|
+
$[60] = t41;
|
|
332
471
|
} else {
|
|
333
|
-
t41 = $[
|
|
472
|
+
t41 = $[60];
|
|
334
473
|
}
|
|
335
|
-
const t42 =
|
|
336
|
-
const t43 =
|
|
474
|
+
const t42 = !isNewCollection;
|
|
475
|
+
const t43 = showErrors && Boolean(errors.id);
|
|
337
476
|
let t44;
|
|
338
|
-
if ($[
|
|
339
|
-
t44 = /* @__PURE__ */ jsx(
|
|
340
|
-
$[
|
|
341
|
-
$[
|
|
342
|
-
$[61] = t44;
|
|
343
|
-
} else {
|
|
344
|
-
t44 = $[61];
|
|
345
|
-
}
|
|
346
|
-
let t45;
|
|
347
|
-
if ($[62] !== t41 || $[63] !== t44) {
|
|
348
|
-
t45 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
|
|
349
|
-
t41,
|
|
350
|
-
t44
|
|
351
|
-
] });
|
|
352
|
-
$[62] = t41;
|
|
477
|
+
if ($[61] !== t42 || $[62] !== t43) {
|
|
478
|
+
t44 = /* @__PURE__ */ jsx(Field, { name: "id", as: DebouncedTextField, disabled: t42, label: "Collection id", error: t43 });
|
|
479
|
+
$[61] = t42;
|
|
480
|
+
$[62] = t43;
|
|
353
481
|
$[63] = t44;
|
|
354
|
-
$[64] = t45;
|
|
355
482
|
} else {
|
|
356
|
-
|
|
483
|
+
t44 = $[63];
|
|
357
484
|
}
|
|
358
|
-
const
|
|
485
|
+
const t45 = touched.id && Boolean(errors.id);
|
|
486
|
+
const t46 = touched.id && Boolean(errors.id) ? errors.id : "This id identifies this collection. Typically the same as the path.";
|
|
359
487
|
let t47;
|
|
360
|
-
if ($[
|
|
361
|
-
t47 = (
|
|
488
|
+
if ($[64] !== t45 || $[65] !== t46) {
|
|
489
|
+
t47 = /* @__PURE__ */ jsx(FieldCaption, { error: t45, children: t46 });
|
|
490
|
+
$[64] = t45;
|
|
491
|
+
$[65] = t46;
|
|
492
|
+
$[66] = t47;
|
|
493
|
+
} else {
|
|
494
|
+
t47 = $[66];
|
|
495
|
+
}
|
|
496
|
+
let t48;
|
|
497
|
+
if ($[67] !== t44 || $[68] !== t47) {
|
|
498
|
+
t48 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
|
|
499
|
+
t44,
|
|
500
|
+
t47
|
|
501
|
+
] });
|
|
502
|
+
$[67] = t44;
|
|
503
|
+
$[68] = t47;
|
|
504
|
+
$[69] = t48;
|
|
505
|
+
} else {
|
|
506
|
+
t48 = $[69];
|
|
507
|
+
}
|
|
508
|
+
const t49 = showErrors && Boolean(errors.singularName);
|
|
509
|
+
let t50;
|
|
510
|
+
if ($[70] !== handleChange || $[71] !== setFieldTouched) {
|
|
511
|
+
t50 = (e_0) => {
|
|
362
512
|
setFieldTouched("singularName", true);
|
|
363
513
|
return handleChange(e_0);
|
|
364
514
|
};
|
|
365
|
-
$[
|
|
366
|
-
$[
|
|
367
|
-
$[
|
|
515
|
+
$[70] = handleChange;
|
|
516
|
+
$[71] = setFieldTouched;
|
|
517
|
+
$[72] = t50;
|
|
368
518
|
} else {
|
|
369
|
-
|
|
519
|
+
t50 = $[72];
|
|
370
520
|
}
|
|
371
|
-
const
|
|
372
|
-
let
|
|
373
|
-
if ($[
|
|
374
|
-
|
|
375
|
-
$[
|
|
376
|
-
$[
|
|
377
|
-
$[
|
|
378
|
-
$[
|
|
521
|
+
const t51 = values.singularName ?? "";
|
|
522
|
+
let t52;
|
|
523
|
+
if ($[73] !== t49 || $[74] !== t50 || $[75] !== t51) {
|
|
524
|
+
t52 = /* @__PURE__ */ jsx(TextField, { error: t49, name: "singularName", "aria-describedby": "singularName-helper", onChange: t50, value: t51, label: "Singular name" });
|
|
525
|
+
$[73] = t49;
|
|
526
|
+
$[74] = t50;
|
|
527
|
+
$[75] = t51;
|
|
528
|
+
$[76] = t52;
|
|
379
529
|
} else {
|
|
380
|
-
|
|
530
|
+
t52 = $[76];
|
|
381
531
|
}
|
|
382
|
-
const
|
|
383
|
-
const
|
|
384
|
-
let
|
|
385
|
-
if ($[
|
|
386
|
-
|
|
387
|
-
$[
|
|
388
|
-
$[
|
|
389
|
-
$[
|
|
532
|
+
const t53 = showErrors && Boolean(errors.singularName);
|
|
533
|
+
const t54 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define a singular name for your entities";
|
|
534
|
+
let t55;
|
|
535
|
+
if ($[77] !== t53 || $[78] !== t54) {
|
|
536
|
+
t55 = /* @__PURE__ */ jsx(FieldCaption, { error: t53, children: t54 });
|
|
537
|
+
$[77] = t53;
|
|
538
|
+
$[78] = t54;
|
|
539
|
+
$[79] = t55;
|
|
390
540
|
} else {
|
|
391
|
-
|
|
541
|
+
t55 = $[79];
|
|
392
542
|
}
|
|
393
|
-
let
|
|
394
|
-
if ($[
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
543
|
+
let t56;
|
|
544
|
+
if ($[80] !== t52 || $[81] !== t55) {
|
|
545
|
+
t56 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
|
|
546
|
+
t52,
|
|
547
|
+
t55
|
|
398
548
|
] });
|
|
399
|
-
$[
|
|
400
|
-
$[
|
|
401
|
-
$[
|
|
549
|
+
$[80] = t52;
|
|
550
|
+
$[81] = t55;
|
|
551
|
+
$[82] = t56;
|
|
402
552
|
} else {
|
|
403
|
-
|
|
553
|
+
t56 = $[82];
|
|
404
554
|
}
|
|
405
|
-
const
|
|
406
|
-
let
|
|
407
|
-
if ($[
|
|
408
|
-
|
|
555
|
+
const t57 = showErrors && Boolean(errors.sideDialogWidth);
|
|
556
|
+
let t58;
|
|
557
|
+
if ($[83] !== setFieldTouched || $[84] !== setFieldValue) {
|
|
558
|
+
t58 = (e_1) => {
|
|
409
559
|
setFieldTouched("sideDialogWidth", true);
|
|
410
|
-
const
|
|
411
|
-
if (!
|
|
560
|
+
const value_0 = e_1.target.value;
|
|
561
|
+
if (!value_0) {
|
|
412
562
|
setFieldValue("sideDialogWidth", null);
|
|
413
563
|
} else {
|
|
414
|
-
if (!isNaN(Number(
|
|
415
|
-
setFieldValue("sideDialogWidth", Number(
|
|
564
|
+
if (!isNaN(Number(value_0))) {
|
|
565
|
+
setFieldValue("sideDialogWidth", Number(value_0));
|
|
416
566
|
}
|
|
417
567
|
}
|
|
418
568
|
};
|
|
419
|
-
$[
|
|
420
|
-
$[
|
|
421
|
-
$[
|
|
569
|
+
$[83] = setFieldTouched;
|
|
570
|
+
$[84] = setFieldValue;
|
|
571
|
+
$[85] = t58;
|
|
422
572
|
} else {
|
|
423
|
-
|
|
573
|
+
t58 = $[85];
|
|
424
574
|
}
|
|
425
|
-
let
|
|
426
|
-
if ($[
|
|
427
|
-
|
|
575
|
+
let t59;
|
|
576
|
+
if ($[86] !== setFieldValue) {
|
|
577
|
+
t59 = () => {
|
|
428
578
|
setFieldValue("sideDialogWidth", null);
|
|
429
579
|
};
|
|
430
|
-
$[
|
|
431
|
-
$[
|
|
580
|
+
$[86] = setFieldValue;
|
|
581
|
+
$[87] = t59;
|
|
432
582
|
} else {
|
|
433
|
-
|
|
583
|
+
t59 = $[87];
|
|
434
584
|
}
|
|
435
|
-
const
|
|
436
|
-
let
|
|
437
|
-
if ($[
|
|
438
|
-
|
|
439
|
-
$[
|
|
440
|
-
} else {
|
|
441
|
-
t58 = $[83];
|
|
442
|
-
}
|
|
443
|
-
let t59;
|
|
444
|
-
if ($[84] !== t56 || $[85] !== t57) {
|
|
445
|
-
t59 = /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: t56, disabled: t57, children: t58 });
|
|
446
|
-
$[84] = t56;
|
|
447
|
-
$[85] = t57;
|
|
448
|
-
$[86] = t59;
|
|
585
|
+
const t60 = !values.sideDialogWidth;
|
|
586
|
+
let t61;
|
|
587
|
+
if ($[88] === Symbol.for("react.memo_cache_sentinel")) {
|
|
588
|
+
t61 = /* @__PURE__ */ jsx(CloseIcon, { size: "small" });
|
|
589
|
+
$[88] = t61;
|
|
449
590
|
} else {
|
|
450
|
-
|
|
591
|
+
t61 = $[88];
|
|
451
592
|
}
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
t61 = /* @__PURE__ */ jsx(TextField, { error: t54, name: "sideDialogWidth", type: "number", "aria-describedby": "sideDialogWidth-helper", onChange: t55, endAdornment: t59, value: t60, label: "Side dialog width" });
|
|
456
|
-
$[87] = t54;
|
|
457
|
-
$[88] = t55;
|
|
593
|
+
let t62;
|
|
594
|
+
if ($[89] !== t59 || $[90] !== t60) {
|
|
595
|
+
t62 = /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: t59, disabled: t60, children: t61 });
|
|
458
596
|
$[89] = t59;
|
|
459
597
|
$[90] = t60;
|
|
460
|
-
$[91] =
|
|
598
|
+
$[91] = t62;
|
|
461
599
|
} else {
|
|
462
|
-
|
|
600
|
+
t62 = $[91];
|
|
463
601
|
}
|
|
464
|
-
const
|
|
465
|
-
const t63 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define the width (in pixels) of entities side dialog. Default is 768px";
|
|
602
|
+
const t63 = values.sideDialogWidth ?? "";
|
|
466
603
|
let t64;
|
|
467
|
-
if ($[92] !==
|
|
468
|
-
t64 = /* @__PURE__ */ jsx(
|
|
469
|
-
$[92] =
|
|
470
|
-
$[93] =
|
|
471
|
-
$[94] =
|
|
472
|
-
|
|
473
|
-
t64 = $[94];
|
|
474
|
-
}
|
|
475
|
-
let t65;
|
|
476
|
-
if ($[95] !== t61 || $[96] !== t64) {
|
|
477
|
-
t65 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
|
|
478
|
-
t61,
|
|
479
|
-
t64
|
|
480
|
-
] });
|
|
481
|
-
$[95] = t61;
|
|
604
|
+
if ($[92] !== t57 || $[93] !== t58 || $[94] !== t62 || $[95] !== t63) {
|
|
605
|
+
t64 = /* @__PURE__ */ jsx(TextField, { error: t57, name: "sideDialogWidth", type: "number", "aria-describedby": "sideDialogWidth-helper", onChange: t58, endAdornment: t62, value: t63, label: "Side dialog width" });
|
|
606
|
+
$[92] = t57;
|
|
607
|
+
$[93] = t58;
|
|
608
|
+
$[94] = t62;
|
|
609
|
+
$[95] = t63;
|
|
482
610
|
$[96] = t64;
|
|
611
|
+
} else {
|
|
612
|
+
t64 = $[96];
|
|
613
|
+
}
|
|
614
|
+
const t65 = showErrors && Boolean(errors.singularName);
|
|
615
|
+
const t66 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define the width (in pixels) of entities side dialog. Default is 768px";
|
|
616
|
+
let t67;
|
|
617
|
+
if ($[97] !== t65 || $[98] !== t66) {
|
|
618
|
+
t67 = /* @__PURE__ */ jsx(FieldCaption, { error: t65, children: t66 });
|
|
483
619
|
$[97] = t65;
|
|
620
|
+
$[98] = t66;
|
|
621
|
+
$[99] = t67;
|
|
484
622
|
} else {
|
|
485
|
-
|
|
623
|
+
t67 = $[99];
|
|
486
624
|
}
|
|
487
|
-
const t66 = showErrors && Boolean(errors.description);
|
|
488
|
-
const t67 = values.description ?? "";
|
|
489
625
|
let t68;
|
|
490
|
-
if ($[
|
|
491
|
-
t68 = /* @__PURE__ */
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
$[
|
|
626
|
+
if ($[100] !== t64 || $[101] !== t67) {
|
|
627
|
+
t68 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
|
|
628
|
+
t64,
|
|
629
|
+
t67
|
|
630
|
+
] });
|
|
631
|
+
$[100] = t64;
|
|
632
|
+
$[101] = t67;
|
|
633
|
+
$[102] = t68;
|
|
496
634
|
} else {
|
|
497
|
-
t68 = $[
|
|
635
|
+
t68 = $[102];
|
|
498
636
|
}
|
|
499
637
|
const t69 = showErrors && Boolean(errors.description);
|
|
500
|
-
const t70 =
|
|
638
|
+
const t70 = values.description ?? "";
|
|
501
639
|
let t71;
|
|
502
|
-
if ($[
|
|
503
|
-
t71 = /* @__PURE__ */ jsx(
|
|
504
|
-
$[
|
|
505
|
-
$[
|
|
506
|
-
$[
|
|
507
|
-
} else {
|
|
508
|
-
t71 = $[104];
|
|
509
|
-
}
|
|
510
|
-
let t72;
|
|
511
|
-
if ($[105] !== t68 || $[106] !== t71) {
|
|
512
|
-
t72 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
|
|
513
|
-
t68,
|
|
514
|
-
t71
|
|
515
|
-
] });
|
|
516
|
-
$[105] = t68;
|
|
640
|
+
if ($[103] !== handleChange || $[104] !== t69 || $[105] !== t70) {
|
|
641
|
+
t71 = /* @__PURE__ */ jsx(TextField, { error: t69, name: "description", value: t70, onChange: handleChange, multiline: true, rows: 2, "aria-describedby": "description-helper-text", label: "Description" });
|
|
642
|
+
$[103] = handleChange;
|
|
643
|
+
$[104] = t69;
|
|
644
|
+
$[105] = t70;
|
|
517
645
|
$[106] = t71;
|
|
518
|
-
$[107] = t72;
|
|
519
646
|
} else {
|
|
520
|
-
|
|
647
|
+
t71 = $[106];
|
|
521
648
|
}
|
|
522
|
-
const
|
|
649
|
+
const t72 = showErrors && Boolean(errors.description);
|
|
650
|
+
const t73 = showErrors && Boolean(errors.description) ? errors.description : "Description of the collection, you can use markdown";
|
|
523
651
|
let t74;
|
|
524
|
-
if ($[108]
|
|
525
|
-
t74 =
|
|
526
|
-
$[
|
|
652
|
+
if ($[107] !== t72 || $[108] !== t73) {
|
|
653
|
+
t74 = /* @__PURE__ */ jsx(FieldCaption, { error: t72, children: t73 });
|
|
654
|
+
$[107] = t72;
|
|
655
|
+
$[108] = t73;
|
|
656
|
+
$[109] = t74;
|
|
527
657
|
} else {
|
|
528
|
-
t74 = $[
|
|
658
|
+
t74 = $[109];
|
|
529
659
|
}
|
|
530
660
|
let t75;
|
|
531
|
-
if ($[
|
|
532
|
-
t75 = /* @__PURE__ */
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
661
|
+
if ($[110] !== t71 || $[111] !== t74) {
|
|
662
|
+
t75 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
|
|
663
|
+
t71,
|
|
664
|
+
t74
|
|
665
|
+
] });
|
|
666
|
+
$[110] = t71;
|
|
667
|
+
$[111] = t74;
|
|
668
|
+
$[112] = t75;
|
|
536
669
|
} else {
|
|
537
|
-
t75 = $[
|
|
670
|
+
t75 = $[112];
|
|
538
671
|
}
|
|
539
|
-
const t76 =
|
|
672
|
+
const t76 = values.defaultSize ?? "";
|
|
540
673
|
let t77;
|
|
541
|
-
if ($[
|
|
542
|
-
t77 = (
|
|
674
|
+
if ($[113] === Symbol.for("react.memo_cache_sentinel")) {
|
|
675
|
+
t77 = ["xs", "s", "m", "l", "xl"].map(_temp2$7);
|
|
676
|
+
$[113] = t77;
|
|
677
|
+
} else {
|
|
678
|
+
t77 = $[113];
|
|
679
|
+
}
|
|
680
|
+
let t78;
|
|
681
|
+
if ($[114] !== handleChange || $[115] !== t76) {
|
|
682
|
+
t78 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsx(Select, { name: "defaultSize", size: "large", fullWidth: true, label: "Default row size", position: "item-aligned", onChange: handleChange, value: t76, renderValue: _temp$b, children: t77 }) });
|
|
683
|
+
$[114] = handleChange;
|
|
684
|
+
$[115] = t76;
|
|
685
|
+
$[116] = t78;
|
|
686
|
+
} else {
|
|
687
|
+
t78 = $[116];
|
|
688
|
+
}
|
|
689
|
+
const t79 = customIdValue === "code_defined";
|
|
690
|
+
let t80;
|
|
691
|
+
if ($[117] !== setFieldValue) {
|
|
692
|
+
t80 = (v) => {
|
|
543
693
|
if (v === "code_defined") {
|
|
544
694
|
throw new Error("This should not happen");
|
|
545
695
|
} else {
|
|
@@ -556,226 +706,228 @@ function CollectionDetailsForm(t0) {
|
|
|
556
706
|
}
|
|
557
707
|
}
|
|
558
708
|
};
|
|
559
|
-
$[
|
|
560
|
-
$[
|
|
709
|
+
$[117] = setFieldValue;
|
|
710
|
+
$[118] = t80;
|
|
561
711
|
} else {
|
|
562
|
-
|
|
563
|
-
}
|
|
564
|
-
const t78 = customIdValue ?? "";
|
|
565
|
-
let t79;
|
|
566
|
-
let t80;
|
|
567
|
-
let t81;
|
|
568
|
-
if ($[114] === Symbol.for("react.memo_cache_sentinel")) {
|
|
569
|
-
t79 = /* @__PURE__ */ jsx(SelectItem, { value: "false", children: "Document ID is generated automatically" });
|
|
570
|
-
t80 = /* @__PURE__ */ jsx(SelectItem, { value: "true", children: "Users must define an ID" });
|
|
571
|
-
t81 = /* @__PURE__ */ jsx(SelectItem, { value: "optional", children: "Users can define an ID, but it is not required" });
|
|
572
|
-
$[114] = t79;
|
|
573
|
-
$[115] = t80;
|
|
574
|
-
$[116] = t81;
|
|
575
|
-
} else {
|
|
576
|
-
t79 = $[114];
|
|
577
|
-
t80 = $[115];
|
|
578
|
-
t81 = $[116];
|
|
712
|
+
t80 = $[118];
|
|
579
713
|
}
|
|
714
|
+
const t81 = customIdValue ?? "";
|
|
580
715
|
let t82;
|
|
581
|
-
if ($[117] !== t76 || $[118] !== t77 || $[119] !== t78) {
|
|
582
|
-
t82 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxs(Select, { name: "customId", label: "Document IDs generation", position: "item-aligned", size: "large", fullWidth: true, disabled: t76, onValueChange: t77, value: t78, renderValue: _temp3$4, children: [
|
|
583
|
-
t79,
|
|
584
|
-
t80,
|
|
585
|
-
t81
|
|
586
|
-
] }) });
|
|
587
|
-
$[117] = t76;
|
|
588
|
-
$[118] = t77;
|
|
589
|
-
$[119] = t78;
|
|
590
|
-
$[120] = t82;
|
|
591
|
-
} else {
|
|
592
|
-
t82 = $[120];
|
|
593
|
-
}
|
|
594
716
|
let t83;
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
717
|
+
let t84;
|
|
718
|
+
if ($[119] === Symbol.for("react.memo_cache_sentinel")) {
|
|
719
|
+
t82 = /* @__PURE__ */ jsx(SelectItem, { value: "false", children: "Document ID is generated automatically" });
|
|
720
|
+
t83 = /* @__PURE__ */ jsx(SelectItem, { value: "true", children: "Users must define an ID" });
|
|
721
|
+
t84 = /* @__PURE__ */ jsx(SelectItem, { value: "optional", children: "Users can define an ID, but it is not required" });
|
|
722
|
+
$[119] = t82;
|
|
723
|
+
$[120] = t83;
|
|
724
|
+
$[121] = t84;
|
|
725
|
+
} else {
|
|
726
|
+
t82 = $[119];
|
|
727
|
+
t83 = $[120];
|
|
728
|
+
t84 = $[121];
|
|
601
729
|
}
|
|
602
|
-
const t84 = values.collectionGroup ?? false;
|
|
603
730
|
let t85;
|
|
604
|
-
if ($[123] !==
|
|
605
|
-
t85 = /* @__PURE__ */ jsx(
|
|
606
|
-
|
|
607
|
-
|
|
731
|
+
if ($[122] !== t79 || $[123] !== t80 || $[124] !== t81) {
|
|
732
|
+
t85 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxs(Select, { name: "customId", label: "Document IDs generation", position: "item-aligned", size: "large", fullWidth: true, disabled: t79, onValueChange: t80, value: t81, renderValue: _temp3$4, children: [
|
|
733
|
+
t82,
|
|
734
|
+
t83,
|
|
735
|
+
t84
|
|
736
|
+
] }) });
|
|
737
|
+
$[122] = t79;
|
|
738
|
+
$[123] = t80;
|
|
739
|
+
$[124] = t81;
|
|
608
740
|
$[125] = t85;
|
|
609
741
|
} else {
|
|
610
742
|
t85 = $[125];
|
|
611
743
|
}
|
|
612
744
|
let t86;
|
|
613
|
-
if ($[126]
|
|
614
|
-
t86 =
|
|
615
|
-
$[126] =
|
|
616
|
-
|
|
617
|
-
t86 = $[126];
|
|
618
|
-
}
|
|
619
|
-
let t87;
|
|
620
|
-
if ($[127] !== t85) {
|
|
621
|
-
t87 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
|
|
622
|
-
t85,
|
|
623
|
-
t86
|
|
624
|
-
] });
|
|
625
|
-
$[127] = t85;
|
|
626
|
-
$[128] = t87;
|
|
745
|
+
if ($[126] !== setFieldValue) {
|
|
746
|
+
t86 = (v_0) => setFieldValue("collectionGroup", v_0);
|
|
747
|
+
$[126] = setFieldValue;
|
|
748
|
+
$[127] = t86;
|
|
627
749
|
} else {
|
|
628
|
-
|
|
750
|
+
t86 = $[127];
|
|
629
751
|
}
|
|
752
|
+
const t87 = values.collectionGroup ?? false;
|
|
630
753
|
let t88;
|
|
631
|
-
if ($[129] !==
|
|
632
|
-
t88 = (
|
|
633
|
-
$[
|
|
754
|
+
if ($[128] !== t86 || $[129] !== t87) {
|
|
755
|
+
t88 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", label: "Collection group", onValueChange: t86, value: t87 });
|
|
756
|
+
$[128] = t86;
|
|
757
|
+
$[129] = t87;
|
|
634
758
|
$[130] = t88;
|
|
635
759
|
} else {
|
|
636
760
|
t88 = $[130];
|
|
637
761
|
}
|
|
638
|
-
|
|
762
|
+
let t89;
|
|
763
|
+
if ($[131] === Symbol.for("react.memo_cache_sentinel")) {
|
|
764
|
+
t89 = /* @__PURE__ */ jsx(FieldCaption, { children: "A collection group consists of all collections with the same path. This allows you to query over multiple collections at once." });
|
|
765
|
+
$[131] = t89;
|
|
766
|
+
} else {
|
|
767
|
+
t89 = $[131];
|
|
768
|
+
}
|
|
639
769
|
let t90;
|
|
640
|
-
if ($[
|
|
641
|
-
t90 = /* @__PURE__ */
|
|
642
|
-
|
|
643
|
-
|
|
770
|
+
if ($[132] !== t88) {
|
|
771
|
+
t90 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
|
|
772
|
+
t88,
|
|
773
|
+
t89
|
|
774
|
+
] });
|
|
775
|
+
$[132] = t88;
|
|
644
776
|
$[133] = t90;
|
|
645
777
|
} else {
|
|
646
778
|
t90 = $[133];
|
|
647
779
|
}
|
|
648
780
|
let t91;
|
|
649
|
-
if ($[134]
|
|
650
|
-
t91 =
|
|
651
|
-
$[134] =
|
|
781
|
+
if ($[134] !== setFieldValue) {
|
|
782
|
+
t91 = (v_1) => setFieldValue("textSearchEnabled", v_1);
|
|
783
|
+
$[134] = setFieldValue;
|
|
784
|
+
$[135] = t91;
|
|
652
785
|
} else {
|
|
653
|
-
t91 = $[
|
|
786
|
+
t91 = $[135];
|
|
654
787
|
}
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
788
|
+
const t92 = values.textSearchEnabled ?? false;
|
|
789
|
+
let t93;
|
|
790
|
+
if ($[136] !== t91 || $[137] !== t92) {
|
|
791
|
+
t93 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", label: "Enable text search for this collection", onValueChange: t91, value: t92 });
|
|
792
|
+
$[136] = t91;
|
|
793
|
+
$[137] = t92;
|
|
794
|
+
$[138] = t93;
|
|
795
|
+
} else {
|
|
796
|
+
t93 = $[138];
|
|
797
|
+
}
|
|
798
|
+
let t94;
|
|
799
|
+
if ($[139] === Symbol.for("react.memo_cache_sentinel")) {
|
|
800
|
+
t94 = /* @__PURE__ */ jsx(FieldCaption, { children: "Allow text search for this collection. If you have not specified a text search delegate, this will use the built-in local text search. This is not recommended for large collections, as it may incur in performance and cost issues." });
|
|
801
|
+
$[139] = t94;
|
|
802
|
+
} else {
|
|
803
|
+
t94 = $[139];
|
|
804
|
+
}
|
|
805
|
+
let t95;
|
|
806
|
+
if ($[140] !== t93) {
|
|
807
|
+
t95 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
|
|
808
|
+
t93,
|
|
809
|
+
t94
|
|
660
810
|
] });
|
|
661
|
-
$[
|
|
662
|
-
$[
|
|
811
|
+
$[140] = t93;
|
|
812
|
+
$[141] = t95;
|
|
663
813
|
} else {
|
|
664
|
-
|
|
814
|
+
t95 = $[141];
|
|
665
815
|
}
|
|
666
|
-
let
|
|
667
|
-
if ($[
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
t72,
|
|
816
|
+
let t96;
|
|
817
|
+
if ($[142] !== t48 || $[143] !== t56 || $[144] !== t68 || $[145] !== t75 || $[146] !== t78 || $[147] !== t85 || $[148] !== t90 || $[149] !== t95) {
|
|
818
|
+
t96 = /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-12 gap-4 p-4", children: [
|
|
819
|
+
t48,
|
|
820
|
+
t56,
|
|
821
|
+
t68,
|
|
673
822
|
t75,
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
823
|
+
t78,
|
|
824
|
+
t85,
|
|
825
|
+
t90,
|
|
826
|
+
t95
|
|
677
827
|
] });
|
|
678
|
-
$[
|
|
679
|
-
$[
|
|
680
|
-
$[
|
|
681
|
-
$[
|
|
682
|
-
$[
|
|
683
|
-
$[
|
|
684
|
-
$[
|
|
685
|
-
$[
|
|
686
|
-
$[
|
|
687
|
-
} else {
|
|
688
|
-
|
|
828
|
+
$[142] = t48;
|
|
829
|
+
$[143] = t56;
|
|
830
|
+
$[144] = t68;
|
|
831
|
+
$[145] = t75;
|
|
832
|
+
$[146] = t78;
|
|
833
|
+
$[147] = t85;
|
|
834
|
+
$[148] = t90;
|
|
835
|
+
$[149] = t95;
|
|
836
|
+
$[150] = t96;
|
|
837
|
+
} else {
|
|
838
|
+
t96 = $[150];
|
|
689
839
|
}
|
|
690
|
-
let
|
|
691
|
-
if ($[
|
|
692
|
-
|
|
693
|
-
$[
|
|
694
|
-
$[
|
|
695
|
-
$[
|
|
840
|
+
let t97;
|
|
841
|
+
if ($[151] !== advancedPanelExpanded || $[152] !== t96) {
|
|
842
|
+
t97 = /* @__PURE__ */ jsx("div", { className: "col-span-12 mt-8", children: /* @__PURE__ */ jsx(ExpandablePanel, { expanded: advancedPanelExpanded, onExpandedChange: setAdvancedPanelExpanded, title: t41, initiallyExpanded: false, children: t96 }) });
|
|
843
|
+
$[151] = advancedPanelExpanded;
|
|
844
|
+
$[152] = t96;
|
|
845
|
+
$[153] = t97;
|
|
696
846
|
} else {
|
|
697
|
-
|
|
847
|
+
t97 = $[153];
|
|
698
848
|
}
|
|
699
|
-
let
|
|
700
|
-
if ($[
|
|
701
|
-
|
|
849
|
+
let t98;
|
|
850
|
+
if ($[154] !== t27 || $[155] !== t36 || $[156] !== t37 || $[157] !== t40 || $[158] !== t97) {
|
|
851
|
+
t98 = /* @__PURE__ */ jsxs("div", { className: t19, children: [
|
|
702
852
|
t27,
|
|
703
853
|
t36,
|
|
704
854
|
t37,
|
|
705
|
-
|
|
855
|
+
t40,
|
|
856
|
+
t97
|
|
706
857
|
] });
|
|
707
|
-
$[
|
|
708
|
-
$[
|
|
709
|
-
$[
|
|
710
|
-
$[
|
|
711
|
-
$[
|
|
858
|
+
$[154] = t27;
|
|
859
|
+
$[155] = t36;
|
|
860
|
+
$[156] = t37;
|
|
861
|
+
$[157] = t40;
|
|
862
|
+
$[158] = t97;
|
|
863
|
+
$[159] = t98;
|
|
712
864
|
} else {
|
|
713
|
-
|
|
865
|
+
t98 = $[159];
|
|
714
866
|
}
|
|
715
|
-
let
|
|
716
|
-
if ($[
|
|
717
|
-
|
|
867
|
+
let t99;
|
|
868
|
+
if ($[160] === Symbol.for("react.memo_cache_sentinel")) {
|
|
869
|
+
t99 = /* @__PURE__ */ jsx("div", { style: {
|
|
718
870
|
height: "52px"
|
|
719
871
|
} });
|
|
720
|
-
$[
|
|
872
|
+
$[160] = t99;
|
|
721
873
|
} else {
|
|
722
|
-
|
|
874
|
+
t99 = $[160];
|
|
723
875
|
}
|
|
724
|
-
let
|
|
725
|
-
if ($[
|
|
726
|
-
|
|
876
|
+
let t100;
|
|
877
|
+
if ($[161] !== setFieldValue) {
|
|
878
|
+
t100 = (icon) => {
|
|
727
879
|
setIconDialogOpen(false);
|
|
728
880
|
setFieldValue("icon", icon);
|
|
729
881
|
};
|
|
730
|
-
$[
|
|
731
|
-
$[
|
|
882
|
+
$[161] = setFieldValue;
|
|
883
|
+
$[162] = t100;
|
|
732
884
|
} else {
|
|
733
|
-
|
|
885
|
+
t100 = $[162];
|
|
734
886
|
}
|
|
735
|
-
let
|
|
736
|
-
if ($[
|
|
737
|
-
|
|
738
|
-
$[
|
|
739
|
-
$[
|
|
740
|
-
$[
|
|
887
|
+
let t101;
|
|
888
|
+
if ($[163] !== t100 || $[164] !== values.icon) {
|
|
889
|
+
t101 = /* @__PURE__ */ jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsx(SearchIconsView, { selectedIcon: values.icon, onIconSelected: t100 }) });
|
|
890
|
+
$[163] = t100;
|
|
891
|
+
$[164] = values.icon;
|
|
892
|
+
$[165] = t101;
|
|
741
893
|
} else {
|
|
742
|
-
|
|
894
|
+
t101 = $[165];
|
|
743
895
|
}
|
|
744
|
-
let
|
|
745
|
-
if ($[
|
|
746
|
-
|
|
747
|
-
$[
|
|
748
|
-
$[
|
|
749
|
-
$[
|
|
896
|
+
let t102;
|
|
897
|
+
if ($[166] !== iconDialogOpen || $[167] !== t101) {
|
|
898
|
+
t102 = /* @__PURE__ */ jsx(Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t101 });
|
|
899
|
+
$[166] = iconDialogOpen;
|
|
900
|
+
$[167] = t101;
|
|
901
|
+
$[168] = t102;
|
|
750
902
|
} else {
|
|
751
|
-
|
|
903
|
+
t102 = $[168];
|
|
752
904
|
}
|
|
753
|
-
let
|
|
754
|
-
if ($[
|
|
755
|
-
|
|
905
|
+
let t103;
|
|
906
|
+
if ($[169] !== T0 || $[170] !== t102 || $[171] !== t18 || $[172] !== t98) {
|
|
907
|
+
t103 = /* @__PURE__ */ jsx("div", { className: t7, children: /* @__PURE__ */ jsxs(T0, { maxWidth: t8, className: t9, children: [
|
|
756
908
|
t18,
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
909
|
+
t98,
|
|
910
|
+
t99,
|
|
911
|
+
t102
|
|
760
912
|
] }) });
|
|
761
|
-
$[
|
|
762
|
-
$[
|
|
763
|
-
$[
|
|
764
|
-
$[
|
|
765
|
-
$[
|
|
913
|
+
$[169] = T0;
|
|
914
|
+
$[170] = t102;
|
|
915
|
+
$[171] = t18;
|
|
916
|
+
$[172] = t98;
|
|
917
|
+
$[173] = t103;
|
|
766
918
|
} else {
|
|
767
|
-
|
|
919
|
+
t103 = $[173];
|
|
768
920
|
}
|
|
769
|
-
return
|
|
921
|
+
return t103;
|
|
770
922
|
}
|
|
771
|
-
function _temp3$4(
|
|
772
|
-
if (
|
|
923
|
+
function _temp3$4(value_3) {
|
|
924
|
+
if (value_3 === "code_defined") {
|
|
773
925
|
return "Code defined";
|
|
774
926
|
} else {
|
|
775
|
-
if (
|
|
927
|
+
if (value_3 === "true") {
|
|
776
928
|
return "Users must define an ID";
|
|
777
929
|
} else {
|
|
778
|
-
if (
|
|
930
|
+
if (value_3 === "optional") {
|
|
779
931
|
return "Users can define an ID, but it is not required";
|
|
780
932
|
} else {
|
|
781
933
|
return "Document ID is generated automatically";
|
|
@@ -783,11 +935,11 @@ function _temp3$4(value_2) {
|
|
|
783
935
|
}
|
|
784
936
|
}
|
|
785
937
|
}
|
|
786
|
-
function _temp2$7(
|
|
787
|
-
return /* @__PURE__ */ jsx(SelectItem, { value:
|
|
938
|
+
function _temp2$7(value_2) {
|
|
939
|
+
return /* @__PURE__ */ jsx(SelectItem, { value: value_2, children: value_2.toUpperCase() }, `size-select-${value_2}`);
|
|
788
940
|
}
|
|
789
|
-
function _temp$b(
|
|
790
|
-
return
|
|
941
|
+
function _temp$b(value_1) {
|
|
942
|
+
return value_1.toUpperCase();
|
|
791
943
|
}
|
|
792
944
|
function DefaultDatabaseField(t0) {
|
|
793
945
|
const $ = c(5);
|
|
@@ -1036,7 +1188,7 @@ function EnumFormFields(t0) {
|
|
|
1036
1188
|
let t6;
|
|
1037
1189
|
if ($[15] !== allowDataInference || $[16] !== disabled || $[17] !== inferValues || $[18] !== inferring) {
|
|
1038
1190
|
t6 = allowDataInference && /* @__PURE__ */ jsxs(Button, { loading: inferring, disabled: disabled || inferring, variant: "text", size: "small", onClick: inferValues, children: [
|
|
1039
|
-
inferring ? /* @__PURE__ */ jsx(CircularProgress, { size: "
|
|
1191
|
+
inferring ? /* @__PURE__ */ jsx(CircularProgress, { size: "smallest" }) : /* @__PURE__ */ jsx(AutorenewIcon, {}),
|
|
1040
1192
|
"Infer values from data"
|
|
1041
1193
|
] });
|
|
1042
1194
|
$[15] = allowDataInference;
|
|
@@ -8702,7 +8854,7 @@ function CollectionEditorImportDataPreview(t0) {
|
|
|
8702
8854
|
}
|
|
8703
8855
|
let t8;
|
|
8704
8856
|
if ($[13] !== properties || $[14] !== selectionController || $[15] !== t5 || $[16] !== t7) {
|
|
8705
|
-
t8 = /* @__PURE__ */ jsx(EntityCollectionTable, { title: t4, tableController: t5, endAdornment: t6, filterable: false, sortable: false, selectionController, displayedColumnIds: t7, properties, enablePopupIcon: false });
|
|
8857
|
+
t8 = /* @__PURE__ */ jsx(EntityCollectionTable, { title: t4, tableController: t5, endAdornment: t6, filterable: false, sortable: false, selectionController, displayedColumnIds: t7, openEntityMode: "side_panel", properties, enablePopupIcon: false });
|
|
8706
8858
|
$[13] = properties;
|
|
8707
8859
|
$[14] = selectionController;
|
|
8708
8860
|
$[15] = t5;
|
|
@@ -9169,7 +9321,7 @@ function CollectionEditorInternal({
|
|
|
9169
9321
|
const updatedFullPath = fullPath?.includes("/") ? fullPath?.split("/").slice(0, -1).join("/") + "/" + path : path;
|
|
9170
9322
|
const pathError_0 = validatePath(path, isNewCollection, existingPaths, values_1.id);
|
|
9171
9323
|
const parentPaths = !pathError_0 && parentCollectionIds ? navigation.convertIdsToPaths(parentCollectionIds) : void 0;
|
|
9172
|
-
const resolvedPath = !pathError_0 ? navigation.
|
|
9324
|
+
const resolvedPath = !pathError_0 ? navigation.resolveIdsFrom(updatedFullPath) : void 0;
|
|
9173
9325
|
const getDataWithPath = resolvedPath && getData ? async () => {
|
|
9174
9326
|
const data = await getData(resolvedPath, parentPaths ?? []);
|
|
9175
9327
|
if (existingEntities) {
|
|
@@ -9208,7 +9360,7 @@ function CollectionEditorInternal({
|
|
|
9208
9360
|
const editable = collection?.editable === void 0 || collection?.editable === true;
|
|
9209
9361
|
const collectionEditable = editable || isNewCollection;
|
|
9210
9362
|
return /* @__PURE__ */ jsx(DialogContent, { fullHeight: true, children: /* @__PURE__ */ jsx(Formex, { value: formController, children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9211
|
-
!isNewCollection && /* @__PURE__ */ jsxs(Tabs, { value: currentView, innerClassName: cls(defaultBorderMixin, "justify-end bg-surface-50 dark:bg-surface-950 border-b"), onValueChange: (v) => setCurrentView(v), children: [
|
|
9363
|
+
!isNewCollection && /* @__PURE__ */ jsxs(Tabs, { value: currentView, innerClassName: cls(defaultBorderMixin, "px-4 h-14 w-full justify-end bg-surface-50 dark:bg-surface-950 border-b"), onValueChange: (v) => setCurrentView(v), children: [
|
|
9212
9364
|
/* @__PURE__ */ jsx(Tab, { value: "details", children: "Details" }),
|
|
9213
9365
|
/* @__PURE__ */ jsx(Tab, { value: "properties", children: "Properties" }),
|
|
9214
9366
|
/* @__PURE__ */ jsx(Tab, { value: "subcollections", children: "Additional views" })
|
|
@@ -9539,7 +9691,7 @@ const ConfigControllerProvider = React__default.memo(function ConfigControllerPr
|
|
|
9539
9691
|
if ($[28] !== currentPropertyDialog || $[29] !== getData || $[30] !== navigation) {
|
|
9540
9692
|
t14 = getData && currentPropertyDialog?.editedCollectionId ? () => {
|
|
9541
9693
|
console.debug("get data for property", currentPropertyDialog?.editedCollectionId);
|
|
9542
|
-
const resolvedPath = navigation.
|
|
9694
|
+
const resolvedPath = navigation.resolveIdsFrom(currentPropertyDialog.editedCollectionId);
|
|
9543
9695
|
return getData(resolvedPath, []);
|
|
9544
9696
|
} : void 0;
|
|
9545
9697
|
$[28] = currentPropertyDialog;
|