@wise/dynamic-flow-client-internal 5.28.4 → 5.29.0-experimental-cadf60b
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 +625 -597
- package/build/main.mjs +457 -429
- package/build/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +4 -4
package/build/main.mjs
CHANGED
|
@@ -64,7 +64,7 @@ var require_classnames = __commonJS({
|
|
|
64
64
|
(function() {
|
|
65
65
|
"use strict";
|
|
66
66
|
var hasOwn = {}.hasOwnProperty;
|
|
67
|
-
function
|
|
67
|
+
function classNames36() {
|
|
68
68
|
var classes = "";
|
|
69
69
|
for (var i = 0; i < arguments.length; i++) {
|
|
70
70
|
var arg = arguments[i];
|
|
@@ -82,7 +82,7 @@ var require_classnames = __commonJS({
|
|
|
82
82
|
return "";
|
|
83
83
|
}
|
|
84
84
|
if (Array.isArray(arg)) {
|
|
85
|
-
return
|
|
85
|
+
return classNames36.apply(null, arg);
|
|
86
86
|
}
|
|
87
87
|
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
|
|
88
88
|
return arg.toString();
|
|
@@ -105,14 +105,14 @@ var require_classnames = __commonJS({
|
|
|
105
105
|
return value + newClass;
|
|
106
106
|
}
|
|
107
107
|
if (typeof module !== "undefined" && module.exports) {
|
|
108
|
-
|
|
109
|
-
module.exports =
|
|
108
|
+
classNames36.default = classNames36;
|
|
109
|
+
module.exports = classNames36;
|
|
110
110
|
} else if (typeof define === "function" && typeof define.amd === "object" && define.amd) {
|
|
111
111
|
define("classnames", [], function() {
|
|
112
|
-
return
|
|
112
|
+
return classNames36;
|
|
113
113
|
});
|
|
114
114
|
} else {
|
|
115
|
-
window.classNames =
|
|
115
|
+
window.classNames = classNames36;
|
|
116
116
|
}
|
|
117
117
|
})();
|
|
118
118
|
}
|
|
@@ -1344,6 +1344,43 @@ var getPriority = (control, tags) => {
|
|
|
1344
1344
|
return control && isButtonPriority(control) ? control : "secondary";
|
|
1345
1345
|
};
|
|
1346
1346
|
|
|
1347
|
+
// ../renderers/src/ButtonRenderer/CircularButtonRenderer.tsx
|
|
1348
|
+
var import_classnames10 = __toESM(require_classnames());
|
|
1349
|
+
import { CircularButton } from "@transferwise/components";
|
|
1350
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1351
|
+
var CircularButtonRenderer = {
|
|
1352
|
+
canRenderType: "button",
|
|
1353
|
+
canRender: ({ control }) => control === "circular",
|
|
1354
|
+
render: CircularButtonComponent
|
|
1355
|
+
};
|
|
1356
|
+
function CircularButtonComponent(props) {
|
|
1357
|
+
var _a;
|
|
1358
|
+
const { context, control, disabled, margin, media, tags, title, onClick } = props;
|
|
1359
|
+
const priority = tags == null ? void 0 : tags.find((tag) => tag === "primary" || tag === "secondary");
|
|
1360
|
+
return /* @__PURE__ */ jsx27(
|
|
1361
|
+
"div",
|
|
1362
|
+
{
|
|
1363
|
+
className: (0, import_classnames10.default)(
|
|
1364
|
+
getMargin(margin),
|
|
1365
|
+
"df-button",
|
|
1366
|
+
"circular",
|
|
1367
|
+
controlAndTagsToCSSClass({ control, tags })
|
|
1368
|
+
),
|
|
1369
|
+
children: /* @__PURE__ */ jsx27(
|
|
1370
|
+
CircularButton,
|
|
1371
|
+
{
|
|
1372
|
+
disabled,
|
|
1373
|
+
priority: priority != null ? priority : "secondary",
|
|
1374
|
+
type: context === "negative" ? "negative" : "default",
|
|
1375
|
+
icon: media ? (_a = getAddonStartMedia(media)) == null ? void 0 : _a.value : void 0,
|
|
1376
|
+
onClick,
|
|
1377
|
+
children: title
|
|
1378
|
+
}
|
|
1379
|
+
)
|
|
1380
|
+
}
|
|
1381
|
+
);
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1347
1384
|
// ../renderers/src/CheckboxInputRenderer.tsx
|
|
1348
1385
|
import { Checkbox, ListItem as ListItem3 } from "@transferwise/components";
|
|
1349
1386
|
|
|
@@ -1387,13 +1424,13 @@ var help_messages_default = defineMessages2({
|
|
|
1387
1424
|
});
|
|
1388
1425
|
|
|
1389
1426
|
// ../renderers/src/components/Help.tsx
|
|
1390
|
-
import { jsx as
|
|
1427
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1391
1428
|
function Help({ help, onClick }) {
|
|
1392
1429
|
const intl = useIntl2();
|
|
1393
|
-
return /* @__PURE__ */
|
|
1430
|
+
return /* @__PURE__ */ jsx28(
|
|
1394
1431
|
Info,
|
|
1395
1432
|
{
|
|
1396
|
-
content: /* @__PURE__ */
|
|
1433
|
+
content: /* @__PURE__ */ jsx28(Markdown2, { config: { link: { target: "_blank" } }, children: help }),
|
|
1397
1434
|
presentation: "POPOVER",
|
|
1398
1435
|
size: "sm",
|
|
1399
1436
|
"aria-label": intl.formatMessage(help_messages_default.helpAria),
|
|
@@ -1404,16 +1441,16 @@ function Help({ help, onClick }) {
|
|
|
1404
1441
|
var Help_default = Help;
|
|
1405
1442
|
|
|
1406
1443
|
// ../renderers/src/components/LabelContentWithHelp.tsx
|
|
1407
|
-
import { jsx as
|
|
1444
|
+
import { jsx as jsx29, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1408
1445
|
function LabelContentWithHelp({ text, help }) {
|
|
1409
1446
|
return /* @__PURE__ */ jsxs5("div", { children: [
|
|
1410
1447
|
text,
|
|
1411
|
-
/* @__PURE__ */
|
|
1448
|
+
/* @__PURE__ */ jsx29(Help_default, { help })
|
|
1412
1449
|
] });
|
|
1413
1450
|
}
|
|
1414
1451
|
|
|
1415
1452
|
// ../renderers/src/components/FieldInput.tsx
|
|
1416
|
-
import { jsx as
|
|
1453
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1417
1454
|
function FieldInput({
|
|
1418
1455
|
id,
|
|
1419
1456
|
children,
|
|
@@ -1428,9 +1465,9 @@ function FieldInput({
|
|
|
1428
1465
|
tags
|
|
1429
1466
|
}) {
|
|
1430
1467
|
var _a;
|
|
1431
|
-
const labelContent = label && help ? /* @__PURE__ */
|
|
1468
|
+
const labelContent = label && help ? /* @__PURE__ */ jsx30(LabelContentWithHelp, { text: label, help }) : label;
|
|
1432
1469
|
const { ref } = useScrollToError(validation, features);
|
|
1433
|
-
return /* @__PURE__ */
|
|
1470
|
+
return /* @__PURE__ */ jsx30("div", { ref, children: /* @__PURE__ */ jsx30(
|
|
1434
1471
|
Field,
|
|
1435
1472
|
{
|
|
1436
1473
|
id,
|
|
@@ -1459,26 +1496,26 @@ var FieldInput_default = FieldInput;
|
|
|
1459
1496
|
|
|
1460
1497
|
// ../renderers/src/utils/listItem/getAdditionalText.tsx
|
|
1461
1498
|
import { ListItem } from "@transferwise/components";
|
|
1462
|
-
import { jsx as
|
|
1499
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1463
1500
|
var getAdditionalText = (additionalText) => {
|
|
1464
1501
|
if (!additionalText) {
|
|
1465
1502
|
return void 0;
|
|
1466
1503
|
}
|
|
1467
|
-
return /* @__PURE__ */
|
|
1504
|
+
return /* @__PURE__ */ jsx31(ListItem.AdditionalInfo, { children: additionalText });
|
|
1468
1505
|
};
|
|
1469
1506
|
|
|
1470
1507
|
// ../renderers/src/utils/listItem/getInlineAlert.tsx
|
|
1471
1508
|
import { ListItem as ListItem2 } from "@transferwise/components";
|
|
1472
|
-
import { jsx as
|
|
1509
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1473
1510
|
var getInlineAlert = (inlineAlert) => {
|
|
1474
1511
|
if (!inlineAlert) return void 0;
|
|
1475
1512
|
const { context, media, content } = inlineAlert;
|
|
1476
|
-
return /* @__PURE__ */
|
|
1513
|
+
return /* @__PURE__ */ jsx32(ListItem2.Prompt, { sentiment: context, media: media && getInlinePromptMedia(media), children: content });
|
|
1477
1514
|
};
|
|
1478
1515
|
|
|
1479
1516
|
// ../renderers/src/utils/listItem/getMedia.tsx
|
|
1480
|
-
import { jsx as
|
|
1481
|
-
var getMedia = (media, preferAvatar) => media ? /* @__PURE__ */
|
|
1517
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1518
|
+
var getMedia = (media, preferAvatar) => media ? /* @__PURE__ */ jsx33(OptionMedia, { media, preferAvatar }) : void 0;
|
|
1482
1519
|
|
|
1483
1520
|
// ../renderers/src/utils/listItem/getSupportingValues.ts
|
|
1484
1521
|
var getSupportingValues = (supportingValues) => {
|
|
@@ -1486,18 +1523,18 @@ var getSupportingValues = (supportingValues) => {
|
|
|
1486
1523
|
};
|
|
1487
1524
|
|
|
1488
1525
|
// ../renderers/src/CheckboxInputRenderer.tsx
|
|
1489
|
-
import { jsx as
|
|
1526
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1490
1527
|
var CheckboxInputRenderer = {
|
|
1491
1528
|
canRenderType: "input-checkbox",
|
|
1492
1529
|
render: (props) => {
|
|
1493
1530
|
switch (props.control) {
|
|
1494
1531
|
case "switch-item":
|
|
1495
|
-
return /* @__PURE__ */
|
|
1532
|
+
return /* @__PURE__ */ jsx34(SwitchItemComponent, __spreadValues({}, props));
|
|
1496
1533
|
case "checkbox-item":
|
|
1497
|
-
return /* @__PURE__ */
|
|
1534
|
+
return /* @__PURE__ */ jsx34(CheckboxItemComponent, __spreadValues({}, props));
|
|
1498
1535
|
case "checkbox":
|
|
1499
1536
|
default:
|
|
1500
|
-
return /* @__PURE__ */
|
|
1537
|
+
return /* @__PURE__ */ jsx34(CheckboxComponent, __spreadValues({}, props));
|
|
1501
1538
|
}
|
|
1502
1539
|
}
|
|
1503
1540
|
};
|
|
@@ -1522,7 +1559,7 @@ var CheckboxComponent = (props) => {
|
|
|
1522
1559
|
"value"
|
|
1523
1560
|
]);
|
|
1524
1561
|
const checkboxProps = __spreadProps(__spreadValues({}, rest), { label: title, secondary: description, checked: value });
|
|
1525
|
-
return /* @__PURE__ */
|
|
1562
|
+
return /* @__PURE__ */ jsx34(
|
|
1526
1563
|
FieldInput_default,
|
|
1527
1564
|
{
|
|
1528
1565
|
id,
|
|
@@ -1535,7 +1572,7 @@ var CheckboxComponent = (props) => {
|
|
|
1535
1572
|
features: rest.features,
|
|
1536
1573
|
control,
|
|
1537
1574
|
tags: rest.tags,
|
|
1538
|
-
children: /* @__PURE__ */
|
|
1575
|
+
children: /* @__PURE__ */ jsx34(Checkbox, __spreadValues({ id }, checkboxProps))
|
|
1539
1576
|
}
|
|
1540
1577
|
);
|
|
1541
1578
|
};
|
|
@@ -1554,7 +1591,7 @@ var CheckboxItemComponent = (props) => {
|
|
|
1554
1591
|
onChange
|
|
1555
1592
|
} = props;
|
|
1556
1593
|
const { ref } = useScrollToError(validationState, features);
|
|
1557
|
-
return /* @__PURE__ */
|
|
1594
|
+
return /* @__PURE__ */ jsx34("div", { ref, children: /* @__PURE__ */ jsx34(
|
|
1558
1595
|
ListItem3,
|
|
1559
1596
|
__spreadProps(__spreadValues({
|
|
1560
1597
|
title,
|
|
@@ -1563,7 +1600,7 @@ var CheckboxItemComponent = (props) => {
|
|
|
1563
1600
|
media: getMedia(media, false),
|
|
1564
1601
|
disabled,
|
|
1565
1602
|
prompt: getInlineAlertOrValidation(validationState, inlineAlert),
|
|
1566
|
-
control: /* @__PURE__ */
|
|
1603
|
+
control: /* @__PURE__ */ jsx34(ListItem3.Checkbox, { checked: value, onChange: () => onChange(!value) })
|
|
1567
1604
|
}, getSupportingValues(supportingValues)), {
|
|
1568
1605
|
className: controlAndTagsToCSSClass(props)
|
|
1569
1606
|
})
|
|
@@ -1584,7 +1621,7 @@ var SwitchItemComponent = (props) => {
|
|
|
1584
1621
|
onChange
|
|
1585
1622
|
} = props;
|
|
1586
1623
|
const { ref } = useScrollToError(validationState, features);
|
|
1587
|
-
return /* @__PURE__ */
|
|
1624
|
+
return /* @__PURE__ */ jsx34("div", { ref, children: /* @__PURE__ */ jsx34(
|
|
1588
1625
|
ListItem3,
|
|
1589
1626
|
__spreadProps(__spreadValues({
|
|
1590
1627
|
title,
|
|
@@ -1593,7 +1630,7 @@ var SwitchItemComponent = (props) => {
|
|
|
1593
1630
|
media: getMedia(media, false),
|
|
1594
1631
|
disabled,
|
|
1595
1632
|
prompt: getInlineAlertOrValidation(validationState, inlineAlert),
|
|
1596
|
-
control: /* @__PURE__ */
|
|
1633
|
+
control: /* @__PURE__ */ jsx34(ListItem3.Switch, { checked: value, onClick: () => onChange(!value) })
|
|
1597
1634
|
}, getSupportingValues(supportingValues)), {
|
|
1598
1635
|
className: controlAndTagsToCSSClass(props)
|
|
1599
1636
|
})
|
|
@@ -1601,7 +1638,7 @@ var SwitchItemComponent = (props) => {
|
|
|
1601
1638
|
};
|
|
1602
1639
|
var getInlineAlertOrValidation = (validationState, inlineAlert) => {
|
|
1603
1640
|
if ((validationState == null ? void 0 : validationState.status) === "invalid") {
|
|
1604
|
-
return /* @__PURE__ */
|
|
1641
|
+
return /* @__PURE__ */ jsx34(ListItem3.Prompt, { sentiment: "negative", children: validationState.message });
|
|
1605
1642
|
}
|
|
1606
1643
|
return getInlineAlert(inlineAlert);
|
|
1607
1644
|
};
|
|
@@ -3133,23 +3170,23 @@ var step_messages_default = defineMessages4({
|
|
|
3133
3170
|
});
|
|
3134
3171
|
|
|
3135
3172
|
// ../renderers/src/step/StepFooter.tsx
|
|
3136
|
-
import { Fragment as Fragment2, jsx as
|
|
3173
|
+
import { Fragment as Fragment2, jsx as jsx35, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
3137
3174
|
var SCROLL_TO_BOTTOM = "scroll-to-bottom";
|
|
3138
3175
|
var StepFooter = ({ footer, tags }) => {
|
|
3139
3176
|
if (tags == null ? void 0 : tags.includes(SCROLL_TO_BOTTOM)) {
|
|
3140
|
-
return /* @__PURE__ */
|
|
3177
|
+
return /* @__PURE__ */ jsx35(FooterWithScrollButton, { footer });
|
|
3141
3178
|
}
|
|
3142
|
-
return /* @__PURE__ */
|
|
3179
|
+
return /* @__PURE__ */ jsx35(DefaultFooter, { footer });
|
|
3143
3180
|
};
|
|
3144
3181
|
var DefaultFooter = ({ footer }) => {
|
|
3145
3182
|
const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
|
|
3146
|
-
return hasFooter ? /* @__PURE__ */
|
|
3183
|
+
return hasFooter ? /* @__PURE__ */ jsx35("div", { className: "df-step-fixed__footer", children: footer }) : void 0;
|
|
3147
3184
|
};
|
|
3148
3185
|
var FooterWithScrollButton = ({ footer }) => {
|
|
3149
3186
|
const { formatMessage } = useIntl3();
|
|
3150
3187
|
const endOfLayoutRef = useRef3(null);
|
|
3151
3188
|
const isElementVisible = useIsElementVisible(endOfLayoutRef);
|
|
3152
|
-
const scrollButton = /* @__PURE__ */
|
|
3189
|
+
const scrollButton = /* @__PURE__ */ jsx35(
|
|
3153
3190
|
Button3,
|
|
3154
3191
|
{
|
|
3155
3192
|
className: "m-b-1",
|
|
@@ -3165,10 +3202,10 @@ var FooterWithScrollButton = ({ footer }) => {
|
|
|
3165
3202
|
);
|
|
3166
3203
|
const hasStepFooterContent = footer && Array.isArray(footer) && footer.length > 0;
|
|
3167
3204
|
if (isElementVisible && !hasStepFooterContent) {
|
|
3168
|
-
return /* @__PURE__ */
|
|
3205
|
+
return /* @__PURE__ */ jsx35("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
|
|
3169
3206
|
}
|
|
3170
3207
|
return /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
3171
|
-
/* @__PURE__ */
|
|
3208
|
+
/* @__PURE__ */ jsx35("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
|
|
3172
3209
|
/* @__PURE__ */ jsxs6("div", { className: "df-step-fixed__footer", children: [
|
|
3173
3210
|
!isElementVisible && scrollButton,
|
|
3174
3211
|
footer
|
|
@@ -3211,7 +3248,7 @@ var collection_messages_default = defineMessages5({
|
|
|
3211
3248
|
});
|
|
3212
3249
|
|
|
3213
3250
|
// ../renderers/src/CollectionRenderer/components/ContentComponent.tsx
|
|
3214
|
-
import { jsx as
|
|
3251
|
+
import { jsx as jsx36, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
3215
3252
|
var ContentComponent = (props) => {
|
|
3216
3253
|
const { state, status, SectionHeader, Item } = props;
|
|
3217
3254
|
const endOfContentRef = useRef4(null);
|
|
@@ -3256,7 +3293,7 @@ var ContentComponent = (props) => {
|
|
|
3256
3293
|
});
|
|
3257
3294
|
return /* @__PURE__ */ jsxs7("div", { ref: listRef, children: [
|
|
3258
3295
|
state.beforeSections,
|
|
3259
|
-
/* @__PURE__ */
|
|
3296
|
+
/* @__PURE__ */ jsx36(
|
|
3260
3297
|
"div",
|
|
3261
3298
|
{
|
|
3262
3299
|
style: {
|
|
@@ -3269,7 +3306,7 @@ var ContentComponent = (props) => {
|
|
|
3269
3306
|
if (!i) {
|
|
3270
3307
|
return null;
|
|
3271
3308
|
}
|
|
3272
|
-
return /* @__PURE__ */
|
|
3309
|
+
return /* @__PURE__ */ jsx36(
|
|
3273
3310
|
"div",
|
|
3274
3311
|
{
|
|
3275
3312
|
ref: virtualizer.measureElement,
|
|
@@ -3281,14 +3318,14 @@ var ContentComponent = (props) => {
|
|
|
3281
3318
|
width: "100%",
|
|
3282
3319
|
transform: `translateY(${item.start - virtualizer.options.scrollMargin}px)`
|
|
3283
3320
|
},
|
|
3284
|
-
children: i.type === "header" ? /* @__PURE__ */
|
|
3321
|
+
children: i.type === "header" ? /* @__PURE__ */ jsx36(SectionHeader, __spreadValues({}, i)) : /* @__PURE__ */ jsx36(Item, __spreadValues({}, i.item))
|
|
3285
3322
|
},
|
|
3286
3323
|
item.key
|
|
3287
3324
|
);
|
|
3288
3325
|
})
|
|
3289
3326
|
}
|
|
3290
3327
|
),
|
|
3291
|
-
/* @__PURE__ */
|
|
3328
|
+
/* @__PURE__ */ jsx36("div", { ref: endOfContentRef, className: "d-flex m-x-auto m-y-2", children: /* @__PURE__ */ jsx36(PaginationComponent, { status, state }) }),
|
|
3292
3329
|
state.afterSections
|
|
3293
3330
|
] });
|
|
3294
3331
|
};
|
|
@@ -3303,26 +3340,26 @@ var PaginationComponent = ({
|
|
|
3303
3340
|
return null;
|
|
3304
3341
|
}
|
|
3305
3342
|
if (isPaginationError) {
|
|
3306
|
-
return /* @__PURE__ */
|
|
3343
|
+
return /* @__PURE__ */ jsx36(LoadMoreButton, { onClick: status.retry });
|
|
3307
3344
|
}
|
|
3308
3345
|
if (state.afterSectionsProps.length > 0 && loadMore) {
|
|
3309
|
-
return /* @__PURE__ */
|
|
3346
|
+
return /* @__PURE__ */ jsx36(LoadMoreButton, { onClick: loadMore });
|
|
3310
3347
|
}
|
|
3311
|
-
return /* @__PURE__ */
|
|
3348
|
+
return /* @__PURE__ */ jsx36(ProcessIndicator, { size: "xs", "data-testid": "collection-pagination-loader" });
|
|
3312
3349
|
};
|
|
3313
3350
|
var LoadMoreButton = ({ onClick }) => {
|
|
3314
3351
|
const { formatMessage } = useIntl4();
|
|
3315
|
-
return /* @__PURE__ */
|
|
3352
|
+
return /* @__PURE__ */ jsx36("div", { className: "d-flex m-x-auto", children: /* @__PURE__ */ jsx36(Button4, { v2: true, size: "sm", priority: "secondary-neutral", onClick, children: formatMessage(collection_messages_default.loadMoreButton) }) });
|
|
3316
3353
|
};
|
|
3317
3354
|
|
|
3318
3355
|
// ../renderers/src/CollectionRenderer/components/FilterComponent.tsx
|
|
3319
3356
|
import { Chips } from "@transferwise/components";
|
|
3320
|
-
import { jsx as
|
|
3357
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
3321
3358
|
var FiltersComponent = ({ state }) => {
|
|
3322
3359
|
const { filters } = state;
|
|
3323
|
-
return /* @__PURE__ */
|
|
3360
|
+
return /* @__PURE__ */ jsx37("div", { className: "df-filters-container", children: filters.map((filter) => {
|
|
3324
3361
|
var _a;
|
|
3325
|
-
return /* @__PURE__ */
|
|
3362
|
+
return /* @__PURE__ */ jsx37(FilterComponent, __spreadValues({}, filter), JSON.stringify((_a = filter.options) == null ? void 0 : _a.map((o) => o.value)));
|
|
3326
3363
|
}) });
|
|
3327
3364
|
};
|
|
3328
3365
|
var FilterComponent = (filter) => {
|
|
@@ -3330,7 +3367,7 @@ var FilterComponent = (filter) => {
|
|
|
3330
3367
|
if (!options) {
|
|
3331
3368
|
return null;
|
|
3332
3369
|
}
|
|
3333
|
-
return /* @__PURE__ */
|
|
3370
|
+
return /* @__PURE__ */ jsx37(
|
|
3334
3371
|
Chips,
|
|
3335
3372
|
{
|
|
3336
3373
|
className: "m-b-1",
|
|
@@ -3360,7 +3397,7 @@ import { ListItem as ListItem6 } from "@transferwise/components";
|
|
|
3360
3397
|
|
|
3361
3398
|
// ../renderers/src/utils/listItem/getAdditionalInfo.tsx
|
|
3362
3399
|
import { ListItem as ListItem4 } from "@transferwise/components";
|
|
3363
|
-
import { jsx as
|
|
3400
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
3364
3401
|
var getAdditionalInfo = (additionalInfo) => {
|
|
3365
3402
|
var _a, _b;
|
|
3366
3403
|
if (!additionalInfo) {
|
|
@@ -3368,7 +3405,7 @@ var getAdditionalInfo = (additionalInfo) => {
|
|
|
3368
3405
|
}
|
|
3369
3406
|
const { href, text, onClick } = additionalInfo;
|
|
3370
3407
|
if (href || onClick) {
|
|
3371
|
-
return /* @__PURE__ */
|
|
3408
|
+
return /* @__PURE__ */ jsx38(
|
|
3372
3409
|
ListItem4.AdditionalInfo,
|
|
3373
3410
|
{
|
|
3374
3411
|
action: __spreadValues({
|
|
@@ -3377,19 +3414,19 @@ var getAdditionalInfo = (additionalInfo) => {
|
|
|
3377
3414
|
}
|
|
3378
3415
|
);
|
|
3379
3416
|
}
|
|
3380
|
-
return /* @__PURE__ */
|
|
3417
|
+
return /* @__PURE__ */ jsx38(ListItem4.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
|
|
3381
3418
|
};
|
|
3382
3419
|
|
|
3383
3420
|
// ../renderers/src/utils/listItem/getCTAControl.tsx
|
|
3384
3421
|
import { ListItem as ListItem5 } from "@transferwise/components";
|
|
3385
|
-
import { jsx as
|
|
3422
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
3386
3423
|
var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
|
|
3387
3424
|
if (!callToAction) {
|
|
3388
3425
|
return void 0;
|
|
3389
3426
|
}
|
|
3390
3427
|
const { accessibilityDescription, title, context } = callToAction;
|
|
3391
3428
|
const { priority, sentiment } = getPriorityAndSentiment(ctaSecondary, context);
|
|
3392
|
-
return /* @__PURE__ */
|
|
3429
|
+
return /* @__PURE__ */ jsx39(
|
|
3393
3430
|
ListItem5.Button,
|
|
3394
3431
|
__spreadProps(__spreadValues({}, callToAction.getAnchorProps()), {
|
|
3395
3432
|
partiallyInteractive: !fullyInteractive,
|
|
@@ -3414,7 +3451,7 @@ var shouldUseAvatar = (control, tags) => {
|
|
|
3414
3451
|
};
|
|
3415
3452
|
|
|
3416
3453
|
// ../renderers/src/CollectionRenderer/components/ItemComponent.tsx
|
|
3417
|
-
import { jsx as
|
|
3454
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
3418
3455
|
var ItemComponent = (props) => {
|
|
3419
3456
|
var _a, _b;
|
|
3420
3457
|
const {
|
|
@@ -3436,7 +3473,7 @@ var ItemComponent = (props) => {
|
|
|
3436
3473
|
ctaSecondary: (_a = tags == null ? void 0 : tags.includes("cta-secondary")) != null ? _a : false,
|
|
3437
3474
|
fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
|
|
3438
3475
|
};
|
|
3439
|
-
return /* @__PURE__ */
|
|
3476
|
+
return /* @__PURE__ */ jsx40(
|
|
3440
3477
|
ListItem6,
|
|
3441
3478
|
{
|
|
3442
3479
|
title,
|
|
@@ -3453,10 +3490,10 @@ var ItemComponent = (props) => {
|
|
|
3453
3490
|
};
|
|
3454
3491
|
var getNavigationControl = (onClick, href) => {
|
|
3455
3492
|
if (href) {
|
|
3456
|
-
return /* @__PURE__ */
|
|
3493
|
+
return /* @__PURE__ */ jsx40(ListItem6.Navigation, { href });
|
|
3457
3494
|
}
|
|
3458
3495
|
if (onClick) {
|
|
3459
|
-
return /* @__PURE__ */
|
|
3496
|
+
return /* @__PURE__ */ jsx40(ListItem6.Navigation, { onClick });
|
|
3460
3497
|
}
|
|
3461
3498
|
return null;
|
|
3462
3499
|
};
|
|
@@ -3470,7 +3507,7 @@ import {
|
|
|
3470
3507
|
} from "@transferwise/components";
|
|
3471
3508
|
import { CrossCircleFill, Search } from "@transferwise/icons";
|
|
3472
3509
|
import { useIntl as useIntl5 } from "react-intl";
|
|
3473
|
-
import { jsx as
|
|
3510
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
3474
3511
|
var SearchComponent = ({
|
|
3475
3512
|
state,
|
|
3476
3513
|
status,
|
|
@@ -3486,12 +3523,12 @@ var SearchComponent = ({
|
|
|
3486
3523
|
const getAddon = () => {
|
|
3487
3524
|
var _a;
|
|
3488
3525
|
if (status.type === "loading") {
|
|
3489
|
-
return { content: /* @__PURE__ */
|
|
3526
|
+
return { content: /* @__PURE__ */ jsx41(ProcessIndicator2, { size: "xs", "data-testid": "collection-search-loader" }) };
|
|
3490
3527
|
}
|
|
3491
3528
|
if ((_a = state.search) == null ? void 0 : _a.query) {
|
|
3492
3529
|
return {
|
|
3493
3530
|
interactive: true,
|
|
3494
|
-
content: /* @__PURE__ */
|
|
3531
|
+
content: /* @__PURE__ */ jsx41(
|
|
3495
3532
|
IconButton,
|
|
3496
3533
|
{
|
|
3497
3534
|
priority: "minimal",
|
|
@@ -3501,14 +3538,14 @@ var SearchComponent = ({
|
|
|
3501
3538
|
var _a2;
|
|
3502
3539
|
return (_a2 = state.search) == null ? void 0 : _a2.onChange("");
|
|
3503
3540
|
},
|
|
3504
|
-
children: /* @__PURE__ */
|
|
3541
|
+
children: /* @__PURE__ */ jsx41(CrossCircleFill, {})
|
|
3505
3542
|
}
|
|
3506
3543
|
)
|
|
3507
3544
|
};
|
|
3508
3545
|
}
|
|
3509
3546
|
return void 0;
|
|
3510
3547
|
};
|
|
3511
|
-
return /* @__PURE__ */
|
|
3548
|
+
return /* @__PURE__ */ jsx41(
|
|
3512
3549
|
FieldInput_default,
|
|
3513
3550
|
{
|
|
3514
3551
|
id: "search",
|
|
@@ -3519,7 +3556,7 @@ var SearchComponent = ({
|
|
|
3519
3556
|
features,
|
|
3520
3557
|
control,
|
|
3521
3558
|
tags,
|
|
3522
|
-
children: /* @__PURE__ */
|
|
3559
|
+
children: /* @__PURE__ */ jsx41(InputGroup, { addonStart: { content: /* @__PURE__ */ jsx41(Search, { size: 24 }) }, addonEnd: getAddon(), children: /* @__PURE__ */ jsx41(
|
|
3523
3560
|
Input,
|
|
3524
3561
|
{
|
|
3525
3562
|
id: "search",
|
|
@@ -3538,14 +3575,14 @@ var SearchComponent = ({
|
|
|
3538
3575
|
};
|
|
3539
3576
|
|
|
3540
3577
|
// ../renderers/src/CollectionRenderer/components/SectionHeaderComponent.tsx
|
|
3541
|
-
import { jsx as
|
|
3578
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
3542
3579
|
var SectionHeaderComponent = ({
|
|
3543
3580
|
title,
|
|
3544
3581
|
callToAction
|
|
3545
|
-
}) => /* @__PURE__ */
|
|
3582
|
+
}) => /* @__PURE__ */ jsx42(Header, { title, callToAction });
|
|
3546
3583
|
|
|
3547
3584
|
// ../renderers/src/CollectionRenderer/createCollectionRenderer.tsx
|
|
3548
|
-
import { jsx as
|
|
3585
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
3549
3586
|
var createCollectionRenderer = (canRender, components) => {
|
|
3550
3587
|
const componentsWithDefaults = __spreadValues({
|
|
3551
3588
|
Search: SearchComponent,
|
|
@@ -3559,20 +3596,20 @@ var createCollectionRenderer = (canRender, components) => {
|
|
|
3559
3596
|
canRenderType: "collection",
|
|
3560
3597
|
canRender,
|
|
3561
3598
|
render: (props) => {
|
|
3562
|
-
return /* @__PURE__ */
|
|
3599
|
+
return /* @__PURE__ */ jsx43(CollectionRendererComponent, __spreadValues(__spreadValues({}, props), componentsWithDefaults));
|
|
3563
3600
|
}
|
|
3564
3601
|
};
|
|
3565
3602
|
};
|
|
3566
3603
|
|
|
3567
3604
|
// ../renderers/src/CollectionRenderer/CollectionRenderer.tsx
|
|
3568
3605
|
import { useIntl as useIntl6 } from "react-intl";
|
|
3569
|
-
import { Fragment as Fragment3, jsx as
|
|
3606
|
+
import { Fragment as Fragment3, jsx as jsx44, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3570
3607
|
var CollectionRendererComponent = (props) => {
|
|
3571
3608
|
const { status, Search: Search4, Filters, Results } = props;
|
|
3572
3609
|
return /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
3573
|
-
/* @__PURE__ */
|
|
3574
|
-
/* @__PURE__ */
|
|
3575
|
-
status.type === "error" && status.reason === "search" ? /* @__PURE__ */
|
|
3610
|
+
/* @__PURE__ */ jsx44(Search4, __spreadValues({}, props)),
|
|
3611
|
+
/* @__PURE__ */ jsx44(Filters, __spreadValues({}, props)),
|
|
3612
|
+
status.type === "error" && status.reason === "search" ? /* @__PURE__ */ jsx44(SearchError, { retry: status.retry }) : /* @__PURE__ */ jsx44(Results, __spreadValues({}, props))
|
|
3576
3613
|
] });
|
|
3577
3614
|
};
|
|
3578
3615
|
var SearchError = ({ retry }) => {
|
|
@@ -3580,14 +3617,14 @@ var SearchError = ({ retry }) => {
|
|
|
3580
3617
|
return /* @__PURE__ */ jsxs8(InlinePrompt, { width: "full", sentiment: "negative", children: [
|
|
3581
3618
|
formatMessage(generic_error_messages_default.genericError),
|
|
3582
3619
|
"\xA0",
|
|
3583
|
-
/* @__PURE__ */
|
|
3620
|
+
/* @__PURE__ */ jsx44(DSLink, { onClick: retry, children: formatMessage(generic_error_messages_default.retry) })
|
|
3584
3621
|
] });
|
|
3585
3622
|
};
|
|
3586
3623
|
var CollectionRenderer = createCollectionRenderer(() => true);
|
|
3587
3624
|
var CollectionRenderer_default = CollectionRenderer;
|
|
3588
3625
|
|
|
3589
3626
|
// ../renderers/src/ColumnsRenderer.tsx
|
|
3590
|
-
var
|
|
3627
|
+
var import_classnames11 = __toESM(require_classnames());
|
|
3591
3628
|
|
|
3592
3629
|
// ../renderers/src/utils/useIsCollapsed.ts
|
|
3593
3630
|
import { useEffect as useEffect8, useState as useState8 } from "react";
|
|
@@ -3610,7 +3647,7 @@ var useIsCollapsed = () => {
|
|
|
3610
3647
|
};
|
|
3611
3648
|
|
|
3612
3649
|
// ../renderers/src/ColumnsRenderer.tsx
|
|
3613
|
-
import { jsx as
|
|
3650
|
+
import { jsx as jsx45, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3614
3651
|
var RIGHT_FIRST_STACKING = "right-first-stacking";
|
|
3615
3652
|
var ColumnsRenderer = {
|
|
3616
3653
|
canRenderType: "columns",
|
|
@@ -3621,12 +3658,12 @@ function ColumnsRendererComponent(props) {
|
|
|
3621
3658
|
const { bias, margin, startChildren, endChildren, tags } = props;
|
|
3622
3659
|
const isCollapsed = useIsCollapsed();
|
|
3623
3660
|
const reverse = isCollapsed && ((_a = tags == null ? void 0 : tags.includes(RIGHT_FIRST_STACKING)) != null ? _a : false);
|
|
3624
|
-
const startColumn = /* @__PURE__ */
|
|
3625
|
-
const endColumn = /* @__PURE__ */
|
|
3661
|
+
const startColumn = /* @__PURE__ */ jsx45("div", { className: "df-columns-renderer-column", children: startChildren });
|
|
3662
|
+
const endColumn = /* @__PURE__ */ jsx45("div", { className: "df-columns-renderer-column", children: endChildren });
|
|
3626
3663
|
return /* @__PURE__ */ jsxs9(
|
|
3627
3664
|
"div",
|
|
3628
3665
|
{
|
|
3629
|
-
className: (0,
|
|
3666
|
+
className: (0, import_classnames11.default)(
|
|
3630
3667
|
"df-columns-renderer-container",
|
|
3631
3668
|
getMargin(margin),
|
|
3632
3669
|
{
|
|
@@ -3745,7 +3782,7 @@ var matchesDateRule = (date, weekday, rule) => {
|
|
|
3745
3782
|
var isDate = (date) => date !== null;
|
|
3746
3783
|
|
|
3747
3784
|
// ../renderers/src/components/VariableDateInput.tsx
|
|
3748
|
-
import { jsx as
|
|
3785
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
3749
3786
|
function VariableDateInput({
|
|
3750
3787
|
control,
|
|
3751
3788
|
inputProps
|
|
@@ -3763,7 +3800,7 @@ function VariableDateInput({
|
|
|
3763
3800
|
} = inputProps;
|
|
3764
3801
|
const { disabledRules, onDateSelect, resetFocusedDate } = useAvailabilityRules(availability);
|
|
3765
3802
|
if (control === "date-lookup") {
|
|
3766
|
-
return /* @__PURE__ */
|
|
3803
|
+
return /* @__PURE__ */ jsx46(
|
|
3767
3804
|
DateLookup,
|
|
3768
3805
|
{
|
|
3769
3806
|
value: dateStringToDateOrNull(inputProps.value),
|
|
@@ -3784,7 +3821,7 @@ function VariableDateInput({
|
|
|
3784
3821
|
}
|
|
3785
3822
|
);
|
|
3786
3823
|
}
|
|
3787
|
-
return /* @__PURE__ */
|
|
3824
|
+
return /* @__PURE__ */ jsx46(
|
|
3788
3825
|
DateInput,
|
|
3789
3826
|
__spreadProps(__spreadValues({}, inputProps), {
|
|
3790
3827
|
dayAutoComplete: getAutocompleteString(autoComplete, "day"),
|
|
@@ -3801,7 +3838,7 @@ var getAutocompleteString = (value, suffix) => {
|
|
|
3801
3838
|
var VariableDateInput_default = VariableDateInput;
|
|
3802
3839
|
|
|
3803
3840
|
// ../renderers/src/DateInputRenderer.tsx
|
|
3804
|
-
import { jsx as
|
|
3841
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
3805
3842
|
var DateInputRenderer = {
|
|
3806
3843
|
canRenderType: "input-date",
|
|
3807
3844
|
render: (props) => {
|
|
@@ -3826,7 +3863,7 @@ var DateInputRenderer = {
|
|
|
3826
3863
|
]);
|
|
3827
3864
|
const value = initialValue != null ? initialValue : "";
|
|
3828
3865
|
const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
|
|
3829
|
-
return /* @__PURE__ */
|
|
3866
|
+
return /* @__PURE__ */ jsx47(
|
|
3830
3867
|
FieldInput_default,
|
|
3831
3868
|
{
|
|
3832
3869
|
id,
|
|
@@ -3839,7 +3876,7 @@ var DateInputRenderer = {
|
|
|
3839
3876
|
features: props.features,
|
|
3840
3877
|
control,
|
|
3841
3878
|
tags: props.tags,
|
|
3842
|
-
children: /* @__PURE__ */
|
|
3879
|
+
children: /* @__PURE__ */ jsx47(VariableDateInput_default, { control, inputProps })
|
|
3843
3880
|
}
|
|
3844
3881
|
);
|
|
3845
3882
|
}
|
|
@@ -3961,7 +3998,7 @@ var getGroupsFromTags = (knownTags, items) => {
|
|
|
3961
3998
|
};
|
|
3962
3999
|
|
|
3963
4000
|
// ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
|
|
3964
|
-
import { Fragment as Fragment4, jsx as
|
|
4001
|
+
import { Fragment as Fragment4, jsx as jsx48, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3965
4002
|
var groupingTags = Object.keys(group_messages_default).filter((key) => key !== "all");
|
|
3966
4003
|
var isGroupedDecision = (options) => {
|
|
3967
4004
|
return getGroupsFromTags(groupingTags, options).length > 0;
|
|
@@ -3971,8 +4008,8 @@ var GroupedDecisionList = (_a) => {
|
|
|
3971
4008
|
const { formatMessage } = useIntl8();
|
|
3972
4009
|
const { options } = rest;
|
|
3973
4010
|
const itemsByTag = [...getGroupsFromTags(groupingTags, options), { tag: "all", items: options }];
|
|
3974
|
-
return /* @__PURE__ */
|
|
3975
|
-
/* @__PURE__ */
|
|
4011
|
+
return /* @__PURE__ */ jsx48(Fragment4, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ jsxs10(Section, { children: [
|
|
4012
|
+
/* @__PURE__ */ jsx48(
|
|
3976
4013
|
Header2,
|
|
3977
4014
|
{
|
|
3978
4015
|
as: "h2",
|
|
@@ -3984,18 +4021,18 @@ var GroupedDecisionList = (_a) => {
|
|
|
3984
4021
|
};
|
|
3985
4022
|
|
|
3986
4023
|
// ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
|
|
3987
|
-
var
|
|
3988
|
-
import { Fragment as Fragment5, jsx as
|
|
4024
|
+
var import_classnames12 = __toESM(require_classnames());
|
|
4025
|
+
import { Fragment as Fragment5, jsx as jsx49, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3989
4026
|
var DecisionWrapper = (props) => {
|
|
3990
4027
|
const { margin, control, title, tags } = props;
|
|
3991
|
-
return /* @__PURE__ */ jsxs11("div", { className: (0,
|
|
3992
|
-
title && /* @__PURE__ */
|
|
3993
|
-
control === "filtered" ? /* @__PURE__ */
|
|
4028
|
+
return /* @__PURE__ */ jsxs11("div", { className: (0, import_classnames12.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
4029
|
+
title && /* @__PURE__ */ jsx49(Header3, { as: "h2", title }),
|
|
4030
|
+
control === "filtered" ? /* @__PURE__ */ jsx49(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsx49(UnfilteredDecisionList, __spreadValues({}, props))
|
|
3994
4031
|
] });
|
|
3995
4032
|
};
|
|
3996
4033
|
var UnfilteredDecisionList = (_a) => {
|
|
3997
4034
|
var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
|
|
3998
|
-
return isGroupedDecision(rest.options) ? /* @__PURE__ */
|
|
4035
|
+
return isGroupedDecision(rest.options) ? /* @__PURE__ */ jsx49(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList2 })) : renderDecisionList2(rest);
|
|
3999
4036
|
};
|
|
4000
4037
|
var FilteredDecisionList = (props) => {
|
|
4001
4038
|
const { formatMessage } = useIntl9();
|
|
@@ -4004,7 +4041,7 @@ var FilteredDecisionList = (props) => {
|
|
|
4004
4041
|
const filteredOptions = (query == null ? void 0 : query.length) > 0 ? filterAndSortItems(options, query) : options;
|
|
4005
4042
|
const isGrouped = isGroupedDecision(options);
|
|
4006
4043
|
return /* @__PURE__ */ jsxs11(Fragment5, { children: [
|
|
4007
|
-
/* @__PURE__ */
|
|
4044
|
+
/* @__PURE__ */ jsx49(
|
|
4008
4045
|
SearchInput,
|
|
4009
4046
|
{
|
|
4010
4047
|
placeholder: formatMessage(filter_messages_default.placeholder),
|
|
@@ -4016,25 +4053,25 @@ var FilteredDecisionList = (props) => {
|
|
|
4016
4053
|
}
|
|
4017
4054
|
}
|
|
4018
4055
|
),
|
|
4019
|
-
isGrouped && query.length === 0 ? /* @__PURE__ */
|
|
4020
|
-
query.length > 0 && /* @__PURE__ */
|
|
4056
|
+
isGrouped && query.length === 0 ? /* @__PURE__ */ jsx49(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsxs11(Fragment5, { children: [
|
|
4057
|
+
query.length > 0 && /* @__PURE__ */ jsx49(Header3, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
|
|
4021
4058
|
filteredOptions.length > 0 ? renderDecisionList2({
|
|
4022
4059
|
control,
|
|
4023
4060
|
className: query.length === 0 ? "m-t-3" : "",
|
|
4024
4061
|
options: filteredOptions
|
|
4025
|
-
}) : /* @__PURE__ */
|
|
4062
|
+
}) : /* @__PURE__ */ jsx49("p", { children: formatMessage(filter_messages_default.noResults) })
|
|
4026
4063
|
] })
|
|
4027
4064
|
] });
|
|
4028
4065
|
};
|
|
4029
4066
|
|
|
4030
4067
|
// ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
|
|
4031
|
-
import { Fragment as Fragment6, jsx as
|
|
4068
|
+
import { Fragment as Fragment6, jsx as jsx50 } from "react/jsx-runtime";
|
|
4032
4069
|
var DecisionRenderer = {
|
|
4033
4070
|
canRenderType: "decision",
|
|
4034
|
-
render: (props) => /* @__PURE__ */
|
|
4071
|
+
render: (props) => /* @__PURE__ */ jsx50(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }))
|
|
4035
4072
|
};
|
|
4036
4073
|
var renderDecisionList = ({ options, control }) => {
|
|
4037
|
-
return /* @__PURE__ */
|
|
4074
|
+
return /* @__PURE__ */ jsx50(Fragment6, { children: options.map((_a) => {
|
|
4038
4075
|
var _b = _a, { onClick } = _b, rest = __objRest(_b, ["onClick"]);
|
|
4039
4076
|
const {
|
|
4040
4077
|
description,
|
|
@@ -4047,7 +4084,7 @@ var renderDecisionList = ({ options, control }) => {
|
|
|
4047
4084
|
supportingValues,
|
|
4048
4085
|
tags
|
|
4049
4086
|
} = rest;
|
|
4050
|
-
return /* @__PURE__ */
|
|
4087
|
+
return /* @__PURE__ */ jsx50(
|
|
4051
4088
|
ListItem7,
|
|
4052
4089
|
{
|
|
4053
4090
|
title: itemTitle,
|
|
@@ -4059,7 +4096,7 @@ var renderDecisionList = ({ options, control }) => {
|
|
|
4059
4096
|
media: getMedia(media, shouldUseAvatar(control, tags)),
|
|
4060
4097
|
prompt: getInlineAlert(inlineAlert),
|
|
4061
4098
|
additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
|
|
4062
|
-
control: /* @__PURE__ */
|
|
4099
|
+
control: /* @__PURE__ */ jsx50(ListItem7.Navigation, __spreadValues({}, getAnchorProps()))
|
|
4063
4100
|
},
|
|
4064
4101
|
JSON.stringify(rest)
|
|
4065
4102
|
);
|
|
@@ -4068,9 +4105,9 @@ var renderDecisionList = ({ options, control }) => {
|
|
|
4068
4105
|
var DecisionRenderer_default = DecisionRenderer;
|
|
4069
4106
|
|
|
4070
4107
|
// ../renderers/src/DividerRenderer.tsx
|
|
4071
|
-
var
|
|
4108
|
+
var import_classnames13 = __toESM(require_classnames());
|
|
4072
4109
|
import { Divider } from "@transferwise/components";
|
|
4073
|
-
import { jsx as
|
|
4110
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
4074
4111
|
var mapControlToLevel = (control) => {
|
|
4075
4112
|
switch (control) {
|
|
4076
4113
|
case "section":
|
|
@@ -4083,10 +4120,10 @@ var mapControlToLevel = (control) => {
|
|
|
4083
4120
|
};
|
|
4084
4121
|
var DividerRenderer = {
|
|
4085
4122
|
canRenderType: "divider",
|
|
4086
|
-
render: ({ margin, control, tags }) => /* @__PURE__ */
|
|
4123
|
+
render: ({ margin, control, tags }) => /* @__PURE__ */ jsx51(
|
|
4087
4124
|
Divider,
|
|
4088
4125
|
{
|
|
4089
|
-
className: (0,
|
|
4126
|
+
className: (0, import_classnames13.default)(
|
|
4090
4127
|
"m-t-0",
|
|
4091
4128
|
"d-block",
|
|
4092
4129
|
getMargin(margin),
|
|
@@ -4129,7 +4166,7 @@ var external_confirmation_messages_default = defineMessages9({
|
|
|
4129
4166
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
4130
4167
|
import { useIntl as useIntl10 } from "react-intl";
|
|
4131
4168
|
import { useEffect as useEffect9 } from "react";
|
|
4132
|
-
import { Fragment as Fragment7, jsx as
|
|
4169
|
+
import { Fragment as Fragment7, jsx as jsx52, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
4133
4170
|
var ExternalConfirmationRenderer = {
|
|
4134
4171
|
canRenderType: "external-confirmation",
|
|
4135
4172
|
render: ExternalConfirmationRendererComponent
|
|
@@ -4146,15 +4183,15 @@ function ExternalConfirmationRendererComponent({
|
|
|
4146
4183
|
useEffect9(() => {
|
|
4147
4184
|
open();
|
|
4148
4185
|
}, []);
|
|
4149
|
-
return /* @__PURE__ */
|
|
4186
|
+
return /* @__PURE__ */ jsx52(
|
|
4150
4187
|
Modal,
|
|
4151
4188
|
{
|
|
4152
4189
|
open: visible,
|
|
4153
4190
|
title: formatMessage(external_confirmation_messages_default.title),
|
|
4154
4191
|
body: /* @__PURE__ */ jsxs12(Fragment7, { children: [
|
|
4155
|
-
/* @__PURE__ */
|
|
4156
|
-
/* @__PURE__ */
|
|
4157
|
-
/* @__PURE__ */
|
|
4192
|
+
/* @__PURE__ */ jsx52(Markdown3, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
|
|
4193
|
+
/* @__PURE__ */ jsx52("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs12("div", { className: "df-box-renderer-width-lg", children: [
|
|
4194
|
+
/* @__PURE__ */ jsx52(
|
|
4158
4195
|
Button5,
|
|
4159
4196
|
{
|
|
4160
4197
|
v2: true,
|
|
@@ -4168,7 +4205,7 @@ function ExternalConfirmationRendererComponent({
|
|
|
4168
4205
|
children: formatMessage(external_confirmation_messages_default.open)
|
|
4169
4206
|
}
|
|
4170
4207
|
),
|
|
4171
|
-
/* @__PURE__ */
|
|
4208
|
+
/* @__PURE__ */ jsx52(Button5, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
|
|
4172
4209
|
] }) })
|
|
4173
4210
|
] }),
|
|
4174
4211
|
className: controlAndTagsToCSSClass({ control, tags }),
|
|
@@ -4186,51 +4223,51 @@ function getOrigin(url) {
|
|
|
4186
4223
|
var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
|
|
4187
4224
|
|
|
4188
4225
|
// ../renderers/src/FormRenderer.tsx
|
|
4189
|
-
var
|
|
4190
|
-
import { jsx as
|
|
4226
|
+
var import_classnames14 = __toESM(require_classnames());
|
|
4227
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
4191
4228
|
var FormRenderer = {
|
|
4192
4229
|
canRenderType: "form",
|
|
4193
|
-
render: ({ children, margin, control, tags }) => /* @__PURE__ */
|
|
4230
|
+
render: ({ children, margin, control, tags }) => /* @__PURE__ */ jsx53("div", { className: (0, import_classnames14.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children })
|
|
4194
4231
|
};
|
|
4195
4232
|
var FormRenderer_default = FormRenderer;
|
|
4196
4233
|
|
|
4197
4234
|
// ../renderers/src/FormSectionRenderer.tsx
|
|
4198
4235
|
import { Header as Header4 } from "@transferwise/components";
|
|
4199
|
-
import { jsx as
|
|
4236
|
+
import { jsx as jsx54, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4200
4237
|
var FormSectionRenderer = {
|
|
4201
4238
|
canRenderType: "form-section",
|
|
4202
4239
|
render: ({ title, description, children, control, tags }) => /* @__PURE__ */ jsxs13("fieldset", { className: controlAndTagsToCSSClass({ control, tags }), children: [
|
|
4203
|
-
title && /* @__PURE__ */
|
|
4240
|
+
title && /* @__PURE__ */ jsx54(
|
|
4204
4241
|
Header4,
|
|
4205
4242
|
{
|
|
4206
4243
|
as: "h2",
|
|
4207
4244
|
title
|
|
4208
4245
|
}
|
|
4209
4246
|
),
|
|
4210
|
-
description && /* @__PURE__ */
|
|
4247
|
+
description && /* @__PURE__ */ jsx54("p", { children: description }),
|
|
4211
4248
|
children
|
|
4212
4249
|
] })
|
|
4213
4250
|
};
|
|
4214
4251
|
var FormSectionRenderer_default = FormSectionRenderer;
|
|
4215
4252
|
|
|
4216
4253
|
// ../renderers/src/HeadingRenderer.tsx
|
|
4217
|
-
var
|
|
4254
|
+
var import_classnames15 = __toESM(require_classnames());
|
|
4218
4255
|
import { Display, Title } from "@transferwise/components";
|
|
4219
|
-
import { jsx as
|
|
4256
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
4220
4257
|
var HeadingRenderer = {
|
|
4221
4258
|
canRenderType: "heading",
|
|
4222
4259
|
render: Heading
|
|
4223
4260
|
};
|
|
4224
4261
|
function Heading(props) {
|
|
4225
4262
|
const { text, size, align, margin, control } = props;
|
|
4226
|
-
const className = (0,
|
|
4263
|
+
const className = (0, import_classnames15.default)(
|
|
4227
4264
|
getTextAlignmentAndMargin({ align, margin }),
|
|
4228
4265
|
controlAndTagsToCSSClass(props)
|
|
4229
4266
|
);
|
|
4230
|
-
return control === "display" ? /* @__PURE__ */
|
|
4267
|
+
return control === "display" ? /* @__PURE__ */ jsx55(DisplayHeading, { size, text, className }) : /* @__PURE__ */ jsx55(StandardHeading, { size, text, className });
|
|
4231
4268
|
}
|
|
4232
4269
|
function DisplayHeading({ size, text, className }) {
|
|
4233
|
-
return /* @__PURE__ */
|
|
4270
|
+
return /* @__PURE__ */ jsx55(Display, { type: getDisplayType(size), className, children: text });
|
|
4234
4271
|
}
|
|
4235
4272
|
var getDisplayType = (size) => {
|
|
4236
4273
|
switch (size) {
|
|
@@ -4246,7 +4283,7 @@ var getDisplayType = (size) => {
|
|
|
4246
4283
|
}
|
|
4247
4284
|
};
|
|
4248
4285
|
function StandardHeading({ size, text, className }) {
|
|
4249
|
-
return /* @__PURE__ */
|
|
4286
|
+
return /* @__PURE__ */ jsx55(Title, { type: getTitleTypeBySize(size), className, children: text });
|
|
4250
4287
|
}
|
|
4251
4288
|
var getTitleTypeBySize = (size) => {
|
|
4252
4289
|
var _a;
|
|
@@ -4262,7 +4299,7 @@ var getTitleTypeBySize = (size) => {
|
|
|
4262
4299
|
var HeadingRenderer_default = HeadingRenderer;
|
|
4263
4300
|
|
|
4264
4301
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
4265
|
-
var
|
|
4302
|
+
var import_classnames16 = __toESM(require_classnames());
|
|
4266
4303
|
import { Image } from "@transferwise/components";
|
|
4267
4304
|
import { useEffect as useEffect10, useState as useState11 } from "react";
|
|
4268
4305
|
|
|
@@ -4274,7 +4311,7 @@ function isRelativePath(url = "") {
|
|
|
4274
4311
|
}
|
|
4275
4312
|
|
|
4276
4313
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
4277
|
-
import { jsx as
|
|
4314
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
4278
4315
|
function UrlImage({
|
|
4279
4316
|
accessibilityDescription,
|
|
4280
4317
|
align,
|
|
@@ -4291,17 +4328,17 @@ function UrlImage({
|
|
|
4291
4328
|
void getImageSource(httpClient, uri).then(setImageSource);
|
|
4292
4329
|
}
|
|
4293
4330
|
}, [uri, httpClient]);
|
|
4294
|
-
return /* @__PURE__ */
|
|
4331
|
+
return /* @__PURE__ */ jsx56(
|
|
4295
4332
|
"div",
|
|
4296
4333
|
{
|
|
4297
|
-
className: (0,
|
|
4334
|
+
className: (0, import_classnames16.default)(
|
|
4298
4335
|
"df-image",
|
|
4299
4336
|
align,
|
|
4300
4337
|
size || "md",
|
|
4301
4338
|
getMargin(margin),
|
|
4302
4339
|
controlAndTagsToCSSClass({ control, tags })
|
|
4303
4340
|
),
|
|
4304
|
-
children: /* @__PURE__ */
|
|
4341
|
+
children: /* @__PURE__ */ jsx56(
|
|
4305
4342
|
Image,
|
|
4306
4343
|
{
|
|
4307
4344
|
className: "df-reserve-space",
|
|
@@ -4347,19 +4384,19 @@ var getImageSource = async (httpClient, imageUrl) => {
|
|
|
4347
4384
|
};
|
|
4348
4385
|
|
|
4349
4386
|
// ../renderers/src/ImageRenderer/ImageRenderer.tsx
|
|
4350
|
-
import { jsx as
|
|
4387
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
4351
4388
|
var ImageRenderer = {
|
|
4352
4389
|
canRenderType: "image",
|
|
4353
|
-
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */
|
|
4390
|
+
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ jsx57(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ jsx57(UrlImage, __spreadValues({}, props))
|
|
4354
4391
|
};
|
|
4355
4392
|
|
|
4356
4393
|
// ../renderers/src/ImageRenderer/index.tsx
|
|
4357
4394
|
var ImageRenderer_default = ImageRenderer;
|
|
4358
4395
|
|
|
4359
4396
|
// ../renderers/src/InstructionsRenderer.tsx
|
|
4360
|
-
var
|
|
4397
|
+
var import_classnames17 = __toESM(require_classnames());
|
|
4361
4398
|
import { Header as Header5, InstructionsList } from "@transferwise/components";
|
|
4362
|
-
import { jsx as
|
|
4399
|
+
import { jsx as jsx58, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4363
4400
|
var doContext = ["positive", "neutral", "proposition"];
|
|
4364
4401
|
var dontContext = ["warning", "negative"];
|
|
4365
4402
|
var InstructionsRenderer = {
|
|
@@ -4367,9 +4404,9 @@ var InstructionsRenderer = {
|
|
|
4367
4404
|
render: ({ items, margin, title, control, tags }) => {
|
|
4368
4405
|
const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
|
|
4369
4406
|
const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
|
|
4370
|
-
return /* @__PURE__ */ jsxs14("div", { className: (0,
|
|
4371
|
-
title ? /* @__PURE__ */
|
|
4372
|
-
/* @__PURE__ */
|
|
4407
|
+
return /* @__PURE__ */ jsxs14("div", { className: (0, import_classnames17.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
4408
|
+
title ? /* @__PURE__ */ jsx58(Header5, { title }) : null,
|
|
4409
|
+
/* @__PURE__ */ jsx58(InstructionsList, { dos, donts })
|
|
4373
4410
|
] });
|
|
4374
4411
|
}
|
|
4375
4412
|
};
|
|
@@ -4401,7 +4438,7 @@ function pick(obj, ...keys) {
|
|
|
4401
4438
|
}
|
|
4402
4439
|
|
|
4403
4440
|
// ../renderers/src/IntegerInputRenderer.tsx
|
|
4404
|
-
import { jsx as
|
|
4441
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
4405
4442
|
var IntegerInputRenderer = {
|
|
4406
4443
|
canRenderType: "input-integer",
|
|
4407
4444
|
render: (props) => {
|
|
@@ -4416,7 +4453,7 @@ var IntegerInputRenderer = {
|
|
|
4416
4453
|
"maximum",
|
|
4417
4454
|
"minimum"
|
|
4418
4455
|
);
|
|
4419
|
-
return /* @__PURE__ */
|
|
4456
|
+
return /* @__PURE__ */ jsx59(
|
|
4420
4457
|
FieldInput_default,
|
|
4421
4458
|
{
|
|
4422
4459
|
id,
|
|
@@ -4429,7 +4466,7 @@ var IntegerInputRenderer = {
|
|
|
4429
4466
|
features: props.features,
|
|
4430
4467
|
control: props.control,
|
|
4431
4468
|
tags: props.tags,
|
|
4432
|
-
children: /* @__PURE__ */
|
|
4469
|
+
children: /* @__PURE__ */ jsx59(InputGroup2, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx59(
|
|
4433
4470
|
Input2,
|
|
4434
4471
|
__spreadValues({
|
|
4435
4472
|
id,
|
|
@@ -4452,13 +4489,13 @@ var IntegerInputRenderer = {
|
|
|
4452
4489
|
var IntegerInputRenderer_default = IntegerInputRenderer;
|
|
4453
4490
|
|
|
4454
4491
|
// ../renderers/src/ListRenderer.tsx
|
|
4455
|
-
var
|
|
4492
|
+
var import_classnames18 = __toESM(require_classnames());
|
|
4456
4493
|
import { ListItem as ListItem8 } from "@transferwise/components";
|
|
4457
4494
|
|
|
4458
4495
|
// ../renderers/src/components/Header.tsx
|
|
4459
4496
|
import { Header as DSHeader } from "@transferwise/components";
|
|
4460
|
-
import { jsx as
|
|
4461
|
-
var Header = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */
|
|
4497
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
4498
|
+
var Header = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ jsx60(DSHeader, { title: title != null ? title : "", action: getHeaderAction(callToAction) });
|
|
4462
4499
|
var getHeaderAction = (callToAction) => {
|
|
4463
4500
|
if (!callToAction) {
|
|
4464
4501
|
return void 0;
|
|
@@ -4470,11 +4507,11 @@ var getHeaderAction = (callToAction) => {
|
|
|
4470
4507
|
};
|
|
4471
4508
|
|
|
4472
4509
|
// ../renderers/src/ListRenderer.tsx
|
|
4473
|
-
import { jsx as
|
|
4510
|
+
import { jsx as jsx61, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4474
4511
|
var ListRenderer = {
|
|
4475
4512
|
canRenderType: "list",
|
|
4476
|
-
render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ jsxs15("div", { className: (0,
|
|
4477
|
-
/* @__PURE__ */
|
|
4513
|
+
render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ jsxs15("div", { className: (0, import_classnames18.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
4514
|
+
/* @__PURE__ */ jsx61(Header, { title, callToAction }),
|
|
4478
4515
|
items.map((item) => {
|
|
4479
4516
|
var _a, _b;
|
|
4480
4517
|
const {
|
|
@@ -4491,7 +4528,7 @@ var ListRenderer = {
|
|
|
4491
4528
|
ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
|
|
4492
4529
|
fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
|
|
4493
4530
|
};
|
|
4494
|
-
return /* @__PURE__ */
|
|
4531
|
+
return /* @__PURE__ */ jsx61(
|
|
4495
4532
|
ListItem8,
|
|
4496
4533
|
{
|
|
4497
4534
|
title: itemTitle,
|
|
@@ -4511,17 +4548,17 @@ var ListRenderer = {
|
|
|
4511
4548
|
var ListRenderer_default = ListRenderer;
|
|
4512
4549
|
|
|
4513
4550
|
// ../renderers/src/LoadingIndicatorRenderer.tsx
|
|
4514
|
-
var
|
|
4551
|
+
var import_classnames19 = __toESM(require_classnames());
|
|
4515
4552
|
import { Loader } from "@transferwise/components";
|
|
4516
|
-
import { jsx as
|
|
4553
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
4517
4554
|
var LoadingIndicatorRenderer = {
|
|
4518
4555
|
canRenderType: "loading-indicator",
|
|
4519
|
-
render: ({ size, margin, control, tags }) => /* @__PURE__ */
|
|
4556
|
+
render: ({ size, margin, control, tags }) => /* @__PURE__ */ jsx62(
|
|
4520
4557
|
Loader,
|
|
4521
4558
|
{
|
|
4522
4559
|
size,
|
|
4523
4560
|
classNames: {
|
|
4524
|
-
"tw-loader": (0,
|
|
4561
|
+
"tw-loader": (0, import_classnames19.default)(
|
|
4525
4562
|
"tw-loader",
|
|
4526
4563
|
"m-x-auto",
|
|
4527
4564
|
getMargin(margin),
|
|
@@ -4535,24 +4572,24 @@ var LoadingIndicatorRenderer = {
|
|
|
4535
4572
|
var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
|
|
4536
4573
|
|
|
4537
4574
|
// ../renderers/src/MarkdownRenderer.tsx
|
|
4538
|
-
var
|
|
4575
|
+
var import_classnames20 = __toESM(require_classnames());
|
|
4539
4576
|
import { Markdown as Markdown4 } from "@transferwise/components";
|
|
4540
|
-
import { jsx as
|
|
4577
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
4541
4578
|
var MarkdownRenderer = {
|
|
4542
4579
|
canRenderType: "markdown",
|
|
4543
4580
|
render: ({ content, align, margin, size, control, tags }) => {
|
|
4544
4581
|
const isLarge = !["xs", "sm"].includes(size);
|
|
4545
|
-
return /* @__PURE__ */
|
|
4582
|
+
return /* @__PURE__ */ jsx63(
|
|
4546
4583
|
"div",
|
|
4547
4584
|
{
|
|
4548
|
-
className: (0,
|
|
4585
|
+
className: (0, import_classnames20.default)(
|
|
4549
4586
|
getTextAlignmentAndMargin({ align, margin }),
|
|
4550
4587
|
controlAndTagsToCSSClass({ control, tags })
|
|
4551
4588
|
),
|
|
4552
|
-
children: /* @__PURE__ */
|
|
4589
|
+
children: /* @__PURE__ */ jsx63(
|
|
4553
4590
|
Markdown4,
|
|
4554
4591
|
{
|
|
4555
|
-
className: (0,
|
|
4592
|
+
className: (0, import_classnames20.default)("df-markdown", {
|
|
4556
4593
|
"np-text-body-large": isLarge,
|
|
4557
4594
|
"np-text-body-default": !isLarge
|
|
4558
4595
|
}),
|
|
@@ -4567,17 +4604,17 @@ var MarkdownRenderer = {
|
|
|
4567
4604
|
var MarkdownRenderer_default = MarkdownRenderer;
|
|
4568
4605
|
|
|
4569
4606
|
// ../renderers/src/MediaRenderer.tsx
|
|
4570
|
-
var
|
|
4571
|
-
import { jsx as
|
|
4607
|
+
var import_classnames21 = __toESM(require_classnames());
|
|
4608
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
4572
4609
|
var MediaRenderer = {
|
|
4573
4610
|
canRenderType: "media",
|
|
4574
4611
|
render: (_a) => {
|
|
4575
4612
|
var _b = _a, { media } = _b, rest = __objRest(_b, ["media"]);
|
|
4576
4613
|
switch (media.type) {
|
|
4577
4614
|
case "avatar":
|
|
4578
|
-
return /* @__PURE__ */
|
|
4615
|
+
return /* @__PURE__ */ jsx64(AvatarMediaRendererComponent, __spreadValues({ media }, rest));
|
|
4579
4616
|
case "image":
|
|
4580
|
-
return /* @__PURE__ */
|
|
4617
|
+
return /* @__PURE__ */ jsx64(ImageMediaRendererComponent, __spreadValues({ media }, rest));
|
|
4581
4618
|
case "legacy":
|
|
4582
4619
|
return null;
|
|
4583
4620
|
}
|
|
@@ -4591,16 +4628,16 @@ var AvatarMediaRendererComponent = ({
|
|
|
4591
4628
|
control,
|
|
4592
4629
|
tags
|
|
4593
4630
|
}) => {
|
|
4594
|
-
return /* @__PURE__ */
|
|
4631
|
+
return /* @__PURE__ */ jsx64(
|
|
4595
4632
|
"div",
|
|
4596
4633
|
{
|
|
4597
|
-
className: (0,
|
|
4634
|
+
className: (0, import_classnames21.default)(
|
|
4598
4635
|
"df-media-layout-avatar",
|
|
4599
4636
|
align,
|
|
4600
4637
|
getMargin(margin),
|
|
4601
4638
|
controlAndTagsToCSSClass({ control, tags })
|
|
4602
4639
|
),
|
|
4603
|
-
children: /* @__PURE__ */
|
|
4640
|
+
children: /* @__PURE__ */ jsx64(Media, { media, size: mapAvatarMediaSize(size) })
|
|
4604
4641
|
}
|
|
4605
4642
|
);
|
|
4606
4643
|
};
|
|
@@ -4610,7 +4647,7 @@ var ImageMediaRendererComponent = (_a) => {
|
|
|
4610
4647
|
} = _b, rest = __objRest(_b, [
|
|
4611
4648
|
"media"
|
|
4612
4649
|
]);
|
|
4613
|
-
return isUrnImage(media.uri) ? /* @__PURE__ */
|
|
4650
|
+
return isUrnImage(media.uri) ? /* @__PURE__ */ jsx64(UrnImage, __spreadValues({ uri: media.uri, accessibilityDescription: media.accessibilityDescription }, rest)) : /* @__PURE__ */ jsx64(UrlImage, __spreadValues({ uri: media.uri, accessibilityDescription: media.accessibilityDescription }, rest));
|
|
4614
4651
|
};
|
|
4615
4652
|
var mapAvatarMediaSize = (size) => {
|
|
4616
4653
|
switch (size) {
|
|
@@ -4628,21 +4665,21 @@ var mapAvatarMediaSize = (size) => {
|
|
|
4628
4665
|
};
|
|
4629
4666
|
|
|
4630
4667
|
// ../renderers/src/ModalLayoutRenderer.tsx
|
|
4631
|
-
var
|
|
4668
|
+
var import_classnames22 = __toESM(require_classnames());
|
|
4632
4669
|
import { Button as Button6, Modal as Modal2 } from "@transferwise/components";
|
|
4633
4670
|
import { useState as useState12 } from "react";
|
|
4634
|
-
import { jsx as
|
|
4671
|
+
import { jsx as jsx65, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4635
4672
|
var ModalLayoutRenderer = {
|
|
4636
4673
|
canRenderType: "modal-layout",
|
|
4637
|
-
render: (props) => /* @__PURE__ */
|
|
4674
|
+
render: (props) => /* @__PURE__ */ jsx65(DFModal, __spreadValues({}, props))
|
|
4638
4675
|
};
|
|
4639
4676
|
var ModalLayoutRenderer_default = ModalLayoutRenderer;
|
|
4640
4677
|
function DFModal({ content, margin, trigger, control, tags }) {
|
|
4641
4678
|
const [visible, setVisible] = useState12(false);
|
|
4642
4679
|
const { children, title } = content;
|
|
4643
|
-
return /* @__PURE__ */ jsxs16("div", { className: (0,
|
|
4644
|
-
/* @__PURE__ */
|
|
4645
|
-
/* @__PURE__ */
|
|
4680
|
+
return /* @__PURE__ */ jsxs16("div", { className: (0, import_classnames22.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
4681
|
+
/* @__PURE__ */ jsx65(Button6, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
|
|
4682
|
+
/* @__PURE__ */ jsx65(
|
|
4646
4683
|
Modal2,
|
|
4647
4684
|
{
|
|
4648
4685
|
scroll: "content",
|
|
@@ -4658,11 +4695,11 @@ function DFModal({ content, margin, trigger, control, tags }) {
|
|
|
4658
4695
|
|
|
4659
4696
|
// ../renderers/src/ModalRenderer.tsx
|
|
4660
4697
|
import { Modal as Modal3 } from "@transferwise/components";
|
|
4661
|
-
import { jsx as
|
|
4698
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
4662
4699
|
var ModalRenderer = {
|
|
4663
4700
|
canRenderType: "modal",
|
|
4664
4701
|
render: ({ title, children, open, onClose, control, tags }) => {
|
|
4665
|
-
return /* @__PURE__ */
|
|
4702
|
+
return /* @__PURE__ */ jsx66(
|
|
4666
4703
|
Modal3,
|
|
4667
4704
|
{
|
|
4668
4705
|
open,
|
|
@@ -4679,7 +4716,7 @@ var ModalRenderer = {
|
|
|
4679
4716
|
import { MoneyInput } from "@transferwise/components";
|
|
4680
4717
|
import { useEffect as useEffect11 } from "react";
|
|
4681
4718
|
import { useIntl as useIntl11 } from "react-intl";
|
|
4682
|
-
import { jsx as
|
|
4719
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
4683
4720
|
var groupingTags2 = Object.keys(group_messages_default).filter((key) => key !== "all");
|
|
4684
4721
|
var MoneyInputRenderer = {
|
|
4685
4722
|
canRenderType: "money-input",
|
|
@@ -4709,7 +4746,7 @@ function MoneyInputRendererComponent(props) {
|
|
|
4709
4746
|
}
|
|
4710
4747
|
}, [selectedCurrencyIndex, onCurrencyChange, currencies.length]);
|
|
4711
4748
|
const { formatMessage } = useIntl11();
|
|
4712
|
-
return /* @__PURE__ */
|
|
4749
|
+
return /* @__PURE__ */ jsx67(
|
|
4713
4750
|
FieldInput_default,
|
|
4714
4751
|
{
|
|
4715
4752
|
id: uid,
|
|
@@ -4720,7 +4757,7 @@ function MoneyInputRendererComponent(props) {
|
|
|
4720
4757
|
features,
|
|
4721
4758
|
control,
|
|
4722
4759
|
tags,
|
|
4723
|
-
children: /* @__PURE__ */
|
|
4760
|
+
children: /* @__PURE__ */ jsx67(
|
|
4724
4761
|
MoneyInput,
|
|
4725
4762
|
{
|
|
4726
4763
|
amount: parseFloatOrNull(amountValue),
|
|
@@ -4792,7 +4829,7 @@ var zipWithIndex = (items) => items.map((item, index) => __spreadProps(__spreadV
|
|
|
4792
4829
|
}));
|
|
4793
4830
|
|
|
4794
4831
|
// ../renderers/src/MultiSelectInputRenderer/InlineComponent.tsx
|
|
4795
|
-
import { Fragment as Fragment8, jsx as
|
|
4832
|
+
import { Fragment as Fragment8, jsx as jsx68, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4796
4833
|
function InlineComponent(props) {
|
|
4797
4834
|
const {
|
|
4798
4835
|
id,
|
|
@@ -4814,7 +4851,7 @@ function InlineComponent(props) {
|
|
|
4814
4851
|
const filtered = tags == null ? void 0 : tags.includes("filtered");
|
|
4815
4852
|
const filteredOptions = query ? filterAndSortItems(optionsWithIndex, filtered ? query : "") : optionsWithIndex;
|
|
4816
4853
|
return /* @__PURE__ */ jsxs17(Fragment8, { children: [
|
|
4817
|
-
filtered && /* @__PURE__ */
|
|
4854
|
+
filtered && /* @__PURE__ */ jsx68(
|
|
4818
4855
|
SearchInput2,
|
|
4819
4856
|
{
|
|
4820
4857
|
placeholder: formatMessage(filter_messages_default.placeholder),
|
|
@@ -4827,7 +4864,7 @@ function InlineComponent(props) {
|
|
|
4827
4864
|
}
|
|
4828
4865
|
}
|
|
4829
4866
|
),
|
|
4830
|
-
/* @__PURE__ */
|
|
4867
|
+
/* @__PURE__ */ jsx68(
|
|
4831
4868
|
FieldInput_default,
|
|
4832
4869
|
{
|
|
4833
4870
|
id,
|
|
@@ -4852,7 +4889,7 @@ function InlineComponent(props) {
|
|
|
4852
4889
|
childrenProps
|
|
4853
4890
|
} = option;
|
|
4854
4891
|
const key = (_a = childrenProps == null ? void 0 : childrenProps.uid) != null ? _a : index;
|
|
4855
|
-
return /* @__PURE__ */
|
|
4892
|
+
return /* @__PURE__ */ jsx68(
|
|
4856
4893
|
ListItem9,
|
|
4857
4894
|
{
|
|
4858
4895
|
title: itemTitle,
|
|
@@ -4861,9 +4898,9 @@ function InlineComponent(props) {
|
|
|
4861
4898
|
valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
|
|
4862
4899
|
media: getMedia(media, false),
|
|
4863
4900
|
prompt: getInlineAlert(inlineAlert),
|
|
4864
|
-
additionalInfo: additionalText ? /* @__PURE__ */
|
|
4901
|
+
additionalInfo: additionalText ? /* @__PURE__ */ jsx68(ListItem9.AdditionalInfo, { children: additionalText }) : void 0,
|
|
4865
4902
|
disabled: disabled || optionDisabled,
|
|
4866
|
-
control: /* @__PURE__ */
|
|
4903
|
+
control: /* @__PURE__ */ jsx68(
|
|
4867
4904
|
ListItem9.Checkbox,
|
|
4868
4905
|
{
|
|
4869
4906
|
checked: selectedIndices.includes(index),
|
|
@@ -4898,7 +4935,7 @@ var multi_select_messages_default = defineMessages10({
|
|
|
4898
4935
|
});
|
|
4899
4936
|
|
|
4900
4937
|
// ../renderers/src/MultiSelectInputRenderer/DefaultComponent.tsx
|
|
4901
|
-
import { jsx as
|
|
4938
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
4902
4939
|
function DefaultComponent(props) {
|
|
4903
4940
|
const { formatMessage } = useIntl13();
|
|
4904
4941
|
const [stagedIndices, setStagedIndices] = useState14();
|
|
@@ -4942,12 +4979,12 @@ function DefaultComponent(props) {
|
|
|
4942
4979
|
const contentProps = {
|
|
4943
4980
|
title: option.title,
|
|
4944
4981
|
description: option.description,
|
|
4945
|
-
icon: /* @__PURE__ */
|
|
4982
|
+
icon: /* @__PURE__ */ jsx69(OptionMedia, { media: option.media, preferAvatar: false })
|
|
4946
4983
|
};
|
|
4947
|
-
return /* @__PURE__ */
|
|
4984
|
+
return /* @__PURE__ */ jsx69(SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
4948
4985
|
};
|
|
4949
4986
|
const extraProps = { autoComplete };
|
|
4950
|
-
return /* @__PURE__ */
|
|
4987
|
+
return /* @__PURE__ */ jsx69(
|
|
4951
4988
|
FieldInput_default,
|
|
4952
4989
|
{
|
|
4953
4990
|
id,
|
|
@@ -4958,7 +4995,7 @@ function DefaultComponent(props) {
|
|
|
4958
4995
|
features,
|
|
4959
4996
|
control,
|
|
4960
4997
|
tags,
|
|
4961
|
-
children: /* @__PURE__ */
|
|
4998
|
+
children: /* @__PURE__ */ jsx69(
|
|
4962
4999
|
SelectInput,
|
|
4963
5000
|
__spreadValues({
|
|
4964
5001
|
id,
|
|
@@ -4998,7 +5035,7 @@ function DefaultComponent(props) {
|
|
|
4998
5035
|
|
|
4999
5036
|
// ../renderers/src/MultiSelectInputRenderer/InlineCheckboxComponent.tsx
|
|
5000
5037
|
import { Checkbox as Checkbox2 } from "@transferwise/components";
|
|
5001
|
-
import { jsx as
|
|
5038
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
5002
5039
|
function InlineCheckboxComponent(props) {
|
|
5003
5040
|
const {
|
|
5004
5041
|
id,
|
|
@@ -5014,7 +5051,7 @@ function InlineCheckboxComponent(props) {
|
|
|
5014
5051
|
tags,
|
|
5015
5052
|
onSelect
|
|
5016
5053
|
} = props;
|
|
5017
|
-
return /* @__PURE__ */
|
|
5054
|
+
return /* @__PURE__ */ jsx70(
|
|
5018
5055
|
FieldInput_default,
|
|
5019
5056
|
{
|
|
5020
5057
|
id,
|
|
@@ -5045,24 +5082,24 @@ function InlineCheckboxComponent(props) {
|
|
|
5045
5082
|
onSelect(newSelectedIndices);
|
|
5046
5083
|
}
|
|
5047
5084
|
};
|
|
5048
|
-
return /* @__PURE__ */
|
|
5085
|
+
return /* @__PURE__ */ jsx70(Checkbox2, __spreadProps(__spreadValues({}, checkboxProps), { className: "m-t-1" }), key);
|
|
5049
5086
|
})
|
|
5050
5087
|
}
|
|
5051
5088
|
);
|
|
5052
5089
|
}
|
|
5053
5090
|
|
|
5054
5091
|
// ../renderers/src/MultiSelectInputRenderer/MultiSelectInputRenderer.tsx
|
|
5055
|
-
import { jsx as
|
|
5092
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
5056
5093
|
var MultiSelectInputRenderer = {
|
|
5057
5094
|
canRenderType: "input-multi-select",
|
|
5058
5095
|
render: (props) => {
|
|
5059
5096
|
switch (props.control) {
|
|
5060
5097
|
case "inline":
|
|
5061
|
-
return /* @__PURE__ */
|
|
5098
|
+
return /* @__PURE__ */ jsx71(InlineComponent, __spreadValues({}, props));
|
|
5062
5099
|
case "inline-checkbox-group":
|
|
5063
|
-
return /* @__PURE__ */
|
|
5100
|
+
return /* @__PURE__ */ jsx71(InlineCheckboxComponent, __spreadValues({}, props));
|
|
5064
5101
|
default:
|
|
5065
|
-
return /* @__PURE__ */
|
|
5102
|
+
return /* @__PURE__ */ jsx71(DefaultComponent, __spreadValues({}, props));
|
|
5066
5103
|
}
|
|
5067
5104
|
}
|
|
5068
5105
|
};
|
|
@@ -5072,8 +5109,8 @@ import { Status, UploadInput } from "@transferwise/components";
|
|
|
5072
5109
|
|
|
5073
5110
|
// ../renderers/src/components/UploadFieldInput.tsx
|
|
5074
5111
|
import { InlineAlert as InlineAlert2 } from "@transferwise/components";
|
|
5075
|
-
var
|
|
5076
|
-
import { jsx as
|
|
5112
|
+
var import_classnames23 = __toESM(require_classnames());
|
|
5113
|
+
import { jsx as jsx72, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
5077
5114
|
function UploadFieldInput({
|
|
5078
5115
|
id,
|
|
5079
5116
|
children,
|
|
@@ -5085,14 +5122,14 @@ function UploadFieldInput({
|
|
|
5085
5122
|
control,
|
|
5086
5123
|
tags
|
|
5087
5124
|
}) {
|
|
5088
|
-
const labelContent = label && help ? /* @__PURE__ */
|
|
5125
|
+
const labelContent = label && help ? /* @__PURE__ */ jsx72(LabelContentWithHelp, { text: label, help }) : label;
|
|
5089
5126
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
5090
5127
|
const { ref } = useScrollToError(validation, features);
|
|
5091
5128
|
return /* @__PURE__ */ jsxs18(
|
|
5092
5129
|
"div",
|
|
5093
5130
|
{
|
|
5094
5131
|
ref,
|
|
5095
|
-
className: (0,
|
|
5132
|
+
className: (0, import_classnames23.default)(
|
|
5096
5133
|
"form-group d-block",
|
|
5097
5134
|
{
|
|
5098
5135
|
"has-error": (validation == null ? void 0 : validation.status) === "invalid"
|
|
@@ -5100,9 +5137,9 @@ function UploadFieldInput({
|
|
|
5100
5137
|
controlAndTagsToCSSClass({ control, tags })
|
|
5101
5138
|
),
|
|
5102
5139
|
children: [
|
|
5103
|
-
/* @__PURE__ */
|
|
5140
|
+
/* @__PURE__ */ jsx72("label", { htmlFor: id, className: "control-label", children: labelContent }),
|
|
5104
5141
|
children,
|
|
5105
|
-
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */
|
|
5142
|
+
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ jsx72(InlineAlert2, { type: "negative", id: descriptionId, children: validation.message })
|
|
5106
5143
|
]
|
|
5107
5144
|
}
|
|
5108
5145
|
);
|
|
@@ -5137,7 +5174,7 @@ var getSizeLimit = (maxSize) => {
|
|
|
5137
5174
|
};
|
|
5138
5175
|
|
|
5139
5176
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
5140
|
-
import { jsx as
|
|
5177
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
5141
5178
|
var MultiUploadInputRenderer = {
|
|
5142
5179
|
canRenderType: "input-upload-multi",
|
|
5143
5180
|
render: (props) => {
|
|
@@ -5165,7 +5202,7 @@ var MultiUploadInputRenderer = {
|
|
|
5165
5202
|
};
|
|
5166
5203
|
const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
|
|
5167
5204
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
5168
|
-
return /* @__PURE__ */
|
|
5205
|
+
return /* @__PURE__ */ jsx73(
|
|
5169
5206
|
UploadFieldInput_default,
|
|
5170
5207
|
{
|
|
5171
5208
|
id,
|
|
@@ -5176,7 +5213,7 @@ var MultiUploadInputRenderer = {
|
|
|
5176
5213
|
features,
|
|
5177
5214
|
control,
|
|
5178
5215
|
tags,
|
|
5179
|
-
children: /* @__PURE__ */
|
|
5216
|
+
children: /* @__PURE__ */ jsx73(
|
|
5180
5217
|
UploadInput,
|
|
5181
5218
|
{
|
|
5182
5219
|
id,
|
|
@@ -5205,7 +5242,7 @@ var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
|
|
|
5205
5242
|
|
|
5206
5243
|
// ../renderers/src/NumberInputRenderer.tsx
|
|
5207
5244
|
import { Input as Input3, InputGroup as InputGroup3 } from "@transferwise/components";
|
|
5208
|
-
import { jsx as
|
|
5245
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
5209
5246
|
var NumberInputRenderer = {
|
|
5210
5247
|
canRenderType: "input-number",
|
|
5211
5248
|
render: (props) => {
|
|
@@ -5219,7 +5256,7 @@ var NumberInputRenderer = {
|
|
|
5219
5256
|
"maximum",
|
|
5220
5257
|
"minimum"
|
|
5221
5258
|
);
|
|
5222
|
-
return /* @__PURE__ */
|
|
5259
|
+
return /* @__PURE__ */ jsx74(
|
|
5223
5260
|
FieldInput_default,
|
|
5224
5261
|
{
|
|
5225
5262
|
id,
|
|
@@ -5232,7 +5269,7 @@ var NumberInputRenderer = {
|
|
|
5232
5269
|
features: props.features,
|
|
5233
5270
|
control: props.control,
|
|
5234
5271
|
tags: props.tags,
|
|
5235
|
-
children: /* @__PURE__ */
|
|
5272
|
+
children: /* @__PURE__ */ jsx74(InputGroup3, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx74(
|
|
5236
5273
|
Input3,
|
|
5237
5274
|
__spreadValues({
|
|
5238
5275
|
id,
|
|
@@ -5253,7 +5290,7 @@ var NumberInputRenderer = {
|
|
|
5253
5290
|
var NumberInputRenderer_default = NumberInputRenderer;
|
|
5254
5291
|
|
|
5255
5292
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
5256
|
-
var
|
|
5293
|
+
var import_classnames24 = __toESM(require_classnames());
|
|
5257
5294
|
import { Button as Button7, Input as Input4 } from "@transferwise/components";
|
|
5258
5295
|
import { useIntl as useIntl14 } from "react-intl";
|
|
5259
5296
|
|
|
@@ -5282,18 +5319,18 @@ var paragraph_messages_default = defineMessages11({
|
|
|
5282
5319
|
});
|
|
5283
5320
|
|
|
5284
5321
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
5285
|
-
import { jsx as
|
|
5322
|
+
import { jsx as jsx75, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
5286
5323
|
var ParagraphRenderer = {
|
|
5287
5324
|
canRenderType: "paragraph",
|
|
5288
|
-
render: (props) => /* @__PURE__ */
|
|
5325
|
+
render: (props) => /* @__PURE__ */ jsx75(Paragraph, __spreadValues({}, props))
|
|
5289
5326
|
};
|
|
5290
5327
|
function Paragraph(props) {
|
|
5291
5328
|
const { align, control, margin, size, text } = props;
|
|
5292
|
-
const className = (0,
|
|
5329
|
+
const className = (0, import_classnames24.default)(
|
|
5293
5330
|
getTextAlignmentAndMargin({ align, margin }),
|
|
5294
5331
|
controlAndTagsToCSSClass(props)
|
|
5295
5332
|
);
|
|
5296
|
-
return control === "copyable" ? /* @__PURE__ */
|
|
5333
|
+
return control === "copyable" ? /* @__PURE__ */ jsx75(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ jsx75(
|
|
5297
5334
|
"p",
|
|
5298
5335
|
{
|
|
5299
5336
|
className: `${["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large"} ${className}`,
|
|
@@ -5314,33 +5351,33 @@ function CopyableParagraph({
|
|
|
5314
5351
|
};
|
|
5315
5352
|
const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
|
|
5316
5353
|
return /* @__PURE__ */ jsxs19("div", { className, children: [
|
|
5317
|
-
/* @__PURE__ */
|
|
5354
|
+
/* @__PURE__ */ jsx75(
|
|
5318
5355
|
Input4,
|
|
5319
5356
|
{
|
|
5320
5357
|
type: "text",
|
|
5321
5358
|
value: text,
|
|
5322
5359
|
readOnly: true,
|
|
5323
|
-
className: (0,
|
|
5360
|
+
className: (0, import_classnames24.default)("text-ellipsis", inputAlignmentClasses)
|
|
5324
5361
|
}
|
|
5325
5362
|
),
|
|
5326
|
-
/* @__PURE__ */
|
|
5363
|
+
/* @__PURE__ */ jsx75(Button7, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
|
|
5327
5364
|
] });
|
|
5328
5365
|
}
|
|
5329
5366
|
var ParagraphRenderer_default = ParagraphRenderer;
|
|
5330
5367
|
|
|
5331
5368
|
// ../renderers/src/ProgressRenderer.tsx
|
|
5332
|
-
var
|
|
5369
|
+
var import_classnames25 = __toESM(require_classnames());
|
|
5333
5370
|
import { ProgressBar } from "@transferwise/components";
|
|
5334
|
-
import { jsx as
|
|
5371
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
5335
5372
|
var ProgressRenderer = {
|
|
5336
5373
|
canRenderType: "progress",
|
|
5337
5374
|
render: ({ uid, title, help, progress, progressText, margin, description, control, tags }) => {
|
|
5338
|
-
return /* @__PURE__ */
|
|
5375
|
+
return /* @__PURE__ */ jsx76(
|
|
5339
5376
|
ProgressBar,
|
|
5340
5377
|
{
|
|
5341
5378
|
id: uid,
|
|
5342
|
-
className: (0,
|
|
5343
|
-
title: title && help ? /* @__PURE__ */
|
|
5379
|
+
className: (0, import_classnames25.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
|
|
5380
|
+
title: title && help ? /* @__PURE__ */ jsx76(LabelContentWithHelp, { text: title, help }) : title,
|
|
5344
5381
|
description,
|
|
5345
5382
|
progress: {
|
|
5346
5383
|
max: 1,
|
|
@@ -5353,7 +5390,7 @@ var ProgressRenderer = {
|
|
|
5353
5390
|
};
|
|
5354
5391
|
|
|
5355
5392
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
5356
|
-
var
|
|
5393
|
+
var import_classnames26 = __toESM(require_classnames());
|
|
5357
5394
|
import { Button as Button8, Header as Header6, InlineAlert as InlineAlert3, Modal as Modal4, NavigationOption } from "@transferwise/components";
|
|
5358
5395
|
import { Plus } from "@transferwise/icons";
|
|
5359
5396
|
import { useState as useState15 } from "react";
|
|
@@ -5385,10 +5422,10 @@ var repeatable_messages_default = defineMessages12({
|
|
|
5385
5422
|
});
|
|
5386
5423
|
|
|
5387
5424
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
5388
|
-
import { Fragment as Fragment9, jsx as
|
|
5425
|
+
import { Fragment as Fragment9, jsx as jsx77, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5389
5426
|
var RepeatableRenderer = {
|
|
5390
5427
|
canRenderType: "repeatable",
|
|
5391
|
-
render: (props) => /* @__PURE__ */
|
|
5428
|
+
render: (props) => /* @__PURE__ */ jsx77(Repeatable, __spreadValues({}, props))
|
|
5392
5429
|
};
|
|
5393
5430
|
function Repeatable(props) {
|
|
5394
5431
|
const {
|
|
@@ -5431,40 +5468,40 @@ function Repeatable(props) {
|
|
|
5431
5468
|
};
|
|
5432
5469
|
return /* @__PURE__ */ jsxs20(Fragment9, { children: [
|
|
5433
5470
|
/* @__PURE__ */ jsxs20("div", { ref, className: controlAndTagsToCSSClass(props), children: [
|
|
5434
|
-
title && /* @__PURE__ */
|
|
5435
|
-
description && /* @__PURE__ */
|
|
5471
|
+
title && /* @__PURE__ */ jsx77(Header6, { title }),
|
|
5472
|
+
description && /* @__PURE__ */ jsx77("p", { children: description }),
|
|
5436
5473
|
/* @__PURE__ */ jsxs20(
|
|
5437
5474
|
"div",
|
|
5438
5475
|
{
|
|
5439
|
-
className: (0,
|
|
5476
|
+
className: (0, import_classnames26.default)("form-group", {
|
|
5440
5477
|
"has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
|
|
5441
5478
|
}),
|
|
5442
5479
|
children: [
|
|
5443
|
-
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */
|
|
5444
|
-
/* @__PURE__ */
|
|
5480
|
+
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx77(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
|
|
5481
|
+
/* @__PURE__ */ jsx77(
|
|
5445
5482
|
NavigationOption,
|
|
5446
5483
|
{
|
|
5447
|
-
media: /* @__PURE__ */
|
|
5484
|
+
media: /* @__PURE__ */ jsx77(Plus, {}),
|
|
5448
5485
|
title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
|
|
5449
5486
|
showMediaAtAllSizes: true,
|
|
5450
5487
|
onClick: () => onAddItem()
|
|
5451
5488
|
}
|
|
5452
5489
|
),
|
|
5453
|
-
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */
|
|
5490
|
+
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx77(InlineAlert3, { type: "negative", children: validationState.message })
|
|
5454
5491
|
]
|
|
5455
5492
|
}
|
|
5456
5493
|
)
|
|
5457
5494
|
] }),
|
|
5458
|
-
/* @__PURE__ */
|
|
5495
|
+
/* @__PURE__ */ jsx77(
|
|
5459
5496
|
Modal4,
|
|
5460
5497
|
{
|
|
5461
5498
|
open: openModalType !== null,
|
|
5462
5499
|
title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
|
|
5463
5500
|
body: /* @__PURE__ */ jsxs20(Fragment9, { children: [
|
|
5464
|
-
/* @__PURE__ */
|
|
5501
|
+
/* @__PURE__ */ jsx77("div", { className: "m-b-2", children: editableItem }),
|
|
5465
5502
|
/* @__PURE__ */ jsxs20("div", { children: [
|
|
5466
|
-
/* @__PURE__ */
|
|
5467
|
-
/* @__PURE__ */
|
|
5503
|
+
/* @__PURE__ */ jsx77(Button8, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
|
|
5504
|
+
/* @__PURE__ */ jsx77(
|
|
5468
5505
|
Button8,
|
|
5469
5506
|
{
|
|
5470
5507
|
v2: true,
|
|
@@ -5486,10 +5523,10 @@ function ItemSummaryOption({
|
|
|
5486
5523
|
item,
|
|
5487
5524
|
onClick
|
|
5488
5525
|
}) {
|
|
5489
|
-
return /* @__PURE__ */
|
|
5526
|
+
return /* @__PURE__ */ jsx77(
|
|
5490
5527
|
NavigationOption,
|
|
5491
5528
|
{
|
|
5492
|
-
media: /* @__PURE__ */
|
|
5529
|
+
media: /* @__PURE__ */ jsx77(OptionMedia, { media: item.media, preferAvatar: false }),
|
|
5493
5530
|
title: item.title,
|
|
5494
5531
|
content: item.description,
|
|
5495
5532
|
showMediaAtAllSizes: true,
|
|
@@ -5501,16 +5538,16 @@ function ItemSummaryOption({
|
|
|
5501
5538
|
var RepeatableRenderer_default = RepeatableRenderer;
|
|
5502
5539
|
|
|
5503
5540
|
// ../renderers/src/ReviewLegacyRenderer.tsx
|
|
5504
|
-
var
|
|
5541
|
+
var import_classnames27 = __toESM(require_classnames());
|
|
5505
5542
|
import { DefinitionList } from "@transferwise/components";
|
|
5506
|
-
import { Fragment as Fragment10, jsx as
|
|
5543
|
+
import { Fragment as Fragment10, jsx as jsx78, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5507
5544
|
var ReviewRenderer = {
|
|
5508
5545
|
canRenderType: "review",
|
|
5509
5546
|
render: ({ callToAction, control, fields, margin, title, trackEvent, tags }) => {
|
|
5510
5547
|
const orientation = mapControlToDefinitionListLayout(control);
|
|
5511
|
-
return /* @__PURE__ */ jsxs21("div", { className: (0,
|
|
5512
|
-
/* @__PURE__ */
|
|
5513
|
-
/* @__PURE__ */
|
|
5548
|
+
return /* @__PURE__ */ jsxs21("div", { className: (0, import_classnames27.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
5549
|
+
/* @__PURE__ */ jsx78(Header, { title, callToAction }),
|
|
5550
|
+
/* @__PURE__ */ jsx78("div", { className: margin, children: /* @__PURE__ */ jsx78(
|
|
5514
5551
|
DefinitionList,
|
|
5515
5552
|
{
|
|
5516
5553
|
layout: orientation,
|
|
@@ -5551,18 +5588,18 @@ var getFieldLabel = (label, help, onClick) => {
|
|
|
5551
5588
|
return /* @__PURE__ */ jsxs21(Fragment10, { children: [
|
|
5552
5589
|
label,
|
|
5553
5590
|
" ",
|
|
5554
|
-
/* @__PURE__ */
|
|
5591
|
+
/* @__PURE__ */ jsx78(Help_default, { help, onClick })
|
|
5555
5592
|
] });
|
|
5556
5593
|
}
|
|
5557
5594
|
return label;
|
|
5558
5595
|
};
|
|
5559
5596
|
|
|
5560
5597
|
// ../renderers/src/ReviewRenderer.tsx
|
|
5561
|
-
var
|
|
5598
|
+
var import_classnames28 = __toESM(require_classnames());
|
|
5562
5599
|
import { ListItem as ListItem10, Markdown as Markdown5, Popover } from "@transferwise/components";
|
|
5563
5600
|
import { QuestionMarkCircle } from "@transferwise/icons";
|
|
5564
5601
|
import { useIntl as useIntl16 } from "react-intl";
|
|
5565
|
-
import { jsx as
|
|
5602
|
+
import { jsx as jsx79, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5566
5603
|
var IGNORED_CONTROLS = [
|
|
5567
5604
|
"horizontal",
|
|
5568
5605
|
"horizontal-end-aligned",
|
|
@@ -5572,7 +5609,7 @@ var IGNORED_CONTROLS = [
|
|
|
5572
5609
|
var ReviewRenderer2 = {
|
|
5573
5610
|
canRenderType: "review",
|
|
5574
5611
|
canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
|
|
5575
|
-
render: (props) => /* @__PURE__ */
|
|
5612
|
+
render: (props) => /* @__PURE__ */ jsx79(Review, __spreadValues({}, props))
|
|
5576
5613
|
};
|
|
5577
5614
|
var Review = ({
|
|
5578
5615
|
callToAction,
|
|
@@ -5584,8 +5621,8 @@ var Review = ({
|
|
|
5584
5621
|
trackEvent
|
|
5585
5622
|
}) => {
|
|
5586
5623
|
const intl = useIntl16();
|
|
5587
|
-
return /* @__PURE__ */ jsxs22("div", { className: (0,
|
|
5588
|
-
/* @__PURE__ */
|
|
5624
|
+
return /* @__PURE__ */ jsxs22("div", { className: (0, import_classnames28.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
5625
|
+
/* @__PURE__ */ jsx79(Header, { title, callToAction }),
|
|
5589
5626
|
fields.map((field) => {
|
|
5590
5627
|
var _a, _b, _c;
|
|
5591
5628
|
const {
|
|
@@ -5603,7 +5640,7 @@ var Review = ({
|
|
|
5603
5640
|
ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
|
|
5604
5641
|
fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
|
|
5605
5642
|
};
|
|
5606
|
-
return /* @__PURE__ */
|
|
5643
|
+
return /* @__PURE__ */ jsx79(
|
|
5607
5644
|
ListItem10,
|
|
5608
5645
|
{
|
|
5609
5646
|
title: value,
|
|
@@ -5624,7 +5661,7 @@ var Review = ({
|
|
|
5624
5661
|
] });
|
|
5625
5662
|
};
|
|
5626
5663
|
var getHelpControl = (help, ariaLabel, onClick) => {
|
|
5627
|
-
return /* @__PURE__ */
|
|
5664
|
+
return /* @__PURE__ */ jsx79(Popover, { content: /* @__PURE__ */ jsx79(Markdown5, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ jsx79(ListItem10.IconButton, { partiallyInteractive: true, "aria-label": ariaLabel, onClick, children: /* @__PURE__ */ jsx79(QuestionMarkCircle, {}) }) });
|
|
5628
5665
|
};
|
|
5629
5666
|
var ReviewRenderer_default = ReviewRenderer2;
|
|
5630
5667
|
|
|
@@ -5646,19 +5683,19 @@ var search_messages_default = defineMessages13({
|
|
|
5646
5683
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
5647
5684
|
import { useIntl as useIntl17 } from "react-intl";
|
|
5648
5685
|
import { Link as DSLink2 } from "@transferwise/components";
|
|
5649
|
-
import { jsx as
|
|
5686
|
+
import { jsx as jsx80, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5650
5687
|
function ErrorResult({ state }) {
|
|
5651
5688
|
const intl = useIntl17();
|
|
5652
5689
|
return /* @__PURE__ */ jsxs23("p", { className: "m-t-2", children: [
|
|
5653
5690
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
5654
5691
|
"\xA0",
|
|
5655
|
-
/* @__PURE__ */
|
|
5692
|
+
/* @__PURE__ */ jsx80(DSLink2, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
|
|
5656
5693
|
] });
|
|
5657
5694
|
}
|
|
5658
5695
|
|
|
5659
5696
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
5660
5697
|
import { Search as Search2 } from "@transferwise/icons";
|
|
5661
|
-
import { Fragment as Fragment11, jsx as
|
|
5698
|
+
import { Fragment as Fragment11, jsx as jsx81, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5662
5699
|
function BlockSearchRendererComponent({
|
|
5663
5700
|
id,
|
|
5664
5701
|
hint,
|
|
@@ -5676,7 +5713,7 @@ function BlockSearchRendererComponent({
|
|
|
5676
5713
|
const [hasSearched, setHasSearched] = useState16(false);
|
|
5677
5714
|
const { formatMessage } = useIntl18();
|
|
5678
5715
|
return /* @__PURE__ */ jsxs24("div", { className: getMargin(margin), children: [
|
|
5679
|
-
/* @__PURE__ */
|
|
5716
|
+
/* @__PURE__ */ jsx81(
|
|
5680
5717
|
FieldInput_default,
|
|
5681
5718
|
{
|
|
5682
5719
|
id,
|
|
@@ -5687,7 +5724,7 @@ function BlockSearchRendererComponent({
|
|
|
5687
5724
|
features,
|
|
5688
5725
|
control,
|
|
5689
5726
|
tags,
|
|
5690
|
-
children: /* @__PURE__ */
|
|
5727
|
+
children: /* @__PURE__ */ jsx81(InputGroup4, { addonStart: { content: /* @__PURE__ */ jsx81(Search2, { size: 24 }) }, children: /* @__PURE__ */ jsx81(
|
|
5691
5728
|
Input5,
|
|
5692
5729
|
{
|
|
5693
5730
|
id,
|
|
@@ -5707,7 +5744,7 @@ function BlockSearchRendererComponent({
|
|
|
5707
5744
|
) })
|
|
5708
5745
|
}
|
|
5709
5746
|
),
|
|
5710
|
-
isLoading ? /* @__PURE__ */
|
|
5747
|
+
isLoading ? /* @__PURE__ */ jsx81("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx81(SearchResultContent, { state, trackEvent })
|
|
5711
5748
|
] });
|
|
5712
5749
|
}
|
|
5713
5750
|
function SearchResultContent({
|
|
@@ -5716,9 +5753,9 @@ function SearchResultContent({
|
|
|
5716
5753
|
}) {
|
|
5717
5754
|
switch (state.type) {
|
|
5718
5755
|
case "error":
|
|
5719
|
-
return /* @__PURE__ */
|
|
5756
|
+
return /* @__PURE__ */ jsx81(ErrorResult, { state });
|
|
5720
5757
|
case "results":
|
|
5721
|
-
return /* @__PURE__ */
|
|
5758
|
+
return /* @__PURE__ */ jsx81(SearchResults, { state, trackEvent });
|
|
5722
5759
|
case "layout":
|
|
5723
5760
|
return /* @__PURE__ */ jsxs24(Fragment11, { children: [
|
|
5724
5761
|
" ",
|
|
@@ -5726,28 +5763,28 @@ function SearchResultContent({
|
|
|
5726
5763
|
" "
|
|
5727
5764
|
] });
|
|
5728
5765
|
case "noResults":
|
|
5729
|
-
return /* @__PURE__ */
|
|
5766
|
+
return /* @__PURE__ */ jsx81(EmptySearchResult, { state });
|
|
5730
5767
|
case "pending":
|
|
5731
5768
|
default:
|
|
5732
5769
|
return null;
|
|
5733
5770
|
}
|
|
5734
5771
|
}
|
|
5735
5772
|
function EmptySearchResult({ state }) {
|
|
5736
|
-
return /* @__PURE__ */
|
|
5773
|
+
return /* @__PURE__ */ jsx81(Markdown6, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
5737
5774
|
}
|
|
5738
5775
|
function SearchResults({
|
|
5739
5776
|
state,
|
|
5740
5777
|
trackEvent
|
|
5741
5778
|
}) {
|
|
5742
|
-
return /* @__PURE__ */
|
|
5779
|
+
return /* @__PURE__ */ jsx81(List, { children: state.results.map((result) => {
|
|
5743
5780
|
const { media } = result;
|
|
5744
|
-
return /* @__PURE__ */
|
|
5781
|
+
return /* @__PURE__ */ jsx81(
|
|
5745
5782
|
ListItem11,
|
|
5746
5783
|
{
|
|
5747
5784
|
title: result.title,
|
|
5748
5785
|
subtitle: result.description,
|
|
5749
|
-
media: media ? /* @__PURE__ */
|
|
5750
|
-
control: /* @__PURE__ */
|
|
5786
|
+
media: media ? /* @__PURE__ */ jsx81(OptionMedia, { media, preferAvatar: false }) : void 0,
|
|
5787
|
+
control: /* @__PURE__ */ jsx81(
|
|
5751
5788
|
ListItem11.Navigation,
|
|
5752
5789
|
{
|
|
5753
5790
|
onClick: () => {
|
|
@@ -5770,7 +5807,7 @@ import { Markdown as Markdown7, Typeahead } from "@transferwise/components";
|
|
|
5770
5807
|
import { Search as Search3 } from "@transferwise/icons";
|
|
5771
5808
|
import { useState as useState17 } from "react";
|
|
5772
5809
|
import { useIntl as useIntl19 } from "react-intl";
|
|
5773
|
-
import { jsx as
|
|
5810
|
+
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
5774
5811
|
function InlineSearchRenderer({
|
|
5775
5812
|
id,
|
|
5776
5813
|
hint,
|
|
@@ -5786,7 +5823,7 @@ function InlineSearchRenderer({
|
|
|
5786
5823
|
}) {
|
|
5787
5824
|
const [hasSearched, setHasSearched] = useState17(false);
|
|
5788
5825
|
const intl = useIntl19();
|
|
5789
|
-
return /* @__PURE__ */
|
|
5826
|
+
return /* @__PURE__ */ jsx82("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx82(
|
|
5790
5827
|
FieldInput_default,
|
|
5791
5828
|
{
|
|
5792
5829
|
id,
|
|
@@ -5797,7 +5834,7 @@ function InlineSearchRenderer({
|
|
|
5797
5834
|
features,
|
|
5798
5835
|
control,
|
|
5799
5836
|
tags,
|
|
5800
|
-
children: /* @__PURE__ */
|
|
5837
|
+
children: /* @__PURE__ */ jsx82(
|
|
5801
5838
|
Typeahead,
|
|
5802
5839
|
{
|
|
5803
5840
|
id: "typeahead-input-id",
|
|
@@ -5806,10 +5843,10 @@ function InlineSearchRenderer({
|
|
|
5806
5843
|
size: "md",
|
|
5807
5844
|
placeholder: hint,
|
|
5808
5845
|
maxHeight: 100,
|
|
5809
|
-
footer: /* @__PURE__ */
|
|
5846
|
+
footer: /* @__PURE__ */ jsx82(TypeaheadFooter, { state, isLoading }),
|
|
5810
5847
|
multiple: false,
|
|
5811
5848
|
clearable: false,
|
|
5812
|
-
addon: /* @__PURE__ */
|
|
5849
|
+
addon: /* @__PURE__ */ jsx82(Search3, { size: 24 }),
|
|
5813
5850
|
options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
|
|
5814
5851
|
minQueryLength: 1,
|
|
5815
5852
|
onChange: (values) => {
|
|
@@ -5848,31 +5885,31 @@ function mapResultToTypeaheadOption(result) {
|
|
|
5848
5885
|
function TypeaheadFooter({ state, isLoading }) {
|
|
5849
5886
|
const { formatMessage } = useIntl19();
|
|
5850
5887
|
if (state.type === "layout") {
|
|
5851
|
-
return /* @__PURE__ */
|
|
5888
|
+
return /* @__PURE__ */ jsx82("div", { className: "m-x-1 m-y-1", children: state.layout });
|
|
5852
5889
|
}
|
|
5853
5890
|
if (state.type === "noResults") {
|
|
5854
|
-
return /* @__PURE__ */
|
|
5891
|
+
return /* @__PURE__ */ jsx82(Markdown7, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
5855
5892
|
}
|
|
5856
5893
|
if (state.type === "error") {
|
|
5857
|
-
return /* @__PURE__ */
|
|
5894
|
+
return /* @__PURE__ */ jsx82("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx82(ErrorResult, { state }) });
|
|
5858
5895
|
}
|
|
5859
5896
|
if (state.type === "pending" || isLoading) {
|
|
5860
|
-
return /* @__PURE__ */
|
|
5897
|
+
return /* @__PURE__ */ jsx82("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
|
|
5861
5898
|
}
|
|
5862
5899
|
return null;
|
|
5863
5900
|
}
|
|
5864
5901
|
var InlineSearchRendererComponent_default = InlineSearchRenderer;
|
|
5865
5902
|
|
|
5866
5903
|
// ../renderers/src/SearchRenderer/SearchRenderer.tsx
|
|
5867
|
-
import { jsx as
|
|
5904
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
5868
5905
|
var SearchRenderer = {
|
|
5869
5906
|
canRenderType: "search",
|
|
5870
|
-
render: (props) => props.control === "inline" ? /* @__PURE__ */
|
|
5907
|
+
render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx83(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx83(BlockSearchRendererComponent_default, __spreadValues({}, props))
|
|
5871
5908
|
};
|
|
5872
5909
|
var SearchRenderer_default = SearchRenderer;
|
|
5873
5910
|
|
|
5874
5911
|
// ../renderers/src/SectionRenderer.tsx
|
|
5875
|
-
var
|
|
5912
|
+
var import_classnames29 = __toESM(require_classnames());
|
|
5876
5913
|
import { Header as Header7 } from "@transferwise/components";
|
|
5877
5914
|
|
|
5878
5915
|
// ../renderers/src/utils/getHeaderAction.tsx
|
|
@@ -5897,16 +5934,16 @@ var getHeaderAction2 = (callToAction) => {
|
|
|
5897
5934
|
};
|
|
5898
5935
|
|
|
5899
5936
|
// ../renderers/src/SectionRenderer.tsx
|
|
5900
|
-
import { jsx as
|
|
5937
|
+
import { jsx as jsx84, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5901
5938
|
var SectionRenderer = {
|
|
5902
5939
|
canRenderType: "section",
|
|
5903
5940
|
render: ({ children, callToAction, margin, title, control, tags }) => {
|
|
5904
5941
|
return /* @__PURE__ */ jsxs25(
|
|
5905
5942
|
"section",
|
|
5906
5943
|
{
|
|
5907
|
-
className: (0,
|
|
5944
|
+
className: (0, import_classnames29.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
|
|
5908
5945
|
children: [
|
|
5909
|
-
(title || callToAction) && /* @__PURE__ */
|
|
5946
|
+
(title || callToAction) && /* @__PURE__ */ jsx84(Header7, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
|
|
5910
5947
|
children
|
|
5911
5948
|
]
|
|
5912
5949
|
}
|
|
@@ -5917,7 +5954,7 @@ var SectionRenderer_default = SectionRenderer;
|
|
|
5917
5954
|
|
|
5918
5955
|
// ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
5919
5956
|
import { RadioGroup } from "@transferwise/components";
|
|
5920
|
-
import { Fragment as Fragment12, jsx as
|
|
5957
|
+
import { Fragment as Fragment12, jsx as jsx85, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5921
5958
|
function RadioInputRendererComponent(props) {
|
|
5922
5959
|
const {
|
|
5923
5960
|
id,
|
|
@@ -5935,7 +5972,7 @@ function RadioInputRendererComponent(props) {
|
|
|
5935
5972
|
onSelect
|
|
5936
5973
|
} = props;
|
|
5937
5974
|
return /* @__PURE__ */ jsxs26(Fragment12, { children: [
|
|
5938
|
-
/* @__PURE__ */
|
|
5975
|
+
/* @__PURE__ */ jsx85(
|
|
5939
5976
|
FieldInput_default,
|
|
5940
5977
|
{
|
|
5941
5978
|
id,
|
|
@@ -5946,7 +5983,7 @@ function RadioInputRendererComponent(props) {
|
|
|
5946
5983
|
features,
|
|
5947
5984
|
control,
|
|
5948
5985
|
tags,
|
|
5949
|
-
children: /* @__PURE__ */
|
|
5986
|
+
children: /* @__PURE__ */ jsx85("span", { children: /* @__PURE__ */ jsx85(
|
|
5950
5987
|
RadioGroup,
|
|
5951
5988
|
{
|
|
5952
5989
|
name: id,
|
|
@@ -5955,7 +5992,7 @@ function RadioInputRendererComponent(props) {
|
|
|
5955
5992
|
value: index,
|
|
5956
5993
|
secondary: option.description,
|
|
5957
5994
|
disabled: option.disabled || disabled,
|
|
5958
|
-
avatar: /* @__PURE__ */
|
|
5995
|
+
avatar: /* @__PURE__ */ jsx85(OptionMedia, { media: option.media, preferAvatar: false })
|
|
5959
5996
|
})),
|
|
5960
5997
|
selectedValue: selectedIndex != null ? selectedIndex : void 0,
|
|
5961
5998
|
onChange: onSelect
|
|
@@ -5971,7 +6008,7 @@ function RadioInputRendererComponent(props) {
|
|
|
5971
6008
|
// ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
5972
6009
|
import { Tabs } from "@transferwise/components";
|
|
5973
6010
|
import { useEffect as useEffect12 } from "react";
|
|
5974
|
-
import { Fragment as Fragment13, jsx as
|
|
6011
|
+
import { Fragment as Fragment13, jsx as jsx86, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5975
6012
|
function TabInputRendererComponent(props) {
|
|
5976
6013
|
const {
|
|
5977
6014
|
id,
|
|
@@ -5994,7 +6031,7 @@ function TabInputRendererComponent(props) {
|
|
|
5994
6031
|
}
|
|
5995
6032
|
}, [selectedIndex, onSelect, options.length]);
|
|
5996
6033
|
return /* @__PURE__ */ jsxs27(Fragment13, { children: [
|
|
5997
|
-
/* @__PURE__ */
|
|
6034
|
+
/* @__PURE__ */ jsx86(
|
|
5998
6035
|
FieldInput_default,
|
|
5999
6036
|
{
|
|
6000
6037
|
id,
|
|
@@ -6005,7 +6042,7 @@ function TabInputRendererComponent(props) {
|
|
|
6005
6042
|
features,
|
|
6006
6043
|
control,
|
|
6007
6044
|
tags,
|
|
6008
|
-
children: /* @__PURE__ */
|
|
6045
|
+
children: /* @__PURE__ */ jsx86(
|
|
6009
6046
|
Tabs,
|
|
6010
6047
|
{
|
|
6011
6048
|
name: id,
|
|
@@ -6014,7 +6051,7 @@ function TabInputRendererComponent(props) {
|
|
|
6014
6051
|
title: option.title,
|
|
6015
6052
|
// if we pass null, we get some props-types console errors
|
|
6016
6053
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
6017
|
-
content: /* @__PURE__ */
|
|
6054
|
+
content: /* @__PURE__ */ jsx86(Fragment13, {}),
|
|
6018
6055
|
disabled: option.disabled || disabled
|
|
6019
6056
|
})),
|
|
6020
6057
|
onTabSelect: onSelect
|
|
@@ -6029,7 +6066,7 @@ var isValidIndex2 = (index, options) => index !== null && index >= 0 && index <
|
|
|
6029
6066
|
|
|
6030
6067
|
// ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
6031
6068
|
import { SelectInput as SelectInput2, SelectInputOptionContent as SelectInputOptionContent2 } from "@transferwise/components";
|
|
6032
|
-
import { Fragment as Fragment14, jsx as
|
|
6069
|
+
import { Fragment as Fragment14, jsx as jsx87, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6033
6070
|
function SelectInputRendererComponent(props) {
|
|
6034
6071
|
const {
|
|
6035
6072
|
id,
|
|
@@ -6072,13 +6109,13 @@ function SelectInputRendererComponent(props) {
|
|
|
6072
6109
|
} : {
|
|
6073
6110
|
title: option.title,
|
|
6074
6111
|
description: option.description,
|
|
6075
|
-
icon: /* @__PURE__ */
|
|
6112
|
+
icon: /* @__PURE__ */ jsx87(OptionMedia, { media: option.media, preferAvatar: false })
|
|
6076
6113
|
};
|
|
6077
|
-
return /* @__PURE__ */
|
|
6114
|
+
return /* @__PURE__ */ jsx87(SelectInputOptionContent2, __spreadValues({}, contentProps));
|
|
6078
6115
|
};
|
|
6079
6116
|
const extraProps = { autoComplete };
|
|
6080
6117
|
return /* @__PURE__ */ jsxs28(Fragment14, { children: [
|
|
6081
|
-
/* @__PURE__ */
|
|
6118
|
+
/* @__PURE__ */ jsx87(
|
|
6082
6119
|
FieldInput_default,
|
|
6083
6120
|
{
|
|
6084
6121
|
id,
|
|
@@ -6089,7 +6126,7 @@ function SelectInputRendererComponent(props) {
|
|
|
6089
6126
|
features,
|
|
6090
6127
|
control,
|
|
6091
6128
|
tags,
|
|
6092
|
-
children: /* @__PURE__ */
|
|
6129
|
+
children: /* @__PURE__ */ jsx87(
|
|
6093
6130
|
SelectInput2,
|
|
6094
6131
|
__spreadValues({
|
|
6095
6132
|
name: id,
|
|
@@ -6112,7 +6149,7 @@ function SelectInputRendererComponent(props) {
|
|
|
6112
6149
|
// ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
|
|
6113
6150
|
import { useEffect as useEffect13 } from "react";
|
|
6114
6151
|
import { SegmentedControl } from "@transferwise/components";
|
|
6115
|
-
import { Fragment as Fragment15, jsx as
|
|
6152
|
+
import { Fragment as Fragment15, jsx as jsx88, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6116
6153
|
function SegmentedInputRendererComponent(props) {
|
|
6117
6154
|
const {
|
|
6118
6155
|
id,
|
|
@@ -6134,7 +6171,7 @@ function SegmentedInputRendererComponent(props) {
|
|
|
6134
6171
|
}
|
|
6135
6172
|
}, [selectedIndex, onSelect, options.length]);
|
|
6136
6173
|
return /* @__PURE__ */ jsxs29(Fragment15, { children: [
|
|
6137
|
-
/* @__PURE__ */
|
|
6174
|
+
/* @__PURE__ */ jsx88(
|
|
6138
6175
|
FieldInput_default,
|
|
6139
6176
|
{
|
|
6140
6177
|
id,
|
|
@@ -6145,7 +6182,7 @@ function SegmentedInputRendererComponent(props) {
|
|
|
6145
6182
|
features,
|
|
6146
6183
|
control,
|
|
6147
6184
|
tags,
|
|
6148
|
-
children: /* @__PURE__ */
|
|
6185
|
+
children: /* @__PURE__ */ jsx88(
|
|
6149
6186
|
SegmentedControl,
|
|
6150
6187
|
{
|
|
6151
6188
|
name: `${id}-segmented-control`,
|
|
@@ -6162,14 +6199,14 @@ function SegmentedInputRendererComponent(props) {
|
|
|
6162
6199
|
)
|
|
6163
6200
|
}
|
|
6164
6201
|
),
|
|
6165
|
-
/* @__PURE__ */
|
|
6202
|
+
/* @__PURE__ */ jsx88("div", { id: `${id}-children`, children })
|
|
6166
6203
|
] });
|
|
6167
6204
|
}
|
|
6168
6205
|
var isValidIndex3 = (index, options) => index !== null && index >= 0 && index < options;
|
|
6169
6206
|
|
|
6170
6207
|
// ../renderers/src/SelectInputRenderer/RadioItemRendererComponent.tsx
|
|
6171
6208
|
import { Header as Header8, InlineAlert as InlineAlert4, List as List2, ListItem as ListItem12 } from "@transferwise/components";
|
|
6172
|
-
import { jsx as
|
|
6209
|
+
import { jsx as jsx89, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6173
6210
|
function RadioItemRendererComponent(props) {
|
|
6174
6211
|
const {
|
|
6175
6212
|
id,
|
|
@@ -6186,21 +6223,21 @@ function RadioItemRendererComponent(props) {
|
|
|
6186
6223
|
} = props;
|
|
6187
6224
|
const { ref } = useScrollToError(validationState, features);
|
|
6188
6225
|
return /* @__PURE__ */ jsxs30("div", { ref, className: controlAndTagsToCSSClass(props), children: [
|
|
6189
|
-
rootTitle && /* @__PURE__ */
|
|
6226
|
+
rootTitle && /* @__PURE__ */ jsx89(
|
|
6190
6227
|
Header8,
|
|
6191
6228
|
{
|
|
6192
6229
|
as: "h2",
|
|
6193
|
-
title: help ? /* @__PURE__ */
|
|
6230
|
+
title: help ? /* @__PURE__ */ jsx89(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
|
|
6194
6231
|
}
|
|
6195
6232
|
),
|
|
6196
|
-
rootDescription && /* @__PURE__ */
|
|
6197
|
-
/* @__PURE__ */
|
|
6198
|
-
({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */
|
|
6233
|
+
rootDescription && /* @__PURE__ */ jsx89("p", { children: rootDescription }),
|
|
6234
|
+
/* @__PURE__ */ jsx89(List2, { children: options.map(
|
|
6235
|
+
({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ jsx89(
|
|
6199
6236
|
ListItem12,
|
|
6200
6237
|
__spreadValues({
|
|
6201
6238
|
title,
|
|
6202
6239
|
subtitle: description,
|
|
6203
|
-
control: /* @__PURE__ */
|
|
6240
|
+
control: /* @__PURE__ */ jsx89(
|
|
6204
6241
|
ListItem12.Radio,
|
|
6205
6242
|
{
|
|
6206
6243
|
name: title,
|
|
@@ -6216,50 +6253,50 @@ function RadioItemRendererComponent(props) {
|
|
|
6216
6253
|
title
|
|
6217
6254
|
)
|
|
6218
6255
|
) }, `${id}-${selectedIndex}`),
|
|
6219
|
-
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */
|
|
6256
|
+
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx89(InlineAlert4, { type: "negative", children: validationState.message }),
|
|
6220
6257
|
children
|
|
6221
6258
|
] });
|
|
6222
6259
|
}
|
|
6223
6260
|
|
|
6224
6261
|
// ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
|
|
6225
|
-
import { jsx as
|
|
6262
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
6226
6263
|
var SelectInputRenderer = {
|
|
6227
6264
|
canRenderType: "input-select",
|
|
6228
6265
|
render: (props) => {
|
|
6229
6266
|
switch (props.control) {
|
|
6230
6267
|
case "radio":
|
|
6231
|
-
return /* @__PURE__ */
|
|
6268
|
+
return /* @__PURE__ */ jsx90(RadioInputRendererComponent, __spreadValues({}, props));
|
|
6232
6269
|
case "radio-item":
|
|
6233
|
-
return /* @__PURE__ */
|
|
6270
|
+
return /* @__PURE__ */ jsx90(RadioItemRendererComponent, __spreadValues({}, props));
|
|
6234
6271
|
case "tab":
|
|
6235
|
-
return props.options.length > 3 ? /* @__PURE__ */
|
|
6272
|
+
return props.options.length > 3 ? /* @__PURE__ */ jsx90(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx90(TabInputRendererComponent, __spreadValues({}, props));
|
|
6236
6273
|
case "segmented":
|
|
6237
|
-
return props.options.length > 3 ? /* @__PURE__ */
|
|
6274
|
+
return props.options.length > 3 ? /* @__PURE__ */ jsx90(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx90(SegmentedInputRendererComponent, __spreadValues({}, props));
|
|
6238
6275
|
case "select":
|
|
6239
6276
|
default:
|
|
6240
|
-
return /* @__PURE__ */
|
|
6277
|
+
return /* @__PURE__ */ jsx90(SelectInputRendererComponent, __spreadValues({}, props));
|
|
6241
6278
|
}
|
|
6242
6279
|
}
|
|
6243
6280
|
};
|
|
6244
6281
|
var SelectInputRenderer_default = SelectInputRenderer;
|
|
6245
6282
|
|
|
6246
6283
|
// ../renderers/src/StatusListRenderer.tsx
|
|
6247
|
-
var
|
|
6284
|
+
var import_classnames30 = __toESM(require_classnames());
|
|
6248
6285
|
import { AvatarView as AvatarView4, Header as Header9, ListItem as ListItem13 } from "@transferwise/components";
|
|
6249
|
-
import { jsx as
|
|
6286
|
+
import { jsx as jsx91, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
6250
6287
|
var StatusListRenderer = {
|
|
6251
6288
|
canRenderType: "status-list",
|
|
6252
|
-
render: ({ margin, items, title, control, tags }) => /* @__PURE__ */ jsxs31("div", { className: (0,
|
|
6253
|
-
title ? /* @__PURE__ */
|
|
6289
|
+
render: ({ margin, items, title, control, tags }) => /* @__PURE__ */ jsxs31("div", { className: (0, import_classnames30.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
6290
|
+
title ? /* @__PURE__ */ jsx91(Header9, { title }) : null,
|
|
6254
6291
|
items.map((item) => {
|
|
6255
6292
|
const { callToAction, description, title: itemTitle } = item;
|
|
6256
|
-
return /* @__PURE__ */
|
|
6293
|
+
return /* @__PURE__ */ jsx91(
|
|
6257
6294
|
ListItem13,
|
|
6258
6295
|
{
|
|
6259
6296
|
title: itemTitle,
|
|
6260
6297
|
subtitle: description,
|
|
6261
|
-
media: /* @__PURE__ */
|
|
6262
|
-
additionalInfo: callToAction ? /* @__PURE__ */
|
|
6298
|
+
media: /* @__PURE__ */ jsx91(StatusListItemMedia, __spreadValues({}, item)),
|
|
6299
|
+
additionalInfo: callToAction ? /* @__PURE__ */ jsx91(
|
|
6263
6300
|
ListItem13.AdditionalInfo,
|
|
6264
6301
|
{
|
|
6265
6302
|
action: __spreadValues({
|
|
@@ -6278,10 +6315,10 @@ var StatusListItemMedia = ({ icon, status }) => {
|
|
|
6278
6315
|
return void 0;
|
|
6279
6316
|
}
|
|
6280
6317
|
if ("name" in icon) {
|
|
6281
|
-
return /* @__PURE__ */
|
|
6318
|
+
return /* @__PURE__ */ jsx91(AvatarView4, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ jsx91(DynamicIcon_default, { name: icon.name }) });
|
|
6282
6319
|
}
|
|
6283
6320
|
if ("text" in icon) {
|
|
6284
|
-
return /* @__PURE__ */
|
|
6321
|
+
return /* @__PURE__ */ jsx91(AvatarView4, { badge: { status: mapStatus(status) }, children: icon.text });
|
|
6285
6322
|
}
|
|
6286
6323
|
return void 0;
|
|
6287
6324
|
};
|
|
@@ -6298,7 +6335,7 @@ var mapStatus = (status) => {
|
|
|
6298
6335
|
var StatusListRenderer_default = StatusListRenderer;
|
|
6299
6336
|
|
|
6300
6337
|
// ../renderers/src/step/SplashCelebrationStepRenderer.tsx
|
|
6301
|
-
var
|
|
6338
|
+
var import_classnames31 = __toESM(require_classnames());
|
|
6302
6339
|
|
|
6303
6340
|
// ../renderers/src/utils/useCustomTheme.ts
|
|
6304
6341
|
import { useTheme } from "@wise/components-theming";
|
|
@@ -6320,12 +6357,12 @@ var useCustomTheme = (theme, trackEvent) => {
|
|
|
6320
6357
|
|
|
6321
6358
|
// ../renderers/src/step/StepHeader.tsx
|
|
6322
6359
|
import { Title as Title2 } from "@transferwise/components";
|
|
6323
|
-
import { Fragment as Fragment16, jsx as
|
|
6360
|
+
import { Fragment as Fragment16, jsx as jsx92, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6324
6361
|
var StepHeader = ({ title, description, tags }) => {
|
|
6325
6362
|
const { titleType, alignmentClassName } = getHeaderStyle(tags);
|
|
6326
6363
|
return /* @__PURE__ */ jsxs32(Fragment16, { children: [
|
|
6327
|
-
title ? /* @__PURE__ */
|
|
6328
|
-
description ? /* @__PURE__ */
|
|
6364
|
+
title ? /* @__PURE__ */ jsx92(Title2, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
|
|
6365
|
+
description ? /* @__PURE__ */ jsx92("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
|
|
6329
6366
|
] });
|
|
6330
6367
|
};
|
|
6331
6368
|
var getHeaderStyle = (tags) => {
|
|
@@ -6351,23 +6388,23 @@ var back_messages_default = defineMessages14({
|
|
|
6351
6388
|
});
|
|
6352
6389
|
|
|
6353
6390
|
// ../renderers/src/step/topbar/BackButton.tsx
|
|
6354
|
-
import { jsx as
|
|
6391
|
+
import { jsx as jsx93, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6355
6392
|
function BackButton({ title, onClick }) {
|
|
6356
6393
|
const { formatMessage } = useIntl20();
|
|
6357
6394
|
return /* @__PURE__ */ jsxs33(IconButton2, { className: "df-back-button", priority: "tertiary", onClick, children: [
|
|
6358
|
-
/* @__PURE__ */
|
|
6359
|
-
/* @__PURE__ */
|
|
6395
|
+
/* @__PURE__ */ jsx93("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
|
|
6396
|
+
/* @__PURE__ */ jsx93(ArrowLeft, {})
|
|
6360
6397
|
] });
|
|
6361
6398
|
}
|
|
6362
6399
|
|
|
6363
6400
|
// ../renderers/src/step/topbar/Toolbar.tsx
|
|
6364
6401
|
import { Button as Button9, IconButton as IconButton3 } from "@transferwise/components";
|
|
6365
|
-
import { jsx as
|
|
6402
|
+
import { jsx as jsx94, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6366
6403
|
var Toolbar = ({ items }) => {
|
|
6367
|
-
return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */
|
|
6404
|
+
return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ jsx94("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ jsx94(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
|
|
6368
6405
|
};
|
|
6369
6406
|
function ToolbarButton(props) {
|
|
6370
|
-
return prefersMedia(props.control) ? /* @__PURE__ */
|
|
6407
|
+
return prefersMedia(props.control) ? /* @__PURE__ */ jsx94(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ jsx94(TextToolbarButton, __spreadValues({}, props));
|
|
6371
6408
|
}
|
|
6372
6409
|
function MediaToolbarButton(props) {
|
|
6373
6410
|
var _a;
|
|
@@ -6384,7 +6421,7 @@ function MediaToolbarButton(props) {
|
|
|
6384
6421
|
type,
|
|
6385
6422
|
onClick,
|
|
6386
6423
|
children: [
|
|
6387
|
-
accessibilityDescription ? /* @__PURE__ */
|
|
6424
|
+
accessibilityDescription ? /* @__PURE__ */ jsx94("span", { className: "sr-only", children: accessibilityDescription }) : null,
|
|
6388
6425
|
media ? (_a = getAddonStartMedia(media)) == null ? void 0 : _a.value : null
|
|
6389
6426
|
]
|
|
6390
6427
|
}
|
|
@@ -6395,7 +6432,7 @@ function TextToolbarButton(props) {
|
|
|
6395
6432
|
const addonStart = media ? getAddonStartMedia(media) : void 0;
|
|
6396
6433
|
const priority = getPriority2(control);
|
|
6397
6434
|
const sentiment = getSentiment2(context);
|
|
6398
|
-
return /* @__PURE__ */
|
|
6435
|
+
return /* @__PURE__ */ jsx94(
|
|
6399
6436
|
Button9,
|
|
6400
6437
|
{
|
|
6401
6438
|
v2: true,
|
|
@@ -6425,18 +6462,18 @@ var getIconButtonPriority = (control) => {
|
|
|
6425
6462
|
};
|
|
6426
6463
|
|
|
6427
6464
|
// ../renderers/src/step/topbar/TopBar.tsx
|
|
6428
|
-
import { jsx as
|
|
6465
|
+
import { jsx as jsx95, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
6429
6466
|
function TopBar({ back, toolbar, tags }) {
|
|
6430
6467
|
const isBackAllowed = !(tags == null ? void 0 : tags.includes("non-dismissible"));
|
|
6431
6468
|
const backCTA = isBackAllowed ? back : void 0;
|
|
6432
6469
|
return backCTA || toolbar ? /* @__PURE__ */ jsxs35("div", { className: "d-flex m-b-2", children: [
|
|
6433
|
-
backCTA ? /* @__PURE__ */
|
|
6434
|
-
toolbar ? /* @__PURE__ */
|
|
6470
|
+
backCTA ? /* @__PURE__ */ jsx95(BackButton, __spreadValues({}, backCTA)) : null,
|
|
6471
|
+
toolbar ? /* @__PURE__ */ jsx95(Toolbar, __spreadValues({}, toolbar)) : null
|
|
6435
6472
|
] }) : null;
|
|
6436
6473
|
}
|
|
6437
6474
|
|
|
6438
6475
|
// ../renderers/src/step/SplashCelebrationStepRenderer.tsx
|
|
6439
|
-
import { jsx as
|
|
6476
|
+
import { jsx as jsx96, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
6440
6477
|
var SplashCelebrationStepRenderer = {
|
|
6441
6478
|
canRenderType: "step",
|
|
6442
6479
|
canRender: ({ control }) => control === "splash-celebration",
|
|
@@ -6448,20 +6485,20 @@ function SplashCelebrationStepRendererComponent(props) {
|
|
|
6448
6485
|
return /* @__PURE__ */ jsxs36(
|
|
6449
6486
|
"div",
|
|
6450
6487
|
{
|
|
6451
|
-
className: (0,
|
|
6488
|
+
className: (0, import_classnames31.default)("splash-screen", "m-t-5", controlAndTagsToCSSClass({ control, tags })),
|
|
6452
6489
|
children: [
|
|
6453
|
-
/* @__PURE__ */
|
|
6454
|
-
title || description ? /* @__PURE__ */
|
|
6490
|
+
/* @__PURE__ */ jsx96(TopBar, { back, toolbar, tags }),
|
|
6491
|
+
title || description ? /* @__PURE__ */ jsx96("div", { className: "m-b-4", children: /* @__PURE__ */ jsx96(StepHeader, { title, description, tags }) }) : void 0,
|
|
6455
6492
|
children,
|
|
6456
|
-
/* @__PURE__ */
|
|
6493
|
+
/* @__PURE__ */ jsx96(StepFooter, { footer, tags })
|
|
6457
6494
|
]
|
|
6458
6495
|
}
|
|
6459
6496
|
);
|
|
6460
6497
|
}
|
|
6461
6498
|
|
|
6462
6499
|
// ../renderers/src/step/SplashStepRenderer.tsx
|
|
6463
|
-
var
|
|
6464
|
-
import { jsx as
|
|
6500
|
+
var import_classnames32 = __toESM(require_classnames());
|
|
6501
|
+
import { jsx as jsx97, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
6465
6502
|
var SplashStepRenderer = {
|
|
6466
6503
|
canRenderType: "step",
|
|
6467
6504
|
canRender: ({ control }) => control === "splash",
|
|
@@ -6472,12 +6509,12 @@ function SplashStepRendererComponent(props) {
|
|
|
6472
6509
|
return /* @__PURE__ */ jsxs37(
|
|
6473
6510
|
"div",
|
|
6474
6511
|
{
|
|
6475
|
-
className: (0,
|
|
6512
|
+
className: (0, import_classnames32.default)("splash-screen", "m-t-5", controlAndTagsToCSSClass({ control, tags })),
|
|
6476
6513
|
children: [
|
|
6477
|
-
/* @__PURE__ */
|
|
6478
|
-
title || description ? /* @__PURE__ */
|
|
6514
|
+
/* @__PURE__ */ jsx97(TopBar, { back, toolbar, tags }),
|
|
6515
|
+
title || description ? /* @__PURE__ */ jsx97("div", { className: "m-b-4", children: /* @__PURE__ */ jsx97(StepHeader, { title, description, tags }) }) : void 0,
|
|
6479
6516
|
children,
|
|
6480
|
-
/* @__PURE__ */
|
|
6517
|
+
/* @__PURE__ */ jsx97(StepFooter, { footer, tags })
|
|
6481
6518
|
]
|
|
6482
6519
|
}
|
|
6483
6520
|
);
|
|
@@ -6485,7 +6522,7 @@ function SplashStepRendererComponent(props) {
|
|
|
6485
6522
|
|
|
6486
6523
|
// ../renderers/src/step/StepRenderer.tsx
|
|
6487
6524
|
import { Alert } from "@transferwise/components";
|
|
6488
|
-
import { jsx as
|
|
6525
|
+
import { jsx as jsx98, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
6489
6526
|
var StepRenderer = {
|
|
6490
6527
|
canRenderType: "step",
|
|
6491
6528
|
render: StepRendererComponent
|
|
@@ -6493,38 +6530,38 @@ var StepRenderer = {
|
|
|
6493
6530
|
function StepRendererComponent(props) {
|
|
6494
6531
|
const { back, description, error, title, children, toolbar, footer, control, tags } = props;
|
|
6495
6532
|
return /* @__PURE__ */ jsxs38("div", { className: controlAndTagsToCSSClass({ control, tags }), children: [
|
|
6496
|
-
/* @__PURE__ */
|
|
6497
|
-
title || description ? /* @__PURE__ */
|
|
6498
|
-
error ? /* @__PURE__ */
|
|
6533
|
+
/* @__PURE__ */ jsx98(TopBar, { back, toolbar, tags }),
|
|
6534
|
+
title || description ? /* @__PURE__ */ jsx98("div", { className: "m-b-4", children: /* @__PURE__ */ jsx98(StepHeader, { title, description, tags }) }) : void 0,
|
|
6535
|
+
error ? /* @__PURE__ */ jsx98(Alert, { type: "negative", className: "m-b-2", message: error }) : null,
|
|
6499
6536
|
children,
|
|
6500
|
-
/* @__PURE__ */
|
|
6537
|
+
/* @__PURE__ */ jsx98(StepFooter, { footer, tags })
|
|
6501
6538
|
] });
|
|
6502
6539
|
}
|
|
6503
6540
|
|
|
6504
6541
|
// ../renderers/src/TabsRenderer.tsx
|
|
6505
|
-
var
|
|
6542
|
+
var import_classnames33 = __toESM(require_classnames());
|
|
6506
6543
|
import { Chips as Chips2, SegmentedControl as SegmentedControl2, Tabs as Tabs2 } from "@transferwise/components";
|
|
6507
6544
|
import { useState as useState18 } from "react";
|
|
6508
|
-
import { jsx as
|
|
6545
|
+
import { jsx as jsx99, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
6509
6546
|
var TabsRenderer = {
|
|
6510
6547
|
canRenderType: "tabs",
|
|
6511
6548
|
render: (props) => {
|
|
6512
6549
|
switch (props.control) {
|
|
6513
6550
|
case "segmented":
|
|
6514
6551
|
if (props.tabs.length > 3) {
|
|
6515
|
-
return /* @__PURE__ */
|
|
6552
|
+
return /* @__PURE__ */ jsx99(TabsRendererComponent, __spreadValues({}, props));
|
|
6516
6553
|
}
|
|
6517
|
-
return /* @__PURE__ */
|
|
6554
|
+
return /* @__PURE__ */ jsx99(SegmentedTabsRendererComponent, __spreadValues({}, props));
|
|
6518
6555
|
case "chips":
|
|
6519
|
-
return /* @__PURE__ */
|
|
6556
|
+
return /* @__PURE__ */ jsx99(ChipsTabsRendererComponent, __spreadValues({}, props));
|
|
6520
6557
|
default:
|
|
6521
|
-
return /* @__PURE__ */
|
|
6558
|
+
return /* @__PURE__ */ jsx99(TabsRendererComponent, __spreadValues({}, props));
|
|
6522
6559
|
}
|
|
6523
6560
|
}
|
|
6524
6561
|
};
|
|
6525
6562
|
function TabsRendererComponent({ uid, margin, tabs, control, tags }) {
|
|
6526
6563
|
const [selectedIndex, setSelectedIndex] = useState18(0);
|
|
6527
|
-
return /* @__PURE__ */
|
|
6564
|
+
return /* @__PURE__ */ jsx99("div", { className: (0, import_classnames33.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: /* @__PURE__ */ jsx99(
|
|
6528
6565
|
Tabs2,
|
|
6529
6566
|
{
|
|
6530
6567
|
name: uid,
|
|
@@ -6545,8 +6582,8 @@ function TabsRendererComponent({ uid, margin, tabs, control, tags }) {
|
|
|
6545
6582
|
function SegmentedTabsRendererComponent({ uid, margin, tabs, control, tags }) {
|
|
6546
6583
|
var _a;
|
|
6547
6584
|
const [selectedIndex, setSelectedIndex] = useState18(0);
|
|
6548
|
-
return /* @__PURE__ */ jsxs39("div", { className: (0,
|
|
6549
|
-
/* @__PURE__ */
|
|
6585
|
+
return /* @__PURE__ */ jsxs39("div", { className: (0, import_classnames33.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
6586
|
+
/* @__PURE__ */ jsx99(
|
|
6550
6587
|
SegmentedControl2,
|
|
6551
6588
|
{
|
|
6552
6589
|
name: uid,
|
|
@@ -6561,14 +6598,14 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs, control, tags }) {
|
|
|
6561
6598
|
onChange: (value) => setSelectedIndex(Number(value))
|
|
6562
6599
|
}
|
|
6563
6600
|
),
|
|
6564
|
-
/* @__PURE__ */
|
|
6601
|
+
/* @__PURE__ */ jsx99("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
6565
6602
|
] });
|
|
6566
6603
|
}
|
|
6567
6604
|
function ChipsTabsRendererComponent({ margin, tabs, control, tags }) {
|
|
6568
6605
|
var _a;
|
|
6569
6606
|
const [selectedIndex, setSelectedIndex] = useState18(0);
|
|
6570
|
-
return /* @__PURE__ */ jsxs39("div", { className: (0,
|
|
6571
|
-
/* @__PURE__ */
|
|
6607
|
+
return /* @__PURE__ */ jsxs39("div", { className: (0, import_classnames33.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
6608
|
+
/* @__PURE__ */ jsx99("div", { className: "chips-container", children: /* @__PURE__ */ jsx99(
|
|
6572
6609
|
Chips2,
|
|
6573
6610
|
{
|
|
6574
6611
|
chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
|
|
@@ -6576,7 +6613,7 @@ function ChipsTabsRendererComponent({ margin, tabs, control, tags }) {
|
|
|
6576
6613
|
onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
|
|
6577
6614
|
}
|
|
6578
6615
|
) }),
|
|
6579
|
-
/* @__PURE__ */
|
|
6616
|
+
/* @__PURE__ */ jsx99("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
6580
6617
|
] });
|
|
6581
6618
|
}
|
|
6582
6619
|
|
|
@@ -6591,7 +6628,8 @@ import {
|
|
|
6591
6628
|
TextArea,
|
|
6592
6629
|
TextareaWithDisplayFormat
|
|
6593
6630
|
} from "@transferwise/components";
|
|
6594
|
-
import
|
|
6631
|
+
import WithDisplayFormatModule from "@transferwise/components/build/WithDisplayFormat/WithDisplayFormat";
|
|
6632
|
+
import { jsx as jsx100 } from "react/jsx-runtime";
|
|
6595
6633
|
var commonKeys = [
|
|
6596
6634
|
"autoComplete",
|
|
6597
6635
|
"autoCapitalize",
|
|
@@ -6606,16 +6644,21 @@ var commonKeys = [
|
|
|
6606
6644
|
"value"
|
|
6607
6645
|
];
|
|
6608
6646
|
function VariableTextInput(inputProps) {
|
|
6609
|
-
const { id, value, control, onChange } = inputProps;
|
|
6647
|
+
const { id, value, control, displayFormat, onChange } = inputProps;
|
|
6610
6648
|
const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
|
|
6649
|
+
if (control === "ssn-input" || displayFormat === "***-***-***" || displayFormat === "***-**-****") {
|
|
6650
|
+
return /* @__PURE__ */ jsx100(SsnInput, __spreadProps(__spreadValues({}, commonProps), { onChange }));
|
|
6651
|
+
}
|
|
6611
6652
|
switch (control) {
|
|
6612
6653
|
case "email":
|
|
6613
|
-
return /* @__PURE__ */
|
|
6654
|
+
return /* @__PURE__ */ jsx100(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
|
|
6614
6655
|
case "password":
|
|
6615
|
-
return /* @__PURE__ */
|
|
6656
|
+
return /* @__PURE__ */ jsx100(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
|
|
6657
|
+
case "ssn-input":
|
|
6658
|
+
return /* @__PURE__ */ jsx100(SsnInput, __spreadProps(__spreadValues({}, commonProps), { onChange }));
|
|
6616
6659
|
case "numeric": {
|
|
6617
6660
|
const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
|
|
6618
|
-
return /* @__PURE__ */
|
|
6661
|
+
return /* @__PURE__ */ jsx100(
|
|
6619
6662
|
TextInput,
|
|
6620
6663
|
__spreadProps(__spreadValues({}, numericProps), {
|
|
6621
6664
|
onChange: (newValue) => {
|
|
@@ -6626,21 +6669,32 @@ function VariableTextInput(inputProps) {
|
|
|
6626
6669
|
);
|
|
6627
6670
|
}
|
|
6628
6671
|
case "phone-number":
|
|
6629
|
-
return /* @__PURE__ */
|
|
6672
|
+
return /* @__PURE__ */ jsx100(PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
|
|
6630
6673
|
default: {
|
|
6631
|
-
return /* @__PURE__ */
|
|
6674
|
+
return /* @__PURE__ */ jsx100(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
|
|
6632
6675
|
}
|
|
6633
6676
|
}
|
|
6634
6677
|
}
|
|
6635
6678
|
function TextInput(props) {
|
|
6636
|
-
const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
|
|
6679
|
+
const _a = props, { control, displayFormat, onChange, type } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange", "type"]);
|
|
6637
6680
|
const InputWithPattern = control === "textarea" ? TextareaWithDisplayFormat : InputWithDisplayFormat;
|
|
6638
6681
|
const InputWithoutPattern = control === "textarea" ? TextArea : Input6;
|
|
6639
|
-
return displayFormat ? /* @__PURE__ */
|
|
6682
|
+
return displayFormat ? /* @__PURE__ */ jsx100(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ jsx100(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { type, onChange: (e) => onChange(e.target.value) }));
|
|
6683
|
+
}
|
|
6684
|
+
function SsnInput(props) {
|
|
6685
|
+
const _a = props, { onChange, type: _type } = _a, commonProps = __objRest(_a, ["onChange", "type"]);
|
|
6686
|
+
return /* @__PURE__ */ jsx100(
|
|
6687
|
+
"input",
|
|
6688
|
+
__spreadProps(__spreadValues({}, commonProps), {
|
|
6689
|
+
className: "form-control np-form-control np-form-control--size-auto np-input np-input--shape-rectangle",
|
|
6690
|
+
type: "password",
|
|
6691
|
+
onChange: (event) => onChange(event.target.value.replace(/[^0-9]/g, ""))
|
|
6692
|
+
})
|
|
6693
|
+
);
|
|
6640
6694
|
}
|
|
6641
6695
|
|
|
6642
6696
|
// ../renderers/src/TextInputRenderer.tsx
|
|
6643
|
-
import { jsx as
|
|
6697
|
+
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
6644
6698
|
var TextInputRenderer = {
|
|
6645
6699
|
canRenderType: "input-text",
|
|
6646
6700
|
render: (props) => {
|
|
@@ -6673,7 +6727,7 @@ var TextInputRenderer = {
|
|
|
6673
6727
|
}
|
|
6674
6728
|
}
|
|
6675
6729
|
});
|
|
6676
|
-
return /* @__PURE__ */
|
|
6730
|
+
return /* @__PURE__ */ jsx101(
|
|
6677
6731
|
FieldInput_default,
|
|
6678
6732
|
{
|
|
6679
6733
|
id,
|
|
@@ -6686,13 +6740,23 @@ var TextInputRenderer = {
|
|
|
6686
6740
|
features: props.features,
|
|
6687
6741
|
control: props.control,
|
|
6688
6742
|
tags: props.tags,
|
|
6689
|
-
children: /* @__PURE__ */
|
|
6743
|
+
children: /* @__PURE__ */ jsx101(InputGroup5, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx101(VariableTextInput, __spreadValues({}, inputProps)) })
|
|
6690
6744
|
}
|
|
6691
6745
|
);
|
|
6692
6746
|
}
|
|
6693
6747
|
};
|
|
6694
6748
|
var TextInputRenderer_default = TextInputRenderer;
|
|
6695
6749
|
|
|
6750
|
+
// ../renderers/src/UpdatableRenderer.tsx
|
|
6751
|
+
var import_classnames34 = __toESM(require_classnames());
|
|
6752
|
+
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
6753
|
+
var UpdatableRenderer = {
|
|
6754
|
+
canRenderType: "updatable",
|
|
6755
|
+
render: ({ children, control, margin, tags }) => {
|
|
6756
|
+
return /* @__PURE__ */ jsx102("div", { className: (0, import_classnames34.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children });
|
|
6757
|
+
}
|
|
6758
|
+
};
|
|
6759
|
+
|
|
6696
6760
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
6697
6761
|
import { Status as Status2, Upload, UploadInput as UploadInput2 } from "@transferwise/components";
|
|
6698
6762
|
|
|
@@ -6700,7 +6764,7 @@ import { Status as Status2, Upload, UploadInput as UploadInput2 } from "@transfe
|
|
|
6700
6764
|
var getRandomId = () => Math.random().toString(36).substring(2);
|
|
6701
6765
|
|
|
6702
6766
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
6703
|
-
import { jsx as
|
|
6767
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
6704
6768
|
var UploadInputRenderer = {
|
|
6705
6769
|
canRenderType: "input-upload",
|
|
6706
6770
|
render: (props) => {
|
|
@@ -6729,7 +6793,7 @@ var UploadInputRenderer = {
|
|
|
6729
6793
|
};
|
|
6730
6794
|
return (
|
|
6731
6795
|
// We don't pass help here as there is no sensible place to display it
|
|
6732
|
-
/* @__PURE__ */
|
|
6796
|
+
/* @__PURE__ */ jsx103(
|
|
6733
6797
|
UploadFieldInput_default,
|
|
6734
6798
|
{
|
|
6735
6799
|
id,
|
|
@@ -6739,7 +6803,7 @@ var UploadInputRenderer = {
|
|
|
6739
6803
|
features,
|
|
6740
6804
|
control,
|
|
6741
6805
|
tags,
|
|
6742
|
-
children: /* @__PURE__ */
|
|
6806
|
+
children: /* @__PURE__ */ jsx103(
|
|
6743
6807
|
UploadInput2,
|
|
6744
6808
|
{
|
|
6745
6809
|
id,
|
|
@@ -6809,7 +6873,7 @@ var LargeUploadRenderer = {
|
|
|
6809
6873
|
};
|
|
6810
6874
|
const filetypes = acceptsToFileTypes(accepts);
|
|
6811
6875
|
const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
|
|
6812
|
-
return /* @__PURE__ */
|
|
6876
|
+
return /* @__PURE__ */ jsx103(
|
|
6813
6877
|
FieldInput_default,
|
|
6814
6878
|
{
|
|
6815
6879
|
id,
|
|
@@ -6820,7 +6884,7 @@ var LargeUploadRenderer = {
|
|
|
6820
6884
|
features,
|
|
6821
6885
|
control,
|
|
6822
6886
|
tags,
|
|
6823
|
-
children: /* @__PURE__ */
|
|
6887
|
+
children: /* @__PURE__ */ jsx103(
|
|
6824
6888
|
Upload,
|
|
6825
6889
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
6826
6890
|
usAccept,
|
|
@@ -6836,10 +6900,10 @@ var LargeUploadRenderer = {
|
|
|
6836
6900
|
};
|
|
6837
6901
|
|
|
6838
6902
|
// ../renderers/src/UpsellRenderer.tsx
|
|
6839
|
-
var
|
|
6903
|
+
var import_classnames35 = __toESM(require_classnames());
|
|
6840
6904
|
import { Nudge } from "@transferwise/components";
|
|
6841
6905
|
import { useState as useState19 } from "react";
|
|
6842
|
-
import { jsx as
|
|
6906
|
+
import { jsx as jsx104 } from "react/jsx-runtime";
|
|
6843
6907
|
var UpsellRenderer = {
|
|
6844
6908
|
canRenderType: "upsell",
|
|
6845
6909
|
render: UpsellRendererComponent
|
|
@@ -6847,10 +6911,10 @@ var UpsellRenderer = {
|
|
|
6847
6911
|
function UpsellRendererComponent(props) {
|
|
6848
6912
|
const { text, callToAction, media, margin, onDismiss, control, tags } = props;
|
|
6849
6913
|
const [isVisible, setIsVisible] = useState19(true);
|
|
6850
|
-
return isVisible ? /* @__PURE__ */
|
|
6914
|
+
return isVisible ? /* @__PURE__ */ jsx104(
|
|
6851
6915
|
Nudge,
|
|
6852
6916
|
{
|
|
6853
|
-
className: (0,
|
|
6917
|
+
className: (0, import_classnames35.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
|
|
6854
6918
|
mediaName: getMediaName(media),
|
|
6855
6919
|
title: text,
|
|
6856
6920
|
action: __spreadValues({
|
|
@@ -6893,43 +6957,6 @@ var supportedMediaNames = [
|
|
|
6893
6957
|
"wallet"
|
|
6894
6958
|
];
|
|
6895
6959
|
|
|
6896
|
-
// ../renderers/src/ButtonRenderer/CircularButtonRenderer.tsx
|
|
6897
|
-
var import_classnames34 = __toESM(require_classnames());
|
|
6898
|
-
import { CircularButton } from "@transferwise/components";
|
|
6899
|
-
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
6900
|
-
var CircularButtonRenderer = {
|
|
6901
|
-
canRenderType: "button",
|
|
6902
|
-
canRender: ({ control }) => control === "circular",
|
|
6903
|
-
render: CircularButtonComponent
|
|
6904
|
-
};
|
|
6905
|
-
function CircularButtonComponent(props) {
|
|
6906
|
-
var _a;
|
|
6907
|
-
const { context, control, disabled, margin, media, tags, title, onClick } = props;
|
|
6908
|
-
const priority = tags == null ? void 0 : tags.find((tag) => tag === "primary" || tag === "secondary");
|
|
6909
|
-
return /* @__PURE__ */ jsx103(
|
|
6910
|
-
"div",
|
|
6911
|
-
{
|
|
6912
|
-
className: (0, import_classnames34.default)(
|
|
6913
|
-
getMargin(margin),
|
|
6914
|
-
"df-button",
|
|
6915
|
-
"circular",
|
|
6916
|
-
controlAndTagsToCSSClass({ control, tags })
|
|
6917
|
-
),
|
|
6918
|
-
children: /* @__PURE__ */ jsx103(
|
|
6919
|
-
CircularButton,
|
|
6920
|
-
{
|
|
6921
|
-
disabled,
|
|
6922
|
-
priority: priority != null ? priority : "secondary",
|
|
6923
|
-
type: context === "negative" ? "negative" : "default",
|
|
6924
|
-
icon: media ? (_a = getAddonStartMedia(media)) == null ? void 0 : _a.value : void 0,
|
|
6925
|
-
onClick,
|
|
6926
|
-
children: title
|
|
6927
|
-
}
|
|
6928
|
-
)
|
|
6929
|
-
}
|
|
6930
|
-
);
|
|
6931
|
-
}
|
|
6932
|
-
|
|
6933
6960
|
// ../renderers/src/getWiseRenderers.ts
|
|
6934
6961
|
var getWiseRenderers = () => [
|
|
6935
6962
|
AddressValidationButtonRenderer_default,
|
|
@@ -6974,6 +7001,7 @@ var getWiseRenderers = () => [
|
|
|
6974
7001
|
TextInputRenderer_default,
|
|
6975
7002
|
UploadInputRenderer,
|
|
6976
7003
|
ColoredUpsellRenderer,
|
|
7004
|
+
UpdatableRenderer,
|
|
6977
7005
|
UpsellRenderer,
|
|
6978
7006
|
SplashStepRenderer,
|
|
6979
7007
|
SplashCelebrationStepRenderer,
|
|
@@ -6984,11 +7012,11 @@ var getWiseRenderers = () => [
|
|
|
6984
7012
|
|
|
6985
7013
|
// ../renderers/src/InitialLoadingStateRenderer.tsx
|
|
6986
7014
|
import { Loader as Loader2 } from "@transferwise/components";
|
|
6987
|
-
import { jsx as
|
|
7015
|
+
import { jsx as jsx105 } from "react/jsx-runtime";
|
|
6988
7016
|
var InitialLoadingStateRenderer = {
|
|
6989
7017
|
canRenderType: "loading-state",
|
|
6990
7018
|
canRender: ({ stepLoadingState }) => stepLoadingState === "initial",
|
|
6991
|
-
render: () => /* @__PURE__ */
|
|
7019
|
+
render: () => /* @__PURE__ */ jsx105(
|
|
6992
7020
|
Loader2,
|
|
6993
7021
|
{
|
|
6994
7022
|
size: "md",
|
|
@@ -7001,24 +7029,24 @@ var InitialLoadingStateRenderer = {
|
|
|
7001
7029
|
// src/dynamicFlow/DynamicFlowModal.tsx
|
|
7002
7030
|
import { useDynamicFlowModal } from "@wise/dynamic-flow-client";
|
|
7003
7031
|
import { Modal as Modal5 } from "@transferwise/components";
|
|
7004
|
-
import { jsx as
|
|
7032
|
+
import { jsx as jsx106 } from "react/jsx-runtime";
|
|
7005
7033
|
function DynamicFlowModal(props) {
|
|
7006
7034
|
const _a = props, { className = "" } = _a, rest = __objRest(_a, ["className"]);
|
|
7007
7035
|
const dfProps = useWiseToCoreProps(rest);
|
|
7008
7036
|
const df = useDynamicFlowModal(dfProps);
|
|
7009
|
-
return /* @__PURE__ */
|
|
7037
|
+
return /* @__PURE__ */ jsx106(
|
|
7010
7038
|
Modal5,
|
|
7011
7039
|
__spreadProps(__spreadValues({
|
|
7012
7040
|
className: `dynamic-flow-modal ${className}`,
|
|
7013
7041
|
disableDimmerClickToClose: true
|
|
7014
7042
|
}, df.modal), {
|
|
7015
|
-
body: /* @__PURE__ */
|
|
7043
|
+
body: /* @__PURE__ */ jsx106("div", { className: "dynamic-flow-modal", children: df.modal.body })
|
|
7016
7044
|
})
|
|
7017
7045
|
);
|
|
7018
7046
|
}
|
|
7019
7047
|
|
|
7020
7048
|
// src/dynamicFlow/getMergedRenderers.tsx
|
|
7021
|
-
import { jsx as
|
|
7049
|
+
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
7022
7050
|
var wiseRenderers = getWiseRenderers();
|
|
7023
7051
|
var getMergedRenderers = (props) => {
|
|
7024
7052
|
var _d, _e;
|
|
@@ -7032,7 +7060,7 @@ var getMergedRenderers = (props) => {
|
|
|
7032
7060
|
method: initialRequest.method,
|
|
7033
7061
|
data: initialRequest.body
|
|
7034
7062
|
};
|
|
7035
|
-
return presentation.type === "push" ? /* @__PURE__ */
|
|
7063
|
+
return presentation.type === "push" ? /* @__PURE__ */ jsx107(DynamicFlow, __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), { features: subflowFeatures, initialAction: action })) : /* @__PURE__ */ jsx107(
|
|
7036
7064
|
DynamicFlowModal,
|
|
7037
7065
|
__spreadProps(__spreadValues(__spreadValues({}, restProps), rest), {
|
|
7038
7066
|
features: subflowFeatures,
|
|
@@ -7247,7 +7275,7 @@ import {
|
|
|
7247
7275
|
useImperativeHandle
|
|
7248
7276
|
} from "react";
|
|
7249
7277
|
import { useDynamicFlow as useDynamicFlow2 } from "@wise/dynamic-flow-client";
|
|
7250
|
-
import { jsx as
|
|
7278
|
+
import { jsx as jsx108 } from "react/jsx-runtime";
|
|
7251
7279
|
var DynamicFlowWithRef = forwardRef(function DynamicFlowWithRef2(props, ref) {
|
|
7252
7280
|
const { className = "" } = props;
|
|
7253
7281
|
const dfProps = useWiseToCoreProps(props);
|
|
@@ -7263,7 +7291,7 @@ var DynamicFlowWithRef = forwardRef(function DynamicFlowWithRef2(props, ref) {
|
|
|
7263
7291
|
}),
|
|
7264
7292
|
[df]
|
|
7265
7293
|
);
|
|
7266
|
-
return /* @__PURE__ */
|
|
7294
|
+
return /* @__PURE__ */ jsx108("div", { className, children: df.view });
|
|
7267
7295
|
});
|
|
7268
7296
|
|
|
7269
7297
|
// src/index.ts
|