@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.es.js +372 -325
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +371 -324
- package/dist/index.umd.js.map +1 -1
- package/dist/ui/collection_editor/AICollectionGeneratorPopover.d.ts +5 -1
- package/dist/ui/collection_editor/CollectionEditorDialog.d.ts +4 -0
- package/dist/ui/collection_editor/CollectionEditorWelcomeView.d.ts +2 -1
- package/package.json +12 -12
- package/src/ConfigControllerProvider.tsx +1 -0
- package/src/ui/collection_editor/AICollectionGeneratorPopover.tsx +18 -1
- package/src/ui/collection_editor/CollectionDetailsForm.tsx +3 -2
- package/src/ui/collection_editor/CollectionEditorDialog.tsx +13 -4
- package/src/ui/collection_editor/CollectionEditorWelcomeView.tsx +4 -1
- package/src/ui/collection_editor/GeneralSettingsForm.tsx +9 -7
- package/src/ui/collection_editor/PropertyEditView.tsx +1 -1
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(
|
|
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
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
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
|
-
|
|
443
|
+
t59 = $[97];
|
|
434
444
|
}
|
|
435
|
-
const t59 = values.history === void 0 ? null : values.history;
|
|
436
445
|
let t60;
|
|
437
|
-
if ($[
|
|
438
|
-
t60 =
|
|
439
|
-
$[
|
|
440
|
-
$[
|
|
441
|
-
|
|
442
|
-
$[
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
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
|
-
$[
|
|
471
|
+
$[104] = t63;
|
|
454
472
|
} else {
|
|
455
|
-
|
|
473
|
+
t63 = $[104];
|
|
456
474
|
}
|
|
457
|
-
let
|
|
458
|
-
if ($[
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
475
|
+
let t64;
|
|
476
|
+
if ($[105] !== t62) {
|
|
477
|
+
t64 = /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
478
|
+
t62,
|
|
479
|
+
t63
|
|
462
480
|
] });
|
|
463
|
-
$[
|
|
464
|
-
$[
|
|
481
|
+
$[105] = t62;
|
|
482
|
+
$[106] = t64;
|
|
465
483
|
} else {
|
|
466
|
-
|
|
484
|
+
t64 = $[106];
|
|
467
485
|
}
|
|
468
|
-
const
|
|
469
|
-
let
|
|
470
|
-
if ($[
|
|
471
|
-
|
|
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
|
-
$[
|
|
488
|
-
$[
|
|
505
|
+
$[107] = setFieldValue;
|
|
506
|
+
$[108] = t66;
|
|
489
507
|
} else {
|
|
490
|
-
|
|
508
|
+
t66 = $[108];
|
|
491
509
|
}
|
|
492
|
-
const
|
|
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 ($[
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
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] !==
|
|
531
|
-
t71 = /* @__PURE__ */ jsxRuntime.jsxs("
|
|
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
|
-
$[
|
|
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]
|
|
542
|
-
t72 = (
|
|
543
|
-
$[116] =
|
|
544
|
-
|
|
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
|
-
|
|
556
|
+
t73 = $[118];
|
|
547
557
|
}
|
|
548
|
-
const t73 = values.textSearchEnabled ?? false;
|
|
549
558
|
let t74;
|
|
550
|
-
if ($[
|
|
551
|
-
t74 = /* @__PURE__ */ jsxRuntime.
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
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 = $[
|
|
566
|
+
t74 = $[119];
|
|
557
567
|
}
|
|
558
568
|
let t75;
|
|
559
|
-
if ($[
|
|
560
|
-
t75 =
|
|
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
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
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
|
-
|
|
584
|
+
t77 = $[124];
|
|
575
585
|
}
|
|
576
|
-
let
|
|
577
|
-
if ($[
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
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
|
-
$[
|
|
584
|
-
$[
|
|
585
|
-
$[126] = t76;
|
|
586
|
-
$[127] = t77;
|
|
599
|
+
$[126] = t77;
|
|
600
|
+
$[127] = t79;
|
|
587
601
|
} else {
|
|
588
|
-
|
|
602
|
+
t79 = $[127];
|
|
589
603
|
}
|
|
590
|
-
let
|
|
591
|
-
if ($[128]
|
|
592
|
-
|
|
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
|
-
$[
|
|
623
|
+
$[132] = t81;
|
|
596
624
|
} else {
|
|
597
|
-
|
|
625
|
+
t81 = $[132];
|
|
598
626
|
}
|
|
599
|
-
const
|
|
600
|
-
let
|
|
601
|
-
if ($[
|
|
602
|
-
|
|
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
|
-
$[
|
|
607
|
-
$[
|
|
634
|
+
$[133] = setFieldValue;
|
|
635
|
+
$[134] = t83;
|
|
608
636
|
} else {
|
|
609
|
-
|
|
637
|
+
t83 = $[134];
|
|
610
638
|
}
|
|
611
|
-
let
|
|
612
|
-
if ($[
|
|
613
|
-
|
|
614
|
-
$[
|
|
615
|
-
$[
|
|
616
|
-
$[
|
|
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
|
-
|
|
646
|
+
t84 = $[137];
|
|
619
647
|
}
|
|
620
|
-
let
|
|
621
|
-
if ($[
|
|
622
|
-
|
|
623
|
-
$[
|
|
624
|
-
$[
|
|
625
|
-
$[
|
|
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
|
-
|
|
655
|
+
t85 = $[140];
|
|
628
656
|
}
|
|
629
|
-
let
|
|
630
|
-
if ($[
|
|
631
|
-
|
|
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
|
-
|
|
635
|
-
|
|
636
|
-
|
|
662
|
+
t80,
|
|
663
|
+
t81,
|
|
664
|
+
t85
|
|
637
665
|
] }) });
|
|
638
|
-
$[
|
|
639
|
-
$[
|
|
640
|
-
$[
|
|
641
|
-
$[
|
|
642
|
-
$[
|
|
666
|
+
$[141] = t12;
|
|
667
|
+
$[142] = t55;
|
|
668
|
+
$[143] = t80;
|
|
669
|
+
$[144] = t85;
|
|
670
|
+
$[145] = t86;
|
|
643
671
|
} else {
|
|
644
|
-
|
|
672
|
+
t86 = $[145];
|
|
645
673
|
}
|
|
646
|
-
return
|
|
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(
|
|
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] !==
|
|
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] =
|
|
12521
|
-
$[9] =
|
|
12522
|
-
$[10] =
|
|
12562
|
+
$[8] = onAnalyticsEvent;
|
|
12563
|
+
$[9] = onContinue;
|
|
12564
|
+
$[10] = setValues;
|
|
12565
|
+
$[11] = t9;
|
|
12523
12566
|
} else {
|
|
12524
|
-
t9 = $[
|
|
12567
|
+
t9 = $[11];
|
|
12525
12568
|
}
|
|
12526
12569
|
let t10;
|
|
12527
|
-
if ($[
|
|
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
|
-
$[
|
|
12572
|
+
$[12] = t10;
|
|
12530
12573
|
} else {
|
|
12531
|
-
t10 = $[
|
|
12574
|
+
t10 = $[12];
|
|
12532
12575
|
}
|
|
12533
12576
|
let t11;
|
|
12534
|
-
if ($[
|
|
12577
|
+
if ($[13] !== setJsonImportOpen) {
|
|
12535
12578
|
t11 = () => setJsonImportOpen(true);
|
|
12536
|
-
$[
|
|
12537
|
-
$[
|
|
12579
|
+
$[13] = setJsonImportOpen;
|
|
12580
|
+
$[14] = t11;
|
|
12538
12581
|
} else {
|
|
12539
|
-
t11 = $[
|
|
12582
|
+
t11 = $[14];
|
|
12540
12583
|
}
|
|
12541
12584
|
let t12;
|
|
12542
|
-
if ($[
|
|
12585
|
+
if ($[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
12543
12586
|
t12 = /* @__PURE__ */ jsxRuntime.jsx(ui.CodeIcon, { size: "small" });
|
|
12544
|
-
$[
|
|
12587
|
+
$[15] = t12;
|
|
12545
12588
|
} else {
|
|
12546
|
-
t12 = $[
|
|
12589
|
+
t12 = $[15];
|
|
12547
12590
|
}
|
|
12548
12591
|
let t13;
|
|
12549
|
-
if ($[
|
|
12592
|
+
if ($[16] !== t11) {
|
|
12550
12593
|
t13 = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "outlined", onClick: t11, startIcon: t12, children: "Paste JSON Configuration" });
|
|
12551
|
-
$[
|
|
12552
|
-
$[
|
|
12594
|
+
$[16] = t11;
|
|
12595
|
+
$[17] = t13;
|
|
12553
12596
|
} else {
|
|
12554
|
-
t13 = $[
|
|
12597
|
+
t13 = $[17];
|
|
12555
12598
|
}
|
|
12556
12599
|
let t14;
|
|
12557
|
-
if ($[
|
|
12600
|
+
if ($[18] !== setJsonImportOpen) {
|
|
12558
12601
|
t14 = () => setJsonImportOpen(false);
|
|
12559
|
-
$[
|
|
12560
|
-
$[
|
|
12602
|
+
$[18] = setJsonImportOpen;
|
|
12603
|
+
$[19] = t14;
|
|
12561
12604
|
} else {
|
|
12562
|
-
t14 = $[
|
|
12605
|
+
t14 = $[19];
|
|
12563
12606
|
}
|
|
12564
12607
|
let t15;
|
|
12565
|
-
if ($[
|
|
12608
|
+
if ($[20] !== onContinue || $[21] !== setValues) {
|
|
12566
12609
|
t15 = (collection) => {
|
|
12567
12610
|
setValues(collection);
|
|
12568
12611
|
onContinue();
|
|
12569
12612
|
};
|
|
12570
|
-
$[
|
|
12571
|
-
$[
|
|
12572
|
-
$[
|
|
12613
|
+
$[20] = onContinue;
|
|
12614
|
+
$[21] = setValues;
|
|
12615
|
+
$[22] = t15;
|
|
12573
12616
|
} else {
|
|
12574
|
-
t15 = $[
|
|
12617
|
+
t15 = $[22];
|
|
12575
12618
|
}
|
|
12576
12619
|
let t16;
|
|
12577
|
-
if ($[
|
|
12620
|
+
if ($[23] !== jsonImportOpen || $[24] !== t14 || $[25] !== t15) {
|
|
12578
12621
|
t16 = /* @__PURE__ */ jsxRuntime.jsx(CollectionJsonImportDialog, { open: jsonImportOpen, onClose: t14, onImport: t15 });
|
|
12579
|
-
$[
|
|
12580
|
-
$[
|
|
12581
|
-
$[
|
|
12582
|
-
$[
|
|
12622
|
+
$[23] = jsonImportOpen;
|
|
12623
|
+
$[24] = t14;
|
|
12624
|
+
$[25] = t15;
|
|
12625
|
+
$[26] = t16;
|
|
12583
12626
|
} else {
|
|
12584
|
-
t16 = $[
|
|
12627
|
+
t16 = $[26];
|
|
12585
12628
|
}
|
|
12586
12629
|
let t17;
|
|
12587
|
-
if ($[
|
|
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
|
-
$[
|
|
12594
|
-
$[
|
|
12595
|
-
$[
|
|
12636
|
+
$[27] = t13;
|
|
12637
|
+
$[28] = t16;
|
|
12638
|
+
$[29] = t17;
|
|
12596
12639
|
} else {
|
|
12597
|
-
t17 = $[
|
|
12640
|
+
t17 = $[29];
|
|
12598
12641
|
}
|
|
12599
12642
|
let t18;
|
|
12600
|
-
if ($[
|
|
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
|
-
$[
|
|
12606
|
-
$[
|
|
12607
|
-
$[
|
|
12648
|
+
$[30] = t17;
|
|
12649
|
+
$[31] = t9;
|
|
12650
|
+
$[32] = t18;
|
|
12608
12651
|
} else {
|
|
12609
|
-
t18 = $[
|
|
12652
|
+
t18 = $[32];
|
|
12610
12653
|
}
|
|
12611
12654
|
let t19;
|
|
12612
|
-
if ($[
|
|
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
|
-
$[
|
|
12618
|
-
$[
|
|
12619
|
-
$[
|
|
12660
|
+
$[33] = onContinue;
|
|
12661
|
+
$[34] = parentCollection;
|
|
12662
|
+
$[35] = t19;
|
|
12620
12663
|
} else {
|
|
12621
|
-
t19 = $[
|
|
12664
|
+
t19 = $[35];
|
|
12622
12665
|
}
|
|
12623
12666
|
let t20;
|
|
12624
|
-
if ($[
|
|
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
|
-
$[
|
|
12669
|
+
$[36] = t20;
|
|
12627
12670
|
} else {
|
|
12628
|
-
t20 = $[
|
|
12671
|
+
t20 = $[36];
|
|
12629
12672
|
}
|
|
12630
12673
|
let t21;
|
|
12631
|
-
if ($[
|
|
12674
|
+
if ($[37] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
12632
12675
|
t21 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: productsCollectionTemplate.icon });
|
|
12633
|
-
$[
|
|
12676
|
+
$[37] = t21;
|
|
12634
12677
|
} else {
|
|
12635
|
-
t21 = $[
|
|
12678
|
+
t21 = $[37];
|
|
12636
12679
|
}
|
|
12637
12680
|
let t22;
|
|
12638
|
-
if ($[
|
|
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
|
-
$[
|
|
12644
|
-
$[
|
|
12645
|
-
$[
|
|
12686
|
+
$[38] = onContinue;
|
|
12687
|
+
$[39] = setValues;
|
|
12688
|
+
$[40] = t22;
|
|
12646
12689
|
} else {
|
|
12647
|
-
t22 = $[
|
|
12690
|
+
t22 = $[40];
|
|
12648
12691
|
}
|
|
12649
12692
|
let t23;
|
|
12650
|
-
if ($[
|
|
12693
|
+
if ($[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
12651
12694
|
t23 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: usersCollectionTemplate.icon });
|
|
12652
|
-
$[
|
|
12695
|
+
$[41] = t23;
|
|
12653
12696
|
} else {
|
|
12654
|
-
t23 = $[
|
|
12697
|
+
t23 = $[41];
|
|
12655
12698
|
}
|
|
12656
12699
|
let t24;
|
|
12657
|
-
if ($[
|
|
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
|
-
$[
|
|
12663
|
-
$[
|
|
12664
|
-
$[
|
|
12705
|
+
$[42] = onContinue;
|
|
12706
|
+
$[43] = setValues;
|
|
12707
|
+
$[44] = t24;
|
|
12665
12708
|
} else {
|
|
12666
|
-
t24 = $[
|
|
12709
|
+
t24 = $[44];
|
|
12667
12710
|
}
|
|
12668
12711
|
let t25;
|
|
12669
|
-
if ($[
|
|
12712
|
+
if ($[45] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
12670
12713
|
t25 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: blogCollectionTemplate.icon });
|
|
12671
|
-
$[
|
|
12714
|
+
$[45] = t25;
|
|
12672
12715
|
} else {
|
|
12673
|
-
t25 = $[
|
|
12716
|
+
t25 = $[45];
|
|
12674
12717
|
}
|
|
12675
12718
|
let t26;
|
|
12676
|
-
if ($[
|
|
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
|
-
$[
|
|
12682
|
-
$[
|
|
12683
|
-
$[
|
|
12724
|
+
$[46] = onContinue;
|
|
12725
|
+
$[47] = setValues;
|
|
12726
|
+
$[48] = t26;
|
|
12684
12727
|
} else {
|
|
12685
|
-
t26 = $[
|
|
12728
|
+
t26 = $[48];
|
|
12686
12729
|
}
|
|
12687
12730
|
let t27;
|
|
12688
|
-
if ($[
|
|
12731
|
+
if ($[49] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
12689
12732
|
t27 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: pagesCollectionTemplate.icon });
|
|
12690
|
-
$[
|
|
12733
|
+
$[49] = t27;
|
|
12691
12734
|
} else {
|
|
12692
|
-
t27 = $[
|
|
12735
|
+
t27 = $[49];
|
|
12693
12736
|
}
|
|
12694
12737
|
let t28;
|
|
12695
|
-
if ($[
|
|
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
|
-
$[
|
|
12701
|
-
$[
|
|
12702
|
-
$[
|
|
12743
|
+
$[50] = onContinue;
|
|
12744
|
+
$[51] = setValues;
|
|
12745
|
+
$[52] = t28;
|
|
12703
12746
|
} else {
|
|
12704
|
-
t28 = $[
|
|
12747
|
+
t28 = $[52];
|
|
12705
12748
|
}
|
|
12706
12749
|
let t29;
|
|
12707
|
-
if ($[
|
|
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
|
-
$[
|
|
12718
|
-
$[
|
|
12719
|
-
$[
|
|
12720
|
-
$[
|
|
12721
|
-
$[
|
|
12760
|
+
$[53] = t22;
|
|
12761
|
+
$[54] = t24;
|
|
12762
|
+
$[55] = t26;
|
|
12763
|
+
$[56] = t28;
|
|
12764
|
+
$[57] = t29;
|
|
12722
12765
|
} else {
|
|
12723
|
-
t29 = $[
|
|
12766
|
+
t29 = $[57];
|
|
12724
12767
|
}
|
|
12725
12768
|
let t30;
|
|
12726
|
-
if ($[
|
|
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
|
-
$[
|
|
12736
|
-
$[
|
|
12737
|
-
$[
|
|
12738
|
-
$[
|
|
12739
|
-
$[
|
|
12740
|
-
$[
|
|
12741
|
-
$[
|
|
12742
|
-
$[
|
|
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 = $[
|
|
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
|
-
|
|
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(
|
|
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] !==
|
|
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] =
|
|
14176
|
-
$[26] =
|
|
14177
|
-
$[27] =
|
|
14178
|
-
$[28] =
|
|
14221
|
+
$[25] = onAnalyticsEvent;
|
|
14222
|
+
$[26] = reservedGroups;
|
|
14223
|
+
$[27] = t6;
|
|
14224
|
+
$[28] = t7;
|
|
14225
|
+
$[29] = t8;
|
|
14179
14226
|
} else {
|
|
14180
|
-
t8 = $[
|
|
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 ($[
|
|
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
|
-
$[
|
|
14203
|
-
$[
|
|
14204
|
-
$[
|
|
14205
|
-
$[
|
|
14249
|
+
$[30] = currentPropertyDialog;
|
|
14250
|
+
$[31] = getData;
|
|
14251
|
+
$[32] = navigation;
|
|
14252
|
+
$[33] = t14;
|
|
14206
14253
|
} else {
|
|
14207
|
-
t14 = $[
|
|
14254
|
+
t14 = $[33];
|
|
14208
14255
|
}
|
|
14209
14256
|
let t15;
|
|
14210
|
-
if ($[
|
|
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
|
-
$[
|
|
14240
|
-
$[
|
|
14241
|
-
$[
|
|
14242
|
-
$[
|
|
14286
|
+
$[34] = collectionConfigController;
|
|
14287
|
+
$[35] = currentPropertyDialog;
|
|
14288
|
+
$[36] = snackbarController;
|
|
14289
|
+
$[37] = t15;
|
|
14243
14290
|
} else {
|
|
14244
|
-
t15 = $[
|
|
14291
|
+
t15 = $[37];
|
|
14245
14292
|
}
|
|
14246
14293
|
let t16;
|
|
14247
|
-
if ($[
|
|
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
|
-
$[
|
|
14271
|
-
$[
|
|
14272
|
-
$[
|
|
14273
|
-
$[
|
|
14274
|
-
$[
|
|
14275
|
-
$[
|
|
14276
|
-
$[
|
|
14277
|
-
$[
|
|
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 = $[
|
|
14326
|
+
t16 = $[45];
|
|
14280
14327
|
}
|
|
14281
14328
|
let t17;
|
|
14282
14329
|
let t18;
|
|
14283
14330
|
let t19;
|
|
14284
|
-
if ($[
|
|
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
|
-
$[
|
|
14293
|
-
$[
|
|
14294
|
-
$[
|
|
14339
|
+
$[46] = t17;
|
|
14340
|
+
$[47] = t18;
|
|
14341
|
+
$[48] = t19;
|
|
14295
14342
|
} else {
|
|
14296
|
-
t17 = $[
|
|
14297
|
-
t18 = $[
|
|
14298
|
-
t19 = $[
|
|
14343
|
+
t17 = $[46];
|
|
14344
|
+
t18 = $[47];
|
|
14345
|
+
t19 = $[48];
|
|
14299
14346
|
}
|
|
14300
14347
|
let t20;
|
|
14301
|
-
if ($[
|
|
14348
|
+
if ($[49] !== currentPropertyDialog) {
|
|
14302
14349
|
t20 = currentPropertyDialog?.collection?.properties ? Object.keys(currentPropertyDialog.collection.properties) : [];
|
|
14303
|
-
$[
|
|
14304
|
-
$[
|
|
14350
|
+
$[49] = currentPropertyDialog;
|
|
14351
|
+
$[50] = t20;
|
|
14305
14352
|
} else {
|
|
14306
|
-
t20 = $[
|
|
14353
|
+
t20 = $[50];
|
|
14307
14354
|
}
|
|
14308
14355
|
const t21 = currentPropertyDialog?.property;
|
|
14309
14356
|
const t22 = currentPropertyDialog?.propertyKey;
|
|
14310
14357
|
let t23;
|
|
14311
|
-
if ($[
|
|
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
|
-
$[
|
|
14314
|
-
$[
|
|
14315
|
-
$[
|
|
14316
|
-
$[
|
|
14317
|
-
$[
|
|
14318
|
-
$[
|
|
14319
|
-
$[
|
|
14320
|
-
$[
|
|
14321
|
-
$[
|
|
14322
|
-
$[
|
|
14323
|
-
$[
|
|
14324
|
-
$[
|
|
14325
|
-
$[
|
|
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 = $[
|
|
14374
|
+
t23 = $[63];
|
|
14328
14375
|
}
|
|
14329
14376
|
let t24;
|
|
14330
|
-
if ($[
|
|
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
|
-
$[
|
|
14337
|
-
$[
|
|
14338
|
-
$[
|
|
14339
|
-
$[
|
|
14340
|
-
$[
|
|
14383
|
+
$[64] = children;
|
|
14384
|
+
$[65] = t23;
|
|
14385
|
+
$[66] = t5;
|
|
14386
|
+
$[67] = t8;
|
|
14387
|
+
$[68] = t24;
|
|
14341
14388
|
} else {
|
|
14342
|
-
t24 = $[
|
|
14389
|
+
t24 = $[68];
|
|
14343
14390
|
}
|
|
14344
14391
|
let t25;
|
|
14345
|
-
if ($[
|
|
14392
|
+
if ($[69] !== collectionConfigController || $[70] !== t24) {
|
|
14346
14393
|
t25 = /* @__PURE__ */ jsxRuntime.jsx(ConfigControllerContext.Provider, { value: collectionConfigController, children: t24 });
|
|
14347
|
-
$[
|
|
14348
|
-
$[
|
|
14349
|
-
$[
|
|
14394
|
+
$[69] = collectionConfigController;
|
|
14395
|
+
$[70] = t24;
|
|
14396
|
+
$[71] = t25;
|
|
14350
14397
|
} else {
|
|
14351
|
-
t25 = $[
|
|
14398
|
+
t25 = $[71];
|
|
14352
14399
|
}
|
|
14353
14400
|
return t25;
|
|
14354
14401
|
}, equal);
|