@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.umd.js CHANGED
@@ -169,7 +169,7 @@
169
169
  return t18;
170
170
  }
171
171
  function CollectionDetailsForm(t0) {
172
- const $ = reactCompilerRuntime.c(176);
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
- let t41;
479
- if ($[59] === Symbol.for("react.memo_cache_sentinel")) {
480
- t41 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row text-surface-500", children: [
481
- /* @__PURE__ */ jsxRuntime.jsx(ui.SettingsIcon, {}),
482
- /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "ml-2", children: "Advanced" })
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
- t44 = $[62];
485
+ t42 = $[60];
498
486
  }
499
- const t45 = touched.id && Boolean(errors.id);
500
- const t46 = touched.id && Boolean(errors.id) ? errors.id : "This id identifies this collection. Typically the same as the path.";
501
- let t47;
502
- if ($[63] !== t45 || $[64] !== t46) {
503
- t47 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t45, children: t46 });
504
- $[63] = t45;
505
- $[64] = t46;
506
- $[65] = t47;
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
- t47 = $[65];
507
+ t45 = $[65];
509
508
  }
510
- let t48;
511
- if ($[66] !== t44 || $[67] !== t47) {
512
- t48 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
509
+ let t46;
510
+ if ($[66] !== t44) {
511
+ t46 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
513
512
  t44,
514
- t47
513
+ t45
515
514
  ] });
516
515
  $[66] = t44;
517
- $[67] = t47;
518
- $[68] = t48;
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
- t48 = $[68];
528
+ t47 = $[68];
521
529
  }
522
- const t49 = showErrors && Boolean(errors.singularName);
530
+ const t48 = !isNewCollection;
531
+ const t49 = showErrors && Boolean(errors.id);
523
532
  let t50;
524
- if ($[69] !== handleChange || $[70] !== setFieldTouched) {
525
- t50 = (e_0) => {
526
- setFieldTouched("singularName", true);
527
- return handleChange(e_0);
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 = values.singularName ?? "";
536
- let t52;
537
- if ($[72] !== t49 || $[73] !== t50 || $[74] !== t51) {
538
- t52 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: t49, name: "singularName", "aria-describedby": "singularName-helper", onChange: t50, value: t51, label: "Singular name" });
539
- $[72] = t49;
540
- $[73] = t50;
541
- $[74] = t51;
542
- $[75] = t52;
543
- } else {
544
- t52 = $[75];
545
- }
546
- const t53 = showErrors && Boolean(errors.singularName);
547
- const t54 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define a singular name for your entities";
548
- let t55;
549
- if ($[76] !== t53 || $[77] !== t54) {
550
- t55 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t53, children: t54 });
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
- t55 = $[78];
562
+ t54 = $[77];
556
563
  }
564
+ const t55 = showErrors && Boolean(errors.singularName);
557
565
  let t56;
558
- if ($[79] !== t52 || $[80] !== t55) {
559
- t56 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
560
- t52,
561
- t55
562
- ] });
563
- $[79] = t52;
564
- $[80] = t55;
565
- $[81] = t56;
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 = $[81];
575
+ t56 = $[80];
568
576
  }
569
- const t57 = showErrors && Boolean(errors.sideDialogWidth);
577
+ const t57 = values.singularName ?? "";
570
578
  let t58;
571
- if ($[82] !== setFieldTouched || $[83] !== setFieldValue) {
572
- t58 = (e_1) => {
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
- $[82] = setFieldTouched;
584
- $[83] = setFieldValue;
585
- $[84] = t58;
625
+ $[91] = setFieldTouched;
626
+ $[92] = setFieldValue;
627
+ $[93] = t64;
586
628
  } else {
587
- t58 = $[84];
629
+ t64 = $[93];
588
630
  }
589
- let t59;
590
- if ($[85] !== setFieldValue) {
591
- t59 = () => {
631
+ let t65;
632
+ if ($[94] !== setFieldValue) {
633
+ t65 = () => {
592
634
  setFieldValue("sideDialogWidth", null);
593
635
  };
594
- $[85] = setFieldValue;
595
- $[86] = t59;
636
+ $[94] = setFieldValue;
637
+ $[95] = t65;
596
638
  } else {
597
- t59 = $[86];
639
+ t65 = $[95];
598
640
  }
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;
604
- } else {
605
- t61 = $[87];
606
- }
607
- let t62;
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] !== t65 || $[97] !== t66) {
632
- t67 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t65, children: t66 });
633
- $[96] = t65;
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 = $[98];
647
+ t67 = $[96];
638
648
  }
