@bigbinary/neeto-molecules 1.1.64 → 1.1.66
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/EmailForm.js +224 -522
- package/dist/EmailForm.js.map +1 -1
- package/dist/EmailPreview.js +3 -44
- package/dist/EmailPreview.js.map +1 -1
- package/dist/SendToFields.js +218 -474
- package/dist/SendToFields.js.map +1 -1
- package/dist/ShareViaEmail.js +267 -1797
- package/dist/ShareViaEmail.js.map +1 -1
- package/dist/ShareViaLink.js +73 -51
- package/dist/ShareViaLink.js.map +1 -1
- package/package.json +1 -1
- package/src/translations/en.json +14 -3
- package/types/ShareViaLink.d.ts +33 -0
package/dist/EmailForm.js
CHANGED
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useState, useRef, useContext } from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import { useFormikContext, Field } from 'formik';
|
|
4
4
|
import { isNotEmpty, noop, isPresent } from '@bigbinary/neeto-cist';
|
|
5
5
|
import { isEditorEmpty, FormikEditor, EditorContent } from '@bigbinary/neeto-editor';
|
|
6
|
-
import {
|
|
6
|
+
import { Callout, Button, Typography, Pane, Toastr, Input as Input$1 } from '@bigbinary/neetoui';
|
|
7
7
|
import { Select, Input, MultiEmailInput, Radio, ActionBlock, Form } from '@bigbinary/neetoui/formik';
|
|
8
8
|
import { useTranslation, Trans } from 'react-i18next';
|
|
9
9
|
import { t } from 'i18next';
|
|
10
10
|
import { prop } from 'ramda';
|
|
11
11
|
import * as yup from 'yup';
|
|
12
12
|
import { string } from 'yup';
|
|
13
|
-
import { Info, Upload } from '@bigbinary/neeto-icons';
|
|
13
|
+
import { Info, Download, Upload } from '@bigbinary/neeto-icons';
|
|
14
14
|
import { withT } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
15
|
+
import { useDropzone } from 'react-dropzone';
|
|
15
16
|
import Papa from 'papaparse';
|
|
16
17
|
import { withEventTargetValue } from '@bigbinary/neeto-commons-frontend/utils';
|
|
17
18
|
import DynamicVariables from '@bigbinary/neeto-molecules/DynamicVariables';
|
|
18
19
|
|
|
19
|
-
function _typeof
|
|
20
|
+
function _typeof(obj) {
|
|
20
21
|
"@babel/helpers - typeof";
|
|
21
22
|
|
|
22
|
-
return _typeof
|
|
23
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
23
24
|
return typeof obj;
|
|
24
25
|
} : function (obj) {
|
|
25
26
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
26
|
-
}, _typeof
|
|
27
|
+
}, _typeof(obj);
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
function _toPrimitive(input, hint) {
|
|
30
|
-
if (_typeof
|
|
31
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
31
32
|
var prim = input[Symbol.toPrimitive];
|
|
32
33
|
if (prim !== undefined) {
|
|
33
34
|
var res = prim.call(input, hint || "default");
|
|
34
|
-
if (_typeof
|
|
35
|
+
if (_typeof(res) !== "object") return res;
|
|
35
36
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
36
37
|
}
|
|
37
38
|
return (hint === "string" ? String : Number)(input);
|
|
@@ -39,7 +40,7 @@ function _toPrimitive(input, hint) {
|
|
|
39
40
|
|
|
40
41
|
function _toPropertyKey(arg) {
|
|
41
42
|
var key = _toPrimitive(arg, "string");
|
|
42
|
-
return _typeof
|
|
43
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
function _defineProperty(obj, key, value) {
|
|
@@ -194,409 +195,173 @@ function _toConsumableArray(arr) {
|
|
|
194
195
|
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
195
196
|
}
|
|
196
197
|
|
|
197
|
-
function
|
|
198
|
-
|
|
199
|
-
var info = gen[key](arg);
|
|
200
|
-
var value = info.value;
|
|
201
|
-
} catch (error) {
|
|
202
|
-
reject(error);
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
if (info.done) {
|
|
206
|
-
resolve(value);
|
|
207
|
-
} else {
|
|
208
|
-
Promise.resolve(value).then(_next, _throw);
|
|
209
|
-
}
|
|
198
|
+
function _arrayWithHoles(arr) {
|
|
199
|
+
if (Array.isArray(arr)) return arr;
|
|
210
200
|
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
201
|
+
|
|
202
|
+
function _iterableToArrayLimit(arr, i) {
|
|
203
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
204
|
+
if (null != _i) {
|
|
205
|
+
var _s,
|
|
206
|
+
_e,
|
|
207
|
+
_x,
|
|
208
|
+
_r,
|
|
209
|
+
_arr = [],
|
|
210
|
+
_n = !0,
|
|
211
|
+
_d = !1;
|
|
212
|
+
try {
|
|
213
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
214
|
+
if (Object(_i) !== _i) return;
|
|
215
|
+
_n = !1;
|
|
216
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
217
|
+
} catch (err) {
|
|
218
|
+
_d = !0, _e = err;
|
|
219
|
+
} finally {
|
|
220
|
+
try {
|
|
221
|
+
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
|
222
|
+
} finally {
|
|
223
|
+
if (_d) throw _e;
|
|
222
224
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
}
|
|
225
|
+
}
|
|
226
|
+
return _arr;
|
|
227
|
+
}
|
|
226
228
|
}
|
|
227
229
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
(function (module) {
|
|
233
|
-
function _typeof(obj) {
|
|
234
|
-
"@babel/helpers - typeof";
|
|
235
|
-
|
|
236
|
-
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
237
|
-
return typeof obj;
|
|
238
|
-
} : function (obj) {
|
|
239
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
240
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
241
|
-
}
|
|
242
|
-
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
243
|
-
} (_typeof));
|
|
244
|
-
|
|
245
|
-
(function (module) {
|
|
246
|
-
var _typeof$1 = _typeof.exports["default"];
|
|
247
|
-
function _regeneratorRuntime() {
|
|
248
|
-
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
249
|
-
return exports;
|
|
250
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
251
|
-
var exports = {},
|
|
252
|
-
Op = Object.prototype,
|
|
253
|
-
hasOwn = Op.hasOwnProperty,
|
|
254
|
-
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
255
|
-
obj[key] = desc.value;
|
|
256
|
-
},
|
|
257
|
-
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
258
|
-
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
259
|
-
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
260
|
-
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
261
|
-
function define(obj, key, value) {
|
|
262
|
-
return Object.defineProperty(obj, key, {
|
|
263
|
-
value: value,
|
|
264
|
-
enumerable: !0,
|
|
265
|
-
configurable: !0,
|
|
266
|
-
writable: !0
|
|
267
|
-
}), obj[key];
|
|
268
|
-
}
|
|
269
|
-
try {
|
|
270
|
-
define({}, "");
|
|
271
|
-
} catch (err) {
|
|
272
|
-
define = function define(obj, key, value) {
|
|
273
|
-
return obj[key] = value;
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
277
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
278
|
-
generator = Object.create(protoGenerator.prototype),
|
|
279
|
-
context = new Context(tryLocsList || []);
|
|
280
|
-
return defineProperty(generator, "_invoke", {
|
|
281
|
-
value: makeInvokeMethod(innerFn, self, context)
|
|
282
|
-
}), generator;
|
|
283
|
-
}
|
|
284
|
-
function tryCatch(fn, obj, arg) {
|
|
285
|
-
try {
|
|
286
|
-
return {
|
|
287
|
-
type: "normal",
|
|
288
|
-
arg: fn.call(obj, arg)
|
|
289
|
-
};
|
|
290
|
-
} catch (err) {
|
|
291
|
-
return {
|
|
292
|
-
type: "throw",
|
|
293
|
-
arg: err
|
|
294
|
-
};
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
exports.wrap = wrap;
|
|
298
|
-
var ContinueSentinel = {};
|
|
299
|
-
function Generator() {}
|
|
300
|
-
function GeneratorFunction() {}
|
|
301
|
-
function GeneratorFunctionPrototype() {}
|
|
302
|
-
var IteratorPrototype = {};
|
|
303
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
304
|
-
return this;
|
|
305
|
-
});
|
|
306
|
-
var getProto = Object.getPrototypeOf,
|
|
307
|
-
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
308
|
-
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
309
|
-
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
310
|
-
function defineIteratorMethods(prototype) {
|
|
311
|
-
["next", "throw", "return"].forEach(function (method) {
|
|
312
|
-
define(prototype, method, function (arg) {
|
|
313
|
-
return this._invoke(method, arg);
|
|
314
|
-
});
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
318
|
-
function invoke(method, arg, resolve, reject) {
|
|
319
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
320
|
-
if ("throw" !== record.type) {
|
|
321
|
-
var result = record.arg,
|
|
322
|
-
value = result.value;
|
|
323
|
-
return value && "object" == _typeof$1(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
324
|
-
invoke("next", value, resolve, reject);
|
|
325
|
-
}, function (err) {
|
|
326
|
-
invoke("throw", err, resolve, reject);
|
|
327
|
-
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
328
|
-
result.value = unwrapped, resolve(result);
|
|
329
|
-
}, function (error) {
|
|
330
|
-
return invoke("throw", error, resolve, reject);
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
reject(record.arg);
|
|
334
|
-
}
|
|
335
|
-
var previousPromise;
|
|
336
|
-
defineProperty(this, "_invoke", {
|
|
337
|
-
value: function value(method, arg) {
|
|
338
|
-
function callInvokeWithMethodAndArg() {
|
|
339
|
-
return new PromiseImpl(function (resolve, reject) {
|
|
340
|
-
invoke(method, arg, resolve, reject);
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
344
|
-
}
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
348
|
-
var state = "suspendedStart";
|
|
349
|
-
return function (method, arg) {
|
|
350
|
-
if ("executing" === state) throw new Error("Generator is already running");
|
|
351
|
-
if ("completed" === state) {
|
|
352
|
-
if ("throw" === method) throw arg;
|
|
353
|
-
return doneResult();
|
|
354
|
-
}
|
|
355
|
-
for (context.method = method, context.arg = arg;;) {
|
|
356
|
-
var delegate = context.delegate;
|
|
357
|
-
if (delegate) {
|
|
358
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
359
|
-
if (delegateResult) {
|
|
360
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
361
|
-
return delegateResult;
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
365
|
-
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
366
|
-
context.dispatchException(context.arg);
|
|
367
|
-
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
368
|
-
state = "executing";
|
|
369
|
-
var record = tryCatch(innerFn, self, context);
|
|
370
|
-
if ("normal" === record.type) {
|
|
371
|
-
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
372
|
-
return {
|
|
373
|
-
value: record.arg,
|
|
374
|
-
done: context.done
|
|
375
|
-
};
|
|
376
|
-
}
|
|
377
|
-
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
378
|
-
}
|
|
379
|
-
};
|
|
380
|
-
}
|
|
381
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
382
|
-
var methodName = context.method,
|
|
383
|
-
method = delegate.iterator[methodName];
|
|
384
|
-
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;
|
|
385
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
386
|
-
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
387
|
-
var info = record.arg;
|
|
388
|
-
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);
|
|
389
|
-
}
|
|
390
|
-
function pushTryEntry(locs) {
|
|
391
|
-
var entry = {
|
|
392
|
-
tryLoc: locs[0]
|
|
393
|
-
};
|
|
394
|
-
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
395
|
-
}
|
|
396
|
-
function resetTryEntry(entry) {
|
|
397
|
-
var record = entry.completion || {};
|
|
398
|
-
record.type = "normal", delete record.arg, entry.completion = record;
|
|
399
|
-
}
|
|
400
|
-
function Context(tryLocsList) {
|
|
401
|
-
this.tryEntries = [{
|
|
402
|
-
tryLoc: "root"
|
|
403
|
-
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
404
|
-
}
|
|
405
|
-
function values(iterable) {
|
|
406
|
-
if (iterable) {
|
|
407
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
408
|
-
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
409
|
-
if ("function" == typeof iterable.next) return iterable;
|
|
410
|
-
if (!isNaN(iterable.length)) {
|
|
411
|
-
var i = -1,
|
|
412
|
-
next = function next() {
|
|
413
|
-
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
414
|
-
return next.value = undefined, next.done = !0, next;
|
|
415
|
-
};
|
|
416
|
-
return next.next = next;
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
return {
|
|
420
|
-
next: doneResult
|
|
421
|
-
};
|
|
422
|
-
}
|
|
423
|
-
function doneResult() {
|
|
424
|
-
return {
|
|
425
|
-
value: undefined,
|
|
426
|
-
done: !0
|
|
427
|
-
};
|
|
428
|
-
}
|
|
429
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
430
|
-
value: GeneratorFunctionPrototype,
|
|
431
|
-
configurable: !0
|
|
432
|
-
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
433
|
-
value: GeneratorFunction,
|
|
434
|
-
configurable: !0
|
|
435
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
436
|
-
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
437
|
-
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
438
|
-
}, exports.mark = function (genFun) {
|
|
439
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
440
|
-
}, exports.awrap = function (arg) {
|
|
441
|
-
return {
|
|
442
|
-
__await: arg
|
|
443
|
-
};
|
|
444
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
445
|
-
return this;
|
|
446
|
-
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
447
|
-
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
448
|
-
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
449
|
-
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
450
|
-
return result.done ? result.value : iter.next();
|
|
451
|
-
});
|
|
452
|
-
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
453
|
-
return this;
|
|
454
|
-
}), define(Gp, "toString", function () {
|
|
455
|
-
return "[object Generator]";
|
|
456
|
-
}), exports.keys = function (val) {
|
|
457
|
-
var object = Object(val),
|
|
458
|
-
keys = [];
|
|
459
|
-
for (var key in object) keys.push(key);
|
|
460
|
-
return keys.reverse(), function next() {
|
|
461
|
-
for (; keys.length;) {
|
|
462
|
-
var key = keys.pop();
|
|
463
|
-
if (key in object) return next.value = key, next.done = !1, next;
|
|
464
|
-
}
|
|
465
|
-
return next.done = !0, next;
|
|
466
|
-
};
|
|
467
|
-
}, exports.values = values, Context.prototype = {
|
|
468
|
-
constructor: Context,
|
|
469
|
-
reset: function reset(skipTempReset) {
|
|
470
|
-
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);
|
|
471
|
-
},
|
|
472
|
-
stop: function stop() {
|
|
473
|
-
this.done = !0;
|
|
474
|
-
var rootRecord = this.tryEntries[0].completion;
|
|
475
|
-
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
476
|
-
return this.rval;
|
|
477
|
-
},
|
|
478
|
-
dispatchException: function dispatchException(exception) {
|
|
479
|
-
if (this.done) throw exception;
|
|
480
|
-
var context = this;
|
|
481
|
-
function handle(loc, caught) {
|
|
482
|
-
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
483
|
-
}
|
|
484
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
485
|
-
var entry = this.tryEntries[i],
|
|
486
|
-
record = entry.completion;
|
|
487
|
-
if ("root" === entry.tryLoc) return handle("end");
|
|
488
|
-
if (entry.tryLoc <= this.prev) {
|
|
489
|
-
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
490
|
-
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
491
|
-
if (hasCatch && hasFinally) {
|
|
492
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
493
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
494
|
-
} else if (hasCatch) {
|
|
495
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
496
|
-
} else {
|
|
497
|
-
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
498
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
},
|
|
503
|
-
abrupt: function abrupt(type, arg) {
|
|
504
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
505
|
-
var entry = this.tryEntries[i];
|
|
506
|
-
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
507
|
-
var finallyEntry = entry;
|
|
508
|
-
break;
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
512
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
513
|
-
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
514
|
-
},
|
|
515
|
-
complete: function complete(record, afterLoc) {
|
|
516
|
-
if ("throw" === record.type) throw record.arg;
|
|
517
|
-
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;
|
|
518
|
-
},
|
|
519
|
-
finish: function finish(finallyLoc) {
|
|
520
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
521
|
-
var entry = this.tryEntries[i];
|
|
522
|
-
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
523
|
-
}
|
|
524
|
-
},
|
|
525
|
-
"catch": function _catch(tryLoc) {
|
|
526
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
527
|
-
var entry = this.tryEntries[i];
|
|
528
|
-
if (entry.tryLoc === tryLoc) {
|
|
529
|
-
var record = entry.completion;
|
|
530
|
-
if ("throw" === record.type) {
|
|
531
|
-
var thrown = record.arg;
|
|
532
|
-
resetTryEntry(entry);
|
|
533
|
-
}
|
|
534
|
-
return thrown;
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
throw new Error("illegal catch attempt");
|
|
538
|
-
},
|
|
539
|
-
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
|
|
540
|
-
return this.delegate = {
|
|
541
|
-
iterator: values(iterable),
|
|
542
|
-
resultName: resultName,
|
|
543
|
-
nextLoc: nextLoc
|
|
544
|
-
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
545
|
-
}
|
|
546
|
-
}, exports;
|
|
547
|
-
}
|
|
548
|
-
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
549
|
-
} (regeneratorRuntime$1));
|
|
550
|
-
|
|
551
|
-
// TODO(Babel 8): Remove this file.
|
|
552
|
-
|
|
553
|
-
var runtime = regeneratorRuntime$1.exports();
|
|
554
|
-
var regenerator = runtime;
|
|
230
|
+
function _nonIterableRest() {
|
|
231
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
232
|
+
}
|
|
555
233
|
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
regeneratorRuntime = runtime;
|
|
559
|
-
} catch (accidentalStrictMode) {
|
|
560
|
-
if (typeof globalThis === "object") {
|
|
561
|
-
globalThis.regeneratorRuntime = runtime;
|
|
562
|
-
} else {
|
|
563
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
564
|
-
}
|
|
234
|
+
function _slicedToArray(arr, i) {
|
|
235
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
565
236
|
}
|
|
566
237
|
|
|
567
|
-
var
|
|
568
|
-
|
|
569
|
-
var
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
}, ""
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
accept: accept,
|
|
595
|
-
className: "hidden",
|
|
596
|
-
ref: inputRef,
|
|
597
|
-
type: "file",
|
|
598
|
-
onChange: handleInputChange
|
|
238
|
+
var ALLOWED_FILE_TYPES = [".csv"];
|
|
239
|
+
var ONE_MEGABYTE_IN_BYTES = 1024 * 1024;
|
|
240
|
+
var DOWNLOAD_SAMPLE_EMAIL_CSV_FILE = "https://d2v7kzglnr2dnh.cloudfront.net/others/sample-bulk-email.csv";
|
|
241
|
+
|
|
242
|
+
var Requirements = withT(function (_ref) {
|
|
243
|
+
var t = _ref.t,
|
|
244
|
+
fileSize = _ref.fileSize;
|
|
245
|
+
return /*#__PURE__*/React.createElement(Callout, {
|
|
246
|
+
className: "flex flex-col items-center py-6",
|
|
247
|
+
style: "info"
|
|
248
|
+
}, /*#__PURE__*/React.createElement("ul", {
|
|
249
|
+
className: "list-outside list-disc space-y-1 font-normal leading-normal"
|
|
250
|
+
}, fileSize && /*#__PURE__*/React.createElement("li", null, t("neetoMolecules.shareViaLink.requirements.fileTypeAndSize", {
|
|
251
|
+
limit: fileSize
|
|
252
|
+
})), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement(Trans, {
|
|
253
|
+
components: {
|
|
254
|
+
strong: /*#__PURE__*/React.createElement("strong", {
|
|
255
|
+
className: "font-semibold"
|
|
256
|
+
})
|
|
257
|
+
},
|
|
258
|
+
i18nKey: "neetoMolecules.shareViaLink.requirements.shouldContainColumns"
|
|
259
|
+
}))), /*#__PURE__*/React.createElement(Button, {
|
|
260
|
+
href: DOWNLOAD_SAMPLE_EMAIL_CSV_FILE,
|
|
261
|
+
icon: Download,
|
|
262
|
+
iconPosition: "left",
|
|
263
|
+
label: t("neetoMolecules.shareViaLink.bulkUploadPane.downloadSampleCSV"),
|
|
264
|
+
style: "link"
|
|
599
265
|
}));
|
|
266
|
+
});
|
|
267
|
+
var Requirements$1 = /*#__PURE__*/React.memo(Requirements);
|
|
268
|
+
|
|
269
|
+
var BulkUploadPane = function BulkUploadPane(_ref) {
|
|
270
|
+
var _fileRejections$;
|
|
271
|
+
var isOpen = _ref.isOpen,
|
|
272
|
+
fileType = _ref.fileType,
|
|
273
|
+
fileSize = _ref.fileSize,
|
|
274
|
+
onClose = _ref.onClose,
|
|
275
|
+
handleFileSubmit = _ref.handleFileSubmit;
|
|
276
|
+
var _useDropzone = useDropzone({
|
|
277
|
+
accept: fileType,
|
|
278
|
+
maxFiles: 1,
|
|
279
|
+
maxSize: fileSize * ONE_MEGABYTE_IN_BYTES,
|
|
280
|
+
onDrop: function onDrop(files) {
|
|
281
|
+
return files[0] && handleFileSubmit(files[0]);
|
|
282
|
+
}
|
|
283
|
+
}),
|
|
284
|
+
getRootProps = _useDropzone.getRootProps,
|
|
285
|
+
getInputProps = _useDropzone.getInputProps,
|
|
286
|
+
isDragActive = _useDropzone.isDragActive,
|
|
287
|
+
fileRejections = _useDropzone.fileRejections;
|
|
288
|
+
var errors = (_fileRejections$ = fileRejections[0]) === null || _fileRejections$ === void 0 ? void 0 : _fileRejections$.errors.map(function (_ref2) {
|
|
289
|
+
var message = _ref2.message,
|
|
290
|
+
code = _ref2.code;
|
|
291
|
+
return /*#__PURE__*/React.createElement(Typography, {
|
|
292
|
+
className: "neeto-ui-text-error-500 items",
|
|
293
|
+
"data-cy": "file-input-error-message",
|
|
294
|
+
key: code,
|
|
295
|
+
style: "body3"
|
|
296
|
+
}, message);
|
|
297
|
+
});
|
|
298
|
+
var _useTranslation = useTranslation(),
|
|
299
|
+
t = _useTranslation.t;
|
|
300
|
+
return /*#__PURE__*/React.createElement(Pane, {
|
|
301
|
+
"data-testid": "bulk-upload-pane",
|
|
302
|
+
isOpen: isOpen,
|
|
303
|
+
onClose: onClose
|
|
304
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
305
|
+
tabIndex: 0
|
|
306
|
+
}, /*#__PURE__*/React.createElement(Pane.Header, null, /*#__PURE__*/React.createElement(Typography, {
|
|
307
|
+
"data-testid": "bulk-upload-header",
|
|
308
|
+
style: "h2",
|
|
309
|
+
weight: "semibold"
|
|
310
|
+
}, t("neetoMolecules.shareViaLink.bulkUpload"))), /*#__PURE__*/React.createElement(Pane.Body, null, /*#__PURE__*/React.createElement("div", {
|
|
311
|
+
className: "w-full space-y-4"
|
|
312
|
+
}, /*#__PURE__*/React.createElement(Requirements$1, {
|
|
313
|
+
fileSize: fileSize
|
|
314
|
+
}), /*#__PURE__*/React.createElement("div", getRootProps({
|
|
315
|
+
className: classnames("flex flex-col p-2 border neeto-ui-border-primary-500 border-dashed neeto-ui-rounded-md transition duration-500 ease-in-out hover:neeto-ui-bg-gray-100 cursor-pointer items-center", {
|
|
316
|
+
"neeto-ui-border-gray-100": isDragActive,
|
|
317
|
+
"neeto-ui-border-error neeto-ui-bg-pastel-red hover:neeto-ui-bg-pastel-red": fileRejections.length
|
|
318
|
+
})
|
|
319
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
320
|
+
className: "flex flex-col items-center space-y-3 p-4"
|
|
321
|
+
}, /*#__PURE__*/React.createElement(Upload, {
|
|
322
|
+
className: "neeto-ui-text-primary-500",
|
|
323
|
+
size: 32
|
|
324
|
+
}), /*#__PURE__*/React.createElement("input", _extends({}, getInputProps(), {
|
|
325
|
+
"data-cy": "csv-upload-input",
|
|
326
|
+
"data-testid": "csv-upload-input"
|
|
327
|
+
})), isDragActive ? /*#__PURE__*/React.createElement(Typography, {
|
|
328
|
+
style: "body2"
|
|
329
|
+
}, t("neetoMolecules.shareViaLink.bulkUploadPane.dropFileHere")) : /*#__PURE__*/React.createElement("div", {
|
|
330
|
+
className: "flex flex-col items-center space-y-1"
|
|
331
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
332
|
+
className: "flex w-full items-center justify-center gap-x-1"
|
|
333
|
+
}, /*#__PURE__*/React.createElement(Trans, {
|
|
334
|
+
i18nKey: "neetoMolecules.shareViaLink.bulkUploadPane.dragNDrop",
|
|
335
|
+
components: {
|
|
336
|
+
Button: /*#__PURE__*/React.createElement(Button, {
|
|
337
|
+
style: "link"
|
|
338
|
+
})
|
|
339
|
+
}
|
|
340
|
+
})), /*#__PURE__*/React.createElement(Typography, {
|
|
341
|
+
className: "neeto-ui-text-gray-700",
|
|
342
|
+
style: "body3"
|
|
343
|
+
}, fileType && /*#__PURE__*/React.createElement(Trans, {
|
|
344
|
+
i18nKey: "neetoMolecules.shareViaLink.bulkUploadPane.supportedFormat",
|
|
345
|
+
values: {
|
|
346
|
+
fileType: fileType
|
|
347
|
+
},
|
|
348
|
+
components: {
|
|
349
|
+
code: /*#__PURE__*/React.createElement("code", {
|
|
350
|
+
className: "neeto-ui-typography neeto-ui-text-body3 neeto-ui-bg-white m-0 border-l-0 p-0"
|
|
351
|
+
})
|
|
352
|
+
}
|
|
353
|
+
}), " ", fileSize && t("neetoMolecules.shareViaLink.bulkUploadPane.supportedSize", {
|
|
354
|
+
fileSize: fileSize
|
|
355
|
+
})))), errors))), /*#__PURE__*/React.createElement(Pane.Footer, {
|
|
356
|
+
className: "flex items-center space-x-2"
|
|
357
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
358
|
+
"data-cy": "bulk-upload-cancel-button",
|
|
359
|
+
"data-testid": "bulk-upload-cancel-button",
|
|
360
|
+
label: t("neetoMolecules.common.actions.cancel"),
|
|
361
|
+
style: "text",
|
|
362
|
+
type: "reset",
|
|
363
|
+
onClick: onClose
|
|
364
|
+
}))));
|
|
600
365
|
};
|
|
601
366
|
|
|
602
367
|
var isValidEmail = function isValidEmail(email) {
|
|
@@ -612,40 +377,27 @@ var createEmailOptions = function createEmailOptions() {
|
|
|
612
377
|
};
|
|
613
378
|
});
|
|
614
379
|
};
|
|
615
|
-
var parseCsvEmails =
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
});
|
|
633
|
-
onSuccess(createEmailOptions(emails));
|
|
634
|
-
} else {
|
|
635
|
-
Toastr.error(t("neetoMolecules.sendToFields.errors.invalidCsv"));
|
|
636
|
-
}
|
|
637
|
-
}
|
|
638
|
-
});
|
|
639
|
-
case 1:
|
|
640
|
-
case "end":
|
|
641
|
-
return _context.stop();
|
|
380
|
+
var parseCsvEmails = function parseCsvEmails(file, onSuccess) {
|
|
381
|
+
Papa.parse(file, {
|
|
382
|
+
header: true,
|
|
383
|
+
skipEmptyLines: true,
|
|
384
|
+
transformHeader: function transformHeader(h) {
|
|
385
|
+
return h.toLowerCase().replace(/\W/g, "");
|
|
386
|
+
},
|
|
387
|
+
complete: function complete(results) {
|
|
388
|
+
var _results$meta$fields;
|
|
389
|
+
var isEmailFieldPresent = (_results$meta$fields = results.meta.fields) === null || _results$meta$fields === void 0 ? void 0 : _results$meta$fields.includes("email");
|
|
390
|
+
if (isEmailFieldPresent) {
|
|
391
|
+
var emails = results.data.filter(prop("email")).map(function (item) {
|
|
392
|
+
return item.email.trim();
|
|
393
|
+
});
|
|
394
|
+
onSuccess(createEmailOptions(emails));
|
|
395
|
+
} else {
|
|
396
|
+
Toastr.error(t("neetoMolecules.sendToFields.errors.invalidCsv"));
|
|
642
397
|
}
|
|
643
|
-
}
|
|
644
|
-
})
|
|
645
|
-
|
|
646
|
-
return _ref.apply(this, arguments);
|
|
647
|
-
};
|
|
648
|
-
}();
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
};
|
|
649
401
|
|
|
650
402
|
var SendToFields = function SendToFields(_ref) {
|
|
651
403
|
var emailInputProps = _ref.emailInputProps,
|
|
@@ -655,6 +407,10 @@ var SendToFields = function SendToFields(_ref) {
|
|
|
655
407
|
showUploadCsvButton = _ref$showUploadCsvBut === void 0 ? false : _ref$showUploadCsvBut,
|
|
656
408
|
_ref$showCcBccButton = _ref.showCcBccButton,
|
|
657
409
|
showCcBccButton = _ref$showCcBccButton === void 0 ? false : _ref$showCcBccButton;
|
|
410
|
+
var _useState = useState(false),
|
|
411
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
412
|
+
isBulkUploadPaneOpen = _useState2[0],
|
|
413
|
+
setIsBulkUploadPaneOpen = _useState2[1];
|
|
658
414
|
var sendToFieldRef = useRef();
|
|
659
415
|
var _useFormikContext = useFormikContext(),
|
|
660
416
|
_useFormikContext$val = _useFormikContext.values,
|
|
@@ -663,58 +419,36 @@ var SendToFields = function SendToFields(_ref) {
|
|
|
663
419
|
setFieldValue = _useFormikContext.setFieldValue;
|
|
664
420
|
var _useTranslation = useTranslation(),
|
|
665
421
|
t = _useTranslation.t;
|
|
666
|
-
var handleCSVFile =
|
|
667
|
-
|
|
668
|
-
var _sendToFieldRef$curre
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
(_sendToFieldRef$curre = sendToFieldRef.current) === null || _sendToFieldRef$curre === void 0 ? void 0 : _sendToFieldRef$curre.focus();
|
|
680
|
-
_context.next = 10;
|
|
681
|
-
break;
|
|
682
|
-
case 7:
|
|
683
|
-
_context.prev = 7;
|
|
684
|
-
_context.t0 = _context["catch"](0);
|
|
685
|
-
Toastr.error(_context.t0);
|
|
686
|
-
case 10:
|
|
687
|
-
case "end":
|
|
688
|
-
return _context.stop();
|
|
689
|
-
}
|
|
690
|
-
}, _callee, null, [[0, 7]]);
|
|
691
|
-
}));
|
|
692
|
-
return function handleCSVFile(_x) {
|
|
693
|
-
return _ref2.apply(this, arguments);
|
|
694
|
-
};
|
|
695
|
-
}();
|
|
422
|
+
var handleCSVFile = function handleCSVFile(file) {
|
|
423
|
+
try {
|
|
424
|
+
var _sendToFieldRef$curre;
|
|
425
|
+
var onSuccess = function onSuccess(values) {
|
|
426
|
+
return setFieldValue(emailInputProps.name || "sendTo", [].concat(_toConsumableArray(existingSendToEmails), _toConsumableArray(values)));
|
|
427
|
+
};
|
|
428
|
+
parseCsvEmails(file, onSuccess);
|
|
429
|
+
setIsBulkUploadPaneOpen(false);
|
|
430
|
+
(_sendToFieldRef$curre = sendToFieldRef.current) === null || _sendToFieldRef$curre === void 0 ? void 0 : _sendToFieldRef$curre.focus();
|
|
431
|
+
} catch (error) {
|
|
432
|
+
Toastr.error(error);
|
|
433
|
+
}
|
|
434
|
+
};
|
|
696
435
|
var handelCcBccButtonClick = function handelCcBccButtonClick(e) {
|
|
697
436
|
e.stopPropagation();
|
|
698
437
|
setFieldValue("showCopyEmails", !showCopyEmails);
|
|
699
438
|
};
|
|
700
439
|
return /*#__PURE__*/React.createElement("div", {
|
|
701
440
|
className: "relative w-full flex-col gap-2"
|
|
702
|
-
}, showUploadCsvButton && /*#__PURE__*/React.createElement(
|
|
703
|
-
className: "absolute top-0 right-1"
|
|
704
|
-
|
|
705
|
-
types: ALLOWED_FILE_PICKER_TYPES,
|
|
706
|
-
onChange: handleCSVFile
|
|
707
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
708
|
-
"data-cy": "upload-csv-button",
|
|
441
|
+
}, showUploadCsvButton && /*#__PURE__*/React.createElement(Button, {
|
|
442
|
+
className: "absolute top-0 right-1",
|
|
443
|
+
"data-testid": "bulk-upload-button",
|
|
709
444
|
icon: Upload,
|
|
710
|
-
label: t("neetoMolecules.
|
|
445
|
+
label: t("neetoMolecules.shareViaLink.bulkUpload"),
|
|
711
446
|
size: "small",
|
|
712
447
|
style: "link",
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
position: "right"
|
|
448
|
+
onClick: function onClick() {
|
|
449
|
+
return setIsBulkUploadPaneOpen(true);
|
|
716
450
|
}
|
|
717
|
-
})
|
|
451
|
+
}), /*#__PURE__*/React.createElement(MultiEmailInput, _extends({
|
|
718
452
|
"data-testid": "emails",
|
|
719
453
|
name: "sendTo",
|
|
720
454
|
ref: sendToFieldRef
|
|
@@ -733,7 +467,15 @@ var SendToFields = function SendToFields(_ref) {
|
|
|
733
467
|
name: "sendToBcc"
|
|
734
468
|
}, ccInputProps)), /*#__PURE__*/React.createElement(MultiEmailInput, _extends({
|
|
735
469
|
name: "sendToCc"
|
|
736
|
-
}, bccInputProps)))
|
|
470
|
+
}, bccInputProps))), /*#__PURE__*/React.createElement(BulkUploadPane, {
|
|
471
|
+
fileSize: globalProps.endUserUploadedFileSizeLimitInMb,
|
|
472
|
+
fileType: ALLOWED_FILE_TYPES,
|
|
473
|
+
handleFileSubmit: handleCSVFile,
|
|
474
|
+
isOpen: isBulkUploadPaneOpen,
|
|
475
|
+
onClose: function onClose() {
|
|
476
|
+
return setIsBulkUploadPaneOpen(false);
|
|
477
|
+
}
|
|
478
|
+
}));
|
|
737
479
|
};
|
|
738
480
|
|
|
739
481
|
var SendToField = withT(function (_ref) {
|
|
@@ -761,46 +503,6 @@ var SendToField = withT(function (_ref) {
|
|
|
761
503
|
});
|
|
762
504
|
});
|
|
763
505
|
|
|
764
|
-
function _arrayWithHoles(arr) {
|
|
765
|
-
if (Array.isArray(arr)) return arr;
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
function _iterableToArrayLimit(arr, i) {
|
|
769
|
-
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
770
|
-
if (null != _i) {
|
|
771
|
-
var _s,
|
|
772
|
-
_e,
|
|
773
|
-
_x,
|
|
774
|
-
_r,
|
|
775
|
-
_arr = [],
|
|
776
|
-
_n = !0,
|
|
777
|
-
_d = !1;
|
|
778
|
-
try {
|
|
779
|
-
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
780
|
-
if (Object(_i) !== _i) return;
|
|
781
|
-
_n = !1;
|
|
782
|
-
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
783
|
-
} catch (err) {
|
|
784
|
-
_d = !0, _e = err;
|
|
785
|
-
} finally {
|
|
786
|
-
try {
|
|
787
|
-
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
|
788
|
-
} finally {
|
|
789
|
-
if (_d) throw _e;
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
return _arr;
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
function _nonIterableRest() {
|
|
797
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
function _slicedToArray(arr, i) {
|
|
801
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
802
|
-
}
|
|
803
|
-
|
|
804
506
|
var SubjectField = function SubjectField(_ref) {
|
|
805
507
|
var name = _ref.name,
|
|
806
508
|
text = _ref.text,
|
|
@@ -2217,7 +1919,7 @@ var EmailPreview = withT(function (_ref) {
|
|
|
2217
1919
|
return /*#__PURE__*/React.createElement("div", {
|
|
2218
1920
|
"data-cy": "email-preview-card",
|
|
2219
1921
|
"data-testid": "email-preview",
|
|
2220
|
-
className: classnames("neeto-ui-border-gray-300 neeto-ui-shadow-m neeto-ui-bg-white flex flex-1 flex-col border",
|
|
1922
|
+
className: classnames("neeto-ui-border-gray-300 neeto-ui-shadow-m neeto-ui-bg-white flex flex-1 flex-col border", className)
|
|
2221
1923
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2222
1924
|
className: "neeto-ui-border-gray-300 space-y-3 divide-y divide-gray-200 border-b p-6"
|
|
2223
1925
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -2228,7 +1930,7 @@ var EmailPreview = withT(function (_ref) {
|
|
|
2228
1930
|
className: "neeto-ui-text-gray-500",
|
|
2229
1931
|
lineHeight: "normal",
|
|
2230
1932
|
style: "body2"
|
|
2231
|
-
}, t("neetoMolecules.emailPreview.to"), ":"), isPresent(to)
|
|
1933
|
+
}, t("neetoMolecules.emailPreview.to"), ":"), isPresent(to) ? /*#__PURE__*/React.createElement(Typography, {
|
|
2232
1934
|
className: "neeto-ui-text-gray-800 min-w-0 flex-grow break-words",
|
|
2233
1935
|
lineHeight: "normal",
|
|
2234
1936
|
style: "body2"
|