@firecms/collection_editor 3.1.0-canary.1df3b2c → 3.1.0-canary.24c8270

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -26,7 +26,7 @@
26
26
  path: Yup__namespace.string().required("Required")
27
27
  });
28
28
  function GeneralSettingsForm(t0) {
29
- const $ = reactCompilerRuntime.c(142);
29
+ const $ = reactCompilerRuntime.c(146);
30
30
  const {
31
31
  isNewCollection,
32
32
  parentCollection
@@ -423,52 +423,70 @@
423
423
  } else {
424
424
  t56 = $[94];
425
425
  }
426
- const t57 = 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";
427
- let t58;
428
- if ($[95] !== setFieldValue) {
429
- t58 = (v_0) => setFieldValue("history", v_0);
430
- $[95] = setFieldValue;
426
+ let t57;
427
+ if ($[95] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
428
+ t57 = /* @__PURE__ */ jsxRuntime.jsx(ui.HistoryIcon, { size: "smallest" });
429
+ $[95] = t57;
430
+ } else {
431
+ t57 = $[95];
432
+ }
433
+ const t58 = 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";
434
+ let t59;
435
+ if ($[96] !== t58) {
436
+ t59 = /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
437
+ t57,
438
+ t58
439
+ ] });
431
440
  $[96] = t58;
441
+ $[97] = t59;
432
442
  } else {
433
- t58 = $[96];
443
+ t59 = $[97];
434
444
  }
435
- const t59 = values.history === void 0 ? null : values.history;
436
445
  let t60;
437
- if ($[97] !== t57 || $[98] !== t58 || $[99] !== t59) {
438
- t60 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", allowIndeterminate: true, label: t57, onValueChange: t58, value: t59 });
439
- $[97] = t57;
440
- $[98] = t58;
441
- $[99] = t59;
442
- $[100] = t60;
443
- } else {
444
- t60 = $[100];
445
- }
446
- let t61;
447
- if ($[101] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
448
- t61 = /* @__PURE__ */ jsxRuntime.jsxs(core.FieldCaption, { children: [
446
+ if ($[98] !== setFieldValue) {
447
+ t60 = (v_0) => setFieldValue("history", v_0);
448
+ $[98] = setFieldValue;
449
+ $[99] = t60;
450
+ } else {
451
+ t60 = $[99];
452
+ }
453
+ const t61 = values.history === void 0 ? null : values.history;
454
+ let t62;
455
+ if ($[100] !== t59 || $[101] !== t60 || $[102] !== t61) {
456
+ t62 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", allowIndeterminate: true, label: t59, onValueChange: t60, value: t61 });
457
+ $[100] = t59;
458
+ $[101] = t60;
459
+ $[102] = t61;
460
+ $[103] = t62;
461
+ } else {
462
+ t62 = $[103];
463
+ }
464
+ let t63;
465
+ if ($[104] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
466
+ t63 = /* @__PURE__ */ jsxRuntime.jsxs(core.FieldCaption, { children: [
449
467
  "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 ",
450
468
  /* @__PURE__ */ jsxRuntime.jsx("b", { children: "__history" }),
451
469
  "."
452
470
  ] });
453
- $[101] = t61;
471
+ $[104] = t63;
454
472
  } else {
455
- t61 = $[101];
473
+ t63 = $[104];
456
474
  }
457
- let t62;
458
- if ($[102] !== t60) {
459
- t62 = /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
460
- t60,
461
- t61
475
+ let t64;
476
+ if ($[105] !== t62) {
477
+ t64 = /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
478
+ t62,
479
+ t63
462
480
  ] });
463
- $[102] = t60;
464
- $[103] = t62;
481
+ $[105] = t62;
482
+ $[106] = t64;
465
483
  } else {
466
- t62 = $[103];
484
+ t64 = $[106];
467
485
  }
468
- const t63 = typeof values.customId === "object";
469
- let t64;
470
- if ($[104] !== setFieldValue) {
471
- t64 = (v_1) => {
486
+ const t65 = typeof values.customId === "object";
487
+ let t66;
488
+ if ($[107] !== setFieldValue) {
489
+ t66 = (v_1) => {
472
490
  if (v_1 === "code_defined") {
473
491
  throw new Error("This should not happen");
474
492
  }
@@ -484,166 +502,176 @@
484
502
  }
485
503
  }
486
504
  };
487
- $[104] = setFieldValue;
488
- $[105] = t64;
505
+ $[107] = setFieldValue;
506
+ $[108] = t66;
489
507
  } else {
490
- t64 = $[105];
508
+ t66 = $[108];
491
509
  }
492
- const t65 = typeof values.customId === "object" ? "code_defined" : values.customId === true ? "true" : values.customId === "optional" ? "optional" : "false";
493
- let t66;
494
- let t67;
510
+ const t67 = typeof values.customId === "object" ? "code_defined" : values.customId === true ? "true" : values.customId === "optional" ? "optional" : "false";
495
511
  let t68;
496
- if ($[106] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
497
- t66 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "false", children: "Document ID is generated automatically" });
498
- t67 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "true", children: "Users must define an ID" });
499
- t68 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "optional", children: "Users can define an ID, but it is not required" });
500
- $[106] = t66;
501
- $[107] = t67;
502
- $[108] = t68;
503
- } else {
504
- t66 = $[106];
505
- t67 = $[107];
506
- t68 = $[108];
507
- }
508
512
  let t69;
509
- if ($[109] !== t63 || $[110] !== t64 || $[111] !== t65) {
510
- t69 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Select, { name: "customId", label: "Document IDs generation", position: "item-aligned", size: "large", fullWidth: true, disabled: t63, onValueChange: t64, value: t65, renderValue: _temp$g, children: [
511
- t66,
512
- t67,
513
- t68
514
- ] });
515
- $[109] = t63;
516
- $[110] = t64;
517
- $[111] = t65;
518
- $[112] = t69;
519
- } else {
520
- t69 = $[112];
521
- }
522
513
  let t70;
523
- if ($[113] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
524
- t70 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { children: "Configure how document IDs are generated when creating new entities." });
525
- $[113] = t70;
526
- } else {
527
- t70 = $[113];
514
+ if ($[109] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
515
+ t68 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "false", children: "Document ID is generated automatically" });
516
+ t69 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "true", children: "Users must define an ID" });
517
+ t70 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "optional", children: "Users can define an ID, but it is not required" });
518
+ $[109] = t68;
519
+ $[110] = t69;
520
+ $[111] = t70;
521
+ } else {
522
+ t68 = $[109];
523
+ t69 = $[110];
524
+ t70 = $[111];
528
525
  }
