@firecms/collection_editor 3.0.0-beta.13 → 3.0.0-beta.14

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 CHANGED
@@ -1,14 +1,17 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { c } from "react-compiler-runtime";
3
- import { FieldCaption, SearchIconsView, toSnakeCase, singular, IconForView, ArrayContainer, serializeRegExp, useSnackbarController, resolveEnumValues, isPropertyBuilder, useCustomizationController, getFieldConfig, ErrorBoundary, PropertyConfigBadge, unslugify, useNavigationController, mergeDeep, DEFAULT_FIELD_CONFIGS, getFieldId, isValidRegExp, isEmptyObject, ConfirmationDialog, useLargeLayout, makePropertiesEditable, resolveEntityView, useAuthController, useSelectionController, CircularProgressCenter, EntityCollectionTable, slugify, randomString, removeUndefined, ErrorView, removeInitialAndTrailingSlashes, getDefaultPropertiesOrder, joinCollectionLists } from "@firecms/core";
3
+ import { FieldCaption, SearchIconsView, toSnakeCase, singular, IconForView, ArrayContainer, serializeRegExp, useSnackbarController, resolveEnumValues, isPropertyBuilder, useCustomizationController, getFieldConfig, ErrorBoundary, PropertyConfigBadge, unslugify, useNavigationController, mergeDeep, DEFAULT_FIELD_CONFIGS, getFieldId, isValidRegExp, ConfirmationDialog, isEmptyObject, useLargeLayout, makePropertiesEditable, resolveEntityView, useAuthController, useSelectionController, CircularProgressCenter, EntityCollectionTable, slugify, randomString, removeUndefined, ErrorView, removeInitialAndTrailingSlashes, getDefaultPropertiesOrder, joinCollectionLists } from "@firecms/core";
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, BooleanSwitchWithLabel, ExpandablePanel, Dialog, Badge, AutorenewIcon, ListIcon, Button, CircularProgress, Paper, DialogTitle, DialogContent, DialogActions, RuleIcon, MultiSelectItem, CloudUploadIcon, MultiSelect, cardMixin, cardClickableMixin, cardSelectedMixin, FunctionsIcon, DoNotDisturbOnIcon, defaultBorderMixin, RemoveIcon, DragHandleIcon, AddIcon, SelectGroup, DeleteIcon, InfoLabel, fieldBackgroundMixin, fieldBackgroundDisabledMixin, fieldBackgroundHoverMixin, WarningIcon, ContentCopyIcon, CodeIcon, Table, TableBody, TableRow, TableCell, Alert, Icon, coolIconKeys, Tabs, Tab, ArrowBackIcon, LoadingButton, CheckIcon, Menu, MoreVertIcon, MenuItem, UndoIcon, SaveIcon } from "@firecms/ui";
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, DragHandleIcon, defaultBorderMixin, RemoveIcon, 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";
11
- import { Draggable, Droppable, DragDropContext } from "@hello-pangea/dnd";
11
+ import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext, closestCenter } from "@dnd-kit/core";
12
+ import { useSortable, sortableKeyboardCoordinates, SortableContext, verticalListSortingStrategy } from "@dnd-kit/sortable";
13
+ import { restrictToVerticalAxis } from "@dnd-kit/modifiers";
14
+ import { CSS } from "@dnd-kit/utilities";
12
15
  import JSON5 from "json5";
13
16
  import { Highlight, themes } from "prism-react-renderer";
14
17
  import { ImportFileUpload, getInferenceType, ImportNewPropertyFieldPreview, DataNewPropertiesMapping, convertDataToEntity, useImportConfig, ImportSaveInProgress } from "@firecms/data_import_export";
@@ -162,7 +165,7 @@ function LayoutModeSwitch(t0) {
162
165
  return t18;
163
166
  }
164
167
  function CollectionDetailsForm(t0) {
165
- const $ = c(176);
168
+ const $ = c(196);
166
169
  const {
167
170
  isNewCollection,
168
171
  reservedGroups,
@@ -444,7 +447,7 @@ function CollectionDetailsForm(t0) {
444
447
  }
445
448
  const t37 = !isSubcollection && /* @__PURE__ */ jsxs("div", { className: "col-span-12 sm:col-span-4 relative", children: [
446
449
  /* @__PURE__ */ jsx(TextField, { error: showErrors && Boolean(errors.group), disabled: isSubmitting, value: values.group ?? "", autoComplete: "off", onChange: (event) => setFieldValue("group", event.target.value), name: "group", inputRef: groupRef, label: "Group" }),
447
- /* @__PURE__ */ jsx(Autocomplete, { open: autoCompleteOpen && (groupOptions ?? []).length > 0, setOpen: setAutoCompleteOpen, children: groupOptions?.map((group_0, index) => /* @__PURE__ */ jsx(AutocompleteItem, { onClick: () => {
450
+ /* @__PURE__ */ jsx(Autocomplete, { open: autoCompleteOpen && (groupOptions ?? []).length > 0, setOpen: setAutoCompleteOpen, children: groupOptions?.map((group_0, index) => /* @__PURE__ */ jsx(AutocompleteItem, { className: "pr-6 pl-14", onClick: () => {
448
451
  setAutoCompleteOpen(false);
449
452
  setFieldValue("group", group_0 ?? null);
450
453
  }, children: /* @__PURE__ */ jsx("div", { className: "flex-grow", children: group_0 }) }, index + "_" + group_0)) }),
@@ -468,101 +471,143 @@ function CollectionDetailsForm(t0) {
468
471
  } else {
469
472
  t40 = $[58];
470
473
  }
471
- let t41;
472
- if ($[59] === Symbol.for("react.memo_cache_sentinel")) {
473
- t41 = /* @__PURE__ */ jsxs("div", { className: "flex flex-row text-surface-500", children: [
474
- /* @__PURE__ */ jsx(SettingsIcon, {}),
475
- /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "ml-2", children: "Advanced" })
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 });
474
+ const t41 = values.history === null || values.history === void 0 ? "Document history revisions enabled if enabled globally" : values.history ? "Document history revisions ENABLED" : "Document history revisions NOT enabled";
475
+ let t42;
476
+ if ($[59] !== setFieldValue) {
477
+ t42 = (v) => setFieldValue("history", v);
478
+ $[59] = setFieldValue;
486
479
  $[60] = t42;
487
- $[61] = t43;
488
- $[62] = t44;
489
480
  } else {
490
- t44 = $[62];
481
+ t42 = $[60];
491
482
  }
492
- const t45 = touched.id && Boolean(errors.id);
493
- const t46 = touched.id && Boolean(errors.id) ? errors.id : "This id identifies this collection. Typically the same as the path.";
494
- let t47;
495
- if ($[63] !== t45 || $[64] !== t46) {
496
- t47 = /* @__PURE__ */ jsx(FieldCaption, { error: t45, children: t46 });
497
- $[63] = t45;
498
- $[64] = t46;
499
- $[65] = t47;
483
+ const t43 = values.history === void 0 ? null : values.history;
484
+ let t44;
485
+ if ($[61] !== t41 || $[62] !== t42 || $[63] !== t43) {
486
+ t44 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "large", allowIndeterminate: true, label: t41, onValueChange: t42, value: t43 });
487
+ $[61] = t41;
488
+ $[62] = t42;
489
+ $[63] = t43;
490
+ $[64] = t44;
491
+ } else {
492
+ t44 = $[64];
493
+ }
494
+ let t45;
495
+ if ($[65] === Symbol.for("react.memo_cache_sentinel")) {
496
+ t45 = /* @__PURE__ */ jsxs(FieldCaption, { children: [
497
+ "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 ",
498
+ /* @__PURE__ */ jsx("b", { children: "__history" }),
499
+ "."
500
+ ] });
501
+ $[65] = t45;
500
502
  } else {
501
- t47 = $[65];
503
+ t45 = $[65];
502
504
  }
503
- let t48;
504
- if ($[66] !== t44 || $[67] !== t47) {
505
- t48 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
505
+ let t46;
506
+ if ($[66] !== t44) {
507
+ t46 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
506
508
  t44,
507
- t47
509
+ t45
508
510
  ] });
509
511
  $[66] = t44;
510
- $[67] = t47;
511
- $[68] = t48;
512
+ $[67] = t46;
513
+ } else {
514
+ t46 = $[67];
515
+ }
516
+ let t47;
517
+ if ($[68] === Symbol.for("react.memo_cache_sentinel")) {
518
+ t47 = /* @__PURE__ */ jsxs("div", { className: "flex flex-row text-surface-500", children: [
519
+ /* @__PURE__ */ jsx(SettingsIcon, {}),
520
+ /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "ml-2", children: "Advanced" })
521
+ ] });
522
+ $[68] = t47;
512
523
  } else {
513
- t48 = $[68];
524
+ t47 = $[68];
514
525
  }
515
- const t49 = showErrors && Boolean(errors.singularName);
526
+ const t48 = !isNewCollection;
527
+ const t49 = showErrors && Boolean(errors.id);
516
528
  let t50;
517
- if ($[69] !== handleChange || $[70] !== setFieldTouched) {
518
- t50 = (e_0) => {
519
- setFieldTouched("singularName", true);
520
- return handleChange(e_0);
521
- };
522
- $[69] = handleChange;
523
- $[70] = setFieldTouched;
529
+ if ($[69] !== t48 || $[70] !== t49) {
530
+ t50 = /* @__PURE__ */ jsx(Field, { name: "id", as: DebouncedTextField, disabled: t48, label: "Collection id", error: t49 });
531
+ $[69] = t48;
532
+ $[70] = t49;
524
533
  $[71] = t50;
525
534
  } else {
526
535
  t50 = $[71];
527
536
  }
528
- const t51 = values.singularName ?? "";
529
- let t52;
530
- if ($[72] !== t49 || $[73] !== t50 || $[74] !== t51) {
531
- t52 = /* @__PURE__ */ jsx(TextField, { error: t49, name: "singularName", "aria-describedby": "singularName-helper", onChange: t50, value: t51, label: "Singular name" });
532
- $[72] = t49;
533
- $[73] = t50;
534
- $[74] = t51;
535
- $[75] = t52;
536
- } else {
537
- t52 = $[75];
538
- }
539
- const t53 = showErrors && Boolean(errors.singularName);
540
- const t54 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define a singular name for your entities";
541
- let t55;
542
- if ($[76] !== t53 || $[77] !== t54) {
543
- t55 = /* @__PURE__ */ jsx(FieldCaption, { error: t53, children: t54 });
537
+ const t51 = touched.id && Boolean(errors.id);
538
+ const t52 = touched.id && Boolean(errors.id) ? errors.id : "This id identifies this collection. Typically the same as the path.";
539
+ let t53;
540
+ if ($[72] !== t51 || $[73] !== t52) {
541
+ t53 = /* @__PURE__ */ jsx(FieldCaption, { error: t51, children: t52 });
542
+ $[72] = t51;
543
+ $[73] = t52;
544
+ $[74] = t53;
545
+ } else {
546
+ t53 = $[74];
547
+ }
548
+ let t54;
549
+ if ($[75] !== t50 || $[76] !== t53) {
550
+ t54 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
551
+ t50,
552
+ t53
553
+ ] });
554
+ $[75] = t50;
544
555
  $[76] = t53;
545
556
  $[77] = t54;
546
- $[78] = t55;
547
557
  } else {
548
- t55 = $[78];
558
+ t54 = $[77];
549
559
  }
560
+ const t55 = showErrors && Boolean(errors.singularName);
550
561
  let t56;
551
- if ($[79] !== t52 || $[80] !== t55) {
552
- t56 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
553
- t52,
554
- t55
555
- ] });
556
- $[79] = t52;
557
- $[80] = t55;
558
- $[81] = t56;
562
+ if ($[78] !== handleChange || $[79] !== setFieldTouched) {
563
+ t56 = (e_0) => {
564
+ setFieldTouched("singularName", true);
565
+ return handleChange(e_0);
566
+ };
567
+ $[78] = handleChange;
568
+ $[79] = setFieldTouched;
569
+ $[80] = t56;
559
570
  } else {
560
- t56 = $[81];
571
+ t56 = $[80];
561
572
  }
562
- const t57 = showErrors && Boolean(errors.sideDialogWidth);
573
+ const t57 = values.singularName ?? "";
563
574
  let t58;
564
- if ($[82] !== setFieldTouched || $[83] !== setFieldValue) {
565
- t58 = (e_1) => {
575
+ if ($[81] !== t55 || $[82] !== t56 || $[83] !== t57) {
576
+ t58 = /* @__PURE__ */ jsx(TextField, { error: t55, name: "singularName", "aria-describedby": "singularName-helper", onChange: t56, value: t57, label: "Singular name" });
577
+ $[81] = t55;
578
+ $[82] = t56;
579
+ $[83] = t57;
580
+ $[84] = t58;
581
+ } else {
582
+ t58 = $[84];
583
+ }
584
+ const t59 = showErrors && Boolean(errors.singularName);
585
+ const t60 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define a singular name for your entities";
586
+ let t61;
587
+ if ($[85] !== t59 || $[86] !== t60) {
588
+ t61 = /* @__PURE__ */ jsx(FieldCaption, { error: t59, children: t60 });
589
+ $[85] = t59;
590
+ $[86] = t60;
591
+ $[87] = t61;
592
+ } else {
593
+ t61 = $[87];
594
+ }
595
+ let t62;
596
+ if ($[88] !== t58 || $[89] !== t61) {
597
+ t62 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
598
+ t58,
599
+ t61
600
+ ] });
601
+ $[88] = t58;
602
+ $[89] = t61;
603
+ $[90] = t62;
604
+ } else {
605
+ t62 = $[90];
606
+ }
607
+ const t63 = showErrors && Boolean(errors.sideDialogWidth);
608
+ let t64;
609
+ if ($[91] !== setFieldTouched || $[92] !== setFieldValue) {
610
+ t64 = (e_1) => {
566
611
  setFieldTouched("sideDialogWidth", true);
567
612
  const value_0 = e_1.target.value;
568
613
  if (!value_0) {
@@ -573,360 +618,402 @@ function CollectionDetailsForm(t0) {
573
618
  }
574
619
  }
575
620
  };
576
- $[82] = setFieldTouched;
577
- $[83] = setFieldValue;
578
- $[84] = t58;
621
+ $[91] = setFieldTouched;
622
+ $[92] = setFieldValue;
623
+ $[93] = t64;
579
624
  } else {
580
- t58 = $[84];
625
+ t64 = $[93];
581
626
  }
582
- let t59;
583
- if ($[85] !== setFieldValue) {
584
- t59 = () => {
627
+ let t65;
628
+ if ($[94] !== setFieldValue) {
629
+ t65 = () => {
585
630
  setFieldValue("sideDialogWidth", null);
586
631
  };
587
- $[85] = setFieldValue;
588
- $[86] = t59;
632
+ $[94] = setFieldValue;
633
+ $[95] = t65;
589
634
  } else {
590
- t59 = $[86];
635
+ t65 = $[95];
591
636
  }
592
- const t60 = !values.sideDialogWidth;
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";
637
+ const t66 = !values.sideDialogWidth;
623
638
  let t67;
624
- if ($[96] !== t65 || $[97] !== t66) {
625
- t67 = /* @__PURE__ */ jsx(FieldCaption, { error: t65, children: t66 });
626
- $[96] = t65;
627
- $[97] = t66;
628
- $[98] = t67;
639
+ if ($[96] === Symbol.for("react.memo_cache_sentinel")) {
640
+ t67 = /* @__PURE__ */ jsx(CloseIcon, { size: "small" });
641
+ $[96] = t67;
629
642
  } else {
630
- t67 = $[98];
643
+ t67 = $[96];
631
644
  }
632
645
  let t68;
633
- if ($[99] !== t64 || $[100] !== t67) {
634
- t68 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
635
- t64,
636
- t67
637
- ] });
638
- $[99] = t64;
639
- $[100] = t67;
640
- $[101] = t68;
641
- } else {
642
- t68 = $[101];
643
- }
644
- const t69 = showErrors && Boolean(errors.description);
645
- const t70 = values.description ?? "";
646
- let t71;
647
- if ($[102] !== handleChange || $[103] !== t69 || $[104] !== t70) {
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;
646
+ if ($[97] !== t65 || $[98] !== t66) {
647
+ t68 = /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: t65, disabled: t66, children: t67 });
648
+ $[97] = t65;
649
+ $[98] = t66;
650
+ $[99] = t68;
651
+ } else {
652
+ t68 = $[99];
653
+ }
654
+ const t69 = values.sideDialogWidth ?? "";
655
+ let t70;
656
+ if ($[100] !== t63 || $[101] !== t64 || $[102] !== t68 || $[103] !== t69) {
657
+ t70 = /* @__PURE__ */ jsx(TextField, { error: t63, name: "sideDialogWidth", type: "number", "aria-describedby": "sideDialogWidth-helper", onChange: t64, endAdornment: t68, value: t69, label: "Side dialog width" });
658
+ $[100] = t63;
659
+ $[101] = t64;
660
+ $[102] = t68;
650
661
  $[103] = t69;
651
662
  $[104] = t70;
652
- $[105] = t71;
653
663
  } else {
654
- t71 = $[105];
664
+ t70 = $[104];
655
665
  }
656
- const t72 = showErrors && Boolean(errors.description);
657
- const t73 = showErrors && Boolean(errors.description) ? errors.description : "Description of the collection, you can use markdown";
658
- let t74;
659
- if ($[106] !== t72 || $[107] !== t73) {
660
- t74 = /* @__PURE__ */ jsx(FieldCaption, { error: t72, children: t73 });
666
+ const t71 = showErrors && Boolean(errors.singularName);
667
+ const t72 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define the width (in pixels) of entities side dialog. Default is 768px";
668
+ let t73;
669
+ if ($[105] !== t71 || $[106] !== t72) {
670
+ t73 = /* @__PURE__ */ jsx(FieldCaption, { error: t71, children: t72 });
671
+ $[105] = t71;
661
672
  $[106] = t72;
662
673
  $[107] = t73;
663
- $[108] = t74;
664
674
  } else {
665
- t74 = $[108];
675
+ t73 = $[107];
666
676
  }
667
- let t75;
668
- if ($[109] !== t71 || $[110] !== t74) {
669
- t75 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
670
- t71,
671
- t74
677
+ let t74;
678
+ if ($[108] !== t70 || $[109] !== t73) {
679
+ t74 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
680
+ t70,
681
+ t73
672
682
  ] });
673
- $[109] = t71;
683
+ $[108] = t70;
684
+ $[109] = t73;
674
685
  $[110] = t74;
675
- $[111] = t75;
676
686
  } else {
677
- t75 = $[111];
687
+ t74 = $[110];
678
688
  }
