@sparrowengg/integrations-templates-frontend 1.9.67 → 1.9.69
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/cjs/_virtual/index10.js +2 -2
- package/dist/cjs/_virtual/index9.js +2 -2
- package/dist/cjs/integration-template/components/dashboard.js +305 -175
- package/dist/cjs/integration-template/components/dashboard.js.map +1 -1
- package/dist/cjs/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +1 -1
- package/dist/cjs/node_modules/html-dom-parser/node_modules/domutils/lib/index.js +1 -1
- package/dist/cjs/node_modules/html-dom-parser/node_modules/htmlparser2/lib/index.js +1 -1
- package/dist/cjs/single-mapping/components/mapping.js +14 -8
- package/dist/cjs/single-mapping/components/mapping.js.map +1 -1
- package/dist/cjs/single-mapping/index.js +204 -73
- package/dist/cjs/single-mapping/index.js.map +1 -1
- package/dist/es/_virtual/index10.js +2 -2
- package/dist/es/_virtual/index9.js +2 -2
- package/dist/es/integration-template/components/dashboard.js +305 -175
- package/dist/es/integration-template/components/dashboard.js.map +1 -1
- package/dist/es/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +1 -1
- package/dist/es/node_modules/html-dom-parser/node_modules/domutils/lib/index.js +1 -1
- package/dist/es/node_modules/html-dom-parser/node_modules/htmlparser2/lib/index.js +1 -1
- package/dist/es/single-mapping/components/mapping.js +14 -8
- package/dist/es/single-mapping/components/mapping.js.map +1 -1
- package/dist/es/single-mapping/index.js +204 -73
- package/dist/es/single-mapping/index.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/package.json +1 -1
|
@@ -58,8 +58,8 @@ const Dashboard = ({
|
|
|
58
58
|
justifyContent: "space-between",
|
|
59
59
|
alignItems: "center"
|
|
60
60
|
},
|
|
61
|
-
/* @__PURE__ */ React__default.createElement(Flex, { flexDirection: "column", gap: "$2" }, /* @__PURE__ */ React__default.createElement(Heading, { size: "h5" }, integrationName), /* @__PURE__ */ React__default.createElement(Text, { size: "sm", css: { color: "$
|
|
62
|
-
/* @__PURE__ */ React__default.createElement(Flex, { alignItems: "center", gap: "$4" }, hasMultiAccounts && /* @__PURE__ */ React__default.createElement(Button, { size: "lg", color: "default", leftIcon: /* @__PURE__ */ React__default.createElement(PlusIcon, null) }, "Add Account"), /* @__PURE__ */ React__default.createElement(DropdownMenu, null, /* @__PURE__ */ React__default.createElement(
|
|
61
|
+
/* @__PURE__ */ React__default.createElement(Flex, { flexDirection: "column", gap: "$2" }, /* @__PURE__ */ React__default.createElement(Heading, { size: "h5" }, integrationName), /* @__PURE__ */ React__default.createElement(Text, { size: "sm", css: { color: "$neutral700" } }, dashboardDescription)),
|
|
62
|
+
/* @__PURE__ */ React__default.createElement(Flex, { alignItems: "center", gap: "$4" }, hasMultiAccounts && /* @__PURE__ */ React__default.createElement(Button, { size: "lg", color: "default", leftIcon: /* @__PURE__ */ React__default.createElement(PlusIcon, null) }, "Add Account"), hasDropdownComponents.mapping && !hasDropdownComponents.trigger ? /* @__PURE__ */ React__default.createElement(Button, { size: "lg", color: "primary", leftIcon: /* @__PURE__ */ React__default.createElement(PlusIcon, null), onClick: () => handleConfigurationType("MAPPING") }, "New Mapping") : null, hasDropdownComponents.trigger && hasDropdownComponents.mapping ? /* @__PURE__ */ React__default.createElement(DropdownMenu, null, /* @__PURE__ */ React__default.createElement(
|
|
63
63
|
Tooltip,
|
|
64
64
|
{
|
|
65
65
|
content: !triggerEnabled && !mappingEnabled ? "You have reached the maximum limit for creating triggers/mappings" : ""
|
|
@@ -79,10 +79,14 @@ const Dashboard = ({
|
|
|
79
79
|
className: "dm-sans",
|
|
80
80
|
sideOffset: 4,
|
|
81
81
|
align: "start",
|
|
82
|
-
css: {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
css: {
|
|
83
|
+
maxWidth: 240,
|
|
84
|
+
zIndex: 10,
|
|
85
|
+
"& p": {
|
|
86
|
+
margin: "0 !important",
|
|
87
|
+
padding: "0 !important"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
86
90
|
},
|
|
87
91
|
hasDropdownComponents.trigger ? /* @__PURE__ */ React__default.createElement(
|
|
88
92
|
DropdownItem,
|
|
@@ -106,7 +110,7 @@ const Dashboard = ({
|
|
|
106
110
|
onClickHandler: () => handleConfigurationType("MAPPING")
|
|
107
111
|
}
|
|
108
112
|
) : null
|
|
109
|
-
)))
|
|
113
|
+
)) : null)
|
|
110
114
|
), /* @__PURE__ */ React__default.createElement(
|
|
111
115
|
Box,
|
|
112
116
|
{
|
|
@@ -418,23 +422,25 @@ const SingleAccountDashboard = ({
|
|
|
418
422
|
deleteFieldHandler
|
|
419
423
|
}
|
|
420
424
|
);
|
|
421
|
-
})) : null, ((_c = mappingFields == null ? void 0 : mappingFields.mappedFields) == null ? void 0 : _c.type) === "SINGLE_MAPPING" && !!((_e = (_d = mappingFields == null ? void 0 : mappingFields.mappedFields) == null ? void 0 : _d.fields) == null ? void 0 : _e.length) ? /* @__PURE__ */ React__default.createElement(Box, { css: { marginTop: !(triggerFields == null ? void 0 : triggerFields.length) ? "$20" : "$8" } }, (_g = (_f = mappingFields == null ? void 0 : mappingFields.mappedFields) == null ? void 0 : _f.fields) == null ? void 0 : _g.map(
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
425
|
+
})) : null, ((_c = mappingFields == null ? void 0 : mappingFields.mappedFields) == null ? void 0 : _c.type) === "SINGLE_MAPPING" && !!((_e = (_d = mappingFields == null ? void 0 : mappingFields.mappedFields) == null ? void 0 : _d.fields) == null ? void 0 : _e.length) ? /* @__PURE__ */ React__default.createElement(Box, { css: { marginTop: !(triggerFields == null ? void 0 : triggerFields.length) ? "$20" : "$8" } }, (_g = (_f = mappingFields == null ? void 0 : mappingFields.mappedFields) == null ? void 0 : _f.fields) == null ? void 0 : _g.map(
|
|
426
|
+
(field, index) => {
|
|
427
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
428
|
+
SingleMappingDashboardItem,
|
|
429
|
+
{
|
|
430
|
+
onMappingEditHandler,
|
|
431
|
+
syncMapping,
|
|
432
|
+
field,
|
|
433
|
+
key: field == null ? void 0 : field.id,
|
|
434
|
+
integrationName,
|
|
435
|
+
icon: /* @__PURE__ */ React__default.createElement(MappingIcon, { size: 32, color: "#56B0BB" }),
|
|
436
|
+
handleEditField,
|
|
437
|
+
handleDashboardPage,
|
|
438
|
+
toggleDashboardField,
|
|
439
|
+
deleteFieldHandler
|
|
440
|
+
}
|
|
441
|
+
);
|
|
442
|
+
}
|
|
443
|
+
)) : null);
|
|
438
444
|
};
|
|
439
445
|
const TriggerDasboardItem = ({
|
|
440
446
|
isDraft,
|
|
@@ -476,7 +482,12 @@ const TriggerDasboardItem = ({
|
|
|
476
482
|
Flex,
|
|
477
483
|
{
|
|
478
484
|
flexDirection: "column",
|
|
479
|
-
css: {
|
|
485
|
+
css: {
|
|
486
|
+
width: "100%",
|
|
487
|
+
height: "100%",
|
|
488
|
+
overflow: "auto",
|
|
489
|
+
marginTop: "$8"
|
|
490
|
+
}
|
|
480
491
|
},
|
|
481
492
|
/* @__PURE__ */ React__default.createElement(
|
|
482
493
|
Flex,
|
|
@@ -551,10 +562,14 @@ const TriggerDasboardItem = ({
|
|
|
551
562
|
DropdownMenuContent,
|
|
552
563
|
{
|
|
553
564
|
className: "dm-sans",
|
|
554
|
-
css: {
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
565
|
+
css: {
|
|
566
|
+
minWidth: 180,
|
|
567
|
+
zIndex: 10,
|
|
568
|
+
"& p": {
|
|
569
|
+
margin: "0 !important",
|
|
570
|
+
padding: "0 !important"
|
|
571
|
+
}
|
|
572
|
+
},
|
|
558
573
|
sideOffset: 4,
|
|
559
574
|
align: "end"
|
|
560
575
|
},
|
|
@@ -575,9 +590,16 @@ const TriggerDasboardItem = ({
|
|
|
575
590
|
},
|
|
576
591
|
/* @__PURE__ */ React__default.createElement(Flex, { alignItems: "center", gap: "$2" }, /* @__PURE__ */ React__default.createElement(PencilIcon, { color: "#6A6A6A", size: 20 }), /* @__PURE__ */ React__default.createElement(Text, { size: "sm" }, "Edit"))
|
|
577
592
|
),
|
|
578
|
-
/* @__PURE__ */ React__default.createElement(
|
|
579
|
-
|
|
580
|
-
|
|
593
|
+
/* @__PURE__ */ React__default.createElement(
|
|
594
|
+
DropdownMenuItem,
|
|
595
|
+
{
|
|
596
|
+
onClick: () => setIsDeleteModalOpen(true),
|
|
597
|
+
css: {
|
|
598
|
+
cursor: "pointer"
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
/* @__PURE__ */ React__default.createElement(Flex, { alignItems: "center", gap: "$2" }, /* @__PURE__ */ React__default.createElement(DeleteIcon, { color: "#6A6A6A", size: 20 }), /* @__PURE__ */ React__default.createElement(Text, { size: "sm" }, "Delete"))
|
|
602
|
+
)
|
|
581
603
|
)))
|
|
582
604
|
),
|
|
583
605
|
isMappingDisplayed && /* @__PURE__ */ React__default.createElement(
|
|
@@ -620,7 +642,9 @@ const TriggerDasboardItem = ({
|
|
|
620
642
|
}
|
|
621
643
|
}
|
|
622
644
|
)) : null,
|
|
623
|
-
((_e = (_d = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _d.variables) == null ? void 0 : _e.filter(
|
|
645
|
+
((_e = (_d = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _d.variables) == null ? void 0 : _e.filter(
|
|
646
|
+
(variable) => variable.isEnabled
|
|
647
|
+
).length) ? /* @__PURE__ */ React__default.createElement(
|
|
624
648
|
SingleMappingChipWrapper,
|
|
625
649
|
{
|
|
626
650
|
heading: ((_g = (_f = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _f.variables) == null ? void 0 : _g.length) > 1 ? "PASSING VARIABLES TO SURVEY" : "PASSING VARIABLE TO SURVEY",
|
|
@@ -628,27 +652,36 @@ const TriggerDasboardItem = ({
|
|
|
628
652
|
backgroundColor: "$positive100"
|
|
629
653
|
}
|
|
630
654
|
) : null,
|
|
631
|
-
/* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
|
|
632
|
-
|
|
633
|
-
{
|
|
634
|
-
heading: "Share Type:",
|
|
635
|
-
description: (_k = (_j = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _j.shareType) == null ? void 0 : _k.label
|
|
636
|
-
}
|
|
637
|
-
) : null, ((_m = (_l = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _l.shareRecipient) == null ? void 0 : _m.value) ? /* @__PURE__ */ React__default.createElement(
|
|
638
|
-
EventComponent,
|
|
639
|
-
{
|
|
640
|
-
heading: "Recipient:",
|
|
641
|
-
hasBorder: true,
|
|
642
|
-
description: (_o = (_n = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _n.shareRecipient) == null ? void 0 : _o.label
|
|
643
|
-
}
|
|
644
|
-
) : null, ((_q = (_p = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _p.shareChannel) == null ? void 0 : _q.value) ? /* @__PURE__ */ React__default.createElement(
|
|
645
|
-
EventComponent,
|
|
655
|
+
/* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
|
|
656
|
+
Flex,
|
|
646
657
|
{
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
}
|
|
651
|
-
|
|
658
|
+
flexDirection: "column",
|
|
659
|
+
gap: "$6",
|
|
660
|
+
css: { paddingBlock: "$8" }
|
|
661
|
+
},
|
|
662
|
+
/* @__PURE__ */ React__default.createElement(Text, { size: "sm", weight: "bold" }, "SEND SURVEY"),
|
|
663
|
+
/* @__PURE__ */ React__default.createElement(Flex, { alignItems: "center" }, ((_i = (_h = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _h.shareType) == null ? void 0 : _i.value) ? /* @__PURE__ */ React__default.createElement(
|
|
664
|
+
EventComponent,
|
|
665
|
+
{
|
|
666
|
+
heading: "Share Type:",
|
|
667
|
+
description: (_k = (_j = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _j.shareType) == null ? void 0 : _k.label
|
|
668
|
+
}
|
|
669
|
+
) : null, ((_m = (_l = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _l.shareRecipient) == null ? void 0 : _m.value) ? /* @__PURE__ */ React__default.createElement(
|
|
670
|
+
EventComponent,
|
|
671
|
+
{
|
|
672
|
+
heading: "Recipient:",
|
|
673
|
+
hasBorder: true,
|
|
674
|
+
description: (_o = (_n = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _n.shareRecipient) == null ? void 0 : _o.label
|
|
675
|
+
}
|
|
676
|
+
) : null, ((_q = (_p = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _p.shareChannel) == null ? void 0 : _q.value) ? /* @__PURE__ */ React__default.createElement(
|
|
677
|
+
EventComponent,
|
|
678
|
+
{
|
|
679
|
+
hasBorder: true,
|
|
680
|
+
heading: "Share Channel:",
|
|
681
|
+
description: (_s = (_r = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _r.shareChannel) == null ? void 0 : _s.label
|
|
682
|
+
}
|
|
683
|
+
) : null)
|
|
684
|
+
))
|
|
652
685
|
),
|
|
653
686
|
isMappingDisplayed && /* @__PURE__ */ React__default.createElement(
|
|
654
687
|
Box,
|
|
@@ -710,7 +743,12 @@ const SingleMappingDashboardItem = ({
|
|
|
710
743
|
Flex,
|
|
711
744
|
{
|
|
712
745
|
flexDirection: "column",
|
|
713
|
-
css: {
|
|
746
|
+
css: {
|
|
747
|
+
width: "100%",
|
|
748
|
+
height: "100%",
|
|
749
|
+
overflow: "auto",
|
|
750
|
+
marginTop: "$8"
|
|
751
|
+
}
|
|
714
752
|
},
|
|
715
753
|
/* @__PURE__ */ React__default.createElement(
|
|
716
754
|
Flex,
|
|
@@ -718,7 +756,7 @@ const SingleMappingDashboardItem = ({
|
|
|
718
756
|
css: {
|
|
719
757
|
border: isMappingDisplayed ? "$borderWidths$xs solid $black400" : "$borderWidths$xs solid $neutral200",
|
|
720
758
|
borderRadius: isMappingDisplayed ? "$2xl $2xl 0 0" : "$2xl",
|
|
721
|
-
padding: "
|
|
759
|
+
padding: "15px $12",
|
|
722
760
|
width: "100%",
|
|
723
761
|
backgroundColor: isMappingDisplayed ? "rgba(100, 116, 139, 0.04)" : "$white900"
|
|
724
762
|
},
|
|
@@ -734,29 +772,60 @@ const SingleMappingDashboardItem = ({
|
|
|
734
772
|
onClick: () => setIsMappingDisplayed(!isMappingDisplayed)
|
|
735
773
|
},
|
|
736
774
|
isMappingDisplayed ? /* @__PURE__ */ React__default.createElement(ChevronDownIcon, { size: 40, color: "#848484" }) : /* @__PURE__ */ React__default.createElement(ChevronRightIcon, { size: 40, color: "#848484" }),
|
|
737
|
-
/* @__PURE__ */ React__default.createElement(Flex, { alignItems: "center", gap: "$4" }, icon, /* @__PURE__ */ React__default.createElement(Flex, { gap: "$1", flexDirection: "column" }, /* @__PURE__ */ React__default.createElement(Text, { size: "md", weight: "bold" }, (_d = (_c = (_b = (_a = field == null ? void 0 : field.configurationFields) == null ? void 0 : _a.account) == null ? void 0 : _b.value) == null ? void 0 : _c.label) != null ? _d : "Mapping"), ((_e = field == null ? void 0 : field.configurationFields) == null ? void 0 : _e.sheetURL)
|
|
775
|
+
/* @__PURE__ */ React__default.createElement(Flex, { alignItems: "center", gap: "$4" }, (() => (field == null ? void 0 : field.isEnabled) !== null && (field == null ? void 0 : field.isEnabled) !== void 0)() ? icon : null, /* @__PURE__ */ React__default.createElement(Flex, { gap: "$1", flexDirection: "column" }, /* @__PURE__ */ React__default.createElement(Text, { size: "md", weight: "bold" }, (_d = (_c = (_b = (_a = field == null ? void 0 : field.configurationFields) == null ? void 0 : _a.account) == null ? void 0 : _b.value) == null ? void 0 : _c.label) != null ? _d : "Mapping"), ((_e = field == null ? void 0 : field.configurationFields) == null ? void 0 : _e.sheetURL) && (() => (field == null ? void 0 : field.isEnabled) !== null && (field == null ? void 0 : field.isEnabled) !== void 0)() ? /* @__PURE__ */ React__default.createElement(Flex, { gap: "$2", alignItems: "center" }, /* @__PURE__ */ React__default.createElement(Text, { size: "sm", css: { color: "$neutral600" } }, `Sync `), /* @__PURE__ */ React__default.createElement(
|
|
776
|
+
Text,
|
|
777
|
+
{
|
|
778
|
+
size: "sm",
|
|
779
|
+
weight: "bold",
|
|
780
|
+
css: { color: "$neutral600" }
|
|
781
|
+
},
|
|
782
|
+
(field == null ? void 0 : field.importMethod) === "SEND_ALL_DATA" ? "All" : "Specific"
|
|
783
|
+
), /* @__PURE__ */ React__default.createElement(Text, { size: "sm", css: { color: "$neutral600" } }, "Survey responses to"), /* @__PURE__ */ React__default.createElement(
|
|
784
|
+
Text,
|
|
785
|
+
{
|
|
786
|
+
size: "sm",
|
|
787
|
+
weight: "bold",
|
|
788
|
+
css: { color: "$neutral600" }
|
|
789
|
+
},
|
|
790
|
+
typeof ((_f = field == null ? void 0 : field.configurationFields) == null ? void 0 : _f.spreadsheet) === "object" ? (_i = (_h = (_g = field == null ? void 0 : field.configurationFields) == null ? void 0 : _g.spreadsheet) == null ? void 0 : _h.value) == null ? void 0 : _i.label : (_k = (_j = field == null ? void 0 : field.configurationFields) == null ? void 0 : _j.spreadsheet) == null ? void 0 : _k.value
|
|
791
|
+
)) : null))
|
|
738
792
|
),
|
|
739
|
-
/* @__PURE__ */ React__default.createElement(Flex, { alignItems: "center", gap: "$12" }, /* @__PURE__ */ React__default.createElement(
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
793
|
+
/* @__PURE__ */ React__default.createElement(Flex, { alignItems: "center", gap: "$12" }, /* @__PURE__ */ React__default.createElement(Tooltip, { content: "Sync", className: "dm-sans" }, /* @__PURE__ */ React__default.createElement(
|
|
794
|
+
Flex,
|
|
795
|
+
{
|
|
796
|
+
className: `rotating-div ${isSyncing === field.id ? "rotate" : ""}`,
|
|
797
|
+
justifyContent: "center",
|
|
798
|
+
alignItems: "center",
|
|
799
|
+
css: {
|
|
800
|
+
cursor: "pointer",
|
|
801
|
+
marginInlineEnd: "$3"
|
|
802
|
+
},
|
|
803
|
+
onClick: async () => {
|
|
804
|
+
setIsSyncing(field.id);
|
|
805
|
+
setTimeout(async () => {
|
|
806
|
+
await (syncMapping == null ? void 0 : syncMapping(field.id));
|
|
807
|
+
setIsSyncing(null);
|
|
808
|
+
}, 2e3);
|
|
809
|
+
}
|
|
810
|
+
},
|
|
811
|
+
/* @__PURE__ */ React__default.createElement(Sync, null)
|
|
812
|
+
)), (() => (field == null ? void 0 : field.isEnabled) !== null && (field == null ? void 0 : field.isEnabled) !== void 0)() ? /* @__PURE__ */ React__default.createElement(
|
|
813
|
+
Box,
|
|
814
|
+
{
|
|
815
|
+
css: {
|
|
816
|
+
width: "1px",
|
|
817
|
+
height: "20px",
|
|
818
|
+
background: "#64748B33"
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
) : null, (() => (field == null ? void 0 : field.isEnabled) !== null && (field == null ? void 0 : field.isEnabled) !== void 0)() ? /* @__PURE__ */ React__default.createElement(
|
|
753
822
|
Switch,
|
|
754
823
|
{
|
|
755
824
|
size: "md",
|
|
756
825
|
checked: field.isEnabled,
|
|
757
826
|
onChange: (value) => toggleDashboardField == null ? void 0 : toggleDashboardField(field.id, value)
|
|
758
827
|
}
|
|
759
|
-
) : null, /* @__PURE__ */ React__default.createElement(DropdownMenu, null, /* @__PURE__ */ React__default.createElement(DropdownMenuTrigger, { asChild: true }, /* @__PURE__ */ React__default.createElement(
|
|
828
|
+
) : null, /* @__PURE__ */ React__default.createElement(DropdownMenu, null, /* @__PURE__ */ React__default.createElement(Tooltip, { content: "More", className: "dm-sans" }, /* @__PURE__ */ React__default.createElement(DropdownMenuTrigger, { asChild: true }, /* @__PURE__ */ React__default.createElement(
|
|
760
829
|
IconButton,
|
|
761
830
|
{
|
|
762
831
|
variant: "ghost",
|
|
@@ -764,14 +833,18 @@ const SingleMappingDashboardItem = ({
|
|
|
764
833
|
size: "lg",
|
|
765
834
|
icon: /* @__PURE__ */ React__default.createElement(EllipsisVerticalIcon, null)
|
|
766
835
|
}
|
|
767
|
-
)), /* @__PURE__ */ React__default.createElement(
|
|
836
|
+
))), /* @__PURE__ */ React__default.createElement(
|
|
768
837
|
DropdownMenuContent,
|
|
769
838
|
{
|
|
770
839
|
className: "dm-sans",
|
|
771
|
-
css: {
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
840
|
+
css: {
|
|
841
|
+
minWidth: 180,
|
|
842
|
+
zIndex: 10,
|
|
843
|
+
"& p": {
|
|
844
|
+
margin: "0 !important",
|
|
845
|
+
padding: "0 !important"
|
|
846
|
+
}
|
|
847
|
+
},
|
|
775
848
|
sideOffset: 4,
|
|
776
849
|
align: "end"
|
|
777
850
|
},
|
|
@@ -793,101 +866,123 @@ const SingleMappingDashboardItem = ({
|
|
|
793
866
|
},
|
|
794
867
|
/* @__PURE__ */ React__default.createElement(Flex, { alignItems: "center", gap: "$2" }, /* @__PURE__ */ React__default.createElement(PencilIcon, { color: "#6A6A6A", size: 20 }), /* @__PURE__ */ React__default.createElement(Text, { size: "sm" }, "Edit"))
|
|
795
868
|
),
|
|
796
|
-
/* @__PURE__ */ React__default.createElement(
|
|
797
|
-
|
|
798
|
-
|
|
869
|
+
/* @__PURE__ */ React__default.createElement(
|
|
870
|
+
DropdownMenuItem,
|
|
871
|
+
{
|
|
872
|
+
onClick: () => setIsDeleteModalOpen(true),
|
|
873
|
+
css: {
|
|
874
|
+
cursor: "pointer"
|
|
875
|
+
}
|
|
876
|
+
},
|
|
877
|
+
/* @__PURE__ */ React__default.createElement(Flex, { alignItems: "center", gap: "$2" }, /* @__PURE__ */ React__default.createElement(DeleteIcon, { color: "#6A6A6A", size: 20 }), /* @__PURE__ */ React__default.createElement(Text, { size: "sm" }, "Delete"))
|
|
878
|
+
)
|
|
799
879
|
)))
|
|
800
880
|
),
|
|
801
|
-
isMappingDisplayed ? /* @__PURE__ */ React__default.createElement(
|
|
881
|
+
isMappingDisplayed ? /* @__PURE__ */ React__default.createElement(Box, null, /* @__PURE__ */ React__default.createElement(
|
|
802
882
|
Box,
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
883
|
+
{
|
|
884
|
+
css: {
|
|
885
|
+
borderInline: "$borderWidths$xs solid $black400",
|
|
886
|
+
maxHeight: 734,
|
|
887
|
+
height: "100%",
|
|
888
|
+
position: "relative",
|
|
889
|
+
overflow: "auto",
|
|
890
|
+
padding: "$16 $36"
|
|
891
|
+
}
|
|
892
|
+
},
|
|
893
|
+
/* @__PURE__ */ React__default.createElement(SingleMappingEventWrapper, { field }),
|
|
894
|
+
!!((_m = (_l = field == null ? void 0 : field.mappedFields) == null ? void 0 : _l.questions) == null ? void 0 : _m.filter(
|
|
895
|
+
(question) => question.isEnabled
|
|
896
|
+
).length) ? /* @__PURE__ */ React__default.createElement(
|
|
897
|
+
SingleMappingChipWrapper,
|
|
806
898
|
{
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
SingleMappingChipWrapper,
|
|
819
|
-
{
|
|
820
|
-
heading: "Questions",
|
|
821
|
-
fields: (_o = (_n = field == null ? void 0 : field.mappedFields) == null ? void 0 : _n.questions) == null ? void 0 : _o.filter((question) => question.isEnabled),
|
|
822
|
-
backgroundColor: "#E5F2FF"
|
|
823
|
-
}
|
|
824
|
-
) : null,
|
|
825
|
-
!!((_q = (_p = field == null ? void 0 : field.mappedFields) == null ? void 0 : _p.variables) == null ? void 0 : _q.filter((variable) => variable.isEnabled).length) ? /* @__PURE__ */ React__default.createElement(
|
|
826
|
-
SingleMappingChipWrapper,
|
|
827
|
-
{
|
|
828
|
-
heading: "Variables",
|
|
829
|
-
fields: (_s = (_r = field == null ? void 0 : field.mappedFields) == null ? void 0 : _r.variables) == null ? void 0 : _s.filter((variable) => variable.isEnabled),
|
|
830
|
-
backgroundColor: "$positive100"
|
|
831
|
-
}
|
|
832
|
-
) : null,
|
|
833
|
-
!!((_u = (_t = field == null ? void 0 : field.mappedFields) == null ? void 0 : _t.contactProperties) == null ? void 0 : _u.filter((property) => property.isEnabled).length) ? /* @__PURE__ */ React__default.createElement(
|
|
834
|
-
SingleMappingChipWrapper,
|
|
835
|
-
{
|
|
836
|
-
heading: "Contacts",
|
|
837
|
-
fields: (_w = (_v = field == null ? void 0 : field.mappedFields) == null ? void 0 : _v.contactProperties) == null ? void 0 : _w.filter((property) => property.isEnabled),
|
|
838
|
-
backgroundColor: "$negative100"
|
|
839
|
-
}
|
|
840
|
-
) : null,
|
|
841
|
-
!!((_y = (_x = field == null ? void 0 : field.mappedFields) == null ? void 0 : _x.expressions) == null ? void 0 : _y.filter((expression) => expression.isEnabled).length) ? /* @__PURE__ */ React__default.createElement(
|
|
842
|
-
SingleMappingChipWrapper,
|
|
843
|
-
{
|
|
844
|
-
heading: "Expression",
|
|
845
|
-
backgroundColor: "$neutral100",
|
|
846
|
-
fields: (_A = (_z = field == null ? void 0 : field.mappedFields) == null ? void 0 : _z.expressions) == null ? void 0 : _A.filter((expression) => expression.isEnabled)
|
|
847
|
-
}
|
|
848
|
-
) : null,
|
|
849
|
-
!!((_C = (_B = field == null ? void 0 : field.mappedFields) == null ? void 0 : _B.property) == null ? void 0 : _C.filter((property) => property.isEnabled).length) ? /* @__PURE__ */ React__default.createElement(
|
|
850
|
-
SingleMappingChipWrapper,
|
|
851
|
-
{
|
|
852
|
-
heading: "Property",
|
|
853
|
-
hideBorder: true,
|
|
854
|
-
fields: (_E = (_D = field == null ? void 0 : field.mappedFields) == null ? void 0 : _D.property) == null ? void 0 : _E.filter((property) => property.isEnabled),
|
|
855
|
-
backgroundColor: "rgba(74, 156, 166, 0.15)"
|
|
856
|
-
}
|
|
857
|
-
) : null
|
|
858
|
-
),
|
|
859
|
-
isMappingDisplayed && /* @__PURE__ */ React__default.createElement(
|
|
860
|
-
Box,
|
|
899
|
+
heading: "Questions",
|
|
900
|
+
fields: (_o = (_n = field == null ? void 0 : field.mappedFields) == null ? void 0 : _n.questions) == null ? void 0 : _o.filter(
|
|
901
|
+
(question) => question.isEnabled
|
|
902
|
+
),
|
|
903
|
+
backgroundColor: "#E5F2FF"
|
|
904
|
+
}
|
|
905
|
+
) : null,
|
|
906
|
+
!!((_q = (_p = field == null ? void 0 : field.mappedFields) == null ? void 0 : _p.variables) == null ? void 0 : _q.filter(
|
|
907
|
+
(variable) => variable.isEnabled
|
|
908
|
+
).length) ? /* @__PURE__ */ React__default.createElement(
|
|
909
|
+
SingleMappingChipWrapper,
|
|
861
910
|
{
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
911
|
+
heading: "Variables",
|
|
912
|
+
fields: (_s = (_r = field == null ? void 0 : field.mappedFields) == null ? void 0 : _r.variables) == null ? void 0 : _s.filter(
|
|
913
|
+
(variable) => variable.isEnabled
|
|
914
|
+
),
|
|
915
|
+
backgroundColor: "$positive100"
|
|
916
|
+
}
|
|
917
|
+
) : null,
|
|
918
|
+
!!((_u = (_t = field == null ? void 0 : field.mappedFields) == null ? void 0 : _t.contactProperties) == null ? void 0 : _u.filter(
|
|
919
|
+
(property) => property.isEnabled
|
|
920
|
+
).length) ? /* @__PURE__ */ React__default.createElement(
|
|
921
|
+
SingleMappingChipWrapper,
|
|
922
|
+
{
|
|
923
|
+
heading: "Contacts",
|
|
924
|
+
fields: (_w = (_v = field == null ? void 0 : field.mappedFields) == null ? void 0 : _v.contactProperties) == null ? void 0 : _w.filter(
|
|
925
|
+
(property) => property.isEnabled
|
|
926
|
+
),
|
|
927
|
+
backgroundColor: "$negative100"
|
|
928
|
+
}
|
|
929
|
+
) : null,
|
|
930
|
+
!!((_y = (_x = field == null ? void 0 : field.mappedFields) == null ? void 0 : _x.expressions) == null ? void 0 : _y.filter(
|
|
931
|
+
(expression) => expression.isEnabled
|
|
932
|
+
).length) ? /* @__PURE__ */ React__default.createElement(
|
|
933
|
+
SingleMappingChipWrapper,
|
|
934
|
+
{
|
|
935
|
+
heading: "Expression",
|
|
936
|
+
backgroundColor: "$neutral100",
|
|
937
|
+
fields: (_A = (_z = field == null ? void 0 : field.mappedFields) == null ? void 0 : _z.expressions) == null ? void 0 : _A.filter(
|
|
938
|
+
(expression) => expression.isEnabled
|
|
939
|
+
)
|
|
940
|
+
}
|
|
941
|
+
) : null,
|
|
942
|
+
!!((_C = (_B = field == null ? void 0 : field.mappedFields) == null ? void 0 : _B.property) == null ? void 0 : _C.filter(
|
|
943
|
+
(property) => property.isEnabled
|
|
944
|
+
).length) ? /* @__PURE__ */ React__default.createElement(
|
|
945
|
+
SingleMappingChipWrapper,
|
|
946
|
+
{
|
|
947
|
+
heading: "Property",
|
|
948
|
+
hideBorder: true,
|
|
949
|
+
fields: (_E = (_D = field == null ? void 0 : field.mappedFields) == null ? void 0 : _D.property) == null ? void 0 : _E.filter(
|
|
950
|
+
(property) => property.isEnabled
|
|
951
|
+
),
|
|
952
|
+
backgroundColor: "rgba(74, 156, 166, 0.15)"
|
|
953
|
+
}
|
|
954
|
+
) : null
|
|
955
|
+
), isMappingDisplayed && /* @__PURE__ */ React__default.createElement(
|
|
956
|
+
Box,
|
|
957
|
+
{
|
|
958
|
+
css: {
|
|
959
|
+
padding: "$8 $32",
|
|
960
|
+
border: "$borderWidths$xs solid $black400",
|
|
961
|
+
borderTop: "$borderWidths$xs solid $neutral200",
|
|
962
|
+
borderRadius: "0 0 $2xl $2xl",
|
|
963
|
+
height: "100%"
|
|
964
|
+
}
|
|
965
|
+
},
|
|
966
|
+
/* @__PURE__ */ React__default.createElement(
|
|
967
|
+
Button,
|
|
968
|
+
{
|
|
969
|
+
size: "sm",
|
|
970
|
+
leftIcon: /* @__PURE__ */ React__default.createElement(PencilIcon, null),
|
|
971
|
+
color: "primary",
|
|
972
|
+
variant: "ghost",
|
|
973
|
+
onClick: () => {
|
|
974
|
+
onMappingEditHandler(field.id);
|
|
975
|
+
handleEditField({
|
|
976
|
+
type: "SINGLE_MAPPING",
|
|
977
|
+
values: field,
|
|
978
|
+
id: field.id
|
|
979
|
+
});
|
|
980
|
+
handleDashboardPage(false, "MAPPING");
|
|
868
981
|
}
|
|
869
982
|
},
|
|
870
|
-
|
|
871
|
-
Button,
|
|
872
|
-
{
|
|
873
|
-
size: "sm",
|
|
874
|
-
leftIcon: /* @__PURE__ */ React__default.createElement(PencilIcon, null),
|
|
875
|
-
color: "primary",
|
|
876
|
-
variant: "ghost",
|
|
877
|
-
onClick: () => {
|
|
878
|
-
onMappingEditHandler(field.id);
|
|
879
|
-
handleEditField({
|
|
880
|
-
type: "SINGLE_MAPPING",
|
|
881
|
-
values: field,
|
|
882
|
-
id: field.id
|
|
883
|
-
});
|
|
884
|
-
handleDashboardPage(false, "MAPPING");
|
|
885
|
-
}
|
|
886
|
-
},
|
|
887
|
-
"Edit Mapping"
|
|
888
|
-
)
|
|
983
|
+
"Edit Mapping"
|
|
889
984
|
)
|
|
890
|
-
) : null
|
|
985
|
+
)) : null
|
|
891
986
|
), isDeleteModalOpen && /* @__PURE__ */ React__default.createElement(
|
|
892
987
|
ConfirmationModal,
|
|
893
988
|
{
|
|
@@ -904,7 +999,6 @@ const EventComponent = ({
|
|
|
904
999
|
hasBorder,
|
|
905
1000
|
hasLink = ""
|
|
906
1001
|
}) => {
|
|
907
|
-
console.log(hasLink, "hasLink");
|
|
908
1002
|
return /* @__PURE__ */ React__default.createElement(Flex, { alignItems: "center" }, hasBorder && /* @__PURE__ */ React__default.createElement(Box, { css: { paddingInline: "$3" } }, /* @__PURE__ */ React__default.createElement(
|
|
909
1003
|
Box,
|
|
910
1004
|
{
|
|
@@ -915,7 +1009,23 @@ const EventComponent = ({
|
|
|
915
1009
|
marginInline: "$4"
|
|
916
1010
|
}
|
|
917
1011
|
}
|
|
918
|
-
)), /* @__PURE__ */ React__default.createElement(Flex, { gap: "$2" }, /* @__PURE__ */ React__default.createElement(Text, { size: "sm", css: { color: "$
|
|
1012
|
+
)), /* @__PURE__ */ React__default.createElement(Flex, { gap: "$2" }, /* @__PURE__ */ React__default.createElement(Text, { size: "sm", css: { color: "$neutral700" } }, heading), !!hasLink ? /* @__PURE__ */ React__default.createElement(
|
|
1013
|
+
Text,
|
|
1014
|
+
{
|
|
1015
|
+
size: "sm",
|
|
1016
|
+
weight: "medium",
|
|
1017
|
+
css: {
|
|
1018
|
+
color: "$neutral800",
|
|
1019
|
+
textDecoration: "underline",
|
|
1020
|
+
cursor: "pointer",
|
|
1021
|
+
"&:hover": {
|
|
1022
|
+
color: !!hasLink ? "$neutral900" : "$neutral800"
|
|
1023
|
+
}
|
|
1024
|
+
},
|
|
1025
|
+
onClick: () => window.open(`${hasLink}`, "_blank")
|
|
1026
|
+
},
|
|
1027
|
+
description
|
|
1028
|
+
) : /* @__PURE__ */ React__default.createElement(Text, { size: "sm", weight: "medium", css: { color: "$neutral800" } }, description)));
|
|
919
1029
|
};
|
|
920
1030
|
const SingleMappingEventWrapper = ({
|
|
921
1031
|
field,
|
|
@@ -923,7 +1033,13 @@ const SingleMappingEventWrapper = ({
|
|
|
923
1033
|
}) => {
|
|
924
1034
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D;
|
|
925
1035
|
const hasEventSection = !!((_c = (_b = (_a = field == null ? void 0 : field.configurationFields) == null ? void 0 : _a.account) == null ? void 0 : _b.value) == null ? void 0 : _c.label) || !!field.action || !!field.exisitingSheet || !!field.object && isTrigger;
|
|
926
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, hasEventSection ? /* @__PURE__ */ React__default.createElement(Flex, { flexDirection: "column", gap: "$6" }, /* @__PURE__ */ React__default.createElement(Text, { size: "sm", weight: "bold", css: { textTransform: "uppercase" } }, "Event"), /* @__PURE__ */ React__default.createElement(Flex, { alignItems: "center" }, !!((_f = (_e = (_d = field == null ? void 0 : field.configurationFields) == null ? void 0 : _d.account) == null ? void 0 : _e.value) == null ? void 0 : _f.label) ? /* @__PURE__ */ React__default.createElement(
|
|
1036
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, hasEventSection ? /* @__PURE__ */ React__default.createElement(Flex, { flexDirection: "column", gap: "$6" }, /* @__PURE__ */ React__default.createElement(Text, { size: "sm", weight: "bold", css: { textTransform: "uppercase" } }, "Event"), /* @__PURE__ */ React__default.createElement(Flex, { alignItems: "center" }, !!((_f = (_e = (_d = field == null ? void 0 : field.configurationFields) == null ? void 0 : _d.account) == null ? void 0 : _e.value) == null ? void 0 : _f.label) ? /* @__PURE__ */ React__default.createElement(
|
|
1037
|
+
EventComponent,
|
|
1038
|
+
{
|
|
1039
|
+
heading: "Account:",
|
|
1040
|
+
description: (_i = (_h = (_g = field == null ? void 0 : field.configurationFields) == null ? void 0 : _g.account) == null ? void 0 : _h.value) == null ? void 0 : _i.label
|
|
1041
|
+
}
|
|
1042
|
+
) : null, !!((_l = (_k = (_j = field == null ? void 0 : field.configurationFields) == null ? void 0 : _j.object) == null ? void 0 : _k.value) == null ? void 0 : _l.label) ? /* @__PURE__ */ React__default.createElement(
|
|
927
1043
|
EventComponent,
|
|
928
1044
|
{
|
|
929
1045
|
heading: "Object:",
|
|
@@ -987,9 +1103,10 @@ const SingleMappingChipWrapper = ({
|
|
|
987
1103
|
Tooltip,
|
|
988
1104
|
{
|
|
989
1105
|
delayDuration: 300,
|
|
990
|
-
content: currentChipWidth >=
|
|
1106
|
+
content: currentChipWidth >= 220 ? name : "",
|
|
991
1107
|
size: "md",
|
|
992
|
-
sideOffset: 4
|
|
1108
|
+
sideOffset: 4,
|
|
1109
|
+
className: "dm-sans"
|
|
993
1110
|
},
|
|
994
1111
|
/* @__PURE__ */ React__default.createElement(
|
|
995
1112
|
Chip,
|
|
@@ -998,8 +1115,10 @@ const SingleMappingChipWrapper = ({
|
|
|
998
1115
|
size: "md",
|
|
999
1116
|
css: {
|
|
1000
1117
|
background: backgroundColor,
|
|
1118
|
+
borderRadius: "4px !important",
|
|
1001
1119
|
maxWidth: 248,
|
|
1002
1120
|
overflow: "hidden",
|
|
1121
|
+
fontFamily: "'Roboto Mono', monospace !important",
|
|
1003
1122
|
textOverflow: "ellipsis",
|
|
1004
1123
|
whiteSpace: "nowrap",
|
|
1005
1124
|
display: "block"
|
|
@@ -1134,10 +1253,14 @@ const DashboardItem = ({
|
|
|
1134
1253
|
DropdownMenuContent,
|
|
1135
1254
|
{
|
|
1136
1255
|
className: "dm-sans",
|
|
1137
|
-
css: {
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1256
|
+
css: {
|
|
1257
|
+
minWidth: 180,
|
|
1258
|
+
zIndex: 10,
|
|
1259
|
+
"& p": {
|
|
1260
|
+
margin: "0 !important",
|
|
1261
|
+
padding: "0 !important"
|
|
1262
|
+
}
|
|
1263
|
+
},
|
|
1141
1264
|
sideOffset: 4,
|
|
1142
1265
|
align: "end"
|
|
1143
1266
|
},
|
|
@@ -1159,9 +1282,16 @@ const DashboardItem = ({
|
|
|
1159
1282
|
},
|
|
1160
1283
|
/* @__PURE__ */ React__default.createElement(Flex, { alignItems: "center", gap: "$2" }, /* @__PURE__ */ React__default.createElement(PencilIcon, { color: "#6A6A6A", size: 20 }), /* @__PURE__ */ React__default.createElement(Text, { size: "sm" }, "Edit"))
|
|
1161
1284
|
),
|
|
1162
|
-
/* @__PURE__ */ React__default.createElement(
|
|
1163
|
-
|
|
1164
|
-
|
|
1285
|
+
/* @__PURE__ */ React__default.createElement(
|
|
1286
|
+
DropdownMenuItem,
|
|
1287
|
+
{
|
|
1288
|
+
onClick: () => setIsDeleteModalOpen(true),
|
|
1289
|
+
css: {
|
|
1290
|
+
cursor: "pointer"
|
|
1291
|
+
}
|
|
1292
|
+
},
|
|
1293
|
+
/* @__PURE__ */ React__default.createElement(Flex, { alignItems: "center", gap: "$2" }, /* @__PURE__ */ React__default.createElement(DeleteIcon, { color: "#6A6A6A", size: 20 }), /* @__PURE__ */ React__default.createElement(Text, { size: "sm" }, "Delete"))
|
|
1294
|
+
)
|
|
1165
1295
|
)))
|
|
1166
1296
|
),
|
|
1167
1297
|
/* @__PURE__ */ React__default.createElement(
|