@sparrowengg/integrations-templates-frontend 1.9.84-beta.10 → 1.9.84-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/integration-template/components/dashboard.js +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/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 +12 -4
- package/package.json +1 -1
|
@@ -63,7 +63,17 @@ const Dashboard = ({
|
|
|
63
63
|
alignItems: "center"
|
|
64
64
|
},
|
|
65
65
|
/* @__PURE__ */ React.createElement(flex.Flex, { flexDirection: "column", gap: "$2" }, /* @__PURE__ */ React.createElement(heading.Heading, { size: "h5" }, integrationName), /* @__PURE__ */ React.createElement(text.Text, { size: "sm", css: { color: "$neutral700" } }, dashboardDescription)),
|
|
66
|
-
/* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$4" }, hasMultiAccounts && /* @__PURE__ */ React.createElement(button.Button, { size: "lg", color: "default", leftIcon: /* @__PURE__ */ React.createElement(plus.PlusIcon, null) }, "Add Account"), hasDropdownComponents.mapping && !hasDropdownComponents.trigger ? /* @__PURE__ */ React.createElement(
|
|
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(
|
|
67
|
+
button.Button,
|
|
68
|
+
{
|
|
69
|
+
size: "lg",
|
|
70
|
+
color: "primary",
|
|
71
|
+
disabled: !mappingEnabled,
|
|
72
|
+
leftIcon: /* @__PURE__ */ React.createElement(plus.PlusIcon, null),
|
|
73
|
+
onClick: () => handleConfigurationType("MAPPING")
|
|
74
|
+
},
|
|
75
|
+
"New Mapping"
|
|
76
|
+
) : null, hasDropdownComponents.trigger && hasDropdownComponents.mapping ? /* @__PURE__ */ React.createElement(dropdown.DropdownMenu, null, /* @__PURE__ */ React.createElement(
|
|
67
77
|
tooltip.Tooltip,
|
|
68
78
|
{
|
|
69
79
|
content: !triggerEnabled && !mappingEnabled ? "You have reached the maximum limit for creating triggers/mappings" : ""
|
|
@@ -211,43 +221,45 @@ const MultiAccountDashboard = ({
|
|
|
211
221
|
deleteFieldHandler
|
|
212
222
|
}
|
|
213
223
|
);
|
|
214
|
-
})) : 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(
|
|
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
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
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(
|
|
225
|
+
(field) => {
|
|
226
|
+
var _a2, _b2, _c2, _d2, _e, _f, _g, _h, _i;
|
|
227
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, (mappingFields == null ? void 0 : mappingFields.type) === "MULTI_MAPPING" ? /* @__PURE__ */ React.createElement(
|
|
228
|
+
DashboardItem,
|
|
229
|
+
{
|
|
230
|
+
key: field.id,
|
|
231
|
+
isDraft: (_a2 = field == null ? void 0 : field.isDraft) != null ? _a2 : false,
|
|
232
|
+
onMappingEditHandler,
|
|
233
|
+
icon: /* @__PURE__ */ React.createElement(mapping.default, { size: 32, color: "#56B0BB" }),
|
|
234
|
+
heading: (_c2 = (_b2 = field.domain) != null ? _b2 : field.email) != null ? _c2 : "Field",
|
|
235
|
+
id: field.id,
|
|
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()}`)}`,
|
|
237
|
+
fields: field.fields,
|
|
238
|
+
isEnabled: field.isEnabled,
|
|
239
|
+
integrationName,
|
|
240
|
+
handleDashboardPage,
|
|
241
|
+
handleEditField,
|
|
242
|
+
type: "MAPPING",
|
|
243
|
+
toggleDashboardField,
|
|
244
|
+
deleteFieldHandler
|
|
245
|
+
}
|
|
246
|
+
) : /* @__PURE__ */ React.createElement(
|
|
247
|
+
SingleMappingDashboardItem,
|
|
248
|
+
{
|
|
249
|
+
key: field.id,
|
|
250
|
+
field,
|
|
251
|
+
integrationName,
|
|
252
|
+
syncMapping,
|
|
253
|
+
icon: /* @__PURE__ */ React.createElement(mapping.default, { size: 32, color: "#56B0BB" }),
|
|
254
|
+
handleEditField,
|
|
255
|
+
handleDashboardPage,
|
|
256
|
+
toggleDashboardField,
|
|
257
|
+
deleteFieldHandler,
|
|
258
|
+
onMappingEditHandler
|
|
259
|
+
}
|
|
260
|
+
));
|
|
261
|
+
}
|
|
262
|
+
)) : null)
|
|
251
263
|
), /* @__PURE__ */ React.createElement(
|
|
252
264
|
tabs.TabsContent,
|
|
253
265
|
{
|
|
@@ -289,43 +301,45 @@ const MultiAccountDashboard = ({
|
|
|
289
301
|
value: "MAPPING",
|
|
290
302
|
css: { paddingBlock: "$12", paddingInline: 0 }
|
|
291
303
|
},
|
|
292
|
-
!!((_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(
|
|
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
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
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(
|
|
305
|
+
(field) => {
|
|
306
|
+
var _a2, _b2, _c2, _d2, _e, _f, _g;
|
|
307
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, (mappingFields == null ? void 0 : mappingFields.type) === "MULTI_MAPPING" ? /* @__PURE__ */ React.createElement(
|
|
308
|
+
DashboardItem,
|
|
309
|
+
{
|
|
310
|
+
key: field.id,
|
|
311
|
+
isDraft: (_a2 = field == null ? void 0 : field.isDraft) != null ? _a2 : false,
|
|
312
|
+
onMappingEditHandler,
|
|
313
|
+
icon: /* @__PURE__ */ React.createElement(mapping.default, { size: 32, color: "#56B0BB" }),
|
|
314
|
+
heading: (field == null ? void 0 : field.mappingName) || "Mapping",
|
|
315
|
+
id: field.id,
|
|
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()}`)}`,
|
|
317
|
+
fields: field.fields,
|
|
318
|
+
isEnabled: field.isEnabled,
|
|
319
|
+
integrationName,
|
|
320
|
+
handleDashboardPage,
|
|
321
|
+
handleEditField,
|
|
322
|
+
type: "MAPPING",
|
|
323
|
+
toggleDashboardField,
|
|
324
|
+
deleteFieldHandler
|
|
325
|
+
}
|
|
326
|
+
) : /* @__PURE__ */ React.createElement(
|
|
327
|
+
SingleMappingDashboardItem,
|
|
328
|
+
{
|
|
329
|
+
key: field.id,
|
|
330
|
+
field,
|
|
331
|
+
integrationName,
|
|
332
|
+
syncMapping,
|
|
333
|
+
icon: /* @__PURE__ */ React.createElement(mapping.default, { size: 32, color: "#56B0BB" }),
|
|
334
|
+
handleEditField,
|
|
335
|
+
handleDashboardPage,
|
|
336
|
+
toggleDashboardField,
|
|
337
|
+
deleteFieldHandler,
|
|
338
|
+
onMappingEditHandler
|
|
339
|
+
}
|
|
340
|
+
));
|
|
341
|
+
}
|
|
342
|
+
))) : /* @__PURE__ */ React.createElement(
|
|
329
343
|
MultiAccountFallback,
|
|
330
344
|
{
|
|
331
345
|
title: "Mapping",
|
|
@@ -386,7 +400,7 @@ const SingleAccountDashboard = ({
|
|
|
386
400
|
toggleDashboardField,
|
|
387
401
|
deleteFieldHandler
|
|
388
402
|
}) => {
|
|
389
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
403
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
390
404
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, !!(triggerFields == null ? void 0 : triggerFields.length) ? /* @__PURE__ */ React.createElement(box.Box, { css: { marginTop: "$20" } }, triggerFields == null ? void 0 : triggerFields.map((field) => {
|
|
391
405
|
var _a2, _b2, _c2, _d2;
|
|
392
406
|
return /* @__PURE__ */ React.createElement(
|
|
@@ -405,28 +419,71 @@ const SingleAccountDashboard = ({
|
|
|
405
419
|
deleteFieldHandler
|
|
406
420
|
}
|
|
407
421
|
);
|
|
408
|
-
})) : null,
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
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(
|
|
423
|
+
(field) => {
|
|
424
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
425
|
+
if ((field == null ? void 0 : field.type) === "MULTI_MAPPING") {
|
|
426
|
+
return /* @__PURE__ */ React.createElement(
|
|
427
|
+
DashboardItem,
|
|
428
|
+
{
|
|
429
|
+
isDraft: (_a2 = field == null ? void 0 : field.isDraft) != null ? _a2 : false,
|
|
430
|
+
onMappingEditHandler,
|
|
431
|
+
icon: /* @__PURE__ */ React.createElement(mapping.default, { size: 32, color: "#56B0BB" }),
|
|
432
|
+
heading: (field == null ? void 0 : field.mappingName) || "Mapping",
|
|
433
|
+
id: field.id,
|
|
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()}`)}`,
|
|
435
|
+
fields: field.fields,
|
|
436
|
+
isEnabled: field.isEnabled,
|
|
437
|
+
integrationName,
|
|
438
|
+
handleDashboardPage,
|
|
439
|
+
handleEditField,
|
|
440
|
+
type: "MAPPING",
|
|
441
|
+
toggleDashboardField,
|
|
442
|
+
deleteFieldHandler
|
|
443
|
+
}
|
|
444
|
+
);
|
|
445
|
+
} else {
|
|
446
|
+
return /* @__PURE__ */ React.createElement(
|
|
447
|
+
SingleMappingDashboardItem,
|
|
448
|
+
{
|
|
449
|
+
onMappingEditHandler,
|
|
450
|
+
syncMapping,
|
|
451
|
+
field,
|
|
452
|
+
key: field == null ? void 0 : field.id,
|
|
453
|
+
integrationName,
|
|
454
|
+
icon: /* @__PURE__ */ React.createElement(mapping.default, { size: 32, color: "#56B0BB" }),
|
|
455
|
+
handleEditField,
|
|
456
|
+
handleDashboardPage,
|
|
457
|
+
toggleDashboardField,
|
|
458
|
+
deleteFieldHandler
|
|
459
|
+
}
|
|
460
|
+
);
|
|
427
461
|
}
|
|
428
|
-
|
|
429
|
-
|
|
462
|
+
}
|
|
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(
|
|
464
|
+
(field) => {
|
|
465
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
466
|
+
return /* @__PURE__ */ React.createElement(
|
|
467
|
+
DashboardItem,
|
|
468
|
+
{
|
|
469
|
+
isDraft: (_a2 = field == null ? void 0 : field.isDraft) != null ? _a2 : false,
|
|
470
|
+
onMappingEditHandler,
|
|
471
|
+
icon: /* @__PURE__ */ React.createElement(mapping.default, { size: 32, color: "#56B0BB" }),
|
|
472
|
+
heading: (field == null ? void 0 : field.mappingName) || "Mapping",
|
|
473
|
+
id: field.id,
|
|
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()}`)}`,
|
|
475
|
+
fields: field.fields,
|
|
476
|
+
isEnabled: field.isEnabled,
|
|
477
|
+
integrationName,
|
|
478
|
+
handleDashboardPage,
|
|
479
|
+
handleEditField,
|
|
480
|
+
type: "MAPPING",
|
|
481
|
+
toggleDashboardField,
|
|
482
|
+
deleteFieldHandler
|
|
483
|
+
}
|
|
484
|
+
);
|
|
485
|
+
}
|
|
486
|
+
)) : 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.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(
|
|
430
487
|
(field, index) => {
|
|
431
488
|
return /* @__PURE__ */ React.createElement(
|
|
432
489
|
SingleMappingDashboardItem,
|
|
@@ -444,7 +501,7 @@ const SingleAccountDashboard = ({
|
|
|
444
501
|
}
|
|
445
502
|
);
|
|
446
503
|
}
|
|
447
|
-
)) : null);
|
|
504
|
+
)) : null));
|
|
448
505
|
};
|
|
449
506
|
const TriggerDasboardItem = ({
|
|
450
507
|
isDraft,
|
|
@@ -646,10 +703,7 @@ const TriggerDasboardItem = ({
|
|
|
646
703
|
}
|
|
647
704
|
}
|
|
648
705
|
)) : null,
|
|
649
|
-
((_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(
|
|
650
|
-
_e,
|
|
651
|
-
(variable) => variable.isEnabled
|
|
652
|
-
)) == null ? void 0 : _g.length) ? /* @__PURE__ */ React.createElement(
|
|
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(
|
|
653
707
|
SingleMappingChipWrapper,
|
|
654
708
|
{
|
|
655
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",
|
|
@@ -795,26 +849,35 @@ const SingleMappingDashboardItem = ({
|
|
|
795
849
|
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
|
|
796
850
|
)) : null))
|
|
797
851
|
),
|
|
798
|
-
/* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$12" }, /* @__PURE__ */ React.createElement(tooltip.Tooltip, { content: "Sync", className: "dm-sans" }, /* @__PURE__ */ React.createElement(
|
|
799
|
-
|
|
800
|
-
height: "40px !important",
|
|
801
|
-
marginInlineEnd: "$3"
|
|
802
|
-
} }, /* @__PURE__ */ React.createElement(
|
|
803
|
-
flex.Flex,
|
|
852
|
+
/* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$12" }, /* @__PURE__ */ React.createElement(tooltip.Tooltip, { content: "Sync", className: "dm-sans" }, /* @__PURE__ */ React.createElement(
|
|
853
|
+
button.Button,
|
|
804
854
|
{
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
setIsSyncing(null);
|
|
813
|
-
}, 2e3);
|
|
855
|
+
variant: "ghost",
|
|
856
|
+
size: "lg",
|
|
857
|
+
color: "default",
|
|
858
|
+
css: {
|
|
859
|
+
width: "40px !important",
|
|
860
|
+
height: "40px !important",
|
|
861
|
+
marginInlineEnd: "$3"
|
|
814
862
|
}
|
|
815
863
|
},
|
|
816
|
-
/* @__PURE__ */ React.createElement(
|
|
817
|
-
|
|
864
|
+
/* @__PURE__ */ React.createElement(
|
|
865
|
+
flex.Flex,
|
|
866
|
+
{
|
|
867
|
+
className: `rotating-div ${isSyncing === field.id ? "rotate" : ""}`,
|
|
868
|
+
justifyContent: "center",
|
|
869
|
+
alignItems: "center",
|
|
870
|
+
onClick: async () => {
|
|
871
|
+
setIsSyncing(field.id);
|
|
872
|
+
setTimeout(async () => {
|
|
873
|
+
await (syncMapping == null ? void 0 : syncMapping(field.id));
|
|
874
|
+
setIsSyncing(null);
|
|
875
|
+
}, 2e3);
|
|
876
|
+
}
|
|
877
|
+
},
|
|
878
|
+
/* @__PURE__ */ React.createElement(sync.default, null)
|
|
879
|
+
)
|
|
880
|
+
)), (() => (field == null ? void 0 : field.isEnabled) !== null && (field == null ? void 0 : field.isEnabled) !== void 0)() ? /* @__PURE__ */ React.createElement(
|
|
818
881
|
box.Box,
|
|
819
882
|
{
|
|
820
883
|
css: {
|
|
@@ -896,17 +959,11 @@ const SingleMappingDashboardItem = ({
|
|
|
896
959
|
}
|
|
897
960
|
},
|
|
898
961
|
/* @__PURE__ */ React.createElement(SingleMappingEventWrapper, { field }),
|
|
899
|
-
!!((_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(
|
|
900
|
-
_m,
|
|
901
|
-
(question) => question.isEnabled
|
|
902
|
-
)) == null ? void 0 : _o.length) ? /* @__PURE__ */ React.createElement(
|
|
962
|
+
!!((_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.createElement(
|
|
903
963
|
SingleMappingChipWrapper,
|
|
904
964
|
{
|
|
905
965
|
heading: "Questions",
|
|
906
|
-
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(
|
|
907
|
-
_q,
|
|
908
|
-
(question) => question.isEnabled
|
|
909
|
-
),
|
|
966
|
+
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),
|
|
910
967
|
backgroundColor: "#E5F2FF"
|
|
911
968
|
}
|
|
912
969
|
) : null,
|
|
@@ -924,60 +981,36 @@ const SingleMappingDashboardItem = ({
|
|
|
924
981
|
backgroundColor: "#E5F2FF"
|
|
925
982
|
}
|
|
926
983
|
) : null,
|
|
927
|
-
!!((_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(
|
|
928
|
-
_A,
|
|
929
|
-
(variable) => variable.isEnabled
|
|
930
|
-
)) == null ? void 0 : _C.length) ? /* @__PURE__ */ React.createElement(
|
|
984
|
+
!!((_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.createElement(
|
|
931
985
|
SingleMappingChipWrapper,
|
|
932
986
|
{
|
|
933
987
|
heading: "Variables",
|
|
934
|
-
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(
|
|
935
|
-
_E,
|
|
936
|
-
(variable) => variable.isEnabled
|
|
937
|
-
),
|
|
988
|
+
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),
|
|
938
989
|
backgroundColor: "$positive100"
|
|
939
990
|
}
|
|
940
991
|
) : null,
|
|
941
|
-
!!((_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(
|
|
942
|
-
_H,
|
|
943
|
-
(property) => property.isEnabled
|
|
944
|
-
)) == null ? void 0 : _J.length) ? /* @__PURE__ */ React.createElement(
|
|
992
|
+
!!((_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.createElement(
|
|
945
993
|
SingleMappingChipWrapper,
|
|
946
994
|
{
|
|
947
995
|
heading: "Contacts",
|
|
948
|
-
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(
|
|
949
|
-
_L,
|
|
950
|
-
(property) => property.isEnabled
|
|
951
|
-
),
|
|
996
|
+
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),
|
|
952
997
|
backgroundColor: "$negative100"
|
|
953
998
|
}
|
|
954
999
|
) : null,
|
|
955
|
-
!!((_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(
|
|
956
|
-
_O,
|
|
957
|
-
(expression) => expression.isEnabled
|
|
958
|
-
)) == null ? void 0 : _Q.length) ? /* @__PURE__ */ React.createElement(
|
|
1000
|
+
!!((_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.createElement(
|
|
959
1001
|
SingleMappingChipWrapper,
|
|
960
1002
|
{
|
|
961
1003
|
heading: "Expression",
|
|
962
1004
|
backgroundColor: "$neutral100",
|
|
963
|
-
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(
|
|
964
|
-
_S,
|
|
965
|
-
(expression) => expression.isEnabled
|
|
966
|
-
)
|
|
1005
|
+
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)
|
|
967
1006
|
}
|
|
968
1007
|
) : null,
|
|
969
|
-
!!((_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(
|
|
970
|
-
_V,
|
|
971
|
-
(property) => property.isEnabled
|
|
972
|
-
)) == null ? void 0 : _X.length) ? /* @__PURE__ */ React.createElement(
|
|
1008
|
+
!!((_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.createElement(
|
|
973
1009
|
SingleMappingChipWrapper,
|
|
974
1010
|
{
|
|
975
1011
|
heading: "Property",
|
|
976
1012
|
hideBorder: true,
|
|
977
|
-
fields: (__ = (_Z = (_Y = field == null ? void 0 : field.mappedFields) == null ? void 0 : _Y.property) == null ? void 0 : _Z.filter) == null ? void 0 : __.call(
|
|
978
|
-
_Z,
|
|
979
|
-
(property) => property.isEnabled
|
|
980
|
-
),
|
|
1013
|
+
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),
|
|
981
1014
|
backgroundColor: "rgba(74, 156, 166, 0.15)"
|
|
982
1015
|
}
|
|
983
1016
|
) : null
|
|
@@ -1072,10 +1105,7 @@ const SingleMappingEventWrapper = ({
|
|
|
1072
1105
|
EventComponent,
|
|
1073
1106
|
{
|
|
1074
1107
|
heading: "Object:",
|
|
1075
|
-
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(
|
|
1076
|
-
/^./,
|
|
1077
|
-
(char) => char == null ? void 0 : char.toUpperCase()
|
|
1078
|
-
)
|
|
1108
|
+
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())
|
|
1079
1109
|
}
|
|
1080
1110
|
) : null, !!((_r = (_q = field == null ? void 0 : field.configurationFields) == null ? void 0 : _q.action) == null ? void 0 : _r.hasAction) ? /* @__PURE__ */ React.createElement(
|
|
1081
1111
|
EventComponent,
|
|
@@ -1120,7 +1150,10 @@ const SingleMappingChipWrapper = ({
|
|
|
1120
1150
|
css: {
|
|
1121
1151
|
columnGap: "$2",
|
|
1122
1152
|
rowGap: "$4",
|
|
1123
|
-
"& > * ": {
|
|
1153
|
+
"& > * ": {
|
|
1154
|
+
fontFamily: "'Roboto Mono', monospace !important",
|
|
1155
|
+
fontWeight: "$4 !important"
|
|
1156
|
+
}
|
|
1124
1157
|
}
|
|
1125
1158
|
},
|
|
1126
1159
|
modifiedFields.map((field) => {
|