679
- const t76 = values.defaultSize ?? "";
689
+ const t75 = showErrors && Boolean(errors.description);
690
+ const t76 = values.description ?? "";
680
691
  let t77;
681
- if ($[112] === Symbol.for("react.memo_cache_sentinel")) {
682
- t77 = ["xs", "s", "m", "l", "xl"].map(_temp2$7);
683
- $[112] = t77;
692
+ if ($[111] !== handleChange || $[112] !== t75 || $[113] !== t76) {
693
+ t77 = /* @__PURE__ */ jsx(TextField, { error: t75, name: "description", value: t76, onChange: handleChange, multiline: true, minRows: 2, "aria-describedby": "description-helper-text", label: "Description" });
694
+ $[111] = handleChange;
695
+ $[112] = t75;
696
+ $[113] = t76;
697
+ $[114] = t77;
684
698
  } else {
685
- t77 = $[112];
699
+ t77 = $[114];
686
700
  }
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;
693
- } else {
694
- t78 = $[115];
695
- }
696
- const t79 = customIdValue === "code_defined";
701
+ const t78 = showErrors && Boolean(errors.description);
702
+ const t79 = showErrors && Boolean(errors.description) ? errors.description : "Description of the collection, you can use markdown";
697
703
  let t80;
698
- if ($[116] !== setFieldValue) {
699
- t80 = (v) => {
700
- if (v === "code_defined") {
701
- throw new Error("This should not happen");
702
- }
703
- setFieldValue("customId", v);
704
- };
705
- $[116] = setFieldValue;
704
+ if ($[115] !== t78 || $[116] !== t79) {
705
+ t80 = /* @__PURE__ */ jsx(FieldCaption, { error: t78, children: t79 });
706
+ $[115] = t78;
707
+ $[116] = t79;
706
708
  $[117] = t80;
707
709
  } else {
708
710
  t80 = $[117];
709
711
  }
710
- const t81 = customIdValue ?? "";
711
- let t82;
712
+ let t81;
713
+ if ($[118] !== t77 || $[119] !== t80) {
714
+ t81 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
715
+ t77,
716
+ t80
717
+ ] });
718
+ $[118] = t77;
719
+ $[119] = t80;
720
+ $[120] = t81;
721
+ } else {
722
+ t81 = $[120];
723
+ }
724
+ const t82 = values.defaultSize ?? "";
712
725
  let t83;
726
+ if ($[121] === Symbol.for("react.memo_cache_sentinel")) {
727
+ t83 = ["xs", "s", "m", "l", "xl"].map(_temp2$7);
728
+ $[121] = t83;
729
+ } else {
730
+ t83 = $[121];
731
+ }
713
732
  let t84;
714
- if ($[118] === Symbol.for("react.memo_cache_sentinel")) {
715
- t82 = /* @__PURE__ */ jsx(SelectItem, { value: "false", children: "Document ID is generated automatically" });
716
- t83 = /* @__PURE__ */ jsx(SelectItem, { value: "true", children: "Users must define an ID" });
717
- t84 = /* @__PURE__ */ jsx(SelectItem, { value: "optional", children: "Users can define an ID, but it is not required" });
718
- $[118] = t82;
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;
733
+ if ($[122] !== handleChange || $[123] !== t82) {
734
+ 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 }) });
735
+ $[122] = handleChange;
736
+ $[123] = t82;
737
+ $[124] = t84;
737
738
  } else {
738
- t85 = $[124];
739
+ t84 = $[124];
739
740
  }
741
+ const t85 = values.includeJsonView === void 0 || values.includeJsonView ? "Include JSON view" : "Do not include JSON view";
740
742
  let t86;
741
743
  if ($[125] !== setFieldValue) {
742
- t86 = (v_0) => setFieldValue("collectionGroup", v_0);
744
+ t86 = (v_0) => setFieldValue("includeJsonView", v_0);
743
745
  $[125] = setFieldValue;
744
746
  $[126] = t86;
745
747
  } else {
746
748
  t86 = $[126];
747
749
  }
748
- const t87 = values.collectionGroup ?? false;
750
+ const t87 = values.includeJsonView === void 0 ? true : values.includeJsonView;
749
751
  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;
752
+ if ($[127] !== t85 || $[128] !== t86 || $[129] !== t87) {
753
+ t88 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "large", label: t85, onValueChange: t86, value: t87 });
754
+ $[127] = t85;
755
+ $[128] = t86;
756
+ $[129] = t87;
757
+ $[130] = t88;
755
758
  } else {
756
- t88 = $[129];
759
+ t88 = $[130];
757
760
  }
758
761
  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
+ if ($[131] === Symbol.for("react.memo_cache_sentinel")) {
763
+ t89 = /* @__PURE__ */ jsx(FieldCaption, { children: "Include the JSON representation of the document." });
764
+ $[131] = t89;
762
765
  } else {
763
- t89 = $[130];
766
+ t89 = $[131];
764
767
  }
765
768
  let t90;
766
- if ($[131] !== t88) {
767
- t90 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 mt-4", children: [
769
+ if ($[132] !== t88) {
770
+ t90 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
768
771
  t88,
769
772
  t89
770
773
  ] });
771
- $[131] = t88;
772
- $[132] = t90;
774
+ $[132] = t88;
775
+ $[133] = t90;
773
776
  } else {
774
- t90 = $[132];
777
+ t90 = $[133];
775
778
  }
776
- let t91;
777
- if ($[133] !== setFieldValue) {
778
- t91 = (v_1) => setFieldValue("textSearchEnabled", v_1);
779
- $[133] = setFieldValue;
780
- $[134] = t91;
779
+ const t91 = customIdValue === "code_defined";
780
+ let t92;
781
+ if ($[134] !== setFieldValue) {
782
+ t92 = (v_1) => {
783
+ if (v_1 === "code_defined") {
784
+ throw new Error("This should not happen");
785
+ }
786
+ setFieldValue("customId", v_1);
787
+ };
788
+ $[134] = setFieldValue;
789
+ $[135] = t92;
781
790
  } else {
782
- t91 = $[134];
791
+ t92 = $[135];
783
792
  }
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;
793
+ const t93 = customIdValue ?? "";
794
+ let t94;
795
+ let t95;
796
+ let t96;
797
+ if ($[136] === Symbol.for("react.memo_cache_sentinel")) {
798
+ t94 = /* @__PURE__ */ jsx(SelectItem, { value: "false", children: "Document ID is generated automatically" });
799
+ t95 = /* @__PURE__ */ jsx(SelectItem, { value: "true", children: "Users must define an ID" });
800
+ t96 = /* @__PURE__ */ jsx(SelectItem, { value: "optional", children: "Users can define an ID, but it is not required" });
801
+ $[136] = t94;
802
+ $[137] = t95;
803
+ $[138] = t96;
804
+ } else {
805
+ t94 = $[136];
806
+ t95 = $[137];
807
+ t96 = $[138];
808
+ }
809
+ let t97;
810
+ if ($[139] !== t91 || $[140] !== t92 || $[141] !== t93) {
811
+ t97 = /* @__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: t91, onValueChange: t92, value: t93, renderValue: _temp3$4, children: [
812
+ t94,
813
+ t95,
814
+ t96
815
+ ] }) });
816
+ $[139] = t91;
817
+ $[140] = t92;
818
+ $[141] = t93;
819
+ $[142] = t97;
791
820
  } else {
792
- t93 = $[137];
821
+ t97 = $[142];
793
822
  }
794
- let t94;
795
- if ($[138] === Symbol.for("react.memo_cache_sentinel")) {
796
- t94 = /* @__PURE__ */ jsx(FieldCaption, { children: "Allow text search for this collection. If you have not specified a text search delegate, this will use the built-in local text search. This is not recommended for large collections, as it may incur in performance and cost issues." });
797
- $[138] = t94;
823
+ let t98;
824
+ if ($[143] !== setFieldValue) {
825
+ t98 = (v_2) => setFieldValue("collectionGroup", v_2);
826
+ $[143] = setFieldValue;
827
+ $[144] = t98;
798
828
  } else {
799
- t94 = $[138];
829
+ t98 = $[144];
800
830
  }
801
- let t95;
802
- if ($[139] !== t93) {
803
- t95 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
804
- t93,
805
- t94
806
- ] });
807
- $[139] = t93;
808
- $[140] = t95;
831
+ const t99 = values.collectionGroup ?? false;
832
+ let t100;
833
+ if ($[145] !== t98 || $[146] !== t99) {
834
+ t100 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "large", label: "Collection group", onValueChange: t98, value: t99 });
835
+ $[145] = t98;
836
+ $[146] = t99;
837
+ $[147] = t100;
809
838
  } else {
810
- t95 = $[140];
839
+ t100 = $[147];
811
840
  }
