@sparrowengg/integrations-templates-frontend 1.9.66 → 1.9.68

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.
@@ -11,12 +11,11 @@ import { IconButton } from '../node_modules/@sparrowengg/twigs-react/dist/es/but
11
11
  import { ArrowLeftIcon } from '../node_modules/@sparrowengg/twigs-react-icons/dist/es/icons/arrow-left.js';
12
12
  import { Heading } from '../node_modules/@sparrowengg/twigs-react/dist/es/heading/heading.js';
13
13
  import { Button } from '../node_modules/@sparrowengg/twigs-react/dist/es/button/button.js';
14
- import { ChevronRightIcon } from '../node_modules/@sparrowengg/twigs-react-icons/dist/es/icons/chevron-right.js';
15
14
  import { Text } from '../node_modules/@sparrowengg/twigs-react/dist/es/text/text.js';
15
+ import { Tooltip } from '../node_modules/@sparrowengg/twigs-react/dist/es/tooltip/tooltip.js';
16
16
  import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent } from '../node_modules/@sparrowengg/twigs-react/dist/es/dropdown/dropdown.js';
17
17
  import { Input } from '../node_modules/@sparrowengg/twigs-react/dist/es/input/input.js';
18
18
  import { ChevronDownIcon } from '../node_modules/@sparrowengg/twigs-react-icons/dist/es/icons/chevron-down.js';
19
- import { Tooltip } from '../node_modules/@sparrowengg/twigs-react/dist/es/tooltip/tooltip.js';
20
19
  import { Calendar } from '../node_modules/@sparrowengg/twigs-react/dist/es/calendar/calendar.js';
21
20
  import { RadioGroup, Radio } from '../node_modules/@sparrowengg/twigs-react/dist/es/radio/radio.js';
22
21
  import { FormLabel } from '../node_modules/@sparrowengg/twigs-react/dist/es/form-label/form-label.js';
