@sparrowengg/integrations-templates-frontend 1.9.84-beta.10 → 1.9.84-beta.12
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/dynamic-mapping/components/mapping.js +490 -0
- package/dist/cjs/dynamic-mapping/components/mapping.js.map +1 -0
- package/dist/cjs/dynamic-mapping/index.js +1071 -0
- package/dist/cjs/dynamic-mapping/index.js.map +1 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/integration-template/components/dashboard.js +197 -164
- package/dist/cjs/integration-template/components/dashboard.js.map +1 -1
- package/dist/cjs/integration-template/index.js +29 -12
- package/dist/cjs/integration-template/index.js.map +1 -1
- package/dist/cjs/mapping/components/mapping.js +4 -4
- package/dist/cjs/mapping/components/mapping.js.map +1 -1
- package/dist/cjs/mapping/index.js +0 -1
- package/dist/cjs/mapping/index.js.map +1 -1
- package/dist/cjs/node_modules/@internationalized/date/dist/utils.js +2 -1
- package/dist/cjs/node_modules/@internationalized/date/dist/utils.js.map +1 -1
- package/dist/cjs/single-mapping/index.js +10 -16
- package/dist/cjs/single-mapping/index.js.map +1 -1
- package/dist/es/dynamic-mapping/components/mapping.js +486 -0
- package/dist/es/dynamic-mapping/components/mapping.js.map +1 -0
- package/dist/es/dynamic-mapping/index.js +1069 -0
- package/dist/es/dynamic-mapping/index.js.map +1 -0
- package/dist/es/index.js +1 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/integration-template/components/dashboard.js +197 -164
- package/dist/es/integration-template/components/dashboard.js.map +1 -1
- package/dist/es/integration-template/index.js +29 -12
- package/dist/es/integration-template/index.js.map +1 -1
- package/dist/es/mapping/components/mapping.js +4 -4
- package/dist/es/mapping/components/mapping.js.map +1 -1
- package/dist/es/mapping/index.js +0 -1
- package/dist/es/mapping/index.js.map +1 -1
- package/dist/es/node_modules/@internationalized/date/dist/utils.js +2 -1
- package/dist/es/node_modules/@internationalized/date/dist/utils.js.map +1 -1
- package/dist/es/single-mapping/index.js +10 -16
- package/dist/es/single-mapping/index.js.map +1 -1
- package/dist/index.d.ts +92 -5
- package/package.json +1 -1
|
@@ -59,7 +59,17 @@ const Dashboard = ({
|
|
|
59
59
|
alignItems: "center"
|
|
60
60
|
},
|
|
61
61
|
/* @__PURE__ */ React__default.createElement(Flex, { flexDirection: "column", gap: "$2" }, /* @__PURE__ */ React__default.createElement(Heading, { size: "h5" }, integrationName), /* @__PURE__ */ React__default.createElement(Text, { size: "sm", css: { color: "$neutral700" } }, dashboardDescription)),
|
|
62
|
-
/* @__PURE__ */ React__default.createElement(Flex, { alignItems: "center", gap: "$4" }, hasMultiAccounts && /* @__PURE__ */ React__default.createElement(Button, { size: "lg", color: "default", leftIcon: /* @__PURE__ */ React__default.createElement(PlusIcon, null) }, "Add Account"), hasDropdownComponents.mapping && !hasDropdownComponents.trigger ? /* @__PURE__ */ React__default.createElement(
|
|
62
|
+
/* @__PURE__ */ React__default.createElement(Flex, { alignItems: "center", gap: "$4" }, hasMultiAccounts && /* @__PURE__ */ React__default.createElement(Button, { size: "lg", color: "default", leftIcon: /* @__PURE__ */ React__default.createElement(PlusIcon, null) }, "Add Account"), hasDropdownComponents.mapping && !hasDropdownComponents.trigger ? /* @__PURE__ */ React__default.createElement(
|
|
63
|
+
Button,
|
|
64
|
+
{
|
|
65
|
+
size: "lg",
|
|
66
|
+
color: "primary",
|
|
67
|
+
disabled: !mappingEnabled,
|
|
68
|
+
leftIcon: /* @__PURE__ */ React__default.createElement(PlusIcon, null),
|
|
69
|
+
onClick: () => handleConfigurationType("MAPPING")
|
|
70
|
+
},
|
|
71
|
+
"New Mapping"
|
|
72
|
+
) : null, hasDropdownComponents.trigger && hasDropdownComponents.mapping ? /* @__PURE__ */ React__default.createElement(DropdownMenu, null, /* @__PURE__ */ React__default.createElement(
|
|
63
73
|
Tooltip,
|
|
64
74
|
{
|
|
65
75
|
content: !triggerEnabled && !mappingEnabled ? "You have reached the maximum limit for creating triggers/mappings" : ""
|
|
@@ -207,43 +217,45 @@ const MultiAccountDashboard = ({
|
|
|
207
217
|
deleteFieldHandler
|
|
208
218
|
}
|
|
209
219
|
);
|
|
210
|
-
})) : null, !!((_a = mappingFields == null ? void 0 : mappingFields.fields) == null ? void 0 : _a.length) ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, (_b = mappingFields == null ? void 0 : mappingFields.fields) == null ? void 0 : _b.map(
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
220
|
+
})) : null, !!((_a = mappingFields == null ? void 0 : mappingFields.fields) == null ? void 0 : _a.length) ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, (_b = mappingFields == null ? void 0 : mappingFields.fields) == null ? void 0 : _b.map(
|
|
221
|
+
(field) => {
|
|
222
|
+
var _a2, _b2, _c2, _d2, _e, _f, _g, _h, _i;
|
|
223
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, (mappingFields == null ? void 0 : mappingFields.type) === "MULTI_MAPPING" ? /* @__PURE__ */ React__default.createElement(
|
|
224
|
+
DashboardItem,
|
|
225
|
+
{
|
|
226
|
+
key: field.id,
|
|
227
|
+
isDraft: (_a2 = field == null ? void 0 : field.isDraft) != null ? _a2 : false,
|
|
228
|
+
onMappingEditHandler,
|
|
229
|
+
icon: /* @__PURE__ */ React__default.createElement(MappingIcon, { size: 32, color: "#56B0BB" }),
|
|
230
|
+
heading: (_c2 = (_b2 = field.domain) != null ? _b2 : field.email) != null ? _c2 : "Field",
|
|
231
|
+
id: field.id,
|
|
232
|
+
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()}`)}`,
|
|
233
|
+
fields: field.fields,
|
|
234
|
+
isEnabled: field.isEnabled,
|
|
235
|
+
integrationName,
|
|
236
|
+
handleDashboardPage,
|
|
237
|
+
handleEditField,
|
|
238
|
+
type: "MAPPING",
|
|
239
|
+
toggleDashboardField,
|
|
240
|
+
deleteFieldHandler
|
|
241
|
+
}
|
|
242
|
+
) : /* @__PURE__ */ React__default.createElement(
|
|
243
|
+
SingleMappingDashboardItem,
|
|
244
|
+
{
|
|
245
|
+
key: field.id,
|
|
246
|
+
field,
|
|
247
|
+
integrationName,
|
|
248
|
+
syncMapping,
|
|
249
|
+
icon: /* @__PURE__ */ React__default.createElement(MappingIcon, { size: 32, color: "#56B0BB" }),
|
|
250
|
+
handleEditField,
|
|
251
|
+
handleDashboardPage,
|
|
252
|
+
toggleDashboardField,
|
|
253
|
+
deleteFieldHandler,
|
|
254
|
+
onMappingEditHandler
|
|
255
|
+
}
|
|
256
|
+
));
|
|
257
|
+
}
|
|
258
|
+
)) : null)
|
|
247
259
|
), /* @__PURE__ */ React__default.createElement(
|
|
248
260
|
TabsContent,
|
|
249
261
|
{
|
|
@@ -285,43 +297,45 @@ const MultiAccountDashboard = ({
|
|
|
285
297
|
value: "MAPPING",
|
|
286
298
|
css: { paddingBlock: "$12", paddingInline: 0 }
|
|
287
299
|
},
|
|
288
|
-
!!((_c = mappingFields == null ? void 0 : mappingFields.fields) == null ? void 0 : _c.length) ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Flex, { flexDirection: "column", gap: "$8" }, (_d = mappingFields == null ? void 0 : mappingFields.fields) == null ? void 0 : _d.map(
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
300
|
+
!!((_c = mappingFields == null ? void 0 : mappingFields.fields) == null ? void 0 : _c.length) ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Flex, { flexDirection: "column", gap: "$8" }, (_d = mappingFields == null ? void 0 : mappingFields.fields) == null ? void 0 : _d.map(
|
|
301
|
+
(field) => {
|
|
302
|
+
var _a2, _b2, _c2, _d2, _e, _f, _g;
|
|
303
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, (mappingFields == null ? void 0 : mappingFields.type) === "MULTI_MAPPING" ? /* @__PURE__ */ React__default.createElement(
|
|
304
|
+
DashboardItem,
|
|
305
|
+
{
|
|
306
|
+
key: field.id,
|
|
307
|
+
isDraft: (_a2 = field == null ? void 0 : field.isDraft) != null ? _a2 : false,
|
|
308
|
+
onMappingEditHandler,
|
|
309
|
+
icon: /* @__PURE__ */ React__default.createElement(MappingIcon, { size: 32, color: "#56B0BB" }),
|
|
310
|
+
heading: (field == null ? void 0 : field.mappingName) || "Mapping",
|
|
311
|
+
id: field.id,
|
|
312
|
+
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()}`)}`,
|
|
313
|
+
fields: field.fields,
|
|
314
|
+
isEnabled: field.isEnabled,
|
|
315
|
+
integrationName,
|
|
316
|
+
handleDashboardPage,
|
|
317
|
+
handleEditField,
|
|
318
|
+
type: "MAPPING",
|
|
319
|
+
toggleDashboardField,
|
|
320
|
+
deleteFieldHandler
|
|
321
|
+
}
|
|
322
|
+
) : /* @__PURE__ */ React__default.createElement(
|
|
323
|
+
SingleMappingDashboardItem,
|
|
324
|
+
{
|
|
325
|
+
key: field.id,
|
|
326
|
+
field,
|
|
327
|
+
integrationName,
|
|
328
|
+
syncMapping,
|
|
329
|
+
icon: /* @__PURE__ */ React__default.createElement(MappingIcon, { size: 32, color: "#56B0BB" }),
|
|
330
|
+
handleEditField,
|
|
331
|
+
handleDashboardPage,
|
|
332
|
+
toggleDashboardField,
|
|
333
|
+
deleteFieldHandler,
|
|
334
|
+
onMappingEditHandler
|
|
335
|
+
}
|
|
336
|
+
));
|
|
337
|
+
}
|
|
338
|
+
))) : /* @__PURE__ */ React__default.createElement(
|
|
325
339
|
MultiAccountFallback,
|
|
326
340
|
{
|
|
327
341
|
title: "Mapping",
|
|
@@ -382,7 +396,7 @@ const SingleAccountDashboard = ({
|
|
|
382
396
|
toggleDashboardField,
|
|
383
397
|
deleteFieldHandler
|
|
384
398
|
}) => {
|
|
385
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
399
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
386
400
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, !!(triggerFields == null ? void 0 : triggerFields.length) ? /* @__PURE__ */ React__default.createElement(Box, { css: { marginTop: "$20" } }, triggerFields == null ? void 0 : triggerFields.map((field) => {
|
|
387
401
|
var _a2, _b2, _c2, _d2;
|
|
388
402
|
return /* @__PURE__ */ React__default.createElement(
|
|
@@ -401,28 +415,71 @@ const SingleAccountDashboard = ({
|
|
|
401
415
|
deleteFieldHandler
|
|
402
416
|
}
|
|
403
417
|
);
|
|
404
|
-
})) : null,
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
418
|
+
})) : null, (mappingFields == null ? void 0 : mappingFields.type) === "DYNAMIC_MAPPING" ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, !!((_a = mappingFields == null ? void 0 : mappingFields.fields) == null ? void 0 : _a.length) ? /* @__PURE__ */ React__default.createElement(Box, { css: { marginTop: !(triggerFields == null ? void 0 : triggerFields.length) ? "$20" : "$8" } }, (_b = mappingFields == null ? void 0 : mappingFields.fields) == null ? void 0 : _b.map(
|
|
419
|
+
(field) => {
|
|
420
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
421
|
+
if ((field == null ? void 0 : field.type) === "MULTI_MAPPING") {
|
|
422
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
423
|
+
DashboardItem,
|
|
424
|
+
{
|
|
425
|
+
isDraft: (_a2 = field == null ? void 0 : field.isDraft) != null ? _a2 : false,
|
|
426
|
+
onMappingEditHandler,
|
|
427
|
+
icon: /* @__PURE__ */ React__default.createElement(MappingIcon, { size: 32, color: "#56B0BB" }),
|
|
428
|
+
heading: (field == null ? void 0 : field.mappingName) || "Mapping",
|
|
429
|
+
id: field.id,
|
|
430
|
+
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()}`)}`,
|
|
431
|
+
fields: field.fields,
|
|
432
|
+
isEnabled: field.isEnabled,
|
|
433
|
+
integrationName,
|
|
434
|
+
handleDashboardPage,
|
|
435
|
+
handleEditField,
|
|
436
|
+
type: "MAPPING",
|
|
437
|
+
toggleDashboardField,
|
|
438
|
+
deleteFieldHandler
|
|
439
|
+
}
|
|
440
|
+
);
|
|
441
|
+
} else {
|
|
442
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
443
|
+
SingleMappingDashboardItem,
|
|
444
|
+
{
|
|
445
|
+
onMappingEditHandler,
|
|
446
|
+
syncMapping,
|
|
447
|
+
field,
|
|
448
|
+
key: field == null ? void 0 : field.id,
|
|
449
|
+
integrationName,
|
|
450
|
+
icon: /* @__PURE__ */ React__default.createElement(MappingIcon, { size: 32, color: "#56B0BB" }),
|
|
451
|
+
handleEditField,
|
|
452
|
+
handleDashboardPage,
|
|
453
|
+
toggleDashboardField,
|
|
454
|
+
deleteFieldHandler
|
|
455
|
+
}
|
|
456
|
+
);
|
|
423
457
|
}
|
|
424
|
-
|
|
425
|
-
|
|
458
|
+
}
|
|
459
|
+
)) : null) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, !!((_c = mappingFields == null ? void 0 : mappingFields.fields) == null ? void 0 : _c.length) && (mappingFields == null ? void 0 : mappingFields.type) === "MULTI_MAPPING" ? /* @__PURE__ */ React__default.createElement(Box, { css: { marginTop: !(triggerFields == null ? void 0 : triggerFields.length) ? "$20" : "$8" } }, (_d = mappingFields == null ? void 0 : mappingFields.fields) == null ? void 0 : _d.map(
|
|
460
|
+
(field) => {
|
|
461
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
462
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
463
|
+
DashboardItem,
|
|
464
|
+
{
|
|
465
|
+
isDraft: (_a2 = field == null ? void 0 : field.isDraft) != null ? _a2 : false,
|
|
466
|
+
onMappingEditHandler,
|
|
467
|
+
icon: /* @__PURE__ */ React__default.createElement(MappingIcon, { size: 32, color: "#56B0BB" }),
|
|
468
|
+
heading: (field == null ? void 0 : field.mappingName) || "Mapping",
|
|
469
|
+
id: field.id,
|
|
470
|
+
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()}`)}`,
|
|
471
|
+
fields: field.fields,
|
|
472
|
+
isEnabled: field.isEnabled,
|
|
473
|
+
integrationName,
|
|
474
|
+
handleDashboardPage,
|
|
475
|
+
handleEditField,
|
|
476
|
+
type: "MAPPING",
|
|
477
|
+
toggleDashboardField,
|
|
478
|
+
deleteFieldHandler
|
|
479
|
+
}
|
|
480
|
+
);
|
|
481
|
+
}
|
|
482
|
+
)) : null, console.log(mappingFields, "mappingFields"), ((_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__default.createElement(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(
|
|
426
483
|
(field, index) => {
|
|
427
484
|
return /* @__PURE__ */ React__default.createElement(
|
|
428
485
|
SingleMappingDashboardItem,
|
|
@@ -440,7 +497,7 @@ const SingleAccountDashboard = ({
|
|
|
440
497
|
}
|
|
441
498
|
);
|
|
442
499
|
}
|
|
443
|
-
)) : null);
|
|
500
|
+
)) : null));
|
|
444
501
|
};
|
|
445
502
|
const TriggerDasboardItem = ({
|
|
446
503
|
isDraft,
|
|
@@ -642,10 +699,7 @@ const TriggerDasboardItem = ({
|
|
|
642
699
|
}
|
|
643
700
|
}
|
|
644
701
|
)) : null,
|
|
645
|
-
((_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(
|
|
646
|
-
_e,
|
|
647
|
-
(variable) => variable.isEnabled
|
|
648
|
-
)) == null ? void 0 : _g.length) ? /* @__PURE__ */ React__default.createElement(
|
|
702
|
+
((_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__default.createElement(
|
|
649
703
|
SingleMappingChipWrapper,
|
|
650
704
|
{
|
|
651
705
|
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",
|
|
@@ -791,26 +845,35 @@ const SingleMappingDashboardItem = ({
|
|
|
791
845
|
typeof ((_f = field == null ? void 0 : field.configurationFields) == null ? void 0 : _f.spreadsheet) === "object" ? (_i = (_h = (_g = field == null ? void 0 : field.configurationFields) == null ? void 0 : _g.spreadsheet) == null ? void 0 : _h.value) == null ? void 0 : _i.label : (_k = (_j = field == null ? void 0 : field.configurationFields) == null ? void 0 : _j.spreadsheet) == null ? void 0 : _k.value
|
|
792
846
|
)) : null))
|
|
793
847
|
),
|
|
794
|
-
/* @__PURE__ */ React__default.createElement(Flex, { alignItems: "center", gap: "$12" }, /* @__PURE__ */ React__default.createElement(Tooltip, { content: "Sync", className: "dm-sans" }, /* @__PURE__ */ React__default.createElement(
|
|
795
|
-
|
|
796
|
-
height: "40px !important",
|
|
797
|
-
marginInlineEnd: "$3"
|
|
798
|
-
} }, /* @__PURE__ */ React__default.createElement(
|
|
799
|
-
Flex,
|
|
848
|
+
/* @__PURE__ */ React__default.createElement(Flex, { alignItems: "center", gap: "$12" }, /* @__PURE__ */ React__default.createElement(Tooltip, { content: "Sync", className: "dm-sans" }, /* @__PURE__ */ React__default.createElement(
|
|
849
|
+
Button,
|
|
800
850
|
{
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
setIsSyncing(null);
|
|
809
|
-
}, 2e3);
|
|
851
|
+
variant: "ghost",
|
|
852
|
+
size: "lg",
|
|
853
|
+
color: "default",
|
|
854
|
+
css: {
|
|
855
|
+
width: "40px !important",
|
|
856
|
+
height: "40px !important",
|
|
857
|
+
marginInlineEnd: "$3"
|
|
810
858
|
}
|
|
811
859
|
},
|
|
812
|
-
/* @__PURE__ */ React__default.createElement(
|
|
813
|
-
|
|
860
|
+
/* @__PURE__ */ React__default.createElement(
|
|
861
|
+
Flex,
|
|
862
|
+
{
|
|
863
|
+
className: `rotating-div ${isSyncing === field.id ? "rotate" : ""}`,
|
|
864
|
+
justifyContent: "center",
|
|
865
|
+
alignItems: "center",
|
|
866
|
+
onClick: async () => {
|
|
867
|
+
setIsSyncing(field.id);
|
|
868
|
+
setTimeout(async () => {
|
|
869
|
+
await (syncMapping == null ? void 0 : syncMapping(field.id));
|
|
870
|
+
setIsSyncing(null);
|
|
871
|
+
}, 2e3);
|
|
872
|
+
}
|
|
873
|
+
},
|
|
874
|
+
/* @__PURE__ */ React__default.createElement(Sync, null)
|
|
875
|
+
)
|
|
876
|
+
)), (() => (field == null ? void 0 : field.isEnabled) !== null && (field == null ? void 0 : field.isEnabled) !== void 0)() ? /* @__PURE__ */ React__default.createElement(
|
|
814
877
|
Box,
|
|
815
878
|
{
|
|
816
879
|
css: {
|
|
@@ -892,17 +955,11 @@ const SingleMappingDashboardItem = ({
|
|
|
892
955
|
}
|
|
893
956
|
},
|
|
894
957
|
/* @__PURE__ */ React__default.createElement(SingleMappingEventWrapper, { field }),
|
|
895
|
-
!!((_o = (_n = (_m = (_l = field == null ? void 0 : field.mappedFields) == null ? void 0 : _l.questions) == null ? void 0 : _m.filter) == null ? void 0 : _n.call(
|
|
896
|
-
_m,
|
|
897
|
-
(question) => question.isEnabled
|
|
898
|
-
)) == null ? void 0 : _o.length) ? /* @__PURE__ */ React__default.createElement(
|
|
958
|
+
!!((_o = (_n = (_m = (_l = field == null ? void 0 : field.mappedFields) == null ? void 0 : _l.questions) == null ? void 0 : _m.filter) == null ? void 0 : _n.call(_m, (question) => question.isEnabled)) == null ? void 0 : _o.length) ? /* @__PURE__ */ React__default.createElement(
|
|
899
959
|
SingleMappingChipWrapper,
|
|
900
960
|
{
|
|
901
961
|
heading: "Questions",
|
|
902
|
-
fields: (_r = (_q = (_p = field == null ? void 0 : field.mappedFields) == null ? void 0 : _p.questions) == null ? void 0 : _q.filter) == null ? void 0 : _r.call(
|
|
903
|
-
_q,
|
|
904
|
-
(question) => question.isEnabled
|
|
905
|
-
),
|
|
962
|
+
fields: (_r = (_q = (_p = field == null ? void 0 : field.mappedFields) == null ? void 0 : _p.questions) == null ? void 0 : _q.filter) == null ? void 0 : _r.call(_q, (question) => question.isEnabled),
|
|
906
963
|
backgroundColor: "#E5F2FF"
|
|
907
964
|
}
|
|
908
965
|
) : null,
|
|
@@ -920,60 +977,36 @@ const SingleMappingDashboardItem = ({
|
|
|
920
977
|
backgroundColor: "#E5F2FF"
|
|
921
978
|
}
|
|
922
979
|
) : null,
|
|
923
|
-
!!((_C = (_B = (_A = (_z = field == null ? void 0 : field.mappedFields) == null ? void 0 : _z.variables) == null ? void 0 : _A.filter) == null ? void 0 : _B.call(
|
|
924
|
-
_A,
|
|
925
|
-
(variable) => variable.isEnabled
|
|
926
|
-
)) == null ? void 0 : _C.length) ? /* @__PURE__ */ React__default.createElement(
|
|
980
|
+
!!((_C = (_B = (_A = (_z = field == null ? void 0 : field.mappedFields) == null ? void 0 : _z.variables) == null ? void 0 : _A.filter) == null ? void 0 : _B.call(_A, (variable) => variable.isEnabled)) == null ? void 0 : _C.length) ? /* @__PURE__ */ React__default.createElement(
|
|
927
981
|
SingleMappingChipWrapper,
|
|
928
982
|
{
|
|
929
983
|
heading: "Variables",
|
|
930
|
-
fields: (_F = (_E = (_D = field == null ? void 0 : field.mappedFields) == null ? void 0 : _D.variables) == null ? void 0 : _E.filter) == null ? void 0 : _F.call(
|
|
931
|
-
_E,
|
|
932
|
-
(variable) => variable.isEnabled
|
|
933
|
-
),
|
|
984
|
+
fields: (_F = (_E = (_D = field == null ? void 0 : field.mappedFields) == null ? void 0 : _D.variables) == null ? void 0 : _E.filter) == null ? void 0 : _F.call(_E, (variable) => variable.isEnabled),
|
|
934
985
|
backgroundColor: "$positive100"
|
|
935
986
|
}
|
|
936
987
|
) : null,
|
|
937
|
-
!!((_J = (_I = (_H = (_G = field == null ? void 0 : field.mappedFields) == null ? void 0 : _G.contactProperties) == null ? void 0 : _H.filter) == null ? void 0 : _I.call(
|
|
938
|
-
_H,
|
|
939
|
-
(property) => property.isEnabled
|
|
940
|
-
)) == null ? void 0 : _J.length) ? /* @__PURE__ */ React__default.createElement(
|
|
988
|
+
!!((_J = (_I = (_H = (_G = field == null ? void 0 : field.mappedFields) == null ? void 0 : _G.contactProperties) == null ? void 0 : _H.filter) == null ? void 0 : _I.call(_H, (property) => property.isEnabled)) == null ? void 0 : _J.length) ? /* @__PURE__ */ React__default.createElement(
|
|
941
989
|
SingleMappingChipWrapper,
|
|
942
990
|
{
|
|
943
991
|
heading: "Contacts",
|
|
944
|
-
fields: (_M = (_L = (_K = field == null ? void 0 : field.mappedFields) == null ? void 0 : _K.contactProperties) == null ? void 0 : _L.filter) == null ? void 0 : _M.call(
|
|
945
|
-
_L,
|
|
946
|
-
(property) => property.isEnabled
|
|
947
|
-
),
|
|
992
|
+
fields: (_M = (_L = (_K = field == null ? void 0 : field.mappedFields) == null ? void 0 : _K.contactProperties) == null ? void 0 : _L.filter) == null ? void 0 : _M.call(_L, (property) => property.isEnabled),
|
|
948
993
|
backgroundColor: "$negative100"
|
|
949
994
|
}
|
|
950
995
|
) : null,
|
|
951
|
-
!!((_Q = (_P = (_O = (_N = field == null ? void 0 : field.mappedFields) == null ? void 0 : _N.expressions) == null ? void 0 : _O.filter) == null ? void 0 : _P.call(
|
|
952
|
-
_O,
|
|
953
|
-
(expression) => expression.isEnabled
|
|
954
|
-
)) == null ? void 0 : _Q.length) ? /* @__PURE__ */ React__default.createElement(
|
|
996
|
+
!!((_Q = (_P = (_O = (_N = field == null ? void 0 : field.mappedFields) == null ? void 0 : _N.expressions) == null ? void 0 : _O.filter) == null ? void 0 : _P.call(_O, (expression) => expression.isEnabled)) == null ? void 0 : _Q.length) ? /* @__PURE__ */ React__default.createElement(
|
|
955
997
|
SingleMappingChipWrapper,
|
|
956
998
|
{
|
|
957
999
|
heading: "Expression",
|
|
958
1000
|
backgroundColor: "$neutral100",
|
|
959
|
-
fields: (_T = (_S = (_R = field == null ? void 0 : field.mappedFields) == null ? void 0 : _R.expressions) == null ? void 0 : _S.filter) == null ? void 0 : _T.call(
|
|
960
|
-
_S,
|
|
961
|
-
(expression) => expression.isEnabled
|
|
962
|
-
)
|
|
1001
|
+
fields: (_T = (_S = (_R = field == null ? void 0 : field.mappedFields) == null ? void 0 : _R.expressions) == null ? void 0 : _S.filter) == null ? void 0 : _T.call(_S, (expression) => expression.isEnabled)
|
|
963
1002
|
}
|
|
964
1003
|
) : null,
|
|
965
|
-
!!((_X = (_W = (_V = (_U = field == null ? void 0 : field.mappedFields) == null ? void 0 : _U.property) == null ? void 0 : _V.filter) == null ? void 0 : _W.call(
|
|
966
|
-
_V,
|
|
967
|
-
(property) => property.isEnabled
|
|
968
|
-
)) == null ? void 0 : _X.length) ? /* @__PURE__ */ React__default.createElement(
|
|
1004
|
+
!!((_X = (_W = (_V = (_U = field == null ? void 0 : field.mappedFields) == null ? void 0 : _U.property) == null ? void 0 : _V.filter) == null ? void 0 : _W.call(_V, (property) => property.isEnabled)) == null ? void 0 : _X.length) ? /* @__PURE__ */ React__default.createElement(
|
|
969
1005
|
SingleMappingChipWrapper,
|
|
970
1006
|
{
|
|
971
1007
|
heading: "Property",
|
|
972
1008
|
hideBorder: true,
|
|
973
|
-
fields: (__ = (_Z = (_Y = field == null ? void 0 : field.mappedFields) == null ? void 0 : _Y.property) == null ? void 0 : _Z.filter) == null ? void 0 : __.call(
|
|
974
|
-
_Z,
|
|
975
|
-
(property) => property.isEnabled
|
|
976
|
-
),
|
|
1009
|
+
fields: (__ = (_Z = (_Y = field == null ? void 0 : field.mappedFields) == null ? void 0 : _Y.property) == null ? void 0 : _Z.filter) == null ? void 0 : __.call(_Z, (property) => property.isEnabled),
|
|
977
1010
|
backgroundColor: "rgba(74, 156, 166, 0.15)"
|
|
978
1011
|
}
|
|
979
1012
|
) : null
|
|
@@ -1068,10 +1101,7 @@ const SingleMappingEventWrapper = ({
|
|
|
1068
1101
|
EventComponent,
|
|
1069
1102
|
{
|
|
1070
1103
|
heading: "Object:",
|
|
1071
|
-
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(
|
|
1072
|
-
/^./,
|
|
1073
|
-
(char) => char == null ? void 0 : char.toUpperCase()
|
|
1074
|
-
)
|
|
1104
|
+
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())
|
|
1075
1105
|
}
|
|
1076
1106
|
) : null, !!((_r = (_q = field == null ? void 0 : field.configurationFields) == null ? void 0 : _q.action) == null ? void 0 : _r.hasAction) ? /* @__PURE__ */ React__default.createElement(
|
|
1077
1107
|
EventComponent,
|
|
@@ -1116,7 +1146,10 @@ const SingleMappingChipWrapper = ({
|
|
|
1116
1146
|
css: {
|
|
1117
1147
|
columnGap: "$2",
|
|
1118
1148
|
rowGap: "$4",
|
|
1119
|
-
"& > * ": {
|
|
1149
|
+
"& > * ": {
|
|
1150
|
+
fontFamily: "'Roboto Mono', monospace !important",
|
|
1151
|
+
fontWeight: "$4 !important"
|
|
1152
|
+
}
|
|
1120
1153
|
}
|
|
1121
1154
|
},
|
|
1122
1155
|
modifiedFields.map((field) => {
|