@sparrowengg/integrations-templates-frontend 1.9.66 → 1.9.68

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.
@@ -62,8 +62,8 @@ const Dashboard = ({
62
62
  justifyContent: "space-between",
63
63
  alignItems: "center"
64
64
  },
65
- /* @__PURE__ */ React.createElement(flex.Flex, { flexDirection: "column", gap: "$2" }, /* @__PURE__ */ React.createElement(heading.Heading, { size: "h5" }, integrationName), /* @__PURE__ */ React.createElement(text.Text, { size: "sm", css: { color: "$neutral600" } }, dashboardDescription)),
66
- /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$4" }, hasMultiAccounts && /* @__PURE__ */ React.createElement(button.Button, { size: "lg", color: "default", leftIcon: /* @__PURE__ */ React.createElement(plus.PlusIcon, null) }, "Add Account"), /* @__PURE__ */ React.createElement(dropdown.DropdownMenu, null, /* @__PURE__ */ React.createElement(
65
+ /* @__PURE__ */ React.createElement(flex.Flex, { flexDirection: "column", gap: "$2" }, /* @__PURE__ */ React.createElement(heading.Heading, { size: "h5" }, integrationName), /* @__PURE__ */ React.createElement(text.Text, { size: "sm", css: { color: "$neutral700" } }, dashboardDescription)),
66
+ /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$4" }, hasMultiAccounts && /* @__PURE__ */ React.createElement(button.Button, { size: "lg", color: "default", leftIcon: /* @__PURE__ */ React.createElement(plus.PlusIcon, null) }, "Add Account"), hasDropdownComponents.mapping && !hasDropdownComponents.trigger ? /* @__PURE__ */ React.createElement(button.Button, { size: "lg", color: "primary", leftIcon: /* @__PURE__ */ React.createElement(plus.PlusIcon, null), onClick: () => handleConfigurationType("MAPPING") }, "New Mapping") : null, hasDropdownComponents.trigger && hasDropdownComponents.mapping ? /* @__PURE__ */ React.createElement(dropdown.DropdownMenu, null, /* @__PURE__ */ React.createElement(
67
67
  tooltip.Tooltip,
68
68
  {
69
69
  content: !triggerEnabled && !mappingEnabled ? "You have reached the maximum limit for creating triggers/mappings" : ""
@@ -83,10 +83,14 @@ const Dashboard = ({
83
83
  className: "dm-sans",
84
84
  sideOffset: 4,
85
85
  align: "start",
86
- css: { maxWidth: 240, zIndex: 10, "& p": {
87
- margin: "0 !important",
88
- padding: "0 !important"
89
- } }
86
+ css: {
87
+ maxWidth: 240,
88
+ zIndex: 10,
89
+ "& p": {
90
+ margin: "0 !important",
91
+ padding: "0 !important"
92
+ }
93
+ }
90
94
  },
91
95
  hasDropdownComponents.trigger ? /* @__PURE__ */ React.createElement(
92
96
  DropdownItem,
@@ -110,7 +114,7 @@ const Dashboard = ({
110
114
  onClickHandler: () => handleConfigurationType("MAPPING")
111
115
  }
112
116
  ) : null
113
- )))
117
+ )) : null)
114
118
  ), /* @__PURE__ */ React.createElement(
115
119
  box.Box,
116
120
  {
@@ -422,23 +426,25 @@ const SingleAccountDashboard = ({
422
426
  deleteFieldHandler
423
427
  }
424
428
  );
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.createElement(box.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((field, index) => {
426
- return /* @__PURE__ */ React.createElement(
427
- SingleMappingDashboardItem,
428
- {
429
- onMappingEditHandler,
430
- syncMapping,
431
- field,
432
- key: field == null ? void 0 : field.id,
433
- integrationName,
434
- icon: /* @__PURE__ */ React.createElement(mapping.default, { size: 32, color: "#56B0BB" }),
435
- handleEditField,
436
- handleDashboardPage,
437
- toggleDashboardField,
438
- deleteFieldHandler
439
- }
440
- );
441
- })) : null);
429
+ })) : 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.createElement(box.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(
430
+ (field, index) => {
431
+ return /* @__PURE__ */ React.createElement(
432
+ SingleMappingDashboardItem,
433
+ {
434
+ onMappingEditHandler,
435
+ syncMapping,
436
+ field,
437
+ key: field == null ? void 0 : field.id,
438
+ integrationName,
439
+ icon: /* @__PURE__ */ React.createElement(mapping.default, { size: 32, color: "#56B0BB" }),
440
+ handleEditField,
441
+ handleDashboardPage,
442
+ toggleDashboardField,
443
+ deleteFieldHandler
444
+ }
445
+ );
446
+ }
447
+ )) : null);
442
448
  };