639
649
  let t68;
640
- if ($[99] !== t64 || $[100] !== t67) {
641
- t68 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
642
- t64,
643
- t67
644
- ] });
645
- $[99] = t64;
646
- $[100] = t67;
647
- $[101] = t68;
648
- } else {
649
- t68 = $[101];
650
- }
651
- const t69 = showErrors && Boolean(errors.description);
652
- const t70 = values.description ?? "";
653
- let t71;
654
- if ($[102] !== handleChange || $[103] !== t69 || $[104] !== t70) {
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
- t71 = $[105];
668
+ t70 = $[104];
662
669
  }
663
- const t72 = showErrors && Boolean(errors.description);
664
- const t73 = showErrors && Boolean(errors.description) ? errors.description : "Description of the collection, you can use markdown";
665
- let t74;
666
- if ($[106] !== t72 || $[107] !== t73) {
667
- t74 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t72, children: t73 });
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
- t74 = $[108];
679
+ t73 = $[107];
673
680
  }
674
- let t75;
675
- if ($[109] !== t71 || $[110] !== t74) {
676
- t75 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
677
- t71,
678
- t74
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
- $[109] = t71;
687
+ $[108] = t70;
688
+ $[109] = t73;
681
689
  $[110] = t74;
682
- $[111] = t75;
683
690
  } else {
684
- t75 = $[111];
691
+ t74 = $[110];
685
692
  }
686
- const t76 = values.defaultSize ?? "";
693
+ const t75 = showErrors && Boolean(errors.description);
694
+ const t76 = values.description ?? "";
687
695
  let t77;
688
- if ($[112] === Symbol.for("react.memo_cache_sentinel")) {
689
- t77 = ["xs", "s", "m", "l", "xl"].map(_temp2$7);
690
- $[112] = t77;
691
- } else {
692
- t77 = $[112];
693
- }
694
- let t78;
695
- if ($[113] !== handleChange || $[114] !== t76) {
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;
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;
700
702
  } else {
701
- t78 = $[115];
703
+ t77 = $[114];
702
704
  }
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] !== setFieldValue) {
706
- t80 = (v) => {
707
- if (v === "code_defined") {
708
- throw new Error("This should not happen");
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
- const t81 = customIdValue ?? "";
718
- let t82;
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 ($[118] === Symbol.for("react.memo_cache_sentinel")) {
722
- t82 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "false", children: "Document ID is generated automatically" });
723
- t83 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "true", children: "Users must define an ID" });
724
- t84 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "optional", children: "Users can define an ID, but it is not required" });
725
- $[118] = t82;
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
- t85 = $[124];
743
+ t84 = $[124];
746
744
  }
745
+ const t85 = customIdValue === "code_defined";
747
746
  let t86;
748
747
  if ($[125] !== setFieldValue) {
749
- t86 = (v_0) => setFieldValue("collectionGroup", 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 = values.collectionGroup ?? false;
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 ($[131] !== t88) {
774
- t90 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-4", children: [
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
- $[131] = t88;
779
- $[132] = t90;
779
+ t89,
780
+ t90
781
+ ] }) });
782
+ $[130] = t85;
783
+ $[131] = t86;
784
+ $[132] = t87;
785
+ $[133] = t91;
780
786
  } else {
781
- t90 = $[132];
787
+ t91 = $[133];
782
788
  }
783
- let t91;
784
- if ($[133] !== setFieldValue) {
785
- t91 = (v_1) => setFieldValue("textSearchEnabled", v_1);
786
- $[133] = setFieldValue;
787
- $[134] = t91;
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
- t93 = $[137];
795
+ t92 = $[135];
800
796
  }
797
+ const t93 = values.collectionGroup ?? false;
801
798
  let t94;
