@firecms/collection_editor 3.0.0-canary.235 → 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/ConfigControllerProvider.d.ts +0 -1
- package/dist/index.es.js +652 -600
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +651 -599
- package/dist/index.umd.js.map +1 -1
- package/dist/types/collection_editor_controller.d.ts +0 -1
- package/dist/ui/collection_editor/CollectionEditorWelcomeView.d.ts +1 -1
- package/dist/useCollectionEditorPlugin.d.ts +3 -3
- package/package.json +8 -8
- package/src/ConfigControllerProvider.tsx +0 -5
- package/src/types/collection_editor_controller.tsx +0 -2
- package/src/ui/collection_editor/CollectionDetailsForm.tsx +19 -0
- package/src/ui/collection_editor/CollectionEditorWelcomeView.tsx +5 -21
- package/src/useCollectionEditorPlugin.tsx +5 -6
- package/src/utils/collections.ts +1 -0
package/dist/index.umd.js
CHANGED
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
return t18;
|
|
170
170
|
}
|
|
171
171
|
function CollectionDetailsForm(t0) {
|
|
172
|
-
const $ = reactCompilerRuntime.c(
|
|
172
|
+
const $ = reactCompilerRuntime.c(186);
|
|
173
173
|
const {
|
|
174
174
|
isNewCollection,
|
|
175
175
|
reservedGroups,
|
|
@@ -475,101 +475,143 @@
|
|
|
475
475
|
} else {
|
|
476
476
|
t40 = $[58];
|
|
477
477
|
}
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
] });
|
|
484
|
-
$[59] = t41;
|
|
485
|
-
} else {
|
|
486
|
-
t41 = $[59];
|
|
487
|
-
}
|
|
488
|
-
const t42 = !isNewCollection;
|
|
489
|
-
const t43 = showErrors && Boolean(errors.id);
|
|
490
|
-
let t44;
|
|
491
|
-
if ($[60] !== t42 || $[61] !== t43) {
|
|
492
|
-
t44 = /* @__PURE__ */ jsxRuntime.jsx(formex.Field, { name: "id", as: ui.DebouncedTextField, disabled: t42, label: "Collection id", error: t43 });
|
|
478
|
+
const t41 = values.history === null ? "Document history revisions enabled if enabled globally" : values.history ? "Document history revisions ENABLED" : "Document history revisions NOT enabled";
|
|
479
|
+
let t42;
|
|
480
|
+
if ($[59] !== setFieldValue) {
|
|
481
|
+
t42 = (v) => setFieldValue("history", v);
|
|
482
|
+
$[59] = setFieldValue;
|
|
493
483
|
$[60] = t42;
|
|
494
|
-
$[61] = t43;
|
|
495
|
-
$[62] = t44;
|
|
496
484
|
} else {
|
|
497
|
-
|
|
485
|
+
t42 = $[60];
|
|
498
486
|
}
|
|
499
|
-
const
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
$[
|
|
505
|
-
$[
|
|
506
|
-
$[
|
|
487
|
+
const t43 = values.history ?? null;
|
|
488
|
+
let t44;
|
|
489
|
+
if ($[61] !== t41 || $[62] !== t42 || $[63] !== t43) {
|
|
490
|
+
t44 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", allowIndeterminate: true, label: t41, onValueChange: t42, value: t43 });
|
|
491
|
+
$[61] = t41;
|
|
492
|
+
$[62] = t42;
|
|
493
|
+
$[63] = t43;
|
|
494
|
+
$[64] = t44;
|
|
495
|
+
} else {
|
|
496
|
+
t44 = $[64];
|
|
497
|
+
}
|
|
498
|
+
let t45;
|
|
499
|
+
if ($[65] === Symbol.for("react.memo_cache_sentinel")) {
|
|
500
|
+
t45 = /* @__PURE__ */ jsxRuntime.jsxs(core.FieldCaption, { children: [
|
|
501
|
+
"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 ",
|
|
502
|
+
/* @__PURE__ */ jsxRuntime.jsx("b", { children: "__history" }),
|
|
503
|
+
"."
|
|
504
|
+
] });
|
|
505
|
+
$[65] = t45;
|
|
507
506
|
} else {
|
|
508
|
-
|
|
507
|
+
t45 = $[65];
|
|
509
508
|
}
|
|
510
|
-
let
|
|
511
|
-
if ($[66] !== t44
|
|
512
|
-
|
|
509
|
+
let t46;
|
|
510
|
+
if ($[66] !== t44) {
|
|
511
|
+
t46 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
513
512
|
t44,
|
|
514
|
-
|
|
513
|
+
t45
|
|
515
514
|
] });
|
|
516
515
|
$[66] = t44;
|
|
517
|
-
$[67] =
|
|
518
|
-
|
|
516
|
+
$[67] = t46;
|
|
517
|
+
} else {
|
|
518
|
+
t46 = $[67];
|
|
519
|
+
}
|
|
520
|
+
let t47;
|
|
521
|
+
if ($[68] === Symbol.for("react.memo_cache_sentinel")) {
|
|
522
|
+
t47 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row text-surface-500", children: [
|
|
523
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.SettingsIcon, {}),
|
|
524
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "ml-2", children: "Advanced" })
|
|
525
|
+
] });
|
|
526
|
+
$[68] = t47;
|
|
519
527
|
} else {
|
|
520
|
-
|
|
528
|
+
t47 = $[68];
|
|
521
529
|
}
|
|
522
|
-
const
|
|
530
|
+
const t48 = !isNewCollection;
|
|
531
|
+
const t49 = showErrors && Boolean(errors.id);
|
|
523
532
|
let t50;
|
|
524
|
-
if ($[69] !==
|
|
525
|
-
t50 = (
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
};
|
|
529
|
-
$[69] = handleChange;
|
|
530
|
-
$[70] = setFieldTouched;
|
|
533
|
+
if ($[69] !== t48 || $[70] !== t49) {
|
|
534
|
+
t50 = /* @__PURE__ */ jsxRuntime.jsx(formex.Field, { name: "id", as: ui.DebouncedTextField, disabled: t48, label: "Collection id", error: t49 });
|
|
535
|
+
$[69] = t48;
|
|
536
|
+
$[70] = t49;
|
|
531
537
|
$[71] = t50;
|
|
532
538
|
} else {
|
|
533
539
|
t50 = $[71];
|
|
534
540
|
}
|
|
535
|
-
const t51 =
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
$[
|
|
541
|
-
$[
|
|
542
|
-
$[
|
|
543
|
-
} else {
|
|
544
|
-
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
541
|
+
const t51 = touched.id && Boolean(errors.id);
|
|
542
|
+
const t52 = touched.id && Boolean(errors.id) ? errors.id : "This id identifies this collection. Typically the same as the path.";
|
|
543
|
+
let t53;
|
|
544
|
+
if ($[72] !== t51 || $[73] !== t52) {
|
|
545
|
+
t53 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t51, children: t52 });
|
|
546
|
+
$[72] = t51;
|
|
547
|
+
$[73] = t52;
|
|
548
|
+
$[74] = t53;
|
|
549
|
+
} else {
|
|
550
|
+
t53 = $[74];
|
|
551
|
+
}
|
|
552
|
+
let t54;
|
|
553
|
+
if ($[75] !== t50 || $[76] !== t53) {
|
|
554
|
+
t54 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
555
|
+
t50,
|
|
556
|
+
t53
|
|
557
|
+
] });
|
|
558
|
+
$[75] = t50;
|
|
551
559
|
$[76] = t53;
|
|
552
560
|
$[77] = t54;
|
|
553
|
-
$[78] = t55;
|
|
554
561
|
} else {
|
|
555
|
-
|
|
562
|
+
t54 = $[77];
|
|
556
563
|
}
|
|
564
|
+
const t55 = showErrors && Boolean(errors.singularName);
|
|
557
565
|
let t56;
|
|
558
|
-
if ($[
|
|
559
|
-
t56 =
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
$[
|
|
564
|
-
$[
|
|
565
|
-
$[
|
|
566
|
+
if ($[78] !== handleChange || $[79] !== setFieldTouched) {
|
|
567
|
+
t56 = (e_0) => {
|
|
568
|
+
setFieldTouched("singularName", true);
|
|
569
|
+
return handleChange(e_0);
|
|
570
|
+
};
|
|
571
|
+
$[78] = handleChange;
|
|
572
|
+
$[79] = setFieldTouched;
|
|
573
|
+
$[80] = t56;
|
|
566
574
|
} else {
|
|
567
|
-
t56 = $[
|
|
575
|
+
t56 = $[80];
|
|
568
576
|
}
|
|
569
|
-
const t57 =
|
|
577
|
+
const t57 = values.singularName ?? "";
|
|
570
578
|
let t58;
|
|
571
|
-
if ($[82] !==
|
|
572
|
-
t58 = (
|
|
579
|
+
if ($[81] !== t55 || $[82] !== t56 || $[83] !== t57) {
|
|
580
|
+
t58 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: t55, name: "singularName", "aria-describedby": "singularName-helper", onChange: t56, value: t57, label: "Singular name" });
|
|
581
|
+
$[81] = t55;
|
|
582
|
+
$[82] = t56;
|
|
583
|
+
$[83] = t57;
|
|
584
|
+
$[84] = t58;
|
|
585
|
+
} else {
|
|
586
|
+
t58 = $[84];
|
|
587
|
+
}
|
|
588
|
+
const t59 = showErrors && Boolean(errors.singularName);
|
|
589
|
+
const t60 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define a singular name for your entities";
|
|
590
|
+
let t61;
|
|
591
|
+
if ($[85] !== t59 || $[86] !== t60) {
|
|
592
|
+
t61 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t59, children: t60 });
|
|
593
|
+
$[85] = t59;
|
|
594
|
+
$[86] = t60;
|
|
595
|
+
$[87] = t61;
|
|
596
|
+
} else {
|
|
597
|
+
t61 = $[87];
|
|
598
|
+
}
|
|
599
|
+
let t62;
|
|
600
|
+
if ($[88] !== t58 || $[89] !== t61) {
|
|
601
|
+
t62 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
602
|
+
t58,
|
|
603
|
+
t61
|
|
604
|
+
] });
|
|
605
|
+
$[88] = t58;
|
|
606
|
+
$[89] = t61;
|
|
607
|
+
$[90] = t62;
|
|
608
|
+
} else {
|
|
609
|
+
t62 = $[90];
|
|
610
|
+
}
|
|
611
|
+
const t63 = showErrors && Boolean(errors.sideDialogWidth);
|
|
612
|
+
let t64;
|
|
613
|
+
if ($[91] !== setFieldTouched || $[92] !== setFieldValue) {
|
|
614
|
+
t64 = (e_1) => {
|
|
573
615
|
setFieldTouched("sideDialogWidth", true);
|
|
574
616
|
const value_0 = e_1.target.value;
|
|
575
617
|
if (!value_0) {
|
|
@@ -580,360 +622,362 @@
|
|
|
580
622
|
}
|
|
581
623
|
}
|
|
582
624
|
};
|
|
583
|
-
$[
|
|
584
|
-
$[
|
|
585
|
-
$[
|
|
625
|
+
$[91] = setFieldTouched;
|
|
626
|
+
$[92] = setFieldValue;
|
|
627
|
+
$[93] = t64;
|
|
586
628
|
} else {
|
|
587
|
-
|
|
629
|
+
t64 = $[93];
|
|
588
630
|
}
|
|
589
|
-
let
|
|
590
|
-
if ($[
|
|
591
|
-
|
|
631
|
+
let t65;
|
|
632
|
+
if ($[94] !== setFieldValue) {
|
|
633
|
+
t65 = () => {
|
|
592
634
|
setFieldValue("sideDialogWidth", null);
|
|
593
635
|
};
|
|
594
|
-
$[
|
|
595
|
-
$[
|
|
596
|
-
} else {
|
|
597
|
-
t59 = $[86];
|
|
598
|
-
}
|
|
599
|
-
const t60 = !values.sideDialogWidth;
|
|
600
|
-
let t61;
|
|
601
|
-
if ($[87] === Symbol.for("react.memo_cache_sentinel")) {
|
|
602
|
-
t61 = /* @__PURE__ */ jsxRuntime.jsx(ui.CloseIcon, { size: "small" });
|
|
603
|
-
$[87] = t61;
|
|
636
|
+
$[94] = setFieldValue;
|
|
637
|
+
$[95] = t65;
|
|
604
638
|
} else {
|
|
605
|
-
|
|
639
|
+
t65 = $[95];
|
|
606
640
|
}
|
|
607
|
-
|
|
608
|
-
if ($[88] !== t59 || $[89] !== t60) {
|
|
609
|
-
t62 = /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { size: "small", onClick: t59, disabled: t60, children: t61 });
|
|
610
|
-
$[88] = t59;
|
|
611
|
-
$[89] = t60;
|
|
612
|
-
$[90] = t62;
|
|
613
|
-
} else {
|
|
614
|
-
t62 = $[90];
|
|
615
|
-
}
|
|
616
|
-
const t63 = values.sideDialogWidth ?? "";
|
|
617
|
-
let t64;
|
|
618
|
-
if ($[91] !== t57 || $[92] !== t58 || $[93] !== t62 || $[94] !== t63) {
|
|
619
|
-
t64 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: t57, name: "sideDialogWidth", type: "number", "aria-describedby": "sideDialogWidth-helper", onChange: t58, endAdornment: t62, value: t63, label: "Side dialog width" });
|
|
620
|
-
$[91] = t57;
|
|
621
|
-
$[92] = t58;
|
|
622
|
-
$[93] = t62;
|
|
623
|
-
$[94] = t63;
|
|
624
|
-
$[95] = t64;
|
|
625
|
-
} else {
|
|
626
|
-
t64 = $[95];
|
|
627
|
-
}
|
|
628
|
-
const t65 = showErrors && Boolean(errors.singularName);
|
|
629
|
-
const t66 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define the width (in pixels) of entities side dialog. Default is 768px";
|
|
641
|
+
const t66 = !values.sideDialogWidth;
|
|
630
642
|
let t67;
|
|
631
|
-
if ($[96]
|
|
632
|
-
t67 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
633
|
-
$[96] =
|
|
634
|
-
$[97] = t66;
|
|
635
|
-
$[98] = t67;
|
|
643
|
+
if ($[96] === Symbol.for("react.memo_cache_sentinel")) {
|
|
644
|
+
t67 = /* @__PURE__ */ jsxRuntime.jsx(ui.CloseIcon, { size: "small" });
|
|
645
|
+
$[96] = t67;
|
|
636
646
|
} else {
|
|
637
|
-
t67 = $[
|
|
647
|
+
t67 = $[96];
|
|
638
648
|
}
|
|
639
649
|
let t68;
|
|
640
|
-
if ($[
|
|
641
|
-
t68 = /* @__PURE__ */ jsxRuntime.
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
]
|
|
645
|
-
|
|
646
|
-
$[
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
t71 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: t69, name: "description", value: t70, onChange: handleChange, multiline: true, minRows: 2, "aria-describedby": "description-helper-text", label: "Description" });
|
|
656
|
-
$[102] = handleChange;
|
|
650
|
+
if ($[97] !== t65 || $[98] !== t66) {
|
|
651
|
+
t68 = /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { size: "small", onClick: t65, disabled: t66, children: t67 });
|
|
652
|
+
$[97] = t65;
|
|
653
|
+
$[98] = t66;
|
|
654
|
+
$[99] = t68;
|
|
655
|
+
} else {
|
|
656
|
+
t68 = $[99];
|
|
657
|
+
}
|
|
658
|
+
const t69 = values.sideDialogWidth ?? "";
|
|
659
|
+
let t70;
|
|
660
|
+
if ($[100] !== t63 || $[101] !== t64 || $[102] !== t68 || $[103] !== t69) {
|
|
661
|
+
t70 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: t63, name: "sideDialogWidth", type: "number", "aria-describedby": "sideDialogWidth-helper", onChange: t64, endAdornment: t68, value: t69, label: "Side dialog width" });
|
|
662
|
+
$[100] = t63;
|
|
663
|
+
$[101] = t64;
|
|
664
|
+
$[102] = t68;
|
|
657
665
|
$[103] = t69;
|
|
658
666
|
$[104] = t70;
|
|
659
|
-
$[105] = t71;
|
|
660
667
|
} else {
|
|
661
|
-
|
|
668
|
+
t70 = $[104];
|
|
662
669
|
}
|
|
663
|
-
const
|
|
664
|
-
const
|
|
665
|
-
let
|
|
666
|
-
if ($[
|
|
667
|
-
|
|
670
|
+
const t71 = showErrors && Boolean(errors.singularName);
|
|
671
|
+
const t72 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define the width (in pixels) of entities side dialog. Default is 768px";
|
|
672
|
+
let t73;
|
|
673
|
+
if ($[105] !== t71 || $[106] !== t72) {
|
|
674
|
+
t73 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t71, children: t72 });
|
|
675
|
+
$[105] = t71;
|
|
668
676
|
$[106] = t72;
|
|
669
677
|
$[107] = t73;
|
|
670
|
-
$[108] = t74;
|
|
671
678
|
} else {
|
|
672
|
-
|
|
679
|
+
t73 = $[107];
|
|
673
680
|
}
|
|
674
|
-
let
|
|
675
|
-
if ($[
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
681
|
+
let t74;
|
|
682
|
+
if ($[108] !== t70 || $[109] !== t73) {
|
|
683
|
+
t74 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
684
|
+
t70,
|
|
685
|
+
t73
|
|
679
686
|
] });
|
|
680
|
-
$[
|
|
687
|
+
$[108] = t70;
|
|
688
|
+
$[109] = t73;
|
|
681
689
|
$[110] = t74;
|
|
682
|
-
$[111] = t75;
|
|
683
690
|
} else {
|
|
684
|
-
|
|
691
|
+
t74 = $[110];
|
|
685
692
|
}
|
|
686
|
-
const
|
|
693
|
+
const t75 = showErrors && Boolean(errors.description);
|
|
694
|
+
const t76 = values.description ?? "";
|
|
687
695
|
let t77;
|
|
688
|
-
if ($[112]
|
|
689
|
-
t77 =
|
|
690
|
-
$[
|
|
696
|
+
if ($[111] !== handleChange || $[112] !== t75 || $[113] !== t76) {
|
|
697
|
+
t77 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: t75, name: "description", value: t76, onChange: handleChange, multiline: true, minRows: 2, "aria-describedby": "description-helper-text", label: "Description" });
|
|
698
|
+
$[111] = handleChange;
|
|
699
|
+
$[112] = t75;
|
|
700
|
+
$[113] = t76;
|
|
701
|
+
$[114] = t77;
|
|
691
702
|
} else {
|
|
692
|
-
t77 = $[
|
|
703
|
+
t77 = $[114];
|
|
693
704
|
}
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
t78 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { name: "defaultSize", size: "large", fullWidth: true, label: "Default row size", position: "item-aligned", onChange: handleChange, value: t76, renderValue: _temp$b, children: t77 }) });
|
|
697
|
-
$[113] = handleChange;
|
|
698
|
-
$[114] = t76;
|
|
699
|
-
$[115] = t78;
|
|
700
|
-
} else {
|
|
701
|
-
t78 = $[115];
|
|
702
|
-
}
|
|
703
|
-
const t79 = customIdValue === "code_defined";
|
|
705
|
+
const t78 = showErrors && Boolean(errors.description);
|
|
706
|
+
const t79 = showErrors && Boolean(errors.description) ? errors.description : "Description of the collection, you can use markdown";
|
|
704
707
|
let t80;
|
|
705
|
-
if ($[116] !==
|
|
706
|
-
t80 = (
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
}
|
|
710
|
-
setFieldValue("customId", v);
|
|
711
|
-
};
|
|
712
|
-
$[116] = setFieldValue;
|
|
708
|
+
if ($[115] !== t78 || $[116] !== t79) {
|
|
709
|
+
t80 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t78, children: t79 });
|
|
710
|
+
$[115] = t78;
|
|
711
|
+
$[116] = t79;
|
|
713
712
|
$[117] = t80;
|
|
714
713
|
} else {
|
|
715
714
|
t80 = $[117];
|
|
716
715
|
}
|
|
717
|
-
|
|
718
|
-
|
|
716
|
+
let t81;
|
|
717
|
+
if ($[118] !== t77 || $[119] !== t80) {
|
|
718
|
+
t81 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
719
|
+
t77,
|
|
720
|
+
t80
|
|
721
|
+
] });
|
|
722
|
+
$[118] = t77;
|
|
723
|
+
$[119] = t80;
|
|
724
|
+
$[120] = t81;
|
|
725
|
+
} else {
|
|
726
|
+
t81 = $[120];
|
|
727
|
+
}
|
|
728
|
+
const t82 = values.defaultSize ?? "";
|
|
719
729
|
let t83;
|
|
730
|
+
if ($[121] === Symbol.for("react.memo_cache_sentinel")) {
|
|
731
|
+
t83 = ["xs", "s", "m", "l", "xl"].map(_temp2$7);
|
|
732
|
+
$[121] = t83;
|
|
733
|
+
} else {
|
|
734
|
+
t83 = $[121];
|
|
735
|
+
}
|
|
720
736
|
let t84;
|
|
721
|
-
if ($[
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
$[
|
|
726
|
-
$[119] = t83;
|
|
727
|
-
$[120] = t84;
|
|
728
|
-
} else {
|
|
729
|
-
t82 = $[118];
|
|
730
|
-
t83 = $[119];
|
|
731
|
-
t84 = $[120];
|
|
732
|
-
}
|
|
733
|
-
let t85;
|
|
734
|
-
if ($[121] !== t79 || $[122] !== t80 || $[123] !== t81) {
|
|
735
|
-
t85 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Select, { name: "customId", label: "Document IDs generation", position: "item-aligned", size: "large", fullWidth: true, disabled: t79, onValueChange: t80, value: t81, renderValue: _temp3$4, children: [
|
|
736
|
-
t82,
|
|
737
|
-
t83,
|
|
738
|
-
t84
|
|
739
|
-
] }) });
|
|
740
|
-
$[121] = t79;
|
|
741
|
-
$[122] = t80;
|
|
742
|
-
$[123] = t81;
|
|
743
|
-
$[124] = t85;
|
|
737
|
+
if ($[122] !== handleChange || $[123] !== t82) {
|
|
738
|
+
t84 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { name: "defaultSize", size: "large", fullWidth: true, label: "Default row size", position: "item-aligned", onChange: handleChange, value: t82, renderValue: _temp$b, children: t83 }) });
|
|
739
|
+
$[122] = handleChange;
|
|
740
|
+
$[123] = t82;
|
|
741
|
+
$[124] = t84;
|
|
744
742
|
} else {
|
|
745
|
-
|
|
743
|
+
t84 = $[124];
|
|
746
744
|
}
|
|
745
|
+
const t85 = customIdValue === "code_defined";
|
|
747
746
|
let t86;
|
|
748
747
|
if ($[125] !== setFieldValue) {
|
|
749
|
-
t86 = (v_0) =>
|
|
748
|
+
t86 = (v_0) => {
|
|
749
|
+
if (v_0 === "code_defined") {
|
|
750
|
+
throw new Error("This should not happen");
|
|
751
|
+
}
|
|
752
|
+
setFieldValue("customId", v_0);
|
|
753
|
+
};
|
|
750
754
|
$[125] = setFieldValue;
|
|
751
755
|
$[126] = t86;
|
|
752
756
|
} else {
|
|
753
757
|
t86 = $[126];
|
|
754
758
|
}
|
|
755
|
-
const t87 =
|
|
759
|
+
const t87 = customIdValue ?? "";
|
|
756
760
|
let t88;
|
|
757
|
-
if ($[127] !== t86 || $[128] !== t87) {
|
|
758
|
-
t88 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: "Collection group", onValueChange: t86, value: t87 });
|
|
759
|
-
$[127] = t86;
|
|
760
|
-
$[128] = t87;
|
|
761
|
-
$[129] = t88;
|
|
762
|
-
} else {
|
|
763
|
-
t88 = $[129];
|
|
764
|
-
}
|
|
765
761
|
let t89;
|
|
766
|
-
if ($[130] === Symbol.for("react.memo_cache_sentinel")) {
|
|
767
|
-
t89 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { children: "A collection group consists of all collections with the same path. This allows you to query over multiple collections at once." });
|
|
768
|
-
$[130] = t89;
|
|
769
|
-
} else {
|
|
770
|
-
t89 = $[130];
|
|
771
|
-
}
|
|
772
762
|
let t90;
|
|
773
|
-
if ($[
|
|
774
|
-
|
|
763
|
+
if ($[127] === Symbol.for("react.memo_cache_sentinel")) {
|
|
764
|
+
t88 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "false", children: "Document ID is generated automatically" });
|
|
765
|
+
t89 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "true", children: "Users must define an ID" });
|
|
766
|
+
t90 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "optional", children: "Users can define an ID, but it is not required" });
|
|
767
|
+
$[127] = t88;
|
|
768
|
+
$[128] = t89;
|
|
769
|
+
$[129] = t90;
|
|
770
|
+
} else {
|
|
771
|
+
t88 = $[127];
|
|
772
|
+
t89 = $[128];
|
|
773
|
+
t90 = $[129];
|
|
774
|
+
}
|
|
775
|
+
let t91;
|
|
776
|
+
if ($[130] !== t85 || $[131] !== t86 || $[132] !== t87) {
|
|
777
|
+
t91 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Select, { name: "customId", label: "Document IDs generation", position: "item-aligned", size: "large", fullWidth: true, disabled: t85, onValueChange: t86, value: t87, renderValue: _temp3$4, children: [
|
|
775
778
|
t88,
|
|
776
|
-
t89
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
$[
|
|
779
|
+
t89,
|
|
780
|
+
t90
|
|
781
|
+
] }) });
|
|
782
|
+
$[130] = t85;
|
|
783
|
+
$[131] = t86;
|
|
784
|
+
$[132] = t87;
|
|
785
|
+
$[133] = t91;
|
|
780
786
|
} else {
|
|
781
|
-
|
|
787
|
+
t91 = $[133];
|
|
782
788
|
}
|
|
783
|
-
let
|
|
784
|
-
if ($[
|
|
785
|
-
|
|
786
|
-
$[
|
|
787
|
-
$[
|
|
788
|
-
} else {
|
|
789
|
-
t91 = $[134];
|
|
790
|
-
}
|
|
791
|
-
const t92 = values.textSearchEnabled ?? false;
|
|
792
|
-
let t93;
|
|
793
|
-
if ($[135] !== t91 || $[136] !== t92) {
|
|
794
|
-
t93 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: "Enable text search for this collection", onValueChange: t91, value: t92 });
|
|
795
|
-
$[135] = t91;
|
|
796
|
-
$[136] = t92;
|
|
797
|
-
$[137] = t93;
|
|
789
|
+
let t92;
|
|
790
|
+
if ($[134] !== setFieldValue) {
|
|
791
|
+
t92 = (v_1) => setFieldValue("collectionGroup", v_1);
|
|
792
|
+
$[134] = setFieldValue;
|
|
793
|
+
$[135] = t92;
|
|
798
794
|
} else {
|
|
799
|
-
|
|
795
|
+
t92 = $[135];
|
|
800
796
|
}
|
|
797
|
+
const t93 = values.collectionGroup ?? false;
|
|
801
798
|
let t94;
|
|
802
|
-
if ($[
|
|
803
|
-
t94 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
799
|
+
if ($[136] !== t92 || $[137] !== t93) {
|
|
800
|
+
t94 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: "Collection group", onValueChange: t92, value: t93 });
|
|
801
|
+
$[136] = t92;
|
|
802
|
+
$[137] = t93;
|
|
804
803
|
$[138] = t94;
|
|
805
804
|
} else {
|
|
806
805
|
t94 = $[138];
|
|
807
806
|
}
|
|
808
807
|
let t95;
|
|
809
|
-
if ($[139]
|
|
810
|
-
t95 = /* @__PURE__ */ jsxRuntime.
|
|
811
|
-
|
|
812
|
-
t94
|
|
813
|
-
] });
|
|
814
|
-
$[139] = t93;
|
|
815
|
-
$[140] = t95;
|
|
808
|
+
if ($[139] === Symbol.for("react.memo_cache_sentinel")) {
|
|
809
|
+
t95 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { children: "A collection group consists of all collections with the same path. This allows you to query over multiple collections at once." });
|
|
810
|
+
$[139] = t95;
|
|
816
811
|
} else {
|
|
817
|
-
t95 = $[
|
|
812
|
+
t95 = $[139];
|
|
818
813
|
}
|
|
819
814
|
let t96;
|
|
820
|
-
if ($[
|
|
821
|
-
t96 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
822
|
-
|
|
823
|
-
t56,
|
|
824
|
-
t68,
|
|
825
|
-
t75,
|
|
826
|
-
t78,
|
|
827
|
-
t85,
|
|
828
|
-
t90,
|
|
815
|
+
if ($[140] !== t94) {
|
|
816
|
+
t96 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-4", children: [
|
|
817
|
+
t94,
|
|
829
818
|
t95
|
|
830
819
|
] });
|
|
831
|
-
$[
|
|
832
|
-
$[
|
|
833
|
-
|
|
834
|
-
$[
|
|
835
|
-
$[145] = t78;
|
|
836
|
-
$[146] = t85;
|
|
837
|
-
$[147] = t90;
|
|
838
|
-
$[148] = t95;
|
|
839
|
-
$[149] = t96;
|
|
840
|
-
} else {
|
|
841
|
-
t96 = $[149];
|
|
820
|
+
$[140] = t94;
|
|
821
|
+
$[141] = t96;
|
|
822
|
+
} else {
|
|
823
|
+
t96 = $[141];
|
|
842
824
|
}
|
|
843
825
|
let t97;
|
|
844
|
-
if ($[
|
|
845
|
-
t97 =
|
|
846
|
-
$[
|
|
847
|
-
$[
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
let
|
|
853
|
-
if ($[
|
|
854
|
-
|
|
855
|
-
|
|
826
|
+
if ($[142] !== setFieldValue) {
|
|
827
|
+
t97 = (v_2) => setFieldValue("textSearchEnabled", v_2);
|
|
828
|
+
$[142] = setFieldValue;
|
|
829
|
+
$[143] = t97;
|
|
830
|
+
} else {
|
|
831
|
+
t97 = $[143];
|
|
832
|
+
}
|
|
833
|
+
const t98 = values.textSearchEnabled ?? false;
|
|
834
|
+
let t99;
|
|
835
|
+
if ($[144] !== t97 || $[145] !== t98) {
|
|
836
|
+
t99 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: "Enable text search for this collection", onValueChange: t97, value: t98 });
|
|
837
|
+
$[144] = t97;
|
|
838
|
+
$[145] = t98;
|
|
839
|
+
$[146] = t99;
|
|
840
|
+
} else {
|
|
841
|
+
t99 = $[146];
|
|
842
|
+
}
|
|
843
|
+
let t100;
|
|
844
|
+
if ($[147] === Symbol.for("react.memo_cache_sentinel")) {
|
|
845
|
+
t100 = /* @__PURE__ */ jsxRuntime.jsx(core.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." });
|
|
846
|
+
$[147] = t100;
|
|
847
|
+
} else {
|
|
848
|
+
t100 = $[147];
|
|
849
|
+
}
|
|
850
|
+
let t101;
|
|
851
|
+
if ($[148] !== t99) {
|
|
852
|
+
t101 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
853
|
+
t99,
|
|
854
|
+
t100
|
|
855
|
+
] });
|
|
856
|
+
$[148] = t99;
|
|
857
|
+
$[149] = t101;
|
|
858
|
+
} else {
|
|
859
|
+
t101 = $[149];
|
|
860
|
+
}
|
|
861
|
+
let t102;
|
|
862
|
+
if ($[150] !== t101 || $[151] !== t54 || $[152] !== t62 || $[153] !== t74 || $[154] !== t81 || $[155] !== t84 || $[156] !== t91 || $[157] !== t96) {
|
|
863
|
+
t102 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 gap-4 p-4", children: [
|
|
864
|
+
t54,
|
|
865
|
+
t62,
|
|
866
|
+
t74,
|
|
867
|
+
t81,
|
|
868
|
+
t84,
|
|
869
|
+
t91,
|
|
870
|
+
t96,
|
|
871
|
+
t101
|
|
872
|
+
] });
|
|
873
|
+
$[150] = t101;
|
|
874
|
+
$[151] = t54;
|
|
875
|
+
$[152] = t62;
|
|
876
|
+
$[153] = t74;
|
|
877
|
+
$[154] = t81;
|
|
878
|
+
$[155] = t84;
|
|
879
|
+
$[156] = t91;
|
|
880
|
+
$[157] = t96;
|
|
881
|
+
$[158] = t102;
|
|
882
|
+
} else {
|
|
883
|
+
t102 = $[158];
|
|
884
|
+
}
|
|
885
|
+
let t103;
|
|
886
|
+
if ($[159] !== advancedPanelExpanded || $[160] !== t102) {
|
|
887
|
+
t103 = /* @__PURE__ */ jsxRuntime.jsx(ui.ExpandablePanel, { expanded: advancedPanelExpanded, onExpandedChange: setAdvancedPanelExpanded, title: t47, initiallyExpanded: false, children: t102 });
|
|
888
|
+
$[159] = advancedPanelExpanded;
|
|
889
|
+
$[160] = t102;
|
|
890
|
+
$[161] = t103;
|
|
891
|
+
} else {
|
|
892
|
+
t103 = $[161];
|
|
893
|
+
}
|
|
894
|
+
let t104;
|
|
895
|
+
if ($[162] !== children || $[163] !== t103) {
|
|
896
|
+
t104 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-8", children: [
|
|
897
|
+
t103,
|
|
856
898
|
children
|
|
857
899
|
] });
|
|
858
|
-
$[
|
|
859
|
-
$[
|
|
860
|
-
$[
|
|
900
|
+
$[162] = children;
|
|
901
|
+
$[163] = t103;
|
|
902
|
+
$[164] = t104;
|
|
861
903
|
} else {
|
|
862
|
-
|
|
904
|
+
t104 = $[164];
|
|
863
905
|
}
|
|
864
|
-
let
|
|
865
|
-
if ($[
|
|
866
|
-
|
|
906
|
+
let t105;
|
|
907
|
+
if ($[165] !== t104 || $[166] !== t27 || $[167] !== t36 || $[168] !== t37 || $[169] !== t40 || $[170] !== t46) {
|
|
908
|
+
t105 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t19, children: [
|
|
867
909
|
t27,
|
|
868
910
|
t36,
|
|
869
911
|
t37,
|
|
870
912
|
t40,
|
|
871
|
-
|
|
913
|
+
t46,
|
|
914
|
+
t104
|
|
872
915
|
] });
|
|
873
|
-
$[
|
|
874
|
-
$[
|
|
875
|
-
$[
|
|
876
|
-
$[
|
|
877
|
-
$[
|
|
878
|
-
$[
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
916
|
+
$[165] = t104;
|
|
917
|
+
$[166] = t27;
|
|
918
|
+
$[167] = t36;
|
|
919
|
+
$[168] = t37;
|
|
920
|
+
$[169] = t40;
|
|
921
|
+
$[170] = t46;
|
|
922
|
+
$[171] = t105;
|
|
923
|
+
} else {
|
|
924
|
+
t105 = $[171];
|
|
925
|
+
}
|
|
926
|
+
let t106;
|
|
927
|
+
if ($[172] === Symbol.for("react.memo_cache_sentinel")) {
|
|
928
|
+
t106 = /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
885
929
|
height: "52px"
|
|
886
930
|
} });
|
|
887
|
-
$[
|
|
931
|
+
$[172] = t106;
|
|
888
932
|
} else {
|
|
889
|
-
|
|
933
|
+
t106 = $[172];
|
|
890
934
|
}
|
|
891
|
-
let
|
|
892
|
-
if ($[
|
|
893
|
-
|
|
935
|
+
let t107;
|
|
936
|
+
if ($[173] !== setFieldValue) {
|
|
937
|
+
t107 = (icon) => {
|
|
894
938
|
setIconDialogOpen(false);
|
|
895
939
|
setFieldValue("icon", icon);
|
|
896
940
|
};
|
|
897
|
-
$[
|
|
898
|
-
$[
|
|
941
|
+
$[173] = setFieldValue;
|
|
942
|
+
$[174] = t107;
|
|
899
943
|
} else {
|
|
900
|
-
|
|
944
|
+
t107 = $[174];
|
|
901
945
|
}
|
|
902
|
-
let
|
|
903
|
-
if ($[
|
|
904
|
-
|
|
905
|
-
$[
|
|
906
|
-
$[
|
|
907
|
-
$[
|
|
946
|
+
let t108;
|
|
947
|
+
if ($[175] !== t107 || $[176] !== values.icon) {
|
|
948
|
+
t108 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsxRuntime.jsx(core.SearchIconsView, { selectedIcon: values.icon, onIconSelected: t107 }) });
|
|
949
|
+
$[175] = t107;
|
|
950
|
+
$[176] = values.icon;
|
|
951
|
+
$[177] = t108;
|
|
908
952
|
} else {
|
|
909
|
-
|
|
953
|
+
t108 = $[177];
|
|
910
954
|
}
|
|
911
|
-
let
|
|
912
|
-
if ($[
|
|
913
|
-
|
|
914
|
-
$[
|
|
915
|
-
$[
|
|
916
|
-
$[
|
|
955
|
+
let t109;
|
|
956
|
+
if ($[178] !== iconDialogOpen || $[179] !== t108) {
|
|
957
|
+
t109 = /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t108 });
|
|
958
|
+
$[178] = iconDialogOpen;
|
|
959
|
+
$[179] = t108;
|
|
960
|
+
$[180] = t109;
|
|
917
961
|
} else {
|
|
918
|
-
|
|
962
|
+
t109 = $[180];
|
|
919
963
|
}
|
|
920
|
-
let
|
|
921
|
-
if ($[
|
|
922
|
-
|
|
964
|
+
let t110;
|
|
965
|
+
if ($[181] !== T0 || $[182] !== t105 || $[183] !== t109 || $[184] !== t18) {
|
|
966
|
+
t110 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t7, children: /* @__PURE__ */ jsxRuntime.jsxs(T0, { maxWidth: t8, className: t9, children: [
|
|
923
967
|
t18,
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
968
|
+
t105,
|
|
969
|
+
t106,
|
|
970
|
+
t109
|
|
927
971
|
] }) });
|
|
928
|
-
$[
|
|
929
|
-
$[
|
|
930
|
-
$[
|
|
931
|
-
$[
|
|
932
|
-
$[
|
|
972
|
+
$[181] = T0;
|
|
973
|
+
$[182] = t105;
|
|
974
|
+
$[183] = t109;
|
|
975
|
+
$[184] = t18;
|
|
976
|
+
$[185] = t110;
|
|
933
977
|
} else {
|
|
934
|
-
|
|
978
|
+
t110 = $[185];
|
|
935
979
|
}
|
|
936
|
-
return
|
|
980
|
+
return t110;
|
|
937
981
|
}
|
|
938
982
|
function _temp3$4(value_3) {
|
|
939
983
|
if (value_3 === "code_defined") {
|
|
@@ -8072,7 +8116,7 @@
|
|
|
8072
8116
|
}
|
|
8073
8117
|
};
|
|
8074
8118
|
function CollectionEditorWelcomeView(t0) {
|
|
8075
|
-
const $ = reactCompilerRuntime.c(
|
|
8119
|
+
const $ = reactCompilerRuntime.c(52);
|
|
8076
8120
|
const {
|
|
8077
8121
|
path,
|
|
8078
8122
|
pathSuggestions,
|
|
@@ -8109,6 +8153,10 @@
|
|
|
8109
8153
|
setFieldValue,
|
|
8110
8154
|
setValues
|
|
8111
8155
|
} = formex.useFormex();
|
|
8156
|
+
const noSuggestions = !loadingPathSuggestions && (filteredPathSuggestions ?? [])?.length === 0;
|
|
8157
|
+
if (!noSuggestions) {
|
|
8158
|
+
return null;
|
|
8159
|
+
}
|
|
8112
8160
|
let t3;
|
|
8113
8161
|
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8114
8162
|
t3 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row py-2 pt-3 items-center", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "h4", className: "flex-grow", children: "New collection" }) });
|
|
@@ -8160,173 +8208,162 @@
|
|
|
8160
8208
|
t7 = $[15];
|
|
8161
8209
|
}
|
|
8162
8210
|
let t8;
|
|
8163
|
-
if ($[16] !==
|
|
8164
|
-
t8 =
|
|
8165
|
-
$[16] = filteredPathSuggestions;
|
|
8166
|
-
$[17] = loadingPathSuggestions;
|
|
8167
|
-
$[18] = t8;
|
|
8168
|
-
} else {
|
|
8169
|
-
t8 = $[18];
|
|
8170
|
-
}
|
|
8171
|
-
let t9;
|
|
8172
|
-
if ($[19] !== t6 || $[20] !== t7 || $[21] !== t8) {
|
|
8173
|
-
t9 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-2", children: [
|
|
8211
|
+
if ($[16] !== t6 || $[17] !== t7) {
|
|
8212
|
+
t8 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-2", children: [
|
|
8174
8213
|
t5,
|
|
8175
8214
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-x-2 gap-y-1 items-center my-2 min-h-7", children: [
|
|
8176
8215
|
t6,
|
|
8177
|
-
t7
|
|
8178
|
-
t8
|
|
8216
|
+
t7
|
|
8179
8217
|
] })
|
|
8180
8218
|
] });
|
|
8181
|
-
$[
|
|
8182
|
-
$[
|
|
8183
|
-
$[
|
|
8184
|
-
$[22] = t9;
|
|
8219
|
+
$[16] = t6;
|
|
8220
|
+
$[17] = t7;
|
|
8221
|
+
$[18] = t8;
|
|
8185
8222
|
} else {
|
|
8186
|
-
|
|
8223
|
+
t8 = $[18];
|
|
8224
|
+
}
|
|
8225
|
+
let t9;
|
|
8226
|
+
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8227
|
+
t9 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", children: "● Select a template:" });
|
|
8228
|
+
$[19] = t9;
|
|
8229
|
+
} else {
|
|
8230
|
+
t9 = $[19];
|
|
8187
8231
|
}
|
|
8188
8232
|
let t10;
|
|
8189
|
-
if ($[
|
|
8190
|
-
t10 = /* @__PURE__ */ jsxRuntime.jsx(ui.
|
|
8191
|
-
$[
|
|
8233
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8234
|
+
t10 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: productsCollectionTemplate.icon });
|
|
8235
|
+
$[20] = t10;
|
|
8192
8236
|
} else {
|
|
8193
|
-
t10 = $[
|
|
8237
|
+
t10 = $[20];
|
|
8194
8238
|
}
|
|
8195
8239
|
let t11;
|
|
8196
|
-
if ($[
|
|
8197
|
-
t11 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
8198
|
-
|
|
8240
|
+
if ($[21] !== onContinue || $[22] !== setValues) {
|
|
8241
|
+
t11 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Products", subtitle: "A collection of products with images, prices and stock", icon: t10, onClick: () => {
|
|
8242
|
+
setValues(productsCollectionTemplate);
|
|
8243
|
+
onContinue();
|
|
8244
|
+
} });
|
|
8245
|
+
$[21] = onContinue;
|
|
8246
|
+
$[22] = setValues;
|
|
8247
|
+
$[23] = t11;
|
|
8199
8248
|
} else {
|
|
8200
|
-
t11 = $[
|
|
8249
|
+
t11 = $[23];
|
|
8201
8250
|
}
|
|
8202
8251
|
let t12;
|
|
8252
|
+
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8253
|
+
t12 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: usersCollectionTemplate.icon });
|
|
8254
|
+
$[24] = t12;
|
|
8255
|
+
} else {
|
|
8256
|
+
t12 = $[24];
|
|
8257
|
+
}
|
|
8258
|
+
let t13;
|
|
8203
8259
|
if ($[25] !== onContinue || $[26] !== setValues) {
|
|
8204
|
-
|
|
8205
|
-
setValues(
|
|
8260
|
+
t13 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Users", subtitle: "A collection of users with emails, names and roles", icon: t12, onClick: () => {
|
|
8261
|
+
setValues(usersCollectionTemplate);
|
|
8206
8262
|
onContinue();
|
|
8207
8263
|
} });
|
|
8208
8264
|
$[25] = onContinue;
|
|
8209
8265
|
$[26] = setValues;
|
|
8210
|
-
$[27] =
|
|
8266
|
+
$[27] = t13;
|
|
8211
8267
|
} else {
|
|
8212
|
-
|
|
8268
|
+
t13 = $[27];
|
|
8213
8269
|
}
|
|
8214
|
-
let
|
|
8270
|
+
let t14;
|
|
8215
8271
|
if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8216
|
-
|
|
8217
|
-
$[28] =
|
|
8272
|
+
t14 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: blogCollectionTemplate.icon });
|
|
8273
|
+
$[28] = t14;
|
|
8218
8274
|
} else {
|
|
8219
|
-
|
|
8275
|
+
t14 = $[28];
|
|
8220
8276
|
}
|
|
8221
|
-
let
|
|
8277
|
+
let t15;
|
|
8222
8278
|
if ($[29] !== onContinue || $[30] !== setValues) {
|
|
8223
|
-
|
|
8224
|
-
setValues(
|
|
8279
|
+
t15 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Blog posts", subtitle: "A collection of blog posts with images, authors and complex content", icon: t14, onClick: () => {
|
|
8280
|
+
setValues(blogCollectionTemplate);
|
|
8225
8281
|
onContinue();
|
|
8226
8282
|
} });
|
|
8227
8283
|
$[29] = onContinue;
|
|
8228
8284
|
$[30] = setValues;
|
|
8229
|
-
$[31] =
|
|
8285
|
+
$[31] = t15;
|
|
8230
8286
|
} else {
|
|
8231
|
-
|
|
8287
|
+
t15 = $[31];
|
|
8232
8288
|
}
|
|
8233
|
-
let
|
|
8289
|
+
let t16;
|
|
8234
8290
|
if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8235
|
-
|
|
8236
|
-
$[32] =
|
|
8291
|
+
t16 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: pagesCollectionTemplate.icon });
|
|
8292
|
+
$[32] = t16;
|
|
8237
8293
|
} else {
|
|
8238
|
-
|
|
8294
|
+
t16 = $[32];
|
|
8239
8295
|
}
|
|
8240
|
-
let
|
|
8296
|
+
let t17;
|
|
8241
8297
|
if ($[33] !== onContinue || $[34] !== setValues) {
|
|
8242
|
-
|
|
8243
|
-
setValues(
|
|
8298
|
+
t17 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Pages", subtitle: "A collection of pages with images, authors and complex content", icon: t16, onClick: () => {
|
|
8299
|
+
setValues(pagesCollectionTemplate);
|
|
8244
8300
|
onContinue();
|
|
8245
8301
|
} });
|
|
8246
8302
|
$[33] = onContinue;
|
|
8247
8303
|
$[34] = setValues;
|
|
8248
|
-
$[35] =
|
|
8249
|
-
} else {
|
|
8250
|
-
t16 = $[35];
|
|
8251
|
-
}
|
|
8252
|
-
let t17;
|
|
8253
|
-
if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8254
|
-
t17 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: pagesCollectionTemplate.icon });
|
|
8255
|
-
$[36] = t17;
|
|
8304
|
+
$[35] = t17;
|
|
8256
8305
|
} else {
|
|
8257
|
-
t17 = $[
|
|
8306
|
+
t17 = $[35];
|
|
8258
8307
|
}
|
|
8259
8308
|
let t18;
|
|
8260
|
-
if ($[37] !==
|
|
8261
|
-
t18 = /* @__PURE__ */ jsxRuntime.
|
|
8262
|
-
|
|
8263
|
-
onContinue();
|
|
8264
|
-
} });
|
|
8265
|
-
$[37] = onContinue;
|
|
8266
|
-
$[38] = setValues;
|
|
8267
|
-
$[39] = t18;
|
|
8268
|
-
} else {
|
|
8269
|
-
t18 = $[39];
|
|
8270
|
-
}
|
|
8271
|
-
let t19;
|
|
8272
|
-
if ($[40] !== t12 || $[41] !== t14 || $[42] !== t16 || $[43] !== t18) {
|
|
8273
|
-
t19 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-2", children: [
|
|
8274
|
-
t10,
|
|
8309
|
+
if ($[36] !== t11 || $[37] !== t13 || $[38] !== t15 || $[39] !== t17) {
|
|
8310
|
+
t18 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-2", children: [
|
|
8311
|
+
t9,
|
|
8275
8312
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4", children: [
|
|
8276
|
-
|
|
8277
|
-
|
|
8278
|
-
|
|
8279
|
-
|
|
8313
|
+
t11,
|
|
8314
|
+
t13,
|
|
8315
|
+
t15,
|
|
8316
|
+
t17
|
|
8280
8317
|
] })
|
|
8281
8318
|
] });
|
|
8282
|
-
$[
|
|
8283
|
-
$[
|
|
8284
|
-
$[
|
|
8285
|
-
$[
|
|
8286
|
-
$[
|
|
8319
|
+
$[36] = t11;
|
|
8320
|
+
$[37] = t13;
|
|
8321
|
+
$[38] = t15;
|
|
8322
|
+
$[39] = t17;
|
|
8323
|
+
$[40] = t18;
|
|
8287
8324
|
} else {
|
|
8288
|
-
|
|
8325
|
+
t18 = $[40];
|
|
8289
8326
|
}
|
|
8290
|
-
let
|
|
8291
|
-
if ($[
|
|
8292
|
-
|
|
8327
|
+
let t19;
|
|
8328
|
+
if ($[41] !== onContinue || $[42] !== parentCollection) {
|
|
8329
|
+
t19 = !parentCollection && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
8293
8330
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", className: "mb-2", children: "● Create a collection from a file (csv, json, xls, xslx...)" }),
|
|
8294
8331
|
/* @__PURE__ */ jsxRuntime.jsx(data_import_export.ImportFileUpload, { onDataAdded: (data, propertiesOrder) => onContinue(data, propertiesOrder) })
|
|
8295
8332
|
] });
|
|
8296
|
-
$[
|
|
8297
|
-
$[
|
|
8298
|
-
$[
|
|
8333
|
+
$[41] = onContinue;
|
|
8334
|
+
$[42] = parentCollection;
|
|
8335
|
+
$[43] = t19;
|
|
8299
8336
|
} else {
|
|
8300
|
-
|
|
8337
|
+
t19 = $[43];
|
|
8301
8338
|
}
|
|
8302
|
-
let
|
|
8303
|
-
if ($[
|
|
8304
|
-
|
|
8305
|
-
$[
|
|
8306
|
-
$[
|
|
8339
|
+
let t20;
|
|
8340
|
+
if ($[44] !== onContinue) {
|
|
8341
|
+
t20 = /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", onClick: () => onContinue(), className: "my-2", children: "Continue from scratch" }) });
|
|
8342
|
+
$[44] = onContinue;
|
|
8343
|
+
$[45] = t20;
|
|
8307
8344
|
} else {
|
|
8308
|
-
|
|
8345
|
+
t20 = $[45];
|
|
8309
8346
|
}
|
|
8310
|
-
let
|
|
8311
|
-
if ($[
|
|
8312
|
-
|
|
8347
|
+
let t21;
|
|
8348
|
+
if ($[46] !== t18 || $[47] !== t19 || $[48] !== t20 || $[49] !== t4 || $[50] !== t8) {
|
|
8349
|
+
t21 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-auto my-auto", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Container, { maxWidth: "4xl", className: "flex flex-col gap-4 p-8 m-auto", children: [
|
|
8313
8350
|
t3,
|
|
8314
8351
|
t4,
|
|
8315
|
-
|
|
8352
|
+
t8,
|
|
8353
|
+
t18,
|
|
8316
8354
|
t19,
|
|
8317
|
-
t20
|
|
8318
|
-
t21
|
|
8355
|
+
t20
|
|
8319
8356
|
] }) });
|
|
8320
|
-
$[
|
|
8321
|
-
$[
|
|
8322
|
-
$[
|
|
8323
|
-
$[
|
|
8324
|
-
$[
|
|
8325
|
-
$[
|
|
8357
|
+
$[46] = t18;
|
|
8358
|
+
$[47] = t19;
|
|
8359
|
+
$[48] = t20;
|
|
8360
|
+
$[49] = t4;
|
|
8361
|
+
$[50] = t8;
|
|
8362
|
+
$[51] = t21;
|
|
8326
8363
|
} else {
|
|
8327
|
-
|
|
8364
|
+
t21 = $[51];
|
|
8328
8365
|
}
|
|
8329
|
-
return
|
|
8366
|
+
return t21;
|
|
8330
8367
|
}
|
|
8331
8368
|
function TemplateButton(t0) {
|
|
8332
8369
|
const $ = reactCompilerRuntime.c(10);
|
|
@@ -9540,7 +9577,7 @@
|
|
|
9540
9577
|
const ConfigControllerContext = React.createContext({});
|
|
9541
9578
|
const CollectionEditorContext = React.createContext({});
|
|
9542
9579
|
const ConfigControllerProvider = React.memo(function ConfigControllerProvider2(t0) {
|
|
9543
|
-
const $ = reactCompilerRuntime.c(
|
|
9580
|
+
const $ = reactCompilerRuntime.c(65);
|
|
9544
9581
|
const {
|
|
9545
9582
|
children,
|
|
9546
9583
|
collectionConfigController,
|
|
@@ -9548,7 +9585,6 @@
|
|
|
9548
9585
|
reservedGroups,
|
|
9549
9586
|
collectionInference,
|
|
9550
9587
|
extraView,
|
|
9551
|
-
getPathSuggestions,
|
|
9552
9588
|
getUser,
|
|
9553
9589
|
getData,
|
|
9554
9590
|
onAnalyticsEvent
|
|
@@ -9669,26 +9705,24 @@
|
|
|
9669
9705
|
const createCollection = t3;
|
|
9670
9706
|
const t4 = configPermissions ?? defaultConfigPermissions;
|
|
9671
9707
|
let t5;
|
|
9672
|
-
if ($[6] !== createCollection || $[7] !== editCollection || $[8] !== editProperty || $[9] !==
|
|
9708
|
+
if ($[6] !== createCollection || $[7] !== editCollection || $[8] !== editProperty || $[9] !== t4) {
|
|
9673
9709
|
t5 = {
|
|
9674
9710
|
editCollection,
|
|
9675
9711
|
createCollection,
|
|
9676
9712
|
editProperty,
|
|
9677
|
-
configPermissions: t4
|
|
9678
|
-
getPathSuggestions
|
|
9713
|
+
configPermissions: t4
|
|
9679
9714
|
};
|
|
9680
9715
|
$[6] = createCollection;
|
|
9681
9716
|
$[7] = editCollection;
|
|
9682
9717
|
$[8] = editProperty;
|
|
9683
|
-
$[9] =
|
|
9684
|
-
$[10] =
|
|
9685
|
-
$[11] = t5;
|
|
9718
|
+
$[9] = t4;
|
|
9719
|
+
$[10] = t5;
|
|
9686
9720
|
} else {
|
|
9687
|
-
t5 = $[
|
|
9721
|
+
t5 = $[10];
|
|
9688
9722
|
}
|
|
9689
9723
|
const t6 = Boolean(currentDialog);
|
|
9690
9724
|
let t7;
|
|
9691
|
-
if ($[
|
|
9725
|
+
if ($[11] !== currentDialog || $[12] !== navigate || $[13] !== navigation) {
|
|
9692
9726
|
t7 = (collection_0) => {
|
|
9693
9727
|
if (currentDialog?.redirect) {
|
|
9694
9728
|
if (collection_0 && currentDialog?.isNewCollection && !currentDialog.parentCollectionIds.length) {
|
|
@@ -9698,29 +9732,28 @@
|
|
|
9698
9732
|
}
|
|
9699
9733
|
setCurrentDialog(void 0);
|
|
9700
9734
|
};
|
|
9701
|
-
$[
|
|
9702
|
-
$[
|
|
9703
|
-
$[
|
|
9704
|
-
$[
|
|
9735
|
+
$[11] = currentDialog;
|
|
9736
|
+
$[12] = navigate;
|
|
9737
|
+
$[13] = navigation;
|
|
9738
|
+
$[14] = t7;
|
|
9705
9739
|
} else {
|
|
9706
|
-
t7 = $[
|
|
9740
|
+
t7 = $[14];
|
|
9707
9741
|
}
|
|
9708
9742
|
let t8;
|
|
9709
|
-
if ($[
|
|
9710
|
-
t8 = /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorDialog, { open: t6, configController: collectionConfigController, isNewCollection: false, collectionInference, ...currentDialog, getData, reservedGroups, extraView,
|
|
9711
|
-
$[
|
|
9712
|
-
$[
|
|
9713
|
-
$[
|
|
9714
|
-
$[
|
|
9715
|
-
$[
|
|
9716
|
-
$[
|
|
9717
|
-
$[
|
|
9718
|
-
$[
|
|
9719
|
-
$[
|
|
9720
|
-
$[
|
|
9721
|
-
$[26] = t8;
|
|
9743
|
+
if ($[15] !== collectionConfigController || $[16] !== collectionInference || $[17] !== currentDialog || $[18] !== extraView || $[19] !== getData || $[20] !== getUser || $[21] !== reservedGroups || $[22] !== t6 || $[23] !== t7) {
|
|
9744
|
+
t8 = /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorDialog, { open: t6, configController: collectionConfigController, isNewCollection: false, collectionInference, ...currentDialog, getData, reservedGroups, extraView, getUser, handleClose: t7 });
|
|
9745
|
+
$[15] = collectionConfigController;
|
|
9746
|
+
$[16] = collectionInference;
|
|
9747
|
+
$[17] = currentDialog;
|
|
9748
|
+
$[18] = extraView;
|
|
9749
|
+
$[19] = getData;
|
|
9750
|
+
$[20] = getUser;
|
|
9751
|
+
$[21] = reservedGroups;
|
|
9752
|
+
$[22] = t6;
|
|
9753
|
+
$[23] = t7;
|
|
9754
|
+
$[24] = t8;
|
|
9722
9755
|
} else {
|
|
9723
|
-
t8 = $[
|
|
9756
|
+
t8 = $[24];
|
|
9724
9757
|
}
|
|
9725
9758
|
const t9 = Boolean(currentPropertyDialog);
|
|
9726
9759
|
const t10 = Boolean(currentPropertyDialog?.propertyKey);
|
|
@@ -9728,21 +9761,21 @@
|
|
|
9728
9761
|
const t12 = !currentPropertyDialog ? false : !currentPropertyDialog?.propertyKey;
|
|
9729
9762
|
const t13 = currentPropertyDialog?.collectionEditable ?? false;
|
|
9730
9763
|
let t14;
|
|
9731
|
-
if ($[
|
|
9764
|
+
if ($[25] !== currentPropertyDialog || $[26] !== getData || $[27] !== navigation) {
|
|
9732
9765
|
t14 = getData && currentPropertyDialog?.editedCollectionId ? () => {
|
|
9733
9766
|
console.debug("get data for property", currentPropertyDialog?.editedCollectionId);
|
|
9734
9767
|
const resolvedPath = navigation.resolveIdsFrom(currentPropertyDialog.editedCollectionId);
|
|
9735
9768
|
return getData(resolvedPath, []);
|
|
9736
9769
|
} : void 0;
|
|
9737
|
-
$[
|
|
9738
|
-
$[
|
|
9739
|
-
$[
|
|
9740
|
-
$[
|
|
9770
|
+
$[25] = currentPropertyDialog;
|
|
9771
|
+
$[26] = getData;
|
|
9772
|
+
$[27] = navigation;
|
|
9773
|
+
$[28] = t14;
|
|
9741
9774
|
} else {
|
|
9742
|
-
t14 = $[
|
|
9775
|
+
t14 = $[28];
|
|
9743
9776
|
}
|
|
9744
9777
|
let t15;
|
|
9745
|
-
if ($[
|
|
9778
|
+
if ($[29] !== collectionConfigController || $[30] !== currentPropertyDialog || $[31] !== snackbarController) {
|
|
9746
9779
|
t15 = (t162) => {
|
|
9747
9780
|
const {
|
|
9748
9781
|
id: id_0,
|
|
@@ -9771,15 +9804,15 @@
|
|
|
9771
9804
|
return false;
|
|
9772
9805
|
});
|
|
9773
9806
|
};
|
|
9774
|
-
$[
|
|
9775
|
-
$[
|
|
9776
|
-
$[
|
|
9777
|
-
$[
|
|
9807
|
+
$[29] = collectionConfigController;
|
|
9808
|
+
$[30] = currentPropertyDialog;
|
|
9809
|
+
$[31] = snackbarController;
|
|
9810
|
+
$[32] = t15;
|
|
9778
9811
|
} else {
|
|
9779
|
-
t15 = $[
|
|
9812
|
+
t15 = $[32];
|
|
9780
9813
|
}
|
|
9781
9814
|
let t16;
|
|
9782
|
-
if ($[
|
|
9815
|
+
if ($[33] !== collectionConfigController || $[34] !== currentPropertyDialog?.currentPropertiesOrder || $[35] !== currentPropertyDialog?.editedCollectionId || $[36] !== currentPropertyDialog?.namespace || $[37] !== currentPropertyDialog?.parentCollectionIds || $[38] !== currentPropertyDialog?.propertyKey || $[39] !== snackbarController) {
|
|
9783
9816
|
t16 = () => {
|
|
9784
9817
|
if (!currentPropertyDialog?.propertyKey) {
|
|
9785
9818
|
return;
|
|
@@ -9802,21 +9835,21 @@
|
|
|
9802
9835
|
return false;
|
|
9803
9836
|
});
|
|
9804
9837
|
};
|
|
9805
|
-
$[
|
|
9806
|
-
$[
|
|
9807
|
-
$[
|
|
9808
|
-
$[
|
|
9809
|
-
$[
|
|
9810
|
-
$[
|
|
9811
|
-
$[
|
|
9812
|
-
$[
|
|
9838
|
+
$[33] = collectionConfigController;
|
|
9839
|
+
$[34] = currentPropertyDialog?.currentPropertiesOrder;
|
|
9840
|
+
$[35] = currentPropertyDialog?.editedCollectionId;
|
|
9841
|
+
$[36] = currentPropertyDialog?.namespace;
|
|
9842
|
+
$[37] = currentPropertyDialog?.parentCollectionIds;
|
|
9843
|
+
$[38] = currentPropertyDialog?.propertyKey;
|
|
9844
|
+
$[39] = snackbarController;
|
|
9845
|
+
$[40] = t16;
|
|
9813
9846
|
} else {
|
|
9814
|
-
t16 = $[
|
|
9847
|
+
t16 = $[40];
|
|
9815
9848
|
}
|
|
9816
9849
|
let t17;
|
|
9817
9850
|
let t18;
|
|
9818
9851
|
let t19;
|
|
9819
|
-
if ($[
|
|
9852
|
+
if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9820
9853
|
t17 = () => {
|
|
9821
9854
|
setCurrentPropertyDialog(void 0);
|
|
9822
9855
|
};
|
|
@@ -9824,64 +9857,64 @@
|
|
|
9824
9857
|
setCurrentPropertyDialog(void 0);
|
|
9825
9858
|
};
|
|
9826
9859
|
t19 = {};
|
|
9827
|
-
$[
|
|
9828
|
-
$[
|
|
9829
|
-
$[
|
|
9860
|
+
$[41] = t17;
|
|
9861
|
+
$[42] = t18;
|
|
9862
|
+
$[43] = t19;
|
|
9830
9863
|
} else {
|
|
9831
|
-
t17 = $[
|
|
9832
|
-
t18 = $[
|
|
9833
|
-
t19 = $[
|
|
9864
|
+
t17 = $[41];
|
|
9865
|
+
t18 = $[42];
|
|
9866
|
+
t19 = $[43];
|
|
9834
9867
|
}
|
|
9835
9868
|
let t20;
|
|
9836
|
-
if ($[
|
|
9869
|
+
if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9837
9870
|
t20 = [];
|
|
9838
|
-
$[
|
|
9871
|
+
$[44] = t20;
|
|
9839
9872
|
} else {
|
|
9840
|
-
t20 = $[
|
|
9873
|
+
t20 = $[44];
|
|
9841
9874
|
}
|
|
9842
9875
|
const t21 = currentPropertyDialog?.property;
|
|
9843
9876
|
const t22 = currentPropertyDialog?.propertyKey;
|
|
9844
9877
|
let t23;
|
|
9845
|
-
if ($[
|
|
9878
|
+
if ($[45] !== propertyConfigs || $[46] !== t10 || $[47] !== t11 || $[48] !== t12 || $[49] !== t13 || $[50] !== t14 || $[51] !== t15 || $[52] !== t16 || $[53] !== t21 || $[54] !== t22 || $[55] !== t9) {
|
|
9846
9879
|
t23 = /* @__PURE__ */ jsxRuntime.jsx(PropertyFormDialog, { open: t9, includeIdAndName: true, existingProperty: t10, autoUpdateId: t11, autoOpenTypeSelect: t12, inArray: false, collectionEditable: t13, getData: t14, onPropertyChanged: t15, onPropertyChangedImmediate: false, onDelete: t16, onError: _temp2, onOkClicked: t17, onCancel: t18, initialErrors: t19, forceShowErrors: false, existingPropertyKeys: t20, allowDataInference: true, propertyConfigs, property: t21, propertyKey: t22 });
|
|
9847
|
-
$[
|
|
9848
|
-
$[
|
|
9849
|
-
$[
|
|
9850
|
-
$[
|
|
9851
|
-
$[
|
|
9852
|
-
$[
|
|
9853
|
-
$[
|
|
9854
|
-
$[
|
|
9855
|
-
$[
|
|
9856
|
-
$[
|
|
9857
|
-
$[
|
|
9858
|
-
$[
|
|
9859
|
-
} else {
|
|
9860
|
-
t23 = $[
|
|
9880
|
+
$[45] = propertyConfigs;
|
|
9881
|
+
$[46] = t10;
|
|
9882
|
+
$[47] = t11;
|
|
9883
|
+
$[48] = t12;
|
|
9884
|
+
$[49] = t13;
|
|
9885
|
+
$[50] = t14;
|
|
9886
|
+
$[51] = t15;
|
|
9887
|
+
$[52] = t16;
|
|
9888
|
+
$[53] = t21;
|
|
9889
|
+
$[54] = t22;
|
|
9890
|
+
$[55] = t9;
|
|
9891
|
+
$[56] = t23;
|
|
9892
|
+
} else {
|
|
9893
|
+
t23 = $[56];
|
|
9861
9894
|
}
|
|
9862
9895
|
let t24;
|
|
9863
|
-
if ($[
|
|
9896
|
+
if ($[57] !== children || $[58] !== t23 || $[59] !== t5 || $[60] !== t8) {
|
|
9864
9897
|
t24 = /* @__PURE__ */ jsxRuntime.jsxs(CollectionEditorContext.Provider, { value: t5, children: [
|
|
9865
9898
|
children,
|
|
9866
9899
|
t8,
|
|
9867
9900
|
t23
|
|
9868
9901
|
] });
|
|
9869
|
-
$[
|
|
9870
|
-
$[
|
|
9871
|
-
$[
|
|
9872
|
-
$[
|
|
9873
|
-
$[
|
|
9902
|
+
$[57] = children;
|
|
9903
|
+
$[58] = t23;
|
|
9904
|
+
$[59] = t5;
|
|
9905
|
+
$[60] = t8;
|
|
9906
|
+
$[61] = t24;
|
|
9874
9907
|
} else {
|
|
9875
|
-
t24 = $[
|
|
9908
|
+
t24 = $[61];
|
|
9876
9909
|
}
|
|
9877
9910
|
let t25;
|
|
9878
|
-
if ($[
|
|
9911
|
+
if ($[62] !== collectionConfigController || $[63] !== t24) {
|
|
9879
9912
|
t25 = /* @__PURE__ */ jsxRuntime.jsx(ConfigControllerContext.Provider, { value: collectionConfigController, children: t24 });
|
|
9880
|
-
$[
|
|
9881
|
-
$[
|
|
9882
|
-
$[
|
|
9913
|
+
$[62] = collectionConfigController;
|
|
9914
|
+
$[63] = t24;
|
|
9915
|
+
$[64] = t25;
|
|
9883
9916
|
} else {
|
|
9884
|
-
t25 = $[
|
|
9917
|
+
t25 = $[64];
|
|
9885
9918
|
}
|
|
9886
9919
|
return t25;
|
|
9887
9920
|
}, equal);
|
|
@@ -10496,21 +10529,22 @@
|
|
|
10496
10529
|
return t8;
|
|
10497
10530
|
}
|
|
10498
10531
|
function useCollectionEditorPlugin(t0) {
|
|
10499
|
-
const $ = reactCompilerRuntime.c(
|
|
10532
|
+
const $ = reactCompilerRuntime.c(19);
|
|
10500
10533
|
const {
|
|
10501
10534
|
collectionConfigController,
|
|
10502
10535
|
configPermissions,
|
|
10503
10536
|
reservedGroups,
|
|
10504
10537
|
extraView,
|
|
10505
|
-
getPathSuggestions,
|
|
10506
10538
|
getUser,
|
|
10507
10539
|
collectionInference,
|
|
10508
10540
|
getData,
|
|
10509
|
-
onAnalyticsEvent
|
|
10541
|
+
onAnalyticsEvent,
|
|
10542
|
+
includeIntroView: t1
|
|
10510
10543
|
} = t0;
|
|
10511
|
-
|
|
10512
|
-
|
|
10513
|
-
|
|
10544
|
+
const includeIntroView = t1 === void 0 ? true : t1;
|
|
10545
|
+
let t2;
|
|
10546
|
+
if ($[0] !== collectionConfigController || $[1] !== collectionInference || $[2] !== configPermissions || $[3] !== extraView || $[4] !== getData || $[5] !== getUser || $[6] !== onAnalyticsEvent || $[7] !== reservedGroups) {
|
|
10547
|
+
t2 = {
|
|
10514
10548
|
Component: ConfigControllerProvider,
|
|
10515
10549
|
props: {
|
|
10516
10550
|
collectionConfigController,
|
|
@@ -10518,7 +10552,6 @@
|
|
|
10518
10552
|
collectionInference,
|
|
10519
10553
|
reservedGroups,
|
|
10520
10554
|
extraView,
|
|
10521
|
-
getPathSuggestions,
|
|
10522
10555
|
getUser,
|
|
10523
10556
|
getData,
|
|
10524
10557
|
onAnalyticsEvent
|
|
@@ -10529,53 +10562,72 @@
|
|
|
10529
10562
|
$[2] = configPermissions;
|
|
10530
10563
|
$[3] = extraView;
|
|
10531
10564
|
$[4] = getData;
|
|
10532
|
-
$[5] =
|
|
10533
|
-
$[6] =
|
|
10534
|
-
$[7] =
|
|
10535
|
-
$[8] =
|
|
10536
|
-
$[9] = t1;
|
|
10565
|
+
$[5] = getUser;
|
|
10566
|
+
$[6] = onAnalyticsEvent;
|
|
10567
|
+
$[7] = reservedGroups;
|
|
10568
|
+
$[8] = t2;
|
|
10537
10569
|
} else {
|
|
10538
|
-
|
|
10570
|
+
t2 = $[8];
|
|
10539
10571
|
}
|
|
10540
|
-
let t2;
|
|
10541
10572
|
let t3;
|
|
10542
|
-
if ($[
|
|
10543
|
-
|
|
10544
|
-
|
|
10545
|
-
|
|
10573
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10574
|
+
t3 = /* @__PURE__ */ jsxRuntime.jsx(NewCollectionButton, {});
|
|
10575
|
+
$[9] = t3;
|
|
10576
|
+
} else {
|
|
10577
|
+
t3 = $[9];
|
|
10578
|
+
}
|
|
10579
|
+
let t4;
|
|
10580
|
+
if ($[10] !== includeIntroView) {
|
|
10581
|
+
t4 = includeIntroView ? /* @__PURE__ */ jsxRuntime.jsx(IntroWidget, {}) : void 0;
|
|
10582
|
+
$[10] = includeIntroView;
|
|
10583
|
+
$[11] = t4;
|
|
10584
|
+
} else {
|
|
10585
|
+
t4 = $[11];
|
|
10586
|
+
}
|
|
10587
|
+
let t5;
|
|
10588
|
+
if ($[12] !== t4) {
|
|
10589
|
+
t5 = {
|
|
10590
|
+
additionalActions: t3,
|
|
10591
|
+
additionalChildrenStart: t4,
|
|
10546
10592
|
CollectionActions: HomePageEditorCollectionAction,
|
|
10547
10593
|
AdditionalCards: NewCollectionCard
|
|
10548
10594
|
};
|
|
10549
|
-
|
|
10595
|
+
$[12] = t4;
|
|
10596
|
+
$[13] = t5;
|
|
10597
|
+
} else {
|
|
10598
|
+
t5 = $[13];
|
|
10599
|
+
}
|
|
10600
|
+
let t6;
|
|
10601
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10602
|
+
t6 = {
|
|
10550
10603
|
CollectionActionsStart: EditorCollectionActionStart,
|
|
10551
10604
|
CollectionActions: EditorCollectionAction,
|
|
10552
10605
|
HeaderAction: CollectionViewHeaderAction,
|
|
10553
10606
|
AddColumnComponent: PropertyAddColumnComponent
|
|
10554
10607
|
};
|
|
10555
|
-
$[
|
|
10556
|
-
$[11] = t3;
|
|
10608
|
+
$[14] = t6;
|
|
10557
10609
|
} else {
|
|
10558
|
-
|
|
10559
|
-
t3 = $[11];
|
|
10610
|
+
t6 = $[14];
|
|
10560
10611
|
}
|
|
10561
|
-
let
|
|
10562
|
-
if ($[
|
|
10563
|
-
|
|
10612
|
+
let t7;
|
|
10613
|
+
if ($[15] !== collectionConfigController.loading || $[16] !== t2 || $[17] !== t5) {
|
|
10614
|
+
t7 = {
|
|
10564
10615
|
key: "collection_editor",
|
|
10565
10616
|
loading: collectionConfigController.loading,
|
|
10566
|
-
provider:
|
|
10567
|
-
homePage:
|
|
10568
|
-
collectionView:
|
|
10617
|
+
provider: t2,
|
|
10618
|
+
homePage: t5,
|
|
10619
|
+
collectionView: t6
|
|
10569
10620
|
};
|
|
10570
|
-
$[
|
|
10571
|
-
$[
|
|
10572
|
-
$[
|
|
10621
|
+
$[15] = collectionConfigController.loading;
|
|
10622
|
+
$[16] = t2;
|
|
10623
|
+
$[17] = t5;
|
|
10624
|
+
$[18] = t7;
|
|
10573
10625
|
} else {
|
|
10574
|
-
|
|
10626
|
+
t7 = $[18];
|
|
10575
10627
|
}
|
|
10576
|
-
return
|
|
10628
|
+
return t7;
|
|
10577
10629
|
}
|
|
10578
|
-
function IntroWidget(
|
|
10630
|
+
function IntroWidget() {
|
|
10579
10631
|
const $ = reactCompilerRuntime.c(11);
|
|
10580
10632
|
const navigation = core.useNavigationController();
|
|
10581
10633
|
if (!navigation.topLevelNavigation) {
|
|
@@ -10583,35 +10635,35 @@
|
|
|
10583
10635
|
}
|
|
10584
10636
|
const authController = core.useAuthController();
|
|
10585
10637
|
const collectionEditorController = useCollectionEditorController();
|
|
10586
|
-
let
|
|
10638
|
+
let t0;
|
|
10587
10639
|
if ($[0] !== authController || $[1] !== collectionEditorController) {
|
|
10588
|
-
|
|
10640
|
+
t0 = collectionEditorController.configPermissions ? collectionEditorController.configPermissions({
|
|
10589
10641
|
user: authController.user
|
|
10590
10642
|
}).createCollections : true;
|
|
10591
10643
|
$[0] = authController;
|
|
10592
10644
|
$[1] = collectionEditorController;
|
|
10593
|
-
$[2] =
|
|
10645
|
+
$[2] = t0;
|
|
10594
10646
|
} else {
|
|
10595
|
-
|
|
10647
|
+
t0 = $[2];
|
|
10596
10648
|
}
|
|
10597
|
-
const canCreateCollections =
|
|
10649
|
+
const canCreateCollections = t0;
|
|
10598
10650
|
if (!navigation.initialised || (navigation.collections ?? []).length > 0) {
|
|
10599
10651
|
return null;
|
|
10600
10652
|
}
|
|
10653
|
+
let t1;
|
|
10601
10654
|
let t2;
|
|
10602
|
-
let t3;
|
|
10603
10655
|
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10604
|
-
|
|
10605
|
-
|
|
10606
|
-
$[3] =
|
|
10607
|
-
$[4] =
|
|
10656
|
+
t1 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "uppercase", children: "No collections found" });
|
|
10657
|
+
t2 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { children: "Start building collections in FireCMS easily. Map them to your existing database data, import from files, or use our templates." });
|
|
10658
|
+
$[3] = t1;
|
|
10659
|
+
$[4] = t2;
|
|
10608
10660
|
} else {
|
|
10609
|
-
|
|
10610
|
-
|
|
10661
|
+
t1 = $[3];
|
|
10662
|
+
t2 = $[4];
|
|
10611
10663
|
}
|
|
10612
|
-
let
|
|
10664
|
+
let t3;
|
|
10613
10665
|
if ($[5] !== canCreateCollections || $[6] !== collectionEditorController) {
|
|
10614
|
-
|
|
10666
|
+
t3 = canCreateCollections && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { onClick: collectionEditorController && canCreateCollections ? () => collectionEditorController.createCollection({
|
|
10615
10667
|
parentCollectionIds: [],
|
|
10616
10668
|
redirect: true,
|
|
10617
10669
|
sourceClick: "new_collection_card"
|
|
@@ -10621,31 +10673,31 @@
|
|
|
10621
10673
|
] });
|
|
10622
10674
|
$[5] = canCreateCollections;
|
|
10623
10675
|
$[6] = collectionEditorController;
|
|
10624
|
-
$[7] =
|
|
10676
|
+
$[7] = t3;
|
|
10625
10677
|
} else {
|
|
10626
|
-
|
|
10678
|
+
t3 = $[7];
|
|
10627
10679
|
}
|
|
10628
|
-
let
|
|
10680
|
+
let t4;
|
|
10629
10681
|
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10630
|
-
|
|
10631
|
-
$[8] =
|
|
10682
|
+
t4 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { color: "secondary", children: "You can also define collections programmatically." });
|
|
10683
|
+
$[8] = t4;
|
|
10632
10684
|
} else {
|
|
10633
|
-
|
|
10685
|
+
t4 = $[8];
|
|
10634
10686
|
}
|
|
10635
|
-
let
|
|
10636
|
-
if ($[9] !==
|
|
10637
|
-
|
|
10687
|
+
let t5;
|
|
10688
|
+
if ($[9] !== t3) {
|
|
10689
|
+
t5 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Paper, { className: "my-4 px-4 py-6 flex flex-col bg-white dark:bg-surface-accent-800 gap-2", children: [
|
|
10690
|
+
t1,
|
|
10638
10691
|
t2,
|
|
10639
10692
|
t3,
|
|
10640
|
-
t4
|
|
10641
|
-
t5
|
|
10693
|
+
t4
|
|
10642
10694
|
] });
|
|
10643
|
-
$[9] =
|
|
10644
|
-
$[10] =
|
|
10695
|
+
$[9] = t3;
|
|
10696
|
+
$[10] = t5;
|
|
10645
10697
|
} else {
|
|
10646
|
-
|
|
10698
|
+
t5 = $[10];
|
|
10647
10699
|
}
|
|
10648
|
-
return
|
|
10700
|
+
return t5;
|
|
10649
10701
|
}
|
|
10650
10702
|
const mergeCollections = (baseCollections, backendCollections = [], modifyCollection) => {
|
|
10651
10703
|
const markAsEditable = (c) => {
|