812
- let t96;
813
- if ($[141] !== t48 || $[142] !== t56 || $[143] !== t68 || $[144] !== t75 || $[145] !== t78 || $[146] !== t85 || $[147] !== t90 || $[148] !== t95) {
814
- t96 = /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-12 gap-4 p-4", children: [
815
- t48,
816
- t56,
817
- t68,
818
- t75,
819
- t78,
820
- t85,
821
- t90,
822
- t95
823
- ] });
824
- $[141] = t48;
825
- $[142] = t56;
826
- $[143] = t68;
827
- $[144] = t75;
828
- $[145] = t78;
829
- $[146] = t85;
830
- $[147] = t90;
831
- $[148] = t95;
832
- $[149] = t96;
833
- } else {
834
- t96 = $[149];
841
+ let t101;
842
+ if ($[148] === Symbol.for("react.memo_cache_sentinel")) {
843
+ t101 = /* @__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." });
844
+ $[148] = t101;
845
+ } else {
846
+ t101 = $[148];
835
847
  }
836
- let t97;
837
- if ($[150] !== advancedPanelExpanded || $[151] !== t96) {
838
- t97 = /* @__PURE__ */ jsx(ExpandablePanel, { expanded: advancedPanelExpanded, onExpandedChange: setAdvancedPanelExpanded, title: t41, initiallyExpanded: false, children: t96 });
839
- $[150] = advancedPanelExpanded;
840
- $[151] = t96;
841
- $[152] = t97;
848
+ let t102;
849
+ if ($[149] !== t100) {
850
+ t102 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 mt-4", children: [
851
+ t100,
852
+ t101
853
+ ] });
854
+ $[149] = t100;
855
+ $[150] = t102;
842
856
  } else {
843
- t97 = $[152];
857
+ t102 = $[150];
844
858
  }
845
- let t98;
846
- if ($[153] !== children || $[154] !== t97) {
847
- t98 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 mt-8", children: [
859
+ let t103;
860
+ if ($[151] !== setFieldValue) {
861
+ t103 = (v_3) => setFieldValue("textSearchEnabled", v_3);
862
+ $[151] = setFieldValue;
863
+ $[152] = t103;
864
+ } else {
865
+ t103 = $[152];
866
+ }
867
+ const t104 = values.textSearchEnabled ?? false;
868
+ let t105;
869
+ if ($[153] !== t103 || $[154] !== t104) {
870
+ t105 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "large", label: "Enable text search for this collection", onValueChange: t103, value: t104 });
871
+ $[153] = t103;
872
+ $[154] = t104;
873
+ $[155] = t105;
874
+ } else {
875
+ t105 = $[155];
876
+ }
877
+ let t106;
878
+ if ($[156] === Symbol.for("react.memo_cache_sentinel")) {
879
+ t106 = /* @__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." });
880
+ $[156] = t106;
881
+ } else {
882
+ t106 = $[156];
883
+ }
884
+ let t107;
885
+ if ($[157] !== t105) {
886
+ t107 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
887
+ t105,
888
+ t106
889
+ ] });
890
+ $[157] = t105;
891
+ $[158] = t107;
892
+ } else {
893
+ t107 = $[158];
894
+ }
895
+ let t108;
896
+ if ($[159] !== t102 || $[160] !== t107 || $[161] !== t54 || $[162] !== t62 || $[163] !== t74 || $[164] !== t81 || $[165] !== t84 || $[166] !== t90 || $[167] !== t97) {
897
+ t108 = /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-12 gap-4 p-4", children: [
898
+ t54,
899
+ t62,
900
+ t74,
901
+ t81,
902
+ t84,
903
+ t90,
848
904
  t97,
905
+ t102,
906
+ t107
907
+ ] });
908
+ $[159] = t102;
909
+ $[160] = t107;
910
+ $[161] = t54;
911
+ $[162] = t62;
912
+ $[163] = t74;
913
+ $[164] = t81;
914
+ $[165] = t84;
915
+ $[166] = t90;
916
+ $[167] = t97;
917
+ $[168] = t108;
918
+ } else {
919
+ t108 = $[168];
920
+ }
921
+ let t109;
922
+ if ($[169] !== advancedPanelExpanded || $[170] !== t108) {
923
+ t109 = /* @__PURE__ */ jsx(ExpandablePanel, { expanded: advancedPanelExpanded, onExpandedChange: setAdvancedPanelExpanded, title: t47, initiallyExpanded: false, children: t108 });
924
+ $[169] = advancedPanelExpanded;
925
+ $[170] = t108;
926
+ $[171] = t109;
927
+ } else {
928
+ t109 = $[171];
929
+ }
930
+ let t110;
931
+ if ($[172] !== children || $[173] !== t109) {
932
+ t110 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 mt-8", children: [
933
+ t109,
849
934
  children
850
935
  ] });
851
- $[153] = children;
852
- $[154] = t97;
853
- $[155] = t98;
936
+ $[172] = children;
937
+ $[173] = t109;
938
+ $[174] = t110;
854
939
  } else {
855
- t98 = $[155];
940
+ t110 = $[174];
856
941
  }
