@bigbinary/neeto-molecules 1.1.19 → 1.1.21

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.
Files changed (70) hide show
  1. package/README.md +1 -0
  2. package/dist/AutoSaveInput.js +1 -1
  3. package/dist/AutoSaveInput.js.map +1 -1
  4. package/dist/Builder.js +1 -1
  5. package/dist/Builder.js.map +1 -1
  6. package/dist/CalendarView.js +1 -1
  7. package/dist/CalendarView.js.map +1 -1
  8. package/dist/Columns.js +1 -1
  9. package/dist/Columns.js.map +1 -1
  10. package/dist/CustomDomain.js +1 -1
  11. package/dist/CustomDomain.js.map +1 -1
  12. package/dist/CustomDomainDashboard.js +3 -3
  13. package/dist/CustomDomainDashboard.js.map +1 -1
  14. package/dist/DateFormat.js +1 -1
  15. package/dist/DateFormat.js.map +1 -1
  16. package/dist/DocumentEditor.js +274 -0
  17. package/dist/DocumentEditor.js.map +1 -0
  18. package/dist/DynamicVariables.js +1 -1
  19. package/dist/DynamicVariables.js.map +1 -1
  20. package/dist/EmailForm.js +3 -2
  21. package/dist/EmailForm.js.map +1 -1
  22. package/dist/EmailPreview.js +1 -1
  23. package/dist/EmailPreview.js.map +1 -1
  24. package/dist/Header.js +1 -1
  25. package/dist/Header.js.map +1 -1
  26. package/dist/IconPicker.js +1 -1
  27. package/dist/IconPicker.js.map +1 -1
  28. package/dist/IntegrationCard.js +1 -1
  29. package/dist/IntegrationCard.js.map +1 -1
  30. package/dist/IntegrationDisconnectAlert.js +1 -1
  31. package/dist/IntegrationDisconnectAlert.js.map +1 -1
  32. package/dist/IntegrationWalkthroughModal.js +1 -1
  33. package/dist/IntegrationWalkthroughModal.js.map +1 -1
  34. package/dist/IpRestriction.js +1 -1
  35. package/dist/IpRestriction.js.map +1 -1
  36. package/dist/MenuBar.js +1 -1
  37. package/dist/MenuBar.js.map +1 -1
  38. package/dist/Metadata.js +1 -1
  39. package/dist/Metadata.js.map +1 -1
  40. package/dist/NavigationHeader.js +1 -1
  41. package/dist/NavigationHeader.js.map +1 -1
  42. package/dist/NeetoWidget.js +24 -410
  43. package/dist/NeetoWidget.js.map +1 -1
  44. package/dist/PhoneNumber.js +2 -2
  45. package/dist/PhoneNumber.js.map +1 -1
  46. package/dist/Rename.js +1 -1
  47. package/dist/Rename.js.map +1 -1
  48. package/dist/Schedule.js +7 -7
  49. package/dist/Schedule.js.map +1 -1
  50. package/dist/Security.js +1 -1
  51. package/dist/Security.js.map +1 -1
  52. package/dist/Settings.js +1 -1
  53. package/dist/Settings.js.map +1 -1
  54. package/dist/ShareViaEmail.js +1 -1
  55. package/dist/ShareViaEmail.js.map +1 -1
  56. package/dist/ShareViaLink.js +1 -1
  57. package/dist/ShareViaLink.js.map +1 -1
  58. package/dist/Sidebar.js +1 -1
  59. package/dist/Sidebar.js.map +1 -1
  60. package/dist/SubHeader.js +1 -1
  61. package/dist/SubHeader.js.map +1 -1
  62. package/dist/ThemeSidebar.js +6 -6
  63. package/dist/ThemeSidebar.js.map +1 -1
  64. package/dist/TimeFormat.js +1 -1
  65. package/dist/TimeFormat.js.map +1 -1
  66. package/dist/ToggleFeatureCard.js +1 -1
  67. package/dist/ToggleFeatureCard.js.map +1 -1
  68. package/package.json +5 -3
  69. package/src/translations/en.json +3 -0
  70. package/types/DocumentEditor.d.ts +58 -0
@@ -1,4 +1,4 @@
1
- import { values, last, identity, assoc, pluck, any, prop, fromPairs, isEmpty } from 'ramda';
1
+ import { values, last, identity, any, pluck, assoc, prop, fromPairs, isEmpty } from 'ramda';
2
2
  import * as React from 'react';
