@wise/dynamic-flow-client-internal 4.20.3 → 4.21.0-experimental-fae3d25
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 +660 -391
- package/build/main.mjs +559 -290
- package/package.json +6 -6
package/build/main.js
CHANGED
|
@@ -1239,29 +1239,36 @@ var DateInputRenderer = {
|
|
|
1239
1239
|
var DateInputRenderer_default = DateInputRenderer;
|
|
1240
1240
|
|
|
1241
1241
|
// ../renderers/src/DecisionRenderer.tsx
|
|
1242
|
-
var
|
|
1243
|
-
|
|
1244
|
-
// ../renderers/src/components/OptionMedia.tsx
|
|
1245
|
-
var import_components9 = require("@transferwise/components");
|
|
1246
|
-
|
|
1247
|
-
// ../renderers/src/utils/image-utils.tsx
|
|
1248
|
-
var import_components8 = require("@transferwise/components");
|
|
1242
|
+
var import_components12 = require("@transferwise/components");
|
|
1249
1243
|
|
|
1250
|
-
// ../renderers/src/
|
|
1244
|
+
// ../renderers/src/utils/UrnFlag.tsx
|
|
1251
1245
|
var import_art = require("@wise/art");
|
|
1252
1246
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1247
|
+
var countryUrnPrefix = "urn:wise:countries:";
|
|
1248
|
+
var currencyUrnPrefix = "urn:wise:currencies:";
|
|
1249
|
+
var isUrnFlag = (uri) => uri.startsWith(countryUrnPrefix) || uri.startsWith(currencyUrnPrefix);
|
|
1250
|
+
function UrnFlag({ size, urn }) {
|
|
1251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_art.Flag, { code: getCode(urn), intrinsicSize: size });
|
|
1252
|
+
}
|
|
1253
|
+
var getCode = (urn) => {
|
|
1254
|
+
return urn.replace(countryUrnPrefix, "").replace(currencyUrnPrefix, "").replace(":image", "").split("?")[0];
|
|
1255
|
+
};
|
|
1256
|
+
|
|
1257
|
+
// ../renderers/src/components/icon/FlagIcon.tsx
|
|
1258
|
+
var import_art2 = require("@wise/art");
|
|
1259
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1253
1260
|
var isFlagIcon = (name) => name.startsWith("flag-");
|
|
1254
1261
|
function FlagIcon({ name }) {
|
|
1255
1262
|
if (!isFlagIcon(name)) {
|
|
1256
1263
|
return null;
|
|
1257
1264
|
}
|
|
1258
1265
|
const code = name.substring(5);
|
|
1259
|
-
return /* @__PURE__ */ (0,
|
|
1266
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_art2.Flag, { code, intrinsicSize: 24 });
|
|
1260
1267
|
}
|
|
1261
1268
|
|
|
1262
1269
|
// ../renderers/src/components/icon/NamedIcon.tsx
|
|
1263
1270
|
var icons = __toESM(require("@transferwise/icons"));
|
|
1264
|
-
var
|
|
1271
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1265
1272
|
var isNamedIcon = (name) => {
|
|
1266
1273
|
const iconName = toCapitalisedCamelCase(name);
|
|
1267
1274
|
return Object.keys(icons).includes(iconName);
|
|
@@ -1272,43 +1279,129 @@ function NamedIcon({ name }) {
|
|
|
1272
1279
|
}
|
|
1273
1280
|
const iconName = toCapitalisedCamelCase(name);
|
|
1274
1281
|
const Icon = icons[iconName];
|
|
1275
|
-
return /* @__PURE__ */ (0,
|
|
1282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { size: 24 });
|
|
1276
1283
|
}
|
|
1277
1284
|
var toCapitalisedCamelCase = (value) => value.split("-").map(capitaliseFirstChar).join("");
|
|
1278
1285
|
var capitaliseFirstChar = (value) => `${value[0].toUpperCase()}${value.slice(1)}`;
|
|
1279
1286
|
|
|
1280
1287
|
// ../renderers/src/components/icon/DynamicIcon.tsx
|
|
1281
|
-
var
|
|
1288
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1282
1289
|
function DynamicIcon({ name }) {
|
|
1283
1290
|
if (isFlagIcon(name)) {
|
|
1284
|
-
return /* @__PURE__ */ (0,
|
|
1291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FlagIcon, { name });
|
|
1285
1292
|
}
|
|
1286
1293
|
if (isNamedIcon(name)) {
|
|
1287
|
-
return /* @__PURE__ */ (0,
|
|
1294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(NamedIcon, { name });
|
|
1288
1295
|
}
|
|
1289
1296
|
return null;
|
|
1290
1297
|
}
|
|
1298
|
+
function isValidIconName(name) {
|
|
1299
|
+
return isNamedIcon(name) || isFlagIcon(name);
|
|
1300
|
+
}
|
|
1301
|
+
function isValidIconUrn(uri) {
|
|
1302
|
+
if (!uri.startsWith("urn:wise:icons:")) {
|
|
1303
|
+
return false;
|
|
1304
|
+
}
|
|
1305
|
+
const name = uri.replace("urn:wise:icons:", "").split("?")[0];
|
|
1306
|
+
return isValidIconName(name);
|
|
1307
|
+
}
|
|
1291
1308
|
var DynamicIcon_default = DynamicIcon;
|
|
1292
1309
|
|
|
1293
|
-
// ../renderers/src/
|
|
1294
|
-
var
|
|
1295
|
-
var
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
return
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1310
|
+
// ../renderers/src/components/Media/stringToURN.ts
|
|
1311
|
+
var stringToURN = (uri) => {
|
|
1312
|
+
var _a;
|
|
1313
|
+
const [nameWithRComponent, qComponent] = uri.split("?=");
|
|
1314
|
+
const [name, rComponent] = (_a = nameWithRComponent == null ? void 0 : nameWithRComponent.split("?+")) != null ? _a : ["", ""];
|
|
1315
|
+
const rComponents = rComponent == null ? void 0 : rComponent.split("&").map((c) => c.split("=")).map(([a, b]) => [a, b]);
|
|
1316
|
+
const qComponents = qComponent == null ? void 0 : qComponent.split("&").map((c) => c.split("=")).map(([a, b]) => [a, b]);
|
|
1317
|
+
return {
|
|
1318
|
+
name,
|
|
1319
|
+
rComponents,
|
|
1320
|
+
qComponents
|
|
1321
|
+
};
|
|
1304
1322
|
};
|
|
1305
1323
|
|
|
1306
|
-
// ../renderers/src/
|
|
1324
|
+
// ../renderers/src/components/Media/resolveUri.tsx
|
|
1307
1325
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1326
|
+
var resolveUri = (uri, size) => {
|
|
1327
|
+
var _a, _b;
|
|
1328
|
+
const { name, qComponents = [] } = stringToURN(uri);
|
|
1329
|
+
if (isValidIconUrn(name)) {
|
|
1330
|
+
return {
|
|
1331
|
+
asset: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DynamicIcon_default, { name: name.replace("urn:wise:icons:", "") }),
|
|
1332
|
+
backgroundColor: (_a = qComponents.find(([key]) => key === "background-color")) == null ? void 0 : _a[1]
|
|
1333
|
+
};
|
|
1334
|
+
}
|
|
1335
|
+
if (isUrnFlag(name)) {
|
|
1336
|
+
return {
|
|
1337
|
+
asset: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(UrnFlag, { urn: name, size })
|
|
1338
|
+
};
|
|
1339
|
+
}
|
|
1340
|
+
if (name.startsWith("data:text/plain,")) {
|
|
1341
|
+
const text = decodeURI(name.replace("data:text/plain,", ""));
|
|
1342
|
+
return {
|
|
1343
|
+
asset: text,
|
|
1344
|
+
backgroundColor: (_b = qComponents.find(([key]) => key === "background-color")) == null ? void 0 : _b[1]
|
|
1345
|
+
};
|
|
1346
|
+
}
|
|
1347
|
+
if (!uri.startsWith("urn:")) {
|
|
1348
|
+
return { asset: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("img", { src: uri, alt: "", width: `${size}px` }) };
|
|
1349
|
+
}
|
|
1350
|
+
return { asset: void 0 };
|
|
1351
|
+
};
|
|
1352
|
+
|
|
1353
|
+
// ../renderers/src/components/Media/AvatarMedia.tsx
|
|
1354
|
+
var import_components8 = require("@transferwise/components");
|
|
1355
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1356
|
+
var AvatarMedia = ({
|
|
1357
|
+
accessibilityDescription,
|
|
1358
|
+
content,
|
|
1359
|
+
size
|
|
1360
|
+
}) => {
|
|
1361
|
+
const getRenderableAvatar = (avatar) => {
|
|
1362
|
+
if (avatar.type === "text") {
|
|
1363
|
+
return { asset: avatar.text };
|
|
1364
|
+
}
|
|
1365
|
+
return __spreadProps(__spreadValues({}, resolveUri(avatar.uri, size)), {
|
|
1366
|
+
badge: avatar.badgeUri ? resolveUri(avatar.badgeUri, 16).asset : void 0
|
|
1367
|
+
});
|
|
1368
|
+
};
|
|
1369
|
+
const avatars = content.map(getRenderableAvatar);
|
|
1370
|
+
if (avatars.length === 1) {
|
|
1371
|
+
const { badge, backgroundColor, asset } = avatars[0];
|
|
1372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1373
|
+
import_components8.AvatarView,
|
|
1374
|
+
{
|
|
1375
|
+
"aria-label": accessibilityDescription,
|
|
1376
|
+
size,
|
|
1377
|
+
badge: { asset: badge },
|
|
1378
|
+
style: { backgroundColor },
|
|
1379
|
+
children: asset
|
|
1380
|
+
}
|
|
1381
|
+
);
|
|
1382
|
+
}
|
|
1383
|
+
const avatarsWithoutBadges = avatars.map((_a) => {
|
|
1384
|
+
var _b = _a, { badge } = _b, rest = __objRest(_b, ["badge"]);
|
|
1385
|
+
return __spreadValues({}, rest);
|
|
1386
|
+
});
|
|
1387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1388
|
+
import_components8.AvatarLayout,
|
|
1389
|
+
{
|
|
1390
|
+
"aria-label": accessibilityDescription,
|
|
1391
|
+
size,
|
|
1392
|
+
orientation: "diagonal",
|
|
1393
|
+
avatars: avatarsWithoutBadges
|
|
1394
|
+
}
|
|
1395
|
+
);
|
|
1396
|
+
};
|
|
1397
|
+
|
|
1398
|
+
// ../renderers/src/utils/image-utils.tsx
|
|
1399
|
+
var import_components9 = require("@transferwise/components");
|
|
1400
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1308
1401
|
var getBadgedMedia = (iconNode, imageNode, size) => {
|
|
1309
1402
|
if (iconNode && imageNode) {
|
|
1310
1403
|
if (imageNode && iconNode) {
|
|
1311
|
-
return /* @__PURE__ */ (0,
|
|
1404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_components9.AvatarView, { size, badge: { asset: iconNode }, children: imageNode });
|
|
1312
1405
|
}
|
|
1313
1406
|
}
|
|
1314
1407
|
return null;
|
|
@@ -1316,7 +1409,7 @@ var getBadgedMedia = (iconNode, imageNode, size) => {
|
|
|
1316
1409
|
var getIconNode = (icon) => {
|
|
1317
1410
|
if (icon) {
|
|
1318
1411
|
if ("name" in icon) {
|
|
1319
|
-
return /* @__PURE__ */ (0,
|
|
1412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DynamicIcon_default, { name: icon.name });
|
|
1320
1413
|
}
|
|
1321
1414
|
if (icon.text) {
|
|
1322
1415
|
return icon.text;
|
|
@@ -1328,56 +1421,91 @@ var getImageNode = (image, size) => {
|
|
|
1328
1421
|
if (image) {
|
|
1329
1422
|
const { accessibilityDescription, uri } = image;
|
|
1330
1423
|
if (!uri.startsWith("urn:")) {
|
|
1331
|
-
return /* @__PURE__ */ (0,
|
|
1424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: uri, alt: accessibilityDescription, width: `${size}px` });
|
|
1332
1425
|
}
|
|
1333
1426
|
if (isUrnFlag(uri)) {
|
|
1334
|
-
return /* @__PURE__ */ (0,
|
|
1427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(UrnFlag, { urn: uri, accessibilityDescription, size });
|
|
1335
1428
|
}
|
|
1336
1429
|
}
|
|
1337
1430
|
return null;
|
|
1338
1431
|
};
|
|
1339
1432
|
|
|
1340
|
-
// ../renderers/src/components/
|
|
1341
|
-
var
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
const imageNode = getImageNode(image, mediaSize);
|
|
1433
|
+
// ../renderers/src/components/Media/Media.tsx
|
|
1434
|
+
var import_components11 = require("@transferwise/components");
|
|
1435
|
+
|
|
1436
|
+
// ../renderers/src/components/Media/LegacyMedia.tsx
|
|
1437
|
+
var import_components10 = require("@transferwise/components");
|
|
1438
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1439
|
+
var LegacyMedia = ({ image, icon, preferAvatar, size }) => {
|
|
1440
|
+
const imageNode = getImageNode(image, size);
|
|
1349
1441
|
const iconNode = getIconNode(icon);
|
|
1350
|
-
const badge = getBadgedMedia(iconNode, imageNode,
|
|
1442
|
+
const badge = getBadgedMedia(iconNode, imageNode, size);
|
|
1351
1443
|
if (badge) {
|
|
1352
1444
|
return badge;
|
|
1353
1445
|
}
|
|
1354
1446
|
if (imageNode) {
|
|
1355
|
-
return preferAvatar ? /* @__PURE__ */ (0,
|
|
1447
|
+
return preferAvatar ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_components10.AvatarView, { children: imageNode }) : imageNode;
|
|
1448
|
+
}
|
|
1449
|
+
if (iconNode && icon) {
|
|
1450
|
+
if ("text" in icon || size === 48) {
|
|
1451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_components10.AvatarView, { size, children: iconNode });
|
|
1452
|
+
}
|
|
1453
|
+
return iconNode;
|
|
1356
1454
|
}
|
|
1357
|
-
|
|
1358
|
-
|
|
1455
|
+
return null;
|
|
1456
|
+
};
|
|
1457
|
+
|
|
1458
|
+
// ../renderers/src/components/Media/Media.tsx
|
|
1459
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1460
|
+
function Media({
|
|
1461
|
+
media,
|
|
1462
|
+
preferAvatar,
|
|
1463
|
+
size
|
|
1464
|
+
}) {
|
|
1465
|
+
switch (media == null ? void 0 : media.type) {
|
|
1466
|
+
case "avatar":
|
|
1467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(AvatarMedia, __spreadProps(__spreadValues({}, media), { size }));
|
|
1468
|
+
case "image": {
|
|
1469
|
+
const imageNode = getImageNode(media, size);
|
|
1470
|
+
return preferAvatar ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_components11.AvatarView, { children: imageNode }) : imageNode;
|
|
1471
|
+
}
|
|
1472
|
+
case "legacy": {
|
|
1473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(LegacyMedia, __spreadProps(__spreadValues({}, media), { preferAvatar, size }));
|
|
1474
|
+
}
|
|
1475
|
+
default:
|
|
1476
|
+
return null;
|
|
1359
1477
|
}
|
|
1360
1478
|
}
|
|
1361
1479
|
|
|
1480
|
+
// ../renderers/src/components/Media/OptionMedia.tsx
|
|
1481
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1482
|
+
var mediaSize = 48;
|
|
1483
|
+
function OptionMedia(props) {
|
|
1484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Media, __spreadProps(__spreadValues({}, props), { size: mediaSize }));
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
// ../renderers/src/components/Media/getInlineMedia.tsx
|
|
1488
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1489
|
+
var getInlineMedia = (media) => media ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Media, { media, preferAvatar: false, size: 24 }) : null;
|
|
1490
|
+
|
|
1362
1491
|
// ../renderers/src/DecisionRenderer.tsx
|
|
1363
|
-
var
|
|
1492
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1364
1493
|
var DecisionRenderer = {
|
|
1365
1494
|
canRenderType: "decision",
|
|
1366
|
-
render: ({ control, margin, options, title }) => /* @__PURE__ */ (0,
|
|
1367
|
-
title && /* @__PURE__ */ (0,
|
|
1368
|
-
/* @__PURE__ */ (0,
|
|
1369
|
-
const { description, disabled,
|
|
1370
|
-
return /* @__PURE__ */ (0,
|
|
1371
|
-
|
|
1495
|
+
render: ({ control, margin, options, title }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: getMargin(margin), children: [
|
|
1496
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components12.Header, { as: "h2", title }),
|
|
1497
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components12.NavigationOptionsList, { children: options.map((option) => {
|
|
1498
|
+
const { description, disabled, media, title: itemTitle, tag, onClick } = option;
|
|
1499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1500
|
+
import_components12.NavigationOption,
|
|
1372
1501
|
{
|
|
1373
1502
|
title: itemTitle,
|
|
1374
1503
|
content: description,
|
|
1375
1504
|
disabled,
|
|
1376
|
-
media:
|
|
1505
|
+
media: media ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1377
1506
|
OptionMedia,
|
|
1378
1507
|
{
|
|
1379
|
-
|
|
1380
|
-
image,
|
|
1508
|
+
media,
|
|
1381
1509
|
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
1382
1510
|
}
|
|
1383
1511
|
) : null,
|
|
@@ -1393,15 +1521,15 @@ var DecisionRenderer = {
|
|
|
1393
1521
|
var DecisionRenderer_default = DecisionRenderer;
|
|
1394
1522
|
|
|
1395
1523
|
// ../renderers/src/DividerRenderer.tsx
|
|
1396
|
-
var
|
|
1524
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1397
1525
|
var DividerRenderer = {
|
|
1398
1526
|
canRenderType: "divider",
|
|
1399
|
-
render: ({ margin }) => /* @__PURE__ */ (0,
|
|
1527
|
+
render: ({ margin }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("hr", { className: `m-t-0 ${getMargin(margin)}` })
|
|
1400
1528
|
};
|
|
1401
1529
|
var DividerRenderer_default = DividerRenderer;
|
|
1402
1530
|
|
|
1403
1531
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
1404
|
-
var
|
|
1532
|
+
var import_components13 = require("@transferwise/components");
|
|
1405
1533
|
|
|
1406
1534
|
// ../renderers/src/messages/external-confirmation.messages.ts
|
|
1407
1535
|
var import_react_intl5 = require("react-intl");
|
|
@@ -1431,7 +1559,7 @@ var external_confirmation_messages_default = (0, import_react_intl5.defineMessag
|
|
|
1431
1559
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
1432
1560
|
var import_react_intl6 = require("react-intl");
|
|
1433
1561
|
var import_react3 = require("react");
|
|
1434
|
-
var
|
|
1562
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1435
1563
|
var ExternalConfirmationRenderer = {
|
|
1436
1564
|
canRenderType: "external-confirmation",
|
|
1437
1565
|
render: ExternalConfirmationRendererComponent
|
|
@@ -1454,16 +1582,16 @@ function ExternalConfirmationRendererComponent({
|
|
|
1454
1582
|
}
|
|
1455
1583
|
}
|
|
1456
1584
|
}, []);
|
|
1457
|
-
return /* @__PURE__ */ (0,
|
|
1458
|
-
|
|
1585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1586
|
+
import_components13.Modal,
|
|
1459
1587
|
{
|
|
1460
1588
|
open: status === "failure",
|
|
1461
1589
|
title: formatMessage(external_confirmation_messages_default.title),
|
|
1462
|
-
body: /* @__PURE__ */ (0,
|
|
1463
|
-
/* @__PURE__ */ (0,
|
|
1464
|
-
/* @__PURE__ */ (0,
|
|
1465
|
-
/* @__PURE__ */ (0,
|
|
1466
|
-
|
|
1590
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
1591
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_components13.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
|
|
1592
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
|
|
1593
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1594
|
+
import_components13.Button,
|
|
1467
1595
|
{
|
|
1468
1596
|
block: true,
|
|
1469
1597
|
className: "m-b-2",
|
|
@@ -1476,7 +1604,7 @@ function ExternalConfirmationRendererComponent({
|
|
|
1476
1604
|
children: formatMessage(external_confirmation_messages_default.open)
|
|
1477
1605
|
}
|
|
1478
1606
|
),
|
|
1479
|
-
/* @__PURE__ */ (0,
|
|
1607
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_components13.Button, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
|
|
1480
1608
|
] }) })
|
|
1481
1609
|
] }),
|
|
1482
1610
|
onClose: onCancel
|
|
@@ -1493,46 +1621,46 @@ function getOrigin(url) {
|
|
|
1493
1621
|
var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
|
|
1494
1622
|
|
|
1495
1623
|
// ../renderers/src/FormRenderer.tsx
|
|
1496
|
-
var
|
|
1624
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1497
1625
|
var FormRenderer = {
|
|
1498
1626
|
canRenderType: "form",
|
|
1499
|
-
render: ({ children, margin }) => /* @__PURE__ */ (0,
|
|
1627
|
+
render: ({ children, margin }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: getMargin(margin), children })
|
|
1500
1628
|
};
|
|
1501
1629
|
var FormRenderer_default = FormRenderer;
|
|
1502
1630
|
|
|
1503
1631
|
// ../renderers/src/FormSectionRenderer.tsx
|
|
1504
|
-
var
|
|
1505
|
-
var
|
|
1632
|
+
var import_components14 = require("@transferwise/components");
|
|
1633
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1506
1634
|
var FormSectionRenderer = {
|
|
1507
1635
|
canRenderType: "form-section",
|
|
1508
|
-
render: ({ title, description, children }) => /* @__PURE__ */ (0,
|
|
1509
|
-
title && /* @__PURE__ */ (0,
|
|
1510
|
-
|
|
1636
|
+
render: ({ title, description, children }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("fieldset", { children: [
|
|
1637
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1638
|
+
import_components14.Header,
|
|
1511
1639
|
{
|
|
1512
1640
|
as: "h2",
|
|
1513
1641
|
title
|
|
1514
1642
|
}
|
|
1515
1643
|
),
|
|
1516
|
-
description && /* @__PURE__ */ (0,
|
|
1644
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { children: description }),
|
|
1517
1645
|
children
|
|
1518
1646
|
] })
|
|
1519
1647
|
};
|
|
1520
1648
|
var FormSectionRenderer_default = FormSectionRenderer;
|
|
1521
1649
|
|
|
1522
1650
|
// ../renderers/src/HeadingRenderer.tsx
|
|
1523
|
-
var
|
|
1524
|
-
var
|
|
1651
|
+
var import_components15 = require("@transferwise/components");
|
|
1652
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1525
1653
|
var HeadingRenderer = {
|
|
1526
1654
|
canRenderType: "heading",
|
|
1527
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
1655
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Heading, __spreadValues({}, props))
|
|
1528
1656
|
};
|
|
1529
1657
|
function Heading(props) {
|
|
1530
1658
|
const { text, size, align, margin, control } = props;
|
|
1531
1659
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
1532
|
-
return control === "display" ? /* @__PURE__ */ (0,
|
|
1660
|
+
return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(StandardHeading, { size, text, className });
|
|
1533
1661
|
}
|
|
1534
1662
|
function DisplayHeading({ size, text, className }) {
|
|
1535
|
-
return /* @__PURE__ */ (0,
|
|
1663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components15.Display, { type: getDisplayType(size), className, children: text });
|
|
1536
1664
|
}
|
|
1537
1665
|
var getDisplayType = (size) => {
|
|
1538
1666
|
switch (size) {
|
|
@@ -1548,7 +1676,7 @@ var getDisplayType = (size) => {
|
|
|
1548
1676
|
}
|
|
1549
1677
|
};
|
|
1550
1678
|
function StandardHeading({ size, text, className }) {
|
|
1551
|
-
return /* @__PURE__ */ (0,
|
|
1679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components15.Title, { type: getTitleTypeBySize(size), className, children: text });
|
|
1552
1680
|
}
|
|
1553
1681
|
var getTitleTypeBySize = (size) => {
|
|
1554
1682
|
var _a;
|
|
@@ -1564,7 +1692,7 @@ var getTitleTypeBySize = (size) => {
|
|
|
1564
1692
|
var HeadingRenderer_default = HeadingRenderer;
|
|
1565
1693
|
|
|
1566
1694
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
1567
|
-
var
|
|
1695
|
+
var import_components16 = require("@transferwise/components");
|
|
1568
1696
|
var import_react4 = require("react");
|
|
1569
1697
|
|
|
1570
1698
|
// ../renderers/src/utils/api-utils.ts
|
|
@@ -1575,7 +1703,7 @@ function isRelativePath(url = "") {
|
|
|
1575
1703
|
}
|
|
1576
1704
|
|
|
1577
1705
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
1578
|
-
var
|
|
1706
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1579
1707
|
function UrlImage({
|
|
1580
1708
|
accessibilityDescription,
|
|
1581
1709
|
align,
|
|
@@ -1590,8 +1718,8 @@ function UrlImage({
|
|
|
1590
1718
|
void getImageSource(httpClient, uri).then(setImageSource);
|
|
1591
1719
|
}
|
|
1592
1720
|
}, [uri, httpClient]);
|
|
1593
|
-
return /* @__PURE__ */ (0,
|
|
1594
|
-
|
|
1721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: `df-image ${align} ${size || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1722
|
+
import_components16.Image,
|
|
1595
1723
|
{
|
|
1596
1724
|
className: `img-responsive ${getMargin(margin)}`,
|
|
1597
1725
|
alt: accessibilityDescription != null ? accessibilityDescription : "",
|
|
@@ -1634,7 +1762,7 @@ var getImageSource = async (httpClient, imageUrl) => {
|
|
|
1634
1762
|
};
|
|
1635
1763
|
|
|
1636
1764
|
// ../renderers/src/ImageRenderer/UrnFlagImage.tsx
|
|
1637
|
-
var
|
|
1765
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1638
1766
|
var maxFlagSize = 600;
|
|
1639
1767
|
function UrnFlagImage({
|
|
1640
1768
|
accessibilityDescription,
|
|
@@ -1643,7 +1771,7 @@ function UrnFlagImage({
|
|
|
1643
1771
|
size,
|
|
1644
1772
|
uri
|
|
1645
1773
|
}) {
|
|
1646
|
-
return /* @__PURE__ */ (0,
|
|
1774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
|
|
1647
1775
|
}
|
|
1648
1776
|
|
|
1649
1777
|
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
@@ -1651,19 +1779,13 @@ var import_art3 = require("@wise/art");
|
|
|
1651
1779
|
|
|
1652
1780
|
// ../renderers/src/ImageRenderer/isAnimated.ts
|
|
1653
1781
|
var isAnimated = (uri) => {
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
}
|
|
1658
|
-
const params = sections[1];
|
|
1659
|
-
if (!params.startsWith("+")) {
|
|
1660
|
-
return false;
|
|
1661
|
-
}
|
|
1662
|
-
return params.substring(1).split("&").some((param) => param === "type=animated");
|
|
1782
|
+
var _a;
|
|
1783
|
+
const { rComponents } = stringToURN(uri);
|
|
1784
|
+
return (_a = rComponents == null ? void 0 : rComponents.some(([key, value]) => key === "type" && value === "animated")) != null ? _a : false;
|
|
1663
1785
|
};
|
|
1664
1786
|
|
|
1665
1787
|
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
1666
|
-
var
|
|
1788
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1667
1789
|
var urnPrefix = "urn:wise:illustrations:";
|
|
1668
1790
|
var isUrnIllustration = (uri) => uri.startsWith(urnPrefix);
|
|
1669
1791
|
function UrnIllustration({
|
|
@@ -1677,9 +1799,9 @@ function UrnIllustration({
|
|
|
1677
1799
|
const illustrationName = getIllustrationName(uri);
|
|
1678
1800
|
const illustration3DName = getIllustration3DName(uri);
|
|
1679
1801
|
if (illustration3DName && isAnimated(uri)) {
|
|
1680
|
-
return /* @__PURE__ */ (0,
|
|
1802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_art3.Illustration3D, { name: illustration3DName, size: illustrationSize }) });
|
|
1681
1803
|
}
|
|
1682
|
-
return /* @__PURE__ */ (0,
|
|
1804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1683
1805
|
import_art3.Illustration,
|
|
1684
1806
|
{
|
|
1685
1807
|
className: "df-illustration",
|
|
@@ -1699,32 +1821,32 @@ var getIllustration3DName = (uri) => {
|
|
|
1699
1821
|
};
|
|
1700
1822
|
|
|
1701
1823
|
// ../renderers/src/ImageRenderer/UrnImage.tsx
|
|
1702
|
-
var
|
|
1824
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1703
1825
|
var isUrnImage = (uri) => uri.startsWith("urn:");
|
|
1704
1826
|
function UrnImage(props) {
|
|
1705
1827
|
const { uri } = props;
|
|
1706
1828
|
if (isUrnIllustration(uri)) {
|
|
1707
|
-
return /* @__PURE__ */ (0,
|
|
1829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(UrnIllustration, __spreadValues({}, props));
|
|
1708
1830
|
}
|
|
1709
1831
|
if (isUrnFlag(uri)) {
|
|
1710
|
-
return /* @__PURE__ */ (0,
|
|
1832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(UrnFlagImage, __spreadValues({}, props));
|
|
1711
1833
|
}
|
|
1712
1834
|
return null;
|
|
1713
1835
|
}
|
|
1714
1836
|
|
|
1715
1837
|
// ../renderers/src/ImageRenderer/ImageRenderer.tsx
|
|
1716
|
-
var
|
|
1838
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1717
1839
|
var ImageRenderer = {
|
|
1718
1840
|
canRenderType: "image",
|
|
1719
|
-
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0,
|
|
1841
|
+
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(UrlImage, __spreadValues({}, props))
|
|
1720
1842
|
};
|
|
1721
1843
|
|
|
1722
1844
|
// ../renderers/src/ImageRenderer/index.tsx
|
|
1723
1845
|
var ImageRenderer_default = ImageRenderer;
|
|
1724
1846
|
|
|
1725
1847
|
// ../renderers/src/InstructionsRenderer.tsx
|
|
1726
|
-
var
|
|
1727
|
-
var
|
|
1848
|
+
var import_components17 = require("@transferwise/components");
|
|
1849
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1728
1850
|
var doContext = ["positive", "neutral"];
|
|
1729
1851
|
var dontContext = ["warning", "negative"];
|
|
1730
1852
|
var InstructionsRenderer = {
|
|
@@ -1732,16 +1854,16 @@ var InstructionsRenderer = {
|
|
|
1732
1854
|
render: ({ items, margin, title }) => {
|
|
1733
1855
|
const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
|
|
1734
1856
|
const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
|
|
1735
|
-
return /* @__PURE__ */ (0,
|
|
1736
|
-
title ? /* @__PURE__ */ (0,
|
|
1737
|
-
/* @__PURE__ */ (0,
|
|
1857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: getMargin(margin), children: [
|
|
1858
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components17.Header, { title }) : null,
|
|
1859
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components17.InstructionsList, { dos, donts })
|
|
1738
1860
|
] });
|
|
1739
1861
|
}
|
|
1740
1862
|
};
|
|
1741
1863
|
var InstructionsRenderer_default = InstructionsRenderer;
|
|
1742
1864
|
|
|
1743
1865
|
// ../renderers/src/IntegerInputRenderer.tsx
|
|
1744
|
-
var
|
|
1866
|
+
var import_components18 = require("@transferwise/components");
|
|
1745
1867
|
|
|
1746
1868
|
// ../renderers/src/utils/input-utils.ts
|
|
1747
1869
|
var onWheel = (event) => {
|
|
@@ -1750,34 +1872,9 @@ var onWheel = (event) => {
|
|
|
1750
1872
|
}
|
|
1751
1873
|
};
|
|
1752
1874
|
|
|
1753
|
-
// ../renderers/src/utils/getInlineAvatar.tsx
|
|
1754
|
-
var import_components16 = require("@transferwise/components");
|
|
1755
|
-
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1756
|
-
var mediaSize2 = 24;
|
|
1757
|
-
function getInlineAvatar({ icon, image }) {
|
|
1758
|
-
const imageNode = getImageNode(image, mediaSize2);
|
|
1759
|
-
const iconNode = getIconNode(icon);
|
|
1760
|
-
const badge = getBadgedMedia(iconNode, imageNode, mediaSize2);
|
|
1761
|
-
if (badge) {
|
|
1762
|
-
return badge;
|
|
1763
|
-
}
|
|
1764
|
-
if (imageNode) {
|
|
1765
|
-
return imageNode;
|
|
1766
|
-
}
|
|
1767
|
-
if (isNamedIcon2(icon) && !isFlagIcon2(icon)) {
|
|
1768
|
-
return iconNode;
|
|
1769
|
-
}
|
|
1770
|
-
if (iconNode) {
|
|
1771
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components16.AvatarView, { size: mediaSize2, children: iconNode });
|
|
1772
|
-
}
|
|
1773
|
-
return null;
|
|
1774
|
-
}
|
|
1775
|
-
var isNamedIcon2 = (icon) => icon ? "name" in icon : false;
|
|
1776
|
-
var isFlagIcon2 = (icon) => isNamedIcon2(icon) && icon.name.startsWith("flag-");
|
|
1777
|
-
|
|
1778
1875
|
// ../renderers/src/utils/getInputGroupAddonStart.tsx
|
|
1779
|
-
var getInputGroupAddonStart = (
|
|
1780
|
-
const content =
|
|
1876
|
+
var getInputGroupAddonStart = (media) => {
|
|
1877
|
+
const content = getInlineMedia(media);
|
|
1781
1878
|
return content ? { content } : void 0;
|
|
1782
1879
|
};
|
|
1783
1880
|
|
|
@@ -1791,11 +1888,11 @@ function pick(obj, ...keys) {
|
|
|
1791
1888
|
}
|
|
1792
1889
|
|
|
1793
1890
|
// ../renderers/src/IntegerInputRenderer.tsx
|
|
1794
|
-
var
|
|
1891
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1795
1892
|
var IntegerInputRenderer = {
|
|
1796
1893
|
canRenderType: "input-integer",
|
|
1797
1894
|
render: (props) => {
|
|
1798
|
-
const { id, title, description, help,
|
|
1895
|
+
const { id, title, description, help, media, validationState, value, onChange } = props;
|
|
1799
1896
|
const commonProps = pick(
|
|
1800
1897
|
props,
|
|
1801
1898
|
"autoComplete",
|
|
@@ -1806,7 +1903,7 @@ var IntegerInputRenderer = {
|
|
|
1806
1903
|
"maximum",
|
|
1807
1904
|
"minimum"
|
|
1808
1905
|
);
|
|
1809
|
-
return /* @__PURE__ */ (0,
|
|
1906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1810
1907
|
FieldInput_default,
|
|
1811
1908
|
{
|
|
1812
1909
|
id,
|
|
@@ -1814,8 +1911,8 @@ var IntegerInputRenderer = {
|
|
|
1814
1911
|
description,
|
|
1815
1912
|
validation: validationState,
|
|
1816
1913
|
help,
|
|
1817
|
-
children: /* @__PURE__ */ (0,
|
|
1818
|
-
|
|
1914
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components18.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1915
|
+
import_components18.Input,
|
|
1819
1916
|
__spreadValues({
|
|
1820
1917
|
id,
|
|
1821
1918
|
name: id,
|
|
@@ -1837,14 +1934,14 @@ var IntegerInputRenderer = {
|
|
|
1837
1934
|
var IntegerInputRenderer_default = IntegerInputRenderer;
|
|
1838
1935
|
|
|
1839
1936
|
// ../renderers/src/ListRenderer.tsx
|
|
1840
|
-
var
|
|
1937
|
+
var import_components19 = require("@transferwise/components");
|
|
1841
1938
|
var import_classnames3 = __toESM(require("classnames"));
|
|
1842
|
-
var
|
|
1939
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1843
1940
|
var ListRenderer = {
|
|
1844
1941
|
canRenderType: "list",
|
|
1845
|
-
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ (0,
|
|
1846
|
-
(title || callToAction) && /* @__PURE__ */ (0,
|
|
1847
|
-
items.map((props) => /* @__PURE__ */ (0,
|
|
1942
|
+
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: getMargin(margin), children: [
|
|
1943
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components19.Header, { as: "h2", title: title != null ? title : "", action: getListAction(callToAction) }),
|
|
1944
|
+
items.map((props) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DesignSystemListItem, __spreadProps(__spreadValues({}, props), { control }), props.title))
|
|
1848
1945
|
] })
|
|
1849
1946
|
};
|
|
1850
1947
|
var DesignSystemListItem = ({
|
|
@@ -1853,32 +1950,33 @@ var DesignSystemListItem = ({
|
|
|
1853
1950
|
supportingValues,
|
|
1854
1951
|
icon,
|
|
1855
1952
|
image,
|
|
1953
|
+
media,
|
|
1856
1954
|
control,
|
|
1857
1955
|
tag
|
|
1858
|
-
}) => /* @__PURE__ */ (0,
|
|
1956
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1859
1957
|
"label",
|
|
1860
1958
|
{
|
|
1861
1959
|
className: (0, import_classnames3.default)("np-option p-a-2", {
|
|
1862
1960
|
"np-option__sm-media": true,
|
|
1863
1961
|
"np-option__container-aligned": true
|
|
1864
1962
|
}),
|
|
1865
|
-
children: /* @__PURE__ */ (0,
|
|
1866
|
-
icon || image ? /* @__PURE__ */ (0,
|
|
1963
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "media", children: [
|
|
1964
|
+
icon || image || media ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "media-left", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1867
1965
|
ListItemMedia,
|
|
1868
1966
|
{
|
|
1869
|
-
image,
|
|
1870
1967
|
icon,
|
|
1968
|
+
media,
|
|
1871
1969
|
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
1872
1970
|
}
|
|
1873
1971
|
) }) : null,
|
|
1874
|
-
/* @__PURE__ */ (0,
|
|
1875
|
-
/* @__PURE__ */ (0,
|
|
1876
|
-
/* @__PURE__ */ (0,
|
|
1877
|
-
/* @__PURE__ */ (0,
|
|
1972
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "media-body", children: [
|
|
1973
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "d-flex justify-content-between", children: [
|
|
1974
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: title }),
|
|
1975
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: supportingValues == null ? void 0 : supportingValues.value })
|
|
1878
1976
|
] }),
|
|
1879
|
-
/* @__PURE__ */ (0,
|
|
1880
|
-
/* @__PURE__ */ (0,
|
|
1881
|
-
/* @__PURE__ */ (0,
|
|
1977
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "d-flex justify-content-between", children: [
|
|
1978
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components19.Body, { className: "d-block np-option__body", children: description }),
|
|
1979
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components19.Body, { className: "d-block np-option__body", children: supportingValues == null ? void 0 : supportingValues.subvalue })
|
|
1882
1980
|
] })
|
|
1883
1981
|
] })
|
|
1884
1982
|
] })
|
|
@@ -1887,15 +1985,13 @@ var DesignSystemListItem = ({
|
|
|
1887
1985
|
);
|
|
1888
1986
|
var ListItemMedia = ({
|
|
1889
1987
|
icon,
|
|
1890
|
-
|
|
1988
|
+
media,
|
|
1891
1989
|
preferAvatar
|
|
1892
1990
|
}) => {
|
|
1893
1991
|
if (icon) {
|
|
1894
|
-
return /* @__PURE__ */ (0,
|
|
1895
|
-
}
|
|
1896
|
-
if (image) {
|
|
1897
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(OptionMedia, { icon, image, preferAvatar }) });
|
|
1992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "circle circle-sm text-primary circle-inverse", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(OptionMedia, { media, preferAvatar }) });
|
|
1898
1993
|
}
|
|
1994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(OptionMedia, { media, preferAvatar }) });
|
|
1899
1995
|
};
|
|
1900
1996
|
var getListAction = (callToAction) => {
|
|
1901
1997
|
if (callToAction) {
|
|
@@ -1910,12 +2006,12 @@ var getListAction = (callToAction) => {
|
|
|
1910
2006
|
var ListRenderer_default = ListRenderer;
|
|
1911
2007
|
|
|
1912
2008
|
// ../renderers/src/LoadingIndicatorRenderer.tsx
|
|
1913
|
-
var
|
|
1914
|
-
var
|
|
2009
|
+
var import_components20 = require("@transferwise/components");
|
|
2010
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1915
2011
|
var LoadingIndicatorRenderer = {
|
|
1916
2012
|
canRenderType: "loading-indicator",
|
|
1917
|
-
render: ({ margin, size }) => /* @__PURE__ */ (0,
|
|
1918
|
-
|
|
2013
|
+
render: ({ margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2014
|
+
import_components20.Loader,
|
|
1919
2015
|
{
|
|
1920
2016
|
size,
|
|
1921
2017
|
classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin(margin)}` },
|
|
@@ -1926,30 +2022,30 @@ var LoadingIndicatorRenderer = {
|
|
|
1926
2022
|
var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
|
|
1927
2023
|
|
|
1928
2024
|
// ../renderers/src/MarkdownRenderer.tsx
|
|
1929
|
-
var
|
|
1930
|
-
var
|
|
2025
|
+
var import_components21 = require("@transferwise/components");
|
|
2026
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1931
2027
|
var MarkdownRenderer = {
|
|
1932
2028
|
canRenderType: "markdown",
|
|
1933
|
-
render: ({ content, align, margin }) => /* @__PURE__ */ (0,
|
|
2029
|
+
render: ({ content, align, margin }) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_components21.Markdown, { className: "np-text-body-large", config: { link: { target: "_blank" } }, children: content }) })
|
|
1934
2030
|
};
|
|
1935
2031
|
var MarkdownRenderer_default = MarkdownRenderer;
|
|
1936
2032
|
|
|
1937
2033
|
// ../renderers/src/ModalLayoutRenderer.tsx
|
|
1938
|
-
var
|
|
2034
|
+
var import_components22 = require("@transferwise/components");
|
|
1939
2035
|
var import_react5 = require("react");
|
|
1940
|
-
var
|
|
2036
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1941
2037
|
var ModalLayoutRenderer = {
|
|
1942
2038
|
canRenderType: "modal-layout",
|
|
1943
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
2039
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DFModal, __spreadValues({}, props))
|
|
1944
2040
|
};
|
|
1945
2041
|
var ModalLayoutRenderer_default = ModalLayoutRenderer;
|
|
1946
2042
|
function DFModal({ content, margin, trigger }) {
|
|
1947
2043
|
const [visible, setVisible] = (0, import_react5.useState)(false);
|
|
1948
2044
|
const { children, title } = content;
|
|
1949
|
-
return /* @__PURE__ */ (0,
|
|
1950
|
-
/* @__PURE__ */ (0,
|
|
1951
|
-
/* @__PURE__ */ (0,
|
|
1952
|
-
|
|
2045
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: getMargin(margin), children: [
|
|
2046
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components22.Button, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
|
|
2047
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2048
|
+
import_components22.Modal,
|
|
1953
2049
|
{
|
|
1954
2050
|
scroll: "content",
|
|
1955
2051
|
open: visible,
|
|
@@ -1963,17 +2059,17 @@ function DFModal({ content, margin, trigger }) {
|
|
|
1963
2059
|
}
|
|
1964
2060
|
|
|
1965
2061
|
// ../renderers/src/ModalRenderer.tsx
|
|
1966
|
-
var
|
|
1967
|
-
var
|
|
2062
|
+
var import_components23 = require("@transferwise/components");
|
|
2063
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1968
2064
|
var ModalRenderer = {
|
|
1969
2065
|
canRenderType: "modal",
|
|
1970
2066
|
render: ({ title, children, open, onClose }) => {
|
|
1971
|
-
return /* @__PURE__ */ (0,
|
|
2067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components23.Modal, { open, title, body: children, onClose });
|
|
1972
2068
|
}
|
|
1973
2069
|
};
|
|
1974
2070
|
|
|
1975
2071
|
// ../renderers/src/MultiSelectInputRenderer.tsx
|
|
1976
|
-
var
|
|
2072
|
+
var import_components24 = require("@transferwise/components");
|
|
1977
2073
|
var import_react6 = require("react");
|
|
1978
2074
|
var import_react_intl8 = require("react-intl");
|
|
1979
2075
|
|
|
@@ -1988,10 +2084,10 @@ var multi_select_messages_default = (0, import_react_intl7.defineMessages)({
|
|
|
1988
2084
|
});
|
|
1989
2085
|
|
|
1990
2086
|
// ../renderers/src/MultiSelectInputRenderer.tsx
|
|
1991
|
-
var
|
|
2087
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1992
2088
|
var MultiSelectInputRenderer = {
|
|
1993
2089
|
canRenderType: "input-multi-select",
|
|
1994
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
2090
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(MultiSelectInputRendererComponent, __spreadValues({}, props))
|
|
1995
2091
|
};
|
|
1996
2092
|
function MultiSelectInputRendererComponent(props) {
|
|
1997
2093
|
const { formatMessage } = (0, import_react_intl8.useIntl)();
|
|
@@ -2033,12 +2129,12 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
2033
2129
|
const contentProps = {
|
|
2034
2130
|
title: option.title,
|
|
2035
2131
|
description: option.description,
|
|
2036
|
-
icon: /* @__PURE__ */ (0,
|
|
2132
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
|
|
2037
2133
|
};
|
|
2038
|
-
return /* @__PURE__ */ (0,
|
|
2134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components24.SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
2039
2135
|
};
|
|
2040
2136
|
const extraProps = { autoComplete };
|
|
2041
|
-
return /* @__PURE__ */ (0,
|
|
2137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2042
2138
|
FieldInput_default,
|
|
2043
2139
|
{
|
|
2044
2140
|
id,
|
|
@@ -2046,8 +2142,8 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
2046
2142
|
help,
|
|
2047
2143
|
description,
|
|
2048
2144
|
validation: validationState,
|
|
2049
|
-
children: /* @__PURE__ */ (0,
|
|
2050
|
-
|
|
2145
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2146
|
+
import_components24.SelectInput,
|
|
2051
2147
|
__spreadValues({
|
|
2052
2148
|
id,
|
|
2053
2149
|
items: options.map((option, index) => {
|
|
@@ -2086,12 +2182,12 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
2086
2182
|
var MultiSelectInputRenderer_default = MultiSelectInputRenderer;
|
|
2087
2183
|
|
|
2088
2184
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
2089
|
-
var
|
|
2185
|
+
var import_components26 = require("@transferwise/components");
|
|
2090
2186
|
|
|
2091
2187
|
// ../renderers/src/components/UploadFieldInput.tsx
|
|
2092
|
-
var
|
|
2188
|
+
var import_components25 = require("@transferwise/components");
|
|
2093
2189
|
var import_classnames4 = __toESM(require("classnames"));
|
|
2094
|
-
var
|
|
2190
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2095
2191
|
function UploadFieldInput({
|
|
2096
2192
|
id,
|
|
2097
2193
|
children,
|
|
@@ -2100,18 +2196,18 @@ function UploadFieldInput({
|
|
|
2100
2196
|
help,
|
|
2101
2197
|
validation
|
|
2102
2198
|
}) {
|
|
2103
|
-
const labelContent = label && help ? /* @__PURE__ */ (0,
|
|
2199
|
+
const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(LabelContentWithHelp, { text: label, help }) : label;
|
|
2104
2200
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
2105
|
-
return /* @__PURE__ */ (0,
|
|
2201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
2106
2202
|
"div",
|
|
2107
2203
|
{
|
|
2108
2204
|
className: (0, import_classnames4.default)("form-group d-block", {
|
|
2109
2205
|
"has-error": (validation == null ? void 0 : validation.status) === "invalid"
|
|
2110
2206
|
}),
|
|
2111
2207
|
children: [
|
|
2112
|
-
/* @__PURE__ */ (0,
|
|
2208
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
|
|
2113
2209
|
children,
|
|
2114
|
-
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0,
|
|
2210
|
+
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components25.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
|
|
2115
2211
|
]
|
|
2116
2212
|
}
|
|
2117
2213
|
);
|
|
@@ -2146,7 +2242,7 @@ var getSizeLimit = (maxSize) => {
|
|
|
2146
2242
|
};
|
|
2147
2243
|
|
|
2148
2244
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
2149
|
-
var
|
|
2245
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2150
2246
|
var MultiUploadInputRenderer = {
|
|
2151
2247
|
canRenderType: "input-upload-multi",
|
|
2152
2248
|
render: (props) => {
|
|
@@ -2171,7 +2267,7 @@ var MultiUploadInputRenderer = {
|
|
|
2171
2267
|
};
|
|
2172
2268
|
const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
|
|
2173
2269
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
2174
|
-
return /* @__PURE__ */ (0,
|
|
2270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2175
2271
|
UploadFieldInput_default,
|
|
2176
2272
|
{
|
|
2177
2273
|
id,
|
|
@@ -2179,8 +2275,8 @@ var MultiUploadInputRenderer = {
|
|
|
2179
2275
|
description,
|
|
2180
2276
|
validation: validationState,
|
|
2181
2277
|
help,
|
|
2182
|
-
children: /* @__PURE__ */ (0,
|
|
2183
|
-
|
|
2278
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2279
|
+
import_components26.UploadInput,
|
|
2184
2280
|
{
|
|
2185
2281
|
id,
|
|
2186
2282
|
"aria-describedby": descriptionId,
|
|
@@ -2202,12 +2298,12 @@ var MultiUploadInputRenderer = {
|
|
|
2202
2298
|
var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
|
|
2203
2299
|
|
|
2204
2300
|
// ../renderers/src/NumberInputRenderer.tsx
|
|
2205
|
-
var
|
|
2206
|
-
var
|
|
2301
|
+
var import_components27 = require("@transferwise/components");
|
|
2302
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2207
2303
|
var NumberInputRenderer = {
|
|
2208
2304
|
canRenderType: "input-number",
|
|
2209
2305
|
render: (props) => {
|
|
2210
|
-
const { id, title, description, help,
|
|
2306
|
+
const { id, title, description, help, media, validationState, value, onChange } = props;
|
|
2211
2307
|
const commonProps = pick(
|
|
2212
2308
|
props,
|
|
2213
2309
|
"disabled",
|
|
@@ -2217,7 +2313,7 @@ var NumberInputRenderer = {
|
|
|
2217
2313
|
"maximum",
|
|
2218
2314
|
"minimum"
|
|
2219
2315
|
);
|
|
2220
|
-
return /* @__PURE__ */ (0,
|
|
2316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2221
2317
|
FieldInput_default,
|
|
2222
2318
|
{
|
|
2223
2319
|
id,
|
|
@@ -2225,8 +2321,8 @@ var NumberInputRenderer = {
|
|
|
2225
2321
|
description,
|
|
2226
2322
|
validation: validationState,
|
|
2227
2323
|
help,
|
|
2228
|
-
children: /* @__PURE__ */ (0,
|
|
2229
|
-
|
|
2324
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components27.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2325
|
+
import_components27.Input,
|
|
2230
2326
|
__spreadValues({
|
|
2231
2327
|
id,
|
|
2232
2328
|
name: id,
|
|
@@ -2249,16 +2345,16 @@ var NumberInputRenderer_default = NumberInputRenderer;
|
|
|
2249
2345
|
var import_react_intl10 = require("react-intl");
|
|
2250
2346
|
|
|
2251
2347
|
// ../renderers/src/hooks/useSnackBarIfAvailable.ts
|
|
2252
|
-
var
|
|
2348
|
+
var import_components28 = require("@transferwise/components");
|
|
2253
2349
|
var import_react7 = require("react");
|
|
2254
2350
|
function useSnackBarIfAvailable() {
|
|
2255
|
-
const context = (0, import_react7.useContext)(
|
|
2351
|
+
const context = (0, import_react7.useContext)(import_components28.SnackbarContext);
|
|
2256
2352
|
return context ? context.createSnackbar : () => {
|
|
2257
2353
|
};
|
|
2258
2354
|
}
|
|
2259
2355
|
|
|
2260
2356
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
2261
|
-
var
|
|
2357
|
+
var import_components29 = require("@transferwise/components");
|
|
2262
2358
|
var import_classnames5 = __toESM(require("classnames"));
|
|
2263
2359
|
|
|
2264
2360
|
// ../renderers/src/messages/paragraph.messages.ts
|
|
@@ -2277,17 +2373,17 @@ var paragraph_messages_default = (0, import_react_intl9.defineMessages)({
|
|
|
2277
2373
|
});
|
|
2278
2374
|
|
|
2279
2375
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
2280
|
-
var
|
|
2376
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2281
2377
|
var ParagraphRenderer = {
|
|
2282
2378
|
canRenderType: "paragraph",
|
|
2283
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
2379
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Paragraph, __spreadValues({}, props))
|
|
2284
2380
|
};
|
|
2285
2381
|
function Paragraph({ align, control, margin, text }) {
|
|
2286
2382
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
2287
|
-
return control === "copyable" ? /* @__PURE__ */ (0,
|
|
2383
|
+
return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(StandardParagraph, { className, text });
|
|
2288
2384
|
}
|
|
2289
2385
|
function StandardParagraph({ text, className }) {
|
|
2290
|
-
return /* @__PURE__ */ (0,
|
|
2386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: `np-text-body-large ${className}`, children: text });
|
|
2291
2387
|
}
|
|
2292
2388
|
function CopyableParagraph({
|
|
2293
2389
|
text,
|
|
@@ -2301,9 +2397,9 @@ function CopyableParagraph({
|
|
|
2301
2397
|
});
|
|
2302
2398
|
};
|
|
2303
2399
|
const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
|
|
2304
|
-
return /* @__PURE__ */ (0,
|
|
2305
|
-
/* @__PURE__ */ (0,
|
|
2306
|
-
|
|
2400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className, children: [
|
|
2401
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2402
|
+
import_components29.Input,
|
|
2307
2403
|
{
|
|
2308
2404
|
type: "text",
|
|
2309
2405
|
value: text,
|
|
@@ -2311,13 +2407,13 @@ function CopyableParagraph({
|
|
|
2311
2407
|
className: (0, import_classnames5.default)("text-ellipsis", inputAlignmentClasses)
|
|
2312
2408
|
}
|
|
2313
2409
|
),
|
|
2314
|
-
/* @__PURE__ */ (0,
|
|
2410
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_components29.Button, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
|
|
2315
2411
|
] });
|
|
2316
2412
|
}
|
|
2317
2413
|
var ParagraphRenderer_default = ParagraphRenderer;
|
|
2318
2414
|
|
|
2319
2415
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
2320
|
-
var
|
|
2416
|
+
var import_components30 = require("@transferwise/components");
|
|
2321
2417
|
var import_icons = require("@transferwise/icons");
|
|
2322
2418
|
var import_classnames6 = __toESM(require("classnames"));
|
|
2323
2419
|
var import_react8 = require("react");
|
|
@@ -2349,10 +2445,10 @@ var repeatable_messages_default = (0, import_react_intl11.defineMessages)({
|
|
|
2349
2445
|
});
|
|
2350
2446
|
|
|
2351
2447
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
2352
|
-
var
|
|
2448
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2353
2449
|
var RepeatableRenderer = {
|
|
2354
2450
|
canRenderType: "repeatable",
|
|
2355
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
2451
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Repeatable, __spreadValues({}, props))
|
|
2356
2452
|
};
|
|
2357
2453
|
function Repeatable(props) {
|
|
2358
2454
|
const {
|
|
@@ -2391,40 +2487,40 @@ function Repeatable(props) {
|
|
|
2391
2487
|
const onCancelEdit = () => {
|
|
2392
2488
|
setOpenModalType(null);
|
|
2393
2489
|
};
|
|
2394
|
-
return /* @__PURE__ */ (0,
|
|
2395
|
-
title && /* @__PURE__ */ (0,
|
|
2396
|
-
description && /* @__PURE__ */ (0,
|
|
2397
|
-
/* @__PURE__ */ (0,
|
|
2490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
2491
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_components30.Header, { title }),
|
|
2492
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { children: description }),
|
|
2493
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
2398
2494
|
"div",
|
|
2399
2495
|
{
|
|
2400
2496
|
className: (0, import_classnames6.default)("form-group", {
|
|
2401
2497
|
"has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
|
|
2402
2498
|
}),
|
|
2403
2499
|
children: [
|
|
2404
|
-
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0,
|
|
2405
|
-
/* @__PURE__ */ (0,
|
|
2406
|
-
|
|
2500
|
+
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
|
|
2501
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2502
|
+
import_components30.NavigationOption,
|
|
2407
2503
|
{
|
|
2408
|
-
media: /* @__PURE__ */ (0,
|
|
2504
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons.Plus, {}),
|
|
2409
2505
|
title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2410
2506
|
showMediaAtAllSizes: true,
|
|
2411
2507
|
onClick: () => onAddItem()
|
|
2412
2508
|
}
|
|
2413
2509
|
),
|
|
2414
|
-
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0,
|
|
2510
|
+
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_components30.InlineAlert, { type: "negative", children: validationState.message })
|
|
2415
2511
|
]
|
|
2416
2512
|
}
|
|
2417
2513
|
),
|
|
2418
|
-
/* @__PURE__ */ (0,
|
|
2419
|
-
|
|
2514
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2515
|
+
import_components30.Modal,
|
|
2420
2516
|
{
|
|
2421
2517
|
open: openModalType !== null,
|
|
2422
2518
|
title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2423
|
-
body: /* @__PURE__ */ (0,
|
|
2424
|
-
/* @__PURE__ */ (0,
|
|
2425
|
-
/* @__PURE__ */ (0,
|
|
2426
|
-
/* @__PURE__ */ (0,
|
|
2427
|
-
/* @__PURE__ */ (0,
|
|
2519
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
2520
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "m-b-2", children: editableItem }),
|
|
2521
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
|
|
2522
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_components30.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
|
|
2523
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_components30.Button, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
|
|
2428
2524
|
] })
|
|
2429
2525
|
] }),
|
|
2430
2526
|
onClose: () => onCancelEdit()
|
|
@@ -2436,10 +2532,10 @@ function ItemSummaryOption({
|
|
|
2436
2532
|
item,
|
|
2437
2533
|
onClick
|
|
2438
2534
|
}) {
|
|
2439
|
-
return /* @__PURE__ */ (0,
|
|
2440
|
-
|
|
2535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2536
|
+
import_components30.NavigationOption,
|
|
2441
2537
|
{
|
|
2442
|
-
media: /* @__PURE__ */ (0,
|
|
2538
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(OptionMedia, { media: item.media, preferAvatar: false }),
|
|
2443
2539
|
title: item.title,
|
|
2444
2540
|
content: item.description,
|
|
2445
2541
|
showMediaAtAllSizes: true,
|
|
@@ -2450,7 +2546,7 @@ function ItemSummaryOption({
|
|
|
2450
2546
|
var RepeatableRenderer_default = RepeatableRenderer;
|
|
2451
2547
|
|
|
2452
2548
|
// ../renderers/src/ReviewRenderer.tsx
|
|
2453
|
-
var
|
|
2549
|
+
var import_components31 = require("@transferwise/components");
|
|
2454
2550
|
|
|
2455
2551
|
// ../renderers/src/utils/getHeaderAction.tsx
|
|
2456
2552
|
var getHeaderAction = (callToAction) => {
|
|
@@ -2474,15 +2570,15 @@ var getHeaderAction = (callToAction) => {
|
|
|
2474
2570
|
};
|
|
2475
2571
|
|
|
2476
2572
|
// ../renderers/src/ReviewRenderer.tsx
|
|
2477
|
-
var
|
|
2573
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2478
2574
|
var ReviewRenderer = {
|
|
2479
2575
|
canRenderType: "review",
|
|
2480
2576
|
render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
|
|
2481
2577
|
const orientation = mapControlToDefinitionListLayout(control);
|
|
2482
|
-
return /* @__PURE__ */ (0,
|
|
2483
|
-
(title || callToAction) && /* @__PURE__ */ (0,
|
|
2484
|
-
/* @__PURE__ */ (0,
|
|
2485
|
-
|
|
2578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: getMargin(margin), children: [
|
|
2579
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components31.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
|
|
2580
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2581
|
+
import_components31.DefinitionList,
|
|
2486
2582
|
{
|
|
2487
2583
|
layout: orientation,
|
|
2488
2584
|
definitions: fields.map(
|
|
@@ -2520,21 +2616,21 @@ var mapControlToDefinitionListLayout = (control) => {
|
|
|
2520
2616
|
};
|
|
2521
2617
|
var getFieldValue = (value, help, orientation, onClick) => {
|
|
2522
2618
|
if (help) {
|
|
2523
|
-
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0,
|
|
2524
|
-
/* @__PURE__ */ (0,
|
|
2619
|
+
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
2620
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Help_default, { help, onClick }),
|
|
2525
2621
|
" ",
|
|
2526
2622
|
value
|
|
2527
|
-
] }) : /* @__PURE__ */ (0,
|
|
2623
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
2528
2624
|
value,
|
|
2529
2625
|
" ",
|
|
2530
|
-
/* @__PURE__ */ (0,
|
|
2626
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Help_default, { help, onClick })
|
|
2531
2627
|
] });
|
|
2532
2628
|
}
|
|
2533
2629
|
return value;
|
|
2534
2630
|
};
|
|
2535
2631
|
|
|
2536
2632
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
2537
|
-
var
|
|
2633
|
+
var import_components33 = require("@transferwise/components");
|
|
2538
2634
|
var import_react9 = require("react");
|
|
2539
2635
|
var import_react_intl16 = require("react-intl");
|
|
2540
2636
|
|
|
@@ -2572,8 +2668,8 @@ var generic_error_messages_default = (0, import_react_intl14.defineMessages)({
|
|
|
2572
2668
|
});
|
|
2573
2669
|
|
|
2574
2670
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
2575
|
-
var
|
|
2576
|
-
var
|
|
2671
|
+
var import_components32 = require("@transferwise/components");
|
|
2672
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2577
2673
|
function ErrorResult({ state }) {
|
|
2578
2674
|
const intl = (0, import_react_intl15.useIntl)();
|
|
2579
2675
|
const buttonVisualProps = {
|
|
@@ -2581,11 +2677,11 @@ function ErrorResult({ state }) {
|
|
|
2581
2677
|
size: "sm",
|
|
2582
2678
|
style: { marginTop: "-2px", padding: "0", width: "auto", display: "inline" }
|
|
2583
2679
|
};
|
|
2584
|
-
return /* @__PURE__ */ (0,
|
|
2680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("p", { className: "m-t-2", children: [
|
|
2585
2681
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
2586
2682
|
"\xA0",
|
|
2587
|
-
/* @__PURE__ */ (0,
|
|
2588
|
-
|
|
2683
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2684
|
+
import_components32.Button,
|
|
2589
2685
|
__spreadProps(__spreadValues({}, buttonVisualProps), {
|
|
2590
2686
|
onClick: () => {
|
|
2591
2687
|
state.onRetry();
|
|
@@ -2597,7 +2693,7 @@ function ErrorResult({ state }) {
|
|
|
2597
2693
|
}
|
|
2598
2694
|
|
|
2599
2695
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
2600
|
-
var
|
|
2696
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2601
2697
|
function BlockSearchRendererComponent({
|
|
2602
2698
|
id,
|
|
2603
2699
|
isLoading,
|
|
@@ -2610,9 +2706,9 @@ function BlockSearchRendererComponent({
|
|
|
2610
2706
|
}) {
|
|
2611
2707
|
const [hasSearched, setHasSearched] = (0, import_react9.useState)(false);
|
|
2612
2708
|
const { formatMessage } = (0, import_react_intl16.useIntl)();
|
|
2613
|
-
return /* @__PURE__ */ (0,
|
|
2614
|
-
/* @__PURE__ */ (0,
|
|
2615
|
-
|
|
2709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: getMargin(margin), children: [
|
|
2710
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2711
|
+
import_components33.Input,
|
|
2616
2712
|
{
|
|
2617
2713
|
id,
|
|
2618
2714
|
name: id,
|
|
@@ -2628,7 +2724,7 @@ function BlockSearchRendererComponent({
|
|
|
2628
2724
|
}
|
|
2629
2725
|
}
|
|
2630
2726
|
) }),
|
|
2631
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
2727
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx_runtime49.Fragment, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SearchResultContent, { state, trackEvent })
|
|
2632
2728
|
] });
|
|
2633
2729
|
}
|
|
2634
2730
|
function SearchResultContent({
|
|
@@ -2637,31 +2733,31 @@ function SearchResultContent({
|
|
|
2637
2733
|
}) {
|
|
2638
2734
|
switch (state.type) {
|
|
2639
2735
|
case "error":
|
|
2640
|
-
return /* @__PURE__ */ (0,
|
|
2736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ErrorResult, { state });
|
|
2641
2737
|
case "results":
|
|
2642
|
-
return /* @__PURE__ */ (0,
|
|
2738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SearchResults, { state, trackEvent });
|
|
2643
2739
|
case "noResults":
|
|
2644
|
-
return /* @__PURE__ */ (0,
|
|
2740
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(EmptySearchResult, { state });
|
|
2645
2741
|
case "pending":
|
|
2646
2742
|
default:
|
|
2647
2743
|
return null;
|
|
2648
2744
|
}
|
|
2649
2745
|
}
|
|
2650
2746
|
function EmptySearchResult({ state }) {
|
|
2651
|
-
return /* @__PURE__ */ (0,
|
|
2747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components33.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
2652
2748
|
}
|
|
2653
2749
|
function SearchResults({
|
|
2654
2750
|
state,
|
|
2655
2751
|
trackEvent
|
|
2656
2752
|
}) {
|
|
2657
|
-
return /* @__PURE__ */ (0,
|
|
2658
|
-
const {
|
|
2659
|
-
return /* @__PURE__ */ (0,
|
|
2660
|
-
|
|
2753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components33.NavigationOptionsList, { children: state.results.map((result) => {
|
|
2754
|
+
const { media } = result;
|
|
2755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2756
|
+
import_components33.NavigationOption,
|
|
2661
2757
|
{
|
|
2662
2758
|
title: result.title,
|
|
2663
2759
|
content: result.description,
|
|
2664
|
-
media: OptionMedia({
|
|
2760
|
+
media: OptionMedia({ media, preferAvatar: false }),
|
|
2665
2761
|
showMediaCircle: false,
|
|
2666
2762
|
showMediaAtAllSizes: true,
|
|
2667
2763
|
onClick: () => {
|
|
@@ -2678,11 +2774,11 @@ function SearchResults({
|
|
|
2678
2774
|
var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
|
|
2679
2775
|
|
|
2680
2776
|
// ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
|
|
2681
|
-
var
|
|
2777
|
+
var import_components34 = require("@transferwise/components");
|
|
2682
2778
|
var import_icons2 = require("@transferwise/icons");
|
|
2683
2779
|
var import_react10 = require("react");
|
|
2684
2780
|
var import_react_intl17 = require("react-intl");
|
|
2685
|
-
var
|
|
2781
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2686
2782
|
function InlineSearchRenderer({
|
|
2687
2783
|
id,
|
|
2688
2784
|
isLoading,
|
|
@@ -2694,18 +2790,18 @@ function InlineSearchRenderer({
|
|
|
2694
2790
|
}) {
|
|
2695
2791
|
const [hasSearched, setHasSearched] = (0, import_react10.useState)(false);
|
|
2696
2792
|
const intl = (0, import_react_intl17.useIntl)();
|
|
2697
|
-
return /* @__PURE__ */ (0,
|
|
2698
|
-
|
|
2793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2794
|
+
import_components34.Typeahead,
|
|
2699
2795
|
{
|
|
2700
2796
|
id: "typeahead-input-id",
|
|
2701
2797
|
intl,
|
|
2702
2798
|
name: "typeahead-input-name",
|
|
2703
2799
|
size: "md",
|
|
2704
2800
|
maxHeight: 100,
|
|
2705
|
-
footer: /* @__PURE__ */ (0,
|
|
2801
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TypeaheadFooter, { state, isLoading }),
|
|
2706
2802
|
multiple: false,
|
|
2707
2803
|
clearable: false,
|
|
2708
|
-
addon: /* @__PURE__ */ (0,
|
|
2804
|
+
addon: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_icons2.Search, { size: 24 }),
|
|
2709
2805
|
options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
|
|
2710
2806
|
minQueryLength: 1,
|
|
2711
2807
|
onChange: (values) => {
|
|
@@ -2742,34 +2838,34 @@ function mapResultToTypeaheadOption(result) {
|
|
|
2742
2838
|
function TypeaheadFooter({ state, isLoading }) {
|
|
2743
2839
|
const { formatMessage } = (0, import_react_intl17.useIntl)();
|
|
2744
2840
|
if (state.type === "noResults") {
|
|
2745
|
-
return /* @__PURE__ */ (0,
|
|
2841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_components34.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
2746
2842
|
}
|
|
2747
2843
|
if (state.type === "error") {
|
|
2748
|
-
return /* @__PURE__ */ (0,
|
|
2844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ErrorResult, { state }) });
|
|
2749
2845
|
}
|
|
2750
2846
|
if (state.type === "pending" || isLoading) {
|
|
2751
|
-
return /* @__PURE__ */ (0,
|
|
2847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
|
|
2752
2848
|
}
|
|
2753
2849
|
return null;
|
|
2754
2850
|
}
|
|
2755
2851
|
var InlineSearchRendererComponent_default = InlineSearchRenderer;
|
|
2756
2852
|
|
|
2757
2853
|
// ../renderers/src/SearchRenderer/SearchRenderer.tsx
|
|
2758
|
-
var
|
|
2854
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
2759
2855
|
var SearchRenderer = {
|
|
2760
2856
|
canRenderType: "search",
|
|
2761
|
-
render: (props) => props.control === "inline" ? /* @__PURE__ */ (0,
|
|
2857
|
+
render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
|
|
2762
2858
|
};
|
|
2763
2859
|
var SearchRenderer_default = SearchRenderer;
|
|
2764
2860
|
|
|
2765
2861
|
// ../renderers/src/SectionRenderer.tsx
|
|
2766
|
-
var
|
|
2767
|
-
var
|
|
2862
|
+
var import_components35 = require("@transferwise/components");
|
|
2863
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2768
2864
|
var SectionRenderer = {
|
|
2769
2865
|
canRenderType: "section",
|
|
2770
2866
|
render: ({ children, callToAction, margin, title }) => {
|
|
2771
|
-
return /* @__PURE__ */ (0,
|
|
2772
|
-
(title || callToAction) && /* @__PURE__ */ (0,
|
|
2867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("section", { className: getMargin(margin), children: [
|
|
2868
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components35.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
|
|
2773
2869
|
children
|
|
2774
2870
|
] });
|
|
2775
2871
|
}
|
|
@@ -2777,8 +2873,8 @@ var SectionRenderer = {
|
|
|
2777
2873
|
var SectionRenderer_default = SectionRenderer;
|
|
2778
2874
|
|
|
2779
2875
|
// ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
2780
|
-
var
|
|
2781
|
-
var
|
|
2876
|
+
var import_components36 = require("@transferwise/components");
|
|
2877
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2782
2878
|
function RadioInputRendererComponent(props) {
|
|
2783
2879
|
const {
|
|
2784
2880
|
id,
|
|
@@ -2792,8 +2888,8 @@ function RadioInputRendererComponent(props) {
|
|
|
2792
2888
|
validationState,
|
|
2793
2889
|
onSelect
|
|
2794
2890
|
} = props;
|
|
2795
|
-
return /* @__PURE__ */ (0,
|
|
2796
|
-
/* @__PURE__ */ (0,
|
|
2891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
|
|
2892
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2797
2893
|
FieldInput_default,
|
|
2798
2894
|
{
|
|
2799
2895
|
id,
|
|
@@ -2801,8 +2897,8 @@ function RadioInputRendererComponent(props) {
|
|
|
2801
2897
|
help,
|
|
2802
2898
|
description,
|
|
2803
2899
|
validation: validationState,
|
|
2804
|
-
children: /* @__PURE__ */ (0,
|
|
2805
|
-
|
|
2900
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2901
|
+
import_components36.RadioGroup,
|
|
2806
2902
|
{
|
|
2807
2903
|
name: id,
|
|
2808
2904
|
radios: options.map((option, index) => ({
|
|
@@ -2810,7 +2906,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2810
2906
|
value: index,
|
|
2811
2907
|
secondary: option.description,
|
|
2812
2908
|
disabled: option.disabled || disabled,
|
|
2813
|
-
avatar: /* @__PURE__ */ (0,
|
|
2909
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
|
|
2814
2910
|
})),
|
|
2815
2911
|
selectedValue: selectedIndex != null ? selectedIndex : void 0,
|
|
2816
2912
|
onChange: onSelect
|
|
@@ -2824,9 +2920,9 @@ function RadioInputRendererComponent(props) {
|
|
|
2824
2920
|
}
|
|
2825
2921
|
|
|
2826
2922
|
// ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
2827
|
-
var
|
|
2923
|
+
var import_components37 = require("@transferwise/components");
|
|
2828
2924
|
var import_react11 = require("react");
|
|
2829
|
-
var
|
|
2925
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2830
2926
|
function TabInputRendererComponent(props) {
|
|
2831
2927
|
const {
|
|
2832
2928
|
id,
|
|
@@ -2845,8 +2941,8 @@ function TabInputRendererComponent(props) {
|
|
|
2845
2941
|
onSelect(0);
|
|
2846
2942
|
}
|
|
2847
2943
|
}, [selectedIndex, onSelect, options.length]);
|
|
2848
|
-
return /* @__PURE__ */ (0,
|
|
2849
|
-
/* @__PURE__ */ (0,
|
|
2944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
2945
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2850
2946
|
FieldInput_default,
|
|
2851
2947
|
{
|
|
2852
2948
|
id,
|
|
@@ -2854,8 +2950,8 @@ function TabInputRendererComponent(props) {
|
|
|
2854
2950
|
help,
|
|
2855
2951
|
description,
|
|
2856
2952
|
validation: validationState,
|
|
2857
|
-
children: /* @__PURE__ */ (0,
|
|
2858
|
-
|
|
2953
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2954
|
+
import_components37.Tabs,
|
|
2859
2955
|
{
|
|
2860
2956
|
name: id,
|
|
2861
2957
|
selected: selectedIndex != null ? selectedIndex : 0,
|
|
@@ -2863,7 +2959,7 @@ function TabInputRendererComponent(props) {
|
|
|
2863
2959
|
title: option.title,
|
|
2864
2960
|
// if we pass null, we get some props-types console errors
|
|
2865
2961
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
2866
|
-
content: /* @__PURE__ */ (0,
|
|
2962
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_jsx_runtime54.Fragment, {}),
|
|
2867
2963
|
disabled: option.disabled || disabled
|
|
2868
2964
|
})),
|
|
2869
2965
|
onTabSelect: onSelect
|
|
@@ -2877,8 +2973,8 @@ function TabInputRendererComponent(props) {
|
|
|
2877
2973
|
var isValidIndex = (index, options) => index !== null && index >= 0 && index < options;
|
|
2878
2974
|
|
|
2879
2975
|
// ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
2880
|
-
var
|
|
2881
|
-
var
|
|
2976
|
+
var import_components38 = require("@transferwise/components");
|
|
2977
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2882
2978
|
function SelectInputRendererComponent(props) {
|
|
2883
2979
|
const {
|
|
2884
2980
|
id,
|
|
@@ -2914,17 +3010,17 @@ function SelectInputRendererComponent(props) {
|
|
|
2914
3010
|
const contentProps = withinTrigger ? {
|
|
2915
3011
|
title: option.title,
|
|
2916
3012
|
note: option.description,
|
|
2917
|
-
icon:
|
|
3013
|
+
icon: getInlineMedia(option.media)
|
|
2918
3014
|
} : {
|
|
2919
3015
|
title: option.title,
|
|
2920
3016
|
description: option.description,
|
|
2921
|
-
icon: /* @__PURE__ */ (0,
|
|
3017
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
|
|
2922
3018
|
};
|
|
2923
|
-
return /* @__PURE__ */ (0,
|
|
3019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components38.SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
2924
3020
|
};
|
|
2925
3021
|
const extraProps = { autoComplete };
|
|
2926
|
-
return /* @__PURE__ */ (0,
|
|
2927
|
-
/* @__PURE__ */ (0,
|
|
3022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
3023
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2928
3024
|
FieldInput_default,
|
|
2929
3025
|
{
|
|
2930
3026
|
id,
|
|
@@ -2932,8 +3028,8 @@ function SelectInputRendererComponent(props) {
|
|
|
2932
3028
|
help,
|
|
2933
3029
|
description,
|
|
2934
3030
|
validation: validationState,
|
|
2935
|
-
children: /* @__PURE__ */ (0,
|
|
2936
|
-
|
|
3031
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3032
|
+
import_components38.SelectInput,
|
|
2937
3033
|
__spreadValues({
|
|
2938
3034
|
name: id,
|
|
2939
3035
|
placeholder,
|
|
@@ -2954,8 +3050,8 @@ function SelectInputRendererComponent(props) {
|
|
|
2954
3050
|
|
|
2955
3051
|
// ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
|
|
2956
3052
|
var import_react12 = require("react");
|
|
2957
|
-
var
|
|
2958
|
-
var
|
|
3053
|
+
var import_components39 = require("@transferwise/components");
|
|
3054
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2959
3055
|
function SegmentedInputRendererComponent(props) {
|
|
2960
3056
|
const {
|
|
2961
3057
|
id,
|
|
@@ -2973,8 +3069,8 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2973
3069
|
onSelect(0);
|
|
2974
3070
|
}
|
|
2975
3071
|
}, [selectedIndex, onSelect, options.length]);
|
|
2976
|
-
return /* @__PURE__ */ (0,
|
|
2977
|
-
/* @__PURE__ */ (0,
|
|
3072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
|
|
3073
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2978
3074
|
FieldInput_default,
|
|
2979
3075
|
{
|
|
2980
3076
|
id,
|
|
@@ -2982,8 +3078,8 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2982
3078
|
help,
|
|
2983
3079
|
description,
|
|
2984
3080
|
validation: validationState,
|
|
2985
|
-
children: /* @__PURE__ */ (0,
|
|
2986
|
-
|
|
3081
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3082
|
+
import_components39.SegmentedControl,
|
|
2987
3083
|
{
|
|
2988
3084
|
name: `${id}-segmented-control`,
|
|
2989
3085
|
value: String(selectedIndex),
|
|
@@ -2999,44 +3095,44 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2999
3095
|
)
|
|
3000
3096
|
}
|
|
3001
3097
|
),
|
|
3002
|
-
/* @__PURE__ */ (0,
|
|
3098
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { id: `${id}-children`, children })
|
|
3003
3099
|
] });
|
|
3004
3100
|
}
|
|
3005
3101
|
var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
|
|
3006
3102
|
|
|
3007
3103
|
// ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
|
|
3008
|
-
var
|
|
3104
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3009
3105
|
var SelectInputRenderer = {
|
|
3010
3106
|
canRenderType: "input-select",
|
|
3011
3107
|
render: (props) => {
|
|
3012
3108
|
switch (props.control) {
|
|
3013
3109
|
case "radio":
|
|
3014
|
-
return /* @__PURE__ */ (0,
|
|
3110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
|
|
3015
3111
|
case "tab":
|
|
3016
|
-
return props.options.length > 3 ? /* @__PURE__ */ (0,
|
|
3112
|
+
return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TabInputRendererComponent, __spreadValues({}, props));
|
|
3017
3113
|
case "segmented":
|
|
3018
|
-
return props.options.length > 3 ? /* @__PURE__ */ (0,
|
|
3114
|
+
return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
|
|
3019
3115
|
case "select":
|
|
3020
3116
|
default:
|
|
3021
|
-
return /* @__PURE__ */ (0,
|
|
3117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
|
|
3022
3118
|
}
|
|
3023
3119
|
}
|
|
3024
3120
|
};
|
|
3025
3121
|
var SelectInputRenderer_default = SelectInputRenderer;
|
|
3026
3122
|
|
|
3027
3123
|
// ../renderers/src/StatusListRenderer.tsx
|
|
3028
|
-
var
|
|
3029
|
-
var
|
|
3124
|
+
var import_components40 = require("@transferwise/components");
|
|
3125
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3030
3126
|
var StatusListRenderer = {
|
|
3031
3127
|
canRenderType: "status-list",
|
|
3032
|
-
render: ({ margin, items, title }) => /* @__PURE__ */ (0,
|
|
3033
|
-
title ? /* @__PURE__ */ (0,
|
|
3034
|
-
items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0,
|
|
3035
|
-
|
|
3128
|
+
render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: getMargin(margin), children: [
|
|
3129
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components40.Header, { title, className: "m-b-2" }) : null,
|
|
3130
|
+
items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
3131
|
+
import_components40.Summary,
|
|
3036
3132
|
{
|
|
3037
3133
|
title: itemTitle,
|
|
3038
3134
|
description,
|
|
3039
|
-
icon: icon && "name" in icon ? /* @__PURE__ */ (0,
|
|
3135
|
+
icon: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DynamicIcon_default, { name: icon.name }) : null,
|
|
3040
3136
|
status: mapStatus(status),
|
|
3041
3137
|
action: getSummaryAction(callToAction)
|
|
3042
3138
|
},
|
|
@@ -3088,11 +3184,11 @@ var useCustomTheme = (theme, trackEvent) => {
|
|
|
3088
3184
|
};
|
|
3089
3185
|
|
|
3090
3186
|
// ../renderers/src/step/BackButton.tsx
|
|
3091
|
-
var
|
|
3187
|
+
var import_components41 = require("@transferwise/components");
|
|
3092
3188
|
var import_icons3 = require("@transferwise/icons");
|
|
3093
|
-
var
|
|
3189
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3094
3190
|
function BackButton({ title, onClick }) {
|
|
3095
|
-
return /* @__PURE__ */ (0,
|
|
3191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "m-b-2", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
3096
3192
|
"button",
|
|
3097
3193
|
{
|
|
3098
3194
|
type: "button",
|
|
@@ -3101,8 +3197,8 @@ function BackButton({ title, onClick }) {
|
|
|
3101
3197
|
"aria-label": title,
|
|
3102
3198
|
onClick,
|
|
3103
3199
|
children: [
|
|
3104
|
-
/* @__PURE__ */ (0,
|
|
3105
|
-
/* @__PURE__ */ (0,
|
|
3200
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "sr-only", children: title }),
|
|
3201
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_components41.AvatarView, { interactive: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_icons3.ArrowLeft, { size: "24" }) })
|
|
3106
3202
|
]
|
|
3107
3203
|
}
|
|
3108
3204
|
) });
|
|
@@ -3110,7 +3206,7 @@ function BackButton({ title, onClick }) {
|
|
|
3110
3206
|
var BackButton_default = BackButton;
|
|
3111
3207
|
|
|
3112
3208
|
// ../renderers/src/step/SplashCelebrationStepRenderer.tsx
|
|
3113
|
-
var
|
|
3209
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3114
3210
|
var SplashCelebrationStepRenderer = {
|
|
3115
3211
|
canRenderType: "step",
|
|
3116
3212
|
canRender: ({ control }) => control === "splash-celebration",
|
|
@@ -3119,14 +3215,14 @@ var SplashCelebrationStepRenderer = {
|
|
|
3119
3215
|
function SplashCelebrationStepRendererComponent(props) {
|
|
3120
3216
|
const { back, children, trackEvent } = props;
|
|
3121
3217
|
useCustomTheme("forest-green", trackEvent);
|
|
3122
|
-
return /* @__PURE__ */ (0,
|
|
3123
|
-
back ? /* @__PURE__ */ (0,
|
|
3218
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "splash-screen m-t-5", children: [
|
|
3219
|
+
back ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(BackButton_default, __spreadValues({}, back)) : null,
|
|
3124
3220
|
children
|
|
3125
3221
|
] });
|
|
3126
3222
|
}
|
|
3127
3223
|
|
|
3128
3224
|
// ../renderers/src/step/SplashStepRenderer.tsx
|
|
3129
|
-
var
|
|
3225
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
3130
3226
|
var SplashStepRenderer = {
|
|
3131
3227
|
canRenderType: "step",
|
|
3132
3228
|
canRender: ({ control }) => control === "splash",
|
|
@@ -3134,63 +3230,63 @@ var SplashStepRenderer = {
|
|
|
3134
3230
|
};
|
|
3135
3231
|
function SplashStepRendererComponent(props) {
|
|
3136
3232
|
const { back, children } = props;
|
|
3137
|
-
return /* @__PURE__ */ (0,
|
|
3138
|
-
back ? /* @__PURE__ */ (0,
|
|
3233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "splash-screen m-t-5", children: [
|
|
3234
|
+
back ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(BackButton_default, __spreadValues({}, back)) : null,
|
|
3139
3235
|
children
|
|
3140
3236
|
] });
|
|
3141
3237
|
}
|
|
3142
3238
|
|
|
3143
3239
|
// ../renderers/src/step/StepRenderer.tsx
|
|
3144
|
-
var
|
|
3145
|
-
var
|
|
3240
|
+
var import_components42 = require("@transferwise/components");
|
|
3241
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
3146
3242
|
var StepRenderer = {
|
|
3147
3243
|
canRenderType: "step",
|
|
3148
3244
|
render: StepRendererComponent
|
|
3149
3245
|
};
|
|
3150
3246
|
function StepRendererComponent(props) {
|
|
3151
3247
|
const { back, description, error, title, children } = props;
|
|
3152
|
-
return /* @__PURE__ */ (0,
|
|
3153
|
-
back ? /* @__PURE__ */ (0,
|
|
3154
|
-
title || description ? /* @__PURE__ */ (0,
|
|
3155
|
-
title ? /* @__PURE__ */ (0,
|
|
3156
|
-
description ? /* @__PURE__ */ (0,
|
|
3248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
|
|
3249
|
+
back ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(BackButton_default, __spreadValues({}, back)) : null,
|
|
3250
|
+
title || description ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "m-b-4", children: [
|
|
3251
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components42.Title, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
|
|
3252
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { className: "text-xs-center np-text-body-large", children: description }) : void 0
|
|
3157
3253
|
] }) : void 0,
|
|
3158
|
-
error ? /* @__PURE__ */ (0,
|
|
3254
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components42.Alert, { type: "negative", className: "m-b-2", message: error }) : void 0,
|
|
3159
3255
|
children
|
|
3160
3256
|
] });
|
|
3161
3257
|
}
|
|
3162
3258
|
|
|
3163
3259
|
// ../renderers/src/TabsRenderer.tsx
|
|
3164
|
-
var
|
|
3260
|
+
var import_components43 = require("@transferwise/components");
|
|
3165
3261
|
var import_react14 = require("react");
|
|
3166
|
-
var
|
|
3262
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
3167
3263
|
var TabsRenderer = {
|
|
3168
3264
|
canRenderType: "tabs",
|
|
3169
3265
|
render: (props) => {
|
|
3170
3266
|
switch (props.control) {
|
|
3171
3267
|
case "segmented":
|
|
3172
3268
|
if (props.tabs.length > 3) {
|
|
3173
|
-
return /* @__PURE__ */ (0,
|
|
3269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(TabsRendererComponent, __spreadValues({}, props));
|
|
3174
3270
|
}
|
|
3175
|
-
return /* @__PURE__ */ (0,
|
|
3271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(SegmentedTabsRendererComponent, __spreadValues({}, props));
|
|
3176
3272
|
case "chips":
|
|
3177
|
-
return /* @__PURE__ */ (0,
|
|
3273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(ChipsTabsRendererComponent, __spreadValues({}, props));
|
|
3178
3274
|
default:
|
|
3179
|
-
return /* @__PURE__ */ (0,
|
|
3275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(TabsRendererComponent, __spreadValues({}, props));
|
|
3180
3276
|
}
|
|
3181
3277
|
}
|
|
3182
3278
|
};
|
|
3183
3279
|
function TabsRendererComponent({ uid, margin, tabs }) {
|
|
3184
3280
|
const [selectedIndex, setSelectedIndex] = (0, import_react14.useState)(0);
|
|
3185
|
-
return /* @__PURE__ */ (0,
|
|
3186
|
-
|
|
3281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3282
|
+
import_components43.Tabs,
|
|
3187
3283
|
{
|
|
3188
3284
|
name: uid,
|
|
3189
3285
|
selected: selectedIndex != null ? selectedIndex : 0,
|
|
3190
3286
|
tabs: tabs.map((option) => ({
|
|
3191
3287
|
title: option.title,
|
|
3192
3288
|
disabled: false,
|
|
3193
|
-
content: /* @__PURE__ */ (0,
|
|
3289
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "m-t-2", children: [
|
|
3194
3290
|
" ",
|
|
3195
3291
|
option.children,
|
|
3196
3292
|
" "
|
|
@@ -3203,9 +3299,9 @@ function TabsRendererComponent({ uid, margin, tabs }) {
|
|
|
3203
3299
|
function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
3204
3300
|
var _a;
|
|
3205
3301
|
const [selectedIndex, setSelectedIndex] = (0, import_react14.useState)(0);
|
|
3206
|
-
return /* @__PURE__ */ (0,
|
|
3207
|
-
/* @__PURE__ */ (0,
|
|
3208
|
-
|
|
3302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: getMargin(margin), children: [
|
|
3303
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3304
|
+
import_components43.SegmentedControl,
|
|
3209
3305
|
{
|
|
3210
3306
|
name: uid,
|
|
3211
3307
|
value: String(selectedIndex),
|
|
@@ -3219,31 +3315,31 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
|
3219
3315
|
onChange: (value) => setSelectedIndex(Number(value))
|
|
3220
3316
|
}
|
|
3221
3317
|
),
|
|
3222
|
-
/* @__PURE__ */ (0,
|
|
3318
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
3223
3319
|
] });
|
|
3224
3320
|
}
|
|
3225
3321
|
function ChipsTabsRendererComponent({ margin, tabs }) {
|
|
3226
3322
|
var _a;
|
|
3227
3323
|
const [selectedIndex, setSelectedIndex] = (0, import_react14.useState)(0);
|
|
3228
|
-
return /* @__PURE__ */ (0,
|
|
3229
|
-
/* @__PURE__ */ (0,
|
|
3230
|
-
|
|
3324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: getMargin(margin), children: [
|
|
3325
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "chips-container", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3326
|
+
import_components43.Chips,
|
|
3231
3327
|
{
|
|
3232
3328
|
chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
|
|
3233
3329
|
selected: selectedIndex,
|
|
3234
3330
|
onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
|
|
3235
3331
|
}
|
|
3236
3332
|
) }),
|
|
3237
|
-
/* @__PURE__ */ (0,
|
|
3333
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
3238
3334
|
] });
|
|
3239
3335
|
}
|
|
3240
3336
|
|
|
3241
3337
|
// ../renderers/src/TextInputRenderer.tsx
|
|
3242
|
-
var
|
|
3338
|
+
var import_components45 = require("@transferwise/components");
|
|
3243
3339
|
|
|
3244
3340
|
// ../renderers/src/components/VariableTextInput.tsx
|
|
3245
|
-
var
|
|
3246
|
-
var
|
|
3341
|
+
var import_components44 = require("@transferwise/components");
|
|
3342
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
3247
3343
|
var commonKeys = [
|
|
3248
3344
|
"autoComplete",
|
|
3249
3345
|
"autoCapitalize",
|
|
@@ -3262,12 +3358,12 @@ function VariableTextInput(inputProps) {
|
|
|
3262
3358
|
const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
|
|
3263
3359
|
switch (control) {
|
|
3264
3360
|
case "email":
|
|
3265
|
-
return /* @__PURE__ */ (0,
|
|
3361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
|
|
3266
3362
|
case "password":
|
|
3267
|
-
return /* @__PURE__ */ (0,
|
|
3363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
|
|
3268
3364
|
case "numeric": {
|
|
3269
3365
|
const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
|
|
3270
|
-
return /* @__PURE__ */ (0,
|
|
3366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3271
3367
|
TextInput,
|
|
3272
3368
|
__spreadProps(__spreadValues({}, numericProps), {
|
|
3273
3369
|
onChange: (newValue) => {
|
|
@@ -3278,21 +3374,21 @@ function VariableTextInput(inputProps) {
|
|
|
3278
3374
|
);
|
|
3279
3375
|
}
|
|
3280
3376
|
case "phone-number":
|
|
3281
|
-
return /* @__PURE__ */ (0,
|
|
3377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components44.PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
|
|
3282
3378
|
default: {
|
|
3283
|
-
return /* @__PURE__ */ (0,
|
|
3379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
|
|
3284
3380
|
}
|
|
3285
3381
|
}
|
|
3286
3382
|
}
|
|
3287
3383
|
function TextInput(props) {
|
|
3288
3384
|
const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
|
|
3289
|
-
const InputWithPattern = control === "textarea" ?
|
|
3290
|
-
const InputWithoutPattern = control === "textarea" ?
|
|
3291
|
-
return displayFormat ? /* @__PURE__ */ (0,
|
|
3385
|
+
const InputWithPattern = control === "textarea" ? import_components44.TextareaWithDisplayFormat : import_components44.InputWithDisplayFormat;
|
|
3386
|
+
const InputWithoutPattern = control === "textarea" ? import_components44.TextArea : import_components44.Input;
|
|
3387
|
+
return displayFormat ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
|
|
3292
3388
|
}
|
|
3293
3389
|
|
|
3294
3390
|
// ../renderers/src/TextInputRenderer.tsx
|
|
3295
|
-
var
|
|
3391
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3296
3392
|
var TextInputRenderer = {
|
|
3297
3393
|
canRenderType: "input-text",
|
|
3298
3394
|
render: (props) => {
|
|
@@ -3301,8 +3397,7 @@ var TextInputRenderer = {
|
|
|
3301
3397
|
title,
|
|
3302
3398
|
description,
|
|
3303
3399
|
help,
|
|
3304
|
-
|
|
3305
|
-
image,
|
|
3400
|
+
media,
|
|
3306
3401
|
validationState,
|
|
3307
3402
|
value: initialValue,
|
|
3308
3403
|
onChange
|
|
@@ -3311,8 +3406,7 @@ var TextInputRenderer = {
|
|
|
3311
3406
|
"title",
|
|
3312
3407
|
"description",
|
|
3313
3408
|
"help",
|
|
3314
|
-
"
|
|
3315
|
-
"image",
|
|
3409
|
+
"media",
|
|
3316
3410
|
"validationState",
|
|
3317
3411
|
"value",
|
|
3318
3412
|
"onChange"
|
|
@@ -3327,7 +3421,7 @@ var TextInputRenderer = {
|
|
|
3327
3421
|
}
|
|
3328
3422
|
}
|
|
3329
3423
|
});
|
|
3330
|
-
return /* @__PURE__ */ (0,
|
|
3424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3331
3425
|
FieldInput_default,
|
|
3332
3426
|
{
|
|
3333
3427
|
id,
|
|
@@ -3335,7 +3429,7 @@ var TextInputRenderer = {
|
|
|
3335
3429
|
description,
|
|
3336
3430
|
validation: validationState,
|
|
3337
3431
|
help,
|
|
3338
|
-
children: /* @__PURE__ */ (0,
|
|
3432
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_components45.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(VariableTextInput, __spreadValues({}, inputProps)) })
|
|
3339
3433
|
}
|
|
3340
3434
|
);
|
|
3341
3435
|
}
|
|
@@ -3343,13 +3437,13 @@ var TextInputRenderer = {
|
|
|
3343
3437
|
var TextInputRenderer_default = TextInputRenderer;
|
|
3344
3438
|
|
|
3345
3439
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
3346
|
-
var
|
|
3440
|
+
var import_components46 = require("@transferwise/components");
|
|
3347
3441
|
|
|
3348
3442
|
// ../renderers/src/utils/getRandomId.ts
|
|
3349
3443
|
var getRandomId = () => Math.random().toString(36).substring(2);
|
|
3350
3444
|
|
|
3351
3445
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
3352
|
-
var
|
|
3446
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
3353
3447
|
var UploadInputRenderer = {
|
|
3354
3448
|
canRenderType: "input-upload",
|
|
3355
3449
|
render: (props) => {
|
|
@@ -3365,15 +3459,15 @@ var UploadInputRenderer = {
|
|
|
3365
3459
|
};
|
|
3366
3460
|
return (
|
|
3367
3461
|
// We don't pass help here as there is no sensible place to display it
|
|
3368
|
-
/* @__PURE__ */ (0,
|
|
3462
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3369
3463
|
UploadFieldInput_default,
|
|
3370
3464
|
{
|
|
3371
3465
|
id,
|
|
3372
3466
|
label: void 0,
|
|
3373
3467
|
description: void 0,
|
|
3374
3468
|
validation: validationState,
|
|
3375
|
-
children: /* @__PURE__ */ (0,
|
|
3376
|
-
|
|
3469
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3470
|
+
import_components46.UploadInput,
|
|
3377
3471
|
{
|
|
3378
3472
|
id,
|
|
3379
3473
|
description,
|
|
@@ -3431,7 +3525,7 @@ var LargeUploadRenderer = {
|
|
|
3431
3525
|
};
|
|
3432
3526
|
const filetypes = acceptsToFileTypes(accepts);
|
|
3433
3527
|
const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
|
|
3434
|
-
return /* @__PURE__ */ (0,
|
|
3528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3435
3529
|
FieldInput_default,
|
|
3436
3530
|
{
|
|
3437
3531
|
id,
|
|
@@ -3439,8 +3533,8 @@ var LargeUploadRenderer = {
|
|
|
3439
3533
|
description,
|
|
3440
3534
|
validation: validationState,
|
|
3441
3535
|
help,
|
|
3442
|
-
children: /* @__PURE__ */ (0,
|
|
3443
|
-
|
|
3536
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3537
|
+
import_components46.Upload,
|
|
3444
3538
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
3445
3539
|
usAccept,
|
|
3446
3540
|
usDisabled: disabled,
|
|
@@ -3454,8 +3548,183 @@ var LargeUploadRenderer = {
|
|
|
3454
3548
|
}
|
|
3455
3549
|
};
|
|
3456
3550
|
|
|
3551
|
+
// ../renderers/src/NewListItem/NewDecisionRenderer.tsx
|
|
3552
|
+
var import_components48 = require("@transferwise/components");
|
|
3553
|
+
|
|
3554
|
+
// ../renderers/src/NewListItem/getInlineAlert.tsx
|
|
3555
|
+
var import_components47 = require("@transferwise/components");
|
|
3556
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
3557
|
+
var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_components47.ListItem.Prompt, { sentiment: inlineAlert == null ? void 0 : inlineAlert.context, children: inlineAlert.content }) : void 0;
|
|
3558
|
+
|
|
3559
|
+
// ../renderers/src/NewListItem/NewDecisionRenderer.tsx
|
|
3560
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
3561
|
+
var DecisionRenderer2 = {
|
|
3562
|
+
canRenderType: "decision",
|
|
3563
|
+
render: ({ control, margin, options, title }) => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: getMargin(margin), children: [
|
|
3564
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_components48.Header, { as: "h2", title }),
|
|
3565
|
+
options.map((option) => {
|
|
3566
|
+
const {
|
|
3567
|
+
description,
|
|
3568
|
+
disabled,
|
|
3569
|
+
media,
|
|
3570
|
+
title: itemTitle,
|
|
3571
|
+
tag,
|
|
3572
|
+
href,
|
|
3573
|
+
additionalText,
|
|
3574
|
+
inlineAlert,
|
|
3575
|
+
supportingValues,
|
|
3576
|
+
onClick
|
|
3577
|
+
} = option;
|
|
3578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3579
|
+
import_components48.ListItem,
|
|
3580
|
+
{
|
|
3581
|
+
title: itemTitle,
|
|
3582
|
+
subtitle: description,
|
|
3583
|
+
spotlight: control === "spotlight" ? tag === "spotlight-active" ? "active" : "inactive" : void 0,
|
|
3584
|
+
disabled,
|
|
3585
|
+
valueTitle: supportingValues == null ? void 0 : supportingValues.value,
|
|
3586
|
+
valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
|
|
3587
|
+
media: media ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3588
|
+
OptionMedia,
|
|
3589
|
+
{
|
|
3590
|
+
media,
|
|
3591
|
+
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
3592
|
+
}
|
|
3593
|
+
) : void 0,
|
|
3594
|
+
prompt: getInlineAlert(inlineAlert),
|
|
3595
|
+
additionalInfo: additionalText ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_components48.ListItem.AdditionalInfo, { children: additionalText }) : void 0,
|
|
3596
|
+
control: href ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_components48.ListItem.Navigation, { href, target: "_blank" }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_components48.ListItem.Navigation, { onClick })
|
|
3597
|
+
},
|
|
3598
|
+
JSON.stringify(option)
|
|
3599
|
+
);
|
|
3600
|
+
})
|
|
3601
|
+
] })
|
|
3602
|
+
};
|
|
3603
|
+
var NewDecisionRenderer_default = DecisionRenderer2;
|
|
3604
|
+
|
|
3605
|
+
// ../renderers/src/NewListItem/NewListRenderer.tsx
|
|
3606
|
+
var import_components50 = require("@transferwise/components");
|
|
3607
|
+
|
|
3608
|
+
// ../renderers/src/NewListItem/getAdditionalInfo.tsx
|
|
3609
|
+
var import_components49 = require("@transferwise/components");
|
|
3610
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
3611
|
+
var getAdditionalInfo = (additionalInfo) => {
|
|
3612
|
+
var _a;
|
|
3613
|
+
return additionalInfo ? (
|
|
3614
|
+
// TODO: this type should have an href so we can render anchors
|
|
3615
|
+
additionalInfo.onClick ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3616
|
+
import_components49.ListItem.AdditionalInfo,
|
|
3617
|
+
{
|
|
3618
|
+
action: {
|
|
3619
|
+
onClick: additionalInfo.onClick,
|
|
3620
|
+
label: (_a = additionalInfo.text) != null ? _a : ""
|
|
3621
|
+
}
|
|
3622
|
+
}
|
|
3623
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_components49.ListItem.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text })
|
|
3624
|
+
) : void 0;
|
|
3625
|
+
};
|
|
3626
|
+
|
|
3627
|
+
// ../renderers/src/NewListItem/NewListRenderer.tsx
|
|
3628
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3629
|
+
var ListRenderer2 = {
|
|
3630
|
+
canRenderType: "list",
|
|
3631
|
+
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: getMargin(margin), children: [
|
|
3632
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components50.Header, { as: "h2", title: title != null ? title : "", action: getListAction2(callToAction) }),
|
|
3633
|
+
items.map(
|
|
3634
|
+
({
|
|
3635
|
+
title: itemTitle,
|
|
3636
|
+
description,
|
|
3637
|
+
supportingValues,
|
|
3638
|
+
media,
|
|
3639
|
+
tag,
|
|
3640
|
+
additionalInfo,
|
|
3641
|
+
inlineAlert
|
|
3642
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3643
|
+
import_components50.ListItem,
|
|
3644
|
+
{
|
|
3645
|
+
title: itemTitle,
|
|
3646
|
+
subtitle: description,
|
|
3647
|
+
valueTitle: supportingValues == null ? void 0 : supportingValues.value,
|
|
3648
|
+
valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
|
|
3649
|
+
media: media ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3650
|
+
OptionMedia,
|
|
3651
|
+
{
|
|
3652
|
+
media,
|
|
3653
|
+
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
3654
|
+
}
|
|
3655
|
+
) : void 0,
|
|
3656
|
+
prompt: getInlineAlert(inlineAlert),
|
|
3657
|
+
additionalInfo: getAdditionalInfo(additionalInfo)
|
|
3658
|
+
},
|
|
3659
|
+
itemTitle
|
|
3660
|
+
)
|
|
3661
|
+
)
|
|
3662
|
+
] })
|
|
3663
|
+
};
|
|
3664
|
+
var getListAction2 = (callToAction) => {
|
|
3665
|
+
if (callToAction) {
|
|
3666
|
+
return __spreadValues({
|
|
3667
|
+
"aria-label": callToAction.accessibilityDescription,
|
|
3668
|
+
text: callToAction.title,
|
|
3669
|
+
onClick: callToAction.onClick
|
|
3670
|
+
}, callToAction.type === "link" ? { href: callToAction.href, target: "_blank" } : {});
|
|
3671
|
+
}
|
|
3672
|
+
return void 0;
|
|
3673
|
+
};
|
|
3674
|
+
var NewListRenderer_default = ListRenderer2;
|
|
3675
|
+
|
|
3676
|
+
// ../renderers/src/NewListItem/NewReviewRenderer.tsx
|
|
3677
|
+
var import_components51 = require("@transferwise/components");
|
|
3678
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
3679
|
+
var ReviewRenderer2 = {
|
|
3680
|
+
canRenderType: "review",
|
|
3681
|
+
render: ({ callToAction, control, margin, fields, title }) => /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: getMargin(margin), children: [
|
|
3682
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_components51.Header, { as: "h2", title: title != null ? title : "", action: getHeaderAction(callToAction) }),
|
|
3683
|
+
fields.map(({ label, value, media, tag, additionalInfo, inlineAlert, callToAction: callToAction2 }) => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3684
|
+
import_components51.ListItem,
|
|
3685
|
+
{
|
|
3686
|
+
title: value,
|
|
3687
|
+
subtitle: label,
|
|
3688
|
+
inverted: true,
|
|
3689
|
+
media: media ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3690
|
+
OptionMedia,
|
|
3691
|
+
{
|
|
3692
|
+
media,
|
|
3693
|
+
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
3694
|
+
}
|
|
3695
|
+
) : void 0,
|
|
3696
|
+
control: getControl(callToAction2),
|
|
3697
|
+
prompt: getInlineAlert(inlineAlert),
|
|
3698
|
+
additionalInfo: getAdditionalInfo(additionalInfo)
|
|
3699
|
+
},
|
|
3700
|
+
label
|
|
3701
|
+
))
|
|
3702
|
+
] })
|
|
3703
|
+
};
|
|
3704
|
+
var getControl = (callToAction) => {
|
|
3705
|
+
if (!callToAction) {
|
|
3706
|
+
return void 0;
|
|
3707
|
+
}
|
|
3708
|
+
const { accessibilityDescription, href, title, onClick } = callToAction;
|
|
3709
|
+
if (href) {
|
|
3710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_components51.ListItem.Button, { href, partiallyInteractive: true, "aria-description": accessibilityDescription, children: title });
|
|
3711
|
+
}
|
|
3712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3713
|
+
import_components51.ListItem.Button,
|
|
3714
|
+
{
|
|
3715
|
+
onClick,
|
|
3716
|
+
partiallyInteractive: true,
|
|
3717
|
+
"aria-description": accessibilityDescription,
|
|
3718
|
+
children: title
|
|
3719
|
+
}
|
|
3720
|
+
);
|
|
3721
|
+
};
|
|
3722
|
+
var NewReviewRenderer_default = ReviewRenderer2;
|
|
3723
|
+
|
|
3457
3724
|
// ../renderers/src/getWiseRenderers.ts
|
|
3458
|
-
var
|
|
3725
|
+
var internalRenderers = [NewDecisionRenderer_default, NewListRenderer_default, NewReviewRenderer_default];
|
|
3726
|
+
var getWiseRenderers = (internal = false) => [
|
|
3727
|
+
...internal ? internalRenderers : [],
|
|
3459
3728
|
AddressValidationButtonRenderer_default,
|
|
3460
3729
|
AlertRenderer_default,
|
|
3461
3730
|
CheckboxInputRenderer_default,
|
|
@@ -3554,12 +3823,12 @@ var messages_default = (0, import_react_intl18.defineMessages)({
|
|
|
3554
3823
|
});
|
|
3555
3824
|
|
|
3556
3825
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
3557
|
-
var
|
|
3558
|
-
var wiseRenderers = getWiseRenderers();
|
|
3826
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
3827
|
+
var wiseRenderers = getWiseRenderers(true);
|
|
3559
3828
|
function DynamicFlowLegacy(props) {
|
|
3560
3829
|
const { customFetch = globalThis.fetch } = props;
|
|
3561
3830
|
const coreProps = __spreadProps(__spreadValues({}, props), { httpClient: customFetch });
|
|
3562
|
-
return /* @__PURE__ */ (0,
|
|
3831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_dynamic_flow_client2.DynamicFlow, __spreadValues({}, coreProps));
|
|
3563
3832
|
}
|
|
3564
3833
|
function DynamicFlowRevamp(props) {
|
|
3565
3834
|
const {
|
|
@@ -3596,7 +3865,7 @@ function DynamicFlowRevamp(props) {
|
|
|
3596
3865
|
onLink,
|
|
3597
3866
|
onCopy
|
|
3598
3867
|
});
|
|
3599
|
-
return /* @__PURE__ */ (0,
|
|
3868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_dynamic_flow_client2.DynamicFlowCoreRevamp, __spreadValues({}, coreProps)) });
|
|
3600
3869
|
}
|
|
3601
3870
|
var DynamicForm = (0, import_react15.forwardRef)(function DynamicForm2(props, ref) {
|
|
3602
3871
|
const {
|
|
@@ -3633,7 +3902,7 @@ var DynamicForm = (0, import_react15.forwardRef)(function DynamicForm2(props, re
|
|
|
3633
3902
|
onLink,
|
|
3634
3903
|
onCopy
|
|
3635
3904
|
});
|
|
3636
|
-
return /* @__PURE__ */ (0,
|
|
3905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_dynamic_flow_client2.DynamicFormCore, __spreadProps(__spreadValues({}, coreProps), { ref })) });
|
|
3637
3906
|
});
|
|
3638
3907
|
var useWiseHttpClient = (httpClient) => {
|
|
3639
3908
|
const { locale } = (0, import_react_intl19.useIntl)();
|