@wise/dynamic-flow-client-internal 3.25.0 → 3.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/i18n/nl.json +33 -0
- package/build/main.js +253 -188
- package/build/main.min.js +1 -1
- package/build/main.mjs +196 -131
- package/package.json +17 -17
package/build/main.mjs
CHANGED
|
@@ -886,8 +886,8 @@ var useRendererHttpClient = () => {
|
|
|
886
886
|
import { Alert } from "@transferwise/components";
|
|
887
887
|
|
|
888
888
|
// ../renderers/src/utils/layout-utils.ts
|
|
889
|
-
var getMargin = (
|
|
890
|
-
switch (
|
|
889
|
+
var getMargin = (size2) => {
|
|
890
|
+
switch (size2) {
|
|
891
891
|
case "xs":
|
|
892
892
|
return "m-b-0";
|
|
893
893
|
case "sm":
|
|
@@ -1061,13 +1061,14 @@ var import_classnames = __toESM(require_classnames());
|
|
|
1061
1061
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1062
1062
|
var BoxRenderer = {
|
|
1063
1063
|
canRenderType: "box",
|
|
1064
|
-
render: ({ border, children, margin, width }) => {
|
|
1064
|
+
render: ({ border, children, control, margin, width }) => {
|
|
1065
1065
|
const hasFixedWidth = width !== "xl";
|
|
1066
|
+
const hasBorder = control === "bordered" || control === "bordered-web" || border;
|
|
1066
1067
|
const contents = /* @__PURE__ */ jsx7(
|
|
1067
1068
|
"div",
|
|
1068
1069
|
{
|
|
1069
1070
|
className: (0, import_classnames.default)({
|
|
1070
|
-
"df-box-renderer-border":
|
|
1071
|
+
"df-box-renderer-border": hasBorder,
|
|
1071
1072
|
[`df-box-renderer-width-${width}`]: hasFixedWidth,
|
|
1072
1073
|
[getMargin(margin)]: !hasFixedWidth
|
|
1073
1074
|
}),
|
|
@@ -1108,7 +1109,7 @@ function ButtonRendererComponent({
|
|
|
1108
1109
|
disabled,
|
|
1109
1110
|
margin,
|
|
1110
1111
|
title,
|
|
1111
|
-
size,
|
|
1112
|
+
size: size2,
|
|
1112
1113
|
onClick
|
|
1113
1114
|
}) {
|
|
1114
1115
|
const className = getMargin(margin);
|
|
@@ -1122,7 +1123,7 @@ function ButtonRendererComponent({
|
|
|
1122
1123
|
className,
|
|
1123
1124
|
disabled: isLoading || disabled,
|
|
1124
1125
|
priority: mapControl(control),
|
|
1125
|
-
size: mapSize(
|
|
1126
|
+
size: mapSize(size2),
|
|
1126
1127
|
type,
|
|
1127
1128
|
onClick,
|
|
1128
1129
|
children: title
|
|
@@ -1147,11 +1148,11 @@ var mapControl = (control) => {
|
|
|
1147
1148
|
return "secondary";
|
|
1148
1149
|
}
|
|
1149
1150
|
};
|
|
1150
|
-
var mapSize = (
|
|
1151
|
-
if (!
|
|
1151
|
+
var mapSize = (size2) => {
|
|
1152
|
+
if (!size2) {
|
|
1152
1153
|
return void 0;
|
|
1153
1154
|
}
|
|
1154
|
-
switch (
|
|
1155
|
+
switch (size2) {
|
|
1155
1156
|
case "xs":
|
|
1156
1157
|
case "sm":
|
|
1157
1158
|
return "sm";
|
|
@@ -1448,15 +1449,15 @@ var HeadingRenderer = {
|
|
|
1448
1449
|
render: (props) => /* @__PURE__ */ jsx21(Heading, __spreadValues({}, props))
|
|
1449
1450
|
};
|
|
1450
1451
|
function Heading(props) {
|
|
1451
|
-
const { text, size, align, margin, control } = props;
|
|
1452
|
+
const { text, size: size2, align, margin, control } = props;
|
|
1452
1453
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
1453
|
-
return control === "display" ? /* @__PURE__ */ jsx21(DisplayHeading, { size, text, className }) : /* @__PURE__ */ jsx21(StandardHeading, { size, text, className });
|
|
1454
|
+
return control === "display" ? /* @__PURE__ */ jsx21(DisplayHeading, { size: size2, text, className }) : /* @__PURE__ */ jsx21(StandardHeading, { size: size2, text, className });
|
|
1454
1455
|
}
|
|
1455
|
-
function DisplayHeading({ size, text, className }) {
|
|
1456
|
-
return /* @__PURE__ */ jsx21(Display, { type: getDisplayType(
|
|
1456
|
+
function DisplayHeading({ size: size2, text, className }) {
|
|
1457
|
+
return /* @__PURE__ */ jsx21(Display, { type: getDisplayType(size2), className, children: text });
|
|
1457
1458
|
}
|
|
1458
|
-
function StandardHeading({ size, text, className }) {
|
|
1459
|
-
switch (
|
|
1459
|
+
function StandardHeading({ size: size2, text, className }) {
|
|
1460
|
+
switch (size2) {
|
|
1460
1461
|
case "xs":
|
|
1461
1462
|
return /* @__PURE__ */ jsx21("h5", { className, children: text });
|
|
1462
1463
|
case "sm":
|
|
@@ -1470,8 +1471,8 @@ function StandardHeading({ size, text, className }) {
|
|
|
1470
1471
|
return /* @__PURE__ */ jsx21("h3", { className, children: text });
|
|
1471
1472
|
}
|
|
1472
1473
|
}
|
|
1473
|
-
var getDisplayType = (
|
|
1474
|
-
switch (
|
|
1474
|
+
var getDisplayType = (size2) => {
|
|
1475
|
+
switch (size2) {
|
|
1475
1476
|
case "xs":
|
|
1476
1477
|
case "sm":
|
|
1477
1478
|
return "display-small";
|
|
@@ -1506,7 +1507,7 @@ var ImageRenderer_default = ImageRenderer;
|
|
|
1506
1507
|
function ImageRendererComponent({
|
|
1507
1508
|
accessibilityDescription,
|
|
1508
1509
|
margin,
|
|
1509
|
-
size,
|
|
1510
|
+
size: size2,
|
|
1510
1511
|
url
|
|
1511
1512
|
}) {
|
|
1512
1513
|
const [imageSource, setImageSource] = useState2("");
|
|
@@ -1514,7 +1515,7 @@ function ImageRendererComponent({
|
|
|
1514
1515
|
useEffect2(() => {
|
|
1515
1516
|
void getImageSource(httpClient, url).then(setImageSource);
|
|
1516
1517
|
}, [url, httpClient]);
|
|
1517
|
-
return /* @__PURE__ */ jsx22("div", { className: `df-image ${
|
|
1518
|
+
return /* @__PURE__ */ jsx22("div", { className: `df-image ${size2 || "md"}`, children: /* @__PURE__ */ jsx22(
|
|
1518
1519
|
Image,
|
|
1519
1520
|
{
|
|
1520
1521
|
className: `img-responsive ${getMargin(margin)}`,
|
|
@@ -1576,7 +1577,7 @@ var InstructionsRenderer = {
|
|
|
1576
1577
|
var InstructionsRenderer_default = InstructionsRenderer;
|
|
1577
1578
|
|
|
1578
1579
|
// ../renderers/src/IntegerInputRenderer.tsx
|
|
1579
|
-
import { Input } from "@transferwise/components";
|
|
1580
|
+
import { Input, InputGroup } from "@transferwise/components";
|
|
1580
1581
|
|
|
1581
1582
|
// ../renderers/src/utils/input-utils.ts
|
|
1582
1583
|
var onWheel = (event) => {
|
|
@@ -1585,13 +1586,71 @@ var onWheel = (event) => {
|
|
|
1585
1586
|
}
|
|
1586
1587
|
};
|
|
1587
1588
|
|
|
1588
|
-
// ../renderers/src/
|
|
1589
|
+
// ../renderers/src/utils/getIconAvatar.tsx
|
|
1590
|
+
import { Avatar as Avatar2, AvatarType as AvatarType2 } from "@transferwise/components";
|
|
1589
1591
|
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1592
|
+
var size = 24;
|
|
1593
|
+
function getIconAvatar({ icon, image }) {
|
|
1594
|
+
if (image == null ? void 0 : image.url) {
|
|
1595
|
+
return /* @__PURE__ */ jsx24(
|
|
1596
|
+
"img",
|
|
1597
|
+
{
|
|
1598
|
+
src: image.url,
|
|
1599
|
+
alt: image.accessibilityDescription,
|
|
1600
|
+
width: `${size}px`,
|
|
1601
|
+
height: `${size}px`
|
|
1602
|
+
}
|
|
1603
|
+
);
|
|
1604
|
+
}
|
|
1605
|
+
if (isFlagIcon2(icon)) {
|
|
1606
|
+
return /* @__PURE__ */ jsx24(Avatar2, { type: AvatarType2.ICON, size, children: /* @__PURE__ */ jsx24(DynamicIcon_default, { name: icon.name }) });
|
|
1607
|
+
}
|
|
1608
|
+
if (isNamedIcon2(icon)) {
|
|
1609
|
+
return /* @__PURE__ */ jsx24(DynamicIcon_default, { name: icon.name });
|
|
1610
|
+
}
|
|
1611
|
+
if (icon && "text" in icon) {
|
|
1612
|
+
return /* @__PURE__ */ jsx24(Avatar2, { type: AvatarType2.ICON, size, children: icon.text });
|
|
1613
|
+
}
|
|
1614
|
+
return null;
|
|
1615
|
+
}
|
|
1616
|
+
var isNamedIcon2 = (icon) => icon ? "name" in icon : false;
|
|
1617
|
+
var isFlagIcon2 = (icon) => isNamedIcon2(icon) && icon.name.startsWith("flag-");
|
|
1618
|
+
|
|
1619
|
+
// ../renderers/src/utils/getInputGroupAddonStart.tsx
|
|
1620
|
+
var getInputGroupAddonStart = ({ icon, image }) => {
|
|
1621
|
+
const content = getIconAvatar({ icon, image });
|
|
1622
|
+
return content ? { content } : void 0;
|
|
1623
|
+
};
|
|
1624
|
+
|
|
1625
|
+
// ../renderers/src/IntegerInputRenderer.tsx
|
|
1626
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1590
1627
|
var IntegerInputRenderer = {
|
|
1591
1628
|
canRenderType: "input-integer",
|
|
1592
1629
|
render: (props) => {
|
|
1593
|
-
const _a = props, {
|
|
1594
|
-
|
|
1630
|
+
const _a = props, {
|
|
1631
|
+
id,
|
|
1632
|
+
label,
|
|
1633
|
+
description,
|
|
1634
|
+
help,
|
|
1635
|
+
icon,
|
|
1636
|
+
image,
|
|
1637
|
+
type,
|
|
1638
|
+
validationState,
|
|
1639
|
+
value,
|
|
1640
|
+
onChange
|
|
1641
|
+
} = _a, rest = __objRest(_a, [
|
|
1642
|
+
"id",
|
|
1643
|
+
"label",
|
|
1644
|
+
"description",
|
|
1645
|
+
"help",
|
|
1646
|
+
"icon",
|
|
1647
|
+
"image",
|
|
1648
|
+
"type",
|
|
1649
|
+
"validationState",
|
|
1650
|
+
"value",
|
|
1651
|
+
"onChange"
|
|
1652
|
+
]);
|
|
1653
|
+
return /* @__PURE__ */ jsx25(
|
|
1595
1654
|
FieldInput_default,
|
|
1596
1655
|
{
|
|
1597
1656
|
id,
|
|
@@ -1599,7 +1658,7 @@ var IntegerInputRenderer = {
|
|
|
1599
1658
|
description,
|
|
1600
1659
|
validation: validationState,
|
|
1601
1660
|
help,
|
|
1602
|
-
children: /* @__PURE__ */
|
|
1661
|
+
children: /* @__PURE__ */ jsx25(InputGroup, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx25(
|
|
1603
1662
|
Input,
|
|
1604
1663
|
__spreadValues({
|
|
1605
1664
|
id,
|
|
@@ -1614,7 +1673,7 @@ var IntegerInputRenderer = {
|
|
|
1614
1673
|
},
|
|
1615
1674
|
onWheel
|
|
1616
1675
|
}, rest)
|
|
1617
|
-
)
|
|
1676
|
+
) })
|
|
1618
1677
|
}
|
|
1619
1678
|
);
|
|
1620
1679
|
}
|
|
@@ -1623,13 +1682,13 @@ var IntegerInputRenderer_default = IntegerInputRenderer;
|
|
|
1623
1682
|
|
|
1624
1683
|
// ../renderers/src/LoadingIndicatorRenderer.tsx
|
|
1625
1684
|
import { Loader } from "@transferwise/components";
|
|
1626
|
-
import { jsx as
|
|
1685
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1627
1686
|
var LoadingIndicatorRenderer = {
|
|
1628
1687
|
canRenderType: "loading-indicator",
|
|
1629
|
-
render: ({ margin, size }) => /* @__PURE__ */
|
|
1688
|
+
render: ({ margin, size: size2 }) => /* @__PURE__ */ jsx26(
|
|
1630
1689
|
Loader,
|
|
1631
1690
|
{
|
|
1632
|
-
size,
|
|
1691
|
+
size: size2,
|
|
1633
1692
|
classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin(margin)}` },
|
|
1634
1693
|
"data-testid": "loading-indicator"
|
|
1635
1694
|
}
|
|
@@ -1639,28 +1698,28 @@ var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
|
|
|
1639
1698
|
|
|
1640
1699
|
// ../renderers/src/MarkdownRenderer.tsx
|
|
1641
1700
|
import { Markdown as Markdown2 } from "@transferwise/components";
|
|
1642
|
-
import { jsx as
|
|
1701
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1643
1702
|
var MarkdownRenderer = {
|
|
1644
1703
|
canRenderType: "markdown",
|
|
1645
|
-
render: ({ content, align, margin }) => /* @__PURE__ */
|
|
1704
|
+
render: ({ content, align, margin }) => /* @__PURE__ */ jsx27("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ jsx27(Markdown2, { config: { link: { target: "_blank" } }, children: content }) })
|
|
1646
1705
|
};
|
|
1647
1706
|
var MarkdownRenderer_default = MarkdownRenderer;
|
|
1648
1707
|
|
|
1649
1708
|
// ../renderers/src/ModalRenderer.tsx
|
|
1650
1709
|
import { Button as Button2, Modal } from "@transferwise/components";
|
|
1651
1710
|
import { useState as useState3 } from "react";
|
|
1652
|
-
import { jsx as
|
|
1711
|
+
import { jsx as jsx28, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1653
1712
|
var ModalRenderer = {
|
|
1654
1713
|
canRenderType: "modal",
|
|
1655
|
-
render: (props) => /* @__PURE__ */
|
|
1714
|
+
render: (props) => /* @__PURE__ */ jsx28(DFModal, __spreadValues({}, props))
|
|
1656
1715
|
};
|
|
1657
1716
|
var ModalRenderer_default = ModalRenderer;
|
|
1658
1717
|
function DFModal({ content, margin, trigger }) {
|
|
1659
1718
|
const [visible, setVisible] = useState3(false);
|
|
1660
1719
|
const { components, title } = content;
|
|
1661
1720
|
return /* @__PURE__ */ jsxs7("div", { className: getMargin(margin), children: [
|
|
1662
|
-
/* @__PURE__ */
|
|
1663
|
-
/* @__PURE__ */
|
|
1721
|
+
/* @__PURE__ */ jsx28(Button2, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
|
|
1722
|
+
/* @__PURE__ */ jsx28(
|
|
1664
1723
|
Modal,
|
|
1665
1724
|
{
|
|
1666
1725
|
scroll: "content",
|
|
@@ -1678,17 +1737,17 @@ function DFModal({ content, margin, trigger }) {
|
|
|
1678
1737
|
import { SelectInput, SelectInputOptionContent } from "@transferwise/components";
|
|
1679
1738
|
|
|
1680
1739
|
// ../renderers/src/SelectInputRenderer/OptionMedia.tsx
|
|
1681
|
-
import { Avatar as
|
|
1682
|
-
import { jsx as
|
|
1740
|
+
import { Avatar as Avatar3, AvatarType as AvatarType3 } from "@transferwise/components";
|
|
1741
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1683
1742
|
function OptionMedia({ icon, image }) {
|
|
1684
1743
|
if (image == null ? void 0 : image.url) {
|
|
1685
|
-
return /* @__PURE__ */
|
|
1744
|
+
return /* @__PURE__ */ jsx29("img", { src: image.url, alt: image.accessibilityDescription || "", width: "64px" });
|
|
1686
1745
|
}
|
|
1687
1746
|
if (icon && "name" in icon) {
|
|
1688
|
-
return /* @__PURE__ */
|
|
1747
|
+
return /* @__PURE__ */ jsx29(Avatar3, { type: AvatarType3.ICON, children: /* @__PURE__ */ jsx29(DynamicIcon_default, { name: icon.name }) });
|
|
1689
1748
|
}
|
|
1690
1749
|
if (icon && "text" in icon) {
|
|
1691
|
-
return /* @__PURE__ */
|
|
1750
|
+
return /* @__PURE__ */ jsx29(Avatar3, { type: AvatarType3.INITIALS, children: icon.text });
|
|
1692
1751
|
}
|
|
1693
1752
|
return null;
|
|
1694
1753
|
}
|
|
@@ -1708,10 +1767,10 @@ var multi_select_messages_default = defineMessages2({
|
|
|
1708
1767
|
|
|
1709
1768
|
// ../renderers/src/MultiSelectInputRenderer.tsx
|
|
1710
1769
|
import { useState as useState4 } from "react";
|
|
1711
|
-
import { jsx as
|
|
1770
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1712
1771
|
var MultiSelectInputRenderer = {
|
|
1713
1772
|
canRenderType: "input-multi-select",
|
|
1714
|
-
render: (props) => /* @__PURE__ */
|
|
1773
|
+
render: (props) => /* @__PURE__ */ jsx30(MultiSelectInputRendererComponent, __spreadValues({}, props))
|
|
1715
1774
|
};
|
|
1716
1775
|
function MultiSelectInputRendererComponent(props) {
|
|
1717
1776
|
const { formatMessage } = useIntl2();
|
|
@@ -1753,12 +1812,12 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
1753
1812
|
const contentProps = {
|
|
1754
1813
|
title: option.title,
|
|
1755
1814
|
description: option.description,
|
|
1756
|
-
icon: /* @__PURE__ */
|
|
1815
|
+
icon: /* @__PURE__ */ jsx30(OptionMedia, { icon: option.icon, image: option.image })
|
|
1757
1816
|
};
|
|
1758
|
-
return /* @__PURE__ */
|
|
1817
|
+
return /* @__PURE__ */ jsx30(SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
1759
1818
|
};
|
|
1760
1819
|
const extraProps = { autoComplete };
|
|
1761
|
-
return /* @__PURE__ */
|
|
1820
|
+
return /* @__PURE__ */ jsx30(
|
|
1762
1821
|
FieldInput_default,
|
|
1763
1822
|
{
|
|
1764
1823
|
id,
|
|
@@ -1766,7 +1825,7 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
1766
1825
|
help,
|
|
1767
1826
|
description,
|
|
1768
1827
|
validation: validationState,
|
|
1769
|
-
children: /* @__PURE__ */
|
|
1828
|
+
children: /* @__PURE__ */ jsx30(
|
|
1770
1829
|
SelectInput,
|
|
1771
1830
|
__spreadValues({
|
|
1772
1831
|
id,
|
|
@@ -1810,7 +1869,7 @@ import { UploadInput } from "@transferwise/components";
|
|
|
1810
1869
|
// ../renderers/src/components/UploadFieldInput.tsx
|
|
1811
1870
|
var import_classnames3 = __toESM(require_classnames());
|
|
1812
1871
|
import { InlineAlert } from "@transferwise/components";
|
|
1813
|
-
import { jsx as
|
|
1872
|
+
import { jsx as jsx31, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1814
1873
|
function UploadFieldInput({
|
|
1815
1874
|
id,
|
|
1816
1875
|
children,
|
|
@@ -1819,7 +1878,7 @@ function UploadFieldInput({
|
|
|
1819
1878
|
help,
|
|
1820
1879
|
validation
|
|
1821
1880
|
}) {
|
|
1822
|
-
const labelContent = label && help ? /* @__PURE__ */
|
|
1881
|
+
const labelContent = label && help ? /* @__PURE__ */ jsx31(LabelContentWithHelp, { text: label, help }) : label;
|
|
1823
1882
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
1824
1883
|
return /* @__PURE__ */ jsxs8(
|
|
1825
1884
|
"div",
|
|
@@ -1828,9 +1887,9 @@ function UploadFieldInput({
|
|
|
1828
1887
|
"has-error": (validation == null ? void 0 : validation.status) === "invalid"
|
|
1829
1888
|
}),
|
|
1830
1889
|
children: [
|
|
1831
|
-
/* @__PURE__ */
|
|
1890
|
+
/* @__PURE__ */ jsx31("label", { htmlFor: id, className: "control-label", children: labelContent }),
|
|
1832
1891
|
children,
|
|
1833
|
-
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */
|
|
1892
|
+
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ jsx31(InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
|
|
1834
1893
|
]
|
|
1835
1894
|
}
|
|
1836
1895
|
);
|
|
@@ -1862,7 +1921,7 @@ var getFileType = (base64Url) => {
|
|
|
1862
1921
|
var getRandomId = () => Math.random().toString(36).substring(2);
|
|
1863
1922
|
|
|
1864
1923
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
1865
|
-
import { jsx as
|
|
1924
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1866
1925
|
var MultiUploadInputRenderer = {
|
|
1867
1926
|
canRenderType: "input-upload-multi",
|
|
1868
1927
|
render: (props) => {
|
|
@@ -1889,7 +1948,7 @@ var MultiUploadInputRenderer = {
|
|
|
1889
1948
|
};
|
|
1890
1949
|
const onDeleteFile = async (fileId) => onDelete(String(fileId));
|
|
1891
1950
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
1892
|
-
return /* @__PURE__ */
|
|
1951
|
+
return /* @__PURE__ */ jsx32(
|
|
1893
1952
|
UploadFieldInput_default,
|
|
1894
1953
|
{
|
|
1895
1954
|
id,
|
|
@@ -1897,7 +1956,7 @@ var MultiUploadInputRenderer = {
|
|
|
1897
1956
|
description,
|
|
1898
1957
|
validation: validationState,
|
|
1899
1958
|
help,
|
|
1900
|
-
children: /* @__PURE__ */
|
|
1959
|
+
children: /* @__PURE__ */ jsx32(
|
|
1901
1960
|
UploadInput,
|
|
1902
1961
|
{
|
|
1903
1962
|
id,
|
|
@@ -1920,13 +1979,35 @@ var MultiUploadInputRenderer = {
|
|
|
1920
1979
|
var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
|
|
1921
1980
|
|
|
1922
1981
|
// ../renderers/src/NumberInputRenderer.tsx
|
|
1923
|
-
import { Input as Input2 } from "@transferwise/components";
|
|
1924
|
-
import { jsx as
|
|
1982
|
+
import { Input as Input2, InputGroup as InputGroup2 } from "@transferwise/components";
|
|
1983
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1925
1984
|
var NumberInputRenderer = {
|
|
1926
1985
|
canRenderType: "input-number",
|
|
1927
1986
|
render: (props) => {
|
|
1928
|
-
const _a = props, {
|
|
1929
|
-
|
|
1987
|
+
const _a = props, {
|
|
1988
|
+
id,
|
|
1989
|
+
label,
|
|
1990
|
+
description,
|
|
1991
|
+
help,
|
|
1992
|
+
icon,
|
|
1993
|
+
image,
|
|
1994
|
+
type,
|
|
1995
|
+
validationState,
|
|
1996
|
+
value,
|
|
1997
|
+
onChange
|
|
1998
|
+
} = _a, rest = __objRest(_a, [
|
|
1999
|
+
"id",
|
|
2000
|
+
"label",
|
|
2001
|
+
"description",
|
|
2002
|
+
"help",
|
|
2003
|
+
"icon",
|
|
2004
|
+
"image",
|
|
2005
|
+
"type",
|
|
2006
|
+
"validationState",
|
|
2007
|
+
"value",
|
|
2008
|
+
"onChange"
|
|
2009
|
+
]);
|
|
2010
|
+
return /* @__PURE__ */ jsx33(
|
|
1930
2011
|
FieldInput_default,
|
|
1931
2012
|
{
|
|
1932
2013
|
id,
|
|
@@ -1934,7 +2015,7 @@ var NumberInputRenderer = {
|
|
|
1934
2015
|
description,
|
|
1935
2016
|
validation: validationState,
|
|
1936
2017
|
help,
|
|
1937
|
-
children: /* @__PURE__ */
|
|
2018
|
+
children: /* @__PURE__ */ jsx33(InputGroup2, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx33(
|
|
1938
2019
|
Input2,
|
|
1939
2020
|
__spreadValues({
|
|
1940
2021
|
id,
|
|
@@ -1947,7 +2028,7 @@ var NumberInputRenderer = {
|
|
|
1947
2028
|
},
|
|
1948
2029
|
onWheel
|
|
1949
2030
|
}, rest)
|
|
1950
|
-
)
|
|
2031
|
+
) })
|
|
1951
2032
|
}
|
|
1952
2033
|
);
|
|
1953
2034
|
}
|
|
@@ -1986,17 +2067,17 @@ var paragraph_messages_default = defineMessages3({
|
|
|
1986
2067
|
});
|
|
1987
2068
|
|
|
1988
2069
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
1989
|
-
import { jsx as
|
|
2070
|
+
import { jsx as jsx34, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1990
2071
|
var ParagraphRenderer = {
|
|
1991
2072
|
canRenderType: "paragraph",
|
|
1992
|
-
render: (props) => /* @__PURE__ */
|
|
2073
|
+
render: (props) => /* @__PURE__ */ jsx34(Paragraph, __spreadValues({}, props))
|
|
1993
2074
|
};
|
|
1994
2075
|
function Paragraph({ align, control, margin, text }) {
|
|
1995
2076
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
1996
|
-
return control === "copyable" ? /* @__PURE__ */
|
|
2077
|
+
return control === "copyable" ? /* @__PURE__ */ jsx34(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ jsx34(StandardParagraph, { className, text });
|
|
1997
2078
|
}
|
|
1998
2079
|
function StandardParagraph({ text, className }) {
|
|
1999
|
-
return /* @__PURE__ */
|
|
2080
|
+
return /* @__PURE__ */ jsx34("p", { className: `np-text-body-large ${className}`, children: text });
|
|
2000
2081
|
}
|
|
2001
2082
|
function CopyableParagraph({
|
|
2002
2083
|
text,
|
|
@@ -2011,7 +2092,7 @@ function CopyableParagraph({
|
|
|
2011
2092
|
};
|
|
2012
2093
|
const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
|
|
2013
2094
|
return /* @__PURE__ */ jsxs9("div", { className, children: [
|
|
2014
|
-
/* @__PURE__ */
|
|
2095
|
+
/* @__PURE__ */ jsx34(
|
|
2015
2096
|
Input3,
|
|
2016
2097
|
{
|
|
2017
2098
|
type: "text",
|
|
@@ -2020,7 +2101,7 @@ function CopyableParagraph({
|
|
|
2020
2101
|
className: (0, import_classnames4.default)("text-ellipsis", inputAlignmentClasses)
|
|
2021
2102
|
}
|
|
2022
2103
|
),
|
|
2023
|
-
/* @__PURE__ */
|
|
2104
|
+
/* @__PURE__ */ jsx34(Button3, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
|
|
2024
2105
|
] });
|
|
2025
2106
|
}
|
|
2026
2107
|
var ParagraphRenderer_default = ParagraphRenderer;
|
|
@@ -2058,10 +2139,10 @@ var repeatable_messages_default = defineMessages4({
|
|
|
2058
2139
|
|
|
2059
2140
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
2060
2141
|
var import_classnames5 = __toESM(require_classnames());
|
|
2061
|
-
import { Fragment as Fragment2, jsx as
|
|
2142
|
+
import { Fragment as Fragment2, jsx as jsx35, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2062
2143
|
var RepeatableRenderer = {
|
|
2063
2144
|
canRenderType: "repeatable",
|
|
2064
|
-
render: (props) => /* @__PURE__ */
|
|
2145
|
+
render: (props) => /* @__PURE__ */ jsx35(Repeatable, __spreadValues({}, props))
|
|
2065
2146
|
};
|
|
2066
2147
|
function Repeatable(props) {
|
|
2067
2148
|
const {
|
|
@@ -2101,8 +2182,8 @@ function Repeatable(props) {
|
|
|
2101
2182
|
setOpenModalType(null);
|
|
2102
2183
|
};
|
|
2103
2184
|
return /* @__PURE__ */ jsxs10(Fragment2, { children: [
|
|
2104
|
-
title && /* @__PURE__ */
|
|
2105
|
-
description && /* @__PURE__ */
|
|
2185
|
+
title && /* @__PURE__ */ jsx35(Header4, { title }),
|
|
2186
|
+
description && /* @__PURE__ */ jsx35("p", { children: description }),
|
|
2106
2187
|
/* @__PURE__ */ jsxs10(
|
|
2107
2188
|
"div",
|
|
2108
2189
|
{
|
|
@@ -2110,30 +2191,30 @@ function Repeatable(props) {
|
|
|
2110
2191
|
"has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
|
|
2111
2192
|
}),
|
|
2112
2193
|
children: [
|
|
2113
|
-
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */
|
|
2114
|
-
/* @__PURE__ */
|
|
2194
|
+
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx35(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
|
|
2195
|
+
/* @__PURE__ */ jsx35(
|
|
2115
2196
|
NavigationOption2,
|
|
2116
2197
|
{
|
|
2117
|
-
media: /* @__PURE__ */
|
|
2198
|
+
media: /* @__PURE__ */ jsx35(Plus, {}),
|
|
2118
2199
|
title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2119
2200
|
showMediaAtAllSizes: true,
|
|
2120
2201
|
onClick: () => onAddItem()
|
|
2121
2202
|
}
|
|
2122
2203
|
),
|
|
2123
|
-
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */
|
|
2204
|
+
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx35(InlineAlert2, { type: "negative", children: validationState.message })
|
|
2124
2205
|
]
|
|
2125
2206
|
}
|
|
2126
2207
|
),
|
|
2127
|
-
/* @__PURE__ */
|
|
2208
|
+
/* @__PURE__ */ jsx35(
|
|
2128
2209
|
Modal2,
|
|
2129
2210
|
{
|
|
2130
2211
|
open: openModalType !== null,
|
|
2131
2212
|
title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2132
2213
|
body: /* @__PURE__ */ jsxs10(Fragment2, { children: [
|
|
2133
|
-
/* @__PURE__ */
|
|
2214
|
+
/* @__PURE__ */ jsx35("div", { className: "m-b-2", children: editableItem }),
|
|
2134
2215
|
/* @__PURE__ */ jsxs10("div", { children: [
|
|
2135
|
-
/* @__PURE__ */
|
|
2136
|
-
/* @__PURE__ */
|
|
2216
|
+
/* @__PURE__ */ jsx35(Button4, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
|
|
2217
|
+
/* @__PURE__ */ jsx35(Button4, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
|
|
2137
2218
|
] })
|
|
2138
2219
|
] }),
|
|
2139
2220
|
onClose: () => onCancelEdit()
|
|
@@ -2145,10 +2226,10 @@ function ItemSummaryOption({
|
|
|
2145
2226
|
item,
|
|
2146
2227
|
onClick
|
|
2147
2228
|
}) {
|
|
2148
|
-
return /* @__PURE__ */
|
|
2229
|
+
return /* @__PURE__ */ jsx35(
|
|
2149
2230
|
NavigationOption2,
|
|
2150
2231
|
{
|
|
2151
|
-
media: /* @__PURE__ */
|
|
2232
|
+
media: /* @__PURE__ */ jsx35(NavigationOptionMedia, __spreadValues({}, item)),
|
|
2152
2233
|
title: item.title,
|
|
2153
2234
|
content: item.description,
|
|
2154
2235
|
showMediaAtAllSizes: true,
|
|
@@ -2186,7 +2267,7 @@ var generic_error_messages_default = defineMessages5({
|
|
|
2186
2267
|
|
|
2187
2268
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
2188
2269
|
import { Button as Button5 } from "@transferwise/components";
|
|
2189
|
-
import { jsx as
|
|
2270
|
+
import { jsx as jsx36, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2190
2271
|
function ErrorResult({ state }) {
|
|
2191
2272
|
const intl = useIntl5();
|
|
2192
2273
|
const buttonVisualProps = {
|
|
@@ -2197,7 +2278,7 @@ function ErrorResult({ state }) {
|
|
|
2197
2278
|
return /* @__PURE__ */ jsxs11("p", { className: "m-t-2", children: [
|
|
2198
2279
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
2199
2280
|
"\xA0",
|
|
2200
|
-
/* @__PURE__ */
|
|
2281
|
+
/* @__PURE__ */ jsx36(
|
|
2201
2282
|
Button5,
|
|
2202
2283
|
__spreadProps(__spreadValues({}, buttonVisualProps), {
|
|
2203
2284
|
onClick: () => {
|
|
@@ -2224,7 +2305,7 @@ var search_messages_default = defineMessages6({
|
|
|
2224
2305
|
|
|
2225
2306
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
2226
2307
|
import { useIntl as useIntl6 } from "react-intl";
|
|
2227
|
-
import { Fragment as Fragment3, jsx as
|
|
2308
|
+
import { Fragment as Fragment3, jsx as jsx37, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2228
2309
|
function BlockSearchRendererComponent({
|
|
2229
2310
|
id,
|
|
2230
2311
|
isLoading,
|
|
@@ -2238,7 +2319,7 @@ function BlockSearchRendererComponent({
|
|
|
2238
2319
|
const trackEvent = useTrackEvent();
|
|
2239
2320
|
const { formatMessage } = useIntl6();
|
|
2240
2321
|
return /* @__PURE__ */ jsxs12("div", { className: getMargin(margin), children: [
|
|
2241
|
-
/* @__PURE__ */
|
|
2322
|
+
/* @__PURE__ */ jsx37(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx37(
|
|
2242
2323
|
Input4,
|
|
2243
2324
|
{
|
|
2244
2325
|
id,
|
|
@@ -2255,7 +2336,7 @@ function BlockSearchRendererComponent({
|
|
|
2255
2336
|
}
|
|
2256
2337
|
}
|
|
2257
2338
|
) }),
|
|
2258
|
-
isLoading ? /* @__PURE__ */
|
|
2339
|
+
isLoading ? /* @__PURE__ */ jsx37(Fragment3, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx37(SearchResultContent, { state, onChange })
|
|
2259
2340
|
] });
|
|
2260
2341
|
}
|
|
2261
2342
|
function SearchResultContent({
|
|
@@ -2264,26 +2345,26 @@ function SearchResultContent({
|
|
|
2264
2345
|
}) {
|
|
2265
2346
|
switch (state.type) {
|
|
2266
2347
|
case "error":
|
|
2267
|
-
return /* @__PURE__ */
|
|
2348
|
+
return /* @__PURE__ */ jsx37(ErrorResult, { state });
|
|
2268
2349
|
case "results":
|
|
2269
|
-
return /* @__PURE__ */
|
|
2350
|
+
return /* @__PURE__ */ jsx37(SearchResults, { state, onChange });
|
|
2270
2351
|
case "noResults":
|
|
2271
|
-
return /* @__PURE__ */
|
|
2352
|
+
return /* @__PURE__ */ jsx37(EmptySearchResult, { state });
|
|
2272
2353
|
case "pending":
|
|
2273
2354
|
default:
|
|
2274
2355
|
return null;
|
|
2275
2356
|
}
|
|
2276
2357
|
}
|
|
2277
2358
|
function EmptySearchResult({ state }) {
|
|
2278
|
-
return /* @__PURE__ */
|
|
2359
|
+
return /* @__PURE__ */ jsx37(Markdown3, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
2279
2360
|
}
|
|
2280
2361
|
function SearchResults({
|
|
2281
2362
|
state
|
|
2282
2363
|
}) {
|
|
2283
2364
|
const trackEvent = useTrackEvent();
|
|
2284
|
-
return /* @__PURE__ */
|
|
2365
|
+
return /* @__PURE__ */ jsx37(NavigationOptionsList2, { children: state.results.map((result) => {
|
|
2285
2366
|
const { icon, image } = result;
|
|
2286
|
-
return /* @__PURE__ */
|
|
2367
|
+
return /* @__PURE__ */ jsx37(
|
|
2287
2368
|
NavigationOption3,
|
|
2288
2369
|
{
|
|
2289
2370
|
title: result.title,
|
|
@@ -2309,7 +2390,7 @@ import { Markdown as Markdown4, Typeahead } from "@transferwise/components";
|
|
|
2309
2390
|
import { Search } from "@transferwise/icons";
|
|
2310
2391
|
import { useState as useState7 } from "react";
|
|
2311
2392
|
import { useIntl as useIntl7 } from "react-intl";
|
|
2312
|
-
import { jsx as
|
|
2393
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
2313
2394
|
function InlineSearchRenderer({
|
|
2314
2395
|
id,
|
|
2315
2396
|
isLoading,
|
|
@@ -2321,7 +2402,7 @@ function InlineSearchRenderer({
|
|
|
2321
2402
|
const [hasSearched, setHasSearched] = useState7(false);
|
|
2322
2403
|
const trackEvent = useTrackEvent();
|
|
2323
2404
|
const intl = useIntl7();
|
|
2324
|
-
return /* @__PURE__ */
|
|
2405
|
+
return /* @__PURE__ */ jsx38("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx38(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx38(
|
|
2325
2406
|
Typeahead,
|
|
2326
2407
|
{
|
|
2327
2408
|
id: "typeahead-input-id",
|
|
@@ -2329,10 +2410,10 @@ function InlineSearchRenderer({
|
|
|
2329
2410
|
name: "typeahead-input-name",
|
|
2330
2411
|
size: "md",
|
|
2331
2412
|
maxHeight: 100,
|
|
2332
|
-
footer: /* @__PURE__ */
|
|
2413
|
+
footer: /* @__PURE__ */ jsx38(TypeaheadFooter, { state, isLoading }),
|
|
2333
2414
|
multiple: false,
|
|
2334
2415
|
clearable: false,
|
|
2335
|
-
addon: /* @__PURE__ */
|
|
2416
|
+
addon: /* @__PURE__ */ jsx38(Search, { size: 24 }),
|
|
2336
2417
|
options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
|
|
2337
2418
|
minQueryLength: 1,
|
|
2338
2419
|
onChange: (values) => {
|
|
@@ -2369,29 +2450,29 @@ function mapResultToTypeaheadOption(result) {
|
|
|
2369
2450
|
function TypeaheadFooter({ state, isLoading }) {
|
|
2370
2451
|
const { formatMessage } = useIntl7();
|
|
2371
2452
|
if (state.type === "noResults") {
|
|
2372
|
-
return /* @__PURE__ */
|
|
2453
|
+
return /* @__PURE__ */ jsx38(Markdown4, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
2373
2454
|
}
|
|
2374
2455
|
if (state.type === "error") {
|
|
2375
|
-
return /* @__PURE__ */
|
|
2456
|
+
return /* @__PURE__ */ jsx38("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx38(ErrorResult, { state }) });
|
|
2376
2457
|
}
|
|
2377
2458
|
if (state.type === "pending" || isLoading) {
|
|
2378
|
-
return /* @__PURE__ */
|
|
2459
|
+
return /* @__PURE__ */ jsx38("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
|
|
2379
2460
|
}
|
|
2380
2461
|
return null;
|
|
2381
2462
|
}
|
|
2382
2463
|
var InlineSearchRendererComponent_default = InlineSearchRenderer;
|
|
2383
2464
|
|
|
2384
2465
|
// ../renderers/src/SearchRenderer/SearchRenderer.tsx
|
|
2385
|
-
import { jsx as
|
|
2466
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2386
2467
|
var SearchRenderer = {
|
|
2387
2468
|
canRenderType: "search",
|
|
2388
|
-
render: (props) => props.control === "inline" ? /* @__PURE__ */
|
|
2469
|
+
render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx39(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx39(BlockSearchRendererComponent_default, __spreadValues({}, props))
|
|
2389
2470
|
};
|
|
2390
2471
|
var SearchRenderer_default = SearchRenderer;
|
|
2391
2472
|
|
|
2392
2473
|
// ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
2393
2474
|
import { RadioGroup } from "@transferwise/components";
|
|
2394
|
-
import { Fragment as Fragment4, jsx as
|
|
2475
|
+
import { Fragment as Fragment4, jsx as jsx40, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2395
2476
|
function RadioInputRendererComponent(props) {
|
|
2396
2477
|
const {
|
|
2397
2478
|
id,
|
|
@@ -2406,7 +2487,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2406
2487
|
onSelect
|
|
2407
2488
|
} = props;
|
|
2408
2489
|
return /* @__PURE__ */ jsxs13(Fragment4, { children: [
|
|
2409
|
-
/* @__PURE__ */
|
|
2490
|
+
/* @__PURE__ */ jsx40(
|
|
2410
2491
|
FieldInput_default,
|
|
2411
2492
|
{
|
|
2412
2493
|
id,
|
|
@@ -2414,7 +2495,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2414
2495
|
help,
|
|
2415
2496
|
description,
|
|
2416
2497
|
validation: validationState,
|
|
2417
|
-
children: /* @__PURE__ */
|
|
2498
|
+
children: /* @__PURE__ */ jsx40("span", { children: /* @__PURE__ */ jsx40(
|
|
2418
2499
|
RadioGroup,
|
|
2419
2500
|
{
|
|
2420
2501
|
name: id,
|
|
@@ -2423,7 +2504,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2423
2504
|
value: index,
|
|
2424
2505
|
secondary: option.description,
|
|
2425
2506
|
disabled: option.disabled || disabled,
|
|
2426
|
-
avatar: /* @__PURE__ */
|
|
2507
|
+
avatar: /* @__PURE__ */ jsx40(OptionMedia, { icon: option.icon, image: option.image })
|
|
2427
2508
|
})),
|
|
2428
2509
|
selectedValue: selectedIndex != null ? selectedIndex : void 0,
|
|
2429
2510
|
onChange: onSelect
|
|
@@ -2439,7 +2520,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2439
2520
|
// ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
2440
2521
|
import { Tabs } from "@transferwise/components";
|
|
2441
2522
|
import { useEffect as useEffect3 } from "react";
|
|
2442
|
-
import { Fragment as Fragment5, jsx as
|
|
2523
|
+
import { Fragment as Fragment5, jsx as jsx41, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2443
2524
|
function TabInputRendererComponent(props) {
|
|
2444
2525
|
const {
|
|
2445
2526
|
id,
|
|
@@ -2459,7 +2540,7 @@ function TabInputRendererComponent(props) {
|
|
|
2459
2540
|
}
|
|
2460
2541
|
}, [selectedIndex, onSelect, options.length]);
|
|
2461
2542
|
return /* @__PURE__ */ jsxs14(Fragment5, { children: [
|
|
2462
|
-
/* @__PURE__ */
|
|
2543
|
+
/* @__PURE__ */ jsx41(
|
|
2463
2544
|
FieldInput_default,
|
|
2464
2545
|
{
|
|
2465
2546
|
id,
|
|
@@ -2467,7 +2548,7 @@ function TabInputRendererComponent(props) {
|
|
|
2467
2548
|
help,
|
|
2468
2549
|
description,
|
|
2469
2550
|
validation: validationState,
|
|
2470
|
-
children: /* @__PURE__ */
|
|
2551
|
+
children: /* @__PURE__ */ jsx41(
|
|
2471
2552
|
Tabs,
|
|
2472
2553
|
{
|
|
2473
2554
|
name: id,
|
|
@@ -2476,7 +2557,7 @@ function TabInputRendererComponent(props) {
|
|
|
2476
2557
|
title: option.title,
|
|
2477
2558
|
// if we pass null, we get some props-types console errors
|
|
2478
2559
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
2479
|
-
content: /* @__PURE__ */
|
|
2560
|
+
content: /* @__PURE__ */ jsx41(Fragment5, {}),
|
|
2480
2561
|
disabled: option.disabled || disabled
|
|
2481
2562
|
})),
|
|
2482
2563
|
onTabSelect: onSelect
|
|
@@ -2491,29 +2572,6 @@ var isValidIndex = (index, options) => index !== null && index >= 0 && index < o
|
|
|
2491
2572
|
|
|
2492
2573
|
// ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
2493
2574
|
import { SelectInput as SelectInput2, SelectInputOptionContent as SelectInputOptionContent2 } from "@transferwise/components";
|
|
2494
|
-
|
|
2495
|
-
// ../renderers/src/SelectInputRenderer/SelectTriggerMedia.tsx
|
|
2496
|
-
import { Avatar as Avatar3, AvatarType as AvatarType3 } from "@transferwise/components";
|
|
2497
|
-
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
2498
|
-
function SelectTriggerMedia({ icon, image }) {
|
|
2499
|
-
if (image == null ? void 0 : image.url) {
|
|
2500
|
-
return null;
|
|
2501
|
-
}
|
|
2502
|
-
if (isFlagIcon2(icon)) {
|
|
2503
|
-
return /* @__PURE__ */ jsx41(Avatar3, { type: AvatarType3.ICON, size: 24, children: /* @__PURE__ */ jsx41(DynamicIcon_default, { name: icon.name }) });
|
|
2504
|
-
}
|
|
2505
|
-
if (isNamedIcon2(icon)) {
|
|
2506
|
-
return /* @__PURE__ */ jsx41(DynamicIcon_default, { name: icon.name });
|
|
2507
|
-
}
|
|
2508
|
-
if (icon && "text" in icon) {
|
|
2509
|
-
return /* @__PURE__ */ jsx41(Avatar3, { type: AvatarType3.ICON, size: 24, children: icon.text });
|
|
2510
|
-
}
|
|
2511
|
-
return null;
|
|
2512
|
-
}
|
|
2513
|
-
var isNamedIcon2 = (icon) => icon ? "name" in icon : false;
|
|
2514
|
-
var isFlagIcon2 = (icon) => isNamedIcon2(icon) && icon.name.startsWith("flag-");
|
|
2515
|
-
|
|
2516
|
-
// ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
2517
2575
|
import { Fragment as Fragment6, jsx as jsx42, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2518
2576
|
function SelectInputRendererComponent(props) {
|
|
2519
2577
|
const {
|
|
@@ -2550,7 +2608,7 @@ function SelectInputRendererComponent(props) {
|
|
|
2550
2608
|
const contentProps = withinTrigger ? {
|
|
2551
2609
|
title: option.title,
|
|
2552
2610
|
note: option.description,
|
|
2553
|
-
icon:
|
|
2611
|
+
icon: getIconAvatar(option)
|
|
2554
2612
|
} : {
|
|
2555
2613
|
title: option.title,
|
|
2556
2614
|
description: option.description,
|
|
@@ -2707,6 +2765,9 @@ var mapStatus = (status) => {
|
|
|
2707
2765
|
return status;
|
|
2708
2766
|
};
|
|
2709
2767
|
|
|
2768
|
+
// ../renderers/src/TextInputRenderer.tsx
|
|
2769
|
+
import { InputGroup as InputGroup3 } from "@transferwise/components";
|
|
2770
|
+
|
|
2710
2771
|
// ../renderers/src/components/VariableTextInput.tsx
|
|
2711
2772
|
import {
|
|
2712
2773
|
Input as Input5,
|
|
@@ -2794,6 +2855,8 @@ var TextInputRenderer = {
|
|
|
2794
2855
|
description,
|
|
2795
2856
|
help,
|
|
2796
2857
|
error,
|
|
2858
|
+
icon,
|
|
2859
|
+
image,
|
|
2797
2860
|
maxLength,
|
|
2798
2861
|
minLength,
|
|
2799
2862
|
type,
|
|
@@ -2806,6 +2869,8 @@ var TextInputRenderer = {
|
|
|
2806
2869
|
"description",
|
|
2807
2870
|
"help",
|
|
2808
2871
|
"error",
|
|
2872
|
+
"icon",
|
|
2873
|
+
"image",
|
|
2809
2874
|
"maxLength",
|
|
2810
2875
|
"minLength",
|
|
2811
2876
|
"type",
|
|
@@ -2822,7 +2887,7 @@ var TextInputRenderer = {
|
|
|
2822
2887
|
description,
|
|
2823
2888
|
validation: validationState,
|
|
2824
2889
|
help,
|
|
2825
|
-
children: /* @__PURE__ */ jsx47(VariableTextInput_default, { control, inputProps })
|
|
2890
|
+
children: /* @__PURE__ */ jsx47(InputGroup3, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx47(VariableTextInput_default, { control, inputProps }) })
|
|
2826
2891
|
}
|
|
2827
2892
|
);
|
|
2828
2893
|
}
|