@@ -56,7 +55,7 @@ const SingleMapping = ({
56
55
  apiURL = surveySparrowURL,
57
56
  surveyDetails,
58
57
  importResponse,
59
- hasPreviousMapping,
58
+ hasExistingMapping,
60
59
  onSaveHandler,
61
60
  editField,
62
61
  previousMappingHandler
@@ -68,13 +67,9 @@ const SingleMapping = ({
68
67
  expressions: [],
69
68
  property: []
70
69
  });
71
- const [previousMapping, setPreviousMapping] = useState(
72
- hasPreviousMapping != null ? hasPreviousMapping : false
73
- );
74
70
  useEffect(() => {
75
71
  if (!!(editField == null ? void 0 : editField.id)) {
76
72
  navigateMappingPage(true);
77
- setPreviousMapping(true);
78
73
  }
79
74
  }, []);
80
75
  return /* @__PURE__ */ React__default.createElement(
@@ -98,7 +93,7 @@ const SingleMapping = ({
98
93
  configuration.onSaveHandler();
99
94
  },
100
95
  isMappingPage,
101
- hasPreviousMapping: previousMapping,
96
+ hasExistingMapping,
102
97
  navigateConfigPage: () => navigateMappingPage(false),
103
98
  previousMappingHandler,
104
99
  onSaveHandler: () => {
@@ -145,7 +140,7 @@ const SingleMapping = ({
145
140
  const MappingHeader = ({
146
141
  editField,
147
142
  importResponse,
148
- hasPreviousMapping,
143
+ hasExistingMapping,
149
144
  ssMappingData,
150
145
  isMappingPage,
151
146
  navigateConfigPage,
@@ -172,6 +167,15 @@ const MappingHeader = ({
172
167
  }
173
168
  }
174
169
  };
170
+ const isMappingPageDisabled = () => {
171
+ var _a, _b, _c, _d;
172
+ const isAllFieldsDisabled = (_a = Object.values((configuration == null ? void 0 : configuration.configurationFields) || {})) == null ? void 0 : _a.some((field) => (field == null ? void 0 : field.value) === null || (field == null ? void 0 : field.value) === void 0);
173
+ if ((_c = (_b = configuration == null ? void 0 : configuration.configurationFields) == null ? void 0 : _b.find((field) => (field == null ? void 0 : field.id) === "responseImportSettings")) == null ? void 0 : _c.value) {
174
+ return isAllFieldsDisabled || !((_d = configuration == null ? void 0 : configuration.configuredFields) == null ? void 0 : _d.responseImportType);
175
+ } else {
176
+ return isAllFieldsDisabled;
177
+ }
178
+ };
175
179
  return /* @__PURE__ */ React__default.createElement(
176
180
  Flex,
177
181
  {
@@ -187,7 +191,7 @@ const MappingHeader = ({
187
191
  {
188
192
  gap: "$6",
189
193
  alignItems: "center",
190
- css: { visibility: hasPreviousMapping ? "visible" : "hidden" }
194
+ css: { visibility: hasExistingMapping ? "visible" : "hidden" }
191
195
  },
192
196
  /* @__PURE__ */ React__default.createElement(
193
197
  IconButton,
@@ -224,15 +228,25 @@ const MappingHeader = ({
224
228
  /* @__PURE__ */ React__default.createElement(
225
229
  Button,
226
230
  {
227
- css: { color: isMappingPage ? "$neutral900" : "$neutral800" },
231
+ disabled: isMappingPageDisabled(),
232
+ css: { color: isMappingPage ? "$neutral900" : "$neutral800", cursor: isMappingPageDisabled() ? "not-allowed" : "pointer" },
228
233
  color: "default",
229
234
  variant: "ghost",
235
+ onClick: () => {
236
+ if (isMappingPage) {
237
+ onSaveHandler();
238
+ } else {
239
+ saveConfiguration();
240
+ }
241
+ },
230
242
  size: "md"
231
243
  },
232
244
  "Mapping"
233
245
  )
234
246
  ),
235
- /* @__PURE__ */ React__default.createElement(
247
+ /* @__PURE__ */ React__default.createElement(Flex, { justifyContent: "center", css: {
248
+ width: "180px"
249
+ } }, /* @__PURE__ */ React__default.createElement(
236
250
  Button,
237
251
  {
238
252
  size: "lg",
@@ -243,11 +257,10 @@ const MappingHeader = ({
243
257
  } else {
244
258
  saveConfiguration();
245
259
  }
246
- },
247
- rightIcon: /* @__PURE__ */ React__default.createElement(ChevronRightIcon, null)
260
+ }
248
261
  },
249
262
  isMappingPage ? (editField == null ? void 0 : editField.id) ? "Update Mapping" : "Save Mapping" : "Continue, Mapping"
250
- )
263
+ ))
251
264
  );
252
265
  };
253
266
  const ConfigurationSetup = ({
@@ -255,7 +268,19 @@ const ConfigurationSetup = ({
255
268
  surveyName
256
269
  }) => {
257
270
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
258
- return /* @__PURE__ */ React__default.createElement(Box, { css: { maxWidth: 488, width: "100%" } }, /* @__PURE__ */ React__default.createElement(Heading, { size: "h5" }, "Event Details"), /* @__PURE__ */ React__default.createElement(Flex, { gap: "$2", css: { marginTop: "$4" } }, /* @__PURE__ */ React__default.createElement(Text, { size: "sm", css: { color: "$neutral500" } }, "Survey Name:"), /* @__PURE__ */ React__default.createElement(Text, { size: "sm", weight: "medium", css: { color: "$neutral800" } }, surveyName)), /* @__PURE__ */ React__default.createElement(
271
+ return /* @__PURE__ */ React__default.createElement(Box, { css: { maxWidth: 488, width: "100%" } }, /* @__PURE__ */ React__default.createElement(Heading, { size: "h5" }, "Event Details"), /* @__PURE__ */ React__default.createElement(Flex, { gap: "$2", css: { marginTop: "$4" } }, /* @__PURE__ */ React__default.createElement(Text, { size: "sm", css: { color: "$neutral500" } }, "Survey Name:"), /* @__PURE__ */ React__default.createElement(Tooltip, { content: (surveyName == null ? void 0 : surveyName.length) > 30 ? surveyName : "", css: {
272
+ zIndex: "9999999 !important",
273
+ fontFamily: "DM Sans !important"
274
+ } }, /* @__PURE__ */ React__default.createElement(Box, null, /* @__PURE__ */ React__default.createElement(
275
+ Text,
276
+ {
277
+ size: "sm",
278
+ weight: "medium",
279
+ truncate: true,
280
+ css: { color: "$neutral800", maxWidth: "270px" }
281
+ },
282
+ surveyName
283
+ )))), /* @__PURE__ */ React__default.createElement(
259
284
  Flex,
260
285
  {
261
286
  flexDirection: "column",
@@ -268,11 +293,49 @@ const ConfigurationSetup = ({
268
293
  }
269
294
  },
270
295
  (_a = configuration.configurationFields) == null ? void 0 : _a.map((field) => {
271
- return /* @__PURE__ */ React__default.createElement(Configuration, { field, configuredFields: configuration.configuredFields });
296
+ return /* @__PURE__ */ React__default.createElement(
297
+ Configuration,
298
+ {
299
+ field,
300
+ configuredFields: configuration.configuredFields
301
+ }
302
+ );
272
303
  }),
273
- configuration.importOptions.showImportOptions && /* @__PURE__ */ React__default.createElement(Flex, { gap: "$2", flexDirection: "column", css: { marginBlock: "$8" } }, /* @__PURE__ */ React__default.createElement(CustomDropdown, { data: configuration.importOptions.options, value: (_c = (_b = configuration == null ? void 0 : configuration.configuredFields) == null ? void 0 : _b.responseImportType) == null ? void 0 : _c.value, onChangeHandler: configuration.importOptions.onChangeHandler })),
274
- ((_f = (_e = (_d = configuration.configuredFields) == null ? void 0 : _d.responseImportType) == null ? void 0 : _e.value) == null ? void 0 : _f.type) === "date" && /* @__PURE__ */ React__default.createElement(Text, { size: "sm", weight: "regular", css: { color: "$neutral500" } }, `Existing responses from ${(_i = (_h = (_g = configuration.configuredFields) == null ? void 0 : _g.responseImportType) == null ? void 0 : _h.value) == null ? void 0 : _i.value} will be imported`),
275
- configuration.importOptions.excludeResponse && ((_l = (_k = (_j = configuration.configuredFields) == null ? void 0 : _j.responseImportType) == null ? void 0 : _k.value) == null ? void 0 : _l.type) === "dateRange" && /* @__PURE__ */ React__default.createElement(Configuration, { field: configuration.importOptions.excludeResponse, configuredFields: configuration.configuredFields, responseImportType: (_p = (_o = (_n = (_m = configuration.configuredFields) == null ? void 0 : _m.responseImportType) == null ? void 0 : _n.value) == null ? void 0 : _o.value) == null ? void 0 : _p.label })
304
+ configuration.importOptions.showImportOptions && /* @__PURE__ */ React__default.createElement(
305
+ Flex,
306
+ {
307
+ gap: "$2",
308
+ flexDirection: "column",
309
+ css: {
310
+ marginTop: "-4px !important"
311
+ }
312
+ },
313
+ /* @__PURE__ */ React__default.createElement(
314
+ CustomDropdown,
315
+ {
316
+ data: configuration.importOptions.options,
317
+ value: (_c = (_b = configuration == null ? void 0 : configuration.configuredFields) == null ? void 0 : _b.responseImportType) == null ? void 0 : _c.value,
318
+ onChangeHandler: configuration.importOptions.onChangeHandler
319
+ }
320
+ )
321
+ ),
322
+ ((_f = (_e = (_d = configuration.configuredFields) == null ? void 0 : _d.responseImportType) == null ? void 0 : _e.value) == null ? void 0 : _f.type) === "date" && /* @__PURE__ */ React__default.createElement(
323
+ Text,
324
+ {
325
+ size: "sm",
326
+ weight: "regular",
327
+ css: { color: "$neutral600", marginTop: "-$6" }
328
+ },
329
+ `Existing responses from ${(_i = (_h = (_g = configuration.configuredFields) == null ? void 0 : _g.responseImportType) == null ? void 0 : _h.value) == null ? void 0 : _i.value} will be imported`
330
+ ),
331
+ configuration.importOptions.excludeResponse && ((_l = (_k = (_j = configuration.configuredFields) == null ? void 0 : _j.responseImportType) == null ? void 0 : _k.value) == null ? void 0 : _l.type) === "dateRange" && /* @__PURE__ */ React__default.createElement(
332
+ Configuration,
333
+ {
334
+ field: configuration.importOptions.excludeResponse,
335
+ configuredFields: configuration.configuredFields,
336
+ responseImportType: (_p = (_o = (_n = (_m = configuration.configuredFields) == null ? void 0 : _m.responseImportType) == null ? void 0 : _n.value) == null ? void 0 : _o.value) == null ? void 0 : _p.label
337
+ }
338
+ )
276
339
  ));
277
340
  };
278
341
  const CustomDropdown = ({ data, onChangeHandler, value }) => {
@@ -320,7 +383,8 @@ const CustomDropdown = ({ data, onChangeHandler, value }) => {
320
383
  {
321
384
  content: option.tooltip || "",
322
385
  css: {
323
- zIndex: "9999999 !important"
386
+ zIndex: "9999999 !important",
387
+ fontFamily: "DM Sans !important"
324
388
  }
325
389
  },
326
390
  /* @__PURE__ */ React__default.createElement(Box, null, /* @__PURE__ */ React__default.createElement(
@@ -328,7 +392,8 @@ const CustomDropdown = ({ data, onChangeHandler, value }) => {
328
392
  {
329
393
  disabled: option == null ? void 0 : option.disabled,
330
394
  css: {
331
- cursor: (option == null ? void 0 : option.disabled) ? "not-allowed !important" : "pointer !important"
395
+ cursor: (option == null ? void 0 : option.disabled) ? "not-allowed !important" : "pointer !important",
396
+ background: (value == null ? void 0 : value.type) === option.type ? "#4A9CA626 !important" : "transparent !important"
332
397
  },
333
398
  onClick: () => onChangeHandler({
334
399
  id: "responseImportType",
@@ -348,8 +413,7 @@ const CustomDropdown = ({ data, onChangeHandler, value }) => {
348
413
  Flex,
349
414
  {
350
415
  justifyContent: "center",
351
- flexDirection: "column",
352
- gap: "$2"
416
+ flexDirection: "column"
353
417
  },
354
418
  /* @__PURE__ */ React__default.createElement(
355
419
  Text,
@@ -363,9 +427,9 @@ const CustomDropdown = ({ data, onChangeHandler, value }) => {
363
427
  /* @__PURE__ */ React__default.createElement(
364
428
  Text,
365
429
  {
366
- size: "sm",
367
- weight: "medium",
368
- css: { color: "$neutral500" }
430
+ size: "xs",
431
+ weight: "regular",
432
+ css: { color: "$neutral700" }
369
433
  },
370
434
  option.description
371
435
  )
@@ -379,10 +443,11 @@ const CustomDropdown = ({ data, onChangeHandler, value }) => {
379
443
  {
380
444
  content: option.tooltip || "",
381
445
  css: {
446
+ fontFamily: "DM Sans !important",
382
447
  zIndex: "9999999 !important"
383
448
  }
384
449
  },
385
- /* @__PURE__ */ React__default.createElement(Box, null, /* @__PURE__ */ React__default.createElement(DropdownMenuSub, null, /* @__PURE__ */ React__default.createElement(DropdownMenuSubTrigger, { disabled: option == null ? void 0 : option.disabled, css: { cursor: (option == null ? void 0 : option.disabled) ? "not-allowed !important" : "pointer !important" } }, " ", /* @__PURE__ */ React__default.createElement(
450
+ /* @__PURE__ */ React__default.createElement(Box, null, /* @__PURE__ */ React__default.createElement(DropdownMenuSub, null, /* @__PURE__ */ React__default.createElement(DropdownMenuSubTrigger, { disabled: option == null ? void 0 : option.disabled, css: { cursor: (option == null ? void 0 : option.disabled) ? "not-allowed !important" : "pointer !important", background: (value == null ? void 0 : value.type) === option.type ? "#4A9CA626 !important" : "transparent !important" } }, " ", /* @__PURE__ */ React__default.createElement(
386
451
  Flex,
387
452
  {
388
453
  justifyContent: "space-between",
@@ -396,8 +461,7 @@ const CustomDropdown = ({ data, onChangeHandler, value }) => {
396
461
  {
397
462
  css: { cursor: "pointer" },
398
463
  justifyContent: "center",
399
- flexDirection: "column",
400
- gap: "$2"
464
+ flexDirection: "column"
401
465
  },
402
466
  /* @__PURE__ */ React__default.createElement(
403
467
  Text,
@@ -411,9 +475,9 @@ const CustomDropdown = ({ data, onChangeHandler, value }) => {
411
475
  /* @__PURE__ */ React__default.createElement(
412
476
  Text,
413
477
  {
414
- size: "sm",
415
- weight: "medium",
416
- css: { color: "$neutral500" }
478
+ size: "xs",
479
+ weight: "regular",
480
+ css: { color: "$neutral700" }
417
481
  },
418
482
  option.description
419
483
  )
@@ -503,7 +567,7 @@ const CustomDropdown = ({ data, onChangeHandler, value }) => {
503
567
  ));
504
568
  };
505
569
  const Configuration = ({ field, configuredFields, responseImportType = null }) => {
506
- var _a, _b;
570
+ var _a, _b, _c, _d;
507
571
  let fieldValue = null;
508
572
  fieldValue = (_b = (_a = configuredFields == null ? void 0 : configuredFields[field.id]) == null ? void 0 : _a.value) != null ? _b : null;
509
573
  const [error, setError] = useState({
@@ -513,8 +577,10 @@ const Configuration = ({ field, configuredFields, responseImportType = null }) =
513
577
  });
514
578
  switch (field.fieldType) {
515
579
  case "switch":
516
- return /* @__PURE__ */ React__default.createElement(Flex, { gap: "$2", alignItems: "center", css: {
517
- marginBlockStart: "$12"
580
+ return /* @__PURE__ */ React__default.createElement(Flex, { gap: "$4", alignItems: "center", css: {
581
+ marginBlockStart: "$12",
582
+ borderTop: "$borderWidths$xs solid $neutral200",
583
+ paddingTop: "$16"
518
584
  } }, /* @__PURE__ */ React__default.createElement(
519
585
  Switch,
520
586
  {
@@ -526,58 +592,152 @@ const Configuration = ({ field, configuredFields, responseImportType = null }) =
526
592
  value
527
593
  })
528
594
  }
529
- ), /* @__PURE__ */ React__default.createElement(Text, { size: "sm", weight: "regular", css: { color: "$neutral900" } }, field.label));
595
+ ), /* @__PURE__ */ React__default.createElement(Text, { size: "md", weight: "regular", css: { color: "$neutral900" } }, field.label));
530
596
  case "checkbox":
531
597
  return /* @__PURE__ */ React__default.createElement(Flex, { flexDirection: "column", alignItems: "start", gap: "$4" }, /* @__PURE__ */ React__default.createElement(Flex, { gap: "$4", alignItems: "center" }, /* @__PURE__ */ React__default.createElement(Checkbox, { disabled: field == null ? void 0 : field.disabled, checked: !!fieldValue, onChange: (value) => field.onChangeHandler({
532
598
  id: field.id,
533
599
  value
534
600
  }) }), /* @__PURE__ */ React__default.createElement(Text, { size: "sm", weight: "regular", css: { color: "$neutral900" } }, field.label)), /* @__PURE__ */ React__default.createElement(Text, { size: "sm", weight: "regular", css: { color: "$neutral500" } }, field.value ? field.ifChecked() : field.ifUnchecked(responseImportType)));
535
601
  case "input":
536
- return /* @__PURE__ */ React__default.createElement(
537
- FormInput,
538
- __spreadProps(__spreadValues(__spreadProps(__spreadValues({
539
- disabled: field == null ? void 0 : field.disabled
540
- }, error.id === field.id && {
541
- error: error.errorMessage,
542
- errorBorder: error.error
543
- }), {
544
- label: field.label,
545
- value: typeof fieldValue === "object" ? "" : fieldValue || "",
546
- size: "lg"
547
- }), field.pattern && {
548
- pattern: field.pattern
549
- }), {
550
- onChange: (event) => {
551
- if (field == null ? void 0 : field.pattern) {
552
- const pattern = new RegExp(field.pattern);
553
- if (!pattern.test(event.currentTarget.value) && event.currentTarget.value !== "") {
554
- setError({
555
- errorMessage: field.errorMessage,
556
- error: true,
557
- id: field.id
602
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, (field == null ? void 0 : field.id) === "spreadsheet" ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, ((_c = configuredFields == null ? void 0 : configuredFields.action) == null ? void 0 : _c.value) ? /* @__PURE__ */ React__default.createElement(
603
+ Box,
604
+ {
605
+ className: "dm-sans",
606
+ css: {
607
+ label: {
608
+ fontSize: "$xs !important"
609
+ }
610
+ }
611
+ },
612
+ /* @__PURE__ */ React__default.createElement(
613
+ FormInput,
614
+ __spreadProps(__spreadValues(__spreadProps(__spreadValues({
615
+ disabled: field == null ? void 0 : field.disabled
616
+ }, error.id === field.id && {
617
+ error: error.errorMessage,
618
+ errorBorder: error.error
619
+ }), {
620
+ label: field.label,
621
+ value: typeof fieldValue === "object" ? "" : fieldValue || "",
622
+ size: "lg"
623
+ }), field.pattern && {
624
+ pattern: field.pattern
625
+ }), {
626
+ onChange: (event) => {
627
+ if (field == null ? void 0 : field.pattern) {
628
+ const pattern = new RegExp(field.pattern);
629
+ if (!pattern.test(event.currentTarget.value) && event.currentTarget.value !== "") {
630
+ setError({
631
+ errorMessage: field.errorMessage,
632
+ error: true,
633
+ id: field.id
634
+ });
635
+ } else {
636
+ setError({
637
+ errorMessage: "",
638
+ error: false,
639
+ id: null
640
+ });
641
+ }
642
+ field.onChangeHandler({
643
+ id: field.id,
644
+ value: event.currentTarget.value
558
645
  });
559
646
  } else {
560
- setError({
561
- errorMessage: "",
562
- error: false,
563
- id: null
647
+ field.onChangeHandler({
648
+ id: field.id,
649
+ value: event.currentTarget.value
564
650
  });
565
651
  }
566
- field.onChangeHandler({
567
- id: field.id,
568
- value: event.currentTarget.value
569
- });
570
- } else {
571
- field.onChangeHandler({
572
- id: field.id,
573
- value: event.currentTarget.value
574
- });
652
+ }
653
+ })
654
+ )
655
+ ) : null) : /* @__PURE__ */ React__default.createElement(
656
+ Box,
657
+ {
658
+ className: "dm-sans",
659
+ css: {
660
+ label: {
661
+ fontSize: "$xs !important"
575
662
  }
576
663
  }
577
- })
578
- );
664
+ },
665
+ /* @__PURE__ */ React__default.createElement(
666
+ FormInput,
667
+ __spreadProps(__spreadValues(__spreadProps(__spreadValues({
668
+ disabled: field == null ? void 0 : field.disabled
669
+ }, error.id === field.id && {
670
+ error: error.errorMessage,
671
+ errorBorder: error.error
672
+ }), {
673
+ label: field.label,
674
+ value: typeof fieldValue === "object" ? "" : fieldValue || "",
675
+ size: "lg"
676
+ }), field.pattern && {
677
+ pattern: field.pattern
678
+ }), {
679
+ onChange: (event) => {
680
+ if (field == null ? void 0 : field.pattern) {
681
+ const pattern = new RegExp(field.pattern);
682
+ if (!pattern.test(event.currentTarget.value) && event.currentTarget.value !== "") {
683
+ setError({
684
+ errorMessage: field.errorMessage,
685
+ error: true,
686
+ id: field.id
687
+ });
688
+ } else {
689
+ setError({
690
+ errorMessage: "",
691
+ error: false,
692
+ id: null
693
+ });
694
+ }
695
+ field.onChangeHandler({
696
+ id: field.id,
697
+ value: event.currentTarget.value
698
+ });
699
+ } else {
700
+ field.onChangeHandler({
701
+ id: field.id,
702
+ value: event.currentTarget.value
703
+ });
704
+ }
705
+ }
706
+ })
707
+ )
708
+ ));
579
709
  default:
580
- return /* @__PURE__ */ React__default.createElement(Flex, { gap: "$2", flexDirection: "column" }, /* @__PURE__ */ React__default.createElement(FormLabel, { size: "sm", css: { fontWeight: "$5" } }, field.label), /* @__PURE__ */ React__default.createElement(CustomAddNewSelect, { field }));
710
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, field.id === "spreadsheet" ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, ((_d = configuredFields == null ? void 0 : configuredFields.action) == null ? void 0 : _d.value) ? /* @__PURE__ */ React__default.createElement(
711
+ Flex,
712
+ {
713
+ gap: "$2",
714
+ flexDirection: "column",
715
+ css: {
716
+ cursor: "pointer !important",
717
+ ".twigs-select__indicator": {
718
+ width: "14px !important",
719
+ color: "#848484 !important"
720
+ }
721
+ }
722
+ },
723
+ /* @__PURE__ */ React__default.createElement(FormLabel, { size: "xs", css: { fontWeight: "$5" } }, field.label),
724
+ /* @__PURE__ */ React__default.createElement(CustomAddNewSelect, { field })
725
+ ) : null) : /* @__PURE__ */ React__default.createElement(
726
+ Flex,
727
+ {
728
+ gap: "$2",
729
+ flexDirection: "column",
730
+ css: {
731
+ cursor: "pointer !important",
732
+ ".twigs-select__indicator": {
733
+ width: "14px !important",
734
+ color: "#848484 !important"
735
+ }
736
+ }
737
+ },
738
+ /* @__PURE__ */ React__default.createElement(FormLabel, { size: "xs", css: { fontWeight: "$5" } }, field.label),
739
+ /* @__PURE__ */ React__default.createElement(CustomAddNewSelect, { field })
740
+ ));
581
741
  }
582
742
  };
583
743
  const CustomAddNewSelect = ({ field }) => {
@@ -587,6 +747,9 @@ const CustomAddNewSelect = ({ field }) => {
587
747
  isDisabled: field == null ? void 0 : field.disabled,
588
748
  placeholder: "",
589
749
  size: "lg",
750
+ css: {
751
+ cursor: "pointer"
752
+ },
590
753
  components: {
591
754
  Option: CustomShareOption,
592
755
  SingleValue: CustomSingleValue
@@ -594,7 +757,8 @@ const CustomAddNewSelect = ({ field }) => {
594
757
  styles: {
595
758
  singleValue: (provided, state) => __spreadProps(__spreadValues({}, provided), {
596
759
  display: "flex",
597
- alignItems: "center"
760
+ alignItems: "center",
761
+ cursor: "pointer"
598
762
  })
599
763
  },
600
764
  value: field.value,
@@ -612,19 +776,15 @@ const CustomAddNewSelect = ({ field }) => {
612
776
  const CustomShareOption = (props) => {
613
777
  if (props.data.value === "ADD_NEW") {
614
778
  return /* @__PURE__ */ React__default.createElement(Tooltip, { content: props.data.tooltip || "", css: {
615
- zIndex: 999999999
616
- } }, /* @__PURE__ */ React__default.createElement(Box, null, /* @__PURE__ */ React__default.createElement(components.Option, __spreadValues({}, props), /* @__PURE__ */ React__default.createElement(Flex, { justifyContent: "center", alignItems: "center" }, /* @__PURE__ */ React__default.createElement(
617
- Button,
618
- {
619
- size: "sm",
620
- variant: "ghost",
621
- color: "primary",
622
- leftIcon: /* @__PURE__ */ React__default.createElement(PlusIcon, { size: 16 })
623
- },
624
- "Add New"
625
- )))));
779
+ zIndex: 999999999,
780
+ fontFamily: "DM Sans !important"
781
+ } }, /* @__PURE__ */ React__default.createElement(Box, null, /* @__PURE__ */ React__default.createElement(components.Option, __spreadValues({}, props), /* @__PURE__ */ React__default.createElement(Flex, { justifyContent: "center", alignItems: "center", css: { cursor: "pointer", zIndex: 999999999 } }, /* @__PURE__ */ React__default.createElement(Flex, { gap: "$2", alignItems: "center", css: {
782
+ color: "$primary500",
783
+ fontSize: "$sm",
784
+ fontWeight: "$7"
785
+ } }, /* @__PURE__ */ React__default.createElement(PlusIcon, { size: 16, color: "#4A9CA6" }), "Add Account")))));
626
786
  } else {
627
- return /* @__PURE__ */ React__default.createElement(components.Option, __spreadValues({}, props), /* @__PURE__ */ React__default.createElement(Flex, { css: { cursor: "pointer" }, alignItems: "center", gap: "$2" }, /* @__PURE__ */ React__default.createElement(Text, { size: "sm" }, props.label)));
787
+ return /* @__PURE__ */ React__default.createElement(components.Option, __spreadValues({}, props), /* @__PURE__ */ React__default.createElement(Flex, { css: { cursor: "pointer", zIndex: 999999999 }, alignItems: "center", gap: "$2" }, /* @__PURE__ */ React__default.createElement(Text, { size: "sm" }, props.label)));
628
788
  }
629
789
  };
630
790
  const CustomSingleValue = (props) => {