@wise/dynamic-flow-client 3.22.0 → 3.22.1
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/de.json +2 -1
- package/build/i18n/en.json +2 -1
- package/build/i18n/es.json +2 -1
- package/build/i18n/fr.json +2 -1
- package/build/i18n/hu.json +2 -1
- package/build/i18n/id.json +2 -1
- package/build/i18n/it.json +2 -1
- package/build/i18n/ja.json +2 -1
- package/build/i18n/pl.json +2 -1
- package/build/i18n/pt.json +2 -1
- package/build/i18n/ro.json +2 -1
- package/build/i18n/ru.json +2 -1
- package/build/i18n/th.json +2 -1
- package/build/i18n/tr.json +2 -1
- package/build/i18n/zh_CN.json +2 -1
- package/build/i18n/zh_HK.json +2 -1
- package/build/main.js +183 -117
- package/build/main.min.js +1 -1
- package/build/main.mjs +183 -117
- package/build/types/common/messages/search.messages.d.ts +8 -0
- package/build/types/revamp/domain/components/MultiUploadInputComponent.d.ts +2 -0
- package/build/types/revamp/renderers/mappers/utils/mapErrorsToValidationState.d.ts +2 -0
- package/package.json +10 -10
package/build/main.mjs
CHANGED
|
@@ -500,7 +500,8 @@ var de_default = {
|
|
|
500
500
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "Bitte lade mindestens {minItems} Datei(en) hoch.",
|
|
501
501
|
"dynamicFlows.PersistAsyncSchema.genericError": "Da ist etwas schiefgegangen. Versuche es bitte nochmal.",
|
|
502
502
|
"dynamicFlows.ReadOnlySchema.no": "Nein",
|
|
503
|
-
"dynamicFlows.ReadOnlySchema.yes": "Ja"
|
|
503
|
+
"dynamicFlows.ReadOnlySchema.yes": "Ja",
|
|
504
|
+
"dynamicFlows.SearchLayout.loading": "L\xE4dt..."
|
|
504
505
|
};
|
|
505
506
|
|
|
506
507
|
// src/i18n/en.json
|
|
@@ -550,7 +551,8 @@ var en_default = {
|
|
|
550
551
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "Please upload at least {minItems} file(s).",
|
|
551
552
|
"dynamicFlows.PersistAsyncSchema.genericError": "Something went wrong, please try again.",
|
|
552
553
|
"dynamicFlows.ReadOnlySchema.no": "No",
|
|
553
|
-
"dynamicFlows.ReadOnlySchema.yes": "Yes"
|
|
554
|
+
"dynamicFlows.ReadOnlySchema.yes": "Yes",
|
|
555
|
+
"dynamicFlows.SearchLayout.loading": "Loading..."
|
|
554
556
|
};
|
|
555
557
|
|
|
556
558
|
// src/i18n/es.json
|
|
@@ -600,7 +602,8 @@ var es_default = {
|
|
|
600
602
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "Sube al menos {minItems} archivo(s).",
|
|
601
603
|
"dynamicFlows.PersistAsyncSchema.genericError": "Ha habido un error. Int\xE9ntalo de nuevo.",
|
|
602
604
|
"dynamicFlows.ReadOnlySchema.no": "No",
|
|
603
|
-
"dynamicFlows.ReadOnlySchema.yes": "S\xED"
|
|
605
|
+
"dynamicFlows.ReadOnlySchema.yes": "S\xED",
|
|
606
|
+
"dynamicFlows.SearchLayout.loading": "Cargando..."
|
|
604
607
|
};
|
|
605
608
|
|
|
606
609
|
// src/i18n/fr.json
|
|
@@ -650,7 +653,8 @@ var fr_default = {
|
|
|
650
653
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "Veuillez t\xE9l\xE9charger au moins {minItems} fichier(s).",
|
|
651
654
|
"dynamicFlows.PersistAsyncSchema.genericError": "Une erreur s'est produite, veuillez r\xE9essayer.",
|
|
652
655
|
"dynamicFlows.ReadOnlySchema.no": "Non",
|
|
653
|
-
"dynamicFlows.ReadOnlySchema.yes": "Oui"
|
|
656
|
+
"dynamicFlows.ReadOnlySchema.yes": "Oui",
|
|
657
|
+
"dynamicFlows.SearchLayout.loading": "Chargement..."
|
|
654
658
|
};
|
|
655
659
|
|
|
656
660
|
// src/i18n/hu.json
|
|
@@ -700,7 +704,8 @@ var hu_default = {
|
|
|
700
704
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "K\xE9r\xFCnk, hogy legal\xE1bb {minItems} f\xE1jlt t\xF6lts fel.",
|
|
701
705
|
"dynamicFlows.PersistAsyncSchema.genericError": "Valami hiba t\xF6rt\xE9nt. K\xE9r\xFCnk, pr\xF3b\xE1ld \xFAjra.",
|
|
702
706
|
"dynamicFlows.ReadOnlySchema.no": "Nem",
|
|
703
|
-
"dynamicFlows.ReadOnlySchema.yes": "Igen"
|
|
707
|
+
"dynamicFlows.ReadOnlySchema.yes": "Igen",
|
|
708
|
+
"dynamicFlows.SearchLayout.loading": "Bet\xF6lt\xE9s..."
|
|
704
709
|
};
|
|
705
710
|
|
|
706
711
|
// src/i18n/id.json
|
|
@@ -750,7 +755,8 @@ var id_default = {
|
|
|
750
755
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "Harap unggah sedikitnya {minItems} file.",
|
|
751
756
|
"dynamicFlows.PersistAsyncSchema.genericError": "Terjadi kesalahan, mohon coba lagi.",
|
|
752
757
|
"dynamicFlows.ReadOnlySchema.no": "Tidak",
|
|
753
|
-
"dynamicFlows.ReadOnlySchema.yes": "Ya"
|
|
758
|
+
"dynamicFlows.ReadOnlySchema.yes": "Ya",
|
|
759
|
+
"dynamicFlows.SearchLayout.loading": "Memuat..."
|
|
754
760
|
};
|
|
755
761
|
|
|
756
762
|
// src/i18n/it.json
|
|
@@ -800,7 +806,8 @@ var it_default = {
|
|
|
800
806
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "Carica almeno {minItems} file.",
|
|
801
807
|
"dynamicFlows.PersistAsyncSchema.genericError": "Qualcosa \xE8 andato storto. Riprova.",
|
|
802
808
|
"dynamicFlows.ReadOnlySchema.no": "No",
|
|
803
|
-
"dynamicFlows.ReadOnlySchema.yes": "S\xEC"
|
|
809
|
+
"dynamicFlows.ReadOnlySchema.yes": "S\xEC",
|
|
810
|
+
"dynamicFlows.SearchLayout.loading": "Caricamento..."
|
|
804
811
|
};
|
|
805
812
|
|
|
806
813
|
// src/i18n/ja.json
|
|
@@ -850,7 +857,8 @@ var ja_default = {
|
|
|
850
857
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "{minItems}\u500B\u4EE5\u4E0A\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
851
858
|
"dynamicFlows.PersistAsyncSchema.genericError": "\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u518D\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002",
|
|
852
859
|
"dynamicFlows.ReadOnlySchema.no": "\u3044\u3044\u3048",
|
|
853
|
-
"dynamicFlows.ReadOnlySchema.yes": "\u306F\u3044"
|
|
860
|
+
"dynamicFlows.ReadOnlySchema.yes": "\u306F\u3044",
|
|
861
|
+
"dynamicFlows.SearchLayout.loading": "\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026"
|
|
854
862
|
};
|
|
855
863
|
|
|
856
864
|
// src/i18n/pl.json
|
|
@@ -900,7 +908,8 @@ var pl_default = {
|
|
|
900
908
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "Prze\u015Blij co najmniej nast\u0119puj\u0105c\u0105 liczb\u0119 plik\xF3w: {minItems}.",
|
|
901
909
|
"dynamicFlows.PersistAsyncSchema.genericError": "Wyst\u0105pi\u0142 b\u0142\u0105d, prosimy spr\xF3bowa\u0107 ponownie.",
|
|
902
910
|
"dynamicFlows.ReadOnlySchema.no": "Nie",
|
|
903
|
-
"dynamicFlows.ReadOnlySchema.yes": "Tak"
|
|
911
|
+
"dynamicFlows.ReadOnlySchema.yes": "Tak",
|
|
912
|
+
"dynamicFlows.SearchLayout.loading": "Trwa \u0142adowanie..."
|
|
904
913
|
};
|
|
905
914
|
|
|
906
915
|
// src/i18n/pt.json
|
|
@@ -950,7 +959,8 @@ var pt_default = {
|
|
|
950
959
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "Por favor, envie pelo menos {minItems} arquivo(s).",
|
|
951
960
|
"dynamicFlows.PersistAsyncSchema.genericError": "Ocorreu um erro. Por favor, tente novamente.",
|
|
952
961
|
"dynamicFlows.ReadOnlySchema.no": "N\xE3o",
|
|
953
|
-
"dynamicFlows.ReadOnlySchema.yes": "Sim"
|
|
962
|
+
"dynamicFlows.ReadOnlySchema.yes": "Sim",
|
|
963
|
+
"dynamicFlows.SearchLayout.loading": "Carregando..."
|
|
954
964
|
};
|
|
955
965
|
|
|
956
966
|
// src/i18n/ro.json
|
|
@@ -1000,7 +1010,8 @@ var ro_default = {
|
|
|
1000
1010
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "Te rug\u0103m s\u0103 \xEEncarci cel pu\u021Bin {minItems} fi\u0219ier(e).",
|
|
1001
1011
|
"dynamicFlows.PersistAsyncSchema.genericError": "Ceva nu a mers bine, te rug\u0103m s\u0103 \xEEncerci din nou.",
|
|
1002
1012
|
"dynamicFlows.ReadOnlySchema.no": "Nu",
|
|
1003
|
-
"dynamicFlows.ReadOnlySchema.yes": "Da"
|
|
1013
|
+
"dynamicFlows.ReadOnlySchema.yes": "Da",
|
|
1014
|
+
"dynamicFlows.SearchLayout.loading": "Se \xEEncarc\u0103..."
|
|
1004
1015
|
};
|
|
1005
1016
|
|
|
1006
1017
|
// src/i18n/ru.json
|
|
@@ -1050,7 +1061,8 @@ var ru_default = {
|
|
|
1050
1061
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u043F\u043E \u043A\u0440\u0430\u0439\u043D\u0435\u0439 \u043C\u0435\u0440\u0435 {minItems} \u0444\u0430\u0439\u043B(-\u0430/\u043E\u0432).",
|
|
1051
1062
|
"dynamicFlows.PersistAsyncSchema.genericError": "\u0427\u0442\u043E-\u0442\u043E \u043F\u043E\u0448\u043B\u043E \u043D\u0435 \u0442\u0430\u043A, \u043F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437.",
|
|
1052
1063
|
"dynamicFlows.ReadOnlySchema.no": "\u041D\u0435\u0442",
|
|
1053
|
-
"dynamicFlows.ReadOnlySchema.yes": "\u0414\u0430"
|
|
1064
|
+
"dynamicFlows.ReadOnlySchema.yes": "\u0414\u0430",
|
|
1065
|
+
"dynamicFlows.SearchLayout.loading": "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430..."
|
|
1054
1066
|
};
|
|
1055
1067
|
|
|
1056
1068
|
// src/i18n/th.json
|
|
@@ -1100,7 +1112,8 @@ var th_default = {
|
|
|
1100
1112
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "\u0E42\u0E1B\u0E23\u0E14\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22 {minItems} \u0E44\u0E1F\u0E25\u0E4C",
|
|
1101
1113
|
"dynamicFlows.PersistAsyncSchema.genericError": "\u0E40\u0E01\u0E34\u0E14\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14\u0E1A\u0E32\u0E07\u0E2D\u0E22\u0E48\u0E32\u0E07 \u0E42\u0E1B\u0E23\u0E14\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",
|
|
1102
1114
|
"dynamicFlows.ReadOnlySchema.no": "\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48",
|
|
1103
|
-
"dynamicFlows.ReadOnlySchema.yes": "\u0E43\u0E0A\u0E48"
|
|
1115
|
+
"dynamicFlows.ReadOnlySchema.yes": "\u0E43\u0E0A\u0E48",
|
|
1116
|
+
"dynamicFlows.SearchLayout.loading": "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14..."
|
|
1104
1117
|
};
|
|
1105
1118
|
|
|
1106
1119
|
// src/i18n/tr.json
|
|
@@ -1150,7 +1163,8 @@ var tr_default = {
|
|
|
1150
1163
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "L\xFCtfen en az {minItems} dosya y\xFCkleyin.",
|
|
1151
1164
|
"dynamicFlows.PersistAsyncSchema.genericError": "Bir \u015Feyler ters gitti, l\xFCtfen tekrar deneyin.",
|
|
1152
1165
|
"dynamicFlows.ReadOnlySchema.no": "Hay\u0131r",
|
|
1153
|
-
"dynamicFlows.ReadOnlySchema.yes": "Evet"
|
|
1166
|
+
"dynamicFlows.ReadOnlySchema.yes": "Evet",
|
|
1167
|
+
"dynamicFlows.SearchLayout.loading": "Y\xFCkleniyor..."
|
|
1154
1168
|
};
|
|
1155
1169
|
|
|
1156
1170
|
// src/i18n/zh_CN.json
|
|
@@ -1200,7 +1214,8 @@ var zh_CN_default = {
|
|
|
1200
1214
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "\u8BF7\u4E0A\u4F20\u81F3\u5C11 {minItems} \u4E2A\u6587\u4EF6\u3002",
|
|
1201
1215
|
"dynamicFlows.PersistAsyncSchema.genericError": "\u51FA\u9519\u4E86\uFF0C\u8BF7\u91CD\u8BD5\u3002",
|
|
1202
1216
|
"dynamicFlows.ReadOnlySchema.no": "\u5426",
|
|
1203
|
-
"dynamicFlows.ReadOnlySchema.yes": "\u662F"
|
|
1217
|
+
"dynamicFlows.ReadOnlySchema.yes": "\u662F",
|
|
1218
|
+
"dynamicFlows.SearchLayout.loading": "\u6B63\u5728\u52A0\u8F7D\u2026"
|
|
1204
1219
|
};
|
|
1205
1220
|
|
|
1206
1221
|
// src/i18n/zh_HK.json
|
|
@@ -1250,7 +1265,8 @@ var zh_HK_default = {
|
|
|
1250
1265
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "\u8ACB\u4E0A\u8F09\u81F3\u5C11{minItems}\u500B\u6A94\u6848\u3002",
|
|
1251
1266
|
"dynamicFlows.PersistAsyncSchema.genericError": "\u51FA\u73FE\u4E86\u554F\u984C\uFF0C\u8ACB\u518D\u8A66\u4E00\u6B21\u3002",
|
|
1252
1267
|
"dynamicFlows.ReadOnlySchema.no": "\u5426",
|
|
1253
|
-
"dynamicFlows.ReadOnlySchema.yes": "\u662F"
|
|
1268
|
+
"dynamicFlows.ReadOnlySchema.yes": "\u662F",
|
|
1269
|
+
"dynamicFlows.SearchLayout.loading": "\u8F09\u5165\u4E2D\u2026"
|
|
1254
1270
|
};
|
|
1255
1271
|
|
|
1256
1272
|
// src/i18n/index.ts
|
|
@@ -1448,6 +1464,17 @@ var allOfComponentToProps = ({ control, description, help, title }, children) =>
|
|
|
1448
1464
|
title
|
|
1449
1465
|
});
|
|
1450
1466
|
|
|
1467
|
+
// src/revamp/renderers/mappers/utils/mapErrorsToValidationState.ts
|
|
1468
|
+
var mapErrorsToValidationState = (errors) => {
|
|
1469
|
+
if (errors) {
|
|
1470
|
+
if (errors.length > 0) {
|
|
1471
|
+
return { status: "invalid", message: errors[0] };
|
|
1472
|
+
}
|
|
1473
|
+
return { status: "valid" };
|
|
1474
|
+
}
|
|
1475
|
+
return void 0;
|
|
1476
|
+
};
|
|
1477
|
+
|
|
1451
1478
|
// src/revamp/renderers/mappers/utils/inputComponentToProps.ts
|
|
1452
1479
|
var inputComponentToProps = (component, type) => {
|
|
1453
1480
|
var _a;
|
|
@@ -1494,13 +1521,7 @@ var getValidationState = (errors, validationAsyncState) => {
|
|
|
1494
1521
|
return { status: "valid", message: validationAsyncState == null ? void 0 : validationAsyncState.messages.success };
|
|
1495
1522
|
}
|
|
1496
1523
|
}
|
|
1497
|
-
|
|
1498
|
-
if (errors.length > 0) {
|
|
1499
|
-
return { status: "invalid", message: errors[0] };
|
|
1500
|
-
}
|
|
1501
|
-
return { status: "valid" };
|
|
1502
|
-
}
|
|
1503
|
-
return void 0;
|
|
1524
|
+
return mapErrorsToValidationState(errors);
|
|
1504
1525
|
};
|
|
1505
1526
|
|
|
1506
1527
|
// src/revamp/renderers/mappers/booleanInputComponentToProps.ts
|
|
@@ -1659,15 +1680,14 @@ var modalComponentToProps = ({ content, control, margin, trigger }, components)
|
|
|
1659
1680
|
|
|
1660
1681
|
// src/revamp/renderers/mappers/multiUploadInputComponentToProps.ts
|
|
1661
1682
|
var multiUploadInputComponentToProps = (component) => {
|
|
1662
|
-
const { accepts, fileMap, maxSize, minItems, maxItems, uploadLabel } = component;
|
|
1663
|
-
const
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
});
|
|
1683
|
+
const { accepts, errorsMap, fileMap, maxSize, minItems, maxItems, uploadLabel } = component;
|
|
1684
|
+
const fileList = Object.entries(fileMap).map(
|
|
1685
|
+
([id, file]) => ({
|
|
1686
|
+
id,
|
|
1687
|
+
file,
|
|
1688
|
+
validationState: mapErrorsToValidationState(errorsMap[id])
|
|
1689
|
+
})
|
|
1690
|
+
);
|
|
1671
1691
|
return __spreadProps(__spreadValues({}, inputComponentToProps(component, "input-upload-multi")), {
|
|
1672
1692
|
accepts,
|
|
1673
1693
|
maxSize,
|
|
@@ -1754,22 +1774,13 @@ var repeatableComponentToProps = (component, children, editableItemChildren) =>
|
|
|
1754
1774
|
maxItems,
|
|
1755
1775
|
minItems,
|
|
1756
1776
|
title,
|
|
1757
|
-
validationState:
|
|
1777
|
+
validationState: mapErrorsToValidationState(errors),
|
|
1758
1778
|
onAdd: onAdd.bind(component),
|
|
1759
1779
|
onEdit: onEdit.bind(component),
|
|
1760
1780
|
onSave: onSave.bind(component),
|
|
1761
1781
|
onRemove: onRemove.bind(component)
|
|
1762
1782
|
};
|
|
1763
1783
|
};
|
|
1764
|
-
var getValidationState2 = (errors) => {
|
|
1765
|
-
if (errors) {
|
|
1766
|
-
if (errors.length > 0) {
|
|
1767
|
-
return { status: "invalid", message: errors[0] };
|
|
1768
|
-
}
|
|
1769
|
-
return { status: "valid" };
|
|
1770
|
-
}
|
|
1771
|
-
return void 0;
|
|
1772
|
-
};
|
|
1773
1784
|
|
|
1774
1785
|
// src/revamp/renderers/mappers/reviewComponentToProps.ts
|
|
1775
1786
|
var reviewComponentToProps = ({
|
|
@@ -9165,9 +9176,28 @@ var getRandomInt = () => Math.floor(Math.random() * 1e8);
|
|
|
9165
9176
|
|
|
9166
9177
|
// src/revamp/domain/components/MultiUploadInputComponent.ts
|
|
9167
9178
|
var createMultiUploadInputComponent = (uploadInputProps, updateComponent) => {
|
|
9168
|
-
const _a = uploadInputProps, {
|
|
9179
|
+
const _a = uploadInputProps, {
|
|
9180
|
+
uid,
|
|
9181
|
+
id,
|
|
9182
|
+
checks,
|
|
9183
|
+
fileChecks,
|
|
9184
|
+
format,
|
|
9185
|
+
performPersistAsync,
|
|
9186
|
+
onValueChange,
|
|
9187
|
+
summariser
|
|
9188
|
+
} = _a, rest = __objRest(_a, [
|
|
9189
|
+
"uid",
|
|
9190
|
+
"id",
|
|
9191
|
+
"checks",
|
|
9192
|
+
"fileChecks",
|
|
9193
|
+
"format",
|
|
9194
|
+
"performPersistAsync",
|
|
9195
|
+
"onValueChange",
|
|
9196
|
+
"summariser"
|
|
9197
|
+
]);
|
|
9169
9198
|
const update = getInputUpdateFunction(uid, updateComponent);
|
|
9170
9199
|
const getValidationErrors = getLocalValueValidator(checks);
|
|
9200
|
+
const getFileValidationErrors = getLocalValueValidator(fileChecks);
|
|
9171
9201
|
const getAndSetValidationErrors = (currentValue) => {
|
|
9172
9202
|
const messages = getValidationErrors(currentValue);
|
|
9173
9203
|
update((draft) => {
|
|
@@ -9180,6 +9210,7 @@ var createMultiUploadInputComponent = (uploadInputProps, updateComponent) => {
|
|
|
9180
9210
|
uid,
|
|
9181
9211
|
id,
|
|
9182
9212
|
format: "base64",
|
|
9213
|
+
errorsMap: {},
|
|
9183
9214
|
fileMap: {},
|
|
9184
9215
|
onBlur() {
|
|
9185
9216
|
getAndSetValidationErrors(this.getLocalValue());
|
|
@@ -9194,13 +9225,17 @@ var createMultiUploadInputComponent = (uploadInputProps, updateComponent) => {
|
|
|
9194
9225
|
update((draft) => {
|
|
9195
9226
|
draft.value.splice(fileIndex, 1);
|
|
9196
9227
|
const _a2 = draft.fileMap, { [fileId]: _ } = _a2, files = __objRest(_a2, [__restKey(fileId)]);
|
|
9228
|
+
const _b = draft.errorsMap, { [fileId]: removedErrors } = _b, fileErrors = __objRest(_b, [__restKey(fileId)]);
|
|
9197
9229
|
draft.fileMap = files;
|
|
9230
|
+
draft.errorsMap = fileErrors;
|
|
9198
9231
|
});
|
|
9199
9232
|
}
|
|
9200
9233
|
},
|
|
9201
9234
|
async onUpload(file, fileId) {
|
|
9235
|
+
const fileErrors = getFileValidationErrors(file);
|
|
9202
9236
|
update((draft) => {
|
|
9203
9237
|
draft.fileMap[fileId] = file;
|
|
9238
|
+
draft.errorsMap[fileId] = fileErrors;
|
|
9204
9239
|
draft.value = [...this.value, file];
|
|
9205
9240
|
draft.errors = [];
|
|
9206
9241
|
});
|
|
@@ -9221,7 +9256,7 @@ var createMultiUploadInputComponent = (uploadInputProps, updateComponent) => {
|
|
|
9221
9256
|
},
|
|
9222
9257
|
validate() {
|
|
9223
9258
|
const messages = getAndSetValidationErrors(this.getLocalValue());
|
|
9224
|
-
return messages.length === 0;
|
|
9259
|
+
return messages.length === 0 && Object.values(this.errorsMap).every((errors) => errors.length === 0);
|
|
9225
9260
|
}
|
|
9226
9261
|
}, rest);
|
|
9227
9262
|
if (!performPersistAsync) {
|
|
@@ -9280,6 +9315,7 @@ var arraySchemaToMultiUploadComponent = (schemaMapperProps, mapperProps) => {
|
|
|
9280
9315
|
accepts,
|
|
9281
9316
|
autoComplete: "off",
|
|
9282
9317
|
checks: schema.hidden ? [] : checks,
|
|
9318
|
+
fileChecks: [],
|
|
9283
9319
|
format,
|
|
9284
9320
|
maxSize,
|
|
9285
9321
|
minItems,
|
|
@@ -12409,6 +12445,19 @@ function ErrorResult({ state }) {
|
|
|
12409
12445
|
|
|
12410
12446
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
12411
12447
|
import { useState as useState7 } from "react";
|
|
12448
|
+
|
|
12449
|
+
// ../renderers/src/messages/search.messages.ts
|
|
12450
|
+
import { defineMessages as defineMessages10 } from "react-intl";
|
|
12451
|
+
var search_messages_default = defineMessages10({
|
|
12452
|
+
loading: {
|
|
12453
|
+
id: "df.wise.SearchLayout.loading",
|
|
12454
|
+
defaultMessage: "Loading...",
|
|
12455
|
+
description: "A message shown to the user while their search is being processed, before results appear."
|
|
12456
|
+
}
|
|
12457
|
+
});
|
|
12458
|
+
|
|
12459
|
+
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
12460
|
+
import { useIntl as useIntl8 } from "react-intl";
|
|
12412
12461
|
import { Fragment as Fragment5, jsx as jsx41, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
12413
12462
|
function BlockSearchRendererComponent({
|
|
12414
12463
|
id,
|
|
@@ -12421,6 +12470,7 @@ function BlockSearchRendererComponent({
|
|
|
12421
12470
|
}) {
|
|
12422
12471
|
const [hasSearched, setHasSearched] = useState7(false);
|
|
12423
12472
|
const trackEvent = useTrackEvent();
|
|
12473
|
+
const { formatMessage } = useIntl8();
|
|
12424
12474
|
return /* @__PURE__ */ jsxs13("div", { className: getMargin(margin), children: [
|
|
12425
12475
|
/* @__PURE__ */ jsx41(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx41(
|
|
12426
12476
|
Input4,
|
|
@@ -12439,7 +12489,7 @@ function BlockSearchRendererComponent({
|
|
|
12439
12489
|
}
|
|
12440
12490
|
}
|
|
12441
12491
|
) }),
|
|
12442
|
-
isLoading ? /* @__PURE__ */ jsx41(Fragment5, { children:
|
|
12492
|
+
isLoading ? /* @__PURE__ */ jsx41(Fragment5, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx41(SearchResultContent, { state, onChange })
|
|
12443
12493
|
] });
|
|
12444
12494
|
}
|
|
12445
12495
|
function SearchResultContent({
|
|
@@ -12492,7 +12542,7 @@ var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
|
|
|
12492
12542
|
import { Markdown as Markdown4, Typeahead } from "@transferwise/components";
|
|
12493
12543
|
import { Search } from "@transferwise/icons";
|
|
12494
12544
|
import { useState as useState8 } from "react";
|
|
12495
|
-
import { useIntl as
|
|
12545
|
+
import { useIntl as useIntl9 } from "react-intl";
|
|
12496
12546
|
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
12497
12547
|
function InlineSearchRenderer({
|
|
12498
12548
|
id,
|
|
@@ -12504,7 +12554,7 @@ function InlineSearchRenderer({
|
|
|
12504
12554
|
}) {
|
|
12505
12555
|
const [hasSearched, setHasSearched] = useState8(false);
|
|
12506
12556
|
const trackEvent = useTrackEvent();
|
|
12507
|
-
const intl =
|
|
12557
|
+
const intl = useIntl9();
|
|
12508
12558
|
return /* @__PURE__ */ jsx42("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx42(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx42(
|
|
12509
12559
|
Typeahead,
|
|
12510
12560
|
{
|
|
@@ -12551,6 +12601,7 @@ function mapResultToTypeaheadOption(result) {
|
|
|
12551
12601
|
};
|
|
12552
12602
|
}
|
|
12553
12603
|
function TypeaheadFooter({ state, isLoading }) {
|
|
12604
|
+
const { formatMessage } = useIntl9();
|
|
12554
12605
|
if (state.type === "noResults") {
|
|
12555
12606
|
return /* @__PURE__ */ jsx42(Markdown4, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
12556
12607
|
}
|
|
@@ -12558,7 +12609,7 @@ function TypeaheadFooter({ state, isLoading }) {
|
|
|
12558
12609
|
return /* @__PURE__ */ jsx42("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx42(ErrorResult, { state }) });
|
|
12559
12610
|
}
|
|
12560
12611
|
if (state.type === "pending" || isLoading) {
|
|
12561
|
-
return /* @__PURE__ */ jsx42("p", { className: "m-t-2 m-x-2", children:
|
|
12612
|
+
return /* @__PURE__ */ jsx42("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
|
|
12562
12613
|
}
|
|
12563
12614
|
return null;
|
|
12564
12615
|
}
|
|
@@ -13162,11 +13213,11 @@ var getFieldValue = (value, help, orientation) => {
|
|
|
13162
13213
|
import { useMemo as useMemo3 } from "react";
|
|
13163
13214
|
|
|
13164
13215
|
// ../renderers/src/step/ExternalConfirmationDialog.tsx
|
|
13165
|
-
import { useIntl as
|
|
13216
|
+
import { useIntl as useIntl10 } from "react-intl";
|
|
13166
13217
|
|
|
13167
13218
|
// ../renderers/src/messages/external-confirmation.messages.ts
|
|
13168
|
-
import { defineMessages as
|
|
13169
|
-
var external_confirmation_messages_default =
|
|
13219
|
+
import { defineMessages as defineMessages11 } from "react-intl";
|
|
13220
|
+
var external_confirmation_messages_default = defineMessages11({
|
|
13170
13221
|
title: {
|
|
13171
13222
|
id: "df.wise.ExternalConfirmation.title",
|
|
13172
13223
|
defaultMessage: "Please confirm",
|
|
@@ -13196,7 +13247,7 @@ function ExternalConfirmationDialog({
|
|
|
13196
13247
|
external,
|
|
13197
13248
|
onClose
|
|
13198
13249
|
}) {
|
|
13199
|
-
const { formatMessage } =
|
|
13250
|
+
const { formatMessage } = useIntl10();
|
|
13200
13251
|
return /* @__PURE__ */ jsx55("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs20("div", { className: "df-box-renderer-width-lg", children: [
|
|
13201
13252
|
/* @__PURE__ */ jsx55("h2", { className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.title) }),
|
|
13202
13253
|
/* @__PURE__ */ jsx55(Markdown5, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(external.url) }) }),
|
|
@@ -13759,7 +13810,7 @@ function isReference(block) {
|
|
|
13759
13810
|
|
|
13760
13811
|
// src/legacy/dynamicFlow/DynamicFlow.tsx
|
|
13761
13812
|
import { useCallback as useCallback11, useEffect as useEffect26, useMemo as useMemo23, useState as useState34 } from "react";
|
|
13762
|
-
import { useIntl as
|
|
13813
|
+
import { useIntl as useIntl31 } from "react-intl";
|
|
13763
13814
|
|
|
13764
13815
|
// src/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.tsx
|
|
13765
13816
|
import { createContext as createContext4, useContext as useContext5, useMemo as useMemo8 } from "react";
|
|
@@ -14681,11 +14732,11 @@ function useExternalStepPolling(polling, onAction) {
|
|
|
14681
14732
|
|
|
14682
14733
|
// src/legacy/common/hooks/usePersistAsync/usePersistAsync.ts
|
|
14683
14734
|
import { useState as useState28 } from "react";
|
|
14684
|
-
import { useIntl as
|
|
14735
|
+
import { useIntl as useIntl25 } from "react-intl";
|
|
14685
14736
|
|
|
14686
14737
|
// src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.tsx
|
|
14687
14738
|
import { useEffect as useEffect18, useState as useState27 } from "react";
|
|
14688
|
-
import { useIntl as
|
|
14739
|
+
import { useIntl as useIntl24 } from "react-intl";
|
|
14689
14740
|
|
|
14690
14741
|
// src/legacy/common/constants/DateMode.ts
|
|
14691
14742
|
var DateMode = {
|
|
@@ -15148,11 +15199,11 @@ var DynamicDivider_default = DynamicDivider;
|
|
|
15148
15199
|
// src/legacy/layout/external/DynamicExternal.tsx
|
|
15149
15200
|
import { Button as Button8, Loader as Loader2, Size as Size2 } from "@transferwise/components";
|
|
15150
15201
|
import { useCallback as useCallback6, useEffect as useEffect8 } from "react";
|
|
15151
|
-
import { useIntl as
|
|
15202
|
+
import { useIntl as useIntl11 } from "react-intl";
|
|
15152
15203
|
|
|
15153
15204
|
// src/legacy/layout/external/DynamicExternal.messages.ts
|
|
15154
|
-
import { defineMessages as
|
|
15155
|
-
var DynamicExternal_messages_default =
|
|
15205
|
+
import { defineMessages as defineMessages12 } from "react-intl";
|
|
15206
|
+
var DynamicExternal_messages_default = defineMessages12({
|
|
15156
15207
|
retryTitle: {
|
|
15157
15208
|
id: "dynamicFlows.DynamicExternal.retryTitle",
|
|
15158
15209
|
defaultMessage: "Reopen window",
|
|
@@ -15164,7 +15215,7 @@ var DynamicExternal_messages_default = defineMessages11({
|
|
|
15164
15215
|
import { Fragment as Fragment11, jsx as jsx76, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
15165
15216
|
var DynamicExternal = ({ component, onAction }) => {
|
|
15166
15217
|
const { requestUrl, responseHandlers, polling, retryTitle } = component;
|
|
15167
|
-
const intl =
|
|
15218
|
+
const intl = useIntl11();
|
|
15168
15219
|
const openExternalUrl = useCallback6(
|
|
15169
15220
|
() => window.open(requestUrl, "df-external-window"),
|
|
15170
15221
|
[requestUrl]
|
|
@@ -15244,7 +15295,7 @@ import { useMemo as useMemo12, useState as useState13 } from "react";
|
|
|
15244
15295
|
// src/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.tsx
|
|
15245
15296
|
import { InlineAlert as InlineAlert3 } from "@transferwise/components";
|
|
15246
15297
|
import { formatDate as formatDate3 } from "@transferwise/formatting";
|
|
15247
|
-
import { useIntl as
|
|
15298
|
+
import { useIntl as useIntl12 } from "react-intl";
|
|
15248
15299
|
import { jsx as jsx78, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
15249
15300
|
function ControlFeedback(props) {
|
|
15250
15301
|
const { errors = "", validations = [], validationMessages = {} } = props;
|
|
@@ -15264,7 +15315,7 @@ function ControlFeedback(props) {
|
|
|
15264
15315
|
] });
|
|
15265
15316
|
}
|
|
15266
15317
|
function useDefaultValidationMessages(schema) {
|
|
15267
|
-
const { formatMessage, locale } =
|
|
15318
|
+
const { formatMessage, locale } = useIntl12();
|
|
15268
15319
|
const formattedMessages = {
|
|
15269
15320
|
type: formatMessage(validation_messages_default.type),
|
|
15270
15321
|
minimum: formatMessage(validation_messages_default.minimum, {
|
|
@@ -15351,11 +15402,11 @@ function constructUploadError(response) {
|
|
|
15351
15402
|
}
|
|
15352
15403
|
|
|
15353
15404
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.tsx
|
|
15354
|
-
import { useIntl as
|
|
15405
|
+
import { useIntl as useIntl13 } from "react-intl";
|
|
15355
15406
|
|
|
15356
15407
|
// src/legacy/common/messages.ts
|
|
15357
|
-
import { defineMessages as
|
|
15358
|
-
var messages_default =
|
|
15408
|
+
import { defineMessages as defineMessages13 } from "react-intl";
|
|
15409
|
+
var messages_default = defineMessages13({
|
|
15359
15410
|
required: {
|
|
15360
15411
|
id: "dynamicFlows.DefaultErrorMessages.required",
|
|
15361
15412
|
defaultMessage: "Please fill out this field.",
|
|
@@ -15368,7 +15419,7 @@ function useFormattedDefaultErrorMessages({
|
|
|
15368
15419
|
maxItems,
|
|
15369
15420
|
minItems
|
|
15370
15421
|
}) {
|
|
15371
|
-
const { formatMessage } =
|
|
15422
|
+
const { formatMessage } = useIntl13();
|
|
15372
15423
|
const { maxFileSizeError, maxItemsError, minItemsError } = multi_file_upload_messages_default;
|
|
15373
15424
|
return {
|
|
15374
15425
|
maxFileSizeErrorMessage: formatMessage(maxFileSizeError),
|
|
@@ -15479,7 +15530,7 @@ function getValidationMessages(schema, required, defaultErrorMessages) {
|
|
|
15479
15530
|
var import_classnames8 = __toESM(require_classnames());
|
|
15480
15531
|
import { SelectInput as SelectInput3, SelectInputOptionContent as SelectInputOptionContent3 } from "@transferwise/components";
|
|
15481
15532
|
import { useEffect as useEffect9, useMemo as useMemo13, useState as useState14 } from "react";
|
|
15482
|
-
import { useIntl as
|
|
15533
|
+
import { useIntl as useIntl14 } from "react-intl";
|
|
15483
15534
|
|
|
15484
15535
|
// src/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.tsx
|
|
15485
15536
|
import { Avatar as Avatar6, AvatarType as AvatarType5 } from "@transferwise/components";
|
|
@@ -15573,8 +15624,8 @@ var getDisabled = (disabled) => {
|
|
|
15573
15624
|
};
|
|
15574
15625
|
|
|
15575
15626
|
// src/common/messages/multi-select.messages.ts
|
|
15576
|
-
import { defineMessages as
|
|
15577
|
-
var multi_select_messages_default2 =
|
|
15627
|
+
import { defineMessages as defineMessages14 } from "react-intl";
|
|
15628
|
+
var multi_select_messages_default2 = defineMessages14({
|
|
15578
15629
|
summary: {
|
|
15579
15630
|
id: "dynamicFlows.MultiSelect.summary",
|
|
15580
15631
|
defaultMessage: "{first} and {count} more",
|
|
@@ -15592,7 +15643,7 @@ function MultiSelectSchema({
|
|
|
15592
15643
|
errors,
|
|
15593
15644
|
onChange
|
|
15594
15645
|
}) {
|
|
15595
|
-
const { formatMessage, locale } =
|
|
15646
|
+
const { formatMessage, locale } = useIntl14();
|
|
15596
15647
|
const { disabled, items, validationMessages, placeholder } = schema;
|
|
15597
15648
|
const options = items.oneOf.map((item) => mapConstSchemaToOption(item, "select"));
|
|
15598
15649
|
const id = useMemo13(() => schema.$id || generateRandomId(), [schema.$id]);
|
|
@@ -15696,7 +15747,7 @@ var getInitialModelIndices2 = (model, options) => {
|
|
|
15696
15747
|
import { Header as Header9, Modal as Modal3, NavigationOption as NavigationOption6 } from "@transferwise/components";
|
|
15697
15748
|
import { Plus as Plus2 } from "@transferwise/icons";
|
|
15698
15749
|
import { useMemo as useMemo14, useState as useState16 } from "react";
|
|
15699
|
-
import { useIntl as
|
|
15750
|
+
import { useIntl as useIntl16 } from "react-intl";
|
|
15700
15751
|
|
|
15701
15752
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.tsx
|
|
15702
15753
|
import { NavigationOption as NavigationOption5 } from "@transferwise/components";
|
|
@@ -15715,8 +15766,8 @@ function ItemSummaryOption2({ item, onClick }) {
|
|
|
15715
15766
|
}
|
|
15716
15767
|
|
|
15717
15768
|
// src/common/messages/repeatable.messages.ts
|
|
15718
|
-
import { defineMessages as
|
|
15719
|
-
var repeatable_messages_default2 =
|
|
15769
|
+
import { defineMessages as defineMessages15 } from "react-intl";
|
|
15770
|
+
var repeatable_messages_default2 = defineMessages15({
|
|
15720
15771
|
addItemTitle: {
|
|
15721
15772
|
id: "dynamicFlows.ArraySchema.addItemTitle",
|
|
15722
15773
|
defaultMessage: "Add Item",
|
|
@@ -15741,7 +15792,7 @@ var repeatable_messages_default2 = defineMessages14({
|
|
|
15741
15792
|
|
|
15742
15793
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.tsx
|
|
15743
15794
|
import { useState as useState15 } from "react";
|
|
15744
|
-
import { useIntl as
|
|
15795
|
+
import { useIntl as useIntl15 } from "react-intl";
|
|
15745
15796
|
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
15746
15797
|
function RepeatableSchemaStep({
|
|
15747
15798
|
type,
|
|
@@ -15752,7 +15803,7 @@ function RepeatableSchemaStep({
|
|
|
15752
15803
|
onModelChange,
|
|
15753
15804
|
onAction
|
|
15754
15805
|
}) {
|
|
15755
|
-
const { formatMessage } =
|
|
15806
|
+
const { formatMessage } = useIntl15();
|
|
15756
15807
|
const [filename, setFilename] = useState15(void 0);
|
|
15757
15808
|
const step = {
|
|
15758
15809
|
layout: [
|
|
@@ -16059,7 +16110,7 @@ function RepeatableSchema({
|
|
|
16059
16110
|
setEditableItem({ item: null, model: null });
|
|
16060
16111
|
setOpenModalType(null);
|
|
16061
16112
|
};
|
|
16062
|
-
const { formatMessage } =
|
|
16113
|
+
const { formatMessage } = useIntl16();
|
|
16063
16114
|
const validations = getValidationFailures(model, schema, required);
|
|
16064
16115
|
const base64ValidationMessages = useFormattedDefaultErrorMessages({
|
|
16065
16116
|
minItems: schema.minItems,
|
|
@@ -16265,11 +16316,11 @@ import { useEffect as useEffect12, useMemo as useMemo15, useState as useState18
|
|
|
16265
16316
|
|
|
16266
16317
|
// src/legacy/jsonSchemaForm/help/Help.tsx
|
|
16267
16318
|
import { Markdown as Markdown6, Info as Info2 } from "@transferwise/components";
|
|
16268
|
-
import { useIntl as
|
|
16319
|
+
import { useIntl as useIntl17 } from "react-intl";
|
|
16269
16320
|
|
|
16270
16321
|
// src/common/messages/help.messages.ts
|
|
16271
|
-
import { defineMessages as
|
|
16272
|
-
var help_messages_default2 =
|
|
16322
|
+
import { defineMessages as defineMessages16 } from "react-intl";
|
|
16323
|
+
var help_messages_default2 = defineMessages16({
|
|
16273
16324
|
helpAria: {
|
|
16274
16325
|
id: "dynamicFlows.Help.ariaLabel",
|
|
16275
16326
|
defaultMessage: "Click here for more info.",
|
|
@@ -16280,7 +16331,7 @@ var help_messages_default2 = defineMessages15({
|
|
|
16280
16331
|
// src/legacy/jsonSchemaForm/help/Help.tsx
|
|
16281
16332
|
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
16282
16333
|
function Help2(props) {
|
|
16283
|
-
const intl =
|
|
16334
|
+
const intl = useIntl17();
|
|
16284
16335
|
return /* @__PURE__ */ jsx88(
|
|
16285
16336
|
Info2,
|
|
16286
16337
|
{
|
|
@@ -16296,7 +16347,7 @@ var Help_default2 = Help2;
|
|
|
16296
16347
|
|
|
16297
16348
|
// src/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.tsx
|
|
16298
16349
|
import { useEffect as useEffect11 } from "react";
|
|
16299
|
-
import { useIntl as
|
|
16350
|
+
import { useIntl as useIntl18 } from "react-intl";
|
|
16300
16351
|
|
|
16301
16352
|
// src/legacy/formControl/FormControl.tsx
|
|
16302
16353
|
import {
|
|
@@ -17014,7 +17065,7 @@ function SchemaFormControl(props) {
|
|
|
17014
17065
|
labelledBy
|
|
17015
17066
|
} = props;
|
|
17016
17067
|
const log = useLogger();
|
|
17017
|
-
const intl =
|
|
17068
|
+
const intl = useIntl18();
|
|
17018
17069
|
const getSanitisedValue = (value2) => isNativeInput(schema.type) && (isNull3(value2) || isUndefined3(value2)) ? "" : value2;
|
|
17019
17070
|
const onModelChange = (value2, type, metadata) => {
|
|
17020
17071
|
onChange(getValidBasicModelOrNull(value2, schema), type, metadata);
|
|
@@ -17251,7 +17302,7 @@ var OneOfSchema_default = OneOfSchema;
|
|
|
17251
17302
|
// src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.tsx
|
|
17252
17303
|
var import_classnames12 = __toESM(require_classnames());
|
|
17253
17304
|
import { useEffect as useEffect13, useState as useState19 } from "react";
|
|
17254
|
-
import { useIntl as
|
|
17305
|
+
import { useIntl as useIntl19 } from "react-intl";
|
|
17255
17306
|
|
|
17256
17307
|
// src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.tsx
|
|
17257
17308
|
import { Status as Status2, UploadInput as UploadInput4 } from "@transferwise/components";
|
|
@@ -17318,7 +17369,7 @@ function PersistAsyncBlobSchema(props) {
|
|
|
17318
17369
|
const [persistAsyncValidations, setPersistAsyncValidations] = useState19(null);
|
|
17319
17370
|
const [validations, setValidations] = useState19([]);
|
|
17320
17371
|
const [changed, setChanged] = useState19(false);
|
|
17321
|
-
const intl =
|
|
17372
|
+
const intl = useIntl19();
|
|
17322
17373
|
const httpClient = useHttpClient();
|
|
17323
17374
|
const onEvent = useEventDispatcher();
|
|
17324
17375
|
useEffect13(() => {
|
|
@@ -17557,11 +17608,11 @@ var PromotedOneOfSchema_default = PromotedOneOfSchema;
|
|
|
17557
17608
|
|
|
17558
17609
|
// src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.tsx
|
|
17559
17610
|
import { DefinitionList as DefinitionList2, Layout } from "@transferwise/components";
|
|
17560
|
-
import { useIntl as
|
|
17611
|
+
import { useIntl as useIntl20 } from "react-intl";
|
|
17561
17612
|
|
|
17562
17613
|
// src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.ts
|
|
17563
|
-
import { defineMessages as
|
|
17564
|
-
var ReadOnlySchema_messages_default =
|
|
17614
|
+
import { defineMessages as defineMessages17 } from "react-intl";
|
|
17615
|
+
var ReadOnlySchema_messages_default = defineMessages17({
|
|
17565
17616
|
yes: {
|
|
17566
17617
|
id: "dynamicFlows.ReadOnlySchema.yes",
|
|
17567
17618
|
defaultMessage: "Yes",
|
|
@@ -17578,7 +17629,7 @@ var ReadOnlySchema_messages_default = defineMessages16({
|
|
|
17578
17629
|
import { Fragment as Fragment18, jsx as jsx99, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
17579
17630
|
function ReadOnlySchema({ schema, model }) {
|
|
17580
17631
|
const { title = "" } = schema;
|
|
17581
|
-
const { formatMessage } =
|
|
17632
|
+
const { formatMessage } = useIntl20();
|
|
17582
17633
|
const value = getValueForSchema({ schema, model, formatMessage });
|
|
17583
17634
|
return /* @__PURE__ */ jsx99(DefinitionList2, { layout: Layout.VERTICAL_ONE_COLUMN, definitions: [{ title, value, key: "" }] });
|
|
17584
17635
|
}
|
|
@@ -18106,11 +18157,11 @@ var DynamicLoadingIndicator_default = DynamicLoadingIndicator;
|
|
|
18106
18157
|
|
|
18107
18158
|
// src/legacy/layout/paragraph/DynamicParagraph.tsx
|
|
18108
18159
|
import { Button as Button9 } from "@transferwise/components";
|
|
18109
|
-
import { useIntl as
|
|
18160
|
+
import { useIntl as useIntl21 } from "react-intl";
|
|
18110
18161
|
|
|
18111
18162
|
// src/common/messages/paragraph.messages.ts
|
|
18112
|
-
import { defineMessages as
|
|
18113
|
-
var paragraph_messages_default2 =
|
|
18163
|
+
import { defineMessages as defineMessages18 } from "react-intl";
|
|
18164
|
+
var paragraph_messages_default2 = defineMessages18({
|
|
18114
18165
|
copy: {
|
|
18115
18166
|
id: "dynamicFlows.DynamicParagraph.copy",
|
|
18116
18167
|
defaultMessage: "Copy",
|
|
@@ -18142,7 +18193,7 @@ function BasicDynamicParagraph({ component }) {
|
|
|
18142
18193
|
return /* @__PURE__ */ jsx110("p", { className: `np-text-body-large ${getTextAlignmentAndMargin2(component)}`, children: component.text });
|
|
18143
18194
|
}
|
|
18144
18195
|
function CopyableDynamicParagraph({ component }) {
|
|
18145
|
-
const { formatMessage } =
|
|
18196
|
+
const { formatMessage } = useIntl21();
|
|
18146
18197
|
const createSnackbar = useSnackBarIfAvailable2();
|
|
18147
18198
|
const { text } = component;
|
|
18148
18199
|
const copy = () => {
|
|
@@ -18257,7 +18308,7 @@ var SearchInput = ({ title, value, onFocus, onChange }) => {
|
|
|
18257
18308
|
|
|
18258
18309
|
// src/legacy/layout/search/SearchResults.tsx
|
|
18259
18310
|
import { NavigationOption as NavigationOption7, NavigationOptionsList as NavigationOptionsList4 } from "@transferwise/components";
|
|
18260
|
-
import { useIntl as
|
|
18311
|
+
import { useIntl as useIntl22 } from "react-intl";
|
|
18261
18312
|
import { jsx as jsx113, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
18262
18313
|
function SearchResults2({ results, emptyMessage, onSelect }) {
|
|
18263
18314
|
if (results.length === 0) {
|
|
@@ -18277,7 +18328,7 @@ function SearchResults2({ results, emptyMessage, onSelect }) {
|
|
|
18277
18328
|
)) });
|
|
18278
18329
|
}
|
|
18279
18330
|
function ErrorResult2({ onRetrySearch }) {
|
|
18280
|
-
const intl =
|
|
18331
|
+
const intl = useIntl22();
|
|
18281
18332
|
return /* @__PURE__ */ jsxs42("p", { className: "m-t-2", children: [
|
|
18282
18333
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
18283
18334
|
"\xA0",
|
|
@@ -18367,12 +18418,24 @@ var addQueryParameter2 = (url, key, value) => {
|
|
|
18367
18418
|
// src/legacy/layout/search/DynamicSearch.tsx
|
|
18368
18419
|
var import_classnames14 = __toESM(require_classnames());
|
|
18369
18420
|
import { Markdown as Markdown8, Typeahead as Typeahead2 } from "@transferwise/components";
|
|
18370
|
-
import { useIntl as
|
|
18421
|
+
import { useIntl as useIntl23 } from "react-intl";
|
|
18422
|
+
|
|
18423
|
+
// src/common/messages/search.messages.ts
|
|
18424
|
+
import { defineMessages as defineMessages19 } from "react-intl";
|
|
18425
|
+
var search_messages_default2 = defineMessages19({
|
|
18426
|
+
loading: {
|
|
18427
|
+
id: "dynamicFlows.SearchLayout.loading",
|
|
18428
|
+
defaultMessage: "Loading...",
|
|
18429
|
+
description: "A message shown to the user while their search is being processed, before results appear."
|
|
18430
|
+
}
|
|
18431
|
+
});
|
|
18432
|
+
|
|
18433
|
+
// src/legacy/layout/search/DynamicSearch.tsx
|
|
18371
18434
|
import { jsx as jsx114, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
18372
18435
|
var DEBOUNCE_TIME2 = 400;
|
|
18373
18436
|
function DynamicSearch({ component, onAction }) {
|
|
18374
18437
|
const [query, setQuery] = useState24("");
|
|
18375
|
-
const intl =
|
|
18438
|
+
const intl = useIntl23();
|
|
18376
18439
|
const { control, title, margin, url, method, param, emptyMessage } = component;
|
|
18377
18440
|
const { status, results, search } = useSearch({ url, method, param });
|
|
18378
18441
|
const onEvent = useEventDispatcher();
|
|
@@ -18404,6 +18467,7 @@ function DynamicSearch({ component, onAction }) {
|
|
|
18404
18467
|
setQuery(query);
|
|
18405
18468
|
void search(query);
|
|
18406
18469
|
};
|
|
18470
|
+
const loadingMessage = intl.formatMessage(search_messages_default2.loading);
|
|
18407
18471
|
if (control === "inline") {
|
|
18408
18472
|
return /* @__PURE__ */ jsx114("div", { className: (0, import_classnames14.default)(getMargin2(margin != null ? margin : "md"), "df-search-typeahead"), children: /* @__PURE__ */ jsxs43("label", { className: "control-label d-inline", children: [
|
|
18409
18473
|
title,
|
|
@@ -18421,6 +18485,7 @@ function DynamicSearch({ component, onAction }) {
|
|
|
18421
18485
|
state: status,
|
|
18422
18486
|
results,
|
|
18423
18487
|
emptyMessage,
|
|
18488
|
+
loadingMessage,
|
|
18424
18489
|
onRetrySearch
|
|
18425
18490
|
}
|
|
18426
18491
|
),
|
|
@@ -18458,10 +18523,11 @@ function mapResultToTypeaheadOption2(result) {
|
|
|
18458
18523
|
};
|
|
18459
18524
|
}
|
|
18460
18525
|
function TypeaheadFooter2({
|
|
18526
|
+
emptyMessage,
|
|
18527
|
+
loadingMessage,
|
|
18461
18528
|
results,
|
|
18462
18529
|
state,
|
|
18463
|
-
onRetrySearch
|
|
18464
|
-
emptyMessage
|
|
18530
|
+
onRetrySearch
|
|
18465
18531
|
}) {
|
|
18466
18532
|
if (state === "success" && results.length === 0) {
|
|
18467
18533
|
return /* @__PURE__ */ jsx114(Markdown8, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: emptyMessage });
|
|
@@ -18470,7 +18536,7 @@ function TypeaheadFooter2({
|
|
|
18470
18536
|
return /* @__PURE__ */ jsx114("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx114(ErrorResult2, { onRetrySearch }) });
|
|
18471
18537
|
}
|
|
18472
18538
|
if (state === "loading" || results.length === 0) {
|
|
18473
|
-
return /* @__PURE__ */ jsx114("p", { className: "m-t-2 m-x-2", children:
|
|
18539
|
+
return /* @__PURE__ */ jsx114("p", { className: "m-t-2 m-x-2", children: loadingMessage });
|
|
18474
18540
|
}
|
|
18475
18541
|
return null;
|
|
18476
18542
|
}
|
|
@@ -18646,7 +18712,7 @@ var controlTypesWithPersistOnChange = /* @__PURE__ */ new Set([
|
|
|
18646
18712
|
]);
|
|
18647
18713
|
function PersistAsyncBasicSchema(props) {
|
|
18648
18714
|
const { schema, required = false, submitted, errors, onChange, onPersistAsync } = props;
|
|
18649
|
-
const intl =
|
|
18715
|
+
const intl = useIntl24();
|
|
18650
18716
|
const httpClient = useHttpClient();
|
|
18651
18717
|
const onEvent = useEventDispatcher();
|
|
18652
18718
|
const [persistAsyncModel, setPersistAsyncModel] = useState27(null);
|
|
@@ -18741,7 +18807,7 @@ var PersistAsyncBasicSchema_default = PersistAsyncBasicSchema;
|
|
|
18741
18807
|
var usePersistAsync = (persistAsync) => {
|
|
18742
18808
|
const [abortController, setAbortController] = useState28(null);
|
|
18743
18809
|
const httpClient = useHttpClient();
|
|
18744
|
-
const intl =
|
|
18810
|
+
const intl = useIntl25();
|
|
18745
18811
|
const { schema } = persistAsync;
|
|
18746
18812
|
async function handlePersistAsync(model) {
|
|
18747
18813
|
const isInvalidSchema = model instanceof Blob ? !isBlobSchema2(schema) : !isValidSchema(model, schema);
|
|
@@ -18974,12 +19040,12 @@ import { useEffect as useEffect25, useState as useState31 } from "react";
|
|
|
18974
19040
|
|
|
18975
19041
|
// src/common/cameraCapture/CameraCapture.tsx
|
|
18976
19042
|
import { useCallback as useCallback10, useEffect as useEffect24, useMemo as useMemo21, useRef as useRef8, useState as useState30 } from "react";
|
|
18977
|
-
import { useIntl as
|
|
19043
|
+
import { useIntl as useIntl28 } from "react-intl";
|
|
18978
19044
|
import Webcam from "react-webcam";
|
|
18979
19045
|
|
|
18980
19046
|
// src/common/cameraCapture/CameraCapture.messages.ts
|
|
18981
|
-
import { defineMessages as
|
|
18982
|
-
var CameraCapture_messages_default =
|
|
19047
|
+
import { defineMessages as defineMessages20 } from "react-intl";
|
|
19048
|
+
var CameraCapture_messages_default = defineMessages20({
|
|
18983
19049
|
reviewSubmit: {
|
|
18984
19050
|
id: "dynamicFlows.CameraCapture.reviewSubmit",
|
|
18985
19051
|
defaultMessage: "Yes, submit",
|
|
@@ -19039,14 +19105,14 @@ var CameraCapture_messages_default = defineMessages18({
|
|
|
19039
19105
|
|
|
19040
19106
|
// src/common/cameraCapture/components/bottomBar/BottomBar.tsx
|
|
19041
19107
|
import { Button as Button11, ControlType, Priority, Size as Size3 } from "@transferwise/components";
|
|
19042
|
-
import { useIntl as
|
|
19108
|
+
import { useIntl as useIntl26 } from "react-intl";
|
|
19043
19109
|
import { jsx as jsx119, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
19044
19110
|
var CaptureBottomBar = ({ onCapture }) => /* @__PURE__ */ jsx119("div", { className: "bottom-bar", children: /* @__PURE__ */ jsx119(CaptureButton, { onClick: onCapture }) });
|
|
19045
19111
|
var ReviewBottomBar = ({
|
|
19046
19112
|
onSubmit,
|
|
19047
19113
|
onRetry
|
|
19048
19114
|
}) => {
|
|
19049
|
-
const intl =
|
|
19115
|
+
const intl = useIntl26();
|
|
19050
19116
|
return /* @__PURE__ */ jsx119("div", { className: "bottom-bar p-x-2", children: /* @__PURE__ */ jsx119("div", { className: "row", children: /* @__PURE__ */ jsxs46("div", { className: "col-xs-12 col-md-6 col-md-offset-3", children: [
|
|
19051
19117
|
/* @__PURE__ */ jsx119(
|
|
19052
19118
|
Button11,
|
|
@@ -19085,11 +19151,11 @@ var CaptureButton = ({ onClick }) => /* @__PURE__ */ jsx119(
|
|
|
19085
19151
|
);
|
|
19086
19152
|
|
|
19087
19153
|
// src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
|
|
19088
|
-
import { useIntl as
|
|
19154
|
+
import { useIntl as useIntl27 } from "react-intl";
|
|
19089
19155
|
|
|
19090
19156
|
// src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.ts
|
|
19091
|
-
import { defineMessages as
|
|
19092
|
-
var OrientationLockOverlay_messages_default =
|
|
19157
|
+
import { defineMessages as defineMessages21 } from "react-intl";
|
|
19158
|
+
var OrientationLockOverlay_messages_default = defineMessages21({
|
|
19093
19159
|
text: {
|
|
19094
19160
|
id: "dynamicFlows.CameraCapture.rotatePhone.text",
|
|
19095
19161
|
defaultMessage: "Rotate your phone to portrait view to take a photo",
|
|
@@ -19100,7 +19166,7 @@ var OrientationLockOverlay_messages_default = defineMessages19({
|
|
|
19100
19166
|
// src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
|
|
19101
19167
|
import { jsx as jsx120, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
19102
19168
|
function OrientationLockOverlay() {
|
|
19103
|
-
const intl =
|
|
19169
|
+
const intl = useIntl27();
|
|
19104
19170
|
return /* @__PURE__ */ jsxs47("div", { className: "orientation-lock-overlay", children: [
|
|
19105
19171
|
/* @__PURE__ */ jsx120(
|
|
19106
19172
|
"img",
|
|
@@ -19390,7 +19456,7 @@ function CameraCapture({
|
|
|
19390
19456
|
shouldLockOrientation,
|
|
19391
19457
|
onEvent
|
|
19392
19458
|
);
|
|
19393
|
-
const intl =
|
|
19459
|
+
const intl = useIntl28();
|
|
19394
19460
|
const handleCapture = useCallback10(async () => {
|
|
19395
19461
|
var _a, _b, _c, _d, _e, _f;
|
|
19396
19462
|
if (((_a = webcamReference == null ? void 0 : webcamReference.current) == null ? void 0 : _a.video) && ((_c = (_b = webcamReference == null ? void 0 : webcamReference.current) == null ? void 0 : _b.video) == null ? void 0 : _c.readyState) >= 3) {
|
|
@@ -19613,11 +19679,11 @@ function getFirstAction(step) {
|
|
|
19613
19679
|
}
|
|
19614
19680
|
|
|
19615
19681
|
// src/legacy/step/externalConfirmationStep/ExternalConfirmationStep.tsx
|
|
19616
|
-
import { useIntl as
|
|
19682
|
+
import { useIntl as useIntl29 } from "react-intl";
|
|
19617
19683
|
|
|
19618
19684
|
// src/common/messages/external-confirmation.messages.ts
|
|
19619
|
-
import { defineMessages as
|
|
19620
|
-
var external_confirmation_messages_default2 =
|
|
19685
|
+
import { defineMessages as defineMessages22 } from "react-intl";
|
|
19686
|
+
var external_confirmation_messages_default2 = defineMessages22({
|
|
19621
19687
|
title: {
|
|
19622
19688
|
id: "dynamicFlows.ExternalConfirmation.title",
|
|
19623
19689
|
defaultMessage: "Please confirm",
|
|
@@ -19645,7 +19711,7 @@ import { jsx as jsx125 } from "react/jsx-runtime";
|
|
|
19645
19711
|
var noop6 = () => {
|
|
19646
19712
|
};
|
|
19647
19713
|
function ExternalConfirmationStep({ url, onClose }) {
|
|
19648
|
-
const { formatMessage } =
|
|
19714
|
+
const { formatMessage } = useIntl29();
|
|
19649
19715
|
return /* @__PURE__ */ jsx125(
|
|
19650
19716
|
DynamicLayout_default,
|
|
19651
19717
|
{
|
|
@@ -20018,9 +20084,9 @@ var assertResponseIsValid2 = (response) => {
|
|
|
20018
20084
|
var isResponse2 = (response) => typeof response === "object" && response !== null && "clone" in response && "bodyUsed" in response;
|
|
20019
20085
|
|
|
20020
20086
|
// src/legacy/dynamicFlow/utils/useErrorResponse.tsx
|
|
20021
|
-
import { useIntl as
|
|
20087
|
+
import { useIntl as useIntl30 } from "react-intl";
|
|
20022
20088
|
var useErrorResponse = () => {
|
|
20023
|
-
const { formatMessage } =
|
|
20089
|
+
const { formatMessage } = useIntl30();
|
|
20024
20090
|
return async (response, fetchType, isInitialRequest) => {
|
|
20025
20091
|
try {
|
|
20026
20092
|
const errorResponse = await parseErrorResponse(response);
|
|
@@ -20064,7 +20130,7 @@ var DynamicFlowComponent = ({
|
|
|
20064
20130
|
setSchemaModel
|
|
20065
20131
|
} = useDynamicFlowState(initialStep);
|
|
20066
20132
|
const [submitted, setSubmitted] = useState34(false);
|
|
20067
|
-
const { locale } =
|
|
20133
|
+
const { locale } = useIntl31();
|
|
20068
20134
|
const { isLoading, loader, setLoadingState } = useLoader(
|
|
20069
20135
|
loaderConfig,
|
|
20070
20136
|
initialStep ? "idle" : "initial"
|