@wise/dynamic-flow-client-internal 4.20.2 → 4.21.0-experimental-5de9758
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/fr.json +1 -1
- package/build/i18n/ja.json +1 -1
- package/build/i18n/pt.json +1 -1
- package/build/i18n/ro.json +1 -1
- package/build/i18n/ru.json +1 -1
- package/build/i18n/zh_HK.json +1 -1
- package/build/main.js +744 -397
- package/build/main.mjs +643 -296
- package/package.json +5 -5
package/build/main.mjs
CHANGED
|
@@ -37,6 +37,44 @@ import { findRendererPropsByType, isValidSchema, JsonSchemaForm } from "@wise/dy
|
|
|
37
37
|
// src/i18n/index.ts
|
|
38
38
|
import { translations as coreTranslations } from "@wise/dynamic-flow-client";
|
|
39
39
|
|
|
40
|
+
// src/i18n/cs.json
|
|
41
|
+
var cs_default = {
|
|
42
|
+
"df.wise.ArraySchema.addItem": "Ulo\u017Eit",
|
|
43
|
+
"df.wise.ArraySchema.addItemTitle": "P\u0159idat polo\u017Eku",
|
|
44
|
+
"df.wise.ArraySchema.editItem": "Ulo\u017Eit",
|
|
45
|
+
"df.wise.ArraySchema.maxItemsError": "P\u0159idejte {maxItems} nebo m\xE9n\u011B.",
|
|
46
|
+
"df.wise.ArraySchema.minItemsError": "P\u0159idejte alespo\u0148 {minItems}.",
|
|
47
|
+
"df.wise.ArraySchema.removeItem": "Odebrat",
|
|
48
|
+
"df.wise.ButtonLayout.buttonLoadingMessage": "This might take a few seconds",
|
|
49
|
+
"df.wise.ControlFeedback.maxLength": "Zadejte {maxLength} nebo m\xE9n\u011B znak\u016F.",
|
|
50
|
+
"df.wise.ControlFeedback.maximum": "Zadejte \u010D\xEDslo, kter\xE9 je {maximum} nebo men\u0161\xED.",
|
|
51
|
+
"df.wise.ControlFeedback.maximumDate": "Zadejte datum, kter\xE9 je {maximum} nebo p\u0159edt\xEDm.",
|
|
52
|
+
"df.wise.ControlFeedback.minLength": "Zadejte alespo\u0148 n\xE1sleduj\xEDc\xED po\u010Det znak\u016F: {minLength}.",
|
|
53
|
+
"df.wise.ControlFeedback.minimum": "Zadejte \u010D\xEDslo, kter\xE9 je {minimum} nebo vy\u0161\u0161\xED.",
|
|
54
|
+
"df.wise.ControlFeedback.minimumDate": "Zadejte datum, kter\xE9 je {minimum} nebo potom.",
|
|
55
|
+
"df.wise.ControlFeedback.pattern": "Zadejte to pros\xEDm ve spr\xE1vn\xE9m form\xE1tu.",
|
|
56
|
+
"df.wise.ControlFeedback.patternDate": "Zadejte pros\xEDm datum ve spr\xE1vn\xE9m form\xE1tu.",
|
|
57
|
+
"df.wise.ControlFeedback.required": "Vypl\u0148te pros\xEDm toto pole.",
|
|
58
|
+
"df.wise.ControlFeedback.type": "Nespr\xE1vn\xFD typ",
|
|
59
|
+
"df.wise.CopyFeedback.copy": "Zkop\xEDrov\xE1no do schr\xE1nky",
|
|
60
|
+
"df.wise.CopyFeedback.copyFailed": "Kop\xEDrov\xE1n\xED do schr\xE1nky se nezda\u0159ilo",
|
|
61
|
+
"df.wise.DynamicParagraph.copied": "Zkop\xEDrov\xE1no do schr\xE1nky",
|
|
62
|
+
"df.wise.DynamicParagraph.copy": "Kop\xEDrovat",
|
|
63
|
+
"df.wise.ErrorBoundary.errorAlert": "N\u011Bco se pokazilo.",
|
|
64
|
+
"df.wise.ErrorBoundary.retry": "Zkusit znovu",
|
|
65
|
+
"df.wise.ExternalConfirmation.cancel": "Zru\u0161it",
|
|
66
|
+
"df.wise.ExternalConfirmation.description": "Potvr\u010Fte, \u017Ee chcete otev\u0159\xEDt **{origin}** v nov\xE9 kart\u011B prohl\xED\u017Ee\u010De.",
|
|
67
|
+
"df.wise.ExternalConfirmation.open": "Otev\u0159\xEDt v nov\xE9 kart\u011B",
|
|
68
|
+
"df.wise.ExternalConfirmation.title": "Potvr\u010Fte",
|
|
69
|
+
"df.wise.Help.ariaLabel": "Pro v\xEDce informac\xED klikn\u011Bte sem.",
|
|
70
|
+
"df.wise.MultiSelect.summary": "{first} a {count} dal\u0161\xED(ch)",
|
|
71
|
+
"df.wise.MultipleFileUploadSchema.maxFileSizeError": "Je n\xE1m l\xEDto, ale tento soubor je p\u0159\xEDli\u0161 velk\xFD. Nahrajte pros\xEDm men\u0161\xED soubor.",
|
|
72
|
+
"df.wise.MultipleFileUploadSchema.maxItemsError": "Nahrajte {maxItems} nebo m\xE9n\u011B soubor\u016F.",
|
|
73
|
+
"df.wise.MultipleFileUploadSchema.minItemsError": "Nahrajte pros\xEDm alespo\u0148 n\xE1sleduj\xEDc\xED po\u010Det soubor\u016F: {minItems}.",
|
|
74
|
+
"df.wise.PersistAsyncSchema.genericError": "N\u011Bco se pokazilo. Zkuste to pros\xEDm znovu.",
|
|
75
|
+
"df.wise.SearchLayout.loading": "Na\u010D\xEDt\xE1n\xED..."
|
|
76
|
+
};
|
|
77
|
+
|
|
40
78
|
// src/i18n/de.json
|
|
41
79
|
var de_default = {
|
|
42
80
|
"df.wise.ArraySchema.addItem": "Speichern",
|
|
@@ -159,7 +197,7 @@ var fr_default = {
|
|
|
159
197
|
"df.wise.ArraySchema.maxItemsError": "Veuillez ajouter {maxItems} ou moins.",
|
|
160
198
|
"df.wise.ArraySchema.minItemsError": "Veuillez ajouter au moins {minItems}.",
|
|
161
199
|
"df.wise.ArraySchema.removeItem": "Supprimer",
|
|
162
|
-
"df.wise.ButtonLayout.buttonLoadingMessage": "
|
|
200
|
+
"df.wise.ButtonLayout.buttonLoadingMessage": "Patientez quelques secondes",
|
|
163
201
|
"df.wise.ControlFeedback.maxLength": "Veuillez saisir {maxLength} caract\xE8res ou moins.",
|
|
164
202
|
"df.wise.ControlFeedback.maximum": "Veuillez saisir un nombre inf\xE9rieur ou \xE9gal \xE0 {maximum}.",
|
|
165
203
|
"df.wise.ControlFeedback.maximumDate": "Veuillez saisir une date \xE9gale ou ant\xE9rieure au {maximum}.",
|
|
@@ -311,7 +349,7 @@ var ja_default = {
|
|
|
311
349
|
"df.wise.ArraySchema.maxItemsError": "{maxItems}\u30A2\u30A4\u30C6\u30E0\u4EE5\u4E0B\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
312
350
|
"df.wise.ArraySchema.minItemsError": "{minItems}\u30A2\u30A4\u30C6\u30E0\u4EE5\u4E0A\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
313
351
|
"df.wise.ArraySchema.removeItem": "\u524A\u9664\u3059\u308B",
|
|
314
|
-
"df.wise.ButtonLayout.buttonLoadingMessage": "
|
|
352
|
+
"df.wise.ButtonLayout.buttonLoadingMessage": "\u6570\u79D2\u304B\u304B\u308B\u5834\u5408\u304C\u3042\u308A\u307E\u3059",
|
|
315
353
|
"df.wise.ControlFeedback.maxLength": "{maxLength}\u6587\u5B57\u4EE5\u4E0B\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
316
354
|
"df.wise.ControlFeedback.maximum": "{maximum}\u4EE5\u4E0B\u306E\u6570\u5B57\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
317
355
|
"df.wise.ControlFeedback.maximumDate": "{maximum}\u307E\u305F\u306F\u305D\u308C\u4EE5\u524D\u306E\u65E5\u4ED8\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
@@ -341,6 +379,44 @@ var ja_default = {
|
|
|
341
379
|
"df.wise.SearchLayout.loading": "\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026"
|
|
342
380
|
};
|
|
343
381
|
|
|
382
|
+
// src/i18n/nl.json
|
|
383
|
+
var nl_default = {
|
|
384
|
+
"df.wise.ArraySchema.addItem": "Opslaan",
|
|
385
|
+
"df.wise.ArraySchema.addItemTitle": "Item toevoegen",
|
|
386
|
+
"df.wise.ArraySchema.editItem": "Opslaan",
|
|
387
|
+
"df.wise.ArraySchema.maxItemsError": "Voeg {maxItems} of minder toe.",
|
|
388
|
+
"df.wise.ArraySchema.minItemsError": "Voeg minimaal {minItems} toe.",
|
|
389
|
+
"df.wise.ArraySchema.removeItem": "Verwijderen",
|
|
390
|
+
"df.wise.ButtonLayout.buttonLoadingMessage": "This might take a few seconds",
|
|
391
|
+
"df.wise.ControlFeedback.maxLength": "Voer {maxLength} of minder tekens in.",
|
|
392
|
+
"df.wise.ControlFeedback.maximum": "Voer een getal in dat {maximum} of lager is.",
|
|
393
|
+
"df.wise.ControlFeedback.maximumDate": "Voer een datum in die op of voor {maximum} is.",
|
|
394
|
+
"df.wise.ControlFeedback.minLength": "Voer minimaal {minLength} tekens in.",
|
|
395
|
+
"df.wise.ControlFeedback.minimum": "Voer een getal in dat {minimum} of hoger is.",
|
|
396
|
+
"df.wise.ControlFeedback.minimumDate": "Voer een datum in die op of na {minimum} is.",
|
|
397
|
+
"df.wise.ControlFeedback.pattern": "Voer dit in de juiste indeling in.",
|
|
398
|
+
"df.wise.ControlFeedback.patternDate": "Voer een datum in de juiste indeling in.",
|
|
399
|
+
"df.wise.ControlFeedback.required": "Vul dit veld in.",
|
|
400
|
+
"df.wise.ControlFeedback.type": "Onjuist type",
|
|
401
|
+
"df.wise.CopyFeedback.copy": "Naar klembord gekopieerd",
|
|
402
|
+
"df.wise.CopyFeedback.copyFailed": "Naar klembord kopi\xEBren mislukt",
|
|
403
|
+
"df.wise.DynamicParagraph.copied": "Naar klembord gekopieerd",
|
|
404
|
+
"df.wise.DynamicParagraph.copy": "Kopi\xEBren",
|
|
405
|
+
"df.wise.ErrorBoundary.errorAlert": "Er is iets misgegaan.",
|
|
406
|
+
"df.wise.ErrorBoundary.retry": "Opnieuw proberen",
|
|
407
|
+
"df.wise.ExternalConfirmation.cancel": "Annuleren",
|
|
408
|
+
"df.wise.ExternalConfirmation.description": "Bevestig dat je **{origin}** in een nieuw browsertabblad wilt openen.",
|
|
409
|
+
"df.wise.ExternalConfirmation.open": "In nieuw tabblad openen",
|
|
410
|
+
"df.wise.ExternalConfirmation.title": "Bevestigen",
|
|
411
|
+
"df.wise.Help.ariaLabel": "Klik hier voor meer informatie.",
|
|
412
|
+
"df.wise.MultiSelect.summary": "{first} en nog {count}",
|
|
413
|
+
"df.wise.MultipleFileUploadSchema.maxFileSizeError": "Het bestand is te groot. Upload een kleiner bestand.",
|
|
414
|
+
"df.wise.MultipleFileUploadSchema.maxItemsError": "Upload {maxItems} of minder bestanden.",
|
|
415
|
+
"df.wise.MultipleFileUploadSchema.minItemsError": "Upload minimaal {minItems} bestand(en).",
|
|
416
|
+
"df.wise.PersistAsyncSchema.genericError": "Er is iets misgegaan, probeer het opnieuw.",
|
|
417
|
+
"df.wise.SearchLayout.loading": "Laden..."
|
|
418
|
+
};
|
|
419
|
+
|
|
344
420
|
// src/i18n/pl.json
|
|
345
421
|
var pl_default = {
|
|
346
422
|
"df.wise.ArraySchema.addItem": "Zapisz",
|
|
@@ -387,7 +463,7 @@ var pt_default = {
|
|
|
387
463
|
"df.wise.ArraySchema.maxItemsError": "Adicione {maxItems} ou menos.",
|
|
388
464
|
"df.wise.ArraySchema.minItemsError": "Adicione pelo menos {minItems}.",
|
|
389
465
|
"df.wise.ArraySchema.removeItem": "Remover",
|
|
390
|
-
"df.wise.ButtonLayout.buttonLoadingMessage": "
|
|
466
|
+
"df.wise.ButtonLayout.buttonLoadingMessage": "Isso pode levar alguns segundos",
|
|
391
467
|
"df.wise.ControlFeedback.maxLength": "Por favor, insira {maxLength} caracteres ou menos.",
|
|
392
468
|
"df.wise.ControlFeedback.maximum": "Por favor, insira um n\xFAmero que seja {maximum} ou menos.",
|
|
393
469
|
"df.wise.ControlFeedback.maximumDate": "Por favor, insira uma data que seja em ou antes de {maximum}.",
|
|
@@ -425,7 +501,7 @@ var ro_default = {
|
|
|
425
501
|
"df.wise.ArraySchema.maxItemsError": "Te rug\u0103m s\u0103 adaugi {maxItems} sau mai pu\u021Bine.",
|
|
426
502
|
"df.wise.ArraySchema.minItemsError": "Te rug\u0103m s\u0103 adaugi cel pu\u021Bin {minItems}.",
|
|
427
503
|
"df.wise.ArraySchema.removeItem": "Elimin\u0103",
|
|
428
|
-
"df.wise.ButtonLayout.buttonLoadingMessage": "
|
|
504
|
+
"df.wise.ButtonLayout.buttonLoadingMessage": "Acest lucru ar putea dura c\xE2teva secunde",
|
|
429
505
|
"df.wise.ControlFeedback.maxLength": "Te rug\u0103m s\u0103 introduci {maxLength} sau mai pu\u021Bine caractere.",
|
|
430
506
|
"df.wise.ControlFeedback.maximum": "Te rug\u0103m s\u0103 introduci un num\u0103r egal cu {maximum} sau mai mic.",
|
|
431
507
|
"df.wise.ControlFeedback.maximumDate": "Te rug\u0103m s\u0103 introduci o dat\u0103 de \xEEnainte de sau egal\u0103 cu {maximum}.",
|
|
@@ -463,7 +539,7 @@ var ru_default = {
|
|
|
463
539
|
"df.wise.ArraySchema.maxItemsError": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0434\u043E\u0431\u0430\u0432\u044C\u0442\u0435 {maxItems} \u0438\u043B\u0438 \u043C\u0435\u043D\u044C\u0448\u0435.",
|
|
464
540
|
"df.wise.ArraySchema.minItemsError": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0434\u043E\u0431\u0430\u0432\u044C\u0442\u0435 \u043F\u043E \u043A\u0440\u0430\u0439\u043D\u0435\u0439 \u043C\u0435\u0440\u0435 {minItems}.",
|
|
465
541
|
"df.wise.ArraySchema.removeItem": "\u0423\u0434\u0430\u043B\u0438\u0442\u044C",
|
|
466
|
-
"df.wise.ButtonLayout.buttonLoadingMessage": "
|
|
542
|
+
"df.wise.ButtonLayout.buttonLoadingMessage": "\u042D\u0442\u043E \u043C\u043E\u0436\u0435\u0442 \u0437\u0430\u043D\u044F\u0442\u044C \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0435\u043A\u0443\u043D\u0434",
|
|
467
543
|
"df.wise.ControlFeedback.maxLength": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 {maxLength} \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0438\u043B\u0438 \u043C\u0435\u043D\u044C\u0448\u0435.",
|
|
468
544
|
"df.wise.ControlFeedback.maximum": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0447\u0438\u0441\u043B\u043E, \u0440\u0430\u0432\u043D\u043E\u0435 {maximum} \u0438\u043B\u0438 \u043C\u0435\u043D\u044C\u0448\u0435.",
|
|
469
545
|
"df.wise.ControlFeedback.maximumDate": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0434\u0430\u0442\u0443, \u0440\u0430\u0432\u043D\u0443\u044E {maximum} \u0438\u043B\u0438 \u0431\u043E\u043B\u0435\u0435 \u0440\u0430\u043D\u043D\u044E\u044E.",
|
|
@@ -615,7 +691,7 @@ var zh_HK_default = {
|
|
|
615
691
|
"df.wise.ArraySchema.maxItemsError": "\u8ACB\u6DFB\u52A0\u4E0D\u8D85\u904E{maxItems}\u9805\u3002",
|
|
616
692
|
"df.wise.ArraySchema.minItemsError": "\u8ACB\u81F3\u5C11\u6DFB\u52A0{minItems}\u9805\u3002",
|
|
617
693
|
"df.wise.ArraySchema.removeItem": "\u79FB\u9664",
|
|
618
|
-
"df.wise.ButtonLayout.buttonLoadingMessage": "
|
|
694
|
+
"df.wise.ButtonLayout.buttonLoadingMessage": "\u6B64\u7A0B\u5E8F\u53EF\u80FD\u9700\u6642\u5E7E\u79D2",
|
|
619
695
|
"df.wise.ControlFeedback.maxLength": "\u8ACB\u8F38\u5165\u6700\u591A{maxLength}\u500B\u5B57\u5143\u3002",
|
|
620
696
|
"df.wise.ControlFeedback.maximum": "\u8ACB\u8F38\u5165\u4E00\u500B\u5C0F\u65BC\u6216\u7B49\u65BC{maximum}\u7684\u6578\u5B57\u3002",
|
|
621
697
|
"df.wise.ControlFeedback.maximumDate": "\u8ACB\u8F38\u5165{maximum}\u6216\u4E4B\u524D\u7684\u65E5\u671F\u3002",
|
|
@@ -647,6 +723,7 @@ var zh_HK_default = {
|
|
|
647
723
|
|
|
648
724
|
// src/i18n/index.ts
|
|
649
725
|
var wiseTranslations = {
|
|
726
|
+
cs: cs_default,
|
|
650
727
|
en: en_default,
|
|
651
728
|
de: de_default,
|
|
652
729
|
es: es_default,
|
|
@@ -655,6 +732,7 @@ var wiseTranslations = {
|
|
|
655
732
|
id: id_default,
|
|
656
733
|
it: it_default,
|
|
657
734
|
ja: ja_default,
|
|
735
|
+
nl: nl_default,
|
|
658
736
|
pl: pl_default,
|
|
659
737
|
pt: pt_default,
|
|
660
738
|
ro: ro_default,
|
|
@@ -1129,27 +1207,34 @@ var DateInputRenderer_default = DateInputRenderer;
|
|
|
1129
1207
|
// ../renderers/src/DecisionRenderer.tsx
|
|
1130
1208
|
import { Header, NavigationOption, NavigationOptionsList } from "@transferwise/components";
|
|
1131
1209
|
|
|
1132
|
-
// ../renderers/src/
|
|
1133
|
-
import { AvatarView as AvatarView2 } from "@transferwise/components";
|
|
1134
|
-
|
|
1135
|
-
// ../renderers/src/utils/image-utils.tsx
|
|
1136
|
-
import { AvatarView } from "@transferwise/components";
|
|
1137
|
-
|
|
1138
|
-
// ../renderers/src/components/icon/FlagIcon.tsx
|
|
1210
|
+
// ../renderers/src/utils/UrnFlag.tsx
|
|
1139
1211
|
import { Flag } from "@wise/art";
|
|
1140
1212
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1213
|
+
var countryUrnPrefix = "urn:wise:countries:";
|
|
1214
|
+
var currencyUrnPrefix = "urn:wise:currencies:";
|
|
1215
|
+
var isUrnFlag = (uri) => uri.startsWith(countryUrnPrefix) || uri.startsWith(currencyUrnPrefix);
|
|
1216
|
+
function UrnFlag({ size, urn }) {
|
|
1217
|
+
return /* @__PURE__ */ jsx12(Flag, { code: getCode(urn), intrinsicSize: size });
|
|
1218
|
+
}
|
|
1219
|
+
var getCode = (urn) => {
|
|
1220
|
+
return urn.replace(countryUrnPrefix, "").replace(currencyUrnPrefix, "").replace(":image", "").split("?")[0];
|
|
1221
|
+
};
|
|
1222
|
+
|
|
1223
|
+
// ../renderers/src/components/icon/FlagIcon.tsx
|
|
1224
|
+
import { Flag as Flag2 } from "@wise/art";
|
|
1225
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1141
1226
|
var isFlagIcon = (name) => name.startsWith("flag-");
|
|
1142
1227
|
function FlagIcon({ name }) {
|
|
1143
1228
|
if (!isFlagIcon(name)) {
|
|
1144
1229
|
return null;
|
|
1145
1230
|
}
|
|
1146
1231
|
const code = name.substring(5);
|
|
1147
|
-
return /* @__PURE__ */
|
|
1232
|
+
return /* @__PURE__ */ jsx13(Flag2, { code, intrinsicSize: 24 });
|
|
1148
1233
|
}
|
|
1149
1234
|
|
|
1150
1235
|
// ../renderers/src/components/icon/NamedIcon.tsx
|
|
1151
1236
|
import * as icons from "@transferwise/icons";
|
|
1152
|
-
import { jsx as
|
|
1237
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1153
1238
|
var isNamedIcon = (name) => {
|
|
1154
1239
|
const iconName = toCapitalisedCamelCase(name);
|
|
1155
1240
|
return Object.keys(icons).includes(iconName);
|
|
@@ -1160,43 +1245,129 @@ function NamedIcon({ name }) {
|
|
|
1160
1245
|
}
|
|
1161
1246
|
const iconName = toCapitalisedCamelCase(name);
|
|
1162
1247
|
const Icon = icons[iconName];
|
|
1163
|
-
return /* @__PURE__ */
|
|
1248
|
+
return /* @__PURE__ */ jsx14(Icon, { size: 24 });
|
|
1164
1249
|
}
|
|
1165
1250
|
var toCapitalisedCamelCase = (value) => value.split("-").map(capitaliseFirstChar).join("");
|
|
1166
1251
|
var capitaliseFirstChar = (value) => `${value[0].toUpperCase()}${value.slice(1)}`;
|
|
1167
1252
|
|
|
1168
1253
|
// ../renderers/src/components/icon/DynamicIcon.tsx
|
|
1169
|
-
import { jsx as
|
|
1254
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1170
1255
|
function DynamicIcon({ name }) {
|
|
1171
1256
|
if (isFlagIcon(name)) {
|
|
1172
|
-
return /* @__PURE__ */
|
|
1257
|
+
return /* @__PURE__ */ jsx15(FlagIcon, { name });
|
|
1173
1258
|
}
|
|
1174
1259
|
if (isNamedIcon(name)) {
|
|
1175
|
-
return /* @__PURE__ */
|
|
1260
|
+
return /* @__PURE__ */ jsx15(NamedIcon, { name });
|
|
1176
1261
|
}
|
|
1177
1262
|
return null;
|
|
1178
1263
|
}
|
|
1264
|
+
function isValidIconName(name) {
|
|
1265
|
+
return isNamedIcon(name) || isFlagIcon(name);
|
|
1266
|
+
}
|
|
1267
|
+
function isValidIconUrn(uri) {
|
|
1268
|
+
if (!uri.startsWith("urn:wise:icons:")) {
|
|
1269
|
+
return false;
|
|
1270
|
+
}
|
|
1271
|
+
const name = uri.replace("urn:wise:icons:", "").split("?")[0];
|
|
1272
|
+
return isValidIconName(name);
|
|
1273
|
+
}
|
|
1179
1274
|
var DynamicIcon_default = DynamicIcon;
|
|
1180
1275
|
|
|
1181
|
-
// ../renderers/src/
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
return
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1276
|
+
// ../renderers/src/components/Media/stringToURN.ts
|
|
1277
|
+
var stringToURN = (uri) => {
|
|
1278
|
+
var _a;
|
|
1279
|
+
const [nameWithRComponent, qComponent] = uri.split("?=");
|
|
1280
|
+
const [name, rComponent] = (_a = nameWithRComponent == null ? void 0 : nameWithRComponent.split("?+")) != null ? _a : ["", ""];
|
|
1281
|
+
const rComponents = rComponent == null ? void 0 : rComponent.split("&").map((c) => c.split("=")).map(([a, b]) => [a, b]);
|
|
1282
|
+
const qComponents = qComponent == null ? void 0 : qComponent.split("&").map((c) => c.split("=")).map(([a, b]) => [a, b]);
|
|
1283
|
+
return {
|
|
1284
|
+
name,
|
|
1285
|
+
rComponents,
|
|
1286
|
+
qComponents
|
|
1287
|
+
};
|
|
1192
1288
|
};
|
|
1193
1289
|
|
|
1194
|
-
// ../renderers/src/
|
|
1290
|
+
// ../renderers/src/components/Media/resolveUri.tsx
|
|
1195
1291
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1292
|
+
var resolveUri = (uri, size) => {
|
|
1293
|
+
var _a, _b;
|
|
1294
|
+
const { name, qComponents = [] } = stringToURN(uri);
|
|
1295
|
+
if (isValidIconUrn(name)) {
|
|
1296
|
+
return {
|
|
1297
|
+
asset: /* @__PURE__ */ jsx16(DynamicIcon_default, { name: name.replace("urn:wise:icons:", "") }),
|
|
1298
|
+
backgroundColor: (_a = qComponents.find(([key]) => key === "background-color")) == null ? void 0 : _a[1]
|
|
1299
|
+
};
|
|
1300
|
+
}
|
|
1301
|
+
if (isUrnFlag(name)) {
|
|
1302
|
+
return {
|
|
1303
|
+
asset: /* @__PURE__ */ jsx16(UrnFlag, { urn: name, size })
|
|
1304
|
+
};
|
|
1305
|
+
}
|
|
1306
|
+
if (name.startsWith("data:text/plain,")) {
|
|
1307
|
+
const text = decodeURI(name.replace("data:text/plain,", ""));
|
|
1308
|
+
return {
|
|
1309
|
+
asset: text,
|
|
1310
|
+
backgroundColor: (_b = qComponents.find(([key]) => key === "background-color")) == null ? void 0 : _b[1]
|
|
1311
|
+
};
|
|
1312
|
+
}
|
|
1313
|
+
if (!uri.startsWith("urn:")) {
|
|
1314
|
+
return { asset: /* @__PURE__ */ jsx16("img", { src: uri, alt: "", width: `${size}px` }) };
|
|
1315
|
+
}
|
|
1316
|
+
return { asset: void 0 };
|
|
1317
|
+
};
|
|
1318
|
+
|
|
1319
|
+
// ../renderers/src/components/Media/AvatarMedia.tsx
|
|
1320
|
+
import { AvatarLayout, AvatarView } from "@transferwise/components";
|
|
1321
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1322
|
+
var AvatarMedia = ({
|
|
1323
|
+
accessibilityDescription,
|
|
1324
|
+
content,
|
|
1325
|
+
size
|
|
1326
|
+
}) => {
|
|
1327
|
+
const getRenderableAvatar = (avatar) => {
|
|
1328
|
+
if (avatar.type === "text") {
|
|
1329
|
+
return { asset: avatar.text };
|
|
1330
|
+
}
|
|
1331
|
+
return __spreadProps(__spreadValues({}, resolveUri(avatar.uri, size)), {
|
|
1332
|
+
badge: avatar.badgeUri ? resolveUri(avatar.badgeUri, 16).asset : void 0
|
|
1333
|
+
});
|
|
1334
|
+
};
|
|
1335
|
+
const avatars = content.map(getRenderableAvatar);
|
|
1336
|
+
if (avatars.length === 1) {
|
|
1337
|
+
const { badge, backgroundColor, asset } = avatars[0];
|
|
1338
|
+
return /* @__PURE__ */ jsx17(
|
|
1339
|
+
AvatarView,
|
|
1340
|
+
{
|
|
1341
|
+
"aria-label": accessibilityDescription,
|
|
1342
|
+
size,
|
|
1343
|
+
badge: { asset: badge },
|
|
1344
|
+
style: { backgroundColor },
|
|
1345
|
+
children: asset
|
|
1346
|
+
}
|
|
1347
|
+
);
|
|
1348
|
+
}
|
|
1349
|
+
const avatarsWithoutBadges = avatars.map((_a) => {
|
|
1350
|
+
var _b = _a, { badge } = _b, rest = __objRest(_b, ["badge"]);
|
|
1351
|
+
return __spreadValues({}, rest);
|
|
1352
|
+
});
|
|
1353
|
+
return /* @__PURE__ */ jsx17(
|
|
1354
|
+
AvatarLayout,
|
|
1355
|
+
{
|
|
1356
|
+
"aria-label": accessibilityDescription,
|
|
1357
|
+
size,
|
|
1358
|
+
orientation: "diagonal",
|
|
1359
|
+
avatars: avatarsWithoutBadges
|
|
1360
|
+
}
|
|
1361
|
+
);
|
|
1362
|
+
};
|
|
1363
|
+
|
|
1364
|
+
// ../renderers/src/utils/image-utils.tsx
|
|
1365
|
+
import { AvatarView as AvatarView2 } from "@transferwise/components";
|
|
1366
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1196
1367
|
var getBadgedMedia = (iconNode, imageNode, size) => {
|
|
1197
1368
|
if (iconNode && imageNode) {
|
|
1198
1369
|
if (imageNode && iconNode) {
|
|
1199
|
-
return /* @__PURE__ */
|
|
1370
|
+
return /* @__PURE__ */ jsx18(AvatarView2, { size, badge: { asset: iconNode }, children: imageNode });
|
|
1200
1371
|
}
|
|
1201
1372
|
}
|
|
1202
1373
|
return null;
|
|
@@ -1204,7 +1375,7 @@ var getBadgedMedia = (iconNode, imageNode, size) => {
|
|
|
1204
1375
|
var getIconNode = (icon) => {
|
|
1205
1376
|
if (icon) {
|
|
1206
1377
|
if ("name" in icon) {
|
|
1207
|
-
return /* @__PURE__ */
|
|
1378
|
+
return /* @__PURE__ */ jsx18(DynamicIcon_default, { name: icon.name });
|
|
1208
1379
|
}
|
|
1209
1380
|
if (icon.text) {
|
|
1210
1381
|
return icon.text;
|
|
@@ -1216,56 +1387,91 @@ var getImageNode = (image, size) => {
|
|
|
1216
1387
|
if (image) {
|
|
1217
1388
|
const { accessibilityDescription, uri } = image;
|
|
1218
1389
|
if (!uri.startsWith("urn:")) {
|
|
1219
|
-
return /* @__PURE__ */
|
|
1390
|
+
return /* @__PURE__ */ jsx18("img", { src: uri, alt: accessibilityDescription, width: `${size}px` });
|
|
1220
1391
|
}
|
|
1221
1392
|
if (isUrnFlag(uri)) {
|
|
1222
|
-
return /* @__PURE__ */
|
|
1393
|
+
return /* @__PURE__ */ jsx18(UrnFlag, { urn: uri, accessibilityDescription, size });
|
|
1223
1394
|
}
|
|
1224
1395
|
}
|
|
1225
1396
|
return null;
|
|
1226
1397
|
};
|
|
1227
1398
|
|
|
1228
|
-
// ../renderers/src/components/
|
|
1229
|
-
import {
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
const imageNode = getImageNode(image, mediaSize);
|
|
1399
|
+
// ../renderers/src/components/Media/Media.tsx
|
|
1400
|
+
import { AvatarView as AvatarView4 } from "@transferwise/components";
|
|
1401
|
+
|
|
1402
|
+
// ../renderers/src/components/Media/LegacyMedia.tsx
|
|
1403
|
+
import { AvatarView as AvatarView3 } from "@transferwise/components";
|
|
1404
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1405
|
+
var LegacyMedia = ({ image, icon, preferAvatar, size }) => {
|
|
1406
|
+
const imageNode = getImageNode(image, size);
|
|
1237
1407
|
const iconNode = getIconNode(icon);
|
|
1238
|
-
const badge = getBadgedMedia(iconNode, imageNode,
|
|
1408
|
+
const badge = getBadgedMedia(iconNode, imageNode, size);
|
|
1239
1409
|
if (badge) {
|
|
1240
1410
|
return badge;
|
|
1241
1411
|
}
|
|
1242
1412
|
if (imageNode) {
|
|
1243
|
-
return preferAvatar ? /* @__PURE__ */
|
|
1413
|
+
return preferAvatar ? /* @__PURE__ */ jsx19(AvatarView3, { children: imageNode }) : imageNode;
|
|
1244
1414
|
}
|
|
1245
|
-
if (iconNode) {
|
|
1246
|
-
|
|
1415
|
+
if (iconNode && icon) {
|
|
1416
|
+
if ("text" in icon || size === 48) {
|
|
1417
|
+
return /* @__PURE__ */ jsx19(AvatarView3, { size, children: iconNode });
|
|
1418
|
+
}
|
|
1419
|
+
return iconNode;
|
|
1420
|
+
}
|
|
1421
|
+
return null;
|
|
1422
|
+
};
|
|
1423
|
+
|
|
1424
|
+
// ../renderers/src/components/Media/Media.tsx
|
|
1425
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1426
|
+
function Media({
|
|
1427
|
+
media,
|
|
1428
|
+
preferAvatar,
|
|
1429
|
+
size
|
|
1430
|
+
}) {
|
|
1431
|
+
switch (media == null ? void 0 : media.type) {
|
|
1432
|
+
case "avatar":
|
|
1433
|
+
return /* @__PURE__ */ jsx20(AvatarMedia, __spreadProps(__spreadValues({}, media), { size }));
|
|
1434
|
+
case "image": {
|
|
1435
|
+
const imageNode = getImageNode(media, size);
|
|
1436
|
+
return preferAvatar ? /* @__PURE__ */ jsx20(AvatarView4, { children: imageNode }) : imageNode;
|
|
1437
|
+
}
|
|
1438
|
+
case "legacy": {
|
|
1439
|
+
return /* @__PURE__ */ jsx20(LegacyMedia, __spreadProps(__spreadValues({}, media), { preferAvatar, size }));
|
|
1440
|
+
}
|
|
1441
|
+
default:
|
|
1442
|
+
return null;
|
|
1247
1443
|
}
|
|
1248
1444
|
}
|
|
1249
1445
|
|
|
1446
|
+
// ../renderers/src/components/Media/OptionMedia.tsx
|
|
1447
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1448
|
+
var mediaSize = 48;
|
|
1449
|
+
function OptionMedia(props) {
|
|
1450
|
+
return /* @__PURE__ */ jsx21(Media, __spreadProps(__spreadValues({}, props), { size: mediaSize }));
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
// ../renderers/src/components/Media/getInlineMedia.tsx
|
|
1454
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1455
|
+
var getInlineMedia = (media) => media ? /* @__PURE__ */ jsx22(Media, { media, preferAvatar: false, size: 24 }) : null;
|
|
1456
|
+
|
|
1250
1457
|
// ../renderers/src/DecisionRenderer.tsx
|
|
1251
|
-
import { jsx as
|
|
1458
|
+
import { jsx as jsx23, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1252
1459
|
var DecisionRenderer = {
|
|
1253
1460
|
canRenderType: "decision",
|
|
1254
1461
|
render: ({ control, margin, options, title }) => /* @__PURE__ */ jsxs4("div", { className: getMargin(margin), children: [
|
|
1255
|
-
title && /* @__PURE__ */
|
|
1256
|
-
/* @__PURE__ */
|
|
1257
|
-
const { description, disabled,
|
|
1258
|
-
return /* @__PURE__ */
|
|
1462
|
+
title && /* @__PURE__ */ jsx23(Header, { as: "h2", title }),
|
|
1463
|
+
/* @__PURE__ */ jsx23(NavigationOptionsList, { children: options.map((option) => {
|
|
1464
|
+
const { description, disabled, media, title: itemTitle, tag, onClick } = option;
|
|
1465
|
+
return /* @__PURE__ */ jsx23(
|
|
1259
1466
|
NavigationOption,
|
|
1260
1467
|
{
|
|
1261
1468
|
title: itemTitle,
|
|
1262
1469
|
content: description,
|
|
1263
1470
|
disabled,
|
|
1264
|
-
media:
|
|
1471
|
+
media: media ? /* @__PURE__ */ jsx23(
|
|
1265
1472
|
OptionMedia,
|
|
1266
1473
|
{
|
|
1267
|
-
|
|
1268
|
-
image,
|
|
1474
|
+
media,
|
|
1269
1475
|
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
1270
1476
|
}
|
|
1271
1477
|
) : null,
|
|
@@ -1281,10 +1487,10 @@ var DecisionRenderer = {
|
|
|
1281
1487
|
var DecisionRenderer_default = DecisionRenderer;
|
|
1282
1488
|
|
|
1283
1489
|
// ../renderers/src/DividerRenderer.tsx
|
|
1284
|
-
import { jsx as
|
|
1490
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1285
1491
|
var DividerRenderer = {
|
|
1286
1492
|
canRenderType: "divider",
|
|
1287
|
-
render: ({ margin }) => /* @__PURE__ */
|
|
1493
|
+
render: ({ margin }) => /* @__PURE__ */ jsx24("hr", { className: `m-t-0 ${getMargin(margin)}` })
|
|
1288
1494
|
};
|
|
1289
1495
|
var DividerRenderer_default = DividerRenderer;
|
|
1290
1496
|
|
|
@@ -1319,7 +1525,7 @@ var external_confirmation_messages_default = defineMessages3({
|
|
|
1319
1525
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
1320
1526
|
import { useIntl as useIntl3 } from "react-intl";
|
|
1321
1527
|
import { useEffect } from "react";
|
|
1322
|
-
import { Fragment, jsx as
|
|
1528
|
+
import { Fragment, jsx as jsx25, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1323
1529
|
var ExternalConfirmationRenderer = {
|
|
1324
1530
|
canRenderType: "external-confirmation",
|
|
1325
1531
|
render: ExternalConfirmationRendererComponent
|
|
@@ -1342,15 +1548,15 @@ function ExternalConfirmationRendererComponent({
|
|
|
1342
1548
|
}
|
|
1343
1549
|
}
|
|
1344
1550
|
}, []);
|
|
1345
|
-
return /* @__PURE__ */
|
|
1551
|
+
return /* @__PURE__ */ jsx25(
|
|
1346
1552
|
Modal,
|
|
1347
1553
|
{
|
|
1348
1554
|
open: status === "failure",
|
|
1349
1555
|
title: formatMessage(external_confirmation_messages_default.title),
|
|
1350
1556
|
body: /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
1351
|
-
/* @__PURE__ */
|
|
1352
|
-
/* @__PURE__ */
|
|
1353
|
-
/* @__PURE__ */
|
|
1557
|
+
/* @__PURE__ */ jsx25(Markdown2, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
|
|
1558
|
+
/* @__PURE__ */ jsx25("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs5("div", { className: "df-box-renderer-width-lg", children: [
|
|
1559
|
+
/* @__PURE__ */ jsx25(
|
|
1354
1560
|
Button3,
|
|
1355
1561
|
{
|
|
1356
1562
|
block: true,
|
|
@@ -1364,7 +1570,7 @@ function ExternalConfirmationRendererComponent({
|
|
|
1364
1570
|
children: formatMessage(external_confirmation_messages_default.open)
|
|
1365
1571
|
}
|
|
1366
1572
|
),
|
|
1367
|
-
/* @__PURE__ */
|
|
1573
|
+
/* @__PURE__ */ jsx25(Button3, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
|
|
1368
1574
|
] }) })
|
|
1369
1575
|
] }),
|
|
1370
1576
|
onClose: onCancel
|
|
@@ -1381,27 +1587,27 @@ function getOrigin(url) {
|
|
|
1381
1587
|
var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
|
|
1382
1588
|
|
|
1383
1589
|
// ../renderers/src/FormRenderer.tsx
|
|
1384
|
-
import { jsx as
|
|
1590
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1385
1591
|
var FormRenderer = {
|
|
1386
1592
|
canRenderType: "form",
|
|
1387
|
-
render: ({ children, margin }) => /* @__PURE__ */
|
|
1593
|
+
render: ({ children, margin }) => /* @__PURE__ */ jsx26("div", { className: getMargin(margin), children })
|
|
1388
1594
|
};
|
|
1389
1595
|
var FormRenderer_default = FormRenderer;
|
|
1390
1596
|
|
|
1391
1597
|
// ../renderers/src/FormSectionRenderer.tsx
|
|
1392
1598
|
import { Header as Header2 } from "@transferwise/components";
|
|
1393
|
-
import { jsx as
|
|
1599
|
+
import { jsx as jsx27, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1394
1600
|
var FormSectionRenderer = {
|
|
1395
1601
|
canRenderType: "form-section",
|
|
1396
1602
|
render: ({ title, description, children }) => /* @__PURE__ */ jsxs6("fieldset", { children: [
|
|
1397
|
-
title && /* @__PURE__ */
|
|
1603
|
+
title && /* @__PURE__ */ jsx27(
|
|
1398
1604
|
Header2,
|
|
1399
1605
|
{
|
|
1400
1606
|
as: "h2",
|
|
1401
1607
|
title
|
|
1402
1608
|
}
|
|
1403
1609
|
),
|
|
1404
|
-
description && /* @__PURE__ */
|
|
1610
|
+
description && /* @__PURE__ */ jsx27("p", { children: description }),
|
|
1405
1611
|
children
|
|
1406
1612
|
] })
|
|
1407
1613
|
};
|
|
@@ -1409,18 +1615,18 @@ var FormSectionRenderer_default = FormSectionRenderer;
|
|
|
1409
1615
|
|
|
1410
1616
|
// ../renderers/src/HeadingRenderer.tsx
|
|
1411
1617
|
import { Display, Title } from "@transferwise/components";
|
|
1412
|
-
import { jsx as
|
|
1618
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1413
1619
|
var HeadingRenderer = {
|
|
1414
1620
|
canRenderType: "heading",
|
|
1415
|
-
render: (props) => /* @__PURE__ */
|
|
1621
|
+
render: (props) => /* @__PURE__ */ jsx28(Heading, __spreadValues({}, props))
|
|
1416
1622
|
};
|
|
1417
1623
|
function Heading(props) {
|
|
1418
1624
|
const { text, size, align, margin, control } = props;
|
|
1419
1625
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
1420
|
-
return control === "display" ? /* @__PURE__ */
|
|
1626
|
+
return control === "display" ? /* @__PURE__ */ jsx28(DisplayHeading, { size, text, className }) : /* @__PURE__ */ jsx28(StandardHeading, { size, text, className });
|
|
1421
1627
|
}
|
|
1422
1628
|
function DisplayHeading({ size, text, className }) {
|
|
1423
|
-
return /* @__PURE__ */
|
|
1629
|
+
return /* @__PURE__ */ jsx28(Display, { type: getDisplayType(size), className, children: text });
|
|
1424
1630
|
}
|
|
1425
1631
|
var getDisplayType = (size) => {
|
|
1426
1632
|
switch (size) {
|
|
@@ -1436,7 +1642,7 @@ var getDisplayType = (size) => {
|
|
|
1436
1642
|
}
|
|
1437
1643
|
};
|
|
1438
1644
|
function StandardHeading({ size, text, className }) {
|
|
1439
|
-
return /* @__PURE__ */
|
|
1645
|
+
return /* @__PURE__ */ jsx28(Title, { type: getTitleTypeBySize(size), className, children: text });
|
|
1440
1646
|
}
|
|
1441
1647
|
var getTitleTypeBySize = (size) => {
|
|
1442
1648
|
var _a;
|
|
@@ -1463,7 +1669,7 @@ function isRelativePath(url = "") {
|
|
|
1463
1669
|
}
|
|
1464
1670
|
|
|
1465
1671
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
1466
|
-
import { jsx as
|
|
1672
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1467
1673
|
function UrlImage({
|
|
1468
1674
|
accessibilityDescription,
|
|
1469
1675
|
align,
|
|
@@ -1478,7 +1684,7 @@ function UrlImage({
|
|
|
1478
1684
|
void getImageSource(httpClient, uri).then(setImageSource);
|
|
1479
1685
|
}
|
|
1480
1686
|
}, [uri, httpClient]);
|
|
1481
|
-
return /* @__PURE__ */
|
|
1687
|
+
return /* @__PURE__ */ jsx29("div", { className: `df-image ${align} ${size || "md"}`, children: /* @__PURE__ */ jsx29(
|
|
1482
1688
|
Image,
|
|
1483
1689
|
{
|
|
1484
1690
|
className: `img-responsive ${getMargin(margin)}`,
|
|
@@ -1522,7 +1728,7 @@ var getImageSource = async (httpClient, imageUrl) => {
|
|
|
1522
1728
|
};
|
|
1523
1729
|
|
|
1524
1730
|
// ../renderers/src/ImageRenderer/UrnFlagImage.tsx
|
|
1525
|
-
import { jsx as
|
|
1731
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1526
1732
|
var maxFlagSize = 600;
|
|
1527
1733
|
function UrnFlagImage({
|
|
1528
1734
|
accessibilityDescription,
|
|
@@ -1531,7 +1737,7 @@ function UrnFlagImage({
|
|
|
1531
1737
|
size,
|
|
1532
1738
|
uri
|
|
1533
1739
|
}) {
|
|
1534
|
-
return /* @__PURE__ */
|
|
1740
|
+
return /* @__PURE__ */ jsx30("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx30(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
|
|
1535
1741
|
}
|
|
1536
1742
|
|
|
1537
1743
|
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
@@ -1543,19 +1749,13 @@ import {
|
|
|
1543
1749
|
|
|
1544
1750
|
// ../renderers/src/ImageRenderer/isAnimated.ts
|
|
1545
1751
|
var isAnimated = (uri) => {
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
}
|
|
1550
|
-
const params = sections[1];
|
|
1551
|
-
if (!params.startsWith("+")) {
|
|
1552
|
-
return false;
|
|
1553
|
-
}
|
|
1554
|
-
return params.substring(1).split("&").some((param) => param === "type=animated");
|
|
1752
|
+
var _a;
|
|
1753
|
+
const { rComponents } = stringToURN(uri);
|
|
1754
|
+
return (_a = rComponents == null ? void 0 : rComponents.some(([key, value]) => key === "type" && value === "animated")) != null ? _a : false;
|
|
1555
1755
|
};
|
|
1556
1756
|
|
|
1557
1757
|
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
1558
|
-
import { jsx as
|
|
1758
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1559
1759
|
var urnPrefix = "urn:wise:illustrations:";
|
|
1560
1760
|
var isUrnIllustration = (uri) => uri.startsWith(urnPrefix);
|
|
1561
1761
|
function UrnIllustration({
|
|
@@ -1569,9 +1769,9 @@ function UrnIllustration({
|
|
|
1569
1769
|
const illustrationName = getIllustrationName(uri);
|
|
1570
1770
|
const illustration3DName = getIllustration3DName(uri);
|
|
1571
1771
|
if (illustration3DName && isAnimated(uri)) {
|
|
1572
|
-
return /* @__PURE__ */
|
|
1772
|
+
return /* @__PURE__ */ jsx31("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx31(Illustration3D, { name: illustration3DName, size: illustrationSize }) });
|
|
1573
1773
|
}
|
|
1574
|
-
return /* @__PURE__ */
|
|
1774
|
+
return /* @__PURE__ */ jsx31("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx31(
|
|
1575
1775
|
Illustration,
|
|
1576
1776
|
{
|
|
1577
1777
|
className: "df-illustration",
|
|
@@ -1591,24 +1791,24 @@ var getIllustration3DName = (uri) => {
|
|
|
1591
1791
|
};
|
|
1592
1792
|
|
|
1593
1793
|
// ../renderers/src/ImageRenderer/UrnImage.tsx
|
|
1594
|
-
import { jsx as
|
|
1794
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1595
1795
|
var isUrnImage = (uri) => uri.startsWith("urn:");
|
|
1596
1796
|
function UrnImage(props) {
|
|
1597
1797
|
const { uri } = props;
|
|
1598
1798
|
if (isUrnIllustration(uri)) {
|
|
1599
|
-
return /* @__PURE__ */
|
|
1799
|
+
return /* @__PURE__ */ jsx32(UrnIllustration, __spreadValues({}, props));
|
|
1600
1800
|
}
|
|
1601
1801
|
if (isUrnFlag(uri)) {
|
|
1602
|
-
return /* @__PURE__ */
|
|
1802
|
+
return /* @__PURE__ */ jsx32(UrnFlagImage, __spreadValues({}, props));
|
|
1603
1803
|
}
|
|
1604
1804
|
return null;
|
|
1605
1805
|
}
|
|
1606
1806
|
|
|
1607
1807
|
// ../renderers/src/ImageRenderer/ImageRenderer.tsx
|
|
1608
|
-
import { jsx as
|
|
1808
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1609
1809
|
var ImageRenderer = {
|
|
1610
1810
|
canRenderType: "image",
|
|
1611
|
-
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */
|
|
1811
|
+
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ jsx33(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ jsx33(UrlImage, __spreadValues({}, props))
|
|
1612
1812
|
};
|
|
1613
1813
|
|
|
1614
1814
|
// ../renderers/src/ImageRenderer/index.tsx
|
|
@@ -1616,7 +1816,7 @@ var ImageRenderer_default = ImageRenderer;
|
|
|
1616
1816
|
|
|
1617
1817
|
// ../renderers/src/InstructionsRenderer.tsx
|
|
1618
1818
|
import { Header as Header3, InstructionsList } from "@transferwise/components";
|
|
1619
|
-
import { jsx as
|
|
1819
|
+
import { jsx as jsx34, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1620
1820
|
var doContext = ["positive", "neutral"];
|
|
1621
1821
|
var dontContext = ["warning", "negative"];
|
|
1622
1822
|
var InstructionsRenderer = {
|
|
@@ -1625,8 +1825,8 @@ var InstructionsRenderer = {
|
|
|
1625
1825
|
const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
|
|
1626
1826
|
const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
|
|
1627
1827
|
return /* @__PURE__ */ jsxs7("div", { className: getMargin(margin), children: [
|
|
1628
|
-
title ? /* @__PURE__ */
|
|
1629
|
-
/* @__PURE__ */
|
|
1828
|
+
title ? /* @__PURE__ */ jsx34(Header3, { title }) : null,
|
|
1829
|
+
/* @__PURE__ */ jsx34(InstructionsList, { dos, donts })
|
|
1630
1830
|
] });
|
|
1631
1831
|
}
|
|
1632
1832
|
};
|
|
@@ -1642,34 +1842,9 @@ var onWheel = (event) => {
|
|
|
1642
1842
|
}
|
|
1643
1843
|
};
|
|
1644
1844
|
|
|
1645
|
-
// ../renderers/src/utils/getInlineAvatar.tsx
|
|
1646
|
-
import { AvatarView as AvatarView3 } from "@transferwise/components";
|
|
1647
|
-
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1648
|
-
var mediaSize2 = 24;
|
|
1649
|
-
function getInlineAvatar({ icon, image }) {
|
|
1650
|
-
const imageNode = getImageNode(image, mediaSize2);
|
|
1651
|
-
const iconNode = getIconNode(icon);
|
|
1652
|
-
const badge = getBadgedMedia(iconNode, imageNode, mediaSize2);
|
|
1653
|
-
if (badge) {
|
|
1654
|
-
return badge;
|
|
1655
|
-
}
|
|
1656
|
-
if (imageNode) {
|
|
1657
|
-
return imageNode;
|
|
1658
|
-
}
|
|
1659
|
-
if (isNamedIcon2(icon) && !isFlagIcon2(icon)) {
|
|
1660
|
-
return iconNode;
|
|
1661
|
-
}
|
|
1662
|
-
if (iconNode) {
|
|
1663
|
-
return /* @__PURE__ */ jsx30(AvatarView3, { size: mediaSize2, children: iconNode });
|
|
1664
|
-
}
|
|
1665
|
-
return null;
|
|
1666
|
-
}
|
|
1667
|
-
var isNamedIcon2 = (icon) => icon ? "name" in icon : false;
|
|
1668
|
-
var isFlagIcon2 = (icon) => isNamedIcon2(icon) && icon.name.startsWith("flag-");
|
|
1669
|
-
|
|
1670
1845
|
// ../renderers/src/utils/getInputGroupAddonStart.tsx
|
|
1671
|
-
var getInputGroupAddonStart = (
|
|
1672
|
-
const content =
|
|
1846
|
+
var getInputGroupAddonStart = (media) => {
|
|
1847
|
+
const content = getInlineMedia(media);
|
|
1673
1848
|
return content ? { content } : void 0;
|
|
1674
1849
|
};
|
|
1675
1850
|
|
|
@@ -1683,11 +1858,11 @@ function pick(obj, ...keys) {
|
|
|
1683
1858
|
}
|
|
1684
1859
|
|
|
1685
1860
|
// ../renderers/src/IntegerInputRenderer.tsx
|
|
1686
|
-
import { jsx as
|
|
1861
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1687
1862
|
var IntegerInputRenderer = {
|
|
1688
1863
|
canRenderType: "input-integer",
|
|
1689
1864
|
render: (props) => {
|
|
1690
|
-
const { id, title, description, help,
|
|
1865
|
+
const { id, title, description, help, media, validationState, value, onChange } = props;
|
|
1691
1866
|
const commonProps = pick(
|
|
1692
1867
|
props,
|
|
1693
1868
|
"autoComplete",
|
|
@@ -1698,7 +1873,7 @@ var IntegerInputRenderer = {
|
|
|
1698
1873
|
"maximum",
|
|
1699
1874
|
"minimum"
|
|
1700
1875
|
);
|
|
1701
|
-
return /* @__PURE__ */
|
|
1876
|
+
return /* @__PURE__ */ jsx35(
|
|
1702
1877
|
FieldInput_default,
|
|
1703
1878
|
{
|
|
1704
1879
|
id,
|
|
@@ -1706,7 +1881,7 @@ var IntegerInputRenderer = {
|
|
|
1706
1881
|
description,
|
|
1707
1882
|
validation: validationState,
|
|
1708
1883
|
help,
|
|
1709
|
-
children: /* @__PURE__ */
|
|
1884
|
+
children: /* @__PURE__ */ jsx35(InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx35(
|
|
1710
1885
|
Input,
|
|
1711
1886
|
__spreadValues({
|
|
1712
1887
|
id,
|
|
@@ -1731,12 +1906,12 @@ var IntegerInputRenderer_default = IntegerInputRenderer;
|
|
|
1731
1906
|
// ../renderers/src/ListRenderer.tsx
|
|
1732
1907
|
import { Body, Header as Header4 } from "@transferwise/components";
|
|
1733
1908
|
import classNames3 from "classnames";
|
|
1734
|
-
import { jsx as
|
|
1909
|
+
import { jsx as jsx36, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1735
1910
|
var ListRenderer = {
|
|
1736
1911
|
canRenderType: "list",
|
|
1737
1912
|
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ jsxs8("div", { className: getMargin(margin), children: [
|
|
1738
|
-
(title || callToAction) && /* @__PURE__ */
|
|
1739
|
-
items.map((props) => /* @__PURE__ */
|
|
1913
|
+
(title || callToAction) && /* @__PURE__ */ jsx36(Header4, { as: "h2", title: title != null ? title : "", action: getListAction(callToAction) }),
|
|
1914
|
+
items.map((props) => /* @__PURE__ */ jsx36(DesignSystemListItem, __spreadProps(__spreadValues({}, props), { control }), props.title))
|
|
1740
1915
|
] })
|
|
1741
1916
|
};
|
|
1742
1917
|
var DesignSystemListItem = ({
|
|
@@ -1745,9 +1920,10 @@ var DesignSystemListItem = ({
|
|
|
1745
1920
|
supportingValues,
|
|
1746
1921
|
icon,
|
|
1747
1922
|
image,
|
|
1923
|
+
media,
|
|
1748
1924
|
control,
|
|
1749
1925
|
tag
|
|
1750
|
-
}) => /* @__PURE__ */
|
|
1926
|
+
}) => /* @__PURE__ */ jsx36(
|
|
1751
1927
|
"label",
|
|
1752
1928
|
{
|
|
1753
1929
|
className: classNames3("np-option p-a-2", {
|
|
@@ -1755,22 +1931,22 @@ var DesignSystemListItem = ({
|
|
|
1755
1931
|
"np-option__container-aligned": true
|
|
1756
1932
|
}),
|
|
1757
1933
|
children: /* @__PURE__ */ jsxs8("div", { className: "media", children: [
|
|
1758
|
-
icon || image ? /* @__PURE__ */
|
|
1934
|
+
icon || image || media ? /* @__PURE__ */ jsx36("div", { className: "media-left", children: /* @__PURE__ */ jsx36(
|
|
1759
1935
|
ListItemMedia,
|
|
1760
1936
|
{
|
|
1761
|
-
image,
|
|
1762
1937
|
icon,
|
|
1938
|
+
media,
|
|
1763
1939
|
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
1764
1940
|
}
|
|
1765
1941
|
) }) : null,
|
|
1766
1942
|
/* @__PURE__ */ jsxs8("div", { className: "media-body", children: [
|
|
1767
1943
|
/* @__PURE__ */ jsxs8("div", { className: "d-flex justify-content-between", children: [
|
|
1768
|
-
/* @__PURE__ */
|
|
1769
|
-
/* @__PURE__ */
|
|
1944
|
+
/* @__PURE__ */ jsx36("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: title }),
|
|
1945
|
+
/* @__PURE__ */ jsx36("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: supportingValues == null ? void 0 : supportingValues.value })
|
|
1770
1946
|
] }),
|
|
1771
1947
|
/* @__PURE__ */ jsxs8("div", { className: "d-flex justify-content-between", children: [
|
|
1772
|
-
/* @__PURE__ */
|
|
1773
|
-
/* @__PURE__ */
|
|
1948
|
+
/* @__PURE__ */ jsx36(Body, { className: "d-block np-option__body", children: description }),
|
|
1949
|
+
/* @__PURE__ */ jsx36(Body, { className: "d-block np-option__body", children: supportingValues == null ? void 0 : supportingValues.subvalue })
|
|
1774
1950
|
] })
|
|
1775
1951
|
] })
|
|
1776
1952
|
] })
|
|
@@ -1779,15 +1955,13 @@ var DesignSystemListItem = ({
|
|
|
1779
1955
|
);
|
|
1780
1956
|
var ListItemMedia = ({
|
|
1781
1957
|
icon,
|
|
1782
|
-
|
|
1958
|
+
media,
|
|
1783
1959
|
preferAvatar
|
|
1784
1960
|
}) => {
|
|
1785
1961
|
if (icon) {
|
|
1786
|
-
return /* @__PURE__ */
|
|
1787
|
-
}
|
|
1788
|
-
if (image) {
|
|
1789
|
-
return /* @__PURE__ */ jsx32("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ jsx32(OptionMedia, { icon, image, preferAvatar }) });
|
|
1962
|
+
return /* @__PURE__ */ jsx36("div", { className: "circle circle-sm text-primary circle-inverse", children: /* @__PURE__ */ jsx36(OptionMedia, { media, preferAvatar }) });
|
|
1790
1963
|
}
|
|
1964
|
+
return /* @__PURE__ */ jsx36("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ jsx36(OptionMedia, { media, preferAvatar }) });
|
|
1791
1965
|
};
|
|
1792
1966
|
var getListAction = (callToAction) => {
|
|
1793
1967
|
if (callToAction) {
|
|
@@ -1803,10 +1977,10 @@ var ListRenderer_default = ListRenderer;
|
|
|
1803
1977
|
|
|
1804
1978
|
// ../renderers/src/LoadingIndicatorRenderer.tsx
|
|
1805
1979
|
import { Loader } from "@transferwise/components";
|
|
1806
|
-
import { jsx as
|
|
1980
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1807
1981
|
var LoadingIndicatorRenderer = {
|
|
1808
1982
|
canRenderType: "loading-indicator",
|
|
1809
|
-
render: ({ margin, size }) => /* @__PURE__ */
|
|
1983
|
+
render: ({ margin, size }) => /* @__PURE__ */ jsx37(
|
|
1810
1984
|
Loader,
|
|
1811
1985
|
{
|
|
1812
1986
|
size,
|
|
@@ -1819,28 +1993,28 @@ var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
|
|
|
1819
1993
|
|
|
1820
1994
|
// ../renderers/src/MarkdownRenderer.tsx
|
|
1821
1995
|
import { Markdown as Markdown3 } from "@transferwise/components";
|
|
1822
|
-
import { jsx as
|
|
1996
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
1823
1997
|
var MarkdownRenderer = {
|
|
1824
1998
|
canRenderType: "markdown",
|
|
1825
|
-
render: ({ content, align, margin }) => /* @__PURE__ */
|
|
1999
|
+
render: ({ content, align, margin }) => /* @__PURE__ */ jsx38("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ jsx38(Markdown3, { className: "np-text-body-large", config: { link: { target: "_blank" } }, children: content }) })
|
|
1826
2000
|
};
|
|
1827
2001
|
var MarkdownRenderer_default = MarkdownRenderer;
|
|
1828
2002
|
|
|
1829
2003
|
// ../renderers/src/ModalLayoutRenderer.tsx
|
|
1830
2004
|
import { Button as Button4, Modal as Modal2 } from "@transferwise/components";
|
|
1831
2005
|
import { useState as useState4 } from "react";
|
|
1832
|
-
import { jsx as
|
|
2006
|
+
import { jsx as jsx39, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1833
2007
|
var ModalLayoutRenderer = {
|
|
1834
2008
|
canRenderType: "modal-layout",
|
|
1835
|
-
render: (props) => /* @__PURE__ */
|
|
2009
|
+
render: (props) => /* @__PURE__ */ jsx39(DFModal, __spreadValues({}, props))
|
|
1836
2010
|
};
|
|
1837
2011
|
var ModalLayoutRenderer_default = ModalLayoutRenderer;
|
|
1838
2012
|
function DFModal({ content, margin, trigger }) {
|
|
1839
2013
|
const [visible, setVisible] = useState4(false);
|
|
1840
2014
|
const { children, title } = content;
|
|
1841
2015
|
return /* @__PURE__ */ jsxs9("div", { className: getMargin(margin), children: [
|
|
1842
|
-
/* @__PURE__ */
|
|
1843
|
-
/* @__PURE__ */
|
|
2016
|
+
/* @__PURE__ */ jsx39(Button4, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
|
|
2017
|
+
/* @__PURE__ */ jsx39(
|
|
1844
2018
|
Modal2,
|
|
1845
2019
|
{
|
|
1846
2020
|
scroll: "content",
|
|
@@ -1856,11 +2030,11 @@ function DFModal({ content, margin, trigger }) {
|
|
|
1856
2030
|
|
|
1857
2031
|
// ../renderers/src/ModalRenderer.tsx
|
|
1858
2032
|
import { Modal as Modal3 } from "@transferwise/components";
|
|
1859
|
-
import { jsx as
|
|
2033
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
1860
2034
|
var ModalRenderer = {
|
|
1861
2035
|
canRenderType: "modal",
|
|
1862
2036
|
render: ({ title, children, open, onClose }) => {
|
|
1863
|
-
return /* @__PURE__ */
|
|
2037
|
+
return /* @__PURE__ */ jsx40(Modal3, { open, title, body: children, onClose });
|
|
1864
2038
|
}
|
|
1865
2039
|
};
|
|
1866
2040
|
|
|
@@ -1880,10 +2054,10 @@ var multi_select_messages_default = defineMessages4({
|
|
|
1880
2054
|
});
|
|
1881
2055
|
|
|
1882
2056
|
// ../renderers/src/MultiSelectInputRenderer.tsx
|
|
1883
|
-
import { jsx as
|
|
2057
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
1884
2058
|
var MultiSelectInputRenderer = {
|
|
1885
2059
|
canRenderType: "input-multi-select",
|
|
1886
|
-
render: (props) => /* @__PURE__ */
|
|
2060
|
+
render: (props) => /* @__PURE__ */ jsx41(MultiSelectInputRendererComponent, __spreadValues({}, props))
|
|
1887
2061
|
};
|
|
1888
2062
|
function MultiSelectInputRendererComponent(props) {
|
|
1889
2063
|
const { formatMessage } = useIntl4();
|
|
@@ -1925,12 +2099,12 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
1925
2099
|
const contentProps = {
|
|
1926
2100
|
title: option.title,
|
|
1927
2101
|
description: option.description,
|
|
1928
|
-
icon: /* @__PURE__ */
|
|
2102
|
+
icon: /* @__PURE__ */ jsx41(OptionMedia, { media: option.media, preferAvatar: false })
|
|
1929
2103
|
};
|
|
1930
|
-
return /* @__PURE__ */
|
|
2104
|
+
return /* @__PURE__ */ jsx41(SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
1931
2105
|
};
|
|
1932
2106
|
const extraProps = { autoComplete };
|
|
1933
|
-
return /* @__PURE__ */
|
|
2107
|
+
return /* @__PURE__ */ jsx41(
|
|
1934
2108
|
FieldInput_default,
|
|
1935
2109
|
{
|
|
1936
2110
|
id,
|
|
@@ -1938,7 +2112,7 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
1938
2112
|
help,
|
|
1939
2113
|
description,
|
|
1940
2114
|
validation: validationState,
|
|
1941
|
-
children: /* @__PURE__ */
|
|
2115
|
+
children: /* @__PURE__ */ jsx41(
|
|
1942
2116
|
SelectInput,
|
|
1943
2117
|
__spreadValues({
|
|
1944
2118
|
id,
|
|
@@ -1983,7 +2157,7 @@ import { UploadInput } from "@transferwise/components";
|
|
|
1983
2157
|
// ../renderers/src/components/UploadFieldInput.tsx
|
|
1984
2158
|
import { InlineAlert as InlineAlert2 } from "@transferwise/components";
|
|
1985
2159
|
import classNames4 from "classnames";
|
|
1986
|
-
import { jsx as
|
|
2160
|
+
import { jsx as jsx42, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1987
2161
|
function UploadFieldInput({
|
|
1988
2162
|
id,
|
|
1989
2163
|
children,
|
|
@@ -1992,7 +2166,7 @@ function UploadFieldInput({
|
|
|
1992
2166
|
help,
|
|
1993
2167
|
validation
|
|
1994
2168
|
}) {
|
|
1995
|
-
const labelContent = label && help ? /* @__PURE__ */
|
|
2169
|
+
const labelContent = label && help ? /* @__PURE__ */ jsx42(LabelContentWithHelp, { text: label, help }) : label;
|
|
1996
2170
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
1997
2171
|
return /* @__PURE__ */ jsxs10(
|
|
1998
2172
|
"div",
|
|
@@ -2001,9 +2175,9 @@ function UploadFieldInput({
|
|
|
2001
2175
|
"has-error": (validation == null ? void 0 : validation.status) === "invalid"
|
|
2002
2176
|
}),
|
|
2003
2177
|
children: [
|
|
2004
|
-
/* @__PURE__ */
|
|
2178
|
+
/* @__PURE__ */ jsx42("label", { htmlFor: id, className: "control-label", children: labelContent }),
|
|
2005
2179
|
children,
|
|
2006
|
-
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */
|
|
2180
|
+
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ jsx42(InlineAlert2, { type: "negative", id: descriptionId, children: validation.message })
|
|
2007
2181
|
]
|
|
2008
2182
|
}
|
|
2009
2183
|
);
|
|
@@ -2038,7 +2212,7 @@ var getSizeLimit = (maxSize) => {
|
|
|
2038
2212
|
};
|
|
2039
2213
|
|
|
2040
2214
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
2041
|
-
import { jsx as
|
|
2215
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
2042
2216
|
var MultiUploadInputRenderer = {
|
|
2043
2217
|
canRenderType: "input-upload-multi",
|
|
2044
2218
|
render: (props) => {
|
|
@@ -2063,7 +2237,7 @@ var MultiUploadInputRenderer = {
|
|
|
2063
2237
|
};
|
|
2064
2238
|
const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
|
|
2065
2239
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
2066
|
-
return /* @__PURE__ */
|
|
2240
|
+
return /* @__PURE__ */ jsx43(
|
|
2067
2241
|
UploadFieldInput_default,
|
|
2068
2242
|
{
|
|
2069
2243
|
id,
|
|
@@ -2071,7 +2245,7 @@ var MultiUploadInputRenderer = {
|
|
|
2071
2245
|
description,
|
|
2072
2246
|
validation: validationState,
|
|
2073
2247
|
help,
|
|
2074
|
-
children: /* @__PURE__ */
|
|
2248
|
+
children: /* @__PURE__ */ jsx43(
|
|
2075
2249
|
UploadInput,
|
|
2076
2250
|
{
|
|
2077
2251
|
id,
|
|
@@ -2095,11 +2269,11 @@ var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
|
|
|
2095
2269
|
|
|
2096
2270
|
// ../renderers/src/NumberInputRenderer.tsx
|
|
2097
2271
|
import { Input as Input2, InputGroup as InputGroup2 } from "@transferwise/components";
|
|
2098
|
-
import { jsx as
|
|
2272
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
2099
2273
|
var NumberInputRenderer = {
|
|
2100
2274
|
canRenderType: "input-number",
|
|
2101
2275
|
render: (props) => {
|
|
2102
|
-
const { id, title, description, help,
|
|
2276
|
+
const { id, title, description, help, media, validationState, value, onChange } = props;
|
|
2103
2277
|
const commonProps = pick(
|
|
2104
2278
|
props,
|
|
2105
2279
|
"disabled",
|
|
@@ -2109,7 +2283,7 @@ var NumberInputRenderer = {
|
|
|
2109
2283
|
"maximum",
|
|
2110
2284
|
"minimum"
|
|
2111
2285
|
);
|
|
2112
|
-
return /* @__PURE__ */
|
|
2286
|
+
return /* @__PURE__ */ jsx44(
|
|
2113
2287
|
FieldInput_default,
|
|
2114
2288
|
{
|
|
2115
2289
|
id,
|
|
@@ -2117,7 +2291,7 @@ var NumberInputRenderer = {
|
|
|
2117
2291
|
description,
|
|
2118
2292
|
validation: validationState,
|
|
2119
2293
|
help,
|
|
2120
|
-
children: /* @__PURE__ */
|
|
2294
|
+
children: /* @__PURE__ */ jsx44(InputGroup2, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx44(
|
|
2121
2295
|
Input2,
|
|
2122
2296
|
__spreadValues({
|
|
2123
2297
|
id,
|
|
@@ -2169,17 +2343,17 @@ var paragraph_messages_default = defineMessages5({
|
|
|
2169
2343
|
});
|
|
2170
2344
|
|
|
2171
2345
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
2172
|
-
import { jsx as
|
|
2346
|
+
import { jsx as jsx45, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2173
2347
|
var ParagraphRenderer = {
|
|
2174
2348
|
canRenderType: "paragraph",
|
|
2175
|
-
render: (props) => /* @__PURE__ */
|
|
2349
|
+
render: (props) => /* @__PURE__ */ jsx45(Paragraph, __spreadValues({}, props))
|
|
2176
2350
|
};
|
|
2177
2351
|
function Paragraph({ align, control, margin, text }) {
|
|
2178
2352
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
2179
|
-
return control === "copyable" ? /* @__PURE__ */
|
|
2353
|
+
return control === "copyable" ? /* @__PURE__ */ jsx45(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ jsx45(StandardParagraph, { className, text });
|
|
2180
2354
|
}
|
|
2181
2355
|
function StandardParagraph({ text, className }) {
|
|
2182
|
-
return /* @__PURE__ */
|
|
2356
|
+
return /* @__PURE__ */ jsx45("p", { className: `np-text-body-large ${className}`, children: text });
|
|
2183
2357
|
}
|
|
2184
2358
|
function CopyableParagraph({
|
|
2185
2359
|
text,
|
|
@@ -2194,7 +2368,7 @@ function CopyableParagraph({
|
|
|
2194
2368
|
};
|
|
2195
2369
|
const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
|
|
2196
2370
|
return /* @__PURE__ */ jsxs11("div", { className, children: [
|
|
2197
|
-
/* @__PURE__ */
|
|
2371
|
+
/* @__PURE__ */ jsx45(
|
|
2198
2372
|
Input3,
|
|
2199
2373
|
{
|
|
2200
2374
|
type: "text",
|
|
@@ -2203,7 +2377,7 @@ function CopyableParagraph({
|
|
|
2203
2377
|
className: classNames5("text-ellipsis", inputAlignmentClasses)
|
|
2204
2378
|
}
|
|
2205
2379
|
),
|
|
2206
|
-
/* @__PURE__ */
|
|
2380
|
+
/* @__PURE__ */ jsx45(Button5, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
|
|
2207
2381
|
] });
|
|
2208
2382
|
}
|
|
2209
2383
|
var ParagraphRenderer_default = ParagraphRenderer;
|
|
@@ -2241,10 +2415,10 @@ var repeatable_messages_default = defineMessages6({
|
|
|
2241
2415
|
});
|
|
2242
2416
|
|
|
2243
2417
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
2244
|
-
import { Fragment as Fragment2, jsx as
|
|
2418
|
+
import { Fragment as Fragment2, jsx as jsx46, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2245
2419
|
var RepeatableRenderer = {
|
|
2246
2420
|
canRenderType: "repeatable",
|
|
2247
|
-
render: (props) => /* @__PURE__ */
|
|
2421
|
+
render: (props) => /* @__PURE__ */ jsx46(Repeatable, __spreadValues({}, props))
|
|
2248
2422
|
};
|
|
2249
2423
|
function Repeatable(props) {
|
|
2250
2424
|
const {
|
|
@@ -2284,8 +2458,8 @@ function Repeatable(props) {
|
|
|
2284
2458
|
setOpenModalType(null);
|
|
2285
2459
|
};
|
|
2286
2460
|
return /* @__PURE__ */ jsxs12(Fragment2, { children: [
|
|
2287
|
-
title && /* @__PURE__ */
|
|
2288
|
-
description && /* @__PURE__ */
|
|
2461
|
+
title && /* @__PURE__ */ jsx46(Header5, { title }),
|
|
2462
|
+
description && /* @__PURE__ */ jsx46("p", { children: description }),
|
|
2289
2463
|
/* @__PURE__ */ jsxs12(
|
|
2290
2464
|
"div",
|
|
2291
2465
|
{
|
|
@@ -2293,30 +2467,30 @@ function Repeatable(props) {
|
|
|
2293
2467
|
"has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
|
|
2294
2468
|
}),
|
|
2295
2469
|
children: [
|
|
2296
|
-
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */
|
|
2297
|
-
/* @__PURE__ */
|
|
2470
|
+
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx46(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
|
|
2471
|
+
/* @__PURE__ */ jsx46(
|
|
2298
2472
|
NavigationOption2,
|
|
2299
2473
|
{
|
|
2300
|
-
media: /* @__PURE__ */
|
|
2474
|
+
media: /* @__PURE__ */ jsx46(Plus, {}),
|
|
2301
2475
|
title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2302
2476
|
showMediaAtAllSizes: true,
|
|
2303
2477
|
onClick: () => onAddItem()
|
|
2304
2478
|
}
|
|
2305
2479
|
),
|
|
2306
|
-
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */
|
|
2480
|
+
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx46(InlineAlert3, { type: "negative", children: validationState.message })
|
|
2307
2481
|
]
|
|
2308
2482
|
}
|
|
2309
2483
|
),
|
|
2310
|
-
/* @__PURE__ */
|
|
2484
|
+
/* @__PURE__ */ jsx46(
|
|
2311
2485
|
Modal4,
|
|
2312
2486
|
{
|
|
2313
2487
|
open: openModalType !== null,
|
|
2314
2488
|
title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2315
2489
|
body: /* @__PURE__ */ jsxs12(Fragment2, { children: [
|
|
2316
|
-
/* @__PURE__ */
|
|
2490
|
+
/* @__PURE__ */ jsx46("div", { className: "m-b-2", children: editableItem }),
|
|
2317
2491
|
/* @__PURE__ */ jsxs12("div", { children: [
|
|
2318
|
-
/* @__PURE__ */
|
|
2319
|
-
/* @__PURE__ */
|
|
2492
|
+
/* @__PURE__ */ jsx46(Button6, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
|
|
2493
|
+
/* @__PURE__ */ jsx46(Button6, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
|
|
2320
2494
|
] })
|
|
2321
2495
|
] }),
|
|
2322
2496
|
onClose: () => onCancelEdit()
|
|
@@ -2328,10 +2502,10 @@ function ItemSummaryOption({
|
|
|
2328
2502
|
item,
|
|
2329
2503
|
onClick
|
|
2330
2504
|
}) {
|
|
2331
|
-
return /* @__PURE__ */
|
|
2505
|
+
return /* @__PURE__ */ jsx46(
|
|
2332
2506
|
NavigationOption2,
|
|
2333
2507
|
{
|
|
2334
|
-
media: /* @__PURE__ */
|
|
2508
|
+
media: /* @__PURE__ */ jsx46(OptionMedia, { media: item.media, preferAvatar: false }),
|
|
2335
2509
|
title: item.title,
|
|
2336
2510
|
content: item.description,
|
|
2337
2511
|
showMediaAtAllSizes: true,
|
|
@@ -2366,14 +2540,14 @@ var getHeaderAction = (callToAction) => {
|
|
|
2366
2540
|
};
|
|
2367
2541
|
|
|
2368
2542
|
// ../renderers/src/ReviewRenderer.tsx
|
|
2369
|
-
import { Fragment as Fragment3, jsx as
|
|
2543
|
+
import { Fragment as Fragment3, jsx as jsx47, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2370
2544
|
var ReviewRenderer = {
|
|
2371
2545
|
canRenderType: "review",
|
|
2372
2546
|
render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
|
|
2373
2547
|
const orientation = mapControlToDefinitionListLayout(control);
|
|
2374
2548
|
return /* @__PURE__ */ jsxs13("div", { className: getMargin(margin), children: [
|
|
2375
|
-
(title || callToAction) && /* @__PURE__ */
|
|
2376
|
-
/* @__PURE__ */
|
|
2549
|
+
(title || callToAction) && /* @__PURE__ */ jsx47(Header6, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
|
|
2550
|
+
/* @__PURE__ */ jsx47("div", { className: margin, children: /* @__PURE__ */ jsx47(
|
|
2377
2551
|
DefinitionList,
|
|
2378
2552
|
{
|
|
2379
2553
|
layout: orientation,
|
|
@@ -2413,13 +2587,13 @@ var mapControlToDefinitionListLayout = (control) => {
|
|
|
2413
2587
|
var getFieldValue = (value, help, orientation, onClick) => {
|
|
2414
2588
|
if (help) {
|
|
2415
2589
|
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs13(Fragment3, { children: [
|
|
2416
|
-
/* @__PURE__ */
|
|
2590
|
+
/* @__PURE__ */ jsx47(Help_default, { help, onClick }),
|
|
2417
2591
|
" ",
|
|
2418
2592
|
value
|
|
2419
2593
|
] }) : /* @__PURE__ */ jsxs13(Fragment3, { children: [
|
|
2420
2594
|
value,
|
|
2421
2595
|
" ",
|
|
2422
|
-
/* @__PURE__ */
|
|
2596
|
+
/* @__PURE__ */ jsx47(Help_default, { help, onClick })
|
|
2423
2597
|
] });
|
|
2424
2598
|
}
|
|
2425
2599
|
return value;
|
|
@@ -2465,7 +2639,7 @@ var generic_error_messages_default = defineMessages8({
|
|
|
2465
2639
|
|
|
2466
2640
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
2467
2641
|
import { Button as Button7 } from "@transferwise/components";
|
|
2468
|
-
import { jsx as
|
|
2642
|
+
import { jsx as jsx48, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2469
2643
|
function ErrorResult({ state }) {
|
|
2470
2644
|
const intl = useIntl7();
|
|
2471
2645
|
const buttonVisualProps = {
|
|
@@ -2476,7 +2650,7 @@ function ErrorResult({ state }) {
|
|
|
2476
2650
|
return /* @__PURE__ */ jsxs14("p", { className: "m-t-2", children: [
|
|
2477
2651
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
2478
2652
|
"\xA0",
|
|
2479
|
-
/* @__PURE__ */
|
|
2653
|
+
/* @__PURE__ */ jsx48(
|
|
2480
2654
|
Button7,
|
|
2481
2655
|
__spreadProps(__spreadValues({}, buttonVisualProps), {
|
|
2482
2656
|
onClick: () => {
|
|
@@ -2489,7 +2663,7 @@ function ErrorResult({ state }) {
|
|
|
2489
2663
|
}
|
|
2490
2664
|
|
|
2491
2665
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
2492
|
-
import { Fragment as Fragment4, jsx as
|
|
2666
|
+
import { Fragment as Fragment4, jsx as jsx49, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2493
2667
|
function BlockSearchRendererComponent({
|
|
2494
2668
|
id,
|
|
2495
2669
|
isLoading,
|
|
@@ -2503,7 +2677,7 @@ function BlockSearchRendererComponent({
|
|
|
2503
2677
|
const [hasSearched, setHasSearched] = useState7(false);
|
|
2504
2678
|
const { formatMessage } = useIntl8();
|
|
2505
2679
|
return /* @__PURE__ */ jsxs15("div", { className: getMargin(margin), children: [
|
|
2506
|
-
/* @__PURE__ */
|
|
2680
|
+
/* @__PURE__ */ jsx49(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx49(
|
|
2507
2681
|
Input4,
|
|
2508
2682
|
{
|
|
2509
2683
|
id,
|
|
@@ -2520,7 +2694,7 @@ function BlockSearchRendererComponent({
|
|
|
2520
2694
|
}
|
|
2521
2695
|
}
|
|
2522
2696
|
) }),
|
|
2523
|
-
isLoading ? /* @__PURE__ */
|
|
2697
|
+
isLoading ? /* @__PURE__ */ jsx49(Fragment4, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx49(SearchResultContent, { state, trackEvent })
|
|
2524
2698
|
] });
|
|
2525
2699
|
}
|
|
2526
2700
|
function SearchResultContent({
|
|
@@ -2529,31 +2703,31 @@ function SearchResultContent({
|
|
|
2529
2703
|
}) {
|
|
2530
2704
|
switch (state.type) {
|
|
2531
2705
|
case "error":
|
|
2532
|
-
return /* @__PURE__ */
|
|
2706
|
+
return /* @__PURE__ */ jsx49(ErrorResult, { state });
|
|
2533
2707
|
case "results":
|
|
2534
|
-
return /* @__PURE__ */
|
|
2708
|
+
return /* @__PURE__ */ jsx49(SearchResults, { state, trackEvent });
|
|
2535
2709
|
case "noResults":
|
|
2536
|
-
return /* @__PURE__ */
|
|
2710
|
+
return /* @__PURE__ */ jsx49(EmptySearchResult, { state });
|
|
2537
2711
|
case "pending":
|
|
2538
2712
|
default:
|
|
2539
2713
|
return null;
|
|
2540
2714
|
}
|
|
2541
2715
|
}
|
|
2542
2716
|
function EmptySearchResult({ state }) {
|
|
2543
|
-
return /* @__PURE__ */
|
|
2717
|
+
return /* @__PURE__ */ jsx49(Markdown4, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
2544
2718
|
}
|
|
2545
2719
|
function SearchResults({
|
|
2546
2720
|
state,
|
|
2547
2721
|
trackEvent
|
|
2548
2722
|
}) {
|
|
2549
|
-
return /* @__PURE__ */
|
|
2550
|
-
const {
|
|
2551
|
-
return /* @__PURE__ */
|
|
2723
|
+
return /* @__PURE__ */ jsx49(NavigationOptionsList2, { children: state.results.map((result) => {
|
|
2724
|
+
const { media } = result;
|
|
2725
|
+
return /* @__PURE__ */ jsx49(
|
|
2552
2726
|
NavigationOption3,
|
|
2553
2727
|
{
|
|
2554
2728
|
title: result.title,
|
|
2555
2729
|
content: result.description,
|
|
2556
|
-
media: OptionMedia({
|
|
2730
|
+
media: OptionMedia({ media, preferAvatar: false }),
|
|
2557
2731
|
showMediaCircle: false,
|
|
2558
2732
|
showMediaAtAllSizes: true,
|
|
2559
2733
|
onClick: () => {
|
|
@@ -2574,7 +2748,7 @@ import { Markdown as Markdown5, Typeahead } from "@transferwise/components";
|
|
|
2574
2748
|
import { Search } from "@transferwise/icons";
|
|
2575
2749
|
import { useState as useState8 } from "react";
|
|
2576
2750
|
import { useIntl as useIntl9 } from "react-intl";
|
|
2577
|
-
import { jsx as
|
|
2751
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
2578
2752
|
function InlineSearchRenderer({
|
|
2579
2753
|
id,
|
|
2580
2754
|
isLoading,
|
|
@@ -2586,7 +2760,7 @@ function InlineSearchRenderer({
|
|
|
2586
2760
|
}) {
|
|
2587
2761
|
const [hasSearched, setHasSearched] = useState8(false);
|
|
2588
2762
|
const intl = useIntl9();
|
|
2589
|
-
return /* @__PURE__ */
|
|
2763
|
+
return /* @__PURE__ */ jsx50("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx50(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx50(
|
|
2590
2764
|
Typeahead,
|
|
2591
2765
|
{
|
|
2592
2766
|
id: "typeahead-input-id",
|
|
@@ -2594,10 +2768,10 @@ function InlineSearchRenderer({
|
|
|
2594
2768
|
name: "typeahead-input-name",
|
|
2595
2769
|
size: "md",
|
|
2596
2770
|
maxHeight: 100,
|
|
2597
|
-
footer: /* @__PURE__ */
|
|
2771
|
+
footer: /* @__PURE__ */ jsx50(TypeaheadFooter, { state, isLoading }),
|
|
2598
2772
|
multiple: false,
|
|
2599
2773
|
clearable: false,
|
|
2600
|
-
addon: /* @__PURE__ */
|
|
2774
|
+
addon: /* @__PURE__ */ jsx50(Search, { size: 24 }),
|
|
2601
2775
|
options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
|
|
2602
2776
|
minQueryLength: 1,
|
|
2603
2777
|
onChange: (values) => {
|
|
@@ -2634,34 +2808,34 @@ function mapResultToTypeaheadOption(result) {
|
|
|
2634
2808
|
function TypeaheadFooter({ state, isLoading }) {
|
|
2635
2809
|
const { formatMessage } = useIntl9();
|
|
2636
2810
|
if (state.type === "noResults") {
|
|
2637
|
-
return /* @__PURE__ */
|
|
2811
|
+
return /* @__PURE__ */ jsx50(Markdown5, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
2638
2812
|
}
|
|
2639
2813
|
if (state.type === "error") {
|
|
2640
|
-
return /* @__PURE__ */
|
|
2814
|
+
return /* @__PURE__ */ jsx50("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx50(ErrorResult, { state }) });
|
|
2641
2815
|
}
|
|
2642
2816
|
if (state.type === "pending" || isLoading) {
|
|
2643
|
-
return /* @__PURE__ */
|
|
2817
|
+
return /* @__PURE__ */ jsx50("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
|
|
2644
2818
|
}
|
|
2645
2819
|
return null;
|
|
2646
2820
|
}
|
|
2647
2821
|
var InlineSearchRendererComponent_default = InlineSearchRenderer;
|
|
2648
2822
|
|
|
2649
2823
|
// ../renderers/src/SearchRenderer/SearchRenderer.tsx
|
|
2650
|
-
import { jsx as
|
|
2824
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
2651
2825
|
var SearchRenderer = {
|
|
2652
2826
|
canRenderType: "search",
|
|
2653
|
-
render: (props) => props.control === "inline" ? /* @__PURE__ */
|
|
2827
|
+
render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx51(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx51(BlockSearchRendererComponent_default, __spreadValues({}, props))
|
|
2654
2828
|
};
|
|
2655
2829
|
var SearchRenderer_default = SearchRenderer;
|
|
2656
2830
|
|
|
2657
2831
|
// ../renderers/src/SectionRenderer.tsx
|
|
2658
2832
|
import { Header as Header7 } from "@transferwise/components";
|
|
2659
|
-
import { jsx as
|
|
2833
|
+
import { jsx as jsx52, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2660
2834
|
var SectionRenderer = {
|
|
2661
2835
|
canRenderType: "section",
|
|
2662
2836
|
render: ({ children, callToAction, margin, title }) => {
|
|
2663
2837
|
return /* @__PURE__ */ jsxs16("section", { className: getMargin(margin), children: [
|
|
2664
|
-
(title || callToAction) && /* @__PURE__ */
|
|
2838
|
+
(title || callToAction) && /* @__PURE__ */ jsx52(Header7, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
|
|
2665
2839
|
children
|
|
2666
2840
|
] });
|
|
2667
2841
|
}
|
|
@@ -2670,7 +2844,7 @@ var SectionRenderer_default = SectionRenderer;
|
|
|
2670
2844
|
|
|
2671
2845
|
// ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
2672
2846
|
import { RadioGroup } from "@transferwise/components";
|
|
2673
|
-
import { Fragment as Fragment5, jsx as
|
|
2847
|
+
import { Fragment as Fragment5, jsx as jsx53, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2674
2848
|
function RadioInputRendererComponent(props) {
|
|
2675
2849
|
const {
|
|
2676
2850
|
id,
|
|
@@ -2685,7 +2859,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2685
2859
|
onSelect
|
|
2686
2860
|
} = props;
|
|
2687
2861
|
return /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
2688
|
-
/* @__PURE__ */
|
|
2862
|
+
/* @__PURE__ */ jsx53(
|
|
2689
2863
|
FieldInput_default,
|
|
2690
2864
|
{
|
|
2691
2865
|
id,
|
|
@@ -2693,7 +2867,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2693
2867
|
help,
|
|
2694
2868
|
description,
|
|
2695
2869
|
validation: validationState,
|
|
2696
|
-
children: /* @__PURE__ */
|
|
2870
|
+
children: /* @__PURE__ */ jsx53("span", { children: /* @__PURE__ */ jsx53(
|
|
2697
2871
|
RadioGroup,
|
|
2698
2872
|
{
|
|
2699
2873
|
name: id,
|
|
@@ -2702,7 +2876,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2702
2876
|
value: index,
|
|
2703
2877
|
secondary: option.description,
|
|
2704
2878
|
disabled: option.disabled || disabled,
|
|
2705
|
-
avatar: /* @__PURE__ */
|
|
2879
|
+
avatar: /* @__PURE__ */ jsx53(OptionMedia, { media: option.media, preferAvatar: false })
|
|
2706
2880
|
})),
|
|
2707
2881
|
selectedValue: selectedIndex != null ? selectedIndex : void 0,
|
|
2708
2882
|
onChange: onSelect
|
|
@@ -2718,7 +2892,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2718
2892
|
// ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
2719
2893
|
import { Tabs } from "@transferwise/components";
|
|
2720
2894
|
import { useEffect as useEffect3 } from "react";
|
|
2721
|
-
import { Fragment as Fragment6, jsx as
|
|
2895
|
+
import { Fragment as Fragment6, jsx as jsx54, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2722
2896
|
function TabInputRendererComponent(props) {
|
|
2723
2897
|
const {
|
|
2724
2898
|
id,
|
|
@@ -2738,7 +2912,7 @@ function TabInputRendererComponent(props) {
|
|
|
2738
2912
|
}
|
|
2739
2913
|
}, [selectedIndex, onSelect, options.length]);
|
|
2740
2914
|
return /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
2741
|
-
/* @__PURE__ */
|
|
2915
|
+
/* @__PURE__ */ jsx54(
|
|
2742
2916
|
FieldInput_default,
|
|
2743
2917
|
{
|
|
2744
2918
|
id,
|
|
@@ -2746,7 +2920,7 @@ function TabInputRendererComponent(props) {
|
|
|
2746
2920
|
help,
|
|
2747
2921
|
description,
|
|
2748
2922
|
validation: validationState,
|
|
2749
|
-
children: /* @__PURE__ */
|
|
2923
|
+
children: /* @__PURE__ */ jsx54(
|
|
2750
2924
|
Tabs,
|
|
2751
2925
|
{
|
|
2752
2926
|
name: id,
|
|
@@ -2755,7 +2929,7 @@ function TabInputRendererComponent(props) {
|
|
|
2755
2929
|
title: option.title,
|
|
2756
2930
|
// if we pass null, we get some props-types console errors
|
|
2757
2931
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
2758
|
-
content: /* @__PURE__ */
|
|
2932
|
+
content: /* @__PURE__ */ jsx54(Fragment6, {}),
|
|
2759
2933
|
disabled: option.disabled || disabled
|
|
2760
2934
|
})),
|
|
2761
2935
|
onTabSelect: onSelect
|
|
@@ -2770,7 +2944,7 @@ var isValidIndex = (index, options) => index !== null && index >= 0 && index < o
|
|
|
2770
2944
|
|
|
2771
2945
|
// ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
2772
2946
|
import { SelectInput as SelectInput2, SelectInputOptionContent as SelectInputOptionContent2 } from "@transferwise/components";
|
|
2773
|
-
import { Fragment as Fragment7, jsx as
|
|
2947
|
+
import { Fragment as Fragment7, jsx as jsx55, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2774
2948
|
function SelectInputRendererComponent(props) {
|
|
2775
2949
|
const {
|
|
2776
2950
|
id,
|
|
@@ -2806,17 +2980,17 @@ function SelectInputRendererComponent(props) {
|
|
|
2806
2980
|
const contentProps = withinTrigger ? {
|
|
2807
2981
|
title: option.title,
|
|
2808
2982
|
note: option.description,
|
|
2809
|
-
icon:
|
|
2983
|
+
icon: getInlineMedia(option.media)
|
|
2810
2984
|
} : {
|
|
2811
2985
|
title: option.title,
|
|
2812
2986
|
description: option.description,
|
|
2813
|
-
icon: /* @__PURE__ */
|
|
2987
|
+
icon: /* @__PURE__ */ jsx55(OptionMedia, { media: option.media, preferAvatar: false })
|
|
2814
2988
|
};
|
|
2815
|
-
return /* @__PURE__ */
|
|
2989
|
+
return /* @__PURE__ */ jsx55(SelectInputOptionContent2, __spreadValues({}, contentProps));
|
|
2816
2990
|
};
|
|
2817
2991
|
const extraProps = { autoComplete };
|
|
2818
2992
|
return /* @__PURE__ */ jsxs19(Fragment7, { children: [
|
|
2819
|
-
/* @__PURE__ */
|
|
2993
|
+
/* @__PURE__ */ jsx55(
|
|
2820
2994
|
FieldInput_default,
|
|
2821
2995
|
{
|
|
2822
2996
|
id,
|
|
@@ -2824,7 +2998,7 @@ function SelectInputRendererComponent(props) {
|
|
|
2824
2998
|
help,
|
|
2825
2999
|
description,
|
|
2826
3000
|
validation: validationState,
|
|
2827
|
-
children: /* @__PURE__ */
|
|
3001
|
+
children: /* @__PURE__ */ jsx55(
|
|
2828
3002
|
SelectInput2,
|
|
2829
3003
|
__spreadValues({
|
|
2830
3004
|
name: id,
|
|
@@ -2847,7 +3021,7 @@ function SelectInputRendererComponent(props) {
|
|
|
2847
3021
|
// ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
|
|
2848
3022
|
import { useEffect as useEffect4 } from "react";
|
|
2849
3023
|
import { SegmentedControl } from "@transferwise/components";
|
|
2850
|
-
import { Fragment as Fragment8, jsx as
|
|
3024
|
+
import { Fragment as Fragment8, jsx as jsx56, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2851
3025
|
function SegmentedInputRendererComponent(props) {
|
|
2852
3026
|
const {
|
|
2853
3027
|
id,
|
|
@@ -2866,7 +3040,7 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2866
3040
|
}
|
|
2867
3041
|
}, [selectedIndex, onSelect, options.length]);
|
|
2868
3042
|
return /* @__PURE__ */ jsxs20(Fragment8, { children: [
|
|
2869
|
-
/* @__PURE__ */
|
|
3043
|
+
/* @__PURE__ */ jsx56(
|
|
2870
3044
|
FieldInput_default,
|
|
2871
3045
|
{
|
|
2872
3046
|
id,
|
|
@@ -2874,7 +3048,7 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2874
3048
|
help,
|
|
2875
3049
|
description,
|
|
2876
3050
|
validation: validationState,
|
|
2877
|
-
children: /* @__PURE__ */
|
|
3051
|
+
children: /* @__PURE__ */ jsx56(
|
|
2878
3052
|
SegmentedControl,
|
|
2879
3053
|
{
|
|
2880
3054
|
name: `${id}-segmented-control`,
|
|
@@ -2891,26 +3065,26 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2891
3065
|
)
|
|
2892
3066
|
}
|
|
2893
3067
|
),
|
|
2894
|
-
/* @__PURE__ */
|
|
3068
|
+
/* @__PURE__ */ jsx56("div", { id: `${id}-children`, children })
|
|
2895
3069
|
] });
|
|
2896
3070
|
}
|
|
2897
3071
|
var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
|
|
2898
3072
|
|
|
2899
3073
|
// ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
|
|
2900
|
-
import { jsx as
|
|
3074
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
2901
3075
|
var SelectInputRenderer = {
|
|
2902
3076
|
canRenderType: "input-select",
|
|
2903
3077
|
render: (props) => {
|
|
2904
3078
|
switch (props.control) {
|
|
2905
3079
|
case "radio":
|
|
2906
|
-
return /* @__PURE__ */
|
|
3080
|
+
return /* @__PURE__ */ jsx57(RadioInputRendererComponent, __spreadValues({}, props));
|
|
2907
3081
|
case "tab":
|
|
2908
|
-
return props.options.length > 3 ? /* @__PURE__ */
|
|
3082
|
+
return props.options.length > 3 ? /* @__PURE__ */ jsx57(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx57(TabInputRendererComponent, __spreadValues({}, props));
|
|
2909
3083
|
case "segmented":
|
|
2910
|
-
return props.options.length > 3 ? /* @__PURE__ */
|
|
3084
|
+
return props.options.length > 3 ? /* @__PURE__ */ jsx57(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx57(SegmentedInputRendererComponent, __spreadValues({}, props));
|
|
2911
3085
|
case "select":
|
|
2912
3086
|
default:
|
|
2913
|
-
return /* @__PURE__ */
|
|
3087
|
+
return /* @__PURE__ */ jsx57(SelectInputRendererComponent, __spreadValues({}, props));
|
|
2914
3088
|
}
|
|
2915
3089
|
}
|
|
2916
3090
|
};
|
|
@@ -2918,17 +3092,17 @@ var SelectInputRenderer_default = SelectInputRenderer;
|
|
|
2918
3092
|
|
|
2919
3093
|
// ../renderers/src/StatusListRenderer.tsx
|
|
2920
3094
|
import { Header as Header8, Summary } from "@transferwise/components";
|
|
2921
|
-
import { jsx as
|
|
3095
|
+
import { jsx as jsx58, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2922
3096
|
var StatusListRenderer = {
|
|
2923
3097
|
canRenderType: "status-list",
|
|
2924
3098
|
render: ({ margin, items, title }) => /* @__PURE__ */ jsxs21("div", { className: getMargin(margin), children: [
|
|
2925
|
-
title ? /* @__PURE__ */
|
|
2926
|
-
items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */
|
|
3099
|
+
title ? /* @__PURE__ */ jsx58(Header8, { title, className: "m-b-2" }) : null,
|
|
3100
|
+
items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */ jsx58(
|
|
2927
3101
|
Summary,
|
|
2928
3102
|
{
|
|
2929
3103
|
title: itemTitle,
|
|
2930
3104
|
description,
|
|
2931
|
-
icon: icon && "name" in icon ? /* @__PURE__ */
|
|
3105
|
+
icon: icon && "name" in icon ? /* @__PURE__ */ jsx58(DynamicIcon_default, { name: icon.name }) : null,
|
|
2932
3106
|
status: mapStatus(status),
|
|
2933
3107
|
action: getSummaryAction(callToAction)
|
|
2934
3108
|
},
|
|
@@ -2980,11 +3154,11 @@ var useCustomTheme = (theme, trackEvent) => {
|
|
|
2980
3154
|
};
|
|
2981
3155
|
|
|
2982
3156
|
// ../renderers/src/step/BackButton.tsx
|
|
2983
|
-
import { AvatarView as
|
|
3157
|
+
import { AvatarView as AvatarView5 } from "@transferwise/components";
|
|
2984
3158
|
import { ArrowLeft } from "@transferwise/icons";
|
|
2985
|
-
import { jsx as
|
|
3159
|
+
import { jsx as jsx59, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2986
3160
|
function BackButton({ title, onClick }) {
|
|
2987
|
-
return /* @__PURE__ */
|
|
3161
|
+
return /* @__PURE__ */ jsx59("div", { className: "m-b-2", children: /* @__PURE__ */ jsxs22(
|
|
2988
3162
|
"button",
|
|
2989
3163
|
{
|
|
2990
3164
|
type: "button",
|
|
@@ -2993,8 +3167,8 @@ function BackButton({ title, onClick }) {
|
|
|
2993
3167
|
"aria-label": title,
|
|
2994
3168
|
onClick,
|
|
2995
3169
|
children: [
|
|
2996
|
-
/* @__PURE__ */
|
|
2997
|
-
/* @__PURE__ */
|
|
3170
|
+
/* @__PURE__ */ jsx59("span", { className: "sr-only", children: title }),
|
|
3171
|
+
/* @__PURE__ */ jsx59(AvatarView5, { interactive: true, children: /* @__PURE__ */ jsx59(ArrowLeft, { size: "24" }) })
|
|
2998
3172
|
]
|
|
2999
3173
|
}
|
|
3000
3174
|
) });
|
|
@@ -3002,7 +3176,7 @@ function BackButton({ title, onClick }) {
|
|
|
3002
3176
|
var BackButton_default = BackButton;
|
|
3003
3177
|
|
|
3004
3178
|
// ../renderers/src/step/SplashCelebrationStepRenderer.tsx
|
|
3005
|
-
import { jsx as
|
|
3179
|
+
import { jsx as jsx60, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3006
3180
|
var SplashCelebrationStepRenderer = {
|
|
3007
3181
|
canRenderType: "step",
|
|
3008
3182
|
canRender: ({ control }) => control === "splash-celebration",
|
|
@@ -3012,13 +3186,13 @@ function SplashCelebrationStepRendererComponent(props) {
|
|
|
3012
3186
|
const { back, children, trackEvent } = props;
|
|
3013
3187
|
useCustomTheme("forest-green", trackEvent);
|
|
3014
3188
|
return /* @__PURE__ */ jsxs23("div", { className: "splash-screen m-t-5", children: [
|
|
3015
|
-
back ? /* @__PURE__ */
|
|
3189
|
+
back ? /* @__PURE__ */ jsx60(BackButton_default, __spreadValues({}, back)) : null,
|
|
3016
3190
|
children
|
|
3017
3191
|
] });
|
|
3018
3192
|
}
|
|
3019
3193
|
|
|
3020
3194
|
// ../renderers/src/step/SplashStepRenderer.tsx
|
|
3021
|
-
import { jsx as
|
|
3195
|
+
import { jsx as jsx61, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3022
3196
|
var SplashStepRenderer = {
|
|
3023
3197
|
canRenderType: "step",
|
|
3024
3198
|
canRender: ({ control }) => control === "splash",
|
|
@@ -3027,14 +3201,14 @@ var SplashStepRenderer = {
|
|
|
3027
3201
|
function SplashStepRendererComponent(props) {
|
|
3028
3202
|
const { back, children } = props;
|
|
3029
3203
|
return /* @__PURE__ */ jsxs24("div", { className: "splash-screen m-t-5", children: [
|
|
3030
|
-
back ? /* @__PURE__ */
|
|
3204
|
+
back ? /* @__PURE__ */ jsx61(BackButton_default, __spreadValues({}, back)) : null,
|
|
3031
3205
|
children
|
|
3032
3206
|
] });
|
|
3033
3207
|
}
|
|
3034
3208
|
|
|
3035
3209
|
// ../renderers/src/step/StepRenderer.tsx
|
|
3036
3210
|
import { Alert as Alert2, Title as Title2 } from "@transferwise/components";
|
|
3037
|
-
import { Fragment as Fragment9, jsx as
|
|
3211
|
+
import { Fragment as Fragment9, jsx as jsx62, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3038
3212
|
var StepRenderer = {
|
|
3039
3213
|
canRenderType: "step",
|
|
3040
3214
|
render: StepRendererComponent
|
|
@@ -3042,12 +3216,12 @@ var StepRenderer = {
|
|
|
3042
3216
|
function StepRendererComponent(props) {
|
|
3043
3217
|
const { back, description, error, title, children } = props;
|
|
3044
3218
|
return /* @__PURE__ */ jsxs25(Fragment9, { children: [
|
|
3045
|
-
back ? /* @__PURE__ */
|
|
3219
|
+
back ? /* @__PURE__ */ jsx62(BackButton_default, __spreadValues({}, back)) : null,
|
|
3046
3220
|
title || description ? /* @__PURE__ */ jsxs25("div", { className: "m-b-4", children: [
|
|
3047
|
-
title ? /* @__PURE__ */
|
|
3048
|
-
description ? /* @__PURE__ */
|
|
3221
|
+
title ? /* @__PURE__ */ jsx62(Title2, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
|
|
3222
|
+
description ? /* @__PURE__ */ jsx62("p", { className: "text-xs-center np-text-body-large", children: description }) : void 0
|
|
3049
3223
|
] }) : void 0,
|
|
3050
|
-
error ? /* @__PURE__ */
|
|
3224
|
+
error ? /* @__PURE__ */ jsx62(Alert2, { type: "negative", className: "m-b-2", message: error }) : void 0,
|
|
3051
3225
|
children
|
|
3052
3226
|
] });
|
|
3053
3227
|
}
|
|
@@ -3055,26 +3229,26 @@ function StepRendererComponent(props) {
|
|
|
3055
3229
|
// ../renderers/src/TabsRenderer.tsx
|
|
3056
3230
|
import { Chips, SegmentedControl as SegmentedControl2, Tabs as Tabs2 } from "@transferwise/components";
|
|
3057
3231
|
import { useState as useState9 } from "react";
|
|
3058
|
-
import { jsx as
|
|
3232
|
+
import { jsx as jsx63, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3059
3233
|
var TabsRenderer = {
|
|
3060
3234
|
canRenderType: "tabs",
|
|
3061
3235
|
render: (props) => {
|
|
3062
3236
|
switch (props.control) {
|
|
3063
3237
|
case "segmented":
|
|
3064
3238
|
if (props.tabs.length > 3) {
|
|
3065
|
-
return /* @__PURE__ */
|
|
3239
|
+
return /* @__PURE__ */ jsx63(TabsRendererComponent, __spreadValues({}, props));
|
|
3066
3240
|
}
|
|
3067
|
-
return /* @__PURE__ */
|
|
3241
|
+
return /* @__PURE__ */ jsx63(SegmentedTabsRendererComponent, __spreadValues({}, props));
|
|
3068
3242
|
case "chips":
|
|
3069
|
-
return /* @__PURE__ */
|
|
3243
|
+
return /* @__PURE__ */ jsx63(ChipsTabsRendererComponent, __spreadValues({}, props));
|
|
3070
3244
|
default:
|
|
3071
|
-
return /* @__PURE__ */
|
|
3245
|
+
return /* @__PURE__ */ jsx63(TabsRendererComponent, __spreadValues({}, props));
|
|
3072
3246
|
}
|
|
3073
3247
|
}
|
|
3074
3248
|
};
|
|
3075
3249
|
function TabsRendererComponent({ uid, margin, tabs }) {
|
|
3076
3250
|
const [selectedIndex, setSelectedIndex] = useState9(0);
|
|
3077
|
-
return /* @__PURE__ */
|
|
3251
|
+
return /* @__PURE__ */ jsx63("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx63(
|
|
3078
3252
|
Tabs2,
|
|
3079
3253
|
{
|
|
3080
3254
|
name: uid,
|
|
@@ -3096,7 +3270,7 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
|
3096
3270
|
var _a;
|
|
3097
3271
|
const [selectedIndex, setSelectedIndex] = useState9(0);
|
|
3098
3272
|
return /* @__PURE__ */ jsxs26("div", { className: getMargin(margin), children: [
|
|
3099
|
-
/* @__PURE__ */
|
|
3273
|
+
/* @__PURE__ */ jsx63(
|
|
3100
3274
|
SegmentedControl2,
|
|
3101
3275
|
{
|
|
3102
3276
|
name: uid,
|
|
@@ -3111,14 +3285,14 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
|
3111
3285
|
onChange: (value) => setSelectedIndex(Number(value))
|
|
3112
3286
|
}
|
|
3113
3287
|
),
|
|
3114
|
-
/* @__PURE__ */
|
|
3288
|
+
/* @__PURE__ */ jsx63("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
3115
3289
|
] });
|
|
3116
3290
|
}
|
|
3117
3291
|
function ChipsTabsRendererComponent({ margin, tabs }) {
|
|
3118
3292
|
var _a;
|
|
3119
3293
|
const [selectedIndex, setSelectedIndex] = useState9(0);
|
|
3120
3294
|
return /* @__PURE__ */ jsxs26("div", { className: getMargin(margin), children: [
|
|
3121
|
-
/* @__PURE__ */
|
|
3295
|
+
/* @__PURE__ */ jsx63("div", { className: "chips-container", children: /* @__PURE__ */ jsx63(
|
|
3122
3296
|
Chips,
|
|
3123
3297
|
{
|
|
3124
3298
|
chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
|
|
@@ -3126,7 +3300,7 @@ function ChipsTabsRendererComponent({ margin, tabs }) {
|
|
|
3126
3300
|
onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
|
|
3127
3301
|
}
|
|
3128
3302
|
) }),
|
|
3129
|
-
/* @__PURE__ */
|
|
3303
|
+
/* @__PURE__ */ jsx63("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
3130
3304
|
] });
|
|
3131
3305
|
}
|
|
3132
3306
|
|
|
@@ -3141,7 +3315,7 @@ import {
|
|
|
3141
3315
|
TextArea,
|
|
3142
3316
|
TextareaWithDisplayFormat
|
|
3143
3317
|
} from "@transferwise/components";
|
|
3144
|
-
import { jsx as
|
|
3318
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
3145
3319
|
var commonKeys = [
|
|
3146
3320
|
"autoComplete",
|
|
3147
3321
|
"autoCapitalize",
|
|
@@ -3160,12 +3334,12 @@ function VariableTextInput(inputProps) {
|
|
|
3160
3334
|
const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
|
|
3161
3335
|
switch (control) {
|
|
3162
3336
|
case "email":
|
|
3163
|
-
return /* @__PURE__ */
|
|
3337
|
+
return /* @__PURE__ */ jsx64(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
|
|
3164
3338
|
case "password":
|
|
3165
|
-
return /* @__PURE__ */
|
|
3339
|
+
return /* @__PURE__ */ jsx64(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
|
|
3166
3340
|
case "numeric": {
|
|
3167
3341
|
const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
|
|
3168
|
-
return /* @__PURE__ */
|
|
3342
|
+
return /* @__PURE__ */ jsx64(
|
|
3169
3343
|
TextInput,
|
|
3170
3344
|
__spreadProps(__spreadValues({}, numericProps), {
|
|
3171
3345
|
onChange: (newValue) => {
|
|
@@ -3176,9 +3350,9 @@ function VariableTextInput(inputProps) {
|
|
|
3176
3350
|
);
|
|
3177
3351
|
}
|
|
3178
3352
|
case "phone-number":
|
|
3179
|
-
return /* @__PURE__ */
|
|
3353
|
+
return /* @__PURE__ */ jsx64(PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
|
|
3180
3354
|
default: {
|
|
3181
|
-
return /* @__PURE__ */
|
|
3355
|
+
return /* @__PURE__ */ jsx64(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
|
|
3182
3356
|
}
|
|
3183
3357
|
}
|
|
3184
3358
|
}
|
|
@@ -3186,11 +3360,11 @@ function TextInput(props) {
|
|
|
3186
3360
|
const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
|
|
3187
3361
|
const InputWithPattern = control === "textarea" ? TextareaWithDisplayFormat : InputWithDisplayFormat;
|
|
3188
3362
|
const InputWithoutPattern = control === "textarea" ? TextArea : Input5;
|
|
3189
|
-
return displayFormat ? /* @__PURE__ */
|
|
3363
|
+
return displayFormat ? /* @__PURE__ */ jsx64(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ jsx64(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
|
|
3190
3364
|
}
|
|
3191
3365
|
|
|
3192
3366
|
// ../renderers/src/TextInputRenderer.tsx
|
|
3193
|
-
import { jsx as
|
|
3367
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
3194
3368
|
var TextInputRenderer = {
|
|
3195
3369
|
canRenderType: "input-text",
|
|
3196
3370
|
render: (props) => {
|
|
@@ -3199,8 +3373,7 @@ var TextInputRenderer = {
|
|
|
3199
3373
|
title,
|
|
3200
3374
|
description,
|
|
3201
3375
|
help,
|
|
3202
|
-
|
|
3203
|
-
image,
|
|
3376
|
+
media,
|
|
3204
3377
|
validationState,
|
|
3205
3378
|
value: initialValue,
|
|
3206
3379
|
onChange
|
|
@@ -3209,8 +3382,7 @@ var TextInputRenderer = {
|
|
|
3209
3382
|
"title",
|
|
3210
3383
|
"description",
|
|
3211
3384
|
"help",
|
|
3212
|
-
"
|
|
3213
|
-
"image",
|
|
3385
|
+
"media",
|
|
3214
3386
|
"validationState",
|
|
3215
3387
|
"value",
|
|
3216
3388
|
"onChange"
|
|
@@ -3225,7 +3397,7 @@ var TextInputRenderer = {
|
|
|
3225
3397
|
}
|
|
3226
3398
|
}
|
|
3227
3399
|
});
|
|
3228
|
-
return /* @__PURE__ */
|
|
3400
|
+
return /* @__PURE__ */ jsx65(
|
|
3229
3401
|
FieldInput_default,
|
|
3230
3402
|
{
|
|
3231
3403
|
id,
|
|
@@ -3233,7 +3405,7 @@ var TextInputRenderer = {
|
|
|
3233
3405
|
description,
|
|
3234
3406
|
validation: validationState,
|
|
3235
3407
|
help,
|
|
3236
|
-
children: /* @__PURE__ */
|
|
3408
|
+
children: /* @__PURE__ */ jsx65(InputGroup3, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx65(VariableTextInput, __spreadValues({}, inputProps)) })
|
|
3237
3409
|
}
|
|
3238
3410
|
);
|
|
3239
3411
|
}
|
|
@@ -3247,7 +3419,7 @@ import { Upload, UploadInput as UploadInput2 } from "@transferwise/components";
|
|
|
3247
3419
|
var getRandomId = () => Math.random().toString(36).substring(2);
|
|
3248
3420
|
|
|
3249
3421
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
3250
|
-
import { jsx as
|
|
3422
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
3251
3423
|
var UploadInputRenderer = {
|
|
3252
3424
|
canRenderType: "input-upload",
|
|
3253
3425
|
render: (props) => {
|
|
@@ -3263,14 +3435,14 @@ var UploadInputRenderer = {
|
|
|
3263
3435
|
};
|
|
3264
3436
|
return (
|
|
3265
3437
|
// We don't pass help here as there is no sensible place to display it
|
|
3266
|
-
/* @__PURE__ */
|
|
3438
|
+
/* @__PURE__ */ jsx66(
|
|
3267
3439
|
UploadFieldInput_default,
|
|
3268
3440
|
{
|
|
3269
3441
|
id,
|
|
3270
3442
|
label: void 0,
|
|
3271
3443
|
description: void 0,
|
|
3272
3444
|
validation: validationState,
|
|
3273
|
-
children: /* @__PURE__ */
|
|
3445
|
+
children: /* @__PURE__ */ jsx66(
|
|
3274
3446
|
UploadInput2,
|
|
3275
3447
|
{
|
|
3276
3448
|
id,
|
|
@@ -3329,7 +3501,7 @@ var LargeUploadRenderer = {
|
|
|
3329
3501
|
};
|
|
3330
3502
|
const filetypes = acceptsToFileTypes(accepts);
|
|
3331
3503
|
const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
|
|
3332
|
-
return /* @__PURE__ */
|
|
3504
|
+
return /* @__PURE__ */ jsx66(
|
|
3333
3505
|
FieldInput_default,
|
|
3334
3506
|
{
|
|
3335
3507
|
id,
|
|
@@ -3337,7 +3509,7 @@ var LargeUploadRenderer = {
|
|
|
3337
3509
|
description,
|
|
3338
3510
|
validation: validationState,
|
|
3339
3511
|
help,
|
|
3340
|
-
children: /* @__PURE__ */
|
|
3512
|
+
children: /* @__PURE__ */ jsx66(
|
|
3341
3513
|
Upload,
|
|
3342
3514
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
3343
3515
|
usAccept,
|
|
@@ -3352,8 +3524,183 @@ var LargeUploadRenderer = {
|
|
|
3352
3524
|
}
|
|
3353
3525
|
};
|
|
3354
3526
|
|
|
3527
|
+
// ../renderers/src/NewListItem/NewDecisionRenderer.tsx
|
|
3528
|
+
import { Header as Header9, ListItem as ListItem2 } from "@transferwise/components";
|
|
3529
|
+
|
|
3530
|
+
// ../renderers/src/NewListItem/getInlineAlert.tsx
|
|
3531
|
+
import { ListItem } from "@transferwise/components";
|
|
3532
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
3533
|
+
var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */ jsx67(ListItem.Prompt, { sentiment: inlineAlert == null ? void 0 : inlineAlert.context, children: inlineAlert.content }) : void 0;
|
|
3534
|
+
|
|
3535
|
+
// ../renderers/src/NewListItem/NewDecisionRenderer.tsx
|
|
3536
|
+
import { jsx as jsx68, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3537
|
+
var DecisionRenderer2 = {
|
|
3538
|
+
canRenderType: "decision",
|
|
3539
|
+
render: ({ control, margin, options, title }) => /* @__PURE__ */ jsxs27("div", { className: getMargin(margin), children: [
|
|
3540
|
+
title && /* @__PURE__ */ jsx68(Header9, { as: "h2", title }),
|
|
3541
|
+
options.map((option) => {
|
|
3542
|
+
const {
|
|
3543
|
+
description,
|
|
3544
|
+
disabled,
|
|
3545
|
+
media,
|
|
3546
|
+
title: itemTitle,
|
|
3547
|
+
tag,
|
|
3548
|
+
href,
|
|
3549
|
+
additionalText,
|
|
3550
|
+
inlineAlert,
|
|
3551
|
+
supportingValues,
|
|
3552
|
+
onClick
|
|
3553
|
+
} = option;
|
|
3554
|
+
return /* @__PURE__ */ jsx68(
|
|
3555
|
+
ListItem2,
|
|
3556
|
+
{
|
|
3557
|
+
title: itemTitle,
|
|
3558
|
+
subtitle: description,
|
|
3559
|
+
spotlight: control === "spotlight" ? tag === "spotlight-active" ? "active" : "inactive" : void 0,
|
|
3560
|
+
disabled,
|
|
3561
|
+
valueTitle: supportingValues == null ? void 0 : supportingValues.value,
|
|
3562
|
+
valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
|
|
3563
|
+
media: media ? /* @__PURE__ */ jsx68(
|
|
3564
|
+
OptionMedia,
|
|
3565
|
+
{
|
|
3566
|
+
media,
|
|
3567
|
+
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
3568
|
+
}
|
|
3569
|
+
) : void 0,
|
|
3570
|
+
prompt: getInlineAlert(inlineAlert),
|
|
3571
|
+
additionalInfo: additionalText ? /* @__PURE__ */ jsx68(ListItem2.AdditionalInfo, { children: additionalText }) : void 0,
|
|
3572
|
+
control: href ? /* @__PURE__ */ jsx68(ListItem2.Navigation, { href, target: "_blank" }) : /* @__PURE__ */ jsx68(ListItem2.Navigation, { onClick })
|
|
3573
|
+
},
|
|
3574
|
+
JSON.stringify(option)
|
|
3575
|
+
);
|
|
3576
|
+
})
|
|
3577
|
+
] })
|
|
3578
|
+
};
|
|
3579
|
+
var NewDecisionRenderer_default = DecisionRenderer2;
|
|
3580
|
+
|
|
3581
|
+
// ../renderers/src/NewListItem/NewListRenderer.tsx
|
|
3582
|
+
import { Header as Header10, ListItem as ListItem4 } from "@transferwise/components";
|
|
3583
|
+
|
|
3584
|
+
// ../renderers/src/NewListItem/getAdditionalInfo.tsx
|
|
3585
|
+
import { ListItem as ListItem3 } from "@transferwise/components";
|
|
3586
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
3587
|
+
var getAdditionalInfo = (additionalInfo) => {
|
|
3588
|
+
var _a;
|
|
3589
|
+
return additionalInfo ? (
|
|
3590
|
+
// TODO: this type should have an href so we can render anchors
|
|
3591
|
+
additionalInfo.onClick ? /* @__PURE__ */ jsx69(
|
|
3592
|
+
ListItem3.AdditionalInfo,
|
|
3593
|
+
{
|
|
3594
|
+
action: {
|
|
3595
|
+
onClick: additionalInfo.onClick,
|
|
3596
|
+
label: (_a = additionalInfo.text) != null ? _a : ""
|
|
3597
|
+
}
|
|
3598
|
+
}
|
|
3599
|
+
) : /* @__PURE__ */ jsx69(ListItem3.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text })
|
|
3600
|
+
) : void 0;
|
|
3601
|
+
};
|
|
3602
|
+
|
|
3603
|
+
// ../renderers/src/NewListItem/NewListRenderer.tsx
|
|
3604
|
+
import { jsx as jsx70, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3605
|
+
var ListRenderer2 = {
|
|
3606
|
+
canRenderType: "list",
|
|
3607
|
+
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ jsxs28("div", { className: getMargin(margin), children: [
|
|
3608
|
+
(title || callToAction) && /* @__PURE__ */ jsx70(Header10, { as: "h2", title: title != null ? title : "", action: getListAction2(callToAction) }),
|
|
3609
|
+
items.map(
|
|
3610
|
+
({
|
|
3611
|
+
title: itemTitle,
|
|
3612
|
+
description,
|
|
3613
|
+
supportingValues,
|
|
3614
|
+
media,
|
|
3615
|
+
tag,
|
|
3616
|
+
additionalInfo,
|
|
3617
|
+
inlineAlert
|
|
3618
|
+
}) => /* @__PURE__ */ jsx70(
|
|
3619
|
+
ListItem4,
|
|
3620
|
+
{
|
|
3621
|
+
title: itemTitle,
|
|
3622
|
+
subtitle: description,
|
|
3623
|
+
valueTitle: supportingValues == null ? void 0 : supportingValues.value,
|
|
3624
|
+
valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
|
|
3625
|
+
media: media ? /* @__PURE__ */ jsx70(
|
|
3626
|
+
OptionMedia,
|
|
3627
|
+
{
|
|
3628
|
+
media,
|
|
3629
|
+
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
3630
|
+
}
|
|
3631
|
+
) : void 0,
|
|
3632
|
+
prompt: getInlineAlert(inlineAlert),
|
|
3633
|
+
additionalInfo: getAdditionalInfo(additionalInfo)
|
|
3634
|
+
},
|
|
3635
|
+
itemTitle
|
|
3636
|
+
)
|
|
3637
|
+
)
|
|
3638
|
+
] })
|
|
3639
|
+
};
|
|
3640
|
+
var getListAction2 = (callToAction) => {
|
|
3641
|
+
if (callToAction) {
|
|
3642
|
+
return __spreadValues({
|
|
3643
|
+
"aria-label": callToAction.accessibilityDescription,
|
|
3644
|
+
text: callToAction.title,
|
|
3645
|
+
onClick: callToAction.onClick
|
|
3646
|
+
}, callToAction.type === "link" ? { href: callToAction.href, target: "_blank" } : {});
|
|
3647
|
+
}
|
|
3648
|
+
return void 0;
|
|
3649
|
+
};
|
|
3650
|
+
var NewListRenderer_default = ListRenderer2;
|
|
3651
|
+
|
|
3652
|
+
// ../renderers/src/NewListItem/NewReviewRenderer.tsx
|
|
3653
|
+
import { Header as Header11, ListItem as ListItem5 } from "@transferwise/components";
|
|
3654
|
+
import { jsx as jsx71, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3655
|
+
var ReviewRenderer2 = {
|
|
3656
|
+
canRenderType: "review",
|
|
3657
|
+
render: ({ callToAction, control, margin, fields, title }) => /* @__PURE__ */ jsxs29("div", { className: getMargin(margin), children: [
|
|
3658
|
+
(title || callToAction) && /* @__PURE__ */ jsx71(Header11, { as: "h2", title: title != null ? title : "", action: getHeaderAction(callToAction) }),
|
|
3659
|
+
fields.map(({ label, value, media, tag, additionalInfo, inlineAlert, callToAction: callToAction2 }) => /* @__PURE__ */ jsx71(
|
|
3660
|
+
ListItem5,
|
|
3661
|
+
{
|
|
3662
|
+
title: value,
|
|
3663
|
+
subtitle: label,
|
|
3664
|
+
inverted: true,
|
|
3665
|
+
media: media ? /* @__PURE__ */ jsx71(
|
|
3666
|
+
OptionMedia,
|
|
3667
|
+
{
|
|
3668
|
+
media,
|
|
3669
|
+
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
3670
|
+
}
|
|
3671
|
+
) : void 0,
|
|
3672
|
+
control: getControl(callToAction2),
|
|
3673
|
+
prompt: getInlineAlert(inlineAlert),
|
|
3674
|
+
additionalInfo: getAdditionalInfo(additionalInfo)
|
|
3675
|
+
},
|
|
3676
|
+
label
|
|
3677
|
+
))
|
|
3678
|
+
] })
|
|
3679
|
+
};
|
|
3680
|
+
var getControl = (callToAction) => {
|
|
3681
|
+
if (!callToAction) {
|
|
3682
|
+
return void 0;
|
|
3683
|
+
}
|
|
3684
|
+
const { accessibilityDescription, href, title, onClick } = callToAction;
|
|
3685
|
+
if (href) {
|
|
3686
|
+
return /* @__PURE__ */ jsx71(ListItem5.Button, { href, partiallyInteractive: true, "aria-description": accessibilityDescription, children: title });
|
|
3687
|
+
}
|
|
3688
|
+
return /* @__PURE__ */ jsx71(
|
|
3689
|
+
ListItem5.Button,
|
|
3690
|
+
{
|
|
3691
|
+
onClick,
|
|
3692
|
+
partiallyInteractive: true,
|
|
3693
|
+
"aria-description": accessibilityDescription,
|
|
3694
|
+
children: title
|
|
3695
|
+
}
|
|
3696
|
+
);
|
|
3697
|
+
};
|
|
3698
|
+
var NewReviewRenderer_default = ReviewRenderer2;
|
|
3699
|
+
|
|
3355
3700
|
// ../renderers/src/getWiseRenderers.ts
|
|
3356
|
-
var
|
|
3701
|
+
var internalRenderers = [NewDecisionRenderer_default, NewListRenderer_default, NewReviewRenderer_default];
|
|
3702
|
+
var getWiseRenderers = (internal = false) => [
|
|
3703
|
+
...internal ? internalRenderers : [],
|
|
3357
3704
|
AddressValidationButtonRenderer_default,
|
|
3358
3705
|
AlertRenderer_default,
|
|
3359
3706
|
CheckboxInputRenderer_default,
|
|
@@ -3397,7 +3744,7 @@ var getWiseRenderers = () => [
|
|
|
3397
3744
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
3398
3745
|
var appVersion = (
|
|
3399
3746
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
3400
|
-
typeof process !== "undefined" ? "4.20.
|
|
3747
|
+
typeof process !== "undefined" ? "4.20.3" : "0.0.0"
|
|
3401
3748
|
);
|
|
3402
3749
|
|
|
3403
3750
|
// src/dynamicFlow/telemetry/getLogEvent.ts
|
|
@@ -3452,12 +3799,12 @@ var messages_default = defineMessages9({
|
|
|
3452
3799
|
});
|
|
3453
3800
|
|
|
3454
3801
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
3455
|
-
import { jsx as
|
|
3802
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
3456
3803
|
var wiseRenderers = getWiseRenderers();
|
|
3457
3804
|
function DynamicFlowLegacy(props) {
|
|
3458
3805
|
const { customFetch = globalThis.fetch } = props;
|
|
3459
3806
|
const coreProps = __spreadProps(__spreadValues({}, props), { httpClient: customFetch });
|
|
3460
|
-
return /* @__PURE__ */
|
|
3807
|
+
return /* @__PURE__ */ jsx72(DynamicFlowCoreLegacy, __spreadValues({}, coreProps));
|
|
3461
3808
|
}
|
|
3462
3809
|
function DynamicFlowRevamp(props) {
|
|
3463
3810
|
const {
|
|
@@ -3494,7 +3841,7 @@ function DynamicFlowRevamp(props) {
|
|
|
3494
3841
|
onLink,
|
|
3495
3842
|
onCopy
|
|
3496
3843
|
});
|
|
3497
|
-
return /* @__PURE__ */
|
|
3844
|
+
return /* @__PURE__ */ jsx72("div", { className, children: /* @__PURE__ */ jsx72(DynamicFlowCoreRevamp, __spreadValues({}, coreProps)) });
|
|
3498
3845
|
}
|
|
3499
3846
|
var DynamicForm = forwardRef(function DynamicForm2(props, ref) {
|
|
3500
3847
|
const {
|
|
@@ -3531,7 +3878,7 @@ var DynamicForm = forwardRef(function DynamicForm2(props, ref) {
|
|
|
3531
3878
|
onLink,
|
|
3532
3879
|
onCopy
|
|
3533
3880
|
});
|
|
3534
|
-
return /* @__PURE__ */
|
|
3881
|
+
return /* @__PURE__ */ jsx72("div", { className, children: /* @__PURE__ */ jsx72(DynamicFormCore, __spreadProps(__spreadValues({}, coreProps), { ref })) });
|
|
3535
3882
|
});
|
|
3536
3883
|
var useWiseHttpClient = (httpClient) => {
|
|
3537
3884
|
const { locale } = useIntl10();
|