@wise/dynamic-flow-client-internal 5.28.4 → 5.29.0-experimental-6048bca
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 +764 -633
- package/build/main.mjs +623 -492
- 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
|
};
|
|
@@ -1755,6 +1792,10 @@ var isIOSWebKit = () => {
|
|
|
1755
1792
|
const mtp = navigator.maxTouchPoints;
|
|
1756
1793
|
return _isIOSResult = navigator.platform === "MacIntel" && mtp !== void 0 && mtp > 0;
|
|
1757
1794
|
};
|
|
1795
|
+
var getRect = (element) => {
|
|
1796
|
+
const { offsetWidth, offsetHeight } = element;
|
|
1797
|
+
return { width: offsetWidth, height: offsetHeight };
|
|
1798
|
+
};
|
|
1758
1799
|
var defaultKeyExtractor = (index) => index;
|
|
1759
1800
|
var defaultRangeExtractor = (range) => {
|
|
1760
1801
|
const start = Math.max(range.startIndex - range.overscan, 0);
|
|
@@ -1766,6 +1807,43 @@ var defaultRangeExtractor = (range) => {
|
|
|
1766
1807
|
}
|
|
1767
1808
|
return arr;
|
|
1768
1809
|
};
|
|
1810
|
+
var observeElementRect = (instance, cb) => {
|
|
1811
|
+
const element = instance.scrollElement;
|
|
1812
|
+
if (!element) {
|
|
1813
|
+
return;
|
|
1814
|
+
}
|
|
1815
|
+
const targetWindow = instance.targetWindow;
|
|
1816
|
+
if (!targetWindow) {
|
|
1817
|
+
return;
|
|
1818
|
+
}
|
|
1819
|
+
const handler = (rect) => {
|
|
1820
|
+
const { width, height } = rect;
|
|
1821
|
+
cb({ width: Math.round(width), height: Math.round(height) });
|
|
1822
|
+
};
|
|
1823
|
+
handler(getRect(element));
|
|
1824
|
+
if (!targetWindow.ResizeObserver) {
|
|
1825
|
+
return () => {
|
|
1826
|
+
};
|
|
1827
|
+
}
|
|
1828
|
+
const observer = new targetWindow.ResizeObserver((entries) => {
|
|
1829
|
+
const run = () => {
|
|
1830
|
+
const entry = entries[0];
|
|
1831
|
+
if (entry == null ? void 0 : entry.borderBoxSize) {
|
|
1832
|
+
const box = entry.borderBoxSize[0];
|
|
1833
|
+
if (box) {
|
|
1834
|
+
handler({ width: box.inlineSize, height: box.blockSize });
|
|
1835
|
+
return;
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
handler(getRect(element));
|
|
1839
|
+
};
|
|
1840
|
+
instance.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(run) : run();
|
|
1841
|
+
});
|
|
1842
|
+
observer.observe(element, { box: "border-box" });
|
|
1843
|
+
return () => {
|
|
1844
|
+
observer.unobserve(element);
|
|
1845
|
+
};
|
|
1846
|
+
};
|
|
1769
1847
|
var addEventListenerOptions = {
|
|
1770
1848
|
passive: true
|
|
1771
1849
|
};
|
|
@@ -1819,6 +1897,10 @@ var observeOffset = (instance, cb, readOffset) => {
|
|
|
1819
1897
|
fallback == null ? void 0 : fallback.cancel();
|
|
1820
1898
|
};
|
|
1821
1899
|
};
|
|
1900
|
+
var observeElementOffset = (instance, cb) => observeOffset(instance, cb, (el) => {
|
|
1901
|
+
const { horizontal, isRtl } = instance.options;
|
|
1902
|
+
return horizontal ? el.scrollLeft * (isRtl && -1 || 1) : el.scrollTop;
|
|
1903
|
+
});
|
|
1822
1904
|
var observeWindowOffset = (instance, cb) => observeOffset(
|
|
1823
1905
|
instance,
|
|
1824
1906
|
cb,
|
|
@@ -1861,6 +1943,7 @@ var scrollWithAdjustments = (offset, {
|
|
|
1861
1943
|
});
|
|
1862
1944
|
};
|
|
1863
1945
|
var windowScroll = scrollWithAdjustments;
|
|
1946
|
+
var elementScroll = scrollWithAdjustments;
|
|
1864
1947
|
var Virtualizer = class {
|
|
1865
1948
|
constructor(opts) {
|
|
1866
1949
|
this.unsubs = [];
|
|
@@ -3103,6 +3186,13 @@ function useVirtualizerBase(_a) {
|
|
|
3103
3186
|
});
|
|
3104
3187
|
return instance;
|
|
3105
3188
|
}
|
|
3189
|
+
function useVirtualizer(options) {
|
|
3190
|
+
return useVirtualizerBase(__spreadValues({
|
|
3191
|
+
observeElementRect,
|
|
3192
|
+
observeElementOffset,
|
|
3193
|
+
scrollToFn: elementScroll
|
|
3194
|
+
}, options));
|
|
3195
|
+
}
|
|
3106
3196
|
function useWindowVirtualizer(options) {
|
|
3107
3197
|
return useVirtualizerBase(__spreadValues({
|
|
3108
3198
|
getScrollElement: () => typeof document !== "undefined" ? window : null,
|
|
@@ -3115,7 +3205,7 @@ function useWindowVirtualizer(options) {
|
|
|
3115
3205
|
|
|
3116
3206
|
// ../renderers/src/CollectionRenderer/components/ContentComponent.tsx
|
|
3117
3207
|
import { ProcessIndicator, Button as Button4 } from "@transferwise/components";
|
|
3118
|
-
import { useRef as useRef4, useEffect as useEffect7, useLayoutEffect as useLayoutEffect2 } from "react";
|
|
3208
|
+
import { useRef as useRef4, useEffect as useEffect7, useLayoutEffect as useLayoutEffect2, useState as useState8 } from "react";
|
|
3119
3209
|
|
|
3120
3210
|
// ../renderers/src/step/StepFooter.tsx
|
|
3121
3211
|
import { Button as Button3 } from "@transferwise/components";
|
|
@@ -3133,23 +3223,23 @@ var step_messages_default = defineMessages4({
|
|
|
3133
3223
|
});
|
|
3134
3224
|
|
|
3135
3225
|
// ../renderers/src/step/StepFooter.tsx
|
|
3136
|
-
import { Fragment as Fragment2, jsx as
|
|
3226
|
+
import { Fragment as Fragment2, jsx as jsx35, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
3137
3227
|
var SCROLL_TO_BOTTOM = "scroll-to-bottom";
|
|
3138
3228
|
var StepFooter = ({ footer, tags }) => {
|
|
3139
3229
|
if (tags == null ? void 0 : tags.includes(SCROLL_TO_BOTTOM)) {
|
|
3140
|
-
return /* @__PURE__ */
|
|
3230
|
+
return /* @__PURE__ */ jsx35(FooterWithScrollButton, { footer });
|
|
3141
3231
|
}
|
|
3142
|
-
return /* @__PURE__ */
|
|
3232
|
+
return /* @__PURE__ */ jsx35(DefaultFooter, { footer });
|
|
3143
3233
|
};
|
|
3144
3234
|
var DefaultFooter = ({ footer }) => {
|
|
3145
3235
|
const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
|
|
3146
|
-
return hasFooter ? /* @__PURE__ */
|
|
3236
|
+
return hasFooter ? /* @__PURE__ */ jsx35("div", { className: "df-step-fixed__footer", children: footer }) : void 0;
|
|
3147
3237
|
};
|
|
3148
3238
|
var FooterWithScrollButton = ({ footer }) => {
|
|
3149
3239
|
const { formatMessage } = useIntl3();
|
|
3150
3240
|
const endOfLayoutRef = useRef3(null);
|
|
3151
3241
|
const isElementVisible = useIsElementVisible(endOfLayoutRef);
|
|
3152
|
-
const scrollButton = /* @__PURE__ */
|
|
3242
|
+
const scrollButton = /* @__PURE__ */ jsx35(
|
|
3153
3243
|
Button3,
|
|
3154
3244
|
{
|
|
3155
3245
|
className: "m-b-1",
|
|
@@ -3165,17 +3255,17 @@ var FooterWithScrollButton = ({ footer }) => {
|
|
|
3165
3255
|
);
|
|
3166
3256
|
const hasStepFooterContent = footer && Array.isArray(footer) && footer.length > 0;
|
|
3167
3257
|
if (isElementVisible && !hasStepFooterContent) {
|
|
3168
|
-
return /* @__PURE__ */
|
|
3258
|
+
return /* @__PURE__ */ jsx35("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
|
|
3169
3259
|
}
|
|
3170
3260
|
return /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
3171
|
-
/* @__PURE__ */
|
|
3261
|
+
/* @__PURE__ */ jsx35("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
|
|
3172
3262
|
/* @__PURE__ */ jsxs6("div", { className: "df-step-fixed__footer", children: [
|
|
3173
3263
|
!isElementVisible && scrollButton,
|
|
3174
3264
|
footer
|
|
3175
3265
|
] })
|
|
3176
3266
|
] });
|
|
3177
3267
|
};
|
|
3178
|
-
var useIsElementVisible = (elementRef) => {
|
|
3268
|
+
var useIsElementVisible = (elementRef, root = null) => {
|
|
3179
3269
|
const [isVisible, setIsVisible] = useState7(false);
|
|
3180
3270
|
useEffect6(() => {
|
|
3181
3271
|
const element = elementRef.current;
|
|
@@ -3184,11 +3274,11 @@ var useIsElementVisible = (elementRef) => {
|
|
|
3184
3274
|
([entry]) => {
|
|
3185
3275
|
setIsVisible(entry.isIntersecting);
|
|
3186
3276
|
},
|
|
3187
|
-
{ rootMargin: "1px" }
|
|
3277
|
+
{ root, rootMargin: "1px" }
|
|
3188
3278
|
);
|
|
3189
3279
|
observer.observe(element);
|
|
3190
3280
|
return () => observer.disconnect();
|
|
3191
|
-
}, [elementRef]);
|
|
3281
|
+
}, [elementRef, root]);
|
|
3192
3282
|
return isVisible;
|
|
3193
3283
|
};
|
|
3194
3284
|
|
|
@@ -3210,12 +3300,40 @@ var collection_messages_default = defineMessages5({
|
|
|
3210
3300
|
}
|
|
3211
3301
|
});
|
|
3212
3302
|
|
|
3303
|
+
// ../renderers/src/CollectionRenderer/components/getScrollableAncestor.ts
|
|
3304
|
+
var SCROLLABLE_OVERFLOW_VALUES = /* @__PURE__ */ new Set(["auto", "overlay", "scroll"]);
|
|
3305
|
+
var getScrollableAncestor = (element) => {
|
|
3306
|
+
var _a;
|
|
3307
|
+
const view = element == null ? void 0 : element.ownerDocument.defaultView;
|
|
3308
|
+
let ancestor = (_a = element == null ? void 0 : element.parentElement) != null ? _a : null;
|
|
3309
|
+
if (!view) {
|
|
3310
|
+
return null;
|
|
3311
|
+
}
|
|
3312
|
+
while (ancestor) {
|
|
3313
|
+
const { overflowY } = view.getComputedStyle(ancestor);
|
|
3314
|
+
const hasScrollableOverflow = SCROLLABLE_OVERFLOW_VALUES.has(overflowY);
|
|
3315
|
+
if (hasScrollableOverflow && ancestor.scrollHeight > ancestor.clientHeight) {
|
|
3316
|
+
return ancestor;
|
|
3317
|
+
}
|
|
3318
|
+
ancestor = ancestor.parentElement;
|
|
3319
|
+
}
|
|
3320
|
+
return null;
|
|
3321
|
+
};
|
|
3322
|
+
|
|
3213
3323
|
// ../renderers/src/CollectionRenderer/components/ContentComponent.tsx
|
|
3214
|
-
import { jsx as
|
|
3324
|
+
import { jsx as jsx36, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
3215
3325
|
var ContentComponent = (props) => {
|
|
3216
3326
|
const { state, status, SectionHeader, Item } = props;
|
|
3327
|
+
const contentRef = useRef4(null);
|
|
3328
|
+
const [scrollElement, setScrollElement] = useState8(null);
|
|
3329
|
+
useLayoutEffect2(() => {
|
|
3330
|
+
const nextScrollElement = getScrollableAncestor(contentRef.current);
|
|
3331
|
+
setScrollElement(
|
|
3332
|
+
(currentScrollElement) => currentScrollElement === nextScrollElement ? currentScrollElement : nextScrollElement
|
|
3333
|
+
);
|
|
3334
|
+
}, []);
|
|
3217
3335
|
const endOfContentRef = useRef4(null);
|
|
3218
|
-
const isBottomVisible = useIsElementVisible(endOfContentRef);
|
|
3336
|
+
const isBottomVisible = useIsElementVisible(endOfContentRef, scrollElement);
|
|
3219
3337
|
useEffect7(() => {
|
|
3220
3338
|
const shouldAutoLoad = isBottomVisible && status.type === "idle" && state.afterSectionsProps.length === 0;
|
|
3221
3339
|
if (shouldAutoLoad && status.loadMore) {
|
|
@@ -3247,51 +3365,90 @@ var ContentComponent = (props) => {
|
|
|
3247
3365
|
var _a, _b;
|
|
3248
3366
|
listOffsetRef.current = (_b = (_a = listRef.current) == null ? void 0 : _a.offsetTop) != null ? _b : 0;
|
|
3249
3367
|
});
|
|
3250
|
-
|
|
3251
|
-
count: stateCount,
|
|
3252
|
-
estimateSize: () => 120,
|
|
3253
|
-
overscan: 10,
|
|
3254
|
-
// eslint-disable-next-line react-hooks/refs
|
|
3255
|
-
scrollMargin: listOffsetRef.current
|
|
3256
|
-
});
|
|
3257
|
-
return /* @__PURE__ */ jsxs7("div", { ref: listRef, children: [
|
|
3368
|
+
return /* @__PURE__ */ jsxs7("div", { ref: contentRef, children: [
|
|
3258
3369
|
state.beforeSections,
|
|
3259
|
-
/* @__PURE__ */
|
|
3260
|
-
|
|
3370
|
+
scrollElement ? /* @__PURE__ */ jsx36(
|
|
3371
|
+
ElementVirtualizedItems,
|
|
3261
3372
|
{
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
ref: virtualizer.measureElement,
|
|
3276
|
-
"data-index": item.index,
|
|
3277
|
-
style: {
|
|
3278
|
-
position: "absolute",
|
|
3279
|
-
top: 0,
|
|
3280
|
-
left: 0,
|
|
3281
|
-
width: "100%",
|
|
3282
|
-
transform: `translateY(${item.start - virtualizer.options.scrollMargin}px)`
|
|
3283
|
-
},
|
|
3284
|
-
children: i.type === "header" ? /* @__PURE__ */ jsx35(SectionHeader, __spreadValues({}, i)) : /* @__PURE__ */ jsx35(Item, __spreadValues({}, i.item))
|
|
3285
|
-
},
|
|
3286
|
-
item.key
|
|
3287
|
-
);
|
|
3288
|
-
})
|
|
3373
|
+
Item,
|
|
3374
|
+
SectionHeader,
|
|
3375
|
+
items,
|
|
3376
|
+
scrollElement,
|
|
3377
|
+
stateCount
|
|
3378
|
+
}
|
|
3379
|
+
) : /* @__PURE__ */ jsx36(
|
|
3380
|
+
WindowVirtualizedItems,
|
|
3381
|
+
{
|
|
3382
|
+
Item,
|
|
3383
|
+
SectionHeader,
|
|
3384
|
+
items,
|
|
3385
|
+
stateCount
|
|
3289
3386
|
}
|
|
3290
3387
|
),
|
|
3291
|
-
/* @__PURE__ */
|
|
3388
|
+
/* @__PURE__ */ jsx36("div", { ref: endOfContentRef, className: "d-flex m-x-auto m-y-2", children: /* @__PURE__ */ jsx36(PaginationComponent, { status, state }) }),
|
|
3292
3389
|
state.afterSections
|
|
3293
3390
|
] });
|
|
3294
3391
|
};
|
|
3392
|
+
var WindowVirtualizedItems = (props) => {
|
|
3393
|
+
const { stateCount } = props;
|
|
3394
|
+
const virtualItemsRef = useRef4(null);
|
|
3395
|
+
const virtualizer = useWindowVirtualizer({
|
|
3396
|
+
count: stateCount,
|
|
3397
|
+
estimateSize: () => 120,
|
|
3398
|
+
overscan: 10
|
|
3399
|
+
});
|
|
3400
|
+
return /* @__PURE__ */ jsx36(VirtualizedItems, __spreadProps(__spreadValues({}, props), { virtualItemsRef, virtualizer }));
|
|
3401
|
+
};
|
|
3402
|
+
var ElementVirtualizedItems = (props) => {
|
|
3403
|
+
const { scrollElement, stateCount } = props;
|
|
3404
|
+
const virtualItemsRef = useRef4(null);
|
|
3405
|
+
const virtualizer = useVirtualizer({
|
|
3406
|
+
count: stateCount,
|
|
3407
|
+
getScrollElement: () => scrollElement,
|
|
3408
|
+
estimateSize: () => 120,
|
|
3409
|
+
overscan: 10
|
|
3410
|
+
});
|
|
3411
|
+
return /* @__PURE__ */ jsx36(VirtualizedItems, __spreadProps(__spreadValues({}, props), { virtualItemsRef, virtualizer }));
|
|
3412
|
+
};
|
|
3413
|
+
var VirtualizedItems = ({
|
|
3414
|
+
Item,
|
|
3415
|
+
SectionHeader,
|
|
3416
|
+
items,
|
|
3417
|
+
virtualItemsRef,
|
|
3418
|
+
virtualizer
|
|
3419
|
+
}) => /* @__PURE__ */ jsx36(
|
|
3420
|
+
"div",
|
|
3421
|
+
{
|
|
3422
|
+
ref: virtualItemsRef,
|
|
3423
|
+
style: {
|
|
3424
|
+
height: `${virtualizer.getTotalSize()}px`,
|
|
3425
|
+
width: "100%",
|
|
3426
|
+
position: "relative"
|
|
3427
|
+
},
|
|
3428
|
+
children: virtualizer.getVirtualItems().map((item) => {
|
|
3429
|
+
const i = items[item.index];
|
|
3430
|
+
if (!i) {
|
|
3431
|
+
return null;
|
|
3432
|
+
}
|
|
3433
|
+
return /* @__PURE__ */ jsx36(
|
|
3434
|
+
"div",
|
|
3435
|
+
{
|
|
3436
|
+
ref: virtualizer.measureElement,
|
|
3437
|
+
"data-index": item.index,
|
|
3438
|
+
style: {
|
|
3439
|
+
position: "absolute",
|
|
3440
|
+
top: 0,
|
|
3441
|
+
left: 0,
|
|
3442
|
+
width: "100%",
|
|
3443
|
+
transform: `translateY(${item.start - virtualizer.options.scrollMargin}px)`
|
|
3444
|
+
},
|
|
3445
|
+
children: i.type === "header" ? /* @__PURE__ */ jsx36(SectionHeader, __spreadValues({}, i)) : /* @__PURE__ */ jsx36(Item, __spreadValues({}, i.item))
|
|
3446
|
+
},
|
|
3447
|
+
item.key
|
|
3448
|
+
);
|
|
3449
|
+
})
|
|
3450
|
+
}
|
|
3451
|
+
);
|
|
3295
3452
|
var PaginationComponent = ({
|
|
3296
3453
|
status,
|
|
3297
3454
|
state
|
|
@@ -3303,26 +3460,26 @@ var PaginationComponent = ({
|
|
|
3303
3460
|
return null;
|
|
3304
3461
|
}
|
|
3305
3462
|
if (isPaginationError) {
|
|
3306
|
-
return /* @__PURE__ */
|
|
3463
|
+
return /* @__PURE__ */ jsx36(LoadMoreButton, { onClick: status.retry });
|
|
3307
3464
|
}
|
|
3308
3465
|
if (state.afterSectionsProps.length > 0 && loadMore) {
|
|
3309
|
-
return /* @__PURE__ */
|
|
3466
|
+
return /* @__PURE__ */ jsx36(LoadMoreButton, { onClick: loadMore });
|
|
3310
3467
|
}
|
|
3311
|
-
return /* @__PURE__ */
|
|
3468
|
+
return /* @__PURE__ */ jsx36(ProcessIndicator, { size: "xs", "data-testid": "collection-pagination-loader" });
|
|
3312
3469
|
};
|
|
3313
3470
|
var LoadMoreButton = ({ onClick }) => {
|
|
3314
3471
|
const { formatMessage } = useIntl4();
|
|
3315
|
-
return /* @__PURE__ */
|
|
3472
|
+
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
3473
|
};
|
|
3317
3474
|
|
|
3318
3475
|
// ../renderers/src/CollectionRenderer/components/FilterComponent.tsx
|
|
3319
3476
|
import { Chips } from "@transferwise/components";
|
|
3320
|
-
import { jsx as
|
|
3477
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
3321
3478
|
var FiltersComponent = ({ state }) => {
|
|
3322
3479
|
const { filters } = state;
|
|
3323
|
-
return /* @__PURE__ */
|
|
3480
|
+
return /* @__PURE__ */ jsx37("div", { className: "df-filters-container", children: filters.map((filter) => {
|
|
3324
3481
|
var _a;
|
|
3325
|
-
return /* @__PURE__ */
|
|
3482
|
+
return /* @__PURE__ */ jsx37(FilterComponent, __spreadValues({}, filter), JSON.stringify((_a = filter.options) == null ? void 0 : _a.map((o) => o.value)));
|
|
3326
3483
|
}) });
|
|
3327
3484
|
};
|
|
3328
3485
|
var FilterComponent = (filter) => {
|
|
@@ -3330,7 +3487,7 @@ var FilterComponent = (filter) => {
|
|
|
3330
3487
|
if (!options) {
|
|
3331
3488
|
return null;
|
|
3332
3489
|
}
|
|
3333
|
-
return /* @__PURE__ */
|
|
3490
|
+
return /* @__PURE__ */ jsx37(
|
|
3334
3491
|
Chips,
|
|
3335
3492
|
{
|
|
3336
3493
|
className: "m-b-1",
|
|
@@ -3360,7 +3517,7 @@ import { ListItem as ListItem6 } from "@transferwise/components";
|
|
|
3360
3517
|
|
|
3361
3518
|
// ../renderers/src/utils/listItem/getAdditionalInfo.tsx
|
|
3362
3519
|
import { ListItem as ListItem4 } from "@transferwise/components";
|
|
3363
|
-
import { jsx as
|
|
3520
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
3364
3521
|
var getAdditionalInfo = (additionalInfo) => {
|
|
3365
3522
|
var _a, _b;
|
|
3366
3523
|
if (!additionalInfo) {
|
|
@@ -3368,7 +3525,7 @@ var getAdditionalInfo = (additionalInfo) => {
|
|
|
3368
3525
|
}
|
|
3369
3526
|
const { href, text, onClick } = additionalInfo;
|
|
3370
3527
|
if (href || onClick) {
|
|
3371
|
-
return /* @__PURE__ */
|
|
3528
|
+
return /* @__PURE__ */ jsx38(
|
|
3372
3529
|
ListItem4.AdditionalInfo,
|
|
3373
3530
|
{
|
|
3374
3531
|
action: __spreadValues({
|
|
@@ -3377,19 +3534,19 @@ var getAdditionalInfo = (additionalInfo) => {
|
|
|
3377
3534
|
}
|
|
3378
3535
|
);
|
|
3379
3536
|
}
|
|
3380
|
-
return /* @__PURE__ */
|
|
3537
|
+
return /* @__PURE__ */ jsx38(ListItem4.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
|
|
3381
3538
|
};
|
|
3382
3539
|
|
|
3383
3540
|
// ../renderers/src/utils/listItem/getCTAControl.tsx
|
|
3384
3541
|
import { ListItem as ListItem5 } from "@transferwise/components";
|
|
3385
|
-
import { jsx as
|
|
3542
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
3386
3543
|
var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
|
|
3387
3544
|
if (!callToAction) {
|
|
3388
3545
|
return void 0;
|
|
3389
3546
|
}
|
|
3390
3547
|
const { accessibilityDescription, title, context } = callToAction;
|
|
3391
3548
|
const { priority, sentiment } = getPriorityAndSentiment(ctaSecondary, context);
|
|
3392
|
-
return /* @__PURE__ */
|
|
3549
|
+
return /* @__PURE__ */ jsx39(
|
|
3393
3550
|
ListItem5.Button,
|
|
3394
3551
|
__spreadProps(__spreadValues({}, callToAction.getAnchorProps()), {
|
|
3395
3552
|
partiallyInteractive: !fullyInteractive,
|
|
@@ -3414,7 +3571,7 @@ var shouldUseAvatar = (control, tags) => {
|
|
|
3414
3571
|
};
|
|
3415
3572
|
|
|
3416
3573
|
// ../renderers/src/CollectionRenderer/components/ItemComponent.tsx
|
|
3417
|
-
import { jsx as
|
|
3574
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
3418
3575
|
var ItemComponent = (props) => {
|
|
3419
3576
|
var _a, _b;
|
|
3420
3577
|
const {
|
|
@@ -3436,7 +3593,7 @@ var ItemComponent = (props) => {
|
|
|
3436
3593
|
ctaSecondary: (_a = tags == null ? void 0 : tags.includes("cta-secondary")) != null ? _a : false,
|
|
3437
3594
|
fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
|
|
3438
3595
|
};
|
|
3439
|
-
return /* @__PURE__ */
|
|
3596
|
+
return /* @__PURE__ */ jsx40(
|
|
3440
3597
|
ListItem6,
|
|
3441
3598
|
{
|
|
3442
3599
|
title,
|
|
@@ -3453,10 +3610,10 @@ var ItemComponent = (props) => {
|
|
|
3453
3610
|
};
|
|
3454
3611
|
var getNavigationControl = (onClick, href) => {
|
|
3455
3612
|
if (href) {
|
|
3456
|
-
return /* @__PURE__ */
|
|
3613
|
+
return /* @__PURE__ */ jsx40(ListItem6.Navigation, { href });
|
|
3457
3614
|
}
|
|
3458
3615
|
if (onClick) {
|
|
3459
|
-
return /* @__PURE__ */
|
|
3616
|
+
return /* @__PURE__ */ jsx40(ListItem6.Navigation, { onClick });
|
|
3460
3617
|
}
|
|
3461
3618
|
return null;
|
|
3462
3619
|
};
|
|
@@ -3470,7 +3627,7 @@ import {
|
|
|
3470
3627
|
} from "@transferwise/components";
|
|
3471
3628
|
import { CrossCircleFill, Search } from "@transferwise/icons";
|
|
3472
3629
|
import { useIntl as useIntl5 } from "react-intl";
|
|
3473
|
-
import { jsx as
|
|
3630
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
3474
3631
|
var SearchComponent = ({
|
|
3475
3632
|
state,
|
|
3476
3633
|
status,
|
|
@@ -3486,12 +3643,12 @@ var SearchComponent = ({
|
|
|
3486
3643
|
const getAddon = () => {
|
|
3487
3644
|
var _a;
|
|
3488
3645
|
if (status.type === "loading") {
|
|
3489
|
-
return { content: /* @__PURE__ */
|
|
3646
|
+
return { content: /* @__PURE__ */ jsx41(ProcessIndicator2, { size: "xs", "data-testid": "collection-search-loader" }) };
|
|
3490
3647
|
}
|
|
3491
3648
|
if ((_a = state.search) == null ? void 0 : _a.query) {
|
|
3492
3649
|
return {
|
|
3493
3650
|
interactive: true,
|
|
3494
|
-
content: /* @__PURE__ */
|
|
3651
|
+
content: /* @__PURE__ */ jsx41(
|
|
3495
3652
|
IconButton,
|
|
3496
3653
|
{
|
|
3497
3654
|
priority: "minimal",
|
|
@@ -3501,14 +3658,14 @@ var SearchComponent = ({
|
|
|
3501
3658
|
var _a2;
|
|
3502
3659
|
return (_a2 = state.search) == null ? void 0 : _a2.onChange("");
|
|
3503
3660
|
},
|
|
3504
|
-
children: /* @__PURE__ */
|
|
3661
|
+
children: /* @__PURE__ */ jsx41(CrossCircleFill, {})
|
|
3505
3662
|
}
|
|
3506
3663
|
)
|
|
3507
3664
|
};
|
|
3508
3665
|
}
|
|
3509
3666
|
return void 0;
|
|
3510
3667
|
};
|
|
3511
|
-
return /* @__PURE__ */
|
|
3668
|
+
return /* @__PURE__ */ jsx41(
|
|
3512
3669
|
FieldInput_default,
|
|
3513
3670
|
{
|
|
3514
3671
|
id: "search",
|
|
@@ -3519,7 +3676,7 @@ var SearchComponent = ({
|
|
|
3519
3676
|
features,
|
|
3520
3677
|
control,
|
|
3521
3678
|
tags,
|
|
3522
|
-
children: /* @__PURE__ */
|
|
3679
|
+
children: /* @__PURE__ */ jsx41(InputGroup, { addonStart: { content: /* @__PURE__ */ jsx41(Search, { size: 24 }) }, addonEnd: getAddon(), children: /* @__PURE__ */ jsx41(
|
|
3523
3680
|
Input,
|
|
3524
3681
|
{
|
|
3525
3682
|
id: "search",
|
|
@@ -3538,14 +3695,14 @@ var SearchComponent = ({
|
|
|
3538
3695
|
};
|
|
3539
3696
|
|
|
3540
3697
|
// ../renderers/src/CollectionRenderer/components/SectionHeaderComponent.tsx
|
|
3541
|
-
import { jsx as
|
|
3698
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
3542
3699
|
var SectionHeaderComponent = ({
|
|
3543
3700
|
title,
|
|
3544
3701
|
callToAction
|
|
3545
|
-
}) => /* @__PURE__ */
|
|
3702
|
+
}) => /* @__PURE__ */ jsx42(Header, { title, callToAction });
|
|
3546
3703
|
|
|
3547
3704
|
// ../renderers/src/CollectionRenderer/createCollectionRenderer.tsx
|
|
3548
|
-
import { jsx as
|
|
3705
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
3549
3706
|
var createCollectionRenderer = (canRender, components) => {
|
|
3550
3707
|
const componentsWithDefaults = __spreadValues({
|
|
3551
3708
|
Search: SearchComponent,
|
|
@@ -3559,20 +3716,20 @@ var createCollectionRenderer = (canRender, components) => {
|
|
|
3559
3716
|
canRenderType: "collection",
|
|
3560
3717
|
canRender,
|
|
3561
3718
|
render: (props) => {
|
|
3562
|
-
return /* @__PURE__ */
|
|
3719
|
+
return /* @__PURE__ */ jsx43(CollectionRendererComponent, __spreadValues(__spreadValues({}, props), componentsWithDefaults));
|
|
3563
3720
|
}
|
|
3564
3721
|
};
|
|
3565
3722
|
};
|
|
3566
3723
|
|
|
3567
3724
|
// ../renderers/src/CollectionRenderer/CollectionRenderer.tsx
|
|
3568
3725
|
import { useIntl as useIntl6 } from "react-intl";
|
|
3569
|
-
import { Fragment as Fragment3, jsx as
|
|
3726
|
+
import { Fragment as Fragment3, jsx as jsx44, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3570
3727
|
var CollectionRendererComponent = (props) => {
|
|
3571
3728
|
const { status, Search: Search4, Filters, Results } = props;
|
|
3572
3729
|
return /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
3573
|
-
/* @__PURE__ */
|
|
3574
|
-
/* @__PURE__ */
|
|
3575
|
-
status.type === "error" && status.reason === "search" ? /* @__PURE__ */
|
|
3730
|
+
/* @__PURE__ */ jsx44(Search4, __spreadValues({}, props)),
|
|
3731
|
+
/* @__PURE__ */ jsx44(Filters, __spreadValues({}, props)),
|
|
3732
|
+
status.type === "error" && status.reason === "search" ? /* @__PURE__ */ jsx44(SearchError, { retry: status.retry }) : /* @__PURE__ */ jsx44(Results, __spreadValues({}, props))
|
|
3576
3733
|
] });
|
|
3577
3734
|
};
|
|
3578
3735
|
var SearchError = ({ retry }) => {
|
|
@@ -3580,21 +3737,21 @@ var SearchError = ({ retry }) => {
|
|
|
3580
3737
|
return /* @__PURE__ */ jsxs8(InlinePrompt, { width: "full", sentiment: "negative", children: [
|
|
3581
3738
|
formatMessage(generic_error_messages_default.genericError),
|
|
3582
3739
|
"\xA0",
|
|
3583
|
-
/* @__PURE__ */
|
|
3740
|
+
/* @__PURE__ */ jsx44(DSLink, { onClick: retry, children: formatMessage(generic_error_messages_default.retry) })
|
|
3584
3741
|
] });
|
|
3585
3742
|
};
|
|
3586
3743
|
var CollectionRenderer = createCollectionRenderer(() => true);
|
|
3587
3744
|
var CollectionRenderer_default = CollectionRenderer;
|
|
3588
3745
|
|
|
3589
3746
|
// ../renderers/src/ColumnsRenderer.tsx
|
|
3590
|
-
var
|
|
3747
|
+
var import_classnames11 = __toESM(require_classnames());
|
|
3591
3748
|
|
|
3592
3749
|
// ../renderers/src/utils/useIsCollapsed.ts
|
|
3593
|
-
import { useEffect as useEffect8, useState as
|
|
3750
|
+
import { useEffect as useEffect8, useState as useState9 } from "react";
|
|
3594
3751
|
var COLLAPSE_QUERY = "(max-width: 767.98px)";
|
|
3595
3752
|
var supportsMatchMedia = () => typeof window !== "undefined" && !!window.matchMedia;
|
|
3596
3753
|
var useIsCollapsed = () => {
|
|
3597
|
-
const [collapsed, setCollapsed] =
|
|
3754
|
+
const [collapsed, setCollapsed] = useState9(
|
|
3598
3755
|
() => supportsMatchMedia() && window.matchMedia(COLLAPSE_QUERY).matches
|
|
3599
3756
|
);
|
|
3600
3757
|
useEffect8(() => {
|
|
@@ -3610,7 +3767,7 @@ var useIsCollapsed = () => {
|
|
|
3610
3767
|
};
|
|
3611
3768
|
|
|
3612
3769
|
// ../renderers/src/ColumnsRenderer.tsx
|
|
3613
|
-
import { jsx as
|
|
3770
|
+
import { jsx as jsx45, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3614
3771
|
var RIGHT_FIRST_STACKING = "right-first-stacking";
|
|
3615
3772
|
var ColumnsRenderer = {
|
|
3616
3773
|
canRenderType: "columns",
|
|
@@ -3621,12 +3778,12 @@ function ColumnsRendererComponent(props) {
|
|
|
3621
3778
|
const { bias, margin, startChildren, endChildren, tags } = props;
|
|
3622
3779
|
const isCollapsed = useIsCollapsed();
|
|
3623
3780
|
const reverse = isCollapsed && ((_a = tags == null ? void 0 : tags.includes(RIGHT_FIRST_STACKING)) != null ? _a : false);
|
|
3624
|
-
const startColumn = /* @__PURE__ */
|
|
3625
|
-
const endColumn = /* @__PURE__ */
|
|
3781
|
+
const startColumn = /* @__PURE__ */ jsx45("div", { className: "df-columns-renderer-column", children: startChildren });
|
|
3782
|
+
const endColumn = /* @__PURE__ */ jsx45("div", { className: "df-columns-renderer-column", children: endChildren });
|
|
3626
3783
|
return /* @__PURE__ */ jsxs9(
|
|
3627
3784
|
"div",
|
|
3628
3785
|
{
|
|
3629
|
-
className: (0,
|
|
3786
|
+
className: (0, import_classnames11.default)(
|
|
3630
3787
|
"df-columns-renderer-container",
|
|
3631
3788
|
getMargin(margin),
|
|
3632
3789
|
{
|
|
@@ -3648,7 +3805,7 @@ var ColumnsRenderer_default = ColumnsRenderer;
|
|
|
3648
3805
|
import { DateInput, DateLookup } from "@transferwise/components";
|
|
3649
3806
|
|
|
3650
3807
|
// ../renderers/src/hooks/useAvailabilityRules.ts
|
|
3651
|
-
import { useState as
|
|
3808
|
+
import { useState as useState10 } from "react";
|
|
3652
3809
|
import { useIntl as useIntl7 } from "react-intl";
|
|
3653
3810
|
|
|
3654
3811
|
// ../renderers/src/messages/date-input.messages.ts
|
|
@@ -3693,7 +3850,7 @@ var dateToDateString = (date) => {
|
|
|
3693
3850
|
var useAvailabilityRules = (availability) => {
|
|
3694
3851
|
var _a, _b;
|
|
3695
3852
|
const { formatMessage } = useIntl7();
|
|
3696
|
-
const [focusedDate, setFocusedDate] =
|
|
3853
|
+
const [focusedDate, setFocusedDate] = useState10(null);
|
|
3697
3854
|
const unavailableMessage = (_b = (_a = focusedDate ? getUnavailableDateReason(focusedDate, availability) : null) != null ? _a : availability == null ? void 0 : availability.message) != null ? _b : formatMessage(date_input_messages_default.unavailableDates);
|
|
3698
3855
|
const onDateSelect = ({ date }) => {
|
|
3699
3856
|
setFocusedDate(date);
|
|
@@ -3745,7 +3902,7 @@ var matchesDateRule = (date, weekday, rule) => {
|
|
|
3745
3902
|
var isDate = (date) => date !== null;
|
|
3746
3903
|
|
|
3747
3904
|
// ../renderers/src/components/VariableDateInput.tsx
|
|
3748
|
-
import { jsx as
|
|
3905
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
3749
3906
|
function VariableDateInput({
|
|
3750
3907
|
control,
|
|
3751
3908
|
inputProps
|
|
@@ -3763,7 +3920,7 @@ function VariableDateInput({
|
|
|
3763
3920
|
} = inputProps;
|
|
3764
3921
|
const { disabledRules, onDateSelect, resetFocusedDate } = useAvailabilityRules(availability);
|
|
3765
3922
|
if (control === "date-lookup") {
|
|
3766
|
-
return /* @__PURE__ */
|
|
3923
|
+
return /* @__PURE__ */ jsx46(
|
|
3767
3924
|
DateLookup,
|
|
3768
3925
|
{
|
|
3769
3926
|
value: dateStringToDateOrNull(inputProps.value),
|
|
@@ -3784,7 +3941,7 @@ function VariableDateInput({
|
|
|
3784
3941
|
}
|
|
3785
3942
|
);
|
|
3786
3943
|
}
|
|
3787
|
-
return /* @__PURE__ */
|
|
3944
|
+
return /* @__PURE__ */ jsx46(
|
|
3788
3945
|
DateInput,
|
|
3789
3946
|
__spreadProps(__spreadValues({}, inputProps), {
|
|
3790
3947
|
dayAutoComplete: getAutocompleteString(autoComplete, "day"),
|
|
@@ -3801,7 +3958,7 @@ var getAutocompleteString = (value, suffix) => {
|
|
|
3801
3958
|
var VariableDateInput_default = VariableDateInput;
|
|
3802
3959
|
|
|
3803
3960
|
// ../renderers/src/DateInputRenderer.tsx
|
|
3804
|
-
import { jsx as
|
|
3961
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
3805
3962
|
var DateInputRenderer = {
|
|
3806
3963
|
canRenderType: "input-date",
|
|
3807
3964
|
render: (props) => {
|
|
@@ -3826,7 +3983,7 @@ var DateInputRenderer = {
|
|
|
3826
3983
|
]);
|
|
3827
3984
|
const value = initialValue != null ? initialValue : "";
|
|
3828
3985
|
const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
|
|
3829
|
-
return /* @__PURE__ */
|
|
3986
|
+
return /* @__PURE__ */ jsx47(
|
|
3830
3987
|
FieldInput_default,
|
|
3831
3988
|
{
|
|
3832
3989
|
id,
|
|
@@ -3839,7 +3996,7 @@ var DateInputRenderer = {
|
|
|
3839
3996
|
features: props.features,
|
|
3840
3997
|
control,
|
|
3841
3998
|
tags: props.tags,
|
|
3842
|
-
children: /* @__PURE__ */
|
|
3999
|
+
children: /* @__PURE__ */ jsx47(VariableDateInput_default, { control, inputProps })
|
|
3843
4000
|
}
|
|
3844
4001
|
);
|
|
3845
4002
|
}
|
|
@@ -3851,7 +4008,7 @@ import { ListItem as ListItem7 } from "@transferwise/components";
|
|
|
3851
4008
|
|
|
3852
4009
|
// ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
|
|
3853
4010
|
import { Header as Header3, SearchInput } from "@transferwise/components";
|
|
3854
|
-
import { useState as
|
|
4011
|
+
import { useState as useState11 } from "react";
|
|
3855
4012
|
import { useIntl as useIntl9 } from "react-intl";
|
|
3856
4013
|
|
|
3857
4014
|
// ../renderers/src/messages/filter.messages.ts
|
|
@@ -3961,7 +4118,7 @@ var getGroupsFromTags = (knownTags, items) => {
|
|
|
3961
4118
|
};
|
|
3962
4119
|
|
|
3963
4120
|
// ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
|
|
3964
|
-
import { Fragment as Fragment4, jsx as
|
|
4121
|
+
import { Fragment as Fragment4, jsx as jsx48, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3965
4122
|
var groupingTags = Object.keys(group_messages_default).filter((key) => key !== "all");
|
|
3966
4123
|
var isGroupedDecision = (options) => {
|
|
3967
4124
|
return getGroupsFromTags(groupingTags, options).length > 0;
|
|
@@ -3971,8 +4128,8 @@ var GroupedDecisionList = (_a) => {
|
|
|
3971
4128
|
const { formatMessage } = useIntl8();
|
|
3972
4129
|
const { options } = rest;
|
|
3973
4130
|
const itemsByTag = [...getGroupsFromTags(groupingTags, options), { tag: "all", items: options }];
|
|
3974
|
-
return /* @__PURE__ */
|
|
3975
|
-
/* @__PURE__ */
|
|
4131
|
+
return /* @__PURE__ */ jsx48(Fragment4, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ jsxs10(Section, { children: [
|
|
4132
|
+
/* @__PURE__ */ jsx48(
|
|
3976
4133
|
Header2,
|
|
3977
4134
|
{
|
|
3978
4135
|
as: "h2",
|
|
@@ -3984,27 +4141,27 @@ var GroupedDecisionList = (_a) => {
|
|
|
3984
4141
|
};
|
|
3985
4142
|
|
|
3986
4143
|
// ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
|
|
3987
|
-
var
|
|
3988
|
-
import { Fragment as Fragment5, jsx as
|
|
4144
|
+
var import_classnames12 = __toESM(require_classnames());
|
|
4145
|
+
import { Fragment as Fragment5, jsx as jsx49, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3989
4146
|
var DecisionWrapper = (props) => {
|
|
3990
4147
|
const { margin, control, title, tags } = props;
|
|
3991
|
-
return /* @__PURE__ */ jsxs11("div", { className: (0,
|
|
3992
|
-
title && /* @__PURE__ */
|
|
3993
|
-
control === "filtered" ? /* @__PURE__ */
|
|
4148
|
+
return /* @__PURE__ */ jsxs11("div", { className: (0, import_classnames12.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
4149
|
+
title && /* @__PURE__ */ jsx49(Header3, { as: "h2", title }),
|
|
4150
|
+
control === "filtered" ? /* @__PURE__ */ jsx49(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsx49(UnfilteredDecisionList, __spreadValues({}, props))
|
|
3994
4151
|
] });
|
|
3995
4152
|
};
|
|
3996
4153
|
var UnfilteredDecisionList = (_a) => {
|
|
3997
4154
|
var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
|
|
3998
|
-
return isGroupedDecision(rest.options) ? /* @__PURE__ */
|
|
4155
|
+
return isGroupedDecision(rest.options) ? /* @__PURE__ */ jsx49(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList2 })) : renderDecisionList2(rest);
|
|
3999
4156
|
};
|
|
4000
4157
|
var FilteredDecisionList = (props) => {
|
|
4001
4158
|
const { formatMessage } = useIntl9();
|
|
4002
|
-
const [query, setQuery] =
|
|
4159
|
+
const [query, setQuery] = useState11("");
|
|
4003
4160
|
const { control, options, renderDecisionList: renderDecisionList2 } = props;
|
|
4004
4161
|
const filteredOptions = (query == null ? void 0 : query.length) > 0 ? filterAndSortItems(options, query) : options;
|
|
4005
4162
|
const isGrouped = isGroupedDecision(options);
|
|
4006
4163
|
return /* @__PURE__ */ jsxs11(Fragment5, { children: [
|
|
4007
|
-
/* @__PURE__ */
|
|
4164
|
+
/* @__PURE__ */ jsx49(
|
|
4008
4165
|
SearchInput,
|
|
4009
4166
|
{
|
|
4010
4167
|
placeholder: formatMessage(filter_messages_default.placeholder),
|
|
@@ -4016,25 +4173,25 @@ var FilteredDecisionList = (props) => {
|
|
|
4016
4173
|
}
|
|
4017
4174
|
}
|
|
4018
4175
|
),
|
|
4019
|
-
isGrouped && query.length === 0 ? /* @__PURE__ */
|
|
4020
|
-
query.length > 0 && /* @__PURE__ */
|
|
4176
|
+
isGrouped && query.length === 0 ? /* @__PURE__ */ jsx49(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsxs11(Fragment5, { children: [
|
|
4177
|
+
query.length > 0 && /* @__PURE__ */ jsx49(Header3, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
|
|
4021
4178
|
filteredOptions.length > 0 ? renderDecisionList2({
|
|
4022
4179
|
control,
|
|
4023
4180
|
className: query.length === 0 ? "m-t-3" : "",
|
|
4024
4181
|
options: filteredOptions
|
|
4025
|
-
}) : /* @__PURE__ */
|
|
4182
|
+
}) : /* @__PURE__ */ jsx49("p", { children: formatMessage(filter_messages_default.noResults) })
|
|
4026
4183
|
] })
|
|
4027
4184
|
] });
|
|
4028
4185
|
};
|
|
4029
4186
|
|
|
4030
4187
|
// ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
|
|
4031
|
-
import { Fragment as Fragment6, jsx as
|
|
4188
|
+
import { Fragment as Fragment6, jsx as jsx50 } from "react/jsx-runtime";
|
|
4032
4189
|
var DecisionRenderer = {
|
|
4033
4190
|
canRenderType: "decision",
|
|
4034
|
-
render: (props) => /* @__PURE__ */
|
|
4191
|
+
render: (props) => /* @__PURE__ */ jsx50(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }))
|
|
4035
4192
|
};
|
|
4036
4193
|
var renderDecisionList = ({ options, control }) => {
|
|
4037
|
-
return /* @__PURE__ */
|
|
4194
|
+
return /* @__PURE__ */ jsx50(Fragment6, { children: options.map((_a) => {
|
|
4038
4195
|
var _b = _a, { onClick } = _b, rest = __objRest(_b, ["onClick"]);
|
|
4039
4196
|
const {
|
|
4040
4197
|
description,
|
|
@@ -4047,7 +4204,7 @@ var renderDecisionList = ({ options, control }) => {
|
|
|
4047
4204
|
supportingValues,
|
|
4048
4205
|
tags
|
|
4049
4206
|
} = rest;
|
|
4050
|
-
return /* @__PURE__ */
|
|
4207
|
+
return /* @__PURE__ */ jsx50(
|
|
4051
4208
|
ListItem7,
|
|
4052
4209
|
{
|
|
4053
4210
|
title: itemTitle,
|
|
@@ -4059,7 +4216,7 @@ var renderDecisionList = ({ options, control }) => {
|
|
|
4059
4216
|
media: getMedia(media, shouldUseAvatar(control, tags)),
|
|
4060
4217
|
prompt: getInlineAlert(inlineAlert),
|
|
4061
4218
|
additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
|
|
4062
|
-
control: /* @__PURE__ */
|
|
4219
|
+
control: /* @__PURE__ */ jsx50(ListItem7.Navigation, __spreadValues({}, getAnchorProps()))
|
|
4063
4220
|
},
|
|
4064
4221
|
JSON.stringify(rest)
|
|
4065
4222
|
);
|
|
@@ -4068,9 +4225,9 @@ var renderDecisionList = ({ options, control }) => {
|
|
|
4068
4225
|
var DecisionRenderer_default = DecisionRenderer;
|
|
4069
4226
|
|
|
4070
4227
|
// ../renderers/src/DividerRenderer.tsx
|
|
4071
|
-
var
|
|
4228
|
+
var import_classnames13 = __toESM(require_classnames());
|
|
4072
4229
|
import { Divider } from "@transferwise/components";
|
|
4073
|
-
import { jsx as
|
|
4230
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
4074
4231
|
var mapControlToLevel = (control) => {
|
|
4075
4232
|
switch (control) {
|
|
4076
4233
|
case "section":
|
|
@@ -4083,10 +4240,10 @@ var mapControlToLevel = (control) => {
|
|
|
4083
4240
|
};
|
|
4084
4241
|
var DividerRenderer = {
|
|
4085
4242
|
canRenderType: "divider",
|
|
4086
|
-
render: ({ margin, control, tags }) => /* @__PURE__ */
|
|
4243
|
+
render: ({ margin, control, tags }) => /* @__PURE__ */ jsx51(
|
|
4087
4244
|
Divider,
|
|
4088
4245
|
{
|
|
4089
|
-
className: (0,
|
|
4246
|
+
className: (0, import_classnames13.default)(
|
|
4090
4247
|
"m-t-0",
|
|
4091
4248
|
"d-block",
|
|
4092
4249
|
getMargin(margin),
|
|
@@ -4129,7 +4286,7 @@ var external_confirmation_messages_default = defineMessages9({
|
|
|
4129
4286
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
4130
4287
|
import { useIntl as useIntl10 } from "react-intl";
|
|
4131
4288
|
import { useEffect as useEffect9 } from "react";
|
|
4132
|
-
import { Fragment as Fragment7, jsx as
|
|
4289
|
+
import { Fragment as Fragment7, jsx as jsx52, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
4133
4290
|
var ExternalConfirmationRenderer = {
|
|
4134
4291
|
canRenderType: "external-confirmation",
|
|
4135
4292
|
render: ExternalConfirmationRendererComponent
|
|
@@ -4146,15 +4303,15 @@ function ExternalConfirmationRendererComponent({
|
|
|
4146
4303
|
useEffect9(() => {
|
|
4147
4304
|
open();
|
|
4148
4305
|
}, []);
|
|
4149
|
-
return /* @__PURE__ */
|
|
4306
|
+
return /* @__PURE__ */ jsx52(
|
|
4150
4307
|
Modal,
|
|
4151
4308
|
{
|
|
4152
4309
|
open: visible,
|
|
4153
4310
|
title: formatMessage(external_confirmation_messages_default.title),
|
|
4154
4311
|
body: /* @__PURE__ */ jsxs12(Fragment7, { children: [
|
|
4155
|
-
/* @__PURE__ */
|
|
4156
|
-
/* @__PURE__ */
|
|
4157
|
-
/* @__PURE__ */
|
|
4312
|
+
/* @__PURE__ */ jsx52(Markdown3, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
|
|
4313
|
+
/* @__PURE__ */ jsx52("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs12("div", { className: "df-box-renderer-width-lg", children: [
|
|
4314
|
+
/* @__PURE__ */ jsx52(
|
|
4158
4315
|
Button5,
|
|
4159
4316
|
{
|
|
4160
4317
|
v2: true,
|
|
@@ -4168,7 +4325,7 @@ function ExternalConfirmationRendererComponent({
|
|
|
4168
4325
|
children: formatMessage(external_confirmation_messages_default.open)
|
|
4169
4326
|
}
|
|
4170
4327
|
),
|
|
4171
|
-
/* @__PURE__ */
|
|
4328
|
+
/* @__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
4329
|
] }) })
|
|
4173
4330
|
] }),
|
|
4174
4331
|
className: controlAndTagsToCSSClass({ control, tags }),
|
|
@@ -4186,51 +4343,51 @@ function getOrigin(url) {
|
|
|
4186
4343
|
var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
|
|
4187
4344
|
|
|
4188
4345
|
// ../renderers/src/FormRenderer.tsx
|
|
4189
|
-
var
|
|
4190
|
-
import { jsx as
|
|
4346
|
+
var import_classnames14 = __toESM(require_classnames());
|
|
4347
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
4191
4348
|
var FormRenderer = {
|
|
4192
4349
|
canRenderType: "form",
|
|
4193
|
-
render: ({ children, margin, control, tags }) => /* @__PURE__ */
|
|
4350
|
+
render: ({ children, margin, control, tags }) => /* @__PURE__ */ jsx53("div", { className: (0, import_classnames14.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children })
|
|
4194
4351
|
};
|
|
4195
4352
|
var FormRenderer_default = FormRenderer;
|
|
4196
4353
|
|
|
4197
4354
|
// ../renderers/src/FormSectionRenderer.tsx
|
|
4198
4355
|
import { Header as Header4 } from "@transferwise/components";
|
|
4199
|
-
import { jsx as
|
|
4356
|
+
import { jsx as jsx54, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4200
4357
|
var FormSectionRenderer = {
|
|
4201
4358
|
canRenderType: "form-section",
|
|
4202
4359
|
render: ({ title, description, children, control, tags }) => /* @__PURE__ */ jsxs13("fieldset", { className: controlAndTagsToCSSClass({ control, tags }), children: [
|
|
4203
|
-
title && /* @__PURE__ */
|
|
4360
|
+
title && /* @__PURE__ */ jsx54(
|
|
4204
4361
|
Header4,
|
|
4205
4362
|
{
|
|
4206
4363
|
as: "h2",
|
|
4207
4364
|
title
|
|
4208
4365
|
}
|
|
4209
4366
|
),
|
|
4210
|
-
description && /* @__PURE__ */
|
|
4367
|
+
description && /* @__PURE__ */ jsx54("p", { children: description }),
|
|
4211
4368
|
children
|
|
4212
4369
|
] })
|
|
4213
4370
|
};
|
|
4214
4371
|
var FormSectionRenderer_default = FormSectionRenderer;
|
|
4215
4372
|
|
|
4216
4373
|
// ../renderers/src/HeadingRenderer.tsx
|
|
4217
|
-
var
|
|
4374
|
+
var import_classnames15 = __toESM(require_classnames());
|
|
4218
4375
|
import { Display, Title } from "@transferwise/components";
|
|
4219
|
-
import { jsx as
|
|
4376
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
4220
4377
|
var HeadingRenderer = {
|
|
4221
4378
|
canRenderType: "heading",
|
|
4222
4379
|
render: Heading
|
|
4223
4380
|
};
|
|
4224
4381
|
function Heading(props) {
|
|
4225
4382
|
const { text, size, align, margin, control } = props;
|
|
4226
|
-
const className = (0,
|
|
4383
|
+
const className = (0, import_classnames15.default)(
|
|
4227
4384
|
getTextAlignmentAndMargin({ align, margin }),
|
|
4228
4385
|
controlAndTagsToCSSClass(props)
|
|
4229
4386
|
);
|
|
4230
|
-
return control === "display" ? /* @__PURE__ */
|
|
4387
|
+
return control === "display" ? /* @__PURE__ */ jsx55(DisplayHeading, { size, text, className }) : /* @__PURE__ */ jsx55(StandardHeading, { size, text, className });
|
|
4231
4388
|
}
|
|
4232
4389
|
function DisplayHeading({ size, text, className }) {
|
|
4233
|
-
return /* @__PURE__ */
|
|
4390
|
+
return /* @__PURE__ */ jsx55(Display, { type: getDisplayType(size), className, children: text });
|
|
4234
4391
|
}
|
|
4235
4392
|
var getDisplayType = (size) => {
|
|
4236
4393
|
switch (size) {
|
|
@@ -4246,7 +4403,7 @@ var getDisplayType = (size) => {
|
|
|
4246
4403
|
}
|
|
4247
4404
|
};
|
|
4248
4405
|
function StandardHeading({ size, text, className }) {
|
|
4249
|
-
return /* @__PURE__ */
|
|
4406
|
+
return /* @__PURE__ */ jsx55(Title, { type: getTitleTypeBySize(size), className, children: text });
|
|
4250
4407
|
}
|
|
4251
4408
|
var getTitleTypeBySize = (size) => {
|
|
4252
4409
|
var _a;
|
|
@@ -4262,9 +4419,9 @@ var getTitleTypeBySize = (size) => {
|
|
|
4262
4419
|
var HeadingRenderer_default = HeadingRenderer;
|
|
4263
4420
|
|
|
4264
4421
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
4265
|
-
var
|
|
4422
|
+
var import_classnames16 = __toESM(require_classnames());
|
|
4266
4423
|
import { Image } from "@transferwise/components";
|
|
4267
|
-
import { useEffect as useEffect10, useState as
|
|
4424
|
+
import { useEffect as useEffect10, useState as useState12 } from "react";
|
|
4268
4425
|
|
|
4269
4426
|
// ../renderers/src/utils/api-utils.ts
|
|
4270
4427
|
function isRelativePath(url = "") {
|
|
@@ -4274,7 +4431,7 @@ function isRelativePath(url = "") {
|
|
|
4274
4431
|
}
|
|
4275
4432
|
|
|
4276
4433
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
4277
|
-
import { jsx as
|
|
4434
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
4278
4435
|
function UrlImage({
|
|
4279
4436
|
accessibilityDescription,
|
|
4280
4437
|
align,
|
|
@@ -4285,23 +4442,23 @@ function UrlImage({
|
|
|
4285
4442
|
uri,
|
|
4286
4443
|
httpClient
|
|
4287
4444
|
}) {
|
|
4288
|
-
const [imageSource, setImageSource] =
|
|
4445
|
+
const [imageSource, setImageSource] = useState12("");
|
|
4289
4446
|
useEffect10(() => {
|
|
4290
4447
|
if (!uri.startsWith("urn:")) {
|
|
4291
4448
|
void getImageSource(httpClient, uri).then(setImageSource);
|
|
4292
4449
|
}
|
|
4293
4450
|
}, [uri, httpClient]);
|
|
4294
|
-
return /* @__PURE__ */
|
|
4451
|
+
return /* @__PURE__ */ jsx56(
|
|
4295
4452
|
"div",
|
|
4296
4453
|
{
|
|
4297
|
-
className: (0,
|
|
4454
|
+
className: (0, import_classnames16.default)(
|
|
4298
4455
|
"df-image",
|
|
4299
4456
|
align,
|
|
4300
4457
|
size || "md",
|
|
4301
4458
|
getMargin(margin),
|
|
4302
4459
|
controlAndTagsToCSSClass({ control, tags })
|
|
4303
4460
|
),
|
|
4304
|
-
children: /* @__PURE__ */
|
|
4461
|
+
children: /* @__PURE__ */ jsx56(
|
|
4305
4462
|
Image,
|
|
4306
4463
|
{
|
|
4307
4464
|
className: "df-reserve-space",
|
|
@@ -4347,19 +4504,19 @@ var getImageSource = async (httpClient, imageUrl) => {
|
|
|
4347
4504
|
};
|
|
4348
4505
|
|
|
4349
4506
|
// ../renderers/src/ImageRenderer/ImageRenderer.tsx
|
|
4350
|
-
import { jsx as
|
|
4507
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
4351
4508
|
var ImageRenderer = {
|
|
4352
4509
|
canRenderType: "image",
|
|
4353
|
-
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */
|
|
4510
|
+
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ jsx57(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ jsx57(UrlImage, __spreadValues({}, props))
|
|
4354
4511
|
};
|
|
4355
4512
|
|
|
4356
4513
|
// ../renderers/src/ImageRenderer/index.tsx
|
|
4357
4514
|
var ImageRenderer_default = ImageRenderer;
|
|
4358
4515
|
|
|
4359
4516
|
// ../renderers/src/InstructionsRenderer.tsx
|
|
4360
|
-
var
|
|
4517
|
+
var import_classnames17 = __toESM(require_classnames());
|
|
4361
4518
|
import { Header as Header5, InstructionsList } from "@transferwise/components";
|
|
4362
|
-
import { jsx as
|
|
4519
|
+
import { jsx as jsx58, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4363
4520
|
var doContext = ["positive", "neutral", "proposition"];
|
|
4364
4521
|
var dontContext = ["warning", "negative"];
|
|
4365
4522
|
var InstructionsRenderer = {
|
|
@@ -4367,9 +4524,9 @@ var InstructionsRenderer = {
|
|
|
4367
4524
|
render: ({ items, margin, title, control, tags }) => {
|
|
4368
4525
|
const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
|
|
4369
4526
|
const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
|
|
4370
|
-
return /* @__PURE__ */ jsxs14("div", { className: (0,
|
|
4371
|
-
title ? /* @__PURE__ */
|
|
4372
|
-
/* @__PURE__ */
|
|
4527
|
+
return /* @__PURE__ */ jsxs14("div", { className: (0, import_classnames17.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
4528
|
+
title ? /* @__PURE__ */ jsx58(Header5, { title }) : null,
|
|
4529
|
+
/* @__PURE__ */ jsx58(InstructionsList, { dos, donts })
|
|
4373
4530
|
] });
|
|
4374
4531
|
}
|
|
4375
4532
|
};
|
|
@@ -4401,7 +4558,7 @@ function pick(obj, ...keys) {
|
|
|
4401
4558
|
}
|
|
4402
4559
|
|
|
4403
4560
|
// ../renderers/src/IntegerInputRenderer.tsx
|
|
4404
|
-
import { jsx as
|
|
4561
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
4405
4562
|
var IntegerInputRenderer = {
|
|
4406
4563
|
canRenderType: "input-integer",
|
|
4407
4564
|
render: (props) => {
|
|
@@ -4416,7 +4573,7 @@ var IntegerInputRenderer = {
|
|
|
4416
4573
|
"maximum",
|
|
4417
4574
|
"minimum"
|
|
4418
4575
|
);
|
|
4419
|
-
return /* @__PURE__ */
|
|
4576
|
+
return /* @__PURE__ */ jsx59(
|
|
4420
4577
|
FieldInput_default,
|
|
4421
4578
|
{
|
|
4422
4579
|
id,
|
|
@@ -4429,7 +4586,7 @@ var IntegerInputRenderer = {
|
|
|
4429
4586
|
features: props.features,
|
|
4430
4587
|
control: props.control,
|
|
4431
4588
|
tags: props.tags,
|
|
4432
|
-
children: /* @__PURE__ */
|
|
4589
|
+
children: /* @__PURE__ */ jsx59(InputGroup2, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx59(
|
|
4433
4590
|
Input2,
|
|
4434
4591
|
__spreadValues({
|
|
4435
4592
|
id,
|
|
@@ -4452,13 +4609,13 @@ var IntegerInputRenderer = {
|
|
|
4452
4609
|
var IntegerInputRenderer_default = IntegerInputRenderer;
|
|
4453
4610
|
|
|
4454
4611
|
// ../renderers/src/ListRenderer.tsx
|
|
4455
|
-
var
|
|
4612
|
+
var import_classnames18 = __toESM(require_classnames());
|
|
4456
4613
|
import { ListItem as ListItem8 } from "@transferwise/components";
|
|
4457
4614
|
|
|
4458
4615
|
// ../renderers/src/components/Header.tsx
|
|
4459
4616
|
import { Header as DSHeader } from "@transferwise/components";
|
|
4460
|
-
import { jsx as
|
|
4461
|
-
var Header = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */
|
|
4617
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
4618
|
+
var Header = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ jsx60(DSHeader, { title: title != null ? title : "", action: getHeaderAction(callToAction) });
|
|
4462
4619
|
var getHeaderAction = (callToAction) => {
|
|
4463
4620
|
if (!callToAction) {
|
|
4464
4621
|
return void 0;
|
|
@@ -4470,11 +4627,11 @@ var getHeaderAction = (callToAction) => {
|
|
|
4470
4627
|
};
|
|
4471
4628
|
|
|
4472
4629
|
// ../renderers/src/ListRenderer.tsx
|
|
4473
|
-
import { jsx as
|
|
4630
|
+
import { jsx as jsx61, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4474
4631
|
var ListRenderer = {
|
|
4475
4632
|
canRenderType: "list",
|
|
4476
|
-
render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ jsxs15("div", { className: (0,
|
|
4477
|
-
/* @__PURE__ */
|
|
4633
|
+
render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ jsxs15("div", { className: (0, import_classnames18.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
4634
|
+
/* @__PURE__ */ jsx61(Header, { title, callToAction }),
|
|
4478
4635
|
items.map((item) => {
|
|
4479
4636
|
var _a, _b;
|
|
4480
4637
|
const {
|
|
@@ -4491,7 +4648,7 @@ var ListRenderer = {
|
|
|
4491
4648
|
ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
|
|
4492
4649
|
fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
|
|
4493
4650
|
};
|
|
4494
|
-
return /* @__PURE__ */
|
|
4651
|
+
return /* @__PURE__ */ jsx61(
|
|
4495
4652
|
ListItem8,
|
|
4496
4653
|
{
|
|
4497
4654
|
title: itemTitle,
|
|
@@ -4511,17 +4668,17 @@ var ListRenderer = {
|
|
|
4511
4668
|
var ListRenderer_default = ListRenderer;
|
|
4512
4669
|
|
|
4513
4670
|
// ../renderers/src/LoadingIndicatorRenderer.tsx
|
|
4514
|
-
var
|
|
4671
|
+
var import_classnames19 = __toESM(require_classnames());
|
|
4515
4672
|
import { Loader } from "@transferwise/components";
|
|
4516
|
-
import { jsx as
|
|
4673
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
4517
4674
|
var LoadingIndicatorRenderer = {
|
|
4518
4675
|
canRenderType: "loading-indicator",
|
|
4519
|
-
render: ({ size, margin, control, tags }) => /* @__PURE__ */
|
|
4676
|
+
render: ({ size, margin, control, tags }) => /* @__PURE__ */ jsx62(
|
|
4520
4677
|
Loader,
|
|
4521
4678
|
{
|
|
4522
4679
|
size,
|
|
4523
4680
|
classNames: {
|
|
4524
|
-
"tw-loader": (0,
|
|
4681
|
+
"tw-loader": (0, import_classnames19.default)(
|
|
4525
4682
|
"tw-loader",
|
|
4526
4683
|
"m-x-auto",
|
|
4527
4684
|
getMargin(margin),
|
|
@@ -4535,24 +4692,24 @@ var LoadingIndicatorRenderer = {
|
|
|
4535
4692
|
var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
|
|
4536
4693
|
|
|
4537
4694
|
// ../renderers/src/MarkdownRenderer.tsx
|
|
4538
|
-
var
|
|
4695
|
+
var import_classnames20 = __toESM(require_classnames());
|
|
4539
4696
|
import { Markdown as Markdown4 } from "@transferwise/components";
|
|
4540
|
-
import { jsx as
|
|
4697
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
4541
4698
|
var MarkdownRenderer = {
|
|
4542
4699
|
canRenderType: "markdown",
|
|
4543
4700
|
render: ({ content, align, margin, size, control, tags }) => {
|
|
4544
4701
|
const isLarge = !["xs", "sm"].includes(size);
|
|
4545
|
-
return /* @__PURE__ */
|
|
4702
|
+
return /* @__PURE__ */ jsx63(
|
|
4546
4703
|
"div",
|
|
4547
4704
|
{
|
|
4548
|
-
className: (0,
|
|
4705
|
+
className: (0, import_classnames20.default)(
|
|
4549
4706
|
getTextAlignmentAndMargin({ align, margin }),
|
|
4550
4707
|
controlAndTagsToCSSClass({ control, tags })
|
|
4551
4708
|
),
|
|
4552
|
-
children: /* @__PURE__ */
|
|
4709
|
+
children: /* @__PURE__ */ jsx63(
|
|
4553
4710
|
Markdown4,
|
|
4554
4711
|
{
|
|
4555
|
-
className: (0,
|
|
4712
|
+
className: (0, import_classnames20.default)("df-markdown", {
|
|
4556
4713
|
"np-text-body-large": isLarge,
|
|
4557
4714
|
"np-text-body-default": !isLarge
|
|
4558
4715
|
}),
|
|
@@ -4567,17 +4724,17 @@ var MarkdownRenderer = {
|
|
|
4567
4724
|
var MarkdownRenderer_default = MarkdownRenderer;
|
|
4568
4725
|
|
|
4569
4726
|
// ../renderers/src/MediaRenderer.tsx
|
|
4570
|
-
var
|
|
4571
|
-
import { jsx as
|
|
4727
|
+
var import_classnames21 = __toESM(require_classnames());
|
|
4728
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
4572
4729
|
var MediaRenderer = {
|
|
4573
4730
|
canRenderType: "media",
|
|
4574
4731
|
render: (_a) => {
|
|
4575
4732
|
var _b = _a, { media } = _b, rest = __objRest(_b, ["media"]);
|
|
4576
4733
|
switch (media.type) {
|
|
4577
4734
|
case "avatar":
|
|
4578
|
-
return /* @__PURE__ */
|
|
4735
|
+
return /* @__PURE__ */ jsx64(AvatarMediaRendererComponent, __spreadValues({ media }, rest));
|
|
4579
4736
|
case "image":
|
|
4580
|
-
return /* @__PURE__ */
|
|
4737
|
+
return /* @__PURE__ */ jsx64(ImageMediaRendererComponent, __spreadValues({ media }, rest));
|
|
4581
4738
|
case "legacy":
|
|
4582
4739
|
return null;
|
|
4583
4740
|
}
|
|
@@ -4591,16 +4748,16 @@ var AvatarMediaRendererComponent = ({
|
|
|
4591
4748
|
control,
|
|
4592
4749
|
tags
|
|
4593
4750
|
}) => {
|
|
4594
|
-
return /* @__PURE__ */
|
|
4751
|
+
return /* @__PURE__ */ jsx64(
|
|
4595
4752
|
"div",
|
|
4596
4753
|
{
|
|
4597
|
-
className: (0,
|
|
4754
|
+
className: (0, import_classnames21.default)(
|
|
4598
4755
|
"df-media-layout-avatar",
|
|
4599
4756
|
align,
|
|
4600
4757
|
getMargin(margin),
|
|
4601
4758
|
controlAndTagsToCSSClass({ control, tags })
|
|
4602
4759
|
),
|
|
4603
|
-
children: /* @__PURE__ */
|
|
4760
|
+
children: /* @__PURE__ */ jsx64(Media, { media, size: mapAvatarMediaSize(size) })
|
|
4604
4761
|
}
|
|
4605
4762
|
);
|
|
4606
4763
|
};
|
|
@@ -4610,7 +4767,7 @@ var ImageMediaRendererComponent = (_a) => {
|
|
|
4610
4767
|
} = _b, rest = __objRest(_b, [
|
|
4611
4768
|
"media"
|
|
4612
4769
|
]);
|
|
4613
|
-
return isUrnImage(media.uri) ? /* @__PURE__ */
|
|
4770
|
+
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
4771
|
};
|
|
4615
4772
|
var mapAvatarMediaSize = (size) => {
|
|
4616
4773
|
switch (size) {
|
|
@@ -4628,21 +4785,21 @@ var mapAvatarMediaSize = (size) => {
|
|
|
4628
4785
|
};
|
|
4629
4786
|
|
|
4630
4787
|
// ../renderers/src/ModalLayoutRenderer.tsx
|
|
4631
|
-
var
|
|
4788
|
+
var import_classnames22 = __toESM(require_classnames());
|
|
4632
4789
|
import { Button as Button6, Modal as Modal2 } from "@transferwise/components";
|
|
4633
|
-
import { useState as
|
|
4634
|
-
import { jsx as
|
|
4790
|
+
import { useState as useState13 } from "react";
|
|
4791
|
+
import { jsx as jsx65, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4635
4792
|
var ModalLayoutRenderer = {
|
|
4636
4793
|
canRenderType: "modal-layout",
|
|
4637
|
-
render: (props) => /* @__PURE__ */
|
|
4794
|
+
render: (props) => /* @__PURE__ */ jsx65(DFModal, __spreadValues({}, props))
|
|
4638
4795
|
};
|
|
4639
4796
|
var ModalLayoutRenderer_default = ModalLayoutRenderer;
|
|
4640
4797
|
function DFModal({ content, margin, trigger, control, tags }) {
|
|
4641
|
-
const [visible, setVisible] =
|
|
4798
|
+
const [visible, setVisible] = useState13(false);
|
|
4642
4799
|
const { children, title } = content;
|
|
4643
|
-
return /* @__PURE__ */ jsxs16("div", { className: (0,
|
|
4644
|
-
/* @__PURE__ */
|
|
4645
|
-
/* @__PURE__ */
|
|
4800
|
+
return /* @__PURE__ */ jsxs16("div", { className: (0, import_classnames22.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
4801
|
+
/* @__PURE__ */ jsx65(Button6, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
|
|
4802
|
+
/* @__PURE__ */ jsx65(
|
|
4646
4803
|
Modal2,
|
|
4647
4804
|
{
|
|
4648
4805
|
scroll: "content",
|
|
@@ -4658,11 +4815,11 @@ function DFModal({ content, margin, trigger, control, tags }) {
|
|
|
4658
4815
|
|
|
4659
4816
|
// ../renderers/src/ModalRenderer.tsx
|
|
4660
4817
|
import { Modal as Modal3 } from "@transferwise/components";
|
|
4661
|
-
import { jsx as
|
|
4818
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
4662
4819
|
var ModalRenderer = {
|
|
4663
4820
|
canRenderType: "modal",
|
|
4664
4821
|
render: ({ title, children, open, onClose, control, tags }) => {
|
|
4665
|
-
return /* @__PURE__ */
|
|
4822
|
+
return /* @__PURE__ */ jsx66(
|
|
4666
4823
|
Modal3,
|
|
4667
4824
|
{
|
|
4668
4825
|
open,
|
|
@@ -4679,7 +4836,7 @@ var ModalRenderer = {
|
|
|
4679
4836
|
import { MoneyInput } from "@transferwise/components";
|
|
4680
4837
|
import { useEffect as useEffect11 } from "react";
|
|
4681
4838
|
import { useIntl as useIntl11 } from "react-intl";
|
|
4682
|
-
import { jsx as
|
|
4839
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
4683
4840
|
var groupingTags2 = Object.keys(group_messages_default).filter((key) => key !== "all");
|
|
4684
4841
|
var MoneyInputRenderer = {
|
|
4685
4842
|
canRenderType: "money-input",
|
|
@@ -4709,7 +4866,7 @@ function MoneyInputRendererComponent(props) {
|
|
|
4709
4866
|
}
|
|
4710
4867
|
}, [selectedCurrencyIndex, onCurrencyChange, currencies.length]);
|
|
4711
4868
|
const { formatMessage } = useIntl11();
|
|
4712
|
-
return /* @__PURE__ */
|
|
4869
|
+
return /* @__PURE__ */ jsx67(
|
|
4713
4870
|
FieldInput_default,
|
|
4714
4871
|
{
|
|
4715
4872
|
id: uid,
|
|
@@ -4720,7 +4877,7 @@ function MoneyInputRendererComponent(props) {
|
|
|
4720
4877
|
features,
|
|
4721
4878
|
control,
|
|
4722
4879
|
tags,
|
|
4723
|
-
children: /* @__PURE__ */
|
|
4880
|
+
children: /* @__PURE__ */ jsx67(
|
|
4724
4881
|
MoneyInput,
|
|
4725
4882
|
{
|
|
4726
4883
|
amount: parseFloatOrNull(amountValue),
|
|
@@ -4783,7 +4940,7 @@ function assertCurrencyCodeIsString(currencyCode) {
|
|
|
4783
4940
|
|
|
4784
4941
|
// ../renderers/src/MultiSelectInputRenderer/InlineComponent.tsx
|
|
4785
4942
|
import { ListItem as ListItem9, SearchInput as SearchInput2 } from "@transferwise/components";
|
|
4786
|
-
import { useState as
|
|
4943
|
+
import { useState as useState14 } from "react";
|
|
4787
4944
|
import { useIntl as useIntl12 } from "react-intl";
|
|
4788
4945
|
|
|
4789
4946
|
// ../renderers/src/utils/items-with-index.ts
|
|
@@ -4792,7 +4949,7 @@ var zipWithIndex = (items) => items.map((item, index) => __spreadProps(__spreadV
|
|
|
4792
4949
|
}));
|
|
4793
4950
|
|
|
4794
4951
|
// ../renderers/src/MultiSelectInputRenderer/InlineComponent.tsx
|
|
4795
|
-
import { Fragment as Fragment8, jsx as
|
|
4952
|
+
import { Fragment as Fragment8, jsx as jsx68, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4796
4953
|
function InlineComponent(props) {
|
|
4797
4954
|
const {
|
|
4798
4955
|
id,
|
|
@@ -4809,12 +4966,12 @@ function InlineComponent(props) {
|
|
|
4809
4966
|
onSelect
|
|
4810
4967
|
} = props;
|
|
4811
4968
|
const optionsWithIndex = zipWithIndex(options);
|
|
4812
|
-
const [query, setQuery] =
|
|
4969
|
+
const [query, setQuery] = useState14("");
|
|
4813
4970
|
const { formatMessage } = useIntl12();
|
|
4814
4971
|
const filtered = tags == null ? void 0 : tags.includes("filtered");
|
|
4815
4972
|
const filteredOptions = query ? filterAndSortItems(optionsWithIndex, filtered ? query : "") : optionsWithIndex;
|
|
4816
4973
|
return /* @__PURE__ */ jsxs17(Fragment8, { children: [
|
|
4817
|
-
filtered && /* @__PURE__ */
|
|
4974
|
+
filtered && /* @__PURE__ */ jsx68(
|
|
4818
4975
|
SearchInput2,
|
|
4819
4976
|
{
|
|
4820
4977
|
placeholder: formatMessage(filter_messages_default.placeholder),
|
|
@@ -4827,7 +4984,7 @@ function InlineComponent(props) {
|
|
|
4827
4984
|
}
|
|
4828
4985
|
}
|
|
4829
4986
|
),
|
|
4830
|
-
/* @__PURE__ */
|
|
4987
|
+
/* @__PURE__ */ jsx68(
|
|
4831
4988
|
FieldInput_default,
|
|
4832
4989
|
{
|
|
4833
4990
|
id,
|
|
@@ -4852,7 +5009,7 @@ function InlineComponent(props) {
|
|
|
4852
5009
|
childrenProps
|
|
4853
5010
|
} = option;
|
|
4854
5011
|
const key = (_a = childrenProps == null ? void 0 : childrenProps.uid) != null ? _a : index;
|
|
4855
|
-
return /* @__PURE__ */
|
|
5012
|
+
return /* @__PURE__ */ jsx68(
|
|
4856
5013
|
ListItem9,
|
|
4857
5014
|
{
|
|
4858
5015
|
title: itemTitle,
|
|
@@ -4861,9 +5018,9 @@ function InlineComponent(props) {
|
|
|
4861
5018
|
valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
|
|
4862
5019
|
media: getMedia(media, false),
|
|
4863
5020
|
prompt: getInlineAlert(inlineAlert),
|
|
4864
|
-
additionalInfo: additionalText ? /* @__PURE__ */
|
|
5021
|
+
additionalInfo: additionalText ? /* @__PURE__ */ jsx68(ListItem9.AdditionalInfo, { children: additionalText }) : void 0,
|
|
4865
5022
|
disabled: disabled || optionDisabled,
|
|
4866
|
-
control: /* @__PURE__ */
|
|
5023
|
+
control: /* @__PURE__ */ jsx68(
|
|
4867
5024
|
ListItem9.Checkbox,
|
|
4868
5025
|
{
|
|
4869
5026
|
checked: selectedIndices.includes(index),
|
|
@@ -4884,7 +5041,7 @@ function InlineComponent(props) {
|
|
|
4884
5041
|
|
|
4885
5042
|
// ../renderers/src/MultiSelectInputRenderer/DefaultComponent.tsx
|
|
4886
5043
|
import { SelectInput, SelectInputOptionContent } from "@transferwise/components";
|
|
4887
|
-
import { useState as
|
|
5044
|
+
import { useState as useState15 } from "react";
|
|
4888
5045
|
import { useIntl as useIntl13 } from "react-intl";
|
|
4889
5046
|
|
|
4890
5047
|
// ../renderers/src/messages/multi-select.messages.ts
|
|
@@ -4898,10 +5055,10 @@ var multi_select_messages_default = defineMessages10({
|
|
|
4898
5055
|
});
|
|
4899
5056
|
|
|
4900
5057
|
// ../renderers/src/MultiSelectInputRenderer/DefaultComponent.tsx
|
|
4901
|
-
import { jsx as
|
|
5058
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
4902
5059
|
function DefaultComponent(props) {
|
|
4903
5060
|
const { formatMessage } = useIntl13();
|
|
4904
|
-
const [stagedIndices, setStagedIndices] =
|
|
5061
|
+
const [stagedIndices, setStagedIndices] = useState15();
|
|
4905
5062
|
const {
|
|
4906
5063
|
id,
|
|
4907
5064
|
autoComplete,
|
|
@@ -4942,12 +5099,12 @@ function DefaultComponent(props) {
|
|
|
4942
5099
|
const contentProps = {
|
|
4943
5100
|
title: option.title,
|
|
4944
5101
|
description: option.description,
|
|
4945
|
-
icon: /* @__PURE__ */
|
|
5102
|
+
icon: /* @__PURE__ */ jsx69(OptionMedia, { media: option.media, preferAvatar: false })
|
|
4946
5103
|
};
|
|
4947
|
-
return /* @__PURE__ */
|
|
5104
|
+
return /* @__PURE__ */ jsx69(SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
4948
5105
|
};
|
|
4949
5106
|
const extraProps = { autoComplete };
|
|
4950
|
-
return /* @__PURE__ */
|
|
5107
|
+
return /* @__PURE__ */ jsx69(
|
|
4951
5108
|
FieldInput_default,
|
|
4952
5109
|
{
|
|
4953
5110
|
id,
|
|
@@ -4958,7 +5115,7 @@ function DefaultComponent(props) {
|
|
|
4958
5115
|
features,
|
|
4959
5116
|
control,
|
|
4960
5117
|
tags,
|
|
4961
|
-
children: /* @__PURE__ */
|
|
5118
|
+
children: /* @__PURE__ */ jsx69(
|
|
4962
5119
|
SelectInput,
|
|
4963
5120
|
__spreadValues({
|
|
4964
5121
|
id,
|
|
@@ -4998,7 +5155,7 @@ function DefaultComponent(props) {
|
|
|
4998
5155
|
|
|
4999
5156
|
// ../renderers/src/MultiSelectInputRenderer/InlineCheckboxComponent.tsx
|
|
5000
5157
|
import { Checkbox as Checkbox2 } from "@transferwise/components";
|
|
5001
|
-
import { jsx as
|
|
5158
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
5002
5159
|
function InlineCheckboxComponent(props) {
|
|
5003
5160
|
const {
|
|
5004
5161
|
id,
|
|
@@ -5014,7 +5171,7 @@ function InlineCheckboxComponent(props) {
|
|
|
5014
5171
|
tags,
|
|
5015
5172
|
onSelect
|
|
5016
5173
|
} = props;
|
|
5017
|
-
return /* @__PURE__ */
|
|
5174
|
+
return /* @__PURE__ */ jsx70(
|
|
5018
5175
|
FieldInput_default,
|
|
5019
5176
|
{
|
|
5020
5177
|
id,
|
|
@@ -5045,24 +5202,24 @@ function InlineCheckboxComponent(props) {
|
|
|
5045
5202
|
onSelect(newSelectedIndices);
|
|
5046
5203
|
}
|
|
5047
5204
|
};
|
|
5048
|
-
return /* @__PURE__ */
|
|
5205
|
+
return /* @__PURE__ */ jsx70(Checkbox2, __spreadProps(__spreadValues({}, checkboxProps), { className: "m-t-1" }), key);
|
|
5049
5206
|
})
|
|
5050
5207
|
}
|
|
5051
5208
|
);
|
|
5052
5209
|
}
|
|
5053
5210
|
|
|
5054
5211
|
// ../renderers/src/MultiSelectInputRenderer/MultiSelectInputRenderer.tsx
|
|
5055
|
-
import { jsx as
|
|
5212
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
5056
5213
|
var MultiSelectInputRenderer = {
|
|
5057
5214
|
canRenderType: "input-multi-select",
|
|
5058
5215
|
render: (props) => {
|
|
5059
5216
|
switch (props.control) {
|
|
5060
5217
|
case "inline":
|
|
5061
|
-
return /* @__PURE__ */
|
|
5218
|
+
return /* @__PURE__ */ jsx71(InlineComponent, __spreadValues({}, props));
|
|
5062
5219
|
case "inline-checkbox-group":
|
|
5063
|
-
return /* @__PURE__ */
|
|
5220
|
+
return /* @__PURE__ */ jsx71(InlineCheckboxComponent, __spreadValues({}, props));
|
|
5064
5221
|
default:
|
|
5065
|
-
return /* @__PURE__ */
|
|
5222
|
+
return /* @__PURE__ */ jsx71(DefaultComponent, __spreadValues({}, props));
|
|
5066
5223
|
}
|
|
5067
5224
|
}
|
|
5068
5225
|
};
|
|
@@ -5072,8 +5229,8 @@ import { Status, UploadInput } from "@transferwise/components";
|
|
|
5072
5229
|
|
|
5073
5230
|
// ../renderers/src/components/UploadFieldInput.tsx
|
|
5074
5231
|
import { InlineAlert as InlineAlert2 } from "@transferwise/components";
|
|
5075
|
-
var
|
|
5076
|
-
import { jsx as
|
|
5232
|
+
var import_classnames23 = __toESM(require_classnames());
|
|
5233
|
+
import { jsx as jsx72, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
5077
5234
|
function UploadFieldInput({
|
|
5078
5235
|
id,
|
|
5079
5236
|
children,
|
|
@@ -5085,14 +5242,14 @@ function UploadFieldInput({
|
|
|
5085
5242
|
control,
|
|
5086
5243
|
tags
|
|
5087
5244
|
}) {
|
|
5088
|
-
const labelContent = label && help ? /* @__PURE__ */
|
|
5245
|
+
const labelContent = label && help ? /* @__PURE__ */ jsx72(LabelContentWithHelp, { text: label, help }) : label;
|
|
5089
5246
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
5090
5247
|
const { ref } = useScrollToError(validation, features);
|
|
5091
5248
|
return /* @__PURE__ */ jsxs18(
|
|
5092
5249
|
"div",
|
|
5093
5250
|
{
|
|
5094
5251
|
ref,
|
|
5095
|
-
className: (0,
|
|
5252
|
+
className: (0, import_classnames23.default)(
|
|
5096
5253
|
"form-group d-block",
|
|
5097
5254
|
{
|
|
5098
5255
|
"has-error": (validation == null ? void 0 : validation.status) === "invalid"
|
|
@@ -5100,9 +5257,9 @@ function UploadFieldInput({
|
|
|
5100
5257
|
controlAndTagsToCSSClass({ control, tags })
|
|
5101
5258
|
),
|
|
5102
5259
|
children: [
|
|
5103
|
-
/* @__PURE__ */
|
|
5260
|
+
/* @__PURE__ */ jsx72("label", { htmlFor: id, className: "control-label", children: labelContent }),
|
|
5104
5261
|
children,
|
|
5105
|
-
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */
|
|
5262
|
+
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ jsx72(InlineAlert2, { type: "negative", id: descriptionId, children: validation.message })
|
|
5106
5263
|
]
|
|
5107
5264
|
}
|
|
5108
5265
|
);
|
|
@@ -5137,7 +5294,7 @@ var getSizeLimit = (maxSize) => {
|
|
|
5137
5294
|
};
|
|
5138
5295
|
|
|
5139
5296
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
5140
|
-
import { jsx as
|
|
5297
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
5141
5298
|
var MultiUploadInputRenderer = {
|
|
5142
5299
|
canRenderType: "input-upload-multi",
|
|
5143
5300
|
render: (props) => {
|
|
@@ -5165,7 +5322,7 @@ var MultiUploadInputRenderer = {
|
|
|
5165
5322
|
};
|
|
5166
5323
|
const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
|
|
5167
5324
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
5168
|
-
return /* @__PURE__ */
|
|
5325
|
+
return /* @__PURE__ */ jsx73(
|
|
5169
5326
|
UploadFieldInput_default,
|
|
5170
5327
|
{
|
|
5171
5328
|
id,
|
|
@@ -5176,7 +5333,7 @@ var MultiUploadInputRenderer = {
|
|
|
5176
5333
|
features,
|
|
5177
5334
|
control,
|
|
5178
5335
|
tags,
|
|
5179
|
-
children: /* @__PURE__ */
|
|
5336
|
+
children: /* @__PURE__ */ jsx73(
|
|
5180
5337
|
UploadInput,
|
|
5181
5338
|
{
|
|
5182
5339
|
id,
|
|
@@ -5205,7 +5362,7 @@ var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
|
|
|
5205
5362
|
|
|
5206
5363
|
// ../renderers/src/NumberInputRenderer.tsx
|
|
5207
5364
|
import { Input as Input3, InputGroup as InputGroup3 } from "@transferwise/components";
|
|
5208
|
-
import { jsx as
|
|
5365
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
5209
5366
|
var NumberInputRenderer = {
|
|
5210
5367
|
canRenderType: "input-number",
|
|
5211
5368
|
render: (props) => {
|
|
@@ -5219,7 +5376,7 @@ var NumberInputRenderer = {
|
|
|
5219
5376
|
"maximum",
|
|
5220
5377
|
"minimum"
|
|
5221
5378
|
);
|
|
5222
|
-
return /* @__PURE__ */
|
|
5379
|
+
return /* @__PURE__ */ jsx74(
|
|
5223
5380
|
FieldInput_default,
|
|
5224
5381
|
{
|
|
5225
5382
|
id,
|
|
@@ -5232,7 +5389,7 @@ var NumberInputRenderer = {
|
|
|
5232
5389
|
features: props.features,
|
|
5233
5390
|
control: props.control,
|
|
5234
5391
|
tags: props.tags,
|
|
5235
|
-
children: /* @__PURE__ */
|
|
5392
|
+
children: /* @__PURE__ */ jsx74(InputGroup3, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx74(
|
|
5236
5393
|
Input3,
|
|
5237
5394
|
__spreadValues({
|
|
5238
5395
|
id,
|
|
@@ -5253,7 +5410,7 @@ var NumberInputRenderer = {
|
|
|
5253
5410
|
var NumberInputRenderer_default = NumberInputRenderer;
|
|
5254
5411
|
|
|
5255
5412
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
5256
|
-
var
|
|
5413
|
+
var import_classnames24 = __toESM(require_classnames());
|
|
5257
5414
|
import { Button as Button7, Input as Input4 } from "@transferwise/components";
|
|
5258
5415
|
import { useIntl as useIntl14 } from "react-intl";
|
|
5259
5416
|
|
|
@@ -5282,18 +5439,18 @@ var paragraph_messages_default = defineMessages11({
|
|
|
5282
5439
|
});
|
|
5283
5440
|
|
|
5284
5441
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
5285
|
-
import { jsx as
|
|
5442
|
+
import { jsx as jsx75, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
5286
5443
|
var ParagraphRenderer = {
|
|
5287
5444
|
canRenderType: "paragraph",
|
|
5288
|
-
render: (props) => /* @__PURE__ */
|
|
5445
|
+
render: (props) => /* @__PURE__ */ jsx75(Paragraph, __spreadValues({}, props))
|
|
5289
5446
|
};
|
|
5290
5447
|
function Paragraph(props) {
|
|
5291
5448
|
const { align, control, margin, size, text } = props;
|
|
5292
|
-
const className = (0,
|
|
5449
|
+
const className = (0, import_classnames24.default)(
|
|
5293
5450
|
getTextAlignmentAndMargin({ align, margin }),
|
|
5294
5451
|
controlAndTagsToCSSClass(props)
|
|
5295
5452
|
);
|
|
5296
|
-
return control === "copyable" ? /* @__PURE__ */
|
|
5453
|
+
return control === "copyable" ? /* @__PURE__ */ jsx75(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ jsx75(
|
|
5297
5454
|
"p",
|
|
5298
5455
|
{
|
|
5299
5456
|
className: `${["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large"} ${className}`,
|
|
@@ -5314,33 +5471,33 @@ function CopyableParagraph({
|
|
|
5314
5471
|
};
|
|
5315
5472
|
const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
|
|
5316
5473
|
return /* @__PURE__ */ jsxs19("div", { className, children: [
|
|
5317
|
-
/* @__PURE__ */
|
|
5474
|
+
/* @__PURE__ */ jsx75(
|
|
5318
5475
|
Input4,
|
|
5319
5476
|
{
|
|
5320
5477
|
type: "text",
|
|
5321
5478
|
value: text,
|
|
5322
5479
|
readOnly: true,
|
|
5323
|
-
className: (0,
|
|
5480
|
+
className: (0, import_classnames24.default)("text-ellipsis", inputAlignmentClasses)
|
|
5324
5481
|
}
|
|
5325
5482
|
),
|
|
5326
|
-
/* @__PURE__ */
|
|
5483
|
+
/* @__PURE__ */ jsx75(Button7, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
|
|
5327
5484
|
] });
|
|
5328
5485
|
}
|
|
5329
5486
|
var ParagraphRenderer_default = ParagraphRenderer;
|
|
5330
5487
|
|
|
5331
5488
|
// ../renderers/src/ProgressRenderer.tsx
|
|
5332
|
-
var
|
|
5489
|
+
var import_classnames25 = __toESM(require_classnames());
|
|
5333
5490
|
import { ProgressBar } from "@transferwise/components";
|
|
5334
|
-
import { jsx as
|
|
5491
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
5335
5492
|
var ProgressRenderer = {
|
|
5336
5493
|
canRenderType: "progress",
|
|
5337
5494
|
render: ({ uid, title, help, progress, progressText, margin, description, control, tags }) => {
|
|
5338
|
-
return /* @__PURE__ */
|
|
5495
|
+
return /* @__PURE__ */ jsx76(
|
|
5339
5496
|
ProgressBar,
|
|
5340
5497
|
{
|
|
5341
5498
|
id: uid,
|
|
5342
|
-
className: (0,
|
|
5343
|
-
title: title && help ? /* @__PURE__ */
|
|
5499
|
+
className: (0, import_classnames25.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
|
|
5500
|
+
title: title && help ? /* @__PURE__ */ jsx76(LabelContentWithHelp, { text: title, help }) : title,
|
|
5344
5501
|
description,
|
|
5345
5502
|
progress: {
|
|
5346
5503
|
max: 1,
|
|
@@ -5353,10 +5510,10 @@ var ProgressRenderer = {
|
|
|
5353
5510
|
};
|
|
5354
5511
|
|
|
5355
5512
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
5356
|
-
var
|
|
5513
|
+
var import_classnames26 = __toESM(require_classnames());
|
|
5357
5514
|
import { Button as Button8, Header as Header6, InlineAlert as InlineAlert3, Modal as Modal4, NavigationOption } from "@transferwise/components";
|
|
5358
5515
|
import { Plus } from "@transferwise/icons";
|
|
5359
|
-
import { useState as
|
|
5516
|
+
import { useState as useState16 } from "react";
|
|
5360
5517
|
import { useIntl as useIntl15 } from "react-intl";
|
|
5361
5518
|
|
|
5362
5519
|
// ../renderers/src/messages/repeatable.messages.ts
|
|
@@ -5385,10 +5542,10 @@ var repeatable_messages_default = defineMessages12({
|
|
|
5385
5542
|
});
|
|
5386
5543
|
|
|
5387
5544
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
5388
|
-
import { Fragment as Fragment9, jsx as
|
|
5545
|
+
import { Fragment as Fragment9, jsx as jsx77, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5389
5546
|
var RepeatableRenderer = {
|
|
5390
5547
|
canRenderType: "repeatable",
|
|
5391
|
-
render: (props) => /* @__PURE__ */
|
|
5548
|
+
render: (props) => /* @__PURE__ */ jsx77(Repeatable, __spreadValues({}, props))
|
|
5392
5549
|
};
|
|
5393
5550
|
function Repeatable(props) {
|
|
5394
5551
|
const {
|
|
@@ -5406,7 +5563,7 @@ function Repeatable(props) {
|
|
|
5406
5563
|
onRemove
|
|
5407
5564
|
} = props;
|
|
5408
5565
|
const { formatMessage } = useIntl15();
|
|
5409
|
-
const [openModalType, setOpenModalType] =
|
|
5566
|
+
const [openModalType, setOpenModalType] = useState16(null);
|
|
5410
5567
|
const { ref } = useScrollToError(validationState, features);
|
|
5411
5568
|
const onAddItem = () => {
|
|
5412
5569
|
onAdd();
|
|
@@ -5431,40 +5588,40 @@ function Repeatable(props) {
|
|
|
5431
5588
|
};
|
|
5432
5589
|
return /* @__PURE__ */ jsxs20(Fragment9, { children: [
|
|
5433
5590
|
/* @__PURE__ */ jsxs20("div", { ref, className: controlAndTagsToCSSClass(props), children: [
|
|
5434
|
-
title && /* @__PURE__ */
|
|
5435
|
-
description && /* @__PURE__ */
|
|
5591
|
+
title && /* @__PURE__ */ jsx77(Header6, { title }),
|
|
5592
|
+
description && /* @__PURE__ */ jsx77("p", { children: description }),
|
|
5436
5593
|
/* @__PURE__ */ jsxs20(
|
|
5437
5594
|
"div",
|
|
5438
5595
|
{
|
|
5439
|
-
className: (0,
|
|
5596
|
+
className: (0, import_classnames26.default)("form-group", {
|
|
5440
5597
|
"has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
|
|
5441
5598
|
}),
|
|
5442
5599
|
children: [
|
|
5443
|
-
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */
|
|
5444
|
-
/* @__PURE__ */
|
|
5600
|
+
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx77(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
|
|
5601
|
+
/* @__PURE__ */ jsx77(
|
|
5445
5602
|
NavigationOption,
|
|
5446
5603
|
{
|
|
5447
|
-
media: /* @__PURE__ */
|
|
5604
|
+
media: /* @__PURE__ */ jsx77(Plus, {}),
|
|
5448
5605
|
title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
|
|
5449
5606
|
showMediaAtAllSizes: true,
|
|
5450
5607
|
onClick: () => onAddItem()
|
|
5451
5608
|
}
|
|
5452
5609
|
),
|
|
5453
|
-
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */
|
|
5610
|
+
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx77(InlineAlert3, { type: "negative", children: validationState.message })
|
|
5454
5611
|
]
|
|
5455
5612
|
}
|
|
5456
5613
|
)
|
|
5457
5614
|
] }),
|
|
5458
|
-
/* @__PURE__ */
|
|
5615
|
+
/* @__PURE__ */ jsx77(
|
|
5459
5616
|
Modal4,
|
|
5460
5617
|
{
|
|
5461
5618
|
open: openModalType !== null,
|
|
5462
5619
|
title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
|
|
5463
5620
|
body: /* @__PURE__ */ jsxs20(Fragment9, { children: [
|
|
5464
|
-
/* @__PURE__ */
|
|
5621
|
+
/* @__PURE__ */ jsx77("div", { className: "m-b-2", children: editableItem }),
|
|
5465
5622
|
/* @__PURE__ */ jsxs20("div", { children: [
|
|
5466
|
-
/* @__PURE__ */
|
|
5467
|
-
/* @__PURE__ */
|
|
5623
|
+
/* @__PURE__ */ jsx77(Button8, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
|
|
5624
|
+
/* @__PURE__ */ jsx77(
|
|
5468
5625
|
Button8,
|
|
5469
5626
|
{
|
|
5470
5627
|
v2: true,
|
|
@@ -5486,10 +5643,10 @@ function ItemSummaryOption({
|
|
|
5486
5643
|
item,
|
|
5487
5644
|
onClick
|
|
5488
5645
|
}) {
|
|
5489
|
-
return /* @__PURE__ */
|
|
5646
|
+
return /* @__PURE__ */ jsx77(
|
|
5490
5647
|
NavigationOption,
|
|
5491
5648
|
{
|
|
5492
|
-
media: /* @__PURE__ */
|
|
5649
|
+
media: /* @__PURE__ */ jsx77(OptionMedia, { media: item.media, preferAvatar: false }),
|
|
5493
5650
|
title: item.title,
|
|
5494
5651
|
content: item.description,
|
|
5495
5652
|
showMediaAtAllSizes: true,
|
|
@@ -5501,16 +5658,16 @@ function ItemSummaryOption({
|
|
|
5501
5658
|
var RepeatableRenderer_default = RepeatableRenderer;
|
|
5502
5659
|
|
|
5503
5660
|
// ../renderers/src/ReviewLegacyRenderer.tsx
|
|
5504
|
-
var
|
|
5661
|
+
var import_classnames27 = __toESM(require_classnames());
|
|
5505
5662
|
import { DefinitionList } from "@transferwise/components";
|
|
5506
|
-
import { Fragment as Fragment10, jsx as
|
|
5663
|
+
import { Fragment as Fragment10, jsx as jsx78, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5507
5664
|
var ReviewRenderer = {
|
|
5508
5665
|
canRenderType: "review",
|
|
5509
5666
|
render: ({ callToAction, control, fields, margin, title, trackEvent, tags }) => {
|
|
5510
5667
|
const orientation = mapControlToDefinitionListLayout(control);
|
|
5511
|
-
return /* @__PURE__ */ jsxs21("div", { className: (0,
|
|
5512
|
-
/* @__PURE__ */
|
|
5513
|
-
/* @__PURE__ */
|
|
5668
|
+
return /* @__PURE__ */ jsxs21("div", { className: (0, import_classnames27.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
5669
|
+
/* @__PURE__ */ jsx78(Header, { title, callToAction }),
|
|
5670
|
+
/* @__PURE__ */ jsx78("div", { className: margin, children: /* @__PURE__ */ jsx78(
|
|
5514
5671
|
DefinitionList,
|
|
5515
5672
|
{
|
|
5516
5673
|
layout: orientation,
|
|
@@ -5551,18 +5708,18 @@ var getFieldLabel = (label, help, onClick) => {
|
|
|
5551
5708
|
return /* @__PURE__ */ jsxs21(Fragment10, { children: [
|
|
5552
5709
|
label,
|
|
5553
5710
|
" ",
|
|
5554
|
-
/* @__PURE__ */
|
|
5711
|
+
/* @__PURE__ */ jsx78(Help_default, { help, onClick })
|
|
5555
5712
|
] });
|
|
5556
5713
|
}
|
|
5557
5714
|
return label;
|
|
5558
5715
|
};
|
|
5559
5716
|
|
|
5560
5717
|
// ../renderers/src/ReviewRenderer.tsx
|
|
5561
|
-
var
|
|
5718
|
+
var import_classnames28 = __toESM(require_classnames());
|
|
5562
5719
|
import { ListItem as ListItem10, Markdown as Markdown5, Popover } from "@transferwise/components";
|
|
5563
5720
|
import { QuestionMarkCircle } from "@transferwise/icons";
|
|
5564
5721
|
import { useIntl as useIntl16 } from "react-intl";
|
|
5565
|
-
import { jsx as
|
|
5722
|
+
import { jsx as jsx79, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5566
5723
|
var IGNORED_CONTROLS = [
|
|
5567
5724
|
"horizontal",
|
|
5568
5725
|
"horizontal-end-aligned",
|
|
@@ -5572,7 +5729,7 @@ var IGNORED_CONTROLS = [
|
|
|
5572
5729
|
var ReviewRenderer2 = {
|
|
5573
5730
|
canRenderType: "review",
|
|
5574
5731
|
canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
|
|
5575
|
-
render: (props) => /* @__PURE__ */
|
|
5732
|
+
render: (props) => /* @__PURE__ */ jsx79(Review, __spreadValues({}, props))
|
|
5576
5733
|
};
|
|
5577
5734
|
var Review = ({
|
|
5578
5735
|
callToAction,
|
|
@@ -5584,8 +5741,8 @@ var Review = ({
|
|
|
5584
5741
|
trackEvent
|
|
5585
5742
|
}) => {
|
|
5586
5743
|
const intl = useIntl16();
|
|
5587
|
-
return /* @__PURE__ */ jsxs22("div", { className: (0,
|
|
5588
|
-
/* @__PURE__ */
|
|
5744
|
+
return /* @__PURE__ */ jsxs22("div", { className: (0, import_classnames28.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
5745
|
+
/* @__PURE__ */ jsx79(Header, { title, callToAction }),
|
|
5589
5746
|
fields.map((field) => {
|
|
5590
5747
|
var _a, _b, _c;
|
|
5591
5748
|
const {
|
|
@@ -5603,7 +5760,7 @@ var Review = ({
|
|
|
5603
5760
|
ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
|
|
5604
5761
|
fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
|
|
5605
5762
|
};
|
|
5606
|
-
return /* @__PURE__ */
|
|
5763
|
+
return /* @__PURE__ */ jsx79(
|
|
5607
5764
|
ListItem10,
|
|
5608
5765
|
{
|
|
5609
5766
|
title: value,
|
|
@@ -5624,13 +5781,13 @@ var Review = ({
|
|
|
5624
5781
|
] });
|
|
5625
5782
|
};
|
|
5626
5783
|
var getHelpControl = (help, ariaLabel, onClick) => {
|
|
5627
|
-
return /* @__PURE__ */
|
|
5784
|
+
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
5785
|
};
|
|
5629
5786
|
var ReviewRenderer_default = ReviewRenderer2;
|
|
5630
5787
|
|
|
5631
5788
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
5632
5789
|
import { Input as Input5, InputGroup as InputGroup4, List, ListItem as ListItem11, Markdown as Markdown6 } from "@transferwise/components";
|
|
5633
|
-
import { useState as
|
|
5790
|
+
import { useState as useState17 } from "react";
|
|
5634
5791
|
import { useIntl as useIntl18 } from "react-intl";
|
|
5635
5792
|
|
|
5636
5793
|
// ../renderers/src/messages/search.messages.ts
|
|
@@ -5646,19 +5803,19 @@ var search_messages_default = defineMessages13({
|
|
|
5646
5803
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
5647
5804
|
import { useIntl as useIntl17 } from "react-intl";
|
|
5648
5805
|
import { Link as DSLink2 } from "@transferwise/components";
|
|
5649
|
-
import { jsx as
|
|
5806
|
+
import { jsx as jsx80, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5650
5807
|
function ErrorResult({ state }) {
|
|
5651
5808
|
const intl = useIntl17();
|
|
5652
5809
|
return /* @__PURE__ */ jsxs23("p", { className: "m-t-2", children: [
|
|
5653
5810
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
5654
5811
|
"\xA0",
|
|
5655
|
-
/* @__PURE__ */
|
|
5812
|
+
/* @__PURE__ */ jsx80(DSLink2, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
|
|
5656
5813
|
] });
|
|
5657
5814
|
}
|
|
5658
5815
|
|
|
5659
5816
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
5660
5817
|
import { Search as Search2 } from "@transferwise/icons";
|
|
5661
|
-
import { Fragment as Fragment11, jsx as
|
|
5818
|
+
import { Fragment as Fragment11, jsx as jsx81, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5662
5819
|
function BlockSearchRendererComponent({
|
|
5663
5820
|
id,
|
|
5664
5821
|
hint,
|
|
@@ -5673,10 +5830,10 @@ function BlockSearchRendererComponent({
|
|
|
5673
5830
|
trackEvent,
|
|
5674
5831
|
onChange
|
|
5675
5832
|
}) {
|
|
5676
|
-
const [hasSearched, setHasSearched] =
|
|
5833
|
+
const [hasSearched, setHasSearched] = useState17(false);
|
|
5677
5834
|
const { formatMessage } = useIntl18();
|
|
5678
5835
|
return /* @__PURE__ */ jsxs24("div", { className: getMargin(margin), children: [
|
|
5679
|
-
/* @__PURE__ */
|
|
5836
|
+
/* @__PURE__ */ jsx81(
|
|
5680
5837
|
FieldInput_default,
|
|
5681
5838
|
{
|
|
5682
5839
|
id,
|
|
@@ -5687,7 +5844,7 @@ function BlockSearchRendererComponent({
|
|
|
5687
5844
|
features,
|
|
5688
5845
|
control,
|
|
5689
5846
|
tags,
|
|
5690
|
-
children: /* @__PURE__ */
|
|
5847
|
+
children: /* @__PURE__ */ jsx81(InputGroup4, { addonStart: { content: /* @__PURE__ */ jsx81(Search2, { size: 24 }) }, children: /* @__PURE__ */ jsx81(
|
|
5691
5848
|
Input5,
|
|
5692
5849
|
{
|
|
5693
5850
|
id,
|
|
@@ -5707,7 +5864,7 @@ function BlockSearchRendererComponent({
|
|
|
5707
5864
|
) })
|
|
5708
5865
|
}
|
|
5709
5866
|
),
|
|
5710
|
-
isLoading ? /* @__PURE__ */
|
|
5867
|
+
isLoading ? /* @__PURE__ */ jsx81("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx81(SearchResultContent, { state, trackEvent })
|
|
5711
5868
|
] });
|
|
5712
5869
|
}
|
|
5713
5870
|
function SearchResultContent({
|
|
@@ -5716,9 +5873,9 @@ function SearchResultContent({
|
|
|
5716
5873
|
}) {
|
|
5717
5874
|
switch (state.type) {
|
|
5718
5875
|
case "error":
|
|
5719
|
-
return /* @__PURE__ */
|
|
5876
|
+
return /* @__PURE__ */ jsx81(ErrorResult, { state });
|
|
5720
5877
|
case "results":
|
|
5721
|
-
return /* @__PURE__ */
|
|
5878
|
+
return /* @__PURE__ */ jsx81(SearchResults, { state, trackEvent });
|
|
5722
5879
|
case "layout":
|
|
5723
5880
|
return /* @__PURE__ */ jsxs24(Fragment11, { children: [
|
|
5724
5881
|
" ",
|
|
@@ -5726,28 +5883,28 @@ function SearchResultContent({
|
|
|
5726
5883
|
" "
|
|
5727
5884
|
] });
|
|
5728
5885
|
case "noResults":
|
|
5729
|
-
return /* @__PURE__ */
|
|
5886
|
+
return /* @__PURE__ */ jsx81(EmptySearchResult, { state });
|
|
5730
5887
|
case "pending":
|
|
5731
5888
|
default:
|
|
5732
5889
|
return null;
|
|
5733
5890
|
}
|
|
5734
5891
|
}
|
|
5735
5892
|
function EmptySearchResult({ state }) {
|
|
5736
|
-
return /* @__PURE__ */
|
|
5893
|
+
return /* @__PURE__ */ jsx81(Markdown6, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
5737
5894
|
}
|
|
5738
5895
|
function SearchResults({
|
|
5739
5896
|
state,
|
|
5740
5897
|
trackEvent
|
|
5741
5898
|
}) {
|
|
5742
|
-
return /* @__PURE__ */
|
|
5899
|
+
return /* @__PURE__ */ jsx81(List, { children: state.results.map((result) => {
|
|
5743
5900
|
const { media } = result;
|
|
5744
|
-
return /* @__PURE__ */
|
|
5901
|
+
return /* @__PURE__ */ jsx81(
|
|
5745
5902
|
ListItem11,
|
|
5746
5903
|
{
|
|
5747
5904
|
title: result.title,
|
|
5748
5905
|
subtitle: result.description,
|
|
5749
|
-
media: media ? /* @__PURE__ */
|
|
5750
|
-
control: /* @__PURE__ */
|
|
5906
|
+
media: media ? /* @__PURE__ */ jsx81(OptionMedia, { media, preferAvatar: false }) : void 0,
|
|
5907
|
+
control: /* @__PURE__ */ jsx81(
|
|
5751
5908
|
ListItem11.Navigation,
|
|
5752
5909
|
{
|
|
5753
5910
|
onClick: () => {
|
|
@@ -5768,9 +5925,9 @@ var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
|
|
|
5768
5925
|
// ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
|
|
5769
5926
|
import { Markdown as Markdown7, Typeahead } from "@transferwise/components";
|
|
5770
5927
|
import { Search as Search3 } from "@transferwise/icons";
|
|
5771
|
-
import { useState as
|
|
5928
|
+
import { useState as useState18 } from "react";
|
|
5772
5929
|
import { useIntl as useIntl19 } from "react-intl";
|
|
5773
|
-
import { jsx as
|
|
5930
|
+
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
5774
5931
|
function InlineSearchRenderer({
|
|
5775
5932
|
id,
|
|
5776
5933
|
hint,
|
|
@@ -5784,9 +5941,9 @@ function InlineSearchRenderer({
|
|
|
5784
5941
|
onChange,
|
|
5785
5942
|
trackEvent
|
|
5786
5943
|
}) {
|
|
5787
|
-
const [hasSearched, setHasSearched] =
|
|
5944
|
+
const [hasSearched, setHasSearched] = useState18(false);
|
|
5788
5945
|
const intl = useIntl19();
|
|
5789
|
-
return /* @__PURE__ */
|
|
5946
|
+
return /* @__PURE__ */ jsx82("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx82(
|
|
5790
5947
|
FieldInput_default,
|
|
5791
5948
|
{
|
|
5792
5949
|
id,
|
|
@@ -5797,7 +5954,7 @@ function InlineSearchRenderer({
|
|
|
5797
5954
|
features,
|
|
5798
5955
|
control,
|
|
5799
5956
|
tags,
|
|
5800
|
-
children: /* @__PURE__ */
|
|
5957
|
+
children: /* @__PURE__ */ jsx82(
|
|
5801
5958
|
Typeahead,
|
|
5802
5959
|
{
|
|
5803
5960
|
id: "typeahead-input-id",
|
|
@@ -5806,10 +5963,10 @@ function InlineSearchRenderer({
|
|
|
5806
5963
|
size: "md",
|
|
5807
5964
|
placeholder: hint,
|
|
5808
5965
|
maxHeight: 100,
|
|
5809
|
-
footer: /* @__PURE__ */
|
|
5966
|
+
footer: /* @__PURE__ */ jsx82(TypeaheadFooter, { state, isLoading }),
|
|
5810
5967
|
multiple: false,
|
|
5811
5968
|
clearable: false,
|
|
5812
|
-
addon: /* @__PURE__ */
|
|
5969
|
+
addon: /* @__PURE__ */ jsx82(Search3, { size: 24 }),
|
|
5813
5970
|
options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
|
|
5814
5971
|
minQueryLength: 1,
|
|
5815
5972
|
onChange: (values) => {
|
|
@@ -5848,31 +6005,31 @@ function mapResultToTypeaheadOption(result) {
|
|
|
5848
6005
|
function TypeaheadFooter({ state, isLoading }) {
|
|
5849
6006
|
const { formatMessage } = useIntl19();
|
|
5850
6007
|
if (state.type === "layout") {
|
|
5851
|
-
return /* @__PURE__ */
|
|
6008
|
+
return /* @__PURE__ */ jsx82("div", { className: "m-x-1 m-y-1", children: state.layout });
|
|
5852
6009
|
}
|
|
5853
6010
|
if (state.type === "noResults") {
|
|
5854
|
-
return /* @__PURE__ */
|
|
6011
|
+
return /* @__PURE__ */ jsx82(Markdown7, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
5855
6012
|
}
|
|
5856
6013
|
if (state.type === "error") {
|
|
5857
|
-
return /* @__PURE__ */
|
|
6014
|
+
return /* @__PURE__ */ jsx82("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx82(ErrorResult, { state }) });
|
|
5858
6015
|
}
|
|
5859
6016
|
if (state.type === "pending" || isLoading) {
|
|
5860
|
-
return /* @__PURE__ */
|
|
6017
|
+
return /* @__PURE__ */ jsx82("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
|
|
5861
6018
|
}
|
|
5862
6019
|
return null;
|
|
5863
6020
|
}
|
|
5864
6021
|
var InlineSearchRendererComponent_default = InlineSearchRenderer;
|
|
5865
6022
|
|
|
5866
6023
|
// ../renderers/src/SearchRenderer/SearchRenderer.tsx
|
|
5867
|
-
import { jsx as
|
|
6024
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
5868
6025
|
var SearchRenderer = {
|
|
5869
6026
|
canRenderType: "search",
|
|
5870
|
-
render: (props) => props.control === "inline" ? /* @__PURE__ */
|
|
6027
|
+
render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx83(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx83(BlockSearchRendererComponent_default, __spreadValues({}, props))
|
|
5871
6028
|
};
|
|
5872
6029
|
var SearchRenderer_default = SearchRenderer;
|
|
5873
6030
|
|
|
5874
6031
|
// ../renderers/src/SectionRenderer.tsx
|
|
5875
|
-
var
|
|
6032
|
+
var import_classnames29 = __toESM(require_classnames());
|
|
5876
6033
|
import { Header as Header7 } from "@transferwise/components";
|
|
5877
6034
|
|
|
5878
6035
|
// ../renderers/src/utils/getHeaderAction.tsx
|
|
@@ -5897,16 +6054,16 @@ var getHeaderAction2 = (callToAction) => {
|
|
|
5897
6054
|
};
|
|
5898
6055
|
|
|
5899
6056
|
// ../renderers/src/SectionRenderer.tsx
|
|
5900
|
-
import { jsx as
|
|
6057
|
+
import { jsx as jsx84, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5901
6058
|
var SectionRenderer = {
|
|
5902
6059
|
canRenderType: "section",
|
|
5903
6060
|
render: ({ children, callToAction, margin, title, control, tags }) => {
|
|
5904
6061
|
return /* @__PURE__ */ jsxs25(
|
|
5905
6062
|
"section",
|
|
5906
6063
|
{
|
|
5907
|
-
className: (0,
|
|
6064
|
+
className: (0, import_classnames29.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
|
|
5908
6065
|
children: [
|
|
5909
|
-
(title || callToAction) && /* @__PURE__ */
|
|
6066
|
+
(title || callToAction) && /* @__PURE__ */ jsx84(Header7, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
|
|
5910
6067
|
children
|
|
5911
6068
|
]
|
|
5912
6069
|
}
|
|
@@ -5917,7 +6074,7 @@ var SectionRenderer_default = SectionRenderer;
|
|
|
5917
6074
|
|
|
5918
6075
|
// ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
5919
6076
|
import { RadioGroup } from "@transferwise/components";
|
|
5920
|
-
import { Fragment as Fragment12, jsx as
|
|
6077
|
+
import { Fragment as Fragment12, jsx as jsx85, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5921
6078
|
function RadioInputRendererComponent(props) {
|
|
5922
6079
|
const {
|
|
5923
6080
|
id,
|
|
@@ -5935,7 +6092,7 @@ function RadioInputRendererComponent(props) {
|
|
|
5935
6092
|
onSelect
|
|
5936
6093
|
} = props;
|
|
5937
6094
|
return /* @__PURE__ */ jsxs26(Fragment12, { children: [
|
|
5938
|
-
/* @__PURE__ */
|
|
6095
|
+
/* @__PURE__ */ jsx85(
|
|
5939
6096
|
FieldInput_default,
|
|
5940
6097
|
{
|
|
5941
6098
|
id,
|
|
@@ -5946,7 +6103,7 @@ function RadioInputRendererComponent(props) {
|
|
|
5946
6103
|
features,
|
|
5947
6104
|
control,
|
|
5948
6105
|
tags,
|
|
5949
|
-
children: /* @__PURE__ */
|
|
6106
|
+
children: /* @__PURE__ */ jsx85("span", { children: /* @__PURE__ */ jsx85(
|
|
5950
6107
|
RadioGroup,
|
|
5951
6108
|
{
|
|
5952
6109
|
name: id,
|
|
@@ -5955,7 +6112,7 @@ function RadioInputRendererComponent(props) {
|
|
|
5955
6112
|
value: index,
|
|
5956
6113
|
secondary: option.description,
|
|
5957
6114
|
disabled: option.disabled || disabled,
|
|
5958
|
-
avatar: /* @__PURE__ */
|
|
6115
|
+
avatar: /* @__PURE__ */ jsx85(OptionMedia, { media: option.media, preferAvatar: false })
|
|
5959
6116
|
})),
|
|
5960
6117
|
selectedValue: selectedIndex != null ? selectedIndex : void 0,
|
|
5961
6118
|
onChange: onSelect
|
|
@@ -5971,7 +6128,7 @@ function RadioInputRendererComponent(props) {
|
|
|
5971
6128
|
// ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
5972
6129
|
import { Tabs } from "@transferwise/components";
|
|
5973
6130
|
import { useEffect as useEffect12 } from "react";
|
|
5974
|
-
import { Fragment as Fragment13, jsx as
|
|
6131
|
+
import { Fragment as Fragment13, jsx as jsx86, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5975
6132
|
function TabInputRendererComponent(props) {
|
|
5976
6133
|
const {
|
|
5977
6134
|
id,
|
|
@@ -5994,7 +6151,7 @@ function TabInputRendererComponent(props) {
|
|
|
5994
6151
|
}
|
|
5995
6152
|
}, [selectedIndex, onSelect, options.length]);
|
|
5996
6153
|
return /* @__PURE__ */ jsxs27(Fragment13, { children: [
|
|
5997
|
-
/* @__PURE__ */
|
|
6154
|
+
/* @__PURE__ */ jsx86(
|
|
5998
6155
|
FieldInput_default,
|
|
5999
6156
|
{
|
|
6000
6157
|
id,
|
|
@@ -6005,7 +6162,7 @@ function TabInputRendererComponent(props) {
|
|
|
6005
6162
|
features,
|
|
6006
6163
|
control,
|
|
6007
6164
|
tags,
|
|
6008
|
-
children: /* @__PURE__ */
|
|
6165
|
+
children: /* @__PURE__ */ jsx86(
|
|
6009
6166
|
Tabs,
|
|
6010
6167
|
{
|
|
6011
6168
|
name: id,
|
|
@@ -6014,7 +6171,7 @@ function TabInputRendererComponent(props) {
|
|
|
6014
6171
|
title: option.title,
|
|
6015
6172
|
// if we pass null, we get some props-types console errors
|
|
6016
6173
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
6017
|
-
content: /* @__PURE__ */
|
|
6174
|
+
content: /* @__PURE__ */ jsx86(Fragment13, {}),
|
|
6018
6175
|
disabled: option.disabled || disabled
|
|
6019
6176
|
})),
|
|
6020
6177
|
onTabSelect: onSelect
|
|
@@ -6029,7 +6186,7 @@ var isValidIndex2 = (index, options) => index !== null && index >= 0 && index <
|
|
|
6029
6186
|
|
|
6030
6187
|
// ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
6031
6188
|
import { SelectInput as SelectInput2, SelectInputOptionContent as SelectInputOptionContent2 } from "@transferwise/components";
|
|
6032
|
-
import { Fragment as Fragment14, jsx as
|
|
6189
|
+
import { Fragment as Fragment14, jsx as jsx87, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6033
6190
|
function SelectInputRendererComponent(props) {
|
|
6034
6191
|
const {
|
|
6035
6192
|
id,
|
|
@@ -6072,13 +6229,13 @@ function SelectInputRendererComponent(props) {
|
|
|
6072
6229
|
} : {
|
|
6073
6230
|
title: option.title,
|
|
6074
6231
|
description: option.description,
|
|
6075
|
-
icon: /* @__PURE__ */
|
|
6232
|
+
icon: /* @__PURE__ */ jsx87(OptionMedia, { media: option.media, preferAvatar: false })
|
|
6076
6233
|
};
|
|
6077
|
-
return /* @__PURE__ */
|
|
6234
|
+
return /* @__PURE__ */ jsx87(SelectInputOptionContent2, __spreadValues({}, contentProps));
|
|
6078
6235
|
};
|
|
6079
6236
|
const extraProps = { autoComplete };
|
|
6080
6237
|
return /* @__PURE__ */ jsxs28(Fragment14, { children: [
|
|
6081
|
-
/* @__PURE__ */
|
|
6238
|
+
/* @__PURE__ */ jsx87(
|
|
6082
6239
|
FieldInput_default,
|
|
6083
6240
|
{
|
|
6084
6241
|
id,
|
|
@@ -6089,7 +6246,7 @@ function SelectInputRendererComponent(props) {
|
|
|
6089
6246
|
features,
|
|
6090
6247
|
control,
|
|
6091
6248
|
tags,
|
|
6092
|
-
children: /* @__PURE__ */
|
|
6249
|
+
children: /* @__PURE__ */ jsx87(
|
|
6093
6250
|
SelectInput2,
|
|
6094
6251
|
__spreadValues({
|
|
6095
6252
|
name: id,
|
|
@@ -6112,7 +6269,7 @@ function SelectInputRendererComponent(props) {
|
|
|
6112
6269
|
// ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
|
|
6113
6270
|
import { useEffect as useEffect13 } from "react";
|
|
6114
6271
|
import { SegmentedControl } from "@transferwise/components";
|
|
6115
|
-
import { Fragment as Fragment15, jsx as
|
|
6272
|
+
import { Fragment as Fragment15, jsx as jsx88, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6116
6273
|
function SegmentedInputRendererComponent(props) {
|
|
6117
6274
|
const {
|
|
6118
6275
|
id,
|
|
@@ -6134,7 +6291,7 @@ function SegmentedInputRendererComponent(props) {
|
|
|
6134
6291
|
}
|
|
6135
6292
|
}, [selectedIndex, onSelect, options.length]);
|
|
6136
6293
|
return /* @__PURE__ */ jsxs29(Fragment15, { children: [
|
|
6137
|
-
/* @__PURE__ */
|
|
6294
|
+
/* @__PURE__ */ jsx88(
|
|
6138
6295
|
FieldInput_default,
|
|
6139
6296
|
{
|
|
6140
6297
|
id,
|
|
@@ -6145,7 +6302,7 @@ function SegmentedInputRendererComponent(props) {
|
|
|
6145
6302
|
features,
|
|
6146
6303
|
control,
|
|
6147
6304
|
tags,
|
|
6148
|
-
children: /* @__PURE__ */
|
|
6305
|
+
children: /* @__PURE__ */ jsx88(
|
|
6149
6306
|
SegmentedControl,
|
|
6150
6307
|
{
|
|
6151
6308
|
name: `${id}-segmented-control`,
|
|
@@ -6162,14 +6319,14 @@ function SegmentedInputRendererComponent(props) {
|
|
|
6162
6319
|
)
|
|
6163
6320
|
}
|
|
6164
6321
|
),
|
|
6165
|
-
/* @__PURE__ */
|
|
6322
|
+
/* @__PURE__ */ jsx88("div", { id: `${id}-children`, children })
|
|
6166
6323
|
] });
|
|
6167
6324
|
}
|
|
6168
6325
|
var isValidIndex3 = (index, options) => index !== null && index >= 0 && index < options;
|
|
6169
6326
|
|
|
6170
6327
|
// ../renderers/src/SelectInputRenderer/RadioItemRendererComponent.tsx
|
|
6171
6328
|
import { Header as Header8, InlineAlert as InlineAlert4, List as List2, ListItem as ListItem12 } from "@transferwise/components";
|
|
6172
|
-
import { jsx as
|
|
6329
|
+
import { jsx as jsx89, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6173
6330
|
function RadioItemRendererComponent(props) {
|
|
6174
6331
|
const {
|
|
6175
6332
|
id,
|
|
@@ -6186,21 +6343,21 @@ function RadioItemRendererComponent(props) {
|
|
|
6186
6343
|
} = props;
|
|
6187
6344
|
const { ref } = useScrollToError(validationState, features);
|
|
6188
6345
|
return /* @__PURE__ */ jsxs30("div", { ref, className: controlAndTagsToCSSClass(props), children: [
|
|
6189
|
-
rootTitle && /* @__PURE__ */
|
|
6346
|
+
rootTitle && /* @__PURE__ */ jsx89(
|
|
6190
6347
|
Header8,
|
|
6191
6348
|
{
|
|
6192
6349
|
as: "h2",
|
|
6193
|
-
title: help ? /* @__PURE__ */
|
|
6350
|
+
title: help ? /* @__PURE__ */ jsx89(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
|
|
6194
6351
|
}
|
|
6195
6352
|
),
|
|
6196
|
-
rootDescription && /* @__PURE__ */
|
|
6197
|
-
/* @__PURE__ */
|
|
6198
|
-
({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */
|
|
6353
|
+
rootDescription && /* @__PURE__ */ jsx89("p", { children: rootDescription }),
|
|
6354
|
+
/* @__PURE__ */ jsx89(List2, { children: options.map(
|
|
6355
|
+
({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ jsx89(
|
|
6199
6356
|
ListItem12,
|
|
6200
6357
|
__spreadValues({
|
|
6201
6358
|
title,
|
|
6202
6359
|
subtitle: description,
|
|
6203
|
-
control: /* @__PURE__ */
|
|
6360
|
+
control: /* @__PURE__ */ jsx89(
|
|
6204
6361
|
ListItem12.Radio,
|
|
6205
6362
|
{
|
|
6206
6363
|
name: title,
|
|
@@ -6216,50 +6373,50 @@ function RadioItemRendererComponent(props) {
|
|
|
6216
6373
|
title
|
|
6217
6374
|
)
|
|
6218
6375
|
) }, `${id}-${selectedIndex}`),
|
|
6219
|
-
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */
|
|
6376
|
+
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx89(InlineAlert4, { type: "negative", children: validationState.message }),
|
|
6220
6377
|
children
|
|
6221
6378
|
] });
|
|
6222
6379
|
}
|
|
6223
6380
|
|
|
6224
6381
|
// ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
|
|
6225
|
-
import { jsx as
|
|
6382
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
6226
6383
|
var SelectInputRenderer = {
|
|
6227
6384
|
canRenderType: "input-select",
|
|
6228
6385
|
render: (props) => {
|
|
6229
6386
|
switch (props.control) {
|
|
6230
6387
|
case "radio":
|
|
6231
|
-
return /* @__PURE__ */
|
|
6388
|
+
return /* @__PURE__ */ jsx90(RadioInputRendererComponent, __spreadValues({}, props));
|
|
6232
6389
|
case "radio-item":
|
|
6233
|
-
return /* @__PURE__ */
|
|
6390
|
+
return /* @__PURE__ */ jsx90(RadioItemRendererComponent, __spreadValues({}, props));
|
|
6234
6391
|
case "tab":
|
|
6235
|
-
return props.options.length > 3 ? /* @__PURE__ */
|
|
6392
|
+
return props.options.length > 3 ? /* @__PURE__ */ jsx90(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx90(TabInputRendererComponent, __spreadValues({}, props));
|
|
6236
6393
|
case "segmented":
|
|
6237
|
-
return props.options.length > 3 ? /* @__PURE__ */
|
|
6394
|
+
return props.options.length > 3 ? /* @__PURE__ */ jsx90(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx90(SegmentedInputRendererComponent, __spreadValues({}, props));
|
|
6238
6395
|
case "select":
|
|
6239
6396
|
default:
|
|
6240
|
-
return /* @__PURE__ */
|
|
6397
|
+
return /* @__PURE__ */ jsx90(SelectInputRendererComponent, __spreadValues({}, props));
|
|
6241
6398
|
}
|
|
6242
6399
|
}
|
|
6243
6400
|
};
|
|
6244
6401
|
var SelectInputRenderer_default = SelectInputRenderer;
|
|
6245
6402
|
|
|
6246
6403
|
// ../renderers/src/StatusListRenderer.tsx
|
|
6247
|
-
var
|
|
6404
|
+
var import_classnames30 = __toESM(require_classnames());
|
|
6248
6405
|
import { AvatarView as AvatarView4, Header as Header9, ListItem as ListItem13 } from "@transferwise/components";
|
|
6249
|
-
import { jsx as
|
|
6406
|
+
import { jsx as jsx91, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
6250
6407
|
var StatusListRenderer = {
|
|
6251
6408
|
canRenderType: "status-list",
|
|
6252
|
-
render: ({ margin, items, title, control, tags }) => /* @__PURE__ */ jsxs31("div", { className: (0,
|
|
6253
|
-
title ? /* @__PURE__ */
|
|
6409
|
+
render: ({ margin, items, title, control, tags }) => /* @__PURE__ */ jsxs31("div", { className: (0, import_classnames30.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
6410
|
+
title ? /* @__PURE__ */ jsx91(Header9, { title }) : null,
|
|
6254
6411
|
items.map((item) => {
|
|
6255
6412
|
const { callToAction, description, title: itemTitle } = item;
|
|
6256
|
-
return /* @__PURE__ */
|
|
6413
|
+
return /* @__PURE__ */ jsx91(
|
|
6257
6414
|
ListItem13,
|
|
6258
6415
|
{
|
|
6259
6416
|
title: itemTitle,
|
|
6260
6417
|
subtitle: description,
|
|
6261
|
-
media: /* @__PURE__ */
|
|
6262
|
-
additionalInfo: callToAction ? /* @__PURE__ */
|
|
6418
|
+
media: /* @__PURE__ */ jsx91(StatusListItemMedia, __spreadValues({}, item)),
|
|
6419
|
+
additionalInfo: callToAction ? /* @__PURE__ */ jsx91(
|
|
6263
6420
|
ListItem13.AdditionalInfo,
|
|
6264
6421
|
{
|
|
6265
6422
|
action: __spreadValues({
|
|
@@ -6278,10 +6435,10 @@ var StatusListItemMedia = ({ icon, status }) => {
|
|
|
6278
6435
|
return void 0;
|
|
6279
6436
|
}
|
|
6280
6437
|
if ("name" in icon) {
|
|
6281
|
-
return /* @__PURE__ */
|
|
6438
|
+
return /* @__PURE__ */ jsx91(AvatarView4, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ jsx91(DynamicIcon_default, { name: icon.name }) });
|
|
6282
6439
|
}
|
|
6283
6440
|
if ("text" in icon) {
|
|
6284
|
-
return /* @__PURE__ */
|
|
6441
|
+
return /* @__PURE__ */ jsx91(AvatarView4, { badge: { status: mapStatus(status) }, children: icon.text });
|
|
6285
6442
|
}
|
|
6286
6443
|
return void 0;
|
|
6287
6444
|
};
|
|
@@ -6298,7 +6455,7 @@ var mapStatus = (status) => {
|
|
|
6298
6455
|
var StatusListRenderer_default = StatusListRenderer;
|
|
6299
6456
|
|
|
6300
6457
|
// ../renderers/src/step/SplashCelebrationStepRenderer.tsx
|
|
6301
|
-
var
|
|
6458
|
+
var import_classnames31 = __toESM(require_classnames());
|
|
6302
6459
|
|
|
6303
6460
|
// ../renderers/src/utils/useCustomTheme.ts
|
|
6304
6461
|
import { useTheme } from "@wise/components-theming";
|
|
@@ -6320,12 +6477,12 @@ var useCustomTheme = (theme, trackEvent) => {
|
|
|
6320
6477
|
|
|
6321
6478
|
// ../renderers/src/step/StepHeader.tsx
|
|
6322
6479
|
import { Title as Title2 } from "@transferwise/components";
|
|
6323
|
-
import { Fragment as Fragment16, jsx as
|
|
6480
|
+
import { Fragment as Fragment16, jsx as jsx92, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6324
6481
|
var StepHeader = ({ title, description, tags }) => {
|
|
6325
6482
|
const { titleType, alignmentClassName } = getHeaderStyle(tags);
|
|
6326
6483
|
return /* @__PURE__ */ jsxs32(Fragment16, { children: [
|
|
6327
|
-
title ? /* @__PURE__ */
|
|
6328
|
-
description ? /* @__PURE__ */
|
|
6484
|
+
title ? /* @__PURE__ */ jsx92(Title2, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
|
|
6485
|
+
description ? /* @__PURE__ */ jsx92("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
|
|
6329
6486
|
] });
|
|
6330
6487
|
};
|
|
6331
6488
|
var getHeaderStyle = (tags) => {
|
|
@@ -6351,23 +6508,23 @@ var back_messages_default = defineMessages14({
|
|
|
6351
6508
|
});
|
|
6352
6509
|
|
|
6353
6510
|
// ../renderers/src/step/topbar/BackButton.tsx
|
|
6354
|
-
import { jsx as
|
|
6511
|
+
import { jsx as jsx93, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6355
6512
|
function BackButton({ title, onClick }) {
|
|
6356
6513
|
const { formatMessage } = useIntl20();
|
|
6357
6514
|
return /* @__PURE__ */ jsxs33(IconButton2, { className: "df-back-button", priority: "tertiary", onClick, children: [
|
|
6358
|
-
/* @__PURE__ */
|
|
6359
|
-
/* @__PURE__ */
|
|
6515
|
+
/* @__PURE__ */ jsx93("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
|
|
6516
|
+
/* @__PURE__ */ jsx93(ArrowLeft, {})
|
|
6360
6517
|
] });
|
|
6361
6518
|
}
|
|
6362
6519
|
|
|
6363
6520
|
// ../renderers/src/step/topbar/Toolbar.tsx
|
|
6364
6521
|
import { Button as Button9, IconButton as IconButton3 } from "@transferwise/components";
|
|
6365
|
-
import { jsx as
|
|
6522
|
+
import { jsx as jsx94, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6366
6523
|
var Toolbar = ({ items }) => {
|
|
6367
|
-
return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */
|
|
6524
|
+
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
6525
|
};
|
|
6369
6526
|
function ToolbarButton(props) {
|
|
6370
|
-
return prefersMedia(props.control) ? /* @__PURE__ */
|
|
6527
|
+
return prefersMedia(props.control) ? /* @__PURE__ */ jsx94(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ jsx94(TextToolbarButton, __spreadValues({}, props));
|
|
6371
6528
|
}
|
|
6372
6529
|
function MediaToolbarButton(props) {
|
|
6373
6530
|
var _a;
|
|
@@ -6384,7 +6541,7 @@ function MediaToolbarButton(props) {
|
|
|
6384
6541
|
type,
|
|
6385
6542
|
onClick,
|
|
6386
6543
|
children: [
|
|
6387
|
-
accessibilityDescription ? /* @__PURE__ */
|
|
6544
|
+
accessibilityDescription ? /* @__PURE__ */ jsx94("span", { className: "sr-only", children: accessibilityDescription }) : null,
|
|
6388
6545
|
media ? (_a = getAddonStartMedia(media)) == null ? void 0 : _a.value : null
|
|
6389
6546
|
]
|
|
6390
6547
|
}
|
|
@@ -6395,7 +6552,7 @@ function TextToolbarButton(props) {
|
|
|
6395
6552
|
const addonStart = media ? getAddonStartMedia(media) : void 0;
|
|
6396
6553
|
const priority = getPriority2(control);
|
|
6397
6554
|
const sentiment = getSentiment2(context);
|
|
6398
|
-
return /* @__PURE__ */
|
|
6555
|
+
return /* @__PURE__ */ jsx94(
|
|
6399
6556
|
Button9,
|
|
6400
6557
|
{
|
|
6401
6558
|
v2: true,
|
|
@@ -6425,18 +6582,18 @@ var getIconButtonPriority = (control) => {
|
|
|
6425
6582
|
};
|
|
6426
6583
|
|
|
6427
6584
|
// ../renderers/src/step/topbar/TopBar.tsx
|
|
6428
|
-
import { jsx as
|
|
6585
|
+
import { jsx as jsx95, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
6429
6586
|
function TopBar({ back, toolbar, tags }) {
|
|
6430
6587
|
const isBackAllowed = !(tags == null ? void 0 : tags.includes("non-dismissible"));
|
|
6431
6588
|
const backCTA = isBackAllowed ? back : void 0;
|
|
6432
6589
|
return backCTA || toolbar ? /* @__PURE__ */ jsxs35("div", { className: "d-flex m-b-2", children: [
|
|
6433
|
-
backCTA ? /* @__PURE__ */
|
|
6434
|
-
toolbar ? /* @__PURE__ */
|
|
6590
|
+
backCTA ? /* @__PURE__ */ jsx95(BackButton, __spreadValues({}, backCTA)) : null,
|
|
6591
|
+
toolbar ? /* @__PURE__ */ jsx95(Toolbar, __spreadValues({}, toolbar)) : null
|
|
6435
6592
|
] }) : null;
|
|
6436
6593
|
}
|
|
6437
6594
|
|
|
6438
6595
|
// ../renderers/src/step/SplashCelebrationStepRenderer.tsx
|
|
6439
|
-
import { jsx as
|
|
6596
|
+
import { jsx as jsx96, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
6440
6597
|
var SplashCelebrationStepRenderer = {
|
|
6441
6598
|
canRenderType: "step",
|
|
6442
6599
|
canRender: ({ control }) => control === "splash-celebration",
|
|
@@ -6448,20 +6605,20 @@ function SplashCelebrationStepRendererComponent(props) {
|
|
|
6448
6605
|
return /* @__PURE__ */ jsxs36(
|
|
6449
6606
|
"div",
|
|
6450
6607
|
{
|
|
6451
|
-
className: (0,
|
|
6608
|
+
className: (0, import_classnames31.default)("splash-screen", "m-t-5", controlAndTagsToCSSClass({ control, tags })),
|
|
6452
6609
|
children: [
|
|
6453
|
-
/* @__PURE__ */
|
|
6454
|
-
title || description ? /* @__PURE__ */
|
|
6610
|
+
/* @__PURE__ */ jsx96(TopBar, { back, toolbar, tags }),
|
|
6611
|
+
title || description ? /* @__PURE__ */ jsx96("div", { className: "m-b-4", children: /* @__PURE__ */ jsx96(StepHeader, { title, description, tags }) }) : void 0,
|
|
6455
6612
|
children,
|
|
6456
|
-
/* @__PURE__ */
|
|
6613
|
+
/* @__PURE__ */ jsx96(StepFooter, { footer, tags })
|
|
6457
6614
|
]
|
|
6458
6615
|
}
|
|
6459
6616
|
);
|
|
6460
6617
|
}
|
|
6461
6618
|
|
|
6462
6619
|
// ../renderers/src/step/SplashStepRenderer.tsx
|
|
6463
|
-
var
|
|
6464
|
-
import { jsx as
|
|
6620
|
+
var import_classnames32 = __toESM(require_classnames());
|
|
6621
|
+
import { jsx as jsx97, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
6465
6622
|
var SplashStepRenderer = {
|
|
6466
6623
|
canRenderType: "step",
|
|
6467
6624
|
canRender: ({ control }) => control === "splash",
|
|
@@ -6472,12 +6629,12 @@ function SplashStepRendererComponent(props) {
|
|
|
6472
6629
|
return /* @__PURE__ */ jsxs37(
|
|
6473
6630
|
"div",
|
|
6474
6631
|
{
|
|
6475
|
-
className: (0,
|
|
6632
|
+
className: (0, import_classnames32.default)("splash-screen", "m-t-5", controlAndTagsToCSSClass({ control, tags })),
|
|
6476
6633
|
children: [
|
|
6477
|
-
/* @__PURE__ */
|
|
6478
|
-
title || description ? /* @__PURE__ */
|
|
6634
|
+
/* @__PURE__ */ jsx97(TopBar, { back, toolbar, tags }),
|
|
6635
|
+
title || description ? /* @__PURE__ */ jsx97("div", { className: "m-b-4", children: /* @__PURE__ */ jsx97(StepHeader, { title, description, tags }) }) : void 0,
|
|
6479
6636
|
children,
|
|
6480
|
-
/* @__PURE__ */
|
|
6637
|
+
/* @__PURE__ */ jsx97(StepFooter, { footer, tags })
|
|
6481
6638
|
]
|
|
6482
6639
|
}
|
|
6483
6640
|
);
|
|
@@ -6485,7 +6642,7 @@ function SplashStepRendererComponent(props) {
|
|
|
6485
6642
|
|
|
6486
6643
|
// ../renderers/src/step/StepRenderer.tsx
|
|
6487
6644
|
import { Alert } from "@transferwise/components";
|
|
6488
|
-
import { jsx as
|
|
6645
|
+
import { jsx as jsx98, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
6489
6646
|
var StepRenderer = {
|
|
6490
6647
|
canRenderType: "step",
|
|
6491
6648
|
render: StepRendererComponent
|
|
@@ -6493,38 +6650,38 @@ var StepRenderer = {
|
|
|
6493
6650
|
function StepRendererComponent(props) {
|
|
6494
6651
|
const { back, description, error, title, children, toolbar, footer, control, tags } = props;
|
|
6495
6652
|
return /* @__PURE__ */ jsxs38("div", { className: controlAndTagsToCSSClass({ control, tags }), children: [
|
|
6496
|
-
/* @__PURE__ */
|
|
6497
|
-
title || description ? /* @__PURE__ */
|
|
6498
|
-
error ? /* @__PURE__ */
|
|
6653
|
+
/* @__PURE__ */ jsx98(TopBar, { back, toolbar, tags }),
|
|
6654
|
+
title || description ? /* @__PURE__ */ jsx98("div", { className: "m-b-4", children: /* @__PURE__ */ jsx98(StepHeader, { title, description, tags }) }) : void 0,
|
|
6655
|
+
error ? /* @__PURE__ */ jsx98(Alert, { type: "negative", className: "m-b-2", message: error }) : null,
|
|
6499
6656
|
children,
|
|
6500
|
-
/* @__PURE__ */
|
|
6657
|
+
/* @__PURE__ */ jsx98(StepFooter, { footer, tags })
|
|
6501
6658
|
] });
|
|
6502
6659
|
}
|
|
6503
6660
|
|
|
6504
6661
|
// ../renderers/src/TabsRenderer.tsx
|
|
6505
|
-
var
|
|
6662
|
+
var import_classnames33 = __toESM(require_classnames());
|
|
6506
6663
|
import { Chips as Chips2, SegmentedControl as SegmentedControl2, Tabs as Tabs2 } from "@transferwise/components";
|
|
6507
|
-
import { useState as
|
|
6508
|
-
import { jsx as
|
|
6664
|
+
import { useState as useState19 } from "react";
|
|
6665
|
+
import { jsx as jsx99, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
6509
6666
|
var TabsRenderer = {
|
|
6510
6667
|
canRenderType: "tabs",
|
|
6511
6668
|
render: (props) => {
|
|
6512
6669
|
switch (props.control) {
|
|
6513
6670
|
case "segmented":
|
|
6514
6671
|
if (props.tabs.length > 3) {
|
|
6515
|
-
return /* @__PURE__ */
|
|
6672
|
+
return /* @__PURE__ */ jsx99(TabsRendererComponent, __spreadValues({}, props));
|
|
6516
6673
|
}
|
|
6517
|
-
return /* @__PURE__ */
|
|
6674
|
+
return /* @__PURE__ */ jsx99(SegmentedTabsRendererComponent, __spreadValues({}, props));
|
|
6518
6675
|
case "chips":
|
|
6519
|
-
return /* @__PURE__ */
|
|
6676
|
+
return /* @__PURE__ */ jsx99(ChipsTabsRendererComponent, __spreadValues({}, props));
|
|
6520
6677
|
default:
|
|
6521
|
-
return /* @__PURE__ */
|
|
6678
|
+
return /* @__PURE__ */ jsx99(TabsRendererComponent, __spreadValues({}, props));
|
|
6522
6679
|
}
|
|
6523
6680
|
}
|
|
6524
6681
|
};
|
|
6525
6682
|
function TabsRendererComponent({ uid, margin, tabs, control, tags }) {
|
|
6526
|
-
const [selectedIndex, setSelectedIndex] =
|
|
6527
|
-
return /* @__PURE__ */
|
|
6683
|
+
const [selectedIndex, setSelectedIndex] = useState19(0);
|
|
6684
|
+
return /* @__PURE__ */ jsx99("div", { className: (0, import_classnames33.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: /* @__PURE__ */ jsx99(
|
|
6528
6685
|
Tabs2,
|
|
6529
6686
|
{
|
|
6530
6687
|
name: uid,
|
|
@@ -6544,9 +6701,9 @@ function TabsRendererComponent({ uid, margin, tabs, control, tags }) {
|
|
|
6544
6701
|
}
|
|
6545
6702
|
function SegmentedTabsRendererComponent({ uid, margin, tabs, control, tags }) {
|
|
6546
6703
|
var _a;
|
|
6547
|
-
const [selectedIndex, setSelectedIndex] =
|
|
6548
|
-
return /* @__PURE__ */ jsxs39("div", { className: (0,
|
|
6549
|
-
/* @__PURE__ */
|
|
6704
|
+
const [selectedIndex, setSelectedIndex] = useState19(0);
|
|
6705
|
+
return /* @__PURE__ */ jsxs39("div", { className: (0, import_classnames33.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
6706
|
+
/* @__PURE__ */ jsx99(
|
|
6550
6707
|
SegmentedControl2,
|
|
6551
6708
|
{
|
|
6552
6709
|
name: uid,
|
|
@@ -6561,14 +6718,14 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs, control, tags }) {
|
|
|
6561
6718
|
onChange: (value) => setSelectedIndex(Number(value))
|
|
6562
6719
|
}
|
|
6563
6720
|
),
|
|
6564
|
-
/* @__PURE__ */
|
|
6721
|
+
/* @__PURE__ */ jsx99("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
6565
6722
|
] });
|
|
6566
6723
|
}
|
|
6567
6724
|
function ChipsTabsRendererComponent({ margin, tabs, control, tags }) {
|
|
6568
6725
|
var _a;
|
|
6569
|
-
const [selectedIndex, setSelectedIndex] =
|
|
6570
|
-
return /* @__PURE__ */ jsxs39("div", { className: (0,
|
|
6571
|
-
/* @__PURE__ */
|
|
6726
|
+
const [selectedIndex, setSelectedIndex] = useState19(0);
|
|
6727
|
+
return /* @__PURE__ */ jsxs39("div", { className: (0, import_classnames33.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
6728
|
+
/* @__PURE__ */ jsx99("div", { className: "chips-container", children: /* @__PURE__ */ jsx99(
|
|
6572
6729
|
Chips2,
|
|
6573
6730
|
{
|
|
6574
6731
|
chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
|
|
@@ -6576,7 +6733,7 @@ function ChipsTabsRendererComponent({ margin, tabs, control, tags }) {
|
|
|
6576
6733
|
onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
|
|
6577
6734
|
}
|
|
6578
6735
|
) }),
|
|
6579
|
-
/* @__PURE__ */
|
|
6736
|
+
/* @__PURE__ */ jsx99("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
6580
6737
|
] });
|
|
6581
6738
|
}
|
|
6582
6739
|
|
|
@@ -6591,7 +6748,7 @@ import {
|
|
|
6591
6748
|
TextArea,
|
|
6592
6749
|
TextareaWithDisplayFormat
|
|
6593
6750
|
} from "@transferwise/components";
|
|
6594
|
-
import { jsx as
|
|
6751
|
+
import { jsx as jsx100 } from "react/jsx-runtime";
|
|
6595
6752
|
var commonKeys = [
|
|
6596
6753
|
"autoComplete",
|
|
6597
6754
|
"autoCapitalize",
|
|
@@ -6610,12 +6767,12 @@ function VariableTextInput(inputProps) {
|
|
|
6610
6767
|
const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
|
|
6611
6768
|
switch (control) {
|
|
6612
6769
|
case "email":
|
|
6613
|
-
return /* @__PURE__ */
|
|
6770
|
+
return /* @__PURE__ */ jsx100(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
|
|
6614
6771
|
case "password":
|
|
6615
|
-
return /* @__PURE__ */
|
|
6772
|
+
return /* @__PURE__ */ jsx100(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
|
|
6616
6773
|
case "numeric": {
|
|
6617
6774
|
const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
|
|
6618
|
-
return /* @__PURE__ */
|
|
6775
|
+
return /* @__PURE__ */ jsx100(
|
|
6619
6776
|
TextInput,
|
|
6620
6777
|
__spreadProps(__spreadValues({}, numericProps), {
|
|
6621
6778
|
onChange: (newValue) => {
|
|
@@ -6626,9 +6783,9 @@ function VariableTextInput(inputProps) {
|
|
|
6626
6783
|
);
|
|
6627
6784
|
}
|
|
6628
6785
|
case "phone-number":
|
|
6629
|
-
return /* @__PURE__ */
|
|
6786
|
+
return /* @__PURE__ */ jsx100(PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
|
|
6630
6787
|
default: {
|
|
6631
|
-
return /* @__PURE__ */
|
|
6788
|
+
return /* @__PURE__ */ jsx100(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
|
|
6632
6789
|
}
|
|
6633
6790
|
}
|
|
6634
6791
|
}
|
|
@@ -6636,11 +6793,11 @@ function TextInput(props) {
|
|
|
6636
6793
|
const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
|
|
6637
6794
|
const InputWithPattern = control === "textarea" ? TextareaWithDisplayFormat : InputWithDisplayFormat;
|
|
6638
6795
|
const InputWithoutPattern = control === "textarea" ? TextArea : Input6;
|
|
6639
|
-
return displayFormat ? /* @__PURE__ */
|
|
6796
|
+
return displayFormat ? /* @__PURE__ */ jsx100(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ jsx100(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
|
|
6640
6797
|
}
|
|
6641
6798
|
|
|
6642
6799
|
// ../renderers/src/TextInputRenderer.tsx
|
|
6643
|
-
import { jsx as
|
|
6800
|
+
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
6644
6801
|
var TextInputRenderer = {
|
|
6645
6802
|
canRenderType: "input-text",
|
|
6646
6803
|
render: (props) => {
|
|
@@ -6673,7 +6830,7 @@ var TextInputRenderer = {
|
|
|
6673
6830
|
}
|
|
6674
6831
|
}
|
|
6675
6832
|
});
|
|
6676
|
-
return /* @__PURE__ */
|
|
6833
|
+
return /* @__PURE__ */ jsx101(
|
|
6677
6834
|
FieldInput_default,
|
|
6678
6835
|
{
|
|
6679
6836
|
id,
|
|
@@ -6686,13 +6843,23 @@ var TextInputRenderer = {
|
|
|
6686
6843
|
features: props.features,
|
|
6687
6844
|
control: props.control,
|
|
6688
6845
|
tags: props.tags,
|
|
6689
|
-
children: /* @__PURE__ */
|
|
6846
|
+
children: /* @__PURE__ */ jsx101(InputGroup5, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx101(VariableTextInput, __spreadValues({}, inputProps)) })
|
|
6690
6847
|
}
|
|
6691
6848
|
);
|
|
6692
6849
|
}
|
|
6693
6850
|
};
|
|
6694
6851
|
var TextInputRenderer_default = TextInputRenderer;
|
|
6695
6852
|
|
|
6853
|
+
// ../renderers/src/UpdatableRenderer.tsx
|
|
6854
|
+
var import_classnames34 = __toESM(require_classnames());
|
|
6855
|
+
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
6856
|
+
var UpdatableRenderer = {
|
|
6857
|
+
canRenderType: "updatable",
|
|
6858
|
+
render: ({ children, control, margin, tags }) => {
|
|
6859
|
+
return /* @__PURE__ */ jsx102("div", { className: (0, import_classnames34.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children });
|
|
6860
|
+
}
|
|
6861
|
+
};
|
|
6862
|
+
|
|
6696
6863
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
6697
6864
|
import { Status as Status2, Upload, UploadInput as UploadInput2 } from "@transferwise/components";
|
|
6698
6865
|
|
|
@@ -6700,7 +6867,7 @@ import { Status as Status2, Upload, UploadInput as UploadInput2 } from "@transfe
|
|
|
6700
6867
|
var getRandomId = () => Math.random().toString(36).substring(2);
|
|
6701
6868
|
|
|
6702
6869
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
6703
|
-
import { jsx as
|
|
6870
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
6704
6871
|
var UploadInputRenderer = {
|
|
6705
6872
|
canRenderType: "input-upload",
|
|
6706
6873
|
render: (props) => {
|
|
@@ -6729,7 +6896,7 @@ var UploadInputRenderer = {
|
|
|
6729
6896
|
};
|
|
6730
6897
|
return (
|
|
6731
6898
|
// We don't pass help here as there is no sensible place to display it
|
|
6732
|
-
/* @__PURE__ */
|
|
6899
|
+
/* @__PURE__ */ jsx103(
|
|
6733
6900
|
UploadFieldInput_default,
|
|
6734
6901
|
{
|
|
6735
6902
|
id,
|
|
@@ -6739,7 +6906,7 @@ var UploadInputRenderer = {
|
|
|
6739
6906
|
features,
|
|
6740
6907
|
control,
|
|
6741
6908
|
tags,
|
|
6742
|
-
children: /* @__PURE__ */
|
|
6909
|
+
children: /* @__PURE__ */ jsx103(
|
|
6743
6910
|
UploadInput2,
|
|
6744
6911
|
{
|
|
6745
6912
|
id,
|
|
@@ -6809,7 +6976,7 @@ var LargeUploadRenderer = {
|
|
|
6809
6976
|
};
|
|
6810
6977
|
const filetypes = acceptsToFileTypes(accepts);
|
|
6811
6978
|
const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
|
|
6812
|
-
return /* @__PURE__ */
|
|
6979
|
+
return /* @__PURE__ */ jsx103(
|
|
6813
6980
|
FieldInput_default,
|
|
6814
6981
|
{
|
|
6815
6982
|
id,
|
|
@@ -6820,7 +6987,7 @@ var LargeUploadRenderer = {
|
|
|
6820
6987
|
features,
|
|
6821
6988
|
control,
|
|
6822
6989
|
tags,
|
|
6823
|
-
children: /* @__PURE__ */
|
|
6990
|
+
children: /* @__PURE__ */ jsx103(
|
|
6824
6991
|
Upload,
|
|
6825
6992
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
6826
6993
|
usAccept,
|
|
@@ -6836,21 +7003,21 @@ var LargeUploadRenderer = {
|
|
|
6836
7003
|
};
|
|
6837
7004
|
|
|
6838
7005
|
// ../renderers/src/UpsellRenderer.tsx
|
|
6839
|
-
var
|
|
7006
|
+
var import_classnames35 = __toESM(require_classnames());
|
|
6840
7007
|
import { Nudge } from "@transferwise/components";
|
|
6841
|
-
import { useState as
|
|
6842
|
-
import { jsx as
|
|
7008
|
+
import { useState as useState20 } from "react";
|
|
7009
|
+
import { jsx as jsx104 } from "react/jsx-runtime";
|
|
6843
7010
|
var UpsellRenderer = {
|
|
6844
7011
|
canRenderType: "upsell",
|
|
6845
7012
|
render: UpsellRendererComponent
|
|
6846
7013
|
};
|
|
6847
7014
|
function UpsellRendererComponent(props) {
|
|
6848
7015
|
const { text, callToAction, media, margin, onDismiss, control, tags } = props;
|
|
6849
|
-
const [isVisible, setIsVisible] =
|
|
6850
|
-
return isVisible ? /* @__PURE__ */
|
|
7016
|
+
const [isVisible, setIsVisible] = useState20(true);
|
|
7017
|
+
return isVisible ? /* @__PURE__ */ jsx104(
|
|
6851
7018
|
Nudge,
|
|
6852
7019
|
{
|
|
6853
|
-
className: (0,
|
|
7020
|
+
className: (0, import_classnames35.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
|
|
6854
7021
|
mediaName: getMediaName(media),
|
|
6855
7022
|
title: text,
|
|
6856
7023
|
action: __spreadValues({
|
|
@@ -6893,43 +7060,6 @@ var supportedMediaNames = [
|
|
|
6893
7060
|
"wallet"
|
|
6894
7061
|
];
|
|
6895
7062
|
|
|
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
7063
|
// ../renderers/src/getWiseRenderers.ts
|
|
6934
7064
|
var getWiseRenderers = () => [
|
|
6935
7065
|
AddressValidationButtonRenderer_default,
|
|
@@ -6974,6 +7104,7 @@ var getWiseRenderers = () => [
|
|
|
6974
7104
|
TextInputRenderer_default,
|
|
6975
7105
|
UploadInputRenderer,
|
|
6976
7106
|
ColoredUpsellRenderer,
|
|
7107
|
+
UpdatableRenderer,
|
|
6977
7108
|
UpsellRenderer,
|
|
6978
7109
|
SplashStepRenderer,
|
|
6979
7110
|
SplashCelebrationStepRenderer,
|
|
@@ -6984,11 +7115,11 @@ var getWiseRenderers = () => [
|
|
|
6984
7115
|
|
|
6985
7116
|
// ../renderers/src/InitialLoadingStateRenderer.tsx
|
|
6986
7117
|
import { Loader as Loader2 } from "@transferwise/components";
|
|
6987
|
-
import { jsx as
|
|
7118
|
+
import { jsx as jsx105 } from "react/jsx-runtime";
|
|
6988
7119
|
var InitialLoadingStateRenderer = {
|
|
6989
7120
|
canRenderType: "loading-state",
|
|
6990
7121
|
canRender: ({ stepLoadingState }) => stepLoadingState === "initial",
|
|
6991
|
-
render: () => /* @__PURE__ */
|
|
7122
|
+
render: () => /* @__PURE__ */ jsx105(
|
|
6992
7123
|
Loader2,
|
|
6993
7124
|
{
|
|
6994
7125
|
size: "md",
|
|
@@ -7001,24 +7132,24 @@ var InitialLoadingStateRenderer = {
|
|
|
7001
7132
|
// src/dynamicFlow/DynamicFlowModal.tsx
|
|
7002
7133
|
import { useDynamicFlowModal } from "@wise/dynamic-flow-client";
|
|
7003
7134
|
import { Modal as Modal5 } from "@transferwise/components";
|
|
7004
|
-
import { jsx as
|
|
7135
|
+
import { jsx as jsx106 } from "react/jsx-runtime";
|
|
7005
7136
|
function DynamicFlowModal(props) {
|
|
7006
7137
|
const _a = props, { className = "" } = _a, rest = __objRest(_a, ["className"]);
|
|
7007
7138
|
const dfProps = useWiseToCoreProps(rest);
|
|
7008
7139
|
const df = useDynamicFlowModal(dfProps);
|
|
7009
|
-
return /* @__PURE__ */
|
|
7140
|
+
return /* @__PURE__ */ jsx106(
|
|
7010
7141
|
Modal5,
|
|
7011
7142
|
__spreadProps(__spreadValues({
|
|
7012
7143
|
className: `dynamic-flow-modal ${className}`,
|
|
7013
7144
|
disableDimmerClickToClose: true
|
|
7014
7145
|
}, df.modal), {
|
|
7015
|
-
body: /* @__PURE__ */
|
|
7146
|
+
body: /* @__PURE__ */ jsx106("div", { className: "dynamic-flow-modal", children: df.modal.body })
|
|
7016
7147
|
})
|
|
7017
7148
|
);
|
|
7018
7149
|
}
|
|
7019
7150
|
|
|
7020
7151
|
// src/dynamicFlow/getMergedRenderers.tsx
|
|
7021
|
-
import { jsx as
|
|
7152
|
+
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
7022
7153
|
var wiseRenderers = getWiseRenderers();
|
|
7023
7154
|
var getMergedRenderers = (props) => {
|
|
7024
7155
|
var _d, _e;
|
|
@@ -7032,7 +7163,7 @@ var getMergedRenderers = (props) => {
|
|
|
7032
7163
|
method: initialRequest.method,
|
|
7033
7164
|
data: initialRequest.body
|
|
7034
7165
|
};
|
|
7035
|
-
return presentation.type === "push" ? /* @__PURE__ */
|
|
7166
|
+
return presentation.type === "push" ? /* @__PURE__ */ jsx107(DynamicFlow, __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), { features: subflowFeatures, initialAction: action })) : /* @__PURE__ */ jsx107(
|
|
7036
7167
|
DynamicFlowModal,
|
|
7037
7168
|
__spreadProps(__spreadValues(__spreadValues({}, restProps), rest), {
|
|
7038
7169
|
features: subflowFeatures,
|
|
@@ -7247,7 +7378,7 @@ import {
|
|
|
7247
7378
|
useImperativeHandle
|
|
7248
7379
|
} from "react";
|
|
7249
7380
|
import { useDynamicFlow as useDynamicFlow2 } from "@wise/dynamic-flow-client";
|
|
7250
|
-
import { jsx as
|
|
7381
|
+
import { jsx as jsx108 } from "react/jsx-runtime";
|
|
7251
7382
|
var DynamicFlowWithRef = forwardRef(function DynamicFlowWithRef2(props, ref) {
|
|
7252
7383
|
const { className = "" } = props;
|
|
7253
7384
|
const dfProps = useWiseToCoreProps(props);
|
|
@@ -7263,7 +7394,7 @@ var DynamicFlowWithRef = forwardRef(function DynamicFlowWithRef2(props, ref) {
|
|
|
7263
7394
|
}),
|
|
7264
7395
|
[df]
|
|
7265
7396
|
);
|
|
7266
|
-
return /* @__PURE__ */
|
|
7397
|
+
return /* @__PURE__ */ jsx108("div", { className, children: df.view });
|
|
7267
7398
|
});
|
|
7268
7399
|
|
|
7269
7400
|
// src/index.ts
|