857
- let t99;
858
- if ($[156] !== t27 || $[157] !== t36 || $[158] !== t37 || $[159] !== t40 || $[160] !== t98) {
859
- t99 = /* @__PURE__ */ jsxs("div", { className: t19, children: [
942
+ let t111;
943
+ if ($[175] !== t110 || $[176] !== t27 || $[177] !== t36 || $[178] !== t37 || $[179] !== t40 || $[180] !== t46) {
944
+ t111 = /* @__PURE__ */ jsxs("div", { className: t19, children: [
860
945
  t27,
861
946
  t36,
862
947
  t37,
863
948
  t40,
864
- t98
949
+ t46,
950
+ t110
865
951
  ] });
866
- $[156] = t27;
867
- $[157] = t36;
868
- $[158] = t37;
869
- $[159] = t40;
870
- $[160] = t98;
871
- $[161] = t99;
872
- } else {
873
- t99 = $[161];
874
- }
875
- let t100;
876
- if ($[162] === Symbol.for("react.memo_cache_sentinel")) {
877
- t100 = /* @__PURE__ */ jsx("div", { style: {
952
+ $[175] = t110;
953
+ $[176] = t27;
954
+ $[177] = t36;
955
+ $[178] = t37;
956
+ $[179] = t40;
957
+ $[180] = t46;
958
+ $[181] = t111;
959
+ } else {
960
+ t111 = $[181];
961
+ }
962
+ let t112;
963
+ if ($[182] === Symbol.for("react.memo_cache_sentinel")) {
964
+ t112 = /* @__PURE__ */ jsx("div", { style: {
878
965
  height: "52px"
879
966
  } });
880
- $[162] = t100;
967
+ $[182] = t112;
881
968
  } else {
882
- t100 = $[162];
969
+ t112 = $[182];
883
970
  }
884
- let t101;
885
- if ($[163] !== setFieldValue) {
886
- t101 = (icon) => {
971
+ let t113;
972
+ if ($[183] !== setFieldValue) {
973
+ t113 = (icon) => {
887
974
  setIconDialogOpen(false);
888
975
  setFieldValue("icon", icon);
889
976
  };
890
- $[163] = setFieldValue;
891
- $[164] = t101;
977
+ $[183] = setFieldValue;
978
+ $[184] = t113;
892
979
  } else {
893
- t101 = $[164];
980
+ t113 = $[184];
894
981
  }
895
- let t102;
896
- if ($[165] !== t101 || $[166] !== values.icon) {
897
- t102 = /* @__PURE__ */ jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsx(SearchIconsView, { selectedIcon: values.icon, onIconSelected: t101 }) });
898
- $[165] = t101;
899
- $[166] = values.icon;
900
- $[167] = t102;
982
+ let t114;
983
+ if ($[185] !== t113 || $[186] !== values.icon) {
984
+ t114 = /* @__PURE__ */ jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsx(SearchIconsView, { selectedIcon: values.icon, onIconSelected: t113 }) });
985
+ $[185] = t113;
986
+ $[186] = values.icon;
987
+ $[187] = t114;
901
988
  } else {
902
- t102 = $[167];
989
+ t114 = $[187];
903
990
  }
904
- let t103;
905
- if ($[168] !== iconDialogOpen || $[169] !== t102) {
906
- t103 = /* @__PURE__ */ jsx(Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t102 });
907
- $[168] = iconDialogOpen;
908
- $[169] = t102;
909
- $[170] = t103;
991
+ let t115;
992
+ if ($[188] !== iconDialogOpen || $[189] !== t114) {
993
+ t115 = /* @__PURE__ */ jsx(Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t114 });
994
+ $[188] = iconDialogOpen;
995
+ $[189] = t114;
996
+ $[190] = t115;
910
997
  } else {
911
- t103 = $[170];
998
+ t115 = $[190];
912
999
  }
913
- let t104;
914
- if ($[171] !== T0 || $[172] !== t103 || $[173] !== t18 || $[174] !== t99) {
915
- t104 = /* @__PURE__ */ jsx("div", { className: t7, children: /* @__PURE__ */ jsxs(T0, { maxWidth: t8, className: t9, children: [
1000
+ let t116;
1001
+ if ($[191] !== T0 || $[192] !== t111 || $[193] !== t115 || $[194] !== t18) {
1002
+ t116 = /* @__PURE__ */ jsx("div", { className: t7, children: /* @__PURE__ */ jsxs(T0, { maxWidth: t8, className: t9, children: [
916
1003
  t18,
917
- t99,
918
- t100,
919
- t103
1004
+ t111,
1005
+ t112,
1006
+ t115
920
1007
  ] }) });
921
- $[171] = T0;
922
- $[172] = t103;
923
- $[173] = t18;
924
- $[174] = t99;
925
- $[175] = t104;
1008
+ $[191] = T0;
1009
+ $[192] = t111;
1010
+ $[193] = t115;
1011
+ $[194] = t18;
1012
+ $[195] = t116;
926
1013
  } else {
927
- t104 = $[175];
1014
+ t116 = $[195];
928
1015
  }
929
- return t104;
1016
+ return t116;
930
1017
  }
931
1018
  function _temp3$4(value_3) {
932
1019
  if (value_3 === "code_defined") {
@@ -2687,7 +2774,7 @@ function NonEditablePropertyPreview(t0) {
2687
2774
  return t19;
2688
2775
  }
2689
2776
  const PropertyTree = React__default.memo(function PropertyTree2(t0) {
2690
- const $ = c(26);
2777
+ const $ = c(37);
2691
2778
  const {
2692
2779
  namespace,
2693
2780
  selectedPropertyKey,
@@ -2713,94 +2800,152 @@ const PropertyTree = React__default.memo(function PropertyTree2(t0) {
2713
2800
  }
2714
2801
  const propertiesOrder = t1;
2715
2802
  let t2;
2716
- if ($[3] !== namespace || $[4] !== onPropertyMove || $[5] !== propertiesOrder) {
2717
- t2 = (result) => {
2718
- if (!result.destination) {
2719
- return;
2720
- }
2721
- const startIndex = result.source.index;
2722
- const endIndex = result.destination.index;
2723
- const newPropertiesOrder = Array.from(propertiesOrder);
2724
- const [removed] = newPropertiesOrder.splice(startIndex, 1);
2725
- newPropertiesOrder.splice(endIndex, 0, removed);
2726
- if (onPropertyMove) {
2727
- onPropertyMove(newPropertiesOrder, namespace);
2803
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
2804
+ t2 = {
2805
+ activationConstraint: {
2806
+ distance: 5
2728
2807
  }
2729
2808
  };
2730
- $[3] = namespace;
2731
- $[4] = onPropertyMove;
2732
- $[5] = propertiesOrder;
2733
- $[6] = t2;
2809
+ $[3] = t2;
2734
2810
  } else {
2735
- t2 = $[6];
2811
+ t2 = $[3];
2736
2812
  }
2737
- const onDragEnd = t2;
2738
- const t3 = `droppable_${namespace}`;
2813
+ let t3;
2814
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
2815
+ t3 = {
2816
+ coordinateGetter: sortableKeyboardCoordinates
2817
+ };
2818
+ $[4] = t3;
2819
+ } else {
2820
+ t3 = $[4];
2821
+ }
2822
+ const sensors = useSensors(useSensor(PointerSensor, t2), useSensor(KeyboardSensor, t3));
2739
2823
  let t4;
2740
- if ($[7] !== additionalFields || $[8] !== className || $[9] !== collectionEditable || $[10] !== errors || $[11] !== inferredPropertyKeys || $[12] !== namespace || $[13] !== onPropertyClick || $[14] !== onPropertyMove || $[15] !== onPropertyRemove || $[16] !== properties || $[17] !== propertiesOrder || $[18] !== selectedPropertyKey) {
2741
- t4 = (droppableProvided, droppableSnapshot) => /* @__PURE__ */ jsxs("div", { ...droppableProvided.droppableProps, ref: droppableProvided.innerRef, className, children: [
2742
- propertiesOrder && propertiesOrder.map((propertyKey, index) => {
2743
- const property = properties[propertyKey];
2744
- const additionalField = additionalFields?.find((field) => field.key === propertyKey);
2745
- if (!property && !additionalField) {
2746
- console.warn(`Property ${propertyKey} not found in properties or additionalFields`);
2747
- return null;
2824
+ if ($[5] !== namespace || $[6] !== onPropertyMove || $[7] !== propertiesOrder) {
2825
+ t4 = (event) => {
2826
+ const {
2827
+ active,
2828
+ over
2829
+ } = event;
2830
+ if (!over || active.id === over.id) {
2831
+ return;
2832
+ }
2833
+ const activeId = String(active.id);
2834
+ const overId = String(over.id);
2835
+ const activeKey = activeId.includes(".") ? activeId.split(".").pop() : activeId;
2836
+ const overKey = overId.includes(".") ? overId.split(".").pop() : overId;
2837
+ if (!activeKey || !overKey) {
2838
+ return;
2839
+ }
2840
+ const oldIndex = propertiesOrder.indexOf(activeKey);
2841
+ const newIndex = propertiesOrder.indexOf(overKey);
2842
+ if (oldIndex !== -1 && newIndex !== -1) {
2843
+ const newPropertiesOrder = [...propertiesOrder];
2844
+ const [removed] = newPropertiesOrder.splice(oldIndex, 1);
2845
+ newPropertiesOrder.splice(newIndex, 0, removed);
2846
+ if (onPropertyMove) {
2847
+ onPropertyMove(newPropertiesOrder, namespace);
2748
2848
  }
2749
- return /* @__PURE__ */ jsx(Draggable, { draggableId: `array_field_${namespace}_${propertyKey}}`, index, children: (provided, snapshot) => /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(PropertyTreeEntry, { propertyKey, propertyOrBuilder: property, additionalField, provided, errors, namespace, inferredPropertyKeys, onPropertyMove, onPropertyRemove, onPropertyClick: snapshot.isDragging ? void 0 : onPropertyClick, selectedPropertyKey, collectionEditable }) }) }, `array_field_${namespace}_${propertyKey}}`);
2750
- }).filter(Boolean),
2751
- droppableProvided.placeholder
2752
- ] });
2753
- $[7] = additionalFields;
2754
- $[8] = className;
2755
- $[9] = collectionEditable;
2756
- $[10] = errors;
2757
- $[11] = inferredPropertyKeys;
2758
- $[12] = namespace;
2759
- $[13] = onPropertyClick;
2760
- $[14] = onPropertyMove;
2761
- $[15] = onPropertyRemove;
2762
- $[16] = properties;
2763
- $[17] = propertiesOrder;
2764
- $[18] = selectedPropertyKey;
2765
- $[19] = t4;
2766
- } else {
2767
- t4 = $[19];
2849
+ }
2850
+ };
2851
+ $[5] = namespace;
2852
+ $[6] = onPropertyMove;
2853
+ $[7] = propertiesOrder;
2854
+ $[8] = t4;
2855
+ } else {
2856
+ t4 = $[8];
2768
2857
  }
2858
+ const handleDragEnd = t4;
2769
2859
  let t5;
2770
- if ($[20] !== t3 || $[21] !== t4) {
2771
- t5 = /* @__PURE__ */ jsx(Droppable, { droppableId: t3, children: t4 });
2772
- $[20] = t3;
2773
- $[21] = t4;
2774
- $[22] = t5;
2860
+ if ($[9] !== namespace || $[10] !== propertiesOrder) {
2861
+ let t62;
2862
+ if ($[12] !== namespace) {
2863
+ t62 = (key) => getFullId(key, namespace);
2864
+ $[12] = namespace;
2865
+ $[13] = t62;
2866
+ } else {
2867
+ t62 = $[13];
2868
+ }
2869
+ t5 = propertiesOrder.map(t62);
2870
+ $[9] = namespace;
2871
+ $[10] = propertiesOrder;
2872
+ $[11] = t5;
2775
2873
  } else {
2776
- t5 = $[22];
2874
+ t5 = $[11];
2777
2875
  }
2876
+ const items = t5;
2778
2877
  let t6;
2779
- if ($[23] !== onDragEnd || $[24] !== t5) {
2780
- t6 = /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(DragDropContext, { onDragEnd, children: t5 }) });
2781
- $[23] = onDragEnd;
2782
- $[24] = t5;
2783
- $[25] = t6;
2878
+ if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
2879
+ t6 = [restrictToVerticalAxis];
2880
+ $[14] = t6;
2784
2881
  } else {
2785
- t6 = $[25];
2882
+ t6 = $[14];
2786
2883
  }
2787
- return t6;
2788
- }, (prevProps, nextProps) => {
2789
- const isSelected = nextProps.selectedPropertyKey?.startsWith(nextProps.namespace ?? "");
2790
- const wasSelected = prevProps.selectedPropertyKey?.startsWith(prevProps.namespace ?? "");
2791
- if (isSelected || wasSelected) return false;
2792
- return equal(prevProps.properties, nextProps.properties) && prevProps.propertiesOrder === nextProps.propertiesOrder && equal(prevProps.additionalFields, nextProps.additionalFields) && equal(prevProps.errors, nextProps.errors) && equal(prevProps.onPropertyClick, nextProps.onPropertyClick) && // equal(prevProps.onPropertyMove, nextProps.onPropertyMove) &&
2793
- // equal(prevProps.onPropertyRemove, nextProps.onPropertyRemove) &&
2794
- prevProps.namespace === nextProps.namespace && prevProps.collectionEditable === nextProps.collectionEditable;
2795
- });
2884
+ let t7;
2885
+ if ($[15] !== additionalFields || $[16] !== collectionEditable || $[17] !== errors || $[18] !== inferredPropertyKeys || $[19] !== namespace || $[20] !== onPropertyClick || $[21] !== onPropertyMove || $[22] !== onPropertyRemove || $[23] !== properties || $[24] !== propertiesOrder || $[25] !== selectedPropertyKey) {
2886
+ t7 = propertiesOrder && propertiesOrder.map((propertyKey, index) => {
2887
+ const property = properties[propertyKey];
2888
+ const additionalField = additionalFields?.find((field) => field.key === propertyKey);
2889
+ if (!property && !additionalField) {
2890
+ console.warn(`Property ${propertyKey} not found in properties or additionalFields`);
2891
+ return null;
2892
+ }
2893
+ const id = getFullId(propertyKey, namespace);
2894
+ return /* @__PURE__ */ jsx(PropertyTreeEntry, { id, propertyKey, propertyOrBuilder: property, additionalField, errors, namespace, inferredPropertyKeys, onPropertyMove, onPropertyRemove, onPropertyClick, selectedPropertyKey, collectionEditable }, id);
2895
+ }).filter(Boolean);
2896
+ $[15] = additionalFields;
2897
+ $[16] = collectionEditable;
2898
+ $[17] = errors;
2899
+ $[18] = inferredPropertyKeys;
2900
+ $[19] = namespace;
2901
+ $[20] = onPropertyClick;
2902
+ $[21] = onPropertyMove;
2903
+ $[22] = onPropertyRemove;
2904
+ $[23] = properties;
2905
+ $[24] = propertiesOrder;
2906
+ $[25] = selectedPropertyKey;
2907
+ $[26] = t7;
2908
+ } else {
2909
+ t7 = $[26];
2910
+ }
2911
+ let t8;
2912
+ if ($[27] !== className || $[28] !== t7) {
2913
+ t8 = /* @__PURE__ */ jsx("div", { className, children: t7 });
2914
+ $[27] = className;
2915
+ $[28] = t7;
2916
+ $[29] = t8;
2917
+ } else {
2918
+ t8 = $[29];
2919
+ }
2920
+ let t9;
2921
+ if ($[30] !== items || $[31] !== t8) {
2922
+ t9 = /* @__PURE__ */ jsx(SortableContext, { items, strategy: verticalListSortingStrategy, children: t8 });
2923
+ $[30] = items;
2924
+ $[31] = t8;
2925
+ $[32] = t9;
2926
+ } else {
2927
+ t9 = $[32];
2928
+ }
2929
+ let t10;
2930
+ if ($[33] !== handleDragEnd || $[34] !== sensors || $[35] !== t9) {
2931
+ t10 = /* @__PURE__ */ jsx(DndContext, { sensors, collisionDetection: closestCenter, onDragEnd: handleDragEnd, modifiers: t6, children: t9 });
2932
+ $[33] = handleDragEnd;
2933
+ $[34] = sensors;
2934
+ $[35] = t9;
2935
+ $[36] = t10;
2936
+ } else {
2937
+ t10 = $[36];
2938
+ }
2939
+ return t10;
2940
+ }, equal);
2796
2941
  function PropertyTreeEntry(t0) {
2797
- const $ = c(53);
2942
+ const $ = c(62);
2798
2943
  const {
2944
+ id,
2799
2945
  propertyKey,
2800
2946
  namespace,
2801
2947
  propertyOrBuilder,
2802
2948
  additionalField,
2803
- provided,
2804
2949
  selectedPropertyKey,
2805
2950
  errors,
2806
2951
  onPropertyClick,
@@ -2810,157 +2955,201 @@ function PropertyTreeEntry(t0) {
2810
2955
  collectionEditable
2811
2956
  } = t0;
2812
2957
  let t1;
2813
- if ($[0] !== inferredPropertyKeys || $[1] !== namespace || $[2] !== propertyKey) {
2814
- t1 = inferredPropertyKeys?.includes(namespace ? `${namespace}.${propertyKey}` : propertyKey);
2815
- $[0] = inferredPropertyKeys;
2816
- $[1] = namespace;
2817
- $[2] = propertyKey;
2818
- $[3] = t1;
2958
+ if ($[0] !== id) {
2959
+ t1 = {
2960
+ id
2961
+ };
2962
+ $[0] = id;
2963
+ $[1] = t1;
2819
2964
  } else {
2820
- t1 = $[3];
2965
+ t1 = $[1];
2821
2966
  }
2822
- const isPropertyInferred = t1;
2967
+ const {
2968
+ attributes,
2969
+ listeners,
2970
+ setNodeRef,
2971
+ transform,
2972
+ transition,
2973
+ isDragging
2974
+ } = useSortable(t1);
2823
2975
  let t2;
2824
- if ($[4] !== namespace || $[5] !== propertyKey) {
2825
- t2 = getFullId(propertyKey, namespace);
2826
- $[4] = namespace;
2827
- $[5] = propertyKey;
2828
- $[6] = t2;
2976
+ if ($[2] !== transform) {
2977
+ t2 = CSS.Translate.toString(transform);
2978
+ $[2] = transform;
2979
+ $[3] = t2;
2829
2980
  } else {
2830
- t2 = $[6];
2981
+ t2 = $[3];
2831
2982
  }
2832
- const fullId = t2;
2983
+ const t3 = isDragging ? 10 : void 0;
2984
+ let t4;
2985
+ if ($[4] !== t2 || $[5] !== t3 || $[6] !== transition) {
2986
+ t4 = {
2987
+ transform: t2,
2988
+ transition,
2989
+ zIndex: t3,
2990
+ position: "relative"
2991
+ };
2992
+ $[4] = t2;
2993
+ $[5] = t3;
2994
+ $[6] = transition;
2995
+ $[7] = t4;
2996
+ } else {
2997
+ t4 = $[7];
2998
+ }
2999
+ const style = t4;
3000
+ let t5;
3001
+ if ($[8] !== inferredPropertyKeys || $[9] !== namespace || $[10] !== propertyKey) {
3002
+ t5 = inferredPropertyKeys?.includes(namespace ? `${namespace}.${propertyKey}` : propertyKey);
3003
+ $[8] = inferredPropertyKeys;
3004
+ $[9] = namespace;
3005
+ $[10] = propertyKey;
3006
+ $[11] = t5;
3007
+ } else {
3008
+ t5 = $[11];
3009
+ }
3010
+ const isPropertyInferred = t5;
3011
+ const fullId = id;
2833
3012
  const fullIdPath = getFullIdPath(propertyKey, namespace);
2834
3013
  const hasError = fullIdPath in errors;
2835
3014
  let subtree;
2836
3015
  if (typeof propertyOrBuilder === "object") {
2837
3016
  const property = propertyOrBuilder;
2838
3017
  if (property.dataType === "map" && property.properties) {
2839
- let t32;
2840
- if ($[7] !== collectionEditable || $[8] !== errors || $[9] !== fullId || $[10] !== onPropertyClick || $[11] !== onPropertyMove || $[12] !== onPropertyRemove || $[13] !== property.properties || $[14] !== property.propertiesOrder || $[15] !== selectedPropertyKey) {
2841
- t32 = /* @__PURE__ */ jsx(PropertyTree, { selectedPropertyKey, namespace: fullId, properties: property.properties, propertiesOrder: property.propertiesOrder, errors, onPropertyClick, onPropertyMove, onPropertyRemove, collectionEditable });
2842
- $[7] = collectionEditable;
2843
- $[8] = errors;
2844
- $[9] = fullId;
2845
- $[10] = onPropertyClick;
2846
- $[11] = onPropertyMove;
2847
- $[12] = onPropertyRemove;
2848
- $[13] = property.properties;
2849
- $[14] = property.propertiesOrder;
2850
- $[15] = selectedPropertyKey;
2851
- $[16] = t32;
3018
+ let t62;
3019
+ if ($[12] !== collectionEditable || $[13] !== errors || $[14] !== fullId || $[15] !== onPropertyClick || $[16] !== onPropertyMove || $[17] !== onPropertyRemove || $[18] !== property.properties || $[19] !== property.propertiesOrder || $[20] !== selectedPropertyKey) {
3020
+ t62 = /* @__PURE__ */ jsx(PropertyTree, { selectedPropertyKey, namespace: fullId, properties: property.properties, propertiesOrder: property.propertiesOrder, errors, onPropertyClick, onPropertyMove, onPropertyRemove, collectionEditable });
3021
+ $[12] = collectionEditable;
3022
+ $[13] = errors;
3023
+ $[14] = fullId;
3024
+ $[15] = onPropertyClick;
3025
+ $[16] = onPropertyMove;
3026
+ $[17] = onPropertyRemove;
3027
+ $[18] = property.properties;
3028
+ $[19] = property.propertiesOrder;
3029
+ $[20] = selectedPropertyKey;
3030
+ $[21] = t62;
2852
3031
  } else {
2853
- t32 = $[16];
3032
+ t62 = $[21];
2854
3033
  }
2855
- subtree = t32;
3034
+ subtree = t62;
2856
3035
  }
2857
3036
  }
2858
3037
  const selected = selectedPropertyKey === fullId;
2859
- let t3;
2860
- if ($[17] !== collectionEditable || $[18] !== propertyOrBuilder) {
2861
- t3 = propertyOrBuilder && (collectionEditable && !isPropertyBuilder(propertyOrBuilder) || editableProperty(propertyOrBuilder));
2862
- $[17] = collectionEditable;
2863
- $[18] = propertyOrBuilder;
2864
- $[19] = t3;
3038
+ let t6;
3039
+ if ($[22] !== collectionEditable || $[23] !== propertyOrBuilder) {
3040
+ t6 = propertyOrBuilder && (collectionEditable && !isPropertyBuilder(propertyOrBuilder) || editableProperty(propertyOrBuilder));
3041
+ $[22] = collectionEditable;
3042
+ $[23] = propertyOrBuilder;
3043
+ $[24] = t6;
2865
3044
  } else {
2866
- t3 = $[19];
3045
+ t6 = $[24];
2867
3046
  }
2868
- const editable = t3;
2869
- let t4;
2870
- if ($[20] !== subtree) {
2871
- t4 = subtree && /* @__PURE__ */ jsx("div", { className: "absolute border-l " + defaultBorderMixin, style: {
3047
+ const editable = t6;
3048
+ let t7;
3049
+ if ($[25] !== subtree) {
3050
+ t7 = subtree && /* @__PURE__ */ jsx("div", { className: "absolute border-l " + defaultBorderMixin, style: {
2872
3051
  left: "32px",
2873
3052
  top: "64px",
2874
3053
  bottom: "16px"
2875
3054
  } });
2876
- $[20] = subtree;
2877
- $[21] = t4;
3055
+ $[25] = subtree;
3056
+ $[26] = t7;
2878
3057
  } else {
2879
- t4 = $[21];
3058
+ t7 = $[26];
2880
3059
  }
2881
- let t5;
2882
- if ($[22] !== additionalField || $[23] !== editable || $[24] !== hasError || $[25] !== namespace || $[26] !== onPropertyClick || $[27] !== propertyKey || $[28] !== propertyOrBuilder || $[29] !== selected) {
2883
- t5 = !isPropertyBuilder(propertyOrBuilder) && !additionalField && editable ? /* @__PURE__ */ jsx(PropertyFieldPreview, { property: propertyOrBuilder, onClick: onPropertyClick ? () => onPropertyClick(propertyKey, namespace) : void 0, includeName: true, selected, hasError }) : /* @__PURE__ */ jsx(NonEditablePropertyPreview, { name: propertyKey, property: propertyOrBuilder, onClick: onPropertyClick ? () => onPropertyClick(propertyKey, namespace) : void 0, selected });
2884
- $[22] = additionalField;
2885
- $[23] = editable;
2886
- $[24] = hasError;
2887
- $[25] = namespace;
2888
- $[26] = onPropertyClick;
2889
- $[27] = propertyKey;
2890
- $[28] = propertyOrBuilder;
2891
- $[29] = selected;
2892
- $[30] = t5;
2893
- } else {
2894
- t5 = $[30];
3060
+ let t8;
3061
+ if ($[27] !== additionalField || $[28] !== editable || $[29] !== hasError || $[30] !== namespace || $[31] !== onPropertyClick || $[32] !== propertyKey || $[33] !== propertyOrBuilder || $[34] !== selected) {
3062
+ t8 = /* @__PURE__ */ jsx("div", { children: !isPropertyBuilder(propertyOrBuilder) && !additionalField && editable ? /* @__PURE__ */ jsx(PropertyFieldPreview, { property: propertyOrBuilder, onClick: onPropertyClick ? () => onPropertyClick(propertyKey, namespace) : void 0, includeName: true, selected, hasError }) : /* @__PURE__ */ jsx(NonEditablePropertyPreview, { name: propertyKey, property: propertyOrBuilder, onClick: onPropertyClick ? () => onPropertyClick(propertyKey, namespace) : void 0, selected }) });
3063
+ $[27] = additionalField;
3064
+ $[28] = editable;
3065
+ $[29] = hasError;
3066
+ $[30] = namespace;
3067
+ $[31] = onPropertyClick;
3068
+ $[32] = propertyKey;
3069
+ $[33] = propertyOrBuilder;
3070
+ $[34] = selected;
3071
+ $[35] = t8;
3072
+ } else {
3073
+ t8 = $[35];
2895
3074
  }
2896
- let t6;
2897
- if ($[31] !== isPropertyInferred) {
2898
- t6 = isPropertyInferred && /* @__PURE__ */ jsx(Tooltip, { title: "Inferred property", children: /* @__PURE__ */ jsx(AutorenewIcon, { size: "small", className: "p-2" }) });
2899
- $[31] = isPropertyInferred;
2900
- $[32] = t6;
3075
+ let t9;
3076
+ if ($[36] !== isPropertyInferred) {
3077
+ t9 = isPropertyInferred && /* @__PURE__ */ jsx(Tooltip, { title: "Inferred property", children: /* @__PURE__ */ jsx(AutorenewIcon, { size: "small", className: "p-2" }) });
3078
+ $[36] = isPropertyInferred;
3079
+ $[37] = t9;
2901
3080
  } else {
2902
- t6 = $[32];
3081
+ t9 = $[37];
2903
3082
  }
2904
- let t7;
2905
- if ($[33] !== namespace || $[34] !== onPropertyRemove || $[35] !== propertyKey) {
2906
- t7 = onPropertyRemove && /* @__PURE__ */ jsx(Tooltip, { title: "Remove", asChild: true, children: /* @__PURE__ */ jsx(IconButton, { size: "small", color: "inherit", onClick: () => onPropertyRemove(propertyKey, namespace), children: /* @__PURE__ */ jsx(RemoveIcon, { size: "small" }) }) });
2907
- $[33] = namespace;
2908
- $[34] = onPropertyRemove;
2909
- $[35] = propertyKey;
2910
- $[36] = t7;
3083
+ let t10;
3084
+ if ($[38] !== isPropertyInferred || $[39] !== namespace || $[40] !== onPropertyRemove || $[41] !== propertyKey) {
3085
+ t10 = onPropertyRemove && !isPropertyInferred && /* @__PURE__ */ jsx(Tooltip, { title: "Remove", asChild: true, children: /* @__PURE__ */ jsx(IconButton, { size: "small", color: "inherit", onClick: () => onPropertyRemove(propertyKey, namespace), children: /* @__PURE__ */ jsx(RemoveIcon, { size: "small" }) }) });
3086
+ $[38] = isPropertyInferred;
3087
+ $[39] = namespace;
3088
+ $[40] = onPropertyRemove;
3089
+ $[41] = propertyKey;
3090
+ $[42] = t10;
2911
3091
  } else {
2912
- t7 = $[36];
3092
+ t10 = $[42];
2913
3093
  }
2914
- let t8;
2915
- if ($[37] !== onPropertyMove) {
2916
- t8 = onPropertyMove && /* @__PURE__ */ jsx(Tooltip, { title: "Move", asChild: true, children: /* @__PURE__ */ jsx(IconButton, { component: "span", size: "small", children: /* @__PURE__ */ jsx(DragHandleIcon, { size: "small" }) }) });
2917
- $[37] = onPropertyMove;
2918
- $[38] = t8;
3094
+ let t11;
3095
+ if ($[43] !== attributes || $[44] !== listeners || $[45] !== onPropertyMove) {
3096
+ t11 = onPropertyMove && /* @__PURE__ */ jsx(Tooltip, { title: "Move", asChild: true, children: /* @__PURE__ */ jsx(IconButton, { component: "span", size: "small", ...attributes, ...listeners, children: /* @__PURE__ */ jsx(DragHandleIcon, { size: "small" }) }) });
3097
+ $[43] = attributes;
3098
+ $[44] = listeners;
3099
+ $[45] = onPropertyMove;
3100
+ $[46] = t11;
2919
3101
  } else {
2920
- t8 = $[38];
3102
+ t11 = $[46];
2921
3103
  }
2922
- let t9;
2923
- if ($[39] !== t6 || $[40] !== t7 || $[41] !== t8) {
2924
- t9 = /* @__PURE__ */ jsxs("div", { className: "absolute top-2 right-2 flex flex-row ", children: [
2925
- t6,
2926
- t7,
2927
- t8
3104
+ let t12;
3105
+ if ($[47] !== t10 || $[48] !== t11 || $[49] !== t9) {
3106
+ t12 = /* @__PURE__ */ jsxs("div", { className: "absolute top-2 right-2 flex flex-row", children: [
3107
+ t9,
3108
+ t10,
3109
+ t11
2928
3110
  ] });
2929
- $[39] = t6;
2930
- $[40] = t7;
2931
- $[41] = t8;
2932
- $[42] = t9;
3111
+ $[47] = t10;
3112
+ $[48] = t11;
3113
+ $[49] = t9;
3114
+ $[50] = t12;
2933
3115
  } else {
2934
- t9 = $[42];
3116
+ t12 = $[50];
2935
3117
  }
2936
- let t10;
2937
- if ($[43] !== subtree) {
2938
- t10 = subtree && /* @__PURE__ */ jsx("div", { className: "ml-16", children: subtree });
2939
- $[43] = subtree;
2940
- $[44] = t10;
3118
+ let t13;
3119
+ if ($[51] !== subtree) {
3120
+ t13 = subtree && /* @__PURE__ */ jsx("div", { className: "ml-16", children: subtree });
3121
+ $[51] = subtree;
3122
+ $[52] = t13;
2941
3123
  } else {
2942
- t10 = $[44];
3124
+ t13 = $[52];
2943
3125
  }
2944
- let t11;
2945
- if ($[45] !== provided.dragHandleProps || $[46] !== provided.draggableProps || $[47] !== provided.innerRef || $[48] !== t10 || $[49] !== t4 || $[50] !== t5 || $[51] !== t9) {
2946
- t11 = /* @__PURE__ */ jsxs("div", { ref: provided.innerRef, ...provided.draggableProps, ...provided.dragHandleProps, className: "relative -ml-8", children: [
2947
- t4,
2948
- t5,
2949
- t9,
2950
- t10
3126
+ let t14;
3127
+ if ($[53] !== t12 || $[54] !== t13 || $[55] !== t7 || $[56] !== t8) {
3128
+ t14 = /* @__PURE__ */ jsxs("div", { className: "relative", children: [
3129
+ t7,
3130
+ t8,
3131
+ t12,
3132
+ t13
2951
3133
  ] });
2952
- $[45] = provided.dragHandleProps;
2953
- $[46] = provided.draggableProps;
2954
- $[47] = provided.innerRef;
2955
- $[48] = t10;
2956
- $[49] = t4;
2957
- $[50] = t5;
2958
- $[51] = t9;
2959
- $[52] = t11;
3134
+ $[53] = t12;
3135
+ $[54] = t13;
3136
+ $[55] = t7;
3137
+ $[56] = t8;
3138
+ $[57] = t14;
2960
3139
  } else {
2961
- t11 = $[52];
3140
+ t14 = $[57];
2962
3141
  }
2963
- return t11;
3142
+ let t15;
3143
+ if ($[58] !== setNodeRef || $[59] !== style || $[60] !== t14) {
3144
+ t15 = /* @__PURE__ */ jsx("div", { ref: setNodeRef, style, className: "relative -ml-8", children: t14 });
3145
+ $[58] = setNodeRef;
3146
+ $[59] = style;
3147
+ $[60] = t14;
3148
+ $[61] = t15;
3149
+ } else {
3150
+ t15 = $[61];
3151
+ }
3152
+ return t15;
2964
3153
  }
2965
3154
  function MapPropertyField(t0) {
2966
3155
  const $ = c(67);
@@ -3174,7 +3363,7 @@ function MapPropertyField(t0) {
3174
3363
  const t19 = values.spreadChildren ?? false;
3175
3364
  let t20;
3176
3365
  if ($[40] !== t18 || $[41] !== t19) {
3177
- t20 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "small", label: "Spread children as columns", onValueChange: t18, value: t19 });
3366
+ t20 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "medium", label: "Spread children as columns", onValueChange: t18, value: t19 });
3178
3367
  $[40] = t18;
3179
3368
  $[41] = t19;
3180
3369
  $[42] = t20;
@@ -4646,7 +4835,7 @@ function AdvancedPropertyValidation(t0) {
4646
4835
  field,
4647
4836
  form
4648
4837
  } = t22;
4649
- return /* @__PURE__ */ jsx(SwitchControl, { label: "Hide from collection", disabled, form, tooltip: "Hide this field from the collection view. It will still be visible in the form view", field });
4838
+ return /* @__PURE__ */ jsx(SwitchControl, { label: "Hide from collection", size: "medium", disabled, form, tooltip: "Hide this field from the collection view. It will still be visible in the form view", field });
4650
4839
  } }) });
4651
4840
  $[0] = disabled;
4652
4841
  $[1] = t1;
@@ -4660,7 +4849,7 @@ function AdvancedPropertyValidation(t0) {
4660
4849
  field: field_0,
4661
4850
  form: form_0
4662
4851
  } = t32;
4663
- return /* @__PURE__ */ jsx(SwitchControl, { label: "Read only", disabled, tooltip: "Is this a read only field. Display only as a preview", form: form_0, field: field_0 });
4852
+ return /* @__PURE__ */ jsx(SwitchControl, { label: "Read only", size: "medium", disabled, tooltip: "Is this a read only field. Display only as a preview", form: form_0, field: field_0 });
4664
4853
  } }) });
4665
4854
  $[2] = disabled;
4666
4855
  $[3] = t2;
@@ -5793,7 +5982,7 @@ function PropertyEditFormFields(t0) {
5793
5982
  let t6;
5794
5983
  if ($[14] !== errors || $[15] !== onError || $[16] !== propertyNamespace || $[17] !== values?.id) {
5795
5984
  t6 = () => {
5796
- if (values?.id && onError && !isEmptyObject(errors)) {
5985
+ if (values?.id && onError) {
5797
5986
  onError(values?.id, propertyNamespace, errors);
5798
5987
  }
5799
5988
  };
@@ -6970,8 +7159,8 @@ function CollectionPropertiesEditorForm({
6970
7159
  setSelectedPropertyKey(propertyKey_2);
6971
7160
  setSelectedPropertyNamespace(namespace_5);
6972
7161
  };
6973
- const body = /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-12 gap-2 h-full bg-surface-50 dark:bg-surface-900", children: [
6974
- /* @__PURE__ */ jsxs("div", { className: cls("p-4 md:p-8 pb-20 md:pb-20", "col-span-12 lg:col-span-5 h-full overflow-auto", !asDialog && "border-r " + defaultBorderMixin), children: [
7162
+ const body = /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-12 gap-2 h-full bg-white dark:bg-surface-950", children: [
7163
+ /* @__PURE__ */ jsxs("div", { className: cls("bg-surface-50 dark:bg-surface-900", "p-4 md:p-8 pb-20 md:pb-20", "col-span-12 lg:col-span-5 h-full overflow-auto", !asDialog && "border-r " + defaultBorderMixin), children: [
6975
7164
  /* @__PURE__ */ jsxs("div", { className: "flex my-2", children: [
6976
7165
  /* @__PURE__ */ jsxs("div", { className: "flex-grow mb-4", children: [
6977
7166
  /* @__PURE__ */ jsx(Field, { name: "name", as: DebouncedTextField, invisible: true, className: "-ml-1", inputClassName: "text-2xl font-headers", placeholder: "Collection name", size: "small", required: true, error: Boolean(errors?.name) }),
@@ -6990,7 +7179,7 @@ function CollectionPropertiesEditorForm({
6990
7179
  /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(PropertyTree, { className: "pl-8", inferredPropertyKeys, selectedPropertyKey: selectedPropertyKey ? getFullId(selectedPropertyKey, selectedPropertyNamespace) : void 0, properties: values.properties, additionalFields: values.additionalFields, propertiesOrder: usedPropertiesOrder, onPropertyClick, onPropertyMove, onPropertyRemove: isNewCollection ? deleteProperty : void 0, collectionEditable, errors }) }),
6991
7180
  /* @__PURE__ */ jsx(Button, { className: "mt-8 w-full", color: "primary", variant: "outlined", size: "large", onClick: () => setNewPropertyDialogOpen(true), startIcon: /* @__PURE__ */ jsx(AddIcon, {}), children: "Add new property" })
6992
7181
  ] }),
6993
- !asDialog && /* @__PURE__ */ jsx("div", { className: "col-span-12 lg:col-span-7 p-4 md:py-8 md:px-4 h-full overflow-auto pb-20 md:pb-20", children: /* @__PURE__ */ jsxs(Paper, { className: "sticky top-8 p-4 min-h-full border border-transparent w-full flex flex-col justify-center ", children: [
7182
+ !asDialog && /* @__PURE__ */ jsx("div", { className: "col-span-12 lg:col-span-7 p-4 md:py-8 md:px-4 h-full overflow-auto pb-20 md:pb-20", children: /* @__PURE__ */ jsxs("div", { className: "sticky top-8 min-h-full w-full flex flex-col justify-center", children: [
6994
7183
  selectedPropertyFullId && selectedProperty && !isPropertyBuilder(selectedProperty) && /* @__PURE__ */ jsx(PropertyForm, { inArray: false, existingProperty: !isNewCollection, autoUpdateId: false, allowDataInference: !isNewCollection, autoOpenTypeSelect: false, propertyKey: selectedPropertyKey, propertyNamespace: selectedPropertyNamespace, property: selectedProperty, onPropertyChanged, onDelete: deleteProperty, onError: onPropertyErrorInternal, forceShowErrors: showErrors, initialErrors, getData, propertyConfigs, collectionEditable }, `edit_view_${selectedPropertyIndex}`),
6995
7184
  !selectedProperty && /* @__PURE__ */ jsxs("div", { className: "w-full flex flex-col items-center justify-center h-full gap-4", children: [
6996
7185
  /* @__PURE__ */ jsx(Typography, { variant: "label", className: "", children: emptyCollection ? "Now you can add your first property" : "Select a property to edit it" }),
@@ -8065,7 +8254,7 @@ const pagesCollectionTemplate = {
8065
8254
  }
8066
8255
  };
8067
8256
  function CollectionEditorWelcomeView(t0) {
8068
- const $ = c(56);
8257
+ const $ = c(52);
8069
8258
  const {
8070
8259
  path,
8071
8260
  pathSuggestions,
@@ -8102,6 +8291,10 @@ function CollectionEditorWelcomeView(t0) {
8102
8291
  setFieldValue,
8103
8292
  setValues
8104
8293
  } = useFormex();
8294
+ const noSuggestions = !loadingPathSuggestions && (filteredPathSuggestions ?? [])?.length === 0;
8295
+ if (!noSuggestions) {
8296
+ return null;
8297
+ }
8105
8298
  let t3;
8106
8299
  if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
8107
8300
  t3 = /* @__PURE__ */ jsx("div", { className: "flex flex-row py-2 pt-3 items-center", children: /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "flex-grow", children: "New collection" }) });
@@ -8153,173 +8346,162 @@ function CollectionEditorWelcomeView(t0) {
8153
8346
  t7 = $[15];
8154
8347
  }
8155
8348
  let t8;
8156
- if ($[16] !== filteredPathSuggestions || $[17] !== loadingPathSuggestions) {
8157
- t8 = !loadingPathSuggestions && (filteredPathSuggestions ?? [])?.length === 0 && /* @__PURE__ */ jsx(Typography, { variant: "caption", children: "No suggestions" });
8158
- $[16] = filteredPathSuggestions;
8159
- $[17] = loadingPathSuggestions;
8160
- $[18] = t8;
8161
- } else {
8162
- t8 = $[18];
8163
- }
8164
- let t9;
8165
- if ($[19] !== t6 || $[20] !== t7 || $[21] !== t8) {
8166
- t9 = /* @__PURE__ */ jsxs("div", { className: "my-2", children: [
8349
+ if ($[16] !== t6 || $[17] !== t7) {
8350
+ t8 = /* @__PURE__ */ jsxs("div", { className: "my-2", children: [
8167
8351
  t5,
8168
8352
  /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-x-2 gap-y-1 items-center my-2 min-h-7", children: [
8169
8353
  t6,
8170
- t7,
8171
- t8
8354
+ t7
8172
8355
  ] })
8173
8356
  ] });
8174
- $[19] = t6;
8175
- $[20] = t7;
8176
- $[21] = t8;
8177
- $[22] = t9;
8357
+ $[16] = t6;
8358
+ $[17] = t7;
8359
+ $[18] = t8;
8178
8360
  } else {
8179
- t9 = $[22];
8361
+ t8 = $[18];
8362
+ }
8363
+ let t9;
8364
+ if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
8365
+ t9 = /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "● Select a template:" });
8366
+ $[19] = t9;
8367
+ } else {
8368
+ t9 = $[19];
8180
8369
  }
8181
8370
  let t10;
8182
- if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
8183
- t10 = /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "● Select a template:" });
8184
- $[23] = t10;
8371
+ if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
8372
+ t10 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: productsCollectionTemplate.icon });
8373
+ $[20] = t10;
8185
8374
  } else {
8186
- t10 = $[23];
8375
+ t10 = $[20];
8187
8376
  }
8188
8377
  let t11;
8189
- if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
8190
- t11 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: productsCollectionTemplate.icon });
8191
- $[24] = t11;
8378
+ if ($[21] !== onContinue || $[22] !== setValues) {
8379
+ t11 = /* @__PURE__ */ jsx(TemplateButton, { title: "Products", subtitle: "A collection of products with images, prices and stock", icon: t10, onClick: () => {
8380
+ setValues(productsCollectionTemplate);
8381
+ onContinue();
8382
+ } });
8383
+ $[21] = onContinue;
8384
+ $[22] = setValues;
8385
+ $[23] = t11;
8192
8386
  } else {
8193
- t11 = $[24];
8387
+ t11 = $[23];
8194
8388
  }
8195
8389
  let t12;
8390
+ if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
8391
+ t12 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: usersCollectionTemplate.icon });
8392
+ $[24] = t12;
8393
+ } else {
8394
+ t12 = $[24];
8395
+ }
8396
+ let t13;
8196
8397
  if ($[25] !== onContinue || $[26] !== setValues) {
8197
- t12 = /* @__PURE__ */ jsx(TemplateButton, { title: "Products", subtitle: "A collection of products with images, prices and stock", icon: t11, onClick: () => {
8198
- setValues(productsCollectionTemplate);
8398
+ t13 = /* @__PURE__ */ jsx(TemplateButton, { title: "Users", subtitle: "A collection of users with emails, names and roles", icon: t12, onClick: () => {
8399
+ setValues(usersCollectionTemplate);
8199
8400
  onContinue();
8200
8401
  } });
8201
8402
  $[25] = onContinue;
8202
8403
  $[26] = setValues;
8203
- $[27] = t12;
8404
+ $[27] = t13;
8204
8405
  } else {
8205
- t12 = $[27];
8406
+ t13 = $[27];
8206
8407
  }
8207
- let t13;
8408
+ let t14;
8208
8409
  if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
8209
- t13 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: usersCollectionTemplate.icon });
8210
- $[28] = t13;
8410
+ t14 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: blogCollectionTemplate.icon });
8411
+ $[28] = t14;
8211
8412
  } else {
8212
- t13 = $[28];
8413
+ t14 = $[28];
8213
8414
  }
8214
- let t14;
8415
+ let t15;
8215
8416
  if ($[29] !== onContinue || $[30] !== setValues) {
8216
- t14 = /* @__PURE__ */ jsx(TemplateButton, { title: "Users", subtitle: "A collection of users with emails, names and roles", icon: t13, onClick: () => {
8217
- setValues(usersCollectionTemplate);
8417
+ t15 = /* @__PURE__ */ jsx(TemplateButton, { title: "Blog posts", subtitle: "A collection of blog posts with images, authors and complex content", icon: t14, onClick: () => {
8418
+ setValues(blogCollectionTemplate);
8218
8419
  onContinue();
8219
8420
  } });
8220
8421
  $[29] = onContinue;
8221
8422
  $[30] = setValues;
8222
- $[31] = t14;
8423
+ $[31] = t15;
8223
8424
  } else {
8224
- t14 = $[31];
8425
+ t15 = $[31];
8225
8426
  }
8226
- let t15;
8427
+ let t16;
8227
8428
  if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
8228
- t15 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: blogCollectionTemplate.icon });
8229
- $[32] = t15;
8429
+ t16 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: pagesCollectionTemplate.icon });
8430
+ $[32] = t16;
8230
8431
  } else {
8231
- t15 = $[32];
8432
+ t16 = $[32];
8232
8433
  }
8233
- let t16;
8434
+ let t17;
8234
8435
  if ($[33] !== onContinue || $[34] !== setValues) {
8235
- t16 = /* @__PURE__ */ jsx(TemplateButton, { title: "Blog posts", subtitle: "A collection of blog posts with images, authors and complex content", icon: t15, onClick: () => {
8236
- setValues(blogCollectionTemplate);
8436
+ t17 = /* @__PURE__ */ jsx(TemplateButton, { title: "Pages", subtitle: "A collection of pages with images, authors and complex content", icon: t16, onClick: () => {
8437
+ setValues(pagesCollectionTemplate);
8237
8438
  onContinue();
8238
8439
  } });
8239
8440
  $[33] = onContinue;
8240
8441
  $[34] = setValues;
8241
- $[35] = t16;
8242
- } else {
8243
- t16 = $[35];
8244
- }
8245
- let t17;
8246
- if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
8247
- t17 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: pagesCollectionTemplate.icon });
8248
- $[36] = t17;
8442
+ $[35] = t17;
8249
8443
  } else {
8250
- t17 = $[36];
8444
+ t17 = $[35];
8251
8445
  }
8252
8446
  let t18;
8253
- if ($[37] !== onContinue || $[38] !== setValues) {
8254
- t18 = /* @__PURE__ */ jsx(TemplateButton, { title: "Pages", subtitle: "A collection of pages with images, authors and complex content", icon: t17, onClick: () => {
8255
- setValues(pagesCollectionTemplate);
8256
- onContinue();
8257
- } });
8258
- $[37] = onContinue;
8259
- $[38] = setValues;
8260
- $[39] = t18;
8261
- } else {
8262
- t18 = $[39];
8263
- }
8264
- let t19;
8265
- if ($[40] !== t12 || $[41] !== t14 || $[42] !== t16 || $[43] !== t18) {
8266
- t19 = /* @__PURE__ */ jsxs("div", { className: "my-2", children: [
8267
- t10,
8447
+ if ($[36] !== t11 || $[37] !== t13 || $[38] !== t15 || $[39] !== t17) {
8448
+ t18 = /* @__PURE__ */ jsxs("div", { className: "my-2", children: [
8449
+ t9,
8268
8450
  /* @__PURE__ */ jsxs("div", { className: "flex gap-4", children: [
8269
- t12,
8270
- t14,
8271
- t16,
8272
- t18
8451
+ t11,
8452
+ t13,
8453
+ t15,
8454
+ t17
8273
8455
  ] })
8274
8456
  ] });
8275
- $[40] = t12;
8276
- $[41] = t14;
8277
- $[42] = t16;
8278
- $[43] = t18;
8279
- $[44] = t19;
8457
+ $[36] = t11;
8458
+ $[37] = t13;
8459
+ $[38] = t15;
8460
+ $[39] = t17;
8461
+ $[40] = t18;
8280
8462
  } else {
8281
- t19 = $[44];
8463
+ t18 = $[40];
8282
8464
  }
8283
- let t20;
8284
- if ($[45] !== onContinue || $[46] !== parentCollection) {
8285
- t20 = !parentCollection && /* @__PURE__ */ jsxs("div", { children: [
8465
+ let t19;
8466
+ if ($[41] !== onContinue || $[42] !== parentCollection) {
8467
+ t19 = !parentCollection && /* @__PURE__ */ jsxs("div", { children: [
8286
8468
  /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", className: "mb-2", children: "● Create a collection from a file (csv, json, xls, xslx...)" }),
8287
8469
  /* @__PURE__ */ jsx(ImportFileUpload, { onDataAdded: (data, propertiesOrder) => onContinue(data, propertiesOrder) })
8288
8470
  ] });
8289
- $[45] = onContinue;
8290
- $[46] = parentCollection;
8291
- $[47] = t20;
8471
+ $[41] = onContinue;
8472
+ $[42] = parentCollection;
8473
+ $[43] = t19;
8292
8474
  } else {
8293
- t20 = $[47];
8475
+ t19 = $[43];
8294
8476
  }
8295
- let t21;
8296
- if ($[48] !== onContinue) {
8297
- t21 = /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Button, { variant: "text", onClick: () => onContinue(), className: "my-2", children: "Continue from scratch" }) });
8298
- $[48] = onContinue;
8299
- $[49] = t21;
8477
+ let t20;
8478
+ if ($[44] !== onContinue) {
8479
+ t20 = /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Button, { variant: "text", onClick: () => onContinue(), className: "my-2", children: "Continue from scratch" }) });
8480
+ $[44] = onContinue;
8481
+ $[45] = t20;
8300
8482
  } else {
8301
- t21 = $[49];
8483
+ t20 = $[45];
8302
8484
  }
8303
- let t22;
8304
- if ($[50] !== t19 || $[51] !== t20 || $[52] !== t21 || $[53] !== t4 || $[54] !== t9) {
8305
- t22 = /* @__PURE__ */ jsx("div", { className: "overflow-auto my-auto", children: /* @__PURE__ */ jsxs(Container, { maxWidth: "4xl", className: "flex flex-col gap-4 p-8 m-auto", children: [
8485
+ let t21;
8486
+ if ($[46] !== t18 || $[47] !== t19 || $[48] !== t20 || $[49] !== t4 || $[50] !== t8) {
8487
+ t21 = /* @__PURE__ */ jsx("div", { className: "overflow-auto my-auto", children: /* @__PURE__ */ jsxs(Container, { maxWidth: "4xl", className: "flex flex-col gap-4 p-8 m-auto", children: [
8306
8488
  t3,
8307
8489
  t4,
8308
- t9,
8490
+ t8,
8491
+ t18,
8309
8492
  t19,
8310
- t20,
8311
- t21
8493
+ t20
8312
8494
  ] }) });
8313
- $[50] = t19;
8314
- $[51] = t20;
8315
- $[52] = t21;
8316
- $[53] = t4;
8317
- $[54] = t9;
8318
- $[55] = t22;
8495
+ $[46] = t18;
8496
+ $[47] = t19;
8497
+ $[48] = t20;
8498
+ $[49] = t4;
8499
+ $[50] = t8;
8500
+ $[51] = t21;
8319
8501
  } else {
8320
- t22 = $[55];
8502
+ t21 = $[51];
8321
8503
  }
8322
- return t22;
8504
+ return t21;
8323
8505
  }
8324
8506
  function TemplateButton(t0) {
8325
8507
  const $ = c(10);
@@ -9533,7 +9715,7 @@ const validateId = (value, isNewCollection, existingPaths, existingIds) => {
9533
9715
  const ConfigControllerContext = React__default.createContext({});
9534
9716
  const CollectionEditorContext = React__default.createContext({});
9535
9717
  const ConfigControllerProvider = React__default.memo(function ConfigControllerProvider2(t0) {
9536
- const $ = c(67);
9718
+ const $ = c(65);
9537
9719
  const {
9538
9720
  children,
9539
9721
  collectionConfigController,
@@ -9541,7 +9723,6 @@ const ConfigControllerProvider = React__default.memo(function ConfigControllerPr
9541
9723
  reservedGroups,
9542
9724
  collectionInference,
9543
9725
  extraView,
9544
- getPathSuggestions,
9545
9726
  getUser,
9546
9727
  getData,
9547
9728
  onAnalyticsEvent
@@ -9662,26 +9843,24 @@ const ConfigControllerProvider = React__default.memo(function ConfigControllerPr
9662
9843
  const createCollection = t3;
9663
9844
  const t4 = configPermissions ?? defaultConfigPermissions;
9664
9845
  let t5;
9665
- if ($[6] !== createCollection || $[7] !== editCollection || $[8] !== editProperty || $[9] !== getPathSuggestions || $[10] !== t4) {
9846
+ if ($[6] !== createCollection || $[7] !== editCollection || $[8] !== editProperty || $[9] !== t4) {
9666
9847
  t5 = {
9667
9848
  editCollection,
9668
9849
  createCollection,
9669
9850
  editProperty,
9670
- configPermissions: t4,
9671
- getPathSuggestions
9851
+ configPermissions: t4
9672
9852
  };
9673
9853
  $[6] = createCollection;
9674
9854
  $[7] = editCollection;
9675
9855
  $[8] = editProperty;
9676
- $[9] = getPathSuggestions;
9677
- $[10] = t4;
9678
- $[11] = t5;
9856
+ $[9] = t4;
9857
+ $[10] = t5;
9679
9858
  } else {
9680
- t5 = $[11];
9859
+ t5 = $[10];
9681
9860
  }
9682
9861
  const t6 = Boolean(currentDialog);
9683
9862
  let t7;
9684
- if ($[12] !== currentDialog || $[13] !== navigate || $[14] !== navigation) {
9863
+ if ($[11] !== currentDialog || $[12] !== navigate || $[13] !== navigation) {
9685
9864
  t7 = (collection_0) => {
9686
9865
  if (currentDialog?.redirect) {
9687
9866
  if (collection_0 && currentDialog?.isNewCollection && !currentDialog.parentCollectionIds.length) {
@@ -9691,29 +9870,28 @@ const ConfigControllerProvider = React__default.memo(function ConfigControllerPr
9691
9870
  }
9692
9871
  setCurrentDialog(void 0);
9693
9872
  };
9694
- $[12] = currentDialog;
9695
- $[13] = navigate;
9696
- $[14] = navigation;
9697
- $[15] = t7;
9873
+ $[11] = currentDialog;
9874
+ $[12] = navigate;
9875
+ $[13] = navigation;
9876
+ $[14] = t7;
9698
9877
  } else {
9699
- t7 = $[15];
9878
+ t7 = $[14];
9700
9879
  }
9701
9880
  let t8;
9702
- if ($[16] !== collectionConfigController || $[17] !== collectionInference || $[18] !== currentDialog || $[19] !== extraView || $[20] !== getData || $[21] !== getPathSuggestions || $[22] !== getUser || $[23] !== reservedGroups || $[24] !== t6 || $[25] !== t7) {
9703
- t8 = /* @__PURE__ */ jsx(CollectionEditorDialog, { open: t6, configController: collectionConfigController, isNewCollection: false, collectionInference, ...currentDialog, getData, reservedGroups, extraView, pathSuggestions: getPathSuggestions, getUser, handleClose: t7 });
9704
- $[16] = collectionConfigController;
9705
- $[17] = collectionInference;
9706
- $[18] = currentDialog;
9707
- $[19] = extraView;
9708
- $[20] = getData;
9709
- $[21] = getPathSuggestions;
9710
- $[22] = getUser;
9711
- $[23] = reservedGroups;
9712
- $[24] = t6;
9713
- $[25] = t7;
9714
- $[26] = t8;
9881
+ if ($[15] !== collectionConfigController || $[16] !== collectionInference || $[17] !== currentDialog || $[18] !== extraView || $[19] !== getData || $[20] !== getUser || $[21] !== reservedGroups || $[22] !== t6 || $[23] !== t7) {
9882
+ t8 = /* @__PURE__ */ jsx(CollectionEditorDialog, { open: t6, configController: collectionConfigController, isNewCollection: false, collectionInference, ...currentDialog, getData, reservedGroups, extraView, getUser, handleClose: t7 });
9883
+ $[15] = collectionConfigController;
9884
+ $[16] = collectionInference;
9885
+ $[17] = currentDialog;
9886
+ $[18] = extraView;
9887
+ $[19] = getData;
9888
+ $[20] = getUser;
9889
+ $[21] = reservedGroups;
9890
+ $[22] = t6;
9891
+ $[23] = t7;
9892
+ $[24] = t8;
9715
9893
  } else {
9716
- t8 = $[26];
9894
+ t8 = $[24];
9717
9895
  }
9718
9896
  const t9 = Boolean(currentPropertyDialog);
9719
9897
  const t10 = Boolean(currentPropertyDialog?.propertyKey);
@@ -9721,21 +9899,21 @@ const ConfigControllerProvider = React__default.memo(function ConfigControllerPr
9721
9899
  const t12 = !currentPropertyDialog ? false : !currentPropertyDialog?.propertyKey;
9722
9900
  const t13 = currentPropertyDialog?.collectionEditable ?? false;
9723
9901
  let t14;
9724
- if ($[27] !== currentPropertyDialog || $[28] !== getData || $[29] !== navigation) {
9902
+ if ($[25] !== currentPropertyDialog || $[26] !== getData || $[27] !== navigation) {
9725
9903
  t14 = getData && currentPropertyDialog?.editedCollectionId ? () => {
9726
9904
  console.debug("get data for property", currentPropertyDialog?.editedCollectionId);
9727
9905
  const resolvedPath = navigation.resolveIdsFrom(currentPropertyDialog.editedCollectionId);
9728
9906
  return getData(resolvedPath, []);
9729
9907
  } : void 0;
9730
- $[27] = currentPropertyDialog;
9731
- $[28] = getData;
9732
- $[29] = navigation;
9733
- $[30] = t14;
9908
+ $[25] = currentPropertyDialog;
9909
+ $[26] = getData;
9910
+ $[27] = navigation;
9911
+ $[28] = t14;
9734
9912
  } else {
9735
- t14 = $[30];
9913
+ t14 = $[28];
9736
9914
  }
9737
9915
  let t15;
9738
- if ($[31] !== collectionConfigController || $[32] !== currentPropertyDialog || $[33] !== snackbarController) {
9916
+ if ($[29] !== collectionConfigController || $[30] !== currentPropertyDialog || $[31] !== snackbarController) {
9739
9917
  t15 = (t162) => {
9740
9918
  const {
9741
9919
  id: id_0,
@@ -9764,15 +9942,15 @@ const ConfigControllerProvider = React__default.memo(function ConfigControllerPr
9764
9942
  return false;
9765
9943
  });
9766
9944
  };
9767
- $[31] = collectionConfigController;
9768
- $[32] = currentPropertyDialog;
9769
- $[33] = snackbarController;
9770
- $[34] = t15;
9945
+ $[29] = collectionConfigController;
9946
+ $[30] = currentPropertyDialog;
9947
+ $[31] = snackbarController;
9948
+ $[32] = t15;
9771
9949
  } else {
9772
- t15 = $[34];
9950
+ t15 = $[32];
9773
9951
  }
9774
9952
  let t16;
9775
- if ($[35] !== collectionConfigController || $[36] !== currentPropertyDialog?.currentPropertiesOrder || $[37] !== currentPropertyDialog?.editedCollectionId || $[38] !== currentPropertyDialog?.namespace || $[39] !== currentPropertyDialog?.parentCollectionIds || $[40] !== currentPropertyDialog?.propertyKey || $[41] !== snackbarController) {
9953
+ if ($[33] !== collectionConfigController || $[34] !== currentPropertyDialog?.currentPropertiesOrder || $[35] !== currentPropertyDialog?.editedCollectionId || $[36] !== currentPropertyDialog?.namespace || $[37] !== currentPropertyDialog?.parentCollectionIds || $[38] !== currentPropertyDialog?.propertyKey || $[39] !== snackbarController) {
9776
9954
  t16 = () => {
9777
9955
  if (!currentPropertyDialog?.propertyKey) {
9778
9956
  return;
@@ -9795,21 +9973,21 @@ const ConfigControllerProvider = React__default.memo(function ConfigControllerPr
9795
9973
  return false;
9796
9974
  });
9797
9975
  };
9798
- $[35] = collectionConfigController;
9799
- $[36] = currentPropertyDialog?.currentPropertiesOrder;
9800
- $[37] = currentPropertyDialog?.editedCollectionId;
9801
- $[38] = currentPropertyDialog?.namespace;
9802
- $[39] = currentPropertyDialog?.parentCollectionIds;
9803
- $[40] = currentPropertyDialog?.propertyKey;
9804
- $[41] = snackbarController;
9805
- $[42] = t16;
9976
+ $[33] = collectionConfigController;
9977
+ $[34] = currentPropertyDialog?.currentPropertiesOrder;
9978
+ $[35] = currentPropertyDialog?.editedCollectionId;
9979
+ $[36] = currentPropertyDialog?.namespace;
9980
+ $[37] = currentPropertyDialog?.parentCollectionIds;
9981
+ $[38] = currentPropertyDialog?.propertyKey;
9982
+ $[39] = snackbarController;
9983
+ $[40] = t16;
9806
9984
  } else {
9807
- t16 = $[42];
9985
+ t16 = $[40];
9808
9986
  }
9809
9987
  let t17;
9810
9988
  let t18;
9811
9989
  let t19;
9812
- if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
9990
+ if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
9813
9991
  t17 = () => {
9814
9992
  setCurrentPropertyDialog(void 0);
9815
9993
  };
@@ -9817,64 +9995,64 @@ const ConfigControllerProvider = React__default.memo(function ConfigControllerPr
9817
9995
  setCurrentPropertyDialog(void 0);
9818
9996
  };
9819
9997
  t19 = {};
9820
- $[43] = t17;
9821
- $[44] = t18;
9822
- $[45] = t19;
9998
+ $[41] = t17;
9999
+ $[42] = t18;
10000
+ $[43] = t19;
9823
10001
  } else {
9824
- t17 = $[43];
9825
- t18 = $[44];
9826
- t19 = $[45];
10002
+ t17 = $[41];
10003
+ t18 = $[42];
10004
+ t19 = $[43];
9827
10005
  }
9828
10006
  let t20;
9829
- if ($[46] === Symbol.for("react.memo_cache_sentinel")) {
10007
+ if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
9830
10008
  t20 = [];
9831
- $[46] = t20;
10009
+ $[44] = t20;
9832
10010
  } else {
9833
- t20 = $[46];
10011
+ t20 = $[44];
9834
10012
  }
9835
10013
  const t21 = currentPropertyDialog?.property;
9836
10014
  const t22 = currentPropertyDialog?.propertyKey;
9837
10015
  let t23;
9838
- if ($[47] !== propertyConfigs || $[48] !== t10 || $[49] !== t11 || $[50] !== t12 || $[51] !== t13 || $[52] !== t14 || $[53] !== t15 || $[54] !== t16 || $[55] !== t21 || $[56] !== t22 || $[57] !== t9) {
10016
+ if ($[45] !== propertyConfigs || $[46] !== t10 || $[47] !== t11 || $[48] !== t12 || $[49] !== t13 || $[50] !== t14 || $[51] !== t15 || $[52] !== t16 || $[53] !== t21 || $[54] !== t22 || $[55] !== t9) {
9839
10017
  t23 = /* @__PURE__ */ 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 });
9840
- $[47] = propertyConfigs;
9841
- $[48] = t10;
9842
- $[49] = t11;
9843
- $[50] = t12;
9844
- $[51] = t13;
9845
- $[52] = t14;
9846
- $[53] = t15;
9847
- $[54] = t16;
9848
- $[55] = t21;
9849
- $[56] = t22;
9850
- $[57] = t9;
9851
- $[58] = t23;
9852
- } else {
9853
- t23 = $[58];
10018
+ $[45] = propertyConfigs;
10019
+ $[46] = t10;
10020
+ $[47] = t11;
10021
+ $[48] = t12;
10022
+ $[49] = t13;
10023
+ $[50] = t14;
10024
+ $[51] = t15;
10025
+ $[52] = t16;
10026
+ $[53] = t21;
10027
+ $[54] = t22;
10028
+ $[55] = t9;
10029
+ $[56] = t23;
10030
+ } else {
10031
+ t23 = $[56];
9854
10032
  }
9855
10033
  let t24;
9856
- if ($[59] !== children || $[60] !== t23 || $[61] !== t5 || $[62] !== t8) {
10034
+ if ($[57] !== children || $[58] !== t23 || $[59] !== t5 || $[60] !== t8) {
9857
10035
  t24 = /* @__PURE__ */ jsxs(CollectionEditorContext.Provider, { value: t5, children: [
9858
10036
  children,
9859
10037
  t8,
9860
10038
  t23
9861
10039
  ] });
9862
- $[59] = children;
9863
- $[60] = t23;
9864
- $[61] = t5;
9865
- $[62] = t8;
9866
- $[63] = t24;
10040
+ $[57] = children;
10041
+ $[58] = t23;
10042
+ $[59] = t5;
10043
+ $[60] = t8;
10044
+ $[61] = t24;
9867
10045
  } else {
9868
- t24 = $[63];
10046
+ t24 = $[61];
9869
10047
  }
9870
10048
  let t25;
9871
- if ($[64] !== collectionConfigController || $[65] !== t24) {
10049
+ if ($[62] !== collectionConfigController || $[63] !== t24) {
9872
10050
  t25 = /* @__PURE__ */ jsx(ConfigControllerContext.Provider, { value: collectionConfigController, children: t24 });
9873
- $[64] = collectionConfigController;
9874
- $[65] = t24;
9875
- $[66] = t25;
10051
+ $[62] = collectionConfigController;
10052
+ $[63] = t24;
10053
+ $[64] = t25;
9876
10054
  } else {
9877
- t25 = $[66];
10055
+ t25 = $[64];
9878
10056
  }
9879
10057
  return t25;
9880
10058
  }, equal);
@@ -10045,7 +10223,7 @@ function HomePageEditorCollectionAction(t0) {
10045
10223
  const deleteCollection = t3;
10046
10224
  let t4;
10047
10225
  if ($[11] !== permissions.deleteCollections) {
10048
- t4 = permissions.deleteCollections && /* @__PURE__ */ jsx(Menu, { trigger: /* @__PURE__ */ jsx(IconButton, { children: /* @__PURE__ */ jsx(MoreVertIcon, { size: "small" }) }), children: /* @__PURE__ */ jsxs(MenuItem, { dense: true, onClick: (event) => {
10226
+ t4 = permissions.deleteCollections && /* @__PURE__ */ jsx(Menu, { trigger: /* @__PURE__ */ jsx(IconButton, { size: "small", children: /* @__PURE__ */ jsx(MoreVertIcon, { size: "small" }) }), children: /* @__PURE__ */ jsxs(MenuItem, { dense: true, onClick: (event) => {
10049
10227
  event.preventDefault();
10050
10228
  event.stopPropagation();
10051
10229
  setDeleteRequested(true);
@@ -10060,7 +10238,7 @@ function HomePageEditorCollectionAction(t0) {
10060
10238
  }
10061
10239
  let t5;
10062
10240
  if ($[13] !== onEditCollectionClicked || $[14] !== permissions.editCollections) {
10063
- t5 = permissions.editCollections && /* @__PURE__ */ jsx(IconButton, { onClick: (event_0) => {
10241
+ t5 = permissions.editCollections && /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: (event_0) => {
10064
10242
  onEditCollectionClicked();
10065
10243
  }, children: /* @__PURE__ */ jsx(SettingsIcon, { size: "small" }) });
10066
10244
  $[13] = onEditCollectionClicked;
@@ -10489,21 +10667,22 @@ function NewCollectionCard(t0) {
10489
10667
  return t8;
10490
10668
  }
10491
10669
  function useCollectionEditorPlugin(t0) {
10492
- const $ = c(15);
10670
+ const $ = c(19);
10493
10671
  const {
10494
10672
  collectionConfigController,
10495
10673
  configPermissions,
10496
10674
  reservedGroups,
10497
10675
  extraView,
10498
- getPathSuggestions,
10499
10676
  getUser,
10500
10677
  collectionInference,
10501
10678
  getData,
10502
- onAnalyticsEvent
10679
+ onAnalyticsEvent,
10680
+ includeIntroView: t1
10503
10681
  } = t0;
10504
- let t1;
10505
- if ($[0] !== collectionConfigController || $[1] !== collectionInference || $[2] !== configPermissions || $[3] !== extraView || $[4] !== getData || $[5] !== getPathSuggestions || $[6] !== getUser || $[7] !== onAnalyticsEvent || $[8] !== reservedGroups) {
10506
- t1 = {
10682
+ const includeIntroView = t1 === void 0 ? true : t1;
10683
+ let t2;
10684
+ if ($[0] !== collectionConfigController || $[1] !== collectionInference || $[2] !== configPermissions || $[3] !== extraView || $[4] !== getData || $[5] !== getUser || $[6] !== onAnalyticsEvent || $[7] !== reservedGroups) {
10685
+ t2 = {
10507
10686
  Component: ConfigControllerProvider,
10508
10687
  props: {
10509
10688
  collectionConfigController,
@@ -10511,7 +10690,6 @@ function useCollectionEditorPlugin(t0) {
10511
10690
  collectionInference,
10512
10691
  reservedGroups,
10513
10692
  extraView,
10514
- getPathSuggestions,
10515
10693
  getUser,
10516
10694
  getData,
10517
10695
  onAnalyticsEvent
@@ -10522,53 +10700,72 @@ function useCollectionEditorPlugin(t0) {
10522
10700
  $[2] = configPermissions;
10523
10701
  $[3] = extraView;
10524
10702
  $[4] = getData;
10525
- $[5] = getPathSuggestions;
10526
- $[6] = getUser;
10527
- $[7] = onAnalyticsEvent;
10528
- $[8] = reservedGroups;
10529
- $[9] = t1;
10703
+ $[5] = getUser;
10704
+ $[6] = onAnalyticsEvent;
10705
+ $[7] = reservedGroups;
10706
+ $[8] = t2;
10530
10707
  } else {
10531
- t1 = $[9];
10708
+ t2 = $[8];
10532
10709
  }
10533
- let t2;
10534
10710
  let t3;
10535
- if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
10536
- t2 = {
10537
- additionalActions: /* @__PURE__ */ jsx(NewCollectionButton, {}),
10538
- additionalChildrenStart: /* @__PURE__ */ jsx(IntroWidget, {}),
10711
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
10712
+ t3 = /* @__PURE__ */ jsx(NewCollectionButton, {});
10713
+ $[9] = t3;
10714
+ } else {
10715
+ t3 = $[9];
10716
+ }
10717
+ let t4;
10718
+ if ($[10] !== includeIntroView) {
10719
+ t4 = includeIntroView ? /* @__PURE__ */ jsx(IntroWidget, {}) : void 0;
10720
+ $[10] = includeIntroView;
10721
+ $[11] = t4;
10722
+ } else {
10723
+ t4 = $[11];
10724
+ }
10725
+ let t5;
10726
+ if ($[12] !== t4) {
10727
+ t5 = {
10728
+ additionalActions: t3,
10729
+ additionalChildrenStart: t4,
10539
10730
  CollectionActions: HomePageEditorCollectionAction,
10540
10731
  AdditionalCards: NewCollectionCard
10541
10732
  };
10542
- t3 = {
10733
+ $[12] = t4;
10734
+ $[13] = t5;
10735
+ } else {
10736
+ t5 = $[13];
10737
+ }
10738
+ let t6;
10739
+ if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
10740
+ t6 = {
10543
10741
  CollectionActionsStart: EditorCollectionActionStart,
10544
10742
  CollectionActions: EditorCollectionAction,
10545
10743
  HeaderAction: CollectionViewHeaderAction,
10546
10744
  AddColumnComponent: PropertyAddColumnComponent
10547
10745
  };
10548
- $[10] = t2;
10549
- $[11] = t3;
10746
+ $[14] = t6;
10550
10747
  } else {
10551
- t2 = $[10];
10552
- t3 = $[11];
10748
+ t6 = $[14];
10553
10749
  }
10554
- let t4;
10555
- if ($[12] !== collectionConfigController.loading || $[13] !== t1) {
10556
- t4 = {
10750
+ let t7;
10751
+ if ($[15] !== collectionConfigController.loading || $[16] !== t2 || $[17] !== t5) {
10752
+ t7 = {
10557
10753
  key: "collection_editor",
10558
10754
  loading: collectionConfigController.loading,
10559
- provider: t1,
10560
- homePage: t2,
10561
- collectionView: t3
10755
+ provider: t2,
10756
+ homePage: t5,
10757
+ collectionView: t6
10562
10758
  };
10563
- $[12] = collectionConfigController.loading;
10564
- $[13] = t1;
10565
- $[14] = t4;
10759
+ $[15] = collectionConfigController.loading;
10760
+ $[16] = t2;
10761
+ $[17] = t5;
10762
+ $[18] = t7;
10566
10763
  } else {
10567
- t4 = $[14];
10764
+ t7 = $[18];
10568
10765
  }
10569
- return t4;
10766
+ return t7;
10570
10767
  }
10571
- function IntroWidget(t0) {
10768
+ function IntroWidget() {
10572
10769
  const $ = c(11);
10573
10770
  const navigation = useNavigationController();
10574
10771
  if (!navigation.topLevelNavigation) {
@@ -10576,35 +10773,35 @@ function IntroWidget(t0) {
10576
10773
  }
10577
10774
  const authController = useAuthController();
10578
10775
  const collectionEditorController = useCollectionEditorController();
10579
- let t1;
10776
+ let t0;
10580
10777
  if ($[0] !== authController || $[1] !== collectionEditorController) {
10581
- t1 = collectionEditorController.configPermissions ? collectionEditorController.configPermissions({
10778
+ t0 = collectionEditorController.configPermissions ? collectionEditorController.configPermissions({
10582
10779
  user: authController.user
10583
10780
  }).createCollections : true;
10584
10781
  $[0] = authController;
10585
10782
  $[1] = collectionEditorController;
10586
- $[2] = t1;
10783
+ $[2] = t0;
10587
10784
  } else {
10588
- t1 = $[2];
10785
+ t0 = $[2];
10589
10786
  }
10590
- const canCreateCollections = t1;
10787
+ const canCreateCollections = t0;
10591
10788
  if (!navigation.initialised || (navigation.collections ?? []).length > 0) {
10592
10789
  return null;
10593
10790
  }
10791
+ let t1;
10594
10792
  let t2;
10595
- let t3;
10596
10793
  if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
10597
- t2 = /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "uppercase", children: "No collections found" });
10598
- t3 = /* @__PURE__ */ jsx(Typography, { children: "Start building collections in FireCMS easily. Map them to your existing database data, import from files, or use our templates." });
10599
- $[3] = t2;
10600
- $[4] = t3;
10794
+ t1 = /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "uppercase", children: "No collections found" });
10795
+ t2 = /* @__PURE__ */ jsx(Typography, { children: "Start building collections in FireCMS easily. Map them to your existing database data, import from files, or use our templates." });
10796
+ $[3] = t1;
10797
+ $[4] = t2;
10601
10798
  } else {
10602
- t2 = $[3];
10603
- t3 = $[4];
10799
+ t1 = $[3];
10800
+ t2 = $[4];
10604
10801
  }
10605
- let t4;
10802
+ let t3;
10606
10803
  if ($[5] !== canCreateCollections || $[6] !== collectionEditorController) {
10607
- t4 = canCreateCollections && /* @__PURE__ */ jsxs(Button, { onClick: collectionEditorController && canCreateCollections ? () => collectionEditorController.createCollection({
10804
+ t3 = canCreateCollections && /* @__PURE__ */ jsxs(Button, { onClick: collectionEditorController && canCreateCollections ? () => collectionEditorController.createCollection({
10608
10805
  parentCollectionIds: [],
10609
10806
  redirect: true,
10610
10807
  sourceClick: "new_collection_card"
@@ -10614,31 +10811,31 @@ function IntroWidget(t0) {
10614
10811
  ] });
10615
10812
  $[5] = canCreateCollections;
10616
10813
  $[6] = collectionEditorController;
10617
- $[7] = t4;
10814
+ $[7] = t3;
10618
10815
  } else {
10619
- t4 = $[7];
10816
+ t3 = $[7];
10620
10817
  }
10621
- let t5;
10818
+ let t4;
10622
10819
  if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
10623
- t5 = /* @__PURE__ */ jsx(Typography, { color: "secondary", children: "You can also define collections programmatically." });
10624
- $[8] = t5;
10820
+ t4 = /* @__PURE__ */ jsx(Typography, { color: "secondary", children: "You can also define collections programmatically." });
10821
+ $[8] = t4;
10625
10822
  } else {
10626
- t5 = $[8];
10823
+ t4 = $[8];
10627
10824
  }
10628
- let t6;
10629
- if ($[9] !== t4) {
10630
- t6 = /* @__PURE__ */ jsxs(Paper, { className: "my-4 px-4 py-6 flex flex-col bg-white dark:bg-surface-accent-800 gap-2", children: [
10825
+ let t5;
10826
+ if ($[9] !== t3) {
10827
+ t5 = /* @__PURE__ */ jsxs(Paper, { className: "my-4 px-4 py-6 flex flex-col bg-white dark:bg-surface-accent-800 gap-2", children: [
10828
+ t1,
10631
10829
  t2,
10632
10830
  t3,
10633
- t4,
10634
- t5
10831
+ t4
10635
10832
  ] });
10636
- $[9] = t4;
10637
- $[10] = t6;
10833
+ $[9] = t3;
10834
+ $[10] = t5;
10638
10835
  } else {
10639
- t6 = $[10];
10836
+ t5 = $[10];
10640
10837
  }
10641
- return t6;
10838
+ return t5;
10642
10839
  }
10643
10840
  const mergeCollections = (baseCollections, backendCollections = [], modifyCollection) => {
10644
10841
  const markAsEditable = (c2) => {