@wise/dynamic-flow-client-internal 4.26.0 → 4.27.0-experimental-f13a826
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/build/i18n/hu.json +1 -1
- package/build/i18n/nl.json +1 -1
- package/build/main.js +489 -477
- package/build/main.mjs +459 -447
- package/build/types/index.d.ts +1 -1
- package/package.json +17 -17
- package/build/types/dynamicFlow/renderers.d.ts +0 -7
package/build/main.js
CHANGED
|
@@ -62,12 +62,13 @@ __export(index_exports, {
|
|
|
62
62
|
DynamicFlowLegacy: () => DynamicFlowLegacy,
|
|
63
63
|
DynamicFlowRevamp: () => DynamicFlowRevamp,
|
|
64
64
|
DynamicForm: () => DynamicForm,
|
|
65
|
-
Header: () =>
|
|
65
|
+
Header: () => Header7,
|
|
66
66
|
JsonSchemaForm: () => import_dynamic_flow_client4.JsonSchemaForm,
|
|
67
|
+
Media: () => Media,
|
|
67
68
|
findRendererPropsByType: () => import_dynamic_flow_client4.findRendererPropsByType,
|
|
68
|
-
getButtonV2Renderers: () =>
|
|
69
|
-
getListItemRenderers: () =>
|
|
70
|
-
getMargin: () =>
|
|
69
|
+
getButtonV2Renderers: () => getButtonV2Renderers,
|
|
70
|
+
getListItemRenderers: () => getListItemRenderers,
|
|
71
|
+
getMargin: () => getMargin,
|
|
71
72
|
isValidSchema: () => import_dynamic_flow_client4.isValidSchema,
|
|
72
73
|
makeCustomFetch: () => import_dynamic_flow_client3.makeHttpClient,
|
|
73
74
|
translations: () => i18n_default
|
|
@@ -361,185 +362,16 @@ var mapStatusToSentiment = (validation) => {
|
|
|
361
362
|
var FieldInput_default = FieldInput;
|
|
362
363
|
|
|
363
364
|
// ../renderers/src/CheckboxInputRenderer.tsx
|
|
364
|
-
var
|
|
365
|
-
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
366
|
-
var CheckboxInputRenderer = {
|
|
367
|
-
canRenderType: "input-checkbox",
|
|
368
|
-
render: (props) => {
|
|
369
|
-
const _a = props, {
|
|
370
|
-
id,
|
|
371
|
-
control,
|
|
372
|
-
title = "",
|
|
373
|
-
description,
|
|
374
|
-
help,
|
|
375
|
-
type,
|
|
376
|
-
validationState,
|
|
377
|
-
value
|
|
378
|
-
} = _a, rest = __objRest(_a, [
|
|
379
|
-
"id",
|
|
380
|
-
"control",
|
|
381
|
-
"title",
|
|
382
|
-
"description",
|
|
383
|
-
"help",
|
|
384
|
-
"type",
|
|
385
|
-
"validationState",
|
|
386
|
-
"value"
|
|
387
|
-
]);
|
|
388
|
-
const checkboxProps = __spreadProps(__spreadValues({}, rest), { label: title, secondary: description, checked: value });
|
|
389
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FieldInput_default, { id, label: "", description: "", validation: validationState, help, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_components6.Checkbox, __spreadValues({ id }, checkboxProps)) });
|
|
390
|
-
}
|
|
391
|
-
};
|
|
392
|
-
var CheckboxInputRenderer_default = CheckboxInputRenderer;
|
|
393
|
-
|
|
394
|
-
// ../renderers/src/ColumnsRenderer.tsx
|
|
395
|
-
var import_classnames2 = __toESM(require("classnames"));
|
|
396
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
397
|
-
var ColumnsRenderer = {
|
|
398
|
-
canRenderType: "columns",
|
|
399
|
-
render: ({ bias, margin, startChildren, endChildren }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
400
|
-
"div",
|
|
401
|
-
{
|
|
402
|
-
className: (0, import_classnames2.default)("df-columns-renderer-container", getMargin(margin), {
|
|
403
|
-
"df-columns-renderer-bias-start": bias === "start",
|
|
404
|
-
"df-columns-renderer-bias-end": bias === "end"
|
|
405
|
-
}),
|
|
406
|
-
children: [
|
|
407
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "df-columns-renderer-column", children: startChildren }),
|
|
408
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "df-columns-renderer-column", children: endChildren })
|
|
409
|
-
]
|
|
410
|
-
}
|
|
411
|
-
)
|
|
412
|
-
};
|
|
413
|
-
var ColumnsRenderer_default = ColumnsRenderer;
|
|
414
|
-
|
|
415
|
-
// ../renderers/src/components/VariableDateInput.tsx
|
|
416
|
-
var import_components7 = require("@transferwise/components");
|
|
417
|
-
|
|
418
|
-
// ../renderers/src/validators/type-validators.ts
|
|
419
|
-
var isNumber = (value) => typeof value === "number" && !Number.isNaN(value);
|
|
420
|
-
|
|
421
|
-
// ../renderers/src/utils/value-utils.ts
|
|
422
|
-
var dateStringToDateOrNull = (dateString) => {
|
|
423
|
-
if (!dateString) {
|
|
424
|
-
return null;
|
|
425
|
-
}
|
|
426
|
-
const [year, month, date] = dateString.split("-").map((number) => Number.parseInt(number, 10));
|
|
427
|
-
if (!isNumber(year) || !isNumber(month) || !isNumber(date)) {
|
|
428
|
-
return null;
|
|
429
|
-
}
|
|
430
|
-
return new Date(year, month - 1, date);
|
|
431
|
-
};
|
|
432
|
-
var dateToDateString = (date) => {
|
|
433
|
-
const d = new Date(date);
|
|
434
|
-
const month = String(d.getMonth() + 1);
|
|
435
|
-
const day = String(d.getDate());
|
|
436
|
-
const year = d.getFullYear();
|
|
437
|
-
const formattedMonth = month.length < 2 ? `0${month}` : month;
|
|
438
|
-
const formattedDay = day.length < 2 ? `0${day}` : day;
|
|
439
|
-
return [year, formattedMonth, formattedDay].join("-");
|
|
440
|
-
};
|
|
441
|
-
|
|
442
|
-
// ../renderers/src/components/VariableDateInput.tsx
|
|
443
|
-
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
444
|
-
function VariableDateInput({
|
|
445
|
-
control,
|
|
446
|
-
inputProps
|
|
447
|
-
}) {
|
|
448
|
-
const {
|
|
449
|
-
autoComplete,
|
|
450
|
-
minimumDate,
|
|
451
|
-
maximumDate,
|
|
452
|
-
placeholder,
|
|
453
|
-
disabled,
|
|
454
|
-
onBlur,
|
|
455
|
-
onChange,
|
|
456
|
-
onFocus
|
|
457
|
-
} = inputProps;
|
|
458
|
-
if (control === "date-lookup") {
|
|
459
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
460
|
-
import_components7.DateLookup,
|
|
461
|
-
{
|
|
462
|
-
value: dateStringToDateOrNull(inputProps.value),
|
|
463
|
-
min: dateStringToDateOrNull(minimumDate),
|
|
464
|
-
max: dateStringToDateOrNull(maximumDate),
|
|
465
|
-
placeholder,
|
|
466
|
-
disabled,
|
|
467
|
-
onChange: (date) => {
|
|
468
|
-
onChange(date !== null ? dateToDateString(date) : null);
|
|
469
|
-
},
|
|
470
|
-
onBlur,
|
|
471
|
-
onFocus
|
|
472
|
-
}
|
|
473
|
-
);
|
|
474
|
-
}
|
|
475
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
476
|
-
import_components7.DateInput,
|
|
477
|
-
__spreadProps(__spreadValues({}, inputProps), {
|
|
478
|
-
dayAutoComplete: getAutocompleteString(autoComplete, "day"),
|
|
479
|
-
yearAutoComplete: getAutocompleteString(autoComplete, "year")
|
|
480
|
-
})
|
|
481
|
-
);
|
|
482
|
-
}
|
|
483
|
-
var getAutocompleteString = (value, suffix) => {
|
|
484
|
-
if (value === "bday") {
|
|
485
|
-
return `${value}-${suffix}`;
|
|
486
|
-
}
|
|
487
|
-
return void 0;
|
|
488
|
-
};
|
|
489
|
-
var VariableDateInput_default = VariableDateInput;
|
|
490
|
-
|
|
491
|
-
// ../renderers/src/DateInputRenderer.tsx
|
|
492
|
-
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
493
|
-
var DateInputRenderer = {
|
|
494
|
-
canRenderType: "input-date",
|
|
495
|
-
render: (props) => {
|
|
496
|
-
const _a = props, {
|
|
497
|
-
id,
|
|
498
|
-
control,
|
|
499
|
-
description,
|
|
500
|
-
type,
|
|
501
|
-
help,
|
|
502
|
-
title,
|
|
503
|
-
validationState,
|
|
504
|
-
value: initialValue
|
|
505
|
-
} = _a, rest = __objRest(_a, [
|
|
506
|
-
"id",
|
|
507
|
-
"control",
|
|
508
|
-
"description",
|
|
509
|
-
"type",
|
|
510
|
-
"help",
|
|
511
|
-
"title",
|
|
512
|
-
"validationState",
|
|
513
|
-
"value"
|
|
514
|
-
]);
|
|
515
|
-
const value = initialValue != null ? initialValue : "";
|
|
516
|
-
const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
|
|
517
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
518
|
-
FieldInput_default,
|
|
519
|
-
{
|
|
520
|
-
id,
|
|
521
|
-
label: title,
|
|
522
|
-
description,
|
|
523
|
-
validation: validationState,
|
|
524
|
-
help,
|
|
525
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(VariableDateInput_default, { control, inputProps })
|
|
526
|
-
}
|
|
527
|
-
);
|
|
528
|
-
}
|
|
529
|
-
};
|
|
530
|
-
var DateInputRenderer_default = DateInputRenderer;
|
|
531
|
-
|
|
532
|
-
// ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
|
|
533
|
-
var import_components13 = require("@transferwise/components");
|
|
365
|
+
var import_components9 = require("@transferwise/components");
|
|
534
366
|
|
|
535
367
|
// ../renderers/src/utils/UrnFlag.tsx
|
|
536
368
|
var import_art = require("@wise/art");
|
|
537
|
-
var
|
|
369
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
538
370
|
var countryUrnPrefix = "urn:wise:countries:";
|
|
539
371
|
var currencyUrnPrefix = "urn:wise:currencies:";
|
|
540
372
|
var isUrnFlag = (uri) => uri.startsWith(countryUrnPrefix) || uri.startsWith(currencyUrnPrefix);
|
|
541
373
|
function UrnFlag({ size, urn }) {
|
|
542
|
-
return /* @__PURE__ */ (0,
|
|
374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_art.Flag, { code: getCode(urn), intrinsicSize: size });
|
|
543
375
|
}
|
|
544
376
|
var getCode = (urn) => {
|
|
545
377
|
return urn.replace(countryUrnPrefix, "").replace(currencyUrnPrefix, "").replace(":image", "").split("?")[0];
|
|
@@ -547,19 +379,19 @@ var getCode = (urn) => {
|
|
|
547
379
|
|
|
548
380
|
// ../renderers/src/components/icon/FlagIcon.tsx
|
|
549
381
|
var import_art2 = require("@wise/art");
|
|
550
|
-
var
|
|
382
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
551
383
|
var isFlagIcon = (name) => name.startsWith("flag-");
|
|
552
384
|
function FlagIcon({ name }) {
|
|
553
385
|
if (!isFlagIcon(name)) {
|
|
554
386
|
return null;
|
|
555
387
|
}
|
|
556
388
|
const code = name.substring(5);
|
|
557
|
-
return /* @__PURE__ */ (0,
|
|
389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_art2.Flag, { code, intrinsicSize: 24 });
|
|
558
390
|
}
|
|
559
391
|
|
|
560
392
|
// ../renderers/src/components/icon/NamedIcon.tsx
|
|
561
393
|
var icons = __toESM(require("@transferwise/icons"));
|
|
562
|
-
var
|
|
394
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
563
395
|
var isNamedIcon = (name) => {
|
|
564
396
|
const iconName = toCapitalisedCamelCase(name);
|
|
565
397
|
return Object.keys(icons).includes(iconName);
|
|
@@ -570,19 +402,19 @@ function NamedIcon({ name }) {
|
|
|
570
402
|
}
|
|
571
403
|
const iconName = toCapitalisedCamelCase(name);
|
|
572
404
|
const Icon = icons[iconName];
|
|
573
|
-
return /* @__PURE__ */ (0,
|
|
405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { size: 24 });
|
|
574
406
|
}
|
|
575
407
|
var toCapitalisedCamelCase = (value) => value.split("-").map(capitaliseFirstChar).join("");
|
|
576
408
|
var capitaliseFirstChar = (value) => `${value[0].toUpperCase()}${value.slice(1)}`;
|
|
577
409
|
|
|
578
410
|
// ../renderers/src/components/icon/DynamicIcon.tsx
|
|
579
|
-
var
|
|
411
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
580
412
|
function DynamicIcon({ name }) {
|
|
581
413
|
if (isFlagIcon(name)) {
|
|
582
|
-
return /* @__PURE__ */ (0,
|
|
414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FlagIcon, { name });
|
|
583
415
|
}
|
|
584
416
|
if (isNamedIcon(name)) {
|
|
585
|
-
return /* @__PURE__ */ (0,
|
|
417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(NamedIcon, { name });
|
|
586
418
|
}
|
|
587
419
|
return null;
|
|
588
420
|
}
|
|
@@ -614,12 +446,12 @@ var stringToURN = (uri) => {
|
|
|
614
446
|
};
|
|
615
447
|
|
|
616
448
|
// ../renderers/src/components/Media/resolveMediaFromUri.tsx
|
|
617
|
-
var
|
|
449
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
618
450
|
var resolveMediaFromUri = (uri, size) => {
|
|
619
451
|
var _a, _b;
|
|
620
452
|
const { name, qComponents = [] } = stringToURN(uri);
|
|
621
453
|
if (isValidIconUrn(name)) {
|
|
622
|
-
const icon = /* @__PURE__ */ (0,
|
|
454
|
+
const icon = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DynamicIcon_default, { name: name.replace("urn:wise:icons:", "") });
|
|
623
455
|
return {
|
|
624
456
|
icon,
|
|
625
457
|
backgroundColor: formatColor((_a = qComponents.find(([key]) => key === "background-color")) == null ? void 0 : _a[1])
|
|
@@ -627,7 +459,7 @@ var resolveMediaFromUri = (uri, size) => {
|
|
|
627
459
|
}
|
|
628
460
|
if (isUrnFlag(name)) {
|
|
629
461
|
return {
|
|
630
|
-
asset: /* @__PURE__ */ (0,
|
|
462
|
+
asset: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(UrnFlag, { urn: name, size })
|
|
631
463
|
};
|
|
632
464
|
}
|
|
633
465
|
if (name.startsWith("data:text/plain,")) {
|
|
@@ -638,7 +470,7 @@ var resolveMediaFromUri = (uri, size) => {
|
|
|
638
470
|
};
|
|
639
471
|
}
|
|
640
472
|
if (!uri.startsWith("urn:")) {
|
|
641
|
-
return { asset: /* @__PURE__ */ (0,
|
|
473
|
+
return { asset: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("img", { src: uri, alt: "", width: `${size}px` }) };
|
|
642
474
|
}
|
|
643
475
|
return { asset: void 0 };
|
|
644
476
|
};
|
|
@@ -653,8 +485,8 @@ var formatColor = (color) => {
|
|
|
653
485
|
};
|
|
654
486
|
|
|
655
487
|
// ../renderers/src/components/Media/AvatarMedia.tsx
|
|
656
|
-
var
|
|
657
|
-
var
|
|
488
|
+
var import_components6 = require("@transferwise/components");
|
|
489
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
658
490
|
var AvatarMedia = ({
|
|
659
491
|
accessibilityDescription,
|
|
660
492
|
content,
|
|
@@ -674,8 +506,8 @@ var AvatarMedia = ({
|
|
|
674
506
|
if (!asset && !icon) {
|
|
675
507
|
return null;
|
|
676
508
|
}
|
|
677
|
-
return /* @__PURE__ */ (0,
|
|
678
|
-
|
|
509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
510
|
+
import_components6.AvatarView,
|
|
679
511
|
{
|
|
680
512
|
"aria-label": accessibilityDescription,
|
|
681
513
|
size,
|
|
@@ -691,8 +523,8 @@ var AvatarMedia = ({
|
|
|
691
523
|
var _b = _a, { badge } = _b, rest = __objRest(_b, ["badge"]);
|
|
692
524
|
return __spreadValues({}, rest);
|
|
693
525
|
});
|
|
694
|
-
return /* @__PURE__ */ (0,
|
|
695
|
-
|
|
526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
527
|
+
import_components6.AvatarLayout,
|
|
696
528
|
{
|
|
697
529
|
"aria-label": accessibilityDescription,
|
|
698
530
|
size,
|
|
@@ -703,12 +535,12 @@ var AvatarMedia = ({
|
|
|
703
535
|
};
|
|
704
536
|
|
|
705
537
|
// ../renderers/src/utils/image-utils.tsx
|
|
706
|
-
var
|
|
707
|
-
var
|
|
538
|
+
var import_components7 = require("@transferwise/components");
|
|
539
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
708
540
|
var getBadgedMedia = (iconNode, imageNode, size) => {
|
|
709
541
|
if (iconNode && imageNode) {
|
|
710
542
|
if (imageNode && iconNode) {
|
|
711
|
-
return /* @__PURE__ */ (0,
|
|
543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_components7.AvatarView, { size, badge: { asset: iconNode, type: "reference" }, children: imageNode });
|
|
712
544
|
}
|
|
713
545
|
}
|
|
714
546
|
return null;
|
|
@@ -716,7 +548,7 @@ var getBadgedMedia = (iconNode, imageNode, size) => {
|
|
|
716
548
|
var getIconNode = (icon) => {
|
|
717
549
|
if (icon) {
|
|
718
550
|
if ("name" in icon) {
|
|
719
|
-
return /* @__PURE__ */ (0,
|
|
551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DynamicIcon_default, { name: icon.name });
|
|
720
552
|
}
|
|
721
553
|
if (icon.text) {
|
|
722
554
|
return icon.text;
|
|
@@ -728,18 +560,18 @@ var getImageNode = (image, size) => {
|
|
|
728
560
|
if (image) {
|
|
729
561
|
const { accessibilityDescription, uri } = image;
|
|
730
562
|
if (!uri.startsWith("urn:")) {
|
|
731
|
-
return /* @__PURE__ */ (0,
|
|
563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("img", { src: uri, alt: accessibilityDescription, width: `${size}px` });
|
|
732
564
|
}
|
|
733
565
|
if (isUrnFlag(uri)) {
|
|
734
|
-
return /* @__PURE__ */ (0,
|
|
566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(UrnFlag, { urn: uri, accessibilityDescription, size });
|
|
735
567
|
}
|
|
736
568
|
}
|
|
737
569
|
return null;
|
|
738
570
|
};
|
|
739
571
|
|
|
740
572
|
// ../renderers/src/components/Media/LegacyMedia.tsx
|
|
741
|
-
var
|
|
742
|
-
var
|
|
573
|
+
var import_components8 = require("@transferwise/components");
|
|
574
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
743
575
|
var LegacyMedia = ({ image, icon, preferAvatar, size }) => {
|
|
744
576
|
const imageNode = getImageNode(image, size);
|
|
745
577
|
const iconNode = getIconNode(icon);
|
|
@@ -748,11 +580,11 @@ var LegacyMedia = ({ image, icon, preferAvatar, size }) => {
|
|
|
748
580
|
return badge;
|
|
749
581
|
}
|
|
750
582
|
if (imageNode) {
|
|
751
|
-
return preferAvatar ? /* @__PURE__ */ (0,
|
|
583
|
+
return preferAvatar ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_components8.AvatarView, { children: imageNode }) : imageNode;
|
|
752
584
|
}
|
|
753
585
|
if (iconNode && icon) {
|
|
754
586
|
if ("text" in icon || size === 48) {
|
|
755
|
-
return /* @__PURE__ */ (0,
|
|
587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_components8.AvatarView, { size, children: iconNode });
|
|
756
588
|
}
|
|
757
589
|
return iconNode;
|
|
758
590
|
}
|
|
@@ -760,7 +592,7 @@ var LegacyMedia = ({ image, icon, preferAvatar, size }) => {
|
|
|
760
592
|
};
|
|
761
593
|
|
|
762
594
|
// ../renderers/src/components/Media/Media.tsx
|
|
763
|
-
var
|
|
595
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
764
596
|
function Media({
|
|
765
597
|
media,
|
|
766
598
|
preferAvatar,
|
|
@@ -768,13 +600,13 @@ function Media({
|
|
|
768
600
|
}) {
|
|
769
601
|
switch (media == null ? void 0 : media.type) {
|
|
770
602
|
case "avatar":
|
|
771
|
-
return /* @__PURE__ */ (0,
|
|
603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AvatarMedia, __spreadProps(__spreadValues({}, media), { size }));
|
|
772
604
|
case "image": {
|
|
773
605
|
const { asset, icon } = resolveMediaFromUri(media.uri, size);
|
|
774
606
|
return icon != null ? icon : asset;
|
|
775
607
|
}
|
|
776
608
|
case "legacy": {
|
|
777
|
-
return /* @__PURE__ */ (0,
|
|
609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(LegacyMedia, __spreadProps(__spreadValues({}, media), { preferAvatar, size }));
|
|
778
610
|
}
|
|
779
611
|
default:
|
|
780
612
|
return null;
|
|
@@ -782,15 +614,205 @@ function Media({
|
|
|
782
614
|
}
|
|
783
615
|
|
|
784
616
|
// ../renderers/src/components/Media/OptionMedia.tsx
|
|
785
|
-
var
|
|
617
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
786
618
|
var mediaSize = 48;
|
|
787
619
|
function OptionMedia(props) {
|
|
788
|
-
return /* @__PURE__ */ (0,
|
|
620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Media, __spreadProps(__spreadValues({}, props), { size: mediaSize }));
|
|
789
621
|
}
|
|
790
622
|
|
|
791
623
|
// ../renderers/src/components/Media/getInlineMedia.tsx
|
|
624
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
625
|
+
var getInlineMedia = (media) => media ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Media, { media, preferAvatar: false, size: 24 }) : null;
|
|
626
|
+
|
|
627
|
+
// ../renderers/src/NewListItem/getMedia.tsx
|
|
628
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
629
|
+
var getMedia = (media, preferAvatar) => media ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(OptionMedia, { media, preferAvatar }) : void 0;
|
|
630
|
+
|
|
631
|
+
// ../renderers/src/CheckboxInputRenderer.tsx
|
|
632
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
633
|
+
var CheckboxInputRenderer = {
|
|
634
|
+
canRenderType: "input-checkbox",
|
|
635
|
+
render: (props) => props.control === "switch-item" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SwitchComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CheckboxComponent, __spreadValues({}, props))
|
|
636
|
+
};
|
|
637
|
+
var CheckboxComponent = (props) => {
|
|
638
|
+
const _a = props, {
|
|
639
|
+
id,
|
|
640
|
+
control,
|
|
641
|
+
title = "",
|
|
642
|
+
description,
|
|
643
|
+
help,
|
|
644
|
+
type,
|
|
645
|
+
validationState,
|
|
646
|
+
value
|
|
647
|
+
} = _a, rest = __objRest(_a, [
|
|
648
|
+
"id",
|
|
649
|
+
"control",
|
|
650
|
+
"title",
|
|
651
|
+
"description",
|
|
652
|
+
"help",
|
|
653
|
+
"type",
|
|
654
|
+
"validationState",
|
|
655
|
+
"value"
|
|
656
|
+
]);
|
|
657
|
+
const checkboxProps = __spreadProps(__spreadValues({}, rest), { label: title, secondary: description, checked: value });
|
|
658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FieldInput_default, { id, label: "", description: "", validation: validationState, help, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_components9.Checkbox, __spreadValues({ id }, checkboxProps)) });
|
|
659
|
+
};
|
|
660
|
+
var SwitchComponent = (props) => {
|
|
661
|
+
const { title, description, disabled, media, validationState, value, onChange } = props;
|
|
662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
663
|
+
import_components9.ListItem,
|
|
664
|
+
{
|
|
665
|
+
title,
|
|
666
|
+
subtitle: description,
|
|
667
|
+
media: getMedia(media, false),
|
|
668
|
+
disabled,
|
|
669
|
+
prompt: validationState && validationState.status === "invalid" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_components9.ListItem.Prompt, { sentiment: "negative", children: validationState.message }) : void 0,
|
|
670
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_components9.ListItem.Switch, { checked: value, onClick: () => onChange(!value) })
|
|
671
|
+
}
|
|
672
|
+
);
|
|
673
|
+
};
|
|
674
|
+
var CheckboxInputRenderer_default = CheckboxInputRenderer;
|
|
675
|
+
|
|
676
|
+
// ../renderers/src/ColumnsRenderer.tsx
|
|
677
|
+
var import_classnames2 = __toESM(require("classnames"));
|
|
678
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
679
|
+
var ColumnsRenderer = {
|
|
680
|
+
canRenderType: "columns",
|
|
681
|
+
render: ({ bias, margin, startChildren, endChildren }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
682
|
+
"div",
|
|
683
|
+
{
|
|
684
|
+
className: (0, import_classnames2.default)("df-columns-renderer-container", getMargin(margin), {
|
|
685
|
+
"df-columns-renderer-bias-start": bias === "start",
|
|
686
|
+
"df-columns-renderer-bias-end": bias === "end"
|
|
687
|
+
}),
|
|
688
|
+
children: [
|
|
689
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "df-columns-renderer-column", children: startChildren }),
|
|
690
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "df-columns-renderer-column", children: endChildren })
|
|
691
|
+
]
|
|
692
|
+
}
|
|
693
|
+
)
|
|
694
|
+
};
|
|
695
|
+
var ColumnsRenderer_default = ColumnsRenderer;
|
|
696
|
+
|
|
697
|
+
// ../renderers/src/components/VariableDateInput.tsx
|
|
698
|
+
var import_components10 = require("@transferwise/components");
|
|
699
|
+
|
|
700
|
+
// ../renderers/src/validators/type-validators.ts
|
|
701
|
+
var isNumber = (value) => typeof value === "number" && !Number.isNaN(value);
|
|
702
|
+
|
|
703
|
+
// ../renderers/src/utils/value-utils.ts
|
|
704
|
+
var dateStringToDateOrNull = (dateString) => {
|
|
705
|
+
if (!dateString) {
|
|
706
|
+
return null;
|
|
707
|
+
}
|
|
708
|
+
const [year, month, date] = dateString.split("-").map((number) => Number.parseInt(number, 10));
|
|
709
|
+
if (!isNumber(year) || !isNumber(month) || !isNumber(date)) {
|
|
710
|
+
return null;
|
|
711
|
+
}
|
|
712
|
+
return new Date(year, month - 1, date);
|
|
713
|
+
};
|
|
714
|
+
var dateToDateString = (date) => {
|
|
715
|
+
const d = new Date(date);
|
|
716
|
+
const month = String(d.getMonth() + 1);
|
|
717
|
+
const day = String(d.getDate());
|
|
718
|
+
const year = d.getFullYear();
|
|
719
|
+
const formattedMonth = month.length < 2 ? `0${month}` : month;
|
|
720
|
+
const formattedDay = day.length < 2 ? `0${day}` : day;
|
|
721
|
+
return [year, formattedMonth, formattedDay].join("-");
|
|
722
|
+
};
|
|
723
|
+
|
|
724
|
+
// ../renderers/src/components/VariableDateInput.tsx
|
|
792
725
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
793
|
-
|
|
726
|
+
function VariableDateInput({
|
|
727
|
+
control,
|
|
728
|
+
inputProps
|
|
729
|
+
}) {
|
|
730
|
+
const {
|
|
731
|
+
autoComplete,
|
|
732
|
+
minimumDate,
|
|
733
|
+
maximumDate,
|
|
734
|
+
placeholder,
|
|
735
|
+
disabled,
|
|
736
|
+
onBlur,
|
|
737
|
+
onChange,
|
|
738
|
+
onFocus
|
|
739
|
+
} = inputProps;
|
|
740
|
+
if (control === "date-lookup") {
|
|
741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
742
|
+
import_components10.DateLookup,
|
|
743
|
+
{
|
|
744
|
+
value: dateStringToDateOrNull(inputProps.value),
|
|
745
|
+
min: dateStringToDateOrNull(minimumDate),
|
|
746
|
+
max: dateStringToDateOrNull(maximumDate),
|
|
747
|
+
placeholder,
|
|
748
|
+
disabled,
|
|
749
|
+
onChange: (date) => {
|
|
750
|
+
onChange(date !== null ? dateToDateString(date) : null);
|
|
751
|
+
},
|
|
752
|
+
onBlur,
|
|
753
|
+
onFocus
|
|
754
|
+
}
|
|
755
|
+
);
|
|
756
|
+
}
|
|
757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
758
|
+
import_components10.DateInput,
|
|
759
|
+
__spreadProps(__spreadValues({}, inputProps), {
|
|
760
|
+
dayAutoComplete: getAutocompleteString(autoComplete, "day"),
|
|
761
|
+
yearAutoComplete: getAutocompleteString(autoComplete, "year")
|
|
762
|
+
})
|
|
763
|
+
);
|
|
764
|
+
}
|
|
765
|
+
var getAutocompleteString = (value, suffix) => {
|
|
766
|
+
if (value === "bday") {
|
|
767
|
+
return `${value}-${suffix}`;
|
|
768
|
+
}
|
|
769
|
+
return void 0;
|
|
770
|
+
};
|
|
771
|
+
var VariableDateInput_default = VariableDateInput;
|
|
772
|
+
|
|
773
|
+
// ../renderers/src/DateInputRenderer.tsx
|
|
774
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
775
|
+
var DateInputRenderer = {
|
|
776
|
+
canRenderType: "input-date",
|
|
777
|
+
render: (props) => {
|
|
778
|
+
const _a = props, {
|
|
779
|
+
id,
|
|
780
|
+
control,
|
|
781
|
+
description,
|
|
782
|
+
type,
|
|
783
|
+
help,
|
|
784
|
+
title,
|
|
785
|
+
validationState,
|
|
786
|
+
value: initialValue
|
|
787
|
+
} = _a, rest = __objRest(_a, [
|
|
788
|
+
"id",
|
|
789
|
+
"control",
|
|
790
|
+
"description",
|
|
791
|
+
"type",
|
|
792
|
+
"help",
|
|
793
|
+
"title",
|
|
794
|
+
"validationState",
|
|
795
|
+
"value"
|
|
796
|
+
]);
|
|
797
|
+
const value = initialValue != null ? initialValue : "";
|
|
798
|
+
const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
|
|
799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
800
|
+
FieldInput_default,
|
|
801
|
+
{
|
|
802
|
+
id,
|
|
803
|
+
label: title,
|
|
804
|
+
description,
|
|
805
|
+
validation: validationState,
|
|
806
|
+
help,
|
|
807
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(VariableDateInput_default, { control, inputProps })
|
|
808
|
+
}
|
|
809
|
+
);
|
|
810
|
+
}
|
|
811
|
+
};
|
|
812
|
+
var DateInputRenderer_default = DateInputRenderer;
|
|
813
|
+
|
|
814
|
+
// ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
|
|
815
|
+
var import_components13 = require("@transferwise/components");
|
|
794
816
|
|
|
795
817
|
// ../renderers/src/DecisionRenderer/DecisionList.tsx
|
|
796
818
|
var import_components12 = require("@transferwise/components");
|
|
@@ -840,7 +862,7 @@ var decision_messages_default = (0, import_react_intl5.defineMessages)({
|
|
|
840
862
|
});
|
|
841
863
|
|
|
842
864
|
// ../renderers/src/DecisionRenderer/GroupedList.tsx
|
|
843
|
-
var
|
|
865
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
844
866
|
var OPTION_GROUPS = {
|
|
845
867
|
popular: "popular",
|
|
846
868
|
recent: "recent",
|
|
@@ -855,21 +877,21 @@ var GroupedList = (_a) => {
|
|
|
855
877
|
const currencyWithAccountDetailsOptions = options.filter(
|
|
856
878
|
(option) => option.tag === OPTION_GROUPS.currencyWithAccountDetails
|
|
857
879
|
);
|
|
858
|
-
return /* @__PURE__ */ (0,
|
|
859
|
-
popularOptions.length > 0 ? /* @__PURE__ */ (0,
|
|
860
|
-
/* @__PURE__ */ (0,
|
|
880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
881
|
+
popularOptions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_components11.Section, { children: [
|
|
882
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components11.Header, { as: "h2", title: formatMessage(decision_messages_default.popular) }),
|
|
861
883
|
renderDecisionList3(__spreadProps(__spreadValues({}, rest), { options: popularOptions }))
|
|
862
884
|
] }) : null,
|
|
863
|
-
recentOptions.length > 0 ? /* @__PURE__ */ (0,
|
|
864
|
-
/* @__PURE__ */ (0,
|
|
885
|
+
recentOptions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_components11.Section, { children: [
|
|
886
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components11.Header, { as: "h2", title: formatMessage(decision_messages_default.recent) }),
|
|
865
887
|
renderDecisionList3(__spreadProps(__spreadValues({}, rest), { options: recentOptions }))
|
|
866
888
|
] }) : null,
|
|
867
|
-
currencyWithAccountDetailsOptions.length > 0 ? /* @__PURE__ */ (0,
|
|
868
|
-
/* @__PURE__ */ (0,
|
|
889
|
+
currencyWithAccountDetailsOptions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_components11.Section, { children: [
|
|
890
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components11.Header, { as: "h2", title: formatMessage(decision_messages_default.currenciesWithAccountDetails) }),
|
|
869
891
|
renderDecisionList3(__spreadProps(__spreadValues({}, rest), { options: currencyWithAccountDetailsOptions }))
|
|
870
892
|
] }) : null,
|
|
871
|
-
/* @__PURE__ */ (0,
|
|
872
|
-
/* @__PURE__ */ (0,
|
|
893
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_components11.Section, { children: [
|
|
894
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components11.Header, { as: "h2", title: formatMessage(decision_messages_default.all) }),
|
|
873
895
|
renderDecisionList3(rest)
|
|
874
896
|
] })
|
|
875
897
|
] });
|
|
@@ -922,16 +944,16 @@ function filterAndSortDecisionOptions(selectOptions, query) {
|
|
|
922
944
|
}
|
|
923
945
|
|
|
924
946
|
// ../renderers/src/DecisionRenderer/DecisionList.tsx
|
|
925
|
-
var
|
|
947
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
926
948
|
var DecisionWrapper = (props) => {
|
|
927
|
-
return /* @__PURE__ */ (0,
|
|
928
|
-
props.title && /* @__PURE__ */ (0,
|
|
929
|
-
props.control === "filtered" ? /* @__PURE__ */ (0,
|
|
949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: getMargin(props.margin), children: [
|
|
950
|
+
props.title && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_components12.Header, { as: "h2", title: props.title }),
|
|
951
|
+
props.control === "filtered" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(UnfilteredDecisionList, __spreadValues({}, props))
|
|
930
952
|
] });
|
|
931
953
|
};
|
|
932
954
|
var UnfilteredDecisionList = (_a) => {
|
|
933
955
|
var _b = _a, { renderDecisionList: renderDecisionList3 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
|
|
934
|
-
return isGroupedDecision(rest.options) ? /* @__PURE__ */ (0,
|
|
956
|
+
return isGroupedDecision(rest.options) ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(GroupedList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList3 })) : renderDecisionList3(rest);
|
|
935
957
|
};
|
|
936
958
|
var FilteredDecisionList = (props) => {
|
|
937
959
|
const { formatMessage } = (0, import_react_intl7.useIntl)();
|
|
@@ -939,8 +961,8 @@ var FilteredDecisionList = (props) => {
|
|
|
939
961
|
const { control, options, renderDecisionList: renderDecisionList3 } = props;
|
|
940
962
|
const filteredOptions = filterAndSortDecisionOptions(options, query);
|
|
941
963
|
const isGrouped = isGroupedDecision(options);
|
|
942
|
-
return /* @__PURE__ */ (0,
|
|
943
|
-
/* @__PURE__ */ (0,
|
|
964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
965
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
944
966
|
import_components12.SearchInput,
|
|
945
967
|
{
|
|
946
968
|
placeholder: formatMessage(decision_messages_default.filterPlaceholder),
|
|
@@ -951,35 +973,35 @@ var FilteredDecisionList = (props) => {
|
|
|
951
973
|
}
|
|
952
974
|
}
|
|
953
975
|
),
|
|
954
|
-
isGrouped && query.length === 0 ? /* @__PURE__ */ (0,
|
|
955
|
-
query.length > 0 && /* @__PURE__ */ (0,
|
|
976
|
+
isGrouped && query.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(GroupedList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
977
|
+
query.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_components12.Header, { as: "h2", title: formatMessage(decision_messages_default.results), className: "m-t-4" }),
|
|
956
978
|
filteredOptions.length > 0 ? renderDecisionList3({
|
|
957
979
|
control,
|
|
958
980
|
className: query.length === 0 ? "m-t-3" : "",
|
|
959
981
|
options: filteredOptions
|
|
960
|
-
}) : /* @__PURE__ */ (0,
|
|
982
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { children: formatMessage(decision_messages_default.noResults) })
|
|
961
983
|
] })
|
|
962
984
|
] });
|
|
963
985
|
};
|
|
964
986
|
|
|
965
987
|
// ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
|
|
966
|
-
var
|
|
988
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
967
989
|
var DecisionRenderer = {
|
|
968
990
|
canRenderType: "decision",
|
|
969
991
|
render: (props) => {
|
|
970
|
-
return /* @__PURE__ */ (0,
|
|
992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }));
|
|
971
993
|
}
|
|
972
994
|
};
|
|
973
995
|
var renderDecisionList = ({ options, className, control }) => {
|
|
974
|
-
return /* @__PURE__ */ (0,
|
|
996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_components13.NavigationOptionsList, { children: options.map((option) => {
|
|
975
997
|
const { description, disabled, media, title: itemTitle, tag, onClick } = option;
|
|
976
|
-
return /* @__PURE__ */ (0,
|
|
998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
977
999
|
import_components13.NavigationOption,
|
|
978
1000
|
{
|
|
979
1001
|
title: itemTitle,
|
|
980
1002
|
content: description,
|
|
981
1003
|
disabled,
|
|
982
|
-
media: media ? /* @__PURE__ */ (0,
|
|
1004
|
+
media: media ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
983
1005
|
OptionMedia,
|
|
984
1006
|
{
|
|
985
1007
|
media,
|
|
@@ -998,7 +1020,7 @@ var DecisionRenderer_default = DecisionRenderer;
|
|
|
998
1020
|
|
|
999
1021
|
// ../renderers/src/DividerRenderer.tsx
|
|
1000
1022
|
var import_components14 = require("@transferwise/components");
|
|
1001
|
-
var
|
|
1023
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1002
1024
|
var mapControlToLevel = (control) => {
|
|
1003
1025
|
switch (control) {
|
|
1004
1026
|
case "section":
|
|
@@ -1011,7 +1033,7 @@ var mapControlToLevel = (control) => {
|
|
|
1011
1033
|
};
|
|
1012
1034
|
var DividerRenderer = {
|
|
1013
1035
|
canRenderType: "divider",
|
|
1014
|
-
render: ({ margin, control }) => /* @__PURE__ */ (0,
|
|
1036
|
+
render: ({ margin, control }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_components14.Divider, { className: `m-t-0 d-block ${getMargin(margin)}`, level: mapControlToLevel(control) })
|
|
1015
1037
|
};
|
|
1016
1038
|
var DividerRenderer_default = DividerRenderer;
|
|
1017
1039
|
|
|
@@ -1046,7 +1068,7 @@ var external_confirmation_messages_default = (0, import_react_intl8.defineMessag
|
|
|
1046
1068
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
1047
1069
|
var import_react_intl9 = require("react-intl");
|
|
1048
1070
|
var import_react4 = require("react");
|
|
1049
|
-
var
|
|
1071
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1050
1072
|
var ExternalConfirmationRenderer = {
|
|
1051
1073
|
canRenderType: "external-confirmation",
|
|
1052
1074
|
render: ExternalConfirmationRendererComponent
|
|
@@ -1069,15 +1091,15 @@ function ExternalConfirmationRendererComponent({
|
|
|
1069
1091
|
}
|
|
1070
1092
|
}
|
|
1071
1093
|
}, []);
|
|
1072
|
-
return /* @__PURE__ */ (0,
|
|
1094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1073
1095
|
import_components15.Modal,
|
|
1074
1096
|
{
|
|
1075
1097
|
open: status === "failure",
|
|
1076
1098
|
title: formatMessage(external_confirmation_messages_default.title),
|
|
1077
|
-
body: /* @__PURE__ */ (0,
|
|
1078
|
-
/* @__PURE__ */ (0,
|
|
1079
|
-
/* @__PURE__ */ (0,
|
|
1080
|
-
/* @__PURE__ */ (0,
|
|
1099
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
|
|
1100
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components15.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
|
|
1101
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
|
|
1102
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1081
1103
|
import_components15.Button,
|
|
1082
1104
|
{
|
|
1083
1105
|
v2: true,
|
|
@@ -1092,7 +1114,7 @@ function ExternalConfirmationRendererComponent({
|
|
|
1092
1114
|
children: formatMessage(external_confirmation_messages_default.open)
|
|
1093
1115
|
}
|
|
1094
1116
|
),
|
|
1095
|
-
/* @__PURE__ */ (0,
|
|
1117
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components15.Button, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
|
|
1096
1118
|
] }) })
|
|
1097
1119
|
] }),
|
|
1098
1120
|
onClose: onCancel
|
|
@@ -1109,27 +1131,27 @@ function getOrigin(url) {
|
|
|
1109
1131
|
var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
|
|
1110
1132
|
|
|
1111
1133
|
// ../renderers/src/FormRenderer.tsx
|
|
1112
|
-
var
|
|
1134
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1113
1135
|
var FormRenderer = {
|
|
1114
1136
|
canRenderType: "form",
|
|
1115
|
-
render: ({ children, margin }) => /* @__PURE__ */ (0,
|
|
1137
|
+
render: ({ children, margin }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: getMargin(margin), children })
|
|
1116
1138
|
};
|
|
1117
1139
|
var FormRenderer_default = FormRenderer;
|
|
1118
1140
|
|
|
1119
1141
|
// ../renderers/src/FormSectionRenderer.tsx
|
|
1120
1142
|
var import_components16 = require("@transferwise/components");
|
|
1121
|
-
var
|
|
1143
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1122
1144
|
var FormSectionRenderer = {
|
|
1123
1145
|
canRenderType: "form-section",
|
|
1124
|
-
render: ({ title, description, children }) => /* @__PURE__ */ (0,
|
|
1125
|
-
title && /* @__PURE__ */ (0,
|
|
1146
|
+
render: ({ title, description, children }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("fieldset", { children: [
|
|
1147
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1126
1148
|
import_components16.Header,
|
|
1127
1149
|
{
|
|
1128
1150
|
as: "h2",
|
|
1129
1151
|
title
|
|
1130
1152
|
}
|
|
1131
1153
|
),
|
|
1132
|
-
description && /* @__PURE__ */ (0,
|
|
1154
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { children: description }),
|
|
1133
1155
|
children
|
|
1134
1156
|
] })
|
|
1135
1157
|
};
|
|
@@ -1137,18 +1159,18 @@ var FormSectionRenderer_default = FormSectionRenderer;
|
|
|
1137
1159
|
|
|
1138
1160
|
// ../renderers/src/HeadingRenderer.tsx
|
|
1139
1161
|
var import_components17 = require("@transferwise/components");
|
|
1140
|
-
var
|
|
1162
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1141
1163
|
var HeadingRenderer = {
|
|
1142
1164
|
canRenderType: "heading",
|
|
1143
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
1165
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, __spreadValues({}, props))
|
|
1144
1166
|
};
|
|
1145
1167
|
function Heading(props) {
|
|
1146
1168
|
const { text, size, align, margin, control } = props;
|
|
1147
1169
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
1148
|
-
return control === "display" ? /* @__PURE__ */ (0,
|
|
1170
|
+
return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StandardHeading, { size, text, className });
|
|
1149
1171
|
}
|
|
1150
1172
|
function DisplayHeading({ size, text, className }) {
|
|
1151
|
-
return /* @__PURE__ */ (0,
|
|
1173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components17.Display, { type: getDisplayType(size), className, children: text });
|
|
1152
1174
|
}
|
|
1153
1175
|
var getDisplayType = (size) => {
|
|
1154
1176
|
switch (size) {
|
|
@@ -1164,7 +1186,7 @@ var getDisplayType = (size) => {
|
|
|
1164
1186
|
}
|
|
1165
1187
|
};
|
|
1166
1188
|
function StandardHeading({ size, text, className }) {
|
|
1167
|
-
return /* @__PURE__ */ (0,
|
|
1189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components17.Title, { type: getTitleTypeBySize(size), className, children: text });
|
|
1168
1190
|
}
|
|
1169
1191
|
var getTitleTypeBySize = (size) => {
|
|
1170
1192
|
var _a;
|
|
@@ -1191,7 +1213,7 @@ function isRelativePath(url = "") {
|
|
|
1191
1213
|
}
|
|
1192
1214
|
|
|
1193
1215
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
1194
|
-
var
|
|
1216
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1195
1217
|
function UrlImage({
|
|
1196
1218
|
accessibilityDescription,
|
|
1197
1219
|
align,
|
|
@@ -1206,7 +1228,7 @@ function UrlImage({
|
|
|
1206
1228
|
void getImageSource(httpClient, uri).then(setImageSource);
|
|
1207
1229
|
}
|
|
1208
1230
|
}, [uri, httpClient]);
|
|
1209
|
-
return /* @__PURE__ */ (0,
|
|
1231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: `df-image ${align} ${size || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1210
1232
|
import_components18.Image,
|
|
1211
1233
|
{
|
|
1212
1234
|
className: `img-responsive ${getMargin(margin)}`,
|
|
@@ -1250,7 +1272,7 @@ var getImageSource = async (httpClient, imageUrl) => {
|
|
|
1250
1272
|
};
|
|
1251
1273
|
|
|
1252
1274
|
// ../renderers/src/ImageRenderer/UrnFlagImage.tsx
|
|
1253
|
-
var
|
|
1275
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1254
1276
|
var maxFlagSize = 600;
|
|
1255
1277
|
function UrnFlagImage({
|
|
1256
1278
|
accessibilityDescription,
|
|
@@ -1259,7 +1281,7 @@ function UrnFlagImage({
|
|
|
1259
1281
|
size,
|
|
1260
1282
|
uri
|
|
1261
1283
|
}) {
|
|
1262
|
-
return /* @__PURE__ */ (0,
|
|
1284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
|
|
1263
1285
|
}
|
|
1264
1286
|
|
|
1265
1287
|
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
@@ -1276,7 +1298,7 @@ var isAnimated = (uri) => {
|
|
|
1276
1298
|
// ../renderers/src/ImageRenderer/SafeIllustration3D.tsx
|
|
1277
1299
|
var import_art3 = require("@wise/art");
|
|
1278
1300
|
var import_react6 = require("react");
|
|
1279
|
-
var
|
|
1301
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1280
1302
|
var Illustration3DErrorBoundary = class extends import_react6.Component {
|
|
1281
1303
|
constructor(props) {
|
|
1282
1304
|
super(props);
|
|
@@ -1300,12 +1322,12 @@ var SafeIllustration3D = ({
|
|
|
1300
1322
|
size,
|
|
1301
1323
|
onError
|
|
1302
1324
|
}) => {
|
|
1303
|
-
return /* @__PURE__ */ (0,
|
|
1325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Illustration3DErrorBoundary, { onError, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_art3.Illustration3D, { name, size }) });
|
|
1304
1326
|
};
|
|
1305
1327
|
var SafeIllustration3D_default = SafeIllustration3D;
|
|
1306
1328
|
|
|
1307
1329
|
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
1308
|
-
var
|
|
1330
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1309
1331
|
var urnPrefix = "urn:wise:illustrations:";
|
|
1310
1332
|
var isUrnIllustration = (uri) => uri.startsWith(urnPrefix);
|
|
1311
1333
|
function UrnIllustration({
|
|
@@ -1320,7 +1342,7 @@ function UrnIllustration({
|
|
|
1320
1342
|
const illustrationName = getIllustrationName(uri);
|
|
1321
1343
|
const illustration3DName = getIllustration3DName(uri);
|
|
1322
1344
|
if (illustration3DName && isAnimated(uri) && !has3DFailed) {
|
|
1323
|
-
return /* @__PURE__ */ (0,
|
|
1345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1324
1346
|
SafeIllustration3D_default,
|
|
1325
1347
|
{
|
|
1326
1348
|
name: illustration3DName,
|
|
@@ -1329,7 +1351,7 @@ function UrnIllustration({
|
|
|
1329
1351
|
}
|
|
1330
1352
|
) });
|
|
1331
1353
|
}
|
|
1332
|
-
return /* @__PURE__ */ (0,
|
|
1354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1333
1355
|
import_art4.Illustration,
|
|
1334
1356
|
{
|
|
1335
1357
|
className: "df-illustration",
|
|
@@ -1349,24 +1371,24 @@ var getIllustration3DName = (uri) => {
|
|
|
1349
1371
|
};
|
|
1350
1372
|
|
|
1351
1373
|
// ../renderers/src/ImageRenderer/UrnImage.tsx
|
|
1352
|
-
var
|
|
1374
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1353
1375
|
var isUrnImage = (uri) => uri.startsWith("urn:");
|
|
1354
1376
|
function UrnImage(props) {
|
|
1355
1377
|
const { uri } = props;
|
|
1356
1378
|
if (isUrnIllustration(uri)) {
|
|
1357
|
-
return /* @__PURE__ */ (0,
|
|
1379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(UrnIllustration, __spreadValues({}, props));
|
|
1358
1380
|
}
|
|
1359
1381
|
if (isUrnFlag(uri)) {
|
|
1360
|
-
return /* @__PURE__ */ (0,
|
|
1382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(UrnFlagImage, __spreadValues({}, props));
|
|
1361
1383
|
}
|
|
1362
1384
|
return null;
|
|
1363
1385
|
}
|
|
1364
1386
|
|
|
1365
1387
|
// ../renderers/src/ImageRenderer/ImageRenderer.tsx
|
|
1366
|
-
var
|
|
1388
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1367
1389
|
var ImageRenderer = {
|
|
1368
1390
|
canRenderType: "image",
|
|
1369
|
-
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0,
|
|
1391
|
+
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(UrlImage, __spreadValues({}, props))
|
|
1370
1392
|
};
|
|
1371
1393
|
|
|
1372
1394
|
// ../renderers/src/ImageRenderer/index.tsx
|
|
@@ -1374,7 +1396,7 @@ var ImageRenderer_default = ImageRenderer;
|
|
|
1374
1396
|
|
|
1375
1397
|
// ../renderers/src/InstructionsRenderer.tsx
|
|
1376
1398
|
var import_components19 = require("@transferwise/components");
|
|
1377
|
-
var
|
|
1399
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1378
1400
|
var doContext = ["positive", "neutral"];
|
|
1379
1401
|
var dontContext = ["warning", "negative"];
|
|
1380
1402
|
var InstructionsRenderer = {
|
|
@@ -1382,9 +1404,9 @@ var InstructionsRenderer = {
|
|
|
1382
1404
|
render: ({ items, margin, title }) => {
|
|
1383
1405
|
const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
|
|
1384
1406
|
const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
|
|
1385
|
-
return /* @__PURE__ */ (0,
|
|
1386
|
-
title ? /* @__PURE__ */ (0,
|
|
1387
|
-
/* @__PURE__ */ (0,
|
|
1407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: getMargin(margin), children: [
|
|
1408
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_components19.Header, { title }) : null,
|
|
1409
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_components19.InstructionsList, { dos, donts })
|
|
1388
1410
|
] });
|
|
1389
1411
|
}
|
|
1390
1412
|
};
|
|
@@ -1416,7 +1438,7 @@ function pick(obj, ...keys) {
|
|
|
1416
1438
|
}
|
|
1417
1439
|
|
|
1418
1440
|
// ../renderers/src/IntegerInputRenderer.tsx
|
|
1419
|
-
var
|
|
1441
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1420
1442
|
var IntegerInputRenderer = {
|
|
1421
1443
|
canRenderType: "input-integer",
|
|
1422
1444
|
render: (props) => {
|
|
@@ -1431,7 +1453,7 @@ var IntegerInputRenderer = {
|
|
|
1431
1453
|
"maximum",
|
|
1432
1454
|
"minimum"
|
|
1433
1455
|
);
|
|
1434
|
-
return /* @__PURE__ */ (0,
|
|
1456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1435
1457
|
FieldInput_default,
|
|
1436
1458
|
{
|
|
1437
1459
|
id,
|
|
@@ -1439,7 +1461,7 @@ var IntegerInputRenderer = {
|
|
|
1439
1461
|
description,
|
|
1440
1462
|
validation: validationState,
|
|
1441
1463
|
help,
|
|
1442
|
-
children: /* @__PURE__ */ (0,
|
|
1464
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components20.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1443
1465
|
import_components20.Input,
|
|
1444
1466
|
__spreadValues({
|
|
1445
1467
|
id,
|
|
@@ -1464,12 +1486,12 @@ var IntegerInputRenderer_default = IntegerInputRenderer;
|
|
|
1464
1486
|
// ../renderers/src/ListRenderer.tsx
|
|
1465
1487
|
var import_components21 = require("@transferwise/components");
|
|
1466
1488
|
var import_classnames3 = __toESM(require("classnames"));
|
|
1467
|
-
var
|
|
1489
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1468
1490
|
var ListRenderer = {
|
|
1469
1491
|
canRenderType: "list",
|
|
1470
|
-
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ (0,
|
|
1471
|
-
(title || callToAction) && /* @__PURE__ */ (0,
|
|
1472
|
-
items.map((props) => /* @__PURE__ */ (0,
|
|
1492
|
+
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: getMargin(margin), children: [
|
|
1493
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components21.Header, { as: "h2", title: title != null ? title : "", action: getListAction(callToAction) }),
|
|
1494
|
+
items.map((props) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DesignSystemListItem, __spreadProps(__spreadValues({}, props), { control }), props.title))
|
|
1473
1495
|
] })
|
|
1474
1496
|
};
|
|
1475
1497
|
var DesignSystemListItem = ({
|
|
@@ -1481,15 +1503,15 @@ var DesignSystemListItem = ({
|
|
|
1481
1503
|
media,
|
|
1482
1504
|
control,
|
|
1483
1505
|
tag
|
|
1484
|
-
}) => /* @__PURE__ */ (0,
|
|
1506
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1485
1507
|
"label",
|
|
1486
1508
|
{
|
|
1487
1509
|
className: (0, import_classnames3.default)("np-option p-a-2", {
|
|
1488
1510
|
"np-option__sm-media": true,
|
|
1489
1511
|
"np-option__container-aligned": true
|
|
1490
1512
|
}),
|
|
1491
|
-
children: /* @__PURE__ */ (0,
|
|
1492
|
-
icon || image || media ? /* @__PURE__ */ (0,
|
|
1513
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "media", children: [
|
|
1514
|
+
icon || image || media ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "media-left", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1493
1515
|
ListItemMedia,
|
|
1494
1516
|
{
|
|
1495
1517
|
icon,
|
|
@@ -1497,14 +1519,14 @@ var DesignSystemListItem = ({
|
|
|
1497
1519
|
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
1498
1520
|
}
|
|
1499
1521
|
) }) : null,
|
|
1500
|
-
/* @__PURE__ */ (0,
|
|
1501
|
-
/* @__PURE__ */ (0,
|
|
1502
|
-
/* @__PURE__ */ (0,
|
|
1503
|
-
/* @__PURE__ */ (0,
|
|
1522
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "media-body", children: [
|
|
1523
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "d-flex justify-content-between", children: [
|
|
1524
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: title }),
|
|
1525
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: supportingValues == null ? void 0 : supportingValues.value })
|
|
1504
1526
|
] }),
|
|
1505
|
-
/* @__PURE__ */ (0,
|
|
1506
|
-
/* @__PURE__ */ (0,
|
|
1507
|
-
/* @__PURE__ */ (0,
|
|
1527
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "d-flex justify-content-between", children: [
|
|
1528
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components21.Body, { className: "d-block np-option__body", children: description }),
|
|
1529
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components21.Body, { className: "d-block np-option__body", children: supportingValues == null ? void 0 : supportingValues.subvalue })
|
|
1508
1530
|
] })
|
|
1509
1531
|
] })
|
|
1510
1532
|
] })
|
|
@@ -1517,9 +1539,9 @@ var ListItemMedia = ({
|
|
|
1517
1539
|
preferAvatar
|
|
1518
1540
|
}) => {
|
|
1519
1541
|
if (icon) {
|
|
1520
|
-
return /* @__PURE__ */ (0,
|
|
1542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "circle circle-sm text-primary circle-inverse", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(OptionMedia, { media, preferAvatar }) });
|
|
1521
1543
|
}
|
|
1522
|
-
return /* @__PURE__ */ (0,
|
|
1544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(OptionMedia, { media, preferAvatar }) });
|
|
1523
1545
|
};
|
|
1524
1546
|
var getListAction = (callToAction) => {
|
|
1525
1547
|
if (callToAction) {
|
|
@@ -1535,10 +1557,10 @@ var ListRenderer_default = ListRenderer;
|
|
|
1535
1557
|
|
|
1536
1558
|
// ../renderers/src/LoadingIndicatorRenderer.tsx
|
|
1537
1559
|
var import_components22 = require("@transferwise/components");
|
|
1538
|
-
var
|
|
1560
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1539
1561
|
var LoadingIndicatorRenderer = {
|
|
1540
1562
|
canRenderType: "loading-indicator",
|
|
1541
|
-
render: ({ margin, size }) => /* @__PURE__ */ (0,
|
|
1563
|
+
render: ({ margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1542
1564
|
import_components22.Loader,
|
|
1543
1565
|
{
|
|
1544
1566
|
size,
|
|
@@ -1551,28 +1573,28 @@ var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
|
|
|
1551
1573
|
|
|
1552
1574
|
// ../renderers/src/MarkdownRenderer.tsx
|
|
1553
1575
|
var import_components23 = require("@transferwise/components");
|
|
1554
|
-
var
|
|
1576
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1555
1577
|
var MarkdownRenderer = {
|
|
1556
1578
|
canRenderType: "markdown",
|
|
1557
|
-
render: ({ content, align, margin }) => /* @__PURE__ */ (0,
|
|
1579
|
+
render: ({ content, align, margin }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components23.Markdown, { className: "np-text-body-large", config: { link: { target: "_blank" } }, children: content }) })
|
|
1558
1580
|
};
|
|
1559
1581
|
var MarkdownRenderer_default = MarkdownRenderer;
|
|
1560
1582
|
|
|
1561
1583
|
// ../renderers/src/ModalLayoutRenderer.tsx
|
|
1562
1584
|
var import_components24 = require("@transferwise/components");
|
|
1563
1585
|
var import_react8 = require("react");
|
|
1564
|
-
var
|
|
1586
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1565
1587
|
var ModalLayoutRenderer = {
|
|
1566
1588
|
canRenderType: "modal-layout",
|
|
1567
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
1589
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DFModal, __spreadValues({}, props))
|
|
1568
1590
|
};
|
|
1569
1591
|
var ModalLayoutRenderer_default = ModalLayoutRenderer;
|
|
1570
1592
|
function DFModal({ content, margin, trigger }) {
|
|
1571
1593
|
const [visible, setVisible] = (0, import_react8.useState)(false);
|
|
1572
1594
|
const { children, title } = content;
|
|
1573
|
-
return /* @__PURE__ */ (0,
|
|
1574
|
-
/* @__PURE__ */ (0,
|
|
1575
|
-
/* @__PURE__ */ (0,
|
|
1595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: getMargin(margin), children: [
|
|
1596
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components24.Button, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
|
|
1597
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
1576
1598
|
import_components24.Modal,
|
|
1577
1599
|
{
|
|
1578
1600
|
scroll: "content",
|
|
@@ -1588,11 +1610,11 @@ function DFModal({ content, margin, trigger }) {
|
|
|
1588
1610
|
|
|
1589
1611
|
// ../renderers/src/ModalRenderer.tsx
|
|
1590
1612
|
var import_components25 = require("@transferwise/components");
|
|
1591
|
-
var
|
|
1613
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1592
1614
|
var ModalRenderer = {
|
|
1593
1615
|
canRenderType: "modal",
|
|
1594
1616
|
render: ({ title, children, open, onClose }) => {
|
|
1595
|
-
return /* @__PURE__ */ (0,
|
|
1617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components25.Modal, { open, title, body: children, onClose });
|
|
1596
1618
|
}
|
|
1597
1619
|
};
|
|
1598
1620
|
|
|
@@ -1612,10 +1634,10 @@ var multi_select_messages_default = (0, import_react_intl10.defineMessages)({
|
|
|
1612
1634
|
});
|
|
1613
1635
|
|
|
1614
1636
|
// ../renderers/src/MultiSelectInputRenderer.tsx
|
|
1615
|
-
var
|
|
1637
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
1616
1638
|
var MultiSelectInputRenderer = {
|
|
1617
1639
|
canRenderType: "input-multi-select",
|
|
1618
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
1640
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(MultiSelectInputRendererComponent, __spreadValues({}, props))
|
|
1619
1641
|
};
|
|
1620
1642
|
function MultiSelectInputRendererComponent(props) {
|
|
1621
1643
|
const { formatMessage } = (0, import_react_intl11.useIntl)();
|
|
@@ -1657,12 +1679,12 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
1657
1679
|
const contentProps = {
|
|
1658
1680
|
title: option.title,
|
|
1659
1681
|
description: option.description,
|
|
1660
|
-
icon: /* @__PURE__ */ (0,
|
|
1682
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
|
|
1661
1683
|
};
|
|
1662
|
-
return /* @__PURE__ */ (0,
|
|
1684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_components26.SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
1663
1685
|
};
|
|
1664
1686
|
const extraProps = { autoComplete };
|
|
1665
|
-
return /* @__PURE__ */ (0,
|
|
1687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
1666
1688
|
FieldInput_default,
|
|
1667
1689
|
{
|
|
1668
1690
|
id,
|
|
@@ -1670,7 +1692,7 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
1670
1692
|
help,
|
|
1671
1693
|
description,
|
|
1672
1694
|
validation: validationState,
|
|
1673
|
-
children: /* @__PURE__ */ (0,
|
|
1695
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
1674
1696
|
import_components26.SelectInput,
|
|
1675
1697
|
__spreadValues({
|
|
1676
1698
|
id,
|
|
@@ -1715,7 +1737,7 @@ var import_components28 = require("@transferwise/components");
|
|
|
1715
1737
|
// ../renderers/src/components/UploadFieldInput.tsx
|
|
1716
1738
|
var import_components27 = require("@transferwise/components");
|
|
1717
1739
|
var import_classnames4 = __toESM(require("classnames"));
|
|
1718
|
-
var
|
|
1740
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
1719
1741
|
function UploadFieldInput({
|
|
1720
1742
|
id,
|
|
1721
1743
|
children,
|
|
@@ -1724,18 +1746,18 @@ function UploadFieldInput({
|
|
|
1724
1746
|
help,
|
|
1725
1747
|
validation
|
|
1726
1748
|
}) {
|
|
1727
|
-
const labelContent = label && help ? /* @__PURE__ */ (0,
|
|
1749
|
+
const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(LabelContentWithHelp, { text: label, help }) : label;
|
|
1728
1750
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
1729
|
-
return /* @__PURE__ */ (0,
|
|
1751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
1730
1752
|
"div",
|
|
1731
1753
|
{
|
|
1732
1754
|
className: (0, import_classnames4.default)("form-group d-block", {
|
|
1733
1755
|
"has-error": (validation == null ? void 0 : validation.status) === "invalid"
|
|
1734
1756
|
}),
|
|
1735
1757
|
children: [
|
|
1736
|
-
/* @__PURE__ */ (0,
|
|
1758
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
|
|
1737
1759
|
children,
|
|
1738
|
-
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0,
|
|
1760
|
+
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_components27.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
|
|
1739
1761
|
]
|
|
1740
1762
|
}
|
|
1741
1763
|
);
|
|
@@ -1770,7 +1792,7 @@ var getSizeLimit = (maxSize) => {
|
|
|
1770
1792
|
};
|
|
1771
1793
|
|
|
1772
1794
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
1773
|
-
var
|
|
1795
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
1774
1796
|
var MultiUploadInputRenderer = {
|
|
1775
1797
|
canRenderType: "input-upload-multi",
|
|
1776
1798
|
render: (props) => {
|
|
@@ -1795,7 +1817,7 @@ var MultiUploadInputRenderer = {
|
|
|
1795
1817
|
};
|
|
1796
1818
|
const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
|
|
1797
1819
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
1798
|
-
return /* @__PURE__ */ (0,
|
|
1820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1799
1821
|
UploadFieldInput_default,
|
|
1800
1822
|
{
|
|
1801
1823
|
id,
|
|
@@ -1803,7 +1825,7 @@ var MultiUploadInputRenderer = {
|
|
|
1803
1825
|
description,
|
|
1804
1826
|
validation: validationState,
|
|
1805
1827
|
help,
|
|
1806
|
-
children: /* @__PURE__ */ (0,
|
|
1828
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1807
1829
|
import_components28.UploadInput,
|
|
1808
1830
|
{
|
|
1809
1831
|
id,
|
|
@@ -1827,7 +1849,7 @@ var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
|
|
|
1827
1849
|
|
|
1828
1850
|
// ../renderers/src/NumberInputRenderer.tsx
|
|
1829
1851
|
var import_components29 = require("@transferwise/components");
|
|
1830
|
-
var
|
|
1852
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
1831
1853
|
var NumberInputRenderer = {
|
|
1832
1854
|
canRenderType: "input-number",
|
|
1833
1855
|
render: (props) => {
|
|
@@ -1841,7 +1863,7 @@ var NumberInputRenderer = {
|
|
|
1841
1863
|
"maximum",
|
|
1842
1864
|
"minimum"
|
|
1843
1865
|
);
|
|
1844
|
-
return /* @__PURE__ */ (0,
|
|
1866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
1845
1867
|
FieldInput_default,
|
|
1846
1868
|
{
|
|
1847
1869
|
id,
|
|
@@ -1849,7 +1871,7 @@ var NumberInputRenderer = {
|
|
|
1849
1871
|
description,
|
|
1850
1872
|
validation: validationState,
|
|
1851
1873
|
help,
|
|
1852
|
-
children: /* @__PURE__ */ (0,
|
|
1874
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components29.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
1853
1875
|
import_components29.Input,
|
|
1854
1876
|
__spreadValues({
|
|
1855
1877
|
id,
|
|
@@ -1901,17 +1923,17 @@ var paragraph_messages_default = (0, import_react_intl12.defineMessages)({
|
|
|
1901
1923
|
});
|
|
1902
1924
|
|
|
1903
1925
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
1904
|
-
var
|
|
1926
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
1905
1927
|
var ParagraphRenderer = {
|
|
1906
1928
|
canRenderType: "paragraph",
|
|
1907
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
1929
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Paragraph, __spreadValues({}, props))
|
|
1908
1930
|
};
|
|
1909
1931
|
function Paragraph({ align, control, margin, text }) {
|
|
1910
1932
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
1911
|
-
return control === "copyable" ? /* @__PURE__ */ (0,
|
|
1933
|
+
return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(StandardParagraph, { className, text });
|
|
1912
1934
|
}
|
|
1913
1935
|
function StandardParagraph({ text, className }) {
|
|
1914
|
-
return /* @__PURE__ */ (0,
|
|
1936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: `np-text-body-large ${className}`, children: text });
|
|
1915
1937
|
}
|
|
1916
1938
|
function CopyableParagraph({
|
|
1917
1939
|
text,
|
|
@@ -1925,8 +1947,8 @@ function CopyableParagraph({
|
|
|
1925
1947
|
});
|
|
1926
1948
|
};
|
|
1927
1949
|
const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
|
|
1928
|
-
return /* @__PURE__ */ (0,
|
|
1929
|
-
/* @__PURE__ */ (0,
|
|
1950
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className, children: [
|
|
1951
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
1930
1952
|
import_components31.Input,
|
|
1931
1953
|
{
|
|
1932
1954
|
type: "text",
|
|
@@ -1935,7 +1957,7 @@ function CopyableParagraph({
|
|
|
1935
1957
|
className: (0, import_classnames5.default)("text-ellipsis", inputAlignmentClasses)
|
|
1936
1958
|
}
|
|
1937
1959
|
),
|
|
1938
|
-
/* @__PURE__ */ (0,
|
|
1960
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components31.Button, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
|
|
1939
1961
|
] });
|
|
1940
1962
|
}
|
|
1941
1963
|
var ParagraphRenderer_default = ParagraphRenderer;
|
|
@@ -1973,10 +1995,10 @@ var repeatable_messages_default = (0, import_react_intl14.defineMessages)({
|
|
|
1973
1995
|
});
|
|
1974
1996
|
|
|
1975
1997
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
1976
|
-
var
|
|
1998
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
1977
1999
|
var RepeatableRenderer = {
|
|
1978
2000
|
canRenderType: "repeatable",
|
|
1979
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
2001
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Repeatable, __spreadValues({}, props))
|
|
1980
2002
|
};
|
|
1981
2003
|
function Repeatable(props) {
|
|
1982
2004
|
const {
|
|
@@ -2015,40 +2037,40 @@ function Repeatable(props) {
|
|
|
2015
2037
|
const onCancelEdit = () => {
|
|
2016
2038
|
setOpenModalType(null);
|
|
2017
2039
|
};
|
|
2018
|
-
return /* @__PURE__ */ (0,
|
|
2019
|
-
title && /* @__PURE__ */ (0,
|
|
2020
|
-
description && /* @__PURE__ */ (0,
|
|
2021
|
-
/* @__PURE__ */ (0,
|
|
2040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
2041
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_components32.Header, { title }),
|
|
2042
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { children: description }),
|
|
2043
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
2022
2044
|
"div",
|
|
2023
2045
|
{
|
|
2024
2046
|
className: (0, import_classnames6.default)("form-group", {
|
|
2025
2047
|
"has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
|
|
2026
2048
|
}),
|
|
2027
2049
|
children: [
|
|
2028
|
-
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0,
|
|
2029
|
-
/* @__PURE__ */ (0,
|
|
2050
|
+
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
|
|
2051
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2030
2052
|
import_components32.NavigationOption,
|
|
2031
2053
|
{
|
|
2032
|
-
media: /* @__PURE__ */ (0,
|
|
2054
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_icons.Plus, {}),
|
|
2033
2055
|
title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2034
2056
|
showMediaAtAllSizes: true,
|
|
2035
2057
|
onClick: () => onAddItem()
|
|
2036
2058
|
}
|
|
2037
2059
|
),
|
|
2038
|
-
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0,
|
|
2060
|
+
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_components32.InlineAlert, { type: "negative", children: validationState.message })
|
|
2039
2061
|
]
|
|
2040
2062
|
}
|
|
2041
2063
|
),
|
|
2042
|
-
/* @__PURE__ */ (0,
|
|
2064
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2043
2065
|
import_components32.Modal,
|
|
2044
2066
|
{
|
|
2045
2067
|
open: openModalType !== null,
|
|
2046
2068
|
title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2047
|
-
body: /* @__PURE__ */ (0,
|
|
2048
|
-
/* @__PURE__ */ (0,
|
|
2049
|
-
/* @__PURE__ */ (0,
|
|
2050
|
-
/* @__PURE__ */ (0,
|
|
2051
|
-
/* @__PURE__ */ (0,
|
|
2069
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
2070
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "m-b-2", children: editableItem }),
|
|
2071
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { children: [
|
|
2072
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_components32.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
|
|
2073
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2052
2074
|
import_components32.Button,
|
|
2053
2075
|
{
|
|
2054
2076
|
v2: true,
|
|
@@ -2070,10 +2092,10 @@ function ItemSummaryOption({
|
|
|
2070
2092
|
item,
|
|
2071
2093
|
onClick
|
|
2072
2094
|
}) {
|
|
2073
|
-
return /* @__PURE__ */ (0,
|
|
2095
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2074
2096
|
import_components32.NavigationOption,
|
|
2075
2097
|
{
|
|
2076
|
-
media: /* @__PURE__ */ (0,
|
|
2098
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(OptionMedia, { media: item.media, preferAvatar: false }),
|
|
2077
2099
|
title: item.title,
|
|
2078
2100
|
content: item.description,
|
|
2079
2101
|
showMediaAtAllSizes: true,
|
|
@@ -2088,8 +2110,8 @@ var import_components34 = require("@transferwise/components");
|
|
|
2088
2110
|
|
|
2089
2111
|
// ../renderers/src/components/Header.tsx
|
|
2090
2112
|
var import_components33 = require("@transferwise/components");
|
|
2091
|
-
var
|
|
2092
|
-
var Header7 = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ (0,
|
|
2113
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
2114
|
+
var Header7 = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components33.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) });
|
|
2093
2115
|
var getHeaderAction = (callToAction) => {
|
|
2094
2116
|
if (!callToAction) {
|
|
2095
2117
|
return void 0;
|
|
@@ -2111,14 +2133,14 @@ var getHeaderAction = (callToAction) => {
|
|
|
2111
2133
|
};
|
|
2112
2134
|
|
|
2113
2135
|
// ../renderers/src/ReviewRenderer.tsx
|
|
2114
|
-
var
|
|
2136
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2115
2137
|
var ReviewRenderer = {
|
|
2116
2138
|
canRenderType: "review",
|
|
2117
2139
|
render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
|
|
2118
2140
|
const orientation = mapControlToDefinitionListLayout(control);
|
|
2119
|
-
return /* @__PURE__ */ (0,
|
|
2120
|
-
/* @__PURE__ */ (0,
|
|
2121
|
-
/* @__PURE__ */ (0,
|
|
2141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: getMargin(margin), children: [
|
|
2142
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Header7, { title, callToAction }),
|
|
2143
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2122
2144
|
import_components34.DefinitionList,
|
|
2123
2145
|
{
|
|
2124
2146
|
layout: orientation,
|
|
@@ -2156,10 +2178,10 @@ var mapControlToDefinitionListLayout = (control) => {
|
|
|
2156
2178
|
};
|
|
2157
2179
|
var getFieldLabel = (label, help, onClick) => {
|
|
2158
2180
|
if (help) {
|
|
2159
|
-
return /* @__PURE__ */ (0,
|
|
2181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
2160
2182
|
label,
|
|
2161
2183
|
" ",
|
|
2162
|
-
/* @__PURE__ */ (0,
|
|
2184
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Help_default, { help, onClick })
|
|
2163
2185
|
] });
|
|
2164
2186
|
}
|
|
2165
2187
|
return label;
|
|
@@ -2205,18 +2227,18 @@ var generic_error_messages_default = (0, import_react_intl17.defineMessages)({
|
|
|
2205
2227
|
|
|
2206
2228
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
2207
2229
|
var import_components35 = require("@transferwise/components");
|
|
2208
|
-
var
|
|
2230
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2209
2231
|
function ErrorResult({ state }) {
|
|
2210
2232
|
const intl = (0, import_react_intl18.useIntl)();
|
|
2211
|
-
return /* @__PURE__ */ (0,
|
|
2233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("p", { className: "m-t-2", children: [
|
|
2212
2234
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
2213
2235
|
"\xA0",
|
|
2214
|
-
/* @__PURE__ */ (0,
|
|
2236
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components35.Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
|
|
2215
2237
|
] });
|
|
2216
2238
|
}
|
|
2217
2239
|
|
|
2218
2240
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
2219
|
-
var
|
|
2241
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2220
2242
|
function BlockSearchRendererComponent({
|
|
2221
2243
|
id,
|
|
2222
2244
|
isLoading,
|
|
@@ -2229,8 +2251,8 @@ function BlockSearchRendererComponent({
|
|
|
2229
2251
|
}) {
|
|
2230
2252
|
const [hasSearched, setHasSearched] = (0, import_react12.useState)(false);
|
|
2231
2253
|
const { formatMessage } = (0, import_react_intl19.useIntl)();
|
|
2232
|
-
return /* @__PURE__ */ (0,
|
|
2233
|
-
/* @__PURE__ */ (0,
|
|
2254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: getMargin(margin), children: [
|
|
2255
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2234
2256
|
import_components36.Input,
|
|
2235
2257
|
{
|
|
2236
2258
|
id,
|
|
@@ -2247,7 +2269,7 @@ function BlockSearchRendererComponent({
|
|
|
2247
2269
|
}
|
|
2248
2270
|
}
|
|
2249
2271
|
) }),
|
|
2250
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
2272
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_jsx_runtime54.Fragment, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(SearchResultContent, { state, trackEvent })
|
|
2251
2273
|
] });
|
|
2252
2274
|
}
|
|
2253
2275
|
function SearchResultContent({
|
|
@@ -2256,31 +2278,31 @@ function SearchResultContent({
|
|
|
2256
2278
|
}) {
|
|
2257
2279
|
switch (state.type) {
|
|
2258
2280
|
case "error":
|
|
2259
|
-
return /* @__PURE__ */ (0,
|
|
2281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ErrorResult, { state });
|
|
2260
2282
|
case "results":
|
|
2261
|
-
return /* @__PURE__ */ (0,
|
|
2283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(SearchResults, { state, trackEvent });
|
|
2262
2284
|
case "noResults":
|
|
2263
|
-
return /* @__PURE__ */ (0,
|
|
2285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(EmptySearchResult, { state });
|
|
2264
2286
|
case "pending":
|
|
2265
2287
|
default:
|
|
2266
2288
|
return null;
|
|
2267
2289
|
}
|
|
2268
2290
|
}
|
|
2269
2291
|
function EmptySearchResult({ state }) {
|
|
2270
|
-
return /* @__PURE__ */ (0,
|
|
2292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components36.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
2271
2293
|
}
|
|
2272
2294
|
function SearchResults({
|
|
2273
2295
|
state,
|
|
2274
2296
|
trackEvent
|
|
2275
2297
|
}) {
|
|
2276
|
-
return /* @__PURE__ */ (0,
|
|
2298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components36.NavigationOptionsList, { children: state.results.map((result) => {
|
|
2277
2299
|
const { media } = result;
|
|
2278
|
-
return /* @__PURE__ */ (0,
|
|
2300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2279
2301
|
import_components36.NavigationOption,
|
|
2280
2302
|
{
|
|
2281
2303
|
title: result.title,
|
|
2282
2304
|
content: result.description,
|
|
2283
|
-
media: media ? /* @__PURE__ */ (0,
|
|
2305
|
+
media: media ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(OptionMedia, { media, preferAvatar: false }) : void 0,
|
|
2284
2306
|
showMediaCircle: false,
|
|
2285
2307
|
showMediaAtAllSizes: true,
|
|
2286
2308
|
onClick: () => {
|
|
@@ -2301,7 +2323,7 @@ var import_components37 = require("@transferwise/components");
|
|
|
2301
2323
|
var import_icons2 = require("@transferwise/icons");
|
|
2302
2324
|
var import_react13 = require("react");
|
|
2303
2325
|
var import_react_intl20 = require("react-intl");
|
|
2304
|
-
var
|
|
2326
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2305
2327
|
function InlineSearchRenderer({
|
|
2306
2328
|
id,
|
|
2307
2329
|
isLoading,
|
|
@@ -2313,7 +2335,7 @@ function InlineSearchRenderer({
|
|
|
2313
2335
|
}) {
|
|
2314
2336
|
const [hasSearched, setHasSearched] = (0, import_react13.useState)(false);
|
|
2315
2337
|
const intl = (0, import_react_intl20.useIntl)();
|
|
2316
|
-
return /* @__PURE__ */ (0,
|
|
2338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2317
2339
|
import_components37.Typeahead,
|
|
2318
2340
|
{
|
|
2319
2341
|
id: "typeahead-input-id",
|
|
@@ -2321,10 +2343,10 @@ function InlineSearchRenderer({
|
|
|
2321
2343
|
name: "typeahead-input-name",
|
|
2322
2344
|
size: "md",
|
|
2323
2345
|
maxHeight: 100,
|
|
2324
|
-
footer: /* @__PURE__ */ (0,
|
|
2346
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TypeaheadFooter, { state, isLoading }),
|
|
2325
2347
|
multiple: false,
|
|
2326
2348
|
clearable: false,
|
|
2327
|
-
addon: /* @__PURE__ */ (0,
|
|
2349
|
+
addon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_icons2.Search, { size: 24 }),
|
|
2328
2350
|
options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
|
|
2329
2351
|
minQueryLength: 1,
|
|
2330
2352
|
onChange: (values) => {
|
|
@@ -2361,23 +2383,23 @@ function mapResultToTypeaheadOption(result) {
|
|
|
2361
2383
|
function TypeaheadFooter({ state, isLoading }) {
|
|
2362
2384
|
const { formatMessage } = (0, import_react_intl20.useIntl)();
|
|
2363
2385
|
if (state.type === "noResults") {
|
|
2364
|
-
return /* @__PURE__ */ (0,
|
|
2386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components37.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
2365
2387
|
}
|
|
2366
2388
|
if (state.type === "error") {
|
|
2367
|
-
return /* @__PURE__ */ (0,
|
|
2389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ErrorResult, { state }) });
|
|
2368
2390
|
}
|
|
2369
2391
|
if (state.type === "pending" || isLoading) {
|
|
2370
|
-
return /* @__PURE__ */ (0,
|
|
2392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
|
|
2371
2393
|
}
|
|
2372
2394
|
return null;
|
|
2373
2395
|
}
|
|
2374
2396
|
var InlineSearchRendererComponent_default = InlineSearchRenderer;
|
|
2375
2397
|
|
|
2376
2398
|
// ../renderers/src/SearchRenderer/SearchRenderer.tsx
|
|
2377
|
-
var
|
|
2399
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2378
2400
|
var SearchRenderer = {
|
|
2379
2401
|
canRenderType: "search",
|
|
2380
|
-
render: (props) => props.control === "inline" ? /* @__PURE__ */ (0,
|
|
2402
|
+
render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
|
|
2381
2403
|
};
|
|
2382
2404
|
var SearchRenderer_default = SearchRenderer;
|
|
2383
2405
|
|
|
@@ -2406,12 +2428,12 @@ var getHeaderAction2 = (callToAction) => {
|
|
|
2406
2428
|
};
|
|
2407
2429
|
|
|
2408
2430
|
// ../renderers/src/SectionRenderer.tsx
|
|
2409
|
-
var
|
|
2431
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
2410
2432
|
var SectionRenderer = {
|
|
2411
2433
|
canRenderType: "section",
|
|
2412
2434
|
render: ({ children, callToAction, margin, title }) => {
|
|
2413
|
-
return /* @__PURE__ */ (0,
|
|
2414
|
-
(title || callToAction) && /* @__PURE__ */ (0,
|
|
2435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("section", { className: getMargin(margin), children: [
|
|
2436
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components38.Header, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
|
|
2415
2437
|
children
|
|
2416
2438
|
] });
|
|
2417
2439
|
}
|
|
@@ -2420,7 +2442,7 @@ var SectionRenderer_default = SectionRenderer;
|
|
|
2420
2442
|
|
|
2421
2443
|
// ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
2422
2444
|
var import_components39 = require("@transferwise/components");
|
|
2423
|
-
var
|
|
2445
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
2424
2446
|
function RadioInputRendererComponent(props) {
|
|
2425
2447
|
const {
|
|
2426
2448
|
id,
|
|
@@ -2434,8 +2456,8 @@ function RadioInputRendererComponent(props) {
|
|
|
2434
2456
|
validationState,
|
|
2435
2457
|
onSelect
|
|
2436
2458
|
} = props;
|
|
2437
|
-
return /* @__PURE__ */ (0,
|
|
2438
|
-
/* @__PURE__ */ (0,
|
|
2459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
|
2460
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2439
2461
|
FieldInput_default,
|
|
2440
2462
|
{
|
|
2441
2463
|
id,
|
|
@@ -2443,7 +2465,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2443
2465
|
help,
|
|
2444
2466
|
description,
|
|
2445
2467
|
validation: validationState,
|
|
2446
|
-
children: /* @__PURE__ */ (0,
|
|
2468
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2447
2469
|
import_components39.RadioGroup,
|
|
2448
2470
|
{
|
|
2449
2471
|
name: id,
|
|
@@ -2452,7 +2474,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2452
2474
|
value: index,
|
|
2453
2475
|
secondary: option.description,
|
|
2454
2476
|
disabled: option.disabled || disabled,
|
|
2455
|
-
avatar: /* @__PURE__ */ (0,
|
|
2477
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
|
|
2456
2478
|
})),
|
|
2457
2479
|
selectedValue: selectedIndex != null ? selectedIndex : void 0,
|
|
2458
2480
|
onChange: onSelect
|
|
@@ -2468,7 +2490,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2468
2490
|
// ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
2469
2491
|
var import_components40 = require("@transferwise/components");
|
|
2470
2492
|
var import_react14 = require("react");
|
|
2471
|
-
var
|
|
2493
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
2472
2494
|
function TabInputRendererComponent(props) {
|
|
2473
2495
|
const {
|
|
2474
2496
|
id,
|
|
@@ -2487,8 +2509,8 @@ function TabInputRendererComponent(props) {
|
|
|
2487
2509
|
onSelect(0);
|
|
2488
2510
|
}
|
|
2489
2511
|
}, [selectedIndex, onSelect, options.length]);
|
|
2490
|
-
return /* @__PURE__ */ (0,
|
|
2491
|
-
/* @__PURE__ */ (0,
|
|
2512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
|
|
2513
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
2492
2514
|
FieldInput_default,
|
|
2493
2515
|
{
|
|
2494
2516
|
id,
|
|
@@ -2496,7 +2518,7 @@ function TabInputRendererComponent(props) {
|
|
|
2496
2518
|
help,
|
|
2497
2519
|
description,
|
|
2498
2520
|
validation: validationState,
|
|
2499
|
-
children: /* @__PURE__ */ (0,
|
|
2521
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
2500
2522
|
import_components40.Tabs,
|
|
2501
2523
|
{
|
|
2502
2524
|
name: id,
|
|
@@ -2505,7 +2527,7 @@ function TabInputRendererComponent(props) {
|
|
|
2505
2527
|
title: option.title,
|
|
2506
2528
|
// if we pass null, we get some props-types console errors
|
|
2507
2529
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
2508
|
-
content: /* @__PURE__ */ (0,
|
|
2530
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_jsx_runtime59.Fragment, {}),
|
|
2509
2531
|
disabled: option.disabled || disabled
|
|
2510
2532
|
})),
|
|
2511
2533
|
onTabSelect: onSelect
|
|
@@ -2520,7 +2542,7 @@ var isValidIndex = (index, options) => index !== null && index >= 0 && index < o
|
|
|
2520
2542
|
|
|
2521
2543
|
// ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
2522
2544
|
var import_components41 = require("@transferwise/components");
|
|
2523
|
-
var
|
|
2545
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
2524
2546
|
function SelectInputRendererComponent(props) {
|
|
2525
2547
|
const {
|
|
2526
2548
|
id,
|
|
@@ -2560,13 +2582,13 @@ function SelectInputRendererComponent(props) {
|
|
|
2560
2582
|
} : {
|
|
2561
2583
|
title: option.title,
|
|
2562
2584
|
description: option.description,
|
|
2563
|
-
icon: /* @__PURE__ */ (0,
|
|
2585
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
|
|
2564
2586
|
};
|
|
2565
|
-
return /* @__PURE__ */ (0,
|
|
2587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components41.SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
2566
2588
|
};
|
|
2567
2589
|
const extraProps = { autoComplete };
|
|
2568
|
-
return /* @__PURE__ */ (0,
|
|
2569
|
-
/* @__PURE__ */ (0,
|
|
2590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
|
2591
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2570
2592
|
FieldInput_default,
|
|
2571
2593
|
{
|
|
2572
2594
|
id,
|
|
@@ -2574,7 +2596,7 @@ function SelectInputRendererComponent(props) {
|
|
|
2574
2596
|
help,
|
|
2575
2597
|
description,
|
|
2576
2598
|
validation: validationState,
|
|
2577
|
-
children: /* @__PURE__ */ (0,
|
|
2599
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2578
2600
|
import_components41.SelectInput,
|
|
2579
2601
|
__spreadValues({
|
|
2580
2602
|
name: id,
|
|
@@ -2597,7 +2619,7 @@ function SelectInputRendererComponent(props) {
|
|
|
2597
2619
|
// ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
|
|
2598
2620
|
var import_react15 = require("react");
|
|
2599
2621
|
var import_components42 = require("@transferwise/components");
|
|
2600
|
-
var
|
|
2622
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
2601
2623
|
function SegmentedInputRendererComponent(props) {
|
|
2602
2624
|
const {
|
|
2603
2625
|
id,
|
|
@@ -2615,8 +2637,8 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2615
2637
|
onSelect(0);
|
|
2616
2638
|
}
|
|
2617
2639
|
}, [selectedIndex, onSelect, options.length]);
|
|
2618
|
-
return /* @__PURE__ */ (0,
|
|
2619
|
-
/* @__PURE__ */ (0,
|
|
2640
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
|
|
2641
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2620
2642
|
FieldInput_default,
|
|
2621
2643
|
{
|
|
2622
2644
|
id,
|
|
@@ -2624,7 +2646,7 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2624
2646
|
help,
|
|
2625
2647
|
description,
|
|
2626
2648
|
validation: validationState,
|
|
2627
|
-
children: /* @__PURE__ */ (0,
|
|
2649
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2628
2650
|
import_components42.SegmentedControl,
|
|
2629
2651
|
{
|
|
2630
2652
|
name: `${id}-segmented-control`,
|
|
@@ -2641,26 +2663,26 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2641
2663
|
)
|
|
2642
2664
|
}
|
|
2643
2665
|
),
|
|
2644
|
-
/* @__PURE__ */ (0,
|
|
2666
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { id: `${id}-children`, children })
|
|
2645
2667
|
] });
|
|
2646
2668
|
}
|
|
2647
2669
|
var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
|
|
2648
2670
|
|
|
2649
2671
|
// ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
|
|
2650
|
-
var
|
|
2672
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
2651
2673
|
var SelectInputRenderer = {
|
|
2652
2674
|
canRenderType: "input-select",
|
|
2653
2675
|
render: (props) => {
|
|
2654
2676
|
switch (props.control) {
|
|
2655
2677
|
case "radio":
|
|
2656
|
-
return /* @__PURE__ */ (0,
|
|
2678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
|
|
2657
2679
|
case "tab":
|
|
2658
|
-
return props.options.length > 3 ? /* @__PURE__ */ (0,
|
|
2680
|
+
return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(TabInputRendererComponent, __spreadValues({}, props));
|
|
2659
2681
|
case "segmented":
|
|
2660
|
-
return props.options.length > 3 ? /* @__PURE__ */ (0,
|
|
2682
|
+
return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
|
|
2661
2683
|
case "select":
|
|
2662
2684
|
default:
|
|
2663
|
-
return /* @__PURE__ */ (0,
|
|
2685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
|
|
2664
2686
|
}
|
|
2665
2687
|
}
|
|
2666
2688
|
};
|
|
@@ -2668,17 +2690,17 @@ var SelectInputRenderer_default = SelectInputRenderer;
|
|
|
2668
2690
|
|
|
2669
2691
|
// ../renderers/src/StatusListRenderer.tsx
|
|
2670
2692
|
var import_components43 = require("@transferwise/components");
|
|
2671
|
-
var
|
|
2693
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2672
2694
|
var StatusListRenderer = {
|
|
2673
2695
|
canRenderType: "status-list",
|
|
2674
|
-
render: ({ margin, items, title }) => /* @__PURE__ */ (0,
|
|
2675
|
-
title ? /* @__PURE__ */ (0,
|
|
2676
|
-
items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0,
|
|
2696
|
+
render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: getMargin(margin), children: [
|
|
2697
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_components43.Header, { title, className: "m-b-2" }) : null,
|
|
2698
|
+
items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2677
2699
|
import_components43.Summary,
|
|
2678
2700
|
{
|
|
2679
2701
|
title: itemTitle,
|
|
2680
2702
|
description,
|
|
2681
|
-
icon: icon && "name" in icon ? /* @__PURE__ */ (0,
|
|
2703
|
+
icon: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(DynamicIcon_default, { name: icon.name }) : null,
|
|
2682
2704
|
status: mapStatus(status),
|
|
2683
2705
|
action: getSummaryAction(callToAction)
|
|
2684
2706
|
},
|
|
@@ -2732,29 +2754,29 @@ var useCustomTheme = (theme, trackEvent) => {
|
|
|
2732
2754
|
// ../renderers/src/step/topbar/BackButton.tsx
|
|
2733
2755
|
var import_components44 = require("@transferwise/components");
|
|
2734
2756
|
var import_icons3 = require("@transferwise/icons");
|
|
2735
|
-
var
|
|
2757
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2736
2758
|
function BackButton({ title, onClick }) {
|
|
2737
|
-
return /* @__PURE__ */ (0,
|
|
2738
|
-
/* @__PURE__ */ (0,
|
|
2739
|
-
/* @__PURE__ */ (0,
|
|
2759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_components44.IconButton, { priority: "tertiary", onClick, children: [
|
|
2760
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "sr-only", children: title }),
|
|
2761
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_icons3.ArrowLeft, {})
|
|
2740
2762
|
] });
|
|
2741
2763
|
}
|
|
2742
2764
|
|
|
2743
2765
|
// ../renderers/src/step/topbar/Toolbar.tsx
|
|
2744
2766
|
var import_components45 = require("@transferwise/components");
|
|
2745
|
-
var
|
|
2767
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2746
2768
|
var Toolbar = ({ items }) => {
|
|
2747
|
-
return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ (0,
|
|
2769
|
+
return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
|
|
2748
2770
|
};
|
|
2749
2771
|
function ToolbarButton(props) {
|
|
2750
|
-
return prefersMedia(props.control) ? /* @__PURE__ */ (0,
|
|
2772
|
+
return prefersMedia(props.control) ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(TextToolbarButton, __spreadValues({}, props));
|
|
2751
2773
|
}
|
|
2752
2774
|
function MediaToolbarButton(props) {
|
|
2753
2775
|
var _a;
|
|
2754
2776
|
const { context, control, media, accessibilityDescription, disabled, onClick } = props;
|
|
2755
2777
|
const priority = getIconButtonPriority(control);
|
|
2756
2778
|
const type = getSentiment(context);
|
|
2757
|
-
return /* @__PURE__ */ (0,
|
|
2779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
2758
2780
|
import_components45.IconButton,
|
|
2759
2781
|
{
|
|
2760
2782
|
className: "df-toolbar-button",
|
|
@@ -2764,7 +2786,7 @@ function MediaToolbarButton(props) {
|
|
|
2764
2786
|
type,
|
|
2765
2787
|
onClick,
|
|
2766
2788
|
children: [
|
|
2767
|
-
accessibilityDescription ? /* @__PURE__ */ (0,
|
|
2789
|
+
accessibilityDescription ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "sr-only", children: accessibilityDescription }) : null,
|
|
2768
2790
|
media ? (_a = getAddonStart(media)) == null ? void 0 : _a.value : null
|
|
2769
2791
|
]
|
|
2770
2792
|
}
|
|
@@ -2775,7 +2797,7 @@ function TextToolbarButton(props) {
|
|
|
2775
2797
|
const addonStart = media ? getAddonStart(media) : void 0;
|
|
2776
2798
|
const priority = getPriority2(control);
|
|
2777
2799
|
const sentiment = getSentiment(context);
|
|
2778
|
-
return /* @__PURE__ */ (0,
|
|
2800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2779
2801
|
import_components45.Button,
|
|
2780
2802
|
{
|
|
2781
2803
|
v2: true,
|
|
@@ -2820,16 +2842,16 @@ var getIconButtonPriority = (control) => {
|
|
|
2820
2842
|
};
|
|
2821
2843
|
|
|
2822
2844
|
// ../renderers/src/step/topbar/TopBar.tsx
|
|
2823
|
-
var
|
|
2845
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
2824
2846
|
function TopBar({ back, toolbar }) {
|
|
2825
|
-
return back || toolbar ? /* @__PURE__ */ (0,
|
|
2826
|
-
back ? /* @__PURE__ */ (0,
|
|
2827
|
-
toolbar ? /* @__PURE__ */ (0,
|
|
2847
|
+
return back || toolbar ? /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "d-flex m-b-2", children: [
|
|
2848
|
+
back ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(BackButton, __spreadValues({}, back)) : null,
|
|
2849
|
+
toolbar ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Toolbar, __spreadValues({}, toolbar)) : null
|
|
2828
2850
|
] }) : null;
|
|
2829
2851
|
}
|
|
2830
2852
|
|
|
2831
2853
|
// ../renderers/src/step/SplashCelebrationStepRenderer.tsx
|
|
2832
|
-
var
|
|
2854
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
2833
2855
|
var SplashCelebrationStepRenderer = {
|
|
2834
2856
|
canRenderType: "step",
|
|
2835
2857
|
canRender: ({ control }) => control === "splash-celebration",
|
|
@@ -2838,14 +2860,14 @@ var SplashCelebrationStepRenderer = {
|
|
|
2838
2860
|
function SplashCelebrationStepRendererComponent(props) {
|
|
2839
2861
|
const { back, toolbar, children, trackEvent } = props;
|
|
2840
2862
|
useCustomTheme("forest-green", trackEvent);
|
|
2841
|
-
return /* @__PURE__ */ (0,
|
|
2842
|
-
/* @__PURE__ */ (0,
|
|
2863
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "splash-screen m-t-5", children: [
|
|
2864
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(TopBar, { back, toolbar }),
|
|
2843
2865
|
children
|
|
2844
2866
|
] });
|
|
2845
2867
|
}
|
|
2846
2868
|
|
|
2847
2869
|
// ../renderers/src/step/SplashStepRenderer.tsx
|
|
2848
|
-
var
|
|
2870
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
2849
2871
|
var SplashStepRenderer = {
|
|
2850
2872
|
canRenderType: "step",
|
|
2851
2873
|
canRender: ({ control }) => control === "splash",
|
|
@@ -2853,28 +2875,28 @@ var SplashStepRenderer = {
|
|
|
2853
2875
|
};
|
|
2854
2876
|
function SplashStepRendererComponent(props) {
|
|
2855
2877
|
const { back, toolbar, children } = props;
|
|
2856
|
-
return /* @__PURE__ */ (0,
|
|
2857
|
-
/* @__PURE__ */ (0,
|
|
2878
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "splash-screen m-t-5", children: [
|
|
2879
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(TopBar, { back, toolbar }),
|
|
2858
2880
|
children
|
|
2859
2881
|
] });
|
|
2860
2882
|
}
|
|
2861
2883
|
|
|
2862
2884
|
// ../renderers/src/step/StepRenderer.tsx
|
|
2863
2885
|
var import_components46 = require("@transferwise/components");
|
|
2864
|
-
var
|
|
2886
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
2865
2887
|
var StepRenderer = {
|
|
2866
2888
|
canRenderType: "step",
|
|
2867
2889
|
render: StepRendererComponent
|
|
2868
2890
|
};
|
|
2869
2891
|
function StepRendererComponent(props) {
|
|
2870
2892
|
const { back, description, error, title, children, toolbar } = props;
|
|
2871
|
-
return /* @__PURE__ */ (0,
|
|
2872
|
-
/* @__PURE__ */ (0,
|
|
2873
|
-
title || description ? /* @__PURE__ */ (0,
|
|
2874
|
-
title ? /* @__PURE__ */ (0,
|
|
2875
|
-
description ? /* @__PURE__ */ (0,
|
|
2893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
|
|
2894
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(TopBar, { back, toolbar }),
|
|
2895
|
+
title || description ? /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "m-b-4", children: [
|
|
2896
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_components46.Title, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
|
|
2897
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("p", { className: "text-xs-center np-text-body-large", children: description }) : void 0
|
|
2876
2898
|
] }) : void 0,
|
|
2877
|
-
error ? /* @__PURE__ */ (0,
|
|
2899
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_components46.Alert, { type: "negative", className: "m-b-2", message: error }) : void 0,
|
|
2878
2900
|
children
|
|
2879
2901
|
] });
|
|
2880
2902
|
}
|
|
@@ -2882,26 +2904,26 @@ function StepRendererComponent(props) {
|
|
|
2882
2904
|
// ../renderers/src/TabsRenderer.tsx
|
|
2883
2905
|
var import_components47 = require("@transferwise/components");
|
|
2884
2906
|
var import_react17 = require("react");
|
|
2885
|
-
var
|
|
2907
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
2886
2908
|
var TabsRenderer = {
|
|
2887
2909
|
canRenderType: "tabs",
|
|
2888
2910
|
render: (props) => {
|
|
2889
2911
|
switch (props.control) {
|
|
2890
2912
|
case "segmented":
|
|
2891
2913
|
if (props.tabs.length > 3) {
|
|
2892
|
-
return /* @__PURE__ */ (0,
|
|
2914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(TabsRendererComponent, __spreadValues({}, props));
|
|
2893
2915
|
}
|
|
2894
|
-
return /* @__PURE__ */ (0,
|
|
2916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(SegmentedTabsRendererComponent, __spreadValues({}, props));
|
|
2895
2917
|
case "chips":
|
|
2896
|
-
return /* @__PURE__ */ (0,
|
|
2918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(ChipsTabsRendererComponent, __spreadValues({}, props));
|
|
2897
2919
|
default:
|
|
2898
|
-
return /* @__PURE__ */ (0,
|
|
2920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(TabsRendererComponent, __spreadValues({}, props));
|
|
2899
2921
|
}
|
|
2900
2922
|
}
|
|
2901
2923
|
};
|
|
2902
2924
|
function TabsRendererComponent({ uid, margin, tabs }) {
|
|
2903
2925
|
const [selectedIndex, setSelectedIndex] = (0, import_react17.useState)(0);
|
|
2904
|
-
return /* @__PURE__ */ (0,
|
|
2926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
2905
2927
|
import_components47.Tabs,
|
|
2906
2928
|
{
|
|
2907
2929
|
name: uid,
|
|
@@ -2909,7 +2931,7 @@ function TabsRendererComponent({ uid, margin, tabs }) {
|
|
|
2909
2931
|
tabs: tabs.map((option) => ({
|
|
2910
2932
|
title: option.title,
|
|
2911
2933
|
disabled: false,
|
|
2912
|
-
content: /* @__PURE__ */ (0,
|
|
2934
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "m-t-2", children: [
|
|
2913
2935
|
" ",
|
|
2914
2936
|
option.children,
|
|
2915
2937
|
" "
|
|
@@ -2922,8 +2944,8 @@ function TabsRendererComponent({ uid, margin, tabs }) {
|
|
|
2922
2944
|
function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
2923
2945
|
var _a;
|
|
2924
2946
|
const [selectedIndex, setSelectedIndex] = (0, import_react17.useState)(0);
|
|
2925
|
-
return /* @__PURE__ */ (0,
|
|
2926
|
-
/* @__PURE__ */ (0,
|
|
2947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: getMargin(margin), children: [
|
|
2948
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
2927
2949
|
import_components47.SegmentedControl,
|
|
2928
2950
|
{
|
|
2929
2951
|
name: uid,
|
|
@@ -2938,14 +2960,14 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
|
2938
2960
|
onChange: (value) => setSelectedIndex(Number(value))
|
|
2939
2961
|
}
|
|
2940
2962
|
),
|
|
2941
|
-
/* @__PURE__ */ (0,
|
|
2963
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
2942
2964
|
] });
|
|
2943
2965
|
}
|
|
2944
2966
|
function ChipsTabsRendererComponent({ margin, tabs }) {
|
|
2945
2967
|
var _a;
|
|
2946
2968
|
const [selectedIndex, setSelectedIndex] = (0, import_react17.useState)(0);
|
|
2947
|
-
return /* @__PURE__ */ (0,
|
|
2948
|
-
/* @__PURE__ */ (0,
|
|
2969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: getMargin(margin), children: [
|
|
2970
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "chips-container", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
2949
2971
|
import_components47.Chips,
|
|
2950
2972
|
{
|
|
2951
2973
|
chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
|
|
@@ -2953,7 +2975,7 @@ function ChipsTabsRendererComponent({ margin, tabs }) {
|
|
|
2953
2975
|
onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
|
|
2954
2976
|
}
|
|
2955
2977
|
) }),
|
|
2956
|
-
/* @__PURE__ */ (0,
|
|
2978
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
2957
2979
|
] });
|
|
2958
2980
|
}
|
|
2959
2981
|
|
|
@@ -2962,7 +2984,7 @@ var import_components49 = require("@transferwise/components");
|
|
|
2962
2984
|
|
|
2963
2985
|
// ../renderers/src/components/VariableTextInput.tsx
|
|
2964
2986
|
var import_components48 = require("@transferwise/components");
|
|
2965
|
-
var
|
|
2987
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
2966
2988
|
var commonKeys = [
|
|
2967
2989
|
"autoComplete",
|
|
2968
2990
|
"autoCapitalize",
|
|
@@ -2981,12 +3003,12 @@ function VariableTextInput(inputProps) {
|
|
|
2981
3003
|
const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
|
|
2982
3004
|
switch (control) {
|
|
2983
3005
|
case "email":
|
|
2984
|
-
return /* @__PURE__ */ (0,
|
|
3006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
|
|
2985
3007
|
case "password":
|
|
2986
|
-
return /* @__PURE__ */ (0,
|
|
3008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
|
|
2987
3009
|
case "numeric": {
|
|
2988
3010
|
const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
|
|
2989
|
-
return /* @__PURE__ */ (0,
|
|
3011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
2990
3012
|
TextInput,
|
|
2991
3013
|
__spreadProps(__spreadValues({}, numericProps), {
|
|
2992
3014
|
onChange: (newValue) => {
|
|
@@ -2997,9 +3019,9 @@ function VariableTextInput(inputProps) {
|
|
|
2997
3019
|
);
|
|
2998
3020
|
}
|
|
2999
3021
|
case "phone-number":
|
|
3000
|
-
return /* @__PURE__ */ (0,
|
|
3022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_components48.PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
|
|
3001
3023
|
default: {
|
|
3002
|
-
return /* @__PURE__ */ (0,
|
|
3024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
|
|
3003
3025
|
}
|
|
3004
3026
|
}
|
|
3005
3027
|
}
|
|
@@ -3007,11 +3029,11 @@ function TextInput(props) {
|
|
|
3007
3029
|
const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
|
|
3008
3030
|
const InputWithPattern = control === "textarea" ? import_components48.TextareaWithDisplayFormat : import_components48.InputWithDisplayFormat;
|
|
3009
3031
|
const InputWithoutPattern = control === "textarea" ? import_components48.TextArea : import_components48.Input;
|
|
3010
|
-
return displayFormat ? /* @__PURE__ */ (0,
|
|
3032
|
+
return displayFormat ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
|
|
3011
3033
|
}
|
|
3012
3034
|
|
|
3013
3035
|
// ../renderers/src/TextInputRenderer.tsx
|
|
3014
|
-
var
|
|
3036
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
3015
3037
|
var TextInputRenderer = {
|
|
3016
3038
|
canRenderType: "input-text",
|
|
3017
3039
|
render: (props) => {
|
|
@@ -3044,7 +3066,7 @@ var TextInputRenderer = {
|
|
|
3044
3066
|
}
|
|
3045
3067
|
}
|
|
3046
3068
|
});
|
|
3047
|
-
return /* @__PURE__ */ (0,
|
|
3069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
3048
3070
|
FieldInput_default,
|
|
3049
3071
|
{
|
|
3050
3072
|
id,
|
|
@@ -3052,7 +3074,7 @@ var TextInputRenderer = {
|
|
|
3052
3074
|
description,
|
|
3053
3075
|
validation: validationState,
|
|
3054
3076
|
help,
|
|
3055
|
-
children: /* @__PURE__ */ (0,
|
|
3077
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_components49.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(VariableTextInput, __spreadValues({}, inputProps)) })
|
|
3056
3078
|
}
|
|
3057
3079
|
);
|
|
3058
3080
|
}
|
|
@@ -3066,7 +3088,7 @@ var import_components50 = require("@transferwise/components");
|
|
|
3066
3088
|
var getRandomId = () => Math.random().toString(36).substring(2);
|
|
3067
3089
|
|
|
3068
3090
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
3069
|
-
var
|
|
3091
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
3070
3092
|
var UploadInputRenderer = {
|
|
3071
3093
|
canRenderType: "input-upload",
|
|
3072
3094
|
render: (props) => {
|
|
@@ -3082,14 +3104,14 @@ var UploadInputRenderer = {
|
|
|
3082
3104
|
};
|
|
3083
3105
|
return (
|
|
3084
3106
|
// We don't pass help here as there is no sensible place to display it
|
|
3085
|
-
/* @__PURE__ */ (0,
|
|
3107
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3086
3108
|
UploadFieldInput_default,
|
|
3087
3109
|
{
|
|
3088
3110
|
id,
|
|
3089
3111
|
label: void 0,
|
|
3090
3112
|
description: void 0,
|
|
3091
3113
|
validation: validationState,
|
|
3092
|
-
children: /* @__PURE__ */ (0,
|
|
3114
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3093
3115
|
import_components50.UploadInput,
|
|
3094
3116
|
{
|
|
3095
3117
|
id,
|
|
@@ -3148,7 +3170,7 @@ var LargeUploadRenderer = {
|
|
|
3148
3170
|
};
|
|
3149
3171
|
const filetypes = acceptsToFileTypes(accepts);
|
|
3150
3172
|
const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
|
|
3151
|
-
return /* @__PURE__ */ (0,
|
|
3173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3152
3174
|
FieldInput_default,
|
|
3153
3175
|
{
|
|
3154
3176
|
id,
|
|
@@ -3156,7 +3178,7 @@ var LargeUploadRenderer = {
|
|
|
3156
3178
|
description,
|
|
3157
3179
|
validation: validationState,
|
|
3158
3180
|
help,
|
|
3159
|
-
children: /* @__PURE__ */ (0,
|
|
3181
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3160
3182
|
import_components50.Upload,
|
|
3161
3183
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
3162
3184
|
usAccept,
|
|
@@ -3176,12 +3198,8 @@ var import_components53 = require("@transferwise/components");
|
|
|
3176
3198
|
|
|
3177
3199
|
// ../renderers/src/NewListItem/getInlineAlert.tsx
|
|
3178
3200
|
var import_components51 = require("@transferwise/components");
|
|
3179
|
-
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
3180
|
-
var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_components51.ListItem.Prompt, { sentiment: inlineAlert == null ? void 0 : inlineAlert.context, children: inlineAlert.content }) : void 0;
|
|
3181
|
-
|
|
3182
|
-
// ../renderers/src/NewListItem/getMedia.tsx
|
|
3183
3201
|
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
3184
|
-
var
|
|
3202
|
+
var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components51.ListItem.Prompt, { sentiment: inlineAlert == null ? void 0 : inlineAlert.context, children: inlineAlert.content }) : void 0;
|
|
3185
3203
|
|
|
3186
3204
|
// ../renderers/src/NewListItem/getAdditionalInfo.tsx
|
|
3187
3205
|
var import_components52 = require("@transferwise/components");
|
|
@@ -3513,12 +3531,6 @@ var getWiseRenderers = () => [
|
|
|
3513
3531
|
StepRenderer
|
|
3514
3532
|
];
|
|
3515
3533
|
|
|
3516
|
-
// src/dynamicFlow/renderers.ts
|
|
3517
|
-
var Header11 = Header7;
|
|
3518
|
-
var getMargin2 = getMargin;
|
|
3519
|
-
var getListItemRenderers2 = getListItemRenderers;
|
|
3520
|
-
var getButtonV2Renderers2 = getButtonV2Renderers;
|
|
3521
|
-
|
|
3522
3534
|
// src/i18n/index.ts
|
|
3523
3535
|
var import_dynamic_flow_client = require("@wise/dynamic-flow-client");
|
|
3524
3536
|
|
|
@@ -3769,7 +3781,7 @@ var hu_default = {
|
|
|
3769
3781
|
"df.wise.CopyFeedback.copy": "V\xE1g\xF3lapra m\xE1solva",
|
|
3770
3782
|
"df.wise.CopyFeedback.copyFailed": "Nem siker\xFClt a v\xE1g\xF3lapra m\xE1solni",
|
|
3771
3783
|
"df.wise.Decision.all": "\xD6sszes",
|
|
3772
|
-
"df.wise.Decision.currenciesWithAccountDetails": "
|
|
3784
|
+
"df.wise.Decision.currenciesWithAccountDetails": "P\xE9nznemek sz\xE1mlaadatokkal",
|
|
3773
3785
|
"df.wise.Decision.filterPlaceholder": "Kezdj el g\xE9pelni a keres\xE9shez",
|
|
3774
3786
|
"df.wise.Decision.noResults": "Nincs tal\xE1lat",
|
|
3775
3787
|
"df.wise.Decision.popular": "N\xE9pszer\u0171",
|
|
@@ -3951,7 +3963,7 @@ var nl_default = {
|
|
|
3951
3963
|
"df.wise.Decision.all": "Alles",
|
|
3952
3964
|
"df.wise.Decision.currenciesWithAccountDetails": "Valuta met rekeninggegevens",
|
|
3953
3965
|
"df.wise.Decision.filterPlaceholder": "Begin met typen om te zoeken",
|
|
3954
|
-
"df.wise.Decision.noResults": "
|
|
3966
|
+
"df.wise.Decision.noResults": "Geen resultaten",
|
|
3955
3967
|
"df.wise.Decision.popular": "Populair",
|
|
3956
3968
|
"df.wise.Decision.recent": "Recent",
|
|
3957
3969
|
"df.wise.Decision.results": "Zoekresultaten",
|