3
3
  import React__default, { useEffect, useState, useRef } from 'react';
4
4
  import { Info } from '@bigbinary/neeto-icons';
@@ -6,7 +6,7 @@ import { Typography, Select, Button, Pane, Toastr, Tooltip, Switch, Label, Callo
6
6
  import { useTranslation, Trans } from 'react-i18next';
7
7
  import { useMutation, useQuery, useQueryClient, QueryClient, QueryClientProvider } from 'react-query';
8
8
  import classnames from 'classnames';
9
- import { capitalize, noop, isNotEmpty } from '@bigbinary/neeto-commons-frontend/pure';
9
+ import { capitalize, noop, isNotEmpty } from '@bigbinary/neeto-cist';
10
10
  import { withT, usePrevious } from '@bigbinary/neeto-commons-frontend/react-utils';
11
11
  import CopyToClipboardButton from '@bigbinary/neeto-molecules/CopyToClipboardButton';
12
12
  import Prism from 'prismjs';
@@ -16,22 +16,22 @@ import { MultiEmailInput, Input } from '@bigbinary/neetoui/formik';
16
16
  import i18next from 'i18next';
17
17
  import * as yup from 'yup';
18
18
 
19
- function _typeof$1(obj) {
19
+ function _typeof(obj) {
20
20
  "@babel/helpers - typeof";
21
21
 
22
- return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
22
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
23
23
  return typeof obj;
24
24
  } : function (obj) {
25
25
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
26
- }, _typeof$1(obj);
26
+ }, _typeof(obj);
27
27
  }
28
28
 
29
29
  function _toPrimitive(input, hint) {
30
- if (_typeof$1(input) !== "object" || input === null) return input;
30
+ if (_typeof(input) !== "object" || input === null) return input;
31
31
  var prim = input[Symbol.toPrimitive];
32
32
  if (prim !== undefined) {
33
33
  var res = prim.call(input, hint || "default");
34
- if (_typeof$1(res) !== "object") return res;
34
+ if (_typeof(res) !== "object") return res;
35
35
  throw new TypeError("@@toPrimitive must return a primitive value.");
36
36
  }
37
37
  return (hint === "string" ? String : Number)(input);
@@ -39,7 +39,7 @@ function _toPrimitive(input, hint) {
39
39
 
40
40
  function _toPropertyKey(arg) {
41
41
  var key = _toPrimitive(arg, "string");
42
- return _typeof$1(key) === "symbol" ? key : String(key);
42
+ return _typeof(key) === "symbol" ? key : String(key);
43
43
  }
44
44
 
45
45
  function _defineProperty(obj, key, value) {
@@ -366,376 +366,6 @@ var CodeBlock = function CodeBlock(_ref) {
366
366
  }));
367
367
  };
368
368
 