529
526
  let t71;
530
- if ($[114] !== t69) {
531
- t71 = /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
527
+ if ($[112] !== t65 || $[113] !== t66 || $[114] !== t67) {
528
+ t71 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Select, { name: "customId", label: "Document IDs generation", position: "item-aligned", size: "large", fullWidth: true, disabled: t65, onValueChange: t66, value: t67, renderValue: _temp$g, children: [
529
+ t68,
532
530
  t69,
533
531
  t70
534
532
  ] });
535
- $[114] = t69;
533
+ $[112] = t65;
534
+ $[113] = t66;
535
+ $[114] = t67;
536
536
  $[115] = t71;
537
537
  } else {
538
538
  t71 = $[115];
539
539
  }
540
540
  let t72;
541
- if ($[116] !== setFieldValue) {
542
- t72 = (v_2) => setFieldValue("textSearchEnabled", v_2);
543
- $[116] = setFieldValue;
544
- $[117] = t72;
541
+ if ($[116] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
542
+ t72 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { children: "Configure how document IDs are generated when creating new entities." });
543
+ $[116] = t72;
544
+ } else {
545
+ t72 = $[116];
546
+ }
547
+ let t73;
548
+ if ($[117] !== t71) {
549
+ t73 = /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
550
+ t71,
551
+ t72
552
+ ] });
553
+ $[117] = t71;
554
+ $[118] = t73;
545
555
  } else {
546
- t72 = $[117];
556
+ t73 = $[118];
547
557
  }
548
- const t73 = values.textSearchEnabled ?? false;
549
558
  let t74;
550
- if ($[118] !== t72 || $[119] !== t73) {
551
- t74 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: "Enable text search for this collection", onValueChange: t72, value: t73 });
552
- $[118] = t72;
553
- $[119] = t73;
554
- $[120] = t74;
559
+ if ($[119] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
560
+ t74 = /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
561
+ /* @__PURE__ */ jsxRuntime.jsx(ui.SearchIcon, { size: "smallest" }),
562
+ "Enable text search for this collection"
563
+ ] });
564
+ $[119] = t74;
555
565
  } else {
556
- t74 = $[120];
566
+ t74 = $[119];
557
567
  }
558
568
  let t75;
559
- if ($[121] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
560
- t75 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { children: "Allow text search for this collection. If you have not specified a text search delegate, this will use the built-in local text search. This is not recommended for large collections, as it may incur in performance and cost issues." });
569
+ if ($[120] !== setFieldValue) {
570
+ t75 = (v_2) => setFieldValue("textSearchEnabled", v_2);
571
+ $[120] = setFieldValue;
561
572
  $[121] = t75;
562
573
  } else {
563
574
  t75 = $[121];
564
575
  }
565
- let t76;
566
- if ($[122] !== t74) {
567
- t76 = /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
568
- t74,
569
- t75
570
- ] });
571
- $[122] = t74;
576
+ const t76 = values.textSearchEnabled ?? false;
577
+ let t77;
578
+ if ($[122] !== t75 || $[123] !== t76) {
579
+ t77 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: t74, onValueChange: t75, value: t76 });
580
+ $[122] = t75;
572
581
  $[123] = t76;
582
+ $[124] = t77;
573
583
  } else {
574
- t76 = $[123];
584
+ t77 = $[124];
575
585
  }
576
- let t77;
577
- if ($[124] !== t62 || $[125] !== t71 || $[126] !== t76) {
578
- t77 = /* @__PURE__ */ jsxRuntime.jsxs(ui.ExpandablePanel, { title: t56, initiallyExpanded: false, className: "mt-4", innerClassName: "p-4 flex flex-col gap-4", children: [
579
- t62,
580
- t71,
581
- t76
586
+ let t78;
587
+ if ($[125] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
588
+ t78 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { children: "Allow text search for this collection. If you have not specified a text search delegate, this will use the built-in local text search. This is not recommended for large collections, as it may incur in performance and cost issues." });
589
+ $[125] = t78;
590
+ } else {
591
+ t78 = $[125];
592
+ }
593
+ let t79;
594
+ if ($[126] !== t77) {
595
+ t79 = /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
596
+ t77,
597
+ t78
582
598
  ] });
583
- $[124] = t62;
584
- $[125] = t71;
585
- $[126] = t76;
586
- $[127] = t77;
599
+ $[126] = t77;
600
+ $[127] = t79;
587
601
  } else {
588
- t77 = $[127];
602
+ t79 = $[127];
589
603
  }
590
- let t78;
591
- if ($[128] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
592
- t78 = /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
604
+ let t80;
605
+ if ($[128] !== t64 || $[129] !== t73 || $[130] !== t79) {
606
+ t80 = /* @__PURE__ */ jsxRuntime.jsxs(ui.ExpandablePanel, { title: t56, initiallyExpanded: false, className: "mt-4", innerClassName: "p-4 flex flex-col gap-4", children: [
607
+ t64,
608
+ t73,
609
+ t79
610
+ ] });
611
+ $[128] = t64;
612
+ $[129] = t73;
613
+ $[130] = t79;
614
+ $[131] = t80;
615
+ } else {
616
+ t80 = $[131];
617
+ }
618
+ let t81;
619
+ if ($[132] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
620
+ t81 = /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
593
621
  height: "52px"
594
622
  } });
595
- $[128] = t78;
623
+ $[132] = t81;
596
624
  } else {
597
- t78 = $[128];
625
+ t81 = $[132];
598
626
  }
