@firecms/collection_editor 3.0.0-canary.237 → 3.0.0-canary.239
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 +384 -340
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +383 -339
- package/dist/index.umd.js.map +1 -1
- package/package.json +8 -8
- package/src/ui/collection_editor/CollectionDetailsForm.tsx +19 -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 { cls, Typography, VerticalSplitIcon, Tooltip, Card, SquareIcon, useAutoComplete, Chip, TextField, Autocomplete, AutocompleteItem, SelectItem, Container, IconButton, DebouncedTextField, SettingsIcon, CloseIcon, Select,
|
|
7
|
+
import { cls, Typography, VerticalSplitIcon, Tooltip, Card, SquareIcon, useAutoComplete, Chip, TextField, Autocomplete, AutocompleteItem, SelectItem, Container, IconButton, DebouncedTextField, BooleanSwitchWithLabel, SettingsIcon, CloseIcon, Select, 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";
|
|
@@ -162,7 +162,7 @@ function LayoutModeSwitch(t0) {
|
|
|
162
162
|
return t18;
|
|
163
163
|
}
|
|
164
164
|
function CollectionDetailsForm(t0) {
|
|
165
|
-
const $ = c(
|
|
165
|
+
const $ = c(186);
|
|
166
166
|
const {
|
|
167
167
|
isNewCollection,
|
|
168
168
|
reservedGroups,
|
|
@@ -468,101 +468,143 @@ function CollectionDetailsForm(t0) {
|
|
|
468
468
|
} else {
|
|
469
469
|
t40 = $[58];
|
|
470
470
|
}
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
] });
|
|
477
|
-
$[59] = t41;
|
|
478
|
-
} else {
|
|
479
|
-
t41 = $[59];
|
|
480
|
-
}
|
|
481
|
-
const t42 = !isNewCollection;
|
|
482
|
-
const t43 = showErrors && Boolean(errors.id);
|
|
483
|
-
let t44;
|
|
484
|
-
if ($[60] !== t42 || $[61] !== t43) {
|
|
485
|
-
t44 = /* @__PURE__ */ jsx(Field, { name: "id", as: DebouncedTextField, disabled: t42, label: "Collection id", error: t43 });
|
|
471
|
+
const t41 = values.history === null ? "Document history revisions enabled if enabled globally" : values.history ? "Document history revisions ENABLED" : "Document history revisions NOT enabled";
|
|
472
|
+
let t42;
|
|
473
|
+
if ($[59] !== setFieldValue) {
|
|
474
|
+
t42 = (v) => setFieldValue("history", v);
|
|
475
|
+
$[59] = setFieldValue;
|
|
486
476
|
$[60] = t42;
|
|
487
|
-
$[61] = t43;
|
|
488
|
-
$[62] = t44;
|
|
489
477
|
} else {
|
|
490
|
-
|
|
478
|
+
t42 = $[60];
|
|
491
479
|
}
|
|
492
|
-
const
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
$[
|
|
498
|
-
$[
|
|
499
|
-
$[
|
|
480
|
+
const t43 = values.history ?? null;
|
|
481
|
+
let t44;
|
|
482
|
+
if ($[61] !== t41 || $[62] !== t42 || $[63] !== t43) {
|
|
483
|
+
t44 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "large", allowIndeterminate: true, label: t41, onValueChange: t42, value: t43 });
|
|
484
|
+
$[61] = t41;
|
|
485
|
+
$[62] = t42;
|
|
486
|
+
$[63] = t43;
|
|
487
|
+
$[64] = t44;
|
|
488
|
+
} else {
|
|
489
|
+
t44 = $[64];
|
|
490
|
+
}
|
|
491
|
+
let t45;
|
|
492
|
+
if ($[65] === Symbol.for("react.memo_cache_sentinel")) {
|
|
493
|
+
t45 = /* @__PURE__ */ jsxs(FieldCaption, { children: [
|
|
494
|
+
"When enabled, each document in this collection will have a history of changes. This is useful for auditing purposes. The data is stored in a subcollection of the document in your database, called ",
|
|
495
|
+
/* @__PURE__ */ jsx("b", { children: "__history" }),
|
|
496
|
+
"."
|
|
497
|
+
] });
|
|
498
|
+
$[65] = t45;
|
|
500
499
|
} else {
|
|
501
|
-
|
|
500
|
+
t45 = $[65];
|
|
502
501
|
}
|
|
503
|
-
let
|
|
504
|
-
if ($[66] !== t44
|
|
505
|
-
|
|
502
|
+
let t46;
|
|
503
|
+
if ($[66] !== t44) {
|
|
504
|
+
t46 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
|
|
506
505
|
t44,
|
|
507
|
-
|
|
506
|
+
t45
|
|
508
507
|
] });
|
|
509
508
|
$[66] = t44;
|
|
510
|
-
$[67] =
|
|
511
|
-
|
|
509
|
+
$[67] = t46;
|
|
510
|
+
} else {
|
|
511
|
+
t46 = $[67];
|
|
512
|
+
}
|
|
513
|
+
let t47;
|
|
514
|
+
if ($[68] === Symbol.for("react.memo_cache_sentinel")) {
|
|
515
|
+
t47 = /* @__PURE__ */ jsxs("div", { className: "flex flex-row text-surface-500", children: [
|
|
516
|
+
/* @__PURE__ */ jsx(SettingsIcon, {}),
|
|
517
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "ml-2", children: "Advanced" })
|
|
518
|
+
] });
|
|
519
|
+
$[68] = t47;
|
|
512
520
|
} else {
|
|
513
|
-
|
|
521
|
+
t47 = $[68];
|
|
514
522
|
}
|
|
515
|
-
const
|
|
523
|
+
const t48 = !isNewCollection;
|
|
524
|
+
const t49 = showErrors && Boolean(errors.id);
|
|
516
525
|
let t50;
|
|
517
|
-
if ($[69] !==
|
|
518
|
-
t50 = (
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
};
|
|
522
|
-
$[69] = handleChange;
|
|
523
|
-
$[70] = setFieldTouched;
|
|
526
|
+
if ($[69] !== t48 || $[70] !== t49) {
|
|
527
|
+
t50 = /* @__PURE__ */ jsx(Field, { name: "id", as: DebouncedTextField, disabled: t48, label: "Collection id", error: t49 });
|
|
528
|
+
$[69] = t48;
|
|
529
|
+
$[70] = t49;
|
|
524
530
|
$[71] = t50;
|
|
525
531
|
} else {
|
|
526
532
|
t50 = $[71];
|
|
527
533
|
}
|
|
528
|
-
const t51 =
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
$[
|
|
534
|
-
$[
|
|
535
|
-
$[
|
|
536
|
-
} else {
|
|
537
|
-
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
534
|
+
const t51 = touched.id && Boolean(errors.id);
|
|
535
|
+
const t52 = touched.id && Boolean(errors.id) ? errors.id : "This id identifies this collection. Typically the same as the path.";
|
|
536
|
+
let t53;
|
|
537
|
+
if ($[72] !== t51 || $[73] !== t52) {
|
|
538
|
+
t53 = /* @__PURE__ */ jsx(FieldCaption, { error: t51, children: t52 });
|
|
539
|
+
$[72] = t51;
|
|
540
|
+
$[73] = t52;
|
|
541
|
+
$[74] = t53;
|
|
542
|
+
} else {
|
|
543
|
+
t53 = $[74];
|
|
544
|
+
}
|
|
545
|
+
let t54;
|
|
546
|
+
if ($[75] !== t50 || $[76] !== t53) {
|
|
547
|
+
t54 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
|
|
548
|
+
t50,
|
|
549
|
+
t53
|
|
550
|
+
] });
|
|
551
|
+
$[75] = t50;
|
|
544
552
|
$[76] = t53;
|
|
545
553
|
$[77] = t54;
|
|
546
|
-
$[78] = t55;
|
|
547
554
|
} else {
|
|
548
|
-
|
|
555
|
+
t54 = $[77];
|
|
549
556
|
}
|
|
557
|
+
const t55 = showErrors && Boolean(errors.singularName);
|
|
550
558
|
let t56;
|
|
551
|
-
if ($[
|
|
552
|
-
t56 =
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
$[
|
|
557
|
-
$[
|
|
558
|
-
$[
|
|
559
|
+
if ($[78] !== handleChange || $[79] !== setFieldTouched) {
|
|
560
|
+
t56 = (e_0) => {
|
|
561
|
+
setFieldTouched("singularName", true);
|
|
562
|
+
return handleChange(e_0);
|
|
563
|
+
};
|
|
564
|
+
$[78] = handleChange;
|
|
565
|
+
$[79] = setFieldTouched;
|
|
566
|
+
$[80] = t56;
|
|
559
567
|
} else {
|
|
560
|
-
t56 = $[
|
|
568
|
+
t56 = $[80];
|
|
561
569
|
}
|
|
562
|
-
const t57 =
|
|
570
|
+
const t57 = values.singularName ?? "";
|
|
563
571
|
let t58;
|
|
564
|
-
if ($[82] !==
|
|
565
|
-
t58 = (
|
|
572
|
+
if ($[81] !== t55 || $[82] !== t56 || $[83] !== t57) {
|
|
573
|
+
t58 = /* @__PURE__ */ jsx(TextField, { error: t55, name: "singularName", "aria-describedby": "singularName-helper", onChange: t56, value: t57, label: "Singular name" });
|
|
574
|
+
$[81] = t55;
|
|
575
|
+
$[82] = t56;
|
|
576
|
+
$[83] = t57;
|
|
577
|
+
$[84] = t58;
|
|
578
|
+
} else {
|
|
579
|
+
t58 = $[84];
|
|
580
|
+
}
|
|
581
|
+
const t59 = showErrors && Boolean(errors.singularName);
|
|
582
|
+
const t60 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define a singular name for your entities";
|
|
583
|
+
let t61;
|
|
584
|
+
if ($[85] !== t59 || $[86] !== t60) {
|
|
585
|
+
t61 = /* @__PURE__ */ jsx(FieldCaption, { error: t59, children: t60 });
|
|
586
|
+
$[85] = t59;
|
|
587
|
+
$[86] = t60;
|
|
588
|
+
$[87] = t61;
|
|
589
|
+
} else {
|
|
590
|
+
t61 = $[87];
|
|
591
|
+
}
|
|
592
|
+
let t62;
|
|
593
|
+
if ($[88] !== t58 || $[89] !== t61) {
|
|
594
|
+
t62 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
|
|
595
|
+
t58,
|
|
596
|
+
t61
|
|
597
|
+
] });
|
|
598
|
+
$[88] = t58;
|
|
599
|
+
$[89] = t61;
|
|
600
|
+
$[90] = t62;
|
|
601
|
+
} else {
|
|
602
|
+
t62 = $[90];
|
|
603
|
+
}
|
|
604
|
+
const t63 = showErrors && Boolean(errors.sideDialogWidth);
|
|
605
|
+
let t64;
|
|
606
|
+
if ($[91] !== setFieldTouched || $[92] !== setFieldValue) {
|
|
607
|
+
t64 = (e_1) => {
|
|
566
608
|
setFieldTouched("sideDialogWidth", true);
|
|
567
609
|
const value_0 = e_1.target.value;
|
|
568
610
|
if (!value_0) {
|
|
@@ -573,360 +615,362 @@ function CollectionDetailsForm(t0) {
|
|
|
573
615
|
}
|
|
574
616
|
}
|
|
575
617
|
};
|
|
576
|
-
$[
|
|
577
|
-
$[
|
|
578
|
-
$[
|
|
618
|
+
$[91] = setFieldTouched;
|
|
619
|
+
$[92] = setFieldValue;
|
|
620
|
+
$[93] = t64;
|
|
579
621
|
} else {
|
|
580
|
-
|
|
622
|
+
t64 = $[93];
|
|
581
623
|
}
|
|
582
|
-
let
|
|
583
|
-
if ($[
|
|
584
|
-
|
|
624
|
+
let t65;
|
|
625
|
+
if ($[94] !== setFieldValue) {
|
|
626
|
+
t65 = () => {
|
|
585
627
|
setFieldValue("sideDialogWidth", null);
|
|
586
628
|
};
|
|
587
|
-
$[
|
|
588
|
-
$[
|
|
629
|
+
$[94] = setFieldValue;
|
|
630
|
+
$[95] = t65;
|
|
589
631
|
} else {
|
|
590
|
-
|
|
632
|
+
t65 = $[95];
|
|
591
633
|
}
|
|
592
|
-
const
|
|
593
|
-
let t61;
|
|
594
|
-
if ($[87] === Symbol.for("react.memo_cache_sentinel")) {
|
|
595
|
-
t61 = /* @__PURE__ */ jsx(CloseIcon, { size: "small" });
|
|
596
|
-
$[87] = t61;
|
|
597
|
-
} else {
|
|
598
|
-
t61 = $[87];
|
|
599
|
-
}
|
|
600
|
-
let t62;
|
|
601
|
-
if ($[88] !== t59 || $[89] !== t60) {
|
|
602
|
-
t62 = /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: t59, disabled: t60, children: t61 });
|
|
603
|
-
$[88] = t59;
|
|
604
|
-
$[89] = t60;
|
|
605
|
-
$[90] = t62;
|
|
606
|
-
} else {
|
|
607
|
-
t62 = $[90];
|
|
608
|
-
}
|
|
609
|
-
const t63 = values.sideDialogWidth ?? "";
|
|
610
|
-
let t64;
|
|
611
|
-
if ($[91] !== t57 || $[92] !== t58 || $[93] !== t62 || $[94] !== t63) {
|
|
612
|
-
t64 = /* @__PURE__ */ jsx(TextField, { error: t57, name: "sideDialogWidth", type: "number", "aria-describedby": "sideDialogWidth-helper", onChange: t58, endAdornment: t62, value: t63, label: "Side dialog width" });
|
|
613
|
-
$[91] = t57;
|
|
614
|
-
$[92] = t58;
|
|
615
|
-
$[93] = t62;
|
|
616
|
-
$[94] = t63;
|
|
617
|
-
$[95] = t64;
|
|
618
|
-
} else {
|
|
619
|
-
t64 = $[95];
|
|
620
|
-
}
|
|
621
|
-
const t65 = showErrors && Boolean(errors.singularName);
|
|
622
|
-
const t66 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define the width (in pixels) of entities side dialog. Default is 768px";
|
|
634
|
+
const t66 = !values.sideDialogWidth;
|
|
623
635
|
let t67;
|
|
624
|
-
if ($[96]
|
|
625
|
-
t67 = /* @__PURE__ */ jsx(
|
|
626
|
-
$[96] =
|
|
627
|
-
$[97] = t66;
|
|
628
|
-
$[98] = t67;
|
|
636
|
+
if ($[96] === Symbol.for("react.memo_cache_sentinel")) {
|
|
637
|
+
t67 = /* @__PURE__ */ jsx(CloseIcon, { size: "small" });
|
|
638
|
+
$[96] = t67;
|
|
629
639
|
} else {
|
|
630
|
-
t67 = $[
|
|
640
|
+
t67 = $[96];
|
|
631
641
|
}
|
|
632
642
|
let t68;
|
|
633
|
-
if ($[
|
|
634
|
-
t68 = /* @__PURE__ */
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
]
|
|
638
|
-
|
|
639
|
-
$[
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
t71 = /* @__PURE__ */ jsx(TextField, { error: t69, name: "description", value: t70, onChange: handleChange, multiline: true, minRows: 2, "aria-describedby": "description-helper-text", label: "Description" });
|
|
649
|
-
$[102] = handleChange;
|
|
643
|
+
if ($[97] !== t65 || $[98] !== t66) {
|
|
644
|
+
t68 = /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: t65, disabled: t66, children: t67 });
|
|
645
|
+
$[97] = t65;
|
|
646
|
+
$[98] = t66;
|
|
647
|
+
$[99] = t68;
|
|
648
|
+
} else {
|
|
649
|
+
t68 = $[99];
|
|
650
|
+
}
|
|
651
|
+
const t69 = values.sideDialogWidth ?? "";
|
|
652
|
+
let t70;
|
|
653
|
+
if ($[100] !== t63 || $[101] !== t64 || $[102] !== t68 || $[103] !== t69) {
|
|
654
|
+
t70 = /* @__PURE__ */ jsx(TextField, { error: t63, name: "sideDialogWidth", type: "number", "aria-describedby": "sideDialogWidth-helper", onChange: t64, endAdornment: t68, value: t69, label: "Side dialog width" });
|
|
655
|
+
$[100] = t63;
|
|
656
|
+
$[101] = t64;
|
|
657
|
+
$[102] = t68;
|
|
650
658
|
$[103] = t69;
|
|
651
659
|
$[104] = t70;
|
|
652
|
-
$[105] = t71;
|
|
653
660
|
} else {
|
|
654
|
-
|
|
661
|
+
t70 = $[104];
|
|
655
662
|
}
|
|
656
|
-
const
|
|
657
|
-
const
|
|
658
|
-
let
|
|
659
|
-
if ($[
|
|
660
|
-
|
|
663
|
+
const t71 = showErrors && Boolean(errors.singularName);
|
|
664
|
+
const t72 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define the width (in pixels) of entities side dialog. Default is 768px";
|
|
665
|
+
let t73;
|
|
666
|
+
if ($[105] !== t71 || $[106] !== t72) {
|
|
667
|
+
t73 = /* @__PURE__ */ jsx(FieldCaption, { error: t71, children: t72 });
|
|
668
|
+
$[105] = t71;
|
|
661
669
|
$[106] = t72;
|
|
662
670
|
$[107] = t73;
|
|
663
|
-
$[108] = t74;
|
|
664
671
|
} else {
|
|
665
|
-
|
|
672
|
+
t73 = $[107];
|
|
666
673
|
}
|
|
667
|
-
let
|
|
668
|
-
if ($[
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
674
|
+
let t74;
|
|
675
|
+
if ($[108] !== t70 || $[109] !== t73) {
|
|
676
|
+
t74 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
|
|
677
|
+
t70,
|
|
678
|
+
t73
|
|
672
679
|
] });
|
|
673
|
-
$[
|
|
680
|
+
$[108] = t70;
|
|
681
|
+
$[109] = t73;
|
|
674
682
|
$[110] = t74;
|
|
675
|
-
$[111] = t75;
|
|
676
683
|
} else {
|
|
677
|
-
|
|
684
|
+
t74 = $[110];
|
|
678
685
|
}
|
|
679
|
-
const
|
|
686
|
+
const t75 = showErrors && Boolean(errors.description);
|
|
687
|
+
const t76 = values.description ?? "";
|
|
680
688
|
let t77;
|
|
681
|
-
if ($[112]
|
|
682
|
-
t77 =
|
|
683
|
-
$[
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
let t78;
|
|
688
|
-
if ($[113] !== handleChange || $[114] !== t76) {
|
|
689
|
-
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 }) });
|
|
690
|
-
$[113] = handleChange;
|
|
691
|
-
$[114] = t76;
|
|
692
|
-
$[115] = t78;
|
|
689
|
+
if ($[111] !== handleChange || $[112] !== t75 || $[113] !== t76) {
|
|
690
|
+
t77 = /* @__PURE__ */ jsx(TextField, { error: t75, name: "description", value: t76, onChange: handleChange, multiline: true, minRows: 2, "aria-describedby": "description-helper-text", label: "Description" });
|
|
691
|
+
$[111] = handleChange;
|
|
692
|
+
$[112] = t75;
|
|
693
|
+
$[113] = t76;
|
|
694
|
+
$[114] = t77;
|
|
693
695
|
} else {
|
|
694
|
-
|
|
696
|
+
t77 = $[114];
|
|
695
697
|
}
|
|
696
|
-
const
|
|
698
|
+
const t78 = showErrors && Boolean(errors.description);
|
|
699
|
+
const t79 = showErrors && Boolean(errors.description) ? errors.description : "Description of the collection, you can use markdown";
|
|
697
700
|
let t80;
|
|
698
|
-
if ($[116] !==
|
|
699
|
-
t80 = (
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
}
|
|
703
|
-
setFieldValue("customId", v);
|
|
704
|
-
};
|
|
705
|
-
$[116] = setFieldValue;
|
|
701
|
+
if ($[115] !== t78 || $[116] !== t79) {
|
|
702
|
+
t80 = /* @__PURE__ */ jsx(FieldCaption, { error: t78, children: t79 });
|
|
703
|
+
$[115] = t78;
|
|
704
|
+
$[116] = t79;
|
|
706
705
|
$[117] = t80;
|
|
707
706
|
} else {
|
|
708
707
|
t80 = $[117];
|
|
709
708
|
}
|
|
710
|
-
|
|
711
|
-
|
|
709
|
+
let t81;
|
|
710
|
+
if ($[118] !== t77 || $[119] !== t80) {
|
|
711
|
+
t81 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
|
|
712
|
+
t77,
|
|
713
|
+
t80
|
|
714
|
+
] });
|
|
715
|
+
$[118] = t77;
|
|
716
|
+
$[119] = t80;
|
|
717
|
+
$[120] = t81;
|
|
718
|
+
} else {
|
|
719
|
+
t81 = $[120];
|
|
720
|
+
}
|
|
721
|
+
const t82 = values.defaultSize ?? "";
|
|
712
722
|
let t83;
|
|
723
|
+
if ($[121] === Symbol.for("react.memo_cache_sentinel")) {
|
|
724
|
+
t83 = ["xs", "s", "m", "l", "xl"].map(_temp2$7);
|
|
725
|
+
$[121] = t83;
|
|
726
|
+
} else {
|
|
727
|
+
t83 = $[121];
|
|
728
|
+
}
|
|
713
729
|
let t84;
|
|
714
|
-
if ($[
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
$[
|
|
719
|
-
$[119] = t83;
|
|
720
|
-
$[120] = t84;
|
|
721
|
-
} else {
|
|
722
|
-
t82 = $[118];
|
|
723
|
-
t83 = $[119];
|
|
724
|
-
t84 = $[120];
|
|
725
|
-
}
|
|
726
|
-
let t85;
|
|
727
|
-
if ($[121] !== t79 || $[122] !== t80 || $[123] !== t81) {
|
|
728
|
-
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: [
|
|
729
|
-
t82,
|
|
730
|
-
t83,
|
|
731
|
-
t84
|
|
732
|
-
] }) });
|
|
733
|
-
$[121] = t79;
|
|
734
|
-
$[122] = t80;
|
|
735
|
-
$[123] = t81;
|
|
736
|
-
$[124] = t85;
|
|
730
|
+
if ($[122] !== handleChange || $[123] !== t82) {
|
|
731
|
+
t84 = /* @__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: t82, renderValue: _temp$b, children: t83 }) });
|
|
732
|
+
$[122] = handleChange;
|
|
733
|
+
$[123] = t82;
|
|
734
|
+
$[124] = t84;
|
|
737
735
|
} else {
|
|
738
|
-
|
|
736
|
+
t84 = $[124];
|
|
739
737
|
}
|
|
738
|
+
const t85 = customIdValue === "code_defined";
|
|
740
739
|
let t86;
|
|
741
740
|
if ($[125] !== setFieldValue) {
|
|
742
|
-
t86 = (v_0) =>
|
|
741
|
+
t86 = (v_0) => {
|
|
742
|
+
if (v_0 === "code_defined") {
|
|
743
|
+
throw new Error("This should not happen");
|
|
744
|
+
}
|
|
745
|
+
setFieldValue("customId", v_0);
|
|
746
|
+
};
|
|
743
747
|
$[125] = setFieldValue;
|
|
744
748
|
$[126] = t86;
|
|
745
749
|
} else {
|
|
746
750
|
t86 = $[126];
|
|
747
751
|
}
|
|
748
|
-
const t87 =
|
|
752
|
+
const t87 = customIdValue ?? "";
|
|
749
753
|
let t88;
|
|
750
|
-
if ($[127] !== t86 || $[128] !== t87) {
|
|
751
|
-
t88 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "large", label: "Collection group", onValueChange: t86, value: t87 });
|
|
752
|
-
$[127] = t86;
|
|
753
|
-
$[128] = t87;
|
|
754
|
-
$[129] = t88;
|
|
755
|
-
} else {
|
|
756
|
-
t88 = $[129];
|
|
757
|
-
}
|
|
758
754
|
let t89;
|
|
759
|
-
if ($[130] === Symbol.for("react.memo_cache_sentinel")) {
|
|
760
|
-
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." });
|
|
761
|
-
$[130] = t89;
|
|
762
|
-
} else {
|
|
763
|
-
t89 = $[130];
|
|
764
|
-
}
|
|
765
755
|
let t90;
|
|
766
|
-
if ($[
|
|
767
|
-
|
|
756
|
+
if ($[127] === Symbol.for("react.memo_cache_sentinel")) {
|
|
757
|
+
t88 = /* @__PURE__ */ jsx(SelectItem, { value: "false", children: "Document ID is generated automatically" });
|
|
758
|
+
t89 = /* @__PURE__ */ jsx(SelectItem, { value: "true", children: "Users must define an ID" });
|
|
759
|
+
t90 = /* @__PURE__ */ jsx(SelectItem, { value: "optional", children: "Users can define an ID, but it is not required" });
|
|
760
|
+
$[127] = t88;
|
|
761
|
+
$[128] = t89;
|
|
762
|
+
$[129] = t90;
|
|
763
|
+
} else {
|
|
764
|
+
t88 = $[127];
|
|
765
|
+
t89 = $[128];
|
|
766
|
+
t90 = $[129];
|
|
767
|
+
}
|
|
768
|
+
let t91;
|
|
769
|
+
if ($[130] !== t85 || $[131] !== t86 || $[132] !== t87) {
|
|
770
|
+
t91 = /* @__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: t85, onValueChange: t86, value: t87, renderValue: _temp3$4, children: [
|
|
768
771
|
t88,
|
|
769
|
-
t89
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
$[
|
|
772
|
+
t89,
|
|
773
|
+
t90
|
|
774
|
+
] }) });
|
|
775
|
+
$[130] = t85;
|
|
776
|
+
$[131] = t86;
|
|
777
|
+
$[132] = t87;
|
|
778
|
+
$[133] = t91;
|
|
773
779
|
} else {
|
|
774
|
-
|
|
780
|
+
t91 = $[133];
|
|
775
781
|
}
|
|
776
|
-
let
|
|
777
|
-
if ($[
|
|
778
|
-
|
|
779
|
-
$[
|
|
780
|
-
$[
|
|
781
|
-
} else {
|
|
782
|
-
t91 = $[134];
|
|
783
|
-
}
|
|
784
|
-
const t92 = values.textSearchEnabled ?? false;
|
|
785
|
-
let t93;
|
|
786
|
-
if ($[135] !== t91 || $[136] !== t92) {
|
|
787
|
-
t93 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "large", label: "Enable text search for this collection", onValueChange: t91, value: t92 });
|
|
788
|
-
$[135] = t91;
|
|
789
|
-
$[136] = t92;
|
|
790
|
-
$[137] = t93;
|
|
782
|
+
let t92;
|
|
783
|
+
if ($[134] !== setFieldValue) {
|
|
784
|
+
t92 = (v_1) => setFieldValue("collectionGroup", v_1);
|
|
785
|
+
$[134] = setFieldValue;
|
|
786
|
+
$[135] = t92;
|
|
791
787
|
} else {
|
|
792
|
-
|
|
788
|
+
t92 = $[135];
|
|
793
789
|
}
|
|
790
|
+
const t93 = values.collectionGroup ?? false;
|
|
794
791
|
let t94;
|
|
795
|
-
if ($[
|
|
796
|
-
t94 = /* @__PURE__ */ jsx(
|
|
792
|
+
if ($[136] !== t92 || $[137] !== t93) {
|
|
793
|
+
t94 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "large", label: "Collection group", onValueChange: t92, value: t93 });
|
|
794
|
+
$[136] = t92;
|
|
795
|
+
$[137] = t93;
|
|
797
796
|
$[138] = t94;
|
|
798
797
|
} else {
|
|
799
798
|
t94 = $[138];
|
|
800
799
|
}
|
|
801
800
|
let t95;
|
|
802
|
-
if ($[139]
|
|
803
|
-
t95 = /* @__PURE__ */
|
|
804
|
-
|
|
805
|
-
t94
|
|
806
|
-
] });
|
|
807
|
-
$[139] = t93;
|
|
808
|
-
$[140] = t95;
|
|
801
|
+
if ($[139] === Symbol.for("react.memo_cache_sentinel")) {
|
|
802
|
+
t95 = /* @__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." });
|
|
803
|
+
$[139] = t95;
|
|
809
804
|
} else {
|
|
810
|
-
t95 = $[
|
|
805
|
+
t95 = $[139];
|
|
811
806
|
}
|
|
812
807
|
let t96;
|
|
813
|
-
if ($[
|
|
814
|
-
t96 = /* @__PURE__ */ jsxs("div", { className: "
|
|
815
|
-
|
|
816
|
-
t56,
|
|
817
|
-
t68,
|
|
818
|
-
t75,
|
|
819
|
-
t78,
|
|
820
|
-
t85,
|
|
821
|
-
t90,
|
|
808
|
+
if ($[140] !== t94) {
|
|
809
|
+
t96 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 mt-4", children: [
|
|
810
|
+
t94,
|
|
822
811
|
t95
|
|
823
812
|
] });
|
|
824
|
-
$[
|
|
825
|
-
$[
|
|
826
|
-
|
|
827
|
-
$[
|
|
828
|
-
$[145] = t78;
|
|
829
|
-
$[146] = t85;
|
|
830
|
-
$[147] = t90;
|
|
831
|
-
$[148] = t95;
|
|
832
|
-
$[149] = t96;
|
|
833
|
-
} else {
|
|
834
|
-
t96 = $[149];
|
|
813
|
+
$[140] = t94;
|
|
814
|
+
$[141] = t96;
|
|
815
|
+
} else {
|
|
816
|
+
t96 = $[141];
|
|
835
817
|
}
|
|
836
818
|
let t97;
|
|
837
|
-
if ($[
|
|
838
|
-
t97 =
|
|
839
|
-
$[
|
|
840
|
-
$[
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
let
|
|
846
|
-
if ($[
|
|
847
|
-
|
|
848
|
-
|
|
819
|
+
if ($[142] !== setFieldValue) {
|
|
820
|
+
t97 = (v_2) => setFieldValue("textSearchEnabled", v_2);
|
|
821
|
+
$[142] = setFieldValue;
|
|
822
|
+
$[143] = t97;
|
|
823
|
+
} else {
|
|
824
|
+
t97 = $[143];
|
|
825
|
+
}
|
|
826
|
+
const t98 = values.textSearchEnabled ?? false;
|
|
827
|
+
let t99;
|
|
828
|
+
if ($[144] !== t97 || $[145] !== t98) {
|
|
829
|
+
t99 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "large", label: "Enable text search for this collection", onValueChange: t97, value: t98 });
|
|
830
|
+
$[144] = t97;
|
|
831
|
+
$[145] = t98;
|
|
832
|
+
$[146] = t99;
|
|
833
|
+
} else {
|
|
834
|
+
t99 = $[146];
|
|
835
|
+
}
|
|
836
|
+
let t100;
|
|
837
|
+
if ($[147] === Symbol.for("react.memo_cache_sentinel")) {
|
|
838
|
+
t100 = /* @__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." });
|
|
839
|
+
$[147] = t100;
|
|
840
|
+
} else {
|
|
841
|
+
t100 = $[147];
|
|
842
|
+
}
|
|
843
|
+
let t101;
|
|
844
|
+
if ($[148] !== t99) {
|
|
845
|
+
t101 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
|
|
846
|
+
t99,
|
|
847
|
+
t100
|
|
848
|
+
] });
|
|
849
|
+
$[148] = t99;
|
|
850
|
+
$[149] = t101;
|
|
851
|
+
} else {
|
|
852
|
+
t101 = $[149];
|
|
853
|
+
}
|
|
854
|
+
let t102;
|
|
855
|
+
if ($[150] !== t101 || $[151] !== t54 || $[152] !== t62 || $[153] !== t74 || $[154] !== t81 || $[155] !== t84 || $[156] !== t91 || $[157] !== t96) {
|
|
856
|
+
t102 = /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-12 gap-4 p-4", children: [
|
|
857
|
+
t54,
|
|
858
|
+
t62,
|
|
859
|
+
t74,
|
|
860
|
+
t81,
|
|
861
|
+
t84,
|
|
862
|
+
t91,
|
|
863
|
+
t96,
|
|
864
|
+
t101
|
|
865
|
+
] });
|
|
866
|
+
$[150] = t101;
|
|
867
|
+
$[151] = t54;
|
|
868
|
+
$[152] = t62;
|
|
869
|
+
$[153] = t74;
|
|
870
|
+
$[154] = t81;
|
|
871
|
+
$[155] = t84;
|
|
872
|
+
$[156] = t91;
|
|
873
|
+
$[157] = t96;
|
|
874
|
+
$[158] = t102;
|
|
875
|
+
} else {
|
|
876
|
+
t102 = $[158];
|
|
877
|
+
}
|
|
878
|
+
let t103;
|
|
879
|
+
if ($[159] !== advancedPanelExpanded || $[160] !== t102) {
|
|
880
|
+
t103 = /* @__PURE__ */ jsx(ExpandablePanel, { expanded: advancedPanelExpanded, onExpandedChange: setAdvancedPanelExpanded, title: t47, initiallyExpanded: false, children: t102 });
|
|
881
|
+
$[159] = advancedPanelExpanded;
|
|
882
|
+
$[160] = t102;
|
|
883
|
+
$[161] = t103;
|
|
884
|
+
} else {
|
|
885
|
+
t103 = $[161];
|
|
886
|
+
}
|
|
887
|
+
let t104;
|
|
888
|
+
if ($[162] !== children || $[163] !== t103) {
|
|
889
|
+
t104 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 mt-8", children: [
|
|
890
|
+
t103,
|
|
849
891
|
children
|
|
850
892
|
] });
|
|
851
|
-
$[
|
|
852
|
-
$[
|
|
853
|
-
$[
|
|
893
|
+
$[162] = children;
|
|
894
|
+
$[163] = t103;
|
|
895
|
+
$[164] = t104;
|
|
854
896
|
} else {
|
|
855
|
-
|
|
897
|
+
t104 = $[164];
|
|
856
898
|
}
|
|
857
|
-
let
|
|
858
|
-
if ($[
|
|
859
|
-
|
|
899
|
+
let t105;
|
|
900
|
+
if ($[165] !== t104 || $[166] !== t27 || $[167] !== t36 || $[168] !== t37 || $[169] !== t40 || $[170] !== t46) {
|
|
901
|
+
t105 = /* @__PURE__ */ jsxs("div", { className: t19, children: [
|
|
860
902
|
t27,
|
|
861
903
|
t36,
|
|
862
904
|
t37,
|
|
863
905
|
t40,
|
|
864
|
-
|
|
906
|
+
t46,
|
|
907
|
+
t104
|
|
865
908
|
] });
|
|
866
|
-
$[
|
|
867
|
-
$[
|
|
868
|
-
$[
|
|
869
|
-
$[
|
|
870
|
-
$[
|
|
871
|
-
$[
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
909
|
+
$[165] = t104;
|
|
910
|
+
$[166] = t27;
|
|
911
|
+
$[167] = t36;
|
|
912
|
+
$[168] = t37;
|
|
913
|
+
$[169] = t40;
|
|
914
|
+
$[170] = t46;
|
|
915
|
+
$[171] = t105;
|
|
916
|
+
} else {
|
|
917
|
+
t105 = $[171];
|
|
918
|
+
}
|
|
919
|
+
let t106;
|
|
920
|
+
if ($[172] === Symbol.for("react.memo_cache_sentinel")) {
|
|
921
|
+
t106 = /* @__PURE__ */ jsx("div", { style: {
|
|
878
922
|
height: "52px"
|
|
879
923
|
} });
|
|
880
|
-
$[
|
|
924
|
+
$[172] = t106;
|
|
881
925
|
} else {
|
|
882
|
-
|
|
926
|
+
t106 = $[172];
|
|
883
927
|
}
|
|
884
|
-
let
|
|
885
|
-
if ($[
|
|
886
|
-
|
|
928
|
+
let t107;
|
|
929
|
+
if ($[173] !== setFieldValue) {
|
|
930
|
+
t107 = (icon) => {
|
|
887
931
|
setIconDialogOpen(false);
|
|
888
932
|
setFieldValue("icon", icon);
|
|
889
933
|
};
|
|
890
|
-
$[
|
|
891
|
-
$[
|
|
934
|
+
$[173] = setFieldValue;
|
|
935
|
+
$[174] = t107;
|
|
892
936
|
} else {
|
|
893
|
-
|
|
937
|
+
t107 = $[174];
|
|
894
938
|
}
|
|
895
|
-
let
|
|
896
|
-
if ($[
|
|
897
|
-
|
|
898
|
-
$[
|
|
899
|
-
$[
|
|
900
|
-
$[
|
|
939
|
+
let t108;
|
|
940
|
+
if ($[175] !== t107 || $[176] !== values.icon) {
|
|
941
|
+
t108 = /* @__PURE__ */ jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsx(SearchIconsView, { selectedIcon: values.icon, onIconSelected: t107 }) });
|
|
942
|
+
$[175] = t107;
|
|
943
|
+
$[176] = values.icon;
|
|
944
|
+
$[177] = t108;
|
|
901
945
|
} else {
|
|
902
|
-
|
|
946
|
+
t108 = $[177];
|
|
903
947
|
}
|
|
904
|
-
let
|
|
905
|
-
if ($[
|
|
906
|
-
|
|
907
|
-
$[
|
|
908
|
-
$[
|
|
909
|
-
$[
|
|
948
|
+
let t109;
|
|
949
|
+
if ($[178] !== iconDialogOpen || $[179] !== t108) {
|
|
950
|
+
t109 = /* @__PURE__ */ jsx(Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t108 });
|
|
951
|
+
$[178] = iconDialogOpen;
|
|
952
|
+
$[179] = t108;
|
|
953
|
+
$[180] = t109;
|
|
910
954
|
} else {
|
|
911
|
-
|
|
955
|
+
t109 = $[180];
|
|
912
956
|
}
|
|
913
|
-
let
|
|
914
|
-
if ($[
|
|
915
|
-
|
|
957
|
+
let t110;
|
|
958
|
+
if ($[181] !== T0 || $[182] !== t105 || $[183] !== t109 || $[184] !== t18) {
|
|
959
|
+
t110 = /* @__PURE__ */ jsx("div", { className: t7, children: /* @__PURE__ */ jsxs(T0, { maxWidth: t8, className: t9, children: [
|
|
916
960
|
t18,
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
961
|
+
t105,
|
|
962
|
+
t106,
|
|
963
|
+
t109
|
|
920
964
|
] }) });
|
|
921
|
-
$[
|
|
922
|
-
$[
|
|
923
|
-
$[
|
|
924
|
-
$[
|
|
925
|
-
$[
|
|
965
|
+
$[181] = T0;
|
|
966
|
+
$[182] = t105;
|
|
967
|
+
$[183] = t109;
|
|
968
|
+
$[184] = t18;
|
|
969
|
+
$[185] = t110;
|
|
926
970
|
} else {
|
|
927
|
-
|
|
971
|
+
t110 = $[185];
|
|
928
972
|
}
|
|
929
|
-
return
|
|
973
|
+
return t110;
|
|
930
974
|
}
|
|
931
975
|
function _temp3$4(value_3) {
|
|
932
976
|
if (value_3 === "code_defined") {
|