369
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
370
- try {
371
- var info = gen[key](arg);
372
- var value = info.value;
373
- } catch (error) {
374
- reject(error);
375
- return;
376
- }
377
- if (info.done) {
378
- resolve(value);
379
- } else {
380
- Promise.resolve(value).then(_next, _throw);
381
- }
382
- }
383
- function _asyncToGenerator(fn) {
384
- return function () {
385
- var self = this,
386
- args = arguments;
387
- return new Promise(function (resolve, reject) {
388
- var gen = fn.apply(self, args);
389
- function _next(value) {
390
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
391
- }
392
- function _throw(err) {
393
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
394
- }
395
- _next(undefined);
396
- });
397
- };
398
- }
399
-
400
- var regeneratorRuntime$1 = {exports: {}};
401
-
402
- var _typeof = {exports: {}};
403
-
404
- (function (module) {
405
- function _typeof(obj) {
406
- "@babel/helpers - typeof";
407
-
408
- return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
409
- return typeof obj;
410
- } : function (obj) {
411
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
412
- }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
413
- }
414
- module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
415
- } (_typeof));
416
-
417
- (function (module) {
418
- var _typeof$1 = _typeof.exports["default"];
419
- function _regeneratorRuntime() {
420
- module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
421
- return exports;
422
- }, module.exports.__esModule = true, module.exports["default"] = module.exports;
423
- var exports = {},
424
- Op = Object.prototype,
425
- hasOwn = Op.hasOwnProperty,
426
- defineProperty = Object.defineProperty || function (obj, key, desc) {
427
- obj[key] = desc.value;
428
- },
429
- $Symbol = "function" == typeof Symbol ? Symbol : {},
430
- iteratorSymbol = $Symbol.iterator || "@@iterator",
431
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
432
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
433
- function define(obj, key, value) {
434
- return Object.defineProperty(obj, key, {
435
- value: value,
436
- enumerable: !0,
437
- configurable: !0,
438
- writable: !0
439
- }), obj[key];
440
- }
441
- try {
442
- define({}, "");
443
- } catch (err) {
444
- define = function define(obj, key, value) {
445
- return obj[key] = value;
446
- };
447
- }
448
- function wrap(innerFn, outerFn, self, tryLocsList) {
449
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
450
- generator = Object.create(protoGenerator.prototype),
451
- context = new Context(tryLocsList || []);
452
- return defineProperty(generator, "_invoke", {
453
- value: makeInvokeMethod(innerFn, self, context)
454
- }), generator;
455
- }
456
- function tryCatch(fn, obj, arg) {
457
- try {
458
- return {
459
- type: "normal",
460
- arg: fn.call(obj, arg)
461
- };
462
- } catch (err) {
463
- return {
464
- type: "throw",
465
- arg: err
466
- };
467
- }
468
- }
469
- exports.wrap = wrap;
470
- var ContinueSentinel = {};
471
- function Generator() {}
472
- function GeneratorFunction() {}
473
- function GeneratorFunctionPrototype() {}
474
- var IteratorPrototype = {};
475
- define(IteratorPrototype, iteratorSymbol, function () {
476
- return this;
477
- });
478
- var getProto = Object.getPrototypeOf,
479
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
480
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
481
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
482
- function defineIteratorMethods(prototype) {
483
- ["next", "throw", "return"].forEach(function (method) {
484
- define(prototype, method, function (arg) {
485
- return this._invoke(method, arg);
486
- });
487
- });
488
- }
489
- function AsyncIterator(generator, PromiseImpl) {
490
- function invoke(method, arg, resolve, reject) {
491
- var record = tryCatch(generator[method], generator, arg);
492
- if ("throw" !== record.type) {
493
- var result = record.arg,
494
- value = result.value;
495
- return value && "object" == _typeof$1(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
496
- invoke("next", value, resolve, reject);
497
- }, function (err) {
498
- invoke("throw", err, resolve, reject);
499
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
500
- result.value = unwrapped, resolve(result);
501
- }, function (error) {
502
- return invoke("throw", error, resolve, reject);
503
- });
504
- }
505
- reject(record.arg);
506
- }
507
- var previousPromise;
508
- defineProperty(this, "_invoke", {
509
- value: function value(method, arg) {
510
- function callInvokeWithMethodAndArg() {
511
- return new PromiseImpl(function (resolve, reject) {
512
- invoke(method, arg, resolve, reject);
513
- });
514
- }
515
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
516
- }
517
- });
518
- }
519
- function makeInvokeMethod(innerFn, self, context) {
520
- var state = "suspendedStart";
521
- return function (method, arg) {
522
- if ("executing" === state) throw new Error("Generator is already running");
523
- if ("completed" === state) {
524
- if ("throw" === method) throw arg;
525
- return doneResult();
526
- }
527
- for (context.method = method, context.arg = arg;;) {
528
- var delegate = context.delegate;
529
- if (delegate) {
530
- var delegateResult = maybeInvokeDelegate(delegate, context);
531
- if (delegateResult) {
532
- if (delegateResult === ContinueSentinel) continue;
533
- return delegateResult;
534
- }
535
- }
536
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
537
- if ("suspendedStart" === state) throw state = "completed", context.arg;
538
- context.dispatchException(context.arg);
539
- } else "return" === context.method && context.abrupt("return", context.arg);
540
- state = "executing";
541
- var record = tryCatch(innerFn, self, context);
542
- if ("normal" === record.type) {
543
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
544
- return {
545
- value: record.arg,
546
- done: context.done
547
- };
548
- }
549
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
550
- }
551
- };
552
- }
553
- function maybeInvokeDelegate(delegate, context) {
554
- var methodName = context.method,
555
- method = delegate.iterator[methodName];
556
- if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
557
- var record = tryCatch(method, delegate.iterator, context.arg);
558
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
559
- var info = record.arg;
560
- return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
561
- }
562
- function pushTryEntry(locs) {
563
- var entry = {
564
- tryLoc: locs[0]
565
- };
566
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
567
- }
568
- function resetTryEntry(entry) {
569
- var record = entry.completion || {};
570
- record.type = "normal", delete record.arg, entry.completion = record;
571
- }
572
- function Context(tryLocsList) {
573
- this.tryEntries = [{
574
- tryLoc: "root"
575
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
576
- }
577
- function values(iterable) {
578
- if (iterable) {
579
- var iteratorMethod = iterable[iteratorSymbol];
580
- if (iteratorMethod) return iteratorMethod.call(iterable);
581
- if ("function" == typeof iterable.next) return iterable;
582
- if (!isNaN(iterable.length)) {
583
- var i = -1,
584
- next = function next() {
585
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
586
- return next.value = undefined, next.done = !0, next;
587
- };
588
- return next.next = next;
589
- }
590
- }
591
- return {
592
- next: doneResult
593
- };
594
- }
595
- function doneResult() {
596
- return {
597
- value: undefined,
598
- done: !0
599
- };
600
- }
601
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
602
- value: GeneratorFunctionPrototype,
603
- configurable: !0
604
- }), defineProperty(GeneratorFunctionPrototype, "constructor", {
605
- value: GeneratorFunction,
606
- configurable: !0
607
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
608
- var ctor = "function" == typeof genFun && genFun.constructor;
609
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
610
- }, exports.mark = function (genFun) {
611
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
612
- }, exports.awrap = function (arg) {
613
- return {
614
- __await: arg
615
- };
616
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
617
- return this;
618
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
619
- void 0 === PromiseImpl && (PromiseImpl = Promise);
620
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
621
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
622
- return result.done ? result.value : iter.next();
623
- });
624
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
625
- return this;
626
- }), define(Gp, "toString", function () {
627
- return "[object Generator]";
628
- }), exports.keys = function (val) {
629
- var object = Object(val),
630
- keys = [];
631
- for (var key in object) keys.push(key);
632
- return keys.reverse(), function next() {
633
- for (; keys.length;) {
634
- var key = keys.pop();
635
- if (key in object) return next.value = key, next.done = !1, next;
636
- }
637
- return next.done = !0, next;
638
- };
639
- }, exports.values = values, Context.prototype = {
640
- constructor: Context,
641
- reset: function reset(skipTempReset) {
642
- if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
643
- },
644
- stop: function stop() {
645
- this.done = !0;
646
- var rootRecord = this.tryEntries[0].completion;
647
- if ("throw" === rootRecord.type) throw rootRecord.arg;
648
- return this.rval;
649
- },
650
- dispatchException: function dispatchException(exception) {
651
- if (this.done) throw exception;
652
- var context = this;
653
- function handle(loc, caught) {
654
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
655
- }
656
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
657
- var entry = this.tryEntries[i],
658
- record = entry.completion;
659
- if ("root" === entry.tryLoc) return handle("end");
660
- if (entry.tryLoc <= this.prev) {
661
- var hasCatch = hasOwn.call(entry, "catchLoc"),
662
- hasFinally = hasOwn.call(entry, "finallyLoc");
663
- if (hasCatch && hasFinally) {
664
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
665
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
666
- } else if (hasCatch) {
667
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
668
- } else {
669
- if (!hasFinally) throw new Error("try statement without catch or finally");
670
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
671
- }
672
- }
673
- }
674
- },
675
- abrupt: function abrupt(type, arg) {
676
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
677
- var entry = this.tryEntries[i];
678
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
679
- var finallyEntry = entry;
680
- break;
681
- }
682
- }
683
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
684
- var record = finallyEntry ? finallyEntry.completion : {};
685
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
686
- },
687
- complete: function complete(record, afterLoc) {
688
- if ("throw" === record.type) throw record.arg;
689
- return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
690
- },
691
- finish: function finish(finallyLoc) {
692
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
693
- var entry = this.tryEntries[i];
694
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
695
- }
696
- },
697
- "catch": function _catch(tryLoc) {
698
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
699
- var entry = this.tryEntries[i];
700
- if (entry.tryLoc === tryLoc) {
701
- var record = entry.completion;
702
- if ("throw" === record.type) {
703
- var thrown = record.arg;
704
- resetTryEntry(entry);
705
- }
706
- return thrown;
707
- }
708
- }
709
- throw new Error("illegal catch attempt");
710
- },
711
- delegateYield: function delegateYield(iterable, resultName, nextLoc) {
712
- return this.delegate = {
713
- iterator: values(iterable),
714
- resultName: resultName,
715
- nextLoc: nextLoc
716
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
717
- }
718
- }, exports;
719
- }
720
- module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
721
- } (regeneratorRuntime$1));
722
-
723
- // TODO(Babel 8): Remove this file.
724
-
725
- var runtime = regeneratorRuntime$1.exports();
726
- var regenerator = runtime;
727
-
728
- // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
729
- try {
730
- regeneratorRuntime = runtime;
731
- } catch (accidentalStrictMode) {
732
- if (typeof globalThis === "object") {
733
- globalThis.regeneratorRuntime = runtime;
734
- } else {
735
- Function("r", "regeneratorRuntime = r")(runtime);
736
- }
737
- }
738
-
739
369
  var buildEmbedWidgetScript = function buildEmbedWidgetScript() {
740
370
  var widgetScriptUrl = window.globalProps.railsEnv === RAILS_ENV.production ? NEETO_WIDGET_SCRIPT_URL.production : NEETO_WIDGET_SCRIPT_URL.staging;
741
371
  return "<script src=\"".concat(widgetScriptUrl, "\"></script>");
@@ -864,38 +494,22 @@ var CodeSnippet = function CodeSnippet(_ref) {
864
494
  setSelectedFramework = _useState2[1];
865
495
  var emailMutation = useEmailEmbedCode(onSent);
866
496
  var codeToDisplay = emailType === EMAIL_TYPES.userIdentity ? getSampleUserIdentity(enabledWidgets, selectedFramework.value) : codeString;
867
- var handleSubmit = /*#__PURE__*/function () {
868
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(formData) {
869
- var _body$ref$current$inn, _body$ref;
870
- return regenerator.wrap(function _callee$(_context) {
871
- while (1) switch (_context.prev = _context.next) {
872
- case 0:
873
- if (!any(function (_ref3) {
874
- var valid = _ref3.valid;
875
- return !valid;
876
- }, formData.emails)) {
877
- _context.next = 3;
878
- break;
879
- }
880
- Toastr.error(t("neetoMolecules.widget.email.fields.emails.invalidError"));
881
- return _context.abrupt("return");
882
- case 3:
883
- emailMutation.mutate({
884
- subject: formData.subject,
885
- emails: pluck("value", formData.emails),
886
- message: (_body$ref$current$inn = (_body$ref = body.ref) === null || _body$ref === void 0 ? void 0 : _body$ref.current.innerHTML) !== null && _body$ref$current$inn !== void 0 ? _body$ref$current$inn : body,
887
- snippet: codeToDisplay
888
- });
889
- case 4:
890
- case "end":
891
- return _context.stop();
892
- }
893
- }, _callee);
894
- }));
895
- return function handleSubmit(_x) {
896
- return _ref2.apply(this, arguments);
897
- };
898
- }();
497
+ var handleSubmit = function handleSubmit(formData) {
498
+ var _body$ref$current$inn, _body$ref;
499
+ if (any(function (_ref2) {
500
+ var valid = _ref2.valid;
501
+ return !valid;
502
+ }, formData.emails)) {
503
+ Toastr.error(t("neetoMolecules.widget.email.fields.emails.invalidError"));
504
+ return;
505
+ }
506
+ emailMutation.mutate({
507
+ subject: formData.subject,
508
+ emails: pluck("value", formData.emails),
509
+ message: (_body$ref$current$inn = (_body$ref = body.ref) === null || _body$ref === void 0 ? void 0 : _body$ref.current.innerHTML) !== null && _body$ref$current$inn !== void 0 ? _body$ref$current$inn : body,
510
+ snippet: codeToDisplay
511
+ });
512
+ };
899
513
  var renderCodeBlockProps = function renderCodeBlockProps() {
900
514
  var props = {
901
515
  codeString: codeToDisplay,