@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.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 = ({
|
|
@@ -5856,21 +5867,13 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
|
5856
5867
|
quotelessJson,
|
|
5857
5868
|
ZodError
|
|
5858
5869
|
});
|
|
5859
|
-
var
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
z.literal("GET"),
|
|
5866
|
-
z.literal("POST"),
|
|
5867
|
-
z.literal("PUT"),
|
|
5868
|
-
z.literal("PATCH"),
|
|
5869
|
-
z.literal("DELETE")
|
|
5870
|
+
var sizeSchema = z.union([
|
|
5871
|
+
z.literal("xs"),
|
|
5872
|
+
z.literal("sm"),
|
|
5873
|
+
z.literal("md"),
|
|
5874
|
+
z.literal("lg"),
|
|
5875
|
+
z.literal("xl")
|
|
5870
5876
|
]);
|
|
5871
|
-
var iconNamedSchema = z.object({
|
|
5872
|
-
name: z.string()
|
|
5873
|
-
});
|
|
5874
5877
|
var contextSchema = z.union([
|
|
5875
5878
|
z.literal("positive"),
|
|
5876
5879
|
z.literal("neutral"),
|
|
@@ -5881,18 +5884,107 @@ var contextSchema = z.union([
|
|
|
5881
5884
|
z.literal("info"),
|
|
5882
5885
|
z.literal("primary")
|
|
5883
5886
|
]);
|
|
5884
|
-
var
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
z.literal("
|
|
5891
|
-
z.literal("
|
|
5892
|
-
z.literal("
|
|
5887
|
+
var columnsLayoutBiasSchema = z.union([
|
|
5888
|
+
z.literal("none"),
|
|
5889
|
+
z.literal("left"),
|
|
5890
|
+
z.literal("right")
|
|
5891
|
+
]);
|
|
5892
|
+
var statusListLayoutStatusSchema = z.union([
|
|
5893
|
+
z.literal("not-done"),
|
|
5894
|
+
z.literal("pending"),
|
|
5895
|
+
z.literal("done")
|
|
5893
5896
|
]);
|
|
5894
5897
|
var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
|
|
5895
|
-
var
|
|
5898
|
+
var formLayoutSchemaReferenceSchema = z.object({
|
|
5899
|
+
$ref: z.string()
|
|
5900
|
+
});
|
|
5901
|
+
var modalLayoutTriggerSchema = z.object({
|
|
5902
|
+
title: z.string()
|
|
5903
|
+
});
|
|
5904
|
+
var httpMethodSchema = z.union([
|
|
5905
|
+
z.literal("GET"),
|
|
5906
|
+
z.literal("POST"),
|
|
5907
|
+
z.literal("PUT"),
|
|
5908
|
+
z.literal("PATCH"),
|
|
5909
|
+
z.literal("DELETE")
|
|
5910
|
+
]);
|
|
5911
|
+
var dividerLayoutSchema = z.object({
|
|
5912
|
+
type: z.literal("divider"),
|
|
5913
|
+
control: z.string().optional(),
|
|
5914
|
+
margin: sizeSchema.optional()
|
|
5915
|
+
});
|
|
5916
|
+
var listLayoutStatusSchema = z.union([
|
|
5917
|
+
z.literal("warning"),
|
|
5918
|
+
z.literal("neutral"),
|
|
5919
|
+
z.literal("positive")
|
|
5920
|
+
]);
|
|
5921
|
+
var headingLayoutSchema = z.object({
|
|
5922
|
+
type: z.literal("heading"),
|
|
5923
|
+
text: z.string(),
|
|
5924
|
+
size: sizeSchema.optional(),
|
|
5925
|
+
align: alignSchema.optional(),
|
|
5926
|
+
control: z.string().optional(),
|
|
5927
|
+
margin: sizeSchema.optional()
|
|
5928
|
+
});
|
|
5929
|
+
var formLayoutSchema = z.object({
|
|
5930
|
+
type: z.literal("form"),
|
|
5931
|
+
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
5932
|
+
schemaId: z.string(),
|
|
5933
|
+
control: z.string().optional(),
|
|
5934
|
+
margin: sizeSchema.optional()
|
|
5935
|
+
});
|
|
5936
|
+
var imageLayoutSchema = z.object({
|
|
5937
|
+
type: z.literal("image"),
|
|
5938
|
+
text: z.string().optional(),
|
|
5939
|
+
url: z.string(),
|
|
5940
|
+
size: sizeSchema.optional(),
|
|
5941
|
+
accessibilityDescription: z.string().optional(),
|
|
5942
|
+
control: z.string().optional(),
|
|
5943
|
+
margin: sizeSchema.optional()
|
|
5944
|
+
});
|
|
5945
|
+
var infoLayoutSchema = z.object({
|
|
5946
|
+
type: z.literal("info"),
|
|
5947
|
+
markdown: z.string(),
|
|
5948
|
+
align: alignSchema.optional(),
|
|
5949
|
+
control: z.string().optional(),
|
|
5950
|
+
margin: sizeSchema.optional()
|
|
5951
|
+
});
|
|
5952
|
+
var loadingIndicatorLayoutSchema = z.object({
|
|
5953
|
+
type: z.literal("loading-indicator"),
|
|
5954
|
+
size: sizeSchema.optional(),
|
|
5955
|
+
control: z.string().optional(),
|
|
5956
|
+
margin: sizeSchema.optional()
|
|
5957
|
+
});
|
|
5958
|
+
var paragraphLayoutSchema = z.object({
|
|
5959
|
+
type: z.literal("paragraph"),
|
|
5960
|
+
text: z.string(),
|
|
5961
|
+
align: alignSchema.optional(),
|
|
5962
|
+
control: z.string().optional(),
|
|
5963
|
+
margin: sizeSchema.optional()
|
|
5964
|
+
});
|
|
5965
|
+
var instructionsLayoutItemSchema = z.object({
|
|
5966
|
+
text: z.string(),
|
|
5967
|
+
context: contextSchema
|
|
5968
|
+
});
|
|
5969
|
+
var helpSchema = z.object({
|
|
5970
|
+
markdown: z.string()
|
|
5971
|
+
});
|
|
5972
|
+
var imageSchema = z.object({
|
|
5973
|
+
text: z.string().optional(),
|
|
5974
|
+
url: z.string(),
|
|
5975
|
+
accessibilityDescription: z.string().optional()
|
|
5976
|
+
});
|
|
5977
|
+
var summaryProviderSchema = z.object({
|
|
5978
|
+
providesTitle: z.boolean().optional(),
|
|
5979
|
+
providesDescription: z.boolean().optional(),
|
|
5980
|
+
providesIcon: z.boolean().optional(),
|
|
5981
|
+
providesImage: z.boolean().optional()
|
|
5982
|
+
});
|
|
5983
|
+
var validateAsyncSchema = z.object({
|
|
5984
|
+
param: z.string(),
|
|
5985
|
+
method: httpMethodSchema,
|
|
5986
|
+
url: z.string()
|
|
5987
|
+
});
|
|
5896
5988
|
var autocompleteTokenSchema = z.union([
|
|
5897
5989
|
z.literal("on"),
|
|
5898
5990
|
z.literal("name"),
|
|
@@ -5958,158 +6050,53 @@ var autocompleteTokenSchema = z.union([
|
|
|
5958
6050
|
z.literal("fax"),
|
|
5959
6051
|
z.literal("pager")
|
|
5960
6052
|
]);
|
|
5961
|
-
var
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
type: z.literal("paragraph"),
|
|
5969
|
-
text: z.string(),
|
|
5970
|
-
align: alignSchema.optional(),
|
|
5971
|
-
control: z.string().optional(),
|
|
5972
|
-
margin: sizeSchema.optional()
|
|
5973
|
-
});
|
|
5974
|
-
var dividerLayoutSchema = z.object({
|
|
5975
|
-
type: z.literal("divider"),
|
|
5976
|
-
control: z.string().optional(),
|
|
5977
|
-
margin: sizeSchema.optional()
|
|
5978
|
-
});
|
|
5979
|
-
var listLayoutStatusSchema = z.union([
|
|
5980
|
-
z.literal("warning"),
|
|
5981
|
-
z.literal("neutral"),
|
|
5982
|
-
z.literal("positive")
|
|
6053
|
+
var stringSchemaFormatSchema = z.union([
|
|
6054
|
+
z.literal("date"),
|
|
6055
|
+
z.literal("email"),
|
|
6056
|
+
z.literal("numeric"),
|
|
6057
|
+
z.literal("password"),
|
|
6058
|
+
z.literal("phone-number"),
|
|
6059
|
+
z.literal("base64url")
|
|
5983
6060
|
]);
|
|
5984
|
-
var
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
6061
|
+
var jsonElementSchema = z.lazy(
|
|
6062
|
+
() => z.union([
|
|
6063
|
+
z.string(),
|
|
6064
|
+
z.number(),
|
|
6065
|
+
z.boolean(),
|
|
6066
|
+
z.record(jsonElementSchema),
|
|
6067
|
+
z.array(jsonElementSchema)
|
|
6068
|
+
]).nullable()
|
|
6069
|
+
);
|
|
6070
|
+
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
6071
|
+
var externalSchema = z.object({
|
|
6072
|
+
url: z.string()
|
|
5995
6073
|
});
|
|
5996
|
-
var
|
|
5997
|
-
z.
|
|
5998
|
-
|
|
5999
|
-
z.literal("done")
|
|
6000
|
-
]);
|
|
6001
|
-
var instructionsLayoutItemSchema = z.object({
|
|
6002
|
-
text: z.string(),
|
|
6003
|
-
context: contextSchema
|
|
6074
|
+
var stepErrorSchema = z.object({
|
|
6075
|
+
error: z.string().optional(),
|
|
6076
|
+
validation: jsonElementSchema.optional()
|
|
6004
6077
|
});
|
|
6005
|
-
var
|
|
6006
|
-
|
|
6078
|
+
var errorResponseBodySchema = z.object({
|
|
6079
|
+
refreshFormUrl: z.string().optional(),
|
|
6080
|
+
analytics: z.record(z.string()).optional(),
|
|
6081
|
+
error: z.string().optional(),
|
|
6082
|
+
validation: jsonElementSchema.optional(),
|
|
6083
|
+
refreshUrl: z.string().optional()
|
|
6007
6084
|
});
|
|
6008
|
-
var
|
|
6009
|
-
type: z.literal("search"),
|
|
6010
|
-
title: z.string(),
|
|
6011
|
-
method: httpMethodSchema,
|
|
6085
|
+
var searchSearchRequestSchema = z.object({
|
|
6012
6086
|
url: z.string(),
|
|
6087
|
+
method: httpMethodSchema,
|
|
6013
6088
|
param: z.string(),
|
|
6014
|
-
|
|
6015
|
-
control: z.string().optional(),
|
|
6016
|
-
margin: sizeSchema.optional()
|
|
6089
|
+
query: z.string()
|
|
6017
6090
|
});
|
|
6018
|
-
var
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6091
|
+
var navigationStackBehaviorSchema = z.union([
|
|
6092
|
+
z.literal("default"),
|
|
6093
|
+
z.literal("remove-previous"),
|
|
6094
|
+
z.literal("remove-all"),
|
|
6095
|
+
z.literal("replace-current")
|
|
6096
|
+
]);
|
|
6097
|
+
var linkSchema = z.object({
|
|
6098
|
+
url: z.string()
|
|
6024
6099
|
});
|
|
6025
|
-
var formLayoutSchema = z.object({
|
|
6026
|
-
type: z.literal("form"),
|
|
6027
|
-
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
6028
|
-
schemaId: z.string(),
|
|
6029
|
-
control: z.string().optional(),
|
|
6030
|
-
margin: sizeSchema.optional()
|
|
6031
|
-
});
|
|
6032
|
-
var headingLayoutSchema = z.object({
|
|
6033
|
-
type: z.literal("heading"),
|
|
6034
|
-
text: z.string(),
|
|
6035
|
-
size: sizeSchema.optional(),
|
|
6036
|
-
align: alignSchema.optional(),
|
|
6037
|
-
control: z.string().optional(),
|
|
6038
|
-
margin: sizeSchema.optional()
|
|
6039
|
-
});
|
|
6040
|
-
var markdownLayoutSchema = z.object({
|
|
6041
|
-
type: z.literal("markdown"),
|
|
6042
|
-
content: z.string(),
|
|
6043
|
-
align: alignSchema.optional(),
|
|
6044
|
-
control: z.string().optional(),
|
|
6045
|
-
margin: sizeSchema.optional()
|
|
6046
|
-
});
|
|
6047
|
-
var columnsLayoutBiasSchema = z.union([
|
|
6048
|
-
z.literal("none"),
|
|
6049
|
-
z.literal("left"),
|
|
6050
|
-
z.literal("right")
|
|
6051
|
-
]);
|
|
6052
|
-
var helpSchema = z.object({
|
|
6053
|
-
markdown: z.string()
|
|
6054
|
-
});
|
|
6055
|
-
var searchSearchRequestSchema = z.object({
|
|
6056
|
-
url: z.string(),
|
|
6057
|
-
method: httpMethodSchema,
|
|
6058
|
-
param: z.string(),
|
|
6059
|
-
query: z.string()
|
|
6060
|
-
});
|
|
6061
|
-
var jsonElementSchema = z.lazy(
|
|
6062
|
-
() => z.union([
|
|
6063
|
-
z.string(),
|
|
6064
|
-
z.number(),
|
|
6065
|
-
z.boolean(),
|
|
6066
|
-
z.record(jsonElementSchema),
|
|
6067
|
-
z.array(jsonElementSchema)
|
|
6068
|
-
]).nullable()
|
|
6069
|
-
);
|
|
6070
|
-
var externalSchema = z.object({
|
|
6071
|
-
url: z.string()
|
|
6072
|
-
});
|
|
6073
|
-
var stepErrorSchema = z.object({
|
|
6074
|
-
error: z.string().optional(),
|
|
6075
|
-
validation: jsonElementSchema.optional()
|
|
6076
|
-
});
|
|
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")
|
|
6084
|
-
]);
|
|
6085
|
-
var summarySummariserSchema = z.object({
|
|
6086
|
-
defaultTitle: z.string().optional(),
|
|
6087
|
-
defaultDescription: z.string().optional(),
|
|
6088
|
-
defaultIcon: iconSchema.optional(),
|
|
6089
|
-
defaultImage: imageLayoutSchema.optional(),
|
|
6090
|
-
providesTitle: z.boolean().optional(),
|
|
6091
|
-
providesDescription: z.boolean().optional(),
|
|
6092
|
-
providesIcon: z.boolean().optional(),
|
|
6093
|
-
providesImage: z.boolean().optional()
|
|
6094
|
-
});
|
|
6095
|
-
var validateAsyncSchema = z.object({
|
|
6096
|
-
param: z.string(),
|
|
6097
|
-
method: httpMethodSchema,
|
|
6098
|
-
url: z.string()
|
|
6099
|
-
});
|
|
6100
|
-
var summaryProviderSchema = z.object({
|
|
6101
|
-
providesTitle: z.boolean().optional(),
|
|
6102
|
-
providesDescription: z.boolean().optional(),
|
|
6103
|
-
providesIcon: z.boolean().optional(),
|
|
6104
|
-
providesImage: z.boolean().optional()
|
|
6105
|
-
});
|
|
6106
|
-
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
6107
|
-
var navigationStackBehaviorSchema = z.union([
|
|
6108
|
-
z.literal("default"),
|
|
6109
|
-
z.literal("remove-previous"),
|
|
6110
|
-
z.literal("remove-all"),
|
|
6111
|
-
z.literal("replace-current")
|
|
6112
|
-
]);
|
|
6113
6100
|
var actionTypeSchema = z.union([
|
|
6114
6101
|
z.literal("primary"),
|
|
6115
6102
|
z.literal("secondary"),
|
|
@@ -6117,9 +6104,11 @@ var actionTypeSchema = z.union([
|
|
|
6117
6104
|
z.literal("positive"),
|
|
6118
6105
|
z.literal("negative")
|
|
6119
6106
|
]);
|
|
6120
|
-
var
|
|
6121
|
-
|
|
6122
|
-
|
|
6107
|
+
var iconNamedSchema = z.object({
|
|
6108
|
+
name: z.string()
|
|
6109
|
+
});
|
|
6110
|
+
var iconTextSchema = z.object({
|
|
6111
|
+
text: z.string()
|
|
6123
6112
|
});
|
|
6124
6113
|
var actionSchema = z.object({
|
|
6125
6114
|
title: z.string().optional(),
|
|
@@ -6136,19 +6125,26 @@ var actionSchema = z.object({
|
|
|
6136
6125
|
timeout: z.number().optional(),
|
|
6137
6126
|
skipValidation: z.boolean().optional()
|
|
6138
6127
|
});
|
|
6139
|
-
var
|
|
6128
|
+
var markdownLayoutSchema = z.object({
|
|
6129
|
+
type: z.literal("markdown"),
|
|
6130
|
+
content: z.string(),
|
|
6131
|
+
align: alignSchema.optional(),
|
|
6132
|
+
control: z.string().optional(),
|
|
6133
|
+
margin: sizeSchema.optional()
|
|
6134
|
+
});
|
|
6135
|
+
var searchLayoutSchema = z.object({
|
|
6136
|
+
type: z.literal("search"),
|
|
6140
6137
|
title: z.string(),
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6138
|
+
method: httpMethodSchema,
|
|
6139
|
+
url: z.string(),
|
|
6140
|
+
param: z.string(),
|
|
6141
|
+
emptyMessage: z.string().optional(),
|
|
6142
|
+
control: z.string().optional(),
|
|
6143
|
+
margin: sizeSchema.optional()
|
|
6144
6144
|
});
|
|
6145
|
-
var
|
|
6146
|
-
action: actionSchema,
|
|
6145
|
+
var reviewLayoutCallToActionSchema = z.object({
|
|
6147
6146
|
title: z.string(),
|
|
6148
|
-
|
|
6149
|
-
disabled: z.boolean().optional(),
|
|
6150
|
-
icon: iconSchema.optional(),
|
|
6151
|
-
image: imageLayoutSchema.optional()
|
|
6147
|
+
action: actionSchema
|
|
6152
6148
|
});
|
|
6153
6149
|
var instructionsLayoutSchema = z.object({
|
|
6154
6150
|
type: z.literal("instructions"),
|
|
@@ -6157,26 +6153,38 @@ var instructionsLayoutSchema = z.object({
|
|
|
6157
6153
|
control: z.string().optional(),
|
|
6158
6154
|
margin: sizeSchema.optional()
|
|
6159
6155
|
});
|
|
6156
|
+
var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
6160
6157
|
var behaviorSchema = z.object({
|
|
6161
6158
|
action: actionSchema.optional(),
|
|
6162
6159
|
link: linkSchema.optional()
|
|
6163
6160
|
});
|
|
6164
|
-
var buttonLayoutSchema = z.object({
|
|
6165
|
-
type: z.literal("button"),
|
|
6166
|
-
size: sizeSchema.optional(),
|
|
6167
|
-
title: z.string().optional(),
|
|
6168
|
-
action: actionSchema,
|
|
6169
|
-
context: contextSchema.optional(),
|
|
6170
|
-
disabled: z.boolean().optional(),
|
|
6171
|
-
pinOrder: z.number().optional(),
|
|
6172
|
-
control: z.string().optional(),
|
|
6173
|
-
margin: sizeSchema.optional()
|
|
6174
|
-
});
|
|
6175
6161
|
var reviewLayoutFieldSchema = z.object({
|
|
6176
6162
|
label: z.string(),
|
|
6177
6163
|
value: z.string(),
|
|
6178
6164
|
help: helpSchema.optional()
|
|
6179
6165
|
});
|
|
6166
|
+
var alertLayoutCallToActionSchema = z.object({
|
|
6167
|
+
title: z.string(),
|
|
6168
|
+
accessibilityDescription: z.string().optional(),
|
|
6169
|
+
behavior: behaviorSchema
|
|
6170
|
+
});
|
|
6171
|
+
var summarySummariserSchema = z.object({
|
|
6172
|
+
defaultTitle: z.string().optional(),
|
|
6173
|
+
defaultDescription: z.string().optional(),
|
|
6174
|
+
defaultIcon: iconSchema.optional(),
|
|
6175
|
+
defaultImage: imageLayoutSchema.optional(),
|
|
6176
|
+
providesTitle: z.boolean().optional(),
|
|
6177
|
+
providesDescription: z.boolean().optional(),
|
|
6178
|
+
providesIcon: z.boolean().optional(),
|
|
6179
|
+
providesImage: z.boolean().optional()
|
|
6180
|
+
});
|
|
6181
|
+
var linkHandlerSchema = z.object({
|
|
6182
|
+
regexPattern: z.string(),
|
|
6183
|
+
action: actionSchema
|
|
6184
|
+
});
|
|
6185
|
+
var actionResponseBodySchema = z.object({
|
|
6186
|
+
action: actionSchema
|
|
6187
|
+
});
|
|
6180
6188
|
var searchResultSearchSchema = z.object({
|
|
6181
6189
|
type: z.literal("search"),
|
|
6182
6190
|
title: z.string(),
|
|
@@ -6193,20 +6201,6 @@ var searchResultActionSchema = z.object({
|
|
|
6193
6201
|
image: imageLayoutSchema.optional(),
|
|
6194
6202
|
value: actionSchema
|
|
6195
6203
|
});
|
|
6196
|
-
var actionResponseBodySchema = z.object({
|
|
6197
|
-
action: actionSchema
|
|
6198
|
-
});
|
|
6199
|
-
var errorResponseBodySchema = z.object({
|
|
6200
|
-
refreshFormUrl: z.string().optional(),
|
|
6201
|
-
analytics: z.record(z.string()).optional(),
|
|
6202
|
-
error: z.string().optional(),
|
|
6203
|
-
validation: jsonElementSchema.optional(),
|
|
6204
|
-
refreshUrl: z.string().optional()
|
|
6205
|
-
});
|
|
6206
|
-
var linkHandlerSchema = z.object({
|
|
6207
|
-
regexPattern: z.string(),
|
|
6208
|
-
action: actionSchema
|
|
6209
|
-
});
|
|
6210
6204
|
var pollingOnErrorSchema = z.object({
|
|
6211
6205
|
action: actionSchema
|
|
6212
6206
|
});
|
|
@@ -6214,33 +6208,33 @@ var navigationBackBehaviorSchema = z.object({
|
|
|
6214
6208
|
title: z.string().optional(),
|
|
6215
6209
|
action: actionSchema
|
|
6216
6210
|
});
|
|
6217
|
-
var
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
var alertLayoutCallToActionSchema = z.object({
|
|
6222
|
-
title: z.string(),
|
|
6223
|
-
accessibilityDescription: z.string().optional(),
|
|
6224
|
-
behavior: behaviorSchema
|
|
6225
|
-
});
|
|
6226
|
-
var listLayoutSchema = z.object({
|
|
6227
|
-
type: z.literal("list"),
|
|
6228
|
-
items: z.array(listLayoutItemSchema),
|
|
6229
|
-
title: z.string().optional(),
|
|
6230
|
-
control: z.string().optional(),
|
|
6231
|
-
margin: sizeSchema.optional()
|
|
6232
|
-
});
|
|
6233
|
-
var decisionLayoutSchema = z.object({
|
|
6234
|
-
type: z.literal("decision"),
|
|
6211
|
+
var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
6212
|
+
var buttonLayoutSchema = z.object({
|
|
6213
|
+
type: z.literal("button"),
|
|
6214
|
+
size: sizeSchema.optional(),
|
|
6235
6215
|
title: z.string().optional(),
|
|
6236
|
-
|
|
6216
|
+
action: actionSchema,
|
|
6217
|
+
context: contextSchema.optional(),
|
|
6218
|
+
disabled: z.boolean().optional(),
|
|
6219
|
+
pinOrder: z.number().optional(),
|
|
6237
6220
|
control: z.string().optional(),
|
|
6238
6221
|
margin: sizeSchema.optional()
|
|
6239
6222
|
});
|
|
6240
|
-
var
|
|
6223
|
+
var decisionLayoutOptionSchema = z.object({
|
|
6224
|
+
action: actionSchema,
|
|
6241
6225
|
title: z.string(),
|
|
6242
|
-
|
|
6243
|
-
|
|
6226
|
+
description: z.string().optional(),
|
|
6227
|
+
disabled: z.boolean().optional(),
|
|
6228
|
+
icon: iconSchema.optional(),
|
|
6229
|
+
image: imageLayoutSchema.optional()
|
|
6230
|
+
});
|
|
6231
|
+
var alertLayoutSchema = z.object({
|
|
6232
|
+
type: z.literal("alert"),
|
|
6233
|
+
markdown: z.string(),
|
|
6234
|
+
context: contextSchema.optional(),
|
|
6235
|
+
control: z.string().optional(),
|
|
6236
|
+
margin: sizeSchema.optional(),
|
|
6237
|
+
callToAction: alertLayoutCallToActionSchema.optional()
|
|
6244
6238
|
});
|
|
6245
6239
|
var reviewLayoutSchema = z.object({
|
|
6246
6240
|
type: z.literal("review"),
|
|
@@ -6252,27 +6246,16 @@ var reviewLayoutSchema = z.object({
|
|
|
6252
6246
|
control: z.string().optional(),
|
|
6253
6247
|
margin: sizeSchema.optional()
|
|
6254
6248
|
});
|
|
6255
|
-
var
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
timeout: z.number().optional(),
|
|
6261
|
-
maxAttempts: z.number(),
|
|
6262
|
-
onError: pollingOnErrorSchema
|
|
6263
|
-
});
|
|
6264
|
-
var navigationSchema = z.object({
|
|
6265
|
-
backButton: navigationBackBehaviorSchema.optional(),
|
|
6266
|
-
back: navigationBackBehaviorSchema.optional(),
|
|
6267
|
-
stackBehavior: navigationStackBehaviorSchema.optional()
|
|
6249
|
+
var listLayoutItemSchema = z.object({
|
|
6250
|
+
title: z.string(),
|
|
6251
|
+
description: z.string().optional(),
|
|
6252
|
+
icon: iconSchema,
|
|
6253
|
+
status: listLayoutStatusSchema.optional()
|
|
6268
6254
|
});
|
|
6269
|
-
var
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
control: z.string().optional(),
|
|
6274
|
-
margin: sizeSchema.optional(),
|
|
6275
|
-
callToAction: alertLayoutCallToActionSchema.optional()
|
|
6255
|
+
var itemCallToActionSchema = z.object({
|
|
6256
|
+
title: z.string(),
|
|
6257
|
+
accessibilityDescription: z.string().optional(),
|
|
6258
|
+
behavior: behaviorSchema
|
|
6276
6259
|
});
|
|
6277
6260
|
var statusListLayoutItemSchema = z.object({
|
|
6278
6261
|
title: z.string(),
|
|
@@ -6281,9 +6264,6 @@ var statusListLayoutItemSchema = z.object({
|
|
|
6281
6264
|
status: statusListLayoutStatusSchema.optional(),
|
|
6282
6265
|
callToAction: itemCallToActionSchema.optional()
|
|
6283
6266
|
});
|
|
6284
|
-
var searchResponseBodySchema = z.object({
|
|
6285
|
-
results: z.array(searchResultSchema)
|
|
6286
|
-
});
|
|
6287
6267
|
var blobSchemaSchema = z.object({
|
|
6288
6268
|
type: z.literal("blob"),
|
|
6289
6269
|
promoted: z.boolean().optional(),
|
|
@@ -6322,6 +6302,34 @@ var constSchemaSchema = z.object({
|
|
|
6322
6302
|
analyticsId: z.string().optional(),
|
|
6323
6303
|
disabled: z.boolean().optional()
|
|
6324
6304
|
});
|
|
6305
|
+
var pollingSchema = z.object({
|
|
6306
|
+
url: z.string(),
|
|
6307
|
+
interval: z.number().optional(),
|
|
6308
|
+
delay: z.number().optional(),
|
|
6309
|
+
timeout: z.number().optional(),
|
|
6310
|
+
maxAttempts: z.number(),
|
|
6311
|
+
onError: pollingOnErrorSchema
|
|
6312
|
+
});
|
|
6313
|
+
var navigationSchema = z.object({
|
|
6314
|
+
backButton: navigationBackBehaviorSchema.optional(),
|
|
6315
|
+
back: navigationBackBehaviorSchema.optional(),
|
|
6316
|
+
stackBehavior: navigationStackBehaviorSchema.optional()
|
|
6317
|
+
});
|
|
6318
|
+
var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
6319
|
+
var decisionLayoutSchema = z.object({
|
|
6320
|
+
type: z.literal("decision"),
|
|
6321
|
+
title: z.string().optional(),
|
|
6322
|
+
options: z.array(decisionLayoutOptionSchema),
|
|
6323
|
+
control: z.string().optional(),
|
|
6324
|
+
margin: sizeSchema.optional()
|
|
6325
|
+
});
|
|
6326
|
+
var listLayoutSchema = z.object({
|
|
6327
|
+
type: z.literal("list"),
|
|
6328
|
+
items: z.array(listLayoutItemSchema),
|
|
6329
|
+
title: z.string().optional(),
|
|
6330
|
+
control: z.string().optional(),
|
|
6331
|
+
margin: sizeSchema.optional()
|
|
6332
|
+
});
|
|
6325
6333
|
var statusListLayoutSchema = z.object({
|
|
6326
6334
|
type: z.literal("status-list"),
|
|
6327
6335
|
items: z.array(statusListLayoutItemSchema),
|
|
@@ -6329,6 +6337,19 @@ var statusListLayoutSchema = z.object({
|
|
|
6329
6337
|
control: z.string().optional(),
|
|
6330
6338
|
margin: sizeSchema.optional()
|
|
6331
6339
|
});
|
|
6340
|
+
var searchResponseBodySchema = z.object({
|
|
6341
|
+
results: z.array(searchResultSchema)
|
|
6342
|
+
});
|
|
6343
|
+
var columnsLayoutSchema = z.lazy(
|
|
6344
|
+
() => z.object({
|
|
6345
|
+
type: z.literal("columns"),
|
|
6346
|
+
left: z.array(layoutSchema),
|
|
6347
|
+
right: z.array(layoutSchema),
|
|
6348
|
+
bias: columnsLayoutBiasSchema.optional(),
|
|
6349
|
+
control: z.string().optional(),
|
|
6350
|
+
margin: sizeSchema.optional()
|
|
6351
|
+
})
|
|
6352
|
+
);
|
|
6332
6353
|
var layoutSchema = z.lazy(
|
|
6333
6354
|
() => z.union([
|
|
6334
6355
|
alertLayoutSchema,
|
|
@@ -6352,26 +6373,6 @@ var layoutSchema = z.lazy(
|
|
|
6352
6373
|
statusListLayoutSchema
|
|
6353
6374
|
])
|
|
6354
6375
|
);
|
|
6355
|
-
var boxLayoutSchema = z.lazy(
|
|
6356
|
-
() => z.object({
|
|
6357
|
-
type: z.literal("box"),
|
|
6358
|
-
components: z.array(layoutSchema),
|
|
6359
|
-
width: sizeSchema.optional(),
|
|
6360
|
-
border: z.boolean().optional(),
|
|
6361
|
-
control: z.string().optional(),
|
|
6362
|
-
margin: sizeSchema.optional()
|
|
6363
|
-
})
|
|
6364
|
-
);
|
|
6365
|
-
var columnsLayoutSchema = z.lazy(
|
|
6366
|
-
() => z.object({
|
|
6367
|
-
type: z.literal("columns"),
|
|
6368
|
-
left: z.array(layoutSchema),
|
|
6369
|
-
right: z.array(layoutSchema),
|
|
6370
|
-
bias: columnsLayoutBiasSchema.optional(),
|
|
6371
|
-
control: z.string().optional(),
|
|
6372
|
-
margin: sizeSchema.optional()
|
|
6373
|
-
})
|
|
6374
|
-
);
|
|
6375
6376
|
var modalLayoutSchema = z.lazy(
|
|
6376
6377
|
() => z.object({
|
|
6377
6378
|
type: z.literal("modal"),
|
|
@@ -6387,25 +6388,14 @@ var modalLayoutContentSchema = z.lazy(
|
|
|
6387
6388
|
components: z.array(layoutSchema)
|
|
6388
6389
|
})
|
|
6389
6390
|
);
|
|
6390
|
-
var
|
|
6391
|
+
var boxLayoutSchema = z.lazy(
|
|
6391
6392
|
() => z.object({
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
schemas: z.array(schemaSchema),
|
|
6399
|
-
layout: z.array(layoutSchema),
|
|
6400
|
-
description: z.string().optional(),
|
|
6401
|
-
model: jsonElementSchema.optional(),
|
|
6402
|
-
external: externalSchema.optional(),
|
|
6403
|
-
polling: pollingSchema.optional(),
|
|
6404
|
-
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
6405
|
-
analytics: z.record(z.string()).optional(),
|
|
6406
|
-
errors: stepErrorSchema.optional(),
|
|
6407
|
-
navigation: navigationSchema.optional(),
|
|
6408
|
-
refreshUrl: z.string().optional()
|
|
6393
|
+
type: z.literal("box"),
|
|
6394
|
+
components: z.array(layoutSchema),
|
|
6395
|
+
width: sizeSchema.optional(),
|
|
6396
|
+
border: z.boolean().optional(),
|
|
6397
|
+
control: z.string().optional(),
|
|
6398
|
+
margin: sizeSchema.optional()
|
|
6409
6399
|
})
|
|
6410
6400
|
);
|
|
6411
6401
|
var schemaSchema = z.lazy(
|
|
@@ -6609,26 +6599,55 @@ var stringSchemaSchema = z.lazy(
|
|
|
6609
6599
|
title: z.string().optional(),
|
|
6610
6600
|
description: z.string().optional(),
|
|
6611
6601
|
control: z.string().optional(),
|
|
6612
|
-
default: z.string().optional(),
|
|
6602
|
+
default: z.string().optional(),
|
|
6603
|
+
hidden: z.boolean().optional(),
|
|
6604
|
+
disabled: z.boolean().optional(),
|
|
6605
|
+
icon: iconSchema.optional(),
|
|
6606
|
+
image: imageSchema.optional(),
|
|
6607
|
+
keywords: z.array(z.string()).optional(),
|
|
6608
|
+
summary: summaryProviderSchema.optional(),
|
|
6609
|
+
analyticsId: z.string().optional(),
|
|
6610
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
6611
|
+
refreshStepOnChange: z.boolean().optional(),
|
|
6612
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
6613
|
+
validationMessages: z.record(z.string()).optional(),
|
|
6614
|
+
alert: alertLayoutSchema.optional(),
|
|
6615
|
+
cameraConfig: jsonElementSchema.optional(),
|
|
6616
|
+
accepts: z.array(z.string()).optional(),
|
|
6617
|
+
maxSize: z.number().optional(),
|
|
6618
|
+
source: uploadSourceSchema.optional(),
|
|
6619
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
6620
|
+
autofillKey: z.string().optional(),
|
|
6621
|
+
help: helpSchema.optional()
|
|
6622
|
+
})
|
|
6623
|
+
);
|
|
6624
|
+
var persistAsyncSchema = z.lazy(
|
|
6625
|
+
() => z.object({
|
|
6626
|
+
param: z.string(),
|
|
6627
|
+
idProperty: z.string(),
|
|
6628
|
+
schema: schemaSchema,
|
|
6629
|
+
url: z.string(),
|
|
6630
|
+
method: httpMethodSchema
|
|
6631
|
+
})
|
|
6632
|
+
);
|
|
6633
|
+
var arraySchemaTupleSchema = z.lazy(
|
|
6634
|
+
() => z.object({
|
|
6635
|
+
type: z.literal("array"),
|
|
6636
|
+
promoted: z.boolean().optional(),
|
|
6637
|
+
$id: z.string().optional(),
|
|
6638
|
+
items: z.array(schemaSchema),
|
|
6639
|
+
title: z.string().optional(),
|
|
6640
|
+
description: z.string().optional(),
|
|
6641
|
+
control: z.string().optional(),
|
|
6613
6642
|
hidden: z.boolean().optional(),
|
|
6614
|
-
disabled: z.boolean().optional(),
|
|
6615
6643
|
icon: iconSchema.optional(),
|
|
6616
6644
|
image: imageSchema.optional(),
|
|
6617
6645
|
keywords: z.array(z.string()).optional(),
|
|
6618
6646
|
summary: summaryProviderSchema.optional(),
|
|
6619
6647
|
analyticsId: z.string().optional(),
|
|
6620
6648
|
persistAsync: persistAsyncSchema.optional(),
|
|
6621
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
6622
6649
|
validationAsync: validateAsyncSchema.optional(),
|
|
6623
|
-
|
|
6624
|
-
alert: alertLayoutSchema.optional(),
|
|
6625
|
-
cameraConfig: jsonElementSchema.optional(),
|
|
6626
|
-
accepts: z.array(z.string()).optional(),
|
|
6627
|
-
maxSize: z.number().optional(),
|
|
6628
|
-
source: uploadSourceSchema.optional(),
|
|
6629
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
6630
|
-
autofillKey: z.string().optional(),
|
|
6631
|
-
help: helpSchema.optional()
|
|
6650
|
+
alert: alertLayoutSchema.optional()
|
|
6632
6651
|
})
|
|
6633
6652
|
);
|
|
6634
6653
|
var arraySchemaListSchema = z.lazy(
|
|
@@ -6658,33 +6677,25 @@ var arraySchemaListSchema = z.lazy(
|
|
|
6658
6677
|
disabled: z.boolean().optional()
|
|
6659
6678
|
})
|
|
6660
6679
|
);
|
|
6661
|
-
var
|
|
6662
|
-
() => z.object({
|
|
6663
|
-
param: z.string(),
|
|
6664
|
-
idProperty: z.string(),
|
|
6665
|
-
schema: schemaSchema,
|
|
6666
|
-
url: z.string(),
|
|
6667
|
-
method: httpMethodSchema
|
|
6668
|
-
})
|
|
6669
|
-
);
|
|
6670
|
-
var arraySchemaTupleSchema = z.lazy(
|
|
6680
|
+
var stepSchema = z.lazy(
|
|
6671
6681
|
() => z.object({
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6682
|
+
key: z.string().optional(),
|
|
6683
|
+
type: z.string().optional(),
|
|
6684
|
+
actions: z.array(actionSchema).optional(),
|
|
6685
|
+
refreshFormUrl: z.string().optional(),
|
|
6686
|
+
id: z.string(),
|
|
6687
|
+
title: z.string(),
|
|
6688
|
+
schemas: z.array(schemaSchema),
|
|
6689
|
+
layout: z.array(layoutSchema),
|
|
6677
6690
|
description: z.string().optional(),
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
6687
|
-
alert: alertLayoutSchema.optional()
|
|
6691
|
+
model: jsonElementSchema.optional(),
|
|
6692
|
+
external: externalSchema.optional(),
|
|
6693
|
+
polling: pollingSchema.optional(),
|
|
6694
|
+
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
6695
|
+
analytics: z.record(z.string()).optional(),
|
|
6696
|
+
errors: stepErrorSchema.optional(),
|
|
6697
|
+
navigation: navigationSchema.optional(),
|
|
6698
|
+
refreshUrl: z.string().optional()
|
|
6688
6699
|
})
|
|
6689
6700
|
);
|
|
6690
6701
|
var validateStep = (step) => validate(step, stepSchema);
|
|
@@ -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: [
|
|
@@ -15809,6 +15860,102 @@ function RepeatableSchemaStep({
|
|
|
15809
15860
|
}
|
|
15810
15861
|
var RepeatableSchemaStep_default = RepeatableSchemaStep;
|
|
15811
15862
|
|
|
15863
|
+
// src/legacy/common/validators/schemas/one-of-preselection.ts
|
|
15864
|
+
function isValidStringSchema2(value, schema) {
|
|
15865
|
+
return !getStringValidationFailures(value, schema).length;
|
|
15866
|
+
}
|
|
15867
|
+
function isValidNumberSchema2(value, schema) {
|
|
15868
|
+
return !getNumberValidationFailures(value, schema).length;
|
|
15869
|
+
}
|
|
15870
|
+
function isValidIntegerSchema2(value, schema) {
|
|
15871
|
+
return !getIntegerValidationFailures(value, schema).length;
|
|
15872
|
+
}
|
|
15873
|
+
function isValidBooleanSchema2(value, schema) {
|
|
15874
|
+
return !getBooleanValidationFailures(value, schema).length;
|
|
15875
|
+
}
|
|
15876
|
+
function isValidConstSchema2(value, schema) {
|
|
15877
|
+
return !getConstValidationFailures(value, schema).length;
|
|
15878
|
+
}
|
|
15879
|
+
function isValidObjectSchema2(value, schema) {
|
|
15880
|
+
if (!isObject2(value) || schema.type !== "object" || !isObject2(schema.properties)) {
|
|
15881
|
+
return false;
|
|
15882
|
+
}
|
|
15883
|
+
const checks = Object.keys(schema.properties).map((propertyName) => {
|
|
15884
|
+
if (value[propertyName] === void 0) {
|
|
15885
|
+
return null;
|
|
15886
|
+
}
|
|
15887
|
+
return isObjectPropertyValid2(
|
|
15888
|
+
value[propertyName],
|
|
15889
|
+
schema.properties[propertyName],
|
|
15890
|
+
schema.required && schema.required.includes(propertyName)
|
|
15891
|
+
);
|
|
15892
|
+
});
|
|
15893
|
+
return !checks.some((check) => check === false) && checks.some((check) => check === true);
|
|
15894
|
+
}
|
|
15895
|
+
function isObjectPropertyValid2(propertyValue, propertySchema, isRequired) {
|
|
15896
|
+
if (propertySchema.hidden) {
|
|
15897
|
+
return true;
|
|
15898
|
+
}
|
|
15899
|
+
if (typeof propertyValue === "undefined") {
|
|
15900
|
+
return !isRequired;
|
|
15901
|
+
}
|
|
15902
|
+
return isValidSchemaForPreselection(propertyValue, propertySchema);
|
|
15903
|
+
}
|
|
15904
|
+
function isValidArraySchema2(value, schema) {
|
|
15905
|
+
if (schema.type !== "array" || !isObject2(schema.items)) {
|
|
15906
|
+
return false;
|
|
15907
|
+
}
|
|
15908
|
+
if (getArrayValidationFailures(value, schema).length > 0) {
|
|
15909
|
+
return false;
|
|
15910
|
+
}
|
|
15911
|
+
return Array.isArray(value) && isListArraySchema(schema) && // TupleArraySchema not yet supported
|
|
15912
|
+
value.map((item) => isValidSchemaForPreselection(item, schema.items)).every((valid) => valid);
|
|
15913
|
+
}
|
|
15914
|
+
function isValidOneOfSchema2(value, schema) {
|
|
15915
|
+
if (!isArray2(schema.oneOf)) {
|
|
15916
|
+
return false;
|
|
15917
|
+
}
|
|
15918
|
+
return schema.oneOf.some((childSchema) => isValidSchemaForPreselection(value, childSchema));
|
|
15919
|
+
}
|
|
15920
|
+
function isValidAllOfSchema2(value, schema) {
|
|
15921
|
+
if (!isArray2(schema.allOf)) {
|
|
15922
|
+
return false;
|
|
15923
|
+
}
|
|
15924
|
+
return schema.allOf.map((childSchema) => isValidSchemaForPreselection(value, childSchema)).every((valid) => valid);
|
|
15925
|
+
}
|
|
15926
|
+
function isValidBlobSchema2(value, schema) {
|
|
15927
|
+
return !getBlobValidationFailures(value, schema).length;
|
|
15928
|
+
}
|
|
15929
|
+
function isValidSchemaForPreselection(value, schema) {
|
|
15930
|
+
if (schema.oneOf) {
|
|
15931
|
+
return isValidOneOfSchema2(value, schema);
|
|
15932
|
+
}
|
|
15933
|
+
if (schema.allOf) {
|
|
15934
|
+
return isValidAllOfSchema2(value, schema);
|
|
15935
|
+
}
|
|
15936
|
+
if (schema.const) {
|
|
15937
|
+
return isValidConstSchema2(value, schema);
|
|
15938
|
+
}
|
|
15939
|
+
switch (schema.type) {
|
|
15940
|
+
case "string":
|
|
15941
|
+
return isValidStringSchema2(value, schema);
|
|
15942
|
+
case "number":
|
|
15943
|
+
return isValidNumberSchema2(value, schema);
|
|
15944
|
+
case "integer":
|
|
15945
|
+
return isValidIntegerSchema2(value, schema);
|
|
15946
|
+
case "boolean":
|
|
15947
|
+
return isValidBooleanSchema2(value, schema);
|
|
15948
|
+
case "array":
|
|
15949
|
+
return isValidArraySchema2(value, schema);
|
|
15950
|
+
case "object":
|
|
15951
|
+
return isValidObjectSchema2(value, schema);
|
|
15952
|
+
case "blob":
|
|
15953
|
+
return isValidBlobSchema2(value, schema);
|
|
15954
|
+
default:
|
|
15955
|
+
return false;
|
|
15956
|
+
}
|
|
15957
|
+
}
|
|
15958
|
+
|
|
15812
15959
|
// src/legacy/jsonSchemaForm/oneOfSchema/utils.ts
|
|
15813
15960
|
var getActiveSchemaIndex = (schema, model) => {
|
|
15814
15961
|
const indexFromModel = getValidIndexFromValue(schema, model);
|
|
@@ -15830,8 +15977,18 @@ var getActiveSchemaIndex = (schema, model) => {
|
|
|
15830
15977
|
if (isOneOfObjectSchema(schema) && !isUndefined3(schema.default) && isObjectModel2(schema.default) && Object.keys(schema.default).length >= 1) {
|
|
15831
15978
|
return getBestMatchingSchemaIndexForValue(schema, schema.default);
|
|
15832
15979
|
}
|
|
15980
|
+
if (schema.oneOf.every((s) => isOneOfObjectSchema(s) || isObjectSchema2(s) || isAllOfSchema2(s)) && isObjectModel2(model) && Object.keys(model).length >= 1) {
|
|
15981
|
+
return getValidIndexFromValueForPreselection(schema, model);
|
|
15982
|
+
}
|
|
15833
15983
|
return null;
|
|
15834
15984
|
};
|
|
15985
|
+
var getValidIndexFromValueForPreselection = (schema, value) => {
|
|
15986
|
+
const predicate = (childSchema) => !isUndefined3(value) && isValidSchemaForPreselection(value, childSchema);
|
|
15987
|
+
if (schema.oneOf.filter(predicate).length === 1) {
|
|
15988
|
+
return schema.oneOf.findIndex(predicate);
|
|
15989
|
+
}
|
|
15990
|
+
return -1;
|
|
15991
|
+
};
|
|
15835
15992
|
var getValidIndexFromValue = (schema, value) => {
|
|
15836
15993
|
const predicate = (childSchema) => !isUndefined3(value) && isValidSchema(value, childSchema);
|
|
15837
15994
|
if (schema.oneOf.filter(predicate).length === 1) {
|
|
@@ -16059,7 +16216,7 @@ function RepeatableSchema({
|
|
|
16059
16216
|
setEditableItem({ item: null, model: null });
|
|
16060
16217
|
setOpenModalType(null);
|
|
16061
16218
|
};
|
|
16062
|
-
const { formatMessage } =
|
|
16219
|
+
const { formatMessage } = useIntl16();
|
|
16063
16220
|
const validations = getValidationFailures(model, schema, required);
|
|
16064
16221
|
const base64ValidationMessages = useFormattedDefaultErrorMessages({
|
|
16065
16222
|
minItems: schema.minItems,
|
|
@@ -16265,11 +16422,11 @@ import { useEffect as useEffect12, useMemo as useMemo15, useState as useState18
|
|
|
16265
16422
|
|
|
16266
16423
|
// src/legacy/jsonSchemaForm/help/Help.tsx
|
|
16267
16424
|
import { Markdown as Markdown6, Info as Info2 } from "@transferwise/components";
|
|
16268
|
-
import { useIntl as
|
|
16425
|
+
import { useIntl as useIntl17 } from "react-intl";
|
|
16269
16426
|
|
|
16270
16427
|
// src/common/messages/help.messages.ts
|
|
16271
|
-
import { defineMessages as
|
|
16272
|
-
var help_messages_default2 =
|
|
16428
|
+
import { defineMessages as defineMessages16 } from "react-intl";
|
|
16429
|
+
var help_messages_default2 = defineMessages16({
|
|
16273
16430
|
helpAria: {
|
|
16274
16431
|
id: "dynamicFlows.Help.ariaLabel",
|
|
16275
16432
|
defaultMessage: "Click here for more info.",
|
|
@@ -16280,7 +16437,7 @@ var help_messages_default2 = defineMessages15({
|
|
|
16280
16437
|
// src/legacy/jsonSchemaForm/help/Help.tsx
|
|
16281
16438
|
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
16282
16439
|
function Help2(props) {
|
|
16283
|
-
const intl =
|
|
16440
|
+
const intl = useIntl17();
|
|
16284
16441
|
return /* @__PURE__ */ jsx88(
|
|
16285
16442
|
Info2,
|
|
16286
16443
|
{
|
|
@@ -16296,7 +16453,7 @@ var Help_default2 = Help2;
|
|
|
16296
16453
|
|
|
16297
16454
|
// src/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.tsx
|
|
16298
16455
|
import { useEffect as useEffect11 } from "react";
|
|
16299
|
-
import { useIntl as
|
|
16456
|
+
import { useIntl as useIntl18 } from "react-intl";
|
|
16300
16457
|
|
|
16301
16458
|
// src/legacy/formControl/FormControl.tsx
|
|
16302
16459
|
import {
|
|
@@ -17014,7 +17171,7 @@ function SchemaFormControl(props) {
|
|
|
17014
17171
|
labelledBy
|
|
17015
17172
|
} = props;
|
|
17016
17173
|
const log = useLogger();
|
|
17017
|
-
const intl =
|
|
17174
|
+
const intl = useIntl18();
|
|
17018
17175
|
const getSanitisedValue = (value2) => isNativeInput(schema.type) && (isNull3(value2) || isUndefined3(value2)) ? "" : value2;
|
|
17019
17176
|
const onModelChange = (value2, type, metadata) => {
|
|
17020
17177
|
onChange(getValidBasicModelOrNull(value2, schema), type, metadata);
|
|
@@ -17251,7 +17408,7 @@ var OneOfSchema_default = OneOfSchema;
|
|
|
17251
17408
|
// src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.tsx
|
|
17252
17409
|
var import_classnames12 = __toESM(require_classnames());
|
|
17253
17410
|
import { useEffect as useEffect13, useState as useState19 } from "react";
|
|
17254
|
-
import { useIntl as
|
|
17411
|
+
import { useIntl as useIntl19 } from "react-intl";
|
|
17255
17412
|
|
|
17256
17413
|
// src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.tsx
|
|
17257
17414
|
import { Status as Status2, UploadInput as UploadInput4 } from "@transferwise/components";
|
|
@@ -17318,7 +17475,7 @@ function PersistAsyncBlobSchema(props) {
|
|
|
17318
17475
|
const [persistAsyncValidations, setPersistAsyncValidations] = useState19(null);
|
|
17319
17476
|
const [validations, setValidations] = useState19([]);
|
|
17320
17477
|
const [changed, setChanged] = useState19(false);
|
|
17321
|
-
const intl =
|
|
17478
|
+
const intl = useIntl19();
|
|
17322
17479
|
const httpClient = useHttpClient();
|
|
17323
17480
|
const onEvent = useEventDispatcher();
|
|
17324
17481
|
useEffect13(() => {
|
|
@@ -17557,11 +17714,11 @@ var PromotedOneOfSchema_default = PromotedOneOfSchema;
|
|
|
17557
17714
|
|
|
17558
17715
|
// src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.tsx
|
|
17559
17716
|
import { DefinitionList as DefinitionList2, Layout } from "@transferwise/components";
|
|
17560
|
-
import { useIntl as
|
|
17717
|
+
import { useIntl as useIntl20 } from "react-intl";
|
|
17561
17718
|
|
|
17562
17719
|
// src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.ts
|
|
17563
|
-
import { defineMessages as
|
|
17564
|
-
var ReadOnlySchema_messages_default =
|
|
17720
|
+
import { defineMessages as defineMessages17 } from "react-intl";
|
|
17721
|
+
var ReadOnlySchema_messages_default = defineMessages17({
|
|
17565
17722
|
yes: {
|
|
17566
17723
|
id: "dynamicFlows.ReadOnlySchema.yes",
|
|
17567
17724
|
defaultMessage: "Yes",
|
|
@@ -17578,7 +17735,7 @@ var ReadOnlySchema_messages_default = defineMessages16({
|
|
|
17578
17735
|
import { Fragment as Fragment18, jsx as jsx99, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
17579
17736
|
function ReadOnlySchema({ schema, model }) {
|
|
17580
17737
|
const { title = "" } = schema;
|
|
17581
|
-
const { formatMessage } =
|
|
17738
|
+
const { formatMessage } = useIntl20();
|
|
17582
17739
|
const value = getValueForSchema({ schema, model, formatMessage });
|
|
17583
17740
|
return /* @__PURE__ */ jsx99(DefinitionList2, { layout: Layout.VERTICAL_ONE_COLUMN, definitions: [{ title, value, key: "" }] });
|
|
17584
17741
|
}
|
|
@@ -18106,11 +18263,11 @@ var DynamicLoadingIndicator_default = DynamicLoadingIndicator;
|
|
|
18106
18263
|
|
|
18107
18264
|
// src/legacy/layout/paragraph/DynamicParagraph.tsx
|
|
18108
18265
|
import { Button as Button9 } from "@transferwise/components";
|
|
18109
|
-
import { useIntl as
|
|
18266
|
+
import { useIntl as useIntl21 } from "react-intl";
|
|
18110
18267
|
|
|
18111
18268
|
// src/common/messages/paragraph.messages.ts
|
|
18112
|
-
import { defineMessages as
|
|
18113
|
-
var paragraph_messages_default2 =
|
|
18269
|
+
import { defineMessages as defineMessages18 } from "react-intl";
|
|
18270
|
+
var paragraph_messages_default2 = defineMessages18({
|
|
18114
18271
|
copy: {
|
|
18115
18272
|
id: "dynamicFlows.DynamicParagraph.copy",
|
|
18116
18273
|
defaultMessage: "Copy",
|
|
@@ -18142,7 +18299,7 @@ function BasicDynamicParagraph({ component }) {
|
|
|
18142
18299
|
return /* @__PURE__ */ jsx110("p", { className: `np-text-body-large ${getTextAlignmentAndMargin2(component)}`, children: component.text });
|
|
18143
18300
|
}
|
|
18144
18301
|
function CopyableDynamicParagraph({ component }) {
|
|
18145
|
-
const { formatMessage } =
|
|
18302
|
+
const { formatMessage } = useIntl21();
|
|
18146
18303
|
const createSnackbar = useSnackBarIfAvailable2();
|
|
18147
18304
|
const { text } = component;
|
|
18148
18305
|
const copy = () => {
|
|
@@ -18257,7 +18414,7 @@ var SearchInput = ({ title, value, onFocus, onChange }) => {
|
|
|
18257
18414
|
|
|
18258
18415
|
// src/legacy/layout/search/SearchResults.tsx
|
|
18259
18416
|
import { NavigationOption as NavigationOption7, NavigationOptionsList as NavigationOptionsList4 } from "@transferwise/components";
|
|
18260
|
-
import { useIntl as
|
|
18417
|
+
import { useIntl as useIntl22 } from "react-intl";
|
|
18261
18418
|
import { jsx as jsx113, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
18262
18419
|
function SearchResults2({ results, emptyMessage, onSelect }) {
|
|
18263
18420
|
if (results.length === 0) {
|
|
@@ -18277,7 +18434,7 @@ function SearchResults2({ results, emptyMessage, onSelect }) {
|
|
|
18277
18434
|
)) });
|
|
18278
18435
|
}
|
|
18279
18436
|
function ErrorResult2({ onRetrySearch }) {
|
|
18280
|
-
const intl =
|
|
18437
|
+
const intl = useIntl22();
|
|
18281
18438
|
return /* @__PURE__ */ jsxs42("p", { className: "m-t-2", children: [
|
|
18282
18439
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
18283
18440
|
"\xA0",
|
|
@@ -18367,12 +18524,24 @@ var addQueryParameter2 = (url, key, value) => {
|
|
|
18367
18524
|
// src/legacy/layout/search/DynamicSearch.tsx
|
|
18368
18525
|
var import_classnames14 = __toESM(require_classnames());
|
|
18369
18526
|
import { Markdown as Markdown8, Typeahead as Typeahead2 } from "@transferwise/components";
|
|
18370
|
-
import { useIntl as
|
|
18527
|
+
import { useIntl as useIntl23 } from "react-intl";
|
|
18528
|
+
|
|
18529
|
+
// src/common/messages/search.messages.ts
|
|
18530
|
+
import { defineMessages as defineMessages19 } from "react-intl";
|
|
18531
|
+
var search_messages_default2 = defineMessages19({
|
|
18532
|
+
loading: {
|
|
18533
|
+
id: "dynamicFlows.SearchLayout.loading",
|
|
18534
|
+
defaultMessage: "Loading...",
|
|
18535
|
+
description: "A message shown to the user while their search is being processed, before results appear."
|
|
18536
|
+
}
|
|
18537
|
+
});
|
|
18538
|
+
|
|
18539
|
+
// src/legacy/layout/search/DynamicSearch.tsx
|
|
18371
18540
|
import { jsx as jsx114, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
18372
18541
|
var DEBOUNCE_TIME2 = 400;
|
|
18373
18542
|
function DynamicSearch({ component, onAction }) {
|
|
18374
18543
|
const [query, setQuery] = useState24("");
|
|
18375
|
-
const intl =
|
|
18544
|
+
const intl = useIntl23();
|
|
18376
18545
|
const { control, title, margin, url, method, param, emptyMessage } = component;
|
|
18377
18546
|
const { status, results, search } = useSearch({ url, method, param });
|
|
18378
18547
|
const onEvent = useEventDispatcher();
|
|
@@ -18404,6 +18573,7 @@ function DynamicSearch({ component, onAction }) {
|
|
|
18404
18573
|
setQuery(query);
|
|
18405
18574
|
void search(query);
|
|
18406
18575
|
};
|
|
18576
|
+
const loadingMessage = intl.formatMessage(search_messages_default2.loading);
|
|
18407
18577
|
if (control === "inline") {
|
|
18408
18578
|
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
18579
|
title,
|
|
@@ -18421,6 +18591,7 @@ function DynamicSearch({ component, onAction }) {
|
|
|
18421
18591
|
state: status,
|
|
18422
18592
|
results,
|
|
18423
18593
|
emptyMessage,
|
|
18594
|
+
loadingMessage,
|
|
18424
18595
|
onRetrySearch
|
|
18425
18596
|
}
|
|
18426
18597
|
),
|
|
@@ -18458,10 +18629,11 @@ function mapResultToTypeaheadOption2(result) {
|
|
|
18458
18629
|
};
|
|
18459
18630
|
}
|
|
18460
18631
|
function TypeaheadFooter2({
|
|
18632
|
+
emptyMessage,
|
|
18633
|
+
loadingMessage,
|
|
18461
18634
|
results,
|
|
18462
18635
|
state,
|
|
18463
|
-
onRetrySearch
|
|
18464
|
-
emptyMessage
|
|
18636
|
+
onRetrySearch
|
|
18465
18637
|
}) {
|
|
18466
18638
|
if (state === "success" && results.length === 0) {
|
|
18467
18639
|
return /* @__PURE__ */ jsx114(Markdown8, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: emptyMessage });
|
|
@@ -18470,7 +18642,7 @@ function TypeaheadFooter2({
|
|
|
18470
18642
|
return /* @__PURE__ */ jsx114("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx114(ErrorResult2, { onRetrySearch }) });
|
|
18471
18643
|
}
|
|
18472
18644
|
if (state === "loading" || results.length === 0) {
|
|
18473
|
-
return /* @__PURE__ */ jsx114("p", { className: "m-t-2 m-x-2", children:
|
|
18645
|
+
return /* @__PURE__ */ jsx114("p", { className: "m-t-2 m-x-2", children: loadingMessage });
|
|
18474
18646
|
}
|
|
18475
18647
|
return null;
|
|
18476
18648
|
}
|
|
@@ -18646,7 +18818,7 @@ var controlTypesWithPersistOnChange = /* @__PURE__ */ new Set([
|
|
|
18646
18818
|
]);
|
|
18647
18819
|
function PersistAsyncBasicSchema(props) {
|
|
18648
18820
|
const { schema, required = false, submitted, errors, onChange, onPersistAsync } = props;
|
|
18649
|
-
const intl =
|
|
18821
|
+
const intl = useIntl24();
|
|
18650
18822
|
const httpClient = useHttpClient();
|
|
18651
18823
|
const onEvent = useEventDispatcher();
|
|
18652
18824
|
const [persistAsyncModel, setPersistAsyncModel] = useState27(null);
|
|
@@ -18741,7 +18913,7 @@ var PersistAsyncBasicSchema_default = PersistAsyncBasicSchema;
|
|
|
18741
18913
|
var usePersistAsync = (persistAsync) => {
|
|
18742
18914
|
const [abortController, setAbortController] = useState28(null);
|
|
18743
18915
|
const httpClient = useHttpClient();
|
|
18744
|
-
const intl =
|
|
18916
|
+
const intl = useIntl25();
|
|
18745
18917
|
const { schema } = persistAsync;
|
|
18746
18918
|
async function handlePersistAsync(model) {
|
|
18747
18919
|
const isInvalidSchema = model instanceof Blob ? !isBlobSchema2(schema) : !isValidSchema(model, schema);
|
|
@@ -18974,12 +19146,12 @@ import { useEffect as useEffect25, useState as useState31 } from "react";
|
|
|
18974
19146
|
|
|
18975
19147
|
// src/common/cameraCapture/CameraCapture.tsx
|
|
18976
19148
|
import { useCallback as useCallback10, useEffect as useEffect24, useMemo as useMemo21, useRef as useRef8, useState as useState30 } from "react";
|
|
18977
|
-
import { useIntl as
|
|
19149
|
+
import { useIntl as useIntl28 } from "react-intl";
|
|
18978
19150
|
import Webcam from "react-webcam";
|
|
18979
19151
|
|
|
18980
19152
|
// src/common/cameraCapture/CameraCapture.messages.ts
|
|
18981
|
-
import { defineMessages as
|
|
18982
|
-
var CameraCapture_messages_default =
|
|
19153
|
+
import { defineMessages as defineMessages20 } from "react-intl";
|
|
19154
|
+
var CameraCapture_messages_default = defineMessages20({
|
|
18983
19155
|
reviewSubmit: {
|
|
18984
19156
|
id: "dynamicFlows.CameraCapture.reviewSubmit",
|
|
18985
19157
|
defaultMessage: "Yes, submit",
|
|
@@ -19039,14 +19211,14 @@ var CameraCapture_messages_default = defineMessages18({
|
|
|
19039
19211
|
|
|
19040
19212
|
// src/common/cameraCapture/components/bottomBar/BottomBar.tsx
|
|
19041
19213
|
import { Button as Button11, ControlType, Priority, Size as Size3 } from "@transferwise/components";
|
|
19042
|
-
import { useIntl as
|
|
19214
|
+
import { useIntl as useIntl26 } from "react-intl";
|
|
19043
19215
|
import { jsx as jsx119, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
19044
19216
|
var CaptureBottomBar = ({ onCapture }) => /* @__PURE__ */ jsx119("div", { className: "bottom-bar", children: /* @__PURE__ */ jsx119(CaptureButton, { onClick: onCapture }) });
|
|
19045
19217
|
var ReviewBottomBar = ({
|
|
19046
19218
|
onSubmit,
|
|
19047
19219
|
onRetry
|
|
19048
19220
|
}) => {
|
|
19049
|
-
const intl =
|
|
19221
|
+
const intl = useIntl26();
|
|
19050
19222
|
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
19223
|
/* @__PURE__ */ jsx119(
|
|
19052
19224
|
Button11,
|
|
@@ -19085,11 +19257,11 @@ var CaptureButton = ({ onClick }) => /* @__PURE__ */ jsx119(
|
|
|
19085
19257
|
);
|
|
19086
19258
|
|
|
19087
19259
|
// src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
|
|
19088
|
-
import { useIntl as
|
|
19260
|
+
import { useIntl as useIntl27 } from "react-intl";
|
|
19089
19261
|
|
|
19090
19262
|
// src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.ts
|
|
19091
|
-
import { defineMessages as
|
|
19092
|
-
var OrientationLockOverlay_messages_default =
|
|
19263
|
+
import { defineMessages as defineMessages21 } from "react-intl";
|
|
19264
|
+
var OrientationLockOverlay_messages_default = defineMessages21({
|
|
19093
19265
|
text: {
|
|
19094
19266
|
id: "dynamicFlows.CameraCapture.rotatePhone.text",
|
|
19095
19267
|
defaultMessage: "Rotate your phone to portrait view to take a photo",
|
|
@@ -19100,7 +19272,7 @@ var OrientationLockOverlay_messages_default = defineMessages19({
|
|
|
19100
19272
|
// src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
|
|
19101
19273
|
import { jsx as jsx120, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
19102
19274
|
function OrientationLockOverlay() {
|
|
19103
|
-
const intl =
|
|
19275
|
+
const intl = useIntl27();
|
|
19104
19276
|
return /* @__PURE__ */ jsxs47("div", { className: "orientation-lock-overlay", children: [
|
|
19105
19277
|
/* @__PURE__ */ jsx120(
|
|
19106
19278
|
"img",
|
|
@@ -19390,7 +19562,7 @@ function CameraCapture({
|
|
|
19390
19562
|
shouldLockOrientation,
|
|
19391
19563
|
onEvent
|
|
19392
19564
|
);
|
|
19393
|
-
const intl =
|
|
19565
|
+
const intl = useIntl28();
|
|
19394
19566
|
const handleCapture = useCallback10(async () => {
|
|
19395
19567
|
var _a, _b, _c, _d, _e, _f;
|
|
19396
19568
|
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 +19785,11 @@ function getFirstAction(step) {
|
|
|
19613
19785
|
}
|
|
19614
19786
|
|
|
19615
19787
|
// src/legacy/step/externalConfirmationStep/ExternalConfirmationStep.tsx
|
|
19616
|
-
import { useIntl as
|
|
19788
|
+
import { useIntl as useIntl29 } from "react-intl";
|
|
19617
19789
|
|
|
19618
19790
|
// src/common/messages/external-confirmation.messages.ts
|
|
19619
|
-
import { defineMessages as
|
|
19620
|
-
var external_confirmation_messages_default2 =
|
|
19791
|
+
import { defineMessages as defineMessages22 } from "react-intl";
|
|
19792
|
+
var external_confirmation_messages_default2 = defineMessages22({
|
|
19621
19793
|
title: {
|
|
19622
19794
|
id: "dynamicFlows.ExternalConfirmation.title",
|
|
19623
19795
|
defaultMessage: "Please confirm",
|
|
@@ -19645,7 +19817,7 @@ import { jsx as jsx125 } from "react/jsx-runtime";
|
|
|
19645
19817
|
var noop6 = () => {
|
|
19646
19818
|
};
|
|
19647
19819
|
function ExternalConfirmationStep({ url, onClose }) {
|
|
19648
|
-
const { formatMessage } =
|
|
19820
|
+
const { formatMessage } = useIntl29();
|
|
19649
19821
|
return /* @__PURE__ */ jsx125(
|
|
19650
19822
|
DynamicLayout_default,
|
|
19651
19823
|
{
|
|
@@ -20018,9 +20190,9 @@ var assertResponseIsValid2 = (response) => {
|
|
|
20018
20190
|
var isResponse2 = (response) => typeof response === "object" && response !== null && "clone" in response && "bodyUsed" in response;
|
|
20019
20191
|
|
|
20020
20192
|
// src/legacy/dynamicFlow/utils/useErrorResponse.tsx
|
|
20021
|
-
import { useIntl as
|
|
20193
|
+
import { useIntl as useIntl30 } from "react-intl";
|
|
20022
20194
|
var useErrorResponse = () => {
|
|
20023
|
-
const { formatMessage } =
|
|
20195
|
+
const { formatMessage } = useIntl30();
|
|
20024
20196
|
return async (response, fetchType, isInitialRequest) => {
|
|
20025
20197
|
try {
|
|
20026
20198
|
const errorResponse = await parseErrorResponse(response);
|
|
@@ -20064,7 +20236,7 @@ var DynamicFlowComponent = ({
|
|
|
20064
20236
|
setSchemaModel
|
|
20065
20237
|
} = useDynamicFlowState(initialStep);
|
|
20066
20238
|
const [submitted, setSubmitted] = useState34(false);
|
|
20067
|
-
const { locale } =
|
|
20239
|
+
const { locale } = useIntl31();
|
|
20068
20240
|
const { isLoading, loader, setLoadingState } = useLoader(
|
|
20069
20241
|
loaderConfig,
|
|
20070
20242
|
initialStep ? "idle" : "initial"
|