@sparrowengg/integrations-templates-frontend 2.1.0-notion-release.19 → 2.1.0-notion-release.20
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/commons/components/MappingCondtion/index.js +62 -26
- package/dist/cjs/commons/components/MappingCondtion/index.js.map +1 -1
- package/dist/cjs/integration-template/components/dashboard.js +52 -9
- package/dist/cjs/integration-template/components/dashboard.js.map +1 -1
- package/dist/cjs/mapping/components/mapping.js +35 -9
- package/dist/cjs/mapping/components/mapping.js.map +1 -1
- package/dist/cjs/mapping/utils/conditionDescriptionBuilder.js +200 -0
- package/dist/cjs/mapping/utils/conditionDescriptionBuilder.js.map +1 -0
- package/dist/es/commons/components/MappingCondtion/index.js +62 -26
- package/dist/es/commons/components/MappingCondtion/index.js.map +1 -1
- package/dist/es/integration-template/components/dashboard.js +52 -9
- package/dist/es/integration-template/components/dashboard.js.map +1 -1
- package/dist/es/mapping/components/mapping.js +35 -9
- package/dist/es/mapping/components/mapping.js.map +1 -1
- package/dist/es/mapping/utils/conditionDescriptionBuilder.js +198 -0
- package/dist/es/mapping/utils/conditionDescriptionBuilder.js.map +1 -0
- package/package.json +1 -1
|
@@ -13,7 +13,12 @@ var button = require('../../../node_modules/@sparrowengg/twigs-react/dist/es/but
|
|
|
13
13
|
var iconButton = require('../../../node_modules/@sparrowengg/twigs-react/dist/es/button/icon-button.js');
|
|
14
14
|
var close = require('../../../node_modules/@sparrowengg/twigs-react-icons/dist/es/icons/close.js');
|
|
15
15
|
|
|
16
|
-
function MappingCondition({
|
|
16
|
+
function MappingCondition({
|
|
17
|
+
existingContions,
|
|
18
|
+
setExistingCondtions,
|
|
19
|
+
conditionData,
|
|
20
|
+
renderTrigger
|
|
21
|
+
}) {
|
|
17
22
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
18
23
|
const [hasFilterGroups, setHasFilterGroups] = React.useState(false);
|
|
19
24
|
const ref = React.useRef(null);
|
|
@@ -35,33 +40,41 @@ function MappingCondition({ existingContions, setExistingCondtions, conditionDat
|
|
|
35
40
|
}
|
|
36
41
|
),
|
|
37
42
|
document.body
|
|
38
|
-
), /* @__PURE__ */ React.createElement(dialog.DialogTrigger, { asChild: true, onClick: () => setIsOpen(true) }, /* @__PURE__ */ React.createElement(
|
|
43
|
+
), /* @__PURE__ */ React.createElement(dialog.DialogTrigger, { asChild: true, onClick: () => setIsOpen(true) }, renderTrigger ? renderTrigger(() => setIsOpen(true)) : /* @__PURE__ */ React.createElement(
|
|
39
44
|
text.Text,
|
|
40
45
|
{
|
|
46
|
+
className: "dm-sans",
|
|
41
47
|
weight: "medium",
|
|
42
48
|
css: {
|
|
43
49
|
color: "$primary500",
|
|
44
|
-
cursor: "pointer"
|
|
50
|
+
cursor: "pointer",
|
|
51
|
+
fontFamily: "DM Sans !important"
|
|
45
52
|
}
|
|
46
53
|
},
|
|
47
54
|
"Set Conditions"
|
|
48
55
|
)), /* @__PURE__ */ React.createElement(
|
|
49
56
|
dialog.DialogContent,
|
|
50
57
|
{
|
|
58
|
+
className: "dm-sans",
|
|
51
59
|
css: {
|
|
52
60
|
fontFamily: "DM Sans !important",
|
|
53
61
|
minHeight: "332px",
|
|
54
|
-
maxHeight: "532px"
|
|
62
|
+
maxHeight: "532px",
|
|
63
|
+
p: {
|
|
64
|
+
margin: "0 !important"
|
|
65
|
+
}
|
|
55
66
|
}
|
|
56
67
|
},
|
|
57
68
|
/* @__PURE__ */ React.createElement(
|
|
58
69
|
dialog.DialogHeader,
|
|
59
70
|
{
|
|
71
|
+
className: "dm-sans",
|
|
60
72
|
css: {
|
|
61
73
|
display: "flex",
|
|
62
74
|
flexDirection: "column",
|
|
63
75
|
alignItems: "flex-start",
|
|
64
|
-
justifyContent: "center"
|
|
76
|
+
justifyContent: "center",
|
|
77
|
+
fontFamily: "DM Sans !important"
|
|
65
78
|
}
|
|
66
79
|
},
|
|
67
80
|
/* @__PURE__ */ React.createElement(dialog.DialogTitle, { size: "md" }, "Set Conditions ")
|
|
@@ -69,11 +82,16 @@ function MappingCondition({ existingContions, setExistingCondtions, conditionDat
|
|
|
69
82
|
/* @__PURE__ */ React.createElement(
|
|
70
83
|
dialog.DialogBody,
|
|
71
84
|
{
|
|
85
|
+
className: "dm-sans",
|
|
72
86
|
css: {
|
|
87
|
+
fontFamily: "DM Sans !important",
|
|
73
88
|
padding: "$12 !important",
|
|
74
89
|
minHeight: "188px",
|
|
75
90
|
maxHeight: "388px",
|
|
76
|
-
overflowY: "auto"
|
|
91
|
+
overflowY: "auto",
|
|
92
|
+
p: {
|
|
93
|
+
margin: "0 !important"
|
|
94
|
+
}
|
|
77
95
|
}
|
|
78
96
|
},
|
|
79
97
|
/* @__PURE__ */ React.createElement(
|
|
@@ -88,29 +106,47 @@ function MappingCondition({ existingContions, setExistingCondtions, conditionDat
|
|
|
88
106
|
}
|
|
89
107
|
)
|
|
90
108
|
),
|
|
91
|
-
/* @__PURE__ */ React.createElement(
|
|
92
|
-
|
|
109
|
+
/* @__PURE__ */ React.createElement(
|
|
110
|
+
dialog.DialogFooter,
|
|
93
111
|
{
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
onClick: () => {
|
|
97
|
-
var _a;
|
|
98
|
-
return (_a = ref.current) == null ? void 0 : _a.handleSave();
|
|
99
|
-
},
|
|
100
|
-
disabled: !hasFilterGroups
|
|
112
|
+
className: "dm-sans",
|
|
113
|
+
css: { fontFamily: "DM Sans !important" }
|
|
101
114
|
},
|
|
102
|
-
"
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
115
|
+
/* @__PURE__ */ React.createElement(flex.Flex, { justifyContent: "flex-end", css: { justifyContent: "flex-end" } }, /* @__PURE__ */ React.createElement(dialog.DialogClose, { asChild: true }, /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$4" }, /* @__PURE__ */ React.createElement(button.Button, { size: "lg", color: "default" }, "Cancel"), /* @__PURE__ */ React.createElement(
|
|
116
|
+
button.Button,
|
|
117
|
+
{
|
|
118
|
+
size: "lg",
|
|
119
|
+
color: "primary",
|
|
120
|
+
onClick: () => {
|
|
121
|
+
var _a;
|
|
122
|
+
return (_a = ref.current) == null ? void 0 : _a.handleSave();
|
|
123
|
+
},
|
|
124
|
+
disabled: !hasFilterGroups
|
|
125
|
+
},
|
|
126
|
+
"Save"
|
|
127
|
+
))))
|
|
128
|
+
),
|
|
129
|
+
/* @__PURE__ */ React.createElement(
|
|
130
|
+
box.Box,
|
|
106
131
|
{
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
132
|
+
css: {
|
|
133
|
+
position: "absolute",
|
|
134
|
+
top: "$8",
|
|
135
|
+
right: "$8",
|
|
136
|
+
fontFamily: "DM Sans !important"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
/* @__PURE__ */ React.createElement(dialog.DialogClose, { className: "dm-sans", asChild: true }, /* @__PURE__ */ React.createElement(
|
|
140
|
+
iconButton.IconButton,
|
|
141
|
+
{
|
|
142
|
+
size: "lg",
|
|
143
|
+
icon: /* @__PURE__ */ React.createElement(close.CloseIcon, null),
|
|
144
|
+
variant: "ghost",
|
|
145
|
+
"aria-label": "Close",
|
|
146
|
+
color: "default"
|
|
147
|
+
}
|
|
148
|
+
))
|
|
149
|
+
)
|
|
114
150
|
));
|
|
115
151
|
}
|
|
116
152
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/commons/components/MappingCondtion/index.tsx"],"sourcesContent":["import React, { useState, useRef, useEffect } from \"react\";\nimport {\n Dialog,\n DialogHeader,\n DialogTitle,\n DialogBody,\n DialogFooter,\n DialogClose,\n DialogTrigger,\n DialogContent,\n IconButton,\n Box,\n Button,\n Flex,\n Text,\n} from \"@sparrowengg/twigs-react\";\nimport { CloseIcon } from \"@sparrowengg/twigs-react-icons\";\nimport ConditionWrapper from \"./conditionWrapper\";\nimport { createPortal } from \"react-dom\";\n\nexport default function MappingCondition({existingContions
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/commons/components/MappingCondtion/index.tsx"],"sourcesContent":["import React, { useState, useRef, useEffect } from \"react\";\nimport {\n Dialog,\n DialogHeader,\n DialogTitle,\n DialogBody,\n DialogFooter,\n DialogClose,\n DialogTrigger,\n DialogContent,\n IconButton,\n Box,\n Button,\n Flex,\n Text,\n} from \"@sparrowengg/twigs-react\";\nimport { CloseIcon } from \"@sparrowengg/twigs-react-icons\";\nimport ConditionWrapper from \"./conditionWrapper\";\nimport { createPortal } from \"react-dom\";\n\nexport default function MappingCondition({\n existingContions,\n setExistingCondtions,\n conditionData,\n renderTrigger,\n}: {\n existingContions: any;\n setExistingCondtions?: (conditions: any) => void;\n conditionData: any;\n renderTrigger?: (onClick: () => void) => React.ReactNode;\n}) {\n const [isOpen, setIsOpen] = useState(false);\n const [hasFilterGroups, setHasFilterGroups] = useState(false);\n const ref = useRef<{ handleSave: () => void }>(null);\n\n const onConditionsChange = (filterGroupsLength: number) => {\n setHasFilterGroups(filterGroupsLength > 0);\n };\n\n return (\n <Dialog size=\"md\" modal={false} open={isOpen} onOpenChange={setIsOpen}>\n {isOpen &&\n createPortal(\n <Box\n css={{\n height: \"100vh\",\n width: \"100vw\",\n position: \"fixed\",\n inset: \"0\",\n backgroundColorOpacity: [\"$black700\", 0.6],\n zIndex: \"99\",\n }}\n />,\n document.body\n )}\n <DialogTrigger asChild onClick={() => setIsOpen(true)}>\n {renderTrigger ? (\n renderTrigger(() => setIsOpen(true))\n ) : (\n <Text\n className=\"dm-sans\"\n weight=\"medium\"\n css={{\n color: \"$primary500\",\n cursor: \"pointer\",\n fontFamily: \"DM Sans !important\",\n }}\n >\n Set Conditions\n </Text>\n )}\n </DialogTrigger>\n <DialogContent\n className=\"dm-sans\"\n css={{\n fontFamily: \"DM Sans !important\",\n minHeight: \"332px\",\n maxHeight: \"532px\",\n p: {\n margin: \"0 !important\",\n },\n }}\n >\n <DialogHeader\n className=\"dm-sans\"\n css={{\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n justifyContent: \"center\",\n fontFamily: \"DM Sans !important\",\n }}\n >\n <DialogTitle size=\"md\">Set Conditions </DialogTitle>\n </DialogHeader>\n <DialogBody\n className=\"dm-sans\"\n css={{\n fontFamily: \"DM Sans !important\",\n padding: \"$12 !important\",\n minHeight: \"188px\",\n maxHeight: \"388px\",\n overflowY: \"auto\",\n p: {\n margin: \"0 !important\",\n },\n }}\n >\n <ConditionWrapper\n conditionData={conditionData}\n existingContions={existingContions}\n setExistingCondtions={setExistingCondtions || (() => {})}\n onConditionsChange={onConditionsChange}\n ref={ref}\n />\n </DialogBody>\n <DialogFooter\n className=\"dm-sans\"\n css={{ fontFamily: \"DM Sans !important\" }}\n >\n <Flex justifyContent=\"flex-end\" css={{ justifyContent: \"flex-end\" }}>\n <DialogClose asChild>\n <Flex alignItems=\"center\" gap=\"$4\">\n <Button size=\"lg\" color=\"default\">\n Cancel\n </Button>\n <Button\n size=\"lg\"\n color=\"primary\"\n onClick={() => ref.current?.handleSave()}\n disabled={!hasFilterGroups}\n >\n Save\n </Button>\n </Flex>\n </DialogClose>\n </Flex>\n </DialogFooter>\n <Box\n css={{\n position: \"absolute\",\n top: \"$8\",\n right: \"$8\",\n fontFamily: \"DM Sans !important\",\n }}\n >\n <DialogClose className=\"dm-sans\" asChild>\n <IconButton\n size=\"lg\"\n icon={<CloseIcon />}\n variant=\"ghost\"\n aria-label=\"Close\"\n color=\"default\"\n />\n </DialogClose>\n </Box>\n </DialogContent>\n </Dialog>\n );\n}\n"],"names":["useState","useRef","Dialog","createPortal","Box","DialogTrigger","Text","DialogContent","DialogHeader","DialogTitle","DialogBody","ConditionWrapper","DialogFooter","Flex","DialogClose","Button","IconButton","CloseIcon"],"mappings":";;;;;;;;;;;;;;;AAoBA,SAAwB,gBAAiB,CAAA;AAAA,EACvC,gBAAA;AAAA,EACA,oBAAA;AAA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,EAAA,UAAA;AAAA,UACV,GAAK,EAAA,IAAA;AAAA,UACL,KAAO,EAAA,IAAA;AAAA,UACP,UAAY,EAAA,oBAAA;AAAA,SACd;AAAA,OAAA;AAAA,sBAEC,KAAA,CAAA,aAAA,CAAAU,kBAAA,EAAA,EAAY,SAAU,EAAA,SAAA,EAAU,SAAO,IACtC,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,QAACE,qBAAA;AAAA,QAAA;AAAA,UACC,IAAK,EAAA,IAAA;AAAA,UACL,IAAA,sCAAOC,eAAU,EAAA,IAAA,CAAA;AAAA,UACjB,OAAQ,EAAA,OAAA;AAAA,UACR,YAAW,EAAA,OAAA;AAAA,UACX,KAAM,EAAA,SAAA;AAAA,SAAA;AAAA,OAEV,CAAA;AAAA,KACF;AAAA,GAEJ,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -9,6 +9,7 @@ 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 conditionDescriptionBuilder = require('../../mapping/utils/conditionDescriptionBuilder.js');
|
|
12
13
|
var flex = require('../../node_modules/@sparrowengg/twigs-react/dist/es/flex/flex.js');
|
|
13
14
|
var box = require('../../node_modules/@sparrowengg/twigs-react/dist/es/box/box.js');
|
|
14
15
|
var heading = require('../../node_modules/@sparrowengg/twigs-react/dist/es/heading/heading.js');
|
|
@@ -217,6 +218,7 @@ const MultiAccountDashboard = ({
|
|
|
217
218
|
id: field.id,
|
|
218
219
|
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}`,
|
|
219
220
|
fields: field.fields,
|
|
221
|
+
mappingConditions: field.mappingConditions,
|
|
220
222
|
isEnabled: field.isEnabled,
|
|
221
223
|
integrationName,
|
|
222
224
|
handleDashboardPage,
|
|
@@ -244,6 +246,7 @@ const MultiAccountDashboard = ({
|
|
|
244
246
|
isEnabled: field.isEnabled,
|
|
245
247
|
integrationName,
|
|
246
248
|
handleDashboardPage,
|
|
249
|
+
mappingConditions: field.mappingConditions,
|
|
247
250
|
handleEditField,
|
|
248
251
|
type: "MAPPING",
|
|
249
252
|
toggleDashboardField,
|
|
@@ -278,6 +281,7 @@ const MultiAccountDashboard = ({
|
|
|
278
281
|
return /* @__PURE__ */ React.createElement(
|
|
279
282
|
DashboardItem,
|
|
280
283
|
{
|
|
284
|
+
mappingConditions: field.mappingConditions,
|
|
281
285
|
key: field.id,
|
|
282
286
|
isDraft: (_a2 = field == null ? void 0 : field.isDraft) != null ? _a2 : false,
|
|
283
287
|
onMappingEditHandler,
|
|
@@ -314,6 +318,7 @@ const MultiAccountDashboard = ({
|
|
|
314
318
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, (mappingFields == null ? void 0 : mappingFields.type) === "MULTI_MAPPING" ? /* @__PURE__ */ React.createElement(
|
|
315
319
|
DashboardItem,
|
|
316
320
|
{
|
|
321
|
+
mappingConditions: field.mappingConditions,
|
|
317
322
|
key: field.id,
|
|
318
323
|
isDraft: (_a2 = field == null ? void 0 : field.isDraft) != null ? _a2 : false,
|
|
319
324
|
onMappingEditHandler,
|
|
@@ -434,6 +439,7 @@ const SingleAccountDashboard = ({
|
|
|
434
439
|
return /* @__PURE__ */ React.createElement(
|
|
435
440
|
DashboardItem,
|
|
436
441
|
{
|
|
442
|
+
mappingConditions: field.mappingConditions,
|
|
437
443
|
hasEditMapping,
|
|
438
444
|
isDraft: (_a2 = field == null ? void 0 : field.isDraft) != null ? _a2 : false,
|
|
439
445
|
onMappingEditHandler,
|
|
@@ -476,6 +482,7 @@ const SingleAccountDashboard = ({
|
|
|
476
482
|
return /* @__PURE__ */ React.createElement(
|
|
477
483
|
DashboardItem,
|
|
478
484
|
{
|
|
485
|
+
mappingConditions: field.mappingConditions,
|
|
479
486
|
isDraft: (_a2 = field == null ? void 0 : field.isDraft) != null ? _a2 : false,
|
|
480
487
|
onMappingEditHandler,
|
|
481
488
|
icon: /* @__PURE__ */ React.createElement(mapping.default, { size: 32, color: "#56B0BB" }),
|
|
@@ -805,7 +812,7 @@ const SingleMappingDashboardItem = ({
|
|
|
805
812
|
integrationName,
|
|
806
813
|
onMappingEditHandler
|
|
807
814
|
}) => {
|
|
808
|
-
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, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z
|
|
815
|
+
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, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$;
|
|
809
816
|
const [isMappingDisplayed, setIsMappingDisplayed] = React.useState(false);
|
|
810
817
|
const [isDeleteModalOpen, setIsDeleteModalOpen] = React.useState(false);
|
|
811
818
|
const [isSyncing, setIsSyncing] = React.useState(null);
|
|
@@ -1038,6 +1045,16 @@ const SingleMappingDashboardItem = ({
|
|
|
1038
1045
|
height: "100%"
|
|
1039
1046
|
}
|
|
1040
1047
|
},
|
|
1048
|
+
((_$ = (__ = field == null ? void 0 : field.mappingConditions) == null ? void 0 : __.filterGroups) == null ? void 0 : _$.length) ? /* @__PURE__ */ React.createElement(flex.Flex, { flexDirection: "column", justifyContent: "center" }, /* @__PURE__ */ React.createElement(text.Text, { className: "dm-sans", size: "sm", weight: "bold", css: { textTransform: "uppercase", color: "$neutral900", fontFamily: "DM Sans !important", paddingLeft: "$4" } }, "CONDITION"), /* @__PURE__ */ React.createElement(flex.Flex, { css: {
|
|
1049
|
+
marginTop: "$2 !important"
|
|
1050
|
+
} }, /* @__PURE__ */ React.createElement(
|
|
1051
|
+
conditionDescriptionBuilder.ConditionCard,
|
|
1052
|
+
{
|
|
1053
|
+
isEditable: false,
|
|
1054
|
+
conditionsData: field == null ? void 0 : field.mappingConditions,
|
|
1055
|
+
showMoreMenu: false
|
|
1056
|
+
}
|
|
1057
|
+
))) : null,
|
|
1041
1058
|
/* @__PURE__ */ React.createElement(
|
|
1042
1059
|
button.Button,
|
|
1043
1060
|
{
|
|
@@ -1241,12 +1258,14 @@ const DashboardItem = ({
|
|
|
1241
1258
|
handleDashboardPage,
|
|
1242
1259
|
type,
|
|
1243
1260
|
toggleDashboardField,
|
|
1244
|
-
deleteFieldHandler
|
|
1261
|
+
deleteFieldHandler,
|
|
1262
|
+
mappingConditions
|
|
1245
1263
|
}) => {
|
|
1264
|
+
var _a;
|
|
1246
1265
|
const [isMappingDisplayed, setIsMappingDisplayed] = React.useState(false);
|
|
1247
1266
|
const [isDeleteModalOpen, setIsDeleteModalOpen] = React.useState(false);
|
|
1248
1267
|
const getDefaultFieldValue = (defaultValue) => {
|
|
1249
|
-
var
|
|
1268
|
+
var _a2;
|
|
1250
1269
|
let field = "--";
|
|
1251
1270
|
switch (defaultValue == null ? void 0 : defaultValue.type) {
|
|
1252
1271
|
case "DATE_TIME": {
|
|
@@ -1258,7 +1277,7 @@ const DashboardItem = ({
|
|
|
1258
1277
|
break;
|
|
1259
1278
|
}
|
|
1260
1279
|
default: {
|
|
1261
|
-
field = ((
|
|
1280
|
+
field = ((_a2 = defaultValue == null ? void 0 : defaultValue.value) == null ? void 0 : _a2.label) || "--";
|
|
1262
1281
|
break;
|
|
1263
1282
|
}
|
|
1264
1283
|
}
|
|
@@ -1294,9 +1313,23 @@ const DashboardItem = ({
|
|
|
1294
1313
|
onClick: () => setIsMappingDisplayed(!isMappingDisplayed)
|
|
1295
1314
|
},
|
|
1296
1315
|
isMappingDisplayed ? /* @__PURE__ */ React.createElement(chevronDown.ChevronDownIcon, { size: 40, color: "#848484" }) : /* @__PURE__ */ React.createElement(chevronRight.ChevronRightIcon, { size: 40, color: "#848484" }),
|
|
1297
|
-
/* @__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(
|
|
1298
|
-
|
|
1299
|
-
|
|
1316
|
+
/* @__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(
|
|
1317
|
+
text.Text,
|
|
1318
|
+
{
|
|
1319
|
+
size: "sm",
|
|
1320
|
+
css: {
|
|
1321
|
+
"& span": {
|
|
1322
|
+
fontFamily: "'DM Sans', sans-serif !important"
|
|
1323
|
+
},
|
|
1324
|
+
color: "$neutral600",
|
|
1325
|
+
"& b": {
|
|
1326
|
+
fontWeight: "$6 !important",
|
|
1327
|
+
fontFamily: "'DM Sans', sans-serif !important"
|
|
1328
|
+
}
|
|
1329
|
+
},
|
|
1330
|
+
dangerouslySetInnerHTML: { __html: description }
|
|
1331
|
+
}
|
|
1332
|
+
)))
|
|
1300
1333
|
),
|
|
1301
1334
|
/* @__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(
|
|
1302
1335
|
box.Box,
|
|
@@ -1441,7 +1474,7 @@ const DashboardItem = ({
|
|
|
1441
1474
|
}
|
|
1442
1475
|
},
|
|
1443
1476
|
fields.map((field) => {
|
|
1444
|
-
var
|
|
1477
|
+
var _a2, _b, _c, _d, _e, _f, _g;
|
|
1445
1478
|
return /* @__PURE__ */ React.createElement(
|
|
1446
1479
|
table.Tr,
|
|
1447
1480
|
{
|
|
@@ -1464,7 +1497,7 @@ const DashboardItem = ({
|
|
|
1464
1497
|
}
|
|
1465
1498
|
}
|
|
1466
1499
|
},
|
|
1467
|
-
/* @__PURE__ */ React.createElement(table.Td, null, (_b = (
|
|
1500
|
+
/* @__PURE__ */ React.createElement(table.Td, null, (_b = (_a2 = field.mappedType) == null ? void 0 : _a2.label) != null ? _b : "--"),
|
|
1468
1501
|
/* @__PURE__ */ React.createElement(table.Td, null, (_d = (_c = field.surveySparrowField) == null ? void 0 : _c.label) != null ? _d : "--"),
|
|
1469
1502
|
/* @__PURE__ */ React.createElement(table.Td, null, (_f = (_e = field.integrationField) == null ? void 0 : _e.label) != null ? _f : "--"),
|
|
1470
1503
|
/* @__PURE__ */ React.createElement(table.Td, null, (_g = getDefaultFieldValue(field.defaultValue)) != null ? _g : "--")
|
|
@@ -1483,6 +1516,16 @@ const DashboardItem = ({
|
|
|
1483
1516
|
height: "100%"
|
|
1484
1517
|
}
|
|
1485
1518
|
},
|
|
1519
|
+
((_a = mappingConditions == null ? void 0 : mappingConditions.filterGroups) == null ? void 0 : _a.length) ? /* @__PURE__ */ React.createElement(flex.Flex, { flexDirection: "column", justifyContent: "center" }, /* @__PURE__ */ React.createElement(text.Text, { className: "dm-sans", size: "sm", weight: "bold", css: { textTransform: "uppercase", color: "$neutral900", fontFamily: "DM Sans !important", paddingLeft: "$4" } }, "CONDITION"), /* @__PURE__ */ React.createElement(flex.Flex, { css: {
|
|
1520
|
+
marginTop: "$2 !important"
|
|
1521
|
+
} }, /* @__PURE__ */ React.createElement(
|
|
1522
|
+
conditionDescriptionBuilder.ConditionCard,
|
|
1523
|
+
{
|
|
1524
|
+
isEditable: false,
|
|
1525
|
+
conditionsData: mappingConditions,
|
|
1526
|
+
showMoreMenu: false
|
|
1527
|
+
}
|
|
1528
|
+
))) : null,
|
|
1486
1529
|
/* @__PURE__ */ React.createElement(
|
|
1487
1530
|
button.Button,
|
|
1488
1531
|
{
|