599
- const t79 = typeof values.icon === "string" ? values.icon : void 0;
600
- let t80;
601
- if ($[129] !== setFieldValue) {
602
- t80 = (icon) => {
627
+ const t82 = typeof values.icon === "string" ? values.icon : void 0;
628
+ let t83;
629
+ if ($[133] !== setFieldValue) {
630
+ t83 = (icon) => {
603
631
  setIconDialogOpen(false);
604
632
  setFieldValue("icon", icon);
605
633
  };
606
- $[129] = setFieldValue;
607
- $[130] = t80;
634
+ $[133] = setFieldValue;
635
+ $[134] = t83;
608
636
  } else {
609
- t80 = $[130];
637
+ t83 = $[134];
610
638
  }
611
- let t81;
612
- if ($[131] !== t79 || $[132] !== t80) {
613
- t81 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsxRuntime.jsx(core.SearchIconsView, { selectedIcon: t79, onIconSelected: t80 }) });
614
- $[131] = t79;
615
- $[132] = t80;
616
- $[133] = t81;
639
+ let t84;
640
+ if ($[135] !== t82 || $[136] !== t83) {
641
+ t84 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsxRuntime.jsx(core.SearchIconsView, { selectedIcon: t82, onIconSelected: t83 }) });
642
+ $[135] = t82;
643
+ $[136] = t83;
644
+ $[137] = t84;
617
645
  } else {
618
- t81 = $[133];
646
+ t84 = $[137];
619
647
  }
620
- let t82;
621
- if ($[134] !== iconDialogOpen || $[135] !== t81) {
622
- t82 = /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t81 });
623
- $[134] = iconDialogOpen;
624
- $[135] = t81;
625
- $[136] = t82;
648
+ let t85;
649
+ if ($[138] !== iconDialogOpen || $[139] !== t84) {
650
+ t85 = /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t84 });
651
+ $[138] = iconDialogOpen;
652
+ $[139] = t84;
653
+ $[140] = t85;
626
654
  } else {
627
- t82 = $[136];
655
+ t85 = $[140];
628
656
  }
629
- let t83;
630
- if ($[137] !== t12 || $[138] !== t55 || $[139] !== t77 || $[140] !== t82) {
631
- t83 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-auto my-auto", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Container, { maxWidth: "4xl", className: "flex flex-col gap-4 p-8 m-auto", children: [
657
+ let t86;
658
+ if ($[141] !== t12 || $[142] !== t55 || $[143] !== t80 || $[144] !== t85) {
659
+ t86 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-auto my-auto", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Container, { maxWidth: "4xl", className: "flex flex-col gap-4 p-8 m-auto", children: [
632
660
  t12,
633
661
  t55,
634
- t77,
635
- t78,
636
- t82
662
+ t80,
663
+ t81,
664
+ t85
637
665
  ] }) });
638
- $[137] = t12;
639
- $[138] = t55;
640
- $[139] = t77;
641
- $[140] = t82;
642
- $[141] = t83;
666
+ $[141] = t12;
667
+ $[142] = t55;
668
+ $[143] = t80;
669
+ $[144] = t85;
670
+ $[145] = t86;
643
671
  } else {
644
- t83 = $[141];
672
+ t86 = $[145];
645
673
  }
646
- return t83;
674
+ return t86;
647
675
  }
648
676
  function _temp$g(value) {
649
677
  if (value === "code_defined") {
@@ -8567,7 +8595,7 @@
8567
8595
  onPropertyChanged = $[6];
8568
8596
  open = $[7];
8569
8597
  }
8570
- const formexRef = React.useRef();
8598
+ const formexRef = React.useRef(void 0);
8571
8599
  let t1;
8572
8600
  if ($[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
8573
8601
  t1 = (helpers) => {
@@ -12363,7 +12391,8 @@
12363
12391
  generateCollection,
12364
12392
  trigger,
12365
12393
  size = "small",
12366
- showLabel = true
12394
+ showLabel = true,
12395
+ onAnalyticsEvent
12367
12396
  }) {
12368
12397
  const [menuOpen, setMenuOpen] = React.useState(false);
12369
12398
  const [prompt, setPrompt] = React.useState("");
@@ -12376,6 +12405,10 @@
12376
12405
  if (!prompt.trim()) return;
12377
12406
  setLoading(true);
12378
12407
  setError(null);
12408
+ const mode = existingCollection ? "modify" : "create";
12409
+ onAnalyticsEvent?.("ai_collection_generate_start", {
12410
+ mode
12411
+ });
12379
12412
  try {
12380
12413
  const collectionsContext = existingCollections.map((c) => ({
12381
12414
  path: c.path,
@@ -12400,6 +12433,10 @@
12400
12433
  onGenerated(result.collection, result.operations);
12401
12434
  setMenuOpen(false);
12402
12435
  setPrompt("");
12436
+ onAnalyticsEvent?.("ai_collection_generate_success", {
12437
+ mode,
12438
+ operationsCount: result.operations?.length
12439
+ });
12403
12440
  snackbarController.open({
12404
12441
  type: "success",
12405
12442
  message: existingCollection ? "Collection updated with AI suggestions" : "Collection generated successfully"
@@ -12408,6 +12445,10 @@
12408
12445
  console.error("Error generating collection:", e);
12409
12446
  const errorMessage = e instanceof CollectionGenerationApiError ? e.message : "Failed to generate collection. Please try again.";
12410
12447
  setError(errorMessage);
12448
+ onAnalyticsEvent?.("ai_collection_generate_error", {
12449
+ mode,
12450
+ error: errorMessage
12451
+ });
12411
12452
  snackbarController.open({
12412
12453
  type: "error",
12413
12454
  message: errorMessage
@@ -12443,12 +12484,13 @@
12443
12484
  ] }) });
12444
12485
  }
12445
12486
  function CollectionEditorWelcomeView(t0) {
12446
- const $ = reactCompilerRuntime.c(65);
12487
+ const $ = reactCompilerRuntime.c(66);
12447
12488
  const {
12448
12489
  parentCollection,
12449
12490
  onContinue,
12450
12491
  existingCollectionPaths,
12451
- generateCollection
12492
+ generateCollection,
12493
+ onAnalyticsEvent
12452
12494
  } = t0;
12453
12495
  const {
12454
12496
  pathSuggestions
@@ -12508,203 +12550,204 @@
12508
12550
  }, size: "small", children: suggestion }, suggestion)) })
12509
12551
  ] });
12510
12552
  let t9;
