@wise/dynamic-flow-client-internal 4.25.1 → 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/cs.json +1 -0
- package/build/i18n/de.json +2 -1
- package/build/i18n/en.json +1 -0
- package/build/i18n/es.json +1 -0
- package/build/i18n/fr.json +1 -0
- package/build/i18n/hu.json +1 -0
- package/build/i18n/id.json +1 -0
- package/build/i18n/it.json +1 -0
- package/build/i18n/ja.json +2 -1
- package/build/i18n/nl.json +2 -1
- package/build/i18n/pl.json +1 -0
- package/build/i18n/pt.json +2 -1
- package/build/i18n/ro.json +1 -0
- package/build/i18n/ru.json +2 -1
- package/build/i18n/th.json +1 -0
- package/build/i18n/tr.json +2 -1
- package/build/i18n/uk.json +1 -0
- package/build/i18n/zh_CN.json +2 -1
- package/build/i18n/zh_HK.json +1 -0
- package/build/main.js +588 -511
- package/build/main.mjs +556 -479
- package/build/types/index.d.ts +1 -1
- package/package.json +18 -18
- 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_components14 = 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
|
}
|
|
@@ -600,11 +432,12 @@ var DynamicIcon_default = DynamicIcon;
|
|
|
600
432
|
|
|
601
433
|
// ../renderers/src/components/Media/stringToURN.ts
|
|
602
434
|
var stringToURN = (uri) => {
|
|
603
|
-
var _a;
|
|
604
|
-
const [
|
|
435
|
+
var _a, _b, _c;
|
|
436
|
+
const [nameWithRQComponents, _] = uri.split("#");
|
|
437
|
+
const [nameWithRComponent, qComponent] = nameWithRQComponents.split("?=");
|
|
605
438
|
const [name, rComponent] = (_a = nameWithRComponent == null ? void 0 : nameWithRComponent.split("?+")) != null ? _a : ["", ""];
|
|
606
|
-
const rComponents = rComponent == null ? void 0 :
|
|
607
|
-
const qComponents = qComponent == null ? void 0 :
|
|
439
|
+
const rComponents = rComponent ? (_b = decodeURIComponent(rComponent)) == null ? void 0 : _b.split("&").map((c) => c.split("=")).map(([a, b]) => [a, b]) : void 0;
|
|
440
|
+
const qComponents = qComponent ? (_c = decodeURIComponent(qComponent)) == null ? void 0 : _c.split("&").map((c) => c.split("=")).map(([a, b]) => [a, b]) : void 0;
|
|
608
441
|
return {
|
|
609
442
|
name,
|
|
610
443
|
rComponents,
|
|
@@ -612,13 +445,13 @@ var stringToURN = (uri) => {
|
|
|
612
445
|
};
|
|
613
446
|
};
|
|
614
447
|
|
|
615
|
-
// ../renderers/src/components/Media/
|
|
616
|
-
var
|
|
617
|
-
var
|
|
448
|
+
// ../renderers/src/components/Media/resolveMediaFromUri.tsx
|
|
449
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
450
|
+
var resolveMediaFromUri = (uri, size) => {
|
|
618
451
|
var _a, _b;
|
|
619
452
|
const { name, qComponents = [] } = stringToURN(uri);
|
|
620
453
|
if (isValidIconUrn(name)) {
|
|
621
|
-
const icon = /* @__PURE__ */ (0,
|
|
454
|
+
const icon = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DynamicIcon_default, { name: name.replace("urn:wise:icons:", "") });
|
|
622
455
|
return {
|
|
623
456
|
icon,
|
|
624
457
|
backgroundColor: formatColor((_a = qComponents.find(([key]) => key === "background-color")) == null ? void 0 : _a[1])
|
|
@@ -626,7 +459,7 @@ var resolveUri = (uri, size) => {
|
|
|
626
459
|
}
|
|
627
460
|
if (isUrnFlag(name)) {
|
|
628
461
|
return {
|
|
629
|
-
asset: /* @__PURE__ */ (0,
|
|
462
|
+
asset: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(UrnFlag, { urn: name, size })
|
|
630
463
|
};
|
|
631
464
|
}
|
|
632
465
|
if (name.startsWith("data:text/plain,")) {
|
|
@@ -637,7 +470,7 @@ var resolveUri = (uri, size) => {
|
|
|
637
470
|
};
|
|
638
471
|
}
|
|
639
472
|
if (!uri.startsWith("urn:")) {
|
|
640
|
-
return { asset: /* @__PURE__ */ (0,
|
|
473
|
+
return { asset: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("img", { src: uri, alt: "", width: `${size}px` }) };
|
|
641
474
|
}
|
|
642
475
|
return { asset: void 0 };
|
|
643
476
|
};
|
|
@@ -652,8 +485,8 @@ var formatColor = (color) => {
|
|
|
652
485
|
};
|
|
653
486
|
|
|
654
487
|
// ../renderers/src/components/Media/AvatarMedia.tsx
|
|
655
|
-
var
|
|
656
|
-
var
|
|
488
|
+
var import_components6 = require("@transferwise/components");
|
|
489
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
657
490
|
var AvatarMedia = ({
|
|
658
491
|
accessibilityDescription,
|
|
659
492
|
content,
|
|
@@ -663,8 +496,8 @@ var AvatarMedia = ({
|
|
|
663
496
|
if (avatar.type === "text") {
|
|
664
497
|
return { asset: avatar.text };
|
|
665
498
|
}
|
|
666
|
-
return __spreadProps(__spreadValues({},
|
|
667
|
-
badge: avatar.badgeUri ?
|
|
499
|
+
return __spreadProps(__spreadValues({}, resolveMediaFromUri(avatar.uri, size)), {
|
|
500
|
+
badge: avatar.badgeUri ? resolveMediaFromUri(avatar.badgeUri, 16) : void 0
|
|
668
501
|
});
|
|
669
502
|
};
|
|
670
503
|
const avatars = content.map(getRenderableAvatar);
|
|
@@ -673,8 +506,8 @@ var AvatarMedia = ({
|
|
|
673
506
|
if (!asset && !icon) {
|
|
674
507
|
return null;
|
|
675
508
|
}
|
|
676
|
-
return /* @__PURE__ */ (0,
|
|
677
|
-
|
|
509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
510
|
+
import_components6.AvatarView,
|
|
678
511
|
{
|
|
679
512
|
"aria-label": accessibilityDescription,
|
|
680
513
|
size,
|
|
@@ -690,8 +523,8 @@ var AvatarMedia = ({
|
|
|
690
523
|
var _b = _a, { badge } = _b, rest = __objRest(_b, ["badge"]);
|
|
691
524
|
return __spreadValues({}, rest);
|
|
692
525
|
});
|
|
693
|
-
return /* @__PURE__ */ (0,
|
|
694
|
-
|
|
526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
527
|
+
import_components6.AvatarLayout,
|
|
695
528
|
{
|
|
696
529
|
"aria-label": accessibilityDescription,
|
|
697
530
|
size,
|
|
@@ -702,12 +535,12 @@ var AvatarMedia = ({
|
|
|
702
535
|
};
|
|
703
536
|
|
|
704
537
|
// ../renderers/src/utils/image-utils.tsx
|
|
705
|
-
var
|
|
706
|
-
var
|
|
538
|
+
var import_components7 = require("@transferwise/components");
|
|
539
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
707
540
|
var getBadgedMedia = (iconNode, imageNode, size) => {
|
|
708
541
|
if (iconNode && imageNode) {
|
|
709
542
|
if (imageNode && iconNode) {
|
|
710
|
-
return /* @__PURE__ */ (0,
|
|
543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_components7.AvatarView, { size, badge: { asset: iconNode, type: "reference" }, children: imageNode });
|
|
711
544
|
}
|
|
712
545
|
}
|
|
713
546
|
return null;
|
|
@@ -715,7 +548,7 @@ var getBadgedMedia = (iconNode, imageNode, size) => {
|
|
|
715
548
|
var getIconNode = (icon) => {
|
|
716
549
|
if (icon) {
|
|
717
550
|
if ("name" in icon) {
|
|
718
|
-
return /* @__PURE__ */ (0,
|
|
551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DynamicIcon_default, { name: icon.name });
|
|
719
552
|
}
|
|
720
553
|
if (icon.text) {
|
|
721
554
|
return icon.text;
|
|
@@ -727,21 +560,18 @@ var getImageNode = (image, size) => {
|
|
|
727
560
|
if (image) {
|
|
728
561
|
const { accessibilityDescription, uri } = image;
|
|
729
562
|
if (!uri.startsWith("urn:")) {
|
|
730
|
-
return /* @__PURE__ */ (0,
|
|
563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("img", { src: uri, alt: accessibilityDescription, width: `${size}px` });
|
|
731
564
|
}
|
|
732
565
|
if (isUrnFlag(uri)) {
|
|
733
|
-
return /* @__PURE__ */ (0,
|
|
566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(UrnFlag, { urn: uri, accessibilityDescription, size });
|
|
734
567
|
}
|
|
735
568
|
}
|
|
736
569
|
return null;
|
|
737
570
|
};
|
|
738
571
|
|
|
739
|
-
// ../renderers/src/components/Media/Media.tsx
|
|
740
|
-
var import_components11 = require("@transferwise/components");
|
|
741
|
-
|
|
742
572
|
// ../renderers/src/components/Media/LegacyMedia.tsx
|
|
743
|
-
var
|
|
744
|
-
var
|
|
573
|
+
var import_components8 = require("@transferwise/components");
|
|
574
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
745
575
|
var LegacyMedia = ({ image, icon, preferAvatar, size }) => {
|
|
746
576
|
const imageNode = getImageNode(image, size);
|
|
747
577
|
const iconNode = getIconNode(icon);
|
|
@@ -750,11 +580,11 @@ var LegacyMedia = ({ image, icon, preferAvatar, size }) => {
|
|
|
750
580
|
return badge;
|
|
751
581
|
}
|
|
752
582
|
if (imageNode) {
|
|
753
|
-
return preferAvatar ? /* @__PURE__ */ (0,
|
|
583
|
+
return preferAvatar ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_components8.AvatarView, { children: imageNode }) : imageNode;
|
|
754
584
|
}
|
|
755
585
|
if (iconNode && icon) {
|
|
756
586
|
if ("text" in icon || size === 48) {
|
|
757
|
-
return /* @__PURE__ */ (0,
|
|
587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_components8.AvatarView, { size, children: iconNode });
|
|
758
588
|
}
|
|
759
589
|
return iconNode;
|
|
760
590
|
}
|
|
@@ -762,7 +592,7 @@ var LegacyMedia = ({ image, icon, preferAvatar, size }) => {
|
|
|
762
592
|
};
|
|
763
593
|
|
|
764
594
|
// ../renderers/src/components/Media/Media.tsx
|
|
765
|
-
var
|
|
595
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
766
596
|
function Media({
|
|
767
597
|
media,
|
|
768
598
|
preferAvatar,
|
|
@@ -770,13 +600,13 @@ function Media({
|
|
|
770
600
|
}) {
|
|
771
601
|
switch (media == null ? void 0 : media.type) {
|
|
772
602
|
case "avatar":
|
|
773
|
-
return /* @__PURE__ */ (0,
|
|
603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AvatarMedia, __spreadProps(__spreadValues({}, media), { size }));
|
|
774
604
|
case "image": {
|
|
775
|
-
const
|
|
776
|
-
return
|
|
605
|
+
const { asset, icon } = resolveMediaFromUri(media.uri, size);
|
|
606
|
+
return icon != null ? icon : asset;
|
|
777
607
|
}
|
|
778
608
|
case "legacy": {
|
|
779
|
-
return /* @__PURE__ */ (0,
|
|
609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(LegacyMedia, __spreadProps(__spreadValues({}, media), { preferAvatar, size }));
|
|
780
610
|
}
|
|
781
611
|
default:
|
|
782
612
|
return null;
|
|
@@ -784,21 +614,211 @@ function Media({
|
|
|
784
614
|
}
|
|
785
615
|
|
|
786
616
|
// ../renderers/src/components/Media/OptionMedia.tsx
|
|
787
|
-
var
|
|
617
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
788
618
|
var mediaSize = 48;
|
|
789
619
|
function OptionMedia(props) {
|
|
790
|
-
return /* @__PURE__ */ (0,
|
|
620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Media, __spreadProps(__spreadValues({}, props), { size: mediaSize }));
|
|
791
621
|
}
|
|
792
622
|
|
|
793
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
|
|
794
725
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
795
|
-
|
|
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;
|
|
796
772
|
|
|
797
|
-
// ../renderers/src/
|
|
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
|
|
798
815
|
var import_components13 = require("@transferwise/components");
|
|
799
816
|
|
|
800
|
-
// ../renderers/src/DecisionRenderer/
|
|
817
|
+
// ../renderers/src/DecisionRenderer/DecisionList.tsx
|
|
801
818
|
var import_components12 = require("@transferwise/components");
|
|
819
|
+
|
|
820
|
+
// ../renderers/src/DecisionRenderer/GroupedList.tsx
|
|
821
|
+
var import_components11 = require("@transferwise/components");
|
|
802
822
|
var import_react_intl6 = require("react-intl");
|
|
803
823
|
|
|
804
824
|
// ../renderers/src/messages/decision.messages.ts
|
|
@@ -819,6 +839,11 @@ var decision_messages_default = (0, import_react_intl5.defineMessages)({
|
|
|
819
839
|
defaultMessage: "Recent",
|
|
820
840
|
description: "Label for the group of options that are tagged as recent"
|
|
821
841
|
},
|
|
842
|
+
currenciesWithAccountDetails: {
|
|
843
|
+
id: "df.wise.Decision.currenciesWithAccountDetails",
|
|
844
|
+
defaultMessage: "Currencies with account details",
|
|
845
|
+
description: "Label for the group of options that are tagged as currencies with account details"
|
|
846
|
+
},
|
|
822
847
|
filterPlaceholder: {
|
|
823
848
|
id: "df.wise.Decision.filterPlaceholder",
|
|
824
849
|
defaultMessage: "Start typing to search",
|
|
@@ -837,10 +862,11 @@ var decision_messages_default = (0, import_react_intl5.defineMessages)({
|
|
|
837
862
|
});
|
|
838
863
|
|
|
839
864
|
// ../renderers/src/DecisionRenderer/GroupedList.tsx
|
|
840
|
-
var
|
|
865
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
841
866
|
var OPTION_GROUPS = {
|
|
842
867
|
popular: "popular",
|
|
843
|
-
recent: "recent"
|
|
868
|
+
recent: "recent",
|
|
869
|
+
currencyWithAccountDetails: "currencies-with-account-details"
|
|
844
870
|
};
|
|
845
871
|
var GroupedList = (_a) => {
|
|
846
872
|
var _b = _a, { renderDecisionList: renderDecisionList3 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
|
|
@@ -848,17 +874,24 @@ var GroupedList = (_a) => {
|
|
|
848
874
|
const { options } = rest;
|
|
849
875
|
const popularOptions = options.filter((option) => option.tag === OPTION_GROUPS.popular);
|
|
850
876
|
const recentOptions = options.filter((option) => option.tag === OPTION_GROUPS.recent);
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
877
|
+
const currencyWithAccountDetailsOptions = options.filter(
|
|
878
|
+
(option) => option.tag === OPTION_GROUPS.currencyWithAccountDetails
|
|
879
|
+
);
|
|
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) }),
|
|
854
883
|
renderDecisionList3(__spreadProps(__spreadValues({}, rest), { options: popularOptions }))
|
|
855
884
|
] }) : null,
|
|
856
|
-
recentOptions.length > 0 ? /* @__PURE__ */ (0,
|
|
857
|
-
/* @__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) }),
|
|
858
887
|
renderDecisionList3(__spreadProps(__spreadValues({}, rest), { options: recentOptions }))
|
|
859
888
|
] }) : null,
|
|
860
|
-
/* @__PURE__ */ (0,
|
|
861
|
-
/* @__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) }),
|
|
891
|
+
renderDecisionList3(__spreadProps(__spreadValues({}, rest), { options: currencyWithAccountDetailsOptions }))
|
|
892
|
+
] }) : null,
|
|
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) }),
|
|
862
895
|
renderDecisionList3(rest)
|
|
863
896
|
] })
|
|
864
897
|
] });
|
|
@@ -911,16 +944,16 @@ function filterAndSortDecisionOptions(selectOptions, query) {
|
|
|
911
944
|
}
|
|
912
945
|
|
|
913
946
|
// ../renderers/src/DecisionRenderer/DecisionList.tsx
|
|
914
|
-
var
|
|
947
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
915
948
|
var DecisionWrapper = (props) => {
|
|
916
|
-
return /* @__PURE__ */ (0,
|
|
917
|
-
props.title && /* @__PURE__ */ (0,
|
|
918
|
-
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))
|
|
919
952
|
] });
|
|
920
953
|
};
|
|
921
954
|
var UnfilteredDecisionList = (_a) => {
|
|
922
955
|
var _b = _a, { renderDecisionList: renderDecisionList3 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
|
|
923
|
-
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);
|
|
924
957
|
};
|
|
925
958
|
var FilteredDecisionList = (props) => {
|
|
926
959
|
const { formatMessage } = (0, import_react_intl7.useIntl)();
|
|
@@ -928,9 +961,9 @@ var FilteredDecisionList = (props) => {
|
|
|
928
961
|
const { control, options, renderDecisionList: renderDecisionList3 } = props;
|
|
929
962
|
const filteredOptions = filterAndSortDecisionOptions(options, query);
|
|
930
963
|
const isGrouped = isGroupedDecision(options);
|
|
931
|
-
return /* @__PURE__ */ (0,
|
|
932
|
-
/* @__PURE__ */ (0,
|
|
933
|
-
|
|
964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
965
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
966
|
+
import_components12.SearchInput,
|
|
934
967
|
{
|
|
935
968
|
placeholder: formatMessage(decision_messages_default.filterPlaceholder),
|
|
936
969
|
value: query,
|
|
@@ -940,35 +973,35 @@ var FilteredDecisionList = (props) => {
|
|
|
940
973
|
}
|
|
941
974
|
}
|
|
942
975
|
),
|
|
943
|
-
isGrouped && query.length === 0 ? /* @__PURE__ */ (0,
|
|
944
|
-
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" }),
|
|
945
978
|
filteredOptions.length > 0 ? renderDecisionList3({
|
|
946
979
|
control,
|
|
947
980
|
className: query.length === 0 ? "m-t-3" : "",
|
|
948
981
|
options: filteredOptions
|
|
949
|
-
}) : /* @__PURE__ */ (0,
|
|
982
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { children: formatMessage(decision_messages_default.noResults) })
|
|
950
983
|
] })
|
|
951
984
|
] });
|
|
952
985
|
};
|
|
953
986
|
|
|
954
987
|
// ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
|
|
955
|
-
var
|
|
988
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
956
989
|
var DecisionRenderer = {
|
|
957
990
|
canRenderType: "decision",
|
|
958
991
|
render: (props) => {
|
|
959
|
-
return /* @__PURE__ */ (0,
|
|
992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }));
|
|
960
993
|
}
|
|
961
994
|
};
|
|
962
995
|
var renderDecisionList = ({ options, className, control }) => {
|
|
963
|
-
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) => {
|
|
964
997
|
const { description, disabled, media, title: itemTitle, tag, onClick } = option;
|
|
965
|
-
return /* @__PURE__ */ (0,
|
|
966
|
-
|
|
998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
999
|
+
import_components13.NavigationOption,
|
|
967
1000
|
{
|
|
968
1001
|
title: itemTitle,
|
|
969
1002
|
content: description,
|
|
970
1003
|
disabled,
|
|
971
|
-
media: media ? /* @__PURE__ */ (0,
|
|
1004
|
+
media: media ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
972
1005
|
OptionMedia,
|
|
973
1006
|
{
|
|
974
1007
|
media,
|
|
@@ -986,10 +1019,21 @@ var renderDecisionList = ({ options, className, control }) => {
|
|
|
986
1019
|
var DecisionRenderer_default = DecisionRenderer;
|
|
987
1020
|
|
|
988
1021
|
// ../renderers/src/DividerRenderer.tsx
|
|
989
|
-
var
|
|
1022
|
+
var import_components14 = require("@transferwise/components");
|
|
1023
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1024
|
+
var mapControlToLevel = (control) => {
|
|
1025
|
+
switch (control) {
|
|
1026
|
+
case "section":
|
|
1027
|
+
return "section";
|
|
1028
|
+
case "content":
|
|
1029
|
+
return "content";
|
|
1030
|
+
default:
|
|
1031
|
+
return "subsection";
|
|
1032
|
+
}
|
|
1033
|
+
};
|
|
990
1034
|
var DividerRenderer = {
|
|
991
1035
|
canRenderType: "divider",
|
|
992
|
-
render: ({ margin }) => /* @__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) })
|
|
993
1037
|
};
|
|
994
1038
|
var DividerRenderer_default = DividerRenderer;
|
|
995
1039
|
|
|
@@ -1024,7 +1068,7 @@ var external_confirmation_messages_default = (0, import_react_intl8.defineMessag
|
|
|
1024
1068
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
1025
1069
|
var import_react_intl9 = require("react-intl");
|
|
1026
1070
|
var import_react4 = require("react");
|
|
1027
|
-
var
|
|
1071
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1028
1072
|
var ExternalConfirmationRenderer = {
|
|
1029
1073
|
canRenderType: "external-confirmation",
|
|
1030
1074
|
render: ExternalConfirmationRendererComponent
|
|
@@ -1047,15 +1091,15 @@ function ExternalConfirmationRendererComponent({
|
|
|
1047
1091
|
}
|
|
1048
1092
|
}
|
|
1049
1093
|
}, []);
|
|
1050
|
-
return /* @__PURE__ */ (0,
|
|
1094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1051
1095
|
import_components15.Modal,
|
|
1052
1096
|
{
|
|
1053
1097
|
open: status === "failure",
|
|
1054
1098
|
title: formatMessage(external_confirmation_messages_default.title),
|
|
1055
|
-
body: /* @__PURE__ */ (0,
|
|
1056
|
-
/* @__PURE__ */ (0,
|
|
1057
|
-
/* @__PURE__ */ (0,
|
|
1058
|
-
/* @__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)(
|
|
1059
1103
|
import_components15.Button,
|
|
1060
1104
|
{
|
|
1061
1105
|
v2: true,
|
|
@@ -1070,7 +1114,7 @@ function ExternalConfirmationRendererComponent({
|
|
|
1070
1114
|
children: formatMessage(external_confirmation_messages_default.open)
|
|
1071
1115
|
}
|
|
1072
1116
|
),
|
|
1073
|
-
/* @__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) })
|
|
1074
1118
|
] }) })
|
|
1075
1119
|
] }),
|
|
1076
1120
|
onClose: onCancel
|
|
@@ -1087,27 +1131,27 @@ function getOrigin(url) {
|
|
|
1087
1131
|
var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
|
|
1088
1132
|
|
|
1089
1133
|
// ../renderers/src/FormRenderer.tsx
|
|
1090
|
-
var
|
|
1134
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1091
1135
|
var FormRenderer = {
|
|
1092
1136
|
canRenderType: "form",
|
|
1093
|
-
render: ({ children, margin }) => /* @__PURE__ */ (0,
|
|
1137
|
+
render: ({ children, margin }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: getMargin(margin), children })
|
|
1094
1138
|
};
|
|
1095
1139
|
var FormRenderer_default = FormRenderer;
|
|
1096
1140
|
|
|
1097
1141
|
// ../renderers/src/FormSectionRenderer.tsx
|
|
1098
1142
|
var import_components16 = require("@transferwise/components");
|
|
1099
|
-
var
|
|
1143
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1100
1144
|
var FormSectionRenderer = {
|
|
1101
1145
|
canRenderType: "form-section",
|
|
1102
|
-
render: ({ title, description, children }) => /* @__PURE__ */ (0,
|
|
1103
|
-
title && /* @__PURE__ */ (0,
|
|
1146
|
+
render: ({ title, description, children }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("fieldset", { children: [
|
|
1147
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1104
1148
|
import_components16.Header,
|
|
1105
1149
|
{
|
|
1106
1150
|
as: "h2",
|
|
1107
1151
|
title
|
|
1108
1152
|
}
|
|
1109
1153
|
),
|
|
1110
|
-
description && /* @__PURE__ */ (0,
|
|
1154
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { children: description }),
|
|
1111
1155
|
children
|
|
1112
1156
|
] })
|
|
1113
1157
|
};
|
|
@@ -1115,18 +1159,18 @@ var FormSectionRenderer_default = FormSectionRenderer;
|
|
|
1115
1159
|
|
|
1116
1160
|
// ../renderers/src/HeadingRenderer.tsx
|
|
1117
1161
|
var import_components17 = require("@transferwise/components");
|
|
1118
|
-
var
|
|
1162
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1119
1163
|
var HeadingRenderer = {
|
|
1120
1164
|
canRenderType: "heading",
|
|
1121
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
1165
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, __spreadValues({}, props))
|
|
1122
1166
|
};
|
|
1123
1167
|
function Heading(props) {
|
|
1124
1168
|
const { text, size, align, margin, control } = props;
|
|
1125
1169
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
1126
|
-
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 });
|
|
1127
1171
|
}
|
|
1128
1172
|
function DisplayHeading({ size, text, className }) {
|
|
1129
|
-
return /* @__PURE__ */ (0,
|
|
1173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components17.Display, { type: getDisplayType(size), className, children: text });
|
|
1130
1174
|
}
|
|
1131
1175
|
var getDisplayType = (size) => {
|
|
1132
1176
|
switch (size) {
|
|
@@ -1142,7 +1186,7 @@ var getDisplayType = (size) => {
|
|
|
1142
1186
|
}
|
|
1143
1187
|
};
|
|
1144
1188
|
function StandardHeading({ size, text, className }) {
|
|
1145
|
-
return /* @__PURE__ */ (0,
|
|
1189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components17.Title, { type: getTitleTypeBySize(size), className, children: text });
|
|
1146
1190
|
}
|
|
1147
1191
|
var getTitleTypeBySize = (size) => {
|
|
1148
1192
|
var _a;
|
|
@@ -1169,7 +1213,7 @@ function isRelativePath(url = "") {
|
|
|
1169
1213
|
}
|
|
1170
1214
|
|
|
1171
1215
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
1172
|
-
var
|
|
1216
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1173
1217
|
function UrlImage({
|
|
1174
1218
|
accessibilityDescription,
|
|
1175
1219
|
align,
|
|
@@ -1184,7 +1228,7 @@ function UrlImage({
|
|
|
1184
1228
|
void getImageSource(httpClient, uri).then(setImageSource);
|
|
1185
1229
|
}
|
|
1186
1230
|
}, [uri, httpClient]);
|
|
1187
|
-
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)(
|
|
1188
1232
|
import_components18.Image,
|
|
1189
1233
|
{
|
|
1190
1234
|
className: `img-responsive ${getMargin(margin)}`,
|
|
@@ -1228,7 +1272,7 @@ var getImageSource = async (httpClient, imageUrl) => {
|
|
|
1228
1272
|
};
|
|
1229
1273
|
|
|
1230
1274
|
// ../renderers/src/ImageRenderer/UrnFlagImage.tsx
|
|
1231
|
-
var
|
|
1275
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1232
1276
|
var maxFlagSize = 600;
|
|
1233
1277
|
function UrnFlagImage({
|
|
1234
1278
|
accessibilityDescription,
|
|
@@ -1237,7 +1281,7 @@ function UrnFlagImage({
|
|
|
1237
1281
|
size,
|
|
1238
1282
|
uri
|
|
1239
1283
|
}) {
|
|
1240
|
-
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 }) });
|
|
1241
1285
|
}
|
|
1242
1286
|
|
|
1243
1287
|
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
@@ -1254,7 +1298,7 @@ var isAnimated = (uri) => {
|
|
|
1254
1298
|
// ../renderers/src/ImageRenderer/SafeIllustration3D.tsx
|
|
1255
1299
|
var import_art3 = require("@wise/art");
|
|
1256
1300
|
var import_react6 = require("react");
|
|
1257
|
-
var
|
|
1301
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1258
1302
|
var Illustration3DErrorBoundary = class extends import_react6.Component {
|
|
1259
1303
|
constructor(props) {
|
|
1260
1304
|
super(props);
|
|
@@ -1278,12 +1322,12 @@ var SafeIllustration3D = ({
|
|
|
1278
1322
|
size,
|
|
1279
1323
|
onError
|
|
1280
1324
|
}) => {
|
|
1281
|
-
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 }) });
|
|
1282
1326
|
};
|
|
1283
1327
|
var SafeIllustration3D_default = SafeIllustration3D;
|
|
1284
1328
|
|
|
1285
1329
|
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
1286
|
-
var
|
|
1330
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1287
1331
|
var urnPrefix = "urn:wise:illustrations:";
|
|
1288
1332
|
var isUrnIllustration = (uri) => uri.startsWith(urnPrefix);
|
|
1289
1333
|
function UrnIllustration({
|
|
@@ -1298,7 +1342,7 @@ function UrnIllustration({
|
|
|
1298
1342
|
const illustrationName = getIllustrationName(uri);
|
|
1299
1343
|
const illustration3DName = getIllustration3DName(uri);
|
|
1300
1344
|
if (illustration3DName && isAnimated(uri) && !has3DFailed) {
|
|
1301
|
-
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)(
|
|
1302
1346
|
SafeIllustration3D_default,
|
|
1303
1347
|
{
|
|
1304
1348
|
name: illustration3DName,
|
|
@@ -1307,7 +1351,7 @@ function UrnIllustration({
|
|
|
1307
1351
|
}
|
|
1308
1352
|
) });
|
|
1309
1353
|
}
|
|
1310
|
-
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)(
|
|
1311
1355
|
import_art4.Illustration,
|
|
1312
1356
|
{
|
|
1313
1357
|
className: "df-illustration",
|
|
@@ -1327,24 +1371,24 @@ var getIllustration3DName = (uri) => {
|
|
|
1327
1371
|
};
|
|
1328
1372
|
|
|
1329
1373
|
// ../renderers/src/ImageRenderer/UrnImage.tsx
|
|
1330
|
-
var
|
|
1374
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1331
1375
|
var isUrnImage = (uri) => uri.startsWith("urn:");
|
|
1332
1376
|
function UrnImage(props) {
|
|
1333
1377
|
const { uri } = props;
|
|
1334
1378
|
if (isUrnIllustration(uri)) {
|
|
1335
|
-
return /* @__PURE__ */ (0,
|
|
1379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(UrnIllustration, __spreadValues({}, props));
|
|
1336
1380
|
}
|
|
1337
1381
|
if (isUrnFlag(uri)) {
|
|
1338
|
-
return /* @__PURE__ */ (0,
|
|
1382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(UrnFlagImage, __spreadValues({}, props));
|
|
1339
1383
|
}
|
|
1340
1384
|
return null;
|
|
1341
1385
|
}
|
|
1342
1386
|
|
|
1343
1387
|
// ../renderers/src/ImageRenderer/ImageRenderer.tsx
|
|
1344
|
-
var
|
|
1388
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1345
1389
|
var ImageRenderer = {
|
|
1346
1390
|
canRenderType: "image",
|
|
1347
|
-
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))
|
|
1348
1392
|
};
|
|
1349
1393
|
|
|
1350
1394
|
// ../renderers/src/ImageRenderer/index.tsx
|
|
@@ -1352,7 +1396,7 @@ var ImageRenderer_default = ImageRenderer;
|
|
|
1352
1396
|
|
|
1353
1397
|
// ../renderers/src/InstructionsRenderer.tsx
|
|
1354
1398
|
var import_components19 = require("@transferwise/components");
|
|
1355
|
-
var
|
|
1399
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1356
1400
|
var doContext = ["positive", "neutral"];
|
|
1357
1401
|
var dontContext = ["warning", "negative"];
|
|
1358
1402
|
var InstructionsRenderer = {
|
|
@@ -1360,9 +1404,9 @@ var InstructionsRenderer = {
|
|
|
1360
1404
|
render: ({ items, margin, title }) => {
|
|
1361
1405
|
const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
|
|
1362
1406
|
const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
|
|
1363
|
-
return /* @__PURE__ */ (0,
|
|
1364
|
-
title ? /* @__PURE__ */ (0,
|
|
1365
|
-
/* @__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 })
|
|
1366
1410
|
] });
|
|
1367
1411
|
}
|
|
1368
1412
|
};
|
|
@@ -1394,7 +1438,7 @@ function pick(obj, ...keys) {
|
|
|
1394
1438
|
}
|
|
1395
1439
|
|
|
1396
1440
|
// ../renderers/src/IntegerInputRenderer.tsx
|
|
1397
|
-
var
|
|
1441
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1398
1442
|
var IntegerInputRenderer = {
|
|
1399
1443
|
canRenderType: "input-integer",
|
|
1400
1444
|
render: (props) => {
|
|
@@ -1409,7 +1453,7 @@ var IntegerInputRenderer = {
|
|
|
1409
1453
|
"maximum",
|
|
1410
1454
|
"minimum"
|
|
1411
1455
|
);
|
|
1412
|
-
return /* @__PURE__ */ (0,
|
|
1456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1413
1457
|
FieldInput_default,
|
|
1414
1458
|
{
|
|
1415
1459
|
id,
|
|
@@ -1417,7 +1461,7 @@ var IntegerInputRenderer = {
|
|
|
1417
1461
|
description,
|
|
1418
1462
|
validation: validationState,
|
|
1419
1463
|
help,
|
|
1420
|
-
children: /* @__PURE__ */ (0,
|
|
1464
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components20.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1421
1465
|
import_components20.Input,
|
|
1422
1466
|
__spreadValues({
|
|
1423
1467
|
id,
|
|
@@ -1442,12 +1486,12 @@ var IntegerInputRenderer_default = IntegerInputRenderer;
|
|
|
1442
1486
|
// ../renderers/src/ListRenderer.tsx
|
|
1443
1487
|
var import_components21 = require("@transferwise/components");
|
|
1444
1488
|
var import_classnames3 = __toESM(require("classnames"));
|
|
1445
|
-
var
|
|
1489
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1446
1490
|
var ListRenderer = {
|
|
1447
1491
|
canRenderType: "list",
|
|
1448
|
-
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ (0,
|
|
1449
|
-
(title || callToAction) && /* @__PURE__ */ (0,
|
|
1450
|
-
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))
|
|
1451
1495
|
] })
|
|
1452
1496
|
};
|
|
1453
1497
|
var DesignSystemListItem = ({
|
|
@@ -1459,15 +1503,15 @@ var DesignSystemListItem = ({
|
|
|
1459
1503
|
media,
|
|
1460
1504
|
control,
|
|
1461
1505
|
tag
|
|
1462
|
-
}) => /* @__PURE__ */ (0,
|
|
1506
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1463
1507
|
"label",
|
|
1464
1508
|
{
|
|
1465
1509
|
className: (0, import_classnames3.default)("np-option p-a-2", {
|
|
1466
1510
|
"np-option__sm-media": true,
|
|
1467
1511
|
"np-option__container-aligned": true
|
|
1468
1512
|
}),
|
|
1469
|
-
children: /* @__PURE__ */ (0,
|
|
1470
|
-
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)(
|
|
1471
1515
|
ListItemMedia,
|
|
1472
1516
|
{
|
|
1473
1517
|
icon,
|
|
@@ -1475,14 +1519,14 @@ var DesignSystemListItem = ({
|
|
|
1475
1519
|
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
1476
1520
|
}
|
|
1477
1521
|
) }) : null,
|
|
1478
|
-
/* @__PURE__ */ (0,
|
|
1479
|
-
/* @__PURE__ */ (0,
|
|
1480
|
-
/* @__PURE__ */ (0,
|
|
1481
|
-
/* @__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 })
|
|
1482
1526
|
] }),
|
|
1483
|
-
/* @__PURE__ */ (0,
|
|
1484
|
-
/* @__PURE__ */ (0,
|
|
1485
|
-
/* @__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 })
|
|
1486
1530
|
] })
|
|
1487
1531
|
] })
|
|
1488
1532
|
] })
|
|
@@ -1495,9 +1539,9 @@ var ListItemMedia = ({
|
|
|
1495
1539
|
preferAvatar
|
|
1496
1540
|
}) => {
|
|
1497
1541
|
if (icon) {
|
|
1498
|
-
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 }) });
|
|
1499
1543
|
}
|
|
1500
|
-
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 }) });
|
|
1501
1545
|
};
|
|
1502
1546
|
var getListAction = (callToAction) => {
|
|
1503
1547
|
if (callToAction) {
|
|
@@ -1513,10 +1557,10 @@ var ListRenderer_default = ListRenderer;
|
|
|
1513
1557
|
|
|
1514
1558
|
// ../renderers/src/LoadingIndicatorRenderer.tsx
|
|
1515
1559
|
var import_components22 = require("@transferwise/components");
|
|
1516
|
-
var
|
|
1560
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1517
1561
|
var LoadingIndicatorRenderer = {
|
|
1518
1562
|
canRenderType: "loading-indicator",
|
|
1519
|
-
render: ({ margin, size }) => /* @__PURE__ */ (0,
|
|
1563
|
+
render: ({ margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1520
1564
|
import_components22.Loader,
|
|
1521
1565
|
{
|
|
1522
1566
|
size,
|
|
@@ -1529,28 +1573,28 @@ var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
|
|
|
1529
1573
|
|
|
1530
1574
|
// ../renderers/src/MarkdownRenderer.tsx
|
|
1531
1575
|
var import_components23 = require("@transferwise/components");
|
|
1532
|
-
var
|
|
1576
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1533
1577
|
var MarkdownRenderer = {
|
|
1534
1578
|
canRenderType: "markdown",
|
|
1535
|
-
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 }) })
|
|
1536
1580
|
};
|
|
1537
1581
|
var MarkdownRenderer_default = MarkdownRenderer;
|
|
1538
1582
|
|
|
1539
1583
|
// ../renderers/src/ModalLayoutRenderer.tsx
|
|
1540
1584
|
var import_components24 = require("@transferwise/components");
|
|
1541
1585
|
var import_react8 = require("react");
|
|
1542
|
-
var
|
|
1586
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1543
1587
|
var ModalLayoutRenderer = {
|
|
1544
1588
|
canRenderType: "modal-layout",
|
|
1545
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
1589
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DFModal, __spreadValues({}, props))
|
|
1546
1590
|
};
|
|
1547
1591
|
var ModalLayoutRenderer_default = ModalLayoutRenderer;
|
|
1548
1592
|
function DFModal({ content, margin, trigger }) {
|
|
1549
1593
|
const [visible, setVisible] = (0, import_react8.useState)(false);
|
|
1550
1594
|
const { children, title } = content;
|
|
1551
|
-
return /* @__PURE__ */ (0,
|
|
1552
|
-
/* @__PURE__ */ (0,
|
|
1553
|
-
/* @__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)(
|
|
1554
1598
|
import_components24.Modal,
|
|
1555
1599
|
{
|
|
1556
1600
|
scroll: "content",
|
|
@@ -1566,11 +1610,11 @@ function DFModal({ content, margin, trigger }) {
|
|
|
1566
1610
|
|
|
1567
1611
|
// ../renderers/src/ModalRenderer.tsx
|
|
1568
1612
|
var import_components25 = require("@transferwise/components");
|
|
1569
|
-
var
|
|
1613
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1570
1614
|
var ModalRenderer = {
|
|
1571
1615
|
canRenderType: "modal",
|
|
1572
1616
|
render: ({ title, children, open, onClose }) => {
|
|
1573
|
-
return /* @__PURE__ */ (0,
|
|
1617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components25.Modal, { open, title, body: children, onClose });
|
|
1574
1618
|
}
|
|
1575
1619
|
};
|
|
1576
1620
|
|
|
@@ -1590,10 +1634,10 @@ var multi_select_messages_default = (0, import_react_intl10.defineMessages)({
|
|
|
1590
1634
|
});
|
|
1591
1635
|
|
|
1592
1636
|
// ../renderers/src/MultiSelectInputRenderer.tsx
|
|
1593
|
-
var
|
|
1637
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
1594
1638
|
var MultiSelectInputRenderer = {
|
|
1595
1639
|
canRenderType: "input-multi-select",
|
|
1596
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
1640
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(MultiSelectInputRendererComponent, __spreadValues({}, props))
|
|
1597
1641
|
};
|
|
1598
1642
|
function MultiSelectInputRendererComponent(props) {
|
|
1599
1643
|
const { formatMessage } = (0, import_react_intl11.useIntl)();
|
|
@@ -1635,12 +1679,12 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
1635
1679
|
const contentProps = {
|
|
1636
1680
|
title: option.title,
|
|
1637
1681
|
description: option.description,
|
|
1638
|
-
icon: /* @__PURE__ */ (0,
|
|
1682
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
|
|
1639
1683
|
};
|
|
1640
|
-
return /* @__PURE__ */ (0,
|
|
1684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_components26.SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
1641
1685
|
};
|
|
1642
1686
|
const extraProps = { autoComplete };
|
|
1643
|
-
return /* @__PURE__ */ (0,
|
|
1687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
1644
1688
|
FieldInput_default,
|
|
1645
1689
|
{
|
|
1646
1690
|
id,
|
|
@@ -1648,7 +1692,7 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
1648
1692
|
help,
|
|
1649
1693
|
description,
|
|
1650
1694
|
validation: validationState,
|
|
1651
|
-
children: /* @__PURE__ */ (0,
|
|
1695
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
1652
1696
|
import_components26.SelectInput,
|
|
1653
1697
|
__spreadValues({
|
|
1654
1698
|
id,
|
|
@@ -1693,7 +1737,7 @@ var import_components28 = require("@transferwise/components");
|
|
|
1693
1737
|
// ../renderers/src/components/UploadFieldInput.tsx
|
|
1694
1738
|
var import_components27 = require("@transferwise/components");
|
|
1695
1739
|
var import_classnames4 = __toESM(require("classnames"));
|
|
1696
|
-
var
|
|
1740
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
1697
1741
|
function UploadFieldInput({
|
|
1698
1742
|
id,
|
|
1699
1743
|
children,
|
|
@@ -1702,18 +1746,18 @@ function UploadFieldInput({
|
|
|
1702
1746
|
help,
|
|
1703
1747
|
validation
|
|
1704
1748
|
}) {
|
|
1705
|
-
const labelContent = label && help ? /* @__PURE__ */ (0,
|
|
1749
|
+
const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(LabelContentWithHelp, { text: label, help }) : label;
|
|
1706
1750
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
1707
|
-
return /* @__PURE__ */ (0,
|
|
1751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
1708
1752
|
"div",
|
|
1709
1753
|
{
|
|
1710
1754
|
className: (0, import_classnames4.default)("form-group d-block", {
|
|
1711
1755
|
"has-error": (validation == null ? void 0 : validation.status) === "invalid"
|
|
1712
1756
|
}),
|
|
1713
1757
|
children: [
|
|
1714
|
-
/* @__PURE__ */ (0,
|
|
1758
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
|
|
1715
1759
|
children,
|
|
1716
|
-
(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 })
|
|
1717
1761
|
]
|
|
1718
1762
|
}
|
|
1719
1763
|
);
|
|
@@ -1748,7 +1792,7 @@ var getSizeLimit = (maxSize) => {
|
|
|
1748
1792
|
};
|
|
1749
1793
|
|
|
1750
1794
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
1751
|
-
var
|
|
1795
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
1752
1796
|
var MultiUploadInputRenderer = {
|
|
1753
1797
|
canRenderType: "input-upload-multi",
|
|
1754
1798
|
render: (props) => {
|
|
@@ -1773,7 +1817,7 @@ var MultiUploadInputRenderer = {
|
|
|
1773
1817
|
};
|
|
1774
1818
|
const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
|
|
1775
1819
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
1776
|
-
return /* @__PURE__ */ (0,
|
|
1820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1777
1821
|
UploadFieldInput_default,
|
|
1778
1822
|
{
|
|
1779
1823
|
id,
|
|
@@ -1781,7 +1825,7 @@ var MultiUploadInputRenderer = {
|
|
|
1781
1825
|
description,
|
|
1782
1826
|
validation: validationState,
|
|
1783
1827
|
help,
|
|
1784
|
-
children: /* @__PURE__ */ (0,
|
|
1828
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1785
1829
|
import_components28.UploadInput,
|
|
1786
1830
|
{
|
|
1787
1831
|
id,
|
|
@@ -1805,7 +1849,7 @@ var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
|
|
|
1805
1849
|
|
|
1806
1850
|
// ../renderers/src/NumberInputRenderer.tsx
|
|
1807
1851
|
var import_components29 = require("@transferwise/components");
|
|
1808
|
-
var
|
|
1852
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
1809
1853
|
var NumberInputRenderer = {
|
|
1810
1854
|
canRenderType: "input-number",
|
|
1811
1855
|
render: (props) => {
|
|
@@ -1819,7 +1863,7 @@ var NumberInputRenderer = {
|
|
|
1819
1863
|
"maximum",
|
|
1820
1864
|
"minimum"
|
|
1821
1865
|
);
|
|
1822
|
-
return /* @__PURE__ */ (0,
|
|
1866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
1823
1867
|
FieldInput_default,
|
|
1824
1868
|
{
|
|
1825
1869
|
id,
|
|
@@ -1827,7 +1871,7 @@ var NumberInputRenderer = {
|
|
|
1827
1871
|
description,
|
|
1828
1872
|
validation: validationState,
|
|
1829
1873
|
help,
|
|
1830
|
-
children: /* @__PURE__ */ (0,
|
|
1874
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components29.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
1831
1875
|
import_components29.Input,
|
|
1832
1876
|
__spreadValues({
|
|
1833
1877
|
id,
|
|
@@ -1879,17 +1923,17 @@ var paragraph_messages_default = (0, import_react_intl12.defineMessages)({
|
|
|
1879
1923
|
});
|
|
1880
1924
|
|
|
1881
1925
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
1882
|
-
var
|
|
1926
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
1883
1927
|
var ParagraphRenderer = {
|
|
1884
1928
|
canRenderType: "paragraph",
|
|
1885
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
1929
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Paragraph, __spreadValues({}, props))
|
|
1886
1930
|
};
|
|
1887
1931
|
function Paragraph({ align, control, margin, text }) {
|
|
1888
1932
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
1889
|
-
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 });
|
|
1890
1934
|
}
|
|
1891
1935
|
function StandardParagraph({ text, className }) {
|
|
1892
|
-
return /* @__PURE__ */ (0,
|
|
1936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: `np-text-body-large ${className}`, children: text });
|
|
1893
1937
|
}
|
|
1894
1938
|
function CopyableParagraph({
|
|
1895
1939
|
text,
|
|
@@ -1903,8 +1947,8 @@ function CopyableParagraph({
|
|
|
1903
1947
|
});
|
|
1904
1948
|
};
|
|
1905
1949
|
const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
|
|
1906
|
-
return /* @__PURE__ */ (0,
|
|
1907
|
-
/* @__PURE__ */ (0,
|
|
1950
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className, children: [
|
|
1951
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
1908
1952
|
import_components31.Input,
|
|
1909
1953
|
{
|
|
1910
1954
|
type: "text",
|
|
@@ -1913,7 +1957,7 @@ function CopyableParagraph({
|
|
|
1913
1957
|
className: (0, import_classnames5.default)("text-ellipsis", inputAlignmentClasses)
|
|
1914
1958
|
}
|
|
1915
1959
|
),
|
|
1916
|
-
/* @__PURE__ */ (0,
|
|
1960
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components31.Button, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
|
|
1917
1961
|
] });
|
|
1918
1962
|
}
|
|
1919
1963
|
var ParagraphRenderer_default = ParagraphRenderer;
|
|
@@ -1951,10 +1995,10 @@ var repeatable_messages_default = (0, import_react_intl14.defineMessages)({
|
|
|
1951
1995
|
});
|
|
1952
1996
|
|
|
1953
1997
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
1954
|
-
var
|
|
1998
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
1955
1999
|
var RepeatableRenderer = {
|
|
1956
2000
|
canRenderType: "repeatable",
|
|
1957
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
2001
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Repeatable, __spreadValues({}, props))
|
|
1958
2002
|
};
|
|
1959
2003
|
function Repeatable(props) {
|
|
1960
2004
|
const {
|
|
@@ -1993,40 +2037,40 @@ function Repeatable(props) {
|
|
|
1993
2037
|
const onCancelEdit = () => {
|
|
1994
2038
|
setOpenModalType(null);
|
|
1995
2039
|
};
|
|
1996
|
-
return /* @__PURE__ */ (0,
|
|
1997
|
-
title && /* @__PURE__ */ (0,
|
|
1998
|
-
description && /* @__PURE__ */ (0,
|
|
1999
|
-
/* @__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)(
|
|
2000
2044
|
"div",
|
|
2001
2045
|
{
|
|
2002
2046
|
className: (0, import_classnames6.default)("form-group", {
|
|
2003
2047
|
"has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
|
|
2004
2048
|
}),
|
|
2005
2049
|
children: [
|
|
2006
|
-
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0,
|
|
2007
|
-
/* @__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)(
|
|
2008
2052
|
import_components32.NavigationOption,
|
|
2009
2053
|
{
|
|
2010
|
-
media: /* @__PURE__ */ (0,
|
|
2054
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_icons.Plus, {}),
|
|
2011
2055
|
title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2012
2056
|
showMediaAtAllSizes: true,
|
|
2013
2057
|
onClick: () => onAddItem()
|
|
2014
2058
|
}
|
|
2015
2059
|
),
|
|
2016
|
-
(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 })
|
|
2017
2061
|
]
|
|
2018
2062
|
}
|
|
2019
2063
|
),
|
|
2020
|
-
/* @__PURE__ */ (0,
|
|
2064
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2021
2065
|
import_components32.Modal,
|
|
2022
2066
|
{
|
|
2023
2067
|
open: openModalType !== null,
|
|
2024
2068
|
title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2025
|
-
body: /* @__PURE__ */ (0,
|
|
2026
|
-
/* @__PURE__ */ (0,
|
|
2027
|
-
/* @__PURE__ */ (0,
|
|
2028
|
-
/* @__PURE__ */ (0,
|
|
2029
|
-
/* @__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)(
|
|
2030
2074
|
import_components32.Button,
|
|
2031
2075
|
{
|
|
2032
2076
|
v2: true,
|
|
@@ -2048,10 +2092,10 @@ function ItemSummaryOption({
|
|
|
2048
2092
|
item,
|
|
2049
2093
|
onClick
|
|
2050
2094
|
}) {
|
|
2051
|
-
return /* @__PURE__ */ (0,
|
|
2095
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2052
2096
|
import_components32.NavigationOption,
|
|
2053
2097
|
{
|
|
2054
|
-
media: /* @__PURE__ */ (0,
|
|
2098
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(OptionMedia, { media: item.media, preferAvatar: false }),
|
|
2055
2099
|
title: item.title,
|
|
2056
2100
|
content: item.description,
|
|
2057
2101
|
showMediaAtAllSizes: true,
|
|
@@ -2066,8 +2110,8 @@ var import_components34 = require("@transferwise/components");
|
|
|
2066
2110
|
|
|
2067
2111
|
// ../renderers/src/components/Header.tsx
|
|
2068
2112
|
var import_components33 = require("@transferwise/components");
|
|
2069
|
-
var
|
|
2070
|
-
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) });
|
|
2071
2115
|
var getHeaderAction = (callToAction) => {
|
|
2072
2116
|
if (!callToAction) {
|
|
2073
2117
|
return void 0;
|
|
@@ -2089,14 +2133,14 @@ var getHeaderAction = (callToAction) => {
|
|
|
2089
2133
|
};
|
|
2090
2134
|
|
|
2091
2135
|
// ../renderers/src/ReviewRenderer.tsx
|
|
2092
|
-
var
|
|
2136
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2093
2137
|
var ReviewRenderer = {
|
|
2094
2138
|
canRenderType: "review",
|
|
2095
2139
|
render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
|
|
2096
2140
|
const orientation = mapControlToDefinitionListLayout(control);
|
|
2097
|
-
return /* @__PURE__ */ (0,
|
|
2098
|
-
/* @__PURE__ */ (0,
|
|
2099
|
-
/* @__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)(
|
|
2100
2144
|
import_components34.DefinitionList,
|
|
2101
2145
|
{
|
|
2102
2146
|
layout: orientation,
|
|
@@ -2134,10 +2178,10 @@ var mapControlToDefinitionListLayout = (control) => {
|
|
|
2134
2178
|
};
|
|
2135
2179
|
var getFieldLabel = (label, help, onClick) => {
|
|
2136
2180
|
if (help) {
|
|
2137
|
-
return /* @__PURE__ */ (0,
|
|
2181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
2138
2182
|
label,
|
|
2139
2183
|
" ",
|
|
2140
|
-
/* @__PURE__ */ (0,
|
|
2184
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Help_default, { help, onClick })
|
|
2141
2185
|
] });
|
|
2142
2186
|
}
|
|
2143
2187
|
return label;
|
|
@@ -2183,18 +2227,18 @@ var generic_error_messages_default = (0, import_react_intl17.defineMessages)({
|
|
|
2183
2227
|
|
|
2184
2228
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
2185
2229
|
var import_components35 = require("@transferwise/components");
|
|
2186
|
-
var
|
|
2230
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2187
2231
|
function ErrorResult({ state }) {
|
|
2188
2232
|
const intl = (0, import_react_intl18.useIntl)();
|
|
2189
|
-
return /* @__PURE__ */ (0,
|
|
2233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("p", { className: "m-t-2", children: [
|
|
2190
2234
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
2191
2235
|
"\xA0",
|
|
2192
|
-
/* @__PURE__ */ (0,
|
|
2236
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components35.Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
|
|
2193
2237
|
] });
|
|
2194
2238
|
}
|
|
2195
2239
|
|
|
2196
2240
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
2197
|
-
var
|
|
2241
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2198
2242
|
function BlockSearchRendererComponent({
|
|
2199
2243
|
id,
|
|
2200
2244
|
isLoading,
|
|
@@ -2207,8 +2251,8 @@ function BlockSearchRendererComponent({
|
|
|
2207
2251
|
}) {
|
|
2208
2252
|
const [hasSearched, setHasSearched] = (0, import_react12.useState)(false);
|
|
2209
2253
|
const { formatMessage } = (0, import_react_intl19.useIntl)();
|
|
2210
|
-
return /* @__PURE__ */ (0,
|
|
2211
|
-
/* @__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)(
|
|
2212
2256
|
import_components36.Input,
|
|
2213
2257
|
{
|
|
2214
2258
|
id,
|
|
@@ -2225,7 +2269,7 @@ function BlockSearchRendererComponent({
|
|
|
2225
2269
|
}
|
|
2226
2270
|
}
|
|
2227
2271
|
) }),
|
|
2228
|
-
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 })
|
|
2229
2273
|
] });
|
|
2230
2274
|
}
|
|
2231
2275
|
function SearchResultContent({
|
|
@@ -2234,31 +2278,31 @@ function SearchResultContent({
|
|
|
2234
2278
|
}) {
|
|
2235
2279
|
switch (state.type) {
|
|
2236
2280
|
case "error":
|
|
2237
|
-
return /* @__PURE__ */ (0,
|
|
2281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ErrorResult, { state });
|
|
2238
2282
|
case "results":
|
|
2239
|
-
return /* @__PURE__ */ (0,
|
|
2283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(SearchResults, { state, trackEvent });
|
|
2240
2284
|
case "noResults":
|
|
2241
|
-
return /* @__PURE__ */ (0,
|
|
2285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(EmptySearchResult, { state });
|
|
2242
2286
|
case "pending":
|
|
2243
2287
|
default:
|
|
2244
2288
|
return null;
|
|
2245
2289
|
}
|
|
2246
2290
|
}
|
|
2247
2291
|
function EmptySearchResult({ state }) {
|
|
2248
|
-
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 });
|
|
2249
2293
|
}
|
|
2250
2294
|
function SearchResults({
|
|
2251
2295
|
state,
|
|
2252
2296
|
trackEvent
|
|
2253
2297
|
}) {
|
|
2254
|
-
return /* @__PURE__ */ (0,
|
|
2298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components36.NavigationOptionsList, { children: state.results.map((result) => {
|
|
2255
2299
|
const { media } = result;
|
|
2256
|
-
return /* @__PURE__ */ (0,
|
|
2300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2257
2301
|
import_components36.NavigationOption,
|
|
2258
2302
|
{
|
|
2259
2303
|
title: result.title,
|
|
2260
2304
|
content: result.description,
|
|
2261
|
-
media: media ? /* @__PURE__ */ (0,
|
|
2305
|
+
media: media ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(OptionMedia, { media, preferAvatar: false }) : void 0,
|
|
2262
2306
|
showMediaCircle: false,
|
|
2263
2307
|
showMediaAtAllSizes: true,
|
|
2264
2308
|
onClick: () => {
|
|
@@ -2279,7 +2323,7 @@ var import_components37 = require("@transferwise/components");
|
|
|
2279
2323
|
var import_icons2 = require("@transferwise/icons");
|
|
2280
2324
|
var import_react13 = require("react");
|
|
2281
2325
|
var import_react_intl20 = require("react-intl");
|
|
2282
|
-
var
|
|
2326
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2283
2327
|
function InlineSearchRenderer({
|
|
2284
2328
|
id,
|
|
2285
2329
|
isLoading,
|
|
@@ -2291,7 +2335,7 @@ function InlineSearchRenderer({
|
|
|
2291
2335
|
}) {
|
|
2292
2336
|
const [hasSearched, setHasSearched] = (0, import_react13.useState)(false);
|
|
2293
2337
|
const intl = (0, import_react_intl20.useIntl)();
|
|
2294
|
-
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)(
|
|
2295
2339
|
import_components37.Typeahead,
|
|
2296
2340
|
{
|
|
2297
2341
|
id: "typeahead-input-id",
|
|
@@ -2299,10 +2343,10 @@ function InlineSearchRenderer({
|
|
|
2299
2343
|
name: "typeahead-input-name",
|
|
2300
2344
|
size: "md",
|
|
2301
2345
|
maxHeight: 100,
|
|
2302
|
-
footer: /* @__PURE__ */ (0,
|
|
2346
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TypeaheadFooter, { state, isLoading }),
|
|
2303
2347
|
multiple: false,
|
|
2304
2348
|
clearable: false,
|
|
2305
|
-
addon: /* @__PURE__ */ (0,
|
|
2349
|
+
addon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_icons2.Search, { size: 24 }),
|
|
2306
2350
|
options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
|
|
2307
2351
|
minQueryLength: 1,
|
|
2308
2352
|
onChange: (values) => {
|
|
@@ -2339,23 +2383,23 @@ function mapResultToTypeaheadOption(result) {
|
|
|
2339
2383
|
function TypeaheadFooter({ state, isLoading }) {
|
|
2340
2384
|
const { formatMessage } = (0, import_react_intl20.useIntl)();
|
|
2341
2385
|
if (state.type === "noResults") {
|
|
2342
|
-
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 });
|
|
2343
2387
|
}
|
|
2344
2388
|
if (state.type === "error") {
|
|
2345
|
-
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 }) });
|
|
2346
2390
|
}
|
|
2347
2391
|
if (state.type === "pending" || isLoading) {
|
|
2348
|
-
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) });
|
|
2349
2393
|
}
|
|
2350
2394
|
return null;
|
|
2351
2395
|
}
|
|
2352
2396
|
var InlineSearchRendererComponent_default = InlineSearchRenderer;
|
|
2353
2397
|
|
|
2354
2398
|
// ../renderers/src/SearchRenderer/SearchRenderer.tsx
|
|
2355
|
-
var
|
|
2399
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2356
2400
|
var SearchRenderer = {
|
|
2357
2401
|
canRenderType: "search",
|
|
2358
|
-
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))
|
|
2359
2403
|
};
|
|
2360
2404
|
var SearchRenderer_default = SearchRenderer;
|
|
2361
2405
|
|
|
@@ -2384,12 +2428,12 @@ var getHeaderAction2 = (callToAction) => {
|
|
|
2384
2428
|
};
|
|
2385
2429
|
|
|
2386
2430
|
// ../renderers/src/SectionRenderer.tsx
|
|
2387
|
-
var
|
|
2431
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
2388
2432
|
var SectionRenderer = {
|
|
2389
2433
|
canRenderType: "section",
|
|
2390
2434
|
render: ({ children, callToAction, margin, title }) => {
|
|
2391
|
-
return /* @__PURE__ */ (0,
|
|
2392
|
-
(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) }),
|
|
2393
2437
|
children
|
|
2394
2438
|
] });
|
|
2395
2439
|
}
|
|
@@ -2398,7 +2442,7 @@ var SectionRenderer_default = SectionRenderer;
|
|
|
2398
2442
|
|
|
2399
2443
|
// ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
2400
2444
|
var import_components39 = require("@transferwise/components");
|
|
2401
|
-
var
|
|
2445
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
2402
2446
|
function RadioInputRendererComponent(props) {
|
|
2403
2447
|
const {
|
|
2404
2448
|
id,
|
|
@@ -2412,8 +2456,8 @@ function RadioInputRendererComponent(props) {
|
|
|
2412
2456
|
validationState,
|
|
2413
2457
|
onSelect
|
|
2414
2458
|
} = props;
|
|
2415
|
-
return /* @__PURE__ */ (0,
|
|
2416
|
-
/* @__PURE__ */ (0,
|
|
2459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
|
2460
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2417
2461
|
FieldInput_default,
|
|
2418
2462
|
{
|
|
2419
2463
|
id,
|
|
@@ -2421,7 +2465,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2421
2465
|
help,
|
|
2422
2466
|
description,
|
|
2423
2467
|
validation: validationState,
|
|
2424
|
-
children: /* @__PURE__ */ (0,
|
|
2468
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2425
2469
|
import_components39.RadioGroup,
|
|
2426
2470
|
{
|
|
2427
2471
|
name: id,
|
|
@@ -2430,7 +2474,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2430
2474
|
value: index,
|
|
2431
2475
|
secondary: option.description,
|
|
2432
2476
|
disabled: option.disabled || disabled,
|
|
2433
|
-
avatar: /* @__PURE__ */ (0,
|
|
2477
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
|
|
2434
2478
|
})),
|
|
2435
2479
|
selectedValue: selectedIndex != null ? selectedIndex : void 0,
|
|
2436
2480
|
onChange: onSelect
|
|
@@ -2446,7 +2490,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2446
2490
|
// ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
2447
2491
|
var import_components40 = require("@transferwise/components");
|
|
2448
2492
|
var import_react14 = require("react");
|
|
2449
|
-
var
|
|
2493
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
2450
2494
|
function TabInputRendererComponent(props) {
|
|
2451
2495
|
const {
|
|
2452
2496
|
id,
|
|
@@ -2465,8 +2509,8 @@ function TabInputRendererComponent(props) {
|
|
|
2465
2509
|
onSelect(0);
|
|
2466
2510
|
}
|
|
2467
2511
|
}, [selectedIndex, onSelect, options.length]);
|
|
2468
|
-
return /* @__PURE__ */ (0,
|
|
2469
|
-
/* @__PURE__ */ (0,
|
|
2512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
|
|
2513
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
2470
2514
|
FieldInput_default,
|
|
2471
2515
|
{
|
|
2472
2516
|
id,
|
|
@@ -2474,7 +2518,7 @@ function TabInputRendererComponent(props) {
|
|
|
2474
2518
|
help,
|
|
2475
2519
|
description,
|
|
2476
2520
|
validation: validationState,
|
|
2477
|
-
children: /* @__PURE__ */ (0,
|
|
2521
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
2478
2522
|
import_components40.Tabs,
|
|
2479
2523
|
{
|
|
2480
2524
|
name: id,
|
|
@@ -2483,7 +2527,7 @@ function TabInputRendererComponent(props) {
|
|
|
2483
2527
|
title: option.title,
|
|
2484
2528
|
// if we pass null, we get some props-types console errors
|
|
2485
2529
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
2486
|
-
content: /* @__PURE__ */ (0,
|
|
2530
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_jsx_runtime59.Fragment, {}),
|
|
2487
2531
|
disabled: option.disabled || disabled
|
|
2488
2532
|
})),
|
|
2489
2533
|
onTabSelect: onSelect
|
|
@@ -2498,7 +2542,7 @@ var isValidIndex = (index, options) => index !== null && index >= 0 && index < o
|
|
|
2498
2542
|
|
|
2499
2543
|
// ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
2500
2544
|
var import_components41 = require("@transferwise/components");
|
|
2501
|
-
var
|
|
2545
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
2502
2546
|
function SelectInputRendererComponent(props) {
|
|
2503
2547
|
const {
|
|
2504
2548
|
id,
|
|
@@ -2538,13 +2582,13 @@ function SelectInputRendererComponent(props) {
|
|
|
2538
2582
|
} : {
|
|
2539
2583
|
title: option.title,
|
|
2540
2584
|
description: option.description,
|
|
2541
|
-
icon: /* @__PURE__ */ (0,
|
|
2585
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
|
|
2542
2586
|
};
|
|
2543
|
-
return /* @__PURE__ */ (0,
|
|
2587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components41.SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
2544
2588
|
};
|
|
2545
2589
|
const extraProps = { autoComplete };
|
|
2546
|
-
return /* @__PURE__ */ (0,
|
|
2547
|
-
/* @__PURE__ */ (0,
|
|
2590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
|
2591
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2548
2592
|
FieldInput_default,
|
|
2549
2593
|
{
|
|
2550
2594
|
id,
|
|
@@ -2552,7 +2596,7 @@ function SelectInputRendererComponent(props) {
|
|
|
2552
2596
|
help,
|
|
2553
2597
|
description,
|
|
2554
2598
|
validation: validationState,
|
|
2555
|
-
children: /* @__PURE__ */ (0,
|
|
2599
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2556
2600
|
import_components41.SelectInput,
|
|
2557
2601
|
__spreadValues({
|
|
2558
2602
|
name: id,
|
|
@@ -2575,7 +2619,7 @@ function SelectInputRendererComponent(props) {
|
|
|
2575
2619
|
// ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
|
|
2576
2620
|
var import_react15 = require("react");
|
|
2577
2621
|
var import_components42 = require("@transferwise/components");
|
|
2578
|
-
var
|
|
2622
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
2579
2623
|
function SegmentedInputRendererComponent(props) {
|
|
2580
2624
|
const {
|
|
2581
2625
|
id,
|
|
@@ -2593,8 +2637,8 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2593
2637
|
onSelect(0);
|
|
2594
2638
|
}
|
|
2595
2639
|
}, [selectedIndex, onSelect, options.length]);
|
|
2596
|
-
return /* @__PURE__ */ (0,
|
|
2597
|
-
/* @__PURE__ */ (0,
|
|
2640
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
|
|
2641
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2598
2642
|
FieldInput_default,
|
|
2599
2643
|
{
|
|
2600
2644
|
id,
|
|
@@ -2602,7 +2646,7 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2602
2646
|
help,
|
|
2603
2647
|
description,
|
|
2604
2648
|
validation: validationState,
|
|
2605
|
-
children: /* @__PURE__ */ (0,
|
|
2649
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2606
2650
|
import_components42.SegmentedControl,
|
|
2607
2651
|
{
|
|
2608
2652
|
name: `${id}-segmented-control`,
|
|
@@ -2619,26 +2663,26 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2619
2663
|
)
|
|
2620
2664
|
}
|
|
2621
2665
|
),
|
|
2622
|
-
/* @__PURE__ */ (0,
|
|
2666
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { id: `${id}-children`, children })
|
|
2623
2667
|
] });
|
|
2624
2668
|
}
|
|
2625
2669
|
var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
|
|
2626
2670
|
|
|
2627
2671
|
// ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
|
|
2628
|
-
var
|
|
2672
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
2629
2673
|
var SelectInputRenderer = {
|
|
2630
2674
|
canRenderType: "input-select",
|
|
2631
2675
|
render: (props) => {
|
|
2632
2676
|
switch (props.control) {
|
|
2633
2677
|
case "radio":
|
|
2634
|
-
return /* @__PURE__ */ (0,
|
|
2678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
|
|
2635
2679
|
case "tab":
|
|
2636
|
-
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));
|
|
2637
2681
|
case "segmented":
|
|
2638
|
-
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));
|
|
2639
2683
|
case "select":
|
|
2640
2684
|
default:
|
|
2641
|
-
return /* @__PURE__ */ (0,
|
|
2685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
|
|
2642
2686
|
}
|
|
2643
2687
|
}
|
|
2644
2688
|
};
|
|
@@ -2646,17 +2690,17 @@ var SelectInputRenderer_default = SelectInputRenderer;
|
|
|
2646
2690
|
|
|
2647
2691
|
// ../renderers/src/StatusListRenderer.tsx
|
|
2648
2692
|
var import_components43 = require("@transferwise/components");
|
|
2649
|
-
var
|
|
2693
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2650
2694
|
var StatusListRenderer = {
|
|
2651
2695
|
canRenderType: "status-list",
|
|
2652
|
-
render: ({ margin, items, title }) => /* @__PURE__ */ (0,
|
|
2653
|
-
title ? /* @__PURE__ */ (0,
|
|
2654
|
-
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)(
|
|
2655
2699
|
import_components43.Summary,
|
|
2656
2700
|
{
|
|
2657
2701
|
title: itemTitle,
|
|
2658
2702
|
description,
|
|
2659
|
-
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,
|
|
2660
2704
|
status: mapStatus(status),
|
|
2661
2705
|
action: getSummaryAction(callToAction)
|
|
2662
2706
|
},
|
|
@@ -2710,29 +2754,29 @@ var useCustomTheme = (theme, trackEvent) => {
|
|
|
2710
2754
|
// ../renderers/src/step/topbar/BackButton.tsx
|
|
2711
2755
|
var import_components44 = require("@transferwise/components");
|
|
2712
2756
|
var import_icons3 = require("@transferwise/icons");
|
|
2713
|
-
var
|
|
2757
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2714
2758
|
function BackButton({ title, onClick }) {
|
|
2715
|
-
return /* @__PURE__ */ (0,
|
|
2716
|
-
/* @__PURE__ */ (0,
|
|
2717
|
-
/* @__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, {})
|
|
2718
2762
|
] });
|
|
2719
2763
|
}
|
|
2720
2764
|
|
|
2721
2765
|
// ../renderers/src/step/topbar/Toolbar.tsx
|
|
2722
2766
|
var import_components45 = require("@transferwise/components");
|
|
2723
|
-
var
|
|
2767
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2724
2768
|
var Toolbar = ({ items }) => {
|
|
2725
|
-
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;
|
|
2726
2770
|
};
|
|
2727
2771
|
function ToolbarButton(props) {
|
|
2728
|
-
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));
|
|
2729
2773
|
}
|
|
2730
2774
|
function MediaToolbarButton(props) {
|
|
2731
2775
|
var _a;
|
|
2732
2776
|
const { context, control, media, accessibilityDescription, disabled, onClick } = props;
|
|
2733
2777
|
const priority = getIconButtonPriority(control);
|
|
2734
2778
|
const type = getSentiment(context);
|
|
2735
|
-
return /* @__PURE__ */ (0,
|
|
2779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
2736
2780
|
import_components45.IconButton,
|
|
2737
2781
|
{
|
|
2738
2782
|
className: "df-toolbar-button",
|
|
@@ -2742,7 +2786,7 @@ function MediaToolbarButton(props) {
|
|
|
2742
2786
|
type,
|
|
2743
2787
|
onClick,
|
|
2744
2788
|
children: [
|
|
2745
|
-
accessibilityDescription ? /* @__PURE__ */ (0,
|
|
2789
|
+
accessibilityDescription ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "sr-only", children: accessibilityDescription }) : null,
|
|
2746
2790
|
media ? (_a = getAddonStart(media)) == null ? void 0 : _a.value : null
|
|
2747
2791
|
]
|
|
2748
2792
|
}
|
|
@@ -2753,7 +2797,7 @@ function TextToolbarButton(props) {
|
|
|
2753
2797
|
const addonStart = media ? getAddonStart(media) : void 0;
|
|
2754
2798
|
const priority = getPriority2(control);
|
|
2755
2799
|
const sentiment = getSentiment(context);
|
|
2756
|
-
return /* @__PURE__ */ (0,
|
|
2800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2757
2801
|
import_components45.Button,
|
|
2758
2802
|
{
|
|
2759
2803
|
v2: true,
|
|
@@ -2770,17 +2814,18 @@ function TextToolbarButton(props) {
|
|
|
2770
2814
|
}
|
|
2771
2815
|
var getAddonStart = (media) => {
|
|
2772
2816
|
if (media.type === "avatar") {
|
|
2773
|
-
if (media.content.length ===
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
}
|
|
2817
|
+
if (media.content.length > 0 && media.content[0].type === "uri" && isValidIconUrn(media.content[0].uri)) {
|
|
2818
|
+
return {
|
|
2819
|
+
type: "icon",
|
|
2820
|
+
value: getInlineMedia({
|
|
2821
|
+
type: "image",
|
|
2822
|
+
uri: media.content[0].uri
|
|
2823
|
+
})
|
|
2824
|
+
};
|
|
2781
2825
|
}
|
|
2782
2826
|
return void 0;
|
|
2783
2827
|
}
|
|
2828
|
+
return { type: "icon", value: getInlineMedia(media) };
|
|
2784
2829
|
};
|
|
2785
2830
|
var getPriority2 = (control) => isKnownControl(control) ? control : "secondary";
|
|
2786
2831
|
var prefersMedia = (control) => {
|
|
@@ -2797,16 +2842,16 @@ var getIconButtonPriority = (control) => {
|
|
|
2797
2842
|
};
|
|
2798
2843
|
|
|
2799
2844
|
// ../renderers/src/step/topbar/TopBar.tsx
|
|
2800
|
-
var
|
|
2845
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
2801
2846
|
function TopBar({ back, toolbar }) {
|
|
2802
|
-
return back || toolbar ? /* @__PURE__ */ (0,
|
|
2803
|
-
back ? /* @__PURE__ */ (0,
|
|
2804
|
-
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
|
|
2805
2850
|
] }) : null;
|
|
2806
2851
|
}
|
|
2807
2852
|
|
|
2808
2853
|
// ../renderers/src/step/SplashCelebrationStepRenderer.tsx
|
|
2809
|
-
var
|
|
2854
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
2810
2855
|
var SplashCelebrationStepRenderer = {
|
|
2811
2856
|
canRenderType: "step",
|
|
2812
2857
|
canRender: ({ control }) => control === "splash-celebration",
|
|
@@ -2815,14 +2860,14 @@ var SplashCelebrationStepRenderer = {
|
|
|
2815
2860
|
function SplashCelebrationStepRendererComponent(props) {
|
|
2816
2861
|
const { back, toolbar, children, trackEvent } = props;
|
|
2817
2862
|
useCustomTheme("forest-green", trackEvent);
|
|
2818
|
-
return /* @__PURE__ */ (0,
|
|
2819
|
-
/* @__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 }),
|
|
2820
2865
|
children
|
|
2821
2866
|
] });
|
|
2822
2867
|
}
|
|
2823
2868
|
|
|
2824
2869
|
// ../renderers/src/step/SplashStepRenderer.tsx
|
|
2825
|
-
var
|
|
2870
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
2826
2871
|
var SplashStepRenderer = {
|
|
2827
2872
|
canRenderType: "step",
|
|
2828
2873
|
canRender: ({ control }) => control === "splash",
|
|
@@ -2830,28 +2875,28 @@ var SplashStepRenderer = {
|
|
|
2830
2875
|
};
|
|
2831
2876
|
function SplashStepRendererComponent(props) {
|
|
2832
2877
|
const { back, toolbar, children } = props;
|
|
2833
|
-
return /* @__PURE__ */ (0,
|
|
2834
|
-
/* @__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 }),
|
|
2835
2880
|
children
|
|
2836
2881
|
] });
|
|
2837
2882
|
}
|
|
2838
2883
|
|
|
2839
2884
|
// ../renderers/src/step/StepRenderer.tsx
|
|
2840
2885
|
var import_components46 = require("@transferwise/components");
|
|
2841
|
-
var
|
|
2886
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
2842
2887
|
var StepRenderer = {
|
|
2843
2888
|
canRenderType: "step",
|
|
2844
2889
|
render: StepRendererComponent
|
|
2845
2890
|
};
|
|
2846
2891
|
function StepRendererComponent(props) {
|
|
2847
2892
|
const { back, description, error, title, children, toolbar } = props;
|
|
2848
|
-
return /* @__PURE__ */ (0,
|
|
2849
|
-
/* @__PURE__ */ (0,
|
|
2850
|
-
title || description ? /* @__PURE__ */ (0,
|
|
2851
|
-
title ? /* @__PURE__ */ (0,
|
|
2852
|
-
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
|
|
2853
2898
|
] }) : void 0,
|
|
2854
|
-
error ? /* @__PURE__ */ (0,
|
|
2899
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_components46.Alert, { type: "negative", className: "m-b-2", message: error }) : void 0,
|
|
2855
2900
|
children
|
|
2856
2901
|
] });
|
|
2857
2902
|
}
|
|
@@ -2859,26 +2904,26 @@ function StepRendererComponent(props) {
|
|
|
2859
2904
|
// ../renderers/src/TabsRenderer.tsx
|
|
2860
2905
|
var import_components47 = require("@transferwise/components");
|
|
2861
2906
|
var import_react17 = require("react");
|
|
2862
|
-
var
|
|
2907
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
2863
2908
|
var TabsRenderer = {
|
|
2864
2909
|
canRenderType: "tabs",
|
|
2865
2910
|
render: (props) => {
|
|
2866
2911
|
switch (props.control) {
|
|
2867
2912
|
case "segmented":
|
|
2868
2913
|
if (props.tabs.length > 3) {
|
|
2869
|
-
return /* @__PURE__ */ (0,
|
|
2914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(TabsRendererComponent, __spreadValues({}, props));
|
|
2870
2915
|
}
|
|
2871
|
-
return /* @__PURE__ */ (0,
|
|
2916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(SegmentedTabsRendererComponent, __spreadValues({}, props));
|
|
2872
2917
|
case "chips":
|
|
2873
|
-
return /* @__PURE__ */ (0,
|
|
2918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(ChipsTabsRendererComponent, __spreadValues({}, props));
|
|
2874
2919
|
default:
|
|
2875
|
-
return /* @__PURE__ */ (0,
|
|
2920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(TabsRendererComponent, __spreadValues({}, props));
|
|
2876
2921
|
}
|
|
2877
2922
|
}
|
|
2878
2923
|
};
|
|
2879
2924
|
function TabsRendererComponent({ uid, margin, tabs }) {
|
|
2880
2925
|
const [selectedIndex, setSelectedIndex] = (0, import_react17.useState)(0);
|
|
2881
|
-
return /* @__PURE__ */ (0,
|
|
2926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
2882
2927
|
import_components47.Tabs,
|
|
2883
2928
|
{
|
|
2884
2929
|
name: uid,
|
|
@@ -2886,7 +2931,7 @@ function TabsRendererComponent({ uid, margin, tabs }) {
|
|
|
2886
2931
|
tabs: tabs.map((option) => ({
|
|
2887
2932
|
title: option.title,
|
|
2888
2933
|
disabled: false,
|
|
2889
|
-
content: /* @__PURE__ */ (0,
|
|
2934
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "m-t-2", children: [
|
|
2890
2935
|
" ",
|
|
2891
2936
|
option.children,
|
|
2892
2937
|
" "
|
|
@@ -2899,8 +2944,8 @@ function TabsRendererComponent({ uid, margin, tabs }) {
|
|
|
2899
2944
|
function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
2900
2945
|
var _a;
|
|
2901
2946
|
const [selectedIndex, setSelectedIndex] = (0, import_react17.useState)(0);
|
|
2902
|
-
return /* @__PURE__ */ (0,
|
|
2903
|
-
/* @__PURE__ */ (0,
|
|
2947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: getMargin(margin), children: [
|
|
2948
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
2904
2949
|
import_components47.SegmentedControl,
|
|
2905
2950
|
{
|
|
2906
2951
|
name: uid,
|
|
@@ -2915,14 +2960,14 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
|
2915
2960
|
onChange: (value) => setSelectedIndex(Number(value))
|
|
2916
2961
|
}
|
|
2917
2962
|
),
|
|
2918
|
-
/* @__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 })
|
|
2919
2964
|
] });
|
|
2920
2965
|
}
|
|
2921
2966
|
function ChipsTabsRendererComponent({ margin, tabs }) {
|
|
2922
2967
|
var _a;
|
|
2923
2968
|
const [selectedIndex, setSelectedIndex] = (0, import_react17.useState)(0);
|
|
2924
|
-
return /* @__PURE__ */ (0,
|
|
2925
|
-
/* @__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)(
|
|
2926
2971
|
import_components47.Chips,
|
|
2927
2972
|
{
|
|
2928
2973
|
chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
|
|
@@ -2930,7 +2975,7 @@ function ChipsTabsRendererComponent({ margin, tabs }) {
|
|
|
2930
2975
|
onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
|
|
2931
2976
|
}
|
|
2932
2977
|
) }),
|
|
2933
|
-
/* @__PURE__ */ (0,
|
|
2978
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
2934
2979
|
] });
|
|
2935
2980
|
}
|
|
2936
2981
|
|
|
@@ -2939,7 +2984,7 @@ var import_components49 = require("@transferwise/components");
|
|
|
2939
2984
|
|
|
2940
2985
|
// ../renderers/src/components/VariableTextInput.tsx
|
|
2941
2986
|
var import_components48 = require("@transferwise/components");
|
|
2942
|
-
var
|
|
2987
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
2943
2988
|
var commonKeys = [
|
|
2944
2989
|
"autoComplete",
|
|
2945
2990
|
"autoCapitalize",
|
|
@@ -2958,12 +3003,12 @@ function VariableTextInput(inputProps) {
|
|
|
2958
3003
|
const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
|
|
2959
3004
|
switch (control) {
|
|
2960
3005
|
case "email":
|
|
2961
|
-
return /* @__PURE__ */ (0,
|
|
3006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
|
|
2962
3007
|
case "password":
|
|
2963
|
-
return /* @__PURE__ */ (0,
|
|
3008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
|
|
2964
3009
|
case "numeric": {
|
|
2965
3010
|
const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
|
|
2966
|
-
return /* @__PURE__ */ (0,
|
|
3011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
2967
3012
|
TextInput,
|
|
2968
3013
|
__spreadProps(__spreadValues({}, numericProps), {
|
|
2969
3014
|
onChange: (newValue) => {
|
|
@@ -2974,9 +3019,9 @@ function VariableTextInput(inputProps) {
|
|
|
2974
3019
|
);
|
|
2975
3020
|
}
|
|
2976
3021
|
case "phone-number":
|
|
2977
|
-
return /* @__PURE__ */ (0,
|
|
3022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_components48.PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
|
|
2978
3023
|
default: {
|
|
2979
|
-
return /* @__PURE__ */ (0,
|
|
3024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
|
|
2980
3025
|
}
|
|
2981
3026
|
}
|
|
2982
3027
|
}
|
|
@@ -2984,11 +3029,11 @@ function TextInput(props) {
|
|
|
2984
3029
|
const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
|
|
2985
3030
|
const InputWithPattern = control === "textarea" ? import_components48.TextareaWithDisplayFormat : import_components48.InputWithDisplayFormat;
|
|
2986
3031
|
const InputWithoutPattern = control === "textarea" ? import_components48.TextArea : import_components48.Input;
|
|
2987
|
-
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) }));
|
|
2988
3033
|
}
|
|
2989
3034
|
|
|
2990
3035
|
// ../renderers/src/TextInputRenderer.tsx
|
|
2991
|
-
var
|
|
3036
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
2992
3037
|
var TextInputRenderer = {
|
|
2993
3038
|
canRenderType: "input-text",
|
|
2994
3039
|
render: (props) => {
|
|
@@ -3021,7 +3066,7 @@ var TextInputRenderer = {
|
|
|
3021
3066
|
}
|
|
3022
3067
|
}
|
|
3023
3068
|
});
|
|
3024
|
-
return /* @__PURE__ */ (0,
|
|
3069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
3025
3070
|
FieldInput_default,
|
|
3026
3071
|
{
|
|
3027
3072
|
id,
|
|
@@ -3029,7 +3074,7 @@ var TextInputRenderer = {
|
|
|
3029
3074
|
description,
|
|
3030
3075
|
validation: validationState,
|
|
3031
3076
|
help,
|
|
3032
|
-
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)) })
|
|
3033
3078
|
}
|
|
3034
3079
|
);
|
|
3035
3080
|
}
|
|
@@ -3043,7 +3088,7 @@ var import_components50 = require("@transferwise/components");
|
|
|
3043
3088
|
var getRandomId = () => Math.random().toString(36).substring(2);
|
|
3044
3089
|
|
|
3045
3090
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
3046
|
-
var
|
|
3091
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
3047
3092
|
var UploadInputRenderer = {
|
|
3048
3093
|
canRenderType: "input-upload",
|
|
3049
3094
|
render: (props) => {
|
|
@@ -3059,14 +3104,14 @@ var UploadInputRenderer = {
|
|
|
3059
3104
|
};
|
|
3060
3105
|
return (
|
|
3061
3106
|
// We don't pass help here as there is no sensible place to display it
|
|
3062
|
-
/* @__PURE__ */ (0,
|
|
3107
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3063
3108
|
UploadFieldInput_default,
|
|
3064
3109
|
{
|
|
3065
3110
|
id,
|
|
3066
3111
|
label: void 0,
|
|
3067
3112
|
description: void 0,
|
|
3068
3113
|
validation: validationState,
|
|
3069
|
-
children: /* @__PURE__ */ (0,
|
|
3114
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3070
3115
|
import_components50.UploadInput,
|
|
3071
3116
|
{
|
|
3072
3117
|
id,
|
|
@@ -3125,7 +3170,7 @@ var LargeUploadRenderer = {
|
|
|
3125
3170
|
};
|
|
3126
3171
|
const filetypes = acceptsToFileTypes(accepts);
|
|
3127
3172
|
const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
|
|
3128
|
-
return /* @__PURE__ */ (0,
|
|
3173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3129
3174
|
FieldInput_default,
|
|
3130
3175
|
{
|
|
3131
3176
|
id,
|
|
@@ -3133,7 +3178,7 @@ var LargeUploadRenderer = {
|
|
|
3133
3178
|
description,
|
|
3134
3179
|
validation: validationState,
|
|
3135
3180
|
help,
|
|
3136
|
-
children: /* @__PURE__ */ (0,
|
|
3181
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3137
3182
|
import_components50.Upload,
|
|
3138
3183
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
3139
3184
|
usAccept,
|
|
@@ -3153,12 +3198,8 @@ var import_components53 = require("@transferwise/components");
|
|
|
3153
3198
|
|
|
3154
3199
|
// ../renderers/src/NewListItem/getInlineAlert.tsx
|
|
3155
3200
|
var import_components51 = require("@transferwise/components");
|
|
3156
|
-
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
3157
|
-
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;
|
|
3158
|
-
|
|
3159
|
-
// ../renderers/src/NewListItem/getMedia.tsx
|
|
3160
3201
|
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
3161
|
-
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;
|
|
3162
3203
|
|
|
3163
3204
|
// ../renderers/src/NewListItem/getAdditionalInfo.tsx
|
|
3164
3205
|
var import_components52 = require("@transferwise/components");
|
|
@@ -3417,6 +3458,29 @@ function ButtonComponent2(props) {
|
|
|
3417
3458
|
var getSentiment2 = (context) => context === "negative" ? "negative" : "default";
|
|
3418
3459
|
var getPriority3 = (control) => control && isButtonPriority(control) ? control : "secondary";
|
|
3419
3460
|
|
|
3461
|
+
// ../renderers/src/ProgressRenderer.tsx
|
|
3462
|
+
var import_components58 = require("@transferwise/components");
|
|
3463
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
3464
|
+
var ProgressRenderer = {
|
|
3465
|
+
canRenderType: "progress",
|
|
3466
|
+
render: ({ uid, title, help, progress, progressText, margin, description }) => {
|
|
3467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
3468
|
+
import_components58.ProgressBar,
|
|
3469
|
+
{
|
|
3470
|
+
id: uid,
|
|
3471
|
+
className: getMargin(margin),
|
|
3472
|
+
title: title && help ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(LabelContentWithHelp, { text: title, help }) : title,
|
|
3473
|
+
description,
|
|
3474
|
+
progress: {
|
|
3475
|
+
max: 1,
|
|
3476
|
+
value: progress
|
|
3477
|
+
},
|
|
3478
|
+
textEnd: progressText
|
|
3479
|
+
}
|
|
3480
|
+
);
|
|
3481
|
+
}
|
|
3482
|
+
};
|
|
3483
|
+
|
|
3420
3484
|
// ../renderers/src/getWiseRenderers.ts
|
|
3421
3485
|
var getListItemRenderers = () => [
|
|
3422
3486
|
NewDecisionRenderer_default,
|
|
@@ -3452,6 +3516,7 @@ var getWiseRenderers = () => [
|
|
|
3452
3516
|
MultiUploadInputRenderer_default,
|
|
3453
3517
|
NumberInputRenderer_default,
|
|
3454
3518
|
ParagraphRenderer_default,
|
|
3519
|
+
ProgressRenderer,
|
|
3455
3520
|
RepeatableRenderer_default,
|
|
3456
3521
|
ReviewRenderer_default,
|
|
3457
3522
|
SearchRenderer_default,
|
|
@@ -3466,12 +3531,6 @@ var getWiseRenderers = () => [
|
|
|
3466
3531
|
StepRenderer
|
|
3467
3532
|
];
|
|
3468
3533
|
|
|
3469
|
-
// src/dynamicFlow/renderers.ts
|
|
3470
|
-
var Header11 = Header7;
|
|
3471
|
-
var getMargin2 = getMargin;
|
|
3472
|
-
var getListItemRenderers2 = getListItemRenderers;
|
|
3473
|
-
var getButtonV2Renderers2 = getButtonV2Renderers;
|
|
3474
|
-
|
|
3475
3534
|
// src/i18n/index.ts
|
|
3476
3535
|
var import_dynamic_flow_client = require("@wise/dynamic-flow-client");
|
|
3477
3536
|
|
|
@@ -3497,6 +3556,7 @@ var cs_default = {
|
|
|
3497
3556
|
"df.wise.CopyFeedback.copy": "Zkop\xEDrov\xE1no do schr\xE1nky",
|
|
3498
3557
|
"df.wise.CopyFeedback.copyFailed": "Kop\xEDrov\xE1n\xED do schr\xE1nky se nezda\u0159ilo",
|
|
3499
3558
|
"df.wise.Decision.all": "V\u0161e",
|
|
3559
|
+
"df.wise.Decision.currenciesWithAccountDetails": "M\u011Bny s detaily \xFA\u010Dtu",
|
|
3500
3560
|
"df.wise.Decision.filterPlaceholder": "Pro vyhled\xE1v\xE1n\xED za\u010Dn\u011Bte ps\xE1t",
|
|
3501
3561
|
"df.wise.Decision.noResults": "\u017D\xE1dn\xE9 v\xFDsledky",
|
|
3502
3562
|
"df.wise.Decision.popular": "Popul\xE1rn\xED",
|
|
@@ -3541,7 +3601,8 @@ var de_default = {
|
|
|
3541
3601
|
"df.wise.CopyFeedback.copy": "In Zwischenablage kopiert",
|
|
3542
3602
|
"df.wise.CopyFeedback.copyFailed": "Kopieren in Zwischenablage fehlgeschlagen",
|
|
3543
3603
|
"df.wise.Decision.all": "Alle",
|
|
3544
|
-
"df.wise.Decision.
|
|
3604
|
+
"df.wise.Decision.currenciesWithAccountDetails": "Guthaben mit Bankverbindung",
|
|
3605
|
+
"df.wise.Decision.filterPlaceholder": "Gib etwas ein, um die Suche zu beginnen",
|
|
3545
3606
|
"df.wise.Decision.noResults": "Keine Ergebnisse",
|
|
3546
3607
|
"df.wise.Decision.popular": "Beliebt",
|
|
3547
3608
|
"df.wise.Decision.recent": "Neu",
|
|
@@ -3585,6 +3646,7 @@ var en_default = {
|
|
|
3585
3646
|
"df.wise.CopyFeedback.copy": "Copied to clipboard",
|
|
3586
3647
|
"df.wise.CopyFeedback.copyFailed": "Failed to copy to clipboard",
|
|
3587
3648
|
"df.wise.Decision.all": "All",
|
|
3649
|
+
"df.wise.Decision.currenciesWithAccountDetails": "Currencies with account details",
|
|
3588
3650
|
"df.wise.Decision.filterPlaceholder": "Start typing to search",
|
|
3589
3651
|
"df.wise.Decision.noResults": "No results",
|
|
3590
3652
|
"df.wise.Decision.popular": "Popular",
|
|
@@ -3629,6 +3691,7 @@ var es_default = {
|
|
|
3629
3691
|
"df.wise.CopyFeedback.copy": "Copiado al portapapeles",
|
|
3630
3692
|
"df.wise.CopyFeedback.copyFailed": "Error al copiar al portapapeles",
|
|
3631
3693
|
"df.wise.Decision.all": "Todas",
|
|
3694
|
+
"df.wise.Decision.currenciesWithAccountDetails": "Divisas con datos de cuenta",
|
|
3632
3695
|
"df.wise.Decision.filterPlaceholder": "Empieza a escribir para buscar",
|
|
3633
3696
|
"df.wise.Decision.noResults": "No hay resultados",
|
|
3634
3697
|
"df.wise.Decision.popular": "Populares",
|
|
@@ -3673,6 +3736,7 @@ var fr_default = {
|
|
|
3673
3736
|
"df.wise.CopyFeedback.copy": "Copi\xE9 dans le presse-papier",
|
|
3674
3737
|
"df.wise.CopyFeedback.copyFailed": "Impossible de copier dans le presse-papier",
|
|
3675
3738
|
"df.wise.Decision.all": "Toutes",
|
|
3739
|
+
"df.wise.Decision.currenciesWithAccountDetails": "Devises avec num\xE9ros de compte",
|
|
3676
3740
|
"df.wise.Decision.filterPlaceholder": "Commencez \xE0 \xE9crire pour effectuer une recherche",
|
|
3677
3741
|
"df.wise.Decision.noResults": "Aucun r\xE9sultat",
|
|
3678
3742
|
"df.wise.Decision.popular": "Populaires",
|
|
@@ -3717,6 +3781,7 @@ var hu_default = {
|
|
|
3717
3781
|
"df.wise.CopyFeedback.copy": "V\xE1g\xF3lapra m\xE1solva",
|
|
3718
3782
|
"df.wise.CopyFeedback.copyFailed": "Nem siker\xFClt a v\xE1g\xF3lapra m\xE1solni",
|
|
3719
3783
|
"df.wise.Decision.all": "\xD6sszes",
|
|
3784
|
+
"df.wise.Decision.currenciesWithAccountDetails": "P\xE9nznemek sz\xE1mlaadatokkal",
|
|
3720
3785
|
"df.wise.Decision.filterPlaceholder": "Kezdj el g\xE9pelni a keres\xE9shez",
|
|
3721
3786
|
"df.wise.Decision.noResults": "Nincs tal\xE1lat",
|
|
3722
3787
|
"df.wise.Decision.popular": "N\xE9pszer\u0171",
|
|
@@ -3761,6 +3826,7 @@ var id_default = {
|
|
|
3761
3826
|
"df.wise.CopyFeedback.copy": "Disalin ke clipboard",
|
|
3762
3827
|
"df.wise.CopyFeedback.copyFailed": "Gagal menyalin ke clipboard",
|
|
3763
3828
|
"df.wise.Decision.all": "Semua",
|
|
3829
|
+
"df.wise.Decision.currenciesWithAccountDetails": "Saldo dengan detail rekening",
|
|
3764
3830
|
"df.wise.Decision.filterPlaceholder": "Mulai mengetik untuk mencari",
|
|
3765
3831
|
"df.wise.Decision.noResults": "Tidak ada hasil",
|
|
3766
3832
|
"df.wise.Decision.popular": "Populer",
|
|
@@ -3805,6 +3871,7 @@ var it_default = {
|
|
|
3805
3871
|
"df.wise.CopyFeedback.copy": "Copiato negli appunti",
|
|
3806
3872
|
"df.wise.CopyFeedback.copyFailed": "Impossibile copiare negli appunti",
|
|
3807
3873
|
"df.wise.Decision.all": "Tutte",
|
|
3874
|
+
"df.wise.Decision.currenciesWithAccountDetails": "Valute con estremi del conto",
|
|
3808
3875
|
"df.wise.Decision.filterPlaceholder": "Inizia a digitare per cercare",
|
|
3809
3876
|
"df.wise.Decision.noResults": "Nessun risultato",
|
|
3810
3877
|
"df.wise.Decision.popular": "Popolari",
|
|
@@ -3849,7 +3916,8 @@ var ja_default = {
|
|
|
3849
3916
|
"df.wise.CopyFeedback.copy": "\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u3078\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F",
|
|
3850
3917
|
"df.wise.CopyFeedback.copyFailed": "\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u306B\u30B3\u30D4\u30FC\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F",
|
|
3851
3918
|
"df.wise.Decision.all": "\u3059\u3079\u3066",
|
|
3852
|
-
"df.wise.Decision.
|
|
3919
|
+
"df.wise.Decision.currenciesWithAccountDetails": "\u53E3\u5EA7\u60C5\u5831\u3092\u53D6\u5F97\u3067\u304D\u308B\u901A\u8CA8",
|
|
3920
|
+
"df.wise.Decision.filterPlaceholder": "\u691C\u7D22\u8A9E\u53E5\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
3853
3921
|
"df.wise.Decision.noResults": "\u691C\u7D22\u7D50\u679C\u304C\u3042\u308A\u307E\u305B\u3093",
|
|
3854
3922
|
"df.wise.Decision.popular": "\u4EBA\u6C17",
|
|
3855
3923
|
"df.wise.Decision.recent": "\u6700\u8FD1",
|
|
@@ -3893,8 +3961,9 @@ var nl_default = {
|
|
|
3893
3961
|
"df.wise.CopyFeedback.copy": "Naar klembord gekopieerd",
|
|
3894
3962
|
"df.wise.CopyFeedback.copyFailed": "Naar klembord kopi\xEBren mislukt",
|
|
3895
3963
|
"df.wise.Decision.all": "Alles",
|
|
3964
|
+
"df.wise.Decision.currenciesWithAccountDetails": "Valuta met rekeninggegevens",
|
|
3896
3965
|
"df.wise.Decision.filterPlaceholder": "Begin met typen om te zoeken",
|
|
3897
|
-
"df.wise.Decision.noResults": "
|
|
3966
|
+
"df.wise.Decision.noResults": "Geen resultaten",
|
|
3898
3967
|
"df.wise.Decision.popular": "Populair",
|
|
3899
3968
|
"df.wise.Decision.recent": "Recent",
|
|
3900
3969
|
"df.wise.Decision.results": "Zoekresultaten",
|
|
@@ -3937,6 +4006,7 @@ var pl_default = {
|
|
|
3937
4006
|
"df.wise.CopyFeedback.copy": "Skopiowano do schowka",
|
|
3938
4007
|
"df.wise.CopyFeedback.copyFailed": "Nie uda\u0142o si\u0119 skopiowa\u0107 do schowka",
|
|
3939
4008
|
"df.wise.Decision.all": "Wszystkie",
|
|
4009
|
+
"df.wise.Decision.currenciesWithAccountDetails": "Waluty z danymi bankowymi",
|
|
3940
4010
|
"df.wise.Decision.filterPlaceholder": "Zacznij pisa\u0107, \u017Ceby wyszuka\u0107",
|
|
3941
4011
|
"df.wise.Decision.noResults": "Brak wynik\xF3w",
|
|
3942
4012
|
"df.wise.Decision.popular": "Popularne",
|
|
@@ -3981,7 +4051,8 @@ var pt_default = {
|
|
|
3981
4051
|
"df.wise.CopyFeedback.copy": "Copiado",
|
|
3982
4052
|
"df.wise.CopyFeedback.copyFailed": "Falha ao copiar para \xE1rea de transfer\xEAncia",
|
|
3983
4053
|
"df.wise.Decision.all": "Todos",
|
|
3984
|
-
"df.wise.Decision.
|
|
4054
|
+
"df.wise.Decision.currenciesWithAccountDetails": "Moedas com dados de conta",
|
|
4055
|
+
"df.wise.Decision.filterPlaceholder": "Comece a digitar para pesquisar",
|
|
3985
4056
|
"df.wise.Decision.noResults": "Nenhum resultado",
|
|
3986
4057
|
"df.wise.Decision.popular": "Populares",
|
|
3987
4058
|
"df.wise.Decision.recent": "Recente",
|
|
@@ -4025,6 +4096,7 @@ var ro_default = {
|
|
|
4025
4096
|
"df.wise.CopyFeedback.copy": "Copiat \xEEn clipboard",
|
|
4026
4097
|
"df.wise.CopyFeedback.copyFailed": "Copierea \xEEn clipboard a e\u0219uat",
|
|
4027
4098
|
"df.wise.Decision.all": "Toate",
|
|
4099
|
+
"df.wise.Decision.currenciesWithAccountDetails": "Monede cu detalii de cont",
|
|
4028
4100
|
"df.wise.Decision.filterPlaceholder": "\xCEncepe s\u0103 tastezi pentru a c\u0103uta",
|
|
4029
4101
|
"df.wise.Decision.noResults": "Niciun rezultat",
|
|
4030
4102
|
"df.wise.Decision.popular": "Populare",
|
|
@@ -4069,7 +4141,8 @@ var ru_default = {
|
|
|
4069
4141
|
"df.wise.CopyFeedback.copy": "\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E \u0432 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0435\u043D\u0430",
|
|
4070
4142
|
"df.wise.CopyFeedback.copyFailed": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0435\u043D\u0430",
|
|
4071
4143
|
"df.wise.Decision.all": "\u0412\u0441\u0435",
|
|
4072
|
-
"df.wise.Decision.
|
|
4144
|
+
"df.wise.Decision.currenciesWithAccountDetails": "\u0412\u0430\u043B\u044E\u0442\u044B \u0441 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u0430\u043C\u0438 \u0441\u0447\u0435\u0442\u0430",
|
|
4145
|
+
"df.wise.Decision.filterPlaceholder": "\u041D\u0430\u0447\u043D\u0438\u0442\u0435 \u0432\u0432\u043E\u0434\u0438\u0442\u044C \u0437\u0430\u043F\u0440\u043E\u0441 \u0434\u043B\u044F \u043F\u043E\u0438\u0441\u043A\u0430",
|
|
4073
4146
|
"df.wise.Decision.noResults": "\u041D\u0435\u0442 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432",
|
|
4074
4147
|
"df.wise.Decision.popular": "\u041F\u043E\u043F\u0443\u043B\u044F\u0440\u043D\u044B\u0435",
|
|
4075
4148
|
"df.wise.Decision.recent": "\u041D\u0435\u0434\u0430\u0432\u043D\u0438\u0435",
|
|
@@ -4113,6 +4186,7 @@ var th_default = {
|
|
|
4113
4186
|
"df.wise.CopyFeedback.copy": "\u0E04\u0E31\u0E14\u0E25\u0E2D\u0E01\u0E44\u0E1B\u0E22\u0E31\u0E07\u0E04\u0E25\u0E34\u0E1B\u0E1A\u0E2D\u0E23\u0E4C\u0E14",
|
|
4114
4187
|
"df.wise.CopyFeedback.copyFailed": "\u0E04\u0E31\u0E14\u0E25\u0E2D\u0E01\u0E44\u0E1B\u0E22\u0E31\u0E07\u0E04\u0E25\u0E34\u0E1B\u0E1A\u0E2D\u0E23\u0E4C\u0E14\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08",
|
|
4115
4188
|
"df.wise.Decision.all": "\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14",
|
|
4189
|
+
"df.wise.Decision.currenciesWithAccountDetails": "\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19\u0E15\u0E48\u0E32\u0E07\u0E46 \u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E1A\u0E31\u0E0D\u0E0A\u0E35",
|
|
4116
4190
|
"df.wise.Decision.filterPlaceholder": "Start typing to search",
|
|
4117
4191
|
"df.wise.Decision.noResults": "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C",
|
|
4118
4192
|
"df.wise.Decision.popular": "\u0E2A\u0E01\u0E38\u0E25\u0E22\u0E2D\u0E14\u0E19\u0E34\u0E22\u0E21",
|
|
@@ -4157,7 +4231,8 @@ var tr_default = {
|
|
|
4157
4231
|
"df.wise.CopyFeedback.copy": "Panoya kopyaland\u0131",
|
|
4158
4232
|
"df.wise.CopyFeedback.copyFailed": "Panoya kopyalama ba\u015Far\u0131s\u0131z oldu",
|
|
4159
4233
|
"df.wise.Decision.all": "T\xFCm\xFC",
|
|
4160
|
-
"df.wise.Decision.
|
|
4234
|
+
"df.wise.Decision.currenciesWithAccountDetails": "Hesap bilgileri olan bakiyeler",
|
|
4235
|
+
"df.wise.Decision.filterPlaceholder": "Aramak i\xE7in yazmaya ba\u015Flay\u0131n",
|
|
4161
4236
|
"df.wise.Decision.noResults": "Sonu\xE7 yok",
|
|
4162
4237
|
"df.wise.Decision.popular": "Pop\xFCler",
|
|
4163
4238
|
"df.wise.Decision.recent": "Yak\u0131n zamanl\u0131",
|
|
@@ -4201,7 +4276,8 @@ var zh_CN_default = {
|
|
|
4201
4276
|
"df.wise.CopyFeedback.copy": "\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F",
|
|
4202
4277
|
"df.wise.CopyFeedback.copyFailed": "\u590D\u5236\u5230\u526A\u8D34\u677F\u5931\u8D25",
|
|
4203
4278
|
"df.wise.Decision.all": "\u5168\u90E8",
|
|
4204
|
-
"df.wise.Decision.
|
|
4279
|
+
"df.wise.Decision.currenciesWithAccountDetails": "\u5E26\u6709\u8D26\u6237\u8BE6\u7EC6\u4FE1\u606F\u7684\u8D27\u5E01",
|
|
4280
|
+
"df.wise.Decision.filterPlaceholder": "\u5F00\u59CB\u8F93\u5165\u4EE5\u641C\u7D22",
|
|
4205
4281
|
"df.wise.Decision.noResults": "\u6682\u65E0\u7ED3\u679C",
|
|
4206
4282
|
"df.wise.Decision.popular": "\u70ED\u95E8",
|
|
4207
4283
|
"df.wise.Decision.recent": "\u6700\u8FD1",
|
|
@@ -4245,6 +4321,7 @@ var zh_HK_default = {
|
|
|
4245
4321
|
"df.wise.CopyFeedback.copy": "\u8907\u88FD\u5230\u526A\u8CBC\u677F",
|
|
4246
4322
|
"df.wise.CopyFeedback.copyFailed": "\u7121\u6CD5\u8907\u88FD\u5230\u526A\u8CBC\u677F",
|
|
4247
4323
|
"df.wise.Decision.all": "\u5168\u90E8",
|
|
4324
|
+
"df.wise.Decision.currenciesWithAccountDetails": "\u63D0\u4F9B\u8CEC\u6236\u8CC7\u6599\u7684\u9918\u984D",
|
|
4248
4325
|
"df.wise.Decision.filterPlaceholder": "\u958B\u59CB\u8F38\u5165\u4EE5\u641C\u5C0B",
|
|
4249
4326
|
"df.wise.Decision.noResults": "\u6C92\u6709\u7D50\u679C",
|
|
4250
4327
|
"df.wise.Decision.popular": "\u71B1\u9580",
|
|
@@ -4306,7 +4383,7 @@ var import_dynamic_flow_client2 = require("@wise/dynamic-flow-client");
|
|
|
4306
4383
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
4307
4384
|
var appVersion = (
|
|
4308
4385
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
4309
|
-
typeof process !== "undefined" ? "4.
|
|
4386
|
+
typeof process !== "undefined" ? "4.26.0" : "0.0.0"
|
|
4310
4387
|
);
|
|
4311
4388
|
|
|
4312
4389
|
// src/dynamicFlow/telemetry/getLogEvent.ts
|
|
@@ -4361,12 +4438,12 @@ var messages_default = (0, import_react_intl21.defineMessages)({
|
|
|
4361
4438
|
});
|
|
4362
4439
|
|
|
4363
4440
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
4364
|
-
var
|
|
4441
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
4365
4442
|
var wiseRenderers = getWiseRenderers();
|
|
4366
4443
|
function DynamicFlowLegacy(props) {
|
|
4367
4444
|
const { customFetch = globalThis.fetch } = props;
|
|
4368
4445
|
const coreProps = __spreadProps(__spreadValues({}, props), { httpClient: customFetch });
|
|
4369
|
-
return /* @__PURE__ */ (0,
|
|
4446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_dynamic_flow_client2.DynamicFlow, __spreadValues({}, coreProps));
|
|
4370
4447
|
}
|
|
4371
4448
|
function DynamicFlowRevamp(props) {
|
|
4372
4449
|
const {
|
|
@@ -4403,7 +4480,7 @@ function DynamicFlowRevamp(props) {
|
|
|
4403
4480
|
onLink,
|
|
4404
4481
|
onCopy
|
|
4405
4482
|
});
|
|
4406
|
-
return /* @__PURE__ */ (0,
|
|
4483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_dynamic_flow_client2.DynamicFlowCoreRevamp, __spreadValues({}, coreProps)) });
|
|
4407
4484
|
}
|
|
4408
4485
|
var DynamicForm = (0, import_react19.forwardRef)(function DynamicForm2(props, ref) {
|
|
4409
4486
|
const {
|
|
@@ -4440,7 +4517,7 @@ var DynamicForm = (0, import_react19.forwardRef)(function DynamicForm2(props, re
|
|
|
4440
4517
|
onLink,
|
|
4441
4518
|
onCopy
|
|
4442
4519
|
});
|
|
4443
|
-
return /* @__PURE__ */ (0,
|
|
4520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_dynamic_flow_client2.DynamicFormCore, __spreadProps(__spreadValues({}, coreProps), { ref })) });
|
|
4444
4521
|
});
|
|
4445
4522
|
var useWiseHttpClient = (httpClient) => {
|
|
4446
4523
|
const { locale } = (0, import_react_intl22.useIntl)();
|