802
- if ($[138] === Symbol.for("react.memo_cache_sentinel")) {
803
- t94 = /* @__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." });
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] !== t93) {
810
- t95 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
811
- t93,
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 = $[140];
812
+ t95 = $[139];
818
813
  }
819
814
  let t96;
820
- if ($[141] !== t48 || $[142] !== t56 || $[143] !== t68 || $[144] !== t75 || $[145] !== t78 || $[146] !== t85 || $[147] !== t90 || $[148] !== t95) {
821
- t96 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 gap-4 p-4", children: [
822
- t48,
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
- $[141] = t48;
832
- $[142] = t56;
833
- $[143] = t68;
834
- $[144] = t75;
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 ($[150] !== advancedPanelExpanded || $[151] !== t96) {
845
- t97 = /* @__PURE__ */ jsxRuntime.jsx(ui.ExpandablePanel, { expanded: advancedPanelExpanded, onExpandedChange: setAdvancedPanelExpanded, title: t41, initiallyExpanded: false, children: t96 });
846
- $[150] = advancedPanelExpanded;
847
- $[151] = t96;
848
- $[152] = t97;
849
- } else {
850
- t97 = $[152];
851
- }
852
- let t98;
853
- if ($[153] !== children || $[154] !== t97) {
854
- t98 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-8", children: [
855
- t97,
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
- $[153] = children;
859
- $[154] = t97;
860
- $[155] = t98;
900
+ $[162] = children;
901
+ $[163] = t103;
902
+ $[164] = t104;
861
903
  } else {
862
- t98 = $[155];
904
+ t104 = $[164];
863
905
  }
864
- let t99;
865
- if ($[156] !== t27 || $[157] !== t36 || $[158] !== t37 || $[159] !== t40 || $[160] !== t98) {
866
- t99 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t19, children: [
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
- t98
913
+ t46,
914
+ t104
872
915
  ] });
873
- $[156] = t27;
874
- $[157] = t36;
875
- $[158] = t37;
876
- $[159] = t40;
877
- $[160] = t98;
878
- $[161] = t99;
879
- } else {
880
- t99 = $[161];
881
- }
882
- let t100;
883
- if ($[162] === Symbol.for("react.memo_cache_sentinel")) {
884
- t100 = /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
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
- $[162] = t100;
931
+ $[172] = t106;
888
932
  } else {
889
- t100 = $[162];
933
+ t106 = $[172];
890
934
  }
891
- let t101;
892
- if ($[163] !== setFieldValue) {
893
- t101 = (icon) => {
935
+ let t107;
936
+ if ($[173] !== setFieldValue) {
937
+ t107 = (icon) => {
894
938
  setIconDialogOpen(false);
895
939
  setFieldValue("icon", icon);
896
940
  };
897
- $[163] = setFieldValue;
898
- $[164] = t101;
941
+ $[173] = setFieldValue;
942
+ $[174] = t107;
899
943
  } else {
900
- t101 = $[164];
944
+ t107 = $[174];
901
945
  }
902
- let t102;
903
- if ($[165] !== t101 || $[166] !== values.icon) {
904
- t102 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsxRuntime.jsx(core.SearchIconsView, { selectedIcon: values.icon, onIconSelected: t101 }) });
905
- $[165] = t101;
906
- $[166] = values.icon;
907
- $[167] = t102;
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
- t102 = $[167];
953
+ t108 = $[177];
910
954
  }
911
- let t103;
912
- if ($[168] !== iconDialogOpen || $[169] !== t102) {
913
- t103 = /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t102 });
914
- $[168] = iconDialogOpen;
915
- $[169] = t102;
916
- $[170] = t103;
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
- t103 = $[170];
962
+ t109 = $[180];
919
963
  }
920
- let t104;
921
- if ($[171] !== T0 || $[172] !== t103 || $[173] !== t18 || $[174] !== t99) {
922
- t104 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t7, children: /* @__PURE__ */ jsxRuntime.jsxs(T0, { maxWidth: t8, className: t9, children: [
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
- t99,
925
- t100,
926
- t103
968
+ t105,
969
+ t106,
970
+ t109
927
971
  ] }) });
928
- $[171] = T0;
929
- $[172] = t103;
930
- $[173] = t18;
931
- $[174] = t99;
932
- $[175] = t104;
972
+ $[181] = T0;
973
+ $[182] = t105;
974
+ $[183] = t109;
975
+ $[184] = t18;
976
+ $[185] = t110;
933
977
  } else {
934
- t104 = $[175];
978
+ t110 = $[185];
935
979
  }
936
- return t104;
980
+ return t110;
937
981
  }
938
982
  function _temp3$4(value_3) {
939
983
  if (value_3 === "code_defined") {