@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.js
CHANGED
|
@@ -75,6 +75,44 @@ var import_dynamic_flow_client4 = require("@wise/dynamic-flow-client");
|
|
|
75
75
|
// src/i18n/index.ts
|
|
76
76
|
var import_dynamic_flow_client = require("@wise/dynamic-flow-client");
|
|
77
77
|
|
|
78
|
+
// src/i18n/cs.json
|
|
79
|
+
var cs_default = {
|
|
80
|
+
"df.wise.ArraySchema.addItem": "Ulo\u017Eit",
|
|
81
|
+
"df.wise.ArraySchema.addItemTitle": "P\u0159idat polo\u017Eku",
|
|
82
|
+
"df.wise.ArraySchema.editItem": "Ulo\u017Eit",
|
|
83
|
+
"df.wise.ArraySchema.maxItemsError": "P\u0159idejte {maxItems} nebo m\xE9n\u011B.",
|
|
84
|
+
"df.wise.ArraySchema.minItemsError": "P\u0159idejte alespo\u0148 {minItems}.",
|
|
85
|
+
"df.wise.ArraySchema.removeItem": "Odebrat",
|
|
86
|
+
"df.wise.ButtonLayout.buttonLoadingMessage": "This might take a few seconds",
|
|
87
|
+
"df.wise.ControlFeedback.maxLength": "Zadejte {maxLength} nebo m\xE9n\u011B znak\u016F.",
|
|
88
|
+
"df.wise.ControlFeedback.maximum": "Zadejte \u010D\xEDslo, kter\xE9 je {maximum} nebo men\u0161\xED.",
|
|
89
|
+
"df.wise.ControlFeedback.maximumDate": "Zadejte datum, kter\xE9 je {maximum} nebo p\u0159edt\xEDm.",
|
|
90
|
+
"df.wise.ControlFeedback.minLength": "Zadejte alespo\u0148 n\xE1sleduj\xEDc\xED po\u010Det znak\u016F: {minLength}.",
|
|
91
|
+
"df.wise.ControlFeedback.minimum": "Zadejte \u010D\xEDslo, kter\xE9 je {minimum} nebo vy\u0161\u0161\xED.",
|
|
92
|
+
"df.wise.ControlFeedback.minimumDate": "Zadejte datum, kter\xE9 je {minimum} nebo potom.",
|
|
93
|
+
"df.wise.ControlFeedback.pattern": "Zadejte to pros\xEDm ve spr\xE1vn\xE9m form\xE1tu.",
|
|
94
|
+
"df.wise.ControlFeedback.patternDate": "Zadejte pros\xEDm datum ve spr\xE1vn\xE9m form\xE1tu.",
|
|
95
|
+
"df.wise.ControlFeedback.required": "Vypl\u0148te pros\xEDm toto pole.",
|
|
96
|
+
"df.wise.ControlFeedback.type": "Nespr\xE1vn\xFD typ",
|
|
97
|
+
"df.wise.CopyFeedback.copy": "Zkop\xEDrov\xE1no do schr\xE1nky",
|
|
98
|
+
"df.wise.CopyFeedback.copyFailed": "Kop\xEDrov\xE1n\xED do schr\xE1nky se nezda\u0159ilo",
|
|
99
|
+
"df.wise.DynamicParagraph.copied": "Zkop\xEDrov\xE1no do schr\xE1nky",
|
|
100
|
+
"df.wise.DynamicParagraph.copy": "Kop\xEDrovat",
|
|
101
|
+
"df.wise.ErrorBoundary.errorAlert": "N\u011Bco se pokazilo.",
|
|
102
|
+
"df.wise.ErrorBoundary.retry": "Zkusit znovu",
|
|
103
|
+
"df.wise.ExternalConfirmation.cancel": "Zru\u0161it",
|
|
104
|
+
"df.wise.ExternalConfirmation.description": "Potvr\u010Fte, \u017Ee chcete otev\u0159\xEDt **{origin}** v nov\xE9 kart\u011B prohl\xED\u017Ee\u010De.",
|
|
105
|
+
"df.wise.ExternalConfirmation.open": "Otev\u0159\xEDt v nov\xE9 kart\u011B",
|
|
106
|
+
"df.wise.ExternalConfirmation.title": "Potvr\u010Fte",
|
|
107
|
+
"df.wise.Help.ariaLabel": "Pro v\xEDce informac\xED klikn\u011Bte sem.",
|
|
108
|
+
"df.wise.MultiSelect.summary": "{first} a {count} dal\u0161\xED(ch)",
|
|
109
|
+
"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.",
|
|
110
|
+
"df.wise.MultipleFileUploadSchema.maxItemsError": "Nahrajte {maxItems} nebo m\xE9n\u011B soubor\u016F.",
|
|
111
|
+
"df.wise.MultipleFileUploadSchema.minItemsError": "Nahrajte pros\xEDm alespo\u0148 n\xE1sleduj\xEDc\xED po\u010Det soubor\u016F: {minItems}.",
|
|
112
|
+
"df.wise.PersistAsyncSchema.genericError": "N\u011Bco se pokazilo. Zkuste to pros\xEDm znovu.",
|
|
113
|
+
"df.wise.SearchLayout.loading": "Na\u010D\xEDt\xE1n\xED..."
|
|
114
|
+
};
|
|
115
|
+
|
|
78
116
|
// src/i18n/de.json
|
|
79
117
|
var de_default = {
|
|
80
118
|
"df.wise.ArraySchema.addItem": "Speichern",
|
|
@@ -197,7 +235,7 @@ var fr_default = {
|
|
|
197
235
|
"df.wise.ArraySchema.maxItemsError": "Veuillez ajouter {maxItems} ou moins.",
|
|
198
236
|
"df.wise.ArraySchema.minItemsError": "Veuillez ajouter au moins {minItems}.",
|
|
199
237
|
"df.wise.ArraySchema.removeItem": "Supprimer",
|
|
200
|
-
"df.wise.ButtonLayout.buttonLoadingMessage": "
|
|
238
|
+
"df.wise.ButtonLayout.buttonLoadingMessage": "Patientez quelques secondes",
|
|
201
239
|
"df.wise.ControlFeedback.maxLength": "Veuillez saisir {maxLength} caract\xE8res ou moins.",
|
|
202
240
|
"df.wise.ControlFeedback.maximum": "Veuillez saisir un nombre inf\xE9rieur ou \xE9gal \xE0 {maximum}.",
|
|
203
241
|
"df.wise.ControlFeedback.maximumDate": "Veuillez saisir une date \xE9gale ou ant\xE9rieure au {maximum}.",
|
|
@@ -349,7 +387,7 @@ var ja_default = {
|
|
|
349
387
|
"df.wise.ArraySchema.maxItemsError": "{maxItems}\u30A2\u30A4\u30C6\u30E0\u4EE5\u4E0B\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
350
388
|
"df.wise.ArraySchema.minItemsError": "{minItems}\u30A2\u30A4\u30C6\u30E0\u4EE5\u4E0A\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
351
389
|
"df.wise.ArraySchema.removeItem": "\u524A\u9664\u3059\u308B",
|
|
352
|
-
"df.wise.ButtonLayout.buttonLoadingMessage": "
|
|
390
|
+
"df.wise.ButtonLayout.buttonLoadingMessage": "\u6570\u79D2\u304B\u304B\u308B\u5834\u5408\u304C\u3042\u308A\u307E\u3059",
|
|
353
391
|
"df.wise.ControlFeedback.maxLength": "{maxLength}\u6587\u5B57\u4EE5\u4E0B\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
354
392
|
"df.wise.ControlFeedback.maximum": "{maximum}\u4EE5\u4E0B\u306E\u6570\u5B57\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
355
393
|
"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",
|
|
@@ -379,6 +417,44 @@ var ja_default = {
|
|
|
379
417
|
"df.wise.SearchLayout.loading": "\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026"
|
|
380
418
|
};
|
|
381
419
|
|
|
420
|
+
// src/i18n/nl.json
|
|
421
|
+
var nl_default = {
|
|
422
|
+
"df.wise.ArraySchema.addItem": "Opslaan",
|
|
423
|
+
"df.wise.ArraySchema.addItemTitle": "Item toevoegen",
|
|
424
|
+
"df.wise.ArraySchema.editItem": "Opslaan",
|
|
425
|
+
"df.wise.ArraySchema.maxItemsError": "Voeg {maxItems} of minder toe.",
|
|
426
|
+
"df.wise.ArraySchema.minItemsError": "Voeg minimaal {minItems} toe.",
|
|
427
|
+
"df.wise.ArraySchema.removeItem": "Verwijderen",
|
|
428
|
+
"df.wise.ButtonLayout.buttonLoadingMessage": "This might take a few seconds",
|
|
429
|
+
"df.wise.ControlFeedback.maxLength": "Voer {maxLength} of minder tekens in.",
|
|
430
|
+
"df.wise.ControlFeedback.maximum": "Voer een getal in dat {maximum} of lager is.",
|
|
431
|
+
"df.wise.ControlFeedback.maximumDate": "Voer een datum in die op of voor {maximum} is.",
|
|
432
|
+
"df.wise.ControlFeedback.minLength": "Voer minimaal {minLength} tekens in.",
|
|
433
|
+
"df.wise.ControlFeedback.minimum": "Voer een getal in dat {minimum} of hoger is.",
|
|
434
|
+
"df.wise.ControlFeedback.minimumDate": "Voer een datum in die op of na {minimum} is.",
|
|
435
|
+
"df.wise.ControlFeedback.pattern": "Voer dit in de juiste indeling in.",
|
|
436
|
+
"df.wise.ControlFeedback.patternDate": "Voer een datum in de juiste indeling in.",
|
|
437
|
+
"df.wise.ControlFeedback.required": "Vul dit veld in.",
|
|
438
|
+
"df.wise.ControlFeedback.type": "Onjuist type",
|
|
439
|
+
"df.wise.CopyFeedback.copy": "Naar klembord gekopieerd",
|
|
440
|
+
"df.wise.CopyFeedback.copyFailed": "Naar klembord kopi\xEBren mislukt",
|
|
441
|
+
"df.wise.DynamicParagraph.copied": "Naar klembord gekopieerd",
|
|
442
|
+
"df.wise.DynamicParagraph.copy": "Kopi\xEBren",
|
|
443
|
+
"df.wise.ErrorBoundary.errorAlert": "Er is iets misgegaan.",
|
|
444
|
+
"df.wise.ErrorBoundary.retry": "Opnieuw proberen",
|
|
445
|
+
"df.wise.ExternalConfirmation.cancel": "Annuleren",
|
|
446
|
+
"df.wise.ExternalConfirmation.description": "Bevestig dat je **{origin}** in een nieuw browsertabblad wilt openen.",
|
|
447
|
+
"df.wise.ExternalConfirmation.open": "In nieuw tabblad openen",
|
|
448
|
+
"df.wise.ExternalConfirmation.title": "Bevestigen",
|
|
449
|
+
"df.wise.Help.ariaLabel": "Klik hier voor meer informatie.",
|
|
450
|
+
"df.wise.MultiSelect.summary": "{first} en nog {count}",
|
|
451
|
+
"df.wise.MultipleFileUploadSchema.maxFileSizeError": "Het bestand is te groot. Upload een kleiner bestand.",
|
|
452
|
+
"df.wise.MultipleFileUploadSchema.maxItemsError": "Upload {maxItems} of minder bestanden.",
|
|
453
|
+
"df.wise.MultipleFileUploadSchema.minItemsError": "Upload minimaal {minItems} bestand(en).",
|
|
454
|
+
"df.wise.PersistAsyncSchema.genericError": "Er is iets misgegaan, probeer het opnieuw.",
|
|
455
|
+
"df.wise.SearchLayout.loading": "Laden..."
|
|
456
|
+
};
|
|
457
|
+
|
|
382
458
|
// src/i18n/pl.json
|
|
383
459
|
var pl_default = {
|
|
384
460
|
"df.wise.ArraySchema.addItem": "Zapisz",
|
|
@@ -425,7 +501,7 @@ var pt_default = {
|
|
|
425
501
|
"df.wise.ArraySchema.maxItemsError": "Adicione {maxItems} ou menos.",
|
|
426
502
|
"df.wise.ArraySchema.minItemsError": "Adicione pelo menos {minItems}.",
|
|
427
503
|
"df.wise.ArraySchema.removeItem": "Remover",
|
|
428
|
-
"df.wise.ButtonLayout.buttonLoadingMessage": "
|
|
504
|
+
"df.wise.ButtonLayout.buttonLoadingMessage": "Isso pode levar alguns segundos",
|
|
429
505
|
"df.wise.ControlFeedback.maxLength": "Por favor, insira {maxLength} caracteres ou menos.",
|
|
430
506
|
"df.wise.ControlFeedback.maximum": "Por favor, insira um n\xFAmero que seja {maximum} ou menos.",
|
|
431
507
|
"df.wise.ControlFeedback.maximumDate": "Por favor, insira uma data que seja em ou antes de {maximum}.",
|
|
@@ -463,7 +539,7 @@ var ro_default = {
|
|
|
463
539
|
"df.wise.ArraySchema.maxItemsError": "Te rug\u0103m s\u0103 adaugi {maxItems} sau mai pu\u021Bine.",
|
|
464
540
|
"df.wise.ArraySchema.minItemsError": "Te rug\u0103m s\u0103 adaugi cel pu\u021Bin {minItems}.",
|
|
465
541
|
"df.wise.ArraySchema.removeItem": "Elimin\u0103",
|
|
466
|
-
"df.wise.ButtonLayout.buttonLoadingMessage": "
|
|
542
|
+
"df.wise.ButtonLayout.buttonLoadingMessage": "Acest lucru ar putea dura c\xE2teva secunde",
|
|
467
543
|
"df.wise.ControlFeedback.maxLength": "Te rug\u0103m s\u0103 introduci {maxLength} sau mai pu\u021Bine caractere.",
|
|
468
544
|
"df.wise.ControlFeedback.maximum": "Te rug\u0103m s\u0103 introduci un num\u0103r egal cu {maximum} sau mai mic.",
|
|
469
545
|
"df.wise.ControlFeedback.maximumDate": "Te rug\u0103m s\u0103 introduci o dat\u0103 de \xEEnainte de sau egal\u0103 cu {maximum}.",
|
|
@@ -501,7 +577,7 @@ var ru_default = {
|
|
|
501
577
|
"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.",
|
|
502
578
|
"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}.",
|
|
503
579
|
"df.wise.ArraySchema.removeItem": "\u0423\u0434\u0430\u043B\u0438\u0442\u044C",
|
|
504
|
-
"df.wise.ButtonLayout.buttonLoadingMessage": "
|
|
580
|
+
"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",
|
|
505
581
|
"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.",
|
|
506
582
|
"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.",
|
|
507
583
|
"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.",
|
|
@@ -653,7 +729,7 @@ var zh_HK_default = {
|
|
|
653
729
|
"df.wise.ArraySchema.maxItemsError": "\u8ACB\u6DFB\u52A0\u4E0D\u8D85\u904E{maxItems}\u9805\u3002",
|
|
654
730
|
"df.wise.ArraySchema.minItemsError": "\u8ACB\u81F3\u5C11\u6DFB\u52A0{minItems}\u9805\u3002",
|
|
655
731
|
"df.wise.ArraySchema.removeItem": "\u79FB\u9664",
|
|
656
|
-
"df.wise.ButtonLayout.buttonLoadingMessage": "
|
|
732
|
+
"df.wise.ButtonLayout.buttonLoadingMessage": "\u6B64\u7A0B\u5E8F\u53EF\u80FD\u9700\u6642\u5E7E\u79D2",
|
|
657
733
|
"df.wise.ControlFeedback.maxLength": "\u8ACB\u8F38\u5165\u6700\u591A{maxLength}\u500B\u5B57\u5143\u3002",
|
|
658
734
|
"df.wise.ControlFeedback.maximum": "\u8ACB\u8F38\u5165\u4E00\u500B\u5C0F\u65BC\u6216\u7B49\u65BC{maximum}\u7684\u6578\u5B57\u3002",
|
|
659
735
|
"df.wise.ControlFeedback.maximumDate": "\u8ACB\u8F38\u5165{maximum}\u6216\u4E4B\u524D\u7684\u65E5\u671F\u3002",
|
|
@@ -685,6 +761,7 @@ var zh_HK_default = {
|
|
|
685
761
|
|
|
686
762
|
// src/i18n/index.ts
|
|
687
763
|
var wiseTranslations = {
|
|
764
|
+
cs: cs_default,
|
|
688
765
|
en: en_default,
|
|
689
766
|
de: de_default,
|
|
690
767
|
es: es_default,
|
|
@@ -693,6 +770,7 @@ var wiseTranslations = {
|
|
|
693
770
|
id: id_default,
|
|
694
771
|
it: it_default,
|
|
695
772
|
ja: ja_default,
|
|
773
|
+
nl: nl_default,
|
|
696
774
|
pl: pl_default,
|
|
697
775
|
pt: pt_default,
|
|
698
776
|
ro: ro_default,
|
|
@@ -1161,29 +1239,36 @@ var DateInputRenderer = {
|
|
|
1161
1239
|
var DateInputRenderer_default = DateInputRenderer;
|
|
1162
1240
|
|
|
1163
1241
|
// ../renderers/src/DecisionRenderer.tsx
|
|
1164
|
-
var
|
|
1165
|
-
|
|
1166
|
-
// ../renderers/src/components/OptionMedia.tsx
|
|
1167
|
-
var import_components9 = require("@transferwise/components");
|
|
1168
|
-
|
|
1169
|
-
// ../renderers/src/utils/image-utils.tsx
|
|
1170
|
-
var import_components8 = require("@transferwise/components");
|
|
1242
|
+
var import_components12 = require("@transferwise/components");
|
|
1171
1243
|
|
|
1172
|
-
// ../renderers/src/
|
|
1244
|
+
// ../renderers/src/utils/UrnFlag.tsx
|
|
1173
1245
|
var import_art = require("@wise/art");
|
|
1174
1246
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1247
|
+
var countryUrnPrefix = "urn:wise:countries:";
|
|
1248
|
+
var currencyUrnPrefix = "urn:wise:currencies:";
|
|
1249
|
+
var isUrnFlag = (uri) => uri.startsWith(countryUrnPrefix) || uri.startsWith(currencyUrnPrefix);
|
|
1250
|
+
function UrnFlag({ size, urn }) {
|
|
1251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_art.Flag, { code: getCode(urn), intrinsicSize: size });
|
|
1252
|
+
}
|
|
1253
|
+
var getCode = (urn) => {
|
|
1254
|
+
return urn.replace(countryUrnPrefix, "").replace(currencyUrnPrefix, "").replace(":image", "").split("?")[0];
|
|
1255
|
+
};
|
|
1256
|
+
|
|
1257
|
+
// ../renderers/src/components/icon/FlagIcon.tsx
|
|
1258
|
+
var import_art2 = require("@wise/art");
|
|
1259
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1175
1260
|
var isFlagIcon = (name) => name.startsWith("flag-");
|
|
1176
1261
|
function FlagIcon({ name }) {
|
|
1177
1262
|
if (!isFlagIcon(name)) {
|
|
1178
1263
|
return null;
|
|
1179
1264
|
}
|
|
1180
1265
|
const code = name.substring(5);
|
|
1181
|
-
return /* @__PURE__ */ (0,
|
|
1266
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_art2.Flag, { code, intrinsicSize: 24 });
|
|
1182
1267
|
}
|
|
1183
1268
|
|
|
1184
1269
|
// ../renderers/src/components/icon/NamedIcon.tsx
|
|
1185
1270
|
var icons = __toESM(require("@transferwise/icons"));
|
|
1186
|
-
var
|
|
1271
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1187
1272
|
var isNamedIcon = (name) => {
|
|
1188
1273
|
const iconName = toCapitalisedCamelCase(name);
|
|
1189
1274
|
return Object.keys(icons).includes(iconName);
|
|
@@ -1194,43 +1279,129 @@ function NamedIcon({ name }) {
|
|
|
1194
1279
|
}
|
|
1195
1280
|
const iconName = toCapitalisedCamelCase(name);
|
|
1196
1281
|
const Icon = icons[iconName];
|
|
1197
|
-
return /* @__PURE__ */ (0,
|
|
1282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { size: 24 });
|
|
1198
1283
|
}
|
|
1199
1284
|
var toCapitalisedCamelCase = (value) => value.split("-").map(capitaliseFirstChar).join("");
|
|
1200
1285
|
var capitaliseFirstChar = (value) => `${value[0].toUpperCase()}${value.slice(1)}`;
|
|
1201
1286
|
|
|
1202
1287
|
// ../renderers/src/components/icon/DynamicIcon.tsx
|
|
1203
|
-
var
|
|
1288
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1204
1289
|
function DynamicIcon({ name }) {
|
|
1205
1290
|
if (isFlagIcon(name)) {
|
|
1206
|
-
return /* @__PURE__ */ (0,
|
|
1291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FlagIcon, { name });
|
|
1207
1292
|
}
|
|
1208
1293
|
if (isNamedIcon(name)) {
|
|
1209
|
-
return /* @__PURE__ */ (0,
|
|
1294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(NamedIcon, { name });
|
|
1210
1295
|
}
|
|
1211
1296
|
return null;
|
|
1212
1297
|
}
|
|
1298
|
+
function isValidIconName(name) {
|
|
1299
|
+
return isNamedIcon(name) || isFlagIcon(name);
|
|
1300
|
+
}
|
|
1301
|
+
function isValidIconUrn(uri) {
|
|
1302
|
+
if (!uri.startsWith("urn:wise:icons:")) {
|
|
1303
|
+
return false;
|
|
1304
|
+
}
|
|
1305
|
+
const name = uri.replace("urn:wise:icons:", "").split("?")[0];
|
|
1306
|
+
return isValidIconName(name);
|
|
1307
|
+
}
|
|
1213
1308
|
var DynamicIcon_default = DynamicIcon;
|
|
1214
1309
|
|
|
1215
|
-
// ../renderers/src/
|
|
1216
|
-
var
|
|
1217
|
-
var
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
return
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1310
|
+
// ../renderers/src/components/Media/stringToURN.ts
|
|
1311
|
+
var stringToURN = (uri) => {
|
|
1312
|
+
var _a;
|
|
1313
|
+
const [nameWithRComponent, qComponent] = uri.split("?=");
|
|
1314
|
+
const [name, rComponent] = (_a = nameWithRComponent == null ? void 0 : nameWithRComponent.split("?+")) != null ? _a : ["", ""];
|
|
1315
|
+
const rComponents = rComponent == null ? void 0 : rComponent.split("&").map((c) => c.split("=")).map(([a, b]) => [a, b]);
|
|
1316
|
+
const qComponents = qComponent == null ? void 0 : qComponent.split("&").map((c) => c.split("=")).map(([a, b]) => [a, b]);
|
|
1317
|
+
return {
|
|
1318
|
+
name,
|
|
1319
|
+
rComponents,
|
|
1320
|
+
qComponents
|
|
1321
|
+
};
|
|
1226
1322
|
};
|
|
1227
1323
|
|
|
1228
|
-
// ../renderers/src/
|
|
1324
|
+
// ../renderers/src/components/Media/resolveUri.tsx
|
|
1229
1325
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1326
|
+
var resolveUri = (uri, size) => {
|
|
1327
|
+
var _a, _b;
|
|
1328
|
+
const { name, qComponents = [] } = stringToURN(uri);
|
|
1329
|
+
if (isValidIconUrn(name)) {
|
|
1330
|
+
return {
|
|
1331
|
+
asset: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DynamicIcon_default, { name: name.replace("urn:wise:icons:", "") }),
|
|
1332
|
+
backgroundColor: (_a = qComponents.find(([key]) => key === "background-color")) == null ? void 0 : _a[1]
|
|
1333
|
+
};
|
|
1334
|
+
}
|
|
1335
|
+
if (isUrnFlag(name)) {
|
|
1336
|
+
return {
|
|
1337
|
+
asset: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(UrnFlag, { urn: name, size })
|
|
1338
|
+
};
|
|
1339
|
+
}
|
|
1340
|
+
if (name.startsWith("data:text/plain,")) {
|
|
1341
|
+
const text = decodeURI(name.replace("data:text/plain,", ""));
|
|
1342
|
+
return {
|
|
1343
|
+
asset: text,
|
|
1344
|
+
backgroundColor: (_b = qComponents.find(([key]) => key === "background-color")) == null ? void 0 : _b[1]
|
|
1345
|
+
};
|
|
1346
|
+
}
|
|
1347
|
+
if (!uri.startsWith("urn:")) {
|
|
1348
|
+
return { asset: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("img", { src: uri, alt: "", width: `${size}px` }) };
|
|
1349
|
+
}
|
|
1350
|
+
return { asset: void 0 };
|
|
1351
|
+
};
|
|
1352
|
+
|
|
1353
|
+
// ../renderers/src/components/Media/AvatarMedia.tsx
|
|
1354
|
+
var import_components8 = require("@transferwise/components");
|
|
1355
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1356
|
+
var AvatarMedia = ({
|
|
1357
|
+
accessibilityDescription,
|
|
1358
|
+
content,
|
|
1359
|
+
size
|
|
1360
|
+
}) => {
|
|
1361
|
+
const getRenderableAvatar = (avatar) => {
|
|
1362
|
+
if (avatar.type === "text") {
|
|
1363
|
+
return { asset: avatar.text };
|
|
1364
|
+
}
|
|
1365
|
+
return __spreadProps(__spreadValues({}, resolveUri(avatar.uri, size)), {
|
|
1366
|
+
badge: avatar.badgeUri ? resolveUri(avatar.badgeUri, 16).asset : void 0
|
|
1367
|
+
});
|
|
1368
|
+
};
|
|
1369
|
+
const avatars = content.map(getRenderableAvatar);
|
|
1370
|
+
if (avatars.length === 1) {
|
|
1371
|
+
const { badge, backgroundColor, asset } = avatars[0];
|
|
1372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1373
|
+
import_components8.AvatarView,
|
|
1374
|
+
{
|
|
1375
|
+
"aria-label": accessibilityDescription,
|
|
1376
|
+
size,
|
|
1377
|
+
badge: { asset: badge },
|
|
1378
|
+
style: { backgroundColor },
|
|
1379
|
+
children: asset
|
|
1380
|
+
}
|
|
1381
|
+
);
|
|
1382
|
+
}
|
|
1383
|
+
const avatarsWithoutBadges = avatars.map((_a) => {
|
|
1384
|
+
var _b = _a, { badge } = _b, rest = __objRest(_b, ["badge"]);
|
|
1385
|
+
return __spreadValues({}, rest);
|
|
1386
|
+
});
|
|
1387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1388
|
+
import_components8.AvatarLayout,
|
|
1389
|
+
{
|
|
1390
|
+
"aria-label": accessibilityDescription,
|
|
1391
|
+
size,
|
|
1392
|
+
orientation: "diagonal",
|
|
1393
|
+
avatars: avatarsWithoutBadges
|
|
1394
|
+
}
|
|
1395
|
+
);
|
|
1396
|
+
};
|
|
1397
|
+
|
|
1398
|
+
// ../renderers/src/utils/image-utils.tsx
|
|
1399
|
+
var import_components9 = require("@transferwise/components");
|
|
1400
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1230
1401
|
var getBadgedMedia = (iconNode, imageNode, size) => {
|
|
1231
1402
|
if (iconNode && imageNode) {
|
|
1232
1403
|
if (imageNode && iconNode) {
|
|
1233
|
-
return /* @__PURE__ */ (0,
|
|
1404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_components9.AvatarView, { size, badge: { asset: iconNode }, children: imageNode });
|
|
1234
1405
|
}
|
|
1235
1406
|
}
|
|
1236
1407
|
return null;
|
|
@@ -1238,7 +1409,7 @@ var getBadgedMedia = (iconNode, imageNode, size) => {
|
|
|
1238
1409
|
var getIconNode = (icon) => {
|
|
1239
1410
|
if (icon) {
|
|
1240
1411
|
if ("name" in icon) {
|
|
1241
|
-
return /* @__PURE__ */ (0,
|
|
1412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DynamicIcon_default, { name: icon.name });
|
|
1242
1413
|
}
|
|
1243
1414
|
if (icon.text) {
|
|
1244
1415
|
return icon.text;
|
|
@@ -1250,56 +1421,91 @@ var getImageNode = (image, size) => {
|
|
|
1250
1421
|
if (image) {
|
|
1251
1422
|
const { accessibilityDescription, uri } = image;
|
|
1252
1423
|
if (!uri.startsWith("urn:")) {
|
|
1253
|
-
return /* @__PURE__ */ (0,
|
|
1424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: uri, alt: accessibilityDescription, width: `${size}px` });
|
|
1254
1425
|
}
|
|
1255
1426
|
if (isUrnFlag(uri)) {
|
|
1256
|
-
return /* @__PURE__ */ (0,
|
|
1427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(UrnFlag, { urn: uri, accessibilityDescription, size });
|
|
1257
1428
|
}
|
|
1258
1429
|
}
|
|
1259
1430
|
return null;
|
|
1260
1431
|
};
|
|
1261
1432
|
|
|
1262
|
-
// ../renderers/src/components/
|
|
1263
|
-
var
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
const imageNode = getImageNode(image, mediaSize);
|
|
1433
|
+
// ../renderers/src/components/Media/Media.tsx
|
|
1434
|
+
var import_components11 = require("@transferwise/components");
|
|
1435
|
+
|
|
1436
|
+
// ../renderers/src/components/Media/LegacyMedia.tsx
|
|
1437
|
+
var import_components10 = require("@transferwise/components");
|
|
1438
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1439
|
+
var LegacyMedia = ({ image, icon, preferAvatar, size }) => {
|
|
1440
|
+
const imageNode = getImageNode(image, size);
|
|
1271
1441
|
const iconNode = getIconNode(icon);
|
|
1272
|
-
const badge = getBadgedMedia(iconNode, imageNode,
|
|
1442
|
+
const badge = getBadgedMedia(iconNode, imageNode, size);
|
|
1273
1443
|
if (badge) {
|
|
1274
1444
|
return badge;
|
|
1275
1445
|
}
|
|
1276
1446
|
if (imageNode) {
|
|
1277
|
-
return preferAvatar ? /* @__PURE__ */ (0,
|
|
1447
|
+
return preferAvatar ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_components10.AvatarView, { children: imageNode }) : imageNode;
|
|
1278
1448
|
}
|
|
1279
|
-
if (iconNode) {
|
|
1280
|
-
|
|
1449
|
+
if (iconNode && icon) {
|
|
1450
|
+
if ("text" in icon || size === 48) {
|
|
1451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_components10.AvatarView, { size, children: iconNode });
|
|
1452
|
+
}
|
|
1453
|
+
return iconNode;
|
|
1281
1454
|
}
|
|
1455
|
+
return null;
|
|
1456
|
+
};
|
|
1457
|
+
|
|
1458
|
+
// ../renderers/src/components/Media/Media.tsx
|
|
1459
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1460
|
+
function Media({
|
|
1461
|
+
media,
|
|
1462
|
+
preferAvatar,
|
|
1463
|
+
size
|
|
1464
|
+
}) {
|
|
1465
|
+
switch (media == null ? void 0 : media.type) {
|
|
1466
|
+
case "avatar":
|
|
1467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(AvatarMedia, __spreadProps(__spreadValues({}, media), { size }));
|
|
1468
|
+
case "image": {
|
|
1469
|
+
const imageNode = getImageNode(media, size);
|
|
1470
|
+
return preferAvatar ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_components11.AvatarView, { children: imageNode }) : imageNode;
|
|
1471
|
+
}
|
|
1472
|
+
case "legacy": {
|
|
1473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(LegacyMedia, __spreadProps(__spreadValues({}, media), { preferAvatar, size }));
|
|
1474
|
+
}
|
|
1475
|
+
default:
|
|
1476
|
+
return null;
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
// ../renderers/src/components/Media/OptionMedia.tsx
|
|
1481
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1482
|
+
var mediaSize = 48;
|
|
1483
|
+
function OptionMedia(props) {
|
|
1484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Media, __spreadProps(__spreadValues({}, props), { size: mediaSize }));
|
|
1282
1485
|
}
|
|
1283
1486
|
|
|
1487
|
+
// ../renderers/src/components/Media/getInlineMedia.tsx
|
|
1488
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1489
|
+
var getInlineMedia = (media) => media ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Media, { media, preferAvatar: false, size: 24 }) : null;
|
|
1490
|
+
|
|
1284
1491
|
// ../renderers/src/DecisionRenderer.tsx
|
|
1285
|
-
var
|
|
1492
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1286
1493
|
var DecisionRenderer = {
|
|
1287
1494
|
canRenderType: "decision",
|
|
1288
|
-
render: ({ control, margin, options, title }) => /* @__PURE__ */ (0,
|
|
1289
|
-
title && /* @__PURE__ */ (0,
|
|
1290
|
-
/* @__PURE__ */ (0,
|
|
1291
|
-
const { description, disabled,
|
|
1292
|
-
return /* @__PURE__ */ (0,
|
|
1293
|
-
|
|
1495
|
+
render: ({ control, margin, options, title }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: getMargin(margin), children: [
|
|
1496
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components12.Header, { as: "h2", title }),
|
|
1497
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components12.NavigationOptionsList, { children: options.map((option) => {
|
|
1498
|
+
const { description, disabled, media, title: itemTitle, tag, onClick } = option;
|
|
1499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1500
|
+
import_components12.NavigationOption,
|
|
1294
1501
|
{
|
|
1295
1502
|
title: itemTitle,
|
|
1296
1503
|
content: description,
|
|
1297
1504
|
disabled,
|
|
1298
|
-
media:
|
|
1505
|
+
media: media ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1299
1506
|
OptionMedia,
|
|
1300
1507
|
{
|
|
1301
|
-
|
|
1302
|
-
image,
|
|
1508
|
+
media,
|
|
1303
1509
|
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
1304
1510
|
}
|
|
1305
1511
|
) : null,
|
|
@@ -1315,15 +1521,15 @@ var DecisionRenderer = {
|
|
|
1315
1521
|
var DecisionRenderer_default = DecisionRenderer;
|
|
1316
1522
|
|
|
1317
1523
|
// ../renderers/src/DividerRenderer.tsx
|
|
1318
|
-
var
|
|
1524
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1319
1525
|
var DividerRenderer = {
|
|
1320
1526
|
canRenderType: "divider",
|
|
1321
|
-
render: ({ margin }) => /* @__PURE__ */ (0,
|
|
1527
|
+
render: ({ margin }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("hr", { className: `m-t-0 ${getMargin(margin)}` })
|
|
1322
1528
|
};
|
|
1323
1529
|
var DividerRenderer_default = DividerRenderer;
|
|
1324
1530
|
|
|
1325
1531
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
1326
|
-
var
|
|
1532
|
+
var import_components13 = require("@transferwise/components");
|
|
1327
1533
|
|
|
1328
1534
|
// ../renderers/src/messages/external-confirmation.messages.ts
|
|
1329
1535
|
var import_react_intl5 = require("react-intl");
|
|
@@ -1353,7 +1559,7 @@ var external_confirmation_messages_default = (0, import_react_intl5.defineMessag
|
|
|
1353
1559
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
1354
1560
|
var import_react_intl6 = require("react-intl");
|
|
1355
1561
|
var import_react3 = require("react");
|
|
1356
|
-
var
|
|
1562
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1357
1563
|
var ExternalConfirmationRenderer = {
|
|
1358
1564
|
canRenderType: "external-confirmation",
|
|
1359
1565
|
render: ExternalConfirmationRendererComponent
|
|
@@ -1376,16 +1582,16 @@ function ExternalConfirmationRendererComponent({
|
|
|
1376
1582
|
}
|
|
1377
1583
|
}
|
|
1378
1584
|
}, []);
|
|
1379
|
-
return /* @__PURE__ */ (0,
|
|
1380
|
-
|
|
1585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1586
|
+
import_components13.Modal,
|
|
1381
1587
|
{
|
|
1382
1588
|
open: status === "failure",
|
|
1383
1589
|
title: formatMessage(external_confirmation_messages_default.title),
|
|
1384
|
-
body: /* @__PURE__ */ (0,
|
|
1385
|
-
/* @__PURE__ */ (0,
|
|
1386
|
-
/* @__PURE__ */ (0,
|
|
1387
|
-
/* @__PURE__ */ (0,
|
|
1388
|
-
|
|
1590
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
1591
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_components13.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
|
|
1592
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
|
|
1593
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1594
|
+
import_components13.Button,
|
|
1389
1595
|
{
|
|
1390
1596
|
block: true,
|
|
1391
1597
|
className: "m-b-2",
|
|
@@ -1398,7 +1604,7 @@ function ExternalConfirmationRendererComponent({
|
|
|
1398
1604
|
children: formatMessage(external_confirmation_messages_default.open)
|
|
1399
1605
|
}
|
|
1400
1606
|
),
|
|
1401
|
-
/* @__PURE__ */ (0,
|
|
1607
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_components13.Button, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
|
|
1402
1608
|
] }) })
|
|
1403
1609
|
] }),
|
|
1404
1610
|
onClose: onCancel
|
|
@@ -1415,46 +1621,46 @@ function getOrigin(url) {
|
|
|
1415
1621
|
var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
|
|
1416
1622
|
|
|
1417
1623
|
// ../renderers/src/FormRenderer.tsx
|
|
1418
|
-
var
|
|
1624
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1419
1625
|
var FormRenderer = {
|
|
1420
1626
|
canRenderType: "form",
|
|
1421
|
-
render: ({ children, margin }) => /* @__PURE__ */ (0,
|
|
1627
|
+
render: ({ children, margin }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: getMargin(margin), children })
|
|
1422
1628
|
};
|
|
1423
1629
|
var FormRenderer_default = FormRenderer;
|
|
1424
1630
|
|
|
1425
1631
|
// ../renderers/src/FormSectionRenderer.tsx
|
|
1426
|
-
var
|
|
1427
|
-
var
|
|
1632
|
+
var import_components14 = require("@transferwise/components");
|
|
1633
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1428
1634
|
var FormSectionRenderer = {
|
|
1429
1635
|
canRenderType: "form-section",
|
|
1430
|
-
render: ({ title, description, children }) => /* @__PURE__ */ (0,
|
|
1431
|
-
title && /* @__PURE__ */ (0,
|
|
1432
|
-
|
|
1636
|
+
render: ({ title, description, children }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("fieldset", { children: [
|
|
1637
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1638
|
+
import_components14.Header,
|
|
1433
1639
|
{
|
|
1434
1640
|
as: "h2",
|
|
1435
1641
|
title
|
|
1436
1642
|
}
|
|
1437
1643
|
),
|
|
1438
|
-
description && /* @__PURE__ */ (0,
|
|
1644
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { children: description }),
|
|
1439
1645
|
children
|
|
1440
1646
|
] })
|
|
1441
1647
|
};
|
|
1442
1648
|
var FormSectionRenderer_default = FormSectionRenderer;
|
|
1443
1649
|
|
|
1444
1650
|
// ../renderers/src/HeadingRenderer.tsx
|
|
1445
|
-
var
|
|
1446
|
-
var
|
|
1651
|
+
var import_components15 = require("@transferwise/components");
|
|
1652
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1447
1653
|
var HeadingRenderer = {
|
|
1448
1654
|
canRenderType: "heading",
|
|
1449
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
1655
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Heading, __spreadValues({}, props))
|
|
1450
1656
|
};
|
|
1451
1657
|
function Heading(props) {
|
|
1452
1658
|
const { text, size, align, margin, control } = props;
|
|
1453
1659
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
1454
|
-
return control === "display" ? /* @__PURE__ */ (0,
|
|
1660
|
+
return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(StandardHeading, { size, text, className });
|
|
1455
1661
|
}
|
|
1456
1662
|
function DisplayHeading({ size, text, className }) {
|
|
1457
|
-
return /* @__PURE__ */ (0,
|
|
1663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components15.Display, { type: getDisplayType(size), className, children: text });
|
|
1458
1664
|
}
|
|
1459
1665
|
var getDisplayType = (size) => {
|
|
1460
1666
|
switch (size) {
|
|
@@ -1470,7 +1676,7 @@ var getDisplayType = (size) => {
|
|
|
1470
1676
|
}
|
|
1471
1677
|
};
|
|
1472
1678
|
function StandardHeading({ size, text, className }) {
|
|
1473
|
-
return /* @__PURE__ */ (0,
|
|
1679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components15.Title, { type: getTitleTypeBySize(size), className, children: text });
|
|
1474
1680
|
}
|
|
1475
1681
|
var getTitleTypeBySize = (size) => {
|
|
1476
1682
|
var _a;
|
|
@@ -1486,7 +1692,7 @@ var getTitleTypeBySize = (size) => {
|
|
|
1486
1692
|
var HeadingRenderer_default = HeadingRenderer;
|
|
1487
1693
|
|
|
1488
1694
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
1489
|
-
var
|
|
1695
|
+
var import_components16 = require("@transferwise/components");
|
|
1490
1696
|
var import_react4 = require("react");
|
|
1491
1697
|
|
|
1492
1698
|
// ../renderers/src/utils/api-utils.ts
|
|
@@ -1497,7 +1703,7 @@ function isRelativePath(url = "") {
|
|
|
1497
1703
|
}
|
|
1498
1704
|
|
|
1499
1705
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
1500
|
-
var
|
|
1706
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1501
1707
|
function UrlImage({
|
|
1502
1708
|
accessibilityDescription,
|
|
1503
1709
|
align,
|
|
@@ -1512,8 +1718,8 @@ function UrlImage({
|
|
|
1512
1718
|
void getImageSource(httpClient, uri).then(setImageSource);
|
|
1513
1719
|
}
|
|
1514
1720
|
}, [uri, httpClient]);
|
|
1515
|
-
return /* @__PURE__ */ (0,
|
|
1516
|
-
|
|
1721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: `df-image ${align} ${size || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1722
|
+
import_components16.Image,
|
|
1517
1723
|
{
|
|
1518
1724
|
className: `img-responsive ${getMargin(margin)}`,
|
|
1519
1725
|
alt: accessibilityDescription != null ? accessibilityDescription : "",
|
|
@@ -1556,7 +1762,7 @@ var getImageSource = async (httpClient, imageUrl) => {
|
|
|
1556
1762
|
};
|
|
1557
1763
|
|
|
1558
1764
|
// ../renderers/src/ImageRenderer/UrnFlagImage.tsx
|
|
1559
|
-
var
|
|
1765
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1560
1766
|
var maxFlagSize = 600;
|
|
1561
1767
|
function UrnFlagImage({
|
|
1562
1768
|
accessibilityDescription,
|
|
@@ -1565,7 +1771,7 @@ function UrnFlagImage({
|
|
|
1565
1771
|
size,
|
|
1566
1772
|
uri
|
|
1567
1773
|
}) {
|
|
1568
|
-
return /* @__PURE__ */ (0,
|
|
1774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
|
|
1569
1775
|
}
|
|
1570
1776
|
|
|
1571
1777
|
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
@@ -1573,19 +1779,13 @@ var import_art3 = require("@wise/art");
|
|
|
1573
1779
|
|
|
1574
1780
|
// ../renderers/src/ImageRenderer/isAnimated.ts
|
|
1575
1781
|
var isAnimated = (uri) => {
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
}
|
|
1580
|
-
const params = sections[1];
|
|
1581
|
-
if (!params.startsWith("+")) {
|
|
1582
|
-
return false;
|
|
1583
|
-
}
|
|
1584
|
-
return params.substring(1).split("&").some((param) => param === "type=animated");
|
|
1782
|
+
var _a;
|
|
1783
|
+
const { rComponents } = stringToURN(uri);
|
|
1784
|
+
return (_a = rComponents == null ? void 0 : rComponents.some(([key, value]) => key === "type" && value === "animated")) != null ? _a : false;
|
|
1585
1785
|
};
|
|
1586
1786
|
|
|
1587
1787
|
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
1588
|
-
var
|
|
1788
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1589
1789
|
var urnPrefix = "urn:wise:illustrations:";
|
|
1590
1790
|
var isUrnIllustration = (uri) => uri.startsWith(urnPrefix);
|
|
1591
1791
|
function UrnIllustration({
|
|
@@ -1599,9 +1799,9 @@ function UrnIllustration({
|
|
|
1599
1799
|
const illustrationName = getIllustrationName(uri);
|
|
1600
1800
|
const illustration3DName = getIllustration3DName(uri);
|
|
1601
1801
|
if (illustration3DName && isAnimated(uri)) {
|
|
1602
|
-
return /* @__PURE__ */ (0,
|
|
1802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_art3.Illustration3D, { name: illustration3DName, size: illustrationSize }) });
|
|
1603
1803
|
}
|
|
1604
|
-
return /* @__PURE__ */ (0,
|
|
1804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1605
1805
|
import_art3.Illustration,
|
|
1606
1806
|
{
|
|
1607
1807
|
className: "df-illustration",
|
|
@@ -1621,32 +1821,32 @@ var getIllustration3DName = (uri) => {
|
|
|
1621
1821
|
};
|
|
1622
1822
|
|
|
1623
1823
|
// ../renderers/src/ImageRenderer/UrnImage.tsx
|
|
1624
|
-
var
|
|
1824
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1625
1825
|
var isUrnImage = (uri) => uri.startsWith("urn:");
|
|
1626
1826
|
function UrnImage(props) {
|
|
1627
1827
|
const { uri } = props;
|
|
1628
1828
|
if (isUrnIllustration(uri)) {
|
|
1629
|
-
return /* @__PURE__ */ (0,
|
|
1829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(UrnIllustration, __spreadValues({}, props));
|
|
1630
1830
|
}
|
|
1631
1831
|
if (isUrnFlag(uri)) {
|
|
1632
|
-
return /* @__PURE__ */ (0,
|
|
1832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(UrnFlagImage, __spreadValues({}, props));
|
|
1633
1833
|
}
|
|
1634
1834
|
return null;
|
|
1635
1835
|
}
|
|
1636
1836
|
|
|
1637
1837
|
// ../renderers/src/ImageRenderer/ImageRenderer.tsx
|
|
1638
|
-
var
|
|
1838
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1639
1839
|
var ImageRenderer = {
|
|
1640
1840
|
canRenderType: "image",
|
|
1641
|
-
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0,
|
|
1841
|
+
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(UrlImage, __spreadValues({}, props))
|
|
1642
1842
|
};
|
|
1643
1843
|
|
|
1644
1844
|
// ../renderers/src/ImageRenderer/index.tsx
|
|
1645
1845
|
var ImageRenderer_default = ImageRenderer;
|
|
1646
1846
|
|
|
1647
1847
|
// ../renderers/src/InstructionsRenderer.tsx
|
|
1648
|
-
var
|
|
1649
|
-
var
|
|
1848
|
+
var import_components17 = require("@transferwise/components");
|
|
1849
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1650
1850
|
var doContext = ["positive", "neutral"];
|
|
1651
1851
|
var dontContext = ["warning", "negative"];
|
|
1652
1852
|
var InstructionsRenderer = {
|
|
@@ -1654,16 +1854,16 @@ var InstructionsRenderer = {
|
|
|
1654
1854
|
render: ({ items, margin, title }) => {
|
|
1655
1855
|
const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
|
|
1656
1856
|
const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
|
|
1657
|
-
return /* @__PURE__ */ (0,
|
|
1658
|
-
title ? /* @__PURE__ */ (0,
|
|
1659
|
-
/* @__PURE__ */ (0,
|
|
1857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: getMargin(margin), children: [
|
|
1858
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components17.Header, { title }) : null,
|
|
1859
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components17.InstructionsList, { dos, donts })
|
|
1660
1860
|
] });
|
|
1661
1861
|
}
|
|
1662
1862
|
};
|
|
1663
1863
|
var InstructionsRenderer_default = InstructionsRenderer;
|
|
1664
1864
|
|
|
1665
1865
|
// ../renderers/src/IntegerInputRenderer.tsx
|
|
1666
|
-
var
|
|
1866
|
+
var import_components18 = require("@transferwise/components");
|
|
1667
1867
|
|
|
1668
1868
|
// ../renderers/src/utils/input-utils.ts
|
|
1669
1869
|
var onWheel = (event) => {
|
|
@@ -1672,34 +1872,9 @@ var onWheel = (event) => {
|
|
|
1672
1872
|
}
|
|
1673
1873
|
};
|
|
1674
1874
|
|
|
1675
|
-
// ../renderers/src/utils/getInlineAvatar.tsx
|
|
1676
|
-
var import_components16 = require("@transferwise/components");
|
|
1677
|
-
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1678
|
-
var mediaSize2 = 24;
|
|
1679
|
-
function getInlineAvatar({ icon, image }) {
|
|
1680
|
-
const imageNode = getImageNode(image, mediaSize2);
|
|
1681
|
-
const iconNode = getIconNode(icon);
|
|
1682
|
-
const badge = getBadgedMedia(iconNode, imageNode, mediaSize2);
|
|
1683
|
-
if (badge) {
|
|
1684
|
-
return badge;
|
|
1685
|
-
}
|
|
1686
|
-
if (imageNode) {
|
|
1687
|
-
return imageNode;
|
|
1688
|
-
}
|
|
1689
|
-
if (isNamedIcon2(icon) && !isFlagIcon2(icon)) {
|
|
1690
|
-
return iconNode;
|
|
1691
|
-
}
|
|
1692
|
-
if (iconNode) {
|
|
1693
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components16.AvatarView, { size: mediaSize2, children: iconNode });
|
|
1694
|
-
}
|
|
1695
|
-
return null;
|
|
1696
|
-
}
|
|
1697
|
-
var isNamedIcon2 = (icon) => icon ? "name" in icon : false;
|
|
1698
|
-
var isFlagIcon2 = (icon) => isNamedIcon2(icon) && icon.name.startsWith("flag-");
|
|
1699
|
-
|
|
1700
1875
|
// ../renderers/src/utils/getInputGroupAddonStart.tsx
|
|
1701
|
-
var getInputGroupAddonStart = (
|
|
1702
|
-
const content =
|
|
1876
|
+
var getInputGroupAddonStart = (media) => {
|
|
1877
|
+
const content = getInlineMedia(media);
|
|
1703
1878
|
return content ? { content } : void 0;
|
|
1704
1879
|
};
|
|
1705
1880
|
|
|
@@ -1713,11 +1888,11 @@ function pick(obj, ...keys) {
|
|
|
1713
1888
|
}
|
|
1714
1889
|
|
|
1715
1890
|
// ../renderers/src/IntegerInputRenderer.tsx
|
|
1716
|
-
var
|
|
1891
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1717
1892
|
var IntegerInputRenderer = {
|
|
1718
1893
|
canRenderType: "input-integer",
|
|
1719
1894
|
render: (props) => {
|
|
1720
|
-
const { id, title, description, help,
|
|
1895
|
+
const { id, title, description, help, media, validationState, value, onChange } = props;
|
|
1721
1896
|
const commonProps = pick(
|
|
1722
1897
|
props,
|
|
1723
1898
|
"autoComplete",
|
|
@@ -1728,7 +1903,7 @@ var IntegerInputRenderer = {
|
|
|
1728
1903
|
"maximum",
|
|
1729
1904
|
"minimum"
|
|
1730
1905
|
);
|
|
1731
|
-
return /* @__PURE__ */ (0,
|
|
1906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1732
1907
|
FieldInput_default,
|
|
1733
1908
|
{
|
|
1734
1909
|
id,
|
|
@@ -1736,8 +1911,8 @@ var IntegerInputRenderer = {
|
|
|
1736
1911
|
description,
|
|
1737
1912
|
validation: validationState,
|
|
1738
1913
|
help,
|
|
1739
|
-
children: /* @__PURE__ */ (0,
|
|
1740
|
-
|
|
1914
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components18.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1915
|
+
import_components18.Input,
|
|
1741
1916
|
__spreadValues({
|
|
1742
1917
|
id,
|
|
1743
1918
|
name: id,
|
|
@@ -1759,14 +1934,14 @@ var IntegerInputRenderer = {
|
|
|
1759
1934
|
var IntegerInputRenderer_default = IntegerInputRenderer;
|
|
1760
1935
|
|
|
1761
1936
|
// ../renderers/src/ListRenderer.tsx
|
|
1762
|
-
var
|
|
1937
|
+
var import_components19 = require("@transferwise/components");
|
|
1763
1938
|
var import_classnames3 = __toESM(require("classnames"));
|
|
1764
|
-
var
|
|
1939
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1765
1940
|
var ListRenderer = {
|
|
1766
1941
|
canRenderType: "list",
|
|
1767
|
-
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ (0,
|
|
1768
|
-
(title || callToAction) && /* @__PURE__ */ (0,
|
|
1769
|
-
items.map((props) => /* @__PURE__ */ (0,
|
|
1942
|
+
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: getMargin(margin), children: [
|
|
1943
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components19.Header, { as: "h2", title: title != null ? title : "", action: getListAction(callToAction) }),
|
|
1944
|
+
items.map((props) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DesignSystemListItem, __spreadProps(__spreadValues({}, props), { control }), props.title))
|
|
1770
1945
|
] })
|
|
1771
1946
|
};
|
|
1772
1947
|
var DesignSystemListItem = ({
|
|
@@ -1775,32 +1950,33 @@ var DesignSystemListItem = ({
|
|
|
1775
1950
|
supportingValues,
|
|
1776
1951
|
icon,
|
|
1777
1952
|
image,
|
|
1953
|
+
media,
|
|
1778
1954
|
control,
|
|
1779
1955
|
tag
|
|
1780
|
-
}) => /* @__PURE__ */ (0,
|
|
1956
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1781
1957
|
"label",
|
|
1782
1958
|
{
|
|
1783
1959
|
className: (0, import_classnames3.default)("np-option p-a-2", {
|
|
1784
1960
|
"np-option__sm-media": true,
|
|
1785
1961
|
"np-option__container-aligned": true
|
|
1786
1962
|
}),
|
|
1787
|
-
children: /* @__PURE__ */ (0,
|
|
1788
|
-
icon || image ? /* @__PURE__ */ (0,
|
|
1963
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "media", children: [
|
|
1964
|
+
icon || image || media ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "media-left", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1789
1965
|
ListItemMedia,
|
|
1790
1966
|
{
|
|
1791
|
-
image,
|
|
1792
1967
|
icon,
|
|
1968
|
+
media,
|
|
1793
1969
|
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
1794
1970
|
}
|
|
1795
1971
|
) }) : null,
|
|
1796
|
-
/* @__PURE__ */ (0,
|
|
1797
|
-
/* @__PURE__ */ (0,
|
|
1798
|
-
/* @__PURE__ */ (0,
|
|
1799
|
-
/* @__PURE__ */ (0,
|
|
1972
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "media-body", children: [
|
|
1973
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "d-flex justify-content-between", children: [
|
|
1974
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: title }),
|
|
1975
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: supportingValues == null ? void 0 : supportingValues.value })
|
|
1800
1976
|
] }),
|
|
1801
|
-
/* @__PURE__ */ (0,
|
|
1802
|
-
/* @__PURE__ */ (0,
|
|
1803
|
-
/* @__PURE__ */ (0,
|
|
1977
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "d-flex justify-content-between", children: [
|
|
1978
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components19.Body, { className: "d-block np-option__body", children: description }),
|
|
1979
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components19.Body, { className: "d-block np-option__body", children: supportingValues == null ? void 0 : supportingValues.subvalue })
|
|
1804
1980
|
] })
|
|
1805
1981
|
] })
|
|
1806
1982
|
] })
|
|
@@ -1809,15 +1985,13 @@ var DesignSystemListItem = ({
|
|
|
1809
1985
|
);
|
|
1810
1986
|
var ListItemMedia = ({
|
|
1811
1987
|
icon,
|
|
1812
|
-
|
|
1988
|
+
media,
|
|
1813
1989
|
preferAvatar
|
|
1814
1990
|
}) => {
|
|
1815
1991
|
if (icon) {
|
|
1816
|
-
return /* @__PURE__ */ (0,
|
|
1817
|
-
}
|
|
1818
|
-
if (image) {
|
|
1819
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(OptionMedia, { icon, image, preferAvatar }) });
|
|
1992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "circle circle-sm text-primary circle-inverse", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(OptionMedia, { media, preferAvatar }) });
|
|
1820
1993
|
}
|
|
1994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(OptionMedia, { media, preferAvatar }) });
|
|
1821
1995
|
};
|
|
1822
1996
|
var getListAction = (callToAction) => {
|
|
1823
1997
|
if (callToAction) {
|
|
@@ -1832,12 +2006,12 @@ var getListAction = (callToAction) => {
|
|
|
1832
2006
|
var ListRenderer_default = ListRenderer;
|
|
1833
2007
|
|
|
1834
2008
|
// ../renderers/src/LoadingIndicatorRenderer.tsx
|
|
1835
|
-
var
|
|
1836
|
-
var
|
|
2009
|
+
var import_components20 = require("@transferwise/components");
|
|
2010
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1837
2011
|
var LoadingIndicatorRenderer = {
|
|
1838
2012
|
canRenderType: "loading-indicator",
|
|
1839
|
-
render: ({ margin, size }) => /* @__PURE__ */ (0,
|
|
1840
|
-
|
|
2013
|
+
render: ({ margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2014
|
+
import_components20.Loader,
|
|
1841
2015
|
{
|
|
1842
2016
|
size,
|
|
1843
2017
|
classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin(margin)}` },
|
|
@@ -1848,30 +2022,30 @@ var LoadingIndicatorRenderer = {
|
|
|
1848
2022
|
var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
|
|
1849
2023
|
|
|
1850
2024
|
// ../renderers/src/MarkdownRenderer.tsx
|
|
1851
|
-
var
|
|
1852
|
-
var
|
|
2025
|
+
var import_components21 = require("@transferwise/components");
|
|
2026
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1853
2027
|
var MarkdownRenderer = {
|
|
1854
2028
|
canRenderType: "markdown",
|
|
1855
|
-
render: ({ content, align, margin }) => /* @__PURE__ */ (0,
|
|
2029
|
+
render: ({ content, align, margin }) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_components21.Markdown, { className: "np-text-body-large", config: { link: { target: "_blank" } }, children: content }) })
|
|
1856
2030
|
};
|
|
1857
2031
|
var MarkdownRenderer_default = MarkdownRenderer;
|
|
1858
2032
|
|
|
1859
2033
|
// ../renderers/src/ModalLayoutRenderer.tsx
|
|
1860
|
-
var
|
|
2034
|
+
var import_components22 = require("@transferwise/components");
|
|
1861
2035
|
var import_react5 = require("react");
|
|
1862
|
-
var
|
|
2036
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1863
2037
|
var ModalLayoutRenderer = {
|
|
1864
2038
|
canRenderType: "modal-layout",
|
|
1865
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
2039
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DFModal, __spreadValues({}, props))
|
|
1866
2040
|
};
|
|
1867
2041
|
var ModalLayoutRenderer_default = ModalLayoutRenderer;
|
|
1868
2042
|
function DFModal({ content, margin, trigger }) {
|
|
1869
2043
|
const [visible, setVisible] = (0, import_react5.useState)(false);
|
|
1870
2044
|
const { children, title } = content;
|
|
1871
|
-
return /* @__PURE__ */ (0,
|
|
1872
|
-
/* @__PURE__ */ (0,
|
|
1873
|
-
/* @__PURE__ */ (0,
|
|
1874
|
-
|
|
2045
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: getMargin(margin), children: [
|
|
2046
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components22.Button, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
|
|
2047
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2048
|
+
import_components22.Modal,
|
|
1875
2049
|
{
|
|
1876
2050
|
scroll: "content",
|
|
1877
2051
|
open: visible,
|
|
@@ -1885,17 +2059,17 @@ function DFModal({ content, margin, trigger }) {
|
|
|
1885
2059
|
}
|
|
1886
2060
|
|
|
1887
2061
|
// ../renderers/src/ModalRenderer.tsx
|
|
1888
|
-
var
|
|
1889
|
-
var
|
|
2062
|
+
var import_components23 = require("@transferwise/components");
|
|
2063
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1890
2064
|
var ModalRenderer = {
|
|
1891
2065
|
canRenderType: "modal",
|
|
1892
2066
|
render: ({ title, children, open, onClose }) => {
|
|
1893
|
-
return /* @__PURE__ */ (0,
|
|
2067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components23.Modal, { open, title, body: children, onClose });
|
|
1894
2068
|
}
|
|
1895
2069
|
};
|
|
1896
2070
|
|
|
1897
2071
|
// ../renderers/src/MultiSelectInputRenderer.tsx
|
|
1898
|
-
var
|
|
2072
|
+
var import_components24 = require("@transferwise/components");
|
|
1899
2073
|
var import_react6 = require("react");
|
|
1900
2074
|
var import_react_intl8 = require("react-intl");
|
|
1901
2075
|
|
|
@@ -1910,10 +2084,10 @@ var multi_select_messages_default = (0, import_react_intl7.defineMessages)({
|
|
|
1910
2084
|
});
|
|
1911
2085
|
|
|
1912
2086
|
// ../renderers/src/MultiSelectInputRenderer.tsx
|
|
1913
|
-
var
|
|
2087
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1914
2088
|
var MultiSelectInputRenderer = {
|
|
1915
2089
|
canRenderType: "input-multi-select",
|
|
1916
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
2090
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(MultiSelectInputRendererComponent, __spreadValues({}, props))
|
|
1917
2091
|
};
|
|
1918
2092
|
function MultiSelectInputRendererComponent(props) {
|
|
1919
2093
|
const { formatMessage } = (0, import_react_intl8.useIntl)();
|
|
@@ -1955,12 +2129,12 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
1955
2129
|
const contentProps = {
|
|
1956
2130
|
title: option.title,
|
|
1957
2131
|
description: option.description,
|
|
1958
|
-
icon: /* @__PURE__ */ (0,
|
|
2132
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
|
|
1959
2133
|
};
|
|
1960
|
-
return /* @__PURE__ */ (0,
|
|
2134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components24.SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
1961
2135
|
};
|
|
1962
2136
|
const extraProps = { autoComplete };
|
|
1963
|
-
return /* @__PURE__ */ (0,
|
|
2137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1964
2138
|
FieldInput_default,
|
|
1965
2139
|
{
|
|
1966
2140
|
id,
|
|
@@ -1968,8 +2142,8 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
1968
2142
|
help,
|
|
1969
2143
|
description,
|
|
1970
2144
|
validation: validationState,
|
|
1971
|
-
children: /* @__PURE__ */ (0,
|
|
1972
|
-
|
|
2145
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2146
|
+
import_components24.SelectInput,
|
|
1973
2147
|
__spreadValues({
|
|
1974
2148
|
id,
|
|
1975
2149
|
items: options.map((option, index) => {
|
|
@@ -2008,12 +2182,12 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
2008
2182
|
var MultiSelectInputRenderer_default = MultiSelectInputRenderer;
|
|
2009
2183
|
|
|
2010
2184
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
2011
|
-
var
|
|
2185
|
+
var import_components26 = require("@transferwise/components");
|
|
2012
2186
|
|
|
2013
2187
|
// ../renderers/src/components/UploadFieldInput.tsx
|
|
2014
|
-
var
|
|
2188
|
+
var import_components25 = require("@transferwise/components");
|
|
2015
2189
|
var import_classnames4 = __toESM(require("classnames"));
|
|
2016
|
-
var
|
|
2190
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2017
2191
|
function UploadFieldInput({
|
|
2018
2192
|
id,
|
|
2019
2193
|
children,
|
|
@@ -2022,18 +2196,18 @@ function UploadFieldInput({
|
|
|
2022
2196
|
help,
|
|
2023
2197
|
validation
|
|
2024
2198
|
}) {
|
|
2025
|
-
const labelContent = label && help ? /* @__PURE__ */ (0,
|
|
2199
|
+
const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(LabelContentWithHelp, { text: label, help }) : label;
|
|
2026
2200
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
2027
|
-
return /* @__PURE__ */ (0,
|
|
2201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
2028
2202
|
"div",
|
|
2029
2203
|
{
|
|
2030
2204
|
className: (0, import_classnames4.default)("form-group d-block", {
|
|
2031
2205
|
"has-error": (validation == null ? void 0 : validation.status) === "invalid"
|
|
2032
2206
|
}),
|
|
2033
2207
|
children: [
|
|
2034
|
-
/* @__PURE__ */ (0,
|
|
2208
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
|
|
2035
2209
|
children,
|
|
2036
|
-
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0,
|
|
2210
|
+
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components25.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
|
|
2037
2211
|
]
|
|
2038
2212
|
}
|
|
2039
2213
|
);
|
|
@@ -2068,7 +2242,7 @@ var getSizeLimit = (maxSize) => {
|
|
|
2068
2242
|
};
|
|
2069
2243
|
|
|
2070
2244
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
2071
|
-
var
|
|
2245
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2072
2246
|
var MultiUploadInputRenderer = {
|
|
2073
2247
|
canRenderType: "input-upload-multi",
|
|
2074
2248
|
render: (props) => {
|
|
@@ -2093,7 +2267,7 @@ var MultiUploadInputRenderer = {
|
|
|
2093
2267
|
};
|
|
2094
2268
|
const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
|
|
2095
2269
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
2096
|
-
return /* @__PURE__ */ (0,
|
|
2270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2097
2271
|
UploadFieldInput_default,
|
|
2098
2272
|
{
|
|
2099
2273
|
id,
|
|
@@ -2101,8 +2275,8 @@ var MultiUploadInputRenderer = {
|
|
|
2101
2275
|
description,
|
|
2102
2276
|
validation: validationState,
|
|
2103
2277
|
help,
|
|
2104
|
-
children: /* @__PURE__ */ (0,
|
|
2105
|
-
|
|
2278
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2279
|
+
import_components26.UploadInput,
|
|
2106
2280
|
{
|
|
2107
2281
|
id,
|
|
2108
2282
|
"aria-describedby": descriptionId,
|
|
@@ -2124,12 +2298,12 @@ var MultiUploadInputRenderer = {
|
|
|
2124
2298
|
var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
|
|
2125
2299
|
|
|
2126
2300
|
// ../renderers/src/NumberInputRenderer.tsx
|
|
2127
|
-
var
|
|
2128
|
-
var
|
|
2301
|
+
var import_components27 = require("@transferwise/components");
|
|
2302
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2129
2303
|
var NumberInputRenderer = {
|
|
2130
2304
|
canRenderType: "input-number",
|
|
2131
2305
|
render: (props) => {
|
|
2132
|
-
const { id, title, description, help,
|
|
2306
|
+
const { id, title, description, help, media, validationState, value, onChange } = props;
|
|
2133
2307
|
const commonProps = pick(
|
|
2134
2308
|
props,
|
|
2135
2309
|
"disabled",
|
|
@@ -2139,7 +2313,7 @@ var NumberInputRenderer = {
|
|
|
2139
2313
|
"maximum",
|
|
2140
2314
|
"minimum"
|
|
2141
2315
|
);
|
|
2142
|
-
return /* @__PURE__ */ (0,
|
|
2316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2143
2317
|
FieldInput_default,
|
|
2144
2318
|
{
|
|
2145
2319
|
id,
|
|
@@ -2147,8 +2321,8 @@ var NumberInputRenderer = {
|
|
|
2147
2321
|
description,
|
|
2148
2322
|
validation: validationState,
|
|
2149
2323
|
help,
|
|
2150
|
-
children: /* @__PURE__ */ (0,
|
|
2151
|
-
|
|
2324
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components27.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2325
|
+
import_components27.Input,
|
|
2152
2326
|
__spreadValues({
|
|
2153
2327
|
id,
|
|
2154
2328
|
name: id,
|
|
@@ -2171,16 +2345,16 @@ var NumberInputRenderer_default = NumberInputRenderer;
|
|
|
2171
2345
|
var import_react_intl10 = require("react-intl");
|
|
2172
2346
|
|
|
2173
2347
|
// ../renderers/src/hooks/useSnackBarIfAvailable.ts
|
|
2174
|
-
var
|
|
2348
|
+
var import_components28 = require("@transferwise/components");
|
|
2175
2349
|
var import_react7 = require("react");
|
|
2176
2350
|
function useSnackBarIfAvailable() {
|
|
2177
|
-
const context = (0, import_react7.useContext)(
|
|
2351
|
+
const context = (0, import_react7.useContext)(import_components28.SnackbarContext);
|
|
2178
2352
|
return context ? context.createSnackbar : () => {
|
|
2179
2353
|
};
|
|
2180
2354
|
}
|
|
2181
2355
|
|
|
2182
2356
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
2183
|
-
var
|
|
2357
|
+
var import_components29 = require("@transferwise/components");
|
|
2184
2358
|
var import_classnames5 = __toESM(require("classnames"));
|
|
2185
2359
|
|
|
2186
2360
|
// ../renderers/src/messages/paragraph.messages.ts
|
|
@@ -2199,17 +2373,17 @@ var paragraph_messages_default = (0, import_react_intl9.defineMessages)({
|
|
|
2199
2373
|
});
|
|
2200
2374
|
|
|
2201
2375
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
2202
|
-
var
|
|
2376
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2203
2377
|
var ParagraphRenderer = {
|
|
2204
2378
|
canRenderType: "paragraph",
|
|
2205
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
2379
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Paragraph, __spreadValues({}, props))
|
|
2206
2380
|
};
|
|
2207
2381
|
function Paragraph({ align, control, margin, text }) {
|
|
2208
2382
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
2209
|
-
return control === "copyable" ? /* @__PURE__ */ (0,
|
|
2383
|
+
return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(StandardParagraph, { className, text });
|
|
2210
2384
|
}
|
|
2211
2385
|
function StandardParagraph({ text, className }) {
|
|
2212
|
-
return /* @__PURE__ */ (0,
|
|
2386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: `np-text-body-large ${className}`, children: text });
|
|
2213
2387
|
}
|
|
2214
2388
|
function CopyableParagraph({
|
|
2215
2389
|
text,
|
|
@@ -2223,9 +2397,9 @@ function CopyableParagraph({
|
|
|
2223
2397
|
});
|
|
2224
2398
|
};
|
|
2225
2399
|
const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
|
|
2226
|
-
return /* @__PURE__ */ (0,
|
|
2227
|
-
/* @__PURE__ */ (0,
|
|
2228
|
-
|
|
2400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className, children: [
|
|
2401
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2402
|
+
import_components29.Input,
|
|
2229
2403
|
{
|
|
2230
2404
|
type: "text",
|
|
2231
2405
|
value: text,
|
|
@@ -2233,13 +2407,13 @@ function CopyableParagraph({
|
|
|
2233
2407
|
className: (0, import_classnames5.default)("text-ellipsis", inputAlignmentClasses)
|
|
2234
2408
|
}
|
|
2235
2409
|
),
|
|
2236
|
-
/* @__PURE__ */ (0,
|
|
2410
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_components29.Button, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
|
|
2237
2411
|
] });
|
|
2238
2412
|
}
|
|
2239
2413
|
var ParagraphRenderer_default = ParagraphRenderer;
|
|
2240
2414
|
|
|
2241
2415
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
2242
|
-
var
|
|
2416
|
+
var import_components30 = require("@transferwise/components");
|
|
2243
2417
|
var import_icons = require("@transferwise/icons");
|
|
2244
2418
|
var import_classnames6 = __toESM(require("classnames"));
|
|
2245
2419
|
var import_react8 = require("react");
|
|
@@ -2271,10 +2445,10 @@ var repeatable_messages_default = (0, import_react_intl11.defineMessages)({
|
|
|
2271
2445
|
});
|
|
2272
2446
|
|
|
2273
2447
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
2274
|
-
var
|
|
2448
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2275
2449
|
var RepeatableRenderer = {
|
|
2276
2450
|
canRenderType: "repeatable",
|
|
2277
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
2451
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Repeatable, __spreadValues({}, props))
|
|
2278
2452
|
};
|
|
2279
2453
|
function Repeatable(props) {
|
|
2280
2454
|
const {
|
|
@@ -2313,40 +2487,40 @@ function Repeatable(props) {
|
|
|
2313
2487
|
const onCancelEdit = () => {
|
|
2314
2488
|
setOpenModalType(null);
|
|
2315
2489
|
};
|
|
2316
|
-
return /* @__PURE__ */ (0,
|
|
2317
|
-
title && /* @__PURE__ */ (0,
|
|
2318
|
-
description && /* @__PURE__ */ (0,
|
|
2319
|
-
/* @__PURE__ */ (0,
|
|
2490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
2491
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_components30.Header, { title }),
|
|
2492
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { children: description }),
|
|
2493
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
2320
2494
|
"div",
|
|
2321
2495
|
{
|
|
2322
2496
|
className: (0, import_classnames6.default)("form-group", {
|
|
2323
2497
|
"has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
|
|
2324
2498
|
}),
|
|
2325
2499
|
children: [
|
|
2326
|
-
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0,
|
|
2327
|
-
/* @__PURE__ */ (0,
|
|
2328
|
-
|
|
2500
|
+
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
|
|
2501
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2502
|
+
import_components30.NavigationOption,
|
|
2329
2503
|
{
|
|
2330
|
-
media: /* @__PURE__ */ (0,
|
|
2504
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons.Plus, {}),
|
|
2331
2505
|
title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2332
2506
|
showMediaAtAllSizes: true,
|
|
2333
2507
|
onClick: () => onAddItem()
|
|
2334
2508
|
}
|
|
2335
2509
|
),
|
|
2336
|
-
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0,
|
|
2510
|
+
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_components30.InlineAlert, { type: "negative", children: validationState.message })
|
|
2337
2511
|
]
|
|
2338
2512
|
}
|
|
2339
2513
|
),
|
|
2340
|
-
/* @__PURE__ */ (0,
|
|
2341
|
-
|
|
2514
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2515
|
+
import_components30.Modal,
|
|
2342
2516
|
{
|
|
2343
2517
|
open: openModalType !== null,
|
|
2344
2518
|
title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2345
|
-
body: /* @__PURE__ */ (0,
|
|
2346
|
-
/* @__PURE__ */ (0,
|
|
2347
|
-
/* @__PURE__ */ (0,
|
|
2348
|
-
/* @__PURE__ */ (0,
|
|
2349
|
-
/* @__PURE__ */ (0,
|
|
2519
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
2520
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "m-b-2", children: editableItem }),
|
|
2521
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
|
|
2522
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_components30.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
|
|
2523
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_components30.Button, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
|
|
2350
2524
|
] })
|
|
2351
2525
|
] }),
|
|
2352
2526
|
onClose: () => onCancelEdit()
|
|
@@ -2358,10 +2532,10 @@ function ItemSummaryOption({
|
|
|
2358
2532
|
item,
|
|
2359
2533
|
onClick
|
|
2360
2534
|
}) {
|
|
2361
|
-
return /* @__PURE__ */ (0,
|
|
2362
|
-
|
|
2535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2536
|
+
import_components30.NavigationOption,
|
|
2363
2537
|
{
|
|
2364
|
-
media: /* @__PURE__ */ (0,
|
|
2538
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(OptionMedia, { media: item.media, preferAvatar: false }),
|
|
2365
2539
|
title: item.title,
|
|
2366
2540
|
content: item.description,
|
|
2367
2541
|
showMediaAtAllSizes: true,
|
|
@@ -2372,7 +2546,7 @@ function ItemSummaryOption({
|
|
|
2372
2546
|
var RepeatableRenderer_default = RepeatableRenderer;
|
|
2373
2547
|
|
|
2374
2548
|
// ../renderers/src/ReviewRenderer.tsx
|
|
2375
|
-
var
|
|
2549
|
+
var import_components31 = require("@transferwise/components");
|
|
2376
2550
|
|
|
2377
2551
|
// ../renderers/src/utils/getHeaderAction.tsx
|
|
2378
2552
|
var getHeaderAction = (callToAction) => {
|
|
@@ -2396,15 +2570,15 @@ var getHeaderAction = (callToAction) => {
|
|
|
2396
2570
|
};
|
|
2397
2571
|
|
|
2398
2572
|
// ../renderers/src/ReviewRenderer.tsx
|
|
2399
|
-
var
|
|
2573
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2400
2574
|
var ReviewRenderer = {
|
|
2401
2575
|
canRenderType: "review",
|
|
2402
2576
|
render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
|
|
2403
2577
|
const orientation = mapControlToDefinitionListLayout(control);
|
|
2404
|
-
return /* @__PURE__ */ (0,
|
|
2405
|
-
(title || callToAction) && /* @__PURE__ */ (0,
|
|
2406
|
-
/* @__PURE__ */ (0,
|
|
2407
|
-
|
|
2578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: getMargin(margin), children: [
|
|
2579
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components31.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
|
|
2580
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2581
|
+
import_components31.DefinitionList,
|
|
2408
2582
|
{
|
|
2409
2583
|
layout: orientation,
|
|
2410
2584
|
definitions: fields.map(
|
|
@@ -2442,21 +2616,21 @@ var mapControlToDefinitionListLayout = (control) => {
|
|
|
2442
2616
|
};
|
|
2443
2617
|
var getFieldValue = (value, help, orientation, onClick) => {
|
|
2444
2618
|
if (help) {
|
|
2445
|
-
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0,
|
|
2446
|
-
/* @__PURE__ */ (0,
|
|
2619
|
+
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
2620
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Help_default, { help, onClick }),
|
|
2447
2621
|
" ",
|
|
2448
2622
|
value
|
|
2449
|
-
] }) : /* @__PURE__ */ (0,
|
|
2623
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
2450
2624
|
value,
|
|
2451
2625
|
" ",
|
|
2452
|
-
/* @__PURE__ */ (0,
|
|
2626
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Help_default, { help, onClick })
|
|
2453
2627
|
] });
|
|
2454
2628
|
}
|
|
2455
2629
|
return value;
|
|
2456
2630
|
};
|
|
2457
2631
|
|
|
2458
2632
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
2459
|
-
var
|
|
2633
|
+
var import_components33 = require("@transferwise/components");
|
|
2460
2634
|
var import_react9 = require("react");
|
|
2461
2635
|
var import_react_intl16 = require("react-intl");
|
|
2462
2636
|
|
|
@@ -2494,8 +2668,8 @@ var generic_error_messages_default = (0, import_react_intl14.defineMessages)({
|
|
|
2494
2668
|
});
|
|
2495
2669
|
|
|
2496
2670
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
2497
|
-
var
|
|
2498
|
-
var
|
|
2671
|
+
var import_components32 = require("@transferwise/components");
|
|
2672
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2499
2673
|
function ErrorResult({ state }) {
|
|
2500
2674
|
const intl = (0, import_react_intl15.useIntl)();
|
|
2501
2675
|
const buttonVisualProps = {
|
|
@@ -2503,11 +2677,11 @@ function ErrorResult({ state }) {
|
|
|
2503
2677
|
size: "sm",
|
|
2504
2678
|
style: { marginTop: "-2px", padding: "0", width: "auto", display: "inline" }
|
|
2505
2679
|
};
|
|
2506
|
-
return /* @__PURE__ */ (0,
|
|
2680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("p", { className: "m-t-2", children: [
|
|
2507
2681
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
2508
2682
|
"\xA0",
|
|
2509
|
-
/* @__PURE__ */ (0,
|
|
2510
|
-
|
|
2683
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2684
|
+
import_components32.Button,
|
|
2511
2685
|
__spreadProps(__spreadValues({}, buttonVisualProps), {
|
|
2512
2686
|
onClick: () => {
|
|
2513
2687
|
state.onRetry();
|
|
@@ -2519,7 +2693,7 @@ function ErrorResult({ state }) {
|
|
|
2519
2693
|
}
|
|
2520
2694
|
|
|
2521
2695
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
2522
|
-
var
|
|
2696
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2523
2697
|
function BlockSearchRendererComponent({
|
|
2524
2698
|
id,
|
|
2525
2699
|
isLoading,
|
|
@@ -2532,9 +2706,9 @@ function BlockSearchRendererComponent({
|
|
|
2532
2706
|
}) {
|
|
2533
2707
|
const [hasSearched, setHasSearched] = (0, import_react9.useState)(false);
|
|
2534
2708
|
const { formatMessage } = (0, import_react_intl16.useIntl)();
|
|
2535
|
-
return /* @__PURE__ */ (0,
|
|
2536
|
-
/* @__PURE__ */ (0,
|
|
2537
|
-
|
|
2709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: getMargin(margin), children: [
|
|
2710
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2711
|
+
import_components33.Input,
|
|
2538
2712
|
{
|
|
2539
2713
|
id,
|
|
2540
2714
|
name: id,
|
|
@@ -2550,7 +2724,7 @@ function BlockSearchRendererComponent({
|
|
|
2550
2724
|
}
|
|
2551
2725
|
}
|
|
2552
2726
|
) }),
|
|
2553
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
2727
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx_runtime49.Fragment, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SearchResultContent, { state, trackEvent })
|
|
2554
2728
|
] });
|
|
2555
2729
|
}
|
|
2556
2730
|
function SearchResultContent({
|
|
@@ -2559,31 +2733,31 @@ function SearchResultContent({
|
|
|
2559
2733
|
}) {
|
|
2560
2734
|
switch (state.type) {
|
|
2561
2735
|
case "error":
|
|
2562
|
-
return /* @__PURE__ */ (0,
|
|
2736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ErrorResult, { state });
|
|
2563
2737
|
case "results":
|
|
2564
|
-
return /* @__PURE__ */ (0,
|
|
2738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SearchResults, { state, trackEvent });
|
|
2565
2739
|
case "noResults":
|
|
2566
|
-
return /* @__PURE__ */ (0,
|
|
2740
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(EmptySearchResult, { state });
|
|
2567
2741
|
case "pending":
|
|
2568
2742
|
default:
|
|
2569
2743
|
return null;
|
|
2570
2744
|
}
|
|
2571
2745
|
}
|
|
2572
2746
|
function EmptySearchResult({ state }) {
|
|
2573
|
-
return /* @__PURE__ */ (0,
|
|
2747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components33.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
2574
2748
|
}
|
|
2575
2749
|
function SearchResults({
|
|
2576
2750
|
state,
|
|
2577
2751
|
trackEvent
|
|
2578
2752
|
}) {
|
|
2579
|
-
return /* @__PURE__ */ (0,
|
|
2580
|
-
const {
|
|
2581
|
-
return /* @__PURE__ */ (0,
|
|
2582
|
-
|
|
2753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components33.NavigationOptionsList, { children: state.results.map((result) => {
|
|
2754
|
+
const { media } = result;
|
|
2755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2756
|
+
import_components33.NavigationOption,
|
|
2583
2757
|
{
|
|
2584
2758
|
title: result.title,
|
|
2585
2759
|
content: result.description,
|
|
2586
|
-
media: OptionMedia({
|
|
2760
|
+
media: OptionMedia({ media, preferAvatar: false }),
|
|
2587
2761
|
showMediaCircle: false,
|
|
2588
2762
|
showMediaAtAllSizes: true,
|
|
2589
2763
|
onClick: () => {
|
|
@@ -2600,11 +2774,11 @@ function SearchResults({
|
|
|
2600
2774
|
var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
|
|
2601
2775
|
|
|
2602
2776
|
// ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
|
|
2603
|
-
var
|
|
2777
|
+
var import_components34 = require("@transferwise/components");
|
|
2604
2778
|
var import_icons2 = require("@transferwise/icons");
|
|
2605
2779
|
var import_react10 = require("react");
|
|
2606
2780
|
var import_react_intl17 = require("react-intl");
|
|
2607
|
-
var
|
|
2781
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2608
2782
|
function InlineSearchRenderer({
|
|
2609
2783
|
id,
|
|
2610
2784
|
isLoading,
|
|
@@ -2616,18 +2790,18 @@ function InlineSearchRenderer({
|
|
|
2616
2790
|
}) {
|
|
2617
2791
|
const [hasSearched, setHasSearched] = (0, import_react10.useState)(false);
|
|
2618
2792
|
const intl = (0, import_react_intl17.useIntl)();
|
|
2619
|
-
return /* @__PURE__ */ (0,
|
|
2620
|
-
|
|
2793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2794
|
+
import_components34.Typeahead,
|
|
2621
2795
|
{
|
|
2622
2796
|
id: "typeahead-input-id",
|
|
2623
2797
|
intl,
|
|
2624
2798
|
name: "typeahead-input-name",
|
|
2625
2799
|
size: "md",
|
|
2626
2800
|
maxHeight: 100,
|
|
2627
|
-
footer: /* @__PURE__ */ (0,
|
|
2801
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TypeaheadFooter, { state, isLoading }),
|
|
2628
2802
|
multiple: false,
|
|
2629
2803
|
clearable: false,
|
|
2630
|
-
addon: /* @__PURE__ */ (0,
|
|
2804
|
+
addon: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_icons2.Search, { size: 24 }),
|
|
2631
2805
|
options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
|
|
2632
2806
|
minQueryLength: 1,
|
|
2633
2807
|
onChange: (values) => {
|
|
@@ -2664,34 +2838,34 @@ function mapResultToTypeaheadOption(result) {
|
|
|
2664
2838
|
function TypeaheadFooter({ state, isLoading }) {
|
|
2665
2839
|
const { formatMessage } = (0, import_react_intl17.useIntl)();
|
|
2666
2840
|
if (state.type === "noResults") {
|
|
2667
|
-
return /* @__PURE__ */ (0,
|
|
2841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_components34.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
2668
2842
|
}
|
|
2669
2843
|
if (state.type === "error") {
|
|
2670
|
-
return /* @__PURE__ */ (0,
|
|
2844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ErrorResult, { state }) });
|
|
2671
2845
|
}
|
|
2672
2846
|
if (state.type === "pending" || isLoading) {
|
|
2673
|
-
return /* @__PURE__ */ (0,
|
|
2847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
|
|
2674
2848
|
}
|
|
2675
2849
|
return null;
|
|
2676
2850
|
}
|
|
2677
2851
|
var InlineSearchRendererComponent_default = InlineSearchRenderer;
|
|
2678
2852
|
|
|
2679
2853
|
// ../renderers/src/SearchRenderer/SearchRenderer.tsx
|
|
2680
|
-
var
|
|
2854
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
2681
2855
|
var SearchRenderer = {
|
|
2682
2856
|
canRenderType: "search",
|
|
2683
|
-
render: (props) => props.control === "inline" ? /* @__PURE__ */ (0,
|
|
2857
|
+
render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
|
|
2684
2858
|
};
|
|
2685
2859
|
var SearchRenderer_default = SearchRenderer;
|
|
2686
2860
|
|
|
2687
2861
|
// ../renderers/src/SectionRenderer.tsx
|
|
2688
|
-
var
|
|
2689
|
-
var
|
|
2862
|
+
var import_components35 = require("@transferwise/components");
|
|
2863
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2690
2864
|
var SectionRenderer = {
|
|
2691
2865
|
canRenderType: "section",
|
|
2692
2866
|
render: ({ children, callToAction, margin, title }) => {
|
|
2693
|
-
return /* @__PURE__ */ (0,
|
|
2694
|
-
(title || callToAction) && /* @__PURE__ */ (0,
|
|
2867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("section", { className: getMargin(margin), children: [
|
|
2868
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components35.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
|
|
2695
2869
|
children
|
|
2696
2870
|
] });
|
|
2697
2871
|
}
|
|
@@ -2699,8 +2873,8 @@ var SectionRenderer = {
|
|
|
2699
2873
|
var SectionRenderer_default = SectionRenderer;
|
|
2700
2874
|
|
|
2701
2875
|
// ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
2702
|
-
var
|
|
2703
|
-
var
|
|
2876
|
+
var import_components36 = require("@transferwise/components");
|
|
2877
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2704
2878
|
function RadioInputRendererComponent(props) {
|
|
2705
2879
|
const {
|
|
2706
2880
|
id,
|
|
@@ -2714,8 +2888,8 @@ function RadioInputRendererComponent(props) {
|
|
|
2714
2888
|
validationState,
|
|
2715
2889
|
onSelect
|
|
2716
2890
|
} = props;
|
|
2717
|
-
return /* @__PURE__ */ (0,
|
|
2718
|
-
/* @__PURE__ */ (0,
|
|
2891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
|
|
2892
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2719
2893
|
FieldInput_default,
|
|
2720
2894
|
{
|
|
2721
2895
|
id,
|
|
@@ -2723,8 +2897,8 @@ function RadioInputRendererComponent(props) {
|
|
|
2723
2897
|
help,
|
|
2724
2898
|
description,
|
|
2725
2899
|
validation: validationState,
|
|
2726
|
-
children: /* @__PURE__ */ (0,
|
|
2727
|
-
|
|
2900
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2901
|
+
import_components36.RadioGroup,
|
|
2728
2902
|
{
|
|
2729
2903
|
name: id,
|
|
2730
2904
|
radios: options.map((option, index) => ({
|
|
@@ -2732,7 +2906,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2732
2906
|
value: index,
|
|
2733
2907
|
secondary: option.description,
|
|
2734
2908
|
disabled: option.disabled || disabled,
|
|
2735
|
-
avatar: /* @__PURE__ */ (0,
|
|
2909
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
|
|
2736
2910
|
})),
|
|
2737
2911
|
selectedValue: selectedIndex != null ? selectedIndex : void 0,
|
|
2738
2912
|
onChange: onSelect
|
|
@@ -2746,9 +2920,9 @@ function RadioInputRendererComponent(props) {
|
|
|
2746
2920
|
}
|
|
2747
2921
|
|
|
2748
2922
|
// ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
2749
|
-
var
|
|
2923
|
+
var import_components37 = require("@transferwise/components");
|
|
2750
2924
|
var import_react11 = require("react");
|
|
2751
|
-
var
|
|
2925
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2752
2926
|
function TabInputRendererComponent(props) {
|
|
2753
2927
|
const {
|
|
2754
2928
|
id,
|
|
@@ -2767,8 +2941,8 @@ function TabInputRendererComponent(props) {
|
|
|
2767
2941
|
onSelect(0);
|
|
2768
2942
|
}
|
|
2769
2943
|
}, [selectedIndex, onSelect, options.length]);
|
|
2770
|
-
return /* @__PURE__ */ (0,
|
|
2771
|
-
/* @__PURE__ */ (0,
|
|
2944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
2945
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2772
2946
|
FieldInput_default,
|
|
2773
2947
|
{
|
|
2774
2948
|
id,
|
|
@@ -2776,8 +2950,8 @@ function TabInputRendererComponent(props) {
|
|
|
2776
2950
|
help,
|
|
2777
2951
|
description,
|
|
2778
2952
|
validation: validationState,
|
|
2779
|
-
children: /* @__PURE__ */ (0,
|
|
2780
|
-
|
|
2953
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2954
|
+
import_components37.Tabs,
|
|
2781
2955
|
{
|
|
2782
2956
|
name: id,
|
|
2783
2957
|
selected: selectedIndex != null ? selectedIndex : 0,
|
|
@@ -2785,7 +2959,7 @@ function TabInputRendererComponent(props) {
|
|
|
2785
2959
|
title: option.title,
|
|
2786
2960
|
// if we pass null, we get some props-types console errors
|
|
2787
2961
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
2788
|
-
content: /* @__PURE__ */ (0,
|
|
2962
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_jsx_runtime54.Fragment, {}),
|
|
2789
2963
|
disabled: option.disabled || disabled
|
|
2790
2964
|
})),
|
|
2791
2965
|
onTabSelect: onSelect
|
|
@@ -2799,8 +2973,8 @@ function TabInputRendererComponent(props) {
|
|
|
2799
2973
|
var isValidIndex = (index, options) => index !== null && index >= 0 && index < options;
|
|
2800
2974
|
|
|
2801
2975
|
// ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
2802
|
-
var
|
|
2803
|
-
var
|
|
2976
|
+
var import_components38 = require("@transferwise/components");
|
|
2977
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2804
2978
|
function SelectInputRendererComponent(props) {
|
|
2805
2979
|
const {
|
|
2806
2980
|
id,
|
|
@@ -2836,17 +3010,17 @@ function SelectInputRendererComponent(props) {
|
|
|
2836
3010
|
const contentProps = withinTrigger ? {
|
|
2837
3011
|
title: option.title,
|
|
2838
3012
|
note: option.description,
|
|
2839
|
-
icon:
|
|
3013
|
+
icon: getInlineMedia(option.media)
|
|
2840
3014
|
} : {
|
|
2841
3015
|
title: option.title,
|
|
2842
3016
|
description: option.description,
|
|
2843
|
-
icon: /* @__PURE__ */ (0,
|
|
3017
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
|
|
2844
3018
|
};
|
|
2845
|
-
return /* @__PURE__ */ (0,
|
|
3019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components38.SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
2846
3020
|
};
|
|
2847
3021
|
const extraProps = { autoComplete };
|
|
2848
|
-
return /* @__PURE__ */ (0,
|
|
2849
|
-
/* @__PURE__ */ (0,
|
|
3022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
3023
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2850
3024
|
FieldInput_default,
|
|
2851
3025
|
{
|
|
2852
3026
|
id,
|
|
@@ -2854,8 +3028,8 @@ function SelectInputRendererComponent(props) {
|
|
|
2854
3028
|
help,
|
|
2855
3029
|
description,
|
|
2856
3030
|
validation: validationState,
|
|
2857
|
-
children: /* @__PURE__ */ (0,
|
|
2858
|
-
|
|
3031
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3032
|
+
import_components38.SelectInput,
|
|
2859
3033
|
__spreadValues({
|
|
2860
3034
|
name: id,
|
|
2861
3035
|
placeholder,
|
|
@@ -2876,8 +3050,8 @@ function SelectInputRendererComponent(props) {
|
|
|
2876
3050
|
|
|
2877
3051
|
// ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
|
|
2878
3052
|
var import_react12 = require("react");
|
|
2879
|
-
var
|
|
2880
|
-
var
|
|
3053
|
+
var import_components39 = require("@transferwise/components");
|
|
3054
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2881
3055
|
function SegmentedInputRendererComponent(props) {
|
|
2882
3056
|
const {
|
|
2883
3057
|
id,
|
|
@@ -2895,8 +3069,8 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2895
3069
|
onSelect(0);
|
|
2896
3070
|
}
|
|
2897
3071
|
}, [selectedIndex, onSelect, options.length]);
|
|
2898
|
-
return /* @__PURE__ */ (0,
|
|
2899
|
-
/* @__PURE__ */ (0,
|
|
3072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
|
|
3073
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2900
3074
|
FieldInput_default,
|
|
2901
3075
|
{
|
|
2902
3076
|
id,
|
|
@@ -2904,8 +3078,8 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2904
3078
|
help,
|
|
2905
3079
|
description,
|
|
2906
3080
|
validation: validationState,
|
|
2907
|
-
children: /* @__PURE__ */ (0,
|
|
2908
|
-
|
|
3081
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3082
|
+
import_components39.SegmentedControl,
|
|
2909
3083
|
{
|
|
2910
3084
|
name: `${id}-segmented-control`,
|
|
2911
3085
|
value: String(selectedIndex),
|
|
@@ -2921,44 +3095,44 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2921
3095
|
)
|
|
2922
3096
|
}
|
|
2923
3097
|
),
|
|
2924
|
-
/* @__PURE__ */ (0,
|
|
3098
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { id: `${id}-children`, children })
|
|
2925
3099
|
] });
|
|
2926
3100
|
}
|
|
2927
3101
|
var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
|
|
2928
3102
|
|
|
2929
3103
|
// ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
|
|
2930
|
-
var
|
|
3104
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
2931
3105
|
var SelectInputRenderer = {
|
|
2932
3106
|
canRenderType: "input-select",
|
|
2933
3107
|
render: (props) => {
|
|
2934
3108
|
switch (props.control) {
|
|
2935
3109
|
case "radio":
|
|
2936
|
-
return /* @__PURE__ */ (0,
|
|
3110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
|
|
2937
3111
|
case "tab":
|
|
2938
|
-
return props.options.length > 3 ? /* @__PURE__ */ (0,
|
|
3112
|
+
return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TabInputRendererComponent, __spreadValues({}, props));
|
|
2939
3113
|
case "segmented":
|
|
2940
|
-
return props.options.length > 3 ? /* @__PURE__ */ (0,
|
|
3114
|
+
return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
|
|
2941
3115
|
case "select":
|
|
2942
3116
|
default:
|
|
2943
|
-
return /* @__PURE__ */ (0,
|
|
3117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
|
|
2944
3118
|
}
|
|
2945
3119
|
}
|
|
2946
3120
|
};
|
|
2947
3121
|
var SelectInputRenderer_default = SelectInputRenderer;
|
|
2948
3122
|
|
|
2949
3123
|
// ../renderers/src/StatusListRenderer.tsx
|
|
2950
|
-
var
|
|
2951
|
-
var
|
|
3124
|
+
var import_components40 = require("@transferwise/components");
|
|
3125
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
2952
3126
|
var StatusListRenderer = {
|
|
2953
3127
|
canRenderType: "status-list",
|
|
2954
|
-
render: ({ margin, items, title }) => /* @__PURE__ */ (0,
|
|
2955
|
-
title ? /* @__PURE__ */ (0,
|
|
2956
|
-
items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0,
|
|
2957
|
-
|
|
3128
|
+
render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: getMargin(margin), children: [
|
|
3129
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components40.Header, { title, className: "m-b-2" }) : null,
|
|
3130
|
+
items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
3131
|
+
import_components40.Summary,
|
|
2958
3132
|
{
|
|
2959
3133
|
title: itemTitle,
|
|
2960
3134
|
description,
|
|
2961
|
-
icon: icon && "name" in icon ? /* @__PURE__ */ (0,
|
|
3135
|
+
icon: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DynamicIcon_default, { name: icon.name }) : null,
|
|
2962
3136
|
status: mapStatus(status),
|
|
2963
3137
|
action: getSummaryAction(callToAction)
|
|
2964
3138
|
},
|
|
@@ -3010,11 +3184,11 @@ var useCustomTheme = (theme, trackEvent) => {
|
|
|
3010
3184
|
};
|
|
3011
3185
|
|
|
3012
3186
|
// ../renderers/src/step/BackButton.tsx
|
|
3013
|
-
var
|
|
3187
|
+
var import_components41 = require("@transferwise/components");
|
|
3014
3188
|
var import_icons3 = require("@transferwise/icons");
|
|
3015
|
-
var
|
|
3189
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3016
3190
|
function BackButton({ title, onClick }) {
|
|
3017
|
-
return /* @__PURE__ */ (0,
|
|
3191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "m-b-2", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
3018
3192
|
"button",
|
|
3019
3193
|
{
|
|
3020
3194
|
type: "button",
|
|
@@ -3023,8 +3197,8 @@ function BackButton({ title, onClick }) {
|
|
|
3023
3197
|
"aria-label": title,
|
|
3024
3198
|
onClick,
|
|
3025
3199
|
children: [
|
|
3026
|
-
/* @__PURE__ */ (0,
|
|
3027
|
-
/* @__PURE__ */ (0,
|
|
3200
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "sr-only", children: title }),
|
|
3201
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_components41.AvatarView, { interactive: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_icons3.ArrowLeft, { size: "24" }) })
|
|
3028
3202
|
]
|
|
3029
3203
|
}
|
|
3030
3204
|
) });
|
|
@@ -3032,7 +3206,7 @@ function BackButton({ title, onClick }) {
|
|
|
3032
3206
|
var BackButton_default = BackButton;
|
|
3033
3207
|
|
|
3034
3208
|
// ../renderers/src/step/SplashCelebrationStepRenderer.tsx
|
|
3035
|
-
var
|
|
3209
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3036
3210
|
var SplashCelebrationStepRenderer = {
|
|
3037
3211
|
canRenderType: "step",
|
|
3038
3212
|
canRender: ({ control }) => control === "splash-celebration",
|
|
@@ -3041,14 +3215,14 @@ var SplashCelebrationStepRenderer = {
|
|
|
3041
3215
|
function SplashCelebrationStepRendererComponent(props) {
|
|
3042
3216
|
const { back, children, trackEvent } = props;
|
|
3043
3217
|
useCustomTheme("forest-green", trackEvent);
|
|
3044
|
-
return /* @__PURE__ */ (0,
|
|
3045
|
-
back ? /* @__PURE__ */ (0,
|
|
3218
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "splash-screen m-t-5", children: [
|
|
3219
|
+
back ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(BackButton_default, __spreadValues({}, back)) : null,
|
|
3046
3220
|
children
|
|
3047
3221
|
] });
|
|
3048
3222
|
}
|
|
3049
3223
|
|
|
3050
3224
|
// ../renderers/src/step/SplashStepRenderer.tsx
|
|
3051
|
-
var
|
|
3225
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
3052
3226
|
var SplashStepRenderer = {
|
|
3053
3227
|
canRenderType: "step",
|
|
3054
3228
|
canRender: ({ control }) => control === "splash",
|
|
@@ -3056,63 +3230,63 @@ var SplashStepRenderer = {
|
|
|
3056
3230
|
};
|
|
3057
3231
|
function SplashStepRendererComponent(props) {
|
|
3058
3232
|
const { back, children } = props;
|
|
3059
|
-
return /* @__PURE__ */ (0,
|
|
3060
|
-
back ? /* @__PURE__ */ (0,
|
|
3233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "splash-screen m-t-5", children: [
|
|
3234
|
+
back ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(BackButton_default, __spreadValues({}, back)) : null,
|
|
3061
3235
|
children
|
|
3062
3236
|
] });
|
|
3063
3237
|
}
|
|
3064
3238
|
|
|
3065
3239
|
// ../renderers/src/step/StepRenderer.tsx
|
|
3066
|
-
var
|
|
3067
|
-
var
|
|
3240
|
+
var import_components42 = require("@transferwise/components");
|
|
3241
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
3068
3242
|
var StepRenderer = {
|
|
3069
3243
|
canRenderType: "step",
|
|
3070
3244
|
render: StepRendererComponent
|
|
3071
3245
|
};
|
|
3072
3246
|
function StepRendererComponent(props) {
|
|
3073
3247
|
const { back, description, error, title, children } = props;
|
|
3074
|
-
return /* @__PURE__ */ (0,
|
|
3075
|
-
back ? /* @__PURE__ */ (0,
|
|
3076
|
-
title || description ? /* @__PURE__ */ (0,
|
|
3077
|
-
title ? /* @__PURE__ */ (0,
|
|
3078
|
-
description ? /* @__PURE__ */ (0,
|
|
3248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
|
|
3249
|
+
back ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(BackButton_default, __spreadValues({}, back)) : null,
|
|
3250
|
+
title || description ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "m-b-4", children: [
|
|
3251
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components42.Title, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
|
|
3252
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { className: "text-xs-center np-text-body-large", children: description }) : void 0
|
|
3079
3253
|
] }) : void 0,
|
|
3080
|
-
error ? /* @__PURE__ */ (0,
|
|
3254
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components42.Alert, { type: "negative", className: "m-b-2", message: error }) : void 0,
|
|
3081
3255
|
children
|
|
3082
3256
|
] });
|
|
3083
3257
|
}
|
|
3084
3258
|
|
|
3085
3259
|
// ../renderers/src/TabsRenderer.tsx
|
|
3086
|
-
var
|
|
3260
|
+
var import_components43 = require("@transferwise/components");
|
|
3087
3261
|
var import_react14 = require("react");
|
|
3088
|
-
var
|
|
3262
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
3089
3263
|
var TabsRenderer = {
|
|
3090
3264
|
canRenderType: "tabs",
|
|
3091
3265
|
render: (props) => {
|
|
3092
3266
|
switch (props.control) {
|
|
3093
3267
|
case "segmented":
|
|
3094
3268
|
if (props.tabs.length > 3) {
|
|
3095
|
-
return /* @__PURE__ */ (0,
|
|
3269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(TabsRendererComponent, __spreadValues({}, props));
|
|
3096
3270
|
}
|
|
3097
|
-
return /* @__PURE__ */ (0,
|
|
3271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(SegmentedTabsRendererComponent, __spreadValues({}, props));
|
|
3098
3272
|
case "chips":
|
|
3099
|
-
return /* @__PURE__ */ (0,
|
|
3273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(ChipsTabsRendererComponent, __spreadValues({}, props));
|
|
3100
3274
|
default:
|
|
3101
|
-
return /* @__PURE__ */ (0,
|
|
3275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(TabsRendererComponent, __spreadValues({}, props));
|
|
3102
3276
|
}
|
|
3103
3277
|
}
|
|
3104
3278
|
};
|
|
3105
3279
|
function TabsRendererComponent({ uid, margin, tabs }) {
|
|
3106
3280
|
const [selectedIndex, setSelectedIndex] = (0, import_react14.useState)(0);
|
|
3107
|
-
return /* @__PURE__ */ (0,
|
|
3108
|
-
|
|
3281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3282
|
+
import_components43.Tabs,
|
|
3109
3283
|
{
|
|
3110
3284
|
name: uid,
|
|
3111
3285
|
selected: selectedIndex != null ? selectedIndex : 0,
|
|
3112
3286
|
tabs: tabs.map((option) => ({
|
|
3113
3287
|
title: option.title,
|
|
3114
3288
|
disabled: false,
|
|
3115
|
-
content: /* @__PURE__ */ (0,
|
|
3289
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "m-t-2", children: [
|
|
3116
3290
|
" ",
|
|
3117
3291
|
option.children,
|
|
3118
3292
|
" "
|
|
@@ -3125,9 +3299,9 @@ function TabsRendererComponent({ uid, margin, tabs }) {
|
|
|
3125
3299
|
function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
3126
3300
|
var _a;
|
|
3127
3301
|
const [selectedIndex, setSelectedIndex] = (0, import_react14.useState)(0);
|
|
3128
|
-
return /* @__PURE__ */ (0,
|
|
3129
|
-
/* @__PURE__ */ (0,
|
|
3130
|
-
|
|
3302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: getMargin(margin), children: [
|
|
3303
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3304
|
+
import_components43.SegmentedControl,
|
|
3131
3305
|
{
|
|
3132
3306
|
name: uid,
|
|
3133
3307
|
value: String(selectedIndex),
|
|
@@ -3141,31 +3315,31 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
|
3141
3315
|
onChange: (value) => setSelectedIndex(Number(value))
|
|
3142
3316
|
}
|
|
3143
3317
|
),
|
|
3144
|
-
/* @__PURE__ */ (0,
|
|
3318
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
3145
3319
|
] });
|
|
3146
3320
|
}
|
|
3147
3321
|
function ChipsTabsRendererComponent({ margin, tabs }) {
|
|
3148
3322
|
var _a;
|
|
3149
3323
|
const [selectedIndex, setSelectedIndex] = (0, import_react14.useState)(0);
|
|
3150
|
-
return /* @__PURE__ */ (0,
|
|
3151
|
-
/* @__PURE__ */ (0,
|
|
3152
|
-
|
|
3324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: getMargin(margin), children: [
|
|
3325
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "chips-container", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3326
|
+
import_components43.Chips,
|
|
3153
3327
|
{
|
|
3154
3328
|
chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
|
|
3155
3329
|
selected: selectedIndex,
|
|
3156
3330
|
onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
|
|
3157
3331
|
}
|
|
3158
3332
|
) }),
|
|
3159
|
-
/* @__PURE__ */ (0,
|
|
3333
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
3160
3334
|
] });
|
|
3161
3335
|
}
|
|
3162
3336
|
|
|
3163
3337
|
// ../renderers/src/TextInputRenderer.tsx
|
|
3164
|
-
var
|
|
3338
|
+
var import_components45 = require("@transferwise/components");
|
|
3165
3339
|
|
|
3166
3340
|
// ../renderers/src/components/VariableTextInput.tsx
|
|
3167
|
-
var
|
|
3168
|
-
var
|
|
3341
|
+
var import_components44 = require("@transferwise/components");
|
|
3342
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
3169
3343
|
var commonKeys = [
|
|
3170
3344
|
"autoComplete",
|
|
3171
3345
|
"autoCapitalize",
|
|
@@ -3184,12 +3358,12 @@ function VariableTextInput(inputProps) {
|
|
|
3184
3358
|
const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
|
|
3185
3359
|
switch (control) {
|
|
3186
3360
|
case "email":
|
|
3187
|
-
return /* @__PURE__ */ (0,
|
|
3361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
|
|
3188
3362
|
case "password":
|
|
3189
|
-
return /* @__PURE__ */ (0,
|
|
3363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
|
|
3190
3364
|
case "numeric": {
|
|
3191
3365
|
const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
|
|
3192
|
-
return /* @__PURE__ */ (0,
|
|
3366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3193
3367
|
TextInput,
|
|
3194
3368
|
__spreadProps(__spreadValues({}, numericProps), {
|
|
3195
3369
|
onChange: (newValue) => {
|
|
@@ -3200,21 +3374,21 @@ function VariableTextInput(inputProps) {
|
|
|
3200
3374
|
);
|
|
3201
3375
|
}
|
|
3202
3376
|
case "phone-number":
|
|
3203
|
-
return /* @__PURE__ */ (0,
|
|
3377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components44.PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
|
|
3204
3378
|
default: {
|
|
3205
|
-
return /* @__PURE__ */ (0,
|
|
3379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
|
|
3206
3380
|
}
|
|
3207
3381
|
}
|
|
3208
3382
|
}
|
|
3209
3383
|
function TextInput(props) {
|
|
3210
3384
|
const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
|
|
3211
|
-
const InputWithPattern = control === "textarea" ?
|
|
3212
|
-
const InputWithoutPattern = control === "textarea" ?
|
|
3213
|
-
return displayFormat ? /* @__PURE__ */ (0,
|
|
3385
|
+
const InputWithPattern = control === "textarea" ? import_components44.TextareaWithDisplayFormat : import_components44.InputWithDisplayFormat;
|
|
3386
|
+
const InputWithoutPattern = control === "textarea" ? import_components44.TextArea : import_components44.Input;
|
|
3387
|
+
return displayFormat ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
|
|
3214
3388
|
}
|
|
3215
3389
|
|
|
3216
3390
|
// ../renderers/src/TextInputRenderer.tsx
|
|
3217
|
-
var
|
|
3391
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3218
3392
|
var TextInputRenderer = {
|
|
3219
3393
|
canRenderType: "input-text",
|
|
3220
3394
|
render: (props) => {
|
|
@@ -3223,8 +3397,7 @@ var TextInputRenderer = {
|
|
|
3223
3397
|
title,
|
|
3224
3398
|
description,
|
|
3225
3399
|
help,
|
|
3226
|
-
|
|
3227
|
-
image,
|
|
3400
|
+
media,
|
|
3228
3401
|
validationState,
|
|
3229
3402
|
value: initialValue,
|
|
3230
3403
|
onChange
|
|
@@ -3233,8 +3406,7 @@ var TextInputRenderer = {
|
|
|
3233
3406
|
"title",
|
|
3234
3407
|
"description",
|
|
3235
3408
|
"help",
|
|
3236
|
-
"
|
|
3237
|
-
"image",
|
|
3409
|
+
"media",
|
|
3238
3410
|
"validationState",
|
|
3239
3411
|
"value",
|
|
3240
3412
|
"onChange"
|
|
@@ -3249,7 +3421,7 @@ var TextInputRenderer = {
|
|
|
3249
3421
|
}
|
|
3250
3422
|
}
|
|
3251
3423
|
});
|
|
3252
|
-
return /* @__PURE__ */ (0,
|
|
3424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3253
3425
|
FieldInput_default,
|
|
3254
3426
|
{
|
|
3255
3427
|
id,
|
|
@@ -3257,7 +3429,7 @@ var TextInputRenderer = {
|
|
|
3257
3429
|
description,
|
|
3258
3430
|
validation: validationState,
|
|
3259
3431
|
help,
|
|
3260
|
-
children: /* @__PURE__ */ (0,
|
|
3432
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_components45.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(VariableTextInput, __spreadValues({}, inputProps)) })
|
|
3261
3433
|
}
|
|
3262
3434
|
);
|
|
3263
3435
|
}
|
|
@@ -3265,13 +3437,13 @@ var TextInputRenderer = {
|
|
|
3265
3437
|
var TextInputRenderer_default = TextInputRenderer;
|
|
3266
3438
|
|
|
3267
3439
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
3268
|
-
var
|
|
3440
|
+
var import_components46 = require("@transferwise/components");
|
|
3269
3441
|
|
|
3270
3442
|
// ../renderers/src/utils/getRandomId.ts
|
|
3271
3443
|
var getRandomId = () => Math.random().toString(36).substring(2);
|
|
3272
3444
|
|
|
3273
3445
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
3274
|
-
var
|
|
3446
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
3275
3447
|
var UploadInputRenderer = {
|
|
3276
3448
|
canRenderType: "input-upload",
|
|
3277
3449
|
render: (props) => {
|
|
@@ -3287,15 +3459,15 @@ var UploadInputRenderer = {
|
|
|
3287
3459
|
};
|
|
3288
3460
|
return (
|
|
3289
3461
|
// We don't pass help here as there is no sensible place to display it
|
|
3290
|
-
/* @__PURE__ */ (0,
|
|
3462
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3291
3463
|
UploadFieldInput_default,
|
|
3292
3464
|
{
|
|
3293
3465
|
id,
|
|
3294
3466
|
label: void 0,
|
|
3295
3467
|
description: void 0,
|
|
3296
3468
|
validation: validationState,
|
|
3297
|
-
children: /* @__PURE__ */ (0,
|
|
3298
|
-
|
|
3469
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3470
|
+
import_components46.UploadInput,
|
|
3299
3471
|
{
|
|
3300
3472
|
id,
|
|
3301
3473
|
description,
|
|
@@ -3353,7 +3525,7 @@ var LargeUploadRenderer = {
|
|
|
3353
3525
|
};
|
|
3354
3526
|
const filetypes = acceptsToFileTypes(accepts);
|
|
3355
3527
|
const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
|
|
3356
|
-
return /* @__PURE__ */ (0,
|
|
3528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3357
3529
|
FieldInput_default,
|
|
3358
3530
|
{
|
|
3359
3531
|
id,
|
|
@@ -3361,8 +3533,8 @@ var LargeUploadRenderer = {
|
|
|
3361
3533
|
description,
|
|
3362
3534
|
validation: validationState,
|
|
3363
3535
|
help,
|
|
3364
|
-
children: /* @__PURE__ */ (0,
|
|
3365
|
-
|
|
3536
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3537
|
+
import_components46.Upload,
|
|
3366
3538
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
3367
3539
|
usAccept,
|
|
3368
3540
|
usDisabled: disabled,
|
|
@@ -3376,8 +3548,183 @@ var LargeUploadRenderer = {
|
|
|
3376
3548
|
}
|
|
3377
3549
|
};
|
|
3378
3550
|
|
|
3551
|
+
// ../renderers/src/NewListItem/NewDecisionRenderer.tsx
|
|
3552
|
+
var import_components48 = require("@transferwise/components");
|
|
3553
|
+
|
|
3554
|
+
// ../renderers/src/NewListItem/getInlineAlert.tsx
|
|
3555
|
+
var import_components47 = require("@transferwise/components");
|
|
3556
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
3557
|
+
var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_components47.ListItem.Prompt, { sentiment: inlineAlert == null ? void 0 : inlineAlert.context, children: inlineAlert.content }) : void 0;
|
|
3558
|
+
|
|
3559
|
+
// ../renderers/src/NewListItem/NewDecisionRenderer.tsx
|
|
3560
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
3561
|
+
var DecisionRenderer2 = {
|
|
3562
|
+
canRenderType: "decision",
|
|
3563
|
+
render: ({ control, margin, options, title }) => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: getMargin(margin), children: [
|
|
3564
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_components48.Header, { as: "h2", title }),
|
|
3565
|
+
options.map((option) => {
|
|
3566
|
+
const {
|
|
3567
|
+
description,
|
|
3568
|
+
disabled,
|
|
3569
|
+
media,
|
|
3570
|
+
title: itemTitle,
|
|
3571
|
+
tag,
|
|
3572
|
+
href,
|
|
3573
|
+
additionalText,
|
|
3574
|
+
inlineAlert,
|
|
3575
|
+
supportingValues,
|
|
3576
|
+
onClick
|
|
3577
|
+
} = option;
|
|
3578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3579
|
+
import_components48.ListItem,
|
|
3580
|
+
{
|
|
3581
|
+
title: itemTitle,
|
|
3582
|
+
subtitle: description,
|
|
3583
|
+
spotlight: control === "spotlight" ? tag === "spotlight-active" ? "active" : "inactive" : void 0,
|
|
3584
|
+
disabled,
|
|
3585
|
+
valueTitle: supportingValues == null ? void 0 : supportingValues.value,
|
|
3586
|
+
valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
|
|
3587
|
+
media: media ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3588
|
+
OptionMedia,
|
|
3589
|
+
{
|
|
3590
|
+
media,
|
|
3591
|
+
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
3592
|
+
}
|
|
3593
|
+
) : void 0,
|
|
3594
|
+
prompt: getInlineAlert(inlineAlert),
|
|
3595
|
+
additionalInfo: additionalText ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_components48.ListItem.AdditionalInfo, { children: additionalText }) : void 0,
|
|
3596
|
+
control: href ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_components48.ListItem.Navigation, { href, target: "_blank" }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_components48.ListItem.Navigation, { onClick })
|
|
3597
|
+
},
|
|
3598
|
+
JSON.stringify(option)
|
|
3599
|
+
);
|
|
3600
|
+
})
|
|
3601
|
+
] })
|
|
3602
|
+
};
|
|
3603
|
+
var NewDecisionRenderer_default = DecisionRenderer2;
|
|
3604
|
+
|
|
3605
|
+
// ../renderers/src/NewListItem/NewListRenderer.tsx
|
|
3606
|
+
var import_components50 = require("@transferwise/components");
|
|
3607
|
+
|
|
3608
|
+
// ../renderers/src/NewListItem/getAdditionalInfo.tsx
|
|
3609
|
+
var import_components49 = require("@transferwise/components");
|
|
3610
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
3611
|
+
var getAdditionalInfo = (additionalInfo) => {
|
|
3612
|
+
var _a;
|
|
3613
|
+
return additionalInfo ? (
|
|
3614
|
+
// TODO: this type should have an href so we can render anchors
|
|
3615
|
+
additionalInfo.onClick ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3616
|
+
import_components49.ListItem.AdditionalInfo,
|
|
3617
|
+
{
|
|
3618
|
+
action: {
|
|
3619
|
+
onClick: additionalInfo.onClick,
|
|
3620
|
+
label: (_a = additionalInfo.text) != null ? _a : ""
|
|
3621
|
+
}
|
|
3622
|
+
}
|
|
3623
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_components49.ListItem.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text })
|
|
3624
|
+
) : void 0;
|
|
3625
|
+
};
|
|
3626
|
+
|
|
3627
|
+
// ../renderers/src/NewListItem/NewListRenderer.tsx
|
|
3628
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3629
|
+
var ListRenderer2 = {
|
|
3630
|
+
canRenderType: "list",
|
|
3631
|
+
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: getMargin(margin), children: [
|
|
3632
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components50.Header, { as: "h2", title: title != null ? title : "", action: getListAction2(callToAction) }),
|
|
3633
|
+
items.map(
|
|
3634
|
+
({
|
|
3635
|
+
title: itemTitle,
|
|
3636
|
+
description,
|
|
3637
|
+
supportingValues,
|
|
3638
|
+
media,
|
|
3639
|
+
tag,
|
|
3640
|
+
additionalInfo,
|
|
3641
|
+
inlineAlert
|
|
3642
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3643
|
+
import_components50.ListItem,
|
|
3644
|
+
{
|
|
3645
|
+
title: itemTitle,
|
|
3646
|
+
subtitle: description,
|
|
3647
|
+
valueTitle: supportingValues == null ? void 0 : supportingValues.value,
|
|
3648
|
+
valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
|
|
3649
|
+
media: media ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3650
|
+
OptionMedia,
|
|
3651
|
+
{
|
|
3652
|
+
media,
|
|
3653
|
+
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
3654
|
+
}
|
|
3655
|
+
) : void 0,
|
|
3656
|
+
prompt: getInlineAlert(inlineAlert),
|
|
3657
|
+
additionalInfo: getAdditionalInfo(additionalInfo)
|
|
3658
|
+
},
|
|
3659
|
+
itemTitle
|
|
3660
|
+
)
|
|
3661
|
+
)
|
|
3662
|
+
] })
|
|
3663
|
+
};
|
|
3664
|
+
var getListAction2 = (callToAction) => {
|
|
3665
|
+
if (callToAction) {
|
|
3666
|
+
return __spreadValues({
|
|
3667
|
+
"aria-label": callToAction.accessibilityDescription,
|
|
3668
|
+
text: callToAction.title,
|
|
3669
|
+
onClick: callToAction.onClick
|
|
3670
|
+
}, callToAction.type === "link" ? { href: callToAction.href, target: "_blank" } : {});
|
|
3671
|
+
}
|
|
3672
|
+
return void 0;
|
|
3673
|
+
};
|
|
3674
|
+
var NewListRenderer_default = ListRenderer2;
|
|
3675
|
+
|
|
3676
|
+
// ../renderers/src/NewListItem/NewReviewRenderer.tsx
|
|
3677
|
+
var import_components51 = require("@transferwise/components");
|
|
3678
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
3679
|
+
var ReviewRenderer2 = {
|
|
3680
|
+
canRenderType: "review",
|
|
3681
|
+
render: ({ callToAction, control, margin, fields, title }) => /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: getMargin(margin), children: [
|
|
3682
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_components51.Header, { as: "h2", title: title != null ? title : "", action: getHeaderAction(callToAction) }),
|
|
3683
|
+
fields.map(({ label, value, media, tag, additionalInfo, inlineAlert, callToAction: callToAction2 }) => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3684
|
+
import_components51.ListItem,
|
|
3685
|
+
{
|
|
3686
|
+
title: value,
|
|
3687
|
+
subtitle: label,
|
|
3688
|
+
inverted: true,
|
|
3689
|
+
media: media ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3690
|
+
OptionMedia,
|
|
3691
|
+
{
|
|
3692
|
+
media,
|
|
3693
|
+
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
3694
|
+
}
|
|
3695
|
+
) : void 0,
|
|
3696
|
+
control: getControl(callToAction2),
|
|
3697
|
+
prompt: getInlineAlert(inlineAlert),
|
|
3698
|
+
additionalInfo: getAdditionalInfo(additionalInfo)
|
|
3699
|
+
},
|
|
3700
|
+
label
|
|
3701
|
+
))
|
|
3702
|
+
] })
|
|
3703
|
+
};
|
|
3704
|
+
var getControl = (callToAction) => {
|
|
3705
|
+
if (!callToAction) {
|
|
3706
|
+
return void 0;
|
|
3707
|
+
}
|
|
3708
|
+
const { accessibilityDescription, href, title, onClick } = callToAction;
|
|
3709
|
+
if (href) {
|
|
3710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_components51.ListItem.Button, { href, partiallyInteractive: true, "aria-description": accessibilityDescription, children: title });
|
|
3711
|
+
}
|
|
3712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3713
|
+
import_components51.ListItem.Button,
|
|
3714
|
+
{
|
|
3715
|
+
onClick,
|
|
3716
|
+
partiallyInteractive: true,
|
|
3717
|
+
"aria-description": accessibilityDescription,
|
|
3718
|
+
children: title
|
|
3719
|
+
}
|
|
3720
|
+
);
|
|
3721
|
+
};
|
|
3722
|
+
var NewReviewRenderer_default = ReviewRenderer2;
|
|
3723
|
+
|
|
3379
3724
|
// ../renderers/src/getWiseRenderers.ts
|
|
3380
|
-
var
|
|
3725
|
+
var internalRenderers = [NewDecisionRenderer_default, NewListRenderer_default, NewReviewRenderer_default];
|
|
3726
|
+
var getWiseRenderers = (internal = false) => [
|
|
3727
|
+
...internal ? internalRenderers : [],
|
|
3381
3728
|
AddressValidationButtonRenderer_default,
|
|
3382
3729
|
AlertRenderer_default,
|
|
3383
3730
|
CheckboxInputRenderer_default,
|
|
@@ -3421,7 +3768,7 @@ var getWiseRenderers = () => [
|
|
|
3421
3768
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
3422
3769
|
var appVersion = (
|
|
3423
3770
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
3424
|
-
typeof process !== "undefined" ? "4.20.
|
|
3771
|
+
typeof process !== "undefined" ? "4.20.3" : "0.0.0"
|
|
3425
3772
|
);
|
|
3426
3773
|
|
|
3427
3774
|
// src/dynamicFlow/telemetry/getLogEvent.ts
|
|
@@ -3476,12 +3823,12 @@ var messages_default = (0, import_react_intl18.defineMessages)({
|
|
|
3476
3823
|
});
|
|
3477
3824
|
|
|
3478
3825
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
3479
|
-
var
|
|
3826
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
3480
3827
|
var wiseRenderers = getWiseRenderers();
|
|
3481
3828
|
function DynamicFlowLegacy(props) {
|
|
3482
3829
|
const { customFetch = globalThis.fetch } = props;
|
|
3483
3830
|
const coreProps = __spreadProps(__spreadValues({}, props), { httpClient: customFetch });
|
|
3484
|
-
return /* @__PURE__ */ (0,
|
|
3831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_dynamic_flow_client2.DynamicFlow, __spreadValues({}, coreProps));
|
|
3485
3832
|
}
|
|
3486
3833
|
function DynamicFlowRevamp(props) {
|
|
3487
3834
|
const {
|
|
@@ -3518,7 +3865,7 @@ function DynamicFlowRevamp(props) {
|
|
|
3518
3865
|
onLink,
|
|
3519
3866
|
onCopy
|
|
3520
3867
|
});
|
|
3521
|
-
return /* @__PURE__ */ (0,
|
|
3868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_dynamic_flow_client2.DynamicFlowCoreRevamp, __spreadValues({}, coreProps)) });
|
|
3522
3869
|
}
|
|
3523
3870
|
var DynamicForm = (0, import_react15.forwardRef)(function DynamicForm2(props, ref) {
|
|
3524
3871
|
const {
|
|
@@ -3555,7 +3902,7 @@ var DynamicForm = (0, import_react15.forwardRef)(function DynamicForm2(props, re
|
|
|
3555
3902
|
onLink,
|
|
3556
3903
|
onCopy
|
|
3557
3904
|
});
|
|
3558
|
-
return /* @__PURE__ */ (0,
|
|
3905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_dynamic_flow_client2.DynamicFormCore, __spreadProps(__spreadValues({}, coreProps), { ref })) });
|
|
3559
3906
|
});
|
|
3560
3907
|
var useWiseHttpClient = (httpClient) => {
|
|
3561
3908
|
const { locale } = (0, import_react_intl19.useIntl)();
|