@wise/dynamic-flow-client-internal 4.16.0-exp-modal-renderer-c6d2baa → 4.16.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.mjs CHANGED
@@ -691,102 +691,7 @@ var mapCtaToAlertAction = (callToAction) => {
691
691
  }
692
692
  return void 0;
693
693
  };
694
-
695
- // ../renderers/src/BoxRenderer.tsx
696
- import classNames from "classnames";
697
- import { jsx as jsx2 } from "react/jsx-runtime";
698
- var BoxRenderer = {
699
- canRenderType: "box",
700
- render: ({ children, control, margin, width }) => {
701
- const hasFixedWidth = width !== "xl";
702
- const hasBorder = control === "bordered" || control === "bordered-web";
703
- const contents = /* @__PURE__ */ jsx2(
704
- "div",
705
- {
706
- className: classNames({
707
- "df-box-renderer-border": hasBorder,
708
- [`df-box-renderer-width-${width}`]: hasFixedWidth,
709
- [getMargin(margin)]: !hasFixedWidth
710
- }),
711
- children
712
- }
713
- );
714
- return hasFixedWidth ? /* @__PURE__ */ jsx2("div", { className: classNames("df-box-renderer-fixed-width", getMargin(margin)), children: contents }) : contents;
715
- }
716
- };
717
-
718
- // ../renderers/src/ButtonRenderer.tsx
719
- import { Button } from "@transferwise/components";
720
- import { useState } from "react";
721
- import { jsx as jsx3 } from "react/jsx-runtime";
722
- var ButtonRenderer = {
723
- canRenderType: "button",
724
- render: ButtonComponent
725
- };
726
- function ButtonComponent(props) {
727
- const { control, context, disabled, margin, title, size, stepLoadingState, onClick } = props;
728
- const [isActive, setActive] = useState(false);
729
- const isLoading = isActive && stepLoadingState !== "idle";
730
- const priority = mapControl(control);
731
- const type = priority === "tertiary" ? void 0 : mapContext(context);
732
- return /* @__PURE__ */ jsx3(
733
- Button,
734
- {
735
- block: true,
736
- className: getMargin(margin),
737
- disabled: isLoading ? false : disabled,
738
- priority,
739
- size: mapSize(size),
740
- loading: isLoading,
741
- type,
742
- onClick: () => {
743
- setActive(true);
744
- onClick();
745
- },
746
- onBlur: () => {
747
- setActive(false);
748
- },
749
- children: title
750
- }
751
- );
752
- }
753
- var mapContext = (context) => {
754
- switch (context) {
755
- case "neutral":
756
- case "warning":
757
- return "accent";
758
- default:
759
- return context;
760
- }
761
- };
762
- var mapControl = (control) => {
763
- switch (control) {
764
- case "primary":
765
- case "tertiary":
766
- return control;
767
- default:
768
- return "secondary";
769
- }
770
- };
771
- var mapSize = (size) => {
772
- if (!size) {
773
- return void 0;
774
- }
775
- switch (size) {
776
- case "xs":
777
- case "sm":
778
- return "sm";
779
- case "lg":
780
- case "xl":
781
- return "lg";
782
- case "md":
783
- default:
784
- return "md";
785
- }
786
- };
787
-
788
- // ../renderers/src/CheckboxInputRenderer.tsx
789
- import { Checkbox } from "@transferwise/components";
694
+ var AlertRenderer_default = AlertRenderer;
790
695
 
791
696
  // ../renderers/src/components/FieldInput.tsx
792
697
  import { Field } from "@transferwise/components";
@@ -806,14 +711,14 @@ var help_messages_default = defineMessages({
806
711
  });
807
712
 
808
713
  // ../renderers/src/components/Help.tsx
809
- import { jsx as jsx4 } from "react/jsx-runtime";
714
+ import { jsx as jsx2 } from "react/jsx-runtime";
810
715
  function Help({ help, onClick }) {
811
716
  const intl = useIntl();
812
- return /* @__PURE__ */ jsx4(
717
+ return /* @__PURE__ */ jsx2(
813
718
  Info,
814
719
  {
815
720
  className: "m-l-1",
816
- content: /* @__PURE__ */ jsx4(Markdown, { config: { link: { target: "_blank" } }, children: help }),
721
+ content: /* @__PURE__ */ jsx2(Markdown, { config: { link: { target: "_blank" } }, children: help }),
817
722
  presentation: "POPOVER",
818
723
  size: "sm",
819
724
  "aria-label": intl.formatMessage(help_messages_default.helpAria),
@@ -824,19 +729,19 @@ function Help({ help, onClick }) {
824
729
  var Help_default = Help;
825
730
 
826
731
  // ../renderers/src/components/LabelContentWithHelp.tsx
827
- import { jsx as jsx5, jsxs } from "react/jsx-runtime";
732
+ import { jsx as jsx3, jsxs } from "react/jsx-runtime";
828
733
  function LabelContentWithHelp({ text, help }) {
829
734
  return /* @__PURE__ */ jsxs("div", { children: [
830
735
  text,
831
- /* @__PURE__ */ jsx5(Help_default, { help })
736
+ /* @__PURE__ */ jsx3(Help_default, { help })
832
737
  ] });
833
738
  }
834
739
 
835
740
  // ../renderers/src/components/FieldInput.tsx
836
- import { jsx as jsx6 } from "react/jsx-runtime";
741
+ import { jsx as jsx4 } from "react/jsx-runtime";
837
742
  function FieldInput({ id, children, label, validation, description, help }) {
838
- const labelContent = label && help ? /* @__PURE__ */ jsx6(LabelContentWithHelp, { text: label, help }) : label;
839
- return /* @__PURE__ */ jsx6(
743
+ const labelContent = label && help ? /* @__PURE__ */ jsx4(LabelContentWithHelp, { text: label, help }) : label;
744
+ return /* @__PURE__ */ jsx4(
840
745
  Field,
841
746
  {
842
747
  id,
@@ -860,7 +765,8 @@ var mapStatusToSentiment = (validation) => {
860
765
  var FieldInput_default = FieldInput;
861
766
 
862
767
  // ../renderers/src/CheckboxInputRenderer.tsx
863
- import { jsx as jsx7 } from "react/jsx-runtime";
768
+ import { Checkbox } from "@transferwise/components";
769
+ import { jsx as jsx5 } from "react/jsx-runtime";
864
770
  var CheckboxInputRenderer = {
865
771
  canRenderType: "input-checkbox",
866
772
  render: (props) => {
@@ -884,9 +790,105 @@ var CheckboxInputRenderer = {
884
790
  "value"
885
791
  ]);
886
792
  const checkboxProps = __spreadProps(__spreadValues({}, rest), { label: title, secondary: description, checked: value });
887
- return /* @__PURE__ */ jsx7(FieldInput_default, { id, label: "", description: "", validation: validationState, help, children: /* @__PURE__ */ jsx7(Checkbox, __spreadValues({ id }, checkboxProps)) });
793
+ return /* @__PURE__ */ jsx5(FieldInput_default, { id, label: "", description: "", validation: validationState, help, children: /* @__PURE__ */ jsx5(Checkbox, __spreadValues({ id }, checkboxProps)) });
794
+ }
795
+ };
796
+ var CheckboxInputRenderer_default = CheckboxInputRenderer;
797
+
798
+ // ../renderers/src/BoxRenderer.tsx
799
+ import classNames from "classnames";
800
+ import { jsx as jsx6 } from "react/jsx-runtime";
801
+ var BoxRenderer = {
802
+ canRenderType: "box",
803
+ render: ({ children, control, margin, width }) => {
804
+ const hasFixedWidth = width !== "xl";
805
+ const hasBorder = control === "bordered" || control === "bordered-web";
806
+ const contents = /* @__PURE__ */ jsx6(
807
+ "div",
808
+ {
809
+ className: classNames({
810
+ "df-box-renderer-border": hasBorder,
811
+ [`df-box-renderer-width-${width}`]: hasFixedWidth,
812
+ [getMargin(margin)]: !hasFixedWidth
813
+ }),
814
+ children
815
+ }
816
+ );
817
+ return hasFixedWidth ? /* @__PURE__ */ jsx6("div", { className: classNames("df-box-renderer-fixed-width", getMargin(margin)), children: contents }) : contents;
818
+ }
819
+ };
820
+ var BoxRenderer_default = BoxRenderer;
821
+
822
+ // ../renderers/src/ButtonRenderer.tsx
823
+ import { Button } from "@transferwise/components";
824
+ import { useState } from "react";
825
+ import { jsx as jsx7 } from "react/jsx-runtime";
826
+ var ButtonRenderer = {
827
+ canRenderType: "button",
828
+ render: ButtonComponent
829
+ };
830
+ function ButtonComponent(props) {
831
+ const { control, context, disabled, margin, title, size, stepLoadingState, onClick } = props;
832
+ const [isActive, setActive] = useState(false);
833
+ const isLoading = isActive && stepLoadingState !== "idle";
834
+ const priority = mapControl(control);
835
+ const type = priority === "tertiary" ? void 0 : mapContext(context);
836
+ return /* @__PURE__ */ jsx7(
837
+ Button,
838
+ {
839
+ block: true,
840
+ className: getMargin(margin),
841
+ disabled: isLoading ? false : disabled,
842
+ priority,
843
+ size: mapSize(size),
844
+ loading: isLoading,
845
+ type,
846
+ onClick: () => {
847
+ setActive(true);
848
+ onClick();
849
+ },
850
+ onBlur: () => {
851
+ setActive(false);
852
+ },
853
+ children: title
854
+ }
855
+ );
856
+ }
857
+ var mapContext = (context) => {
858
+ switch (context) {
859
+ case "neutral":
860
+ case "warning":
861
+ return "accent";
862
+ default:
863
+ return context;
864
+ }
865
+ };
866
+ var mapControl = (control) => {
867
+ switch (control) {
868
+ case "primary":
869
+ case "tertiary":
870
+ return control;
871
+ default:
872
+ return "secondary";
873
+ }
874
+ };
875
+ var mapSize = (size) => {
876
+ if (!size) {
877
+ return void 0;
878
+ }
879
+ switch (size) {
880
+ case "xs":
881
+ case "sm":
882
+ return "sm";
883
+ case "lg":
884
+ case "xl":
885
+ return "lg";
886
+ case "md":
887
+ default:
888
+ return "md";
888
889
  }
889
890
  };
891
+ var ButtonRenderer_default = ButtonRenderer;
890
892
 
891
893
  // ../renderers/src/ColumnsRenderer.tsx
892
894
  import classNames2 from "classnames";
@@ -907,6 +909,7 @@ var ColumnsRenderer = {
907
909
  }
908
910
  )
909
911
  };
912
+ var ColumnsRenderer_default = ColumnsRenderer;
910
913
 
911
914
  // ../renderers/src/components/VariableDateInput.tsx
912
915
  import { DateInput, DateLookup } from "@transferwise/components";
@@ -1023,6 +1026,7 @@ var DateInputRenderer = {
1023
1026
  );
1024
1027
  }
1025
1028
  };
1029
+ var DateInputRenderer_default = DateInputRenderer;
1026
1030
 
1027
1031
  // ../renderers/src/DecisionRenderer.tsx
1028
1032
  import { Header, NavigationOption, NavigationOptionsList } from "@transferwise/components";
@@ -1176,6 +1180,7 @@ var DecisionRenderer = {
1176
1180
  }) })
1177
1181
  ] })
1178
1182
  };
1183
+ var DecisionRenderer_default = DecisionRenderer;
1179
1184
 
1180
1185
  // ../renderers/src/DividerRenderer.tsx
1181
1186
  import { jsx as jsx18 } from "react/jsx-runtime";
@@ -1183,137 +1188,49 @@ var DividerRenderer = {
1183
1188
  canRenderType: "divider",
1184
1189
  render: ({ margin }) => /* @__PURE__ */ jsx18("hr", { className: `m-t-0 ${getMargin(margin)}` })
1185
1190
  };
1191
+ var DividerRenderer_default = DividerRenderer;
1186
1192
 
1187
- // ../renderers/src/ExternalConfirmationRenderer.tsx
1188
- import { Button as Button2, Markdown as Markdown2, Modal } from "@transferwise/components";
1193
+ // ../renderers/src/FormRenderer.tsx
1194
+ import { jsx as jsx19 } from "react/jsx-runtime";
1195
+ var FormRenderer = {
1196
+ canRenderType: "form",
1197
+ render: ({ children, margin }) => /* @__PURE__ */ jsx19("div", { className: getMargin(margin), children })
1198
+ };
1199
+ var FormRenderer_default = FormRenderer;
1189
1200
 
1190
- // ../renderers/src/messages/external-confirmation.messages.ts
1191
- import { defineMessages as defineMessages2 } from "react-intl";
1192
- var external_confirmation_messages_default = defineMessages2({
1193
- title: {
1194
- id: "df.wise.ExternalConfirmation.title",
1195
- defaultMessage: "Please confirm",
1196
- description: "Heading for the confirmation screen."
1197
- },
1198
- description: {
1199
- id: "df.wise.ExternalConfirmation.description",
1200
- defaultMessage: "Please confirm you want to open **{origin}** in a new browser tab.",
1201
- description: "Description for the confirmation screen."
1202
- },
1203
- open: {
1204
- id: "df.wise.ExternalConfirmation.open",
1205
- defaultMessage: "Open in new tab",
1206
- description: "Button text confirming opening a new browser tab."
1207
- },
1208
- cancel: {
1209
- id: "df.wise.ExternalConfirmation.cancel",
1210
- defaultMessage: "Cancel",
1211
- description: "Button text rejecting opening a new browser tab."
1212
- }
1213
- });
1201
+ // ../renderers/src/FormSectionRenderer.tsx
1202
+ import { Header as Header2 } from "@transferwise/components";
1203
+ import { jsx as jsx20, jsxs as jsxs4 } from "react/jsx-runtime";
1204
+ var FormSectionRenderer = {
1205
+ canRenderType: "form-section",
1206
+ render: ({ title, description, children }) => /* @__PURE__ */ jsxs4("fieldset", { children: [
1207
+ title && /* @__PURE__ */ jsx20(
1208
+ Header2,
1209
+ {
1210
+ as: "h2",
1211
+ title
1212
+ }
1213
+ ),
1214
+ description && /* @__PURE__ */ jsx20("p", { children: description }),
1215
+ children
1216
+ ] })
1217
+ };
1218
+ var FormSectionRenderer_default = FormSectionRenderer;
1214
1219
 
