@sparrowengg/integrations-templates-frontend 2.1.0-beta.1 → 2.1.0-beta.3
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/cascader-dropdown/cascader-dropdown-content.js +1 -1
- package/dist/cjs/cascader-dropdown/cascader-dropdown-content.js.map +1 -1
- package/dist/cjs/commons/components/NamingModal.js +34 -62
- package/dist/cjs/commons/components/NamingModal.js.map +1 -1
- package/dist/cjs/commons/components/confirmation-modal.js +12 -24
- package/dist/cjs/commons/components/confirmation-modal.js.map +1 -1
- package/dist/cjs/commons/components/custom-pill.js +12 -30
- package/dist/cjs/commons/components/custom-pill.js.map +1 -1
- package/dist/cjs/commons/components/draftModal.js +31 -45
- package/dist/cjs/commons/components/draftModal.js.map +1 -1
- package/dist/cjs/commons/components/edit-confirmation.js +17 -34
- package/dist/cjs/commons/components/edit-confirmation.js.map +1 -1
- package/dist/cjs/commons/components/import-modal.js +18 -49
- package/dist/cjs/commons/components/import-modal.js.map +1 -1
- package/dist/cjs/commons/components/spinner.js +2 -16
- package/dist/cjs/commons/components/spinner.js.map +1 -1
- package/dist/cjs/commons/components/theme-wrapper.js +12 -9
- package/dist/cjs/commons/components/theme-wrapper.js.map +1 -1
- package/dist/cjs/commons/constants/enhanced.js.map +1 -1
- package/dist/cjs/commons/helpers/index.js +52 -93
- package/dist/cjs/commons/helpers/index.js.map +1 -1
- package/dist/cjs/commons/icons/arrow.js +3 -38
- package/dist/cjs/commons/icons/arrow.js.map +1 -1
- package/dist/cjs/commons/icons/cursor.js +8 -21
- package/dist/cjs/commons/icons/cursor.js.map +1 -1
- package/dist/cjs/commons/icons/email-letter.js +12 -30
- package/dist/cjs/commons/icons/email-letter.js.map +1 -1
- package/dist/cjs/commons/icons/mapping.js +10 -23
- package/dist/cjs/commons/icons/mapping.js.map +1 -1
- package/dist/cjs/commons/icons/nested-add.js +14 -32
- package/dist/cjs/commons/icons/nested-add.js.map +1 -1
- package/dist/cjs/commons/icons/sms.js +18 -36
- package/dist/cjs/commons/icons/sms.js.map +1 -1
- package/dist/cjs/commons/icons/sync.js +3 -110
- package/dist/cjs/commons/icons/sync.js.map +1 -1
- package/dist/cjs/commons/icons/trash.js +15 -33
- package/dist/cjs/commons/icons/trash.js.map +1 -1
- package/dist/cjs/commons/icons/whatsapp.js +31 -49
- package/dist/cjs/commons/icons/whatsapp.js.map +1 -1
- package/dist/cjs/contact-import/components/ManageImport/Completed.js +41 -27
- package/dist/cjs/contact-import/components/ManageImport/Completed.js.map +1 -1
- package/dist/cjs/contact-import/components/ManageImport/Dashboard.js +43 -23
- package/dist/cjs/contact-import/components/ManageImport/Dashboard.js.map +1 -1
- package/dist/cjs/contact-import/components/ManageImport/NoDataState.js +6 -7
- package/dist/cjs/contact-import/components/ManageImport/NoDataState.js.map +1 -1
- package/dist/cjs/contact-import/components/ManageImport/Scheduled.js +46 -30
- package/dist/cjs/contact-import/components/ManageImport/Scheduled.js.map +1 -1
- package/dist/cjs/contact-import/components/ManageImport/icon.js +85 -0
- package/dist/cjs/contact-import/components/ManageImport/icon.js.map +1 -0
- package/dist/cjs/contact-import/components/Scheduling.js +27 -39
- package/dist/cjs/contact-import/components/Scheduling.js.map +1 -1
- package/dist/cjs/contact-import/components/TimePicker.js +102 -129
- package/dist/cjs/contact-import/components/TimePicker.js.map +1 -1
- package/dist/cjs/contact-import/components/conact-import-schedule.js +64 -0
- package/dist/cjs/contact-import/components/conact-import-schedule.js.map +1 -0
- package/dist/cjs/contact-import/components/contact-import-configure.js +75 -0
- package/dist/cjs/contact-import/components/contact-import-configure.js.map +1 -0
- package/dist/cjs/contact-import/components/contact-import-mapping.js +224 -0
- package/dist/cjs/contact-import/components/contact-import-mapping.js.map +1 -0
- package/dist/cjs/contact-import/constants.js +21 -0
- package/dist/cjs/contact-import/constants.js.map +1 -0
- package/dist/cjs/contact-import/index.js +242 -32
- package/dist/cjs/contact-import/index.js.map +1 -1
- package/dist/cjs/dynamic-mapping/components/Mapping.js +321 -203
- package/dist/cjs/dynamic-mapping/components/Mapping.js.map +1 -1
- package/dist/cjs/dynamic-mapping/index.js +972 -34
- package/dist/cjs/dynamic-mapping/index.js.map +1 -1
- package/dist/cjs/filter/filter-pill-value-selector.js +1 -1
- package/dist/cjs/filter/filter-pill-value-selector.js.map +1 -1
- package/dist/cjs/index.js +12 -159
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/integration-template/components/dashboard.js +137 -130
- package/dist/cjs/integration-template/components/dashboard.js.map +1 -1
- package/dist/cjs/integration-template/index.js +343 -0
- package/dist/cjs/integration-template/index.js.map +1 -0
- package/dist/cjs/mapping/components/custom-menu.js +3 -4
- package/dist/cjs/mapping/components/custom-menu.js.map +1 -1
- package/dist/cjs/mapping/components/field.js +103 -121
- package/dist/cjs/mapping/components/field.js.map +1 -1
- package/dist/cjs/mapping/components/mapping.js +195 -106
- package/dist/cjs/mapping/components/mapping.js.map +1 -1
- package/dist/cjs/mapping/constants/index.js +2 -259
- package/dist/cjs/mapping/constants/index.js.map +1 -1
- package/dist/cjs/mapping/index.js +618 -38
- package/dist/cjs/mapping/index.js.map +1 -1
- package/dist/cjs/mapping/services/index.js +58 -96
- package/dist/cjs/mapping/services/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-menu/dist/index.js +7 -7
- package/dist/cjs/single-mapping/components/mapping.js +490 -0
- package/dist/cjs/single-mapping/components/mapping.js.map +1 -0
- package/dist/cjs/single-mapping/index.js +986 -58
- package/dist/cjs/single-mapping/index.js.map +1 -1
- package/dist/cjs/triggers/components/subcomponents.js +1140 -0
- package/dist/cjs/triggers/components/subcomponents.js.map +1 -0
- package/dist/cjs/triggers/components/trigger.js +491 -0
- package/dist/cjs/triggers/components/trigger.js.map +1 -0
- package/dist/cjs/triggers/constants/index.js +0 -253
- package/dist/cjs/triggers/constants/index.js.map +1 -1
- package/dist/cjs/triggers/index.js +333 -0
- package/dist/cjs/triggers/index.js.map +1 -0
- package/dist/cjs/triggers/services/index.js +30 -0
- package/dist/cjs/triggers/services/index.js.map +1 -0
- package/dist/es/cascader-dropdown/cascader-dropdown-content.js +1 -1
- package/dist/es/cascader-dropdown/cascader-dropdown-content.js.map +1 -1
- package/dist/es/commons/components/NamingModal.js +35 -63
- package/dist/es/commons/components/NamingModal.js.map +1 -1
- package/dist/es/commons/components/confirmation-modal.js +13 -25
- package/dist/es/commons/components/confirmation-modal.js.map +1 -1
- package/dist/es/commons/components/custom-pill.js +13 -31
- package/dist/es/commons/components/custom-pill.js.map +1 -1
- package/dist/es/commons/components/draftModal.js +32 -46
- package/dist/es/commons/components/draftModal.js.map +1 -1
- package/dist/es/commons/components/edit-confirmation.js +18 -35
- package/dist/es/commons/components/edit-confirmation.js.map +1 -1
- package/dist/es/commons/components/import-modal.js +19 -50
- package/dist/es/commons/components/import-modal.js.map +1 -1
- package/dist/es/commons/components/spinner.js +2 -16
- package/dist/es/commons/components/spinner.js.map +1 -1
- package/dist/es/commons/components/theme-wrapper.js +12 -9
- package/dist/es/commons/components/theme-wrapper.js.map +1 -1
- package/dist/es/commons/constants/enhanced.js.map +1 -1
- package/dist/es/commons/helpers/index.js +52 -93
- package/dist/es/commons/helpers/index.js.map +1 -1
- package/dist/es/commons/icons/arrow.js +3 -38
- package/dist/es/commons/icons/arrow.js.map +1 -1
- package/dist/es/commons/icons/cursor.js +8 -21
- package/dist/es/commons/icons/cursor.js.map +1 -1
- package/dist/es/commons/icons/email-letter.js +12 -30
- package/dist/es/commons/icons/email-letter.js.map +1 -1
- package/dist/es/commons/icons/mapping.js +10 -23
- package/dist/es/commons/icons/mapping.js.map +1 -1
- package/dist/es/commons/icons/nested-add.js +14 -32
- package/dist/es/commons/icons/nested-add.js.map +1 -1
- package/dist/es/commons/icons/sms.js +18 -36
- package/dist/es/commons/icons/sms.js.map +1 -1
- package/dist/es/commons/icons/sync.js +3 -110
- package/dist/es/commons/icons/sync.js.map +1 -1
- package/dist/es/commons/icons/trash.js +15 -33
- package/dist/es/commons/icons/trash.js.map +1 -1
- package/dist/es/commons/icons/whatsapp.js +31 -49
- package/dist/es/commons/icons/whatsapp.js.map +1 -1
- package/dist/es/contact-import/components/ManageImport/Completed.js +41 -27
- package/dist/es/contact-import/components/ManageImport/Completed.js.map +1 -1
- package/dist/es/contact-import/components/ManageImport/Dashboard.js +45 -25
- package/dist/es/contact-import/components/ManageImport/Dashboard.js.map +1 -1
- package/dist/es/contact-import/components/ManageImport/NoDataState.js +4 -5
- package/dist/es/contact-import/components/ManageImport/NoDataState.js.map +1 -1
- package/dist/es/contact-import/components/ManageImport/Scheduled.js +46 -30
- package/dist/es/contact-import/components/ManageImport/Scheduled.js.map +1 -1
- package/dist/es/contact-import/components/ManageImport/icon.js +82 -0
- package/dist/es/contact-import/components/ManageImport/icon.js.map +1 -0
- package/dist/es/contact-import/components/Scheduling.js +27 -39
- package/dist/es/contact-import/components/Scheduling.js.map +1 -1
- package/dist/es/contact-import/components/TimePicker.js +103 -130
- package/dist/es/contact-import/components/TimePicker.js.map +1 -1
- package/dist/es/contact-import/components/conact-import-schedule.js +60 -0
- package/dist/es/contact-import/components/conact-import-schedule.js.map +1 -0
- package/dist/es/contact-import/components/contact-import-configure.js +71 -0
- package/dist/es/contact-import/components/contact-import-configure.js.map +1 -0
- package/dist/es/contact-import/components/contact-import-mapping.js +220 -0
- package/dist/es/contact-import/components/contact-import-mapping.js.map +1 -0
- package/dist/es/contact-import/constants.js +18 -0
- package/dist/es/contact-import/constants.js.map +1 -0
- package/dist/es/contact-import/index.js +240 -27
- package/dist/es/contact-import/index.js.map +1 -1
- package/dist/es/dynamic-mapping/components/Mapping.js +321 -203
- package/dist/es/dynamic-mapping/components/Mapping.js.map +1 -1
- package/dist/es/dynamic-mapping/index.js +972 -34
- package/dist/es/dynamic-mapping/index.js.map +1 -1
- package/dist/es/filter/filter-pill-value-selector.js +1 -1
- package/dist/es/filter/filter-pill-value-selector.js.map +1 -1
- package/dist/es/index.js +2 -23
- package/dist/es/index.js.map +1 -1
- package/dist/es/integration-template/components/dashboard.js +139 -132
- package/dist/es/integration-template/components/dashboard.js.map +1 -1
- package/dist/es/integration-template/index.js +341 -0
- package/dist/es/integration-template/index.js.map +1 -0
- package/dist/es/mapping/components/custom-menu.js +3 -4
- package/dist/es/mapping/components/custom-menu.js.map +1 -1
- package/dist/es/mapping/components/field.js +100 -118
- package/dist/es/mapping/components/field.js.map +1 -1
- package/dist/es/mapping/components/mapping.js +194 -105
- package/dist/es/mapping/components/mapping.js.map +1 -1
- package/dist/es/mapping/constants/index.js +3 -239
- package/dist/es/mapping/constants/index.js.map +1 -1
- package/dist/es/mapping/index.js +617 -12
- package/dist/es/mapping/index.js.map +1 -1
- package/dist/es/mapping/services/index.js +59 -96
- package/dist/es/mapping/services/index.js.map +1 -1
- package/dist/es/node_modules/@internationalized/date/dist/CalendarDate.js +3 -3
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/dialog/dialog.js +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/dropdown/dropdown.js +2 -2
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@react-aria/calendar/dist/import.js +2 -2
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@react-aria/utils/dist/import.js +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@react-stately/calendar/dist/import.js +1 -1
- package/dist/es/single-mapping/components/mapping.js +486 -0
- package/dist/es/single-mapping/components/mapping.js.map +1 -0
- package/dist/es/single-mapping/index.js +987 -59
- package/dist/es/single-mapping/index.js.map +1 -1
- package/dist/es/triggers/components/subcomponents.js +1134 -0
- package/dist/es/triggers/components/subcomponents.js.map +1 -0
- package/dist/es/triggers/components/trigger.js +487 -0
- package/dist/es/triggers/components/trigger.js.map +1 -0
- package/dist/es/triggers/constants/index.js +1 -228
- package/dist/es/triggers/constants/index.js.map +1 -1
- package/dist/es/triggers/index.js +331 -0
- package/dist/es/triggers/index.js.map +1 -0
- package/dist/es/triggers/services/index.js +28 -0
- package/dist/es/triggers/services/index.js.map +1 -0
- package/dist/index.d.ts +448 -2161
- package/package.json +1 -1
|
@@ -9,8 +9,6 @@ var index = require('../../node_modules/html-react-parser/esm/index.js');
|
|
|
9
9
|
var index$1 = require('../../commons/constants/index.js');
|
|
10
10
|
var confirmationModal = require('../../commons/components/confirmation-modal.js');
|
|
11
11
|
var sync = require('../../commons/icons/sync.js');
|
|
12
|
-
var dashboard_constants = require('../constants/dashboard.constants.js');
|
|
13
|
-
var dashboard_utils = require('../utils/dashboard.utils.js');
|
|
14
12
|
var flex = require('../../node_modules/@sparrowengg/twigs-react/dist/es/flex/flex.js');
|
|
15
13
|
var box = require('../../node_modules/@sparrowengg/twigs-react/dist/es/box/box.js');
|
|
16
14
|
var heading = require('../../node_modules/@sparrowengg/twigs-react/dist/es/heading/heading.js');
|
|
@@ -30,6 +28,15 @@ var pencil = require('../../node_modules/@sparrowengg/twigs-react-icons/dist/es/
|
|
|
30
28
|
var _delete = require('../../node_modules/@sparrowengg/twigs-react-icons/dist/es/icons/delete.js');
|
|
31
29
|
var table = require('../../node_modules/@sparrowengg/twigs-react/dist/es/table/table.js');
|
|
32
30
|
|
|
31
|
+
const trasformToPastTense = (value) => {
|
|
32
|
+
if (value.endsWith("e")) {
|
|
33
|
+
return value + "d";
|
|
34
|
+
} else if (value.endsWith("y")) {
|
|
35
|
+
return value.slice(0, -1) + "ied";
|
|
36
|
+
} else {
|
|
37
|
+
return value + "ed";
|
|
38
|
+
}
|
|
39
|
+
};
|
|
33
40
|
const Dashboard = ({
|
|
34
41
|
onMappingEditHandler,
|
|
35
42
|
fieldOptions,
|
|
@@ -56,20 +63,20 @@ const Dashboard = ({
|
|
|
56
63
|
alignItems: "center"
|
|
57
64
|
},
|
|
58
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)),
|
|
59
|
-
/* @__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) },
|
|
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(
|
|
60
67
|
button.Button,
|
|
61
68
|
{
|
|
62
69
|
size: "lg",
|
|
63
70
|
color: "primary",
|
|
64
71
|
disabled: !mappingEnabled,
|
|
65
72
|
leftIcon: /* @__PURE__ */ React.createElement(plus.PlusIcon, null),
|
|
66
|
-
onClick: () => handleConfigurationType(
|
|
73
|
+
onClick: () => handleConfigurationType("MAPPING")
|
|
67
74
|
},
|
|
68
|
-
|
|
75
|
+
"New Mapping"
|
|
69
76
|
) : null, hasDropdownComponents.trigger && hasDropdownComponents.mapping ? /* @__PURE__ */ React.createElement(dropdown.DropdownMenu, null, /* @__PURE__ */ React.createElement(
|
|
70
77
|
tooltip.Tooltip,
|
|
71
78
|
{
|
|
72
|
-
content: !triggerEnabled && !mappingEnabled ?
|
|
79
|
+
content: !triggerEnabled && !mappingEnabled ? "You have reached the maximum limit for creating triggers/mappings" : ""
|
|
73
80
|
},
|
|
74
81
|
/* @__PURE__ */ React.createElement(dropdown.DropdownMenuTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
|
|
75
82
|
button.Button,
|
|
@@ -78,16 +85,16 @@ const Dashboard = ({
|
|
|
78
85
|
disabled: !triggerEnabled && !mappingEnabled,
|
|
79
86
|
rightIcon: /* @__PURE__ */ React.createElement(chevronDown.ChevronDownIcon, null)
|
|
80
87
|
},
|
|
81
|
-
|
|
88
|
+
"Add New"
|
|
82
89
|
))
|
|
83
90
|
), /* @__PURE__ */ React.createElement(
|
|
84
91
|
dropdown.DropdownMenuContent,
|
|
85
92
|
{
|
|
86
|
-
className:
|
|
93
|
+
className: "dm-sans",
|
|
87
94
|
sideOffset: 4,
|
|
88
95
|
align: "start",
|
|
89
96
|
css: {
|
|
90
|
-
maxWidth:
|
|
97
|
+
maxWidth: 240,
|
|
91
98
|
zIndex: 10,
|
|
92
99
|
"& p": {
|
|
93
100
|
margin: "0 !important",
|
|
@@ -98,23 +105,23 @@ const Dashboard = ({
|
|
|
98
105
|
hasDropdownComponents.trigger ? /* @__PURE__ */ React.createElement(
|
|
99
106
|
DropdownItem,
|
|
100
107
|
{
|
|
101
|
-
toolTipContent:
|
|
108
|
+
toolTipContent: "You have reached the maximum limit for creating triggers",
|
|
102
109
|
isDisabled: !triggerEnabled,
|
|
103
110
|
icon: /* @__PURE__ */ React.createElement(cursor.default, { size: 24, color: "#6A6A6A" }),
|
|
104
|
-
heading:
|
|
105
|
-
description:
|
|
106
|
-
onClickHandler: () => handleConfigurationType(
|
|
111
|
+
heading: "Trigger",
|
|
112
|
+
description: "Trigger the Survey when a record is created/updated",
|
|
113
|
+
onClickHandler: () => handleConfigurationType("TRIGGER")
|
|
107
114
|
}
|
|
108
115
|
) : null,
|
|
109
116
|
hasDropdownComponents.mapping ? /* @__PURE__ */ React.createElement(
|
|
110
117
|
DropdownItem,
|
|
111
118
|
{
|
|
112
119
|
isDisabled: !mappingEnabled,
|
|
113
|
-
toolTipContent:
|
|
120
|
+
toolTipContent: "You have reached the maximum limit for creating mappings",
|
|
114
121
|
icon: /* @__PURE__ */ React.createElement(mapping.default, { size: 24, color: "#6A6A6A" }),
|
|
115
|
-
heading:
|
|
116
|
-
description:
|
|
117
|
-
onClickHandler: () => handleConfigurationType(
|
|
122
|
+
heading: "Mapping",
|
|
123
|
+
description: `Create/Update record in ${integrationName} from survey responses`,
|
|
124
|
+
onClickHandler: () => handleConfigurationType("MAPPING")
|
|
118
125
|
}
|
|
119
126
|
) : null
|
|
120
127
|
)) : null)
|
|
@@ -183,9 +190,9 @@ const MultiAccountDashboard = ({
|
|
|
183
190
|
"& button": { color: "$neutral900" }
|
|
184
191
|
}
|
|
185
192
|
},
|
|
186
|
-
/* @__PURE__ */ React.createElement(tabs.TabsTrigger, { value: "ALL" },
|
|
187
|
-
/* @__PURE__ */ React.createElement(tabs.TabsTrigger, { value: "TRIGGER" },
|
|
188
|
-
/* @__PURE__ */ React.createElement(tabs.TabsTrigger, { value: "MAPPING" },
|
|
193
|
+
/* @__PURE__ */ React.createElement(tabs.TabsTrigger, { value: "ALL" }, "All"),
|
|
194
|
+
/* @__PURE__ */ React.createElement(tabs.TabsTrigger, { value: "TRIGGER" }, "Trigger"),
|
|
195
|
+
/* @__PURE__ */ React.createElement(tabs.TabsTrigger, { value: "MAPPING" }, "Mapping")
|
|
189
196
|
), /* @__PURE__ */ React.createElement(
|
|
190
197
|
tabs.TabsContent,
|
|
191
198
|
{
|
|
@@ -193,7 +200,7 @@ const MultiAccountDashboard = ({
|
|
|
193
200
|
css: { paddingBlock: "$12", paddingInline: 0 }
|
|
194
201
|
},
|
|
195
202
|
/* @__PURE__ */ React.createElement(flex.Flex, { flexDirection: "column", gap: "$8" }, !!(triggerFields == null ? void 0 : triggerFields.length) ? /* @__PURE__ */ React.createElement(React.Fragment, null, triggerFields == null ? void 0 : triggerFields.map((field) => {
|
|
196
|
-
var _a2, _b2, _c2, _d2, _e
|
|
203
|
+
var _a2, _b2, _c2, _d2, _e;
|
|
197
204
|
return /* @__PURE__ */ React.createElement(
|
|
198
205
|
DashboardItem,
|
|
199
206
|
{
|
|
@@ -201,15 +208,15 @@ const MultiAccountDashboard = ({
|
|
|
201
208
|
isDraft: (_a2 = field == null ? void 0 : field.isDraft) != null ? _a2 : false,
|
|
202
209
|
onMappingEditHandler,
|
|
203
210
|
icon: /* @__PURE__ */ React.createElement(cursor.default, { size: 32, color: "#56B0BB" }),
|
|
204
|
-
heading: (_c2 = (_b2 = field.domain) != null ? _b2 : field.email) != null ? _c2 :
|
|
211
|
+
heading: (_c2 = (_b2 = field.domain) != null ? _b2 : field.email) != null ? _c2 : "Field",
|
|
205
212
|
id: field.id,
|
|
206
|
-
description:
|
|
213
|
+
description: `Trigger survey when an ${(_d2 = field == null ? void 0 : field.object) == null ? void 0 : _d2.toLowerCase()} is ${(_e = field == null ? void 0 : field.action) == null ? void 0 : _e.toLowerCase()} in ${integrationName}`,
|
|
207
214
|
fields: field.fields,
|
|
208
215
|
isEnabled: field.isEnabled,
|
|
209
216
|
integrationName,
|
|
210
217
|
handleDashboardPage,
|
|
211
218
|
handleEditField,
|
|
212
|
-
type:
|
|
219
|
+
type: "TRIGGER",
|
|
213
220
|
toggleDashboardField,
|
|
214
221
|
deleteFieldHandler
|
|
215
222
|
}
|
|
@@ -217,22 +224,22 @@ const MultiAccountDashboard = ({
|
|
|
217
224
|
})) : null, !!((_a = mappingFields == null ? void 0 : mappingFields.fields) == null ? void 0 : _a.length) ? /* @__PURE__ */ React.createElement(React.Fragment, null, (_b = mappingFields == null ? void 0 : mappingFields.fields) == null ? void 0 : _b.map(
|
|
218
225
|
(field) => {
|
|
219
226
|
var _a2, _b2, _c2, _d2, _e, _f, _g, _h, _i;
|
|
220
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, (mappingFields == null ? void 0 : mappingFields.type) ===
|
|
227
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, (mappingFields == null ? void 0 : mappingFields.type) === "MULTI_MAPPING" ? /* @__PURE__ */ React.createElement(
|
|
221
228
|
DashboardItem,
|
|
222
229
|
{
|
|
223
230
|
key: field.id,
|
|
224
231
|
isDraft: (_a2 = field == null ? void 0 : field.isDraft) != null ? _a2 : false,
|
|
225
232
|
onMappingEditHandler,
|
|
226
233
|
icon: /* @__PURE__ */ React.createElement(mapping.default, { size: 32, color: "#56B0BB" }),
|
|
227
|
-
heading: (_c2 = (_b2 = field.domain) != null ? _b2 : field.email) != null ? _c2 :
|
|
234
|
+
heading: (_c2 = (_b2 = field.domain) != null ? _b2 : field.email) != null ? _c2 : "Field",
|
|
228
235
|
id: field.id,
|
|
229
|
-
description: (field == null ? void 0 : field.mappingDescription) ||
|
|
236
|
+
description: (field == null ? void 0 : field.mappingDescription) || `Sync survey responses to ${integrationName} when ${(_f = (_e = (_d2 = field == null ? void 0 : field.mappingConfiguration) == null ? void 0 : _d2.events) == null ? void 0 : _e.label) == null ? void 0 : _f.toLowerCase()} is ${trasformToPastTense(`${(_i = (_h = (_g = field == null ? void 0 : field.mappingConfiguration) == null ? void 0 : _g.action) == null ? void 0 : _h.label) == null ? void 0 : _i.toLowerCase()}`)}`,
|
|
230
237
|
fields: field.fields,
|
|
231
238
|
isEnabled: field.isEnabled,
|
|
232
239
|
integrationName,
|
|
233
240
|
handleDashboardPage,
|
|
234
241
|
handleEditField,
|
|
235
|
-
type:
|
|
242
|
+
type: "MAPPING",
|
|
236
243
|
toggleDashboardField,
|
|
237
244
|
deleteFieldHandler
|
|
238
245
|
}
|
|
@@ -260,7 +267,7 @@ const MultiAccountDashboard = ({
|
|
|
260
267
|
css: { paddingBlock: "$12", paddingInline: 0 }
|
|
261
268
|
},
|
|
262
269
|
!!(triggerFields == null ? void 0 : triggerFields.length) ? /* @__PURE__ */ React.createElement(flex.Flex, { flexDirection: "column", gap: "$8" }, triggerFields == null ? void 0 : triggerFields.map((field) => {
|
|
263
|
-
var _a2, _b2, _c2
|
|
270
|
+
var _a2, _b2, _c2;
|
|
264
271
|
return /* @__PURE__ */ React.createElement(
|
|
265
272
|
DashboardItem,
|
|
266
273
|
{
|
|
@@ -268,15 +275,15 @@ const MultiAccountDashboard = ({
|
|
|
268
275
|
isDraft: (_a2 = field == null ? void 0 : field.isDraft) != null ? _a2 : false,
|
|
269
276
|
onMappingEditHandler,
|
|
270
277
|
icon: /* @__PURE__ */ React.createElement(cursor.default, { size: 32, color: "#56B0BB" }),
|
|
271
|
-
heading:
|
|
278
|
+
heading: "Trigger",
|
|
272
279
|
id: field.id,
|
|
273
|
-
description:
|
|
280
|
+
description: `Trigger survey when an ${(_b2 = field == null ? void 0 : field.object) == null ? void 0 : _b2.toLowerCase()} is ${(_c2 = field == null ? void 0 : field.action) == null ? void 0 : _c2.toLowerCase()} in ${integrationName}`,
|
|
274
281
|
fields: field.fields,
|
|
275
282
|
isEnabled: field.isEnabled,
|
|
276
283
|
integrationName,
|
|
277
284
|
handleDashboardPage,
|
|
278
285
|
handleEditField,
|
|
279
|
-
type:
|
|
286
|
+
type: "TRIGGER",
|
|
280
287
|
toggleDashboardField,
|
|
281
288
|
deleteFieldHandler
|
|
282
289
|
}
|
|
@@ -284,8 +291,8 @@ const MultiAccountDashboard = ({
|
|
|
284
291
|
})) : /* @__PURE__ */ React.createElement(
|
|
285
292
|
MultiAccountFallback,
|
|
286
293
|
{
|
|
287
|
-
title:
|
|
288
|
-
onClickHandler: () => handleConfigurationType(
|
|
294
|
+
title: "Trigger",
|
|
295
|
+
onClickHandler: () => handleConfigurationType("TRIGGER")
|
|
289
296
|
}
|
|
290
297
|
)
|
|
291
298
|
), /* @__PURE__ */ React.createElement(
|
|
@@ -297,22 +304,22 @@ const MultiAccountDashboard = ({
|
|
|
297
304
|
!!((_c = mappingFields == null ? void 0 : mappingFields.fields) == null ? void 0 : _c.length) ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(flex.Flex, { flexDirection: "column", gap: "$8" }, (_d = mappingFields == null ? void 0 : mappingFields.fields) == null ? void 0 : _d.map(
|
|
298
305
|
(field) => {
|
|
299
306
|
var _a2, _b2, _c2, _d2, _e, _f, _g;
|
|
300
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, (mappingFields == null ? void 0 : mappingFields.type) ===
|
|
307
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, (mappingFields == null ? void 0 : mappingFields.type) === "MULTI_MAPPING" ? /* @__PURE__ */ React.createElement(
|
|
301
308
|
DashboardItem,
|
|
302
309
|
{
|
|
303
310
|
key: field.id,
|
|
304
311
|
isDraft: (_a2 = field == null ? void 0 : field.isDraft) != null ? _a2 : false,
|
|
305
312
|
onMappingEditHandler,
|
|
306
313
|
icon: /* @__PURE__ */ React.createElement(mapping.default, { size: 32, color: "#56B0BB" }),
|
|
307
|
-
heading: (field == null ? void 0 : field.mappingName) ||
|
|
314
|
+
heading: (field == null ? void 0 : field.mappingName) || "Mapping",
|
|
308
315
|
id: field.id,
|
|
309
|
-
description: (field == null ? void 0 : field.mappingDescription) ||
|
|
316
|
+
description: (field == null ? void 0 : field.mappingDescription) || `Sync survey responses to ${integrationName} when ${(_d2 = (_c2 = (_b2 = field == null ? void 0 : field.mappingConfiguration) == null ? void 0 : _b2.events) == null ? void 0 : _c2.label) == null ? void 0 : _d2.toLowerCase()} is ${trasformToPastTense(`${(_g = (_f = (_e = field == null ? void 0 : field.mappingConfiguration) == null ? void 0 : _e.action) == null ? void 0 : _f.label) == null ? void 0 : _g.toLowerCase()}`)}`,
|
|
310
317
|
fields: field.fields,
|
|
311
318
|
isEnabled: field.isEnabled,
|
|
312
319
|
integrationName,
|
|
313
320
|
handleDashboardPage,
|
|
314
321
|
handleEditField,
|
|
315
|
-
type:
|
|
322
|
+
type: "MAPPING",
|
|
316
323
|
toggleDashboardField,
|
|
317
324
|
deleteFieldHandler
|
|
318
325
|
}
|
|
@@ -335,8 +342,8 @@ const MultiAccountDashboard = ({
|
|
|
335
342
|
))) : /* @__PURE__ */ React.createElement(
|
|
336
343
|
MultiAccountFallback,
|
|
337
344
|
{
|
|
338
|
-
title:
|
|
339
|
-
onClickHandler: () => handleConfigurationType(
|
|
345
|
+
title: "Mapping",
|
|
346
|
+
onClickHandler: () => handleConfigurationType("MAPPING")
|
|
340
347
|
}
|
|
341
348
|
)
|
|
342
349
|
)));
|
|
@@ -353,7 +360,7 @@ const MultiAccountFallback = ({
|
|
|
353
360
|
alignItems: "center",
|
|
354
361
|
css: { paddingTop: 182 }
|
|
355
362
|
},
|
|
356
|
-
/* @__PURE__ */ React.createElement(heading.Heading, { size: "h5" },
|
|
363
|
+
/* @__PURE__ */ React.createElement(heading.Heading, { size: "h5" }, `Zero ${title} Entries`),
|
|
357
364
|
/* @__PURE__ */ React.createElement(
|
|
358
365
|
text.Text,
|
|
359
366
|
{
|
|
@@ -375,7 +382,7 @@ const MultiAccountFallback = ({
|
|
|
375
382
|
variant: "outline",
|
|
376
383
|
onClick: onClickHandler
|
|
377
384
|
},
|
|
378
|
-
|
|
385
|
+
`New ${title}`
|
|
379
386
|
)
|
|
380
387
|
);
|
|
381
388
|
};
|
|
@@ -402,7 +409,7 @@ const SingleAccountDashboard = ({
|
|
|
402
409
|
isDraft: (_a2 = field == null ? void 0 : field.isDraft) != null ? _a2 : false,
|
|
403
410
|
fieldOptions,
|
|
404
411
|
field,
|
|
405
|
-
description:
|
|
412
|
+
description: `Trigger survey when ${/^[aeiouAEIOU]$/.test(((_b2 = field == null ? void 0 : field.object) == null ? void 0 : _b2[0]) || "") ? "an" : "a"} ${(_c2 = field == null ? void 0 : field.object) == null ? void 0 : _c2.toLowerCase()} is ${(_d2 = field == null ? void 0 : field.action) == null ? void 0 : _d2.toLowerCase()} in ${integrationName}`,
|
|
406
413
|
key: field.id,
|
|
407
414
|
integrationName,
|
|
408
415
|
icon: /* @__PURE__ */ React.createElement(cursor.default, { size: 32, color: "#56B0BB" }),
|
|
@@ -415,22 +422,22 @@ const SingleAccountDashboard = ({
|
|
|
415
422
|
})) : null, (mappingFields == null ? void 0 : mappingFields.type) === "DYNAMIC_MAPPING" ? /* @__PURE__ */ React.createElement(React.Fragment, null, !!((_a = mappingFields == null ? void 0 : mappingFields.fields) == null ? void 0 : _a.length) ? /* @__PURE__ */ React.createElement(box.Box, { css: { marginTop: !(triggerFields == null ? void 0 : triggerFields.length) ? "$20" : "$8" } }, (_b = mappingFields == null ? void 0 : mappingFields.fields) == null ? void 0 : _b.map(
|
|
416
423
|
(field) => {
|
|
417
424
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
418
|
-
if ((field == null ? void 0 : field.type) ===
|
|
425
|
+
if ((field == null ? void 0 : field.type) === "MULTI_MAPPING") {
|
|
419
426
|
return /* @__PURE__ */ React.createElement(
|
|
420
427
|
DashboardItem,
|
|
421
428
|
{
|
|
422
429
|
isDraft: (_a2 = field == null ? void 0 : field.isDraft) != null ? _a2 : false,
|
|
423
430
|
onMappingEditHandler,
|
|
424
431
|
icon: /* @__PURE__ */ React.createElement(mapping.default, { size: 32, color: "#56B0BB" }),
|
|
425
|
-
heading: (field == null ? void 0 : field.mappingName) ||
|
|
432
|
+
heading: (field == null ? void 0 : field.mappingName) || "Mapping",
|
|
426
433
|
id: field.id,
|
|
427
|
-
description: (field == null ? void 0 : field.mappingDescription) ||
|
|
434
|
+
description: (field == null ? void 0 : field.mappingDescription) || `Sync survey responses to ${integrationName} when ${(_d2 = (_c2 = (_b2 = field == null ? void 0 : field.mappingConfiguration) == null ? void 0 : _b2.events) == null ? void 0 : _c2.label) == null ? void 0 : _d2.toLowerCase()} is ${trasformToPastTense(`${(_g2 = (_f2 = (_e2 = field == null ? void 0 : field.mappingConfiguration) == null ? void 0 : _e2.action) == null ? void 0 : _f2.label) == null ? void 0 : _g2.toLowerCase()}`)}`,
|
|
428
435
|
fields: field.fields,
|
|
429
436
|
isEnabled: field.isEnabled,
|
|
430
437
|
integrationName,
|
|
431
438
|
handleDashboardPage,
|
|
432
439
|
handleEditField,
|
|
433
|
-
type:
|
|
440
|
+
type: "MAPPING",
|
|
434
441
|
toggleDashboardField,
|
|
435
442
|
deleteFieldHandler
|
|
436
443
|
}
|
|
@@ -453,7 +460,7 @@ const SingleAccountDashboard = ({
|
|
|
453
460
|
);
|
|
454
461
|
}
|
|
455
462
|
}
|
|
456
|
-
)) : null) : /* @__PURE__ */ React.createElement(React.Fragment, null, !!((_c = mappingFields == null ? void 0 : mappingFields.fields) == null ? void 0 : _c.length) && (mappingFields == null ? void 0 : mappingFields.type) ===
|
|
463
|
+
)) : null) : /* @__PURE__ */ React.createElement(React.Fragment, null, !!((_c = mappingFields == null ? void 0 : mappingFields.fields) == null ? void 0 : _c.length) && (mappingFields == null ? void 0 : mappingFields.type) === "MULTI_MAPPING" ? /* @__PURE__ */ React.createElement(box.Box, { css: { marginTop: !(triggerFields == null ? void 0 : triggerFields.length) ? "$20" : "$8" } }, (_d = mappingFields == null ? void 0 : mappingFields.fields) == null ? void 0 : _d.map(
|
|
457
464
|
(field) => {
|
|
458
465
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
459
466
|
return /* @__PURE__ */ React.createElement(
|
|
@@ -462,21 +469,21 @@ const SingleAccountDashboard = ({
|
|
|
462
469
|
isDraft: (_a2 = field == null ? void 0 : field.isDraft) != null ? _a2 : false,
|
|
463
470
|
onMappingEditHandler,
|
|
464
471
|
icon: /* @__PURE__ */ React.createElement(mapping.default, { size: 32, color: "#56B0BB" }),
|
|
465
|
-
heading: (field == null ? void 0 : field.mappingName) ||
|
|
472
|
+
heading: (field == null ? void 0 : field.mappingName) || "Mapping",
|
|
466
473
|
id: field.id,
|
|
467
|
-
description: (field == null ? void 0 : field.mappingDescription) ||
|
|
474
|
+
description: (field == null ? void 0 : field.mappingDescription) || `Sync survey responses to ${integrationName} when ${(_d2 = (_c2 = (_b2 = field == null ? void 0 : field.mappingConfiguration) == null ? void 0 : _b2.events) == null ? void 0 : _c2.label) == null ? void 0 : _d2.toLowerCase()} is ${trasformToPastTense(`${(_g2 = (_f2 = (_e2 = field == null ? void 0 : field.mappingConfiguration) == null ? void 0 : _e2.action) == null ? void 0 : _f2.label) == null ? void 0 : _g2.toLowerCase()}`)}`,
|
|
468
475
|
fields: field.fields,
|
|
469
476
|
isEnabled: field.isEnabled,
|
|
470
477
|
integrationName,
|
|
471
478
|
handleDashboardPage,
|
|
472
479
|
handleEditField,
|
|
473
|
-
type:
|
|
480
|
+
type: "MAPPING",
|
|
474
481
|
toggleDashboardField,
|
|
475
482
|
deleteFieldHandler
|
|
476
483
|
}
|
|
477
484
|
);
|
|
478
485
|
}
|
|
479
|
-
)) : null, ((_e = mappingFields == null ? void 0 : mappingFields.mappedFields) == null ? void 0 : _e.type) ===
|
|
486
|
+
)) : null, ((_e = mappingFields == null ? void 0 : mappingFields.mappedFields) == null ? void 0 : _e.type) === "SINGLE_MAPPING" && !!((_g = (_f = mappingFields == null ? void 0 : mappingFields.mappedFields) == null ? void 0 : _f.fields) == null ? void 0 : _g.length) ? /* @__PURE__ */ React.createElement(box.Box, { css: { marginTop: !(triggerFields == null ? void 0 : triggerFields.length) ? "$20" : "$8" } }, (_i = (_h = mappingFields == null ? void 0 : mappingFields.mappedFields) == null ? void 0 : _h.fields) == null ? void 0 : _i.map(
|
|
480
487
|
(field, index) => {
|
|
481
488
|
return /* @__PURE__ */ React.createElement(
|
|
482
489
|
SingleMappingDashboardItem,
|
|
@@ -523,14 +530,14 @@ const TriggerDasboardItem = ({
|
|
|
523
530
|
const fieldLabel = (_b2 = fieldOptions.find(
|
|
524
531
|
(options) => options.value === field2
|
|
525
532
|
)) == null ? void 0 : _b2.label;
|
|
526
|
-
return `${fieldLabel} ${formattedComparator ===
|
|
533
|
+
return `${fieldLabel} ${formattedComparator === "NO_PREFERENCE" ? "has no preference" : formattedComparator} ${value}`;
|
|
527
534
|
})) == null ? void 0 : _a2.join(
|
|
528
535
|
` <span style="color: #6A6A6A;font-weight: 600;">${filterGroup.condition.toLowerCase()}</span> `
|
|
529
536
|
);
|
|
530
537
|
}).join(
|
|
531
|
-
`<br /> <span style="color: #6A6A6A;font-weight: 600;">${data.condition.toLowerCase() === "or" ?
|
|
538
|
+
`<br /> <span style="color: #6A6A6A;font-weight: 600;">${data.condition.toLowerCase() === "or" ? "Or" : "And"} When,</span> `
|
|
532
539
|
);
|
|
533
|
-
return `<p style="font-family: 'DM Sans'; font-size: 13.33px; font-weight: 400;line-height: 30px; color: #848484;"><span style="color: #6A6A6A;font-weight: 600;"
|
|
540
|
+
return `<p style="font-family: 'DM Sans'; font-size: 13.33px; font-weight: 400;line-height: 30px; color: #848484;"><span style="color: #6A6A6A;font-weight: 600;">When</span> ${filterConditions}</p>`;
|
|
534
541
|
};
|
|
535
542
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
536
543
|
flex.Flex,
|
|
@@ -565,7 +572,7 @@ const TriggerDasboardItem = ({
|
|
|
565
572
|
onClick: () => setIsMappingDisplayed(!isMappingDisplayed)
|
|
566
573
|
},
|
|
567
574
|
isMappingDisplayed ? /* @__PURE__ */ React.createElement(chevronDown.ChevronDownIcon, { size: 40, color: "#848484" }) : /* @__PURE__ */ React.createElement(chevronRight.ChevronRightIcon, { size: 40, color: "#848484" }),
|
|
568
|
-
/* @__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" }, (_a = field == null ? void 0 : field.email) != null ? _a :
|
|
575
|
+
/* @__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" }, (_a = field == null ? void 0 : field.email) != null ? _a : "Trigger"), /* @__PURE__ */ React.createElement(text.Text, { size: "sm", css: { color: "$neutral600" } }, description != null ? description : `Trigger survey when an event happens in ${integrationName}`)))
|
|
569
576
|
),
|
|
570
577
|
/* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$12" }, isDraft && /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$12" }, /* @__PURE__ */ React.createElement(chip.Chip, { rounded: "full", size: "sm" }, /* @__PURE__ */ React.createElement(
|
|
571
578
|
box.Box,
|
|
@@ -615,7 +622,7 @@ const TriggerDasboardItem = ({
|
|
|
615
622
|
)), /* @__PURE__ */ React.createElement(
|
|
616
623
|
dropdown.DropdownMenuContent,
|
|
617
624
|
{
|
|
618
|
-
className:
|
|
625
|
+
className: "dm-sans",
|
|
619
626
|
css: {
|
|
620
627
|
minWidth: 180,
|
|
621
628
|
zIndex: 10,
|
|
@@ -635,14 +642,14 @@ const TriggerDasboardItem = ({
|
|
|
635
642
|
},
|
|
636
643
|
onClick: () => {
|
|
637
644
|
handleEditField({
|
|
638
|
-
type:
|
|
645
|
+
type: "TRIGGER",
|
|
639
646
|
values: field,
|
|
640
647
|
id: field.id
|
|
641
648
|
});
|
|
642
|
-
handleDashboardPage(false,
|
|
649
|
+
handleDashboardPage(false, "TRIGGER");
|
|
643
650
|
}
|
|
644
651
|
},
|
|
645
|
-
/* @__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" },
|
|
652
|
+
/* @__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"))
|
|
646
653
|
),
|
|
647
654
|
/* @__PURE__ */ React.createElement(
|
|
648
655
|
dropdown.DropdownMenuItem,
|
|
@@ -652,7 +659,7 @@ const TriggerDasboardItem = ({
|
|
|
652
659
|
cursor: "pointer"
|
|
653
660
|
}
|
|
654
661
|
},
|
|
655
|
-
/* @__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" },
|
|
662
|
+
/* @__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"))
|
|
656
663
|
)
|
|
657
664
|
)))
|
|
658
665
|
),
|
|
@@ -683,7 +690,7 @@ const TriggerDasboardItem = ({
|
|
|
683
690
|
weight: "bold",
|
|
684
691
|
css: { textTransform: "uppercase" }
|
|
685
692
|
},
|
|
686
|
-
|
|
693
|
+
"CONDITION"
|
|
687
694
|
),
|
|
688
695
|
index.default(transformDataToString(field.fields))
|
|
689
696
|
), /* @__PURE__ */ React.createElement(
|
|
@@ -699,9 +706,9 @@ const TriggerDasboardItem = ({
|
|
|
699
706
|
((_g = (_f = (_e = (_d = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _d.variables) == null ? void 0 : _e.filter) == null ? void 0 : _f.call(_e, (variable) => variable.isEnabled)) == null ? void 0 : _g.length) ? /* @__PURE__ */ React.createElement(
|
|
700
707
|
SingleMappingChipWrapper,
|
|
701
708
|
{
|
|
702
|
-
heading: ((_i = (_h = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _h.variables) == null ? void 0 : _i.length) > 1 ?
|
|
709
|
+
heading: ((_i = (_h = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _h.variables) == null ? void 0 : _i.length) > 1 ? "PASSING VARIABLES TO SURVEY" : "PASSING VARIABLE TO SURVEY",
|
|
703
710
|
fields: field.triggerDetails.variables,
|
|
704
|
-
backgroundColor:
|
|
711
|
+
backgroundColor: "$positive100"
|
|
705
712
|
}
|
|
706
713
|
) : null,
|
|
707
714
|
/* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
@@ -711,17 +718,17 @@ const TriggerDasboardItem = ({
|
|
|
711
718
|
gap: "$6",
|
|
712
719
|
css: { paddingBlock: "$8" }
|
|
713
720
|
},
|
|
714
|
-
/* @__PURE__ */ React.createElement(text.Text, { size: "sm", weight: "bold" },
|
|
721
|
+
/* @__PURE__ */ React.createElement(text.Text, { size: "sm", weight: "bold" }, "SEND SURVEY"),
|
|
715
722
|
/* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center" }, ((_k = (_j = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _j.shareType) == null ? void 0 : _k.value) ? /* @__PURE__ */ React.createElement(
|
|
716
723
|
EventComponent,
|
|
717
724
|
{
|
|
718
|
-
heading:
|
|
725
|
+
heading: "Share Type:",
|
|
719
726
|
description: (_m = (_l = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _l.shareType) == null ? void 0 : _m.label
|
|
720
727
|
}
|
|
721
728
|
) : null, ((_o = (_n = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _n.shareRecipient) == null ? void 0 : _o.value) ? /* @__PURE__ */ React.createElement(
|
|
722
729
|
EventComponent,
|
|
723
730
|
{
|
|
724
|
-
heading:
|
|
731
|
+
heading: "Recipient:",
|
|
725
732
|
hasBorder: true,
|
|
726
733
|
description: (_q = (_p = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _p.shareRecipient) == null ? void 0 : _q.label
|
|
727
734
|
}
|
|
@@ -729,7 +736,7 @@ const TriggerDasboardItem = ({
|
|
|
729
736
|
EventComponent,
|
|
730
737
|
{
|
|
731
738
|
hasBorder: true,
|
|
732
|
-
heading:
|
|
739
|
+
heading: "Share Channel:",
|
|
733
740
|
description: (_u = (_t = field == null ? void 0 : field.triggerDetails) == null ? void 0 : _t.shareChannel) == null ? void 0 : _u.label
|
|
734
741
|
}
|
|
735
742
|
) : null)
|
|
@@ -755,21 +762,21 @@ const TriggerDasboardItem = ({
|
|
|
755
762
|
variant: "ghost",
|
|
756
763
|
onClick: () => {
|
|
757
764
|
handleEditField({
|
|
758
|
-
type:
|
|
765
|
+
type: "TRIGGER",
|
|
759
766
|
values: field,
|
|
760
767
|
id: field.id
|
|
761
768
|
});
|
|
762
|
-
handleDashboardPage(false,
|
|
769
|
+
handleDashboardPage(false, "TRIGGER");
|
|
763
770
|
}
|
|
764
771
|
},
|
|
765
|
-
|
|
772
|
+
"Edit Trigger"
|
|
766
773
|
)
|
|
767
774
|
)
|
|
768
775
|
), isDeleteModalOpen && /* @__PURE__ */ React.createElement(
|
|
769
776
|
confirmationModal.default,
|
|
770
777
|
{
|
|
771
|
-
|
|
772
|
-
description:
|
|
778
|
+
name: "Delete Trigger?",
|
|
779
|
+
description: `Are you sure you want to delete the trigger? This action cannot be undone.`,
|
|
773
780
|
onConfirm: () => deleteFieldHandler == null ? void 0 : deleteFieldHandler(field.id),
|
|
774
781
|
onCancel: () => setIsDeleteModalOpen(false)
|
|
775
782
|
}
|
|
@@ -824,11 +831,11 @@ const SingleMappingDashboardItem = ({
|
|
|
824
831
|
onClick: () => setIsMappingDisplayed(!isMappingDisplayed)
|
|
825
832
|
},
|
|
826
833
|
isMappingDisplayed ? /* @__PURE__ */ React.createElement(chevronDown.ChevronDownIcon, { size: 40, color: "#848484" }) : /* @__PURE__ */ React.createElement(chevronRight.ChevronRightIcon, { size: 40, color: "#848484" }),
|
|
827
|
-
/* @__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" }, (field == null ? void 0 : field.mappingName) ? field == null ? void 0 : field.mappingName : (_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 :
|
|
834
|
+
/* @__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" }, (field == null ? void 0 : field.mappingName) ? field == null ? void 0 : field.mappingName : (_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"), (field == null ? void 0 : field.mappingDescription) && /* @__PURE__ */ React.createElement(text.Text, { size: "sm", css: { "& span": {
|
|
828
835
|
fontFamily: "'DM Sans', sans-serif !important"
|
|
829
|
-
}, color: "$neutral600", "& b": { fontWeight: "$6 !important", fontFamily: "'DM Sans', sans-serif !important" } }, dangerouslySetInnerHTML: { __html: (field == null ? void 0 : field.mappingDescription) ? field == null ? void 0 : field.mappingDescription :
|
|
836
|
+
}, color: "$neutral600", "& b": { fontWeight: "$6 !important", fontFamily: "'DM Sans', sans-serif !important" } }, dangerouslySetInnerHTML: { __html: (field == null ? void 0 : field.mappingDescription) ? field == null ? void 0 : field.mappingDescription : `Sync survey responses to ${integrationName} when ${(_g = (_f = (_e = field == null ? void 0 : field.mappingConfiguration) == null ? void 0 : _e.events) == null ? void 0 : _f.label) == null ? void 0 : _g.toLowerCase()} is ${trasformToPastTense(`${(_j = (_i = (_h = field == null ? void 0 : field.mappingConfiguration) == null ? void 0 : _h.action) == null ? void 0 : _i.label) == null ? void 0 : _j.toLowerCase()}`)}` } })))
|
|
830
837
|
),
|
|
831
|
-
/* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$12" }, syncMapping ? /* @__PURE__ */ React.createElement(tooltip.Tooltip, { content:
|
|
838
|
+
/* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$12" }, syncMapping ? /* @__PURE__ */ React.createElement(tooltip.Tooltip, { content: "Sync", className: "dm-sans" }, /* @__PURE__ */ React.createElement(
|
|
832
839
|
button.Button,
|
|
833
840
|
{
|
|
834
841
|
variant: "ghost",
|
|
@@ -843,7 +850,7 @@ const SingleMappingDashboardItem = ({
|
|
|
843
850
|
/* @__PURE__ */ React.createElement(
|
|
844
851
|
flex.Flex,
|
|
845
852
|
{
|
|
846
|
-
className:
|
|
853
|
+
className: `rotating-div ${isSyncing === field.id ? "rotate" : ""}`,
|
|
847
854
|
justifyContent: "center",
|
|
848
855
|
alignItems: "center",
|
|
849
856
|
onClick: async () => {
|
|
@@ -851,7 +858,7 @@ const SingleMappingDashboardItem = ({
|
|
|
851
858
|
setTimeout(async () => {
|
|
852
859
|
await (syncMapping == null ? void 0 : syncMapping(field.id));
|
|
853
860
|
setIsSyncing(null);
|
|
854
|
-
},
|
|
861
|
+
}, 2e3);
|
|
855
862
|
}
|
|
856
863
|
},
|
|
857
864
|
/* @__PURE__ */ React.createElement(sync.default, null)
|
|
@@ -872,7 +879,7 @@ const SingleMappingDashboardItem = ({
|
|
|
872
879
|
checked: field.isEnabled,
|
|
873
880
|
onChange: (value) => toggleDashboardField == null ? void 0 : toggleDashboardField(field.id, value)
|
|
874
881
|
}
|
|
875
|
-
) : null, /* @__PURE__ */ React.createElement(dropdown.DropdownMenu, null, /* @__PURE__ */ React.createElement(tooltip.Tooltip, { content:
|
|
882
|
+
) : 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(
|
|
876
883
|
iconButton.IconButton,
|
|
877
884
|
{
|
|
878
885
|
variant: "ghost",
|
|
@@ -883,7 +890,7 @@ const SingleMappingDashboardItem = ({
|
|
|
883
890
|
))), /* @__PURE__ */ React.createElement(
|
|
884
891
|
dropdown.DropdownMenuContent,
|
|
885
892
|
{
|
|
886
|
-
className:
|
|
893
|
+
className: "dm-sans",
|
|
887
894
|
css: {
|
|
888
895
|
minWidth: 180,
|
|
889
896
|
zIndex: 10,
|
|
@@ -904,14 +911,14 @@ const SingleMappingDashboardItem = ({
|
|
|
904
911
|
onClick: () => {
|
|
905
912
|
onMappingEditHandler(field.id);
|
|
906
913
|
handleEditField({
|
|
907
|
-
type:
|
|
914
|
+
type: "MAPPING",
|
|
908
915
|
values: field,
|
|
909
916
|
id: field.id
|
|
910
917
|
});
|
|
911
|
-
handleDashboardPage(false,
|
|
918
|
+
handleDashboardPage(false, "MAPPING");
|
|
912
919
|
}
|
|
913
920
|
},
|
|
914
|
-
/* @__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" },
|
|
921
|
+
/* @__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"))
|
|
915
922
|
),
|
|
916
923
|
/* @__PURE__ */ React.createElement(
|
|
917
924
|
dropdown.DropdownMenuItem,
|
|
@@ -921,7 +928,7 @@ const SingleMappingDashboardItem = ({
|
|
|
921
928
|
cursor: "pointer"
|
|
922
929
|
}
|
|
923
930
|
},
|
|
924
|
-
/* @__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" },
|
|
931
|
+
/* @__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"))
|
|
925
932
|
)
|
|
926
933
|
)))
|
|
927
934
|
),
|
|
@@ -941,9 +948,9 @@ const SingleMappingDashboardItem = ({
|
|
|
941
948
|
!!((_n = (_m = (_l = (_k = field == null ? void 0 : field.mappedFields) == null ? void 0 : _k.questions) == null ? void 0 : _l.filter) == null ? void 0 : _m.call(_l, (question) => question.isEnabled)) == null ? void 0 : _n.length) ? /* @__PURE__ */ React.createElement(
|
|
942
949
|
SingleMappingChipWrapper,
|
|
943
950
|
{
|
|
944
|
-
heading:
|
|
951
|
+
heading: "Questions",
|
|
945
952
|
fields: (_q = (_p = (_o = field == null ? void 0 : field.mappedFields) == null ? void 0 : _o.questions) == null ? void 0 : _p.filter) == null ? void 0 : _q.call(_p, (question) => question.isEnabled),
|
|
946
|
-
backgroundColor:
|
|
953
|
+
backgroundColor: "#E5F2FF"
|
|
947
954
|
}
|
|
948
955
|
) : null,
|
|
949
956
|
!!((_u = (_t = (_s = (_r = field == null ? void 0 : field.mappedFields) == null ? void 0 : _r.derivedQuestions) == null ? void 0 : _s.filter) == null ? void 0 : _t.call(
|
|
@@ -952,45 +959,45 @@ const SingleMappingDashboardItem = ({
|
|
|
952
959
|
)) == null ? void 0 : _u.length) ? /* @__PURE__ */ React.createElement(
|
|
953
960
|
SingleMappingChipWrapper,
|
|
954
961
|
{
|
|
955
|
-
heading:
|
|
962
|
+
heading: "Enrich",
|
|
956
963
|
fields: (_x = (_w = (_v = field == null ? void 0 : field.mappedFields) == null ? void 0 : _v.derivedQuestions) == null ? void 0 : _w.filter) == null ? void 0 : _x.call(
|
|
957
964
|
_w,
|
|
958
965
|
(derivedQuestion) => derivedQuestion.isEnabled
|
|
959
966
|
),
|
|
960
|
-
backgroundColor:
|
|
967
|
+
backgroundColor: "#E5F2FF"
|
|
961
968
|
}
|
|
962
969
|
) : null,
|
|
963
970
|
!!((_B = (_A = (_z = (_y = field == null ? void 0 : field.mappedFields) == null ? void 0 : _y.variables) == null ? void 0 : _z.filter) == null ? void 0 : _A.call(_z, (variable) => variable.isEnabled)) == null ? void 0 : _B.length) ? /* @__PURE__ */ React.createElement(
|
|
964
971
|
SingleMappingChipWrapper,
|
|
965
972
|
{
|
|
966
|
-
heading:
|
|
973
|
+
heading: "Variables",
|
|
967
974
|
fields: (_E = (_D = (_C = field == null ? void 0 : field.mappedFields) == null ? void 0 : _C.variables) == null ? void 0 : _D.filter) == null ? void 0 : _E.call(_D, (variable) => variable.isEnabled),
|
|
968
|
-
backgroundColor:
|
|
975
|
+
backgroundColor: "$positive100"
|
|
969
976
|
}
|
|
970
977
|
) : null,
|
|
971
978
|
!!((_I = (_H = (_G = (_F = field == null ? void 0 : field.mappedFields) == null ? void 0 : _F.contactProperties) == null ? void 0 : _G.filter) == null ? void 0 : _H.call(_G, (property) => property.isEnabled)) == null ? void 0 : _I.length) ? /* @__PURE__ */ React.createElement(
|
|
972
979
|
SingleMappingChipWrapper,
|
|
973
980
|
{
|
|
974
|
-
heading:
|
|
981
|
+
heading: "Contacts",
|
|
975
982
|
fields: (_L = (_K = (_J = field == null ? void 0 : field.mappedFields) == null ? void 0 : _J.contactProperties) == null ? void 0 : _K.filter) == null ? void 0 : _L.call(_K, (property) => property.isEnabled),
|
|
976
|
-
backgroundColor:
|
|
983
|
+
backgroundColor: "$negative100"
|
|
977
984
|
}
|
|
978
985
|
) : null,
|
|
979
986
|
!!((_P = (_O = (_N = (_M = field == null ? void 0 : field.mappedFields) == null ? void 0 : _M.expressions) == null ? void 0 : _N.filter) == null ? void 0 : _O.call(_N, (expression) => expression.isEnabled)) == null ? void 0 : _P.length) ? /* @__PURE__ */ React.createElement(
|
|
980
987
|
SingleMappingChipWrapper,
|
|
981
988
|
{
|
|
982
|
-
heading:
|
|
983
|
-
backgroundColor:
|
|
989
|
+
heading: "Expression",
|
|
990
|
+
backgroundColor: "$neutral100",
|
|
984
991
|
fields: (_S = (_R = (_Q = field == null ? void 0 : field.mappedFields) == null ? void 0 : _Q.expressions) == null ? void 0 : _R.filter) == null ? void 0 : _S.call(_R, (expression) => expression.isEnabled)
|
|
985
992
|
}
|
|
986
993
|
) : null,
|
|
987
994
|
!!((_W = (_V = (_U = (_T = field == null ? void 0 : field.mappedFields) == null ? void 0 : _T.property) == null ? void 0 : _U.filter) == null ? void 0 : _V.call(_U, (property) => property.isEnabled)) == null ? void 0 : _W.length) ? /* @__PURE__ */ React.createElement(
|
|
988
995
|
SingleMappingChipWrapper,
|
|
989
996
|
{
|
|
990
|
-
heading:
|
|
997
|
+
heading: "Property",
|
|
991
998
|
hideBorder: true,
|
|
992
999
|
fields: (_Z = (_Y = (_X = field == null ? void 0 : field.mappedFields) == null ? void 0 : _X.property) == null ? void 0 : _Y.filter) == null ? void 0 : _Z.call(_Y, (property) => property.isEnabled),
|
|
993
|
-
backgroundColor:
|
|
1000
|
+
backgroundColor: "rgba(74, 156, 166, 0.15)"
|
|
994
1001
|
}
|
|
995
1002
|
) : null
|
|
996
1003
|
), isMappingDisplayed && /* @__PURE__ */ React.createElement(
|
|
@@ -1014,21 +1021,21 @@ const SingleMappingDashboardItem = ({
|
|
|
1014
1021
|
onClick: () => {
|
|
1015
1022
|
onMappingEditHandler(field.id);
|
|
1016
1023
|
handleEditField({
|
|
1017
|
-
type:
|
|
1024
|
+
type: "SINGLE_MAPPING",
|
|
1018
1025
|
values: field,
|
|
1019
1026
|
id: field.id
|
|
1020
1027
|
});
|
|
1021
|
-
handleDashboardPage(false,
|
|
1028
|
+
handleDashboardPage(false, "MAPPING");
|
|
1022
1029
|
}
|
|
1023
1030
|
},
|
|
1024
|
-
|
|
1031
|
+
"Edit Mapping"
|
|
1025
1032
|
)
|
|
1026
1033
|
)) : null
|
|
1027
1034
|
), isDeleteModalOpen && /* @__PURE__ */ React.createElement(
|
|
1028
1035
|
confirmationModal.default,
|
|
1029
1036
|
{
|
|
1030
|
-
|
|
1031
|
-
description:
|
|
1037
|
+
name: "Delete Mapping?",
|
|
1038
|
+
description: `Are you sure you want to delete the mapping? This action cannot be undone.`,
|
|
1032
1039
|
onConfirm: () => deleteFieldHandler == null ? void 0 : deleteFieldHandler(field.id),
|
|
1033
1040
|
onCancel: () => setIsDeleteModalOpen(false)
|
|
1034
1041
|
}
|
|
@@ -1074,23 +1081,23 @@ const SingleMappingEventWrapper = ({
|
|
|
1074
1081
|
}) => {
|
|
1075
1082
|
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, _E, _F, _G, _H, _I, _J, _K;
|
|
1076
1083
|
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 == null ? void 0 : field.configurationFields) || !!field.object && isTrigger;
|
|
1077
|
-
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" } },
|
|
1084
|
+
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(
|
|
1078
1085
|
EventComponent,
|
|
1079
1086
|
{
|
|
1080
|
-
heading:
|
|
1087
|
+
heading: "Account:",
|
|
1081
1088
|
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
|
|
1082
1089
|
}
|
|
1083
1090
|
) : 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(
|
|
1084
1091
|
EventComponent,
|
|
1085
1092
|
{
|
|
1086
|
-
heading:
|
|
1093
|
+
heading: "Object:",
|
|
1087
1094
|
description: (_p = (_o = (_n = (_m = field == null ? void 0 : field.configurationFields) == null ? void 0 : _m.object) == null ? void 0 : _n.value) == null ? void 0 : _o.label) == null ? void 0 : _p.replace(/^./, (char) => char == null ? void 0 : char.toUpperCase())
|
|
1088
1095
|
}
|
|
1089
1096
|
) : null, !!((_r = (_q = field == null ? void 0 : field.configurationFields) == null ? void 0 : _q.action) == null ? void 0 : _r.hasAction) ? /* @__PURE__ */ React.createElement(
|
|
1090
1097
|
EventComponent,
|
|
1091
1098
|
{
|
|
1092
1099
|
hasBorder: true,
|
|
1093
|
-
heading:
|
|
1100
|
+
heading: "Action:",
|
|
1094
1101
|
description: (_u = (_t = (_s = field == null ? void 0 : field.configurationFields) == null ? void 0 : _s.action) == null ? void 0 : _t.value) == null ? void 0 : _u.label
|
|
1095
1102
|
}
|
|
1096
1103
|
) : null, !!((_w = (_v = field == null ? void 0 : field.configurationFields) == null ? void 0 : _v.spreadsheet) == null ? void 0 : _w.value) ? /* @__PURE__ */ React.createElement(
|
|
@@ -1098,7 +1105,7 @@ const SingleMappingEventWrapper = ({
|
|
|
1098
1105
|
{
|
|
1099
1106
|
hasLink: (_x = field == null ? void 0 : field.configurationFields) == null ? void 0 : _x.sheetURL,
|
|
1100
1107
|
hasBorder: true,
|
|
1101
|
-
heading:
|
|
1108
|
+
heading: "Sheet:",
|
|
1102
1109
|
description: typeof ((_y = field == null ? void 0 : field.configurationFields) == null ? void 0 : _y.spreadsheet) === "object" ? (_B = (_A = (_z = field == null ? void 0 : field.configurationFields) == null ? void 0 : _z.spreadsheet) == null ? void 0 : _A.value) == null ? void 0 : _B.label : (_D = (_C = field == null ? void 0 : field.configurationFields) == null ? void 0 : _C.spreadsheet) == null ? void 0 : _D.value
|
|
1103
1110
|
}
|
|
1104
1111
|
) : null, !!((_E = field == null ? void 0 : field.configurationFields) == null ? void 0 : _E.reference) ? /* @__PURE__ */ React.createElement(
|
|
@@ -1128,7 +1135,7 @@ const SingleMappingChipWrapper = ({
|
|
|
1128
1135
|
backgroundColor
|
|
1129
1136
|
}) => {
|
|
1130
1137
|
const modifiedFields = fields.filter(
|
|
1131
|
-
(field) => field.id !==
|
|
1138
|
+
(field) => field.id !== "ALL"
|
|
1132
1139
|
);
|
|
1133
1140
|
return /* @__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", css: { textTransform: "uppercase" } }, heading), /* @__PURE__ */ React.createElement(
|
|
1134
1141
|
flex.Flex,
|
|
@@ -1152,10 +1159,10 @@ const SingleMappingChipWrapper = ({
|
|
|
1152
1159
|
tooltip.Tooltip,
|
|
1153
1160
|
{
|
|
1154
1161
|
delayDuration: 300,
|
|
1155
|
-
content: (name == null ? void 0 : name.length) >
|
|
1162
|
+
content: (name == null ? void 0 : name.length) > 52 ? name : "",
|
|
1156
1163
|
size: "md",
|
|
1157
1164
|
sideOffset: 4,
|
|
1158
|
-
className:
|
|
1165
|
+
className: "dm-sans"
|
|
1159
1166
|
},
|
|
1160
1167
|
/* @__PURE__ */ React.createElement(
|
|
1161
1168
|
chip.Chip,
|
|
@@ -1169,7 +1176,7 @@ const SingleMappingChipWrapper = ({
|
|
|
1169
1176
|
textAlign: "center !important",
|
|
1170
1177
|
alignContent: "center !important",
|
|
1171
1178
|
display: "block",
|
|
1172
|
-
maxWidth:
|
|
1179
|
+
maxWidth: "230px",
|
|
1173
1180
|
overflow: "hidden",
|
|
1174
1181
|
fontFamily: "'Roboto Mono', monospace !important",
|
|
1175
1182
|
fontWeight: "$4 !important",
|
|
@@ -1178,7 +1185,7 @@ const SingleMappingChipWrapper = ({
|
|
|
1178
1185
|
}
|
|
1179
1186
|
}
|
|
1180
1187
|
},
|
|
1181
|
-
|
|
1188
|
+
"$" + name
|
|
1182
1189
|
)
|
|
1183
1190
|
);
|
|
1184
1191
|
})
|
|
@@ -1209,7 +1216,7 @@ const DashboardItem = ({
|
|
|
1209
1216
|
const [isDeleteModalOpen, setIsDeleteModalOpen] = React.useState(false);
|
|
1210
1217
|
const getDefaultFieldValue = (defaultValue) => {
|
|
1211
1218
|
var _a;
|
|
1212
|
-
let field =
|
|
1219
|
+
let field = "--";
|
|
1213
1220
|
switch (defaultValue == null ? void 0 : defaultValue.type) {
|
|
1214
1221
|
case "DATE_TIME": {
|
|
1215
1222
|
field = defaultValue == null ? void 0 : defaultValue.value;
|
|
@@ -1220,7 +1227,7 @@ const DashboardItem = ({
|
|
|
1220
1227
|
break;
|
|
1221
1228
|
}
|
|
1222
1229
|
default: {
|
|
1223
|
-
field = ((_a = defaultValue == null ? void 0 : defaultValue.value) == null ? void 0 : _a.label) ||
|
|
1230
|
+
field = ((_a = defaultValue == null ? void 0 : defaultValue.value) == null ? void 0 : _a.label) || "--";
|
|
1224
1231
|
break;
|
|
1225
1232
|
}
|
|
1226
1233
|
}
|
|
@@ -1280,7 +1287,7 @@ const DashboardItem = ({
|
|
|
1280
1287
|
color: "$neutral800"
|
|
1281
1288
|
}
|
|
1282
1289
|
},
|
|
1283
|
-
|
|
1290
|
+
"DRAFT"
|
|
1284
1291
|
)), /* @__PURE__ */ React.createElement(
|
|
1285
1292
|
box.Box,
|
|
1286
1293
|
{
|
|
@@ -1308,7 +1315,7 @@ const DashboardItem = ({
|
|
|
1308
1315
|
)), /* @__PURE__ */ React.createElement(
|
|
1309
1316
|
dropdown.DropdownMenuContent,
|
|
1310
1317
|
{
|
|
1311
|
-
className:
|
|
1318
|
+
className: "dm-sans",
|
|
1312
1319
|
css: {
|
|
1313
1320
|
minWidth: 180,
|
|
1314
1321
|
zIndex: 10,
|
|
@@ -1336,7 +1343,7 @@ const DashboardItem = ({
|
|
|
1336
1343
|
handleDashboardPage(false, type);
|
|
1337
1344
|
}
|
|
1338
1345
|
},
|
|
1339
|
-
/* @__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" },
|
|
1346
|
+
/* @__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"))
|
|
1340
1347
|
),
|
|
1341
1348
|
/* @__PURE__ */ React.createElement(
|
|
1342
1349
|
dropdown.DropdownMenuItem,
|
|
@@ -1346,7 +1353,7 @@ const DashboardItem = ({
|
|
|
1346
1353
|
cursor: "pointer"
|
|
1347
1354
|
}
|
|
1348
1355
|
},
|
|
1349
|
-
/* @__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" },
|
|
1356
|
+
/* @__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"))
|
|
1350
1357
|
)
|
|
1351
1358
|
)))
|
|
1352
1359
|
),
|
|
@@ -1362,7 +1369,7 @@ const DashboardItem = ({
|
|
|
1362
1369
|
{
|
|
1363
1370
|
css: {
|
|
1364
1371
|
borderInline: "$borderWidths$xs solid $black400",
|
|
1365
|
-
maxHeight:
|
|
1372
|
+
maxHeight: 432,
|
|
1366
1373
|
height: "100%",
|
|
1367
1374
|
position: "relative",
|
|
1368
1375
|
overflow: "auto"
|
|
@@ -1386,10 +1393,10 @@ const DashboardItem = ({
|
|
|
1386
1393
|
zIndex: 10
|
|
1387
1394
|
}
|
|
1388
1395
|
},
|
|
1389
|
-
/* @__PURE__ */ React.createElement(table.Th, { css: { paddingLeft: "$38 !important" } },
|
|
1390
|
-
/* @__PURE__ */ React.createElement(table.Th, null,
|
|
1391
|
-
/* @__PURE__ */ React.createElement(table.Th, null,
|
|
1392
|
-
/* @__PURE__ */ React.createElement(table.Th, { css: { paddingRight: "$20 !important" } },
|
|
1396
|
+
/* @__PURE__ */ React.createElement(table.Th, { css: { paddingLeft: "$38 !important" } }, "Type"),
|
|
1397
|
+
/* @__PURE__ */ React.createElement(table.Th, null, "SurveySparrow Field"),
|
|
1398
|
+
/* @__PURE__ */ React.createElement(table.Th, null, `${integrationName} Field`),
|
|
1399
|
+
/* @__PURE__ */ React.createElement(table.Th, { css: { paddingRight: "$20 !important" } }, "Default Value")
|
|
1393
1400
|
), /* @__PURE__ */ React.createElement(
|
|
1394
1401
|
table.Tbody,
|
|
1395
1402
|
{
|
|
@@ -1426,10 +1433,10 @@ const DashboardItem = ({
|
|
|
1426
1433
|
}
|
|
1427
1434
|
}
|
|
1428
1435
|
},
|
|
1429
|
-
/* @__PURE__ */ React.createElement(table.Td, null, (_b = (_a = field.mappedType) == null ? void 0 : _a.label) != null ? _b :
|
|
1430
|
-
/* @__PURE__ */ React.createElement(table.Td, null, (_d = (_c = field.surveySparrowField) == null ? void 0 : _c.label) != null ? _d :
|
|
1431
|
-
/* @__PURE__ */ React.createElement(table.Td, null, (_f = (_e = field.integrationField) == null ? void 0 : _e.label) != null ? _f :
|
|
1432
|
-
/* @__PURE__ */ React.createElement(table.Td, null, (_g = getDefaultFieldValue(field.defaultValue)) != null ? _g :
|
|
1436
|
+
/* @__PURE__ */ React.createElement(table.Td, null, (_b = (_a = field.mappedType) == null ? void 0 : _a.label) != null ? _b : "--"),
|
|
1437
|
+
/* @__PURE__ */ React.createElement(table.Td, null, (_d = (_c = field.surveySparrowField) == null ? void 0 : _c.label) != null ? _d : "--"),
|
|
1438
|
+
/* @__PURE__ */ React.createElement(table.Td, null, (_f = (_e = field.integrationField) == null ? void 0 : _e.label) != null ? _f : "--"),
|
|
1439
|
+
/* @__PURE__ */ React.createElement(table.Td, null, (_g = getDefaultFieldValue(field.defaultValue)) != null ? _g : "--")
|
|
1433
1440
|
);
|
|
1434
1441
|
})
|
|
1435
1442
|
)) : null
|
|
@@ -1461,15 +1468,15 @@ const DashboardItem = ({
|
|
|
1461
1468
|
color: "primary",
|
|
1462
1469
|
variant: "ghost"
|
|
1463
1470
|
},
|
|
1464
|
-
|
|
1471
|
+
`Edit ${heading}`
|
|
1465
1472
|
)
|
|
1466
1473
|
)
|
|
1467
1474
|
)
|
|
1468
1475
|
), isDeleteModalOpen && /* @__PURE__ */ React.createElement(
|
|
1469
1476
|
confirmationModal.default,
|
|
1470
1477
|
{
|
|
1471
|
-
|
|
1472
|
-
description:
|
|
1478
|
+
name: "Delete Mapping?",
|
|
1479
|
+
description: `Are you sure you want to delete the mapping? This action cannot be undone.`,
|
|
1473
1480
|
onConfirm: () => {
|
|
1474
1481
|
deleteFieldHandler(id);
|
|
1475
1482
|
setIsDeleteModalOpen(false);
|
|
@@ -1494,7 +1501,7 @@ const DropdownItem = ({
|
|
|
1494
1501
|
content: isDisabled ? toolTipContent : "",
|
|
1495
1502
|
css: {
|
|
1496
1503
|
zIndex: "99999999",
|
|
1497
|
-
minWidth:
|
|
1504
|
+
minWidth: "280px",
|
|
1498
1505
|
textAlign: "center"
|
|
1499
1506
|
}
|
|
1500
1507
|
},
|