@sparrowengg/integrations-templates-frontend 1.3.6 → 1.3.8
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/integration-template/components/dashboard.js +238 -236
- package/dist/cjs/integration-template/components/dashboard.js.map +1 -1
- package/dist/cjs/integration-template/index.js +10 -4
- package/dist/cjs/integration-template/index.js.map +1 -1
- package/dist/cjs/mapping/components/custom-date-menu.js +1 -0
- package/dist/cjs/mapping/components/custom-date-menu.js.map +1 -1
- package/dist/cjs/mapping/index.js +1 -2
- package/dist/cjs/mapping/index.js.map +1 -1
- package/dist/cjs/triggers/components/trigger.js +14 -18
- package/dist/cjs/triggers/components/trigger.js.map +1 -1
- package/dist/cjs/triggers/index.js +7 -3
- package/dist/cjs/triggers/index.js.map +1 -1
- package/dist/cjs/triggers/services/index.js +30 -0
- package/dist/cjs/triggers/services/index.js.map +1 -0
- package/dist/es/integration-template/components/dashboard.js +238 -236
- package/dist/es/integration-template/components/dashboard.js.map +1 -1
- package/dist/es/integration-template/index.js +10 -4
- package/dist/es/integration-template/index.js.map +1 -1
- package/dist/es/mapping/components/custom-date-menu.js +1 -0
- package/dist/es/mapping/components/custom-date-menu.js.map +1 -1
- package/dist/es/mapping/index.js +1 -2
- package/dist/es/mapping/index.js.map +1 -1
- package/dist/es/triggers/components/trigger.js +15 -19
- package/dist/es/triggers/components/trigger.js.map +1 -1
- package/dist/es/triggers/index.js +7 -3
- package/dist/es/triggers/index.js.map +1 -1
- package/dist/es/triggers/services/index.js +28 -0
- package/dist/es/triggers/services/index.js.map +1 -0
- package/dist/index.d.ts +4 -2
- package/package.json +1 -1
|
@@ -373,7 +373,7 @@ const TriggerDasboardItem = ({
|
|
|
373
373
|
flex.Flex,
|
|
374
374
|
{
|
|
375
375
|
flexDirection: "column",
|
|
376
|
-
css: { width: "100%", height: "100%", overflow: "auto" }
|
|
376
|
+
css: { width: "100%", height: "100%", overflow: "auto", marginTop: "$8" }
|
|
377
377
|
},
|
|
378
378
|
/* @__PURE__ */ React.createElement(
|
|
379
379
|
flex.Flex,
|
|
@@ -438,112 +438,104 @@ const TriggerDasboardItem = ({
|
|
|
438
438
|
/* @__PURE__ */ React.createElement(dropdown.DropdownMenuItem, { onClick: () => deleteFieldHandler(field.id) }, /* @__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")))
|
|
439
439
|
)))
|
|
440
440
|
),
|
|
441
|
-
/* @__PURE__ */ React.createElement(
|
|
441
|
+
isMappingDisplayed && /* @__PURE__ */ React.createElement(
|
|
442
442
|
box.Box,
|
|
443
443
|
{
|
|
444
444
|
css: {
|
|
445
|
-
|
|
445
|
+
borderInline: "$borderWidths$xs solid $black400",
|
|
446
|
+
maxHeight: 734,
|
|
447
|
+
height: "100%",
|
|
448
|
+
position: "relative",
|
|
449
|
+
overflow: "auto",
|
|
450
|
+
padding: "$16 $36"
|
|
446
451
|
}
|
|
447
452
|
},
|
|
448
|
-
/* @__PURE__ */ React.createElement(
|
|
449
|
-
|
|
453
|
+
/* @__PURE__ */ React.createElement(SingleMappingEventWrapper, { isTrigger: true, field }),
|
|
454
|
+
((_d = (_c = field == null ? void 0 : field.fields) == null ? void 0 : _c.filters) == null ? void 0 : _d.length) ? /* @__PURE__ */ React.createElement(React.Fragment, null, " ", /* @__PURE__ */ React.createElement(
|
|
455
|
+
flex.Flex,
|
|
450
456
|
{
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
height: "100%",
|
|
455
|
-
position: "relative",
|
|
456
|
-
overflow: "auto",
|
|
457
|
-
padding: "$16 $36"
|
|
458
|
-
}
|
|
457
|
+
flexDirection: "column",
|
|
458
|
+
gap: "$6",
|
|
459
|
+
css: { paddingBlock: "$8" }
|
|
459
460
|
},
|
|
460
|
-
/* @__PURE__ */ React.createElement(
|
|
461
|
-
|
|
462
|
-
flex.Flex,
|
|
461
|
+
/* @__PURE__ */ React.createElement(
|
|
462
|
+
text.Text,
|
|
463
463
|
{
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
css: {
|
|
464
|
+
size: "sm",
|
|
465
|
+
weight: "bold",
|
|
466
|
+
css: { textTransform: "uppercase" }
|
|
467
467
|
},
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
weight: "bold",
|
|
473
|
-
css: { textTransform: "uppercase" }
|
|
474
|
-
},
|
|
475
|
-
"CONDITION"
|
|
476
|
-
),
|
|
477
|
-
index.default(transformDataToString(field.fields))
|
|
478
|
-
), /* @__PURE__ */ React.createElement(
|
|
479
|
-
box.Box,
|
|
480
|
-
{
|
|
481
|
-
css: {
|
|
482
|
-
marginBlock: "$4",
|
|
483
|
-
height: "1px",
|
|
484
|
-
background: "$neutral100"
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
)) : null,
|
|
488
|
-
((_f = (_e = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _e.variables) == null ? void 0 : _f.length) ? /* @__PURE__ */ React.createElement(
|
|
489
|
-
SingleMappingChipWrapper,
|
|
490
|
-
{
|
|
491
|
-
heading: "PASSING VARIABLE TO SURVEY",
|
|
492
|
-
fields: field.triggerDetails.variables,
|
|
493
|
-
backgroundColor: "$positive100"
|
|
494
|
-
}
|
|
495
|
-
) : null,
|
|
496
|
-
/* @__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" }, ((_h = (_g = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _g.shareType) == null ? void 0 : _h.value) ? /* @__PURE__ */ React.createElement(
|
|
497
|
-
EventComponent,
|
|
498
|
-
{
|
|
499
|
-
heading: "Share Type:",
|
|
500
|
-
description: (_j = (_i = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _i.shareType) == null ? void 0 : _j.label
|
|
501
|
-
}
|
|
502
|
-
) : null, ((_l = (_k = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _k.shareRecipient) == null ? void 0 : _l.value) ? /* @__PURE__ */ React.createElement(
|
|
503
|
-
EventComponent,
|
|
504
|
-
{
|
|
505
|
-
heading: "Recipient:",
|
|
506
|
-
hasBorder: true,
|
|
507
|
-
description: (_n = (_m = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _m.shareRecipient) == null ? void 0 : _n.label
|
|
508
|
-
}
|
|
509
|
-
) : null, ((_p = (_o = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _o.shareChannel) == null ? void 0 : _p.value) ? /* @__PURE__ */ React.createElement(
|
|
510
|
-
EventComponent,
|
|
511
|
-
{
|
|
512
|
-
hasBorder: true,
|
|
513
|
-
heading: "Share Channel:",
|
|
514
|
-
description: (_r = (_q = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _q.shareChannel) == null ? void 0 : _r.label
|
|
515
|
-
}
|
|
516
|
-
) : null)))
|
|
517
|
-
),
|
|
518
|
-
isMappingDisplayed && /* @__PURE__ */ React.createElement(
|
|
468
|
+
"CONDITION"
|
|
469
|
+
),
|
|
470
|
+
index.default(transformDataToString(field.fields))
|
|
471
|
+
), /* @__PURE__ */ React.createElement(
|
|
519
472
|
box.Box,
|
|
520
473
|
{
|
|
521
474
|
css: {
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
475
|
+
marginBlock: "$4",
|
|
476
|
+
height: "1px",
|
|
477
|
+
background: "$neutral100"
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
)) : null,
|
|
481
|
+
((_f = (_e = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _e.variables) == null ? void 0 : _f.length) ? /* @__PURE__ */ React.createElement(
|
|
482
|
+
SingleMappingChipWrapper,
|
|
483
|
+
{
|
|
484
|
+
heading: "PASSING VARIABLE TO SURVEY",
|
|
485
|
+
fields: field.triggerDetails.variables,
|
|
486
|
+
backgroundColor: "$positive100"
|
|
487
|
+
}
|
|
488
|
+
) : null,
|
|
489
|
+
/* @__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" }, ((_h = (_g = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _g.shareType) == null ? void 0 : _h.value) ? /* @__PURE__ */ React.createElement(
|
|
490
|
+
EventComponent,
|
|
491
|
+
{
|
|
492
|
+
heading: "Share Type:",
|
|
493
|
+
description: (_j = (_i = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _i.shareType) == null ? void 0 : _j.label
|
|
494
|
+
}
|
|
495
|
+
) : null, ((_l = (_k = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _k.shareRecipient) == null ? void 0 : _l.value) ? /* @__PURE__ */ React.createElement(
|
|
496
|
+
EventComponent,
|
|
497
|
+
{
|
|
498
|
+
heading: "Recipient:",
|
|
499
|
+
hasBorder: true,
|
|
500
|
+
description: (_n = (_m = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _m.shareRecipient) == null ? void 0 : _n.label
|
|
501
|
+
}
|
|
502
|
+
) : null, ((_p = (_o = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _o.shareChannel) == null ? void 0 : _p.value) ? /* @__PURE__ */ React.createElement(
|
|
503
|
+
EventComponent,
|
|
504
|
+
{
|
|
505
|
+
hasBorder: true,
|
|
506
|
+
heading: "Share Channel:",
|
|
507
|
+
description: (_r = (_q = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _q.shareChannel) == null ? void 0 : _r.label
|
|
508
|
+
}
|
|
509
|
+
) : null)))
|
|
510
|
+
),
|
|
511
|
+
isMappingDisplayed && /* @__PURE__ */ React.createElement(
|
|
512
|
+
box.Box,
|
|
513
|
+
{
|
|
514
|
+
css: {
|
|
515
|
+
padding: "$8 $32",
|
|
516
|
+
border: "$borderWidths$xs solid $black400",
|
|
517
|
+
borderTop: "$borderWidths$xs solid $neutral200",
|
|
518
|
+
borderRadius: "0 0 $2xl $2xl",
|
|
519
|
+
height: "100%"
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
/* @__PURE__ */ React.createElement(
|
|
523
|
+
button.Button,
|
|
524
|
+
{
|
|
525
|
+
size: "sm",
|
|
526
|
+
leftIcon: /* @__PURE__ */ React.createElement(pencil.PencilIcon, null),
|
|
527
|
+
color: "primary",
|
|
528
|
+
variant: "ghost",
|
|
529
|
+
onClick: () => {
|
|
530
|
+
handleEditField({
|
|
531
|
+
type: "TRIGGER",
|
|
532
|
+
values: field,
|
|
533
|
+
id: field.id
|
|
534
|
+
});
|
|
535
|
+
handleDashboardPage(false, "TRIGGER");
|
|
527
536
|
}
|
|
528
537
|
},
|
|
529
|
-
|
|
530
|
-
button.Button,
|
|
531
|
-
{
|
|
532
|
-
size: "sm",
|
|
533
|
-
leftIcon: /* @__PURE__ */ React.createElement(pencil.PencilIcon, null),
|
|
534
|
-
color: "primary",
|
|
535
|
-
variant: "ghost",
|
|
536
|
-
onClick: () => {
|
|
537
|
-
handleEditField({
|
|
538
|
-
type: "TRIGGER",
|
|
539
|
-
values: field,
|
|
540
|
-
id: field.id
|
|
541
|
-
});
|
|
542
|
-
handleDashboardPage(false, "TRIGGER");
|
|
543
|
-
}
|
|
544
|
-
},
|
|
545
|
-
"Edit Triggers"
|
|
546
|
-
)
|
|
538
|
+
"Edit Triggers"
|
|
547
539
|
)
|
|
548
540
|
)
|
|
549
541
|
);
|
|
@@ -871,179 +863,189 @@ const DashboardItem = ({
|
|
|
871
863
|
}
|
|
872
864
|
return field;
|
|
873
865
|
};
|
|
874
|
-
return /* @__PURE__ */ React.createElement(
|
|
866
|
+
return /* @__PURE__ */ React.createElement(
|
|
875
867
|
flex.Flex,
|
|
876
868
|
{
|
|
869
|
+
flexDirection: "column",
|
|
877
870
|
css: {
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
padding: "$10 $12",
|
|
881
|
-
width: "100%",
|
|
882
|
-
backgroundColor: isMappingDisplayed ? "rgba(100, 116, 139, 0.04)" : "$white900"
|
|
883
|
-
},
|
|
884
|
-
justifyContent: "space-between",
|
|
885
|
-
alignItems: "center"
|
|
871
|
+
marginTop: "$8"
|
|
872
|
+
}
|
|
886
873
|
},
|
|
887
874
|
/* @__PURE__ */ React.createElement(
|
|
888
875
|
flex.Flex,
|
|
889
876
|
{
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
_switch.Switch,
|
|
900
|
-
{
|
|
901
|
-
size: "md",
|
|
902
|
-
checked: isEnabled,
|
|
903
|
-
onChange: (value) => toggleDashboardField(id, value)
|
|
904
|
-
}
|
|
905
|
-
), /* @__PURE__ */ React.createElement(dropdown.DropdownMenu, null, /* @__PURE__ */ React.createElement(dropdown.DropdownMenuTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
|
|
906
|
-
iconButton.IconButton,
|
|
907
|
-
{
|
|
908
|
-
variant: "ghost",
|
|
909
|
-
color: "default",
|
|
910
|
-
size: "lg",
|
|
911
|
-
icon: /* @__PURE__ */ React.createElement(ellipsisVertical.EllipsisVerticalIcon, null)
|
|
912
|
-
}
|
|
913
|
-
)), /* @__PURE__ */ React.createElement(
|
|
914
|
-
dropdown.DropdownMenuContent,
|
|
915
|
-
{
|
|
916
|
-
css: { minWidth: 180, zIndex: 10 },
|
|
917
|
-
sideOffset: 4,
|
|
918
|
-
align: "end"
|
|
877
|
+
css: {
|
|
878
|
+
border: isMappingDisplayed ? "$borderWidths$xs solid $black400" : "$borderWidths$xs solid $neutral200",
|
|
879
|
+
borderRadius: isMappingDisplayed ? "$2xl $2xl 0 0" : "$2xl",
|
|
880
|
+
padding: "$10 $12",
|
|
881
|
+
width: "100%",
|
|
882
|
+
backgroundColor: isMappingDisplayed ? "rgba(100, 116, 139, 0.04)" : "$white900"
|
|
883
|
+
},
|
|
884
|
+
justifyContent: "space-between",
|
|
885
|
+
alignItems: "center"
|
|
919
886
|
},
|
|
920
887
|
/* @__PURE__ */ React.createElement(
|
|
921
|
-
|
|
888
|
+
flex.Flex,
|
|
922
889
|
{
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
id
|
|
928
|
-
});
|
|
929
|
-
handleDashboardPage(false, type);
|
|
930
|
-
}
|
|
890
|
+
alignItems: "center",
|
|
891
|
+
gap: "$4",
|
|
892
|
+
css: { cursor: "pointer" },
|
|
893
|
+
onClick: () => setIsMappingDisplayed(!isMappingDisplayed)
|
|
931
894
|
},
|
|
932
|
-
/* @__PURE__ */ React.createElement(
|
|
895
|
+
isMappingDisplayed ? /* @__PURE__ */ React.createElement(chevronDown.ChevronDownIcon, { size: 40, color: "#848484" }) : /* @__PURE__ */ React.createElement(chevronRight.ChevronRightIcon, { size: 40, color: "#848484" }),
|
|
896
|
+
/* @__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" }, heading), /* @__PURE__ */ React.createElement(text.Text, { size: "sm", css: { color: "$neutral600" } }, description)))
|
|
933
897
|
),
|
|
934
|
-
/* @__PURE__ */ React.createElement(
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
}
|
|
942
|
-
|
|
898
|
+
/* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$12" }, /* @__PURE__ */ React.createElement(
|
|
899
|
+
_switch.Switch,
|
|
900
|
+
{
|
|
901
|
+
size: "md",
|
|
902
|
+
checked: isEnabled,
|
|
903
|
+
onChange: (value) => toggleDashboardField(id, value)
|
|
904
|
+
}
|
|
905
|
+
), /* @__PURE__ */ React.createElement(dropdown.DropdownMenu, null, /* @__PURE__ */ React.createElement(dropdown.DropdownMenuTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
|
|
906
|
+
iconButton.IconButton,
|
|
907
|
+
{
|
|
908
|
+
variant: "ghost",
|
|
909
|
+
color: "default",
|
|
910
|
+
size: "lg",
|
|
911
|
+
icon: /* @__PURE__ */ React.createElement(ellipsisVertical.EllipsisVerticalIcon, null)
|
|
912
|
+
}
|
|
913
|
+
)), /* @__PURE__ */ React.createElement(
|
|
914
|
+
dropdown.DropdownMenuContent,
|
|
915
|
+
{
|
|
916
|
+
css: { minWidth: 180, zIndex: 10 },
|
|
917
|
+
sideOffset: 4,
|
|
918
|
+
align: "end"
|
|
919
|
+
},
|
|
920
|
+
/* @__PURE__ */ React.createElement(
|
|
921
|
+
dropdown.DropdownMenuItem,
|
|
922
|
+
{
|
|
923
|
+
onClick: () => {
|
|
924
|
+
handleEditField({
|
|
925
|
+
type,
|
|
926
|
+
values: fields,
|
|
927
|
+
id
|
|
928
|
+
});
|
|
929
|
+
handleDashboardPage(false, type);
|
|
930
|
+
}
|
|
931
|
+
},
|
|
932
|
+
/* @__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"))
|
|
933
|
+
),
|
|
934
|
+
/* @__PURE__ */ React.createElement(dropdown.DropdownMenuItem, { onClick: () => deleteFieldHandler(id) }, /* @__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")))
|
|
935
|
+
)))
|
|
936
|
+
),
|
|
943
937
|
/* @__PURE__ */ React.createElement(
|
|
944
938
|
box.Box,
|
|
945
939
|
{
|
|
946
940
|
css: {
|
|
947
|
-
|
|
948
|
-
maxHeight: 432,
|
|
949
|
-
height: "100%",
|
|
950
|
-
position: "relative",
|
|
951
|
-
overflow: "auto"
|
|
941
|
+
height: isMappingDisplayed ? "100%" : 0
|
|
952
942
|
}
|
|
953
943
|
},
|
|
954
|
-
|
|
955
|
-
|
|
944
|
+
/* @__PURE__ */ React.createElement(
|
|
945
|
+
box.Box,
|
|
956
946
|
{
|
|
957
947
|
css: {
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
textAlign: "left",
|
|
964
|
-
borderInline: "none"
|
|
965
|
-
},
|
|
966
|
-
borderBottom: "$borderWidths$xs solid $neutral100",
|
|
967
|
-
position: "sticky",
|
|
968
|
-
top: 0,
|
|
969
|
-
zIndex: 10
|
|
948
|
+
borderInline: "$borderWidths$xs solid $black400",
|
|
949
|
+
maxHeight: 432,
|
|
950
|
+
height: "100%",
|
|
951
|
+
position: "relative",
|
|
952
|
+
overflow: "auto"
|
|
970
953
|
}
|
|
971
954
|
},
|
|
972
|
-
/* @__PURE__ */ React.createElement(table.
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
955
|
+
(fields == null ? void 0 : fields.length) ? /* @__PURE__ */ React.createElement(table.Table, { css: { borderCollapse: "collapse", width: "100%" } }, /* @__PURE__ */ React.createElement(
|
|
956
|
+
table.Thead,
|
|
957
|
+
{
|
|
958
|
+
css: {
|
|
959
|
+
background: "$white900",
|
|
960
|
+
"& th": {
|
|
961
|
+
padding: "$7 $8",
|
|
962
|
+
fontSize: "$sm",
|
|
963
|
+
lineHeight: "$sm",
|
|
964
|
+
textAlign: "left",
|
|
965
|
+
borderInline: "none"
|
|
966
|
+
},
|
|
967
|
+
borderBottom: "$borderWidths$xs solid $neutral100",
|
|
968
|
+
position: "sticky",
|
|
969
|
+
top: 0,
|
|
970
|
+
zIndex: 10
|
|
985
971
|
}
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
972
|
+
},
|
|
973
|
+
/* @__PURE__ */ React.createElement(table.Th, { css: { paddingLeft: "$38 !important" } }, "Type"),
|
|
974
|
+
/* @__PURE__ */ React.createElement(table.Th, null, "SurveySparrow Field"),
|
|
975
|
+
/* @__PURE__ */ React.createElement(table.Th, null, `${integrationName} Field`),
|
|
976
|
+
/* @__PURE__ */ React.createElement(table.Th, { css: { paddingRight: "$20 !important" } }, "Default Value")
|
|
977
|
+
), /* @__PURE__ */ React.createElement(
|
|
978
|
+
table.Tbody,
|
|
979
|
+
{
|
|
980
|
+
css: {
|
|
981
|
+
"& tr:last-child": {
|
|
982
|
+
borderBottom: 0,
|
|
995
983
|
"& td": {
|
|
996
|
-
|
|
997
|
-
fontSize: "$sm",
|
|
998
|
-
lineHeight: "$sm",
|
|
999
|
-
borderInline: "none"
|
|
1000
|
-
},
|
|
1001
|
-
"& td:first-child": {
|
|
1002
|
-
paddingLeft: "$38 !important"
|
|
1003
|
-
},
|
|
1004
|
-
"& td:last-child": {
|
|
1005
|
-
paddingRight: "$20 !important"
|
|
984
|
+
borderBottom: 0
|
|
1006
985
|
}
|
|
1007
986
|
}
|
|
1008
|
-
}
|
|
1009
|
-
/* @__PURE__ */ React.createElement(table.Td, null, (_b = (_a = field.mappedType) == null ? void 0 : _a.label) != null ? _b : "--"),
|
|
1010
|
-
/* @__PURE__ */ React.createElement(table.Td, null, (_d = (_c = field.surveySparrowField) == null ? void 0 : _c.label) != null ? _d : "--"),
|
|
1011
|
-
/* @__PURE__ */ React.createElement(table.Td, null, (_f = (_e = field.integrationField) == null ? void 0 : _e.label) != null ? _f : "--"),
|
|
1012
|
-
/* @__PURE__ */ React.createElement(table.Td, null, (_g = getDefaultFieldValue(field.defaultValue)) != null ? _g : "--")
|
|
1013
|
-
);
|
|
1014
|
-
})
|
|
1015
|
-
)) : null
|
|
1016
|
-
),
|
|
1017
|
-
isMappingDisplayed && /* @__PURE__ */ React.createElement(
|
|
1018
|
-
box.Box,
|
|
1019
|
-
{
|
|
1020
|
-
css: {
|
|
1021
|
-
padding: "$8 $32",
|
|
1022
|
-
border: "$borderWidths$xs solid $black400",
|
|
1023
|
-
borderRadius: "0 0 $2xl $2xl",
|
|
1024
|
-
height: "100%"
|
|
1025
|
-
}
|
|
1026
|
-
},
|
|
1027
|
-
/* @__PURE__ */ React.createElement(
|
|
1028
|
-
button.Button,
|
|
1029
|
-
{
|
|
1030
|
-
size: "sm",
|
|
1031
|
-
onClick: () => {
|
|
1032
|
-
handleEditField({
|
|
1033
|
-
type,
|
|
1034
|
-
values: fields,
|
|
1035
|
-
id
|
|
1036
|
-
});
|
|
1037
|
-
handleDashboardPage(false, type);
|
|
987
|
+
}
|
|
1038
988
|
},
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
989
|
+
fields.map((field) => {
|
|
990
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
991
|
+
return /* @__PURE__ */ React.createElement(
|
|
992
|
+
table.Tr,
|
|
993
|
+
{
|
|
994
|
+
css: {
|
|
995
|
+
borderBottom: "$borderWidths$xs solid $neutral100",
|
|
996
|
+
"& td": {
|
|
997
|
+
padding: "$7 $8",
|
|
998
|
+
fontSize: "$sm",
|
|
999
|
+
lineHeight: "$sm",
|
|
1000
|
+
borderInline: "none"
|
|
1001
|
+
},
|
|
1002
|
+
"& td:first-child": {
|
|
1003
|
+
paddingLeft: "$38 !important"
|
|
1004
|
+
},
|
|
1005
|
+
"& td:last-child": {
|
|
1006
|
+
paddingRight: "$20 !important"
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
},
|
|
1010
|
+
/* @__PURE__ */ React.createElement(table.Td, null, (_b = (_a = field.mappedType) == null ? void 0 : _a.label) != null ? _b : "--"),
|
|
1011
|
+
/* @__PURE__ */ React.createElement(table.Td, null, (_d = (_c = field.surveySparrowField) == null ? void 0 : _c.label) != null ? _d : "--"),
|
|
1012
|
+
/* @__PURE__ */ React.createElement(table.Td, null, (_f = (_e = field.integrationField) == null ? void 0 : _e.label) != null ? _f : "--"),
|
|
1013
|
+
/* @__PURE__ */ React.createElement(table.Td, null, (_g = getDefaultFieldValue(field.defaultValue)) != null ? _g : "--")
|
|
1014
|
+
);
|
|
1015
|
+
})
|
|
1016
|
+
)) : null
|
|
1017
|
+
),
|
|
1018
|
+
isMappingDisplayed && /* @__PURE__ */ React.createElement(
|
|
1019
|
+
box.Box,
|
|
1020
|
+
{
|
|
1021
|
+
css: {
|
|
1022
|
+
padding: "$8 $32",
|
|
1023
|
+
border: "$borderWidths$xs solid $black400",
|
|
1024
|
+
borderRadius: "0 0 $2xl $2xl",
|
|
1025
|
+
height: "100%"
|
|
1026
|
+
}
|
|
1042
1027
|
},
|
|
1043
|
-
|
|
1028
|
+
/* @__PURE__ */ React.createElement(
|
|
1029
|
+
button.Button,
|
|
1030
|
+
{
|
|
1031
|
+
size: "sm",
|
|
1032
|
+
onClick: () => {
|
|
1033
|
+
handleEditField({
|
|
1034
|
+
type,
|
|
1035
|
+
values: fields,
|
|
1036
|
+
id
|
|
1037
|
+
});
|
|
1038
|
+
handleDashboardPage(false, type);
|
|
1039
|
+
},
|
|
1040
|
+
leftIcon: /* @__PURE__ */ React.createElement(pencil.PencilIcon, null),
|
|
1041
|
+
color: "primary",
|
|
1042
|
+
variant: "ghost"
|
|
1043
|
+
},
|
|
1044
|
+
`Edit ${heading}`
|
|
1045
|
+
)
|
|
1044
1046
|
)
|
|
1045
1047
|
)
|
|
1046
|
-
)
|
|
1048
|
+
);
|
|
1047
1049
|
};
|
|
1048
1050
|
const DropdownItem = ({
|
|
1049
1051
|
icon,
|