12511
- if ($[7] !== generateCollection || $[8] !== onContinue || $[9] !== setValues) {
12553
+ if ($[7] !== generateCollection || $[8] !== onAnalyticsEvent || $[9] !== onContinue || $[10] !== setValues) {
12512
12554
  t9 = generateCollection && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-2", children: [
12513
12555
  /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", className: "mb-2", children: "● Describe your collection to AI:" }),
12514
12556
  /* @__PURE__ */ jsxRuntime.jsx(AICollectionGeneratorPopover, { onGenerated: (generatedCollection) => {
12515
12557
  setValues(generatedCollection);
12516
12558
  onContinue();
12517
- }, generateCollection, trigger: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "outlined", startIcon: /* @__PURE__ */ jsxRuntime.jsx(core.AIIcon, { size: "small" }), children: "Generate with AI" }) })
12559
+ }, generateCollection, onAnalyticsEvent, trigger: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "outlined", startIcon: /* @__PURE__ */ jsxRuntime.jsx(core.AIIcon, { size: "small" }), children: "Generate with AI" }) })
12518
12560
  ] });
12519
12561
  $[7] = generateCollection;
12520
- $[8] = onContinue;
12521
- $[9] = setValues;
12522
- $[10] = t9;
12562
+ $[8] = onAnalyticsEvent;
12563
+ $[9] = onContinue;
12564
+ $[10] = setValues;
12565
+ $[11] = t9;
12523
12566
  } else {
12524
- t9 = $[10];
12567
+ t9 = $[11];
12525
12568
  }
12526
12569
  let t10;
12527
- if ($[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
12570
+ if ($[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
12528
12571
  t10 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", className: "mb-2", children: "● Create from JSON configuration:" });
12529
- $[11] = t10;
12572
+ $[12] = t10;
12530
12573
  } else {
12531
- t10 = $[11];
12574
+ t10 = $[12];
12532
12575
  }
12533
12576
  let t11;
12534
- if ($[12] !== setJsonImportOpen) {
12577
+ if ($[13] !== setJsonImportOpen) {
12535
12578
  t11 = () => setJsonImportOpen(true);
12536
- $[12] = setJsonImportOpen;
12537
- $[13] = t11;
12579
+ $[13] = setJsonImportOpen;
12580
+ $[14] = t11;
12538
12581
  } else {
12539
- t11 = $[13];
12582
+ t11 = $[14];
12540
12583
  }
12541
12584
  let t12;
12542
- if ($[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
12585
+ if ($[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
12543
12586
  t12 = /* @__PURE__ */ jsxRuntime.jsx(ui.CodeIcon, { size: "small" });
12544
- $[14] = t12;
12587
+ $[15] = t12;
12545
12588
  } else {
12546
- t12 = $[14];
12589
+ t12 = $[15];
12547
12590
  }
12548
12591
  let t13;
12549
- if ($[15] !== t11) {
12592
+ if ($[16] !== t11) {
12550
12593
  t13 = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "outlined", onClick: t11, startIcon: t12, children: "Paste JSON Configuration" });
12551
- $[15] = t11;
12552
- $[16] = t13;
12594
+ $[16] = t11;
12595
+ $[17] = t13;
12553
12596
  } else {
12554
- t13 = $[16];
12597
+ t13 = $[17];
12555
12598
  }
12556
12599
  let t14;
12557
- if ($[17] !== setJsonImportOpen) {
12600
+ if ($[18] !== setJsonImportOpen) {
12558
12601
  t14 = () => setJsonImportOpen(false);
12559
- $[17] = setJsonImportOpen;
12560
- $[18] = t14;
12602
+ $[18] = setJsonImportOpen;
12603
+ $[19] = t14;
12561
12604
  } else {
12562
- t14 = $[18];
12605
+ t14 = $[19];
12563
12606
  }
12564
12607
  let t15;
12565
- if ($[19] !== onContinue || $[20] !== setValues) {
12608
+ if ($[20] !== onContinue || $[21] !== setValues) {
12566
12609
  t15 = (collection) => {
12567
12610
  setValues(collection);
12568
12611
  onContinue();
12569
12612
  };
12570
- $[19] = onContinue;
12571
- $[20] = setValues;
12572
- $[21] = t15;
12613
+ $[20] = onContinue;
12614
+ $[21] = setValues;
12615
+ $[22] = t15;
12573
12616
  } else {
12574
- t15 = $[21];
12617
+ t15 = $[22];
12575
12618
  }
12576
12619
  let t16;
12577
- if ($[22] !== jsonImportOpen || $[23] !== t14 || $[24] !== t15) {
12620
+ if ($[23] !== jsonImportOpen || $[24] !== t14 || $[25] !== t15) {
12578
12621
  t16 = /* @__PURE__ */ jsxRuntime.jsx(CollectionJsonImportDialog, { open: jsonImportOpen, onClose: t14, onImport: t15 });
12579
- $[22] = jsonImportOpen;
12580
- $[23] = t14;
12581
- $[24] = t15;
12582
- $[25] = t16;
12622
+ $[23] = jsonImportOpen;
12623
+ $[24] = t14;
12624
+ $[25] = t15;
12625
+ $[26] = t16;
12583
12626
  } else {
12584
- t16 = $[25];
12627
+ t16 = $[26];
12585
12628
  }
12586
12629
  let t17;
12587
- if ($[26] !== t13 || $[27] !== t16) {
12630
+ if ($[27] !== t13 || $[28] !== t16) {
12588
12631
  t17 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-2", children: [
12589
12632
  t10,
12590
12633
  t13,
12591
12634
  t16
12592
12635
  ] });
12593
- $[26] = t13;
12594
- $[27] = t16;
12595
- $[28] = t17;
12636
+ $[27] = t13;
12637
+ $[28] = t16;
12638
+ $[29] = t17;
12596
12639
  } else {
12597
- t17 = $[28];
12640
+ t17 = $[29];
12598
12641
  }
12599
12642
  let t18;
12600
- if ($[29] !== t17 || $[30] !== t9) {
12643
+ if ($[30] !== t17 || $[31] !== t9) {
12601
12644
  t18 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row gap-8", children: [
12602
12645
  t9,
12603
12646
  t17
12604
12647
  ] });
12605
- $[29] = t17;
12606
- $[30] = t9;
12607
- $[31] = t18;
12648
+ $[30] = t17;
12649
+ $[31] = t9;
12650
+ $[32] = t18;
12608
12651
  } else {
12609
- t18 = $[31];
12652
+ t18 = $[32];
12610
12653
  }
12611
12654
  let t19;
12612
- if ($[32] !== onContinue || $[33] !== parentCollection) {
12655
+ if ($[33] !== onContinue || $[34] !== parentCollection) {
12613
12656
  t19 = !parentCollection && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
12614
12657
  /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", className: "mb-2", children: "● Create a collection from a file (csv, json, xls, xslx...)" }),
12615
12658
  /* @__PURE__ */ jsxRuntime.jsx(data_import.ImportFileUpload, { onDataAdded: (data, propertiesOrder) => onContinue(data, propertiesOrder) })
12616
12659
  ] });
12617
- $[32] = onContinue;
12618
- $[33] = parentCollection;
12619
- $[34] = t19;
12660
+ $[33] = onContinue;
12661
+ $[34] = parentCollection;
12662
+ $[35] = t19;
12620
12663
  } else {
12621
- t19 = $[34];
12664
+ t19 = $[35];
12622
12665
  }
12623
12666
  let t20;
12624
- if ($[35] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
12667
+ if ($[36] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
12625
12668
  t20 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", children: "● Select a template:" });
12626
- $[35] = t20;
12669
+ $[36] = t20;
12627
12670
  } else {
12628
- t20 = $[35];
12671
+ t20 = $[36];
12629
12672
  }
12630
12673
  let t21;
12631
- if ($[36] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
12674
+ if ($[37] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
12632
12675
  t21 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: productsCollectionTemplate.icon });
12633
- $[36] = t21;
12676
+ $[37] = t21;
12634
12677
  } else {
12635
- t21 = $[36];
12678
+ t21 = $[37];
12636
12679
  }
12637
12680
  let t22;
12638
- if ($[37] !== onContinue || $[38] !== setValues) {
12681
+ if ($[38] !== onContinue || $[39] !== setValues) {
12639
12682
  t22 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Products", subtitle: "A collection of products with images, prices and stock", icon: t21, onClick: () => {
12640
12683
  setValues(productsCollectionTemplate);
12641
12684
  onContinue();
12642
12685
  } });
12643
- $[37] = onContinue;
12644
- $[38] = setValues;
12645
- $[39] = t22;
12686
+ $[38] = onContinue;
12687
+ $[39] = setValues;
12688
+ $[40] = t22;
12646
12689
  } else {
12647
- t22 = $[39];
12690
+ t22 = $[40];
12648
12691
  }
12649
12692
  let t23;
12650
- if ($[40] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
12693
+ if ($[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
12651
12694
  t23 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: usersCollectionTemplate.icon });
12652
- $[40] = t23;
12695
+ $[41] = t23;
12653
12696
  } else {
12654
- t23 = $[40];
12697
+ t23 = $[41];
12655
12698
  }
12656
12699
  let t24;
12657
- if ($[41] !== onContinue || $[42] !== setValues) {
12700
+ if ($[42] !== onContinue || $[43] !== setValues) {
12658
12701
  t24 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Users", subtitle: "A collection of users with emails, names and roles", icon: t23, onClick: () => {
12659
12702
  setValues(usersCollectionTemplate);
12660
12703
  onContinue();
12661
12704
  } });