1215
- // ../renderers/src/ExternalConfirmationRenderer.tsx
1216
- import { useIntl as useIntl2 } from "react-intl";
1217
- import { useEffect } from "react";
1218
- import { Fragment, jsx as jsx19, jsxs as jsxs4 } from "react/jsx-runtime";
1219
- var ExternalConfirmationRenderer = {
1220
- canRenderType: "external-confirmation",
1221
- render: ExternalConfirmationRendererComponent
1222
- };
1223
- function ExternalConfirmationRendererComponent({
1224
- url,
1225
- status,
1226
- onSuccess,
1227
- onFailure,
1228
- onCancel
1229
- }) {
1230
- const { formatMessage } = useIntl2();
1231
- useEffect(() => {
1232
- if (url) {
1233
- const w = window.open(url, "_blank");
1234
- if (w) {
1235
- onSuccess();
1236
- } else {
1237
- onFailure();
1238
- }
1239
- }
1240
- }, []);
1241
- return /* @__PURE__ */ jsx19(
1242
- Modal,
1243
- {
1244
- open: status === "failure",
1245
- title: formatMessage(external_confirmation_messages_default.title),
1246
- body: /* @__PURE__ */ jsxs4(Fragment, { children: [
1247
- /* @__PURE__ */ jsx19(Markdown2, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
1248
- /* @__PURE__ */ jsx19("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs4("div", { className: "df-box-renderer-width-lg", children: [
1249
- /* @__PURE__ */ jsx19(
1250
- Button2,
1251
- {
1252
- block: true,
1253
- className: "m-b-2",
1254
- priority: "primary",
1255
- size: "md",
1256
- onClick: () => {
1257
- window.open(url);
1258
- onCancel();
1259
- },
1260
- children: formatMessage(external_confirmation_messages_default.open)
1261
- }
1262
- ),
1263
- /* @__PURE__ */ jsx19(Button2, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
1264
- ] }) })
1265
- ] }),
1266
- onClose: onCancel
1267
- }
1268
- );
1269
- }
1270
- function getOrigin(url) {
1271
- try {
1272
- return new URL(url).origin;
1273
- } catch (e) {
1274
- return url;
1275
- }
1276
- }
1277
-
1278
- // ../renderers/src/FormRenderer.tsx
1279
- import { jsx as jsx20 } from "react/jsx-runtime";
1280
- var FormRenderer = {
1281
- canRenderType: "form",
1282
- render: ({ children, margin }) => /* @__PURE__ */ jsx20("div", { className: getMargin(margin), children })
1283
- };
1284
-
1285
- // ../renderers/src/FormSectionRenderer.tsx
1286
- import { Header as Header2 } from "@transferwise/components";
1287
- import { jsx as jsx21, jsxs as jsxs5 } from "react/jsx-runtime";
1288
- var FormSectionRenderer = {
1289
- canRenderType: "form-section",
1290
- render: ({ title, description, children }) => /* @__PURE__ */ jsxs5("fieldset", { children: [
1291
- title && /* @__PURE__ */ jsx21(
1292
- Header2,
1293
- {
1294
- as: "h2",
1295
- title
1296
- }
1297
- ),
1298
- description && /* @__PURE__ */ jsx21("p", { children: description }),
1299
- children
1300
- ] })
1301
- };
1302
-
1303
- // ../renderers/src/HeadingRenderer.tsx
1304
- import { Display, Title } from "@transferwise/components";
1305
- import { jsx as jsx22 } from "react/jsx-runtime";
1306
- var HeadingRenderer = {
1307
- canRenderType: "heading",
1308
- render: (props) => /* @__PURE__ */ jsx22(Heading, __spreadValues({}, props))
1220
+ // ../renderers/src/HeadingRenderer.tsx
1221
+ import { Display, Title } from "@transferwise/components";
1222
+ import { jsx as jsx21 } from "react/jsx-runtime";
1223
+ var HeadingRenderer = {
1224
+ canRenderType: "heading",
1225
+ render: (props) => /* @__PURE__ */ jsx21(Heading, __spreadValues({}, props))
1309
1226
  };
1310
1227
  function Heading(props) {
1311
1228
  const { text, size, align, margin, control } = props;
1312
1229
  const className = getTextAlignmentAndMargin({ align, margin });
1313
- return control === "display" ? /* @__PURE__ */ jsx22(DisplayHeading, { size, text, className }) : /* @__PURE__ */ jsx22(StandardHeading, { size, text, className });
1230
+ return control === "display" ? /* @__PURE__ */ jsx21(DisplayHeading, { size, text, className }) : /* @__PURE__ */ jsx21(StandardHeading, { size, text, className });
1314
1231
  }
1315
1232
  function DisplayHeading({ size, text, className }) {
1316
- return /* @__PURE__ */ jsx22(Display, { type: getDisplayType(size), className, children: text });
1233
+ return /* @__PURE__ */ jsx21(Display, { type: getDisplayType(size), className, children: text });
1317
1234
  }
1318
1235
  var getDisplayType = (size) => {
1319
1236
  switch (size) {
@@ -1329,7 +1246,7 @@ var getDisplayType = (size) => {
1329
1246
  }
1330
1247
  };
1331
1248
  function StandardHeading({ size, text, className }) {
1332
- return /* @__PURE__ */ jsx22(Title, { type: getTitleTypeBySize(size), className, children: text });
1249
+ return /* @__PURE__ */ jsx21(Title, { type: getTitleTypeBySize(size), className, children: text });
1333
1250
  }
1334
1251
  var getTitleTypeBySize = (size) => {
1335
1252
  var _a;
@@ -1342,10 +1259,11 @@ var getTitleTypeBySize = (size) => {
1342
1259
  };
1343
1260
  return (_a = titleTypes[size]) != null ? _a : "title-subsection";
1344
1261
  };
1262
+ var HeadingRenderer_default = HeadingRenderer;
1345
1263
 
1346
1264
  // ../renderers/src/ImageRenderer/UrlImage.tsx
1347
1265
  import { Image } from "@transferwise/components";
1348
- import { useEffect as useEffect2, useState as useState2 } from "react";
1266
+ import { useEffect, useState as useState2 } from "react";
1349
1267
 
1350
1268
  // ../renderers/src/utils/api-utils.ts
1351
1269
  function isRelativePath(url = "") {
@@ -1355,7 +1273,7 @@ function isRelativePath(url = "") {
1355
1273
  }
1356
1274
 
1357
1275
  // ../renderers/src/ImageRenderer/UrlImage.tsx
1358
- import { jsx as jsx23 } from "react/jsx-runtime";
1276
+ import { jsx as jsx22 } from "react/jsx-runtime";
1359
1277
  function UrlImage({
1360
1278
  accessibilityDescription,
1361
1279
  align,
@@ -1365,12 +1283,12 @@ function UrlImage({
1365
1283
  httpClient
1366
1284
  }) {
1367
1285
  const [imageSource, setImageSource] = useState2("");
1368
- useEffect2(() => {
1286
+ useEffect(() => {
1369
1287
  if (!uri.startsWith("urn:")) {
1370
1288
  void getImageSource(httpClient, uri).then(setImageSource);
1371
1289
  }
1372
1290
  }, [uri, httpClient]);
1373
- return /* @__PURE__ */ jsx23("div", { className: `df-image ${align} ${size || "md"}`, children: /* @__PURE__ */ jsx23(
1291
+ return /* @__PURE__ */ jsx22("div", { className: `df-image ${align} ${size || "md"}`, children: /* @__PURE__ */ jsx22(
1374
1292
  Image,
1375
1293
  {
1376
1294
  className: `img-responsive ${getMargin(margin)}`,
@@ -1414,7 +1332,7 @@ var getImageSource = async (httpClient, imageUrl) => {
1414
1332
  };
1415
1333
 
1416
1334
  // ../renderers/src/ImageRenderer/UrnFlagImage.tsx
1417
- import { jsx as jsx24 } from "react/jsx-runtime";
1335
+ import { jsx as jsx23 } from "react/jsx-runtime";
1418
1336
  var maxFlagSize = 600;
1419
1337
  function UrnFlagImage({
1420
1338
  accessibilityDescription,
@@ -1423,7 +1341,7 @@ function UrnFlagImage({
1423
1341
  size,
1424
1342
  uri
1425
1343
  }) {
1426
- return /* @__PURE__ */ jsx24("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx24(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
1344
+ return /* @__PURE__ */ jsx23("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx23(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
1427
1345
  }
1428
1346
 
1429
1347
  // ../renderers/src/ImageRenderer/UrnIllustration.tsx
@@ -1447,7 +1365,7 @@ var isAnimated = (uri) => {
1447
1365
  };
1448
1366
 
1449
1367
  // ../renderers/src/ImageRenderer/UrnIllustration.tsx
1450
- import { jsx as jsx25 } from "react/jsx-runtime";
1368
+ import { jsx as jsx24 } from "react/jsx-runtime";
1451
1369
  var urnPrefix = "urn:wise:illustrations:";
1452
1370
  var isUrnIllustration = (uri) => uri.startsWith(urnPrefix);
1453
1371
  function UrnIllustration({
@@ -1461,9 +1379,9 @@ function UrnIllustration({
1461
1379
  const illustrationName = getIllustrationName(uri);
1462
1380
  const illustration3DName = getIllustration3DName(uri);
1463
1381
  if (illustration3DName && isAnimated(uri)) {
1464
- return /* @__PURE__ */ jsx25("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx25(Illustration3D, { name: illustration3DName, size: illustrationSize }) });
1382
+ return /* @__PURE__ */ jsx24("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx24(Illustration3D, { name: illustration3DName, size: illustrationSize }) });
1465
1383
  }
1466
- return /* @__PURE__ */ jsx25("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx25(
1384
+ return /* @__PURE__ */ jsx24("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx24(
1467
1385
  Illustration,
1468
1386
  {
1469
1387
  className: "df-illustration",
@@ -1483,29 +1401,32 @@ var getIllustration3DName = (uri) => {
1483
1401
  };
1484
1402
 
1485
1403
  // ../renderers/src/ImageRenderer/UrnImage.tsx
1486
- import { jsx as jsx26 } from "react/jsx-runtime";
1404
+ import { jsx as jsx25 } from "react/jsx-runtime";
1487
1405
  var isUrnImage = (uri) => uri.startsWith("urn:");
1488
1406
  function UrnImage(props) {
1489
1407
  const { uri } = props;
1490
1408
  if (isUrnIllustration(uri)) {
1491
- return /* @__PURE__ */ jsx26(UrnIllustration, __spreadValues({}, props));
1409
+ return /* @__PURE__ */ jsx25(UrnIllustration, __spreadValues({}, props));
1492
1410
  }
1493
1411
  if (isUrnFlag(uri)) {
1494
- return /* @__PURE__ */ jsx26(UrnFlagImage, __spreadValues({}, props));
1412
+ return /* @__PURE__ */ jsx25(UrnFlagImage, __spreadValues({}, props));
1495
1413
  }
1496
1414
  return null;
1497
1415
  }
1498
1416
 
1499
1417
  // ../renderers/src/ImageRenderer/ImageRenderer.tsx
1500
- import { jsx as jsx27 } from "react/jsx-runtime";
1418
+ import { jsx as jsx26 } from "react/jsx-runtime";
1501
1419
  var ImageRenderer = {
1502
1420
  canRenderType: "image",
1503
- render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ jsx27(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ jsx27(UrlImage, __spreadValues({}, props))
1421
+ render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ jsx26(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ jsx26(UrlImage, __spreadValues({}, props))
1504
1422
  };
1505
1423
 
1424
+ // ../renderers/src/ImageRenderer/index.tsx
1425
+ var ImageRenderer_default = ImageRenderer;
1426
+
1506
1427
  // ../renderers/src/InstructionsRenderer.tsx
1507
1428
  import { Header as Header3, InstructionsList } from "@transferwise/components";
1508
- import { jsx as jsx28, jsxs as jsxs6 } from "react/jsx-runtime";
1429
+ import { jsx as jsx27, jsxs as jsxs5 } from "react/jsx-runtime";
1509
1430
  var doContext = ["positive", "neutral"];
1510
1431
  var dontContext = ["warning", "negative"];
1511
1432
  var InstructionsRenderer = {
@@ -1513,12 +1434,13 @@ var InstructionsRenderer = {
1513
1434
  render: ({ items, margin, title }) => {
1514
1435
  const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
1515
1436
  const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
1516
- return /* @__PURE__ */ jsxs6("div", { className: getMargin(margin), children: [
1517
- title ? /* @__PURE__ */ jsx28(Header3, { title }) : null,
1518
- /* @__PURE__ */ jsx28(InstructionsList, { dos, donts })
1437
+ return /* @__PURE__ */ jsxs5("div", { className: getMargin(margin), children: [
1438
+ title ? /* @__PURE__ */ jsx27(Header3, { title }) : null,
1439
+ /* @__PURE__ */ jsx27(InstructionsList, { dos, donts })
1519
1440
  ] });
1520
1441
  }
1521
1442
  };
1443
+ var InstructionsRenderer_default = InstructionsRenderer;
1522
1444
 
1523
1445
  // ../renderers/src/IntegerInputRenderer.tsx
1524
1446
  import { Input, InputGroup } from "@transferwise/components";
@@ -1532,7 +1454,7 @@ var onWheel = (event) => {
1532
1454
 
1533
1455
  // ../renderers/src/utils/getInlineAvatar.tsx
1534
1456
  import { AvatarView as AvatarView3 } from "@transferwise/components";
1535
- import { jsx as jsx29 } from "react/jsx-runtime";
1457
+ import { jsx as jsx28 } from "react/jsx-runtime";
1536
1458
  var mediaSize2 = 24;
1537
1459
  function getInlineAvatar({ icon, image }) {
1538
1460
  const imageNode = getImageNode(image, mediaSize2);
@@ -1548,7 +1470,7 @@ function getInlineAvatar({ icon, image }) {
1548
1470
  return iconNode;
1549
1471
  }
1550
1472
  if (iconNode) {
1551
- return /* @__PURE__ */ jsx29(AvatarView3, { size: mediaSize2, children: iconNode });
1473
+ return /* @__PURE__ */ jsx28(AvatarView3, { size: mediaSize2, children: iconNode });
1552
1474
  }
1553
1475
  return null;
1554
1476
  }
@@ -1571,7 +1493,7 @@ function pick(obj, ...keys) {
1571
1493
  }
1572
1494
 
1573
1495
  // ../renderers/src/IntegerInputRenderer.tsx
1574
- import { jsx as jsx30 } from "react/jsx-runtime";
1496
+ import { jsx as jsx29 } from "react/jsx-runtime";
1575
1497
  var IntegerInputRenderer = {
1576
1498
  canRenderType: "input-integer",
1577
1499
  render: (props) => {
@@ -1586,7 +1508,7 @@ var IntegerInputRenderer = {
1586
1508
  "maximum",
1587
1509
  "minimum"
1588
1510
  );
1589
- return /* @__PURE__ */ jsx30(
1511
+ return /* @__PURE__ */ jsx29(
1590
1512
  FieldInput_default,
1591
1513
  {
1592
1514
  id,
@@ -1594,7 +1516,7 @@ var IntegerInputRenderer = {
1594
1516
  description,
1595
1517
  validation: validationState,
1596
1518
  help,
1597
- children: /* @__PURE__ */ jsx30(InputGroup, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx30(
1519
+ children: /* @__PURE__ */ jsx29(InputGroup, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx29(
1598
1520
  Input,
1599
1521
  __spreadValues({
1600
1522
  id,
@@ -1614,85 +1536,14 @@ var IntegerInputRenderer = {
1614
1536
  );
1615
1537
  }
1616
1538
  };
1617
-
1618
- // ../renderers/src/ListRenderer.tsx
1619
- import { Body, Header as Header4 } from "@transferwise/components";
1620
- import classNames3 from "classnames";
1621
- import { jsx as jsx31, jsxs as jsxs7 } from "react/jsx-runtime";
1622
- var ListRenderer = {
1623
- canRenderType: "list",
1624
- render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ jsxs7("div", { className: getMargin(margin), children: [
1625
- (title || callToAction) && /* @__PURE__ */ jsx31(Header4, { as: "h2", title: title != null ? title : "", action: getListAction(callToAction) }),
1626
- items.map((props) => /* @__PURE__ */ jsx31(DesignSystemListItem, __spreadProps(__spreadValues({}, props), { control }), props.title))
1627
- ] })
1628
- };
1629
- var DesignSystemListItem = ({
1630
- title,
1631
- description,
1632
- supportingValues,
1633
- icon,
1634
- image,
1635
- control,
1636
- tag
1637
- }) => /* @__PURE__ */ jsx31(
1638
- "label",
1639
- {
1640
- className: classNames3("np-option p-a-2", {
1641
- "np-option__sm-media": true,
1642
- "np-option__container-aligned": true
1643
- }),
1644
- children: /* @__PURE__ */ jsxs7("div", { className: "media", children: [
1645
- icon || image ? /* @__PURE__ */ jsx31("div", { className: "media-left", children: /* @__PURE__ */ jsx31(
1646
- ListItemMedia,
1647
- {
1648
- image,
1649
- icon,
1650
- preferAvatar: control === "with-avatar" || tag === "with-avatar"
1651
- }
1652
- ) }) : null,
1653
- /* @__PURE__ */ jsxs7("div", { className: "media-body", children: [
1654
- /* @__PURE__ */ jsxs7("div", { className: "d-flex justify-content-between", children: [
1655
- /* @__PURE__ */ jsx31("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: title }),
1656
- /* @__PURE__ */ jsx31("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: supportingValues == null ? void 0 : supportingValues.value })
1657
- ] }),
1658
- /* @__PURE__ */ jsxs7("div", { className: "d-flex justify-content-between", children: [
1659
- /* @__PURE__ */ jsx31(Body, { className: "d-block np-option__body", children: description }),
1660
- /* @__PURE__ */ jsx31(Body, { className: "d-block np-option__body", children: supportingValues == null ? void 0 : supportingValues.subvalue })
1661
- ] })
1662
- ] })
1663
- ] })
1664
- },
1665
- title
1666
- );
1667
- var ListItemMedia = ({
1668
- icon,
1669
- image,
1670
- preferAvatar
1671
- }) => {
1672
- if (icon) {
1673
- return /* @__PURE__ */ jsx31("div", { className: "circle circle-sm text-primary circle-inverse", children: /* @__PURE__ */ jsx31(OptionMedia, { icon, image, preferAvatar }) });
1674
- }
1675
- if (image) {
1676
- return /* @__PURE__ */ jsx31("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ jsx31(OptionMedia, { icon, image, preferAvatar }) });
1677
- }
1678
- };
1679
- var getListAction = (callToAction) => {
1680
- if (callToAction) {
1681
- return __spreadValues({
1682
- "aria-label": callToAction.accessibilityDescription,
1683
- text: callToAction.title,
1684
- onClick: callToAction.onClick
1685
- }, callToAction.type === "link" ? { href: callToAction.href, target: "_blank" } : {});
1686
- }
1687
- return void 0;
1688
- };
1539
+ var IntegerInputRenderer_default = IntegerInputRenderer;
1689
1540
 
1690
1541
  // ../renderers/src/LoadingIndicatorRenderer.tsx
1691
1542
  import { Loader } from "@transferwise/components";
1692
- import { jsx as jsx32 } from "react/jsx-runtime";
1543
+ import { jsx as jsx30 } from "react/jsx-runtime";
1693
1544
  var LoadingIndicatorRenderer = {
1694
1545
  canRenderType: "loading-indicator",
1695
- render: ({ margin, size }) => /* @__PURE__ */ jsx32(
1546
+ render: ({ margin, size }) => /* @__PURE__ */ jsx30(
1696
1547
  Loader,
1697
1548
  {
1698
1549
  size,
@@ -1701,30 +1552,33 @@ var LoadingIndicatorRenderer = {
1701
1552
  }
1702
1553
  )
1703
1554
  };
1555
+ var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
1704
1556
 
1705
1557
  // ../renderers/src/MarkdownRenderer.tsx
1706
- import { Markdown as Markdown3 } from "@transferwise/components";
1707
- import { jsx as jsx33 } from "react/jsx-runtime";
1558
+ import { Markdown as Markdown2 } from "@transferwise/components";
1559
+ import { jsx as jsx31 } from "react/jsx-runtime";
1708
1560
  var MarkdownRenderer = {
1709
1561
  canRenderType: "markdown",
1710
- render: ({ content, align, margin }) => /* @__PURE__ */ jsx33("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ jsx33(Markdown3, { className: "np-text-body-large", config: { link: { target: "_blank" } }, children: content }) })
1562
+ render: ({ content, align, margin }) => /* @__PURE__ */ jsx31("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ jsx31(Markdown2, { className: "np-text-body-large", config: { link: { target: "_blank" } }, children: content }) })
1711
1563
  };
1564
+ var MarkdownRenderer_default = MarkdownRenderer;
1712
1565
 
1713
- // ../renderers/src/ModalLayoutRenderer.tsx
1714
- import { Button as Button3, Modal as Modal2 } from "@transferwise/components";
1566
+ // ../renderers/src/ModalRenderer.tsx
1567
+ import { Button as Button2, Modal } from "@transferwise/components";
1715
1568
  import { useState as useState3 } from "react";
1716
- import { jsx as jsx34, jsxs as jsxs8 } from "react/jsx-runtime";
1717
- var ModalLayoutRenderer = {
1718
- canRenderType: "modal-layout",
1719
- render: (props) => /* @__PURE__ */ jsx34(DFModal, __spreadValues({}, props))
1569
+ import { jsx as jsx32, jsxs as jsxs6 } from "react/jsx-runtime";
1570
+ var ModalRenderer = {
1571
+ canRenderType: "modal",
1572
+ render: (props) => /* @__PURE__ */ jsx32(DFModal, __spreadValues({}, props))
1720
1573
  };
1574
+ var ModalRenderer_default = ModalRenderer;
1721
1575
  function DFModal({ content, margin, trigger }) {
1722
1576
  const [visible, setVisible] = useState3(false);
1723
1577
  const { children, title } = content;
1724
- return /* @__PURE__ */ jsxs8("div", { className: getMargin(margin), children: [
1725
- /* @__PURE__ */ jsx34(Button3, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
1726
- /* @__PURE__ */ jsx34(
1727
- Modal2,
1578
+ return /* @__PURE__ */ jsxs6("div", { className: getMargin(margin), children: [
1579
+ /* @__PURE__ */ jsx32(Button2, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
1580
+ /* @__PURE__ */ jsx32(
1581
+ Modal,
1728
1582
  {
1729
1583
  scroll: "content",
1730
1584
  open: visible,
@@ -1737,24 +1591,14 @@ function DFModal({ content, margin, trigger }) {
1737
1591
  ] });
1738
1592
  }
1739
1593
 
1740
- // ../renderers/src/ModalRenderer.tsx
1741
- import { Modal as Modal3 } from "@transferwise/components";
1742
- import { jsx as jsx35 } from "react/jsx-runtime";
1743
- var ModalContentRenderer = {
1744
- canRenderType: "modal",
1745
- render: ({ title, children, open, onClose }) => {
1746
- return /* @__PURE__ */ jsx35(Modal3, { open, title, body: children, onClose });
1747
- }
1748
- };
1749
-
1750
1594
  // ../renderers/src/MultiSelectInputRenderer.tsx
1751
1595
  import { SelectInput, SelectInputOptionContent } from "@transferwise/components";
1752
1596
  import { useState as useState4 } from "react";
1753
- import { useIntl as useIntl3 } from "react-intl";
1597
+ import { useIntl as useIntl2 } from "react-intl";
1754
1598
 
1755
1599
  // ../renderers/src/messages/multi-select.messages.ts
1756
- import { defineMessages as defineMessages3 } from "react-intl";
1757
- var multi_select_messages_default = defineMessages3({
1600
+ import { defineMessages as defineMessages2 } from "react-intl";
1601
+ var multi_select_messages_default = defineMessages2({
1758
1602
  summary: {
1759
1603
  id: "df.wise.MultiSelect.summary",
1760
1604
  defaultMessage: "{first} and {count} more",
@@ -1763,13 +1607,13 @@ var multi_select_messages_default = defineMessages3({
1763
1607
  });
1764
1608
 
1765
1609
  // ../renderers/src/MultiSelectInputRenderer.tsx
1766
- import { jsx as jsx36 } from "react/jsx-runtime";
1610
+ import { jsx as jsx33 } from "react/jsx-runtime";
1767
1611
  var MultiSelectInputRenderer = {
1768
1612
  canRenderType: "input-multi-select",
1769
- render: (props) => /* @__PURE__ */ jsx36(MultiSelectInputRendererComponent, __spreadValues({}, props))
1613
+ render: (props) => /* @__PURE__ */ jsx33(MultiSelectInputRendererComponent, __spreadValues({}, props))
1770
1614
  };
1771
1615
  function MultiSelectInputRendererComponent(props) {
1772
- const { formatMessage } = useIntl3();
1616
+ const { formatMessage } = useIntl2();
1773
1617
  const [stagedIndices, setStagedIndices] = useState4();
1774
1618
  const {
1775
1619
  id,
@@ -1808,12 +1652,12 @@ function MultiSelectInputRendererComponent(props) {
1808
1652
  const contentProps = {
1809
1653
  title: option.title,
1810
1654
  description: option.description,
1811
- icon: /* @__PURE__ */ jsx36(OptionMedia, { icon: option.icon, image: option.image, preferAvatar: false })
1655
+ icon: /* @__PURE__ */ jsx33(OptionMedia, { icon: option.icon, image: option.image, preferAvatar: false })
1812
1656
  };
1813
- return /* @__PURE__ */ jsx36(SelectInputOptionContent, __spreadValues({}, contentProps));
1657
+ return /* @__PURE__ */ jsx33(SelectInputOptionContent, __spreadValues({}, contentProps));
1814
1658
  };
1815
1659
  const extraProps = { autoComplete };
1816
- return /* @__PURE__ */ jsx36(
1660
+ return /* @__PURE__ */ jsx33(
1817
1661
  FieldInput_default,
1818
1662
  {
1819
1663
  id,
@@ -1821,7 +1665,7 @@ function MultiSelectInputRendererComponent(props) {
1821
1665
  help,
1822
1666
  description,
1823
1667
  validation: validationState,
1824
- children: /* @__PURE__ */ jsx36(
1668
+ children: /* @__PURE__ */ jsx33(
1825
1669
  SelectInput,
1826
1670
  __spreadValues({
1827
1671
  id,
@@ -1858,14 +1702,15 @@ function MultiSelectInputRendererComponent(props) {
1858
1702
  }
1859
1703
  );
1860
1704
  }
1705
+ var MultiSelectInputRenderer_default = MultiSelectInputRenderer;
1861
1706
 
1862
1707
  // ../renderers/src/MultiUploadInputRenderer.tsx
1863
1708
  import { UploadInput } from "@transferwise/components";
1864
1709
 
1865
1710
  // ../renderers/src/components/UploadFieldInput.tsx
1866
1711
  import { InlineAlert } from "@transferwise/components";
1867
- import classNames4 from "classnames";
1868
- import { jsx as jsx37, jsxs as jsxs9 } from "react/jsx-runtime";
1712
+ import classNames3 from "classnames";
1713
+ import { jsx as jsx34, jsxs as jsxs7 } from "react/jsx-runtime";
1869
1714
  function UploadFieldInput({
1870
1715
  id,
1871
1716
  children,
@@ -1874,18 +1719,18 @@ function UploadFieldInput({
1874
1719
  help,
1875
1720
  validation
1876
1721
  }) {
1877
- const labelContent = label && help ? /* @__PURE__ */ jsx37(LabelContentWithHelp, { text: label, help }) : label;
1722
+ const labelContent = label && help ? /* @__PURE__ */ jsx34(LabelContentWithHelp, { text: label, help }) : label;
1878
1723
  const descriptionId = description ? `${id}-description` : void 0;
1879
- return /* @__PURE__ */ jsxs9(
1724
+ return /* @__PURE__ */ jsxs7(
1880
1725
  "div",
1881
1726
  {
1882
- className: classNames4("form-group d-block", {
1727
+ className: classNames3("form-group d-block", {
1883
1728
  "has-error": (validation == null ? void 0 : validation.status) === "invalid"
1884
1729
  }),
1885
1730
  children: [
1886
- /* @__PURE__ */ jsx37("label", { htmlFor: id, className: "control-label", children: labelContent }),
1731
+ /* @__PURE__ */ jsx34("label", { htmlFor: id, className: "control-label", children: labelContent }),
1887
1732
  children,
1888
- (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ jsx37(InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
1733
+ (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ jsx34(InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
1889
1734
  ]
1890
1735
  }
1891
1736
  );
@@ -1914,7 +1759,7 @@ var getFileType = (base64Url) => {
1914
1759
  };
1915
1760
 
1916
1761
  // ../renderers/src/MultiUploadInputRenderer.tsx
1917
- import { jsx as jsx38 } from "react/jsx-runtime";
1762
+ import { jsx as jsx35 } from "react/jsx-runtime";
1918
1763
  var MultiUploadInputRenderer = {
1919
1764
  canRenderType: "input-upload-multi",
1920
1765
  render: (props) => {
@@ -1939,7 +1784,7 @@ var MultiUploadInputRenderer = {
1939
1784
  };
1940
1785
  const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
1941
1786
  const descriptionId = description ? `${id}-description` : void 0;
1942
- return /* @__PURE__ */ jsx38(
1787
+ return /* @__PURE__ */ jsx35(
1943
1788
  UploadFieldInput_default,
1944
1789
  {
1945
1790
  id,
@@ -1947,7 +1792,7 @@ var MultiUploadInputRenderer = {
1947
1792
  description,
1948
1793
  validation: validationState,
1949
1794
  help,
1950
- children: /* @__PURE__ */ jsx38(
1795
+ children: /* @__PURE__ */ jsx35(
1951
1796
  UploadInput,
1952
1797
  {
1953
1798
  id,
@@ -1967,10 +1812,11 @@ var MultiUploadInputRenderer = {
1967
1812
  );
1968
1813
  }
1969
1814
  };
1815
+ var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
1970
1816
 
1971
1817
  // ../renderers/src/NumberInputRenderer.tsx
1972
1818
  import { Input as Input2, InputGroup as InputGroup2 } from "@transferwise/components";
1973
- import { jsx as jsx39 } from "react/jsx-runtime";
1819
+ import { jsx as jsx36 } from "react/jsx-runtime";
1974
1820
  var NumberInputRenderer = {
1975
1821
  canRenderType: "input-number",
1976
1822
  render: (props) => {
@@ -1984,7 +1830,7 @@ var NumberInputRenderer = {
1984
1830
  "maximum",
1985
1831
  "minimum"
1986
1832
  );
1987
- return /* @__PURE__ */ jsx39(
1833
+ return /* @__PURE__ */ jsx36(
1988
1834
  FieldInput_default,
1989
1835
  {
1990
1836
  id,
@@ -1992,7 +1838,7 @@ var NumberInputRenderer = {
1992
1838
  description,
1993
1839
  validation: validationState,
1994
1840
  help,
1995
- children: /* @__PURE__ */ jsx39(InputGroup2, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx39(
1841
+ children: /* @__PURE__ */ jsx36(InputGroup2, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx36(
1996
1842
  Input2,
1997
1843
  __spreadValues({
1998
1844
  id,
@@ -2010,9 +1856,10 @@ var NumberInputRenderer = {
2010
1856
  );
2011
1857
  }
2012
1858
  };
1859
+ var NumberInputRenderer_default = NumberInputRenderer;
2013
1860
 
2014
1861
  // ../renderers/src/ParagraphRenderer.tsx
2015
- import { useIntl as useIntl4 } from "react-intl";
1862
+ import { useIntl as useIntl3 } from "react-intl";
2016
1863
 
2017
1864
  // ../renderers/src/hooks/useSnackBarIfAvailable.ts
2018
1865
  import { SnackbarContext } from "@transferwise/components";
@@ -2024,12 +1871,12 @@ function useSnackBarIfAvailable() {
2024
1871
  }
2025
1872
 
2026
1873
  // ../renderers/src/ParagraphRenderer.tsx
2027
- import { Button as Button4, Input as Input3 } from "@transferwise/components";
2028
- import classNames5 from "classnames";
1874
+ import { Button as Button3, Input as Input3 } from "@transferwise/components";
1875
+ import classNames4 from "classnames";
2029
1876
 
2030
1877
  // ../renderers/src/messages/paragraph.messages.ts
2031
- import { defineMessages as defineMessages4 } from "react-intl";
2032
- var paragraph_messages_default = defineMessages4({
1878
+ import { defineMessages as defineMessages3 } from "react-intl";
1879
+ var paragraph_messages_default = defineMessages3({
2033
1880
  copy: {
2034
1881
  id: "df.wise.DynamicParagraph.copy",
2035
1882
  defaultMessage: "Copy",
@@ -2043,54 +1890,55 @@ var paragraph_messages_default = defineMessages4({
2043
1890
  });
2044
1891
 
2045
1892
  // ../renderers/src/ParagraphRenderer.tsx
2046
- import { jsx as jsx40, jsxs as jsxs10 } from "react/jsx-runtime";
1893
+ import { jsx as jsx37, jsxs as jsxs8 } from "react/jsx-runtime";
2047
1894
  var ParagraphRenderer = {
2048
1895
  canRenderType: "paragraph",
2049
- render: (props) => /* @__PURE__ */ jsx40(Paragraph, __spreadValues({}, props))
1896
+ render: (props) => /* @__PURE__ */ jsx37(Paragraph, __spreadValues({}, props))
2050
1897
  };
2051
1898
  function Paragraph({ align, control, margin, text }) {
2052
1899
  const className = getTextAlignmentAndMargin({ align, margin });
2053
- return control === "copyable" ? /* @__PURE__ */ jsx40(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ jsx40(StandardParagraph, { className, text });
1900
+ return control === "copyable" ? /* @__PURE__ */ jsx37(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ jsx37(StandardParagraph, { className, text });
2054
1901
  }
2055
1902
  function StandardParagraph({ text, className }) {
2056
- return /* @__PURE__ */ jsx40("p", { className: `np-text-body-large ${className}`, children: text });
1903
+ return /* @__PURE__ */ jsx37("p", { className: `np-text-body-large ${className}`, children: text });
2057
1904
  }
2058
1905
  function CopyableParagraph({
2059
1906
  text,
2060
1907
  align,
2061
1908
  className
2062
1909
  }) {
2063
- const { formatMessage } = useIntl4();
1910
+ const { formatMessage } = useIntl3();
2064
1911
  const createSnackbar = useSnackBarIfAvailable();
2065
1912
  const copy = () => {
2066
1913
  navigator.clipboard.writeText(text).then(() => createSnackbar({ text: formatMessage(paragraph_messages_default.copied) })).catch(() => {
2067
1914
  });
2068
1915
  };
2069
1916
  const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
2070
- return /* @__PURE__ */ jsxs10("div", { className, children: [
2071
- /* @__PURE__ */ jsx40(
1917
+ return /* @__PURE__ */ jsxs8("div", { className, children: [
1918
+ /* @__PURE__ */ jsx37(
2072
1919
  Input3,
2073
1920
  {
2074
1921
  type: "text",
2075
1922
  value: text,
2076
1923
  readOnly: true,
2077
- className: classNames5("text-ellipsis", inputAlignmentClasses)
1924
+ className: classNames4("text-ellipsis", inputAlignmentClasses)
2078
1925
  }
2079
1926
  ),
2080
- /* @__PURE__ */ jsx40(Button4, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
1927
+ /* @__PURE__ */ jsx37(Button3, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
2081
1928
  ] });
2082
1929
  }
1930
+ var ParagraphRenderer_default = ParagraphRenderer;
2083
1931
 
2084
1932
  // ../renderers/src/RepeatableRenderer.tsx
2085
- import { Button as Button5, Header as Header5, InlineAlert as InlineAlert2, Modal as Modal4, NavigationOption as NavigationOption2 } from "@transferwise/components";
1933
+ import { Button as Button4, Header as Header4, InlineAlert as InlineAlert2, Modal as Modal2, NavigationOption as NavigationOption2 } from "@transferwise/components";
2086
1934
  import { Plus } from "@transferwise/icons";
2087
- import classNames6 from "classnames";
1935
+ import classNames5 from "classnames";
2088
1936
  import { useState as useState5 } from "react";
2089
- import { useIntl as useIntl5 } from "react-intl";
1937
+ import { useIntl as useIntl4 } from "react-intl";
2090
1938
 
2091
1939
  // ../renderers/src/messages/repeatable.messages.ts
2092
- import { defineMessages as defineMessages5 } from "react-intl";
2093
- var repeatable_messages_default = defineMessages5({
1940
+ import { defineMessages as defineMessages4 } from "react-intl";
1941
+ var repeatable_messages_default = defineMessages4({
2094
1942
  addItemTitle: {
2095
1943
  id: "df.wise.ArraySchema.addItemTitle",
2096
1944
  defaultMessage: "Add Item",
@@ -2114,10 +1962,10 @@ var repeatable_messages_default = defineMessages5({
2114
1962
  });
2115
1963
 
2116
1964
  // ../renderers/src/RepeatableRenderer.tsx
2117
- import { Fragment as Fragment2, jsx as jsx41, jsxs as jsxs11 } from "react/jsx-runtime";
1965
+ import { Fragment, jsx as jsx38, jsxs as jsxs9 } from "react/jsx-runtime";
2118
1966
  var RepeatableRenderer = {
2119
1967
  canRenderType: "repeatable",
2120
- render: (props) => /* @__PURE__ */ jsx41(Repeatable, __spreadValues({}, props))
1968
+ render: (props) => /* @__PURE__ */ jsx38(Repeatable, __spreadValues({}, props))
2121
1969
  };
2122
1970
  function Repeatable(props) {
2123
1971
  const {
@@ -2133,7 +1981,7 @@ function Repeatable(props) {
2133
1981
  onSave,
2134
1982
  onRemove
2135
1983
  } = props;
2136
- const { formatMessage } = useIntl5();
1984
+ const { formatMessage } = useIntl4();
2137
1985
  const [openModalType, setOpenModalType] = useState5(null);
2138
1986
  const onAddItem = () => {
2139
1987
  onAdd();
@@ -2156,40 +2004,40 @@ function Repeatable(props) {
2156
2004
  const onCancelEdit = () => {
2157
2005
  setOpenModalType(null);
2158
2006
  };
2159
- return /* @__PURE__ */ jsxs11(Fragment2, { children: [
2160
- title && /* @__PURE__ */ jsx41(Header5, { title }),
2161
- description && /* @__PURE__ */ jsx41("p", { children: description }),
2162
- /* @__PURE__ */ jsxs11(
2007
+ return /* @__PURE__ */ jsxs9(Fragment, { children: [
2008
+ title && /* @__PURE__ */ jsx38(Header4, { title }),
2009
+ description && /* @__PURE__ */ jsx38("p", { children: description }),
2010
+ /* @__PURE__ */ jsxs9(
2163
2011
  "div",
2164
2012
  {
2165
- className: classNames6("form-group", {
2013
+ className: classNames5("form-group", {
2166
2014
  "has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
2167
2015
  }),
2168
2016
  children: [
2169
- items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx41(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
2170
- /* @__PURE__ */ jsx41(
2017
+ items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx38(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
2018
+ /* @__PURE__ */ jsx38(
2171
2019
  NavigationOption2,
2172
2020
  {
2173
- media: /* @__PURE__ */ jsx41(Plus, {}),
2021
+ media: /* @__PURE__ */ jsx38(Plus, {}),
2174
2022
  title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
2175
2023
  showMediaAtAllSizes: true,
2176
2024
  onClick: () => onAddItem()
2177
2025
  }
2178
2026
  ),
2179
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx41(InlineAlert2, { type: "negative", children: validationState.message })
2027
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx38(InlineAlert2, { type: "negative", children: validationState.message })
2180
2028
  ]
2181
2029
  }
2182
2030
  ),
2183
- /* @__PURE__ */ jsx41(
2184
- Modal4,
2031
+ /* @__PURE__ */ jsx38(
2032
+ Modal2,
2185
2033
  {
2186
2034
  open: openModalType !== null,
2187
2035
  title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
2188
- body: /* @__PURE__ */ jsxs11(Fragment2, { children: [
2189
- /* @__PURE__ */ jsx41("div", { className: "m-b-2", children: editableItem }),
2190
- /* @__PURE__ */ jsxs11("div", { children: [
2191
- /* @__PURE__ */ jsx41(Button5, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
2192
- /* @__PURE__ */ jsx41(Button5, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
2036
+ body: /* @__PURE__ */ jsxs9(Fragment, { children: [
2037
+ /* @__PURE__ */ jsx38("div", { className: "m-b-2", children: editableItem }),
2038
+ /* @__PURE__ */ jsxs9("div", { children: [
2039
+ /* @__PURE__ */ jsx38(Button4, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
2040
+ /* @__PURE__ */ jsx38(Button4, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
2193
2041
  ] })
2194
2042
  ] }),
2195
2043
  onClose: () => onCancelEdit()
@@ -2201,10 +2049,10 @@ function ItemSummaryOption({
2201
2049
  item,
2202
2050
  onClick
2203
2051
  }) {
2204
- return /* @__PURE__ */ jsx41(
2052
+ return /* @__PURE__ */ jsx38(
2205
2053
  NavigationOption2,
2206
2054
  {
2207
- media: /* @__PURE__ */ jsx41(OptionMedia, __spreadProps(__spreadValues({}, item), { preferAvatar: false })),
2055
+ media: /* @__PURE__ */ jsx38(OptionMedia, __spreadProps(__spreadValues({}, item), { preferAvatar: false })),
2208
2056
  title: item.title,
2209
2057
  content: item.description,
2210
2058
  showMediaAtAllSizes: true,
@@ -2212,98 +2060,16 @@ function ItemSummaryOption({
2212
2060
  }
2213
2061
  );
2214
2062
  }
2215
-
2216
- // ../renderers/src/ReviewRenderer.tsx
2217
- import { DefinitionList, Header as Header6 } from "@transferwise/components";
2218
-
2219
- // ../renderers/src/utils/getHeaderAction.tsx
2220
- var getHeaderAction = (callToAction) => {
2221
- if (!callToAction) {
2222
- return void 0;
2223
- }
2224
- const { accessibilityDescription, href, title, onClick } = callToAction;
2225
- return href ? {
2226
- "aria-label": accessibilityDescription,
2227
- text: title,
2228
- href,
2229
- target: "_blank"
2230
- } : {
2231
- "aria-label": accessibilityDescription,
2232
- text: title,
2233
- onClick: (event) => {
2234
- event.preventDefault();
2235
- onClick();
2236
- }
2237
- };
2238
- };
2239
-
2240
- // ../renderers/src/ReviewRenderer.tsx
2241
- import { Fragment as Fragment3, jsx as jsx42, jsxs as jsxs12 } from "react/jsx-runtime";
2242
- var ReviewRenderer = {
2243
- canRenderType: "review",
2244
- render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
2245
- const orientation = mapControlToDefinitionListLayout(control);
2246
- return /* @__PURE__ */ jsxs12("div", { className: getMargin(margin), children: [
2247
- (title || callToAction) && /* @__PURE__ */ jsx42(Header6, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
2248
- /* @__PURE__ */ jsx42("div", { className: margin, children: /* @__PURE__ */ jsx42(
2249
- DefinitionList,
2250
- {
2251
- layout: orientation,
2252
- definitions: fields.map(
2253
- ({ label, value, help, analyticsId: fieldAnalyticsId }, index) => ({
2254
- key: String(index),
2255
- title: label,
2256
- value: getFieldValue(
2257
- value,
2258
- help,
2259
- orientation,
2260
- () => trackEvent("Help Pressed", { layoutItemId: fieldAnalyticsId })
2261
- )
2262
- })
2263
- )
2264
- }
2265
- ) })
2266
- ] });
2267
- }
2268
- };
2269
- var mapControlToDefinitionListLayout = (control) => {
2270
- switch (control) {
2271
- case "horizontal":
2272
- case "horizontal-end-aligned":
2273
- return "HORIZONTAL_RIGHT_ALIGNED";
2274
- case "horizontal-start-aligned":
2275
- return "HORIZONTAL_LEFT_ALIGNED";
2276
- case "vertical-two-column":
2277
- return "VERTICAL_TWO_COLUMN";
2278
- case "vertical":
2279
- case "vertical-one-column":
2280
- default:
2281
- return "VERTICAL_ONE_COLUMN";
2282
- }
2283
- };
2284
- var getFieldValue = (value, help, orientation, onClick) => {
2285
- if (help) {
2286
- return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs12(Fragment3, { children: [
2287
- /* @__PURE__ */ jsx42(Help_default, { help, onClick }),
2288
- " ",
2289
- value
2290
- ] }) : /* @__PURE__ */ jsxs12(Fragment3, { children: [
2291
- value,
2292
- " ",
2293
- /* @__PURE__ */ jsx42(Help_default, { help, onClick })
2294
- ] });
2295
- }
2296
- return value;
2297
- };
2063
+ var RepeatableRenderer_default = RepeatableRenderer;
2298
2064
 
2299
2065
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
2300
- import { Input as Input4, Markdown as Markdown4, NavigationOption as NavigationOption3, NavigationOptionsList as NavigationOptionsList2 } from "@transferwise/components";
2066
+ import { Input as Input4, Markdown as Markdown3, NavigationOption as NavigationOption3, NavigationOptionsList as NavigationOptionsList2 } from "@transferwise/components";
2301
2067
  import { useState as useState6 } from "react";
2302
- import { useIntl as useIntl7 } from "react-intl";
2068
+ import { useIntl as useIntl6 } from "react-intl";
2303
2069
 
2304
2070
  // ../renderers/src/messages/search.messages.ts
2305
- import { defineMessages as defineMessages6 } from "react-intl";
2306
- var search_messages_default = defineMessages6({
2071
+ import { defineMessages as defineMessages5 } from "react-intl";
2072
+ var search_messages_default = defineMessages5({
2307
2073
  loading: {
2308
2074
  id: "df.wise.SearchLayout.loading",
2309
2075
  defaultMessage: "Loading...",
@@ -2312,11 +2078,11 @@ var search_messages_default = defineMessages6({
2312
2078
  });
2313
2079
 
2314
2080
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
2315
- import { useIntl as useIntl6 } from "react-intl";
2081
+ import { useIntl as useIntl5 } from "react-intl";
2316
2082
 
2317
2083
  // ../renderers/src/messages/generic-error.messages.ts
2318
- import { defineMessages as defineMessages7 } from "react-intl";
2319
- var generic_error_messages_default = defineMessages7({
2084
+ import { defineMessages as defineMessages6 } from "react-intl";
2085
+ var generic_error_messages_default = defineMessages6({
2320
2086
  genericErrorRetryHint: {
2321
2087
  id: "df.wise.PersistAsyncSchema.genericError",
2322
2088
  defaultMessage: "Something went wrong, please try again.",
@@ -2335,20 +2101,20 @@ var generic_error_messages_default = defineMessages7({
2335
2101
  });
2336
2102
 
2337
2103
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
2338
- import { Button as Button6 } from "@transferwise/components";
2339
- import { jsx as jsx43, jsxs as jsxs13 } from "react/jsx-runtime";
2104
+ import { Button as Button5 } from "@transferwise/components";
2105
+ import { jsx as jsx39, jsxs as jsxs10 } from "react/jsx-runtime";
2340
2106
  function ErrorResult({ state }) {
2341
- const intl = useIntl6();
2107
+ const intl = useIntl5();
2342
2108
  const buttonVisualProps = {
2343
2109
  priority: "tertiary",
2344
2110
  size: "sm",
2345
2111
  style: { marginTop: "-2px", padding: "0", width: "auto", display: "inline" }
2346
2112
  };
2347
- return /* @__PURE__ */ jsxs13("p", { className: "m-t-2", children: [
2113
+ return /* @__PURE__ */ jsxs10("p", { className: "m-t-2", children: [
2348
2114
  intl.formatMessage(generic_error_messages_default.genericError),
2349
2115
  "\xA0",
2350
- /* @__PURE__ */ jsx43(
2351
- Button6,
2116
+ /* @__PURE__ */ jsx39(
2117
+ Button5,
2352
2118
  __spreadProps(__spreadValues({}, buttonVisualProps), {
2353
2119
  onClick: () => {
2354
2120
  state.onRetry();
@@ -2360,7 +2126,7 @@ function ErrorResult({ state }) {
2360
2126
  }
2361
2127
 
2362
2128
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
2363
- import { Fragment as Fragment4, jsx as jsx44, jsxs as jsxs14 } from "react/jsx-runtime";
2129
+ import { Fragment as Fragment2, jsx as jsx40, jsxs as jsxs11 } from "react/jsx-runtime";
2364
2130
  function BlockSearchRendererComponent({
2365
2131
  id,
2366
2132
  isLoading,
@@ -2372,9 +2138,9 @@ function BlockSearchRendererComponent({
2372
2138
  onChange
2373
2139
  }) {
2374
2140
  const [hasSearched, setHasSearched] = useState6(false);
2375
- const { formatMessage } = useIntl7();
2376
- return /* @__PURE__ */ jsxs14("div", { className: getMargin(margin), children: [
2377
- /* @__PURE__ */ jsx44(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx44(
2141
+ const { formatMessage } = useIntl6();
2142
+ return /* @__PURE__ */ jsxs11("div", { className: getMargin(margin), children: [
2143
+ /* @__PURE__ */ jsx40(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx40(
2378
2144
  Input4,
2379
2145
  {
2380
2146
  id,
@@ -2391,7 +2157,7 @@ function BlockSearchRendererComponent({
2391
2157
  }
2392
2158
  }
2393
2159
  ) }),
2394
- isLoading ? /* @__PURE__ */ jsx44(Fragment4, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx44(SearchResultContent, { state, trackEvent })
2160
+ isLoading ? /* @__PURE__ */ jsx40(Fragment2, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx40(SearchResultContent, { state, trackEvent })
2395
2161
  ] });
2396
2162
  }
2397
2163
  function SearchResultContent({
@@ -2400,26 +2166,26 @@ function SearchResultContent({
2400
2166
  }) {
2401
2167
  switch (state.type) {
2402
2168
  case "error":
2403
- return /* @__PURE__ */ jsx44(ErrorResult, { state });
2169
+ return /* @__PURE__ */ jsx40(ErrorResult, { state });
2404
2170
  case "results":
2405
- return /* @__PURE__ */ jsx44(SearchResults, { state, trackEvent });
2171
+ return /* @__PURE__ */ jsx40(SearchResults, { state, trackEvent });
2406
2172
  case "noResults":
2407
- return /* @__PURE__ */ jsx44(EmptySearchResult, { state });
2173
+ return /* @__PURE__ */ jsx40(EmptySearchResult, { state });
2408
2174
  case "pending":
2409
2175
  default:
2410
2176
  return null;
2411
2177
  }
2412
2178
  }
2413
2179
  function EmptySearchResult({ state }) {
2414
- return /* @__PURE__ */ jsx44(Markdown4, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
2180
+ return /* @__PURE__ */ jsx40(Markdown3, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
2415
2181
  }
2416
2182
  function SearchResults({
2417
2183
  state,
2418
2184
  trackEvent
2419
2185
  }) {
2420
- return /* @__PURE__ */ jsx44(NavigationOptionsList2, { children: state.results.map((result) => {
2186
+ return /* @__PURE__ */ jsx40(NavigationOptionsList2, { children: state.results.map((result) => {
2421
2187
  const { icon, image } = result;
2422
- return /* @__PURE__ */ jsx44(
2188
+ return /* @__PURE__ */ jsx40(
2423
2189
  NavigationOption3,
2424
2190
  {
2425
2191
  title: result.title,
@@ -2441,11 +2207,11 @@ function SearchResults({
2441
2207
  var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
2442
2208
 
2443
2209
  // ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
2444
- import { Markdown as Markdown5, Typeahead } from "@transferwise/components";
2210
+ import { Markdown as Markdown4, Typeahead } from "@transferwise/components";
2445
2211
  import { Search } from "@transferwise/icons";
2446
2212
  import { useState as useState7 } from "react";
2447
- import { useIntl as useIntl8 } from "react-intl";
2448
- import { jsx as jsx45 } from "react/jsx-runtime";
2213
+ import { useIntl as useIntl7 } from "react-intl";
2214
+ import { jsx as jsx41 } from "react/jsx-runtime";
2449
2215
  function InlineSearchRenderer({
2450
2216
  id,
2451
2217
  isLoading,
@@ -2456,8 +2222,8 @@ function InlineSearchRenderer({
2456
2222
  trackEvent
2457
2223
  }) {
2458
2224
  const [hasSearched, setHasSearched] = useState7(false);
2459
- const intl = useIntl8();
2460
- return /* @__PURE__ */ jsx45("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx45(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx45(
2225
+ const intl = useIntl7();
2226
+ return /* @__PURE__ */ jsx41("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx41(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx41(
2461
2227
  Typeahead,
2462
2228
  {
2463
2229
  id: "typeahead-input-id",
@@ -2465,10 +2231,10 @@ function InlineSearchRenderer({
2465
2231
  name: "typeahead-input-name",
2466
2232
  size: "md",
2467
2233
  maxHeight: 100,
2468
- footer: /* @__PURE__ */ jsx45(TypeaheadFooter, { state, isLoading }),
2234
+ footer: /* @__PURE__ */ jsx41(TypeaheadFooter, { state, isLoading }),
2469
2235
  multiple: false,
2470
2236
  clearable: false,
2471
- addon: /* @__PURE__ */ jsx45(Search, { size: 24 }),
2237
+ addon: /* @__PURE__ */ jsx41(Search, { size: 24 }),
2472
2238
  options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
2473
2239
  minQueryLength: 1,
2474
2240
  onChange: (values) => {
@@ -2503,43 +2269,31 @@ function mapResultToTypeaheadOption(result) {
2503
2269
  };
2504
2270
  }
2505
2271
  function TypeaheadFooter({ state, isLoading }) {
2506
- const { formatMessage } = useIntl8();
2272
+ const { formatMessage } = useIntl7();
2507
2273
  if (state.type === "noResults") {
2508
- return /* @__PURE__ */ jsx45(Markdown5, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
2274
+ return /* @__PURE__ */ jsx41(Markdown4, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
2509
2275
  }
2510
2276
  if (state.type === "error") {
2511
- return /* @__PURE__ */ jsx45("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx45(ErrorResult, { state }) });
2277
+ return /* @__PURE__ */ jsx41("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx41(ErrorResult, { state }) });
2512
2278
  }
2513
2279
  if (state.type === "pending" || isLoading) {
2514
- return /* @__PURE__ */ jsx45("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
2280
+ return /* @__PURE__ */ jsx41("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
2515
2281
  }
2516
2282
  return null;
2517
2283
  }
2518
2284
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
2519
2285
 
2520
2286
  // ../renderers/src/SearchRenderer/SearchRenderer.tsx
2521
- import { jsx as jsx46 } from "react/jsx-runtime";
2287
+ import { jsx as jsx42 } from "react/jsx-runtime";
2522
2288
  var SearchRenderer = {
2523
2289
  canRenderType: "search",
2524
- render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx46(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx46(BlockSearchRendererComponent_default, __spreadValues({}, props))
2525
- };
2526
-
2527
- // ../renderers/src/SectionRenderer.tsx
2528
- import { Header as Header7 } from "@transferwise/components";
2529
- import { jsx as jsx47, jsxs as jsxs15 } from "react/jsx-runtime";
2530
- var SectionRenderer = {
2531
- canRenderType: "section",
2532
- render: ({ children, callToAction, margin, title }) => {
2533
- return /* @__PURE__ */ jsxs15("section", { className: getMargin(margin), children: [
2534
- (title || callToAction) && /* @__PURE__ */ jsx47(Header7, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
2535
- children
2536
- ] });
2537
- }
2290
+ render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx42(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx42(BlockSearchRendererComponent_default, __spreadValues({}, props))
2538
2291
  };
2292
+ var SearchRenderer_default = SearchRenderer;
2539
2293
 
2540
2294
  // ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
2541
2295
  import { RadioGroup } from "@transferwise/components";
2542
- import { Fragment as Fragment5, jsx as jsx48, jsxs as jsxs16 } from "react/jsx-runtime";
2296
+ import { Fragment as Fragment3, jsx as jsx43, jsxs as jsxs12 } from "react/jsx-runtime";
2543
2297
  function RadioInputRendererComponent(props) {
2544
2298
  const {
2545
2299
  id,
@@ -2553,8 +2307,8 @@ function RadioInputRendererComponent(props) {
2553
2307
  validationState,
2554
2308
  onSelect
2555
2309
  } = props;
2556
- return /* @__PURE__ */ jsxs16(Fragment5, { children: [
2557
- /* @__PURE__ */ jsx48(
2310
+ return /* @__PURE__ */ jsxs12(Fragment3, { children: [
2311
+ /* @__PURE__ */ jsx43(
2558
2312
  FieldInput_default,
2559
2313
  {
2560
2314
  id,
@@ -2562,7 +2316,7 @@ function RadioInputRendererComponent(props) {
2562
2316
  help,
2563
2317
  description,
2564
2318
  validation: validationState,
2565
- children: /* @__PURE__ */ jsx48("span", { children: /* @__PURE__ */ jsx48(
2319
+ children: /* @__PURE__ */ jsx43("span", { children: /* @__PURE__ */ jsx43(
2566
2320
  RadioGroup,
2567
2321
  {
2568
2322
  name: id,
@@ -2571,7 +2325,7 @@ function RadioInputRendererComponent(props) {
2571
2325
  value: index,
2572
2326
  secondary: option.description,
2573
2327
  disabled: option.disabled || disabled,
2574
- avatar: /* @__PURE__ */ jsx48(OptionMedia, { icon: option.icon, image: option.image, preferAvatar: false })
2328
+ avatar: /* @__PURE__ */ jsx43(OptionMedia, { icon: option.icon, image: option.image, preferAvatar: false })
2575
2329
  })),
2576
2330
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
2577
2331
  onChange: onSelect
@@ -2584,15 +2338,16 @@ function RadioInputRendererComponent(props) {
2584
2338
  ] });
2585
2339
  }
2586
2340
 
2587
- // ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
2588
- import { useEffect as useEffect3 } from "react";
2589
- import { SegmentedControl } from "@transferwise/components";
2590
- import { Fragment as Fragment6, jsx as jsx49, jsxs as jsxs17 } from "react/jsx-runtime";
2591
- function SegmentedInputRendererComponent(props) {
2341
+ // ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
2342
+ import { Tabs } from "@transferwise/components";
2343
+ import { useEffect as useEffect2 } from "react";
2344
+ import { Fragment as Fragment4, jsx as jsx44, jsxs as jsxs13 } from "react/jsx-runtime";
2345
+ function TabInputRendererComponent(props) {
2592
2346
  const {
2593
2347
  id,
2594
2348
  children,
2595
2349
  description,
2350
+ disabled,
2596
2351
  help,
2597
2352
  title,
2598
2353
  options,
@@ -2600,13 +2355,13 @@ function SegmentedInputRendererComponent(props) {
2600
2355
  validationState,
2601
2356
  onSelect
2602
2357
  } = props;
2603
- useEffect3(() => {
2358
+ useEffect2(() => {
2604
2359
  if (!isValidIndex(selectedIndex, options.length)) {
2605
2360
  onSelect(0);
2606
2361
  }
2607
2362
  }, [selectedIndex, onSelect, options.length]);
2608
- return /* @__PURE__ */ jsxs17(Fragment6, { children: [
2609
- /* @__PURE__ */ jsx49(
2363
+ return /* @__PURE__ */ jsxs13(Fragment4, { children: [
2364
+ /* @__PURE__ */ jsx44(
2610
2365
  FieldInput_default,
2611
2366
  {
2612
2367
  id,
@@ -2614,31 +2369,31 @@ function SegmentedInputRendererComponent(props) {
2614
2369
  help,
2615
2370
  description,
2616
2371
  validation: validationState,
2617
- children: /* @__PURE__ */ jsx49(
2618
- SegmentedControl,
2372
+ children: /* @__PURE__ */ jsx44(
2373
+ Tabs,
2619
2374
  {
2620
- name: `${id}-segmented-control`,
2621
- value: String(selectedIndex),
2622
- mode: "view",
2623
- segments: options.map((option, index) => ({
2624
- id: String(index),
2625
- value: String(index),
2626
- label: option.title,
2627
- controls: `${id}-children`
2375
+ name: id,
2376
+ selected: selectedIndex != null ? selectedIndex : 0,
2377
+ tabs: options.map((option) => ({
2378
+ title: option.title,
2379
+ // if we pass null, we get some props-types console errors
2380
+ // eslint-disable-next-line react/jsx-no-useless-fragment
2381
+ content: /* @__PURE__ */ jsx44(Fragment4, {}),
2382
+ disabled: option.disabled || disabled
2628
2383
  })),
2629
- onChange: (value) => onSelect(Number(value))
2384
+ onTabSelect: onSelect
2630
2385
  }
2631
2386
  )
2632
2387
  }
2633
2388
  ),
2634
- /* @__PURE__ */ jsx49("div", { id: `${id}-children`, children })
2389
+ children
2635
2390
  ] });
2636
2391
  }
2637
2392
  var isValidIndex = (index, options) => index !== null && index >= 0 && index < options;
2638
2393
 
2639
2394
  // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
2640
2395
  import { SelectInput as SelectInput2, SelectInputOptionContent as SelectInputOptionContent2 } from "@transferwise/components";
2641
- import { Fragment as Fragment7, jsx as jsx50, jsxs as jsxs18 } from "react/jsx-runtime";
2396
+ import { Fragment as Fragment5, jsx as jsx45, jsxs as jsxs14 } from "react/jsx-runtime";
2642
2397
  function SelectInputRendererComponent(props) {
2643
2398
  const {
2644
2399
  id,
@@ -2678,13 +2433,13 @@ function SelectInputRendererComponent(props) {
2678
2433
  } : {
2679
2434
  title: option.title,
2680
2435
  description: option.description,
2681
- icon: /* @__PURE__ */ jsx50(OptionMedia, { icon: option.icon, image: option.image, preferAvatar: false })
2436
+ icon: /* @__PURE__ */ jsx45(OptionMedia, { icon: option.icon, image: option.image, preferAvatar: false })
2682
2437
  };
2683
- return /* @__PURE__ */ jsx50(SelectInputOptionContent2, __spreadValues({}, contentProps));
2438
+ return /* @__PURE__ */ jsx45(SelectInputOptionContent2, __spreadValues({}, contentProps));
2684
2439
  };
2685
2440
  const extraProps = { autoComplete };
2686
- return /* @__PURE__ */ jsxs18(Fragment7, { children: [
2687
- /* @__PURE__ */ jsx50(
2441
+ return /* @__PURE__ */ jsxs14(Fragment5, { children: [
2442
+ /* @__PURE__ */ jsx45(
2688
2443
  FieldInput_default,
2689
2444
  {
2690
2445
  id,
@@ -2692,7 +2447,7 @@ function SelectInputRendererComponent(props) {
2692
2447
  help,
2693
2448
  description,
2694
2449
  validation: validationState,
2695
- children: /* @__PURE__ */ jsx50(
2450
+ children: /* @__PURE__ */ jsx45(
2696
2451
  SelectInput2,
2697
2452
  __spreadValues({
2698
2453
  name: id,
@@ -2712,16 +2467,15 @@ function SelectInputRendererComponent(props) {
2712
2467
  ] });
2713
2468
  }
2714
2469
 
2715
- // ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
2716
- import { Tabs } from "@transferwise/components";
2717
- import { useEffect as useEffect4 } from "react";
2718
- import { Fragment as Fragment8, jsx as jsx51, jsxs as jsxs19 } from "react/jsx-runtime";
2719
- function TabInputRendererComponent(props) {
2470
+ // ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
2471
+ import { useEffect as useEffect3 } from "react";
2472
+ import { SegmentedControl } from "@transferwise/components";
2473
+ import { Fragment as Fragment6, jsx as jsx46, jsxs as jsxs15 } from "react/jsx-runtime";
2474
+ function SegmentedInputRendererComponent(props) {
2720
2475
  const {
2721
2476
  id,
2722
2477
  children,
2723
2478
  description,
2724
- disabled,
2725
2479
  help,
2726
2480
  title,
2727
2481
  options,
@@ -2729,13 +2483,13 @@ function TabInputRendererComponent(props) {
2729
2483
  validationState,
2730
2484
  onSelect
2731
2485
  } = props;
2732
- useEffect4(() => {
2486
+ useEffect3(() => {
2733
2487
  if (!isValidIndex2(selectedIndex, options.length)) {
2734
2488
  onSelect(0);
2735
2489
  }
2736
2490
  }, [selectedIndex, onSelect, options.length]);
2737
- return /* @__PURE__ */ jsxs19(Fragment8, { children: [
2738
- /* @__PURE__ */ jsx51(
2491
+ return /* @__PURE__ */ jsxs15(Fragment6, { children: [
2492
+ /* @__PURE__ */ jsx46(
2739
2493
  FieldInput_default,
2740
2494
  {
2741
2495
  id,
@@ -2743,60 +2497,61 @@ function TabInputRendererComponent(props) {
2743
2497
  help,
2744
2498
  description,
2745
2499
  validation: validationState,
2746
- children: /* @__PURE__ */ jsx51(
2747
- Tabs,
2500
+ children: /* @__PURE__ */ jsx46(
2501
+ SegmentedControl,
2748
2502
  {
2749
- name: id,
2750
- selected: selectedIndex != null ? selectedIndex : 0,
2751
- tabs: options.map((option) => ({
2752
- title: option.title,
2753
- // if we pass null, we get some props-types console errors
2754
- // eslint-disable-next-line react/jsx-no-useless-fragment
2755
- content: /* @__PURE__ */ jsx51(Fragment8, {}),
2756
- disabled: option.disabled || disabled
2503
+ name: `${id}-segmented-control`,
2504
+ value: String(selectedIndex),
2505
+ mode: "view",
2506
+ segments: options.map((option, index) => ({
2507
+ id: String(index),
2508
+ value: String(index),
2509
+ label: option.title,
2510
+ controls: `${id}-children`
2757
2511
  })),
2758
- onTabSelect: onSelect
2512
+ onChange: (value) => onSelect(Number(value))
2759
2513
  }
2760
2514
  )
2761
2515
  }
2762
2516
  ),
2763
- children
2517
+ /* @__PURE__ */ jsx46("div", { id: `${id}-children`, children })
2764
2518
  ] });
2765
2519
  }
2766
2520
  var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
2767
2521
 
2768
2522
  // ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
2769
- import { jsx as jsx52 } from "react/jsx-runtime";
2523
+ import { jsx as jsx47 } from "react/jsx-runtime";
2770
2524
  var SelectInputRenderer = {
2771
2525
  canRenderType: "input-select",
2772
2526
  render: (props) => {
2773
2527
  switch (props.control) {
2774
2528
  case "radio":
2775
- return /* @__PURE__ */ jsx52(RadioInputRendererComponent, __spreadValues({}, props));
2529
+ return /* @__PURE__ */ jsx47(RadioInputRendererComponent, __spreadValues({}, props));
2776
2530
  case "tab":
2777
- return props.options.length > 3 ? /* @__PURE__ */ jsx52(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx52(TabInputRendererComponent, __spreadValues({}, props));
2531
+ return props.options.length > 3 ? /* @__PURE__ */ jsx47(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx47(TabInputRendererComponent, __spreadValues({}, props));
2778
2532
  case "segmented":
2779
- return props.options.length > 3 ? /* @__PURE__ */ jsx52(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx52(SegmentedInputRendererComponent, __spreadValues({}, props));
2533
+ return props.options.length > 3 ? /* @__PURE__ */ jsx47(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx47(SegmentedInputRendererComponent, __spreadValues({}, props));
2780
2534
  case "select":
2781
2535
  default:
2782
- return /* @__PURE__ */ jsx52(SelectInputRendererComponent, __spreadValues({}, props));
2536
+ return /* @__PURE__ */ jsx47(SelectInputRendererComponent, __spreadValues({}, props));
2783
2537
  }
2784
2538
  }
2785
2539
  };
2540
+ var SelectInputRenderer_default = SelectInputRenderer;
2786
2541
 
2787
2542
  // ../renderers/src/StatusListRenderer.tsx
2788
- import { Header as Header8, Summary } from "@transferwise/components";
2789
- import { jsx as jsx53, jsxs as jsxs20 } from "react/jsx-runtime";
2543
+ import { Header as Header5, Summary } from "@transferwise/components";
2544
+ import { jsx as jsx48, jsxs as jsxs16 } from "react/jsx-runtime";
2790
2545
  var StatusListRenderer = {
2791
2546
  canRenderType: "status-list",
2792
- render: ({ margin, items, title }) => /* @__PURE__ */ jsxs20("div", { className: getMargin(margin), children: [
2793
- title ? /* @__PURE__ */ jsx53(Header8, { title, className: "m-b-2" }) : null,
2794
- items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */ jsx53(
2547
+ render: ({ margin, items, title }) => /* @__PURE__ */ jsxs16("div", { className: getMargin(margin), children: [
2548
+ title ? /* @__PURE__ */ jsx48(Header5, { title, className: "m-b-2" }) : null,
2549
+ items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */ jsx48(
2795
2550
  Summary,
2796
2551
  {
2797
2552
  title: itemTitle,
2798
2553
  description,
2799
- icon: icon && "name" in icon ? /* @__PURE__ */ jsx53(DynamicIcon_default, { name: icon.name }) : null,
2554
+ icon: icon && "name" in icon ? /* @__PURE__ */ jsx48(DynamicIcon_default, { name: icon.name }) : null,
2800
2555
  status: mapStatus(status),
2801
2556
  action: getSummaryAction(callToAction)
2802
2557
  },
@@ -2804,6 +2559,7 @@ var StatusListRenderer = {
2804
2559
  ))
2805
2560
  ] })
2806
2561
  };
2562
+ var StatusListRenderer_default = StatusListRenderer;
2807
2563
  var getSummaryAction = (callToAction) => {
2808
2564
  if (!callToAction) {
2809
2565
  return void 0;
@@ -2830,173 +2586,6 @@ var mapStatus = (status) => {
2830
2586
  return status;
2831
2587
  };
2832
2588
 
2833
- // ../renderers/src/utils/useCustomTheme.ts
2834
- import { useTheme } from "@wise/components-theming";
2835
- import { useEffect as useEffect5, useMemo } from "react";
2836
- var ThemeRequiredEventName = "Theme Required";
2837
- var useCustomTheme = (theme, trackEvent) => {
2838
- const previousThemeHookValue = useTheme();
2839
- const previousTheme = useMemo(() => previousThemeHookValue.theme, []);
2840
- useEffect5(() => {
2841
- trackEvent(ThemeRequiredEventName, { theme });
2842
- return theme !== previousTheme ? () => {
2843
- trackEvent(ThemeRequiredEventName, { theme: previousTheme });
2844
- } : () => {
2845
- };
2846
- }, []);
2847
- };
2848
-
2849
- // ../renderers/src/step/BackButton.tsx
2850
- import { AvatarView as AvatarView4 } from "@transferwise/components";
2851
- import { ArrowLeft } from "@transferwise/icons";
2852
- import { jsx as jsx54, jsxs as jsxs21 } from "react/jsx-runtime";
2853
- function BackButton({ title, onClick }) {
2854
- return /* @__PURE__ */ jsx54("div", { className: "m-b-2", children: /* @__PURE__ */ jsxs21(
2855
- "button",
2856
- {
2857
- type: "button",
2858
- className: "df-back-btn",
2859
- title,
2860
- "aria-label": title,
2861
- onClick,
2862
- children: [
2863
- /* @__PURE__ */ jsx54("span", { className: "sr-only", children: title }),
2864
- /* @__PURE__ */ jsx54(AvatarView4, { interactive: true, children: /* @__PURE__ */ jsx54(ArrowLeft, { size: "24" }) })
2865
- ]
2866
- }
2867
- ) });
2868
- }
2869
- var BackButton_default = BackButton;
2870
-
2871
- // ../renderers/src/step/SplashCelebrationStepRenderer.tsx
2872
- import { jsx as jsx55, jsxs as jsxs22 } from "react/jsx-runtime";
2873
- var SplashCelebrationStepRenderer = {
2874
- canRenderType: "step",
2875
- canRender: ({ control }) => control === "splash-celebration",
2876
- render: SplashCelebrationStepRendererComponent
2877
- };
2878
- function SplashCelebrationStepRendererComponent(props) {
2879
- const { back, children, trackEvent } = props;
2880
- useCustomTheme("forest-green", trackEvent);
2881
- return /* @__PURE__ */ jsxs22("div", { className: "splash-screen m-t-5", children: [
2882
- back ? /* @__PURE__ */ jsx55(BackButton_default, __spreadValues({}, back)) : null,
2883
- children
2884
- ] });
2885
- }
2886
-
2887
- // ../renderers/src/step/SplashStepRenderer.tsx
2888
- import { jsx as jsx56, jsxs as jsxs23 } from "react/jsx-runtime";
2889
- var SplashStepRenderer = {
2890
- canRenderType: "step",
2891
- canRender: ({ control }) => control === "splash",
2892
- render: SplashStepRendererComponent
2893
- };
2894
- function SplashStepRendererComponent(props) {
2895
- const { back, children } = props;
2896
- return /* @__PURE__ */ jsxs23("div", { className: "splash-screen m-t-5", children: [
2897
- back ? /* @__PURE__ */ jsx56(BackButton_default, __spreadValues({}, back)) : null,
2898
- children
2899
- ] });
2900
- }
2901
-
2902
- // ../renderers/src/step/StepRenderer.tsx
2903
- import { Alert as Alert2, Title as Title2 } from "@transferwise/components";
2904
- import { Fragment as Fragment9, jsx as jsx57, jsxs as jsxs24 } from "react/jsx-runtime";
2905
- var StepRenderer = {
2906
- canRenderType: "step",
2907
- render: StepRendererComponent
2908
- };
2909
- function StepRendererComponent(props) {
2910
- const { back, description, error, title, children } = props;
2911
- return /* @__PURE__ */ jsxs24(Fragment9, { children: [
2912
- back ? /* @__PURE__ */ jsx57(BackButton_default, __spreadValues({}, back)) : null,
2913
- title || description ? /* @__PURE__ */ jsxs24("div", { className: "m-b-4", children: [
2914
- title ? /* @__PURE__ */ jsx57(Title2, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
2915
- description ? /* @__PURE__ */ jsx57("p", { className: "text-xs-center np-text-body-large", children: description }) : void 0
2916
- ] }) : void 0,
2917
- error ? /* @__PURE__ */ jsx57(Alert2, { type: "negative", className: "m-b-2", message: error }) : void 0,
2918
- children
2919
- ] });
2920
- }
2921
-
2922
- // ../renderers/src/TabsRenderer.tsx
2923
- import { Chips, SegmentedControl as SegmentedControl2, Tabs as Tabs2 } from "@transferwise/components";
2924
- import { useState as useState8 } from "react";
2925
- import { jsx as jsx58, jsxs as jsxs25 } from "react/jsx-runtime";
2926
- var TabsRenderer = {
2927
- canRenderType: "tabs",
2928
- render: (props) => {
2929
- switch (props.control) {
2930
- case "segmented":
2931
- if (props.tabs.length > 3) {
2932
- return /* @__PURE__ */ jsx58(TabsRendererComponent, __spreadValues({}, props));
2933
- }
2934
- return /* @__PURE__ */ jsx58(SegmentedTabsRendererComponent, __spreadValues({}, props));
2935
- case "chips":
2936
- return /* @__PURE__ */ jsx58(ChipsTabsRendererComponent, __spreadValues({}, props));
2937
- default:
2938
- return /* @__PURE__ */ jsx58(TabsRendererComponent, __spreadValues({}, props));
2939
- }
2940
- }
2941
- };
2942
- function TabsRendererComponent({ uid, margin, tabs }) {
2943
- const [selectedIndex, setSelectedIndex] = useState8(0);
2944
- return /* @__PURE__ */ jsx58("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx58(
2945
- Tabs2,
2946
- {
2947
- name: uid,
2948
- selected: selectedIndex != null ? selectedIndex : 0,
2949
- tabs: tabs.map((option) => ({
2950
- title: option.title,
2951
- disabled: false,
2952
- content: /* @__PURE__ */ jsxs25("div", { className: "m-t-2", children: [
2953
- " ",
2954
- option.children,
2955
- " "
2956
- ] })
2957
- })),
2958
- onTabSelect: setSelectedIndex
2959
- }
2960
- ) });
2961
- }
2962
- function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
2963
- var _a;
2964
- const [selectedIndex, setSelectedIndex] = useState8(0);
2965
- return /* @__PURE__ */ jsxs25("div", { className: getMargin(margin), children: [
2966
- /* @__PURE__ */ jsx58(
2967
- SegmentedControl2,
2968
- {
2969
- name: uid,
2970
- value: String(selectedIndex),
2971
- mode: "view",
2972
- segments: tabs.map((tab, index) => ({
2973
- id: String(index),
2974
- value: String(index),
2975
- label: tab.title,
2976
- controls: `${uid}-children`
2977
- })),
2978
- onChange: (value) => setSelectedIndex(Number(value))
2979
- }
2980
- ),
2981
- /* @__PURE__ */ jsx58("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
2982
- ] });
2983
- }
2984
- function ChipsTabsRendererComponent({ margin, tabs }) {
2985
- var _a;
2986
- const [selectedIndex, setSelectedIndex] = useState8(0);
2987
- return /* @__PURE__ */ jsxs25("div", { className: getMargin(margin), children: [
2988
- /* @__PURE__ */ jsx58("div", { className: "chips-container", children: /* @__PURE__ */ jsx58(
2989
- Chips,
2990
- {
2991
- chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
2992
- selected: selectedIndex,
2993
- onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
2994
- }
2995
- ) }),
2996
- /* @__PURE__ */ jsx58("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
2997
- ] });
2998
- }
2999
-
3000
2589
  // ../renderers/src/TextInputRenderer.tsx
3001
2590
  import { InputGroup as InputGroup3 } from "@transferwise/components";
3002
2591
 
@@ -3008,7 +2597,7 @@ import {
3008
2597
  TextArea,
3009
2598
  TextareaWithDisplayFormat
3010
2599
  } from "@transferwise/components";
3011
- import { jsx as jsx59 } from "react/jsx-runtime";
2600
+ import { jsx as jsx49 } from "react/jsx-runtime";
3012
2601
  var commonKeys = [
3013
2602
  "autoComplete",
3014
2603
  "autoCapitalize",
@@ -3027,12 +2616,12 @@ function VariableTextInput(inputProps) {
3027
2616
  const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
3028
2617
  switch (control) {
3029
2618
  case "email":
3030
- return /* @__PURE__ */ jsx59(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
2619
+ return /* @__PURE__ */ jsx49(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
3031
2620
  case "password":
3032
- return /* @__PURE__ */ jsx59(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
2621
+ return /* @__PURE__ */ jsx49(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
3033
2622
  case "numeric": {
3034
2623
  const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
3035
- return /* @__PURE__ */ jsx59(
2624
+ return /* @__PURE__ */ jsx49(
3036
2625
  TextInput,
3037
2626
  __spreadProps(__spreadValues({}, numericProps), {
3038
2627
  onChange: (newValue) => {
@@ -3043,9 +2632,9 @@ function VariableTextInput(inputProps) {
3043
2632
  );
3044
2633
  }
3045
2634
  case "phone-number":
3046
- return /* @__PURE__ */ jsx59(PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
2635
+ return /* @__PURE__ */ jsx49(PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
3047
2636
  default: {
3048
- return /* @__PURE__ */ jsx59(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
2637
+ return /* @__PURE__ */ jsx49(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
3049
2638
  }
3050
2639
  }
3051
2640
  }
@@ -3053,11 +2642,11 @@ function TextInput(props) {
3053
2642
  const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
3054
2643
  const InputWithPattern = control === "textarea" ? TextareaWithDisplayFormat : InputWithDisplayFormat;
3055
2644
  const InputWithoutPattern = control === "textarea" ? TextArea : Input5;
3056
- return displayFormat ? /* @__PURE__ */ jsx59(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ jsx59(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
2645
+ return displayFormat ? /* @__PURE__ */ jsx49(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ jsx49(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
3057
2646
  }
3058
2647
 
3059
2648
  // ../renderers/src/TextInputRenderer.tsx
3060
- import { jsx as jsx60 } from "react/jsx-runtime";
2649
+ import { jsx as jsx50 } from "react/jsx-runtime";
3061
2650
  var TextInputRenderer = {
3062
2651
  canRenderType: "input-text",
3063
2652
  render: (props) => {
@@ -3092,7 +2681,7 @@ var TextInputRenderer = {
3092
2681
  }
3093
2682
  }
3094
2683
  });
3095
- return /* @__PURE__ */ jsx60(
2684
+ return /* @__PURE__ */ jsx50(
3096
2685
  FieldInput_default,
3097
2686
  {
3098
2687
  id,
@@ -3100,11 +2689,12 @@ var TextInputRenderer = {
3100
2689
  description,
3101
2690
  validation: validationState,
3102
2691
  help,
3103
- children: /* @__PURE__ */ jsx60(InputGroup3, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx60(VariableTextInput, __spreadValues({}, inputProps)) })
2692
+ children: /* @__PURE__ */ jsx50(InputGroup3, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx50(VariableTextInput, __spreadValues({}, inputProps)) })
3104
2693
  }
3105
2694
  );
3106
2695
  }
3107
2696
  };
2697
+ var TextInputRenderer_default = TextInputRenderer;
3108
2698
 
3109
2699
  // ../renderers/src/UploadInputRenderer.tsx
3110
2700
  import { Upload, UploadInput as UploadInput2 } from "@transferwise/components";
@@ -3113,7 +2703,7 @@ import { Upload, UploadInput as UploadInput2 } from "@transferwise/components";
3113
2703
  var getRandomId = () => Math.random().toString(36).substring(2);
3114
2704
 
3115
2705
  // ../renderers/src/UploadInputRenderer.tsx
3116
- import { jsx as jsx61 } from "react/jsx-runtime";
2706
+ import { jsx as jsx51 } from "react/jsx-runtime";
3117
2707
  var UploadInputRenderer = {
3118
2708
  canRenderType: "input-upload",
3119
2709
  render: (props) => {
@@ -3129,14 +2719,14 @@ var UploadInputRenderer = {
3129
2719
  };
3130
2720
  return (
3131
2721
  // We don't pass help here as there is no sensible place to display it
3132
- /* @__PURE__ */ jsx61(
2722
+ /* @__PURE__ */ jsx51(
3133
2723
  UploadFieldInput_default,
3134
2724
  {
3135
2725
  id,
3136
2726
  label: void 0,
3137
2727
  description: void 0,
3138
2728
  validation: validationState,
3139
- children: /* @__PURE__ */ jsx61(
2729
+ children: /* @__PURE__ */ jsx51(
3140
2730
  UploadInput2,
3141
2731
  {
3142
2732
  id,
@@ -3191,7 +2781,7 @@ var LargeUploadRenderer = {
3191
2781
  throw e;
3192
2782
  }
3193
2783
  };
3194
- return /* @__PURE__ */ jsx61(
2784
+ return /* @__PURE__ */ jsx51(
3195
2785
  FieldInput_default,
3196
2786
  {
3197
2787
  id,
@@ -3199,7 +2789,7 @@ var LargeUploadRenderer = {
3199
2789
  description,
3200
2790
  validation: validationState,
3201
2791
  help,
3202
- children: /* @__PURE__ */ jsx61(
2792
+ children: /* @__PURE__ */ jsx51(
3203
2793
  Upload,
3204
2794
  __spreadProps(__spreadValues({}, uploadProps), {
3205
2795
  usAccept: getAcceptsString(accepts),
@@ -3214,75 +2804,516 @@ var LargeUploadRenderer = {
3214
2804
  }
3215
2805
  };
3216
2806
 
3217
- // ../renderers/src/getWiseRenderers.ts
3218
- var getWiseRenderers = () => [
3219
- AlertRenderer,
3220
- CheckboxInputRenderer,
3221
- BoxRenderer,
3222
- ButtonRenderer,
3223
- ColumnsRenderer,
3224
- DateInputRenderer,
3225
- DecisionRenderer,
3226
- DividerRenderer,
3227
- ExternalConfirmationRenderer,
3228
- FormRenderer,
3229
- FormSectionRenderer,
3230
- HeadingRenderer,
3231
- ImageRenderer,
3232
- InstructionsRenderer,
3233
- IntegerInputRenderer,
3234
- LargeUploadRenderer,
3235
- ListRenderer,
3236
- LoadingIndicatorRenderer,
3237
- MarkdownRenderer,
3238
- ModalContentRenderer,
3239
- ModalLayoutRenderer,
3240
- MultiSelectInputRenderer,
3241
- MultiUploadInputRenderer,
3242
- NumberInputRenderer,
3243
- ParagraphRenderer,
3244
- RepeatableRenderer,
3245
- ReviewRenderer,
3246
- SearchRenderer,
3247
- SelectInputRenderer,
3248
- SectionRenderer,
3249
- StatusListRenderer,
3250
- TabsRenderer,
3251
- TextInputRenderer,
3252
- UploadInputRenderer,
3253
- SplashStepRenderer,
3254
- SplashCelebrationStepRenderer,
3255
- StepRenderer
3256
- ];
3257
-
3258
- // src/dynamicFlow/telemetry/app-version.ts
3259
- var appVersion = (
3260
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
3261
- typeof process !== "undefined" ? "4.15.7" : "0.0.0"
3262
- );
2807
+ // ../renderers/src/ReviewRenderer.tsx
2808
+ import { DefinitionList, Header as Header6 } from "@transferwise/components";
3263
2809
 
3264
- // src/dynamicFlow/telemetry/getLogEvent.ts
3265
- var getLogEvent = (onLog) => (level, message, extra) => {
3266
- const extraWithVersion = __spreadProps(__spreadValues({}, extra), {
3267
- dfWiseVersion: appVersion
3268
- });
3269
- if (level !== "info" && onLog) {
3270
- if (onLog) {
3271
- onLog(level, message, extraWithVersion);
3272
- } else {
3273
- logToRollbar(level, message, extraWithVersion);
3274
- }
3275
- }
3276
- };
3277
- var logToRollbar = (level, message, extra) => {
3278
- try {
3279
- const rollbar = typeof window.Rollbar !== "undefined" ? window.Rollbar : void 0;
3280
- rollbar == null ? void 0 : rollbar[level](message, extra);
3281
- } catch (error) {
3282
- console.error("Failed to log to Rollbar", error);
2810
+ // ../renderers/src/utils/getHeaderAction.tsx
2811
+ var getHeaderAction = (callToAction) => {
2812
+ if (!callToAction) {
2813
+ return void 0;
3283
2814
  }
3284
- };
3285
-
2815
+ const { accessibilityDescription, href, title, onClick } = callToAction;
2816
+ return href ? {
2817
+ "aria-label": accessibilityDescription,
2818
+ text: title,
2819
+ href,
2820
+ target: "_blank"
2821
+ } : {
2822
+ "aria-label": accessibilityDescription,
2823
+ text: title,
2824
+ onClick: (event) => {
2825
+ event.preventDefault();
2826
+ onClick();
2827
+ }
2828
+ };
2829
+ };
2830
+
2831
+ // ../renderers/src/ReviewRenderer.tsx
2832
+ import { Fragment as Fragment7, jsx as jsx52, jsxs as jsxs17 } from "react/jsx-runtime";
2833
+ var ReviewRenderer = {
2834
+ canRenderType: "review",
2835
+ render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
2836
+ const orientation = mapControlToDefinitionListLayout(control);
2837
+ return /* @__PURE__ */ jsxs17("div", { className: getMargin(margin), children: [
2838
+ (title || callToAction) && /* @__PURE__ */ jsx52(Header6, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
2839
+ /* @__PURE__ */ jsx52("div", { className: margin, children: /* @__PURE__ */ jsx52(
2840
+ DefinitionList,
2841
+ {
2842
+ layout: orientation,
2843
+ definitions: fields.map(
2844
+ ({ label, value, help, analyticsId: fieldAnalyticsId }, index) => ({
2845
+ key: String(index),
2846
+ title: label,
2847
+ value: getFieldValue(
2848
+ value,
2849
+ help,
2850
+ orientation,
2851
+ () => trackEvent("Help Pressed", { layoutItemId: fieldAnalyticsId })
2852
+ )
2853
+ })
2854
+ )
2855
+ }
2856
+ ) })
2857
+ ] });
2858
+ }
2859
+ };
2860
+ var ReviewRenderer_default = ReviewRenderer;
2861
+ var mapControlToDefinitionListLayout = (control) => {
2862
+ switch (control) {
2863
+ case "horizontal":
2864
+ case "horizontal-end-aligned":
2865
+ return "HORIZONTAL_RIGHT_ALIGNED";
2866
+ case "horizontal-start-aligned":
2867
+ return "HORIZONTAL_LEFT_ALIGNED";
2868
+ case "vertical-two-column":
2869
+ return "VERTICAL_TWO_COLUMN";
2870
+ case "vertical":
2871
+ case "vertical-one-column":
2872
+ default:
2873
+ return "VERTICAL_ONE_COLUMN";
2874
+ }
2875
+ };
2876
+ var getFieldValue = (value, help, orientation, onClick) => {
2877
+ if (help) {
2878
+ return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs17(Fragment7, { children: [
2879
+ /* @__PURE__ */ jsx52(Help_default, { help, onClick }),
2880
+ " ",
2881
+ value
2882
+ ] }) : /* @__PURE__ */ jsxs17(Fragment7, { children: [
2883
+ value,
2884
+ " ",
2885
+ /* @__PURE__ */ jsx52(Help_default, { help, onClick })
2886
+ ] });
2887
+ }
2888
+ return value;
2889
+ };
2890
+
2891
+ // ../renderers/src/step/StepRenderer.tsx
2892
+ import { Alert as Alert2, Title as Title2 } from "@transferwise/components";
2893
+
2894
+ // ../renderers/src/step/BackButton.tsx
2895
+ import { AvatarView as AvatarView4 } from "@transferwise/components";
2896
+ import { ArrowLeft } from "@transferwise/icons";
2897
+ import { jsx as jsx53, jsxs as jsxs18 } from "react/jsx-runtime";
2898
+ function BackButton({ title, onClick }) {
2899
+ return /* @__PURE__ */ jsx53("div", { className: "m-b-2", children: /* @__PURE__ */ jsxs18(
2900
+ "button",
2901
+ {
2902
+ type: "button",
2903
+ className: "df-back-btn",
2904
+ title,
2905
+ "aria-label": title,
2906
+ onClick,
2907
+ children: [
2908
+ /* @__PURE__ */ jsx53("span", { className: "sr-only", children: title }),
2909
+ /* @__PURE__ */ jsx53(AvatarView4, { interactive: true, children: /* @__PURE__ */ jsx53(ArrowLeft, { size: "24" }) })
2910
+ ]
2911
+ }
2912
+ ) });
2913
+ }
2914
+ var BackButton_default = BackButton;
2915
+
2916
+ // ../renderers/src/step/StepRenderer.tsx
2917
+ import { Fragment as Fragment8, jsx as jsx54, jsxs as jsxs19 } from "react/jsx-runtime";
2918
+ var StepRenderer = {
2919
+ canRenderType: "step",
2920
+ render: StepRendererComponent
2921
+ };
2922
+ function StepRendererComponent(props) {
2923
+ const { back, description, error, title, children } = props;
2924
+ return /* @__PURE__ */ jsxs19(Fragment8, { children: [
2925
+ back ? /* @__PURE__ */ jsx54(BackButton_default, __spreadValues({}, back)) : null,
2926
+ title || description ? /* @__PURE__ */ jsxs19("div", { className: "m-b-4", children: [
2927
+ title ? /* @__PURE__ */ jsx54(Title2, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
2928
+ description ? /* @__PURE__ */ jsx54("p", { className: "text-xs-center np-text-body-large", children: description }) : void 0
2929
+ ] }) : void 0,
2930
+ error ? /* @__PURE__ */ jsx54(Alert2, { type: "negative", className: "m-b-2", message: error }) : void 0,
2931
+ children
2932
+ ] });
2933
+ }
2934
+
2935
+ // ../renderers/src/ListRenderer.tsx
2936
+ import { Body, Header as Header7 } from "@transferwise/components";
2937
+ import classNames6 from "classnames";
2938
+ import { jsx as jsx55, jsxs as jsxs20 } from "react/jsx-runtime";
2939
+ var ListRenderer = {
2940
+ canRenderType: "list",
2941
+ render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ jsxs20("div", { className: getMargin(margin), children: [
2942
+ (title || callToAction) && /* @__PURE__ */ jsx55(Header7, { as: "h2", title: title != null ? title : "", action: getListAction(callToAction) }),
2943
+ items.map((props) => /* @__PURE__ */ jsx55(DesignSystemListItem, __spreadProps(__spreadValues({}, props), { control }), props.title))
2944
+ ] })
2945
+ };
2946
+ var DesignSystemListItem = ({
2947
+ title,
2948
+ description,
2949
+ supportingValues,
2950
+ icon,
2951
+ image,
2952
+ control,
2953
+ tag
2954
+ }) => /* @__PURE__ */ jsx55(
2955
+ "label",
2956
+ {
2957
+ className: classNames6("np-option p-a-2", {
2958
+ "np-option__sm-media": true,
2959
+ "np-option__container-aligned": true
2960
+ }),
2961
+ children: /* @__PURE__ */ jsxs20("div", { className: "media", children: [
2962
+ icon || image ? /* @__PURE__ */ jsx55("div", { className: "media-left", children: /* @__PURE__ */ jsx55(
2963
+ ListItemMedia,
2964
+ {
2965
+ image,
2966
+ icon,
2967
+ preferAvatar: control === "with-avatar" || tag === "with-avatar"
2968
+ }
2969
+ ) }) : null,
2970
+ /* @__PURE__ */ jsxs20("div", { className: "media-body", children: [
2971
+ /* @__PURE__ */ jsxs20("div", { className: "d-flex justify-content-between", children: [
2972
+ /* @__PURE__ */ jsx55("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: title }),
2973
+ /* @__PURE__ */ jsx55("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: supportingValues == null ? void 0 : supportingValues.value })
2974
+ ] }),
2975
+ /* @__PURE__ */ jsxs20("div", { className: "d-flex justify-content-between", children: [
2976
+ /* @__PURE__ */ jsx55(Body, { className: "d-block np-option__body", children: description }),
2977
+ /* @__PURE__ */ jsx55(Body, { className: "d-block np-option__body", children: supportingValues == null ? void 0 : supportingValues.subvalue })
2978
+ ] })
2979
+ ] })
2980
+ ] })
2981
+ },
2982
+ title
2983
+ );
2984
+ var ListItemMedia = ({
2985
+ icon,
2986
+ image,
2987
+ preferAvatar
2988
+ }) => {
2989
+ if (icon) {
2990
+ return /* @__PURE__ */ jsx55("div", { className: "circle circle-sm text-primary circle-inverse", children: /* @__PURE__ */ jsx55(OptionMedia, { icon, image, preferAvatar }) });
2991
+ }
2992
+ if (image) {
2993
+ return /* @__PURE__ */ jsx55("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ jsx55(OptionMedia, { icon, image, preferAvatar }) });
2994
+ }
2995
+ };
2996
+ var getListAction = (callToAction) => {
2997
+ if (callToAction) {
2998
+ return __spreadValues({
2999
+ "aria-label": callToAction.accessibilityDescription,
3000
+ text: callToAction.title,
3001
+ onClick: callToAction.onClick
3002
+ }, callToAction.type === "link" ? { href: callToAction.href, target: "_blank" } : {});
3003
+ }
3004
+ return void 0;
3005
+ };
3006
+ var ListRenderer_default = ListRenderer;
3007
+
3008
+ // ../renderers/src/step/SplashStepRenderer.tsx
3009
+ import { jsx as jsx56, jsxs as jsxs21 } from "react/jsx-runtime";
3010
+ var SplashStepRenderer = {
3011
+ canRenderType: "step",
3012
+ canRender: ({ control }) => control === "splash",
3013
+ render: SplashStepRendererComponent
3014
+ };
3015
+ function SplashStepRendererComponent(props) {
3016
+ const { back, children } = props;
3017
+ return /* @__PURE__ */ jsxs21("div", { className: "splash-screen m-t-5", children: [
3018
+ back ? /* @__PURE__ */ jsx56(BackButton_default, __spreadValues({}, back)) : null,
3019
+ children
3020
+ ] });
3021
+ }
3022
+
3023
+ // ../renderers/src/utils/useCustomTheme.ts
3024
+ import { useTheme } from "@wise/components-theming";
3025
+ import { useEffect as useEffect4, useMemo } from "react";
3026
+ var ThemeRequiredEventName = "Theme Required";
3027
+ var useCustomTheme = (theme, trackEvent) => {
3028
+ const previousThemeHookValue = useTheme();
3029
+ const previousTheme = useMemo(() => previousThemeHookValue.theme, []);
3030
+ useEffect4(() => {
3031
+ trackEvent(ThemeRequiredEventName, { theme });
3032
+ return theme !== previousTheme ? () => {
3033
+ trackEvent(ThemeRequiredEventName, { theme: previousTheme });
3034
+ } : () => {
3035
+ };
3036
+ }, []);
3037
+ };
3038
+
3039
+ // ../renderers/src/step/SplashCelebrationStepRenderer.tsx
3040
+ import { jsx as jsx57, jsxs as jsxs22 } from "react/jsx-runtime";
3041
+ var SplashCelebrationStepRenderer = {
3042
+ canRenderType: "step",
3043
+ canRender: ({ control }) => control === "splash-celebration",
3044
+ render: SplashCelebrationStepRendererComponent
3045
+ };
3046
+ function SplashCelebrationStepRendererComponent(props) {
3047
+ const { back, children, trackEvent } = props;
3048
+ useCustomTheme("forest-green", trackEvent);
3049
+ return /* @__PURE__ */ jsxs22("div", { className: "splash-screen m-t-5", children: [
3050
+ back ? /* @__PURE__ */ jsx57(BackButton_default, __spreadValues({}, back)) : null,
3051
+ children
3052
+ ] });
3053
+ }
3054
+
3055
+ // ../renderers/src/ExternalConfirmationRenderer.tsx
3056
+ import { Button as Button6, Markdown as Markdown5, Modal as Modal3 } from "@transferwise/components";
3057
+
3058
+ // ../renderers/src/messages/external-confirmation.messages.ts
3059
+ import { defineMessages as defineMessages7 } from "react-intl";
3060
+ var external_confirmation_messages_default = defineMessages7({
3061
+ title: {
3062
+ id: "df.wise.ExternalConfirmation.title",
3063
+ defaultMessage: "Please confirm",
3064
+ description: "Heading for the confirmation screen."
3065
+ },
3066
+ description: {
3067
+ id: "df.wise.ExternalConfirmation.description",
3068
+ defaultMessage: "Please confirm you want to open **{origin}** in a new browser tab.",
3069
+ description: "Description for the confirmation screen."
3070
+ },
3071
+ open: {
3072
+ id: "df.wise.ExternalConfirmation.open",
3073
+ defaultMessage: "Open in new tab",
3074
+ description: "Button text confirming opening a new browser tab."
3075
+ },
3076
+ cancel: {
3077
+ id: "df.wise.ExternalConfirmation.cancel",
3078
+ defaultMessage: "Cancel",
3079
+ description: "Button text rejecting opening a new browser tab."
3080
+ }
3081
+ });
3082
+
3083
+ // ../renderers/src/ExternalConfirmationRenderer.tsx
3084
+ import { useIntl as useIntl8 } from "react-intl";
3085
+ import { useEffect as useEffect5 } from "react";
3086
+ import { Fragment as Fragment9, jsx as jsx58, jsxs as jsxs23 } from "react/jsx-runtime";
3087
+ var ExternalConfirmationRenderer = {
3088
+ canRenderType: "external-confirmation",
3089
+ render: ExternalConfirmationRendererComponent
3090
+ };
3091
+ function ExternalConfirmationRendererComponent({
3092
+ url,
3093
+ status,
3094
+ onSuccess,
3095
+ onFailure,
3096
+ onCancel
3097
+ }) {
3098
+ const { formatMessage } = useIntl8();
3099
+ useEffect5(() => {
3100
+ if (url) {
3101
+ const w = window.open(url, "_blank");
3102
+ if (w) {
3103
+ onSuccess();
3104
+ } else {
3105
+ onFailure();
3106
+ }
3107
+ }
3108
+ }, []);
3109
+ return /* @__PURE__ */ jsx58(
3110
+ Modal3,
3111
+ {
3112
+ open: status === "failure",
3113
+ title: formatMessage(external_confirmation_messages_default.title),
3114
+ body: /* @__PURE__ */ jsxs23(Fragment9, { children: [
3115
+ /* @__PURE__ */ jsx58(Markdown5, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
3116
+ /* @__PURE__ */ jsx58("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs23("div", { className: "df-box-renderer-width-lg", children: [
3117
+ /* @__PURE__ */ jsx58(
3118
+ Button6,
3119
+ {
3120
+ block: true,
3121
+ className: "m-b-2",
3122
+ priority: "primary",
3123
+ size: "md",
3124
+ onClick: () => {
3125
+ window.open(url);
3126
+ onCancel();
3127
+ },
3128
+ children: formatMessage(external_confirmation_messages_default.open)
3129
+ }
3130
+ ),
3131
+ /* @__PURE__ */ jsx58(Button6, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
3132
+ ] }) })
3133
+ ] }),
3134
+ onClose: onCancel
3135
+ }
3136
+ );
3137
+ }
3138
+ function getOrigin(url) {
3139
+ try {
3140
+ return new URL(url).origin;
3141
+ } catch (e) {
3142
+ return url;
3143
+ }
3144
+ }
3145
+ var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
3146
+
3147
+ // ../renderers/src/SectionRenderer.tsx
3148
+ import { Header as Header8 } from "@transferwise/components";
3149
+ import { jsx as jsx59, jsxs as jsxs24 } from "react/jsx-runtime";
3150
+ var SectionRenderer = {
3151
+ canRenderType: "section",
3152
+ render: ({ children, callToAction, margin, title }) => {
3153
+ return /* @__PURE__ */ jsxs24("section", { className: getMargin(margin), children: [
3154
+ (title || callToAction) && /* @__PURE__ */ jsx59(Header8, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
3155
+ children
3156
+ ] });
3157
+ }
3158
+ };
3159
+ var SectionRenderer_default = SectionRenderer;
3160
+
3161
+ // ../renderers/src/TabsRenderer.tsx
3162
+ import { Chips, SegmentedControl as SegmentedControl2, Tabs as Tabs2 } from "@transferwise/components";
3163
+ import { useState as useState8 } from "react";
3164
+ import { jsx as jsx60, jsxs as jsxs25 } from "react/jsx-runtime";
3165
+ var TabsRenderer = {
3166
+ canRenderType: "tabs",
3167
+ render: (props) => {
3168
+ switch (props.control) {
3169
+ case "segmented":
3170
+ if (props.tabs.length > 3) {
3171
+ return /* @__PURE__ */ jsx60(TabsRendererComponent, __spreadValues({}, props));
3172
+ }
3173
+ return /* @__PURE__ */ jsx60(SegmentedTabsRendererComponent, __spreadValues({}, props));
3174
+ case "chips":
3175
+ return /* @__PURE__ */ jsx60(ChipsTabsRendererComponent, __spreadValues({}, props));
3176
+ default:
3177
+ return /* @__PURE__ */ jsx60(TabsRendererComponent, __spreadValues({}, props));
3178
+ }
3179
+ }
3180
+ };
3181
+ function TabsRendererComponent({ uid, margin, tabs }) {
3182
+ const [selectedIndex, setSelectedIndex] = useState8(0);
3183
+ return /* @__PURE__ */ jsx60("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx60(
3184
+ Tabs2,
3185
+ {
3186
+ name: uid,
3187
+ selected: selectedIndex != null ? selectedIndex : 0,
3188
+ tabs: tabs.map((option) => ({
3189
+ title: option.title,
3190
+ disabled: false,
3191
+ content: /* @__PURE__ */ jsxs25("div", { className: "m-t-2", children: [
3192
+ " ",
3193
+ option.children,
3194
+ " "
3195
+ ] })
3196
+ })),
3197
+ onTabSelect: setSelectedIndex
3198
+ }
3199
+ ) });
3200
+ }
3201
+ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
3202
+ var _a;
3203
+ const [selectedIndex, setSelectedIndex] = useState8(0);
3204
+ return /* @__PURE__ */ jsxs25("div", { className: getMargin(margin), children: [
3205
+ /* @__PURE__ */ jsx60(
3206
+ SegmentedControl2,
3207
+ {
3208
+ name: uid,
3209
+ value: String(selectedIndex),
3210
+ mode: "view",
3211
+ segments: tabs.map((tab, index) => ({
3212
+ id: String(index),
3213
+ value: String(index),
3214
+ label: tab.title,
3215
+ controls: `${uid}-children`
3216
+ })),
3217
+ onChange: (value) => setSelectedIndex(Number(value))
3218
+ }
3219
+ ),
3220
+ /* @__PURE__ */ jsx60("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
3221
+ ] });
3222
+ }
3223
+ function ChipsTabsRendererComponent({ margin, tabs }) {
3224
+ var _a;
3225
+ const [selectedIndex, setSelectedIndex] = useState8(0);
3226
+ return /* @__PURE__ */ jsxs25("div", { className: getMargin(margin), children: [
3227
+ /* @__PURE__ */ jsx60("div", { className: "chips-container", children: /* @__PURE__ */ jsx60(
3228
+ Chips,
3229
+ {
3230
+ chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
3231
+ selected: selectedIndex,
3232
+ onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
3233
+ }
3234
+ ) }),
3235
+ /* @__PURE__ */ jsx60("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
3236
+ ] });
3237
+ }
3238
+
3239
+ // ../renderers/src/getWiseRenderers.ts
3240
+ var getWiseRenderers = () => [
3241
+ AlertRenderer_default,
3242
+ CheckboxInputRenderer_default,
3243
+ BoxRenderer_default,
3244
+ ButtonRenderer_default,
3245
+ ColumnsRenderer_default,
3246
+ DateInputRenderer_default,
3247
+ DecisionRenderer_default,
3248
+ DividerRenderer_default,
3249
+ ExternalConfirmationRenderer_default,
3250
+ FormRenderer_default,
3251
+ FormSectionRenderer_default,
3252
+ HeadingRenderer_default,
3253
+ ImageRenderer_default,
3254
+ InstructionsRenderer_default,
3255
+ IntegerInputRenderer_default,
3256
+ LargeUploadRenderer,
3257
+ ListRenderer_default,
3258
+ LoadingIndicatorRenderer_default,
3259
+ MarkdownRenderer_default,
3260
+ ModalRenderer_default,
3261
+ MultiSelectInputRenderer_default,
3262
+ MultiUploadInputRenderer_default,
3263
+ NumberInputRenderer_default,
3264
+ ParagraphRenderer_default,
3265
+ RepeatableRenderer_default,
3266
+ ReviewRenderer_default,
3267
+ SearchRenderer_default,
3268
+ SelectInputRenderer_default,
3269
+ SectionRenderer_default,
3270
+ StatusListRenderer_default,
3271
+ TabsRenderer,
3272
+ TextInputRenderer_default,
3273
+ UploadInputRenderer,
3274
+ SplashStepRenderer,
3275
+ SplashCelebrationStepRenderer,
3276
+ StepRenderer
3277
+ ];
3278
+
3279
+ // ../renderers/src/ModalContentRenderer.tsx
3280
+ import { Modal as Modal4 } from "@transferwise/components";
3281
+ import { jsx as jsx61 } from "react/jsx-runtime";
3282
+ var ModalContentRenderer = {
3283
+ canRenderType: "modal-content",
3284
+ render: ({ title, children, open, onClose }) => {
3285
+ return /* @__PURE__ */ jsx61(Modal4, { open, title, body: children, onClose });
3286
+ }
3287
+ };
3288
+
3289
+ // src/dynamicFlow/telemetry/app-version.ts
3290
+ var appVersion = (
3291
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
3292
+ typeof process !== "undefined" ? "4.16.0" : "0.0.0"
3293
+ );
3294
+
3295
+ // src/dynamicFlow/telemetry/getLogEvent.ts
3296
+ var getLogEvent = (onLog) => (level, message, extra) => {
3297
+ const extraWithVersion = __spreadProps(__spreadValues({}, extra), {
3298
+ dfWiseVersion: appVersion
3299
+ });
3300
+ if (level !== "info" && onLog) {
3301
+ if (onLog) {
3302
+ onLog(level, message, extraWithVersion);
3303
+ } else {
3304
+ logToRollbar(level, message, extraWithVersion);
3305
+ }
3306
+ }
3307
+ };
3308
+ var logToRollbar = (level, message, extra) => {
3309
+ try {
3310
+ const rollbar = typeof window.Rollbar !== "undefined" ? window.Rollbar : void 0;
3311
+ rollbar == null ? void 0 : rollbar[level](message, extra);
3312
+ } catch (error) {
3313
+ console.error("Failed to log to Rollbar", error);
3314
+ }
3315
+ };
3316
+
3286
3317
  // src/dynamicFlow/telemetry/getTrackEvent.ts
3287
3318
  import { isThemeModern } from "@wise/components-theming";
3288
3319
  var getTrackEvent = (onEvent, onAnalytics, onThemeChange) => (name, properties) => {
@@ -3317,7 +3348,10 @@ function DynamicFlowRevamp(props) {
3317
3348
  onThemeChange
3318
3349
  } = props;
3319
3350
  const httpClient = useWiseHttpClient(customFetch);
3320
- const mergedRenderers = useMemo2(() => [...renderers != null ? renderers : [], ...wiseRenderers], [renderers]);
3351
+ const mergedRenderers = useMemo2(
3352
+ () => [ModalContentRenderer, ...renderers != null ? renderers : [], ...wiseRenderers],
3353
+ [renderers]
3354
+ );
3321
3355
  const logEvent = useMemo2(() => getLogEvent(onLog), [onLog]);
3322
3356
  const trackEvent = useMemo2(
3323
3357
  () => getTrackEvent(onEvent, onAnalytics, onThemeChange),
@@ -3344,7 +3378,10 @@ var DynamicForm = forwardRef(function DynamicForm2(props, ref) {
3344
3378
  onThemeChange
3345
3379
  } = props;
3346
3380
  const httpClient = useWiseHttpClient(customFetch);
3347
- const mergedRenderers = useMemo2(() => [...renderers != null ? renderers : [], ...wiseRenderers], [renderers]);
3381
+ const mergedRenderers = useMemo2(
3382
+ () => [ModalContentRenderer, ...renderers != null ? renderers : [], ...wiseRenderers],
3383
+ [renderers]
3384
+ );
3348
3385
  const logEvent = useMemo2(() => getLogEvent(onLog), [onLog]);
3349
3386
  const trackEvent = useMemo2(
3350
3387
  () => getTrackEvent(onEvent, onAnalytics, onThemeChange),