@wise/dynamic-flow-client-internal 3.24.4 → 3.26.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/main.js CHANGED
@@ -900,8 +900,8 @@ var useRendererHttpClient = () => {
900
900
  var import_components = require("@transferwise/components");
901
901
 
902
902
  // ../renderers/src/utils/layout-utils.ts
903
- var getMargin = (size) => {
904
- switch (size) {
903
+ var getMargin = (size2) => {
904
+ switch (size2) {
905
905
  case "xs":
906
906
  return "m-b-0";
907
907
  case "sm":
@@ -1122,7 +1122,7 @@ function ButtonRendererComponent({
1122
1122
  disabled,
1123
1123
  margin,
1124
1124
  title,
1125
- size,
1125
+ size: size2,
1126
1126
  onClick
1127
1127
  }) {
1128
1128
  const className = getMargin(margin);
@@ -1136,7 +1136,7 @@ function ButtonRendererComponent({
1136
1136
  className,
1137
1137
  disabled: isLoading || disabled,
1138
1138
  priority: mapControl(control),
1139
- size: mapSize(size),
1139
+ size: mapSize(size2),
1140
1140
  type,
1141
1141
  onClick,
1142
1142
  children: title
@@ -1161,11 +1161,11 @@ var mapControl = (control) => {
1161
1161
  return "secondary";
1162
1162
  }
1163
1163
  };
1164
- var mapSize = (size) => {
1165
- if (!size) {
1164
+ var mapSize = (size2) => {
1165
+ if (!size2) {
1166
1166
  return void 0;
1167
1167
  }
1168
- switch (size) {
1168
+ switch (size2) {
1169
1169
  case "xs":
1170
1170
  case "sm":
1171
1171
  return "sm";
@@ -1462,15 +1462,15 @@ var HeadingRenderer = {
1462
1462
  render: (props) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Heading, __spreadValues({}, props))
1463
1463
  };
1464
1464
  function Heading(props) {
1465
- const { text, size, align, margin, control } = props;
1465
+ const { text, size: size2, align, margin, control } = props;
1466
1466
  const className = getTextAlignmentAndMargin({ align, margin });
1467
- return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StandardHeading, { size, text, className });
1467
+ return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DisplayHeading, { size: size2, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StandardHeading, { size: size2, text, className });
1468
1468
  }
1469
- function DisplayHeading({ size, text, className }) {
1470
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_components10.Display, { type: getDisplayType(size), className, children: text });
1469
+ function DisplayHeading({ size: size2, text, className }) {
1470
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_components10.Display, { type: getDisplayType(size2), className, children: text });
1471
1471
  }
1472
- function StandardHeading({ size, text, className }) {
1473
- switch (size) {
1472
+ function StandardHeading({ size: size2, text, className }) {
1473
+ switch (size2) {
1474
1474
  case "xs":
1475
1475
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h5", { className, children: text });
1476
1476
  case "sm":
@@ -1484,8 +1484,8 @@ function StandardHeading({ size, text, className }) {
1484
1484
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h3", { className, children: text });
1485
1485
  }
1486
1486
  }
1487
- var getDisplayType = (size) => {
1488
- switch (size) {
1487
+ var getDisplayType = (size2) => {
1488
+ switch (size2) {
1489
1489
  case "xs":
1490
1490
  case "sm":
1491
1491
  return "display-small";
@@ -1520,7 +1520,7 @@ var ImageRenderer_default = ImageRenderer;
1520
1520
  function ImageRendererComponent({
1521
1521
  accessibilityDescription,
1522
1522
  margin,
1523
- size,
1523
+ size: size2,
1524
1524
  url
1525
1525
  }) {
1526
1526
  const [imageSource, setImageSource] = (0, import_react5.useState)("");
@@ -1528,7 +1528,7 @@ function ImageRendererComponent({
1528
1528
  (0, import_react5.useEffect)(() => {
1529
1529
  void getImageSource(httpClient, url).then(setImageSource);
1530
1530
  }, [url, httpClient]);
1531
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: `df-image ${size || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1531
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: `df-image ${size2 || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1532
1532
  import_components11.Image,
1533
1533
  {
1534
1534
  className: `img-responsive ${getMargin(margin)}`,
@@ -1590,7 +1590,7 @@ var InstructionsRenderer = {
1590
1590
  var InstructionsRenderer_default = InstructionsRenderer;
1591
1591
 
1592
1592
  // ../renderers/src/IntegerInputRenderer.tsx
1593
- var import_components13 = require("@transferwise/components");
1593
+ var import_components14 = require("@transferwise/components");
1594
1594
 
1595
1595
  // ../renderers/src/utils/input-utils.ts
1596
1596
  var onWheel = (event) => {
@@ -1599,13 +1599,71 @@ var onWheel = (event) => {
1599
1599
  }
1600
1600
  };
1601
1601
 
1602
- // ../renderers/src/IntegerInputRenderer.tsx
1602
+ // ../renderers/src/utils/getIconAvatar.tsx
1603
+ var import_components13 = require("@transferwise/components");
1603
1604
  var import_jsx_runtime25 = require("react/jsx-runtime");
1605
+ var size = 24;
1606
+ function getIconAvatar({ icon, image }) {
1607
+ if (image == null ? void 0 : image.url) {
1608
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1609
+ "img",
1610
+ {
1611
+ src: image.url,
1612
+ alt: image.accessibilityDescription,
1613
+ width: `${size}px`,
1614
+ height: `${size}px`
1615
+ }
1616
+ );
1617
+ }
1618
+ if (isFlagIcon2(icon)) {
1619
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_components13.Avatar, { type: import_components13.AvatarType.ICON, size, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DynamicIcon_default, { name: icon.name }) });
1620
+ }
1621
+ if (isNamedIcon2(icon)) {
1622
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DynamicIcon_default, { name: icon.name });
1623
+ }
1624
+ if (icon && "text" in icon) {
1625
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_components13.Avatar, { type: import_components13.AvatarType.ICON, size, children: icon.text });
1626
+ }
1627
+ return null;
1628
+ }
1629
+ var isNamedIcon2 = (icon) => icon ? "name" in icon : false;
1630
+ var isFlagIcon2 = (icon) => isNamedIcon2(icon) && icon.name.startsWith("flag-");
1631
+
1632
+ // ../renderers/src/utils/getInputGroupAddonStart.tsx
1633
+ var getInputGroupAddonStart = ({ icon, image }) => {
1634
+ const content = getIconAvatar({ icon, image });
1635
+ return content ? { content } : void 0;
1636
+ };
1637
+
1638
+ // ../renderers/src/IntegerInputRenderer.tsx
1639
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1604
1640
  var IntegerInputRenderer = {
1605
1641
  canRenderType: "input-integer",
1606
1642
  render: (props) => {
1607
- const _a = props, { id, label, description, help, type, validationState, value, onChange } = _a, rest = __objRest(_a, ["id", "label", "description", "help", "type", "validationState", "value", "onChange"]);
1608
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1643
+ const _a = props, {
1644
+ id,
1645
+ label,
1646
+ description,
1647
+ help,
1648
+ icon,
1649
+ image,
1650
+ type,
1651
+ validationState,
1652
+ value,
1653
+ onChange
1654
+ } = _a, rest = __objRest(_a, [
1655
+ "id",
1656
+ "label",
1657
+ "description",
1658
+ "help",
1659
+ "icon",
1660
+ "image",
1661
+ "type",
1662
+ "validationState",
1663
+ "value",
1664
+ "onChange"
1665
+ ]);
1666
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1609
1667
  FieldInput_default,
1610
1668
  {
1611
1669
  id,
@@ -1613,8 +1671,8 @@ var IntegerInputRenderer = {
1613
1671
  description,
1614
1672
  validation: validationState,
1615
1673
  help,
1616
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1617
- import_components13.Input,
1674
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_components14.InputGroup, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1675
+ import_components14.Input,
1618
1676
  __spreadValues({
1619
1677
  id,
1620
1678
  name: id,
@@ -1628,7 +1686,7 @@ var IntegerInputRenderer = {
1628
1686
  },
1629
1687
  onWheel
1630
1688
  }, rest)
1631
- )
1689
+ ) })
1632
1690
  }
1633
1691
  );
1634
1692
  }
@@ -1636,14 +1694,14 @@ var IntegerInputRenderer = {
1636
1694
  var IntegerInputRenderer_default = IntegerInputRenderer;
1637
1695
 
1638
1696
  // ../renderers/src/LoadingIndicatorRenderer.tsx
1639
- var import_components14 = require("@transferwise/components");
1640
- var import_jsx_runtime26 = require("react/jsx-runtime");
1697
+ var import_components15 = require("@transferwise/components");
1698
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1641
1699
  var LoadingIndicatorRenderer = {
1642
1700
  canRenderType: "loading-indicator",
1643
- render: ({ margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1644
- import_components14.Loader,
1701
+ render: ({ margin, size: size2 }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1702
+ import_components15.Loader,
1645
1703
  {
1646
- size,
1704
+ size: size2,
1647
1705
  classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin(margin)}` },
1648
1706
  "data-testid": "loading-indicator"
1649
1707
  }
@@ -1652,30 +1710,30 @@ var LoadingIndicatorRenderer = {
1652
1710
  var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
1653
1711
 
1654
1712
  // ../renderers/src/MarkdownRenderer.tsx
1655
- var import_components15 = require("@transferwise/components");
1656
- var import_jsx_runtime27 = require("react/jsx-runtime");
1713
+ var import_components16 = require("@transferwise/components");
1714
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1657
1715
  var MarkdownRenderer = {
1658
1716
  canRenderType: "markdown",
1659
- render: ({ content, align, margin }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_components15.Markdown, { config: { link: { target: "_blank" } }, children: content }) })
1717
+ render: ({ content, align, margin }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components16.Markdown, { config: { link: { target: "_blank" } }, children: content }) })
1660
1718
  };
1661
1719
  var MarkdownRenderer_default = MarkdownRenderer;
1662
1720
 
1663
1721
  // ../renderers/src/ModalRenderer.tsx
1664
- var import_components16 = require("@transferwise/components");
1722
+ var import_components17 = require("@transferwise/components");
1665
1723
  var import_react6 = require("react");
1666
- var import_jsx_runtime28 = require("react/jsx-runtime");
1724
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1667
1725
  var ModalRenderer = {
1668
1726
  canRenderType: "modal",
1669
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DFModal, __spreadValues({}, props))
1727
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DFModal, __spreadValues({}, props))
1670
1728
  };
1671
1729
  var ModalRenderer_default = ModalRenderer;
1672
1730
  function DFModal({ content, margin, trigger }) {
1673
1731
  const [visible, setVisible] = (0, import_react6.useState)(false);
1674
1732
  const { components, title } = content;
1675
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: getMargin(margin), children: [
1676
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components16.Button, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
1677
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1678
- import_components16.Modal,
1733
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: getMargin(margin), children: [
1734
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components17.Button, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
1735
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1736
+ import_components17.Modal,
1679
1737
  {
1680
1738
  scroll: "content",
1681
1739
  open: visible,
@@ -1689,20 +1747,20 @@ function DFModal({ content, margin, trigger }) {
1689
1747
  }
1690
1748
 
1691
1749
  // ../renderers/src/MultiSelectInputRenderer.tsx
1692
- var import_components18 = require("@transferwise/components");
1750
+ var import_components19 = require("@transferwise/components");
1693
1751
 
1694
1752
  // ../renderers/src/SelectInputRenderer/OptionMedia.tsx
1695
- var import_components17 = require("@transferwise/components");
1696
- var import_jsx_runtime29 = require("react/jsx-runtime");
1753
+ var import_components18 = require("@transferwise/components");
1754
+ var import_jsx_runtime30 = require("react/jsx-runtime");
1697
1755
  function OptionMedia({ icon, image }) {
1698
1756
  if (image == null ? void 0 : image.url) {
1699
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("img", { src: image.url, alt: image.accessibilityDescription || "", width: "64px" });
1757
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("img", { src: image.url, alt: image.accessibilityDescription || "", width: "64px" });
1700
1758
  }
1701
1759
  if (icon && "name" in icon) {
1702
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components17.Avatar, { type: import_components17.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DynamicIcon_default, { name: icon.name }) });
1760
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components18.Avatar, { type: import_components18.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DynamicIcon_default, { name: icon.name }) });
1703
1761
  }
1704
1762
  if (icon && "text" in icon) {
1705
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components17.Avatar, { type: import_components17.AvatarType.INITIALS, children: icon.text });
1763
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components18.Avatar, { type: import_components18.AvatarType.INITIALS, children: icon.text });
1706
1764
  }
1707
1765
  return null;
1708
1766
  }
@@ -1722,16 +1780,17 @@ var multi_select_messages_default = (0, import_react_intl3.defineMessages)({
1722
1780
 
1723
1781
  // ../renderers/src/MultiSelectInputRenderer.tsx
1724
1782
  var import_react7 = require("react");
1725
- var import_jsx_runtime30 = require("react/jsx-runtime");
1783
+ var import_jsx_runtime31 = require("react/jsx-runtime");
1726
1784
  var MultiSelectInputRenderer = {
1727
1785
  canRenderType: "input-multi-select",
1728
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(MultiSelectInputRendererComponent, __spreadValues({}, props))
1786
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(MultiSelectInputRendererComponent, __spreadValues({}, props))
1729
1787
  };
1730
1788
  function MultiSelectInputRendererComponent(props) {
1731
1789
  const { formatMessage } = (0, import_react_intl4.useIntl)();
1732
1790
  const [stagedIndices, setStagedIndices] = (0, import_react7.useState)();
1733
1791
  const {
1734
1792
  id,
1793
+ autoComplete,
1735
1794
  description,
1736
1795
  disabled,
1737
1796
  label,
@@ -1766,11 +1825,12 @@ function MultiSelectInputRendererComponent(props) {
1766
1825
  const contentProps = {
1767
1826
  title: option.title,
1768
1827
  description: option.description,
1769
- icon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(OptionMedia, { icon: option.icon, image: option.image })
1828
+ icon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(OptionMedia, { icon: option.icon, image: option.image })
1770
1829
  };
1771
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components18.SelectInputOptionContent, __spreadValues({}, contentProps));
1830
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components19.SelectInputOptionContent, __spreadValues({}, contentProps));
1772
1831
  };
1773
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1832
+ const extraProps = { autoComplete };
1833
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1774
1834
  FieldInput_default,
1775
1835
  {
1776
1836
  id,
@@ -1778,9 +1838,9 @@ function MultiSelectInputRendererComponent(props) {
1778
1838
  help,
1779
1839
  description,
1780
1840
  validation: validationState,
1781
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1782
- import_components18.SelectInput,
1783
- {
1841
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1842
+ import_components19.SelectInput,
1843
+ __spreadValues({
1784
1844
  id,
1785
1845
  items: options.map((option, index) => {
1786
1846
  var _a, _b, _c;
@@ -1809,7 +1869,7 @@ function MultiSelectInputRendererComponent(props) {
1809
1869
  setStagedIndices(void 0);
1810
1870
  }
1811
1871
  }
1812
- }
1872
+ }, extraProps)
1813
1873
  )
1814
1874
  }
1815
1875
  );
@@ -1817,12 +1877,12 @@ function MultiSelectInputRendererComponent(props) {
1817
1877
  var MultiSelectInputRenderer_default = MultiSelectInputRenderer;
1818
1878
 
1819
1879
  // ../renderers/src/MultiUploadInputRenderer.tsx
1820
- var import_components20 = require("@transferwise/components");
1880
+ var import_components21 = require("@transferwise/components");
1821
1881
 
1822
1882
  // ../renderers/src/components/UploadFieldInput.tsx
1823
- var import_components19 = require("@transferwise/components");
1883
+ var import_components20 = require("@transferwise/components");
1824
1884
  var import_classnames3 = __toESM(require_classnames());
1825
- var import_jsx_runtime31 = require("react/jsx-runtime");
1885
+ var import_jsx_runtime32 = require("react/jsx-runtime");
1826
1886
  function UploadFieldInput({
1827
1887
  id,
1828
1888
  children,
@@ -1831,18 +1891,18 @@ function UploadFieldInput({
1831
1891
  help,
1832
1892
  validation
1833
1893
  }) {
1834
- const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(LabelContentWithHelp, { text: label, help }) : label;
1894
+ const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(LabelContentWithHelp, { text: label, help }) : label;
1835
1895
  const descriptionId = description ? `${id}-description` : void 0;
1836
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
1896
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
1837
1897
  "div",
1838
1898
  {
1839
1899
  className: (0, import_classnames3.default)("form-group d-block", {
1840
1900
  "has-error": (validation == null ? void 0 : validation.status) === "invalid"
1841
1901
  }),
1842
1902
  children: [
1843
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
1903
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
1844
1904
  children,
1845
- (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components19.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
1905
+ (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_components20.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
1846
1906
  ]
1847
1907
  }
1848
1908
  );
@@ -1874,7 +1934,7 @@ var getFileType = (base64Url) => {
1874
1934
  var getRandomId = () => Math.random().toString(36).substring(2);
1875
1935
 
1876
1936
  // ../renderers/src/MultiUploadInputRenderer.tsx
1877
- var import_jsx_runtime32 = require("react/jsx-runtime");
1937
+ var import_jsx_runtime33 = require("react/jsx-runtime");
1878
1938
  var MultiUploadInputRenderer = {
1879
1939
  canRenderType: "input-upload-multi",
1880
1940
  render: (props) => {
@@ -1901,7 +1961,7 @@ var MultiUploadInputRenderer = {
1901
1961
  };
1902
1962
  const onDeleteFile = async (fileId) => onDelete(String(fileId));
1903
1963
  const descriptionId = description ? `${id}-description` : void 0;
1904
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1964
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1905
1965
  UploadFieldInput_default,
1906
1966
  {
1907
1967
  id,
@@ -1909,8 +1969,8 @@ var MultiUploadInputRenderer = {
1909
1969
  description,
1910
1970
  validation: validationState,
1911
1971
  help,
1912
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1913
- import_components20.UploadInput,
1972
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1973
+ import_components21.UploadInput,
1914
1974
  {
1915
1975
  id,
1916
1976
  "aria-describedby": descriptionId,
@@ -1932,13 +1992,35 @@ var MultiUploadInputRenderer = {
1932
1992
  var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
1933
1993
 
1934
1994
  // ../renderers/src/NumberInputRenderer.tsx
1935
- var import_components21 = require("@transferwise/components");
1936
- var import_jsx_runtime33 = require("react/jsx-runtime");
1995
+ var import_components22 = require("@transferwise/components");
1996
+ var import_jsx_runtime34 = require("react/jsx-runtime");
1937
1997
  var NumberInputRenderer = {
1938
1998
  canRenderType: "input-number",
1939
1999
  render: (props) => {
1940
- const _a = props, { id, label, description, help, type, validationState, value, onChange } = _a, rest = __objRest(_a, ["id", "label", "description", "help", "type", "validationState", "value", "onChange"]);
1941
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2000
+ const _a = props, {
2001
+ id,
2002
+ label,
2003
+ description,
2004
+ help,
2005
+ icon,
2006
+ image,
2007
+ type,
2008
+ validationState,
2009
+ value,
2010
+ onChange
2011
+ } = _a, rest = __objRest(_a, [
2012
+ "id",
2013
+ "label",
2014
+ "description",
2015
+ "help",
2016
+ "icon",
2017
+ "image",
2018
+ "type",
2019
+ "validationState",
2020
+ "value",
2021
+ "onChange"
2022
+ ]);
2023
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1942
2024
  FieldInput_default,
1943
2025
  {
1944
2026
  id,
@@ -1946,8 +2028,8 @@ var NumberInputRenderer = {
1946
2028
  description,
1947
2029
  validation: validationState,
1948
2030
  help,
1949
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1950
- import_components21.Input,
2031
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components22.InputGroup, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2032
+ import_components22.Input,
1951
2033
  __spreadValues({
1952
2034
  id,
1953
2035
  name: id,
@@ -1959,7 +2041,7 @@ var NumberInputRenderer = {
1959
2041
  },
1960
2042
  onWheel
1961
2043
  }, rest)
1962
- )
2044
+ ) })
1963
2045
  }
1964
2046
  );
1965
2047
  }
@@ -1970,16 +2052,16 @@ var NumberInputRenderer_default = NumberInputRenderer;
1970
2052
  var import_react_intl6 = require("react-intl");
1971
2053
 
1972
2054
  // ../renderers/src/hooks/useSnackBarIfAvailable.ts
1973
- var import_components22 = require("@transferwise/components");
2055
+ var import_components23 = require("@transferwise/components");
1974
2056
  var import_react8 = require("react");
1975
2057
  function useSnackBarIfAvailable() {
1976
- const context = (0, import_react8.useContext)(import_components22.SnackbarContext);
2058
+ const context = (0, import_react8.useContext)(import_components23.SnackbarContext);
1977
2059
  return context ? context.createSnackbar : () => {
1978
2060
  };
1979
2061
  }
1980
2062
 
1981
2063
  // ../renderers/src/ParagraphRenderer.tsx
1982
- var import_components23 = require("@transferwise/components");
2064
+ var import_components24 = require("@transferwise/components");
1983
2065
  var import_classnames4 = __toESM(require_classnames());
1984
2066
 
1985
2067
  // ../renderers/src/messages/paragraph.messages.ts
@@ -1998,17 +2080,17 @@ var paragraph_messages_default = (0, import_react_intl5.defineMessages)({
1998
2080
  });
1999
2081
 
2000
2082
  // ../renderers/src/ParagraphRenderer.tsx
2001
- var import_jsx_runtime34 = require("react/jsx-runtime");
2083
+ var import_jsx_runtime35 = require("react/jsx-runtime");
2002
2084
  var ParagraphRenderer = {
2003
2085
  canRenderType: "paragraph",
2004
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Paragraph, __spreadValues({}, props))
2086
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Paragraph, __spreadValues({}, props))
2005
2087
  };
2006
2088
  function Paragraph({ align, control, margin, text }) {
2007
2089
  const className = getTextAlignmentAndMargin({ align, margin });
2008
- return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(StandardParagraph, { className, text });
2090
+ return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StandardParagraph, { className, text });
2009
2091
  }
2010
2092
  function StandardParagraph({ text, className }) {
2011
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: `np-text-body-large ${className}`, children: text });
2093
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: `np-text-body-large ${className}`, children: text });
2012
2094
  }
2013
2095
  function CopyableParagraph({
2014
2096
  text,
@@ -2022,9 +2104,9 @@ function CopyableParagraph({
2022
2104
  });
2023
2105
  };
2024
2106
  const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
2025
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className, children: [
2026
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2027
- import_components23.Input,
2107
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className, children: [
2108
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2109
+ import_components24.Input,
2028
2110
  {
2029
2111
  type: "text",
2030
2112
  value: text,
@@ -2032,13 +2114,13 @@ function CopyableParagraph({
2032
2114
  className: (0, import_classnames4.default)("text-ellipsis", inputAlignmentClasses)
2033
2115
  }
2034
2116
  ),
2035
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components23.Button, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
2117
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components24.Button, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
2036
2118
  ] });
2037
2119
  }
2038
2120
  var ParagraphRenderer_default = ParagraphRenderer;
2039
2121
 
2040
2122
  // ../renderers/src/RepeatableRenderer.tsx
2041
- var import_components24 = require("@transferwise/components");
2123
+ var import_components25 = require("@transferwise/components");
2042
2124
  var import_react9 = require("react");
2043
2125
  var import_icons = require("@transferwise/icons");
2044
2126
  var import_react_intl8 = require("react-intl");
@@ -2070,10 +2152,10 @@ var repeatable_messages_default = (0, import_react_intl7.defineMessages)({
2070
2152
 
2071
2153
  // ../renderers/src/RepeatableRenderer.tsx
2072
2154
  var import_classnames5 = __toESM(require_classnames());
2073
- var import_jsx_runtime35 = require("react/jsx-runtime");
2155
+ var import_jsx_runtime36 = require("react/jsx-runtime");
2074
2156
  var RepeatableRenderer = {
2075
2157
  canRenderType: "repeatable",
2076
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Repeatable, __spreadValues({}, props))
2158
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Repeatable, __spreadValues({}, props))
2077
2159
  };
2078
2160
  function Repeatable(props) {
2079
2161
  const {
@@ -2112,40 +2194,40 @@ function Repeatable(props) {
2112
2194
  const onCancelEdit = () => {
2113
2195
  setOpenModalType(null);
2114
2196
  };
2115
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
2116
- title && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components24.Header, { title }),
2117
- description && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { children: description }),
2118
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2197
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
2198
+ title && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components25.Header, { title }),
2199
+ description && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { children: description }),
2200
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
2119
2201
  "div",
2120
2202
  {
2121
2203
  className: (0, import_classnames5.default)("form-group", {
2122
2204
  "has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
2123
2205
  }),
2124
2206
  children: [
2125
- items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
2126
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2127
- import_components24.NavigationOption,
2207
+ items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
2208
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2209
+ import_components25.NavigationOption,
2128
2210
  {
2129
- media: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons.Plus, {}),
2211
+ media: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons.Plus, {}),
2130
2212
  title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
2131
2213
  showMediaAtAllSizes: true,
2132
2214
  onClick: () => onAddItem()
2133
2215
  }
2134
2216
  ),
2135
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components24.InlineAlert, { type: "negative", children: validationState.message })
2217
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components25.InlineAlert, { type: "negative", children: validationState.message })
2136
2218
  ]
2137
2219
  }
2138
2220
  ),
2139
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2140
- import_components24.Modal,
2221
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2222
+ import_components25.Modal,
2141
2223
  {
2142
2224
  open: openModalType !== null,
2143
2225
  title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
2144
- body: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
2145
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "m-b-2", children: editableItem }),
2146
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { children: [
2147
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components24.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
2148
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components24.Button, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
2226
+ body: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
2227
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "m-b-2", children: editableItem }),
2228
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { children: [
2229
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components25.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
2230
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components25.Button, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
2149
2231
  ] })
2150
2232
  ] }),
2151
2233
  onClose: () => onCancelEdit()
@@ -2157,10 +2239,10 @@ function ItemSummaryOption({
2157
2239
  item,
2158
2240
  onClick
2159
2241
  }) {
2160
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2161
- import_components24.NavigationOption,
2242
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2243
+ import_components25.NavigationOption,
2162
2244
  {
2163
- media: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(NavigationOptionMedia, __spreadValues({}, item)),
2245
+ media: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(NavigationOptionMedia, __spreadValues({}, item)),
2164
2246
  title: item.title,
2165
2247
  content: item.description,
2166
2248
  showMediaAtAllSizes: true,
@@ -2171,7 +2253,7 @@ function ItemSummaryOption({
2171
2253
  var RepeatableRenderer_default = RepeatableRenderer;
2172
2254
 
2173
2255
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
2174
- var import_components26 = require("@transferwise/components");
2256
+ var import_components27 = require("@transferwise/components");
2175
2257
 
2176
2258
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
2177
2259
  var import_react_intl10 = require("react-intl");
@@ -2197,8 +2279,8 @@ var generic_error_messages_default = (0, import_react_intl9.defineMessages)({
2197
2279
  });
2198
2280
 
2199
2281
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
2200
- var import_components25 = require("@transferwise/components");
2201
- var import_jsx_runtime36 = require("react/jsx-runtime");
2282
+ var import_components26 = require("@transferwise/components");
2283
+ var import_jsx_runtime37 = require("react/jsx-runtime");
2202
2284
  function ErrorResult({ state }) {
2203
2285
  const intl = (0, import_react_intl10.useIntl)();
2204
2286
  const buttonVisualProps = {
@@ -2206,11 +2288,11 @@ function ErrorResult({ state }) {
2206
2288
  size: "sm",
2207
2289
  style: { marginTop: "-2px", padding: "0", width: "auto", display: "inline" }
2208
2290
  };
2209
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("p", { className: "m-t-2", children: [
2291
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("p", { className: "m-t-2", children: [
2210
2292
  intl.formatMessage(generic_error_messages_default.genericError),
2211
2293
  "\xA0",
2212
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2213
- import_components25.Button,
2294
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2295
+ import_components26.Button,
2214
2296
  __spreadProps(__spreadValues({}, buttonVisualProps), {
2215
2297
  onClick: () => {
2216
2298
  state.onRetry();
@@ -2236,7 +2318,7 @@ var search_messages_default = (0, import_react_intl11.defineMessages)({
2236
2318
 
2237
2319
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
2238
2320
  var import_react_intl12 = require("react-intl");
2239
- var import_jsx_runtime37 = require("react/jsx-runtime");
2321
+ var import_jsx_runtime38 = require("react/jsx-runtime");
2240
2322
  function BlockSearchRendererComponent({
2241
2323
  id,
2242
2324
  isLoading,
@@ -2249,9 +2331,9 @@ function BlockSearchRendererComponent({
2249
2331
  const [hasSearched, setHasSearched] = (0, import_react10.useState)(false);
2250
2332
  const trackEvent = useTrackEvent();
2251
2333
  const { formatMessage } = (0, import_react_intl12.useIntl)();
2252
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: getMargin(margin), children: [
2253
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2254
- import_components26.Input,
2334
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: getMargin(margin), children: [
2335
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2336
+ import_components27.Input,
2255
2337
  {
2256
2338
  id,
2257
2339
  name: id,
@@ -2267,7 +2349,7 @@ function BlockSearchRendererComponent({
2267
2349
  }
2268
2350
  }
2269
2351
  ) }),
2270
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_jsx_runtime37.Fragment, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SearchResultContent, { state, onChange })
2352
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_jsx_runtime38.Fragment, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SearchResultContent, { state, onChange })
2271
2353
  ] });
2272
2354
  }
2273
2355
  function SearchResultContent({
@@ -2276,27 +2358,27 @@ function SearchResultContent({
2276
2358
  }) {
2277
2359
  switch (state.type) {
2278
2360
  case "error":
2279
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ErrorResult, { state });
2361
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ErrorResult, { state });
2280
2362
  case "results":
2281
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SearchResults, { state, onChange });
2363
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SearchResults, { state, onChange });
2282
2364
  case "noResults":
2283
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(EmptySearchResult, { state });
2365
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(EmptySearchResult, { state });
2284
2366
  case "pending":
2285
2367
  default:
2286
2368
  return null;
2287
2369
  }
2288
2370
  }
2289
2371
  function EmptySearchResult({ state }) {
2290
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components26.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
2372
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_components27.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
2291
2373
  }
2292
2374
  function SearchResults({
2293
2375
  state
2294
2376
  }) {
2295
2377
  const trackEvent = useTrackEvent();
2296
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components26.NavigationOptionsList, { children: state.results.map((result) => {
2378
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_components27.NavigationOptionsList, { children: state.results.map((result) => {
2297
2379
  const { icon, image } = result;
2298
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2299
- import_components26.NavigationOption,
2380
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2381
+ import_components27.NavigationOption,
2300
2382
  {
2301
2383
  title: result.title,
2302
2384
  content: result.description,
@@ -2317,11 +2399,11 @@ function SearchResults({
2317
2399
  var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
2318
2400
 
2319
2401
  // ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
2320
- var import_components27 = require("@transferwise/components");
2402
+ var import_components28 = require("@transferwise/components");
2321
2403
  var import_icons2 = require("@transferwise/icons");
2322
2404
  var import_react11 = require("react");
2323
2405
  var import_react_intl13 = require("react-intl");
2324
- var import_jsx_runtime38 = require("react/jsx-runtime");
2406
+ var import_jsx_runtime39 = require("react/jsx-runtime");
2325
2407
  function InlineSearchRenderer({
2326
2408
  id,
2327
2409
  isLoading,
@@ -2333,18 +2415,18 @@ function InlineSearchRenderer({
2333
2415
  const [hasSearched, setHasSearched] = (0, import_react11.useState)(false);
2334
2416
  const trackEvent = useTrackEvent();
2335
2417
  const intl = (0, import_react_intl13.useIntl)();
2336
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2337
- import_components27.Typeahead,
2418
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2419
+ import_components28.Typeahead,
2338
2420
  {
2339
2421
  id: "typeahead-input-id",
2340
2422
  intl,
2341
2423
  name: "typeahead-input-name",
2342
2424
  size: "md",
2343
2425
  maxHeight: 100,
2344
- footer: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TypeaheadFooter, { state, isLoading }),
2426
+ footer: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(TypeaheadFooter, { state, isLoading }),
2345
2427
  multiple: false,
2346
2428
  clearable: false,
2347
- addon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons2.Search, { size: 24 }),
2429
+ addon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons2.Search, { size: 24 }),
2348
2430
  options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
2349
2431
  minQueryLength: 1,
2350
2432
  onChange: (values) => {
@@ -2381,29 +2463,29 @@ function mapResultToTypeaheadOption(result) {
2381
2463
  function TypeaheadFooter({ state, isLoading }) {
2382
2464
  const { formatMessage } = (0, import_react_intl13.useIntl)();
2383
2465
  if (state.type === "noResults") {
2384
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_components27.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
2466
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components28.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
2385
2467
  }
2386
2468
  if (state.type === "error") {
2387
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ErrorResult, { state }) });
2469
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ErrorResult, { state }) });
2388
2470
  }
2389
2471
  if (state.type === "pending" || isLoading) {
2390
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
2472
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
2391
2473
  }
2392
2474
  return null;
2393
2475
  }
2394
2476
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
2395
2477
 
2396
2478
  // ../renderers/src/SearchRenderer/SearchRenderer.tsx
2397
- var import_jsx_runtime39 = require("react/jsx-runtime");
2479
+ var import_jsx_runtime40 = require("react/jsx-runtime");
2398
2480
  var SearchRenderer = {
2399
2481
  canRenderType: "search",
2400
- render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
2482
+ render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
2401
2483
  };
2402
2484
  var SearchRenderer_default = SearchRenderer;
2403
2485
 
2404
2486
  // ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
2405
- var import_components28 = require("@transferwise/components");
2406
- var import_jsx_runtime40 = require("react/jsx-runtime");
2487
+ var import_components29 = require("@transferwise/components");
2488
+ var import_jsx_runtime41 = require("react/jsx-runtime");
2407
2489
  function RadioInputRendererComponent(props) {
2408
2490
  const {
2409
2491
  id,
@@ -2417,8 +2499,8 @@ function RadioInputRendererComponent(props) {
2417
2499
  validationState,
2418
2500
  onSelect
2419
2501
  } = props;
2420
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
2421
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2502
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
2503
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2422
2504
  FieldInput_default,
2423
2505
  {
2424
2506
  id,
@@ -2426,8 +2508,8 @@ function RadioInputRendererComponent(props) {
2426
2508
  help,
2427
2509
  description,
2428
2510
  validation: validationState,
2429
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2430
- import_components28.RadioGroup,
2511
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2512
+ import_components29.RadioGroup,
2431
2513
  {
2432
2514
  name: id,
2433
2515
  radios: options.map((option, index) => ({
@@ -2435,7 +2517,7 @@ function RadioInputRendererComponent(props) {
2435
2517
  value: index,
2436
2518
  secondary: option.description,
2437
2519
  disabled: option.disabled || disabled,
2438
- avatar: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(OptionMedia, { icon: option.icon, image: option.image })
2520
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(OptionMedia, { icon: option.icon, image: option.image })
2439
2521
  })),
2440
2522
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
2441
2523
  onChange: onSelect
@@ -2449,9 +2531,9 @@ function RadioInputRendererComponent(props) {
2449
2531
  }
2450
2532
 
2451
2533
  // ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
2452
- var import_components29 = require("@transferwise/components");
2534
+ var import_components30 = require("@transferwise/components");
2453
2535
  var import_react12 = require("react");
2454
- var import_jsx_runtime41 = require("react/jsx-runtime");
2536
+ var import_jsx_runtime42 = require("react/jsx-runtime");
2455
2537
  function TabInputRendererComponent(props) {
2456
2538
  const {
2457
2539
  id,
@@ -2470,8 +2552,8 @@ function TabInputRendererComponent(props) {
2470
2552
  onSelect(0);
2471
2553
  }
2472
2554
  }, [selectedIndex, onSelect, options.length]);
2473
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
2474
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2555
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
2556
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2475
2557
  FieldInput_default,
2476
2558
  {
2477
2559
  id,
@@ -2479,8 +2561,8 @@ function TabInputRendererComponent(props) {
2479
2561
  help,
2480
2562
  description,
2481
2563
  validation: validationState,
2482
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2483
- import_components29.Tabs,
2564
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2565
+ import_components30.Tabs,
2484
2566
  {
2485
2567
  name: id,
2486
2568
  selected: selectedIndex != null ? selectedIndex : 0,
@@ -2488,7 +2570,7 @@ function TabInputRendererComponent(props) {
2488
2570
  title: option.title,
2489
2571
  // if we pass null, we get some props-types console errors
2490
2572
  // eslint-disable-next-line react/jsx-no-useless-fragment
2491
- content: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, {}),
2573
+ content: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, {}),
2492
2574
  disabled: option.disabled || disabled
2493
2575
  })),
2494
2576
  onTabSelect: onSelect
@@ -2503,28 +2585,11 @@ var isValidIndex = (index, options) => index !== null && index >= 0 && index < o
2503
2585
 
2504
2586
  // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
2505
2587
  var import_components31 = require("@transferwise/components");
2506
-
2507
- // ../renderers/src/SelectInputRenderer/SelectTriggerMedia.tsx
2508
- var import_components30 = require("@transferwise/components");
2509
- var import_jsx_runtime42 = require("react/jsx-runtime");
2510
- function SelectTriggerMedia({ icon, image }) {
2511
- if (image == null ? void 0 : image.url) {
2512
- return null;
2513
- }
2514
- if (icon && "name" in icon) {
2515
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components30.Avatar, { type: import_components30.AvatarType.ICON, size: 24, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DynamicIcon_default, { name: icon.name }) });
2516
- }
2517
- if (icon && "text" in icon) {
2518
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components30.Avatar, { type: import_components30.AvatarType.ICON, size: 24, children: icon.text });
2519
- }
2520
- return null;
2521
- }
2522
-
2523
- // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
2524
2588
  var import_jsx_runtime43 = require("react/jsx-runtime");
2525
2589
  function SelectInputRendererComponent(props) {
2526
2590
  const {
2527
2591
  id,
2592
+ autoComplete,
2528
2593
  children,
2529
2594
  description,
2530
2595
  disabled,
@@ -2556,7 +2621,7 @@ function SelectInputRendererComponent(props) {
2556
2621
  const contentProps = withinTrigger ? {
2557
2622
  title: option.title,
2558
2623
  note: option.description,
2559
- icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SelectTriggerMedia, { icon: option.icon, image: option.image })
2624
+ icon: getIconAvatar(option)
2560
2625
  } : {
2561
2626
  title: option.title,
2562
2627
  description: option.description,
@@ -2564,6 +2629,7 @@ function SelectInputRendererComponent(props) {
2564
2629
  };
2565
2630
  return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components31.SelectInputOptionContent, __spreadValues({}, contentProps));
2566
2631
  };
2632
+ const extraProps = { autoComplete };
2567
2633
  return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
2568
2634
  /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2569
2635
  FieldInput_default,
@@ -2575,7 +2641,7 @@ function SelectInputRendererComponent(props) {
2575
2641
  validation: validationState,
2576
2642
  children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2577
2643
  import_components31.SelectInput,
2578
- {
2644
+ __spreadValues({
2579
2645
  name: id,
2580
2646
  placeholder,
2581
2647
  items,
@@ -2585,7 +2651,7 @@ function SelectInputRendererComponent(props) {
2585
2651
  filterable: items.length >= 8,
2586
2652
  onChange: onSelect,
2587
2653
  onClear: required ? void 0 : () => onSelect(null)
2588
- }
2654
+ }, extraProps)
2589
2655
  )
2590
2656
  }
2591
2657
  ),
@@ -2712,6 +2778,9 @@ var mapStatus = (status) => {
2712
2778
  return status;
2713
2779
  };
2714
2780
 
2781
+ // ../renderers/src/TextInputRenderer.tsx
2782
+ var import_components35 = require("@transferwise/components");
2783
+
2715
2784
  // ../renderers/src/components/VariableTextInput.tsx
2716
2785
  var import_components34 = require("@transferwise/components");
2717
2786
  var import_jsx_runtime47 = require("react/jsx-runtime");
@@ -2793,6 +2862,8 @@ var TextInputRenderer = {
2793
2862
  description,
2794
2863
  help,
2795
2864
  error,
2865
+ icon,
2866
+ image,
2796
2867
  maxLength,
2797
2868
  minLength,
2798
2869
  type,
@@ -2805,6 +2876,8 @@ var TextInputRenderer = {
2805
2876
  "description",
2806
2877
  "help",
2807
2878
  "error",
2879
+ "icon",
2880
+ "image",
2808
2881
  "maxLength",
2809
2882
  "minLength",
2810
2883
  "type",
@@ -2821,7 +2894,7 @@ var TextInputRenderer = {
2821
2894
  description,
2822
2895
  validation: validationState,
2823
2896
  help,
2824
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(VariableTextInput_default, { control, inputProps })
2897
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components35.InputGroup, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(VariableTextInput_default, { control, inputProps }) })
2825
2898
  }
2826
2899
  );
2827
2900
  }
@@ -2829,7 +2902,7 @@ var TextInputRenderer = {
2829
2902
  var TextInputRenderer_default = TextInputRenderer;
2830
2903
 
2831
2904
  // ../renderers/src/UploadInputRenderer.tsx
2832
- var import_components35 = require("@transferwise/components");
2905
+ var import_components36 = require("@transferwise/components");
2833
2906
  var import_jsx_runtime49 = require("react/jsx-runtime");
2834
2907
  var UploadInputRenderer = {
2835
2908
  canRenderType: "input-upload",
@@ -2854,7 +2927,7 @@ var UploadInputRenderer = {
2854
2927
  description: void 0,
2855
2928
  validation: validationState,
2856
2929
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
2857
- import_components35.UploadInput,
2930
+ import_components36.UploadInput,
2858
2931
  {
2859
2932
  id,
2860
2933
  description,
@@ -2919,7 +2992,7 @@ var LargeUploadRenderer = {
2919
2992
  validation: validationState,
2920
2993
  help,
2921
2994
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
2922
- import_components35.Upload,
2995
+ import_components36.Upload,
2923
2996
  __spreadProps(__spreadValues({}, uploadProps), {
2924
2997
  usAccept: getAcceptsString(accepts),
2925
2998
  usDisabled: disabled,
@@ -2934,16 +3007,16 @@ var LargeUploadRenderer = {
2934
3007
  };
2935
3008
 
2936
3009
  // ../renderers/src/ReviewRenderer.tsx
2937
- var import_components36 = require("@transferwise/components");
3010
+ var import_components37 = require("@transferwise/components");
2938
3011
  var import_jsx_runtime50 = require("react/jsx-runtime");
2939
3012
  var ReviewRenderer = {
2940
3013
  canRenderType: "review",
2941
3014
  render: ({ callToAction, control, fields, margin, title }) => {
2942
3015
  const orientation = mapControlToDefinitionListLayout(control);
2943
3016
  return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: getMargin(margin), children: [
2944
- (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_components36.Header, { title: title != null ? title : "", action: getReviewAction(callToAction) }),
3017
+ (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_components37.Header, { title: title != null ? title : "", action: getReviewAction(callToAction) }),
2945
3018
  /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
2946
- import_components36.DefinitionList,
3019
+ import_components37.DefinitionList,
2947
3020
  {
2948
3021
  layout: orientation,
2949
3022
  definitions: fields.map(({ label, value, help }, index) => ({
@@ -3041,7 +3114,7 @@ var external_confirmation_messages_default = (0, import_react_intl14.defineMessa
3041
3114
  });
3042
3115
 
3043
3116
  // ../renderers/src/step/ExternalConfirmationDialog.tsx
3044
- var import_components37 = require("@transferwise/components");
3117
+ var import_components38 = require("@transferwise/components");
3045
3118
  var import_jsx_runtime51 = require("react/jsx-runtime");
3046
3119
  function ExternalConfirmationDialog({
3047
3120
  external,
@@ -3050,10 +3123,10 @@ function ExternalConfirmationDialog({
3050
3123
  const { formatMessage } = (0, import_react_intl15.useIntl)();
3051
3124
  return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
3052
3125
  /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("h2", { className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.title) }),
3053
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components37.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(external.url) }) }),
3126
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components38.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(external.url) }) }),
3054
3127
  /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
3055
3128
  /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3056
- import_components37.Button,
3129
+ import_components38.Button,
3057
3130
  {
3058
3131
  block: true,
3059
3132
  className: "m-b-2",
@@ -3066,7 +3139,7 @@ function ExternalConfirmationDialog({
3066
3139
  children: formatMessage(external_confirmation_messages_default.open)
3067
3140
  }
3068
3141
  ),
3069
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components37.Button, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onClose, children: formatMessage(external_confirmation_messages_default.cancel) })
3142
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components38.Button, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onClose, children: formatMessage(external_confirmation_messages_default.cancel) })
3070
3143
  ] }) })
3071
3144
  ] }) });
3072
3145
  }
@@ -3095,7 +3168,7 @@ function useExternal(url) {
3095
3168
  }
3096
3169
 
3097
3170
  // ../renderers/src/step/BackButton.tsx
3098
- var import_components38 = require("@transferwise/components");
3171
+ var import_components39 = require("@transferwise/components");
3099
3172
  var import_icons3 = require("@transferwise/icons");
3100
3173
  var import_jsx_runtime52 = require("react/jsx-runtime");
3101
3174
  function BackButton({ title, onClick }) {
@@ -3109,7 +3182,7 @@ function BackButton({ title, onClick }) {
3109
3182
  onClick,
3110
3183
  children: [
3111
3184
  /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "sr-only", children: title }),
3112
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components38.Avatar, { type: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons3.ArrowLeft, { size: "24" }) })
3185
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components39.Avatar, { type: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons3.ArrowLeft, { size: "24" }) })
3113
3186
  ]
3114
3187
  }
3115
3188
  ) });
@@ -3117,7 +3190,7 @@ function BackButton({ title, onClick }) {
3117
3190
  var BackButton_default = BackButton;
3118
3191
 
3119
3192
  // ../renderers/src/step/StepRenderer.tsx
3120
- var import_components39 = require("@transferwise/components");
3193
+ var import_components40 = require("@transferwise/components");
3121
3194
  var import_jsx_runtime53 = require("react/jsx-runtime");
3122
3195
  var StepRenderer = {
3123
3196
  canRenderType: "step",
@@ -3133,10 +3206,10 @@ function StepRendererComponent(props) {
3133
3206
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(StepRendererContextProvider, { value, children: [
3134
3207
  back ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(BackButton_default, __spreadValues({}, back)) : null,
3135
3208
  title || description ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "m-b-4", children: [
3136
- title ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components39.Title, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
3209
+ title ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components40.Title, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
3137
3210
  description ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-xs-center np-text-body-large", children: description }) : void 0
3138
3211
  ] }) : void 0,
3139
- error ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components39.Alert, { type: "negative", className: "m-b-2", message: error }) : void 0,
3212
+ error ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components40.Alert, { type: "negative", className: "m-b-2", message: error }) : void 0,
3140
3213
  children
3141
3214
  ] });
3142
3215
  }