12662
- $[41] = onContinue;
12663
- $[42] = setValues;
12664
- $[43] = t24;
12705
+ $[42] = onContinue;
12706
+ $[43] = setValues;
12707
+ $[44] = t24;
12665
12708
  } else {
12666
- t24 = $[43];
12709
+ t24 = $[44];
12667
12710
  }
12668
12711
  let t25;
12669
- if ($[44] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
12712
+ if ($[45] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
12670
12713
  t25 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: blogCollectionTemplate.icon });
12671
- $[44] = t25;
12714
+ $[45] = t25;
12672
12715
  } else {
12673
- t25 = $[44];
12716
+ t25 = $[45];
12674
12717
  }
12675
12718
  let t26;
12676
- if ($[45] !== onContinue || $[46] !== setValues) {
12719
+ if ($[46] !== onContinue || $[47] !== setValues) {
12677
12720
  t26 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Blog posts", subtitle: "A collection of blog posts with images, authors and complex content", icon: t25, onClick: () => {
12678
12721
  setValues(blogCollectionTemplate);
12679
12722
  onContinue();
12680
12723
  } });
12681
- $[45] = onContinue;
12682
- $[46] = setValues;
12683
- $[47] = t26;
12724
+ $[46] = onContinue;
12725
+ $[47] = setValues;
12726
+ $[48] = t26;
12684
12727
  } else {
12685
- t26 = $[47];
12728
+ t26 = $[48];
12686
12729
  }
12687
12730
  let t27;
12688
- if ($[48] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
12731
+ if ($[49] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
12689
12732
  t27 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: pagesCollectionTemplate.icon });
12690
- $[48] = t27;
12733
+ $[49] = t27;
12691
12734
  } else {
12692
- t27 = $[48];
12735
+ t27 = $[49];
12693
12736
  }
12694
12737
  let t28;
12695
- if ($[49] !== onContinue || $[50] !== setValues) {
12738
+ if ($[50] !== onContinue || $[51] !== setValues) {
12696
12739
  t28 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Pages", subtitle: "A collection of pages with images, authors and complex content", icon: t27, onClick: () => {
12697
12740
  setValues(pagesCollectionTemplate);
12698
12741
  onContinue();
12699
12742
  } });
12700
- $[49] = onContinue;
12701
- $[50] = setValues;
12702
- $[51] = t28;
12743
+ $[50] = onContinue;
12744
+ $[51] = setValues;
12745
+ $[52] = t28;
12703
12746
  } else {
12704
- t28 = $[51];
12747
+ t28 = $[52];
12705
12748
  }
12706
12749
  let t29;
12707
- if ($[52] !== t22 || $[53] !== t24 || $[54] !== t26 || $[55] !== t28) {
12750
+ if ($[53] !== t22 || $[54] !== t24 || $[55] !== t26 || $[56] !== t28) {
12708
12751
  t29 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-2", children: [
12709
12752
  t20,
12710
12753
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
@@ -12714,16 +12757,16 @@
12714
12757
  t28
12715
12758
  ] })
12716
12759
  ] });
12717
- $[52] = t22;
12718
- $[53] = t24;
12719
- $[54] = t26;
12720
- $[55] = t28;
12721
- $[56] = t29;
12760
+ $[53] = t22;
12761
+ $[54] = t24;
12762
+ $[55] = t26;
12763
+ $[56] = t28;
12764
+ $[57] = t29;
12722
12765
  } else {
12723
- t29 = $[56];
12766
+ t29 = $[57];
12724
12767
  }
