@wise/dynamic-flow-client 3.6.2 → 3.7.0
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/main.js +873 -1309
- package/build/main.min.js +1 -1
- package/build/main.mjs +164 -600
- package/package.json +4 -4
package/build/main.mjs
CHANGED
|
@@ -34,9 +34,6 @@ var __objRest = (source, exclude) => {
|
|
|
34
34
|
}
|
|
35
35
|
return target;
|
|
36
36
|
};
|
|
37
|
-
var __esm = (fn, res) => function __init() {
|
|
38
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
39
|
-
};
|
|
40
37
|
var __commonJS = (cb, mod) => function __require() {
|
|
41
38
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
42
39
|
};
|
|
@@ -118,152 +115,6 @@ var require_classnames = __commonJS({
|
|
|
118
115
|
}
|
|
119
116
|
});
|
|
120
117
|
|
|
121
|
-
// ../../node_modules/.pnpm/clsx@2.0.0/node_modules/clsx/dist/clsx.mjs
|
|
122
|
-
function r(e) {
|
|
123
|
-
var t, f, n = "";
|
|
124
|
-
if ("string" == typeof e || "number" == typeof e)
|
|
125
|
-
n += e;
|
|
126
|
-
else if ("object" == typeof e)
|
|
127
|
-
if (Array.isArray(e))
|
|
128
|
-
for (t = 0; t < e.length; t++)
|
|
129
|
-
e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
130
|
-
else
|
|
131
|
-
for (t in e)
|
|
132
|
-
e[t] && (n && (n += " "), n += t);
|
|
133
|
-
return n;
|
|
134
|
-
}
|
|
135
|
-
function clsx() {
|
|
136
|
-
for (var e, t, f = 0, n = ""; f < arguments.length; )
|
|
137
|
-
(e = arguments[f++]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
138
|
-
return n;
|
|
139
|
-
}
|
|
140
|
-
var init_clsx = __esm({
|
|
141
|
-
"../../node_modules/.pnpm/clsx@2.0.0/node_modules/clsx/dist/clsx.mjs"() {
|
|
142
|
-
"use strict";
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
// ../../node_modules/.pnpm/@wise+art@2.10.0_@transferwise+neptune-css@14.9.6_@types+react@18.0.29_react-dom@18.2.0_react@18.2.0/node_modules/@wise/art/dist/index-d9418379.esm.js
|
|
147
|
-
import { useState as useState5, useEffect as useEffect3, forwardRef, Suspense, lazy } from "react";
|
|
148
|
-
import { jsx as jsx20, jsxs as jsxs6, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
149
|
-
var unknownFlagName, Flag, Sizes, ImageSizes, imageSizes, Assets, RenderMode;
|
|
150
|
-
var init_index_d9418379_esm = __esm({
|
|
151
|
-
"../../node_modules/.pnpm/@wise+art@2.10.0_@transferwise+neptune-css@14.9.6_@types+react@18.0.29_react-dom@18.2.0_react@18.2.0/node_modules/@wise/art/dist/index-d9418379.esm.js"() {
|
|
152
|
-
"use strict";
|
|
153
|
-
init_clsx();
|
|
154
|
-
unknownFlagName = "wise";
|
|
155
|
-
Flag = ({
|
|
156
|
-
code,
|
|
157
|
-
intrinsicSize = 64,
|
|
158
|
-
className = void 0
|
|
159
|
-
}) => {
|
|
160
|
-
const [fallback, setFallback] = useState5(null);
|
|
161
|
-
useEffect3(() => {
|
|
162
|
-
setFallback(null);
|
|
163
|
-
}, [code]);
|
|
164
|
-
const detailed = intrinsicSize >= 150;
|
|
165
|
-
const name = fallback !== "unknown" ? `${code.toLowerCase()}${fallback == null && detailed ? "-detailed" : ""}` : unknownFlagName;
|
|
166
|
-
return /* @__PURE__ */ jsx20("img", {
|
|
167
|
-
className: clsx(`wds-flag wds-flag-${name}`, className),
|
|
168
|
-
src: `https://wise.com/web-art/assets/flags/${name}.svg`,
|
|
169
|
-
alt: "",
|
|
170
|
-
width: intrinsicSize,
|
|
171
|
-
height: intrinsicSize,
|
|
172
|
-
onError: () => {
|
|
173
|
-
setFallback((prev) => prev == null && detailed ? "simple" : "unknown");
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
};
|
|
177
|
-
(function(Sizes2) {
|
|
178
|
-
Sizes2["SMALL"] = "small";
|
|
179
|
-
Sizes2["MEDIUM"] = "medium";
|
|
180
|
-
Sizes2["LARGE"] = "large";
|
|
181
|
-
})(Sizes || (Sizes = {}));
|
|
182
|
-
ImageSizes = {
|
|
183
|
-
[Sizes.SMALL]: 200,
|
|
184
|
-
[Sizes.MEDIUM]: 300,
|
|
185
|
-
[Sizes.LARGE]: 500
|
|
186
|
-
};
|
|
187
|
-
imageSizes = {
|
|
188
|
-
[Sizes.SMALL]: 200,
|
|
189
|
-
[Sizes.MEDIUM]: 300,
|
|
190
|
-
[Sizes.LARGE]: 500
|
|
191
|
-
};
|
|
192
|
-
(function(Assets2) {
|
|
193
|
-
Assets2["BELL"] = "bell";
|
|
194
|
-
Assets2["BRIEFCASE"] = "briefcase";
|
|
195
|
-
Assets2["BUSINESS_CARD"] = "business-card";
|
|
196
|
-
Assets2["CALENDAR"] = "calendar";
|
|
197
|
-
Assets2["CHECK_MARK"] = "check-mark";
|
|
198
|
-
Assets2["CLOSED_WINDOW"] = "closed-window";
|
|
199
|
-
Assets2["COIN_PILE_DOWN"] = "coin-pile-down";
|
|
200
|
-
Assets2["COIN_PILE_UP"] = "coin-pile-up";
|
|
201
|
-
Assets2["CONFETTI"] = "confetti";
|
|
202
|
-
Assets2["CONSTRUCTION_FENCE"] = "construction-fence";
|
|
203
|
-
Assets2["CONVERT"] = "convert";
|
|
204
|
-
Assets2["COOKIE"] = "cookie";
|
|
205
|
-
Assets2["DIGITAL_CARD_2"] = "digital-card-2";
|
|
206
|
-
Assets2["DIGITAL_CARD"] = "digital-card";
|
|
207
|
-
Assets2["DOCUMENTS"] = "documents";
|
|
208
|
-
Assets2["DOOR"] = "door";
|
|
209
|
-
Assets2["ECO_CARD"] = "eco-card";
|
|
210
|
-
Assets2["ELECTRIC_PLUG"] = "electric-plug";
|
|
211
|
-
Assets2["EMAIL_SUCCESS"] = "email-success";
|
|
212
|
-
Assets2["EMAIL"] = "email";
|
|
213
|
-
Assets2["EXCLAMATION_MARK"] = "exclamation-mark";
|
|
214
|
-
Assets2["FLAG"] = "flag";
|
|
215
|
-
Assets2["FLOWER"] = "flower";
|
|
216
|
-
Assets2["GEAR"] = "gear";
|
|
217
|
-
Assets2["GLOBE"] = "globe";
|
|
218
|
-
Assets2["GRAPH"] = "graph";
|
|
219
|
-
Assets2["HEART_2"] = "heart-2";
|
|
220
|
-
Assets2["HEART_3"] = "heart-3";
|
|
221
|
-
Assets2["HEART_4"] = "heart-4";
|
|
222
|
-
Assets2["HEART_5"] = "heart-5";
|
|
223
|
-
Assets2["HEART"] = "heart";
|
|
224
|
-
Assets2["HOUSE"] = "house";
|
|
225
|
-
Assets2["ID_CARD"] = "id-card";
|
|
226
|
-
Assets2["INFINITE"] = "infinite";
|
|
227
|
-
Assets2["INVITE_LETTER"] = "invite-letter";
|
|
228
|
-
Assets2["JARS"] = "jars";
|
|
229
|
-
Assets2["KEY"] = "key";
|
|
230
|
-
Assets2["LIGHT_BULB"] = "light-bulb";
|
|
231
|
-
Assets2["LOCK"] = "lock";
|
|
232
|
-
Assets2["MAGNIFYING_GLASS"] = "magnifying-glass";
|
|
233
|
-
Assets2["MAP"] = "map";
|
|
234
|
-
Assets2["MARBLE_CARD_BUSINESS"] = "marble-card-business";
|
|
235
|
-
Assets2["MARBLE_CARD"] = "marble-card";
|
|
236
|
-
Assets2["MARBLE"] = "marble";
|
|
237
|
-
Assets2["MEGAPHONE"] = "megaphone";
|
|
238
|
-
Assets2["MULTI_CURRENCY"] = "multi-currency";
|
|
239
|
-
Assets2["ONE_INVITE_LETTER_OPENED"] = "one-invite-letter-opened";
|
|
240
|
-
Assets2["PALM_TREE"] = "palm-tree";
|
|
241
|
-
Assets2["PERCENTAGE"] = "percentage";
|
|
242
|
-
Assets2["PERSONAL_CARD"] = "personal-card";
|
|
243
|
-
Assets2["PHONES"] = "phones";
|
|
244
|
-
Assets2["PIE_CHART"] = "pie-chart";
|
|
245
|
-
Assets2["PLANE_2"] = "plane-2";
|
|
246
|
-
Assets2["PLANE"] = "plane";
|
|
247
|
-
Assets2["PUZZLE_PIECES"] = "puzzle-pieces";
|
|
248
|
-
Assets2["QUESTION_MARK"] = "question-mark";
|
|
249
|
-
Assets2["RECEIVE"] = "receive";
|
|
250
|
-
Assets2["REMINDER_LETTER"] = "reminder-letter";
|
|
251
|
-
Assets2["SAND_TIMER"] = "sand-timer";
|
|
252
|
-
Assets2["SHOPPING_BAG"] = "shopping-bag";
|
|
253
|
-
Assets2["SKIP_AUTHENTICATION"] = "skip-authentication";
|
|
254
|
-
Assets2["SPEECH_BUBBLE"] = "speech-bubble";
|
|
255
|
-
Assets2["TOOL"] = "tool";
|
|
256
|
-
Assets2["TWO_INVITE_LETTERS_OPENED"] = "two-invite-letters-opened";
|
|
257
|
-
Assets2["WALLET"] = "wallet";
|
|
258
|
-
})(Assets || (Assets = {}));
|
|
259
|
-
(function(RenderMode2) {
|
|
260
|
-
RenderMode2[RenderMode2["INIT"] = 0] = "INIT";
|
|
261
|
-
RenderMode2[RenderMode2["FALLBACK"] = 1] = "FALLBACK";
|
|
262
|
-
RenderMode2[RenderMode2["ASSET_3D"] = 2] = "ASSET_3D";
|
|
263
|
-
})(RenderMode || (RenderMode = {}));
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
|
-
|
|
267
118
|
// ../../node_modules/.pnpm/screenfull@5.2.0/node_modules/screenfull/dist/screenfull.js
|
|
268
119
|
var require_screenfull = __commonJS({
|
|
269
120
|
"../../node_modules/.pnpm/screenfull@5.2.0/node_modules/screenfull/dist/screenfull.js"(exports, module) {
|
|
@@ -1787,212 +1638,124 @@ import { Alert } from "@transferwise/components";
|
|
|
1787
1638
|
// src/legacy/layout/utils/getNavigationOptionMedia.tsx
|
|
1788
1639
|
import { Avatar, AvatarType } from "@transferwise/components";
|
|
1789
1640
|
|
|
1641
|
+
// ../../node_modules/.pnpm/@wise+art@2.7.0_react-dom@18.2.0_react@18.2.0/node_modules/@wise/art/dist/index.esm.js
|
|
1642
|
+
import { useState as useState3, useEffect as useEffect2, forwardRef } from "react";
|
|
1643
|
+
import { jsx as jsx6, jsxs, Fragment } from "react/jsx-runtime";
|
|
1644
|
+
var unknownFlagName = "wise";
|
|
1645
|
+
var Flag = ({
|
|
1646
|
+
code,
|
|
1647
|
+
intrinsicSize = 64
|
|
1648
|
+
}) => {
|
|
1649
|
+
const [fallback, setFallback] = useState3(null);
|
|
1650
|
+
useEffect2(() => {
|
|
1651
|
+
setFallback(null);
|
|
1652
|
+
}, [code]);
|
|
1653
|
+
const detailed = intrinsicSize >= 150;
|
|
1654
|
+
const name = fallback !== "unknown" ? `${code.toLowerCase()}${fallback == null && detailed ? "-detailed" : ""}` : unknownFlagName;
|
|
1655
|
+
return /* @__PURE__ */ jsx6("img", {
|
|
1656
|
+
src: `https://wise.com/web-art/assets/flags/${name}.svg`,
|
|
1657
|
+
alt: "",
|
|
1658
|
+
width: intrinsicSize,
|
|
1659
|
+
height: intrinsicSize,
|
|
1660
|
+
onError: () => {
|
|
1661
|
+
setFallback((prev) => prev == null && detailed ? "simple" : "unknown");
|
|
1662
|
+
}
|
|
1663
|
+
});
|
|
1664
|
+
};
|
|
1665
|
+
var Sizes;
|
|
1666
|
+
(function(Sizes2) {
|
|
1667
|
+
Sizes2["SMALL"] = "small";
|
|
1668
|
+
Sizes2["MEDIUM"] = "medium";
|
|
1669
|
+
Sizes2["LARGE"] = "large";
|
|
1670
|
+
})(Sizes || (Sizes = {}));
|
|
1671
|
+
var imageSizes = {
|
|
1672
|
+
[Sizes.SMALL]: 200,
|
|
1673
|
+
[Sizes.MEDIUM]: 300,
|
|
1674
|
+
[Sizes.LARGE]: 500
|
|
1675
|
+
};
|
|
1676
|
+
var Assets;
|
|
1677
|
+
(function(Assets2) {
|
|
1678
|
+
Assets2["BELL"] = "bell";
|
|
1679
|
+
Assets2["BRIEFCASE"] = "briefcase";
|
|
1680
|
+
Assets2["BUSINESS_CARD"] = "business-card";
|
|
1681
|
+
Assets2["CALENDAR"] = "calendar";
|
|
1682
|
+
Assets2["CHECK_MARK"] = "check-mark";
|
|
1683
|
+
Assets2["CLOSED_WINDOW"] = "closed-window";
|
|
1684
|
+
Assets2["COIN_PILE_DOWN"] = "coin-pile-down";
|
|
1685
|
+
Assets2["COIN_PILE_UP"] = "coin-pile-up";
|
|
1686
|
+
Assets2["CONFETTI"] = "confetti";
|
|
1687
|
+
Assets2["CONSTRUCTION_FENCE"] = "construction-fence";
|
|
1688
|
+
Assets2["CONVERT"] = "convert";
|
|
1689
|
+
Assets2["COOKIE"] = "cookie";
|
|
1690
|
+
Assets2["DIGITAL_CARD_2"] = "digital-card-2";
|
|
1691
|
+
Assets2["DIGITAL_CARD"] = "digital-card";
|
|
1692
|
+
Assets2["DOCUMENTS"] = "documents";
|
|
1693
|
+
Assets2["DOOR"] = "door";
|
|
1694
|
+
Assets2["ECO_CARD"] = "eco-card";
|
|
1695
|
+
Assets2["ELECTRIC_PLUG"] = "electric-plug";
|
|
1696
|
+
Assets2["EMAIL_SUCCESS"] = "email-success";
|
|
1697
|
+
Assets2["EMAIL"] = "email";
|
|
1698
|
+
Assets2["EXCLAMATION_MARK"] = "exclamation-mark";
|
|
1699
|
+
Assets2["FLAG"] = "flag";
|
|
1700
|
+
Assets2["FLOWER"] = "flower";
|
|
1701
|
+
Assets2["GEAR"] = "gear";
|
|
1702
|
+
Assets2["GLOBE"] = "globe";
|
|
1703
|
+
Assets2["GRAPH"] = "graph";
|
|
1704
|
+
Assets2["HEART_2"] = "heart-2";
|
|
1705
|
+
Assets2["HEART_3"] = "heart-3";
|
|
1706
|
+
Assets2["HEART_4"] = "heart-4";
|
|
1707
|
+
Assets2["HEART_5"] = "heart-5";
|
|
1708
|
+
Assets2["HEART"] = "heart";
|
|
1709
|
+
Assets2["HOUSE"] = "house";
|
|
1710
|
+
Assets2["ID_CARD"] = "id-card";
|
|
1711
|
+
Assets2["INFINITE"] = "infinite";
|
|
1712
|
+
Assets2["INVITE_LETTER"] = "invite-letter";
|
|
1713
|
+
Assets2["JARS"] = "jars";
|
|
1714
|
+
Assets2["KEY"] = "key";
|
|
1715
|
+
Assets2["LIGHT_BULB"] = "light-bulb";
|
|
1716
|
+
Assets2["LOCK"] = "lock";
|
|
1717
|
+
Assets2["MAGNIFYING_GLASS"] = "magnifying-glass";
|
|
1718
|
+
Assets2["MAP"] = "map";
|
|
1719
|
+
Assets2["MARBLE_CARD_BUSINESS"] = "marble-card-business";
|
|
1720
|
+
Assets2["MARBLE_CARD"] = "marble-card";
|
|
1721
|
+
Assets2["MARBLE"] = "marble";
|
|
1722
|
+
Assets2["MEGAPHONE"] = "megaphone";
|
|
1723
|
+
Assets2["MULTI_CURRENCY"] = "multi-currency";
|
|
1724
|
+
Assets2["ONE_INVITE_LETTER_OPENED"] = "one-invite-letter-opened";
|
|
1725
|
+
Assets2["PALM_TREE"] = "palm-tree";
|
|
1726
|
+
Assets2["PERCENTAGE"] = "percentage";
|
|
1727
|
+
Assets2["PERSONAL_CARD"] = "personal-card";
|
|
1728
|
+
Assets2["PHONES"] = "phones";
|
|
1729
|
+
Assets2["PIE_CHART"] = "pie-chart";
|
|
1730
|
+
Assets2["PLANE_2"] = "plane-2";
|
|
1731
|
+
Assets2["PLANE"] = "plane";
|
|
1732
|
+
Assets2["PUZZLE_PIECES"] = "puzzle-pieces";
|
|
1733
|
+
Assets2["QUESTION_MARK"] = "question-mark";
|
|
1734
|
+
Assets2["RECEIVE"] = "receive";
|
|
1735
|
+
Assets2["REMINDER_LETTER"] = "reminder-letter";
|
|
1736
|
+
Assets2["SAND_TIMER"] = "sand-timer";
|
|
1737
|
+
Assets2["SHOPPING_BAG"] = "shopping-bag";
|
|
1738
|
+
Assets2["SKIP_AUTHENTICATION"] = "skip-authentication";
|
|
1739
|
+
Assets2["SPEECH_BUBBLE"] = "speech-bubble";
|
|
1740
|
+
Assets2["TOOL"] = "tool";
|
|
1741
|
+
Assets2["TWO_INVITE_LETTERS_OPENED"] = "two-invite-letters-opened";
|
|
1742
|
+
Assets2["WALLET"] = "wallet";
|
|
1743
|
+
})(Assets || (Assets = {}));
|
|
1744
|
+
|
|
1790
1745
|
// src/legacy/layout/icon/FlagIcon.tsx
|
|
1791
|
-
import { jsx as
|
|
1792
|
-
var isFlagIcon = (name) =>
|
|
1793
|
-
var isCurrencyFlagIcon = (name) => currencyCodes.some((currencyCode) => name === `flag-${currencyCode}`);
|
|
1794
|
-
var isCountryFlagIcon = (name) => countryCodes.some((countryCode) => name === `flag-${countryCode}`);
|
|
1746
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1747
|
+
var isFlagIcon = (name) => name.startsWith("flag-");
|
|
1795
1748
|
function FlagIcon({ name }) {
|
|
1796
1749
|
if (!isFlagIcon(name)) {
|
|
1797
1750
|
return null;
|
|
1798
1751
|
}
|
|
1799
1752
|
const code = name.substring(5);
|
|
1800
|
-
return /* @__PURE__ */
|
|
1801
|
-
"img",
|
|
1802
|
-
{
|
|
1803
|
-
src: `https://wise.com/web-art/assets/flags/${code}.svg`,
|
|
1804
|
-
alt: "",
|
|
1805
|
-
"data-testid": `img-flag-${code}`,
|
|
1806
|
-
width: "24px"
|
|
1807
|
-
}
|
|
1808
|
-
);
|
|
1753
|
+
return /* @__PURE__ */ jsx7(Flag, { intrinsicSize: 24, code });
|
|
1809
1754
|
}
|
|
1810
|
-
var currencyCodes = [
|
|
1811
|
-
"aed",
|
|
1812
|
-
"ars",
|
|
1813
|
-
"aud",
|
|
1814
|
-
"bdt",
|
|
1815
|
-
"bgn",
|
|
1816
|
-
"bhd",
|
|
1817
|
-
"bnd",
|
|
1818
|
-
"brl",
|
|
1819
|
-
"bwp",
|
|
1820
|
-
"cad",
|
|
1821
|
-
"chf",
|
|
1822
|
-
"clp",
|
|
1823
|
-
"cny",
|
|
1824
|
-
"cop",
|
|
1825
|
-
"crc",
|
|
1826
|
-
"czk",
|
|
1827
|
-
"dkk",
|
|
1828
|
-
"egp",
|
|
1829
|
-
"eur",
|
|
1830
|
-
"fjd",
|
|
1831
|
-
"gbp",
|
|
1832
|
-
"gel",
|
|
1833
|
-
"ghs",
|
|
1834
|
-
"gtq",
|
|
1835
|
-
"hkd",
|
|
1836
|
-
"hrk",
|
|
1837
|
-
"huf",
|
|
1838
|
-
"idr",
|
|
1839
|
-
"ils",
|
|
1840
|
-
"imp",
|
|
1841
|
-
"inr",
|
|
1842
|
-
"isk",
|
|
1843
|
-
"jmd",
|
|
1844
|
-
"jpy",
|
|
1845
|
-
"kes",
|
|
1846
|
-
"krw",
|
|
1847
|
-
"kwd",
|
|
1848
|
-
"lak",
|
|
1849
|
-
"lkr",
|
|
1850
|
-
"lsl",
|
|
1851
|
-
"mad",
|
|
1852
|
-
"mur",
|
|
1853
|
-
"mxn",
|
|
1854
|
-
"myr",
|
|
1855
|
-
"mzn",
|
|
1856
|
-
"nad",
|
|
1857
|
-
"ngn",
|
|
1858
|
-
"nok",
|
|
1859
|
-
"npr",
|
|
1860
|
-
"nzd",
|
|
1861
|
-
"omr",
|
|
1862
|
-
"pab",
|
|
1863
|
-
"pen",
|
|
1864
|
-
"php",
|
|
1865
|
-
"pkr",
|
|
1866
|
-
"pln",
|
|
1867
|
-
"qar",
|
|
1868
|
-
"ron",
|
|
1869
|
-
"rub",
|
|
1870
|
-
"sar",
|
|
1871
|
-
"sek",
|
|
1872
|
-
"sgd",
|
|
1873
|
-
"thb",
|
|
1874
|
-
"tmt",
|
|
1875
|
-
"try",
|
|
1876
|
-
"twd",
|
|
1877
|
-
"tzs",
|
|
1878
|
-
"uah",
|
|
1879
|
-
"ugx",
|
|
1880
|
-
"usd",
|
|
1881
|
-
"uyu",
|
|
1882
|
-
"vnd",
|
|
1883
|
-
"xof",
|
|
1884
|
-
"zar",
|
|
1885
|
-
"zmw"
|
|
1886
|
-
];
|
|
1887
|
-
var countryCodes = [
|
|
1888
|
-
"ad",
|
|
1889
|
-
"ae",
|
|
1890
|
-
"ar",
|
|
1891
|
-
"at",
|
|
1892
|
-
"au",
|
|
1893
|
-
"bd",
|
|
1894
|
-
"be",
|
|
1895
|
-
"bg",
|
|
1896
|
-
"bh",
|
|
1897
|
-
"bn",
|
|
1898
|
-
"br",
|
|
1899
|
-
"bw",
|
|
1900
|
-
"ca",
|
|
1901
|
-
"ch",
|
|
1902
|
-
"cl",
|
|
1903
|
-
"cn",
|
|
1904
|
-
"co",
|
|
1905
|
-
"cr",
|
|
1906
|
-
"cy",
|
|
1907
|
-
"cz",
|
|
1908
|
-
"de",
|
|
1909
|
-
"dk",
|
|
1910
|
-
"ee",
|
|
1911
|
-
"eg",
|
|
1912
|
-
"es",
|
|
1913
|
-
"eu",
|
|
1914
|
-
"fi",
|
|
1915
|
-
"fj",
|
|
1916
|
-
"fr",
|
|
1917
|
-
"gb",
|
|
1918
|
-
"ge",
|
|
1919
|
-
"gg",
|
|
1920
|
-
"gh",
|
|
1921
|
-
"gp",
|
|
1922
|
-
"gr",
|
|
1923
|
-
"gt",
|
|
1924
|
-
"hk",
|
|
1925
|
-
"hr",
|
|
1926
|
-
"hu",
|
|
1927
|
-
"id",
|
|
1928
|
-
"ie",
|
|
1929
|
-
"il",
|
|
1930
|
-
"im",
|
|
1931
|
-
"in",
|
|
1932
|
-
"is",
|
|
1933
|
-
"it",
|
|
1934
|
-
"je",
|
|
1935
|
-
"jm",
|
|
1936
|
-
"jp",
|
|
1937
|
-
"ke",
|
|
1938
|
-
"kr",
|
|
1939
|
-
"kw",
|
|
1940
|
-
"la",
|
|
1941
|
-
"li",
|
|
1942
|
-
"lk",
|
|
1943
|
-
"ls",
|
|
1944
|
-
"lt",
|
|
1945
|
-
"lu",
|
|
1946
|
-
"lv",
|
|
1947
|
-
"ma",
|
|
1948
|
-
"mc",
|
|
1949
|
-
"mt",
|
|
1950
|
-
"mu",
|
|
1951
|
-
"mx",
|
|
1952
|
-
"my",
|
|
1953
|
-
"mz",
|
|
1954
|
-
"na",
|
|
1955
|
-
"ng",
|
|
1956
|
-
"nl",
|
|
1957
|
-
"no",
|
|
1958
|
-
"np",
|
|
1959
|
-
"nz",
|
|
1960
|
-
"om",
|
|
1961
|
-
"pa",
|
|
1962
|
-
"pe",
|
|
1963
|
-
"ph",
|
|
1964
|
-
"pk",
|
|
1965
|
-
"pl",
|
|
1966
|
-
"pt",
|
|
1967
|
-
"qa",
|
|
1968
|
-
"ro",
|
|
1969
|
-
"ru",
|
|
1970
|
-
"sa",
|
|
1971
|
-
"se",
|
|
1972
|
-
"sg",
|
|
1973
|
-
"si",
|
|
1974
|
-
"sk",
|
|
1975
|
-
"sm",
|
|
1976
|
-
"th",
|
|
1977
|
-
"tm",
|
|
1978
|
-
"tr",
|
|
1979
|
-
"tw",
|
|
1980
|
-
"tz",
|
|
1981
|
-
"ua",
|
|
1982
|
-
"ug",
|
|
1983
|
-
"us",
|
|
1984
|
-
"uy",
|
|
1985
|
-
"va",
|
|
1986
|
-
"vn",
|
|
1987
|
-
"wi",
|
|
1988
|
-
"xo",
|
|
1989
|
-
"za",
|
|
1990
|
-
"zm"
|
|
1991
|
-
];
|
|
1992
1755
|
|
|
1993
1756
|
// src/legacy/layout/icon/NamedIcon.tsx
|
|
1994
1757
|
import * as icons from "@transferwise/icons";
|
|
1995
|
-
import { jsx as
|
|
1758
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
1996
1759
|
var isNamedIcon = (name) => {
|
|
1997
1760
|
const iconName = toCapitalisedCamelCase(name);
|
|
1998
1761
|
return Object.keys(icons).includes(iconName);
|
|
@@ -2003,19 +1766,19 @@ function NamedIcon({ name }) {
|
|
|
2003
1766
|
}
|
|
2004
1767
|
const iconName = toCapitalisedCamelCase(name);
|
|
2005
1768
|
const Icon = icons[iconName];
|
|
2006
|
-
return /* @__PURE__ */
|
|
1769
|
+
return /* @__PURE__ */ jsx8(Icon, { size: 24 });
|
|
2007
1770
|
}
|
|
2008
1771
|
var toCapitalisedCamelCase = (value) => value.split("-").map(capitaliseFirstChar).join("");
|
|
2009
1772
|
var capitaliseFirstChar = (value) => `${value[0].toUpperCase()}${value.slice(1)}`;
|
|
2010
1773
|
|
|
2011
1774
|
// src/legacy/layout/icon/DynamicIcon.tsx
|
|
2012
|
-
import { jsx as
|
|
1775
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
2013
1776
|
function DynamicIcon({ type }) {
|
|
2014
1777
|
if (isFlagIcon(type)) {
|
|
2015
|
-
return /* @__PURE__ */
|
|
1778
|
+
return /* @__PURE__ */ jsx9(FlagIcon, { name: type });
|
|
2016
1779
|
}
|
|
2017
1780
|
if (isNamedIcon(type)) {
|
|
2018
|
-
return /* @__PURE__ */
|
|
1781
|
+
return /* @__PURE__ */ jsx9(NamedIcon, { name: type });
|
|
2019
1782
|
}
|
|
2020
1783
|
return null;
|
|
2021
1784
|
}
|
|
@@ -2025,17 +1788,17 @@ function isValidIconName(name) {
|
|
|
2025
1788
|
var DynamicIcon_default = DynamicIcon;
|
|
2026
1789
|
|
|
2027
1790
|
// src/legacy/layout/utils/getNavigationOptionMedia.tsx
|
|
2028
|
-
import { jsx as
|
|
1791
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
2029
1792
|
var getNavigationOptionMedia = ({ icon, image }) => {
|
|
2030
1793
|
if (icon == null ? void 0 : icon.name) {
|
|
2031
|
-
return /* @__PURE__ */
|
|
1794
|
+
return /* @__PURE__ */ jsx10(Avatar, { type: AvatarType.ICON, children: /* @__PURE__ */ jsx10(DynamicIcon_default, { type: icon.name }) });
|
|
2032
1795
|
}
|
|
2033
1796
|
if (icon == null ? void 0 : icon.text) {
|
|
2034
|
-
return /* @__PURE__ */
|
|
1797
|
+
return /* @__PURE__ */ jsx10(Avatar, { type: AvatarType.INITIALS, children: icon.text });
|
|
2035
1798
|
}
|
|
2036
1799
|
if (image == null ? void 0 : image.url) {
|
|
2037
1800
|
const { url, text } = image;
|
|
2038
|
-
return /* @__PURE__ */
|
|
1801
|
+
return /* @__PURE__ */ jsx10("img", { src: url, alt: text });
|
|
2039
1802
|
}
|
|
2040
1803
|
return null;
|
|
2041
1804
|
};
|
|
@@ -2071,10 +1834,10 @@ var getTextAlignment = (align) => {
|
|
|
2071
1834
|
var getTextAlignmentAndMargin = (component) => `${getTextAlignment(component.align)} ${getMargin(component.margin)}`;
|
|
2072
1835
|
|
|
2073
1836
|
// src/legacy/layout/alert/DynamicAlert.tsx
|
|
2074
|
-
import { jsx as
|
|
1837
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
2075
1838
|
var DynamicAlert = (props) => {
|
|
2076
1839
|
const alert = props.component;
|
|
2077
|
-
return /* @__PURE__ */
|
|
1840
|
+
return /* @__PURE__ */ jsx11(
|
|
2078
1841
|
Alert,
|
|
2079
1842
|
{
|
|
2080
1843
|
type: mapContextToAlertType(legacy_mapContext(alert.context)),
|
|
@@ -2107,12 +1870,12 @@ var mapContextToAlertType = (context) => {
|
|
|
2107
1870
|
var DynamicAlert_default = DynamicAlert;
|
|
2108
1871
|
|
|
2109
1872
|
// src/legacy/layout/box/DynamicBox.tsx
|
|
2110
|
-
import { jsx as
|
|
1873
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
2111
1874
|
var DynamicBox = (props) => {
|
|
2112
1875
|
const box = props.component;
|
|
2113
1876
|
const margin = getMargin(box.margin || box.border ? "lg" : "xs");
|
|
2114
1877
|
if (!box.width || box.width === "xl") {
|
|
2115
|
-
return /* @__PURE__ */
|
|
1878
|
+
return /* @__PURE__ */ jsx12("div", { className: margin + getBorderClass(box.border), children: /* @__PURE__ */ jsx12(
|
|
2116
1879
|
DynamicLayout_default,
|
|
2117
1880
|
{
|
|
2118
1881
|
components: box.components,
|
|
@@ -2125,7 +1888,7 @@ var DynamicBox = (props) => {
|
|
|
2125
1888
|
}
|
|
2126
1889
|
) });
|
|
2127
1890
|
}
|
|
2128
|
-
return /* @__PURE__ */
|
|
1891
|
+
return /* @__PURE__ */ jsx12("div", { className: "row", children: /* @__PURE__ */ jsx12("div", { className: margin + getBoxWidthClasses(box), children: /* @__PURE__ */ jsx12("div", { className: getBorderClass(box.border), children: /* @__PURE__ */ jsx12(
|
|
2129
1892
|
DynamicLayout_default,
|
|
2130
1893
|
{
|
|
2131
1894
|
components: box.components,
|
|
@@ -2209,7 +1972,7 @@ var getButtonSize = (size) => {
|
|
|
2209
1972
|
};
|
|
2210
1973
|
|
|
2211
1974
|
// src/legacy/layout/button/DynamicButton.tsx
|
|
2212
|
-
import { jsx as
|
|
1975
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
2213
1976
|
function DynamicButton(props) {
|
|
2214
1977
|
var _a;
|
|
2215
1978
|
const { component, onAction } = props;
|
|
@@ -2218,7 +1981,7 @@ function DynamicButton(props) {
|
|
|
2218
1981
|
const priority = getButtonPriority(component);
|
|
2219
1982
|
const { loading } = useDynamicFlow();
|
|
2220
1983
|
const className = getMargin(component.margin || "md");
|
|
2221
|
-
return /* @__PURE__ */
|
|
1984
|
+
return /* @__PURE__ */ jsx13(
|
|
2222
1985
|
Button,
|
|
2223
1986
|
{
|
|
2224
1987
|
size: getButtonSize(component.size),
|
|
@@ -2235,12 +1998,12 @@ function DynamicButton(props) {
|
|
|
2235
1998
|
var DynamicButton_default = DynamicButton;
|
|
2236
1999
|
|
|
2237
2000
|
// src/legacy/layout/columns/DynamicColumns.tsx
|
|
2238
|
-
import { jsx as
|
|
2001
|
+
import { jsx as jsx14, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
2239
2002
|
var DynamicColumns = (props) => {
|
|
2240
2003
|
const columns = props.component;
|
|
2241
2004
|
const { leftWidth, rightWidth } = getWidth(columns.bias);
|
|
2242
|
-
return /* @__PURE__ */
|
|
2243
|
-
/* @__PURE__ */
|
|
2005
|
+
return /* @__PURE__ */ jsxs2("div", { className: `${getMargin(columns.margin || "xs")} row`, children: [
|
|
2006
|
+
/* @__PURE__ */ jsx14("div", { className: `${leftWidth} m-b-0`, children: /* @__PURE__ */ jsx14(
|
|
2244
2007
|
DynamicLayout_default,
|
|
2245
2008
|
{
|
|
2246
2009
|
components: columns.left,
|
|
@@ -2252,7 +2015,7 @@ var DynamicColumns = (props) => {
|
|
|
2252
2015
|
onPersistAsync: props.onPersistAsync
|
|
2253
2016
|
}
|
|
2254
2017
|
) }),
|
|
2255
|
-
/* @__PURE__ */
|
|
2018
|
+
/* @__PURE__ */ jsx14("div", { className: `${rightWidth} m-b-0`, children: /* @__PURE__ */ jsx14(
|
|
2256
2019
|
DynamicLayout_default,
|
|
2257
2020
|
{
|
|
2258
2021
|
components: columns.right,
|
|
@@ -2288,10 +2051,10 @@ var DynamicColumns_default = DynamicColumns;
|
|
|
2288
2051
|
|
|
2289
2052
|
// src/legacy/layout/decision/DynamicDecision.tsx
|
|
2290
2053
|
import { NavigationOption, NavigationOptionsList } from "@transferwise/components";
|
|
2291
|
-
import { jsx as
|
|
2054
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
2292
2055
|
function DynamicDecision({ component, onAction }) {
|
|
2293
2056
|
const { loading } = useDynamicFlow();
|
|
2294
|
-
return /* @__PURE__ */
|
|
2057
|
+
return /* @__PURE__ */ jsx15("div", { className: getMargin(component.margin), children: /* @__PURE__ */ jsx15(NavigationOptionsList, { children: component.options.map((option) => /* @__PURE__ */ jsx15(
|
|
2295
2058
|
NavigationOption,
|
|
2296
2059
|
{
|
|
2297
2060
|
title: option.title,
|
|
@@ -2308,17 +2071,17 @@ function DynamicDecision({ component, onAction }) {
|
|
|
2308
2071
|
var DynamicDecision_default = DynamicDecision;
|
|
2309
2072
|
|
|
2310
2073
|
// src/legacy/layout/divider/DynamicDivider.tsx
|
|
2311
|
-
import { jsx as
|
|
2074
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
2312
2075
|
var DynamicDivider = ({ component }) => {
|
|
2313
2076
|
const margin = getMargin(component.margin);
|
|
2314
2077
|
const className = `m-t-0 ${margin}`;
|
|
2315
|
-
return /* @__PURE__ */
|
|
2078
|
+
return /* @__PURE__ */ jsx16("hr", { className });
|
|
2316
2079
|
};
|
|
2317
2080
|
var DynamicDivider_default = DynamicDivider;
|
|
2318
2081
|
|
|
2319
2082
|
// src/legacy/layout/external/DynamicExternal.tsx
|
|
2320
2083
|
import { Button as Button2, Loader, Size as Size2 } from "@transferwise/components";
|
|
2321
|
-
import { useCallback as useCallback4, useEffect as
|
|
2084
|
+
import { useCallback as useCallback4, useEffect as useEffect3 } from "react";
|
|
2322
2085
|
import { useIntl } from "react-intl";
|
|
2323
2086
|
|
|
2324
2087
|
// src/legacy/layout/external/DynamicExternal.messages.ts
|
|
@@ -2332,7 +2095,7 @@ var DynamicExternal_messages_default = defineMessages2({
|
|
|
2332
2095
|
});
|
|
2333
2096
|
|
|
2334
2097
|
// src/legacy/layout/external/DynamicExternal.tsx
|
|
2335
|
-
import { Fragment, jsx as
|
|
2098
|
+
import { Fragment as Fragment2, jsx as jsx17, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
2336
2099
|
var DynamicExternal = ({ component, onAction }) => {
|
|
2337
2100
|
const { requestUrl, responseHandlers, polling, retryTitle } = component;
|
|
2338
2101
|
const intl = useIntl();
|
|
@@ -2340,17 +2103,17 @@ var DynamicExternal = ({ component, onAction }) => {
|
|
|
2340
2103
|
() => window.open(requestUrl, "df-external-window"),
|
|
2341
2104
|
[requestUrl]
|
|
2342
2105
|
);
|
|
2343
|
-
|
|
2106
|
+
useEffect3(() => {
|
|
2344
2107
|
openExternalUrl();
|
|
2345
2108
|
}, [openExternalUrl]);
|
|
2346
2109
|
const pollingConfiguration = polling && responseHandlers ? __spreadProps(__spreadValues({}, polling), {
|
|
2347
2110
|
responseHandlers
|
|
2348
2111
|
}) : void 0;
|
|
2349
2112
|
useExternalStepPolling(pollingConfiguration, onAction);
|
|
2350
|
-
return /* @__PURE__ */
|
|
2351
|
-
/* @__PURE__ */
|
|
2352
|
-
/* @__PURE__ */
|
|
2353
|
-
/* @__PURE__ */
|
|
2113
|
+
return /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
2114
|
+
/* @__PURE__ */ jsx17(Loader, { size: Size2.LARGE, classNames: { "tw-loader": "tw-loader m-x-auto" } }),
|
|
2115
|
+
/* @__PURE__ */ jsx17("br", {}),
|
|
2116
|
+
/* @__PURE__ */ jsx17(Button2, { priority: "tertiary", block: true, onClick: openExternalUrl, children: retryTitle || intl.formatMessage(DynamicExternal_messages_default.retryTitle) })
|
|
2354
2117
|
] });
|
|
2355
2118
|
};
|
|
2356
2119
|
var DynamicExternal_default = DynamicExternal;
|
|
@@ -2361,8 +2124,8 @@ import { useEffect as useEffect10 } from "react";
|
|
|
2361
2124
|
// src/legacy/jsonSchemaForm/allOfSchema/AllOfSchema.tsx
|
|
2362
2125
|
var import_classnames = __toESM(require_classnames());
|
|
2363
2126
|
import { Header } from "@transferwise/components";
|
|
2364
|
-
import { useState as
|
|
2365
|
-
import { Fragment as
|
|
2127
|
+
import { useState as useState4 } from "react";
|
|
2128
|
+
import { Fragment as Fragment3, jsx as jsx18, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2366
2129
|
var splitModel = (model, schemas) => schemas.map((schema) => getValidObjectModelParts(model, schema) || {});
|
|
2367
2130
|
var combineModels = (models) => models.reduce((current, combined) => __spreadValues(__spreadValues({}, combined), current), {});
|
|
2368
2131
|
var getSchemaColumnClasses = (width) => ({
|
|
@@ -2377,13 +2140,13 @@ function AllOfSchema(props) {
|
|
|
2377
2140
|
setModels(models);
|
|
2378
2141
|
props.onChange(__spreadProps(__spreadValues({}, onChangeProps), { model: combineModels(models) }));
|
|
2379
2142
|
};
|
|
2380
|
-
const [models, setModels] =
|
|
2381
|
-
return /* @__PURE__ */
|
|
2382
|
-
props.schema.title && /* @__PURE__ */
|
|
2383
|
-
props.schema.description && /* @__PURE__ */
|
|
2384
|
-
/* @__PURE__ */
|
|
2143
|
+
const [models, setModels] = useState4(splitModel(props.model, props.schema.allOf));
|
|
2144
|
+
return /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
2145
|
+
props.schema.title && /* @__PURE__ */ jsx18(Header, { title: props.schema.title }),
|
|
2146
|
+
props.schema.description && /* @__PURE__ */ jsx18("p", { children: props.schema.description }),
|
|
2147
|
+
/* @__PURE__ */ jsx18("div", { className: "row", children: props.schema.allOf.map((schema, index) => (
|
|
2385
2148
|
// eslint-disable-next-line react/no-array-index-key
|
|
2386
|
-
/* @__PURE__ */
|
|
2149
|
+
/* @__PURE__ */ jsx18("div", { className: (0, import_classnames.default)(getSchemaColumnClasses(schema.width)), children: /* @__PURE__ */ jsx18(
|
|
2387
2150
|
GenericSchema_default,
|
|
2388
2151
|
{
|
|
2389
2152
|
schema,
|
|
@@ -2412,7 +2175,7 @@ import {
|
|
|
2412
2175
|
Status,
|
|
2413
2176
|
UploadInput
|
|
2414
2177
|
} from "@transferwise/components";
|
|
2415
|
-
import { useMemo as useMemo6, useState as
|
|
2178
|
+
import { useMemo as useMemo6, useState as useState5 } from "react";
|
|
2416
2179
|
|
|
2417
2180
|
// src/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.tsx
|
|
2418
2181
|
import { InlineAlert } from "@transferwise/components";
|
|
@@ -2490,7 +2253,7 @@ var validation_messages_default = defineMessages4({
|
|
|
2490
2253
|
});
|
|
2491
2254
|
|
|
2492
2255
|
// src/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.tsx
|
|
2493
|
-
import { jsx as
|
|
2256
|
+
import { jsx as jsx19, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2494
2257
|
function ControlFeedback(props) {
|
|
2495
2258
|
var _a;
|
|
2496
2259
|
const defaultValidationMessages = useDefaultValidationMessages(props.schema);
|
|
@@ -2499,12 +2262,12 @@ function ControlFeedback(props) {
|
|
|
2499
2262
|
const isValidationVisible = !isErrorVisible && (props.submitted || props.changed && props.blurred) && Boolean((_a = props.validations) == null ? void 0 : _a.length);
|
|
2500
2263
|
const isDescriptionVisible = props.schema.type !== "boolean" && props.schema.description && !isErrorVisible && !isValidationVisible;
|
|
2501
2264
|
const hasInfoMessage = Boolean(props.infoMessage);
|
|
2502
|
-
return /* @__PURE__ */
|
|
2503
|
-
isErrorVisible ? /* @__PURE__ */
|
|
2504
|
-
isValidationVisible ? /* @__PURE__ */
|
|
2505
|
-
(isDescriptionVisible || hasInfoMessage) && /* @__PURE__ */
|
|
2506
|
-
isDescriptionVisible && /* @__PURE__ */
|
|
2507
|
-
hasInfoMessage && /* @__PURE__ */
|
|
2265
|
+
return /* @__PURE__ */ jsxs5("div", { id: props.id, children: [
|
|
2266
|
+
isErrorVisible ? /* @__PURE__ */ jsx19(InlineAlert, { type: "error", children: props.errors }) : null,
|
|
2267
|
+
isValidationVisible ? /* @__PURE__ */ jsx19(InlineAlert, { type: "error", children: props.validations.map((validation) => /* @__PURE__ */ jsx19("div", { children: validationMessages[validation] }, validation)) }) : null,
|
|
2268
|
+
(isDescriptionVisible || hasInfoMessage) && /* @__PURE__ */ jsxs5(InlineAlert, { type: "info", children: [
|
|
2269
|
+
isDescriptionVisible && /* @__PURE__ */ jsx19("div", { children: props.schema.description }),
|
|
2270
|
+
hasInfoMessage && /* @__PURE__ */ jsx19("div", { children: props.infoMessage })
|
|
2508
2271
|
] })
|
|
2509
2272
|
] });
|
|
2510
2273
|
}
|
|
@@ -2650,15 +2413,15 @@ function useFormattedDefaultErrorMessages({
|
|
|
2650
2413
|
}
|
|
2651
2414
|
|
|
2652
2415
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.tsx
|
|
2653
|
-
import { jsx as
|
|
2416
|
+
import { jsx as jsx20, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2654
2417
|
function MultipleFileUploadSchema(props) {
|
|
2655
2418
|
var _a, _b;
|
|
2656
2419
|
const { onChange, schema } = props;
|
|
2657
2420
|
const onEvent = useEventDispatcher();
|
|
2658
2421
|
const defaultErrorMessages = useFormattedDefaultErrorMessages(schema);
|
|
2659
2422
|
const uid = useMemo6(() => schema.$id || generateRandomId(), [schema.$id]);
|
|
2660
|
-
const [inputChanged, setInputChanged] =
|
|
2661
|
-
const [files, setFiles] =
|
|
2423
|
+
const [inputChanged, setInputChanged] = useState5(false);
|
|
2424
|
+
const [files, setFiles] = useState5(() => convertFileIdsToComponentFileObjects(props.model || []));
|
|
2662
2425
|
const performPersistAsync = usePersistAsync(schema.items.persistAsync);
|
|
2663
2426
|
const fileSchemaDescriptor = schema.items.persistAsync.schema;
|
|
2664
2427
|
const isBlob = isBlobSchema(fileSchemaDescriptor);
|
|
@@ -2712,10 +2475,10 @@ function MultipleFileUploadSchema(props) {
|
|
|
2712
2475
|
onDeleteFile: () => Promise.resolve()
|
|
2713
2476
|
});
|
|
2714
2477
|
const feedbackId = `${uid}-feedback`;
|
|
2715
|
-
return /* @__PURE__ */
|
|
2716
|
-
/* @__PURE__ */
|
|
2717
|
-
/* @__PURE__ */
|
|
2718
|
-
/* @__PURE__ */
|
|
2478
|
+
return /* @__PURE__ */ jsxs6("div", { className: (0, import_classnames2.default)("form-group", { "has-error": showError }), children: [
|
|
2479
|
+
/* @__PURE__ */ jsx20("label", { className: "d-block control-label", htmlFor: uid, children: props.schema.title }),
|
|
2480
|
+
/* @__PURE__ */ jsx20("div", { "aria-describedby": feedbackId, children: /* @__PURE__ */ jsx20(UploadInput, __spreadValues({}, uploadInputProps)) }),
|
|
2481
|
+
/* @__PURE__ */ jsx20(
|
|
2719
2482
|
ControlFeedback_default,
|
|
2720
2483
|
{
|
|
2721
2484
|
id: feedbackId,
|
|
@@ -2763,14 +2526,6 @@ import { useIntl as useIntl4 } from "react-intl";
|
|
|
2763
2526
|
|
|
2764
2527
|
// src/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.tsx
|
|
2765
2528
|
import { Avatar as Avatar2, AvatarType as AvatarType2 } from "@transferwise/components";
|
|
2766
|
-
|
|
2767
|
-
// ../../node_modules/.pnpm/@wise+art@2.10.0_@transferwise+neptune-css@14.9.6_@types+react@18.0.29_react-dom@18.2.0_react@18.2.0/node_modules/@wise/art/dist/index.esm.js
|
|
2768
|
-
init_index_d9418379_esm();
|
|
2769
|
-
init_clsx();
|
|
2770
|
-
import "react";
|
|
2771
|
-
import "react/jsx-runtime";
|
|
2772
|
-
|
|
2773
|
-
// src/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.tsx
|
|
2774
2529
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
2775
2530
|
var mapConstSchemaToOption = (schema, controlType) => {
|
|
2776
2531
|
switch (controlType) {
|
|
@@ -8462,7 +8217,7 @@ function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
|
|
|
8462
8217
|
return deterministicId || (id ? `radix-${id}` : "");
|
|
8463
8218
|
}
|
|
8464
8219
|
|
|
8465
|
-
// ../../node_modules/.pnpm/@wise+forms@0.3.4_@transferwise+components@46.
|
|
8220
|
+
// ../../node_modules/.pnpm/@wise+forms@0.3.4_@transferwise+components@46.27.0_@types+react@18.0.29_react@18.2.0/node_modules/@wise/forms/dist/index.mjs
|
|
8466
8221
|
var import_classnames11 = __toESM(require_classnames(), 1);
|
|
8467
8222
|
import { InlineAlert as InlineAlert2, Sentiment as Sentiment2, Input as Input2, TextArea } from "@transferwise/components";
|
|
8468
8223
|
import { createContext as createContext6, useContext as useContext7, forwardRef as forwardRef2 } from "react";
|
|
@@ -8802,205 +8557,14 @@ import { NavigationOptionsList as NavigationOptionsList3, NavigationOption as Na
|
|
|
8802
8557
|
|
|
8803
8558
|
// src/revamp/wise/renderers/components/icon/FlagIcon.tsx
|
|
8804
8559
|
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
8805
|
-
var isFlagIcon2 = (name) =>
|
|
8806
|
-
var isCurrencyFlagIcon2 = (name) => currencyCodes2.some((currencyCode) => name === `flag-${currencyCode}`);
|
|
8807
|
-
var isCountryFlagIcon2 = (name) => countryCodes2.some((countryCode) => name === `flag-${countryCode}`);
|
|
8560
|
+
var isFlagIcon2 = (name) => name.startsWith("flag-");
|
|
8808
8561
|
function FlagIcon2({ name }) {
|
|
8809
8562
|
if (!isFlagIcon2(name)) {
|
|
8810
8563
|
return null;
|
|
8811
8564
|
}
|
|
8812
8565
|
const code = name.substring(5);
|
|
8813
|
-
return /* @__PURE__ */ jsx85(
|
|
8814
|
-
"img",
|
|
8815
|
-
{
|
|
8816
|
-
src: `https://wise.com/web-art/assets/flags/${code}.svg`,
|
|
8817
|
-
alt: "",
|
|
8818
|
-
"data-testid": `img-flag-${code}`
|
|
8819
|
-
}
|
|
8820
|
-
);
|
|
8566
|
+
return /* @__PURE__ */ jsx85(Flag, { code });
|
|
8821
8567
|
}
|
|
8822
|
-
var currencyCodes2 = [
|
|
8823
|
-
"aed",
|
|
8824
|
-
"ars",
|
|
8825
|
-
"aud",
|
|
8826
|
-
"bdt",
|
|
8827
|
-
"bgn",
|
|
8828
|
-
"bhd",
|
|
8829
|
-
"bnd",
|
|
8830
|
-
"brl",
|
|
8831
|
-
"bwp",
|
|
8832
|
-
"cad",
|
|
8833
|
-
"chf",
|
|
8834
|
-
"clp",
|
|
8835
|
-
"cny",
|
|
8836
|
-
"cop",
|
|
8837
|
-
"crc",
|
|
8838
|
-
"czk",
|
|
8839
|
-
"dkk",
|
|
8840
|
-
"egp",
|
|
8841
|
-
"eur",
|
|
8842
|
-
"fjd",
|
|
8843
|
-
"gbp",
|
|
8844
|
-
"gel",
|
|
8845
|
-
"ghs",
|
|
8846
|
-
"gtq",
|
|
8847
|
-
"hkd",
|
|
8848
|
-
"hrk",
|
|
8849
|
-
"huf",
|
|
8850
|
-
"idr",
|
|
8851
|
-
"ils",
|
|
8852
|
-
"imp",
|
|
8853
|
-
"inr",
|
|
8854
|
-
"isk",
|
|
8855
|
-
"jmd",
|
|
8856
|
-
"jpy",
|
|
8857
|
-
"kes",
|
|
8858
|
-
"krw",
|
|
8859
|
-
"kwd",
|
|
8860
|
-
"lak",
|
|
8861
|
-
"lkr",
|
|
8862
|
-
"lsl",
|
|
8863
|
-
"mad",
|
|
8864
|
-
"mur",
|
|
8865
|
-
"mxn",
|
|
8866
|
-
"myr",
|
|
8867
|
-
"mzn",
|
|
8868
|
-
"nad",
|
|
8869
|
-
"ngn",
|
|
8870
|
-
"nok",
|
|
8871
|
-
"npr",
|
|
8872
|
-
"nzd",
|
|
8873
|
-
"omr",
|
|
8874
|
-
"pab",
|
|
8875
|
-
"pen",
|
|
8876
|
-
"php",
|
|
8877
|
-
"pkr",
|
|
8878
|
-
"pln",
|
|
8879
|
-
"qar",
|
|
8880
|
-
"ron",
|
|
8881
|
-
"rub",
|
|
8882
|
-
"sar",
|
|
8883
|
-
"sek",
|
|
8884
|
-
"sgd",
|
|
8885
|
-
"thb",
|
|
8886
|
-
"tmt",
|
|
8887
|
-
"try",
|
|
8888
|
-
"twd",
|
|
8889
|
-
"tzs",
|
|
8890
|
-
"uah",
|
|
8891
|
-
"ugx",
|
|
8892
|
-
"usd",
|
|
8893
|
-
"uyu",
|
|
8894
|
-
"vnd",
|
|
8895
|
-
"xof",
|
|
8896
|
-
"zar",
|
|
8897
|
-
"zmw"
|
|
8898
|
-
];
|
|
8899
|
-
var countryCodes2 = [
|
|
8900
|
-
"ad",
|
|
8901
|
-
"ae",
|
|
8902
|
-
"ar",
|
|
8903
|
-
"at",
|
|
8904
|
-
"au",
|
|
8905
|
-
"bd",
|
|
8906
|
-
"be",
|
|
8907
|
-
"bg",
|
|
8908
|
-
"bh",
|
|
8909
|
-
"bn",
|
|
8910
|
-
"br",
|
|
8911
|
-
"bw",
|
|
8912
|
-
"ca",
|
|
8913
|
-
"ch",
|
|
8914
|
-
"cl",
|
|
8915
|
-
"cn",
|
|
8916
|
-
"co",
|
|
8917
|
-
"cr",
|
|
8918
|
-
"cy",
|
|
8919
|
-
"cz",
|
|
8920
|
-
"de",
|
|
8921
|
-
"dk",
|
|
8922
|
-
"ee",
|
|
8923
|
-
"eg",
|
|
8924
|
-
"es",
|
|
8925
|
-
"eu",
|
|
8926
|
-
"fi",
|
|
8927
|
-
"fj",
|
|
8928
|
-
"fr",
|
|
8929
|
-
"gb",
|
|
8930
|
-
"ge",
|
|
8931
|
-
"gg",
|
|
8932
|
-
"gh",
|
|
8933
|
-
"gp",
|
|
8934
|
-
"gr",
|
|
8935
|
-
"gt",
|
|
8936
|
-
"hk",
|
|
8937
|
-
"hr",
|
|
8938
|
-
"hu",
|
|
8939
|
-
"id",
|
|
8940
|
-
"ie",
|
|
8941
|
-
"il",
|
|
8942
|
-
"im",
|
|
8943
|
-
"in",
|
|
8944
|
-
"is",
|
|
8945
|
-
"it",
|
|
8946
|
-
"je",
|
|
8947
|
-
"jm",
|
|
8948
|
-
"jp",
|
|
8949
|
-
"ke",
|
|
8950
|
-
"kr",
|
|
8951
|
-
"kw",
|
|
8952
|
-
"la",
|
|
8953
|
-
"li",
|
|
8954
|
-
"lk",
|
|
8955
|
-
"ls",
|
|
8956
|
-
"lt",
|
|
8957
|
-
"lu",
|
|
8958
|
-
"lv",
|
|
8959
|
-
"ma",
|
|
8960
|
-
"mc",
|
|
8961
|
-
"mt",
|
|
8962
|
-
"mu",
|
|
8963
|
-
"mx",
|
|
8964
|
-
"my",
|
|
8965
|
-
"mz",
|
|
8966
|
-
"na",
|
|
8967
|
-
"ng",
|
|
8968
|
-
"nl",
|
|
8969
|
-
"no",
|
|
8970
|
-
"np",
|
|
8971
|
-
"nz",
|
|
8972
|
-
"om",
|
|
8973
|
-
"pa",
|
|
8974
|
-
"pe",
|
|
8975
|
-
"ph",
|
|
8976
|
-
"pk",
|
|
8977
|
-
"pl",
|
|
8978
|
-
"pt",
|
|
8979
|
-
"qa",
|
|
8980
|
-
"ro",
|
|
8981
|
-
"ru",
|
|
8982
|
-
"sa",
|
|
8983
|
-
"se",
|
|
8984
|
-
"sg",
|
|
8985
|
-
"si",
|
|
8986
|
-
"sk",
|
|
8987
|
-
"sm",
|
|
8988
|
-
"th",
|
|
8989
|
-
"tm",
|
|
8990
|
-
"tr",
|
|
8991
|
-
"tw",
|
|
8992
|
-
"tz",
|
|
8993
|
-
"ua",
|
|
8994
|
-
"ug",
|
|
8995
|
-
"us",
|
|
8996
|
-
"uy",
|
|
8997
|
-
"va",
|
|
8998
|
-
"vn",
|
|
8999
|
-
"wi",
|
|
9000
|
-
"xo",
|
|
9001
|
-
"za",
|
|
9002
|
-
"zm"
|
|
9003
|
-
];
|
|
9004
8568
|
|
|
9005
8569
|
// src/revamp/wise/renderers/components/icon/NamedIcon.tsx
|
|
9006
8570
|
import * as icons2 from "@transferwise/icons";
|