@wise/dynamic-flow-client 3.22.0 → 3.22.2-experimental-b24c473
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 +603 -431
- package/build/main.min.js +1 -1
- package/build/main.mjs +615 -443
- package/build/types/common/messages/search.messages.d.ts +8 -0
- package/build/types/legacy/common/validators/schemas/one-of-preselection.d.ts +9 -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.js
CHANGED
|
@@ -524,7 +524,8 @@ var de_default = {
|
|
|
524
524
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "Bitte lade mindestens {minItems} Datei(en) hoch.",
|
|
525
525
|
"dynamicFlows.PersistAsyncSchema.genericError": "Da ist etwas schiefgegangen. Versuche es bitte nochmal.",
|
|
526
526
|
"dynamicFlows.ReadOnlySchema.no": "Nein",
|
|
527
|
-
"dynamicFlows.ReadOnlySchema.yes": "Ja"
|
|
527
|
+
"dynamicFlows.ReadOnlySchema.yes": "Ja",
|
|
528
|
+
"dynamicFlows.SearchLayout.loading": "L\xE4dt..."
|
|
528
529
|
};
|
|
529
530
|
|
|
530
531
|
// src/i18n/en.json
|
|
@@ -574,7 +575,8 @@ var en_default = {
|
|
|
574
575
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "Please upload at least {minItems} file(s).",
|
|
575
576
|
"dynamicFlows.PersistAsyncSchema.genericError": "Something went wrong, please try again.",
|
|
576
577
|
"dynamicFlows.ReadOnlySchema.no": "No",
|
|
577
|
-
"dynamicFlows.ReadOnlySchema.yes": "Yes"
|
|
578
|
+
"dynamicFlows.ReadOnlySchema.yes": "Yes",
|
|
579
|
+
"dynamicFlows.SearchLayout.loading": "Loading..."
|
|
578
580
|
};
|
|
579
581
|
|
|
580
582
|
// src/i18n/es.json
|
|
@@ -624,7 +626,8 @@ var es_default = {
|
|
|
624
626
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "Sube al menos {minItems} archivo(s).",
|
|
625
627
|
"dynamicFlows.PersistAsyncSchema.genericError": "Ha habido un error. Int\xE9ntalo de nuevo.",
|
|
626
628
|
"dynamicFlows.ReadOnlySchema.no": "No",
|
|
627
|
-
"dynamicFlows.ReadOnlySchema.yes": "S\xED"
|
|
629
|
+
"dynamicFlows.ReadOnlySchema.yes": "S\xED",
|
|
630
|
+
"dynamicFlows.SearchLayout.loading": "Cargando..."
|
|
628
631
|
};
|
|
629
632
|
|
|
630
633
|
// src/i18n/fr.json
|
|
@@ -674,7 +677,8 @@ var fr_default = {
|
|
|
674
677
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "Veuillez t\xE9l\xE9charger au moins {minItems} fichier(s).",
|
|
675
678
|
"dynamicFlows.PersistAsyncSchema.genericError": "Une erreur s'est produite, veuillez r\xE9essayer.",
|
|
676
679
|
"dynamicFlows.ReadOnlySchema.no": "Non",
|
|
677
|
-
"dynamicFlows.ReadOnlySchema.yes": "Oui"
|
|
680
|
+
"dynamicFlows.ReadOnlySchema.yes": "Oui",
|
|
681
|
+
"dynamicFlows.SearchLayout.loading": "Chargement..."
|
|
678
682
|
};
|
|
679
683
|
|
|
680
684
|
// src/i18n/hu.json
|
|
@@ -724,7 +728,8 @@ var hu_default = {
|
|
|
724
728
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "K\xE9r\xFCnk, hogy legal\xE1bb {minItems} f\xE1jlt t\xF6lts fel.",
|
|
725
729
|
"dynamicFlows.PersistAsyncSchema.genericError": "Valami hiba t\xF6rt\xE9nt. K\xE9r\xFCnk, pr\xF3b\xE1ld \xFAjra.",
|
|
726
730
|
"dynamicFlows.ReadOnlySchema.no": "Nem",
|
|
727
|
-
"dynamicFlows.ReadOnlySchema.yes": "Igen"
|
|
731
|
+
"dynamicFlows.ReadOnlySchema.yes": "Igen",
|
|
732
|
+
"dynamicFlows.SearchLayout.loading": "Bet\xF6lt\xE9s..."
|
|
728
733
|
};
|
|
729
734
|
|
|
730
735
|
// src/i18n/id.json
|
|
@@ -774,7 +779,8 @@ var id_default = {
|
|
|
774
779
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "Harap unggah sedikitnya {minItems} file.",
|
|
775
780
|
"dynamicFlows.PersistAsyncSchema.genericError": "Terjadi kesalahan, mohon coba lagi.",
|
|
776
781
|
"dynamicFlows.ReadOnlySchema.no": "Tidak",
|
|
777
|
-
"dynamicFlows.ReadOnlySchema.yes": "Ya"
|
|
782
|
+
"dynamicFlows.ReadOnlySchema.yes": "Ya",
|
|
783
|
+
"dynamicFlows.SearchLayout.loading": "Memuat..."
|
|
778
784
|
};
|
|
779
785
|
|
|
780
786
|
// src/i18n/it.json
|
|
@@ -824,7 +830,8 @@ var it_default = {
|
|
|
824
830
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "Carica almeno {minItems} file.",
|
|
825
831
|
"dynamicFlows.PersistAsyncSchema.genericError": "Qualcosa \xE8 andato storto. Riprova.",
|
|
826
832
|
"dynamicFlows.ReadOnlySchema.no": "No",
|
|
827
|
-
"dynamicFlows.ReadOnlySchema.yes": "S\xEC"
|
|
833
|
+
"dynamicFlows.ReadOnlySchema.yes": "S\xEC",
|
|
834
|
+
"dynamicFlows.SearchLayout.loading": "Caricamento..."
|
|
828
835
|
};
|
|
829
836
|
|
|
830
837
|
// src/i18n/ja.json
|
|
@@ -874,7 +881,8 @@ var ja_default = {
|
|
|
874
881
|
"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",
|
|
875
882
|
"dynamicFlows.PersistAsyncSchema.genericError": "\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u518D\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002",
|
|
876
883
|
"dynamicFlows.ReadOnlySchema.no": "\u3044\u3044\u3048",
|
|
877
|
-
"dynamicFlows.ReadOnlySchema.yes": "\u306F\u3044"
|
|
884
|
+
"dynamicFlows.ReadOnlySchema.yes": "\u306F\u3044",
|
|
885
|
+
"dynamicFlows.SearchLayout.loading": "\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026"
|
|
878
886
|
};
|
|
879
887
|
|
|
880
888
|
// src/i18n/pl.json
|
|
@@ -924,7 +932,8 @@ var pl_default = {
|
|
|
924
932
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "Prze\u015Blij co najmniej nast\u0119puj\u0105c\u0105 liczb\u0119 plik\xF3w: {minItems}.",
|
|
925
933
|
"dynamicFlows.PersistAsyncSchema.genericError": "Wyst\u0105pi\u0142 b\u0142\u0105d, prosimy spr\xF3bowa\u0107 ponownie.",
|
|
926
934
|
"dynamicFlows.ReadOnlySchema.no": "Nie",
|
|
927
|
-
"dynamicFlows.ReadOnlySchema.yes": "Tak"
|
|
935
|
+
"dynamicFlows.ReadOnlySchema.yes": "Tak",
|
|
936
|
+
"dynamicFlows.SearchLayout.loading": "Trwa \u0142adowanie..."
|
|
928
937
|
};
|
|
929
938
|
|
|
930
939
|
// src/i18n/pt.json
|
|
@@ -974,7 +983,8 @@ var pt_default = {
|
|
|
974
983
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "Por favor, envie pelo menos {minItems} arquivo(s).",
|
|
975
984
|
"dynamicFlows.PersistAsyncSchema.genericError": "Ocorreu um erro. Por favor, tente novamente.",
|
|
976
985
|
"dynamicFlows.ReadOnlySchema.no": "N\xE3o",
|
|
977
|
-
"dynamicFlows.ReadOnlySchema.yes": "Sim"
|
|
986
|
+
"dynamicFlows.ReadOnlySchema.yes": "Sim",
|
|
987
|
+
"dynamicFlows.SearchLayout.loading": "Carregando..."
|
|
978
988
|
};
|
|
979
989
|
|
|
980
990
|
// src/i18n/ro.json
|
|
@@ -1024,7 +1034,8 @@ var ro_default = {
|
|
|
1024
1034
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "Te rug\u0103m s\u0103 \xEEncarci cel pu\u021Bin {minItems} fi\u0219ier(e).",
|
|
1025
1035
|
"dynamicFlows.PersistAsyncSchema.genericError": "Ceva nu a mers bine, te rug\u0103m s\u0103 \xEEncerci din nou.",
|
|
1026
1036
|
"dynamicFlows.ReadOnlySchema.no": "Nu",
|
|
1027
|
-
"dynamicFlows.ReadOnlySchema.yes": "Da"
|
|
1037
|
+
"dynamicFlows.ReadOnlySchema.yes": "Da",
|
|
1038
|
+
"dynamicFlows.SearchLayout.loading": "Se \xEEncarc\u0103..."
|
|
1028
1039
|
};
|
|
1029
1040
|
|
|
1030
1041
|
// src/i18n/ru.json
|
|
@@ -1074,7 +1085,8 @@ var ru_default = {
|
|
|
1074
1085
|
"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).",
|
|
1075
1086
|
"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.",
|
|
1076
1087
|
"dynamicFlows.ReadOnlySchema.no": "\u041D\u0435\u0442",
|
|
1077
|
-
"dynamicFlows.ReadOnlySchema.yes": "\u0414\u0430"
|
|
1088
|
+
"dynamicFlows.ReadOnlySchema.yes": "\u0414\u0430",
|
|
1089
|
+
"dynamicFlows.SearchLayout.loading": "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430..."
|
|
1078
1090
|
};
|
|
1079
1091
|
|
|
1080
1092
|
// src/i18n/th.json
|
|
@@ -1124,7 +1136,8 @@ var th_default = {
|
|
|
1124
1136
|
"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",
|
|
1125
1137
|
"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",
|
|
1126
1138
|
"dynamicFlows.ReadOnlySchema.no": "\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48",
|
|
1127
|
-
"dynamicFlows.ReadOnlySchema.yes": "\u0E43\u0E0A\u0E48"
|
|
1139
|
+
"dynamicFlows.ReadOnlySchema.yes": "\u0E43\u0E0A\u0E48",
|
|
1140
|
+
"dynamicFlows.SearchLayout.loading": "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14..."
|
|
1128
1141
|
};
|
|
1129
1142
|
|
|
1130
1143
|
// src/i18n/tr.json
|
|
@@ -1174,7 +1187,8 @@ var tr_default = {
|
|
|
1174
1187
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "L\xFCtfen en az {minItems} dosya y\xFCkleyin.",
|
|
1175
1188
|
"dynamicFlows.PersistAsyncSchema.genericError": "Bir \u015Feyler ters gitti, l\xFCtfen tekrar deneyin.",
|
|
1176
1189
|
"dynamicFlows.ReadOnlySchema.no": "Hay\u0131r",
|
|
1177
|
-
"dynamicFlows.ReadOnlySchema.yes": "Evet"
|
|
1190
|
+
"dynamicFlows.ReadOnlySchema.yes": "Evet",
|
|
1191
|
+
"dynamicFlows.SearchLayout.loading": "Y\xFCkleniyor..."
|
|
1178
1192
|
};
|
|
1179
1193
|
|
|
1180
1194
|
// src/i18n/zh_CN.json
|
|
@@ -1224,7 +1238,8 @@ var zh_CN_default = {
|
|
|
1224
1238
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "\u8BF7\u4E0A\u4F20\u81F3\u5C11 {minItems} \u4E2A\u6587\u4EF6\u3002",
|
|
1225
1239
|
"dynamicFlows.PersistAsyncSchema.genericError": "\u51FA\u9519\u4E86\uFF0C\u8BF7\u91CD\u8BD5\u3002",
|
|
1226
1240
|
"dynamicFlows.ReadOnlySchema.no": "\u5426",
|
|
1227
|
-
"dynamicFlows.ReadOnlySchema.yes": "\u662F"
|
|
1241
|
+
"dynamicFlows.ReadOnlySchema.yes": "\u662F",
|
|
1242
|
+
"dynamicFlows.SearchLayout.loading": "\u6B63\u5728\u52A0\u8F7D\u2026"
|
|
1228
1243
|
};
|
|
1229
1244
|
|
|
1230
1245
|
// src/i18n/zh_HK.json
|
|
@@ -1274,7 +1289,8 @@ var zh_HK_default = {
|
|
|
1274
1289
|
"dynamicFlows.MultipleFileUploadSchema.minItemsError": "\u8ACB\u4E0A\u8F09\u81F3\u5C11{minItems}\u500B\u6A94\u6848\u3002",
|
|
1275
1290
|
"dynamicFlows.PersistAsyncSchema.genericError": "\u51FA\u73FE\u4E86\u554F\u984C\uFF0C\u8ACB\u518D\u8A66\u4E00\u6B21\u3002",
|
|
1276
1291
|
"dynamicFlows.ReadOnlySchema.no": "\u5426",
|
|
1277
|
-
"dynamicFlows.ReadOnlySchema.yes": "\u662F"
|
|
1292
|
+
"dynamicFlows.ReadOnlySchema.yes": "\u662F",
|
|
1293
|
+
"dynamicFlows.SearchLayout.loading": "\u8F09\u5165\u4E2D\u2026"
|
|
1278
1294
|
};
|
|
1279
1295
|
|
|
1280
1296
|
// src/i18n/index.ts
|
|
@@ -1472,6 +1488,17 @@ var allOfComponentToProps = ({ control, description, help, title }, children) =>
|
|
|
1472
1488
|
title
|
|
1473
1489
|
});
|
|
1474
1490
|
|
|
1491
|
+
// src/revamp/renderers/mappers/utils/mapErrorsToValidationState.ts
|
|
1492
|
+
var mapErrorsToValidationState = (errors) => {
|
|
1493
|
+
if (errors) {
|
|
1494
|
+
if (errors.length > 0) {
|
|
1495
|
+
return { status: "invalid", message: errors[0] };
|
|
1496
|
+
}
|
|
1497
|
+
return { status: "valid" };
|
|
1498
|
+
}
|
|
1499
|
+
return void 0;
|
|
1500
|
+
};
|
|
1501
|
+
|
|
1475
1502
|
// src/revamp/renderers/mappers/utils/inputComponentToProps.ts
|
|
1476
1503
|
var inputComponentToProps = (component, type) => {
|
|
1477
1504
|
var _a;
|
|
@@ -1518,13 +1545,7 @@ var getValidationState = (errors, validationAsyncState) => {
|
|
|
1518
1545
|
return { status: "valid", message: validationAsyncState == null ? void 0 : validationAsyncState.messages.success };
|
|
1519
1546
|
}
|
|
1520
1547
|
}
|
|
1521
|
-
|
|
1522
|
-
if (errors.length > 0) {
|
|
1523
|
-
return { status: "invalid", message: errors[0] };
|
|
1524
|
-
}
|
|
1525
|
-
return { status: "valid" };
|
|
1526
|
-
}
|
|
1527
|
-
return void 0;
|
|
1548
|
+
return mapErrorsToValidationState(errors);
|
|
1528
1549
|
};
|
|
1529
1550
|
|
|
1530
1551
|
// src/revamp/renderers/mappers/booleanInputComponentToProps.ts
|
|
@@ -1683,15 +1704,14 @@ var modalComponentToProps = ({ content, control, margin, trigger }, components)
|
|
|
1683
1704
|
|
|
1684
1705
|
// src/revamp/renderers/mappers/multiUploadInputComponentToProps.ts
|
|
1685
1706
|
var multiUploadInputComponentToProps = (component) => {
|
|
1686
|
-
const { accepts, fileMap, maxSize, minItems, maxItems, uploadLabel } = component;
|
|
1687
|
-
const
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
});
|
|
1707
|
+
const { accepts, errorsMap, fileMap, maxSize, minItems, maxItems, uploadLabel } = component;
|
|
1708
|
+
const fileList = Object.entries(fileMap).map(
|
|
1709
|
+
([id, file]) => ({
|
|
1710
|
+
id,
|
|
1711
|
+
file,
|
|
1712
|
+
validationState: mapErrorsToValidationState(errorsMap[id])
|
|
1713
|
+
})
|
|
1714
|
+
);
|
|
1695
1715
|
return __spreadProps(__spreadValues({}, inputComponentToProps(component, "input-upload-multi")), {
|
|
1696
1716
|
accepts,
|
|
1697
1717
|
maxSize,
|
|
@@ -1778,22 +1798,13 @@ var repeatableComponentToProps = (component, children, editableItemChildren) =>
|
|
|
1778
1798
|
maxItems,
|
|
1779
1799
|
minItems,
|
|
1780
1800
|
title,
|
|
1781
|
-
validationState:
|
|
1801
|
+
validationState: mapErrorsToValidationState(errors),
|
|
1782
1802
|
onAdd: onAdd.bind(component),
|
|
1783
1803
|
onEdit: onEdit.bind(component),
|
|
1784
1804
|
onSave: onSave.bind(component),
|
|
1785
1805
|
onRemove: onRemove.bind(component)
|
|
1786
1806
|
};
|
|
1787
1807
|
};
|
|
1788
|
-
var getValidationState2 = (errors) => {
|
|
1789
|
-
if (errors) {
|
|
1790
|
-
if (errors.length > 0) {
|
|
1791
|
-
return { status: "invalid", message: errors[0] };
|
|
1792
|
-
}
|
|
1793
|
-
return { status: "valid" };
|
|
1794
|
-
}
|
|
1795
|
-
return void 0;
|
|
1796
|
-
};
|
|
1797
1808
|
|
|
1798
1809
|
// src/revamp/renderers/mappers/reviewComponentToProps.ts
|
|
1799
1810
|
var reviewComponentToProps = ({
|
|
@@ -5880,21 +5891,13 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
|
5880
5891
|
quotelessJson,
|
|
5881
5892
|
ZodError
|
|
5882
5893
|
});
|
|
5883
|
-
var
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
z.literal("GET"),
|
|
5890
|
-
z.literal("POST"),
|
|
5891
|
-
z.literal("PUT"),
|
|
5892
|
-
z.literal("PATCH"),
|
|
5893
|
-
z.literal("DELETE")
|
|
5894
|
+
var sizeSchema = z.union([
|
|
5895
|
+
z.literal("xs"),
|
|
5896
|
+
z.literal("sm"),
|
|
5897
|
+
z.literal("md"),
|
|
5898
|
+
z.literal("lg"),
|
|
5899
|
+
z.literal("xl")
|
|
5894
5900
|
]);
|
|
5895
|
-
var iconNamedSchema = z.object({
|
|
5896
|
-
name: z.string()
|
|
5897
|
-
});
|
|
5898
5901
|
var contextSchema = z.union([
|
|
5899
5902
|
z.literal("positive"),
|
|
5900
5903
|
z.literal("neutral"),
|
|
@@ -5905,18 +5908,107 @@ var contextSchema = z.union([
|
|
|
5905
5908
|
z.literal("info"),
|
|
5906
5909
|
z.literal("primary")
|
|
5907
5910
|
]);
|
|
5908
|
-
var
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
z.literal("
|
|
5915
|
-
z.literal("
|
|
5916
|
-
z.literal("
|
|
5911
|
+
var columnsLayoutBiasSchema = z.union([
|
|
5912
|
+
z.literal("none"),
|
|
5913
|
+
z.literal("left"),
|
|
5914
|
+
z.literal("right")
|
|
5915
|
+
]);
|
|
5916
|
+
var statusListLayoutStatusSchema = z.union([
|
|
5917
|
+
z.literal("not-done"),
|
|
5918
|
+
z.literal("pending"),
|
|
5919
|
+
z.literal("done")
|
|
5917
5920
|
]);
|
|
5918
5921
|
var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
|
|
5919
|
-
var
|
|
5922
|
+
var formLayoutSchemaReferenceSchema = z.object({
|
|
5923
|
+
$ref: z.string()
|
|
5924
|
+
});
|
|
5925
|
+
var modalLayoutTriggerSchema = z.object({
|
|
5926
|
+
title: z.string()
|
|
5927
|
+
});
|
|
5928
|
+
var httpMethodSchema = z.union([
|
|
5929
|
+
z.literal("GET"),
|
|
5930
|
+
z.literal("POST"),
|
|
5931
|
+
z.literal("PUT"),
|
|
5932
|
+
z.literal("PATCH"),
|
|
5933
|
+
z.literal("DELETE")
|
|
5934
|
+
]);
|
|
5935
|
+
var dividerLayoutSchema = z.object({
|
|
5936
|
+
type: z.literal("divider"),
|
|
5937
|
+
control: z.string().optional(),
|
|
5938
|
+
margin: sizeSchema.optional()
|
|
5939
|
+
});
|
|
5940
|
+
var listLayoutStatusSchema = z.union([
|
|
5941
|
+
z.literal("warning"),
|
|
5942
|
+
z.literal("neutral"),
|
|
5943
|
+
z.literal("positive")
|
|
5944
|
+
]);
|
|
5945
|
+
var headingLayoutSchema = z.object({
|
|
5946
|
+
type: z.literal("heading"),
|
|
5947
|
+
text: z.string(),
|
|
5948
|
+
size: sizeSchema.optional(),
|
|
5949
|
+
align: alignSchema.optional(),
|
|
5950
|
+
control: z.string().optional(),
|
|
5951
|
+
margin: sizeSchema.optional()
|
|
5952
|
+
});
|
|
5953
|
+
var formLayoutSchema = z.object({
|
|
5954
|
+
type: z.literal("form"),
|
|
5955
|
+
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
5956
|
+
schemaId: z.string(),
|
|
5957
|
+
control: z.string().optional(),
|
|
5958
|
+
margin: sizeSchema.optional()
|
|
5959
|
+
});
|
|
5960
|
+
var imageLayoutSchema = z.object({
|
|
5961
|
+
type: z.literal("image"),
|
|
5962
|
+
text: z.string().optional(),
|
|
5963
|
+
url: z.string(),
|
|
5964
|
+
size: sizeSchema.optional(),
|
|
5965
|
+
accessibilityDescription: z.string().optional(),
|
|
5966
|
+
control: z.string().optional(),
|
|
5967
|
+
margin: sizeSchema.optional()
|
|
5968
|
+
});
|
|
5969
|
+
var infoLayoutSchema = z.object({
|
|
5970
|
+
type: z.literal("info"),
|
|
5971
|
+
markdown: z.string(),
|
|
5972
|
+
align: alignSchema.optional(),
|
|
5973
|
+
control: z.string().optional(),
|
|
5974
|
+
margin: sizeSchema.optional()
|
|
5975
|
+
});
|
|
5976
|
+
var loadingIndicatorLayoutSchema = z.object({
|
|
5977
|
+
type: z.literal("loading-indicator"),
|
|
5978
|
+
size: sizeSchema.optional(),
|
|
5979
|
+
control: z.string().optional(),
|
|
5980
|
+
margin: sizeSchema.optional()
|
|
5981
|
+
});
|
|
5982
|
+
var paragraphLayoutSchema = z.object({
|
|
5983
|
+
type: z.literal("paragraph"),
|
|
5984
|
+
text: z.string(),
|
|
5985
|
+
align: alignSchema.optional(),
|
|
5986
|
+
control: z.string().optional(),
|
|
5987
|
+
margin: sizeSchema.optional()
|
|
5988
|
+
});
|
|
5989
|
+
var instructionsLayoutItemSchema = z.object({
|
|
5990
|
+
text: z.string(),
|
|
5991
|
+
context: contextSchema
|
|
5992
|
+
});
|
|
5993
|
+
var helpSchema = z.object({
|
|
5994
|
+
markdown: z.string()
|
|
5995
|
+
});
|
|
5996
|
+
var imageSchema = z.object({
|
|
5997
|
+
text: z.string().optional(),
|
|
5998
|
+
url: z.string(),
|
|
5999
|
+
accessibilityDescription: z.string().optional()
|
|
6000
|
+
});
|
|
6001
|
+
var summaryProviderSchema = z.object({
|
|
6002
|
+
providesTitle: z.boolean().optional(),
|
|
6003
|
+
providesDescription: z.boolean().optional(),
|
|
6004
|
+
providesIcon: z.boolean().optional(),
|
|
6005
|
+
providesImage: z.boolean().optional()
|
|
6006
|
+
});
|
|
6007
|
+
var validateAsyncSchema = z.object({
|
|
6008
|
+
param: z.string(),
|
|
6009
|
+
method: httpMethodSchema,
|
|
6010
|
+
url: z.string()
|
|
6011
|
+
});
|
|
5920
6012
|
var autocompleteTokenSchema = z.union([
|
|
5921
6013
|
z.literal("on"),
|
|
5922
6014
|
z.literal("name"),
|
|
@@ -5982,158 +6074,53 @@ var autocompleteTokenSchema = z.union([
|
|
|
5982
6074
|
z.literal("fax"),
|
|
5983
6075
|
z.literal("pager")
|
|
5984
6076
|
]);
|
|
5985
|
-
var
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
type: z.literal("paragraph"),
|
|
5993
|
-
text: z.string(),
|
|
5994
|
-
align: alignSchema.optional(),
|
|
5995
|
-
control: z.string().optional(),
|
|
5996
|
-
margin: sizeSchema.optional()
|
|
5997
|
-
});
|
|
5998
|
-
var dividerLayoutSchema = z.object({
|
|
5999
|
-
type: z.literal("divider"),
|
|
6000
|
-
control: z.string().optional(),
|
|
6001
|
-
margin: sizeSchema.optional()
|
|
6002
|
-
});
|
|
6003
|
-
var listLayoutStatusSchema = z.union([
|
|
6004
|
-
z.literal("warning"),
|
|
6005
|
-
z.literal("neutral"),
|
|
6006
|
-
z.literal("positive")
|
|
6077
|
+
var stringSchemaFormatSchema = z.union([
|
|
6078
|
+
z.literal("date"),
|
|
6079
|
+
z.literal("email"),
|
|
6080
|
+
z.literal("numeric"),
|
|
6081
|
+
z.literal("password"),
|
|
6082
|
+
z.literal("phone-number"),
|
|
6083
|
+
z.literal("base64url")
|
|
6007
6084
|
]);
|
|
6008
|
-
var
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6085
|
+
var jsonElementSchema = z.lazy(
|
|
6086
|
+
() => z.union([
|
|
6087
|
+
z.string(),
|
|
6088
|
+
z.number(),
|
|
6089
|
+
z.boolean(),
|
|
6090
|
+
z.record(jsonElementSchema),
|
|
6091
|
+
z.array(jsonElementSchema)
|
|
6092
|
+
]).nullable()
|
|
6093
|
+
);
|
|
6094
|
+
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
6095
|
+
var externalSchema = z.object({
|
|
6096
|
+
url: z.string()
|
|
6019
6097
|
});
|
|
6020
|
-
var
|
|
6021
|
-
z.
|
|
6022
|
-
|
|
6023
|
-
z.literal("done")
|
|
6024
|
-
]);
|
|
6025
|
-
var instructionsLayoutItemSchema = z.object({
|
|
6026
|
-
text: z.string(),
|
|
6027
|
-
context: contextSchema
|
|
6098
|
+
var stepErrorSchema = z.object({
|
|
6099
|
+
error: z.string().optional(),
|
|
6100
|
+
validation: jsonElementSchema.optional()
|
|
6028
6101
|
});
|
|
6029
|
-
var
|
|
6030
|
-
|
|
6102
|
+
var errorResponseBodySchema = z.object({
|
|
6103
|
+
refreshFormUrl: z.string().optional(),
|
|
6104
|
+
analytics: z.record(z.string()).optional(),
|
|
6105
|
+
error: z.string().optional(),
|
|
6106
|
+
validation: jsonElementSchema.optional(),
|
|
6107
|
+
refreshUrl: z.string().optional()
|
|
6031
6108
|
});
|
|
6032
|
-
var
|
|
6033
|
-
type: z.literal("search"),
|
|
6034
|
-
title: z.string(),
|
|
6035
|
-
method: httpMethodSchema,
|
|
6109
|
+
var searchSearchRequestSchema = z.object({
|
|
6036
6110
|
url: z.string(),
|
|
6111
|
+
method: httpMethodSchema,
|
|
6037
6112
|
param: z.string(),
|
|
6038
|
-
|
|
6039
|
-
control: z.string().optional(),
|
|
6040
|
-
margin: sizeSchema.optional()
|
|
6113
|
+
query: z.string()
|
|
6041
6114
|
});
|
|
6042
|
-
var
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6115
|
+
var navigationStackBehaviorSchema = z.union([
|
|
6116
|
+
z.literal("default"),
|
|
6117
|
+
z.literal("remove-previous"),
|
|
6118
|
+
z.literal("remove-all"),
|
|
6119
|
+
z.literal("replace-current")
|
|
6120
|
+
]);
|
|
6121
|
+
var linkSchema = z.object({
|
|
6122
|
+
url: z.string()
|
|
6048
6123
|
});
|
|
6049
|
-
var formLayoutSchema = z.object({
|
|
6050
|
-
type: z.literal("form"),
|
|
6051
|
-
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
6052
|
-
schemaId: z.string(),
|
|
6053
|
-
control: z.string().optional(),
|
|
6054
|
-
margin: sizeSchema.optional()
|
|
6055
|
-
});
|
|
6056
|
-
var headingLayoutSchema = z.object({
|
|
6057
|
-
type: z.literal("heading"),
|
|
6058
|
-
text: z.string(),
|
|
6059
|
-
size: sizeSchema.optional(),
|
|
6060
|
-
align: alignSchema.optional(),
|
|
6061
|
-
control: z.string().optional(),
|
|
6062
|
-
margin: sizeSchema.optional()
|
|
6063
|
-
});
|
|
6064
|
-
var markdownLayoutSchema = z.object({
|
|
6065
|
-
type: z.literal("markdown"),
|
|
6066
|
-
content: z.string(),
|
|
6067
|
-
align: alignSchema.optional(),
|
|
6068
|
-
control: z.string().optional(),
|
|
6069
|
-
margin: sizeSchema.optional()
|
|
6070
|
-
});
|
|
6071
|
-
var columnsLayoutBiasSchema = z.union([
|
|
6072
|
-
z.literal("none"),
|
|
6073
|
-
z.literal("left"),
|
|
6074
|
-
z.literal("right")
|
|
6075
|
-
]);
|
|
6076
|
-
var helpSchema = z.object({
|
|
6077
|
-
markdown: z.string()
|
|
6078
|
-
});
|
|
6079
|
-
var searchSearchRequestSchema = z.object({
|
|
6080
|
-
url: z.string(),
|
|
6081
|
-
method: httpMethodSchema,
|
|
6082
|
-
param: z.string(),
|
|
6083
|
-
query: z.string()
|
|
6084
|
-
});
|
|
6085
|
-
var jsonElementSchema = z.lazy(
|
|
6086
|
-
() => z.union([
|
|
6087
|
-
z.string(),
|
|
6088
|
-
z.number(),
|
|
6089
|
-
z.boolean(),
|
|
6090
|
-
z.record(jsonElementSchema),
|
|
6091
|
-
z.array(jsonElementSchema)
|
|
6092
|
-
]).nullable()
|
|
6093
|
-
);
|
|
6094
|
-
var externalSchema = z.object({
|
|
6095
|
-
url: z.string()
|
|
6096
|
-
});
|
|
6097
|
-
var stepErrorSchema = z.object({
|
|
6098
|
-
error: z.string().optional(),
|
|
6099
|
-
validation: jsonElementSchema.optional()
|
|
6100
|
-
});
|
|
6101
|
-
var stringSchemaFormatSchema = z.union([
|
|
6102
|
-
z.literal("date"),
|
|
6103
|
-
z.literal("email"),
|
|
6104
|
-
z.literal("numeric"),
|
|
6105
|
-
z.literal("password"),
|
|
6106
|
-
z.literal("phone-number"),
|
|
6107
|
-
z.literal("base64url")
|
|
6108
|
-
]);
|
|
6109
|
-
var summarySummariserSchema = z.object({
|
|
6110
|
-
defaultTitle: z.string().optional(),
|
|
6111
|
-
defaultDescription: z.string().optional(),
|
|
6112
|
-
defaultIcon: iconSchema.optional(),
|
|
6113
|
-
defaultImage: imageLayoutSchema.optional(),
|
|
6114
|
-
providesTitle: z.boolean().optional(),
|
|
6115
|
-
providesDescription: z.boolean().optional(),
|
|
6116
|
-
providesIcon: z.boolean().optional(),
|
|
6117
|
-
providesImage: z.boolean().optional()
|
|
6118
|
-
});
|
|
6119
|
-
var validateAsyncSchema = z.object({
|
|
6120
|
-
param: z.string(),
|
|
6121
|
-
method: httpMethodSchema,
|
|
6122
|
-
url: z.string()
|
|
6123
|
-
});
|
|
6124
|
-
var summaryProviderSchema = z.object({
|
|
6125
|
-
providesTitle: z.boolean().optional(),
|
|
6126
|
-
providesDescription: z.boolean().optional(),
|
|
6127
|
-
providesIcon: z.boolean().optional(),
|
|
6128
|
-
providesImage: z.boolean().optional()
|
|
6129
|
-
});
|
|
6130
|
-
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
6131
|
-
var navigationStackBehaviorSchema = z.union([
|
|
6132
|
-
z.literal("default"),
|
|
6133
|
-
z.literal("remove-previous"),
|
|
6134
|
-
z.literal("remove-all"),
|
|
6135
|
-
z.literal("replace-current")
|
|
6136
|
-
]);
|
|
6137
6124
|
var actionTypeSchema = z.union([
|
|
6138
6125
|
z.literal("primary"),
|
|
6139
6126
|
z.literal("secondary"),
|
|
@@ -6141,9 +6128,11 @@ var actionTypeSchema = z.union([
|
|
|
6141
6128
|
z.literal("positive"),
|
|
6142
6129
|
z.literal("negative")
|
|
6143
6130
|
]);
|
|
6144
|
-
var
|
|
6145
|
-
|
|
6146
|
-
|
|
6131
|
+
var iconNamedSchema = z.object({
|
|
6132
|
+
name: z.string()
|
|
6133
|
+
});
|
|
6134
|
+
var iconTextSchema = z.object({
|
|
6135
|
+
text: z.string()
|
|
6147
6136
|
});
|
|
6148
6137
|
var actionSchema = z.object({
|
|
6149
6138
|
title: z.string().optional(),
|
|
@@ -6160,19 +6149,26 @@ var actionSchema = z.object({
|
|
|
6160
6149
|
timeout: z.number().optional(),
|
|
6161
6150
|
skipValidation: z.boolean().optional()
|
|
6162
6151
|
});
|
|
6163
|
-
var
|
|
6152
|
+
var markdownLayoutSchema = z.object({
|
|
6153
|
+
type: z.literal("markdown"),
|
|
6154
|
+
content: z.string(),
|
|
6155
|
+
align: alignSchema.optional(),
|
|
6156
|
+
control: z.string().optional(),
|
|
6157
|
+
margin: sizeSchema.optional()
|
|
6158
|
+
});
|
|
6159
|
+
var searchLayoutSchema = z.object({
|
|
6160
|
+
type: z.literal("search"),
|
|
6164
6161
|
title: z.string(),
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6162
|
+
method: httpMethodSchema,
|
|
6163
|
+
url: z.string(),
|
|
6164
|
+
param: z.string(),
|
|
6165
|
+
emptyMessage: z.string().optional(),
|
|
6166
|
+
control: z.string().optional(),
|
|
6167
|
+
margin: sizeSchema.optional()
|
|
6168
6168
|
});
|
|
6169
|
-
var
|
|
6170
|
-
action: actionSchema,
|
|
6169
|
+
var reviewLayoutCallToActionSchema = z.object({
|
|
6171
6170
|
title: z.string(),
|
|
6172
|
-
|
|
6173
|
-
disabled: z.boolean().optional(),
|
|
6174
|
-
icon: iconSchema.optional(),
|
|
6175
|
-
image: imageLayoutSchema.optional()
|
|
6171
|
+
action: actionSchema
|
|
6176
6172
|
});
|
|
6177
6173
|
var instructionsLayoutSchema = z.object({
|
|
6178
6174
|
type: z.literal("instructions"),
|
|
@@ -6181,26 +6177,38 @@ var instructionsLayoutSchema = z.object({
|
|
|
6181
6177
|
control: z.string().optional(),
|
|
6182
6178
|
margin: sizeSchema.optional()
|
|
6183
6179
|
});
|
|
6180
|
+
var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
6184
6181
|
var behaviorSchema = z.object({
|
|
6185
6182
|
action: actionSchema.optional(),
|
|
6186
6183
|
link: linkSchema.optional()
|
|
6187
6184
|
});
|
|
6188
|
-
var buttonLayoutSchema = z.object({
|
|
6189
|
-
type: z.literal("button"),
|
|
6190
|
-
size: sizeSchema.optional(),
|
|
6191
|
-
title: z.string().optional(),
|
|
6192
|
-
action: actionSchema,
|
|
6193
|
-
context: contextSchema.optional(),
|
|
6194
|
-
disabled: z.boolean().optional(),
|
|
6195
|
-
pinOrder: z.number().optional(),
|
|
6196
|
-
control: z.string().optional(),
|
|
6197
|
-
margin: sizeSchema.optional()
|
|
6198
|
-
});
|
|
6199
6185
|
var reviewLayoutFieldSchema = z.object({
|
|
6200
6186
|
label: z.string(),
|
|
6201
6187
|
value: z.string(),
|
|
6202
6188
|
help: helpSchema.optional()
|
|
6203
6189
|
});
|
|
6190
|
+
var alertLayoutCallToActionSchema = z.object({
|
|
6191
|
+
title: z.string(),
|
|
6192
|
+
accessibilityDescription: z.string().optional(),
|
|
6193
|
+
behavior: behaviorSchema
|
|
6194
|
+
});
|
|
6195
|
+
var summarySummariserSchema = z.object({
|
|
6196
|
+
defaultTitle: z.string().optional(),
|
|
6197
|
+
defaultDescription: z.string().optional(),
|
|
6198
|
+
defaultIcon: iconSchema.optional(),
|
|
6199
|
+
defaultImage: imageLayoutSchema.optional(),
|
|
6200
|
+
providesTitle: z.boolean().optional(),
|
|
6201
|
+
providesDescription: z.boolean().optional(),
|
|
6202
|
+
providesIcon: z.boolean().optional(),
|
|
6203
|
+
providesImage: z.boolean().optional()
|
|
6204
|
+
});
|
|
6205
|
+
var linkHandlerSchema = z.object({
|
|
6206
|
+
regexPattern: z.string(),
|
|
6207
|
+
action: actionSchema
|
|
6208
|
+
});
|
|
6209
|
+
var actionResponseBodySchema = z.object({
|
|
6210
|
+
action: actionSchema
|
|
6211
|
+
});
|
|
6204
6212
|
var searchResultSearchSchema = z.object({
|
|
6205
6213
|
type: z.literal("search"),
|
|
6206
6214
|
title: z.string(),
|
|
@@ -6217,20 +6225,6 @@ var searchResultActionSchema = z.object({
|
|
|
6217
6225
|
image: imageLayoutSchema.optional(),
|
|
6218
6226
|
value: actionSchema
|
|
6219
6227
|
});
|
|
6220
|
-
var actionResponseBodySchema = z.object({
|
|
6221
|
-
action: actionSchema
|
|
6222
|
-
});
|
|
6223
|
-
var errorResponseBodySchema = z.object({
|
|
6224
|
-
refreshFormUrl: z.string().optional(),
|
|
6225
|
-
analytics: z.record(z.string()).optional(),
|
|
6226
|
-
error: z.string().optional(),
|
|
6227
|
-
validation: jsonElementSchema.optional(),
|
|
6228
|
-
refreshUrl: z.string().optional()
|
|
6229
|
-
});
|
|
6230
|
-
var linkHandlerSchema = z.object({
|
|
6231
|
-
regexPattern: z.string(),
|
|
6232
|
-
action: actionSchema
|
|
6233
|
-
});
|
|
6234
6228
|
var pollingOnErrorSchema = z.object({
|
|
6235
6229
|
action: actionSchema
|
|
6236
6230
|
});
|
|
@@ -6238,33 +6232,33 @@ var navigationBackBehaviorSchema = z.object({
|
|
|
6238
6232
|
title: z.string().optional(),
|
|
6239
6233
|
action: actionSchema
|
|
6240
6234
|
});
|
|
6241
|
-
var
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
var alertLayoutCallToActionSchema = z.object({
|
|
6246
|
-
title: z.string(),
|
|
6247
|
-
accessibilityDescription: z.string().optional(),
|
|
6248
|
-
behavior: behaviorSchema
|
|
6249
|
-
});
|
|
6250
|
-
var listLayoutSchema = z.object({
|
|
6251
|
-
type: z.literal("list"),
|
|
6252
|
-
items: z.array(listLayoutItemSchema),
|
|
6253
|
-
title: z.string().optional(),
|
|
6254
|
-
control: z.string().optional(),
|
|
6255
|
-
margin: sizeSchema.optional()
|
|
6256
|
-
});
|
|
6257
|
-
var decisionLayoutSchema = z.object({
|
|
6258
|
-
type: z.literal("decision"),
|
|
6235
|
+
var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
6236
|
+
var buttonLayoutSchema = z.object({
|
|
6237
|
+
type: z.literal("button"),
|
|
6238
|
+
size: sizeSchema.optional(),
|
|
6259
6239
|
title: z.string().optional(),
|
|
6260
|
-
|
|
6240
|
+
action: actionSchema,
|
|
6241
|
+
context: contextSchema.optional(),
|
|
6242
|
+
disabled: z.boolean().optional(),
|
|
6243
|
+
pinOrder: z.number().optional(),
|
|
6261
6244
|
control: z.string().optional(),
|
|
6262
6245
|
margin: sizeSchema.optional()
|
|
6263
6246
|
});
|
|
6264
|
-
var
|
|
6247
|
+
var decisionLayoutOptionSchema = z.object({
|
|
6248
|
+
action: actionSchema,
|
|
6265
6249
|
title: z.string(),
|
|
6266
|
-
|
|
6267
|
-
|
|
6250
|
+
description: z.string().optional(),
|
|
6251
|
+
disabled: z.boolean().optional(),
|
|
6252
|
+
icon: iconSchema.optional(),
|
|
6253
|
+
image: imageLayoutSchema.optional()
|
|
6254
|
+
});
|
|
6255
|
+
var alertLayoutSchema = z.object({
|
|
6256
|
+
type: z.literal("alert"),
|
|
6257
|
+
markdown: z.string(),
|
|
6258
|
+
context: contextSchema.optional(),
|
|
6259
|
+
control: z.string().optional(),
|
|
6260
|
+
margin: sizeSchema.optional(),
|
|
6261
|
+
callToAction: alertLayoutCallToActionSchema.optional()
|
|
6268
6262
|
});
|
|
6269
6263
|
var reviewLayoutSchema = z.object({
|
|
6270
6264
|
type: z.literal("review"),
|
|
@@ -6276,27 +6270,16 @@ var reviewLayoutSchema = z.object({
|
|
|
6276
6270
|
control: z.string().optional(),
|
|
6277
6271
|
margin: sizeSchema.optional()
|
|
6278
6272
|
});
|
|
6279
|
-
var
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
timeout: z.number().optional(),
|
|
6285
|
-
maxAttempts: z.number(),
|
|
6286
|
-
onError: pollingOnErrorSchema
|
|
6287
|
-
});
|
|
6288
|
-
var navigationSchema = z.object({
|
|
6289
|
-
backButton: navigationBackBehaviorSchema.optional(),
|
|
6290
|
-
back: navigationBackBehaviorSchema.optional(),
|
|
6291
|
-
stackBehavior: navigationStackBehaviorSchema.optional()
|
|
6273
|
+
var listLayoutItemSchema = z.object({
|
|
6274
|
+
title: z.string(),
|
|
6275
|
+
description: z.string().optional(),
|
|
6276
|
+
icon: iconSchema,
|
|
6277
|
+
status: listLayoutStatusSchema.optional()
|
|
6292
6278
|
});
|
|
6293
|
-
var
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
control: z.string().optional(),
|
|
6298
|
-
margin: sizeSchema.optional(),
|
|
6299
|
-
callToAction: alertLayoutCallToActionSchema.optional()
|
|
6279
|
+
var itemCallToActionSchema = z.object({
|
|
6280
|
+
title: z.string(),
|
|
6281
|
+
accessibilityDescription: z.string().optional(),
|
|
6282
|
+
behavior: behaviorSchema
|
|
6300
6283
|
});
|
|
6301
6284
|
var statusListLayoutItemSchema = z.object({
|
|
6302
6285
|
title: z.string(),
|
|
@@ -6305,9 +6288,6 @@ var statusListLayoutItemSchema = z.object({
|
|
|
6305
6288
|
status: statusListLayoutStatusSchema.optional(),
|
|
6306
6289
|
callToAction: itemCallToActionSchema.optional()
|
|
6307
6290
|
});
|
|
6308
|
-
var searchResponseBodySchema = z.object({
|
|
6309
|
-
results: z.array(searchResultSchema)
|
|
6310
|
-
});
|
|
6311
6291
|
var blobSchemaSchema = z.object({
|
|
6312
6292
|
type: z.literal("blob"),
|
|
6313
6293
|
promoted: z.boolean().optional(),
|
|
@@ -6346,6 +6326,34 @@ var constSchemaSchema = z.object({
|
|
|
6346
6326
|
analyticsId: z.string().optional(),
|
|
6347
6327
|
disabled: z.boolean().optional()
|
|
6348
6328
|
});
|
|
6329
|
+
var pollingSchema = z.object({
|
|
6330
|
+
url: z.string(),
|
|
6331
|
+
interval: z.number().optional(),
|
|
6332
|
+
delay: z.number().optional(),
|
|
6333
|
+
timeout: z.number().optional(),
|
|
6334
|
+
maxAttempts: z.number(),
|
|
6335
|
+
onError: pollingOnErrorSchema
|
|
6336
|
+
});
|
|
6337
|
+
var navigationSchema = z.object({
|
|
6338
|
+
backButton: navigationBackBehaviorSchema.optional(),
|
|
6339
|
+
back: navigationBackBehaviorSchema.optional(),
|
|
6340
|
+
stackBehavior: navigationStackBehaviorSchema.optional()
|
|
6341
|
+
});
|
|
6342
|
+
var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
6343
|
+
var decisionLayoutSchema = z.object({
|
|
6344
|
+
type: z.literal("decision"),
|
|
6345
|
+
title: z.string().optional(),
|
|
6346
|
+
options: z.array(decisionLayoutOptionSchema),
|
|
6347
|
+
control: z.string().optional(),
|
|
6348
|
+
margin: sizeSchema.optional()
|
|
6349
|
+
});
|
|
6350
|
+
var listLayoutSchema = z.object({
|
|
6351
|
+
type: z.literal("list"),
|
|
6352
|
+
items: z.array(listLayoutItemSchema),
|
|
6353
|
+
title: z.string().optional(),
|
|
6354
|
+
control: z.string().optional(),
|
|
6355
|
+
margin: sizeSchema.optional()
|
|
6356
|
+
});
|
|
6349
6357
|
var statusListLayoutSchema = z.object({
|
|
6350
6358
|
type: z.literal("status-list"),
|
|
6351
6359
|
items: z.array(statusListLayoutItemSchema),
|
|
@@ -6353,6 +6361,19 @@ var statusListLayoutSchema = z.object({
|
|
|
6353
6361
|
control: z.string().optional(),
|
|
6354
6362
|
margin: sizeSchema.optional()
|
|
6355
6363
|
});
|
|
6364
|
+
var searchResponseBodySchema = z.object({
|
|
6365
|
+
results: z.array(searchResultSchema)
|
|
6366
|
+
});
|
|
6367
|
+
var columnsLayoutSchema = z.lazy(
|
|
6368
|
+
() => z.object({
|
|
6369
|
+
type: z.literal("columns"),
|
|
6370
|
+
left: z.array(layoutSchema),
|
|
6371
|
+
right: z.array(layoutSchema),
|
|
6372
|
+
bias: columnsLayoutBiasSchema.optional(),
|
|
6373
|
+
control: z.string().optional(),
|
|
6374
|
+
margin: sizeSchema.optional()
|
|
6375
|
+
})
|
|
6376
|
+
);
|
|
6356
6377
|
var layoutSchema = z.lazy(
|
|
6357
6378
|
() => z.union([
|
|
6358
6379
|
alertLayoutSchema,
|
|
@@ -6376,26 +6397,6 @@ var layoutSchema = z.lazy(
|
|
|
6376
6397
|
statusListLayoutSchema
|
|
6377
6398
|
])
|
|
6378
6399
|
);
|
|
6379
|
-
var boxLayoutSchema = z.lazy(
|
|
6380
|
-
() => z.object({
|
|
6381
|
-
type: z.literal("box"),
|
|
6382
|
-
components: z.array(layoutSchema),
|
|
6383
|
-
width: sizeSchema.optional(),
|
|
6384
|
-
border: z.boolean().optional(),
|
|
6385
|
-
control: z.string().optional(),
|
|
6386
|
-
margin: sizeSchema.optional()
|
|
6387
|
-
})
|
|
6388
|
-
);
|
|
6389
|
-
var columnsLayoutSchema = z.lazy(
|
|
6390
|
-
() => z.object({
|
|
6391
|
-
type: z.literal("columns"),
|
|
6392
|
-
left: z.array(layoutSchema),
|
|
6393
|
-
right: z.array(layoutSchema),
|
|
6394
|
-
bias: columnsLayoutBiasSchema.optional(),
|
|
6395
|
-
control: z.string().optional(),
|
|
6396
|
-
margin: sizeSchema.optional()
|
|
6397
|
-
})
|
|
6398
|
-
);
|
|
6399
6400
|
var modalLayoutSchema = z.lazy(
|
|
6400
6401
|
() => z.object({
|
|
6401
6402
|
type: z.literal("modal"),
|
|
@@ -6411,25 +6412,14 @@ var modalLayoutContentSchema = z.lazy(
|
|
|
6411
6412
|
components: z.array(layoutSchema)
|
|
6412
6413
|
})
|
|
6413
6414
|
);
|
|
6414
|
-
var
|
|
6415
|
-
() => z.object({
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
schemas: z.array(schemaSchema),
|
|
6423
|
-
layout: z.array(layoutSchema),
|
|
6424
|
-
description: z.string().optional(),
|
|
6425
|
-
model: jsonElementSchema.optional(),
|
|
6426
|
-
external: externalSchema.optional(),
|
|
6427
|
-
polling: pollingSchema.optional(),
|
|
6428
|
-
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
6429
|
-
analytics: z.record(z.string()).optional(),
|
|
6430
|
-
errors: stepErrorSchema.optional(),
|
|
6431
|
-
navigation: navigationSchema.optional(),
|
|
6432
|
-
refreshUrl: z.string().optional()
|
|
6415
|
+
var boxLayoutSchema = z.lazy(
|
|
6416
|
+
() => z.object({
|
|
6417
|
+
type: z.literal("box"),
|
|
6418
|
+
components: z.array(layoutSchema),
|
|
6419
|
+
width: sizeSchema.optional(),
|
|
6420
|
+
border: z.boolean().optional(),
|
|
6421
|
+
control: z.string().optional(),
|
|
6422
|
+
margin: sizeSchema.optional()
|
|
6433
6423
|
})
|
|
6434
6424
|
);
|
|
6435
6425
|
var schemaSchema = z.lazy(
|
|
@@ -6655,17 +6645,21 @@ var stringSchemaSchema = z.lazy(
|
|
|
6655
6645
|
help: helpSchema.optional()
|
|
6656
6646
|
})
|
|
6657
6647
|
);
|
|
6658
|
-
var
|
|
6648
|
+
var persistAsyncSchema = z.lazy(
|
|
6649
|
+
() => z.object({
|
|
6650
|
+
param: z.string(),
|
|
6651
|
+
idProperty: z.string(),
|
|
6652
|
+
schema: schemaSchema,
|
|
6653
|
+
url: z.string(),
|
|
6654
|
+
method: httpMethodSchema
|
|
6655
|
+
})
|
|
6656
|
+
);
|
|
6657
|
+
var arraySchemaTupleSchema = z.lazy(
|
|
6659
6658
|
() => z.object({
|
|
6660
6659
|
type: z.literal("array"),
|
|
6661
6660
|
promoted: z.boolean().optional(),
|
|
6662
6661
|
$id: z.string().optional(),
|
|
6663
|
-
items: schemaSchema,
|
|
6664
|
-
addItemTitle: z.string(),
|
|
6665
|
-
editItemTitle: z.string(),
|
|
6666
|
-
minItems: z.number().optional(),
|
|
6667
|
-
maxItems: z.number().optional(),
|
|
6668
|
-
placeholder: z.string().optional(),
|
|
6662
|
+
items: z.array(schemaSchema),
|
|
6669
6663
|
title: z.string().optional(),
|
|
6670
6664
|
description: z.string().optional(),
|
|
6671
6665
|
control: z.string().optional(),
|
|
@@ -6673,30 +6667,24 @@ var arraySchemaListSchema = z.lazy(
|
|
|
6673
6667
|
icon: iconSchema.optional(),
|
|
6674
6668
|
image: imageSchema.optional(),
|
|
6675
6669
|
keywords: z.array(z.string()).optional(),
|
|
6676
|
-
summary:
|
|
6670
|
+
summary: summaryProviderSchema.optional(),
|
|
6677
6671
|
analyticsId: z.string().optional(),
|
|
6678
6672
|
persistAsync: persistAsyncSchema.optional(),
|
|
6679
6673
|
validationAsync: validateAsyncSchema.optional(),
|
|
6680
|
-
alert: alertLayoutSchema.optional()
|
|
6681
|
-
validationMessages: z.record(z.string()).optional(),
|
|
6682
|
-
disabled: z.boolean().optional()
|
|
6683
|
-
})
|
|
6684
|
-
);
|
|
6685
|
-
var persistAsyncSchema = z.lazy(
|
|
6686
|
-
() => z.object({
|
|
6687
|
-
param: z.string(),
|
|
6688
|
-
idProperty: z.string(),
|
|
6689
|
-
schema: schemaSchema,
|
|
6690
|
-
url: z.string(),
|
|
6691
|
-
method: httpMethodSchema
|
|
6674
|
+
alert: alertLayoutSchema.optional()
|
|
6692
6675
|
})
|
|
6693
6676
|
);
|
|
6694
|
-
var
|
|
6677
|
+
var arraySchemaListSchema = z.lazy(
|
|
6695
6678
|
() => z.object({
|
|
6696
6679
|
type: z.literal("array"),
|
|
6697
6680
|
promoted: z.boolean().optional(),
|
|
6698
6681
|
$id: z.string().optional(),
|
|
6699
|
-
items:
|
|
6682
|
+
items: schemaSchema,
|
|
6683
|
+
addItemTitle: z.string(),
|
|
6684
|
+
editItemTitle: z.string(),
|
|
6685
|
+
minItems: z.number().optional(),
|
|
6686
|
+
maxItems: z.number().optional(),
|
|
6687
|
+
placeholder: z.string().optional(),
|
|
6700
6688
|
title: z.string().optional(),
|
|
6701
6689
|
description: z.string().optional(),
|
|
6702
6690
|
control: z.string().optional(),
|
|
@@ -6704,11 +6692,34 @@ var arraySchemaTupleSchema = z.lazy(
|
|
|
6704
6692
|
icon: iconSchema.optional(),
|
|
6705
6693
|
image: imageSchema.optional(),
|
|
6706
6694
|
keywords: z.array(z.string()).optional(),
|
|
6707
|
-
summary:
|
|
6695
|
+
summary: summarySummariserSchema.optional(),
|
|
6708
6696
|
analyticsId: z.string().optional(),
|
|
6709
6697
|
persistAsync: persistAsyncSchema.optional(),
|
|
6710
6698
|
validationAsync: validateAsyncSchema.optional(),
|
|
6711
|
-
alert: alertLayoutSchema.optional()
|
|
6699
|
+
alert: alertLayoutSchema.optional(),
|
|
6700
|
+
validationMessages: z.record(z.string()).optional(),
|
|
6701
|
+
disabled: z.boolean().optional()
|
|
6702
|
+
})
|
|
6703
|
+
);
|
|
6704
|
+
var stepSchema = z.lazy(
|
|
6705
|
+
() => z.object({
|
|
6706
|
+
key: z.string().optional(),
|
|
6707
|
+
type: z.string().optional(),
|
|
6708
|
+
actions: z.array(actionSchema).optional(),
|
|
6709
|
+
refreshFormUrl: z.string().optional(),
|
|
6710
|
+
id: z.string(),
|
|
6711
|
+
title: z.string(),
|
|
6712
|
+
schemas: z.array(schemaSchema),
|
|
6713
|
+
layout: z.array(layoutSchema),
|
|
6714
|
+
description: z.string().optional(),
|
|
6715
|
+
model: jsonElementSchema.optional(),
|
|
6716
|
+
external: externalSchema.optional(),
|
|
6717
|
+
polling: pollingSchema.optional(),
|
|
6718
|
+
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
6719
|
+
analytics: z.record(z.string()).optional(),
|
|
6720
|
+
errors: stepErrorSchema.optional(),
|
|
6721
|
+
navigation: navigationSchema.optional(),
|
|
6722
|
+
refreshUrl: z.string().optional()
|
|
6712
6723
|
})
|
|
6713
6724
|
);
|
|
6714
6725
|
var validateStep = (step) => validate(step, stepSchema);
|
|
@@ -9189,9 +9200,28 @@ var getRandomInt = () => Math.floor(Math.random() * 1e8);
|
|
|
9189
9200
|
|
|
9190
9201
|
// src/revamp/domain/components/MultiUploadInputComponent.ts
|
|
9191
9202
|
var createMultiUploadInputComponent = (uploadInputProps, updateComponent) => {
|
|
9192
|
-
const _a = uploadInputProps, {
|
|
9203
|
+
const _a = uploadInputProps, {
|
|
9204
|
+
uid,
|
|
9205
|
+
id,
|
|
9206
|
+
checks,
|
|
9207
|
+
fileChecks,
|
|
9208
|
+
format,
|
|
9209
|
+
performPersistAsync,
|
|
9210
|
+
onValueChange,
|
|
9211
|
+
summariser
|
|
9212
|
+
} = _a, rest = __objRest(_a, [
|
|
9213
|
+
"uid",
|
|
9214
|
+
"id",
|
|
9215
|
+
"checks",
|
|
9216
|
+
"fileChecks",
|
|
9217
|
+
"format",
|
|
9218
|
+
"performPersistAsync",
|
|
9219
|
+
"onValueChange",
|
|
9220
|
+
"summariser"
|
|
9221
|
+
]);
|
|
9193
9222
|
const update = getInputUpdateFunction(uid, updateComponent);
|
|
9194
9223
|
const getValidationErrors = getLocalValueValidator(checks);
|
|
9224
|
+
const getFileValidationErrors = getLocalValueValidator(fileChecks);
|
|
9195
9225
|
const getAndSetValidationErrors = (currentValue) => {
|
|
9196
9226
|
const messages = getValidationErrors(currentValue);
|
|
9197
9227
|
update((draft) => {
|
|
@@ -9204,6 +9234,7 @@ var createMultiUploadInputComponent = (uploadInputProps, updateComponent) => {
|
|
|
9204
9234
|
uid,
|
|
9205
9235
|
id,
|
|
9206
9236
|
format: "base64",
|
|
9237
|
+
errorsMap: {},
|
|
9207
9238
|
fileMap: {},
|
|
9208
9239
|
onBlur() {
|
|
9209
9240
|
getAndSetValidationErrors(this.getLocalValue());
|
|
@@ -9218,13 +9249,17 @@ var createMultiUploadInputComponent = (uploadInputProps, updateComponent) => {
|
|
|
9218
9249
|
update((draft) => {
|
|
9219
9250
|
draft.value.splice(fileIndex, 1);
|
|
9220
9251
|
const _a2 = draft.fileMap, { [fileId]: _ } = _a2, files = __objRest(_a2, [__restKey(fileId)]);
|
|
9252
|
+
const _b = draft.errorsMap, { [fileId]: removedErrors } = _b, fileErrors = __objRest(_b, [__restKey(fileId)]);
|
|
9221
9253
|
draft.fileMap = files;
|
|
9254
|
+
draft.errorsMap = fileErrors;
|
|
9222
9255
|
});
|
|
9223
9256
|
}
|
|
9224
9257
|
},
|
|
9225
9258
|
async onUpload(file, fileId) {
|
|
9259
|
+
const fileErrors = getFileValidationErrors(file);
|
|
9226
9260
|
update((draft) => {
|
|
9227
9261
|
draft.fileMap[fileId] = file;
|
|
9262
|
+
draft.errorsMap[fileId] = fileErrors;
|
|
9228
9263
|
draft.value = [...this.value, file];
|
|
9229
9264
|
draft.errors = [];
|
|
9230
9265
|
});
|
|
@@ -9245,7 +9280,7 @@ var createMultiUploadInputComponent = (uploadInputProps, updateComponent) => {
|
|
|
9245
9280
|
},
|
|
9246
9281
|
validate() {
|
|
9247
9282
|
const messages = getAndSetValidationErrors(this.getLocalValue());
|
|
9248
|
-
return messages.length === 0;
|
|
9283
|
+
return messages.length === 0 && Object.values(this.errorsMap).every((errors) => errors.length === 0);
|
|
9249
9284
|
}
|
|
9250
9285
|
}, rest);
|
|
9251
9286
|
if (!performPersistAsync) {
|
|
@@ -9304,6 +9339,7 @@ var arraySchemaToMultiUploadComponent = (schemaMapperProps, mapperProps) => {
|
|
|
9304
9339
|
accepts,
|
|
9305
9340
|
autoComplete: "off",
|
|
9306
9341
|
checks: schema.hidden ? [] : checks,
|
|
9342
|
+
fileChecks: [],
|
|
9307
9343
|
format,
|
|
9308
9344
|
maxSize,
|
|
9309
9345
|
minItems,
|
|
@@ -12433,6 +12469,19 @@ function ErrorResult({ state }) {
|
|
|
12433
12469
|
|
|
12434
12470
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
12435
12471
|
var import_react14 = require("react");
|
|
12472
|
+
|
|
12473
|
+
// ../renderers/src/messages/search.messages.ts
|
|
12474
|
+
var import_react_intl17 = require("react-intl");
|
|
12475
|
+
var search_messages_default = (0, import_react_intl17.defineMessages)({
|
|
12476
|
+
loading: {
|
|
12477
|
+
id: "df.wise.SearchLayout.loading",
|
|
12478
|
+
defaultMessage: "Loading...",
|
|
12479
|
+
description: "A message shown to the user while their search is being processed, before results appear."
|
|
12480
|
+
}
|
|
12481
|
+
});
|
|
12482
|
+
|
|
12483
|
+
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
12484
|
+
var import_react_intl18 = require("react-intl");
|
|
12436
12485
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
12437
12486
|
function BlockSearchRendererComponent({
|
|
12438
12487
|
id,
|
|
@@ -12445,6 +12494,7 @@ function BlockSearchRendererComponent({
|
|
|
12445
12494
|
}) {
|
|
12446
12495
|
const [hasSearched, setHasSearched] = (0, import_react14.useState)(false);
|
|
12447
12496
|
const trackEvent = useTrackEvent();
|
|
12497
|
+
const { formatMessage } = (0, import_react_intl18.useIntl)();
|
|
12448
12498
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: getMargin(margin), children: [
|
|
12449
12499
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
12450
12500
|
import_components27.Input,
|
|
@@ -12463,7 +12513,7 @@ function BlockSearchRendererComponent({
|
|
|
12463
12513
|
}
|
|
12464
12514
|
}
|
|
12465
12515
|
) }),
|
|
12466
|
-
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children:
|
|
12516
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SearchResultContent, { state, onChange })
|
|
12467
12517
|
] });
|
|
12468
12518
|
}
|
|
12469
12519
|
function SearchResultContent({
|
|
@@ -12516,7 +12566,7 @@ var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
|
|
|
12516
12566
|
var import_components28 = require("@transferwise/components");
|
|
12517
12567
|
var import_icons2 = require("@transferwise/icons");
|
|
12518
12568
|
var import_react15 = require("react");
|
|
12519
|
-
var
|
|
12569
|
+
var import_react_intl19 = require("react-intl");
|
|
12520
12570
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
12521
12571
|
function InlineSearchRenderer({
|
|
12522
12572
|
id,
|
|
@@ -12528,7 +12578,7 @@ function InlineSearchRenderer({
|
|
|
12528
12578
|
}) {
|
|
12529
12579
|
const [hasSearched, setHasSearched] = (0, import_react15.useState)(false);
|
|
12530
12580
|
const trackEvent = useTrackEvent();
|
|
12531
|
-
const intl = (0,
|
|
12581
|
+
const intl = (0, import_react_intl19.useIntl)();
|
|
12532
12582
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12533
12583
|
import_components28.Typeahead,
|
|
12534
12584
|
{
|
|
@@ -12575,6 +12625,7 @@ function mapResultToTypeaheadOption(result) {
|
|
|
12575
12625
|
};
|
|
12576
12626
|
}
|
|
12577
12627
|
function TypeaheadFooter({ state, isLoading }) {
|
|
12628
|
+
const { formatMessage } = (0, import_react_intl19.useIntl)();
|
|
12578
12629
|
if (state.type === "noResults") {
|
|
12579
12630
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components28.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
12580
12631
|
}
|
|
@@ -12582,7 +12633,7 @@ function TypeaheadFooter({ state, isLoading }) {
|
|
|
12582
12633
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ErrorResult, { state }) });
|
|
12583
12634
|
}
|
|
12584
12635
|
if (state.type === "pending" || isLoading) {
|
|
12585
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "m-t-2 m-x-2", children:
|
|
12636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
|
|
12586
12637
|
}
|
|
12587
12638
|
return null;
|
|
12588
12639
|
}
|
|
@@ -13180,11 +13231,11 @@ var getFieldValue = (value, help, orientation) => {
|
|
|
13180
13231
|
var import_react19 = require("react");
|
|
13181
13232
|
|
|
13182
13233
|
// ../renderers/src/step/ExternalConfirmationDialog.tsx
|
|
13183
|
-
var
|
|
13234
|
+
var import_react_intl21 = require("react-intl");
|
|
13184
13235
|
|
|
13185
13236
|
// ../renderers/src/messages/external-confirmation.messages.ts
|
|
13186
|
-
var
|
|
13187
|
-
var external_confirmation_messages_default = (0,
|
|
13237
|
+
var import_react_intl20 = require("react-intl");
|
|
13238
|
+
var external_confirmation_messages_default = (0, import_react_intl20.defineMessages)({
|
|
13188
13239
|
title: {
|
|
13189
13240
|
id: "df.wise.ExternalConfirmation.title",
|
|
13190
13241
|
defaultMessage: "Please confirm",
|
|
@@ -13214,7 +13265,7 @@ function ExternalConfirmationDialog({
|
|
|
13214
13265
|
external,
|
|
13215
13266
|
onClose
|
|
13216
13267
|
}) {
|
|
13217
|
-
const { formatMessage } = (0,
|
|
13268
|
+
const { formatMessage } = (0, import_react_intl21.useIntl)();
|
|
13218
13269
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
|
|
13219
13270
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("h2", { className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.title) }),
|
|
13220
13271
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components38.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(external.url) }) }),
|
|
@@ -13777,7 +13828,7 @@ function isReference(block) {
|
|
|
13777
13828
|
|
|
13778
13829
|
// src/legacy/dynamicFlow/DynamicFlow.tsx
|
|
13779
13830
|
var import_react67 = require("react");
|
|
13780
|
-
var
|
|
13831
|
+
var import_react_intl53 = require("react-intl");
|
|
13781
13832
|
|
|
13782
13833
|
// src/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.tsx
|
|
13783
13834
|
var import_react25 = require("react");
|
|
@@ -14699,11 +14750,11 @@ function useExternalStepPolling(polling, onAction) {
|
|
|
14699
14750
|
|
|
14700
14751
|
// src/legacy/common/hooks/usePersistAsync/usePersistAsync.ts
|
|
14701
14752
|
var import_react55 = require("react");
|
|
14702
|
-
var
|
|
14753
|
+
var import_react_intl44 = require("react-intl");
|
|
14703
14754
|
|
|
14704
14755
|
// src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.tsx
|
|
14705
14756
|
var import_react54 = require("react");
|
|
14706
|
-
var
|
|
14757
|
+
var import_react_intl43 = require("react-intl");
|
|
14707
14758
|
|
|
14708
14759
|
// src/legacy/common/constants/DateMode.ts
|
|
14709
14760
|
var DateMode = {
|
|
@@ -15166,11 +15217,11 @@ var DynamicDivider_default = DynamicDivider;
|
|
|
15166
15217
|
// src/legacy/layout/external/DynamicExternal.tsx
|
|
15167
15218
|
var import_components45 = require("@transferwise/components");
|
|
15168
15219
|
var import_react32 = require("react");
|
|
15169
|
-
var
|
|
15220
|
+
var import_react_intl23 = require("react-intl");
|
|
15170
15221
|
|
|
15171
15222
|
// src/legacy/layout/external/DynamicExternal.messages.ts
|
|
15172
|
-
var
|
|
15173
|
-
var DynamicExternal_messages_default = (0,
|
|
15223
|
+
var import_react_intl22 = require("react-intl");
|
|
15224
|
+
var DynamicExternal_messages_default = (0, import_react_intl22.defineMessages)({
|
|
15174
15225
|
retryTitle: {
|
|
15175
15226
|
id: "dynamicFlows.DynamicExternal.retryTitle",
|
|
15176
15227
|
defaultMessage: "Reopen window",
|
|
@@ -15182,7 +15233,7 @@ var DynamicExternal_messages_default = (0, import_react_intl20.defineMessages)({
|
|
|
15182
15233
|
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
15183
15234
|
var DynamicExternal = ({ component, onAction }) => {
|
|
15184
15235
|
const { requestUrl, responseHandlers, polling, retryTitle } = component;
|
|
15185
|
-
const intl = (0,
|
|
15236
|
+
const intl = (0, import_react_intl23.useIntl)();
|
|
15186
15237
|
const openExternalUrl = (0, import_react32.useCallback)(
|
|
15187
15238
|
() => window.open(requestUrl, "df-external-window"),
|
|
15188
15239
|
[requestUrl]
|
|
@@ -15259,7 +15310,7 @@ var import_react34 = require("react");
|
|
|
15259
15310
|
// src/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.tsx
|
|
15260
15311
|
var import_components47 = require("@transferwise/components");
|
|
15261
15312
|
var import_formatting2 = require("@transferwise/formatting");
|
|
15262
|
-
var
|
|
15313
|
+
var import_react_intl24 = require("react-intl");
|
|
15263
15314
|
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
15264
15315
|
function ControlFeedback(props) {
|
|
15265
15316
|
const { errors = "", validations = [], validationMessages = {} } = props;
|
|
@@ -15279,7 +15330,7 @@ function ControlFeedback(props) {
|
|
|
15279
15330
|
] });
|
|
15280
15331
|
}
|
|
15281
15332
|
function useDefaultValidationMessages(schema) {
|
|
15282
|
-
const { formatMessage, locale } = (0,
|
|
15333
|
+
const { formatMessage, locale } = (0, import_react_intl24.useIntl)();
|
|
15283
15334
|
const formattedMessages = {
|
|
15284
15335
|
type: formatMessage(validation_messages_default.type),
|
|
15285
15336
|
minimum: formatMessage(validation_messages_default.minimum, {
|
|
@@ -15366,11 +15417,11 @@ function constructUploadError(response) {
|
|
|
15366
15417
|
}
|
|
15367
15418
|
|
|
15368
15419
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.tsx
|
|
15369
|
-
var
|
|
15420
|
+
var import_react_intl26 = require("react-intl");
|
|
15370
15421
|
|
|
15371
15422
|
// src/legacy/common/messages.ts
|
|
15372
|
-
var
|
|
15373
|
-
var messages_default = (0,
|
|
15423
|
+
var import_react_intl25 = require("react-intl");
|
|
15424
|
+
var messages_default = (0, import_react_intl25.defineMessages)({
|
|
15374
15425
|
required: {
|
|
15375
15426
|
id: "dynamicFlows.DefaultErrorMessages.required",
|
|
15376
15427
|
defaultMessage: "Please fill out this field.",
|
|
@@ -15383,7 +15434,7 @@ function useFormattedDefaultErrorMessages({
|
|
|
15383
15434
|
maxItems,
|
|
15384
15435
|
minItems
|
|
15385
15436
|
}) {
|
|
15386
|
-
const { formatMessage } = (0,
|
|
15437
|
+
const { formatMessage } = (0, import_react_intl26.useIntl)();
|
|
15387
15438
|
const { maxFileSizeError, maxItemsError, minItemsError } = multi_file_upload_messages_default;
|
|
15388
15439
|
return {
|
|
15389
15440
|
maxFileSizeErrorMessage: formatMessage(maxFileSizeError),
|
|
@@ -15494,7 +15545,7 @@ function getValidationMessages(schema, required, defaultErrorMessages) {
|
|
|
15494
15545
|
var import_components50 = require("@transferwise/components");
|
|
15495
15546
|
var import_classnames8 = __toESM(require_classnames());
|
|
15496
15547
|
var import_react35 = require("react");
|
|
15497
|
-
var
|
|
15548
|
+
var import_react_intl28 = require("react-intl");
|
|
15498
15549
|
|
|
15499
15550
|
// src/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.tsx
|
|
15500
15551
|
var import_components49 = require("@transferwise/components");
|
|
@@ -15588,8 +15639,8 @@ var getDisabled = (disabled) => {
|
|
|
15588
15639
|
};
|
|
15589
15640
|
|
|
15590
15641
|
// src/common/messages/multi-select.messages.ts
|
|
15591
|
-
var
|
|
15592
|
-
var multi_select_messages_default2 = (0,
|
|
15642
|
+
var import_react_intl27 = require("react-intl");
|
|
15643
|
+
var multi_select_messages_default2 = (0, import_react_intl27.defineMessages)({
|
|
15593
15644
|
summary: {
|
|
15594
15645
|
id: "dynamicFlows.MultiSelect.summary",
|
|
15595
15646
|
defaultMessage: "{first} and {count} more",
|
|
@@ -15607,7 +15658,7 @@ function MultiSelectSchema({
|
|
|
15607
15658
|
errors,
|
|
15608
15659
|
onChange
|
|
15609
15660
|
}) {
|
|
15610
|
-
const { formatMessage, locale } = (0,
|
|
15661
|
+
const { formatMessage, locale } = (0, import_react_intl28.useIntl)();
|
|
15611
15662
|
const { disabled, items, validationMessages, placeholder } = schema;
|
|
15612
15663
|
const options = items.oneOf.map((item) => mapConstSchemaToOption(item, "select"));
|
|
15613
15664
|
const id = (0, import_react35.useMemo)(() => schema.$id || generateRandomId(), [schema.$id]);
|
|
@@ -15711,7 +15762,7 @@ var getInitialModelIndices2 = (model, options) => {
|
|
|
15711
15762
|
var import_components52 = require("@transferwise/components");
|
|
15712
15763
|
var import_icons4 = require("@transferwise/icons");
|
|
15713
15764
|
var import_react37 = require("react");
|
|
15714
|
-
var
|
|
15765
|
+
var import_react_intl31 = require("react-intl");
|
|
15715
15766
|
|
|
15716
15767
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.tsx
|
|
15717
15768
|
var import_components51 = require("@transferwise/components");
|
|
@@ -15730,8 +15781,8 @@ function ItemSummaryOption2({ item, onClick }) {
|
|
|
15730
15781
|
}
|
|
15731
15782
|
|
|
15732
15783
|
// src/common/messages/repeatable.messages.ts
|
|
15733
|
-
var
|
|
15734
|
-
var repeatable_messages_default2 = (0,
|
|
15784
|
+
var import_react_intl29 = require("react-intl");
|
|
15785
|
+
var repeatable_messages_default2 = (0, import_react_intl29.defineMessages)({
|
|
15735
15786
|
addItemTitle: {
|
|
15736
15787
|
id: "dynamicFlows.ArraySchema.addItemTitle",
|
|
15737
15788
|
defaultMessage: "Add Item",
|
|
@@ -15756,7 +15807,7 @@ var repeatable_messages_default2 = (0, import_react_intl27.defineMessages)({
|
|
|
15756
15807
|
|
|
15757
15808
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.tsx
|
|
15758
15809
|
var import_react36 = require("react");
|
|
15759
|
-
var
|
|
15810
|
+
var import_react_intl30 = require("react-intl");
|
|
15760
15811
|
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
15761
15812
|
function RepeatableSchemaStep({
|
|
15762
15813
|
type,
|
|
@@ -15767,7 +15818,7 @@ function RepeatableSchemaStep({
|
|
|
15767
15818
|
onModelChange,
|
|
15768
15819
|
onAction
|
|
15769
15820
|
}) {
|
|
15770
|
-
const { formatMessage } = (0,
|
|
15821
|
+
const { formatMessage } = (0, import_react_intl30.useIntl)();
|
|
15771
15822
|
const [filename, setFilename] = (0, import_react36.useState)(void 0);
|
|
15772
15823
|
const step = {
|
|
15773
15824
|
layout: [
|
|
@@ -15824,6 +15875,102 @@ function RepeatableSchemaStep({
|
|
|
15824
15875
|
}
|
|
15825
15876
|
var RepeatableSchemaStep_default = RepeatableSchemaStep;
|
|
15826
15877
|
|
|
15878
|
+
// src/legacy/common/validators/schemas/one-of-preselection.ts
|
|
15879
|
+
function isValidStringSchema2(value, schema) {
|
|
15880
|
+
return !getStringValidationFailures(value, schema).length;
|
|
15881
|
+
}
|
|
15882
|
+
function isValidNumberSchema2(value, schema) {
|
|
15883
|
+
return !getNumberValidationFailures(value, schema).length;
|
|
15884
|
+
}
|
|
15885
|
+
function isValidIntegerSchema2(value, schema) {
|
|
15886
|
+
return !getIntegerValidationFailures(value, schema).length;
|
|
15887
|
+
}
|
|
15888
|
+
function isValidBooleanSchema2(value, schema) {
|
|
15889
|
+
return !getBooleanValidationFailures(value, schema).length;
|
|
15890
|
+
}
|
|
15891
|
+
function isValidConstSchema2(value, schema) {
|
|
15892
|
+
return !getConstValidationFailures(value, schema).length;
|
|
15893
|
+
}
|
|
15894
|
+
function isValidObjectSchema2(value, schema) {
|
|
15895
|
+
if (!isObject2(value) || schema.type !== "object" || !isObject2(schema.properties)) {
|
|
15896
|
+
return false;
|
|
15897
|
+
}
|
|
15898
|
+
const checks = Object.keys(schema.properties).map((propertyName) => {
|
|
15899
|
+
if (value[propertyName] === void 0) {
|
|
15900
|
+
return null;
|
|
15901
|
+
}
|
|
15902
|
+
return isObjectPropertyValid2(
|
|
15903
|
+
value[propertyName],
|
|
15904
|
+
schema.properties[propertyName],
|
|
15905
|
+
schema.required && schema.required.includes(propertyName)
|
|
15906
|
+
);
|
|
15907
|
+
});
|
|
15908
|
+
return !checks.some((check) => check === false) && checks.some((check) => check === true);
|
|
15909
|
+
}
|
|
15910
|
+
function isObjectPropertyValid2(propertyValue, propertySchema, isRequired) {
|
|
15911
|
+
if (propertySchema.hidden) {
|
|
15912
|
+
return true;
|
|
15913
|
+
}
|
|
15914
|
+
if (typeof propertyValue === "undefined") {
|
|
15915
|
+
return !isRequired;
|
|
15916
|
+
}
|
|
15917
|
+
return isValidSchemaForPreselection(propertyValue, propertySchema);
|
|
15918
|
+
}
|
|
15919
|
+
function isValidArraySchema2(value, schema) {
|
|
15920
|
+
if (schema.type !== "array" || !isObject2(schema.items)) {
|
|
15921
|
+
return false;
|
|
15922
|
+
}
|
|
15923
|
+
if (getArrayValidationFailures(value, schema).length > 0) {
|
|
15924
|
+
return false;
|
|
15925
|
+
}
|
|
15926
|
+
return Array.isArray(value) && isListArraySchema(schema) && // TupleArraySchema not yet supported
|
|
15927
|
+
value.map((item) => isValidSchemaForPreselection(item, schema.items)).every((valid) => valid);
|
|
15928
|
+
}
|
|
15929
|
+
function isValidOneOfSchema2(value, schema) {
|
|
15930
|
+
if (!isArray2(schema.oneOf)) {
|
|
15931
|
+
return false;
|
|
15932
|
+
}
|
|
15933
|
+
return schema.oneOf.some((childSchema) => isValidSchemaForPreselection(value, childSchema));
|
|
15934
|
+
}
|
|
15935
|
+
function isValidAllOfSchema2(value, schema) {
|
|
15936
|
+
if (!isArray2(schema.allOf)) {
|
|
15937
|
+
return false;
|
|
15938
|
+
}
|
|
15939
|
+
return schema.allOf.map((childSchema) => isValidSchemaForPreselection(value, childSchema)).every((valid) => valid);
|
|
15940
|
+
}
|
|
15941
|
+
function isValidBlobSchema2(value, schema) {
|
|
15942
|
+
return !getBlobValidationFailures(value, schema).length;
|
|
15943
|
+
}
|
|
15944
|
+
function isValidSchemaForPreselection(value, schema) {
|
|
15945
|
+
if (schema.oneOf) {
|
|
15946
|
+
return isValidOneOfSchema2(value, schema);
|
|
15947
|
+
}
|
|
15948
|
+
if (schema.allOf) {
|
|
15949
|
+
return isValidAllOfSchema2(value, schema);
|
|
15950
|
+
}
|
|
15951
|
+
if (schema.const) {
|
|
15952
|
+
return isValidConstSchema2(value, schema);
|
|
15953
|
+
}
|
|
15954
|
+
switch (schema.type) {
|
|
15955
|
+
case "string":
|
|
15956
|
+
return isValidStringSchema2(value, schema);
|
|
15957
|
+
case "number":
|
|
15958
|
+
return isValidNumberSchema2(value, schema);
|
|
15959
|
+
case "integer":
|
|
15960
|
+
return isValidIntegerSchema2(value, schema);
|
|
15961
|
+
case "boolean":
|
|
15962
|
+
return isValidBooleanSchema2(value, schema);
|
|
15963
|
+
case "array":
|
|
15964
|
+
return isValidArraySchema2(value, schema);
|
|
15965
|
+
case "object":
|
|
15966
|
+
return isValidObjectSchema2(value, schema);
|
|
15967
|
+
case "blob":
|
|
15968
|
+
return isValidBlobSchema2(value, schema);
|
|
15969
|
+
default:
|
|
15970
|
+
return false;
|
|
15971
|
+
}
|
|
15972
|
+
}
|
|
15973
|
+
|
|
15827
15974
|
// src/legacy/jsonSchemaForm/oneOfSchema/utils.ts
|
|
15828
15975
|
var getActiveSchemaIndex = (schema, model) => {
|
|
15829
15976
|
const indexFromModel = getValidIndexFromValue(schema, model);
|
|
@@ -15845,8 +15992,18 @@ var getActiveSchemaIndex = (schema, model) => {
|
|
|
15845
15992
|
if (isOneOfObjectSchema(schema) && !isUndefined3(schema.default) && isObjectModel2(schema.default) && Object.keys(schema.default).length >= 1) {
|
|
15846
15993
|
return getBestMatchingSchemaIndexForValue(schema, schema.default);
|
|
15847
15994
|
}
|
|
15995
|
+
if (schema.oneOf.every((s) => isOneOfObjectSchema(s) || isObjectSchema2(s) || isAllOfSchema2(s)) && isObjectModel2(model) && Object.keys(model).length >= 1) {
|
|
15996
|
+
return getValidIndexFromValueForPreselection(schema, model);
|
|
15997
|
+
}
|
|
15848
15998
|
return null;
|
|
15849
15999
|
};
|
|
16000
|
+
var getValidIndexFromValueForPreselection = (schema, value) => {
|
|
16001
|
+
const predicate = (childSchema) => !isUndefined3(value) && isValidSchemaForPreselection(value, childSchema);
|
|
16002
|
+
if (schema.oneOf.filter(predicate).length === 1) {
|
|
16003
|
+
return schema.oneOf.findIndex(predicate);
|
|
16004
|
+
}
|
|
16005
|
+
return -1;
|
|
16006
|
+
};
|
|
15850
16007
|
var getValidIndexFromValue = (schema, value) => {
|
|
15851
16008
|
const predicate = (childSchema) => !isUndefined3(value) && isValidSchema(value, childSchema);
|
|
15852
16009
|
if (schema.oneOf.filter(predicate).length === 1) {
|
|
@@ -16074,7 +16231,7 @@ function RepeatableSchema({
|
|
|
16074
16231
|
setEditableItem({ item: null, model: null });
|
|
16075
16232
|
setOpenModalType(null);
|
|
16076
16233
|
};
|
|
16077
|
-
const { formatMessage } = (0,
|
|
16234
|
+
const { formatMessage } = (0, import_react_intl31.useIntl)();
|
|
16078
16235
|
const validations = getValidationFailures(model, schema, required);
|
|
16079
16236
|
const base64ValidationMessages = useFormattedDefaultErrorMessages({
|
|
16080
16237
|
minItems: schema.minItems,
|
|
@@ -16280,11 +16437,11 @@ var import_react41 = require("react");
|
|
|
16280
16437
|
|
|
16281
16438
|
// src/legacy/jsonSchemaForm/help/Help.tsx
|
|
16282
16439
|
var import_components54 = require("@transferwise/components");
|
|
16283
|
-
var
|
|
16440
|
+
var import_react_intl33 = require("react-intl");
|
|
16284
16441
|
|
|
16285
16442
|
// src/common/messages/help.messages.ts
|
|
16286
|
-
var
|
|
16287
|
-
var help_messages_default2 = (0,
|
|
16443
|
+
var import_react_intl32 = require("react-intl");
|
|
16444
|
+
var help_messages_default2 = (0, import_react_intl32.defineMessages)({
|
|
16288
16445
|
helpAria: {
|
|
16289
16446
|
id: "dynamicFlows.Help.ariaLabel",
|
|
16290
16447
|
defaultMessage: "Click here for more info.",
|
|
@@ -16295,7 +16452,7 @@ var help_messages_default2 = (0, import_react_intl30.defineMessages)({
|
|
|
16295
16452
|
// src/legacy/jsonSchemaForm/help/Help.tsx
|
|
16296
16453
|
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
16297
16454
|
function Help2(props) {
|
|
16298
|
-
const intl = (0,
|
|
16455
|
+
const intl = (0, import_react_intl33.useIntl)();
|
|
16299
16456
|
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
16300
16457
|
import_components54.Info,
|
|
16301
16458
|
{
|
|
@@ -16311,7 +16468,7 @@ var Help_default2 = Help2;
|
|
|
16311
16468
|
|
|
16312
16469
|
// src/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.tsx
|
|
16313
16470
|
var import_react40 = require("react");
|
|
16314
|
-
var
|
|
16471
|
+
var import_react_intl34 = require("react-intl");
|
|
16315
16472
|
|
|
16316
16473
|
// src/legacy/formControl/FormControl.tsx
|
|
16317
16474
|
var import_components55 = require("@transferwise/components");
|
|
@@ -17017,7 +17174,7 @@ function SchemaFormControl(props) {
|
|
|
17017
17174
|
labelledBy
|
|
17018
17175
|
} = props;
|
|
17019
17176
|
const log = useLogger();
|
|
17020
|
-
const intl = (0,
|
|
17177
|
+
const intl = (0, import_react_intl34.useIntl)();
|
|
17021
17178
|
const getSanitisedValue = (value2) => isNativeInput(schema.type) && (isNull3(value2) || isUndefined3(value2)) ? "" : value2;
|
|
17022
17179
|
const onModelChange = (value2, type, metadata) => {
|
|
17023
17180
|
onChange(getValidBasicModelOrNull(value2, schema), type, metadata);
|
|
@@ -17254,7 +17411,7 @@ var OneOfSchema_default = OneOfSchema;
|
|
|
17254
17411
|
// src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.tsx
|
|
17255
17412
|
var import_classnames12 = __toESM(require_classnames());
|
|
17256
17413
|
var import_react43 = require("react");
|
|
17257
|
-
var
|
|
17414
|
+
var import_react_intl35 = require("react-intl");
|
|
17258
17415
|
|
|
17259
17416
|
// src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.tsx
|
|
17260
17417
|
var import_components57 = require("@transferwise/components");
|
|
@@ -17321,7 +17478,7 @@ function PersistAsyncBlobSchema(props) {
|
|
|
17321
17478
|
const [persistAsyncValidations, setPersistAsyncValidations] = (0, import_react43.useState)(null);
|
|
17322
17479
|
const [validations, setValidations] = (0, import_react43.useState)([]);
|
|
17323
17480
|
const [changed, setChanged] = (0, import_react43.useState)(false);
|
|
17324
|
-
const intl = (0,
|
|
17481
|
+
const intl = (0, import_react_intl35.useIntl)();
|
|
17325
17482
|
const httpClient = useHttpClient();
|
|
17326
17483
|
const onEvent = useEventDispatcher();
|
|
17327
17484
|
(0, import_react43.useEffect)(() => {
|
|
@@ -17560,11 +17717,11 @@ var PromotedOneOfSchema_default = PromotedOneOfSchema;
|
|
|
17560
17717
|
|
|
17561
17718
|
// src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.tsx
|
|
17562
17719
|
var import_components60 = require("@transferwise/components");
|
|
17563
|
-
var
|
|
17720
|
+
var import_react_intl37 = require("react-intl");
|
|
17564
17721
|
|
|
17565
17722
|
// src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.ts
|
|
17566
|
-
var
|
|
17567
|
-
var ReadOnlySchema_messages_default = (0,
|
|
17723
|
+
var import_react_intl36 = require("react-intl");
|
|
17724
|
+
var ReadOnlySchema_messages_default = (0, import_react_intl36.defineMessages)({
|
|
17568
17725
|
yes: {
|
|
17569
17726
|
id: "dynamicFlows.ReadOnlySchema.yes",
|
|
17570
17727
|
defaultMessage: "Yes",
|
|
@@ -17581,7 +17738,7 @@ var ReadOnlySchema_messages_default = (0, import_react_intl34.defineMessages)({
|
|
|
17581
17738
|
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
17582
17739
|
function ReadOnlySchema({ schema, model }) {
|
|
17583
17740
|
const { title = "" } = schema;
|
|
17584
|
-
const { formatMessage } = (0,
|
|
17741
|
+
const { formatMessage } = (0, import_react_intl37.useIntl)();
|
|
17585
17742
|
const value = getValueForSchema({ schema, model, formatMessage });
|
|
17586
17743
|
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_components60.DefinitionList, { layout: import_components60.Layout.VERTICAL_ONE_COLUMN, definitions: [{ title, value, key: "" }] });
|
|
17587
17744
|
}
|
|
@@ -18109,11 +18266,11 @@ var DynamicLoadingIndicator_default = DynamicLoadingIndicator;
|
|
|
18109
18266
|
|
|
18110
18267
|
// src/legacy/layout/paragraph/DynamicParagraph.tsx
|
|
18111
18268
|
var import_components68 = require("@transferwise/components");
|
|
18112
|
-
var
|
|
18269
|
+
var import_react_intl39 = require("react-intl");
|
|
18113
18270
|
|
|
18114
18271
|
// src/common/messages/paragraph.messages.ts
|
|
18115
|
-
var
|
|
18116
|
-
var paragraph_messages_default2 = (0,
|
|
18272
|
+
var import_react_intl38 = require("react-intl");
|
|
18273
|
+
var paragraph_messages_default2 = (0, import_react_intl38.defineMessages)({
|
|
18117
18274
|
copy: {
|
|
18118
18275
|
id: "dynamicFlows.DynamicParagraph.copy",
|
|
18119
18276
|
defaultMessage: "Copy",
|
|
@@ -18145,7 +18302,7 @@ function BasicDynamicParagraph({ component }) {
|
|
|
18145
18302
|
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("p", { className: `np-text-body-large ${getTextAlignmentAndMargin2(component)}`, children: component.text });
|
|
18146
18303
|
}
|
|
18147
18304
|
function CopyableDynamicParagraph({ component }) {
|
|
18148
|
-
const { formatMessage } = (0,
|
|
18305
|
+
const { formatMessage } = (0, import_react_intl39.useIntl)();
|
|
18149
18306
|
const createSnackbar = useSnackBarIfAvailable2();
|
|
18150
18307
|
const { text } = component;
|
|
18151
18308
|
const copy = () => {
|
|
@@ -18260,7 +18417,7 @@ var SearchInput = ({ title, value, onFocus, onChange }) => {
|
|
|
18260
18417
|
|
|
18261
18418
|
// src/legacy/layout/search/SearchResults.tsx
|
|
18262
18419
|
var import_components71 = require("@transferwise/components");
|
|
18263
|
-
var
|
|
18420
|
+
var import_react_intl40 = require("react-intl");
|
|
18264
18421
|
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
18265
18422
|
function SearchResults2({ results, emptyMessage, onSelect }) {
|
|
18266
18423
|
if (results.length === 0) {
|
|
@@ -18280,7 +18437,7 @@ function SearchResults2({ results, emptyMessage, onSelect }) {
|
|
|
18280
18437
|
)) });
|
|
18281
18438
|
}
|
|
18282
18439
|
function ErrorResult2({ onRetrySearch }) {
|
|
18283
|
-
const intl = (0,
|
|
18440
|
+
const intl = (0, import_react_intl40.useIntl)();
|
|
18284
18441
|
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("p", { className: "m-t-2", children: [
|
|
18285
18442
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
18286
18443
|
"\xA0",
|
|
@@ -18370,12 +18527,24 @@ var addQueryParameter2 = (url, key, value) => {
|
|
|
18370
18527
|
// src/legacy/layout/search/DynamicSearch.tsx
|
|
18371
18528
|
var import_components72 = require("@transferwise/components");
|
|
18372
18529
|
var import_classnames14 = __toESM(require_classnames());
|
|
18373
|
-
var
|
|
18530
|
+
var import_react_intl42 = require("react-intl");
|
|
18531
|
+
|
|
18532
|
+
// src/common/messages/search.messages.ts
|
|
18533
|
+
var import_react_intl41 = require("react-intl");
|
|
18534
|
+
var search_messages_default2 = (0, import_react_intl41.defineMessages)({
|
|
18535
|
+
loading: {
|
|
18536
|
+
id: "dynamicFlows.SearchLayout.loading",
|
|
18537
|
+
defaultMessage: "Loading...",
|
|
18538
|
+
description: "A message shown to the user while their search is being processed, before results appear."
|
|
18539
|
+
}
|
|
18540
|
+
});
|
|
18541
|
+
|
|
18542
|
+
// src/legacy/layout/search/DynamicSearch.tsx
|
|
18374
18543
|
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
18375
18544
|
var DEBOUNCE_TIME2 = 400;
|
|
18376
18545
|
function DynamicSearch({ component, onAction }) {
|
|
18377
18546
|
const [query, setQuery] = (0, import_react51.useState)("");
|
|
18378
|
-
const intl = (0,
|
|
18547
|
+
const intl = (0, import_react_intl42.useIntl)();
|
|
18379
18548
|
const { control, title, margin, url, method, param, emptyMessage } = component;
|
|
18380
18549
|
const { status, results, search } = useSearch({ url, method, param });
|
|
18381
18550
|
const onEvent = useEventDispatcher();
|
|
@@ -18407,6 +18576,7 @@ function DynamicSearch({ component, onAction }) {
|
|
|
18407
18576
|
setQuery(query);
|
|
18408
18577
|
void search(query);
|
|
18409
18578
|
};
|
|
18579
|
+
const loadingMessage = intl.formatMessage(search_messages_default2.loading);
|
|
18410
18580
|
if (control === "inline") {
|
|
18411
18581
|
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { className: (0, import_classnames14.default)(getMargin2(margin != null ? margin : "md"), "df-search-typeahead"), children: /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("label", { className: "control-label d-inline", children: [
|
|
18412
18582
|
title,
|
|
@@ -18424,6 +18594,7 @@ function DynamicSearch({ component, onAction }) {
|
|
|
18424
18594
|
state: status,
|
|
18425
18595
|
results,
|
|
18426
18596
|
emptyMessage,
|
|
18597
|
+
loadingMessage,
|
|
18427
18598
|
onRetrySearch
|
|
18428
18599
|
}
|
|
18429
18600
|
),
|
|
@@ -18461,10 +18632,11 @@ function mapResultToTypeaheadOption2(result) {
|
|
|
18461
18632
|
};
|
|
18462
18633
|
}
|
|
18463
18634
|
function TypeaheadFooter2({
|
|
18635
|
+
emptyMessage,
|
|
18636
|
+
loadingMessage,
|
|
18464
18637
|
results,
|
|
18465
18638
|
state,
|
|
18466
|
-
onRetrySearch
|
|
18467
|
-
emptyMessage
|
|
18639
|
+
onRetrySearch
|
|
18468
18640
|
}) {
|
|
18469
18641
|
if (state === "success" && results.length === 0) {
|
|
18470
18642
|
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_components72.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: emptyMessage });
|
|
@@ -18473,7 +18645,7 @@ function TypeaheadFooter2({
|
|
|
18473
18645
|
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(ErrorResult2, { onRetrySearch }) });
|
|
18474
18646
|
}
|
|
18475
18647
|
if (state === "loading" || results.length === 0) {
|
|
18476
|
-
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("p", { className: "m-t-2 m-x-2", children:
|
|
18648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("p", { className: "m-t-2 m-x-2", children: loadingMessage });
|
|
18477
18649
|
}
|
|
18478
18650
|
return null;
|
|
18479
18651
|
}
|
|
@@ -18649,7 +18821,7 @@ var controlTypesWithPersistOnChange = /* @__PURE__ */ new Set([
|
|
|
18649
18821
|
]);
|
|
18650
18822
|
function PersistAsyncBasicSchema(props) {
|
|
18651
18823
|
const { schema, required = false, submitted, errors, onChange, onPersistAsync } = props;
|
|
18652
|
-
const intl = (0,
|
|
18824
|
+
const intl = (0, import_react_intl43.useIntl)();
|
|
18653
18825
|
const httpClient = useHttpClient();
|
|
18654
18826
|
const onEvent = useEventDispatcher();
|
|
18655
18827
|
const [persistAsyncModel, setPersistAsyncModel] = (0, import_react54.useState)(null);
|
|
@@ -18744,7 +18916,7 @@ var PersistAsyncBasicSchema_default = PersistAsyncBasicSchema;
|
|
|
18744
18916
|
var usePersistAsync = (persistAsync) => {
|
|
18745
18917
|
const [abortController, setAbortController] = (0, import_react55.useState)(null);
|
|
18746
18918
|
const httpClient = useHttpClient();
|
|
18747
|
-
const intl = (0,
|
|
18919
|
+
const intl = (0, import_react_intl44.useIntl)();
|
|
18748
18920
|
const { schema } = persistAsync;
|
|
18749
18921
|
async function handlePersistAsync(model) {
|
|
18750
18922
|
const isInvalidSchema = model instanceof Blob ? !isBlobSchema2(schema) : !isValidSchema(model, schema);
|
|
@@ -18977,12 +19149,12 @@ var import_react63 = require("react");
|
|
|
18977
19149
|
|
|
18978
19150
|
// src/common/cameraCapture/CameraCapture.tsx
|
|
18979
19151
|
var import_react62 = require("react");
|
|
18980
|
-
var
|
|
19152
|
+
var import_react_intl49 = require("react-intl");
|
|
18981
19153
|
var import_react_webcam = __toESM(require("react-webcam"));
|
|
18982
19154
|
|
|
18983
19155
|
// src/common/cameraCapture/CameraCapture.messages.ts
|
|
18984
|
-
var
|
|
18985
|
-
var CameraCapture_messages_default = (0,
|
|
19156
|
+
var import_react_intl45 = require("react-intl");
|
|
19157
|
+
var CameraCapture_messages_default = (0, import_react_intl45.defineMessages)({
|
|
18986
19158
|
reviewSubmit: {
|
|
18987
19159
|
id: "dynamicFlows.CameraCapture.reviewSubmit",
|
|
18988
19160
|
defaultMessage: "Yes, submit",
|
|
@@ -19042,14 +19214,14 @@ var CameraCapture_messages_default = (0, import_react_intl42.defineMessages)({
|
|
|
19042
19214
|
|
|
19043
19215
|
// src/common/cameraCapture/components/bottomBar/BottomBar.tsx
|
|
19044
19216
|
var import_components74 = require("@transferwise/components");
|
|
19045
|
-
var
|
|
19217
|
+
var import_react_intl46 = require("react-intl");
|
|
19046
19218
|
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
19047
19219
|
var CaptureBottomBar = ({ onCapture }) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "bottom-bar", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(CaptureButton, { onClick: onCapture }) });
|
|
19048
19220
|
var ReviewBottomBar = ({
|
|
19049
19221
|
onSubmit,
|
|
19050
19222
|
onRetry
|
|
19051
19223
|
}) => {
|
|
19052
|
-
const intl = (0,
|
|
19224
|
+
const intl = (0, import_react_intl46.useIntl)();
|
|
19053
19225
|
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "bottom-bar p-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "col-xs-12 col-md-6 col-md-offset-3", children: [
|
|
19054
19226
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
19055
19227
|
import_components74.Button,
|
|
@@ -19088,11 +19260,11 @@ var CaptureButton = ({ onClick }) => /* @__PURE__ */ (0, import_jsx_runtime120.j
|
|
|
19088
19260
|
);
|
|
19089
19261
|
|
|
19090
19262
|
// src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
|
|
19091
|
-
var
|
|
19263
|
+
var import_react_intl48 = require("react-intl");
|
|
19092
19264
|
|
|
19093
19265
|
// src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.ts
|
|
19094
|
-
var
|
|
19095
|
-
var OrientationLockOverlay_messages_default = (0,
|
|
19266
|
+
var import_react_intl47 = require("react-intl");
|
|
19267
|
+
var OrientationLockOverlay_messages_default = (0, import_react_intl47.defineMessages)({
|
|
19096
19268
|
text: {
|
|
19097
19269
|
id: "dynamicFlows.CameraCapture.rotatePhone.text",
|
|
19098
19270
|
defaultMessage: "Rotate your phone to portrait view to take a photo",
|
|
@@ -19103,7 +19275,7 @@ var OrientationLockOverlay_messages_default = (0, import_react_intl44.defineMess
|
|
|
19103
19275
|
// src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
|
|
19104
19276
|
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
19105
19277
|
function OrientationLockOverlay() {
|
|
19106
|
-
const intl = (0,
|
|
19278
|
+
const intl = (0, import_react_intl48.useIntl)();
|
|
19107
19279
|
return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "orientation-lock-overlay", children: [
|
|
19108
19280
|
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
19109
19281
|
"img",
|
|
@@ -19393,7 +19565,7 @@ function CameraCapture({
|
|
|
19393
19565
|
shouldLockOrientation,
|
|
19394
19566
|
onEvent
|
|
19395
19567
|
);
|
|
19396
|
-
const intl = (0,
|
|
19568
|
+
const intl = (0, import_react_intl49.useIntl)();
|
|
19397
19569
|
const handleCapture = (0, import_react62.useCallback)(async () => {
|
|
19398
19570
|
var _a, _b, _c, _d, _e, _f;
|
|
19399
19571
|
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) {
|
|
@@ -19616,11 +19788,11 @@ function getFirstAction(step) {
|
|
|
19616
19788
|
}
|
|
19617
19789
|
|
|
19618
19790
|
// src/legacy/step/externalConfirmationStep/ExternalConfirmationStep.tsx
|
|
19619
|
-
var
|
|
19791
|
+
var import_react_intl51 = require("react-intl");
|
|
19620
19792
|
|
|
19621
19793
|
// src/common/messages/external-confirmation.messages.ts
|
|
19622
|
-
var
|
|
19623
|
-
var external_confirmation_messages_default2 = (0,
|
|
19794
|
+
var import_react_intl50 = require("react-intl");
|
|
19795
|
+
var external_confirmation_messages_default2 = (0, import_react_intl50.defineMessages)({
|
|
19624
19796
|
title: {
|
|
19625
19797
|
id: "dynamicFlows.ExternalConfirmation.title",
|
|
19626
19798
|
defaultMessage: "Please confirm",
|
|
@@ -19648,7 +19820,7 @@ var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
|
19648
19820
|
var noop6 = () => {
|
|
19649
19821
|
};
|
|
19650
19822
|
function ExternalConfirmationStep({ url, onClose }) {
|
|
19651
|
-
const { formatMessage } = (0,
|
|
19823
|
+
const { formatMessage } = (0, import_react_intl51.useIntl)();
|
|
19652
19824
|
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
19653
19825
|
DynamicLayout_default,
|
|
19654
19826
|
{
|
|
@@ -20021,9 +20193,9 @@ var assertResponseIsValid2 = (response) => {
|
|
|
20021
20193
|
var isResponse2 = (response) => typeof response === "object" && response !== null && "clone" in response && "bodyUsed" in response;
|
|
20022
20194
|
|
|
20023
20195
|
// src/legacy/dynamicFlow/utils/useErrorResponse.tsx
|
|
20024
|
-
var
|
|
20196
|
+
var import_react_intl52 = require("react-intl");
|
|
20025
20197
|
var useErrorResponse = () => {
|
|
20026
|
-
const { formatMessage } = (0,
|
|
20198
|
+
const { formatMessage } = (0, import_react_intl52.useIntl)();
|
|
20027
20199
|
return async (response, fetchType, isInitialRequest) => {
|
|
20028
20200
|
try {
|
|
20029
20201
|
const errorResponse = await parseErrorResponse(response);
|
|
@@ -20067,7 +20239,7 @@ var DynamicFlowComponent = ({
|
|
|
20067
20239
|
setSchemaModel
|
|
20068
20240
|
} = useDynamicFlowState(initialStep);
|
|
20069
20241
|
const [submitted, setSubmitted] = (0, import_react67.useState)(false);
|
|
20070
|
-
const { locale } = (0,
|
|
20242
|
+
const { locale } = (0, import_react_intl53.useIntl)();
|
|
20071
20243
|
const { isLoading, loader, setLoadingState } = useLoader(
|
|
20072
20244
|
loaderConfig,
|
|
20073
20245
|
initialStep ? "idle" : "initial"
|