12725
12768
  let t30;
12726
- if ($[57] !== T0 || $[58] !== t18 || $[59] !== t19 || $[60] !== t29 || $[61] !== t6 || $[62] !== t7 || $[63] !== t8) {
12769
+ if ($[58] !== T0 || $[59] !== t18 || $[60] !== t19 || $[61] !== t29 || $[62] !== t6 || $[63] !== t7 || $[64] !== t8) {
12727
12770
  t30 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t3, children: /* @__PURE__ */ jsxRuntime.jsxs(T0, { maxWidth: t4, className: t5, children: [
12728
12771
  t6,
12729
12772
  t7,
@@ -12732,16 +12775,16 @@
12732
12775
  t19,
12733
12776
  t29
12734
12777
  ] }) });
12735
- $[57] = T0;
12736
- $[58] = t18;
12737
- $[59] = t19;
12738
- $[60] = t29;
12739
- $[61] = t6;
12740
- $[62] = t7;
12741
- $[63] = t8;
12742
- $[64] = t30;
12778
+ $[58] = T0;
12779
+ $[59] = t18;
12780
+ $[60] = t19;
12781
+ $[61] = t29;
12782
+ $[62] = t6;
12783
+ $[63] = t7;
12784
+ $[64] = t8;
12785
+ $[65] = t30;
12743
12786
  } else {
12744
- t30 = $[64];
12787
+ t30 = $[65];
12745
12788
  }
12746
12789
  return t30;
12747
12790
  }
@@ -13566,7 +13609,8 @@
13566
13609
  existingEntities,
13567
13610
  initialView: initialViewProp,
13568
13611
  expandKanban,
