@wise/dynamic-flow-client-internal 4.20.3 → 4.21.0-experimental-5de9758
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/main.js +659 -390
- package/build/main.mjs +558 -289
- package/package.json +6 -6
package/build/main.mjs
CHANGED
|
@@ -1207,27 +1207,34 @@ var DateInputRenderer_default = DateInputRenderer;
|
|
|
1207
1207
|
// ../renderers/src/DecisionRenderer.tsx
|
|
1208
1208
|
import { Header, NavigationOption, NavigationOptionsList } from "@transferwise/components";
|
|
1209
1209
|
|
|
1210
|
-
// ../renderers/src/
|
|
1211
|
-
import { AvatarView as AvatarView2 } from "@transferwise/components";
|
|
1212
|
-
|
|
1213
|
-
// ../renderers/src/utils/image-utils.tsx
|
|
1214
|
-
import { AvatarView } from "@transferwise/components";
|
|
1215
|
-
|
|
1216
|
-
// ../renderers/src/components/icon/FlagIcon.tsx
|
|
1210
|
+
// ../renderers/src/utils/UrnFlag.tsx
|
|
1217
1211
|
import { Flag } from "@wise/art";
|
|
1218
1212
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1213
|
+
var countryUrnPrefix = "urn:wise:countries:";
|
|
1214
|
+
var currencyUrnPrefix = "urn:wise:currencies:";
|
|
1215
|
+
var isUrnFlag = (uri) => uri.startsWith(countryUrnPrefix) || uri.startsWith(currencyUrnPrefix);
|
|
1216
|
+
function UrnFlag({ size, urn }) {
|
|
1217
|
+
return /* @__PURE__ */ jsx12(Flag, { code: getCode(urn), intrinsicSize: size });
|
|
1218
|
+
}
|
|
1219
|
+
var getCode = (urn) => {
|
|
1220
|
+
return urn.replace(countryUrnPrefix, "").replace(currencyUrnPrefix, "").replace(":image", "").split("?")[0];
|
|
1221
|
+
};
|
|
1222
|
+
|
|
1223
|
+
// ../renderers/src/components/icon/FlagIcon.tsx
|
|
1224
|
+
import { Flag as Flag2 } from "@wise/art";
|
|
1225
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1219
1226
|
var isFlagIcon = (name) => name.startsWith("flag-");
|
|
1220
1227
|
function FlagIcon({ name }) {
|
|
1221
1228
|
if (!isFlagIcon(name)) {
|
|
1222
1229
|
return null;
|
|
1223
1230
|
}
|
|
1224
1231
|
const code = name.substring(5);
|
|
1225
|
-
return /* @__PURE__ */
|
|
1232
|
+
return /* @__PURE__ */ jsx13(Flag2, { code, intrinsicSize: 24 });
|
|
1226
1233
|
}
|
|
1227
1234
|
|
|
1228
1235
|
// ../renderers/src/components/icon/NamedIcon.tsx
|
|
1229
1236
|
import * as icons from "@transferwise/icons";
|
|
1230
|
-
import { jsx as
|
|
1237
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1231
1238
|
var isNamedIcon = (name) => {
|
|
1232
1239
|
const iconName = toCapitalisedCamelCase(name);
|
|
1233
1240
|
return Object.keys(icons).includes(iconName);
|
|
@@ -1238,43 +1245,129 @@ function NamedIcon({ name }) {
|
|
|
1238
1245
|
}
|
|
1239
1246
|
const iconName = toCapitalisedCamelCase(name);
|
|
1240
1247
|
const Icon = icons[iconName];
|
|
1241
|
-
return /* @__PURE__ */
|
|
1248
|
+
return /* @__PURE__ */ jsx14(Icon, { size: 24 });
|
|
1242
1249
|
}
|
|
1243
1250
|
var toCapitalisedCamelCase = (value) => value.split("-").map(capitaliseFirstChar).join("");
|
|
1244
1251
|
var capitaliseFirstChar = (value) => `${value[0].toUpperCase()}${value.slice(1)}`;
|
|
1245
1252
|
|
|
1246
1253
|
// ../renderers/src/components/icon/DynamicIcon.tsx
|
|
1247
|
-
import { jsx as
|
|
1254
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1248
1255
|
function DynamicIcon({ name }) {
|
|
1249
1256
|
if (isFlagIcon(name)) {
|
|
1250
|
-
return /* @__PURE__ */
|
|
1257
|
+
return /* @__PURE__ */ jsx15(FlagIcon, { name });
|
|
1251
1258
|
}
|
|
1252
1259
|
if (isNamedIcon(name)) {
|
|
1253
|
-
return /* @__PURE__ */
|
|
1260
|
+
return /* @__PURE__ */ jsx15(NamedIcon, { name });
|
|
1254
1261
|
}
|
|
1255
1262
|
return null;
|
|
1256
1263
|
}
|
|
1264
|
+
function isValidIconName(name) {
|
|
1265
|
+
return isNamedIcon(name) || isFlagIcon(name);
|
|
1266
|
+
}
|
|
1267
|
+
function isValidIconUrn(uri) {
|
|
1268
|
+
if (!uri.startsWith("urn:wise:icons:")) {
|
|
1269
|
+
return false;
|
|
1270
|
+
}
|
|
1271
|
+
const name = uri.replace("urn:wise:icons:", "").split("?")[0];
|
|
1272
|
+
return isValidIconName(name);
|
|
1273
|
+
}
|
|
1257
1274
|
var DynamicIcon_default = DynamicIcon;
|
|
1258
1275
|
|
|
1259
|
-
// ../renderers/src/
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
return
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1276
|
+
// ../renderers/src/components/Media/stringToURN.ts
|
|
1277
|
+
var stringToURN = (uri) => {
|
|
1278
|
+
var _a;
|
|
1279
|
+
const [nameWithRComponent, qComponent] = uri.split("?=");
|
|
1280
|
+
const [name, rComponent] = (_a = nameWithRComponent == null ? void 0 : nameWithRComponent.split("?+")) != null ? _a : ["", ""];
|
|
1281
|
+
const rComponents = rComponent == null ? void 0 : rComponent.split("&").map((c) => c.split("=")).map(([a, b]) => [a, b]);
|
|
1282
|
+
const qComponents = qComponent == null ? void 0 : qComponent.split("&").map((c) => c.split("=")).map(([a, b]) => [a, b]);
|
|
1283
|
+
return {
|
|
1284
|
+
name,
|
|
1285
|
+
rComponents,
|
|
1286
|
+
qComponents
|
|
1287
|
+
};
|
|
1270
1288
|
};
|
|
1271
1289
|
|
|
1272
|
-
// ../renderers/src/
|
|
1290
|
+
// ../renderers/src/components/Media/resolveUri.tsx
|
|
1273
1291
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1292
|
+
var resolveUri = (uri, size) => {
|
|
1293
|
+
var _a, _b;
|
|
1294
|
+
const { name, qComponents = [] } = stringToURN(uri);
|
|
1295
|
+
if (isValidIconUrn(name)) {
|
|
1296
|
+
return {
|
|
1297
|
+
asset: /* @__PURE__ */ jsx16(DynamicIcon_default, { name: name.replace("urn:wise:icons:", "") }),
|
|
1298
|
+
backgroundColor: (_a = qComponents.find(([key]) => key === "background-color")) == null ? void 0 : _a[1]
|
|
1299
|
+
};
|
|
1300
|
+
}
|
|
1301
|
+
if (isUrnFlag(name)) {
|
|
1302
|
+
return {
|
|
1303
|
+
asset: /* @__PURE__ */ jsx16(UrnFlag, { urn: name, size })
|
|
1304
|
+
};
|
|
1305
|
+
}
|
|
1306
|
+
if (name.startsWith("data:text/plain,")) {
|
|
1307
|
+
const text = decodeURI(name.replace("data:text/plain,", ""));
|
|
1308
|
+
return {
|
|
1309
|
+
asset: text,
|
|
1310
|
+
backgroundColor: (_b = qComponents.find(([key]) => key === "background-color")) == null ? void 0 : _b[1]
|
|
1311
|
+
};
|
|
1312
|
+
}
|
|
1313
|
+
if (!uri.startsWith("urn:")) {
|
|
1314
|
+
return { asset: /* @__PURE__ */ jsx16("img", { src: uri, alt: "", width: `${size}px` }) };
|
|
1315
|
+
}
|
|
1316
|
+
return { asset: void 0 };
|
|
1317
|
+
};
|
|
1318
|
+
|
|
1319
|
+
// ../renderers/src/components/Media/AvatarMedia.tsx
|
|
1320
|
+
import { AvatarLayout, AvatarView } from "@transferwise/components";
|
|
1321
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1322
|
+
var AvatarMedia = ({
|
|
1323
|
+
accessibilityDescription,
|
|
1324
|
+
content,
|
|
1325
|
+
size
|
|
1326
|
+
}) => {
|
|
1327
|
+
const getRenderableAvatar = (avatar) => {
|
|
1328
|
+
if (avatar.type === "text") {
|
|
1329
|
+
return { asset: avatar.text };
|
|
1330
|
+
}
|
|
1331
|
+
return __spreadProps(__spreadValues({}, resolveUri(avatar.uri, size)), {
|
|
1332
|
+
badge: avatar.badgeUri ? resolveUri(avatar.badgeUri, 16).asset : void 0
|
|
1333
|
+
});
|
|
1334
|
+
};
|
|
1335
|
+
const avatars = content.map(getRenderableAvatar);
|
|
1336
|
+
if (avatars.length === 1) {
|
|
1337
|
+
const { badge, backgroundColor, asset } = avatars[0];
|
|
1338
|
+
return /* @__PURE__ */ jsx17(
|
|
1339
|
+
AvatarView,
|
|
1340
|
+
{
|
|
1341
|
+
"aria-label": accessibilityDescription,
|
|
1342
|
+
size,
|
|
1343
|
+
badge: { asset: badge },
|
|
1344
|
+
style: { backgroundColor },
|
|
1345
|
+
children: asset
|
|
1346
|
+
}
|
|
1347
|
+
);
|
|
1348
|
+
}
|
|
1349
|
+
const avatarsWithoutBadges = avatars.map((_a) => {
|
|
1350
|
+
var _b = _a, { badge } = _b, rest = __objRest(_b, ["badge"]);
|
|
1351
|
+
return __spreadValues({}, rest);
|
|
1352
|
+
});
|
|
1353
|
+
return /* @__PURE__ */ jsx17(
|
|
1354
|
+
AvatarLayout,
|
|
1355
|
+
{
|
|
1356
|
+
"aria-label": accessibilityDescription,
|
|
1357
|
+
size,
|
|
1358
|
+
orientation: "diagonal",
|
|
1359
|
+
avatars: avatarsWithoutBadges
|
|
1360
|
+
}
|
|
1361
|
+
);
|
|
1362
|
+
};
|
|
1363
|
+
|
|
1364
|
+
// ../renderers/src/utils/image-utils.tsx
|
|
1365
|
+
import { AvatarView as AvatarView2 } from "@transferwise/components";
|
|
1366
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1274
1367
|
var getBadgedMedia = (iconNode, imageNode, size) => {
|
|
1275
1368
|
if (iconNode && imageNode) {
|
|
1276
1369
|
if (imageNode && iconNode) {
|
|
1277
|
-
return /* @__PURE__ */
|
|
1370
|
+
return /* @__PURE__ */ jsx18(AvatarView2, { size, badge: { asset: iconNode }, children: imageNode });
|
|
1278
1371
|
}
|
|
1279
1372
|
}
|
|
1280
1373
|
return null;
|
|
@@ -1282,7 +1375,7 @@ var getBadgedMedia = (iconNode, imageNode, size) => {
|
|
|
1282
1375
|
var getIconNode = (icon) => {
|
|
1283
1376
|
if (icon) {
|
|
1284
1377
|
if ("name" in icon) {
|
|
1285
|
-
return /* @__PURE__ */
|
|
1378
|
+
return /* @__PURE__ */ jsx18(DynamicIcon_default, { name: icon.name });
|
|
1286
1379
|
}
|
|
1287
1380
|
if (icon.text) {
|
|
1288
1381
|
return icon.text;
|
|
@@ -1294,56 +1387,91 @@ var getImageNode = (image, size) => {
|
|
|
1294
1387
|
if (image) {
|
|
1295
1388
|
const { accessibilityDescription, uri } = image;
|
|
1296
1389
|
if (!uri.startsWith("urn:")) {
|
|
1297
|
-
return /* @__PURE__ */
|
|
1390
|
+
return /* @__PURE__ */ jsx18("img", { src: uri, alt: accessibilityDescription, width: `${size}px` });
|
|
1298
1391
|
}
|
|
1299
1392
|
if (isUrnFlag(uri)) {
|
|
1300
|
-
return /* @__PURE__ */
|
|
1393
|
+
return /* @__PURE__ */ jsx18(UrnFlag, { urn: uri, accessibilityDescription, size });
|
|
1301
1394
|
}
|
|
1302
1395
|
}
|
|
1303
1396
|
return null;
|
|
1304
1397
|
};
|
|
1305
1398
|
|
|
1306
|
-
// ../renderers/src/components/
|
|
1307
|
-
import {
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
const imageNode = getImageNode(image, mediaSize);
|
|
1399
|
+
// ../renderers/src/components/Media/Media.tsx
|
|
1400
|
+
import { AvatarView as AvatarView4 } from "@transferwise/components";
|
|
1401
|
+
|
|
1402
|
+
// ../renderers/src/components/Media/LegacyMedia.tsx
|
|
1403
|
+
import { AvatarView as AvatarView3 } from "@transferwise/components";
|
|
1404
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1405
|
+
var LegacyMedia = ({ image, icon, preferAvatar, size }) => {
|
|
1406
|
+
const imageNode = getImageNode(image, size);
|
|
1315
1407
|
const iconNode = getIconNode(icon);
|
|
1316
|
-
const badge = getBadgedMedia(iconNode, imageNode,
|
|
1408
|
+
const badge = getBadgedMedia(iconNode, imageNode, size);
|
|
1317
1409
|
if (badge) {
|
|
1318
1410
|
return badge;
|
|
1319
1411
|
}
|
|
1320
1412
|
if (imageNode) {
|
|
1321
|
-
return preferAvatar ? /* @__PURE__ */
|
|
1413
|
+
return preferAvatar ? /* @__PURE__ */ jsx19(AvatarView3, { children: imageNode }) : imageNode;
|
|
1322
1414
|
}
|
|
1323
|
-
if (iconNode) {
|
|
1324
|
-
|
|
1415
|
+
if (iconNode && icon) {
|
|
1416
|
+
if ("text" in icon || size === 48) {
|
|
1417
|
+
return /* @__PURE__ */ jsx19(AvatarView3, { size, children: iconNode });
|
|
1418
|
+
}
|
|
1419
|
+
return iconNode;
|
|
1420
|
+
}
|
|
1421
|
+
return null;
|
|
1422
|
+
};
|
|
1423
|
+
|
|
1424
|
+
// ../renderers/src/components/Media/Media.tsx
|
|
1425
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1426
|
+
function Media({
|
|
1427
|
+
media,
|
|
1428
|
+
preferAvatar,
|
|
1429
|
+
size
|
|
1430
|
+
}) {
|
|
1431
|
+
switch (media == null ? void 0 : media.type) {
|
|
1432
|
+
case "avatar":
|
|
1433
|
+
return /* @__PURE__ */ jsx20(AvatarMedia, __spreadProps(__spreadValues({}, media), { size }));
|
|
1434
|
+
case "image": {
|
|
1435
|
+
const imageNode = getImageNode(media, size);
|
|
1436
|
+
return preferAvatar ? /* @__PURE__ */ jsx20(AvatarView4, { children: imageNode }) : imageNode;
|
|
1437
|
+
}
|
|
1438
|
+
case "legacy": {
|
|
1439
|
+
return /* @__PURE__ */ jsx20(LegacyMedia, __spreadProps(__spreadValues({}, media), { preferAvatar, size }));
|
|
1440
|
+
}
|
|
1441
|
+
default:
|
|
1442
|
+
return null;
|
|
1325
1443
|
}
|
|
1326
1444
|
}
|
|
1327
1445
|
|
|
1446
|
+
// ../renderers/src/components/Media/OptionMedia.tsx
|
|
1447
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1448
|
+
var mediaSize = 48;
|
|
1449
|
+
function OptionMedia(props) {
|
|
1450
|
+
return /* @__PURE__ */ jsx21(Media, __spreadProps(__spreadValues({}, props), { size: mediaSize }));
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
// ../renderers/src/components/Media/getInlineMedia.tsx
|
|
1454
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1455
|
+
var getInlineMedia = (media) => media ? /* @__PURE__ */ jsx22(Media, { media, preferAvatar: false, size: 24 }) : null;
|
|
1456
|
+
|
|
1328
1457
|
// ../renderers/src/DecisionRenderer.tsx
|
|
1329
|
-
import { jsx as
|
|
1458
|
+
import { jsx as jsx23, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1330
1459
|
var DecisionRenderer = {
|
|
1331
1460
|
canRenderType: "decision",
|
|
1332
1461
|
render: ({ control, margin, options, title }) => /* @__PURE__ */ jsxs4("div", { className: getMargin(margin), children: [
|
|
1333
|
-
title && /* @__PURE__ */
|
|
1334
|
-
/* @__PURE__ */
|
|
1335
|
-
const { description, disabled,
|
|
1336
|
-
return /* @__PURE__ */
|
|
1462
|
+
title && /* @__PURE__ */ jsx23(Header, { as: "h2", title }),
|
|
1463
|
+
/* @__PURE__ */ jsx23(NavigationOptionsList, { children: options.map((option) => {
|
|
1464
|
+
const { description, disabled, media, title: itemTitle, tag, onClick } = option;
|
|
1465
|
+
return /* @__PURE__ */ jsx23(
|
|
1337
1466
|
NavigationOption,
|
|
1338
1467
|
{
|
|
1339
1468
|
title: itemTitle,
|
|
1340
1469
|
content: description,
|
|
1341
1470
|
disabled,
|
|
1342
|
-
media:
|
|
1471
|
+
media: media ? /* @__PURE__ */ jsx23(
|
|
1343
1472
|
OptionMedia,
|
|
1344
1473
|
{
|
|
1345
|
-
|
|
1346
|
-
image,
|
|
1474
|
+
media,
|
|
1347
1475
|
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
1348
1476
|
}
|
|
1349
1477
|
) : null,
|
|
@@ -1359,10 +1487,10 @@ var DecisionRenderer = {
|
|
|
1359
1487
|
var DecisionRenderer_default = DecisionRenderer;
|
|
1360
1488
|
|
|
1361
1489
|
// ../renderers/src/DividerRenderer.tsx
|
|
1362
|
-
import { jsx as
|
|
1490
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1363
1491
|
var DividerRenderer = {
|
|
1364
1492
|
canRenderType: "divider",
|
|
1365
|
-
render: ({ margin }) => /* @__PURE__ */
|
|
1493
|
+
render: ({ margin }) => /* @__PURE__ */ jsx24("hr", { className: `m-t-0 ${getMargin(margin)}` })
|
|
1366
1494
|
};
|
|
1367
1495
|
var DividerRenderer_default = DividerRenderer;
|
|
1368
1496
|
|
|
@@ -1397,7 +1525,7 @@ var external_confirmation_messages_default = defineMessages3({
|
|
|
1397
1525
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
1398
1526
|
import { useIntl as useIntl3 } from "react-intl";
|
|
1399
1527
|
import { useEffect } from "react";
|
|
1400
|
-
import { Fragment, jsx as
|
|
1528
|
+
import { Fragment, jsx as jsx25, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1401
1529
|
var ExternalConfirmationRenderer = {
|
|
1402
1530
|
canRenderType: "external-confirmation",
|
|
1403
1531
|
render: ExternalConfirmationRendererComponent
|
|
@@ -1420,15 +1548,15 @@ function ExternalConfirmationRendererComponent({
|
|
|
1420
1548
|
}
|
|
1421
1549
|
}
|
|
1422
1550
|
}, []);
|
|
1423
|
-
return /* @__PURE__ */
|
|
1551
|
+
return /* @__PURE__ */ jsx25(
|
|
1424
1552
|
Modal,
|
|
1425
1553
|
{
|
|
1426
1554
|
open: status === "failure",
|
|
1427
1555
|
title: formatMessage(external_confirmation_messages_default.title),
|
|
1428
1556
|
body: /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
1429
|
-
/* @__PURE__ */
|
|
1430
|
-
/* @__PURE__ */
|
|
1431
|
-
/* @__PURE__ */
|
|
1557
|
+
/* @__PURE__ */ jsx25(Markdown2, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
|
|
1558
|
+
/* @__PURE__ */ jsx25("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs5("div", { className: "df-box-renderer-width-lg", children: [
|
|
1559
|
+
/* @__PURE__ */ jsx25(
|
|
1432
1560
|
Button3,
|
|
1433
1561
|
{
|
|
1434
1562
|
block: true,
|
|
@@ -1442,7 +1570,7 @@ function ExternalConfirmationRendererComponent({
|
|
|
1442
1570
|
children: formatMessage(external_confirmation_messages_default.open)
|
|
1443
1571
|
}
|
|
1444
1572
|
),
|
|
1445
|
-
/* @__PURE__ */
|
|
1573
|
+
/* @__PURE__ */ jsx25(Button3, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
|
|
1446
1574
|
] }) })
|
|
1447
1575
|
] }),
|
|
1448
1576
|
onClose: onCancel
|
|
@@ -1459,27 +1587,27 @@ function getOrigin(url) {
|
|
|
1459
1587
|
var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
|
|
1460
1588
|
|
|
1461
1589
|
// ../renderers/src/FormRenderer.tsx
|
|
1462
|
-
import { jsx as
|
|
1590
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1463
1591
|
var FormRenderer = {
|
|
1464
1592
|
canRenderType: "form",
|
|
1465
|
-
render: ({ children, margin }) => /* @__PURE__ */
|
|
1593
|
+
render: ({ children, margin }) => /* @__PURE__ */ jsx26("div", { className: getMargin(margin), children })
|
|
1466
1594
|
};
|
|
1467
1595
|
var FormRenderer_default = FormRenderer;
|
|
1468
1596
|
|
|
1469
1597
|
// ../renderers/src/FormSectionRenderer.tsx
|
|
1470
1598
|
import { Header as Header2 } from "@transferwise/components";
|
|
1471
|
-
import { jsx as
|
|
1599
|
+
import { jsx as jsx27, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1472
1600
|
var FormSectionRenderer = {
|
|
1473
1601
|
canRenderType: "form-section",
|
|
1474
1602
|
render: ({ title, description, children }) => /* @__PURE__ */ jsxs6("fieldset", { children: [
|
|
1475
|
-
title && /* @__PURE__ */
|
|
1603
|
+
title && /* @__PURE__ */ jsx27(
|
|
1476
1604
|
Header2,
|
|
1477
1605
|
{
|
|
1478
1606
|
as: "h2",
|
|
1479
1607
|
title
|
|
1480
1608
|
}
|
|
1481
1609
|
),
|
|
1482
|
-
description && /* @__PURE__ */
|
|
1610
|
+
description && /* @__PURE__ */ jsx27("p", { children: description }),
|
|
1483
1611
|
children
|
|
1484
1612
|
] })
|
|
1485
1613
|
};
|
|
@@ -1487,18 +1615,18 @@ var FormSectionRenderer_default = FormSectionRenderer;
|
|
|
1487
1615
|
|
|
1488
1616
|
// ../renderers/src/HeadingRenderer.tsx
|
|
1489
1617
|
import { Display, Title } from "@transferwise/components";
|
|
1490
|
-
import { jsx as
|
|
1618
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1491
1619
|
var HeadingRenderer = {
|
|
1492
1620
|
canRenderType: "heading",
|
|
1493
|
-
render: (props) => /* @__PURE__ */
|
|
1621
|
+
render: (props) => /* @__PURE__ */ jsx28(Heading, __spreadValues({}, props))
|
|
1494
1622
|
};
|
|
1495
1623
|
function Heading(props) {
|
|
1496
1624
|
const { text, size, align, margin, control } = props;
|
|
1497
1625
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
1498
|
-
return control === "display" ? /* @__PURE__ */
|
|
1626
|
+
return control === "display" ? /* @__PURE__ */ jsx28(DisplayHeading, { size, text, className }) : /* @__PURE__ */ jsx28(StandardHeading, { size, text, className });
|
|
1499
1627
|
}
|
|
1500
1628
|
function DisplayHeading({ size, text, className }) {
|
|
1501
|
-
return /* @__PURE__ */
|
|
1629
|
+
return /* @__PURE__ */ jsx28(Display, { type: getDisplayType(size), className, children: text });
|
|
1502
1630
|
}
|
|
1503
1631
|
var getDisplayType = (size) => {
|
|
1504
1632
|
switch (size) {
|
|
@@ -1514,7 +1642,7 @@ var getDisplayType = (size) => {
|
|
|
1514
1642
|
}
|
|
1515
1643
|
};
|
|
1516
1644
|
function StandardHeading({ size, text, className }) {
|
|
1517
|
-
return /* @__PURE__ */
|
|
1645
|
+
return /* @__PURE__ */ jsx28(Title, { type: getTitleTypeBySize(size), className, children: text });
|
|
1518
1646
|
}
|
|
1519
1647
|
var getTitleTypeBySize = (size) => {
|
|
1520
1648
|
var _a;
|
|
@@ -1541,7 +1669,7 @@ function isRelativePath(url = "") {
|
|
|
1541
1669
|
}
|
|
1542
1670
|
|
|
1543
1671
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
1544
|
-
import { jsx as
|
|
1672
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1545
1673
|
function UrlImage({
|
|
1546
1674
|
accessibilityDescription,
|
|
1547
1675
|
align,
|
|
@@ -1556,7 +1684,7 @@ function UrlImage({
|
|
|
1556
1684
|
void getImageSource(httpClient, uri).then(setImageSource);
|
|
1557
1685
|
}
|
|
1558
1686
|
}, [uri, httpClient]);
|
|
1559
|
-
return /* @__PURE__ */
|
|
1687
|
+
return /* @__PURE__ */ jsx29("div", { className: `df-image ${align} ${size || "md"}`, children: /* @__PURE__ */ jsx29(
|
|
1560
1688
|
Image,
|
|
1561
1689
|
{
|
|
1562
1690
|
className: `img-responsive ${getMargin(margin)}`,
|
|
@@ -1600,7 +1728,7 @@ var getImageSource = async (httpClient, imageUrl) => {
|
|
|
1600
1728
|
};
|
|
1601
1729
|
|
|
1602
1730
|
// ../renderers/src/ImageRenderer/UrnFlagImage.tsx
|
|
1603
|
-
import { jsx as
|
|
1731
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1604
1732
|
var maxFlagSize = 600;
|
|
1605
1733
|
function UrnFlagImage({
|
|
1606
1734
|
accessibilityDescription,
|
|
@@ -1609,7 +1737,7 @@ function UrnFlagImage({
|
|
|
1609
1737
|
size,
|
|
1610
1738
|
uri
|
|
1611
1739
|
}) {
|
|
1612
|
-
return /* @__PURE__ */
|
|
1740
|
+
return /* @__PURE__ */ jsx30("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx30(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
|
|
1613
1741
|
}
|
|
1614
1742
|
|
|
1615
1743
|
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
@@ -1621,19 +1749,13 @@ import {
|
|
|
1621
1749
|
|
|
1622
1750
|
// ../renderers/src/ImageRenderer/isAnimated.ts
|
|
1623
1751
|
var isAnimated = (uri) => {
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
}
|
|
1628
|
-
const params = sections[1];
|
|
1629
|
-
if (!params.startsWith("+")) {
|
|
1630
|
-
return false;
|
|
1631
|
-
}
|
|
1632
|
-
return params.substring(1).split("&").some((param) => param === "type=animated");
|
|
1752
|
+
var _a;
|
|
1753
|
+
const { rComponents } = stringToURN(uri);
|
|
1754
|
+
return (_a = rComponents == null ? void 0 : rComponents.some(([key, value]) => key === "type" && value === "animated")) != null ? _a : false;
|
|
1633
1755
|
};
|
|
1634
1756
|
|
|
1635
1757
|
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
1636
|
-
import { jsx as
|
|
1758
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1637
1759
|
var urnPrefix = "urn:wise:illustrations:";
|
|
1638
1760
|
var isUrnIllustration = (uri) => uri.startsWith(urnPrefix);
|
|
1639
1761
|
function UrnIllustration({
|
|
@@ -1647,9 +1769,9 @@ function UrnIllustration({
|
|
|
1647
1769
|
const illustrationName = getIllustrationName(uri);
|
|
1648
1770
|
const illustration3DName = getIllustration3DName(uri);
|
|
1649
1771
|
if (illustration3DName && isAnimated(uri)) {
|
|
1650
|
-
return /* @__PURE__ */
|
|
1772
|
+
return /* @__PURE__ */ jsx31("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx31(Illustration3D, { name: illustration3DName, size: illustrationSize }) });
|
|
1651
1773
|
}
|
|
1652
|
-
return /* @__PURE__ */
|
|
1774
|
+
return /* @__PURE__ */ jsx31("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx31(
|
|
1653
1775
|
Illustration,
|
|
1654
1776
|
{
|
|
1655
1777
|
className: "df-illustration",
|
|
@@ -1669,24 +1791,24 @@ var getIllustration3DName = (uri) => {
|
|
|
1669
1791
|
};
|
|
1670
1792
|
|
|
1671
1793
|
// ../renderers/src/ImageRenderer/UrnImage.tsx
|
|
1672
|
-
import { jsx as
|
|
1794
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1673
1795
|
var isUrnImage = (uri) => uri.startsWith("urn:");
|
|
1674
1796
|
function UrnImage(props) {
|
|
1675
1797
|
const { uri } = props;
|
|
1676
1798
|
if (isUrnIllustration(uri)) {
|
|
1677
|
-
return /* @__PURE__ */
|
|
1799
|
+
return /* @__PURE__ */ jsx32(UrnIllustration, __spreadValues({}, props));
|
|
1678
1800
|
}
|
|
1679
1801
|
if (isUrnFlag(uri)) {
|
|
1680
|
-
return /* @__PURE__ */
|
|
1802
|
+
return /* @__PURE__ */ jsx32(UrnFlagImage, __spreadValues({}, props));
|
|
1681
1803
|
}
|
|
1682
1804
|
return null;
|
|
1683
1805
|
}
|
|
1684
1806
|
|
|
1685
1807
|
// ../renderers/src/ImageRenderer/ImageRenderer.tsx
|
|
1686
|
-
import { jsx as
|
|
1808
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1687
1809
|
var ImageRenderer = {
|
|
1688
1810
|
canRenderType: "image",
|
|
1689
|
-
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */
|
|
1811
|
+
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ jsx33(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ jsx33(UrlImage, __spreadValues({}, props))
|
|
1690
1812
|
};
|
|
1691
1813
|
|
|
1692
1814
|
// ../renderers/src/ImageRenderer/index.tsx
|
|
@@ -1694,7 +1816,7 @@ var ImageRenderer_default = ImageRenderer;
|
|
|
1694
1816
|
|
|
1695
1817
|
// ../renderers/src/InstructionsRenderer.tsx
|
|
1696
1818
|
import { Header as Header3, InstructionsList } from "@transferwise/components";
|
|
1697
|
-
import { jsx as
|
|
1819
|
+
import { jsx as jsx34, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1698
1820
|
var doContext = ["positive", "neutral"];
|
|
1699
1821
|
var dontContext = ["warning", "negative"];
|
|
1700
1822
|
var InstructionsRenderer = {
|
|
@@ -1703,8 +1825,8 @@ var InstructionsRenderer = {
|
|
|
1703
1825
|
const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
|
|
1704
1826
|
const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
|
|
1705
1827
|
return /* @__PURE__ */ jsxs7("div", { className: getMargin(margin), children: [
|
|
1706
|
-
title ? /* @__PURE__ */
|
|
1707
|
-
/* @__PURE__ */
|
|
1828
|
+
title ? /* @__PURE__ */ jsx34(Header3, { title }) : null,
|
|
1829
|
+
/* @__PURE__ */ jsx34(InstructionsList, { dos, donts })
|
|
1708
1830
|
] });
|
|
1709
1831
|
}
|
|
1710
1832
|
};
|
|
@@ -1720,34 +1842,9 @@ var onWheel = (event) => {
|
|
|
1720
1842
|
}
|
|
1721
1843
|
};
|
|
1722
1844
|
|
|
1723
|
-
// ../renderers/src/utils/getInlineAvatar.tsx
|
|
1724
|
-
import { AvatarView as AvatarView3 } from "@transferwise/components";
|
|
1725
|
-
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1726
|
-
var mediaSize2 = 24;
|
|
1727
|
-
function getInlineAvatar({ icon, image }) {
|
|
1728
|
-
const imageNode = getImageNode(image, mediaSize2);
|
|
1729
|
-
const iconNode = getIconNode(icon);
|
|
1730
|
-
const badge = getBadgedMedia(iconNode, imageNode, mediaSize2);
|
|
1731
|
-
if (badge) {
|
|
1732
|
-
return badge;
|
|
1733
|
-
}
|
|
1734
|
-
if (imageNode) {
|
|
1735
|
-
return imageNode;
|
|
1736
|
-
}
|
|
1737
|
-
if (isNamedIcon2(icon) && !isFlagIcon2(icon)) {
|
|
1738
|
-
return iconNode;
|
|
1739
|
-
}
|
|
1740
|
-
if (iconNode) {
|
|
1741
|
-
return /* @__PURE__ */ jsx30(AvatarView3, { size: mediaSize2, children: iconNode });
|
|
1742
|
-
}
|
|
1743
|
-
return null;
|
|
1744
|
-
}
|
|
1745
|
-
var isNamedIcon2 = (icon) => icon ? "name" in icon : false;
|
|
1746
|
-
var isFlagIcon2 = (icon) => isNamedIcon2(icon) && icon.name.startsWith("flag-");
|
|
1747
|
-
|
|
1748
1845
|
// ../renderers/src/utils/getInputGroupAddonStart.tsx
|
|
1749
|
-
var getInputGroupAddonStart = (
|
|
1750
|
-
const content =
|
|
1846
|
+
var getInputGroupAddonStart = (media) => {
|
|
1847
|
+
const content = getInlineMedia(media);
|
|
1751
1848
|
return content ? { content } : void 0;
|
|
1752
1849
|
};
|
|
1753
1850
|
|
|
@@ -1761,11 +1858,11 @@ function pick(obj, ...keys) {
|
|
|
1761
1858
|
}
|
|
1762
1859
|
|
|
1763
1860
|
// ../renderers/src/IntegerInputRenderer.tsx
|
|
1764
|
-
import { jsx as
|
|
1861
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1765
1862
|
var IntegerInputRenderer = {
|
|
1766
1863
|
canRenderType: "input-integer",
|
|
1767
1864
|
render: (props) => {
|
|
1768
|
-
const { id, title, description, help,
|
|
1865
|
+
const { id, title, description, help, media, validationState, value, onChange } = props;
|
|
1769
1866
|
const commonProps = pick(
|
|
1770
1867
|
props,
|
|
1771
1868
|
"autoComplete",
|
|
@@ -1776,7 +1873,7 @@ var IntegerInputRenderer = {
|
|
|
1776
1873
|
"maximum",
|
|
1777
1874
|
"minimum"
|
|
1778
1875
|
);
|
|
1779
|
-
return /* @__PURE__ */
|
|
1876
|
+
return /* @__PURE__ */ jsx35(
|
|
1780
1877
|
FieldInput_default,
|
|
1781
1878
|
{
|
|
1782
1879
|
id,
|
|
@@ -1784,7 +1881,7 @@ var IntegerInputRenderer = {
|
|
|
1784
1881
|
description,
|
|
1785
1882
|
validation: validationState,
|
|
1786
1883
|
help,
|
|
1787
|
-
children: /* @__PURE__ */
|
|
1884
|
+
children: /* @__PURE__ */ jsx35(InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx35(
|
|
1788
1885
|
Input,
|
|
1789
1886
|
__spreadValues({
|
|
1790
1887
|
id,
|
|
@@ -1809,12 +1906,12 @@ var IntegerInputRenderer_default = IntegerInputRenderer;
|
|
|
1809
1906
|
// ../renderers/src/ListRenderer.tsx
|
|
1810
1907
|
import { Body, Header as Header4 } from "@transferwise/components";
|
|
1811
1908
|
import classNames3 from "classnames";
|
|
1812
|
-
import { jsx as
|
|
1909
|
+
import { jsx as jsx36, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1813
1910
|
var ListRenderer = {
|
|
1814
1911
|
canRenderType: "list",
|
|
1815
1912
|
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ jsxs8("div", { className: getMargin(margin), children: [
|
|
1816
|
-
(title || callToAction) && /* @__PURE__ */
|
|
1817
|
-
items.map((props) => /* @__PURE__ */
|
|
1913
|
+
(title || callToAction) && /* @__PURE__ */ jsx36(Header4, { as: "h2", title: title != null ? title : "", action: getListAction(callToAction) }),
|
|
1914
|
+
items.map((props) => /* @__PURE__ */ jsx36(DesignSystemListItem, __spreadProps(__spreadValues({}, props), { control }), props.title))
|
|
1818
1915
|
] })
|
|
1819
1916
|
};
|
|
1820
1917
|
var DesignSystemListItem = ({
|
|
@@ -1823,9 +1920,10 @@ var DesignSystemListItem = ({
|
|
|
1823
1920
|
supportingValues,
|
|
1824
1921
|
icon,
|
|
1825
1922
|
image,
|
|
1923
|
+
media,
|
|
1826
1924
|
control,
|
|
1827
1925
|
tag
|
|
1828
|
-
}) => /* @__PURE__ */
|
|
1926
|
+
}) => /* @__PURE__ */ jsx36(
|
|
1829
1927
|
"label",
|
|
1830
1928
|
{
|
|
1831
1929
|
className: classNames3("np-option p-a-2", {
|
|
@@ -1833,22 +1931,22 @@ var DesignSystemListItem = ({
|
|
|
1833
1931
|
"np-option__container-aligned": true
|
|
1834
1932
|
}),
|
|
1835
1933
|
children: /* @__PURE__ */ jsxs8("div", { className: "media", children: [
|
|
1836
|
-
icon || image ? /* @__PURE__ */
|
|
1934
|
+
icon || image || media ? /* @__PURE__ */ jsx36("div", { className: "media-left", children: /* @__PURE__ */ jsx36(
|
|
1837
1935
|
ListItemMedia,
|
|
1838
1936
|
{
|
|
1839
|
-
image,
|
|
1840
1937
|
icon,
|
|
1938
|
+
media,
|
|
1841
1939
|
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
1842
1940
|
}
|
|
1843
1941
|
) }) : null,
|
|
1844
1942
|
/* @__PURE__ */ jsxs8("div", { className: "media-body", children: [
|
|
1845
1943
|
/* @__PURE__ */ jsxs8("div", { className: "d-flex justify-content-between", children: [
|
|
1846
|
-
/* @__PURE__ */
|
|
1847
|
-
/* @__PURE__ */
|
|
1944
|
+
/* @__PURE__ */ jsx36("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: title }),
|
|
1945
|
+
/* @__PURE__ */ jsx36("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: supportingValues == null ? void 0 : supportingValues.value })
|
|
1848
1946
|
] }),
|
|
1849
1947
|
/* @__PURE__ */ jsxs8("div", { className: "d-flex justify-content-between", children: [
|
|
1850
|
-
/* @__PURE__ */
|
|
1851
|
-
/* @__PURE__ */
|
|
1948
|
+
/* @__PURE__ */ jsx36(Body, { className: "d-block np-option__body", children: description }),
|
|
1949
|
+
/* @__PURE__ */ jsx36(Body, { className: "d-block np-option__body", children: supportingValues == null ? void 0 : supportingValues.subvalue })
|
|
1852
1950
|
] })
|
|
1853
1951
|
] })
|
|
1854
1952
|
] })
|
|
@@ -1857,15 +1955,13 @@ var DesignSystemListItem = ({
|
|
|
1857
1955
|
);
|
|
1858
1956
|
var ListItemMedia = ({
|
|
1859
1957
|
icon,
|
|
1860
|
-
|
|
1958
|
+
media,
|
|
1861
1959
|
preferAvatar
|
|
1862
1960
|
}) => {
|
|
1863
1961
|
if (icon) {
|
|
1864
|
-
return /* @__PURE__ */
|
|
1865
|
-
}
|
|
1866
|
-
if (image) {
|
|
1867
|
-
return /* @__PURE__ */ jsx32("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ jsx32(OptionMedia, { icon, image, preferAvatar }) });
|
|
1962
|
+
return /* @__PURE__ */ jsx36("div", { className: "circle circle-sm text-primary circle-inverse", children: /* @__PURE__ */ jsx36(OptionMedia, { media, preferAvatar }) });
|
|
1868
1963
|
}
|
|
1964
|
+
return /* @__PURE__ */ jsx36("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ jsx36(OptionMedia, { media, preferAvatar }) });
|
|
1869
1965
|
};
|
|
1870
1966
|
var getListAction = (callToAction) => {
|
|
1871
1967
|
if (callToAction) {
|
|
@@ -1881,10 +1977,10 @@ var ListRenderer_default = ListRenderer;
|
|
|
1881
1977
|
|
|
1882
1978
|
// ../renderers/src/LoadingIndicatorRenderer.tsx
|
|
1883
1979
|
import { Loader } from "@transferwise/components";
|
|
1884
|
-
import { jsx as
|
|
1980
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1885
1981
|
var LoadingIndicatorRenderer = {
|
|
1886
1982
|
canRenderType: "loading-indicator",
|
|
1887
|
-
render: ({ margin, size }) => /* @__PURE__ */
|
|
1983
|
+
render: ({ margin, size }) => /* @__PURE__ */ jsx37(
|
|
1888
1984
|
Loader,
|
|
1889
1985
|
{
|
|
1890
1986
|
size,
|
|
@@ -1897,28 +1993,28 @@ var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
|
|
|
1897
1993
|
|
|
1898
1994
|
// ../renderers/src/MarkdownRenderer.tsx
|
|
1899
1995
|
import { Markdown as Markdown3 } from "@transferwise/components";
|
|
1900
|
-
import { jsx as
|
|
1996
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
1901
1997
|
var MarkdownRenderer = {
|
|
1902
1998
|
canRenderType: "markdown",
|
|
1903
|
-
render: ({ content, align, margin }) => /* @__PURE__ */
|
|
1999
|
+
render: ({ content, align, margin }) => /* @__PURE__ */ jsx38("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ jsx38(Markdown3, { className: "np-text-body-large", config: { link: { target: "_blank" } }, children: content }) })
|
|
1904
2000
|
};
|
|
1905
2001
|
var MarkdownRenderer_default = MarkdownRenderer;
|
|
1906
2002
|
|
|
1907
2003
|
// ../renderers/src/ModalLayoutRenderer.tsx
|
|
1908
2004
|
import { Button as Button4, Modal as Modal2 } from "@transferwise/components";
|
|
1909
2005
|
import { useState as useState4 } from "react";
|
|
1910
|
-
import { jsx as
|
|
2006
|
+
import { jsx as jsx39, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1911
2007
|
var ModalLayoutRenderer = {
|
|
1912
2008
|
canRenderType: "modal-layout",
|
|
1913
|
-
render: (props) => /* @__PURE__ */
|
|
2009
|
+
render: (props) => /* @__PURE__ */ jsx39(DFModal, __spreadValues({}, props))
|
|
1914
2010
|
};
|
|
1915
2011
|
var ModalLayoutRenderer_default = ModalLayoutRenderer;
|
|
1916
2012
|
function DFModal({ content, margin, trigger }) {
|
|
1917
2013
|
const [visible, setVisible] = useState4(false);
|
|
1918
2014
|
const { children, title } = content;
|
|
1919
2015
|
return /* @__PURE__ */ jsxs9("div", { className: getMargin(margin), children: [
|
|
1920
|
-
/* @__PURE__ */
|
|
1921
|
-
/* @__PURE__ */
|
|
2016
|
+
/* @__PURE__ */ jsx39(Button4, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
|
|
2017
|
+
/* @__PURE__ */ jsx39(
|
|
1922
2018
|
Modal2,
|
|
1923
2019
|
{
|
|
1924
2020
|
scroll: "content",
|
|
@@ -1934,11 +2030,11 @@ function DFModal({ content, margin, trigger }) {
|
|
|
1934
2030
|
|
|
1935
2031
|
// ../renderers/src/ModalRenderer.tsx
|
|
1936
2032
|
import { Modal as Modal3 } from "@transferwise/components";
|
|
1937
|
-
import { jsx as
|
|
2033
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
1938
2034
|
var ModalRenderer = {
|
|
1939
2035
|
canRenderType: "modal",
|
|
1940
2036
|
render: ({ title, children, open, onClose }) => {
|
|
1941
|
-
return /* @__PURE__ */
|
|
2037
|
+
return /* @__PURE__ */ jsx40(Modal3, { open, title, body: children, onClose });
|
|
1942
2038
|
}
|
|
1943
2039
|
};
|
|
1944
2040
|
|
|
@@ -1958,10 +2054,10 @@ var multi_select_messages_default = defineMessages4({
|
|
|
1958
2054
|
});
|
|
1959
2055
|
|
|
1960
2056
|
// ../renderers/src/MultiSelectInputRenderer.tsx
|
|
1961
|
-
import { jsx as
|
|
2057
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
1962
2058
|
var MultiSelectInputRenderer = {
|
|
1963
2059
|
canRenderType: "input-multi-select",
|
|
1964
|
-
render: (props) => /* @__PURE__ */
|
|
2060
|
+
render: (props) => /* @__PURE__ */ jsx41(MultiSelectInputRendererComponent, __spreadValues({}, props))
|
|
1965
2061
|
};
|
|
1966
2062
|
function MultiSelectInputRendererComponent(props) {
|
|
1967
2063
|
const { formatMessage } = useIntl4();
|
|
@@ -2003,12 +2099,12 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
2003
2099
|
const contentProps = {
|
|
2004
2100
|
title: option.title,
|
|
2005
2101
|
description: option.description,
|
|
2006
|
-
icon: /* @__PURE__ */
|
|
2102
|
+
icon: /* @__PURE__ */ jsx41(OptionMedia, { media: option.media, preferAvatar: false })
|
|
2007
2103
|
};
|
|
2008
|
-
return /* @__PURE__ */
|
|
2104
|
+
return /* @__PURE__ */ jsx41(SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
2009
2105
|
};
|
|
2010
2106
|
const extraProps = { autoComplete };
|
|
2011
|
-
return /* @__PURE__ */
|
|
2107
|
+
return /* @__PURE__ */ jsx41(
|
|
2012
2108
|
FieldInput_default,
|
|
2013
2109
|
{
|
|
2014
2110
|
id,
|
|
@@ -2016,7 +2112,7 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
2016
2112
|
help,
|
|
2017
2113
|
description,
|
|
2018
2114
|
validation: validationState,
|
|
2019
|
-
children: /* @__PURE__ */
|
|
2115
|
+
children: /* @__PURE__ */ jsx41(
|
|
2020
2116
|
SelectInput,
|
|
2021
2117
|
__spreadValues({
|
|
2022
2118
|
id,
|
|
@@ -2061,7 +2157,7 @@ import { UploadInput } from "@transferwise/components";
|
|
|
2061
2157
|
// ../renderers/src/components/UploadFieldInput.tsx
|
|
2062
2158
|
import { InlineAlert as InlineAlert2 } from "@transferwise/components";
|
|
2063
2159
|
import classNames4 from "classnames";
|
|
2064
|
-
import { jsx as
|
|
2160
|
+
import { jsx as jsx42, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2065
2161
|
function UploadFieldInput({
|
|
2066
2162
|
id,
|
|
2067
2163
|
children,
|
|
@@ -2070,7 +2166,7 @@ function UploadFieldInput({
|
|
|
2070
2166
|
help,
|
|
2071
2167
|
validation
|
|
2072
2168
|
}) {
|
|
2073
|
-
const labelContent = label && help ? /* @__PURE__ */
|
|
2169
|
+
const labelContent = label && help ? /* @__PURE__ */ jsx42(LabelContentWithHelp, { text: label, help }) : label;
|
|
2074
2170
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
2075
2171
|
return /* @__PURE__ */ jsxs10(
|
|
2076
2172
|
"div",
|
|
@@ -2079,9 +2175,9 @@ function UploadFieldInput({
|
|
|
2079
2175
|
"has-error": (validation == null ? void 0 : validation.status) === "invalid"
|
|
2080
2176
|
}),
|
|
2081
2177
|
children: [
|
|
2082
|
-
/* @__PURE__ */
|
|
2178
|
+
/* @__PURE__ */ jsx42("label", { htmlFor: id, className: "control-label", children: labelContent }),
|
|
2083
2179
|
children,
|
|
2084
|
-
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */
|
|
2180
|
+
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ jsx42(InlineAlert2, { type: "negative", id: descriptionId, children: validation.message })
|
|
2085
2181
|
]
|
|
2086
2182
|
}
|
|
2087
2183
|
);
|
|
@@ -2116,7 +2212,7 @@ var getSizeLimit = (maxSize) => {
|
|
|
2116
2212
|
};
|
|
2117
2213
|
|
|
2118
2214
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
2119
|
-
import { jsx as
|
|
2215
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
2120
2216
|
var MultiUploadInputRenderer = {
|
|
2121
2217
|
canRenderType: "input-upload-multi",
|
|
2122
2218
|
render: (props) => {
|
|
@@ -2141,7 +2237,7 @@ var MultiUploadInputRenderer = {
|
|
|
2141
2237
|
};
|
|
2142
2238
|
const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
|
|
2143
2239
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
2144
|
-
return /* @__PURE__ */
|
|
2240
|
+
return /* @__PURE__ */ jsx43(
|
|
2145
2241
|
UploadFieldInput_default,
|
|
2146
2242
|
{
|
|
2147
2243
|
id,
|
|
@@ -2149,7 +2245,7 @@ var MultiUploadInputRenderer = {
|
|
|
2149
2245
|
description,
|
|
2150
2246
|
validation: validationState,
|
|
2151
2247
|
help,
|
|
2152
|
-
children: /* @__PURE__ */
|
|
2248
|
+
children: /* @__PURE__ */ jsx43(
|
|
2153
2249
|
UploadInput,
|
|
2154
2250
|
{
|
|
2155
2251
|
id,
|
|
@@ -2173,11 +2269,11 @@ var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
|
|
|
2173
2269
|
|
|
2174
2270
|
// ../renderers/src/NumberInputRenderer.tsx
|
|
2175
2271
|
import { Input as Input2, InputGroup as InputGroup2 } from "@transferwise/components";
|
|
2176
|
-
import { jsx as
|
|
2272
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
2177
2273
|
var NumberInputRenderer = {
|
|
2178
2274
|
canRenderType: "input-number",
|
|
2179
2275
|
render: (props) => {
|
|
2180
|
-
const { id, title, description, help,
|
|
2276
|
+
const { id, title, description, help, media, validationState, value, onChange } = props;
|
|
2181
2277
|
const commonProps = pick(
|
|
2182
2278
|
props,
|
|
2183
2279
|
"disabled",
|
|
@@ -2187,7 +2283,7 @@ var NumberInputRenderer = {
|
|
|
2187
2283
|
"maximum",
|
|
2188
2284
|
"minimum"
|
|
2189
2285
|
);
|
|
2190
|
-
return /* @__PURE__ */
|
|
2286
|
+
return /* @__PURE__ */ jsx44(
|
|
2191
2287
|
FieldInput_default,
|
|
2192
2288
|
{
|
|
2193
2289
|
id,
|
|
@@ -2195,7 +2291,7 @@ var NumberInputRenderer = {
|
|
|
2195
2291
|
description,
|
|
2196
2292
|
validation: validationState,
|
|
2197
2293
|
help,
|
|
2198
|
-
children: /* @__PURE__ */
|
|
2294
|
+
children: /* @__PURE__ */ jsx44(InputGroup2, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx44(
|
|
2199
2295
|
Input2,
|
|
2200
2296
|
__spreadValues({
|
|
2201
2297
|
id,
|
|
@@ -2247,17 +2343,17 @@ var paragraph_messages_default = defineMessages5({
|
|
|
2247
2343
|
});
|
|
2248
2344
|
|
|
2249
2345
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
2250
|
-
import { jsx as
|
|
2346
|
+
import { jsx as jsx45, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2251
2347
|
var ParagraphRenderer = {
|
|
2252
2348
|
canRenderType: "paragraph",
|
|
2253
|
-
render: (props) => /* @__PURE__ */
|
|
2349
|
+
render: (props) => /* @__PURE__ */ jsx45(Paragraph, __spreadValues({}, props))
|
|
2254
2350
|
};
|
|
2255
2351
|
function Paragraph({ align, control, margin, text }) {
|
|
2256
2352
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
2257
|
-
return control === "copyable" ? /* @__PURE__ */
|
|
2353
|
+
return control === "copyable" ? /* @__PURE__ */ jsx45(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ jsx45(StandardParagraph, { className, text });
|
|
2258
2354
|
}
|
|
2259
2355
|
function StandardParagraph({ text, className }) {
|
|
2260
|
-
return /* @__PURE__ */
|
|
2356
|
+
return /* @__PURE__ */ jsx45("p", { className: `np-text-body-large ${className}`, children: text });
|
|
2261
2357
|
}
|
|
2262
2358
|
function CopyableParagraph({
|
|
2263
2359
|
text,
|
|
@@ -2272,7 +2368,7 @@ function CopyableParagraph({
|
|
|
2272
2368
|
};
|
|
2273
2369
|
const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
|
|
2274
2370
|
return /* @__PURE__ */ jsxs11("div", { className, children: [
|
|
2275
|
-
/* @__PURE__ */
|
|
2371
|
+
/* @__PURE__ */ jsx45(
|
|
2276
2372
|
Input3,
|
|
2277
2373
|
{
|
|
2278
2374
|
type: "text",
|
|
@@ -2281,7 +2377,7 @@ function CopyableParagraph({
|
|
|
2281
2377
|
className: classNames5("text-ellipsis", inputAlignmentClasses)
|
|
2282
2378
|
}
|
|
2283
2379
|
),
|
|
2284
|
-
/* @__PURE__ */
|
|
2380
|
+
/* @__PURE__ */ jsx45(Button5, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
|
|
2285
2381
|
] });
|
|
2286
2382
|
}
|
|
2287
2383
|
var ParagraphRenderer_default = ParagraphRenderer;
|
|
@@ -2319,10 +2415,10 @@ var repeatable_messages_default = defineMessages6({
|
|
|
2319
2415
|
});
|
|
2320
2416
|
|
|
2321
2417
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
2322
|
-
import { Fragment as Fragment2, jsx as
|
|
2418
|
+
import { Fragment as Fragment2, jsx as jsx46, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2323
2419
|
var RepeatableRenderer = {
|
|
2324
2420
|
canRenderType: "repeatable",
|
|
2325
|
-
render: (props) => /* @__PURE__ */
|
|
2421
|
+
render: (props) => /* @__PURE__ */ jsx46(Repeatable, __spreadValues({}, props))
|
|
2326
2422
|
};
|
|
2327
2423
|
function Repeatable(props) {
|
|
2328
2424
|
const {
|
|
@@ -2362,8 +2458,8 @@ function Repeatable(props) {
|
|
|
2362
2458
|
setOpenModalType(null);
|
|
2363
2459
|
};
|
|
2364
2460
|
return /* @__PURE__ */ jsxs12(Fragment2, { children: [
|
|
2365
|
-
title && /* @__PURE__ */
|
|
2366
|
-
description && /* @__PURE__ */
|
|
2461
|
+
title && /* @__PURE__ */ jsx46(Header5, { title }),
|
|
2462
|
+
description && /* @__PURE__ */ jsx46("p", { children: description }),
|
|
2367
2463
|
/* @__PURE__ */ jsxs12(
|
|
2368
2464
|
"div",
|
|
2369
2465
|
{
|
|
@@ -2371,30 +2467,30 @@ function Repeatable(props) {
|
|
|
2371
2467
|
"has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
|
|
2372
2468
|
}),
|
|
2373
2469
|
children: [
|
|
2374
|
-
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */
|
|
2375
|
-
/* @__PURE__ */
|
|
2470
|
+
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx46(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
|
|
2471
|
+
/* @__PURE__ */ jsx46(
|
|
2376
2472
|
NavigationOption2,
|
|
2377
2473
|
{
|
|
2378
|
-
media: /* @__PURE__ */
|
|
2474
|
+
media: /* @__PURE__ */ jsx46(Plus, {}),
|
|
2379
2475
|
title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2380
2476
|
showMediaAtAllSizes: true,
|
|
2381
2477
|
onClick: () => onAddItem()
|
|
2382
2478
|
}
|
|
2383
2479
|
),
|
|
2384
|
-
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */
|
|
2480
|
+
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx46(InlineAlert3, { type: "negative", children: validationState.message })
|
|
2385
2481
|
]
|
|
2386
2482
|
}
|
|
2387
2483
|
),
|
|
2388
|
-
/* @__PURE__ */
|
|
2484
|
+
/* @__PURE__ */ jsx46(
|
|
2389
2485
|
Modal4,
|
|
2390
2486
|
{
|
|
2391
2487
|
open: openModalType !== null,
|
|
2392
2488
|
title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2393
2489
|
body: /* @__PURE__ */ jsxs12(Fragment2, { children: [
|
|
2394
|
-
/* @__PURE__ */
|
|
2490
|
+
/* @__PURE__ */ jsx46("div", { className: "m-b-2", children: editableItem }),
|
|
2395
2491
|
/* @__PURE__ */ jsxs12("div", { children: [
|
|
2396
|
-
/* @__PURE__ */
|
|
2397
|
-
/* @__PURE__ */
|
|
2492
|
+
/* @__PURE__ */ jsx46(Button6, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
|
|
2493
|
+
/* @__PURE__ */ jsx46(Button6, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
|
|
2398
2494
|
] })
|
|
2399
2495
|
] }),
|
|
2400
2496
|
onClose: () => onCancelEdit()
|
|
@@ -2406,10 +2502,10 @@ function ItemSummaryOption({
|
|
|
2406
2502
|
item,
|
|
2407
2503
|
onClick
|
|
2408
2504
|
}) {
|
|
2409
|
-
return /* @__PURE__ */
|
|
2505
|
+
return /* @__PURE__ */ jsx46(
|
|
2410
2506
|
NavigationOption2,
|
|
2411
2507
|
{
|
|
2412
|
-
media: /* @__PURE__ */
|
|
2508
|
+
media: /* @__PURE__ */ jsx46(OptionMedia, { media: item.media, preferAvatar: false }),
|
|
2413
2509
|
title: item.title,
|
|
2414
2510
|
content: item.description,
|
|
2415
2511
|
showMediaAtAllSizes: true,
|
|
@@ -2444,14 +2540,14 @@ var getHeaderAction = (callToAction) => {
|
|
|
2444
2540
|
};
|
|
2445
2541
|
|
|
2446
2542
|
// ../renderers/src/ReviewRenderer.tsx
|
|
2447
|
-
import { Fragment as Fragment3, jsx as
|
|
2543
|
+
import { Fragment as Fragment3, jsx as jsx47, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2448
2544
|
var ReviewRenderer = {
|
|
2449
2545
|
canRenderType: "review",
|
|
2450
2546
|
render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
|
|
2451
2547
|
const orientation = mapControlToDefinitionListLayout(control);
|
|
2452
2548
|
return /* @__PURE__ */ jsxs13("div", { className: getMargin(margin), children: [
|
|
2453
|
-
(title || callToAction) && /* @__PURE__ */
|
|
2454
|
-
/* @__PURE__ */
|
|
2549
|
+
(title || callToAction) && /* @__PURE__ */ jsx47(Header6, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
|
|
2550
|
+
/* @__PURE__ */ jsx47("div", { className: margin, children: /* @__PURE__ */ jsx47(
|
|
2455
2551
|
DefinitionList,
|
|
2456
2552
|
{
|
|
2457
2553
|
layout: orientation,
|
|
@@ -2491,13 +2587,13 @@ var mapControlToDefinitionListLayout = (control) => {
|
|
|
2491
2587
|
var getFieldValue = (value, help, orientation, onClick) => {
|
|
2492
2588
|
if (help) {
|
|
2493
2589
|
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs13(Fragment3, { children: [
|
|
2494
|
-
/* @__PURE__ */
|
|
2590
|
+
/* @__PURE__ */ jsx47(Help_default, { help, onClick }),
|
|
2495
2591
|
" ",
|
|
2496
2592
|
value
|
|
2497
2593
|
] }) : /* @__PURE__ */ jsxs13(Fragment3, { children: [
|
|
2498
2594
|
value,
|
|
2499
2595
|
" ",
|
|
2500
|
-
/* @__PURE__ */
|
|
2596
|
+
/* @__PURE__ */ jsx47(Help_default, { help, onClick })
|
|
2501
2597
|
] });
|
|
2502
2598
|
}
|
|
2503
2599
|
return value;
|
|
@@ -2543,7 +2639,7 @@ var generic_error_messages_default = defineMessages8({
|
|
|
2543
2639
|
|
|
2544
2640
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
2545
2641
|
import { Button as Button7 } from "@transferwise/components";
|
|
2546
|
-
import { jsx as
|
|
2642
|
+
import { jsx as jsx48, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2547
2643
|
function ErrorResult({ state }) {
|
|
2548
2644
|
const intl = useIntl7();
|
|
2549
2645
|
const buttonVisualProps = {
|
|
@@ -2554,7 +2650,7 @@ function ErrorResult({ state }) {
|
|
|
2554
2650
|
return /* @__PURE__ */ jsxs14("p", { className: "m-t-2", children: [
|
|
2555
2651
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
2556
2652
|
"\xA0",
|
|
2557
|
-
/* @__PURE__ */
|
|
2653
|
+
/* @__PURE__ */ jsx48(
|
|
2558
2654
|
Button7,
|
|
2559
2655
|
__spreadProps(__spreadValues({}, buttonVisualProps), {
|
|
2560
2656
|
onClick: () => {
|
|
@@ -2567,7 +2663,7 @@ function ErrorResult({ state }) {
|
|
|
2567
2663
|
}
|
|
2568
2664
|
|
|
2569
2665
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
2570
|
-
import { Fragment as Fragment4, jsx as
|
|
2666
|
+
import { Fragment as Fragment4, jsx as jsx49, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2571
2667
|
function BlockSearchRendererComponent({
|
|
2572
2668
|
id,
|
|
2573
2669
|
isLoading,
|
|
@@ -2581,7 +2677,7 @@ function BlockSearchRendererComponent({
|
|
|
2581
2677
|
const [hasSearched, setHasSearched] = useState7(false);
|
|
2582
2678
|
const { formatMessage } = useIntl8();
|
|
2583
2679
|
return /* @__PURE__ */ jsxs15("div", { className: getMargin(margin), children: [
|
|
2584
|
-
/* @__PURE__ */
|
|
2680
|
+
/* @__PURE__ */ jsx49(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx49(
|
|
2585
2681
|
Input4,
|
|
2586
2682
|
{
|
|
2587
2683
|
id,
|
|
@@ -2598,7 +2694,7 @@ function BlockSearchRendererComponent({
|
|
|
2598
2694
|
}
|
|
2599
2695
|
}
|
|
2600
2696
|
) }),
|
|
2601
|
-
isLoading ? /* @__PURE__ */
|
|
2697
|
+
isLoading ? /* @__PURE__ */ jsx49(Fragment4, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx49(SearchResultContent, { state, trackEvent })
|
|
2602
2698
|
] });
|
|
2603
2699
|
}
|
|
2604
2700
|
function SearchResultContent({
|
|
@@ -2607,31 +2703,31 @@ function SearchResultContent({
|
|
|
2607
2703
|
}) {
|
|
2608
2704
|
switch (state.type) {
|
|
2609
2705
|
case "error":
|
|
2610
|
-
return /* @__PURE__ */
|
|
2706
|
+
return /* @__PURE__ */ jsx49(ErrorResult, { state });
|
|
2611
2707
|
case "results":
|
|
2612
|
-
return /* @__PURE__ */
|
|
2708
|
+
return /* @__PURE__ */ jsx49(SearchResults, { state, trackEvent });
|
|
2613
2709
|
case "noResults":
|
|
2614
|
-
return /* @__PURE__ */
|
|
2710
|
+
return /* @__PURE__ */ jsx49(EmptySearchResult, { state });
|
|
2615
2711
|
case "pending":
|
|
2616
2712
|
default:
|
|
2617
2713
|
return null;
|
|
2618
2714
|
}
|
|
2619
2715
|
}
|
|
2620
2716
|
function EmptySearchResult({ state }) {
|
|
2621
|
-
return /* @__PURE__ */
|
|
2717
|
+
return /* @__PURE__ */ jsx49(Markdown4, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
2622
2718
|
}
|
|
2623
2719
|
function SearchResults({
|
|
2624
2720
|
state,
|
|
2625
2721
|
trackEvent
|
|
2626
2722
|
}) {
|
|
2627
|
-
return /* @__PURE__ */
|
|
2628
|
-
const {
|
|
2629
|
-
return /* @__PURE__ */
|
|
2723
|
+
return /* @__PURE__ */ jsx49(NavigationOptionsList2, { children: state.results.map((result) => {
|
|
2724
|
+
const { media } = result;
|
|
2725
|
+
return /* @__PURE__ */ jsx49(
|
|
2630
2726
|
NavigationOption3,
|
|
2631
2727
|
{
|
|
2632
2728
|
title: result.title,
|
|
2633
2729
|
content: result.description,
|
|
2634
|
-
media: OptionMedia({
|
|
2730
|
+
media: OptionMedia({ media, preferAvatar: false }),
|
|
2635
2731
|
showMediaCircle: false,
|
|
2636
2732
|
showMediaAtAllSizes: true,
|
|
2637
2733
|
onClick: () => {
|
|
@@ -2652,7 +2748,7 @@ import { Markdown as Markdown5, Typeahead } from "@transferwise/components";
|
|
|
2652
2748
|
import { Search } from "@transferwise/icons";
|
|
2653
2749
|
import { useState as useState8 } from "react";
|
|
2654
2750
|
import { useIntl as useIntl9 } from "react-intl";
|
|
2655
|
-
import { jsx as
|
|
2751
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
2656
2752
|
function InlineSearchRenderer({
|
|
2657
2753
|
id,
|
|
2658
2754
|
isLoading,
|
|
@@ -2664,7 +2760,7 @@ function InlineSearchRenderer({
|
|
|
2664
2760
|
}) {
|
|
2665
2761
|
const [hasSearched, setHasSearched] = useState8(false);
|
|
2666
2762
|
const intl = useIntl9();
|
|
2667
|
-
return /* @__PURE__ */
|
|
2763
|
+
return /* @__PURE__ */ jsx50("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx50(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx50(
|
|
2668
2764
|
Typeahead,
|
|
2669
2765
|
{
|
|
2670
2766
|
id: "typeahead-input-id",
|
|
@@ -2672,10 +2768,10 @@ function InlineSearchRenderer({
|
|
|
2672
2768
|
name: "typeahead-input-name",
|
|
2673
2769
|
size: "md",
|
|
2674
2770
|
maxHeight: 100,
|
|
2675
|
-
footer: /* @__PURE__ */
|
|
2771
|
+
footer: /* @__PURE__ */ jsx50(TypeaheadFooter, { state, isLoading }),
|
|
2676
2772
|
multiple: false,
|
|
2677
2773
|
clearable: false,
|
|
2678
|
-
addon: /* @__PURE__ */
|
|
2774
|
+
addon: /* @__PURE__ */ jsx50(Search, { size: 24 }),
|
|
2679
2775
|
options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
|
|
2680
2776
|
minQueryLength: 1,
|
|
2681
2777
|
onChange: (values) => {
|
|
@@ -2712,34 +2808,34 @@ function mapResultToTypeaheadOption(result) {
|
|
|
2712
2808
|
function TypeaheadFooter({ state, isLoading }) {
|
|
2713
2809
|
const { formatMessage } = useIntl9();
|
|
2714
2810
|
if (state.type === "noResults") {
|
|
2715
|
-
return /* @__PURE__ */
|
|
2811
|
+
return /* @__PURE__ */ jsx50(Markdown5, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
2716
2812
|
}
|
|
2717
2813
|
if (state.type === "error") {
|
|
2718
|
-
return /* @__PURE__ */
|
|
2814
|
+
return /* @__PURE__ */ jsx50("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx50(ErrorResult, { state }) });
|
|
2719
2815
|
}
|
|
2720
2816
|
if (state.type === "pending" || isLoading) {
|
|
2721
|
-
return /* @__PURE__ */
|
|
2817
|
+
return /* @__PURE__ */ jsx50("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
|
|
2722
2818
|
}
|
|
2723
2819
|
return null;
|
|
2724
2820
|
}
|
|
2725
2821
|
var InlineSearchRendererComponent_default = InlineSearchRenderer;
|
|
2726
2822
|
|
|
2727
2823
|
// ../renderers/src/SearchRenderer/SearchRenderer.tsx
|
|
2728
|
-
import { jsx as
|
|
2824
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
2729
2825
|
var SearchRenderer = {
|
|
2730
2826
|
canRenderType: "search",
|
|
2731
|
-
render: (props) => props.control === "inline" ? /* @__PURE__ */
|
|
2827
|
+
render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx51(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx51(BlockSearchRendererComponent_default, __spreadValues({}, props))
|
|
2732
2828
|
};
|
|
2733
2829
|
var SearchRenderer_default = SearchRenderer;
|
|
2734
2830
|
|
|
2735
2831
|
// ../renderers/src/SectionRenderer.tsx
|
|
2736
2832
|
import { Header as Header7 } from "@transferwise/components";
|
|
2737
|
-
import { jsx as
|
|
2833
|
+
import { jsx as jsx52, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2738
2834
|
var SectionRenderer = {
|
|
2739
2835
|
canRenderType: "section",
|
|
2740
2836
|
render: ({ children, callToAction, margin, title }) => {
|
|
2741
2837
|
return /* @__PURE__ */ jsxs16("section", { className: getMargin(margin), children: [
|
|
2742
|
-
(title || callToAction) && /* @__PURE__ */
|
|
2838
|
+
(title || callToAction) && /* @__PURE__ */ jsx52(Header7, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
|
|
2743
2839
|
children
|
|
2744
2840
|
] });
|
|
2745
2841
|
}
|
|
@@ -2748,7 +2844,7 @@ var SectionRenderer_default = SectionRenderer;
|
|
|
2748
2844
|
|
|
2749
2845
|
// ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
2750
2846
|
import { RadioGroup } from "@transferwise/components";
|
|
2751
|
-
import { Fragment as Fragment5, jsx as
|
|
2847
|
+
import { Fragment as Fragment5, jsx as jsx53, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2752
2848
|
function RadioInputRendererComponent(props) {
|
|
2753
2849
|
const {
|
|
2754
2850
|
id,
|
|
@@ -2763,7 +2859,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2763
2859
|
onSelect
|
|
2764
2860
|
} = props;
|
|
2765
2861
|
return /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
2766
|
-
/* @__PURE__ */
|
|
2862
|
+
/* @__PURE__ */ jsx53(
|
|
2767
2863
|
FieldInput_default,
|
|
2768
2864
|
{
|
|
2769
2865
|
id,
|
|
@@ -2771,7 +2867,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2771
2867
|
help,
|
|
2772
2868
|
description,
|
|
2773
2869
|
validation: validationState,
|
|
2774
|
-
children: /* @__PURE__ */
|
|
2870
|
+
children: /* @__PURE__ */ jsx53("span", { children: /* @__PURE__ */ jsx53(
|
|
2775
2871
|
RadioGroup,
|
|
2776
2872
|
{
|
|
2777
2873
|
name: id,
|
|
@@ -2780,7 +2876,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2780
2876
|
value: index,
|
|
2781
2877
|
secondary: option.description,
|
|
2782
2878
|
disabled: option.disabled || disabled,
|
|
2783
|
-
avatar: /* @__PURE__ */
|
|
2879
|
+
avatar: /* @__PURE__ */ jsx53(OptionMedia, { media: option.media, preferAvatar: false })
|
|
2784
2880
|
})),
|
|
2785
2881
|
selectedValue: selectedIndex != null ? selectedIndex : void 0,
|
|
2786
2882
|
onChange: onSelect
|
|
@@ -2796,7 +2892,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2796
2892
|
// ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
2797
2893
|
import { Tabs } from "@transferwise/components";
|
|
2798
2894
|
import { useEffect as useEffect3 } from "react";
|
|
2799
|
-
import { Fragment as Fragment6, jsx as
|
|
2895
|
+
import { Fragment as Fragment6, jsx as jsx54, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2800
2896
|
function TabInputRendererComponent(props) {
|
|
2801
2897
|
const {
|
|
2802
2898
|
id,
|
|
@@ -2816,7 +2912,7 @@ function TabInputRendererComponent(props) {
|
|
|
2816
2912
|
}
|
|
2817
2913
|
}, [selectedIndex, onSelect, options.length]);
|
|
2818
2914
|
return /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
2819
|
-
/* @__PURE__ */
|
|
2915
|
+
/* @__PURE__ */ jsx54(
|
|
2820
2916
|
FieldInput_default,
|
|
2821
2917
|
{
|
|
2822
2918
|
id,
|
|
@@ -2824,7 +2920,7 @@ function TabInputRendererComponent(props) {
|
|
|
2824
2920
|
help,
|
|
2825
2921
|
description,
|
|
2826
2922
|
validation: validationState,
|
|
2827
|
-
children: /* @__PURE__ */
|
|
2923
|
+
children: /* @__PURE__ */ jsx54(
|
|
2828
2924
|
Tabs,
|
|
2829
2925
|
{
|
|
2830
2926
|
name: id,
|
|
@@ -2833,7 +2929,7 @@ function TabInputRendererComponent(props) {
|
|
|
2833
2929
|
title: option.title,
|
|
2834
2930
|
// if we pass null, we get some props-types console errors
|
|
2835
2931
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
2836
|
-
content: /* @__PURE__ */
|
|
2932
|
+
content: /* @__PURE__ */ jsx54(Fragment6, {}),
|
|
2837
2933
|
disabled: option.disabled || disabled
|
|
2838
2934
|
})),
|
|
2839
2935
|
onTabSelect: onSelect
|
|
@@ -2848,7 +2944,7 @@ var isValidIndex = (index, options) => index !== null && index >= 0 && index < o
|
|
|
2848
2944
|
|
|
2849
2945
|
// ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
2850
2946
|
import { SelectInput as SelectInput2, SelectInputOptionContent as SelectInputOptionContent2 } from "@transferwise/components";
|
|
2851
|
-
import { Fragment as Fragment7, jsx as
|
|
2947
|
+
import { Fragment as Fragment7, jsx as jsx55, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2852
2948
|
function SelectInputRendererComponent(props) {
|
|
2853
2949
|
const {
|
|
2854
2950
|
id,
|
|
@@ -2884,17 +2980,17 @@ function SelectInputRendererComponent(props) {
|
|
|
2884
2980
|
const contentProps = withinTrigger ? {
|
|
2885
2981
|
title: option.title,
|
|
2886
2982
|
note: option.description,
|
|
2887
|
-
icon:
|
|
2983
|
+
icon: getInlineMedia(option.media)
|
|
2888
2984
|
} : {
|
|
2889
2985
|
title: option.title,
|
|
2890
2986
|
description: option.description,
|
|
2891
|
-
icon: /* @__PURE__ */
|
|
2987
|
+
icon: /* @__PURE__ */ jsx55(OptionMedia, { media: option.media, preferAvatar: false })
|
|
2892
2988
|
};
|
|
2893
|
-
return /* @__PURE__ */
|
|
2989
|
+
return /* @__PURE__ */ jsx55(SelectInputOptionContent2, __spreadValues({}, contentProps));
|
|
2894
2990
|
};
|
|
2895
2991
|
const extraProps = { autoComplete };
|
|
2896
2992
|
return /* @__PURE__ */ jsxs19(Fragment7, { children: [
|
|
2897
|
-
/* @__PURE__ */
|
|
2993
|
+
/* @__PURE__ */ jsx55(
|
|
2898
2994
|
FieldInput_default,
|
|
2899
2995
|
{
|
|
2900
2996
|
id,
|
|
@@ -2902,7 +2998,7 @@ function SelectInputRendererComponent(props) {
|
|
|
2902
2998
|
help,
|
|
2903
2999
|
description,
|
|
2904
3000
|
validation: validationState,
|
|
2905
|
-
children: /* @__PURE__ */
|
|
3001
|
+
children: /* @__PURE__ */ jsx55(
|
|
2906
3002
|
SelectInput2,
|
|
2907
3003
|
__spreadValues({
|
|
2908
3004
|
name: id,
|
|
@@ -2925,7 +3021,7 @@ function SelectInputRendererComponent(props) {
|
|
|
2925
3021
|
// ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
|
|
2926
3022
|
import { useEffect as useEffect4 } from "react";
|
|
2927
3023
|
import { SegmentedControl } from "@transferwise/components";
|
|
2928
|
-
import { Fragment as Fragment8, jsx as
|
|
3024
|
+
import { Fragment as Fragment8, jsx as jsx56, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2929
3025
|
function SegmentedInputRendererComponent(props) {
|
|
2930
3026
|
const {
|
|
2931
3027
|
id,
|
|
@@ -2944,7 +3040,7 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2944
3040
|
}
|
|
2945
3041
|
}, [selectedIndex, onSelect, options.length]);
|
|
2946
3042
|
return /* @__PURE__ */ jsxs20(Fragment8, { children: [
|
|
2947
|
-
/* @__PURE__ */
|
|
3043
|
+
/* @__PURE__ */ jsx56(
|
|
2948
3044
|
FieldInput_default,
|
|
2949
3045
|
{
|
|
2950
3046
|
id,
|
|
@@ -2952,7 +3048,7 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2952
3048
|
help,
|
|
2953
3049
|
description,
|
|
2954
3050
|
validation: validationState,
|
|
2955
|
-
children: /* @__PURE__ */
|
|
3051
|
+
children: /* @__PURE__ */ jsx56(
|
|
2956
3052
|
SegmentedControl,
|
|
2957
3053
|
{
|
|
2958
3054
|
name: `${id}-segmented-control`,
|
|
@@ -2969,26 +3065,26 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2969
3065
|
)
|
|
2970
3066
|
}
|
|
2971
3067
|
),
|
|
2972
|
-
/* @__PURE__ */
|
|
3068
|
+
/* @__PURE__ */ jsx56("div", { id: `${id}-children`, children })
|
|
2973
3069
|
] });
|
|
2974
3070
|
}
|
|
2975
3071
|
var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
|
|
2976
3072
|
|
|
2977
3073
|
// ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
|
|
2978
|
-
import { jsx as
|
|
3074
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
2979
3075
|
var SelectInputRenderer = {
|
|
2980
3076
|
canRenderType: "input-select",
|
|
2981
3077
|
render: (props) => {
|
|
2982
3078
|
switch (props.control) {
|
|
2983
3079
|
case "radio":
|
|
2984
|
-
return /* @__PURE__ */
|
|
3080
|
+
return /* @__PURE__ */ jsx57(RadioInputRendererComponent, __spreadValues({}, props));
|
|
2985
3081
|
case "tab":
|
|
2986
|
-
return props.options.length > 3 ? /* @__PURE__ */
|
|
3082
|
+
return props.options.length > 3 ? /* @__PURE__ */ jsx57(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx57(TabInputRendererComponent, __spreadValues({}, props));
|
|
2987
3083
|
case "segmented":
|
|
2988
|
-
return props.options.length > 3 ? /* @__PURE__ */
|
|
3084
|
+
return props.options.length > 3 ? /* @__PURE__ */ jsx57(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx57(SegmentedInputRendererComponent, __spreadValues({}, props));
|
|
2989
3085
|
case "select":
|
|
2990
3086
|
default:
|
|
2991
|
-
return /* @__PURE__ */
|
|
3087
|
+
return /* @__PURE__ */ jsx57(SelectInputRendererComponent, __spreadValues({}, props));
|
|
2992
3088
|
}
|
|
2993
3089
|
}
|
|
2994
3090
|
};
|
|
@@ -2996,17 +3092,17 @@ var SelectInputRenderer_default = SelectInputRenderer;
|
|
|
2996
3092
|
|
|
2997
3093
|
// ../renderers/src/StatusListRenderer.tsx
|
|
2998
3094
|
import { Header as Header8, Summary } from "@transferwise/components";
|
|
2999
|
-
import { jsx as
|
|
3095
|
+
import { jsx as jsx58, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3000
3096
|
var StatusListRenderer = {
|
|
3001
3097
|
canRenderType: "status-list",
|
|
3002
3098
|
render: ({ margin, items, title }) => /* @__PURE__ */ jsxs21("div", { className: getMargin(margin), children: [
|
|
3003
|
-
title ? /* @__PURE__ */
|
|
3004
|
-
items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */
|
|
3099
|
+
title ? /* @__PURE__ */ jsx58(Header8, { title, className: "m-b-2" }) : null,
|
|
3100
|
+
items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */ jsx58(
|
|
3005
3101
|
Summary,
|
|
3006
3102
|
{
|
|
3007
3103
|
title: itemTitle,
|
|
3008
3104
|
description,
|
|
3009
|
-
icon: icon && "name" in icon ? /* @__PURE__ */
|
|
3105
|
+
icon: icon && "name" in icon ? /* @__PURE__ */ jsx58(DynamicIcon_default, { name: icon.name }) : null,
|
|
3010
3106
|
status: mapStatus(status),
|
|
3011
3107
|
action: getSummaryAction(callToAction)
|
|
3012
3108
|
},
|
|
@@ -3058,11 +3154,11 @@ var useCustomTheme = (theme, trackEvent) => {
|
|
|
3058
3154
|
};
|
|
3059
3155
|
|
|
3060
3156
|
// ../renderers/src/step/BackButton.tsx
|
|
3061
|
-
import { AvatarView as
|
|
3157
|
+
import { AvatarView as AvatarView5 } from "@transferwise/components";
|
|
3062
3158
|
import { ArrowLeft } from "@transferwise/icons";
|
|
3063
|
-
import { jsx as
|
|
3159
|
+
import { jsx as jsx59, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3064
3160
|
function BackButton({ title, onClick }) {
|
|
3065
|
-
return /* @__PURE__ */
|
|
3161
|
+
return /* @__PURE__ */ jsx59("div", { className: "m-b-2", children: /* @__PURE__ */ jsxs22(
|
|
3066
3162
|
"button",
|
|
3067
3163
|
{
|
|
3068
3164
|
type: "button",
|
|
@@ -3071,8 +3167,8 @@ function BackButton({ title, onClick }) {
|
|
|
3071
3167
|
"aria-label": title,
|
|
3072
3168
|
onClick,
|
|
3073
3169
|
children: [
|
|
3074
|
-
/* @__PURE__ */
|
|
3075
|
-
/* @__PURE__ */
|
|
3170
|
+
/* @__PURE__ */ jsx59("span", { className: "sr-only", children: title }),
|
|
3171
|
+
/* @__PURE__ */ jsx59(AvatarView5, { interactive: true, children: /* @__PURE__ */ jsx59(ArrowLeft, { size: "24" }) })
|
|
3076
3172
|
]
|
|
3077
3173
|
}
|
|
3078
3174
|
) });
|
|
@@ -3080,7 +3176,7 @@ function BackButton({ title, onClick }) {
|
|
|
3080
3176
|
var BackButton_default = BackButton;
|
|
3081
3177
|
|
|
3082
3178
|
// ../renderers/src/step/SplashCelebrationStepRenderer.tsx
|
|
3083
|
-
import { jsx as
|
|
3179
|
+
import { jsx as jsx60, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3084
3180
|
var SplashCelebrationStepRenderer = {
|
|
3085
3181
|
canRenderType: "step",
|
|
3086
3182
|
canRender: ({ control }) => control === "splash-celebration",
|
|
@@ -3090,13 +3186,13 @@ function SplashCelebrationStepRendererComponent(props) {
|
|
|
3090
3186
|
const { back, children, trackEvent } = props;
|
|
3091
3187
|
useCustomTheme("forest-green", trackEvent);
|
|
3092
3188
|
return /* @__PURE__ */ jsxs23("div", { className: "splash-screen m-t-5", children: [
|
|
3093
|
-
back ? /* @__PURE__ */
|
|
3189
|
+
back ? /* @__PURE__ */ jsx60(BackButton_default, __spreadValues({}, back)) : null,
|
|
3094
3190
|
children
|
|
3095
3191
|
] });
|
|
3096
3192
|
}
|
|
3097
3193
|
|
|
3098
3194
|
// ../renderers/src/step/SplashStepRenderer.tsx
|
|
3099
|
-
import { jsx as
|
|
3195
|
+
import { jsx as jsx61, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3100
3196
|
var SplashStepRenderer = {
|
|
3101
3197
|
canRenderType: "step",
|
|
3102
3198
|
canRender: ({ control }) => control === "splash",
|
|
@@ -3105,14 +3201,14 @@ var SplashStepRenderer = {
|
|
|
3105
3201
|
function SplashStepRendererComponent(props) {
|
|
3106
3202
|
const { back, children } = props;
|
|
3107
3203
|
return /* @__PURE__ */ jsxs24("div", { className: "splash-screen m-t-5", children: [
|
|
3108
|
-
back ? /* @__PURE__ */
|
|
3204
|
+
back ? /* @__PURE__ */ jsx61(BackButton_default, __spreadValues({}, back)) : null,
|
|
3109
3205
|
children
|
|
3110
3206
|
] });
|
|
3111
3207
|
}
|
|
3112
3208
|
|
|
3113
3209
|
// ../renderers/src/step/StepRenderer.tsx
|
|
3114
3210
|
import { Alert as Alert2, Title as Title2 } from "@transferwise/components";
|
|
3115
|
-
import { Fragment as Fragment9, jsx as
|
|
3211
|
+
import { Fragment as Fragment9, jsx as jsx62, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3116
3212
|
var StepRenderer = {
|
|
3117
3213
|
canRenderType: "step",
|
|
3118
3214
|
render: StepRendererComponent
|
|
@@ -3120,12 +3216,12 @@ var StepRenderer = {
|
|
|
3120
3216
|
function StepRendererComponent(props) {
|
|
3121
3217
|
const { back, description, error, title, children } = props;
|
|
3122
3218
|
return /* @__PURE__ */ jsxs25(Fragment9, { children: [
|
|
3123
|
-
back ? /* @__PURE__ */
|
|
3219
|
+
back ? /* @__PURE__ */ jsx62(BackButton_default, __spreadValues({}, back)) : null,
|
|
3124
3220
|
title || description ? /* @__PURE__ */ jsxs25("div", { className: "m-b-4", children: [
|
|
3125
|
-
title ? /* @__PURE__ */
|
|
3126
|
-
description ? /* @__PURE__ */
|
|
3221
|
+
title ? /* @__PURE__ */ jsx62(Title2, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
|
|
3222
|
+
description ? /* @__PURE__ */ jsx62("p", { className: "text-xs-center np-text-body-large", children: description }) : void 0
|
|
3127
3223
|
] }) : void 0,
|
|
3128
|
-
error ? /* @__PURE__ */
|
|
3224
|
+
error ? /* @__PURE__ */ jsx62(Alert2, { type: "negative", className: "m-b-2", message: error }) : void 0,
|
|
3129
3225
|
children
|
|
3130
3226
|
] });
|
|
3131
3227
|
}
|
|
@@ -3133,26 +3229,26 @@ function StepRendererComponent(props) {
|
|
|
3133
3229
|
// ../renderers/src/TabsRenderer.tsx
|
|
3134
3230
|
import { Chips, SegmentedControl as SegmentedControl2, Tabs as Tabs2 } from "@transferwise/components";
|
|
3135
3231
|
import { useState as useState9 } from "react";
|
|
3136
|
-
import { jsx as
|
|
3232
|
+
import { jsx as jsx63, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3137
3233
|
var TabsRenderer = {
|
|
3138
3234
|
canRenderType: "tabs",
|
|
3139
3235
|
render: (props) => {
|
|
3140
3236
|
switch (props.control) {
|
|
3141
3237
|
case "segmented":
|
|
3142
3238
|
if (props.tabs.length > 3) {
|
|
3143
|
-
return /* @__PURE__ */
|
|
3239
|
+
return /* @__PURE__ */ jsx63(TabsRendererComponent, __spreadValues({}, props));
|
|
3144
3240
|
}
|
|
3145
|
-
return /* @__PURE__ */
|
|
3241
|
+
return /* @__PURE__ */ jsx63(SegmentedTabsRendererComponent, __spreadValues({}, props));
|
|
3146
3242
|
case "chips":
|
|
3147
|
-
return /* @__PURE__ */
|
|
3243
|
+
return /* @__PURE__ */ jsx63(ChipsTabsRendererComponent, __spreadValues({}, props));
|
|
3148
3244
|
default:
|
|
3149
|
-
return /* @__PURE__ */
|
|
3245
|
+
return /* @__PURE__ */ jsx63(TabsRendererComponent, __spreadValues({}, props));
|
|
3150
3246
|
}
|
|
3151
3247
|
}
|
|
3152
3248
|
};
|
|
3153
3249
|
function TabsRendererComponent({ uid, margin, tabs }) {
|
|
3154
3250
|
const [selectedIndex, setSelectedIndex] = useState9(0);
|
|
3155
|
-
return /* @__PURE__ */
|
|
3251
|
+
return /* @__PURE__ */ jsx63("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx63(
|
|
3156
3252
|
Tabs2,
|
|
3157
3253
|
{
|
|
3158
3254
|
name: uid,
|
|
@@ -3174,7 +3270,7 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
|
3174
3270
|
var _a;
|
|
3175
3271
|
const [selectedIndex, setSelectedIndex] = useState9(0);
|
|
3176
3272
|
return /* @__PURE__ */ jsxs26("div", { className: getMargin(margin), children: [
|
|
3177
|
-
/* @__PURE__ */
|
|
3273
|
+
/* @__PURE__ */ jsx63(
|
|
3178
3274
|
SegmentedControl2,
|
|
3179
3275
|
{
|
|
3180
3276
|
name: uid,
|
|
@@ -3189,14 +3285,14 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
|
3189
3285
|
onChange: (value) => setSelectedIndex(Number(value))
|
|
3190
3286
|
}
|
|
3191
3287
|
),
|
|
3192
|
-
/* @__PURE__ */
|
|
3288
|
+
/* @__PURE__ */ jsx63("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
3193
3289
|
] });
|
|
3194
3290
|
}
|
|
3195
3291
|
function ChipsTabsRendererComponent({ margin, tabs }) {
|
|
3196
3292
|
var _a;
|
|
3197
3293
|
const [selectedIndex, setSelectedIndex] = useState9(0);
|
|
3198
3294
|
return /* @__PURE__ */ jsxs26("div", { className: getMargin(margin), children: [
|
|
3199
|
-
/* @__PURE__ */
|
|
3295
|
+
/* @__PURE__ */ jsx63("div", { className: "chips-container", children: /* @__PURE__ */ jsx63(
|
|
3200
3296
|
Chips,
|
|
3201
3297
|
{
|
|
3202
3298
|
chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
|
|
@@ -3204,7 +3300,7 @@ function ChipsTabsRendererComponent({ margin, tabs }) {
|
|
|
3204
3300
|
onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
|
|
3205
3301
|
}
|
|
3206
3302
|
) }),
|
|
3207
|
-
/* @__PURE__ */
|
|
3303
|
+
/* @__PURE__ */ jsx63("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
3208
3304
|
] });
|
|
3209
3305
|
}
|
|
3210
3306
|
|
|
@@ -3219,7 +3315,7 @@ import {
|
|
|
3219
3315
|
TextArea,
|
|
3220
3316
|
TextareaWithDisplayFormat
|
|
3221
3317
|
} from "@transferwise/components";
|
|
3222
|
-
import { jsx as
|
|
3318
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
3223
3319
|
var commonKeys = [
|
|
3224
3320
|
"autoComplete",
|
|
3225
3321
|
"autoCapitalize",
|
|
@@ -3238,12 +3334,12 @@ function VariableTextInput(inputProps) {
|
|
|
3238
3334
|
const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
|
|
3239
3335
|
switch (control) {
|
|
3240
3336
|
case "email":
|
|
3241
|
-
return /* @__PURE__ */
|
|
3337
|
+
return /* @__PURE__ */ jsx64(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
|
|
3242
3338
|
case "password":
|
|
3243
|
-
return /* @__PURE__ */
|
|
3339
|
+
return /* @__PURE__ */ jsx64(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
|
|
3244
3340
|
case "numeric": {
|
|
3245
3341
|
const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
|
|
3246
|
-
return /* @__PURE__ */
|
|
3342
|
+
return /* @__PURE__ */ jsx64(
|
|
3247
3343
|
TextInput,
|
|
3248
3344
|
__spreadProps(__spreadValues({}, numericProps), {
|
|
3249
3345
|
onChange: (newValue) => {
|
|
@@ -3254,9 +3350,9 @@ function VariableTextInput(inputProps) {
|
|
|
3254
3350
|
);
|
|
3255
3351
|
}
|
|
3256
3352
|
case "phone-number":
|
|
3257
|
-
return /* @__PURE__ */
|
|
3353
|
+
return /* @__PURE__ */ jsx64(PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
|
|
3258
3354
|
default: {
|
|
3259
|
-
return /* @__PURE__ */
|
|
3355
|
+
return /* @__PURE__ */ jsx64(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
|
|
3260
3356
|
}
|
|
3261
3357
|
}
|
|
3262
3358
|
}
|
|
@@ -3264,11 +3360,11 @@ function TextInput(props) {
|
|
|
3264
3360
|
const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
|
|
3265
3361
|
const InputWithPattern = control === "textarea" ? TextareaWithDisplayFormat : InputWithDisplayFormat;
|
|
3266
3362
|
const InputWithoutPattern = control === "textarea" ? TextArea : Input5;
|
|
3267
|
-
return displayFormat ? /* @__PURE__ */
|
|
3363
|
+
return displayFormat ? /* @__PURE__ */ jsx64(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ jsx64(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
|
|
3268
3364
|
}
|
|
3269
3365
|
|
|
3270
3366
|
// ../renderers/src/TextInputRenderer.tsx
|
|
3271
|
-
import { jsx as
|
|
3367
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
3272
3368
|
var TextInputRenderer = {
|
|
3273
3369
|
canRenderType: "input-text",
|
|
3274
3370
|
render: (props) => {
|
|
@@ -3277,8 +3373,7 @@ var TextInputRenderer = {
|
|
|
3277
3373
|
title,
|
|
3278
3374
|
description,
|
|
3279
3375
|
help,
|
|
3280
|
-
|
|
3281
|
-
image,
|
|
3376
|
+
media,
|
|
3282
3377
|
validationState,
|
|
3283
3378
|
value: initialValue,
|
|
3284
3379
|
onChange
|
|
@@ -3287,8 +3382,7 @@ var TextInputRenderer = {
|
|
|
3287
3382
|
"title",
|
|
3288
3383
|
"description",
|
|
3289
3384
|
"help",
|
|
3290
|
-
"
|
|
3291
|
-
"image",
|
|
3385
|
+
"media",
|
|
3292
3386
|
"validationState",
|
|
3293
3387
|
"value",
|
|
3294
3388
|
"onChange"
|
|
@@ -3303,7 +3397,7 @@ var TextInputRenderer = {
|
|
|
3303
3397
|
}
|
|
3304
3398
|
}
|
|
3305
3399
|
});
|
|
3306
|
-
return /* @__PURE__ */
|
|
3400
|
+
return /* @__PURE__ */ jsx65(
|
|
3307
3401
|
FieldInput_default,
|
|
3308
3402
|
{
|
|
3309
3403
|
id,
|
|
@@ -3311,7 +3405,7 @@ var TextInputRenderer = {
|
|
|
3311
3405
|
description,
|
|
3312
3406
|
validation: validationState,
|
|
3313
3407
|
help,
|
|
3314
|
-
children: /* @__PURE__ */
|
|
3408
|
+
children: /* @__PURE__ */ jsx65(InputGroup3, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx65(VariableTextInput, __spreadValues({}, inputProps)) })
|
|
3315
3409
|
}
|
|
3316
3410
|
);
|
|
3317
3411
|
}
|
|
@@ -3325,7 +3419,7 @@ import { Upload, UploadInput as UploadInput2 } from "@transferwise/components";
|
|
|
3325
3419
|
var getRandomId = () => Math.random().toString(36).substring(2);
|
|
3326
3420
|
|
|
3327
3421
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
3328
|
-
import { jsx as
|
|
3422
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
3329
3423
|
var UploadInputRenderer = {
|
|
3330
3424
|
canRenderType: "input-upload",
|
|
3331
3425
|
render: (props) => {
|
|
@@ -3341,14 +3435,14 @@ var UploadInputRenderer = {
|
|
|
3341
3435
|
};
|
|
3342
3436
|
return (
|
|
3343
3437
|
// We don't pass help here as there is no sensible place to display it
|
|
3344
|
-
/* @__PURE__ */
|
|
3438
|
+
/* @__PURE__ */ jsx66(
|
|
3345
3439
|
UploadFieldInput_default,
|
|
3346
3440
|
{
|
|
3347
3441
|
id,
|
|
3348
3442
|
label: void 0,
|
|
3349
3443
|
description: void 0,
|
|
3350
3444
|
validation: validationState,
|
|
3351
|
-
children: /* @__PURE__ */
|
|
3445
|
+
children: /* @__PURE__ */ jsx66(
|
|
3352
3446
|
UploadInput2,
|
|
3353
3447
|
{
|
|
3354
3448
|
id,
|
|
@@ -3407,7 +3501,7 @@ var LargeUploadRenderer = {
|
|
|
3407
3501
|
};
|
|
3408
3502
|
const filetypes = acceptsToFileTypes(accepts);
|
|
3409
3503
|
const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
|
|
3410
|
-
return /* @__PURE__ */
|
|
3504
|
+
return /* @__PURE__ */ jsx66(
|
|
3411
3505
|
FieldInput_default,
|
|
3412
3506
|
{
|
|
3413
3507
|
id,
|
|
@@ -3415,7 +3509,7 @@ var LargeUploadRenderer = {
|
|
|
3415
3509
|
description,
|
|
3416
3510
|
validation: validationState,
|
|
3417
3511
|
help,
|
|
3418
|
-
children: /* @__PURE__ */
|
|
3512
|
+
children: /* @__PURE__ */ jsx66(
|
|
3419
3513
|
Upload,
|
|
3420
3514
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
3421
3515
|
usAccept,
|
|
@@ -3430,8 +3524,183 @@ var LargeUploadRenderer = {
|
|
|
3430
3524
|
}
|
|
3431
3525
|
};
|
|
3432
3526
|
|
|
3527
|
+
// ../renderers/src/NewListItem/NewDecisionRenderer.tsx
|
|
3528
|
+
import { Header as Header9, ListItem as ListItem2 } from "@transferwise/components";
|
|
3529
|
+
|
|
3530
|
+
// ../renderers/src/NewListItem/getInlineAlert.tsx
|
|
3531
|
+
import { ListItem } from "@transferwise/components";
|
|
3532
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
3533
|
+
var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */ jsx67(ListItem.Prompt, { sentiment: inlineAlert == null ? void 0 : inlineAlert.context, children: inlineAlert.content }) : void 0;
|
|
3534
|
+
|
|
3535
|
+
// ../renderers/src/NewListItem/NewDecisionRenderer.tsx
|
|
3536
|
+
import { jsx as jsx68, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3537
|
+
var DecisionRenderer2 = {
|
|
3538
|
+
canRenderType: "decision",
|
|
3539
|
+
render: ({ control, margin, options, title }) => /* @__PURE__ */ jsxs27("div", { className: getMargin(margin), children: [
|
|
3540
|
+
title && /* @__PURE__ */ jsx68(Header9, { as: "h2", title }),
|
|
3541
|
+
options.map((option) => {
|
|
3542
|
+
const {
|
|
3543
|
+
description,
|
|
3544
|
+
disabled,
|
|
3545
|
+
media,
|
|
3546
|
+
title: itemTitle,
|
|
3547
|
+
tag,
|
|
3548
|
+
href,
|
|
3549
|
+
additionalText,
|
|
3550
|
+
inlineAlert,
|
|
3551
|
+
supportingValues,
|
|
3552
|
+
onClick
|
|
3553
|
+
} = option;
|
|
3554
|
+
return /* @__PURE__ */ jsx68(
|
|
3555
|
+
ListItem2,
|
|
3556
|
+
{
|
|
3557
|
+
title: itemTitle,
|
|
3558
|
+
subtitle: description,
|
|
3559
|
+
spotlight: control === "spotlight" ? tag === "spotlight-active" ? "active" : "inactive" : void 0,
|
|
3560
|
+
disabled,
|
|
3561
|
+
valueTitle: supportingValues == null ? void 0 : supportingValues.value,
|
|
3562
|
+
valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
|
|
3563
|
+
media: media ? /* @__PURE__ */ jsx68(
|
|
3564
|
+
OptionMedia,
|
|
3565
|
+
{
|
|
3566
|
+
media,
|
|
3567
|
+
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
3568
|
+
}
|
|
3569
|
+
) : void 0,
|
|
3570
|
+
prompt: getInlineAlert(inlineAlert),
|
|
3571
|
+
additionalInfo: additionalText ? /* @__PURE__ */ jsx68(ListItem2.AdditionalInfo, { children: additionalText }) : void 0,
|
|
3572
|
+
control: href ? /* @__PURE__ */ jsx68(ListItem2.Navigation, { href, target: "_blank" }) : /* @__PURE__ */ jsx68(ListItem2.Navigation, { onClick })
|
|
3573
|
+
},
|
|
3574
|
+
JSON.stringify(option)
|
|
3575
|
+
);
|
|
3576
|
+
})
|
|
3577
|
+
] })
|
|
3578
|
+
};
|
|
3579
|
+
var NewDecisionRenderer_default = DecisionRenderer2;
|
|
3580
|
+
|
|
3581
|
+
// ../renderers/src/NewListItem/NewListRenderer.tsx
|
|
3582
|
+
import { Header as Header10, ListItem as ListItem4 } from "@transferwise/components";
|
|
3583
|
+
|
|
3584
|
+
// ../renderers/src/NewListItem/getAdditionalInfo.tsx
|
|
3585
|
+
import { ListItem as ListItem3 } from "@transferwise/components";
|
|
3586
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
3587
|
+
var getAdditionalInfo = (additionalInfo) => {
|
|
3588
|
+
var _a;
|
|
3589
|
+
return additionalInfo ? (
|
|
3590
|
+
// TODO: this type should have an href so we can render anchors
|
|
3591
|
+
additionalInfo.onClick ? /* @__PURE__ */ jsx69(
|
|
3592
|
+
ListItem3.AdditionalInfo,
|
|
3593
|
+
{
|
|
3594
|
+
action: {
|
|
3595
|
+
onClick: additionalInfo.onClick,
|
|
3596
|
+
label: (_a = additionalInfo.text) != null ? _a : ""
|
|
3597
|
+
}
|
|
3598
|
+
}
|
|
3599
|
+
) : /* @__PURE__ */ jsx69(ListItem3.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text })
|
|
3600
|
+
) : void 0;
|
|
3601
|
+
};
|
|
3602
|
+
|
|
3603
|
+
// ../renderers/src/NewListItem/NewListRenderer.tsx
|
|
3604
|
+
import { jsx as jsx70, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3605
|
+
var ListRenderer2 = {
|
|
3606
|
+
canRenderType: "list",
|
|
3607
|
+
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ jsxs28("div", { className: getMargin(margin), children: [
|
|
3608
|
+
(title || callToAction) && /* @__PURE__ */ jsx70(Header10, { as: "h2", title: title != null ? title : "", action: getListAction2(callToAction) }),
|
|
3609
|
+
items.map(
|
|
3610
|
+
({
|
|
3611
|
+
title: itemTitle,
|
|
3612
|
+
description,
|
|
3613
|
+
supportingValues,
|
|
3614
|
+
media,
|
|
3615
|
+
tag,
|
|
3616
|
+
additionalInfo,
|
|
3617
|
+
inlineAlert
|
|
3618
|
+
}) => /* @__PURE__ */ jsx70(
|
|
3619
|
+
ListItem4,
|
|
3620
|
+
{
|
|
3621
|
+
title: itemTitle,
|
|
3622
|
+
subtitle: description,
|
|
3623
|
+
valueTitle: supportingValues == null ? void 0 : supportingValues.value,
|
|
3624
|
+
valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
|
|
3625
|
+
media: media ? /* @__PURE__ */ jsx70(
|
|
3626
|
+
OptionMedia,
|
|
3627
|
+
{
|
|
3628
|
+
media,
|
|
3629
|
+
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
3630
|
+
}
|
|
3631
|
+
) : void 0,
|
|
3632
|
+
prompt: getInlineAlert(inlineAlert),
|
|
3633
|
+
additionalInfo: getAdditionalInfo(additionalInfo)
|
|
3634
|
+
},
|
|
3635
|
+
itemTitle
|
|
3636
|
+
)
|
|
3637
|
+
)
|
|
3638
|
+
] })
|
|
3639
|
+
};
|
|
3640
|
+
var getListAction2 = (callToAction) => {
|
|
3641
|
+
if (callToAction) {
|
|
3642
|
+
return __spreadValues({
|
|
3643
|
+
"aria-label": callToAction.accessibilityDescription,
|
|
3644
|
+
text: callToAction.title,
|
|
3645
|
+
onClick: callToAction.onClick
|
|
3646
|
+
}, callToAction.type === "link" ? { href: callToAction.href, target: "_blank" } : {});
|
|
3647
|
+
}
|
|
3648
|
+
return void 0;
|
|
3649
|
+
};
|
|
3650
|
+
var NewListRenderer_default = ListRenderer2;
|
|
3651
|
+
|
|
3652
|
+
// ../renderers/src/NewListItem/NewReviewRenderer.tsx
|
|
3653
|
+
import { Header as Header11, ListItem as ListItem5 } from "@transferwise/components";
|
|
3654
|
+
import { jsx as jsx71, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3655
|
+
var ReviewRenderer2 = {
|
|
3656
|
+
canRenderType: "review",
|
|
3657
|
+
render: ({ callToAction, control, margin, fields, title }) => /* @__PURE__ */ jsxs29("div", { className: getMargin(margin), children: [
|
|
3658
|
+
(title || callToAction) && /* @__PURE__ */ jsx71(Header11, { as: "h2", title: title != null ? title : "", action: getHeaderAction(callToAction) }),
|
|
3659
|
+
fields.map(({ label, value, media, tag, additionalInfo, inlineAlert, callToAction: callToAction2 }) => /* @__PURE__ */ jsx71(
|
|
3660
|
+
ListItem5,
|
|
3661
|
+
{
|
|
3662
|
+
title: value,
|
|
3663
|
+
subtitle: label,
|
|
3664
|
+
inverted: true,
|
|
3665
|
+
media: media ? /* @__PURE__ */ jsx71(
|
|
3666
|
+
OptionMedia,
|
|
3667
|
+
{
|
|
3668
|
+
media,
|
|
3669
|
+
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
3670
|
+
}
|
|
3671
|
+
) : void 0,
|
|
3672
|
+
control: getControl(callToAction2),
|
|
3673
|
+
prompt: getInlineAlert(inlineAlert),
|
|
3674
|
+
additionalInfo: getAdditionalInfo(additionalInfo)
|
|
3675
|
+
},
|
|
3676
|
+
label
|
|
3677
|
+
))
|
|
3678
|
+
] })
|
|
3679
|
+
};
|
|
3680
|
+
var getControl = (callToAction) => {
|
|
3681
|
+
if (!callToAction) {
|
|
3682
|
+
return void 0;
|
|
3683
|
+
}
|
|
3684
|
+
const { accessibilityDescription, href, title, onClick } = callToAction;
|
|
3685
|
+
if (href) {
|
|
3686
|
+
return /* @__PURE__ */ jsx71(ListItem5.Button, { href, partiallyInteractive: true, "aria-description": accessibilityDescription, children: title });
|
|
3687
|
+
}
|
|
3688
|
+
return /* @__PURE__ */ jsx71(
|
|
3689
|
+
ListItem5.Button,
|
|
3690
|
+
{
|
|
3691
|
+
onClick,
|
|
3692
|
+
partiallyInteractive: true,
|
|
3693
|
+
"aria-description": accessibilityDescription,
|
|
3694
|
+
children: title
|
|
3695
|
+
}
|
|
3696
|
+
);
|
|
3697
|
+
};
|
|
3698
|
+
var NewReviewRenderer_default = ReviewRenderer2;
|
|
3699
|
+
|
|
3433
3700
|
// ../renderers/src/getWiseRenderers.ts
|
|
3434
|
-
var
|
|
3701
|
+
var internalRenderers = [NewDecisionRenderer_default, NewListRenderer_default, NewReviewRenderer_default];
|
|
3702
|
+
var getWiseRenderers = (internal = false) => [
|
|
3703
|
+
...internal ? internalRenderers : [],
|
|
3435
3704
|
AddressValidationButtonRenderer_default,
|
|
3436
3705
|
AlertRenderer_default,
|
|
3437
3706
|
CheckboxInputRenderer_default,
|
|
@@ -3530,12 +3799,12 @@ var messages_default = defineMessages9({
|
|
|
3530
3799
|
});
|
|
3531
3800
|
|
|
3532
3801
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
3533
|
-
import { jsx as
|
|
3802
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
3534
3803
|
var wiseRenderers = getWiseRenderers();
|
|
3535
3804
|
function DynamicFlowLegacy(props) {
|
|
3536
3805
|
const { customFetch = globalThis.fetch } = props;
|
|
3537
3806
|
const coreProps = __spreadProps(__spreadValues({}, props), { httpClient: customFetch });
|
|
3538
|
-
return /* @__PURE__ */
|
|
3807
|
+
return /* @__PURE__ */ jsx72(DynamicFlowCoreLegacy, __spreadValues({}, coreProps));
|
|
3539
3808
|
}
|
|
3540
3809
|
function DynamicFlowRevamp(props) {
|
|
3541
3810
|
const {
|
|
@@ -3572,7 +3841,7 @@ function DynamicFlowRevamp(props) {
|
|
|
3572
3841
|
onLink,
|
|
3573
3842
|
onCopy
|
|
3574
3843
|
});
|
|
3575
|
-
return /* @__PURE__ */
|
|
3844
|
+
return /* @__PURE__ */ jsx72("div", { className, children: /* @__PURE__ */ jsx72(DynamicFlowCoreRevamp, __spreadValues({}, coreProps)) });
|
|
3576
3845
|
}
|
|
3577
3846
|
var DynamicForm = forwardRef(function DynamicForm2(props, ref) {
|
|
3578
3847
|
const {
|
|
@@ -3609,7 +3878,7 @@ var DynamicForm = forwardRef(function DynamicForm2(props, ref) {
|
|
|
3609
3878
|
onLink,
|
|
3610
3879
|
onCopy
|
|
3611
3880
|
});
|
|
3612
|
-
return /* @__PURE__ */
|
|
3881
|
+
return /* @__PURE__ */ jsx72("div", { className, children: /* @__PURE__ */ jsx72(DynamicFormCore, __spreadProps(__spreadValues({}, coreProps), { ref })) });
|
|
3613
3882
|
});
|
|
3614
3883
|
var useWiseHttpClient = (httpClient) => {
|
|
3615
3884
|
const { locale } = useIntl10();
|