443
449
  const TriggerDasboardItem = ({
444
450
  isDraft,
@@ -480,7 +486,12 @@ const TriggerDasboardItem = ({
480
486
  flex.Flex,
481
487
  {
482
488
  flexDirection: "column",
483
- css: { width: "100%", height: "100%", overflow: "auto", marginTop: "$8" }
489
+ css: {
490
+ width: "100%",
491
+ height: "100%",
492
+ overflow: "auto",
493
+ marginTop: "$8"
494
+ }
484
495
  },
485
496
  /* @__PURE__ */ React.createElement(
486
497
  flex.Flex,
@@ -555,10 +566,14 @@ const TriggerDasboardItem = ({
555
566
  dropdown.DropdownMenuContent,
556
567
  {
557
568
  className: "dm-sans",
558
- css: { minWidth: 180, zIndex: 10, "& p": {
559
- margin: "0 !important",
560
- padding: "0 !important"
561
- } },
569
+ css: {
570
+ minWidth: 180,
571
+ zIndex: 10,
572
+ "& p": {
573
+ margin: "0 !important",
574
+ padding: "0 !important"
575
+ }
576
+ },
562
577
  sideOffset: 4,
563
578
  align: "end"
564
579
  },
@@ -579,9 +594,16 @@ const TriggerDasboardItem = ({
579
594
  },
580
595
  /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$2" }, /* @__PURE__ */ React.createElement(pencil.PencilIcon, { color: "#6A6A6A", size: 20 }), /* @__PURE__ */ React.createElement(text.Text, { size: "sm" }, "Edit"))
581
596
  ),
582
- /* @__PURE__ */ React.createElement(dropdown.DropdownMenuItem, { onClick: () => setIsDeleteModalOpen(true), css: {
583
- cursor: "pointer"
584
- } }, /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$2" }, /* @__PURE__ */ React.createElement(_delete.DeleteIcon, { color: "#6A6A6A", size: 20 }), /* @__PURE__ */ React.createElement(text.Text, { size: "sm" }, "Delete")))
597
+ /* @__PURE__ */ React.createElement(
598
+ dropdown.DropdownMenuItem,
599
+ {
600
+ onClick: () => setIsDeleteModalOpen(true),
601
+ css: {
602
+ cursor: "pointer"
603
+ }
604
+ },
605
+ /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$2" }, /* @__PURE__ */ React.createElement(_delete.DeleteIcon, { color: "#6A6A6A", size: 20 }), /* @__PURE__ */ React.createElement(text.Text, { size: "sm" }, "Delete"))
606
+ )
585
607
  )))
586
608
  ),
587
609
  isMappingDisplayed && /* @__PURE__ */ React.createElement(
@@ -624,7 +646,9 @@ const TriggerDasboardItem = ({
624
646
  }
625
647
  }
626
648
  )) : null,
627
- ((_e = (_d = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _d.variables) == null ? void 0 : _e.filter((variable) => variable.isEnabled).length) ? /* @__PURE__ */ React.createElement(
649
+ ((_e = (_d = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _d.variables) == null ? void 0 : _e.filter(
650
+ (variable) => variable.isEnabled
651
+ ).length) ? /* @__PURE__ */ React.createElement(
628
652
  SingleMappingChipWrapper,
629
653
  {
630
654
  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",
@@ -632,27 +656,36 @@ const TriggerDasboardItem = ({
632
656
  backgroundColor: "$positive100"
633
657
  }
634
658
  ) : null,
635
- /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(flex.Flex, { flexDirection: "column", gap: "$6", css: { paddingBlock: "$8" } }, /* @__PURE__ */ React.createElement(text.Text, { size: "sm", weight: "bold" }, "SEND SURVEY"), /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center" }, ((_i = (_h = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _h.shareType) == null ? void 0 : _i.value) ? /* @__PURE__ */ React.createElement(
636
- EventComponent,
637
- {
638
- heading: "Share Type:",
639
- description: (_k = (_j = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _j.shareType) == null ? void 0 : _k.label
640
- }
641
- ) : null, ((_m = (_l = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _l.shareRecipient) == null ? void 0 : _m.value) ? /* @__PURE__ */ React.createElement(
642
- EventComponent,
643
- {
644
- heading: "Recipient:",
645
- hasBorder: true,
646
- description: (_o = (_n = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _n.shareRecipient) == null ? void 0 : _o.label
647
- }
648
- ) : null, ((_q = (_p = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _p.shareChannel) == null ? void 0 : _q.value) ? /* @__PURE__ */ React.createElement(
649
- EventComponent,
659
+ /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
660
+ flex.Flex,
650
661
  {
651
- hasBorder: true,
652
- heading: "Share Channel:",
653
- description: (_s = (_r = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _r.shareChannel) == null ? void 0 : _s.label
654
- }
655
- ) : null)))
662
+ flexDirection: "column",
663
+ gap: "$6",
664
+ css: { paddingBlock: "$8" }
665
+ },
666
+ /* @__PURE__ */ React.createElement(text.Text, { size: "sm", weight: "bold" }, "SEND SURVEY"),
667
+ /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center" }, ((_i = (_h = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _h.shareType) == null ? void 0 : _i.value) ? /* @__PURE__ */ React.createElement(
668
+ EventComponent,
669
+ {
670
+ heading: "Share Type:",
671
+ description: (_k = (_j = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _j.shareType) == null ? void 0 : _k.label
672
+ }
673
+ ) : null, ((_m = (_l = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _l.shareRecipient) == null ? void 0 : _m.value) ? /* @__PURE__ */ React.createElement(
674
+ EventComponent,
675
+ {
676
+ heading: "Recipient:",
677
+ hasBorder: true,
678
+ description: (_o = (_n = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _n.shareRecipient) == null ? void 0 : _o.label
679
+ }
680
+ ) : null, ((_q = (_p = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _p.shareChannel) == null ? void 0 : _q.value) ? /* @__PURE__ */ React.createElement(
681
+ EventComponent,
682
+ {
683
+ hasBorder: true,
684
+ heading: "Share Channel:",
685
+ description: (_s = (_r = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _r.shareChannel) == null ? void 0 : _s.label
686
+ }
687
+ ) : null)
688
+ ))
656
689
  ),
657
690
  isMappingDisplayed && /* @__PURE__ */ React.createElement(
658
691
  box.Box,
@@ -714,7 +747,12 @@ const SingleMappingDashboardItem = ({
714
747
  flex.Flex,
715
748
  {
716
749
  flexDirection: "column",
717
- css: { width: "100%", height: "100%", overflow: "auto", marginTop: "$8" }
750
+ css: {
751
+ width: "100%",
752
+ height: "100%",
753
+ overflow: "auto",
754
+ marginTop: "$8"
755
+ }
718
756
  },
719
757
  /* @__PURE__ */ React.createElement(
720
758
  flex.Flex,
@@ -722,7 +760,7 @@ const SingleMappingDashboardItem = ({
722
760
  css: {
723
761
  border: isMappingDisplayed ? "$borderWidths$xs solid $black400" : "$borderWidths$xs solid $neutral200",
724
762
  borderRadius: isMappingDisplayed ? "$2xl $2xl 0 0" : "$2xl",
725
- padding: "$10 $12",
763
+ padding: "15px $12",
726
764
  width: "100%",
727
765
  backgroundColor: isMappingDisplayed ? "rgba(100, 116, 139, 0.04)" : "$white900"
728
766
  },
@@ -738,29 +776,60 @@ const SingleMappingDashboardItem = ({
738
776
  onClick: () => setIsMappingDisplayed(!isMappingDisplayed)
739
777
  },
740
778
  isMappingDisplayed ? /* @__PURE__ */ React.createElement(chevronDown.ChevronDownIcon, { size: 40, color: "#848484" }) : /* @__PURE__ */ React.createElement(chevronRight.ChevronRightIcon, { size: 40, color: "#848484" }),
741
- /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$4" }, icon, /* @__PURE__ */ React.createElement(flex.Flex, { gap: "$1", flexDirection: "column" }, /* @__PURE__ */ React.createElement(text.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) ? /* @__PURE__ */ React.createElement(flex.Flex, { gap: "$2", alignItems: "center" }, /* @__PURE__ */ React.createElement(text.Text, { size: "sm", css: { color: "$neutral600" } }, `Sync `), /* @__PURE__ */ React.createElement(text.Text, { size: "sm", weight: "bold", css: { color: "$neutral600" } }, (field == null ? void 0 : field.importMethod) === "SEND_ALL_DATA" ? "All" : "Specific"), /* @__PURE__ */ React.createElement(text.Text, { size: "sm", css: { color: "$neutral600" } }, "Survey responses to"), /* @__PURE__ */ React.createElement(text.Text, { size: "sm", weight: "bold", css: { color: "$neutral600" } }, 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)) : null))
779
+ /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$4" }, (() => (field == null ? void 0 : field.isEnabled) !== null && (field == null ? void 0 : field.isEnabled) !== void 0)() ? icon : null, /* @__PURE__ */ React.createElement(flex.Flex, { gap: "$1", flexDirection: "column" }, /* @__PURE__ */ React.createElement(text.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.createElement(flex.Flex, { gap: "$2", alignItems: "center" }, /* @__PURE__ */ React.createElement(text.Text, { size: "sm", css: { color: "$neutral600" } }, `Sync `), /* @__PURE__ */ React.createElement(
780
+ text.Text,
781
+ {
782
+ size: "sm",
783
+ weight: "bold",
784
+ css: { color: "$neutral600" }
785
+ },
786
+ (field == null ? void 0 : field.importMethod) === "SEND_ALL_DATA" ? "All" : "Specific"
787
+ ), /* @__PURE__ */ React.createElement(text.Text, { size: "sm", css: { color: "$neutral600" } }, "Survey responses to"), /* @__PURE__ */ React.createElement(
788
+ text.Text,
789
+ {
790
+ size: "sm",
791
+ weight: "bold",
792
+ css: { color: "$neutral600" }
793
+ },
794
+ 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
795
+ )) : null))
742
796
  ),
743
- /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$12" }, /* @__PURE__ */ React.createElement(flex.Flex, { className: `rotating-div ${isSyncing === field.id ? "rotate" : ""}`, justifyContent: "center", alignItems: "center", css: {
744
- cursor: "pointer",
745
- marginInlineEnd: "$3"
746
- }, onClick: async () => {
747
- setIsSyncing(field.id);
748
- setTimeout(async () => {
749
- await (syncMapping == null ? void 0 : syncMapping(field.id));
750
- setIsSyncing(null);
751
- }, 2e3);
752
- } }, /* @__PURE__ */ React.createElement(sync.default, null)), (() => (field == null ? void 0 : field.isEnabled) !== null && (field == null ? void 0 : field.isEnabled) !== void 0)() ? /* @__PURE__ */ React.createElement(box.Box, { css: {
753
- width: "1px",
754
- height: "20px",
755
- background: "#64748B33"
756
- } }) : null, (() => (field == null ? void 0 : field.isEnabled) !== null && (field == null ? void 0 : field.isEnabled) !== void 0)() ? /* @__PURE__ */ React.createElement(
797
+ /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$12" }, /* @__PURE__ */ React.createElement(tooltip.Tooltip, { content: "Sync", className: "dm-sans" }, /* @__PURE__ */ React.createElement(
798
+ flex.Flex,
799
+ {
800
+ className: `rotating-div ${isSyncing === field.id ? "rotate" : ""}`,
801
+ justifyContent: "center",
802
+ alignItems: "center",
803
+ css: {
804
+ cursor: "pointer",
805
+ marginInlineEnd: "$3"
806
+ },
807
+ onClick: async () => {
808
+ setIsSyncing(field.id);
809
+ setTimeout(async () => {
810
+ await (syncMapping == null ? void 0 : syncMapping(field.id));
811
+ setIsSyncing(null);
812
+ }, 2e3);
813
+ }
814
+ },
815
+ /* @__PURE__ */ React.createElement(sync.default, null)
816
+ )), (() => (field == null ? void 0 : field.isEnabled) !== null && (field == null ? void 0 : field.isEnabled) !== void 0)() ? /* @__PURE__ */ React.createElement(
817
+ box.Box,
818
+ {
819
+ css: {
820
+ width: "1px",
821
+ height: "20px",
822
+ background: "#64748B33"
823
+ }
824
+ }
825
+ ) : null, (() => (field == null ? void 0 : field.isEnabled) !== null && (field == null ? void 0 : field.isEnabled) !== void 0)() ? /* @__PURE__ */ React.createElement(
757
826
  _switch.Switch,
758
827
  {
759
828
  size: "md",
760
829
  checked: field.isEnabled,
761
830
  onChange: (value) => toggleDashboardField == null ? void 0 : toggleDashboardField(field.id, value)
762
831
  }
763
- ) : null, /* @__PURE__ */ React.createElement(dropdown.DropdownMenu, null, /* @__PURE__ */ React.createElement(dropdown.DropdownMenuTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
832
+ ) : null, /* @__PURE__ */ React.createElement(dropdown.DropdownMenu, null, /* @__PURE__ */ React.createElement(tooltip.Tooltip, { content: "More", className: "dm-sans" }, /* @__PURE__ */ React.createElement(dropdown.DropdownMenuTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
764
833
  iconButton.IconButton,
765
834
  {
766
835
  variant: "ghost",
@@ -768,14 +837,18 @@ const SingleMappingDashboardItem = ({
768
837
  size: "lg",
769
838
  icon: /* @__PURE__ */ React.createElement(ellipsisVertical.EllipsisVerticalIcon, null)
770
839
  }
771
- )), /* @__PURE__ */ React.createElement(
840
+ ))), /* @__PURE__ */ React.createElement(
772
841
  dropdown.DropdownMenuContent,
773
842
  {
774
843
  className: "dm-sans",
775
- css: { minWidth: 180, zIndex: 10, "& p": {
776
- margin: "0 !important",
777
- padding: "0 !important"
778
- } },
844
+ css: {
845
+ minWidth: 180,
846
+ zIndex: 10,
847
+ "& p": {
848
+ margin: "0 !important",
849
+ padding: "0 !important"
850
+ }
851
+ },
779
852
  sideOffset: 4,
780
853
  align: "end"
781
854
  },
@@ -797,101 +870,123 @@ const SingleMappingDashboardItem = ({
797
870
  },
798
871
  /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$2" }, /* @__PURE__ */ React.createElement(pencil.PencilIcon, { color: "#6A6A6A", size: 20 }), /* @__PURE__ */ React.createElement(text.Text, { size: "sm" }, "Edit"))
799
872
  ),
800
- /* @__PURE__ */ React.createElement(dropdown.DropdownMenuItem, { onClick: () => setIsDeleteModalOpen(true), css: {
801
- cursor: "pointer"
802
- } }, /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$2" }, /* @__PURE__ */ React.createElement(_delete.DeleteIcon, { color: "#6A6A6A", size: 20 }), /* @__PURE__ */ React.createElement(text.Text, { size: "sm" }, "Delete")))
873
+ /* @__PURE__ */ React.createElement(
874
+ dropdown.DropdownMenuItem,
875
+ {
876
+ onClick: () => setIsDeleteModalOpen(true),
877
+ css: {
878
+ cursor: "pointer"
879
+ }
880
+ },
881
+ /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$2" }, /* @__PURE__ */ React.createElement(_delete.DeleteIcon, { color: "#6A6A6A", size: 20 }), /* @__PURE__ */ React.createElement(text.Text, { size: "sm" }, "Delete"))
882
+ )
803
883
  )))
804
884
  ),
805
- isMappingDisplayed ? /* @__PURE__ */ React.createElement(
885
+ isMappingDisplayed ? /* @__PURE__ */ React.createElement(box.Box, null, /* @__PURE__ */ React.createElement(
806
886
  box.Box,
807
- null,
808
- /* @__PURE__ */ React.createElement(
809
- box.Box,
887
+ {
888
+ css: {
889
+ borderInline: "$borderWidths$xs solid $black400",
890
+ maxHeight: 734,
891
+ height: "100%",
892
+ position: "relative",
893
+ overflow: "auto",
894
+ padding: "$16 $36"
895
+ }
896
+ },
897
+ /* @__PURE__ */ React.createElement(SingleMappingEventWrapper, { field }),
898
+ !!((_m = (_l = field == null ? void 0 : field.mappedFields) == null ? void 0 : _l.questions) == null ? void 0 : _m.filter(
899
+ (question) => question.isEnabled
900
+ ).length) ? /* @__PURE__ */ React.createElement(
901
+ SingleMappingChipWrapper,
810
902
  {
811
- css: {
812
- borderInline: "$borderWidths$xs solid $black400",
813
- maxHeight: 734,
814
- height: "100%",
815
- position: "relative",
816
- overflow: "auto",
817
- padding: "$16 $36"
818
- }
819
- },
820
- /* @__PURE__ */ React.createElement(SingleMappingEventWrapper, { field }),
821
- !!((_m = (_l = field == null ? void 0 : field.mappedFields) == null ? void 0 : _l.questions) == null ? void 0 : _m.filter((question) => question.isEnabled).length) ? /* @__PURE__ */ React.createElement(
822
- SingleMappingChipWrapper,
823
- {
824
- heading: "Questions",
825
- fields: (_o = (_n = field == null ? void 0 : field.mappedFields) == null ? void 0 : _n.questions) == null ? void 0 : _o.filter((question) => question.isEnabled),
826
- backgroundColor: "#E5F2FF"
827
- }
828
- ) : null,
829
- !!((_q = (_p = field == null ? void 0 : field.mappedFields) == null ? void 0 : _p.variables) == null ? void 0 : _q.filter((variable) => variable.isEnabled).length) ? /* @__PURE__ */ React.createElement(
830
- SingleMappingChipWrapper,
831
- {
832
- heading: "Variables",
833
- fields: (_s = (_r = field == null ? void 0 : field.mappedFields) == null ? void 0 : _r.variables) == null ? void 0 : _s.filter((variable) => variable.isEnabled),
834
- backgroundColor: "$positive100"
835
- }
836
- ) : null,
837
- !!((_u = (_t = field == null ? void 0 : field.mappedFields) == null ? void 0 : _t.contactProperties) == null ? void 0 : _u.filter((property) => property.isEnabled).length) ? /* @__PURE__ */ React.createElement(
838
- SingleMappingChipWrapper,
839
- {
840
- heading: "Contacts",
841
- fields: (_w = (_v = field == null ? void 0 : field.mappedFields) == null ? void 0 : _v.contactProperties) == null ? void 0 : _w.filter((property) => property.isEnabled),
842
- backgroundColor: "$negative100"
843
- }
844
- ) : null,
845
- !!((_y = (_x = field == null ? void 0 : field.mappedFields) == null ? void 0 : _x.expressions) == null ? void 0 : _y.filter((expression) => expression.isEnabled).length) ? /* @__PURE__ */ React.createElement(
846
- SingleMappingChipWrapper,
847
- {
848
- heading: "Expression",
849
- backgroundColor: "$neutral100",
850
- fields: (_A = (_z = field == null ? void 0 : field.mappedFields) == null ? void 0 : _z.expressions) == null ? void 0 : _A.filter((expression) => expression.isEnabled)
851
- }
852
- ) : null,
853
- !!((_C = (_B = field == null ? void 0 : field.mappedFields) == null ? void 0 : _B.property) == null ? void 0 : _C.filter((property) => property.isEnabled).length) ? /* @__PURE__ */ React.createElement(
854
- SingleMappingChipWrapper,
855
- {
856
- heading: "Property",
857
- hideBorder: true,
858
- fields: (_E = (_D = field == null ? void 0 : field.mappedFields) == null ? void 0 : _D.property) == null ? void 0 : _E.filter((property) => property.isEnabled),
859
- backgroundColor: "rgba(74, 156, 166, 0.15)"
860
- }
861
- ) : null
862
- ),
863
- isMappingDisplayed && /* @__PURE__ */ React.createElement(
864
- box.Box,
903
+ heading: "Questions",
904
+ fields: (_o = (_n = field == null ? void 0 : field.mappedFields) == null ? void 0 : _n.questions) == null ? void 0 : _o.filter(
905
+ (question) => question.isEnabled
906
+ ),
907
+ backgroundColor: "#E5F2FF"
908
+ }
909
+ ) : null,
910
+ !!((_q = (_p = field == null ? void 0 : field.mappedFields) == null ? void 0 : _p.variables) == null ? void 0 : _q.filter(
911
+ (variable) => variable.isEnabled
912
+ ).length) ? /* @__PURE__ */ React.createElement(
913
+ SingleMappingChipWrapper,
865
914
  {
866
- css: {
867
- padding: "$8 $32",
868
- border: "$borderWidths$xs solid $black400",
869
- borderTop: "$borderWidths$xs solid $neutral200",
870
- borderRadius: "0 0 $2xl $2xl",
871
- height: "100%"
915
+ heading: "Variables",
916
+ fields: (_s = (_r = field == null ? void 0 : field.mappedFields) == null ? void 0 : _r.variables) == null ? void 0 : _s.filter(
917
+ (variable) => variable.isEnabled
918
+ ),
919
+ backgroundColor: "$positive100"
920
+ }
921
+ ) : null,
922
+ !!((_u = (_t = field == null ? void 0 : field.mappedFields) == null ? void 0 : _t.contactProperties) == null ? void 0 : _u.filter(
923
+ (property) => property.isEnabled
924
+ ).length) ? /* @__PURE__ */ React.createElement(
925
+ SingleMappingChipWrapper,
926
+ {
927
+ heading: "Contacts",
928
+ fields: (_w = (_v = field == null ? void 0 : field.mappedFields) == null ? void 0 : _v.contactProperties) == null ? void 0 : _w.filter(
929
+ (property) => property.isEnabled
930
+ ),
931
+ backgroundColor: "$negative100"
932
+ }
933
+ ) : null,
934
+ !!((_y = (_x = field == null ? void 0 : field.mappedFields) == null ? void 0 : _x.expressions) == null ? void 0 : _y.filter(
935
+ (expression) => expression.isEnabled
936
+ ).length) ? /* @__PURE__ */ React.createElement(
937
+ SingleMappingChipWrapper,
938
+ {
939
+ heading: "Expression",
940
+ backgroundColor: "$neutral100",
941
+ fields: (_A = (_z = field == null ? void 0 : field.mappedFields) == null ? void 0 : _z.expressions) == null ? void 0 : _A.filter(
942
+ (expression) => expression.isEnabled
943
+ )
944
+ }
945
+ ) : null,
946
+ !!((_C = (_B = field == null ? void 0 : field.mappedFields) == null ? void 0 : _B.property) == null ? void 0 : _C.filter(
947
+ (property) => property.isEnabled
948
+ ).length) ? /* @__PURE__ */ React.createElement(
949
+ SingleMappingChipWrapper,
950
+ {
951
+ heading: "Property",
952
+ hideBorder: true,
953
+ fields: (_E = (_D = field == null ? void 0 : field.mappedFields) == null ? void 0 : _D.property) == null ? void 0 : _E.filter(
954
+ (property) => property.isEnabled
955
+ ),
956
+ backgroundColor: "rgba(74, 156, 166, 0.15)"
957
+ }
958
+ ) : null
959
+ ), isMappingDisplayed && /* @__PURE__ */ React.createElement(
960
+ box.Box,
961
+ {
962
+ css: {
963
+ padding: "$8 $32",
964
+ border: "$borderWidths$xs solid $black400",
965
+ borderTop: "$borderWidths$xs solid $neutral200",
966
+ borderRadius: "0 0 $2xl $2xl",
967
+ height: "100%"
968
+ }
969
+ },
970
+ /* @__PURE__ */ React.createElement(
971
+ button.Button,
972
+ {
973
+ size: "sm",
974
+ leftIcon: /* @__PURE__ */ React.createElement(pencil.PencilIcon, null),
975
+ color: "primary",
976
+ variant: "ghost",
977
+ onClick: () => {
978
+ onMappingEditHandler(field.id);
979
+ handleEditField({
980
+ type: "SINGLE_MAPPING",
981
+ values: field,
982
+ id: field.id
983
+ });
984
+ handleDashboardPage(false, "MAPPING");
872
985
  }
873
986
  },
874
- /* @__PURE__ */ React.createElement(
875
- button.Button,
876
- {
877
- size: "sm",
878
- leftIcon: /* @__PURE__ */ React.createElement(pencil.PencilIcon, null),
879
- color: "primary",
880
- variant: "ghost",
881
- onClick: () => {
882
- onMappingEditHandler(field.id);
883
- handleEditField({
884
- type: "SINGLE_MAPPING",
885
- values: field,
886
- id: field.id
887
- });
888
- handleDashboardPage(false, "MAPPING");
889
- }
890
- },
891
- "Edit Mapping"
892
- )
987
+ "Edit Mapping"
893
988
  )
894
- ) : null
989
+ )) : null
895
990
  ), isDeleteModalOpen && /* @__PURE__ */ React.createElement(
896
991
  confirmationModal.default,
897
992
  {
@@ -908,7 +1003,6 @@ const EventComponent = ({
908
1003
  hasBorder,
909
1004
  hasLink = ""
910
1005
  }) => {
911
- console.log(hasLink, "hasLink");
912
1006
  return /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center" }, hasBorder && /* @__PURE__ */ React.createElement(box.Box, { css: { paddingInline: "$3" } }, /* @__PURE__ */ React.createElement(
913
1007
  box.Box,
914
1008
  {
@@ -919,7 +1013,23 @@ const EventComponent = ({
919
1013
  marginInline: "$4"
920
1014
  }
921
1015
  }
922
- )), /* @__PURE__ */ React.createElement(flex.Flex, { gap: "$2" }, /* @__PURE__ */ React.createElement(text.Text, { size: "sm", css: { color: "$neutral500" } }, heading), !!hasLink ? /* @__PURE__ */ React.createElement(text.Text, { size: "sm", weight: "medium", css: { color: "$neutral800", textDecoration: "underline", cursor: "pointer" }, onClick: () => window.open(`${hasLink}`, "_blank") }, description) : /* @__PURE__ */ React.createElement(text.Text, { size: "sm", weight: "medium", css: { color: "$neutral800" } }, description)));
1016
+ )), /* @__PURE__ */ React.createElement(flex.Flex, { gap: "$2" }, /* @__PURE__ */ React.createElement(text.Text, { size: "sm", css: { color: "$neutral700" } }, heading), !!hasLink ? /* @__PURE__ */ React.createElement(
1017
+ text.Text,
1018
+ {
1019
+ size: "sm",
1020
+ weight: "medium",
1021
+ css: {
1022
+ color: "$neutral800",
1023
+ textDecoration: "underline",
1024
+ cursor: "pointer",
1025
+ "&:hover": {
1026
+ color: !!hasLink ? "$neutral900" : "$neutral800"
1027
+ }
1028
+ },
1029
+ onClick: () => window.open(`${hasLink}`, "_blank")
1030
+ },
1031
+ description
1032
+ ) : /* @__PURE__ */ React.createElement(text.Text, { size: "sm", weight: "medium", css: { color: "$neutral800" } }, description)));
923
1033
  };
924
1034
  const SingleMappingEventWrapper = ({
925
1035
  field,
@@ -927,7 +1037,13 @@ const SingleMappingEventWrapper = ({
927
1037
  }) => {
928
1038
  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;
929
1039
  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;
930
- return /* @__PURE__ */ React.createElement(React.Fragment, null, hasEventSection ? /* @__PURE__ */ React.createElement(flex.Flex, { flexDirection: "column", gap: "$6" }, /* @__PURE__ */ React.createElement(text.Text, { size: "sm", weight: "bold", css: { textTransform: "uppercase" } }, "Event"), /* @__PURE__ */ React.createElement(flex.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.createElement(EventComponent, { heading: "Account:", 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 }) : 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.createElement(
1040
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, hasEventSection ? /* @__PURE__ */ React.createElement(flex.Flex, { flexDirection: "column", gap: "$6" }, /* @__PURE__ */ React.createElement(text.Text, { size: "sm", weight: "bold", css: { textTransform: "uppercase" } }, "Event"), /* @__PURE__ */ React.createElement(flex.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.createElement(
1041
+ EventComponent,
1042
+ {
1043
+ heading: "Account:",
1044
+ 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
1045
+ }
1046
+ ) : 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.createElement(
931
1047
  EventComponent,
932
1048
  {
933
1049
  heading: "Object:",
@@ -991,9 +1107,10 @@ const SingleMappingChipWrapper = ({
991
1107
  tooltip.Tooltip,
992
1108
  {
993
1109
  delayDuration: 300,
994
- content: currentChipWidth >= 248 ? name : "",
1110
+ content: currentChipWidth >= 220 ? name : "",
995
1111
  size: "md",
996
- sideOffset: 4
1112
+ sideOffset: 4,
1113
+ className: "dm-sans"
997
1114
  },
998
1115
  /* @__PURE__ */ React.createElement(
999
1116
  chip.Chip,
@@ -1002,8 +1119,10 @@ const SingleMappingChipWrapper = ({
1002
1119
  size: "md",
1003
1120
  css: {
1004
1121
  background: backgroundColor,
1122
+ borderRadius: "4px !important",
1005
1123
  maxWidth: 248,
1006
1124
  overflow: "hidden",
1125
+ fontFamily: "'Roboto Mono', monospace !important",
1007
1126
  textOverflow: "ellipsis",
1008
1127
  whiteSpace: "nowrap",
1009
1128
  display: "block"
@@ -1138,10 +1257,14 @@ const DashboardItem = ({
1138
1257
  dropdown.DropdownMenuContent,
1139
1258
  {
1140
1259
  className: "dm-sans",
1141
- css: { minWidth: 180, zIndex: 10, "& p": {
1142
- margin: "0 !important",
1143
- padding: "0 !important"
1144
- } },
1260
+ css: {
1261
+ minWidth: 180,
1262
+ zIndex: 10,
1263
+ "& p": {
1264
+ margin: "0 !important",
1265
+ padding: "0 !important"
1266
+ }
1267
+ },
1145
1268
  sideOffset: 4,
1146
1269
  align: "end"
1147
1270
  },
@@ -1163,9 +1286,16 @@ const DashboardItem = ({
1163
1286
  },
1164
1287
  /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$2" }, /* @__PURE__ */ React.createElement(pencil.PencilIcon, { color: "#6A6A6A", size: 20 }), /* @__PURE__ */ React.createElement(text.Text, { size: "sm" }, "Edit"))
1165
1288
  ),
1166
- /* @__PURE__ */ React.createElement(dropdown.DropdownMenuItem, { onClick: () => setIsDeleteModalOpen(true), css: {
1167
- cursor: "pointer"
1168
- } }, /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$2" }, /* @__PURE__ */ React.createElement(_delete.DeleteIcon, { color: "#6A6A6A", size: 20 }), /* @__PURE__ */ React.createElement(text.Text, { size: "sm" }, "Delete")))
1289
+ /* @__PURE__ */ React.createElement(
1290
+ dropdown.DropdownMenuItem,
1291
+ {
1292
+ onClick: () => setIsDeleteModalOpen(true),
1293
+ css: {
1294
+ cursor: "pointer"
1295
+ }
1296
+ },
1297
+ /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$2" }, /* @__PURE__ */ React.createElement(_delete.DeleteIcon, { color: "#6A6A6A", size: 20 }), /* @__PURE__ */ React.createElement(text.Text, { size: "sm" }, "Delete"))
1298
+ )
1169
1299
  )))
1170
1300
  ),
1171
1301
  /* @__PURE__ */ React.createElement(