13569
- generateCollection
13612
+ generateCollection,
13613
+ onAnalyticsEvent
13570
13614
  }) {
13571
13615
  const importConfig = data_import.useImportConfig();
13572
13616
  const navigation = core.useNavigationController();
@@ -13852,7 +13896,7 @@
13852
13896
  return /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogContent, { fullHeight: true, children: [
13853
13897
  /* @__PURE__ */ jsxRuntime.jsx(formex.Formex, { value: formController, children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
13854
13898
  !isNewCollection && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cls("px-4 py-2 w-full flex items-center justify-end gap-2 bg-surface-50 dark:bg-surface-950 border-b", ui.defaultBorderMixin), children: [
13855
- generateCollection && /* @__PURE__ */ jsxRuntime.jsx(AICollectionGeneratorPopover, { existingCollection: values_1, onGenerated: handleAIGenerated, generateCollection }),
13899
+ generateCollection && /* @__PURE__ */ jsxRuntime.jsx(AICollectionGeneratorPopover, { existingCollection: values_1, onGenerated: handleAIGenerated, generateCollection, onAnalyticsEvent }),
13856
13900
  /* @__PURE__ */ jsxRuntime.jsxs(ui.Tabs, { value: currentView, onValueChange: (v) => setCurrentView(v), children: [
13857
13901
  /* @__PURE__ */ jsxRuntime.jsx(ui.Tab, { value: "general", children: "General" }),
13858
13902
  /* @__PURE__ */ jsxRuntime.jsx(ui.Tab, { value: "display", children: "Display" }),
@@ -13863,7 +13907,7 @@
13863
13907
  /* @__PURE__ */ jsxRuntime.jsxs("form", { noValidate: true, onSubmit: formController.handleSubmit, className: ui.cls(isNewCollection ? "h-full" : "h-[calc(100%-48px)]", "flex-grow flex flex-col relative"), children: [
13864
13908
  currentView === "loading" && /* @__PURE__ */ jsxRuntime.jsx(core.CircularProgressCenter, {}),
13865
13909
  currentView === "extra_view" && path && extraView?.View && /* @__PURE__ */ jsxRuntime.jsx(extraView.View, { path }),
13866
- currentView === "welcome" && /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorWelcomeView, { path, onContinue: onWelcomeScreenContinue, existingCollectionPaths: existingPaths, parentCollection, generateCollection }),
13910
+ currentView === "welcome" && /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorWelcomeView, { path, onContinue: onWelcomeScreenContinue, existingCollectionPaths: existingPaths, parentCollection, generateCollection, onAnalyticsEvent }),
13867
13911
  currentView === "import_data_mapping" && importConfig && /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorImportMapping, { importConfig, collectionEditable, propertyConfigs }),
13868
13912
  currentView === "import_data_preview" && importConfig && /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorImportDataPreview, { importConfig, properties: values_1.properties, propertiesOrder: values_1.propertiesOrder }),
13869
13913
  currentView === "import_data_saving" && importConfig && /* @__PURE__ */ jsxRuntime.jsx(data_import.ImportSaveInProgress, { importConfig, collection: values_1, path, onImportSuccess: async (importedCollection) => {
@@ -13930,7 +13974,9 @@
13930
13974
  const propertiesResult = {};
13931
13975
  if (properties) {
13932
13976
  Object.keys(properties).forEach((key) => {
13933
- propertiesResult[key] = applyPropertiesConfig(properties[key], propertyConfigs);
13977
+ const prop = properties[key];
13978
+ if (prop == null) return;
13979
+ propertiesResult[key] = applyPropertiesConfig(prop, propertyConfigs);
13934
13980
  });
13935
13981
  }
13936
13982
  return {
@@ -13940,7 +13986,7 @@
13940
13986
  }
13941
13987
  function applyPropertiesConfig(property, propertyConfigs) {
13942
13988
  let internalProperty = property;
13943
- if (propertyConfigs && typeof internalProperty === "object" && internalProperty.propertyConfig) {
13989
+ if (propertyConfigs && internalProperty && typeof internalProperty === "object" && internalProperty.propertyConfig) {
13944
13990
  const propertyConfig = propertyConfigs[internalProperty.propertyConfig];
13945
13991
  if (propertyConfig && core.isPropertyBuilder(propertyConfig.property)) {
13946
13992
  internalProperty = propertyConfig.property;
@@ -13984,7 +14030,7 @@
13984
14030
  const ConfigControllerContext = React.createContext({});
13985
14031
  const CollectionEditorContext = React.createContext({});
13986
14032
  const ConfigControllerProvider = React.memo(function ConfigControllerProvider2(t0) {
13987
- const $ = reactCompilerRuntime.c(71);
14033
+ const $ = reactCompilerRuntime.c(72);
13988
14034
  const {
13989
14035
  children,
13990
14036
  collectionConfigController,
@@ -14163,8 +14209,8 @@
14163
14209
  t7 = $[17];
14164
14210
  }
14165
14211
  let t8;
14166
- if ($[18] !== collectionConfigController || $[19] !== collectionInference || $[20] !== currentDialog || $[21] !== extraView || $[22] !== generateCollection || $[23] !== getData || $[24] !== getUser || $[25] !== reservedGroups || $[26] !== t6 || $[27] !== t7) {
14167
- t8 = /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorDialog, { open: t6, configController: collectionConfigController, isNewCollection: false, collectionInference, ...currentDialog, getData, reservedGroups, extraView, getUser, generateCollection, handleClose: t7 });
14212
+ if ($[18] !== collectionConfigController || $[19] !== collectionInference || $[20] !== currentDialog || $[21] !== extraView || $[22] !== generateCollection || $[23] !== getData || $[24] !== getUser || $[25] !== onAnalyticsEvent || $[26] !== reservedGroups || $[27] !== t6 || $[28] !== t7) {
14213
+ t8 = /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorDialog, { open: t6, configController: collectionConfigController, isNewCollection: false, collectionInference, ...currentDialog, getData, reservedGroups, extraView, getUser, generateCollection, onAnalyticsEvent, handleClose: t7 });
14168
14214
  $[18] = collectionConfigController;
14169
14215
  $[19] = collectionInference;
14170
14216
  $[20] = currentDialog;
@@ -14172,12 +14218,13 @@
14172
14218
  $[22] = generateCollection;
14173
14219
  $[23] = getData;
14174
14220
  $[24] = getUser;
14175
- $[25] = reservedGroups;
14176
- $[26] = t6;
14177
- $[27] = t7;
14178
- $[28] = t8;
14221
+ $[25] = onAnalyticsEvent;
14222
+ $[26] = reservedGroups;
14223
+ $[27] = t6;
14224
+ $[28] = t7;
14225
+ $[29] = t8;
14179
14226
  } else {
14180
- t8 = $[28];
14227
+ t8 = $[29];
14181
14228
  }
14182
14229
  const t9 = Boolean(currentPropertyDialog);
14183
14230
  const t10 = Boolean(currentPropertyDialog?.propertyKey);
@@ -14185,7 +14232,7 @@
14185
14232
  const t12 = !currentPropertyDialog ? false : !currentPropertyDialog?.propertyKey;
14186
14233
  const t13 = currentPropertyDialog?.collectionEditable ?? false;
14187
14234
  let t14;
14188
- if ($[29] !== currentPropertyDialog || $[30] !== getData || $[31] !== navigation) {
14235
+ if ($[30] !== currentPropertyDialog || $[31] !== getData || $[32] !== navigation) {
14189
14236
  t14 = currentPropertyDialog?.existingEntities || getData && currentPropertyDialog?.editedCollectionId ? async () => {
14190
14237
  let data = [];
14191
14238
  if (currentPropertyDialog?.existingEntities) {
@@ -14199,15 +14246,15 @@
14199
14246
  }
14200
14247
  return data;
14201
14248
  } : void 0;
14202
- $[29] = currentPropertyDialog;
14203
- $[30] = getData;
14204
- $[31] = navigation;
14205
- $[32] = t14;
14249
+ $[30] = currentPropertyDialog;
14250
+ $[31] = getData;
14251
+ $[32] = navigation;
14252
+ $[33] = t14;
14206
14253
  } else {
14207
- t14 = $[32];
14254
+ t14 = $[33];
14208
14255
  }
14209
14256
  let t15;
14210
- if ($[33] !== collectionConfigController || $[34] !== currentPropertyDialog || $[35] !== snackbarController) {
14257
+ if ($[34] !== collectionConfigController || $[35] !== currentPropertyDialog || $[36] !== snackbarController) {
14211
14258
  t15 = (t162) => {
14212
14259
  const {
14213
14260
  id: id_0,
@@ -14236,15 +14283,15 @@
14236
14283
  return false;
14237
14284
  });
14238
14285
  };
14239
- $[33] = collectionConfigController;
14240
- $[34] = currentPropertyDialog;
14241
- $[35] = snackbarController;
14242
- $[36] = t15;
14286
+ $[34] = collectionConfigController;
14287
+ $[35] = currentPropertyDialog;
14288
+ $[36] = snackbarController;
14289
+ $[37] = t15;
14243
14290
  } else {
14244
- t15 = $[36];
14291
+ t15 = $[37];
14245
14292
  }
14246
14293
  let t16;
14247
- if ($[37] !== collectionConfigController || $[38] !== currentPropertyDialog?.currentPropertiesOrder || $[39] !== currentPropertyDialog?.editedCollectionId || $[40] !== currentPropertyDialog?.namespace || $[41] !== currentPropertyDialog?.parentCollectionIds || $[42] !== currentPropertyDialog?.propertyKey || $[43] !== snackbarController) {
14294
+ if ($[38] !== collectionConfigController || $[39] !== currentPropertyDialog?.currentPropertiesOrder || $[40] !== currentPropertyDialog?.editedCollectionId || $[41] !== currentPropertyDialog?.namespace || $[42] !== currentPropertyDialog?.parentCollectionIds || $[43] !== currentPropertyDialog?.propertyKey || $[44] !== snackbarController) {
14248
14295
  t16 = () => {
14249
14296
  if (!currentPropertyDialog?.propertyKey) {
14250
14297
  return;
@@ -14267,21 +14314,21 @@
14267
14314
  return false;
14268
14315
  });
14269
14316
  };
14270
- $[37] = collectionConfigController;
14271
- $[38] = currentPropertyDialog?.currentPropertiesOrder;
14272
- $[39] = currentPropertyDialog?.editedCollectionId;
14273
- $[40] = currentPropertyDialog?.namespace;
14274
- $[41] = currentPropertyDialog?.parentCollectionIds;
14275
- $[42] = currentPropertyDialog?.propertyKey;
14276
- $[43] = snackbarController;
14277
- $[44] = t16;
14317
+ $[38] = collectionConfigController;
14318
+ $[39] = currentPropertyDialog?.currentPropertiesOrder;
14319
+ $[40] = currentPropertyDialog?.editedCollectionId;
14320
+ $[41] = currentPropertyDialog?.namespace;
14321
+ $[42] = currentPropertyDialog?.parentCollectionIds;
14322
+ $[43] = currentPropertyDialog?.propertyKey;
14323
+ $[44] = snackbarController;
14324
+ $[45] = t16;
14278
14325
  } else {
14279
- t16 = $[44];
14326
+ t16 = $[45];
14280
14327
  }
14281
14328
  let t17;
14282
14329
  let t18;
14283
14330
  let t19;
14284
- if ($[45] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
14331
+ if ($[46] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
14285
14332
  t17 = () => {
14286
14333
  setCurrentPropertyDialog(void 0);
14287
14334
  };
@@ -14289,66 +14336,66 @@
14289
14336
  setCurrentPropertyDialog(void 0);
14290
14337
  };
14291
14338
  t19 = {};
14292
- $[45] = t17;
14293
- $[46] = t18;
14294
- $[47] = t19;
14339
+ $[46] = t17;
14340
+ $[47] = t18;
14341
+ $[48] = t19;
14295
14342
  } else {
14296
- t17 = $[45];
14297
- t18 = $[46];
14298
- t19 = $[47];
14343
+ t17 = $[46];
14344
+ t18 = $[47];
14345
+ t19 = $[48];
14299
14346
  }
14300
14347
  let t20;
14301
- if ($[48] !== currentPropertyDialog) {
14348
+ if ($[49] !== currentPropertyDialog) {
14302
14349
  t20 = currentPropertyDialog?.collection?.properties ? Object.keys(currentPropertyDialog.collection.properties) : [];
14303
- $[48] = currentPropertyDialog;
14304
- $[49] = t20;
14350
+ $[49] = currentPropertyDialog;
14351
+ $[50] = t20;
14305
14352
  } else {
14306
- t20 = $[49];
14353
+ t20 = $[50];
14307
14354
  }
14308
14355
  const t21 = currentPropertyDialog?.property;
14309
14356
  const t22 = currentPropertyDialog?.propertyKey;
14310
14357
  let t23;
14311
- if ($[50] !== propertyConfigs || $[51] !== t10 || $[52] !== t11 || $[53] !== t12 || $[54] !== t13 || $[55] !== t14 || $[56] !== t15 || $[57] !== t16 || $[58] !== t20 || $[59] !== t21 || $[60] !== t22 || $[61] !== t9) {
14358
+ if ($[51] !== propertyConfigs || $[52] !== t10 || $[53] !== t11 || $[54] !== t12 || $[55] !== t13 || $[56] !== t14 || $[57] !== t15 || $[58] !== t16 || $[59] !== t20 || $[60] !== t21 || $[61] !== t22 || $[62] !== t9) {
14312
14359
  t23 = /* @__PURE__ */ jsxRuntime.jsx(PropertyFormDialog, { open: t9, includeIdAndName: true, existingProperty: t10, autoUpdateId: t11, autoOpenTypeSelect: t12, inArray: false, collectionEditable: t13, getData: t14, onPropertyChanged: t15, onPropertyChangedImmediate: false, onDelete: t16, onError: _temp3, onOkClicked: t17, onCancel: t18, initialErrors: t19, forceShowErrors: false, existingPropertyKeys: t20, allowDataInference: true, propertyConfigs, property: t21, propertyKey: t22 });
14313
- $[50] = propertyConfigs;
14314
- $[51] = t10;
14315
- $[52] = t11;
14316
- $[53] = t12;
14317
- $[54] = t13;
14318
- $[55] = t14;
14319
- $[56] = t15;
14320
- $[57] = t16;
14321
- $[58] = t20;
14322
- $[59] = t21;
14323
- $[60] = t22;
14324
- $[61] = t9;
14325
- $[62] = t23;
14360
+ $[51] = propertyConfigs;
14361
+ $[52] = t10;
14362
+ $[53] = t11;
14363
+ $[54] = t12;
14364
+ $[55] = t13;
14365
+ $[56] = t14;
14366
+ $[57] = t15;
14367
+ $[58] = t16;
14368
+ $[59] = t20;
14369
+ $[60] = t21;
14370
+ $[61] = t22;
14371
+ $[62] = t9;
14372
+ $[63] = t23;
14326
14373
  } else {
14327
- t23 = $[62];
14374
+ t23 = $[63];
14328
14375
  }
14329
14376
  let t24;
14330
- if ($[63] !== children || $[64] !== t23 || $[65] !== t5 || $[66] !== t8) {
14377
+ if ($[64] !== children || $[65] !== t23 || $[66] !== t5 || $[67] !== t8) {
14331
14378
  t24 = /* @__PURE__ */ jsxRuntime.jsxs(CollectionEditorContext.Provider, { value: t5, children: [
14332
14379
  children,
14333
14380
  t8,
14334
14381
  t23
14335
14382
  ] });
14336
- $[63] = children;
14337
- $[64] = t23;
14338
- $[65] = t5;
14339
- $[66] = t8;
14340
- $[67] = t24;
14383
+ $[64] = children;
14384
+ $[65] = t23;
14385
+ $[66] = t5;
14386
+ $[67] = t8;
14387
+ $[68] = t24;
14341
14388
  } else {
14342
- t24 = $[67];
14389
+ t24 = $[68];
14343
14390
  }
14344
14391
  let t25;
14345
- if ($[68] !== collectionConfigController || $[69] !== t24) {
14392
+ if ($[69] !== collectionConfigController || $[70] !== t24) {
14346
14393
  t25 = /* @__PURE__ */ jsxRuntime.jsx(ConfigControllerContext.Provider, { value: collectionConfigController, children: t24 });
14347
- $[68] = collectionConfigController;
14348
- $[69] = t24;
14349
- $[70] = t25;
14394
+ $[69] = collectionConfigController;
14395
+ $[70] = t24;
14396
+ $[71] = t25;
14350
14397
  } else {
14351
- t25 = $[70];
14398
+ t25 = $[71];
14352
14399
  }
14353
14400
  return t25;
14354
14401
  }, equal);