@wise/dynamic-flow-client-internal 5.6.2 → 5.8.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.
Files changed (48) hide show
  1. package/build/main.css +24 -0
  2. package/build/main.js +1239 -1048
  3. package/build/main.mjs +1080 -883
  4. package/build/types/dynamicFlow/DynamicFlow.d.ts +1 -0
  5. package/build/types/dynamicFlow/DynamicFlow.d.ts.map +1 -0
  6. package/build/types/dynamicFlow/DynamicFlowModal.d.ts +1 -0
  7. package/build/types/dynamicFlow/DynamicFlowModal.d.ts.map +1 -0
  8. package/build/types/dynamicFlow/DynamicFlowWiseProps.d.ts +1 -0
  9. package/build/types/dynamicFlow/DynamicFlowWiseProps.d.ts.map +1 -0
  10. package/build/types/dynamicFlow/DynamicFlowWithRef.d.ts +1 -0
  11. package/build/types/dynamicFlow/DynamicFlowWithRef.d.ts.map +1 -0
  12. package/build/types/dynamicFlow/getMergedRenderers.d.ts +1 -0
  13. package/build/types/dynamicFlow/getMergedRenderers.d.ts.map +1 -0
  14. package/build/types/dynamicFlow/messages.d.ts +1 -0
  15. package/build/types/dynamicFlow/messages.d.ts.map +1 -0
  16. package/build/types/dynamicFlow/renderers.d.ts +2 -1
  17. package/build/types/dynamicFlow/renderers.d.ts.map +1 -0
  18. package/build/types/dynamicFlow/telemetry/app-version.d.ts +1 -0
  19. package/build/types/dynamicFlow/telemetry/app-version.d.ts.map +1 -0
  20. package/build/types/dynamicFlow/telemetry/getLogEvent.d.ts +1 -0
  21. package/build/types/dynamicFlow/telemetry/getLogEvent.d.ts.map +1 -0
  22. package/build/types/dynamicFlow/telemetry/getTrackEvent.d.ts +1 -0
  23. package/build/types/dynamicFlow/telemetry/getTrackEvent.d.ts.map +1 -0
  24. package/build/types/dynamicFlow/telemetry/index.d.ts +1 -0
  25. package/build/types/dynamicFlow/telemetry/index.d.ts.map +1 -0
  26. package/build/types/dynamicFlow/useOnCopy.d.ts +1 -0
  27. package/build/types/dynamicFlow/useOnCopy.d.ts.map +1 -0
  28. package/build/types/dynamicFlow/useWiseHttpClient.d.ts +1 -0
  29. package/build/types/dynamicFlow/useWiseHttpClient.d.ts.map +1 -0
  30. package/build/types/dynamicFlow/useWiseToCoreProps.d.ts +1 -0
  31. package/build/types/dynamicFlow/useWiseToCoreProps.d.ts.map +1 -0
  32. package/build/types/i18n/index.d.ts +1 -0
  33. package/build/types/i18n/index.d.ts.map +1 -0
  34. package/build/types/index.d.ts +1 -0
  35. package/build/types/index.d.ts.map +1 -0
  36. package/build/types/stories/utils/fixtureHttpClient.d.ts +1 -0
  37. package/build/types/stories/utils/fixtureHttpClient.d.ts.map +1 -0
  38. package/build/types/test-utils/NeptuneProviders.d.ts +1 -0
  39. package/build/types/test-utils/NeptuneProviders.d.ts.map +1 -0
  40. package/build/types/test-utils/index.d.ts +1 -0
  41. package/build/types/test-utils/index.d.ts.map +1 -0
  42. package/build/types/test-utils/respond-with.d.ts +1 -0
  43. package/build/types/test-utils/respond-with.d.ts.map +1 -0
  44. package/build/types/test-utils/rtl-utils.d.ts +1 -0
  45. package/build/types/test-utils/rtl-utils.d.ts.map +1 -0
  46. package/build/types/test-utils/wait.d.ts +1 -0
  47. package/build/types/test-utils/wait.d.ts.map +1 -0
  48. package/package.json +18 -18
package/build/main.mjs CHANGED
@@ -126,7 +126,7 @@ import { useMemo as useMemo2 } from "react";
126
126
  // src/dynamicFlow/telemetry/app-version.ts
127
127
  var appVersion = (
128
128
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
129
- typeof process !== "undefined" ? "5.6.2" : "0.0.0"
129
+ typeof process !== "undefined" ? "5.8.0" : "0.0.0"
130
130
  );
131
131
 
132
132
  // src/dynamicFlow/telemetry/getLogEvent.ts
@@ -675,7 +675,10 @@ function ButtonComponent(props) {
675
675
  const buttonProps = {
676
676
  v2: true,
677
677
  block: control !== "small",
678
- className: (0, import_classnames2.default)(getMargin(margin), { "d-block": control === "small" }),
678
+ className: (0, import_classnames2.default)(getMargin(margin), "df-button", {
679
+ small: control === "small",
680
+ "align-center": tags == null ? void 0 : tags.includes("align-center")
681
+ }),
679
682
  addonStart: control === "small" && media ? getAddonStartMedia(media) : void 0,
680
683
  disabled,
681
684
  priority: getPriority(control, tags),
@@ -1032,9 +1035,258 @@ var DateInputRenderer = {
1032
1035
  };
1033
1036
  var DateInputRenderer_default = DateInputRenderer;
1034
1037
 
1038
+ // ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
1039
+ import { ListItem as ListItem5 } from "@transferwise/components";
1040
+
1041
+ // ../renderers/src/utils/listItem/getAdditionalInfo.tsx
1042
+ import { ListItem as ListItem4 } from "@transferwise/components";
1043
+ import { jsx as jsx26 } from "react/jsx-runtime";
1044
+ var getAdditionalInfo = (additionalInfo) => {
1045
+ if (!additionalInfo) {
1046
+ return void 0;
1047
+ }
1048
+ const { href, text, onClick } = additionalInfo;
1049
+ if (href || onClick) {
1050
+ return /* @__PURE__ */ jsx26(
1051
+ ListItem4.AdditionalInfo,
1052
+ {
1053
+ action: {
1054
+ label: text,
1055
+ href,
1056
+ onClick,
1057
+ target: "_blank"
1058
+ }
1059
+ }
1060
+ );
1061
+ }
1062
+ return /* @__PURE__ */ jsx26(ListItem4.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
1063
+ };
1064
+
1065
+ // ../renderers/src/utils/listItem/shouldUseAvatar.ts
1066
+ var shouldUseAvatar = (control, tags) => {
1067
+ var _a;
1068
+ return control === "with-avatar" || ((_a = tags == null ? void 0 : tags.includes("with-avatar")) != null ? _a : false);
1069
+ };
1070
+
1071
+ // ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
1072
+ import { Header as Header2, SearchInput } from "@transferwise/components";
1073
+ import { useState as useState3 } from "react";
1074
+ import { useIntl as useIntl4 } from "react-intl";
1075
+
1076
+ // ../renderers/src/messages/filter.messages.ts
1077
+ import { defineMessages as defineMessages3 } from "react-intl";
1078
+ var filter_messages_default = defineMessages3({
1079
+ placeholder: {
1080
+ id: "df.wise.filter.placeholder",
1081
+ defaultMessage: "Start typing to search",
1082
+ description: "Placeholder for the filter input"
1083
+ },
1084
+ results: {
1085
+ id: "df.wise.filter.results",
1086
+ defaultMessage: "Search results",
1087
+ description: "Label for the results section"
1088
+ },
1089
+ noResults: {
1090
+ id: "df.wise.filter.noResults",
1091
+ defaultMessage: "No results",
1092
+ description: "Message for if there are no results"
1093
+ }
1094
+ });
1095
+
1096
+ // ../renderers/src/DecisionRenderer/filter-and-sort-decision-options.ts
1097
+ function filterAndSortDecisionOptions(selectOptions, query) {
1098
+ const upperQuery = normalizeAndRemoveAccents(query);
1099
+ const filteredItems = selectOptions.filter((option) => {
1100
+ var _a, _b, _c, _d;
1101
+ const searchableWords = [
1102
+ option.title,
1103
+ option.description,
1104
+ option.additionalText,
1105
+ (_a = option.supportingValues) == null ? void 0 : _a.value,
1106
+ (_b = option.supportingValues) == null ? void 0 : _b.subvalue,
1107
+ ...(_c = option.keywords) != null ? _c : []
1108
+ ];
1109
+ return (_d = searchableWords.some(
1110
+ (word) => word && normalizeAndRemoveAccents(word).includes(upperQuery)
1111
+ )) != null ? _d : false;
1112
+ });
1113
+ return [...filteredItems].sort((a, b) => {
1114
+ if (a.disabled && !b.disabled) {
1115
+ return 1;
1116
+ }
1117
+ if (!a.disabled && b.disabled) {
1118
+ return -1;
1119
+ }
1120
+ const aTitleUpper = a.title.toUpperCase();
1121
+ const bTitleUpper = b.title.toUpperCase();
1122
+ const aTitleStarts = aTitleUpper.startsWith(upperQuery);
1123
+ const bTitleStarts = bTitleUpper.startsWith(upperQuery);
1124
+ if (aTitleStarts && !bTitleStarts) {
1125
+ return -1;
1126
+ }
1127
+ if (!aTitleStarts && bTitleStarts) {
1128
+ return 1;
1129
+ }
1130
+ const aWordStarts = aTitleUpper.split(" ").some((word) => word.startsWith(upperQuery));
1131
+ const bWordStarts = bTitleUpper.split(" ").some((word) => word.startsWith(upperQuery));
1132
+ if (aWordStarts && !bWordStarts) {
1133
+ return -1;
1134
+ }
1135
+ if (!aWordStarts && bWordStarts) {
1136
+ return 1;
1137
+ }
1138
+ return a.title.localeCompare(b.title);
1139
+ });
1140
+ }
1141
+ var normalizeAndRemoveAccents = (text) => text.trim().toLowerCase().normalize("NFKD").replace(new RegExp("\\p{Diacritic}", "gu"), "");
1142
+
1143
+ // ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
1144
+ import { Header, Section } from "@transferwise/components";
1145
+ import { useIntl as useIntl3 } from "react-intl";
1146
+
1147
+ // ../renderers/src/messages/group.messages.ts
1148
+ import { defineMessages as defineMessages4 } from "react-intl";
1149
+ var group_messages_default = defineMessages4({
1150
+ all: {
1151
+ id: "df.wise.group.all",
1152
+ defaultMessage: "All",
1153
+ description: "Label for the group of options that encompasses all options"
1154
+ },
1155
+ popular: {
1156
+ id: "df.wise.group.popular",
1157
+ defaultMessage: "Popular",
1158
+ description: "Label for the group of options that are tagged as popular"
1159
+ },
1160
+ recent: {
1161
+ id: "df.wise.group.recent",
1162
+ defaultMessage: "Recent",
1163
+ description: "Label for the group of options that are tagged as recent"
1164
+ },
1165
+ "currencies-with-account-details": {
1166
+ id: "df.wise.group.currencies-with-account-details",
1167
+ defaultMessage: "Currencies with account details",
1168
+ description: "Label for the group of options that are tagged as currencies with account details"
1169
+ }
1170
+ });
1171
+
1172
+ // ../renderers/src/utils/grouping-utils.ts
1173
+ var getGroupsFromTags = (knownTags, items) => {
1174
+ return knownTags.map((tag) => {
1175
+ return { tag, items: items.filter((item) => {
1176
+ var _a;
1177
+ return (_a = item.tags) == null ? void 0 : _a.includes(tag);
1178
+ }) };
1179
+ }).filter((group) => group.items.length > 0);
1180
+ };
1181
+
1182
+ // ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
1183
+ import { Fragment, jsx as jsx27, jsxs as jsxs4 } from "react/jsx-runtime";
1184
+ var groupingTags = Object.keys(group_messages_default).filter((key) => key !== "all");
1185
+ var isGroupedDecision = (options) => {
1186
+ return getGroupsFromTags(groupingTags, options).length > 0;
1187
+ };
1188
+ var GroupedDecisionList = (_a) => {
1189
+ var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
1190
+ const { formatMessage } = useIntl3();
1191
+ const { options } = rest;
1192
+ const itemsByTag = [...getGroupsFromTags(groupingTags, options), { tag: "all", items: options }];
1193
+ return /* @__PURE__ */ jsx27(Fragment, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ jsxs4(Section, { children: [
1194
+ /* @__PURE__ */ jsx27(
1195
+ Header,
1196
+ {
1197
+ as: "h2",
1198
+ title: tag in group_messages_default ? formatMessage(group_messages_default[tag]) : tag
1199
+ }
1200
+ ),
1201
+ renderDecisionList2(__spreadProps(__spreadValues({}, rest), { options: items }))
1202
+ ] }, tag)) });
1203
+ };
1204
+
1205
+ // ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
1206
+ import { Fragment as Fragment2, jsx as jsx28, jsxs as jsxs5 } from "react/jsx-runtime";
1207
+ var DecisionWrapper = (props) => {
1208
+ return /* @__PURE__ */ jsxs5("div", { className: getMargin(props.margin), children: [
1209
+ props.title && /* @__PURE__ */ jsx28(Header2, { as: "h2", title: props.title }),
1210
+ props.control === "filtered" ? /* @__PURE__ */ jsx28(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsx28(UnfilteredDecisionList, __spreadValues({}, props))
1211
+ ] });
1212
+ };
1213
+ var UnfilteredDecisionList = (_a) => {
1214
+ var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
1215
+ return isGroupedDecision(rest.options) ? /* @__PURE__ */ jsx28(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList2 })) : renderDecisionList2(rest);
1216
+ };
1217
+ var FilteredDecisionList = (props) => {
1218
+ const { formatMessage } = useIntl4();
1219
+ const [query, setQuery] = useState3("");
1220
+ const { control, options, renderDecisionList: renderDecisionList2 } = props;
1221
+ const filteredOptions = (query == null ? void 0 : query.length) > 0 ? filterAndSortDecisionOptions(options, query) : options;
1222
+ const isGrouped = isGroupedDecision(options);
1223
+ return /* @__PURE__ */ jsxs5(Fragment2, { children: [
1224
+ /* @__PURE__ */ jsx28(
1225
+ SearchInput,
1226
+ {
1227
+ placeholder: formatMessage(filter_messages_default.placeholder),
1228
+ value: query,
1229
+ className: "m-b-2",
1230
+ onChange: (e) => {
1231
+ var _a;
1232
+ return setQuery((_a = e.target.value) != null ? _a : "");
1233
+ }
1234
+ }
1235
+ ),
1236
+ isGrouped && query.length === 0 ? /* @__PURE__ */ jsx28(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsxs5(Fragment2, { children: [
1237
+ query.length > 0 && /* @__PURE__ */ jsx28(Header2, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
1238
+ filteredOptions.length > 0 ? renderDecisionList2({
1239
+ control,
1240
+ className: query.length === 0 ? "m-t-3" : "",
1241
+ options: filteredOptions
1242
+ }) : /* @__PURE__ */ jsx28("p", { children: formatMessage(filter_messages_default.noResults) })
1243
+ ] })
1244
+ ] });
1245
+ };
1246
+
1247
+ // ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
1248
+ import { Fragment as Fragment3, jsx as jsx29 } from "react/jsx-runtime";
1249
+ var DecisionRenderer = {
1250
+ canRenderType: "decision",
1251
+ render: (props) => /* @__PURE__ */ jsx29(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }))
1252
+ };
1253
+ var renderDecisionList = ({ options, control }) => {
1254
+ return /* @__PURE__ */ jsx29(Fragment3, { children: options.map((_a) => {
1255
+ var _b = _a, { onClick } = _b, rest = __objRest(_b, ["onClick"]);
1256
+ const {
1257
+ description,
1258
+ disabled,
1259
+ media,
1260
+ title: itemTitle,
1261
+ href,
1262
+ additionalText,
1263
+ inlineAlert,
1264
+ supportingValues,
1265
+ tags
1266
+ } = rest;
1267
+ return /* @__PURE__ */ jsx29(
1268
+ ListItem5,
1269
+ {
1270
+ title: itemTitle,
1271
+ subtitle: description,
1272
+ spotlight: control === "spotlight" ? (tags == null ? void 0 : tags.includes("spotlight-active")) ? "active" : "inactive" : void 0,
1273
+ disabled,
1274
+ valueTitle: supportingValues == null ? void 0 : supportingValues.value,
1275
+ valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
1276
+ media: getMedia(media, shouldUseAvatar(control, tags)),
1277
+ prompt: getInlineAlert(inlineAlert),
1278
+ additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
1279
+ control: href ? /* @__PURE__ */ jsx29(ListItem5.Navigation, { href, target: "_blank" }) : /* @__PURE__ */ jsx29(ListItem5.Navigation, { onClick })
1280
+ },
1281
+ JSON.stringify(rest)
1282
+ );
1283
+ }) });
1284
+ };
1285
+ var DecisionRenderer_default = DecisionRenderer;
1286
+
1035
1287
  // ../renderers/src/DividerRenderer.tsx
1036
1288
  import { Divider } from "@transferwise/components";
1037
- import { jsx as jsx26 } from "react/jsx-runtime";
1289
+ import { jsx as jsx30 } from "react/jsx-runtime";
1038
1290
  var mapControlToLevel = (control) => {
1039
1291
  switch (control) {
1040
1292
  case "section":
@@ -1047,7 +1299,7 @@ var mapControlToLevel = (control) => {
1047
1299
  };
1048
1300
  var DividerRenderer = {
1049
1301
  canRenderType: "divider",
1050
- render: ({ margin, control }) => /* @__PURE__ */ jsx26(Divider, { className: `m-t-0 d-block ${getMargin(margin)}`, level: mapControlToLevel(control) })
1302
+ render: ({ margin, control }) => /* @__PURE__ */ jsx30(Divider, { className: `m-t-0 d-block ${getMargin(margin)}`, level: mapControlToLevel(control) })
1051
1303
  };
1052
1304
  var DividerRenderer_default = DividerRenderer;
1053
1305
 
@@ -1055,8 +1307,8 @@ var DividerRenderer_default = DividerRenderer;
1055
1307
  import { Button as Button3, Markdown as Markdown2, Modal } from "@transferwise/components";
1056
1308
 
1057
1309
  // ../renderers/src/messages/external-confirmation.messages.ts
1058
- import { defineMessages as defineMessages3 } from "react-intl";
1059
- var external_confirmation_messages_default = defineMessages3({
1310
+ import { defineMessages as defineMessages5 } from "react-intl";
1311
+ var external_confirmation_messages_default = defineMessages5({
1060
1312
  title: {
1061
1313
  id: "df.wise.ExternalConfirmation.title",
1062
1314
  defaultMessage: "Please confirm",
@@ -1080,9 +1332,9 @@ var external_confirmation_messages_default = defineMessages3({
1080
1332
  });
1081
1333
 
1082
1334
  // ../renderers/src/ExternalConfirmationRenderer.tsx
1083
- import { useIntl as useIntl3 } from "react-intl";
1335
+ import { useIntl as useIntl5 } from "react-intl";
1084
1336
  import { useEffect as useEffect3 } from "react";
1085
- import { Fragment, jsx as jsx27, jsxs as jsxs4 } from "react/jsx-runtime";
1337
+ import { Fragment as Fragment4, jsx as jsx31, jsxs as jsxs6 } from "react/jsx-runtime";
1086
1338
  var ExternalConfirmationRenderer = {
1087
1339
  canRenderType: "external-confirmation",
1088
1340
  render: ExternalConfirmationRendererComponent
@@ -1094,7 +1346,7 @@ function ExternalConfirmationRendererComponent({
1094
1346
  onFailure,
1095
1347
  onCancel
1096
1348
  }) {
1097
- const { formatMessage } = useIntl3();
1349
+ const { formatMessage } = useIntl5();
1098
1350
  useEffect3(() => {
1099
1351
  if (url) {
1100
1352
  const w = window.open(url, "_blank");
@@ -1105,15 +1357,15 @@ function ExternalConfirmationRendererComponent({
1105
1357
  }
1106
1358
  }
1107
1359
  }, []);
1108
- return /* @__PURE__ */ jsx27(
1360
+ return /* @__PURE__ */ jsx31(
1109
1361
  Modal,
1110
1362
  {
1111
1363
  open: status === "failure",
1112
1364
  title: formatMessage(external_confirmation_messages_default.title),
1113
- body: /* @__PURE__ */ jsxs4(Fragment, { children: [
1114
- /* @__PURE__ */ jsx27(Markdown2, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
1115
- /* @__PURE__ */ jsx27("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs4("div", { className: "df-box-renderer-width-lg", children: [
1116
- /* @__PURE__ */ jsx27(
1365
+ body: /* @__PURE__ */ jsxs6(Fragment4, { children: [
1366
+ /* @__PURE__ */ jsx31(Markdown2, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
1367
+ /* @__PURE__ */ jsx31("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs6("div", { className: "df-box-renderer-width-lg", children: [
1368
+ /* @__PURE__ */ jsx31(
1117
1369
  Button3,
1118
1370
  {
1119
1371
  v2: true,
@@ -1128,7 +1380,7 @@ function ExternalConfirmationRendererComponent({
1128
1380
  children: formatMessage(external_confirmation_messages_default.open)
1129
1381
  }
1130
1382
  ),
1131
- /* @__PURE__ */ jsx27(Button3, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
1383
+ /* @__PURE__ */ jsx31(Button3, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
1132
1384
  ] }) })
1133
1385
  ] }),
1134
1386
  onClose: onCancel
@@ -1145,27 +1397,27 @@ function getOrigin(url) {
1145
1397
  var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
1146
1398
 
1147
1399
  // ../renderers/src/FormRenderer.tsx
1148
- import { jsx as jsx28 } from "react/jsx-runtime";
1400
+ import { jsx as jsx32 } from "react/jsx-runtime";
1149
1401
  var FormRenderer = {
1150
1402
  canRenderType: "form",
1151
- render: ({ children, margin }) => /* @__PURE__ */ jsx28("div", { className: getMargin(margin), children })
1403
+ render: ({ children, margin }) => /* @__PURE__ */ jsx32("div", { className: getMargin(margin), children })
1152
1404
  };
1153
1405
  var FormRenderer_default = FormRenderer;
1154
1406
 
1155
1407
  // ../renderers/src/FormSectionRenderer.tsx
1156
- import { Header } from "@transferwise/components";
1157
- import { jsx as jsx29, jsxs as jsxs5 } from "react/jsx-runtime";
1408
+ import { Header as Header3 } from "@transferwise/components";
1409
+ import { jsx as jsx33, jsxs as jsxs7 } from "react/jsx-runtime";
1158
1410
  var FormSectionRenderer = {
1159
1411
  canRenderType: "form-section",
1160
- render: ({ title, description, children }) => /* @__PURE__ */ jsxs5("fieldset", { children: [
1161
- title && /* @__PURE__ */ jsx29(
1162
- Header,
1412
+ render: ({ title, description, children }) => /* @__PURE__ */ jsxs7("fieldset", { children: [
1413
+ title && /* @__PURE__ */ jsx33(
1414
+ Header3,
1163
1415
  {
1164
1416
  as: "h2",
1165
1417
  title
1166
1418
  }
1167
1419
  ),
1168
- description && /* @__PURE__ */ jsx29("p", { children: description }),
1420
+ description && /* @__PURE__ */ jsx33("p", { children: description }),
1169
1421
  children
1170
1422
  ] })
1171
1423
  };
@@ -1173,18 +1425,18 @@ var FormSectionRenderer_default = FormSectionRenderer;
1173
1425
 
1174
1426
  // ../renderers/src/HeadingRenderer.tsx
1175
1427
  import { Display, Title } from "@transferwise/components";
1176
- import { jsx as jsx30 } from "react/jsx-runtime";
1428
+ import { jsx as jsx34 } from "react/jsx-runtime";
1177
1429
  var HeadingRenderer = {
1178
1430
  canRenderType: "heading",
1179
- render: (props) => /* @__PURE__ */ jsx30(Heading, __spreadValues({}, props))
1431
+ render: (props) => /* @__PURE__ */ jsx34(Heading, __spreadValues({}, props))
1180
1432
  };
1181
1433
  function Heading(props) {
1182
1434
  const { text, size, align, margin, control } = props;
1183
1435
  const className = getTextAlignmentAndMargin({ align, margin });
1184
- return control === "display" ? /* @__PURE__ */ jsx30(DisplayHeading, { size, text, className }) : /* @__PURE__ */ jsx30(StandardHeading, { size, text, className });
1436
+ return control === "display" ? /* @__PURE__ */ jsx34(DisplayHeading, { size, text, className }) : /* @__PURE__ */ jsx34(StandardHeading, { size, text, className });
1185
1437
  }
1186
1438
  function DisplayHeading({ size, text, className }) {
1187
- return /* @__PURE__ */ jsx30(Display, { type: getDisplayType(size), className, children: text });
1439
+ return /* @__PURE__ */ jsx34(Display, { type: getDisplayType(size), className, children: text });
1188
1440
  }
1189
1441
  var getDisplayType = (size) => {
1190
1442
  switch (size) {
@@ -1200,7 +1452,7 @@ var getDisplayType = (size) => {
1200
1452
  }
1201
1453
  };
1202
1454
  function StandardHeading({ size, text, className }) {
1203
- return /* @__PURE__ */ jsx30(Title, { type: getTitleTypeBySize(size), className, children: text });
1455
+ return /* @__PURE__ */ jsx34(Title, { type: getTitleTypeBySize(size), className, children: text });
1204
1456
  }
1205
1457
  var getTitleTypeBySize = (size) => {
1206
1458
  var _a;
@@ -1217,7 +1469,7 @@ var HeadingRenderer_default = HeadingRenderer;
1217
1469
 
1218
1470
  // ../renderers/src/ImageRenderer/UrlImage.tsx
1219
1471
  import { Image } from "@transferwise/components";
1220
- import { useEffect as useEffect4, useState as useState3 } from "react";
1472
+ import { useEffect as useEffect4, useState as useState4 } from "react";
1221
1473
 
1222
1474
  // ../renderers/src/utils/api-utils.ts
1223
1475
  function isRelativePath(url = "") {
@@ -1227,7 +1479,7 @@ function isRelativePath(url = "") {
1227
1479
  }
1228
1480
 
1229
1481
  // ../renderers/src/ImageRenderer/UrlImage.tsx
1230
- import { jsx as jsx31 } from "react/jsx-runtime";
1482
+ import { jsx as jsx35 } from "react/jsx-runtime";
1231
1483
  function UrlImage({
1232
1484
  accessibilityDescription,
1233
1485
  align,
@@ -1236,13 +1488,13 @@ function UrlImage({
1236
1488
  uri,
1237
1489
  httpClient
1238
1490
  }) {
1239
- const [imageSource, setImageSource] = useState3("");
1491
+ const [imageSource, setImageSource] = useState4("");
1240
1492
  useEffect4(() => {
1241
1493
  if (!uri.startsWith("urn:")) {
1242
1494
  void getImageSource(httpClient, uri).then(setImageSource);
1243
1495
  }
1244
1496
  }, [uri, httpClient]);
1245
- return /* @__PURE__ */ jsx31("div", { className: `df-image ${align} ${size || "md"}`, children: /* @__PURE__ */ jsx31(
1497
+ return /* @__PURE__ */ jsx35("div", { className: `df-image ${align} ${size || "md"}`, children: /* @__PURE__ */ jsx35(
1246
1498
  Image,
1247
1499
  {
1248
1500
  className: `img-responsive ${getMargin(margin)}`,
@@ -1286,7 +1538,7 @@ var getImageSource = async (httpClient, imageUrl) => {
1286
1538
  };
1287
1539
 
1288
1540
  // ../renderers/src/ImageRenderer/UrnFlagImage.tsx
1289
- import { jsx as jsx32 } from "react/jsx-runtime";
1541
+ import { jsx as jsx36 } from "react/jsx-runtime";
1290
1542
  var maxFlagSize = 600;
1291
1543
  function UrnFlagImage({
1292
1544
  accessibilityDescription,
@@ -1295,7 +1547,7 @@ function UrnFlagImage({
1295
1547
  size,
1296
1548
  uri
1297
1549
  }) {
1298
- return /* @__PURE__ */ jsx32("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx32(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
1550
+ return /* @__PURE__ */ jsx36("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx36(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
1299
1551
  }
1300
1552
 
1301
1553
  // ../renderers/src/ImageRenderer/UrnIllustration.tsx
@@ -1303,7 +1555,7 @@ import {
1303
1555
  Illustration,
1304
1556
  isIllustrationSupport3D
1305
1557
  } from "@wise/art";
1306
- import { useState as useState4 } from "react";
1558
+ import { useState as useState5 } from "react";
1307
1559
 
1308
1560
  // ../renderers/src/ImageRenderer/isAnimated.ts
1309
1561
  var isAnimated = (uri) => {
@@ -1314,7 +1566,7 @@ var isAnimated = (uri) => {
1314
1566
  // ../renderers/src/ImageRenderer/SafeIllustration3D.tsx
1315
1567
  import { Illustration3D } from "@wise/art";
1316
1568
  import { Component } from "react";
1317
- import { jsx as jsx33 } from "react/jsx-runtime";
1569
+ import { jsx as jsx37 } from "react/jsx-runtime";
1318
1570
  var Illustration3DErrorBoundary = class extends Component {
1319
1571
  constructor(props) {
1320
1572
  super(props);
@@ -1338,12 +1590,12 @@ var SafeIllustration3D = ({
1338
1590
  size,
1339
1591
  onError
1340
1592
  }) => {
1341
- return /* @__PURE__ */ jsx33(Illustration3DErrorBoundary, { onError, children: /* @__PURE__ */ jsx33(Illustration3D, { name, size }) });
1593
+ return /* @__PURE__ */ jsx37(Illustration3DErrorBoundary, { onError, children: /* @__PURE__ */ jsx37(Illustration3D, { name, size }) });
1342
1594
  };
1343
1595
  var SafeIllustration3D_default = SafeIllustration3D;
1344
1596
 
1345
1597
  // ../renderers/src/ImageRenderer/UrnIllustration.tsx
1346
- import { jsx as jsx34 } from "react/jsx-runtime";
1598
+ import { jsx as jsx38 } from "react/jsx-runtime";
1347
1599
  var urnPrefix = "urn:wise:illustrations:";
1348
1600
  var isUrnIllustration = (uri) => uri.startsWith(urnPrefix);
1349
1601
  function UrnIllustration({
@@ -1353,12 +1605,12 @@ function UrnIllustration({
1353
1605
  size,
1354
1606
  uri
1355
1607
  }) {
1356
- const [has3DFailed, setHas3DFailed] = useState4(false);
1608
+ const [has3DFailed, setHas3DFailed] = useState5(false);
1357
1609
  const illustrationSize = getIllustrationSize(size);
1358
1610
  const illustrationName = getIllustrationName(uri);
1359
1611
  const illustration3DName = getIllustration3DName(uri);
1360
1612
  if (illustration3DName && isAnimated(uri) && !has3DFailed) {
1361
- return /* @__PURE__ */ jsx34("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx34(
1613
+ return /* @__PURE__ */ jsx38("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx38(
1362
1614
  SafeIllustration3D_default,
1363
1615
  {
1364
1616
  name: illustration3DName,
@@ -1367,7 +1619,7 @@ function UrnIllustration({
1367
1619
  }
1368
1620
  ) });
1369
1621
  }
1370
- return /* @__PURE__ */ jsx34("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx34(
1622
+ return /* @__PURE__ */ jsx38("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx38(
1371
1623
  Illustration,
1372
1624
  {
1373
1625
  className: "df-illustration",
@@ -1387,32 +1639,32 @@ var getIllustration3DName = (uri) => {
1387
1639
  };
1388
1640
 
1389
1641
  // ../renderers/src/ImageRenderer/UrnImage.tsx
1390
- import { jsx as jsx35 } from "react/jsx-runtime";
1642
+ import { jsx as jsx39 } from "react/jsx-runtime";
1391
1643
  var isUrnImage = (uri) => uri.startsWith("urn:");
1392
1644
  function UrnImage(props) {
1393
1645
  const { uri } = props;
1394
1646
  if (isUrnIllustration(uri)) {
1395
- return /* @__PURE__ */ jsx35(UrnIllustration, __spreadValues({}, props));
1647
+ return /* @__PURE__ */ jsx39(UrnIllustration, __spreadValues({}, props));
1396
1648
  }
1397
1649
  if (isUrnFlag(uri)) {
1398
- return /* @__PURE__ */ jsx35(UrnFlagImage, __spreadValues({}, props));
1650
+ return /* @__PURE__ */ jsx39(UrnFlagImage, __spreadValues({}, props));
1399
1651
  }
1400
1652
  return null;
1401
1653
  }
1402
1654
 
1403
1655
  // ../renderers/src/ImageRenderer/ImageRenderer.tsx
1404
- import { jsx as jsx36 } from "react/jsx-runtime";
1656
+ import { jsx as jsx40 } from "react/jsx-runtime";
1405
1657
  var ImageRenderer = {
1406
1658
  canRenderType: "image",
1407
- render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ jsx36(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ jsx36(UrlImage, __spreadValues({}, props))
1659
+ render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ jsx40(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ jsx40(UrlImage, __spreadValues({}, props))
1408
1660
  };
1409
1661
 
1410
1662
  // ../renderers/src/ImageRenderer/index.tsx
1411
1663
  var ImageRenderer_default = ImageRenderer;
1412
1664
 
1413
1665
  // ../renderers/src/InstructionsRenderer.tsx
1414
- import { Header as Header2, InstructionsList } from "@transferwise/components";
1415
- import { jsx as jsx37, jsxs as jsxs6 } from "react/jsx-runtime";
1666
+ import { Header as Header4, InstructionsList } from "@transferwise/components";
1667
+ import { jsx as jsx41, jsxs as jsxs8 } from "react/jsx-runtime";
1416
1668
  var doContext = ["positive", "neutral"];
1417
1669
  var dontContext = ["warning", "negative"];
1418
1670
  var InstructionsRenderer = {
@@ -1420,9 +1672,9 @@ var InstructionsRenderer = {
1420
1672
  render: ({ items, margin, title }) => {
1421
1673
  const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
1422
1674
  const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
1423
- return /* @__PURE__ */ jsxs6("div", { className: getMargin(margin), children: [
1424
- title ? /* @__PURE__ */ jsx37(Header2, { title }) : null,
1425
- /* @__PURE__ */ jsx37(InstructionsList, { dos, donts })
1675
+ return /* @__PURE__ */ jsxs8("div", { className: getMargin(margin), children: [
1676
+ title ? /* @__PURE__ */ jsx41(Header4, { title }) : null,
1677
+ /* @__PURE__ */ jsx41(InstructionsList, { dos, donts })
1426
1678
  ] });
1427
1679
  }
1428
1680
  };
@@ -1454,7 +1706,7 @@ function pick(obj, ...keys) {
1454
1706
  }
1455
1707
 
1456
1708
  // ../renderers/src/IntegerInputRenderer.tsx
1457
- import { jsx as jsx38 } from "react/jsx-runtime";
1709
+ import { jsx as jsx42 } from "react/jsx-runtime";
1458
1710
  var IntegerInputRenderer = {
1459
1711
  canRenderType: "input-integer",
1460
1712
  render: (props) => {
@@ -1469,7 +1721,7 @@ var IntegerInputRenderer = {
1469
1721
  "maximum",
1470
1722
  "minimum"
1471
1723
  );
1472
- return /* @__PURE__ */ jsx38(
1724
+ return /* @__PURE__ */ jsx42(
1473
1725
  FieldInput_default,
1474
1726
  {
1475
1727
  id,
@@ -1477,7 +1729,7 @@ var IntegerInputRenderer = {
1477
1729
  description,
1478
1730
  validation: validationState,
1479
1731
  help,
1480
- children: /* @__PURE__ */ jsx38(InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx38(
1732
+ children: /* @__PURE__ */ jsx42(InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx42(
1481
1733
  Input,
1482
1734
  __spreadValues({
1483
1735
  id,
@@ -1499,17 +1751,126 @@ var IntegerInputRenderer = {
1499
1751
  };
1500
1752
  var IntegerInputRenderer_default = IntegerInputRenderer;
1501
1753
 
1502
- // ../renderers/src/LoadingIndicatorRenderer.tsx
1503
- import { Loader } from "@transferwise/components";
1504
- import { jsx as jsx39 } from "react/jsx-runtime";
1505
- var LoadingIndicatorRenderer = {
1506
- canRenderType: "loading-indicator",
1507
- render: ({ margin, size }) => /* @__PURE__ */ jsx39(
1508
- Loader,
1509
- {
1510
- size,
1511
- classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin(margin)}` },
1512
- "data-testid": "loading-indicator"
1754
+ // ../renderers/src/ListRenderer.tsx
1755
+ import { ListItem as ListItem7 } from "@transferwise/components";
1756
+
1757
+ // ../renderers/src/utils/listItem/getCTAControl.tsx
1758
+ import { ListItem as ListItem6 } from "@transferwise/components";
1759
+ import { jsx as jsx43 } from "react/jsx-runtime";
1760
+ var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
1761
+ if (!callToAction) {
1762
+ return void 0;
1763
+ }
1764
+ const { accessibilityDescription, href, title, context, onClick } = callToAction;
1765
+ const { priority, sentiment } = getPriorityAndSentiment(ctaSecondary, context);
1766
+ if (href) {
1767
+ return /* @__PURE__ */ jsx43(
1768
+ ListItem6.Button,
1769
+ {
1770
+ href,
1771
+ partiallyInteractive: !fullyInteractive,
1772
+ priority,
1773
+ "aria-description": accessibilityDescription,
1774
+ sentiment,
1775
+ children: title
1776
+ }
1777
+ );
1778
+ }
1779
+ return /* @__PURE__ */ jsx43(
1780
+ ListItem6.Button,
1781
+ {
1782
+ "aria-description": accessibilityDescription,
1783
+ partiallyInteractive: !fullyInteractive,
1784
+ priority,
1785
+ sentiment,
1786
+ onClick,
1787
+ children: title
1788
+ }
1789
+ );
1790
+ };
1791
+ var getPriorityAndSentiment = (ctaSecondary, context) => {
1792
+ if (context === "negative") {
1793
+ return { priority: "secondary", sentiment: "negative" };
1794
+ }
1795
+ return { priority: ctaSecondary ? "secondary" : "secondary-neutral", sentiment: "default" };
1796
+ };
1797
+
1798
+ // ../renderers/src/components/Header.tsx
1799
+ import { Header as DSHeader } from "@transferwise/components";
1800
+ import { jsx as jsx44 } from "react/jsx-runtime";
1801
+ var Header5 = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ jsx44(DSHeader, { title: title != null ? title : "", action: getHeaderAction(callToAction) });
1802
+ var getHeaderAction = (callToAction) => {
1803
+ if (!callToAction) {
1804
+ return void 0;
1805
+ }
1806
+ const { accessibilityDescription, href, title, onClick } = callToAction;
1807
+ return href ? {
1808
+ "aria-label": accessibilityDescription,
1809
+ text: title,
1810
+ href,
1811
+ target: "_blank"
1812
+ } : {
1813
+ "aria-label": accessibilityDescription,
1814
+ text: title,
1815
+ onClick: (event) => {
1816
+ event.preventDefault();
1817
+ onClick();
1818
+ }
1819
+ };
1820
+ };
1821
+
1822
+ // ../renderers/src/ListRenderer.tsx
1823
+ import { jsx as jsx45, jsxs as jsxs9 } from "react/jsx-runtime";
1824
+ var ListRenderer = {
1825
+ canRenderType: "list",
1826
+ render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ jsxs9("div", { className: getMargin(margin), children: [
1827
+ /* @__PURE__ */ jsx45(Header5, { title, callToAction }),
1828
+ items.map((item) => {
1829
+ var _a, _b;
1830
+ const {
1831
+ title: itemTitle,
1832
+ description,
1833
+ supportingValues,
1834
+ media,
1835
+ additionalInfo,
1836
+ inlineAlert,
1837
+ callToAction: itemCallToAction,
1838
+ tags: itemTags
1839
+ } = item;
1840
+ const controlOptions = {
1841
+ ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
1842
+ fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
1843
+ };
1844
+ return /* @__PURE__ */ jsx45(
1845
+ ListItem7,
1846
+ {
1847
+ title: itemTitle,
1848
+ subtitle: description,
1849
+ valueTitle: supportingValues == null ? void 0 : supportingValues.value,
1850
+ valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
1851
+ media: getMedia(media, shouldUseAvatar(control, itemTags)),
1852
+ prompt: getInlineAlert(inlineAlert),
1853
+ additionalInfo: getAdditionalInfo(additionalInfo),
1854
+ control: getCTAControl(itemCallToAction, controlOptions)
1855
+ },
1856
+ itemTitle
1857
+ );
1858
+ })
1859
+ ] })
1860
+ };
1861
+ var ListRenderer_default = ListRenderer;
1862
+
1863
+ // ../renderers/src/LoadingIndicatorRenderer.tsx
1864
+ import { Loader } from "@transferwise/components";
1865
+ import { jsx as jsx46 } from "react/jsx-runtime";
1866
+ var LoadingIndicatorRenderer = {
1867
+ canRenderType: "loading-indicator",
1868
+ render: ({ margin, size }) => /* @__PURE__ */ jsx46(
1869
+ Loader,
1870
+ {
1871
+ size,
1872
+ classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin(margin)}` },
1873
+ "data-testid": "loading-indicator"
1513
1874
  }
1514
1875
  )
1515
1876
  };
@@ -1517,10 +1878,10 @@ var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
1517
1878
 
1518
1879
  // ../renderers/src/MarkdownRenderer.tsx
1519
1880
  import { Markdown as Markdown3 } from "@transferwise/components";
1520
- import { jsx as jsx40 } from "react/jsx-runtime";
1881
+ import { jsx as jsx47 } from "react/jsx-runtime";
1521
1882
  var MarkdownRenderer = {
1522
1883
  canRenderType: "markdown",
1523
- render: ({ content, align, margin, size }) => /* @__PURE__ */ jsx40("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ jsx40(
1884
+ render: ({ content, align, margin, size }) => /* @__PURE__ */ jsx47("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ jsx47(
1524
1885
  Markdown3,
1525
1886
  {
1526
1887
  className: ["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large",
@@ -1531,21 +1892,68 @@ var MarkdownRenderer = {
1531
1892
  };
1532
1893
  var MarkdownRenderer_default = MarkdownRenderer;
1533
1894
 
1895
+ // ../renderers/src/MediaRenderer.tsx
1896
+ import { jsx as jsx48 } from "react/jsx-runtime";
1897
+ var MediaRenderer = {
1898
+ canRenderType: "media",
1899
+ render: (_a) => {
1900
+ var _b = _a, { media } = _b, rest = __objRest(_b, ["media"]);
1901
+ switch (media.type) {
1902
+ case "avatar":
1903
+ return /* @__PURE__ */ jsx48(AvatarMediaRendererComponent, __spreadValues({ media }, rest));
1904
+ case "image":
1905
+ return /* @__PURE__ */ jsx48(ImageMediaRendererComponent, __spreadValues({ media }, rest));
1906
+ case "legacy":
1907
+ return null;
1908
+ }
1909
+ }
1910
+ };
1911
+ var AvatarMediaRendererComponent = ({
1912
+ media,
1913
+ align,
1914
+ margin,
1915
+ size
1916
+ }) => {
1917
+ return /* @__PURE__ */ jsx48("div", { className: `df-media-layout-avatar ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx48(Media, { media, size: mapAvatarMediaSize(size) }) });
1918
+ };
1919
+ var ImageMediaRendererComponent = (_a) => {
1920
+ var _b = _a, {
1921
+ media
1922
+ } = _b, rest = __objRest(_b, [
1923
+ "media"
1924
+ ]);
1925
+ return isUrnImage(media.uri) ? /* @__PURE__ */ jsx48(UrnImage, __spreadValues({ uri: media.uri, accessibilityDescription: media.accessibilityDescription }, rest)) : /* @__PURE__ */ jsx48(UrlImage, __spreadValues({ uri: media.uri, accessibilityDescription: media.accessibilityDescription }, rest));
1926
+ };
1927
+ var mapAvatarMediaSize = (size) => {
1928
+ switch (size) {
1929
+ case "xs":
1930
+ return 32;
1931
+ case "sm":
1932
+ return 40;
1933
+ case "md":
1934
+ return 48;
1935
+ case "lg":
1936
+ return 56;
1937
+ case "xl":
1938
+ return 72;
1939
+ }
1940
+ };
1941
+
1534
1942
  // ../renderers/src/ModalLayoutRenderer.tsx
1535
1943
  import { Button as Button4, Modal as Modal2 } from "@transferwise/components";
1536
- import { useState as useState5 } from "react";
1537
- import { jsx as jsx41, jsxs as jsxs7 } from "react/jsx-runtime";
1944
+ import { useState as useState6 } from "react";
1945
+ import { jsx as jsx49, jsxs as jsxs10 } from "react/jsx-runtime";
1538
1946
  var ModalLayoutRenderer = {
1539
1947
  canRenderType: "modal-layout",
1540
- render: (props) => /* @__PURE__ */ jsx41(DFModal, __spreadValues({}, props))
1948
+ render: (props) => /* @__PURE__ */ jsx49(DFModal, __spreadValues({}, props))
1541
1949
  };
1542
1950
  var ModalLayoutRenderer_default = ModalLayoutRenderer;
1543
1951
  function DFModal({ content, margin, trigger }) {
1544
- const [visible, setVisible] = useState5(false);
1952
+ const [visible, setVisible] = useState6(false);
1545
1953
  const { children, title } = content;
1546
- return /* @__PURE__ */ jsxs7("div", { className: getMargin(margin), children: [
1547
- /* @__PURE__ */ jsx41(Button4, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
1548
- /* @__PURE__ */ jsx41(
1954
+ return /* @__PURE__ */ jsxs10("div", { className: getMargin(margin), children: [
1955
+ /* @__PURE__ */ jsx49(Button4, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
1956
+ /* @__PURE__ */ jsx49(
1549
1957
  Modal2,
1550
1958
  {
1551
1959
  scroll: "content",
@@ -1561,59 +1969,20 @@ function DFModal({ content, margin, trigger }) {
1561
1969
 
1562
1970
  // ../renderers/src/ModalRenderer.tsx
1563
1971
  import { Modal as Modal3 } from "@transferwise/components";
1564
- import { jsx as jsx42 } from "react/jsx-runtime";
1972
+ import { jsx as jsx50 } from "react/jsx-runtime";
1565
1973
  var ModalRenderer = {
1566
1974
  canRenderType: "modal",
1567
1975
  render: ({ title, children, open, onClose }) => {
1568
- return /* @__PURE__ */ jsx42(Modal3, { open, title, body: children, onClose });
1976
+ return /* @__PURE__ */ jsx50(Modal3, { open, title, body: children, onClose });
1569
1977
  }
1570
1978
  };
1571
1979
 
1572
1980
  // ../renderers/src/MoneyInputRenderer.tsx
1573
1981
  import { MoneyInput } from "@transferwise/components";
1574
1982
  import { useEffect as useEffect5 } from "react";
1575
-
1576
- // ../renderers/src/utils/grouping-utils.ts
1577
- var getGroupsFromTags = (knownTags, items) => {
1578
- return knownTags.map((tag) => {
1579
- return { tag, items: items.filter((item) => {
1580
- var _a;
1581
- return (_a = item.tags) == null ? void 0 : _a.includes(tag);
1582
- }) };
1583
- }).filter((group) => group.items.length > 0);
1584
- };
1585
-
1586
- // ../renderers/src/MoneyInputRenderer.tsx
1587
- import { useIntl as useIntl4 } from "react-intl";
1588
-
1589
- // ../renderers/src/messages/group.messages.ts
1590
- import { defineMessages as defineMessages4 } from "react-intl";
1591
- var group_messages_default = defineMessages4({
1592
- all: {
1593
- id: "df.wise.group.all",
1594
- defaultMessage: "All",
1595
- description: "Label for the group of options that encompasses all options"
1596
- },
1597
- popular: {
1598
- id: "df.wise.group.popular",
1599
- defaultMessage: "Popular",
1600
- description: "Label for the group of options that are tagged as popular"
1601
- },
1602
- recent: {
1603
- id: "df.wise.group.recent",
1604
- defaultMessage: "Recent",
1605
- description: "Label for the group of options that are tagged as recent"
1606
- },
1607
- "currencies-with-account-details": {
1608
- id: "df.wise.group.currencies-with-account-details",
1609
- defaultMessage: "Currencies with account details",
1610
- description: "Label for the group of options that are tagged as currencies with account details"
1611
- }
1612
- });
1613
-
1614
- // ../renderers/src/MoneyInputRenderer.tsx
1615
- import { jsx as jsx43 } from "react/jsx-runtime";
1616
- var groupingTags = Object.keys(group_messages_default).filter((key) => key !== "all");
1983
+ import { useIntl as useIntl6 } from "react-intl";
1984
+ import { jsx as jsx51 } from "react/jsx-runtime";
1985
+ var groupingTags2 = Object.keys(group_messages_default).filter((key) => key !== "all");
1617
1986
  var MoneyInputRenderer = {
1618
1987
  canRenderType: "money-input",
1619
1988
  render: MoneyInputRendererComponent
@@ -1638,8 +2007,8 @@ function MoneyInputRendererComponent(props) {
1638
2007
  onCurrencyChange(0);
1639
2008
  }
1640
2009
  }, [selectedCurrencyIndex, onCurrencyChange, currencies.length]);
1641
- const { formatMessage } = useIntl4();
1642
- return /* @__PURE__ */ jsx43(
2010
+ const { formatMessage } = useIntl6();
2011
+ return /* @__PURE__ */ jsx51(
1643
2012
  FieldInput_default,
1644
2013
  {
1645
2014
  id: uid,
@@ -1647,7 +2016,7 @@ function MoneyInputRendererComponent(props) {
1647
2016
  description,
1648
2017
  validation: validationState,
1649
2018
  help,
1650
- children: /* @__PURE__ */ jsx43(
2019
+ children: /* @__PURE__ */ jsx51(
1651
2020
  MoneyInput,
1652
2021
  {
1653
2022
  amount: parseFloatOrNull(amountValue),
@@ -1676,7 +2045,7 @@ var parseFloatOrNull = (value) => {
1676
2045
  return Number.isNaN(parsed) ? null : parsed;
1677
2046
  };
1678
2047
  var mapCurrencies = (options, formatMessage) => {
1679
- const groupsFromTags = getGroupsFromTags(groupingTags, options);
2048
+ const groupsFromTags = getGroupsFromTags(groupingTags2, options);
1680
2049
  if (groupsFromTags.length > 0) {
1681
2050
  return [...groupsFromTags, { tag: "all", items: options }].flatMap(({ tag, items }) => {
1682
2051
  return [
@@ -1708,14 +2077,79 @@ function assertCurrencyCodeIsString(currencyCode) {
1708
2077
  }
1709
2078
  }
1710
2079
 
1711
- // ../renderers/src/MultiSelectInputRenderer.tsx
2080
+ // ../renderers/src/MultiSelectInputRenderer/InlineMultiSelectInputRendererComponent.tsx
2081
+ import { ListItem as ListItem8 } from "@transferwise/components";
2082
+ import { jsx as jsx52 } from "react/jsx-runtime";
2083
+ function InlineMultiSelectInputRendererComponent(props) {
2084
+ const {
2085
+ id,
2086
+ description,
2087
+ disabled,
2088
+ help,
2089
+ options,
2090
+ selectedIndices,
2091
+ title,
2092
+ validationState,
2093
+ onSelect
2094
+ } = props;
2095
+ return /* @__PURE__ */ jsx52(
2096
+ FieldInput_default,
2097
+ {
2098
+ id,
2099
+ label: title,
2100
+ help,
2101
+ description,
2102
+ validation: validationState,
2103
+ children: options.map((option, index) => {
2104
+ var _a;
2105
+ const {
2106
+ title: itemTitle,
2107
+ description: subtitle,
2108
+ disabled: optionDisabled,
2109
+ media,
2110
+ additionalText,
2111
+ inlineAlert,
2112
+ supportingValues,
2113
+ childrenProps
2114
+ } = option;
2115
+ const key = (_a = childrenProps == null ? void 0 : childrenProps.uid) != null ? _a : index;
2116
+ return /* @__PURE__ */ jsx52(
2117
+ ListItem8,
2118
+ {
2119
+ title: itemTitle,
2120
+ subtitle,
2121
+ valueTitle: supportingValues == null ? void 0 : supportingValues.value,
2122
+ valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
2123
+ media: getMedia(media, false),
2124
+ prompt: getInlineAlert(inlineAlert),
2125
+ additionalInfo: additionalText ? /* @__PURE__ */ jsx52(ListItem8.AdditionalInfo, { children: additionalText }) : void 0,
2126
+ disabled: disabled || optionDisabled,
2127
+ control: /* @__PURE__ */ jsx52(
2128
+ ListItem8.Checkbox,
2129
+ {
2130
+ checked: selectedIndices.includes(index),
2131
+ onChange: (e) => {
2132
+ const newSelectedIndices = e.target.checked ? [...selectedIndices, index] : selectedIndices.filter((i) => i !== index);
2133
+ onSelect(newSelectedIndices);
2134
+ }
2135
+ }
2136
+ )
2137
+ },
2138
+ key
2139
+ );
2140
+ })
2141
+ }
2142
+ );
2143
+ }
2144
+
2145
+ // ../renderers/src/MultiSelectInputRenderer/MultiSelectInputRendererComponent.tsx
1712
2146
  import { SelectInput, SelectInputOptionContent } from "@transferwise/components";
1713
- import { useState as useState6 } from "react";
1714
- import { useIntl as useIntl5 } from "react-intl";
2147
+ import { useState as useState7 } from "react";
2148
+ import { useIntl as useIntl7 } from "react-intl";
1715
2149
 
1716
2150
  // ../renderers/src/messages/multi-select.messages.ts
1717
- import { defineMessages as defineMessages5 } from "react-intl";
1718
- var multi_select_messages_default = defineMessages5({
2151
+ import { defineMessages as defineMessages6 } from "react-intl";
2152
+ var multi_select_messages_default = defineMessages6({
1719
2153
  summary: {
1720
2154
  id: "df.wise.MultiSelect.summary",
1721
2155
  defaultMessage: "{first} and {count} more",
@@ -1723,15 +2157,11 @@ var multi_select_messages_default = defineMessages5({
1723
2157
  }
1724
2158
  });
1725
2159
 
1726
- // ../renderers/src/MultiSelectInputRenderer.tsx
1727
- import { jsx as jsx44 } from "react/jsx-runtime";
1728
- var MultiSelectInputRenderer = {
1729
- canRenderType: "input-multi-select",
1730
- render: (props) => /* @__PURE__ */ jsx44(MultiSelectInputRendererComponent, __spreadValues({}, props))
1731
- };
2160
+ // ../renderers/src/MultiSelectInputRenderer/MultiSelectInputRendererComponent.tsx
2161
+ import { jsx as jsx53 } from "react/jsx-runtime";
1732
2162
  function MultiSelectInputRendererComponent(props) {
1733
- const { formatMessage } = useIntl5();
1734
- const [stagedIndices, setStagedIndices] = useState6();
2163
+ const { formatMessage } = useIntl7();
2164
+ const [stagedIndices, setStagedIndices] = useState7();
1735
2165
  const {
1736
2166
  id,
1737
2167
  autoComplete,
@@ -1769,12 +2199,12 @@ function MultiSelectInputRendererComponent(props) {
1769
2199
  const contentProps = {
1770
2200
  title: option.title,
1771
2201
  description: option.description,
1772
- icon: /* @__PURE__ */ jsx44(OptionMedia, { media: option.media, preferAvatar: false })
2202
+ icon: /* @__PURE__ */ jsx53(OptionMedia, { media: option.media, preferAvatar: false })
1773
2203
  };
1774
- return /* @__PURE__ */ jsx44(SelectInputOptionContent, __spreadValues({}, contentProps));
2204
+ return /* @__PURE__ */ jsx53(SelectInputOptionContent, __spreadValues({}, contentProps));
1775
2205
  };
1776
2206
  const extraProps = { autoComplete };
1777
- return /* @__PURE__ */ jsx44(
2207
+ return /* @__PURE__ */ jsx53(
1778
2208
  FieldInput_default,
1779
2209
  {
1780
2210
  id,
@@ -1782,7 +2212,7 @@ function MultiSelectInputRendererComponent(props) {
1782
2212
  help,
1783
2213
  description,
1784
2214
  validation: validationState,
1785
- children: /* @__PURE__ */ jsx44(
2215
+ children: /* @__PURE__ */ jsx53(
1786
2216
  SelectInput,
1787
2217
  __spreadValues({
1788
2218
  id,
@@ -1819,7 +2249,15 @@ function MultiSelectInputRendererComponent(props) {
1819
2249
  }
1820
2250
  );
1821
2251
  }
1822
- var MultiSelectInputRenderer_default = MultiSelectInputRenderer;
2252
+
2253
+ // ../renderers/src/MultiSelectInputRenderer/MultiSelectInputRenderer.tsx
2254
+ import { jsx as jsx54 } from "react/jsx-runtime";
2255
+ var MultiSelectInputRenderer = {
2256
+ canRenderType: "input-multi-select",
2257
+ render: (props) => {
2258
+ return props.control === "inline" ? /* @__PURE__ */ jsx54(InlineMultiSelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx54(MultiSelectInputRendererComponent, __spreadValues({}, props));
2259
+ }
2260
+ };
1823
2261
 
1824
2262
  // ../renderers/src/MultiUploadInputRenderer.tsx
1825
2263
  import { Status, UploadInput } from "@transferwise/components";
@@ -1827,7 +2265,7 @@ import { Status, UploadInput } from "@transferwise/components";
1827
2265
  // ../renderers/src/components/UploadFieldInput.tsx
1828
2266
  var import_classnames4 = __toESM(require_classnames());
1829
2267
  import { InlineAlert as InlineAlert2 } from "@transferwise/components";
1830
- import { jsx as jsx45, jsxs as jsxs8 } from "react/jsx-runtime";
2268
+ import { jsx as jsx55, jsxs as jsxs11 } from "react/jsx-runtime";
1831
2269
  function UploadFieldInput({
1832
2270
  id,
1833
2271
  children,
@@ -1836,18 +2274,18 @@ function UploadFieldInput({
1836
2274
  help,
1837
2275
  validation
1838
2276
  }) {
1839
- const labelContent = label && help ? /* @__PURE__ */ jsx45(LabelContentWithHelp, { text: label, help }) : label;
2277
+ const labelContent = label && help ? /* @__PURE__ */ jsx55(LabelContentWithHelp, { text: label, help }) : label;
1840
2278
  const descriptionId = description ? `${id}-description` : void 0;
1841
- return /* @__PURE__ */ jsxs8(
2279
+ return /* @__PURE__ */ jsxs11(
1842
2280
  "div",
1843
2281
  {
1844
2282
  className: (0, import_classnames4.default)("form-group d-block", {
1845
2283
  "has-error": (validation == null ? void 0 : validation.status) === "invalid"
1846
2284
  }),
1847
2285
  children: [
1848
- /* @__PURE__ */ jsx45("label", { htmlFor: id, className: "control-label", children: labelContent }),
2286
+ /* @__PURE__ */ jsx55("label", { htmlFor: id, className: "control-label", children: labelContent }),
1849
2287
  children,
1850
- (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ jsx45(InlineAlert2, { type: "negative", id: descriptionId, children: validation.message })
2288
+ (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ jsx55(InlineAlert2, { type: "negative", id: descriptionId, children: validation.message })
1851
2289
  ]
1852
2290
  }
1853
2291
  );
@@ -1882,7 +2320,7 @@ var getSizeLimit = (maxSize) => {
1882
2320
  };
1883
2321
 
1884
2322
  // ../renderers/src/MultiUploadInputRenderer.tsx
1885
- import { jsx as jsx46 } from "react/jsx-runtime";
2323
+ import { jsx as jsx56 } from "react/jsx-runtime";
1886
2324
  var MultiUploadInputRenderer = {
1887
2325
  canRenderType: "input-upload-multi",
1888
2326
  render: (props) => {
@@ -1907,7 +2345,7 @@ var MultiUploadInputRenderer = {
1907
2345
  };
1908
2346
  const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
1909
2347
  const descriptionId = description ? `${id}-description` : void 0;
1910
- return /* @__PURE__ */ jsx46(
2348
+ return /* @__PURE__ */ jsx56(
1911
2349
  UploadFieldInput_default,
1912
2350
  {
1913
2351
  id,
@@ -1915,7 +2353,7 @@ var MultiUploadInputRenderer = {
1915
2353
  description,
1916
2354
  validation: validationState,
1917
2355
  help,
1918
- children: /* @__PURE__ */ jsx46(
2356
+ children: /* @__PURE__ */ jsx56(
1919
2357
  UploadInput,
1920
2358
  {
1921
2359
  id,
@@ -1944,7 +2382,7 @@ var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
1944
2382
 
1945
2383
  // ../renderers/src/NumberInputRenderer.tsx
1946
2384
  import { Input as Input2, InputGroup as InputGroup2 } from "@transferwise/components";
1947
- import { jsx as jsx47 } from "react/jsx-runtime";
2385
+ import { jsx as jsx57 } from "react/jsx-runtime";
1948
2386
  var NumberInputRenderer = {
1949
2387
  canRenderType: "input-number",
1950
2388
  render: (props) => {
@@ -1958,7 +2396,7 @@ var NumberInputRenderer = {
1958
2396
  "maximum",
1959
2397
  "minimum"
1960
2398
  );
1961
- return /* @__PURE__ */ jsx47(
2399
+ return /* @__PURE__ */ jsx57(
1962
2400
  FieldInput_default,
1963
2401
  {
1964
2402
  id,
@@ -1966,7 +2404,7 @@ var NumberInputRenderer = {
1966
2404
  description,
1967
2405
  validation: validationState,
1968
2406
  help,
1969
- children: /* @__PURE__ */ jsx47(InputGroup2, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx47(
2407
+ children: /* @__PURE__ */ jsx57(InputGroup2, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx57(
1970
2408
  Input2,
1971
2409
  __spreadValues({
1972
2410
  id,
@@ -1987,7 +2425,7 @@ var NumberInputRenderer = {
1987
2425
  var NumberInputRenderer_default = NumberInputRenderer;
1988
2426
 
1989
2427
  // ../renderers/src/ParagraphRenderer.tsx
1990
- import { useIntl as useIntl6 } from "react-intl";
2428
+ import { useIntl as useIntl8 } from "react-intl";
1991
2429
 
1992
2430
  // ../renderers/src/hooks/useSnackBarIfAvailable.ts
1993
2431
  import { SnackbarContext } from "@transferwise/components";
@@ -2003,8 +2441,8 @@ var import_classnames5 = __toESM(require_classnames());
2003
2441
  import { Button as Button5, Input as Input3 } from "@transferwise/components";
2004
2442
 
2005
2443
  // ../renderers/src/messages/paragraph.messages.ts
2006
- import { defineMessages as defineMessages6 } from "react-intl";
2007
- var paragraph_messages_default = defineMessages6({
2444
+ import { defineMessages as defineMessages7 } from "react-intl";
2445
+ var paragraph_messages_default = defineMessages7({
2008
2446
  copy: {
2009
2447
  id: "df.wise.DynamicParagraph.copy",
2010
2448
  defaultMessage: "Copy",
@@ -2018,14 +2456,14 @@ var paragraph_messages_default = defineMessages6({
2018
2456
  });
2019
2457
 
2020
2458
  // ../renderers/src/ParagraphRenderer.tsx
2021
- import { jsx as jsx48, jsxs as jsxs9 } from "react/jsx-runtime";
2459
+ import { jsx as jsx58, jsxs as jsxs12 } from "react/jsx-runtime";
2022
2460
  var ParagraphRenderer = {
2023
2461
  canRenderType: "paragraph",
2024
- render: (props) => /* @__PURE__ */ jsx48(Paragraph, __spreadValues({}, props))
2462
+ render: (props) => /* @__PURE__ */ jsx58(Paragraph, __spreadValues({}, props))
2025
2463
  };
2026
2464
  function Paragraph({ align, control, margin, size, text }) {
2027
2465
  const className = getTextAlignmentAndMargin({ align, margin });
2028
- return control === "copyable" ? /* @__PURE__ */ jsx48(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ jsx48(
2466
+ return control === "copyable" ? /* @__PURE__ */ jsx58(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ jsx58(
2029
2467
  "p",
2030
2468
  {
2031
2469
  className: `${["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large"} ${className}`,
@@ -2038,15 +2476,15 @@ function CopyableParagraph({
2038
2476
  align,
2039
2477
  className
2040
2478
  }) {
2041
- const { formatMessage } = useIntl6();
2479
+ const { formatMessage } = useIntl8();
2042
2480
  const createSnackbar = useSnackBarIfAvailable();
2043
2481
  const copy = () => {
2044
2482
  navigator.clipboard.writeText(text).then(() => createSnackbar({ text: formatMessage(paragraph_messages_default.copied) })).catch(() => {
2045
2483
  });
2046
2484
  };
2047
2485
  const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
2048
- return /* @__PURE__ */ jsxs9("div", { className, children: [
2049
- /* @__PURE__ */ jsx48(
2486
+ return /* @__PURE__ */ jsxs12("div", { className, children: [
2487
+ /* @__PURE__ */ jsx58(
2050
2488
  Input3,
2051
2489
  {
2052
2490
  type: "text",
@@ -2055,32 +2493,55 @@ function CopyableParagraph({
2055
2493
  className: (0, import_classnames5.default)("text-ellipsis", inputAlignmentClasses)
2056
2494
  }
2057
2495
  ),
2058
- /* @__PURE__ */ jsx48(Button5, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
2496
+ /* @__PURE__ */ jsx58(Button5, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
2059
2497
  ] });
2060
2498
  }
2061
2499
  var ParagraphRenderer_default = ParagraphRenderer;
2062
2500
 
2063
- // ../renderers/src/RepeatableRenderer.tsx
2064
- var import_classnames6 = __toESM(require_classnames());
2065
- import { Button as Button6, Header as Header3, InlineAlert as InlineAlert3, Modal as Modal4, NavigationOption } from "@transferwise/components";
2066
- import { Plus } from "@transferwise/icons";
2067
- import { useState as useState7 } from "react";
2068
- import { useIntl as useIntl7 } from "react-intl";
2069
-
2070
- // ../renderers/src/messages/repeatable.messages.ts
2071
- import { defineMessages as defineMessages7 } from "react-intl";
2072
- var repeatable_messages_default = defineMessages7({
2073
- addItemTitle: {
2074
- id: "df.wise.ArraySchema.addItemTitle",
2075
- defaultMessage: "Add Item",
2076
- description: "Label on the button used to open a form to add an item"
2077
- },
2078
- addItem: {
2079
- id: "df.wise.ArraySchema.addItem",
2080
- defaultMessage: "Save",
2081
- description: "Label on the add button used to submit a form that adds an item"
2082
- },
2083
- editItem: {
2501
+ // ../renderers/src/ProgressRenderer.tsx
2502
+ import { ProgressBar } from "@transferwise/components";
2503
+ import { jsx as jsx59 } from "react/jsx-runtime";
2504
+ var ProgressRenderer = {
2505
+ canRenderType: "progress",
2506
+ render: ({ uid, title, help, progress, progressText, margin, description }) => {
2507
+ return /* @__PURE__ */ jsx59(
2508
+ ProgressBar,
2509
+ {
2510
+ id: uid,
2511
+ className: getMargin(margin),
2512
+ title: title && help ? /* @__PURE__ */ jsx59(LabelContentWithHelp, { text: title, help }) : title,
2513
+ description,
2514
+ progress: {
2515
+ max: 1,
2516
+ value: progress
2517
+ },
2518
+ textEnd: progressText
2519
+ }
2520
+ );
2521
+ }
2522
+ };
2523
+
2524
+ // ../renderers/src/RepeatableRenderer.tsx
2525
+ var import_classnames6 = __toESM(require_classnames());
2526
+ import { Button as Button6, Header as Header6, InlineAlert as InlineAlert3, Modal as Modal4, NavigationOption } from "@transferwise/components";
2527
+ import { Plus } from "@transferwise/icons";
2528
+ import { useState as useState8 } from "react";
2529
+ import { useIntl as useIntl9 } from "react-intl";
2530
+
2531
+ // ../renderers/src/messages/repeatable.messages.ts
2532
+ import { defineMessages as defineMessages8 } from "react-intl";
2533
+ var repeatable_messages_default = defineMessages8({
2534
+ addItemTitle: {
2535
+ id: "df.wise.ArraySchema.addItemTitle",
2536
+ defaultMessage: "Add Item",
2537
+ description: "Label on the button used to open a form to add an item"
2538
+ },
2539
+ addItem: {
2540
+ id: "df.wise.ArraySchema.addItem",
2541
+ defaultMessage: "Save",
2542
+ description: "Label on the add button used to submit a form that adds an item"
2543
+ },
2544
+ editItem: {
2084
2545
  id: "df.wise.ArraySchema.editItem",
2085
2546
  defaultMessage: "Save",
2086
2547
  description: "Label on the edit button used to submit a form that edits an item"
@@ -2093,10 +2554,10 @@ var repeatable_messages_default = defineMessages7({
2093
2554
  });
2094
2555
 
2095
2556
  // ../renderers/src/RepeatableRenderer.tsx
2096
- import { Fragment as Fragment2, jsx as jsx49, jsxs as jsxs10 } from "react/jsx-runtime";
2557
+ import { Fragment as Fragment5, jsx as jsx60, jsxs as jsxs13 } from "react/jsx-runtime";
2097
2558
  var RepeatableRenderer = {
2098
2559
  canRenderType: "repeatable",
2099
- render: (props) => /* @__PURE__ */ jsx49(Repeatable, __spreadValues({}, props))
2560
+ render: (props) => /* @__PURE__ */ jsx60(Repeatable, __spreadValues({}, props))
2100
2561
  };
2101
2562
  function Repeatable(props) {
2102
2563
  const {
@@ -2112,8 +2573,8 @@ function Repeatable(props) {
2112
2573
  onSave,
2113
2574
  onRemove
2114
2575
  } = props;
2115
- const { formatMessage } = useIntl7();
2116
- const [openModalType, setOpenModalType] = useState7(null);
2576
+ const { formatMessage } = useIntl9();
2577
+ const [openModalType, setOpenModalType] = useState8(null);
2117
2578
  const onAddItem = () => {
2118
2579
  onAdd();
2119
2580
  setOpenModalType("add");
@@ -2135,40 +2596,40 @@ function Repeatable(props) {
2135
2596
  const onCancelEdit = () => {
2136
2597
  setOpenModalType(null);
2137
2598
  };
2138
- return /* @__PURE__ */ jsxs10(Fragment2, { children: [
2139
- title && /* @__PURE__ */ jsx49(Header3, { title }),
2140
- description && /* @__PURE__ */ jsx49("p", { children: description }),
2141
- /* @__PURE__ */ jsxs10(
2599
+ return /* @__PURE__ */ jsxs13(Fragment5, { children: [
2600
+ title && /* @__PURE__ */ jsx60(Header6, { title }),
2601
+ description && /* @__PURE__ */ jsx60("p", { children: description }),
2602
+ /* @__PURE__ */ jsxs13(
2142
2603
  "div",
2143
2604
  {
2144
2605
  className: (0, import_classnames6.default)("form-group", {
2145
2606
  "has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
2146
2607
  }),
2147
2608
  children: [
2148
- items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx49(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
2149
- /* @__PURE__ */ jsx49(
2609
+ items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx60(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
2610
+ /* @__PURE__ */ jsx60(
2150
2611
  NavigationOption,
2151
2612
  {
2152
- media: /* @__PURE__ */ jsx49(Plus, {}),
2613
+ media: /* @__PURE__ */ jsx60(Plus, {}),
2153
2614
  title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
2154
2615
  showMediaAtAllSizes: true,
2155
2616
  onClick: () => onAddItem()
2156
2617
  }
2157
2618
  ),
2158
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx49(InlineAlert3, { type: "negative", children: validationState.message })
2619
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx60(InlineAlert3, { type: "negative", children: validationState.message })
2159
2620
  ]
2160
2621
  }
2161
2622
  ),
2162
- /* @__PURE__ */ jsx49(
2623
+ /* @__PURE__ */ jsx60(
2163
2624
  Modal4,
2164
2625
  {
2165
2626
  open: openModalType !== null,
2166
2627
  title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
2167
- body: /* @__PURE__ */ jsxs10(Fragment2, { children: [
2168
- /* @__PURE__ */ jsx49("div", { className: "m-b-2", children: editableItem }),
2169
- /* @__PURE__ */ jsxs10("div", { children: [
2170
- /* @__PURE__ */ jsx49(Button6, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
2171
- /* @__PURE__ */ jsx49(
2628
+ body: /* @__PURE__ */ jsxs13(Fragment5, { children: [
2629
+ /* @__PURE__ */ jsx60("div", { className: "m-b-2", children: editableItem }),
2630
+ /* @__PURE__ */ jsxs13("div", { children: [
2631
+ /* @__PURE__ */ jsx60(Button6, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
2632
+ /* @__PURE__ */ jsx60(
2172
2633
  Button6,
2173
2634
  {
2174
2635
  v2: true,
@@ -2190,10 +2651,10 @@ function ItemSummaryOption({
2190
2651
  item,
2191
2652
  onClick
2192
2653
  }) {
2193
- return /* @__PURE__ */ jsx49(
2654
+ return /* @__PURE__ */ jsx60(
2194
2655
  NavigationOption,
2195
2656
  {
2196
- media: /* @__PURE__ */ jsx49(OptionMedia, { media: item.media, preferAvatar: false }),
2657
+ media: /* @__PURE__ */ jsx60(OptionMedia, { media: item.media, preferAvatar: false }),
2197
2658
  title: item.title,
2198
2659
  content: item.description,
2199
2660
  showMediaAtAllSizes: true,
@@ -2204,14 +2665,146 @@ function ItemSummaryOption({
2204
2665
  }
2205
2666
  var RepeatableRenderer_default = RepeatableRenderer;
2206
2667
 
2668
+ // ../renderers/src/ReviewLegacyRenderer.tsx
2669
+ import { DefinitionList } from "@transferwise/components";
2670
+ import { Fragment as Fragment6, jsx as jsx61, jsxs as jsxs14 } from "react/jsx-runtime";
2671
+ var ReviewRenderer = {
2672
+ canRenderType: "review",
2673
+ render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
2674
+ const orientation = mapControlToDefinitionListLayout(control);
2675
+ return /* @__PURE__ */ jsxs14("div", { className: getMargin(margin), children: [
2676
+ /* @__PURE__ */ jsx61(Header5, { title, callToAction }),
2677
+ /* @__PURE__ */ jsx61("div", { className: margin, children: /* @__PURE__ */ jsx61(
2678
+ DefinitionList,
2679
+ {
2680
+ layout: orientation,
2681
+ definitions: fields.map(
2682
+ ({ label, value, help, analyticsId: fieldAnalyticsId }, index) => ({
2683
+ key: String(index),
2684
+ value,
2685
+ title: getFieldLabel(
2686
+ label,
2687
+ help,
2688
+ () => trackEvent("Help Pressed", { layoutItemId: fieldAnalyticsId })
2689
+ )
2690
+ })
2691
+ )
2692
+ }
2693
+ ) })
2694
+ ] });
2695
+ }
2696
+ };
2697
+ var ReviewLegacyRenderer_default = ReviewRenderer;
2698
+ var mapControlToDefinitionListLayout = (control) => {
2699
+ switch (control) {
2700
+ case "horizontal":
2701
+ case "horizontal-end-aligned":
2702
+ return "HORIZONTAL_RIGHT_ALIGNED";
2703
+ case "horizontal-start-aligned":
2704
+ return "HORIZONTAL_LEFT_ALIGNED";
2705
+ case "vertical-two-column":
2706
+ return "VERTICAL_TWO_COLUMN";
2707
+ case "vertical":
2708
+ case "vertical-one-column":
2709
+ default:
2710
+ return "VERTICAL_ONE_COLUMN";
2711
+ }
2712
+ };
2713
+ var getFieldLabel = (label, help, onClick) => {
2714
+ if (help) {
2715
+ return /* @__PURE__ */ jsxs14(Fragment6, { children: [
2716
+ label,
2717
+ " ",
2718
+ /* @__PURE__ */ jsx61(Help_default, { help, onClick })
2719
+ ] });
2720
+ }
2721
+ return label;
2722
+ };
2723
+
2724
+ // ../renderers/src/ReviewRenderer.tsx
2725
+ import { ListItem as ListItem9, Markdown as Markdown4, Popover } from "@transferwise/components";
2726
+ import { QuestionMarkCircle } from "@transferwise/icons";
2727
+ import { useIntl as useIntl10 } from "react-intl";
2728
+ import { jsx as jsx62, jsxs as jsxs15 } from "react/jsx-runtime";
2729
+ var IGNORED_CONTROLS = [
2730
+ "horizontal",
2731
+ "horizontal-end-aligned",
2732
+ "horizontal-start-aligned",
2733
+ "vertical-two-column"
2734
+ ];
2735
+ var ReviewRenderer2 = {
2736
+ canRenderType: "review",
2737
+ canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
2738
+ render: (props) => /* @__PURE__ */ jsx62(Review, __spreadValues({}, props))
2739
+ };
2740
+ var Review = ({
2741
+ callToAction,
2742
+ control,
2743
+ margin,
2744
+ fields,
2745
+ tags,
2746
+ title,
2747
+ trackEvent
2748
+ }) => {
2749
+ const intl = useIntl10();
2750
+ return /* @__PURE__ */ jsxs15("div", { className: getMargin(margin), children: [
2751
+ /* @__PURE__ */ jsx62(Header5, { title, callToAction }),
2752
+ fields.map((field) => {
2753
+ var _a, _b, _c;
2754
+ const {
2755
+ label,
2756
+ value,
2757
+ media,
2758
+ additionalInfo,
2759
+ inlineAlert,
2760
+ help,
2761
+ analyticsId,
2762
+ callToAction: itemCallToAction,
2763
+ tags: itemTags
2764
+ } = field;
2765
+ const controlOptions = {
2766
+ ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
2767
+ fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
2768
+ };
2769
+ return /* @__PURE__ */ jsx62(
2770
+ ListItem9,
2771
+ {
2772
+ title: value,
2773
+ subtitle: label,
2774
+ inverted: true,
2775
+ media: getMedia(media, shouldUseAvatar(control, itemTags)),
2776
+ control: (_c = getCTAControl(itemCallToAction, controlOptions)) != null ? _c : help ? getHelpControl(
2777
+ help,
2778
+ intl.formatMessage(help_messages_default.helpAria),
2779
+ () => trackEvent("Help Pressed", { layoutItemId: analyticsId })
2780
+ ) : void 0,
2781
+ prompt: getInlineAlert(inlineAlert),
2782
+ additionalInfo: getAdditionalInfo(additionalInfo)
2783
+ },
2784
+ JSON.stringify(field)
2785
+ );
2786
+ })
2787
+ ] });
2788
+ };
2789
+ var getHelpControl = (help, ariaLabel, onClick) => {
2790
+ return /* @__PURE__ */ jsx62(Popover, { content: /* @__PURE__ */ jsx62(Markdown4, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ jsx62(ListItem9.IconButton, { partiallyInteractive: true, "aria-label": ariaLabel, onClick, children: /* @__PURE__ */ jsx62(QuestionMarkCircle, {}) }) });
2791
+ };
2792
+ var ReviewRenderer_default = ReviewRenderer2;
2793
+
2207
2794
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
2208
- import { Input as Input4, Markdown as Markdown4, NavigationOption as NavigationOption2, NavigationOptionsList } from "@transferwise/components";
2209
- import { useState as useState8 } from "react";
2210
- import { useIntl as useIntl9 } from "react-intl";
2795
+ import {
2796
+ Input as Input4,
2797
+ InputGroup as InputGroup3,
2798
+ List,
2799
+ ListItem as ListItem10,
2800
+ Markdown as Markdown5
2801
+ } from "@transferwise/components";
2802
+ import { useState as useState9 } from "react";
2803
+ import { useIntl as useIntl12 } from "react-intl";
2211
2804
 
2212
2805
  // ../renderers/src/messages/search.messages.ts
2213
- import { defineMessages as defineMessages8 } from "react-intl";
2214
- var search_messages_default = defineMessages8({
2806
+ import { defineMessages as defineMessages9 } from "react-intl";
2807
+ var search_messages_default = defineMessages9({
2215
2808
  loading: {
2216
2809
  id: "df.wise.SearchLayout.loading",
2217
2810
  defaultMessage: "Loading...",
@@ -2220,11 +2813,11 @@ var search_messages_default = defineMessages8({
2220
2813
  });
2221
2814
 
2222
2815
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
2223
- import { useIntl as useIntl8 } from "react-intl";
2816
+ import { useIntl as useIntl11 } from "react-intl";
2224
2817
 
2225
2818
  // ../renderers/src/messages/generic-error.messages.ts
2226
- import { defineMessages as defineMessages9 } from "react-intl";
2227
- var generic_error_messages_default = defineMessages9({
2819
+ import { defineMessages as defineMessages10 } from "react-intl";
2820
+ var generic_error_messages_default = defineMessages10({
2228
2821
  genericErrorRetryHint: {
2229
2822
  id: "df.wise.PersistAsyncSchema.genericError",
2230
2823
  defaultMessage: "Something went wrong, please try again.",
@@ -2244,20 +2837,22 @@ var generic_error_messages_default = defineMessages9({
2244
2837
 
2245
2838
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
2246
2839
  import { Link } from "@transferwise/components";
2247
- import { jsx as jsx50, jsxs as jsxs11 } from "react/jsx-runtime";
2840
+ import { jsx as jsx63, jsxs as jsxs16 } from "react/jsx-runtime";
2248
2841
  function ErrorResult({ state }) {
2249
- const intl = useIntl8();
2250
- return /* @__PURE__ */ jsxs11("p", { className: "m-t-2", children: [
2842
+ const intl = useIntl11();
2843
+ return /* @__PURE__ */ jsxs16("p", { className: "m-t-2", children: [
2251
2844
  intl.formatMessage(generic_error_messages_default.genericError),
2252
2845
  "\xA0",
2253
- /* @__PURE__ */ jsx50(Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
2846
+ /* @__PURE__ */ jsx63(Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
2254
2847
  ] });
2255
2848
  }
2256
2849
 
2257
2850
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
2258
- import { jsx as jsx51, jsxs as jsxs12 } from "react/jsx-runtime";
2851
+ import { Search } from "@transferwise/icons";
2852
+ import { jsx as jsx64, jsxs as jsxs17 } from "react/jsx-runtime";
2259
2853
  function BlockSearchRendererComponent({
2260
2854
  id,
2855
+ hint,
2261
2856
  isLoading,
2262
2857
  margin,
2263
2858
  query,
@@ -2266,17 +2861,17 @@ function BlockSearchRendererComponent({
2266
2861
  trackEvent,
2267
2862
  onChange
2268
2863
  }) {
2269
- const [hasSearched, setHasSearched] = useState8(false);
2270
- const { formatMessage } = useIntl9();
2271
- return /* @__PURE__ */ jsxs12("div", { className: getMargin(margin), children: [
2272
- /* @__PURE__ */ jsx51(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx51(
2864
+ const [hasSearched, setHasSearched] = useState9(false);
2865
+ const { formatMessage } = useIntl12();
2866
+ return /* @__PURE__ */ jsxs17("div", { className: getMargin(margin), children: [
2867
+ /* @__PURE__ */ jsx64(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx64(InputGroup3, { addonStart: { content: /* @__PURE__ */ jsx64(Search, { size: 24 }) }, children: /* @__PURE__ */ jsx64(
2273
2868
  Input4,
2274
2869
  {
2275
2870
  id,
2276
2871
  name: id,
2872
+ placeholder: hint,
2277
2873
  type: "text",
2278
2874
  value: query,
2279
- className: "m-t-1",
2280
2875
  onChange: ({ currentTarget: { value } }) => {
2281
2876
  if (!hasSearched) {
2282
2877
  setHasSearched(true);
@@ -2285,8 +2880,8 @@ function BlockSearchRendererComponent({
2285
2880
  onChange(value);
2286
2881
  }
2287
2882
  }
2288
- ) }),
2289
- isLoading ? /* @__PURE__ */ jsx51("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx51(SearchResultContent, { state, trackEvent })
2883
+ ) }) }),
2884
+ isLoading ? /* @__PURE__ */ jsx64("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx64(SearchResultContent, { state, trackEvent })
2290
2885
  ] });
2291
2886
  }
2292
2887
  function SearchResultContent({
@@ -2295,39 +2890,42 @@ function SearchResultContent({
2295
2890
  }) {
2296
2891
  switch (state.type) {
2297
2892
  case "error":
2298
- return /* @__PURE__ */ jsx51(ErrorResult, { state });
2893
+ return /* @__PURE__ */ jsx64(ErrorResult, { state });
2299
2894
  case "results":
2300
- return /* @__PURE__ */ jsx51(SearchResults, { state, trackEvent });
2895
+ return /* @__PURE__ */ jsx64(SearchResults, { state, trackEvent });
2301
2896
  case "noResults":
2302
- return /* @__PURE__ */ jsx51(EmptySearchResult, { state });
2897
+ return /* @__PURE__ */ jsx64(EmptySearchResult, { state });
2303
2898
  case "pending":
2304
2899
  default:
2305
2900
  return null;
2306
2901
  }
2307
2902
  }
2308
2903
  function EmptySearchResult({ state }) {
2309
- return /* @__PURE__ */ jsx51(Markdown4, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
2904
+ return /* @__PURE__ */ jsx64(Markdown5, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
2310
2905
  }
2311
2906
  function SearchResults({
2312
2907
  state,
2313
2908
  trackEvent
2314
2909
  }) {
2315
- return /* @__PURE__ */ jsx51(NavigationOptionsList, { children: state.results.map((result) => {
2910
+ return /* @__PURE__ */ jsx64(List, { children: state.results.map((result) => {
2316
2911
  const { media } = result;
2317
- return /* @__PURE__ */ jsx51(
2318
- NavigationOption2,
2912
+ return /* @__PURE__ */ jsx64(
2913
+ ListItem10,
2319
2914
  {
2320
2915
  title: result.title,
2321
- content: result.description,
2322
- media: media ? /* @__PURE__ */ jsx51(OptionMedia, { media, preferAvatar: false }) : void 0,
2323
- showMediaCircle: false,
2324
- showMediaAtAllSizes: true,
2325
- onClick: () => {
2326
- trackEvent("Search Result Selected", __spreadValues({
2327
- type: result.type
2328
- }, result.type === "action" ? { actionId: result.id } : {}));
2329
- result.onClick();
2330
- }
2916
+ subtitle: result.description,
2917
+ media: media ? /* @__PURE__ */ jsx64(OptionMedia, { media, preferAvatar: false }) : void 0,
2918
+ control: /* @__PURE__ */ jsx64(
2919
+ ListItem10.Navigation,
2920
+ {
2921
+ onClick: () => {
2922
+ trackEvent("Search Result Selected", __spreadValues({
2923
+ type: result.type
2924
+ }, result.type === "action" ? { actionId: result.id } : {}));
2925
+ result.onClick();
2926
+ }
2927
+ }
2928
+ )
2331
2929
  },
2332
2930
  JSON.stringify(result)
2333
2931
  );
@@ -2336,13 +2934,14 @@ function SearchResults({
2336
2934
  var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
2337
2935
 
2338
2936
  // ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
2339
- import { Markdown as Markdown5, Typeahead } from "@transferwise/components";
2340
- import { Search } from "@transferwise/icons";
2341
- import { useState as useState9 } from "react";
2342
- import { useIntl as useIntl10 } from "react-intl";
2343
- import { jsx as jsx52 } from "react/jsx-runtime";
2937
+ import { Markdown as Markdown6, Typeahead } from "@transferwise/components";
2938
+ import { Search as Search2 } from "@transferwise/icons";
2939
+ import { useState as useState10 } from "react";
2940
+ import { useIntl as useIntl13 } from "react-intl";
2941
+ import { jsx as jsx65 } from "react/jsx-runtime";
2344
2942
  function InlineSearchRenderer({
2345
2943
  id,
2944
+ hint,
2346
2945
  isLoading,
2347
2946
  margin,
2348
2947
  onChange,
@@ -2350,20 +2949,21 @@ function InlineSearchRenderer({
2350
2949
  title,
2351
2950
  trackEvent
2352
2951
  }) {
2353
- const [hasSearched, setHasSearched] = useState9(false);
2354
- const intl = useIntl10();
2355
- return /* @__PURE__ */ jsx52("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx52(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx52(
2952
+ const [hasSearched, setHasSearched] = useState10(false);
2953
+ const intl = useIntl13();
2954
+ return /* @__PURE__ */ jsx65("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx65(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx65(
2356
2955
  Typeahead,
2357
2956
  {
2358
2957
  id: "typeahead-input-id",
2359
2958
  intl,
2360
2959
  name: "typeahead-input-name",
2361
2960
  size: "md",
2961
+ placeholder: hint,
2362
2962
  maxHeight: 100,
2363
- footer: /* @__PURE__ */ jsx52(TypeaheadFooter, { state, isLoading }),
2963
+ footer: /* @__PURE__ */ jsx65(TypeaheadFooter, { state, isLoading }),
2364
2964
  multiple: false,
2365
2965
  clearable: false,
2366
- addon: /* @__PURE__ */ jsx52(Search, { size: 24 }),
2966
+ addon: /* @__PURE__ */ jsx65(Search2, { size: 24 }),
2367
2967
  options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
2368
2968
  minQueryLength: 1,
2369
2969
  onChange: (values) => {
@@ -2398,33 +2998,33 @@ function mapResultToTypeaheadOption(result) {
2398
2998
  };
2399
2999
  }
2400
3000
  function TypeaheadFooter({ state, isLoading }) {
2401
- const { formatMessage } = useIntl10();
3001
+ const { formatMessage } = useIntl13();
2402
3002
  if (state.type === "noResults") {
2403
- return /* @__PURE__ */ jsx52(Markdown5, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
3003
+ return /* @__PURE__ */ jsx65(Markdown6, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
2404
3004
  }
2405
3005
  if (state.type === "error") {
2406
- return /* @__PURE__ */ jsx52("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx52(ErrorResult, { state }) });
3006
+ return /* @__PURE__ */ jsx65("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx65(ErrorResult, { state }) });
2407
3007
  }
2408
3008
  if (state.type === "pending" || isLoading) {
2409
- return /* @__PURE__ */ jsx52("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
3009
+ return /* @__PURE__ */ jsx65("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
2410
3010
  }
2411
3011
  return null;
2412
3012
  }
2413
3013
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
2414
3014
 
2415
3015
  // ../renderers/src/SearchRenderer/SearchRenderer.tsx
2416
- import { jsx as jsx53 } from "react/jsx-runtime";
3016
+ import { jsx as jsx66 } from "react/jsx-runtime";
2417
3017
  var SearchRenderer = {
2418
3018
  canRenderType: "search",
2419
- render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx53(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx53(BlockSearchRendererComponent_default, __spreadValues({}, props))
3019
+ render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx66(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx66(BlockSearchRendererComponent_default, __spreadValues({}, props))
2420
3020
  };
2421
3021
  var SearchRenderer_default = SearchRenderer;
2422
3022
 
2423
3023
  // ../renderers/src/SectionRenderer.tsx
2424
- import { Header as Header4 } from "@transferwise/components";
3024
+ import { Header as Header7 } from "@transferwise/components";
2425
3025
 
2426
3026
  // ../renderers/src/utils/getHeaderAction.tsx
2427
- var getHeaderAction = (callToAction) => {
3027
+ var getHeaderAction2 = (callToAction) => {
2428
3028
  if (!callToAction) {
2429
3029
  return void 0;
2430
3030
  }
@@ -2445,12 +3045,12 @@ var getHeaderAction = (callToAction) => {
2445
3045
  };
2446
3046
 
2447
3047
  // ../renderers/src/SectionRenderer.tsx
2448
- import { jsx as jsx54, jsxs as jsxs13 } from "react/jsx-runtime";
3048
+ import { jsx as jsx67, jsxs as jsxs18 } from "react/jsx-runtime";
2449
3049
  var SectionRenderer = {
2450
3050
  canRenderType: "section",
2451
3051
  render: ({ children, callToAction, margin, title }) => {
2452
- return /* @__PURE__ */ jsxs13("section", { className: getMargin(margin), children: [
2453
- (title || callToAction) && /* @__PURE__ */ jsx54(Header4, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
3052
+ return /* @__PURE__ */ jsxs18("section", { className: getMargin(margin), children: [
3053
+ (title || callToAction) && /* @__PURE__ */ jsx67(Header7, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
2454
3054
  children
2455
3055
  ] });
2456
3056
  }
@@ -2459,7 +3059,7 @@ var SectionRenderer_default = SectionRenderer;
2459
3059
 
2460
3060
  // ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
2461
3061
  import { RadioGroup } from "@transferwise/components";
2462
- import { Fragment as Fragment3, jsx as jsx55, jsxs as jsxs14 } from "react/jsx-runtime";
3062
+ import { Fragment as Fragment7, jsx as jsx68, jsxs as jsxs19 } from "react/jsx-runtime";
2463
3063
  function RadioInputRendererComponent(props) {
2464
3064
  const {
2465
3065
  id,
@@ -2473,8 +3073,8 @@ function RadioInputRendererComponent(props) {
2473
3073
  validationState,
2474
3074
  onSelect
2475
3075
  } = props;
2476
- return /* @__PURE__ */ jsxs14(Fragment3, { children: [
2477
- /* @__PURE__ */ jsx55(
3076
+ return /* @__PURE__ */ jsxs19(Fragment7, { children: [
3077
+ /* @__PURE__ */ jsx68(
2478
3078
  FieldInput_default,
2479
3079
  {
2480
3080
  id,
@@ -2482,7 +3082,7 @@ function RadioInputRendererComponent(props) {
2482
3082
  help,
2483
3083
  description,
2484
3084
  validation: validationState,
2485
- children: /* @__PURE__ */ jsx55("span", { children: /* @__PURE__ */ jsx55(
3085
+ children: /* @__PURE__ */ jsx68("span", { children: /* @__PURE__ */ jsx68(
2486
3086
  RadioGroup,
2487
3087
  {
2488
3088
  name: id,
@@ -2491,7 +3091,7 @@ function RadioInputRendererComponent(props) {
2491
3091
  value: index,
2492
3092
  secondary: option.description,
2493
3093
  disabled: option.disabled || disabled,
2494
- avatar: /* @__PURE__ */ jsx55(OptionMedia, { media: option.media, preferAvatar: false })
3094
+ avatar: /* @__PURE__ */ jsx68(OptionMedia, { media: option.media, preferAvatar: false })
2495
3095
  })),
2496
3096
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
2497
3097
  onChange: onSelect
@@ -2507,7 +3107,7 @@ function RadioInputRendererComponent(props) {
2507
3107
  // ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
2508
3108
  import { Tabs } from "@transferwise/components";
2509
3109
  import { useEffect as useEffect6 } from "react";
2510
- import { Fragment as Fragment4, jsx as jsx56, jsxs as jsxs15 } from "react/jsx-runtime";
3110
+ import { Fragment as Fragment8, jsx as jsx69, jsxs as jsxs20 } from "react/jsx-runtime";
2511
3111
  function TabInputRendererComponent(props) {
2512
3112
  const {
2513
3113
  id,
@@ -2526,8 +3126,8 @@ function TabInputRendererComponent(props) {
2526
3126
  onSelect(0);
2527
3127
  }
2528
3128
  }, [selectedIndex, onSelect, options.length]);
2529
- return /* @__PURE__ */ jsxs15(Fragment4, { children: [
2530
- /* @__PURE__ */ jsx56(
3129
+ return /* @__PURE__ */ jsxs20(Fragment8, { children: [
3130
+ /* @__PURE__ */ jsx69(
2531
3131
  FieldInput_default,
2532
3132
  {
2533
3133
  id,
@@ -2535,7 +3135,7 @@ function TabInputRendererComponent(props) {
2535
3135
  help,
2536
3136
  description,
2537
3137
  validation: validationState,
2538
- children: /* @__PURE__ */ jsx56(
3138
+ children: /* @__PURE__ */ jsx69(
2539
3139
  Tabs,
2540
3140
  {
2541
3141
  name: id,
@@ -2544,7 +3144,7 @@ function TabInputRendererComponent(props) {
2544
3144
  title: option.title,
2545
3145
  // if we pass null, we get some props-types console errors
2546
3146
  // eslint-disable-next-line react/jsx-no-useless-fragment
2547
- content: /* @__PURE__ */ jsx56(Fragment4, {}),
3147
+ content: /* @__PURE__ */ jsx69(Fragment8, {}),
2548
3148
  disabled: option.disabled || disabled
2549
3149
  })),
2550
3150
  onTabSelect: onSelect
@@ -2559,7 +3159,7 @@ var isValidIndex2 = (index, options) => index !== null && index >= 0 && index <
2559
3159
 
2560
3160
  // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
2561
3161
  import { SelectInput as SelectInput2, SelectInputOptionContent as SelectInputOptionContent2 } from "@transferwise/components";
2562
- import { Fragment as Fragment5, jsx as jsx57, jsxs as jsxs16 } from "react/jsx-runtime";
3162
+ import { Fragment as Fragment9, jsx as jsx70, jsxs as jsxs21 } from "react/jsx-runtime";
2563
3163
  function SelectInputRendererComponent(props) {
2564
3164
  const {
2565
3165
  id,
@@ -2599,13 +3199,13 @@ function SelectInputRendererComponent(props) {
2599
3199
  } : {
2600
3200
  title: option.title,
2601
3201
  description: option.description,
2602
- icon: /* @__PURE__ */ jsx57(OptionMedia, { media: option.media, preferAvatar: false })
3202
+ icon: /* @__PURE__ */ jsx70(OptionMedia, { media: option.media, preferAvatar: false })
2603
3203
  };
2604
- return /* @__PURE__ */ jsx57(SelectInputOptionContent2, __spreadValues({}, contentProps));
3204
+ return /* @__PURE__ */ jsx70(SelectInputOptionContent2, __spreadValues({}, contentProps));
2605
3205
  };
2606
3206
  const extraProps = { autoComplete };
2607
- return /* @__PURE__ */ jsxs16(Fragment5, { children: [
2608
- /* @__PURE__ */ jsx57(
3207
+ return /* @__PURE__ */ jsxs21(Fragment9, { children: [
3208
+ /* @__PURE__ */ jsx70(
2609
3209
  FieldInput_default,
2610
3210
  {
2611
3211
  id,
@@ -2613,7 +3213,7 @@ function SelectInputRendererComponent(props) {
2613
3213
  help,
2614
3214
  description,
2615
3215
  validation: validationState,
2616
- children: /* @__PURE__ */ jsx57(
3216
+ children: /* @__PURE__ */ jsx70(
2617
3217
  SelectInput2,
2618
3218
  __spreadValues({
2619
3219
  name: id,
@@ -2636,7 +3236,7 @@ function SelectInputRendererComponent(props) {
2636
3236
  // ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
2637
3237
  import { useEffect as useEffect7 } from "react";
2638
3238
  import { SegmentedControl } from "@transferwise/components";
2639
- import { Fragment as Fragment6, jsx as jsx58, jsxs as jsxs17 } from "react/jsx-runtime";
3239
+ import { Fragment as Fragment10, jsx as jsx71, jsxs as jsxs22 } from "react/jsx-runtime";
2640
3240
  function SegmentedInputRendererComponent(props) {
2641
3241
  const {
2642
3242
  id,
@@ -2654,8 +3254,8 @@ function SegmentedInputRendererComponent(props) {
2654
3254
  onSelect(0);
2655
3255
  }
2656
3256
  }, [selectedIndex, onSelect, options.length]);
2657
- return /* @__PURE__ */ jsxs17(Fragment6, { children: [
2658
- /* @__PURE__ */ jsx58(
3257
+ return /* @__PURE__ */ jsxs22(Fragment10, { children: [
3258
+ /* @__PURE__ */ jsx71(
2659
3259
  FieldInput_default,
2660
3260
  {
2661
3261
  id,
@@ -2663,7 +3263,7 @@ function SegmentedInputRendererComponent(props) {
2663
3263
  help,
2664
3264
  description,
2665
3265
  validation: validationState,
2666
- children: /* @__PURE__ */ jsx58(
3266
+ children: /* @__PURE__ */ jsx71(
2667
3267
  SegmentedControl,
2668
3268
  {
2669
3269
  name: `${id}-segmented-control`,
@@ -2680,14 +3280,14 @@ function SegmentedInputRendererComponent(props) {
2680
3280
  )
2681
3281
  }
2682
3282
  ),
2683
- /* @__PURE__ */ jsx58("div", { id: `${id}-children`, children })
3283
+ /* @__PURE__ */ jsx71("div", { id: `${id}-children`, children })
2684
3284
  ] });
2685
3285
  }
2686
3286
  var isValidIndex3 = (index, options) => index !== null && index >= 0 && index < options;
2687
3287
 
2688
3288
  // ../renderers/src/SelectInputRenderer/RadioItemRendererComponent.tsx
2689
- import { Header as Header5, InlineAlert as InlineAlert4, List, ListItem as ListItem4 } from "@transferwise/components";
2690
- import { Fragment as Fragment7, jsx as jsx59, jsxs as jsxs18 } from "react/jsx-runtime";
3289
+ import { Header as Header8, InlineAlert as InlineAlert4, List as List2, ListItem as ListItem11 } from "@transferwise/components";
3290
+ import { Fragment as Fragment11, jsx as jsx72, jsxs as jsxs23 } from "react/jsx-runtime";
2691
3291
  function RadioItemRendererComponent(props) {
2692
3292
  const {
2693
3293
  id,
@@ -2701,23 +3301,23 @@ function RadioItemRendererComponent(props) {
2701
3301
  validationState,
2702
3302
  onSelect
2703
3303
  } = props;
2704
- return /* @__PURE__ */ jsxs18(Fragment7, { children: [
2705
- rootTitle && /* @__PURE__ */ jsx59(
2706
- Header5,
3304
+ return /* @__PURE__ */ jsxs23(Fragment11, { children: [
3305
+ rootTitle && /* @__PURE__ */ jsx72(
3306
+ Header8,
2707
3307
  {
2708
3308
  as: "h2",
2709
- title: help ? /* @__PURE__ */ jsx59(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
3309
+ title: help ? /* @__PURE__ */ jsx72(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
2710
3310
  }
2711
3311
  ),
2712
- rootDescription && /* @__PURE__ */ jsx59("p", { children: rootDescription }),
2713
- /* @__PURE__ */ jsx59(List, { children: options.map(
2714
- ({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ jsx59(
2715
- ListItem4,
3312
+ rootDescription && /* @__PURE__ */ jsx72("p", { children: rootDescription }),
3313
+ /* @__PURE__ */ jsx72(List2, { children: options.map(
3314
+ ({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ jsx72(
3315
+ ListItem11,
2716
3316
  __spreadValues({
2717
3317
  title,
2718
3318
  subtitle: description,
2719
- control: /* @__PURE__ */ jsx59(
2720
- ListItem4.Radio,
3319
+ control: /* @__PURE__ */ jsx72(
3320
+ ListItem11.Radio,
2721
3321
  {
2722
3322
  name: title,
2723
3323
  checked: selectedIndex === index,
@@ -2732,33 +3332,77 @@ function RadioItemRendererComponent(props) {
2732
3332
  title
2733
3333
  )
2734
3334
  ) }, `${id}-${selectedIndex}`),
2735
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx59(InlineAlert4, { type: "negative", children: validationState.message }),
3335
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx72(InlineAlert4, { type: "negative", children: validationState.message }),
2736
3336
  children
2737
3337
  ] });
2738
3338
  }
2739
3339
 
2740
3340
  // ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
2741
- import { jsx as jsx60 } from "react/jsx-runtime";
3341
+ import { jsx as jsx73 } from "react/jsx-runtime";
2742
3342
  var SelectInputRenderer = {
2743
3343
  canRenderType: "input-select",
2744
3344
  render: (props) => {
2745
3345
  switch (props.control) {
2746
3346
  case "radio":
2747
- return /* @__PURE__ */ jsx60(RadioInputRendererComponent, __spreadValues({}, props));
3347
+ return /* @__PURE__ */ jsx73(RadioInputRendererComponent, __spreadValues({}, props));
2748
3348
  case "radio-item":
2749
- return /* @__PURE__ */ jsx60(RadioItemRendererComponent, __spreadValues({}, props));
3349
+ return /* @__PURE__ */ jsx73(RadioItemRendererComponent, __spreadValues({}, props));
2750
3350
  case "tab":
2751
- return props.options.length > 3 ? /* @__PURE__ */ jsx60(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx60(TabInputRendererComponent, __spreadValues({}, props));
3351
+ return props.options.length > 3 ? /* @__PURE__ */ jsx73(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx73(TabInputRendererComponent, __spreadValues({}, props));
2752
3352
  case "segmented":
2753
- return props.options.length > 3 ? /* @__PURE__ */ jsx60(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx60(SegmentedInputRendererComponent, __spreadValues({}, props));
3353
+ return props.options.length > 3 ? /* @__PURE__ */ jsx73(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx73(SegmentedInputRendererComponent, __spreadValues({}, props));
2754
3354
  case "select":
2755
3355
  default:
2756
- return /* @__PURE__ */ jsx60(SelectInputRendererComponent, __spreadValues({}, props));
3356
+ return /* @__PURE__ */ jsx73(SelectInputRendererComponent, __spreadValues({}, props));
2757
3357
  }
2758
3358
  }
2759
3359
  };
2760
3360
  var SelectInputRenderer_default = SelectInputRenderer;
2761
3361
 
3362
+ // ../renderers/src/StatusListRenderer.tsx
3363
+ import { AvatarView as AvatarView4, Header as Header9, ListItem as ListItem12 } from "@transferwise/components";
3364
+ import { jsx as jsx74, jsxs as jsxs24 } from "react/jsx-runtime";
3365
+ var StatusListRenderer = {
3366
+ canRenderType: "status-list",
3367
+ render: ({ margin, items, title }) => /* @__PURE__ */ jsxs24("div", { className: getMargin(margin), children: [
3368
+ title ? /* @__PURE__ */ jsx74(Header9, { title }) : null,
3369
+ items.map((item) => {
3370
+ const { callToAction, description, icon, status, title: itemTitle } = item;
3371
+ return /* @__PURE__ */ jsx74(
3372
+ ListItem12,
3373
+ {
3374
+ title: itemTitle,
3375
+ subtitle: description,
3376
+ media: icon && "name" in icon ? /* @__PURE__ */ jsx74(AvatarView4, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ jsx74(DynamicIcon_default, { name: icon.name }) }) : void 0,
3377
+ additionalInfo: callToAction ? /* @__PURE__ */ jsx74(
3378
+ ListItem12.AdditionalInfo,
3379
+ {
3380
+ action: {
3381
+ href: callToAction.href,
3382
+ onClick: callToAction.href ? void 0 : callToAction.onClick,
3383
+ label: callToAction.title,
3384
+ target: "_blank"
3385
+ }
3386
+ }
3387
+ ) : void 0
3388
+ },
3389
+ JSON.stringify(item)
3390
+ );
3391
+ })
3392
+ ] })
3393
+ };
3394
+ var mapStatus = (status) => {
3395
+ switch (status) {
3396
+ case "done":
3397
+ return "positive";
3398
+ case "pending":
3399
+ return "pending";
3400
+ default:
3401
+ return void 0;
3402
+ }
3403
+ };
3404
+ var StatusListRenderer_default = StatusListRenderer;
3405
+
2762
3406
  // ../renderers/src/utils/useCustomTheme.ts
2763
3407
  import { useTheme } from "@wise/components-theming";
2764
3408
  import { useEffect as useEffect8, useMemo } from "react";
@@ -2780,11 +3424,11 @@ var useCustomTheme = (theme, trackEvent) => {
2780
3424
  // ../renderers/src/step/topbar/BackButton.tsx
2781
3425
  import { IconButton } from "@transferwise/components";
2782
3426
  import { ArrowLeft } from "@transferwise/icons";
2783
- import { useIntl as useIntl11 } from "react-intl";
3427
+ import { useIntl as useIntl14 } from "react-intl";
2784
3428
 
2785
3429
  // ../renderers/src/messages/back.messages.ts
2786
- import { defineMessages as defineMessages10 } from "react-intl";
2787
- var back_messages_default = defineMessages10({
3430
+ import { defineMessages as defineMessages11 } from "react-intl";
3431
+ var back_messages_default = defineMessages11({
2788
3432
  back: {
2789
3433
  id: "df.wise.back.label",
2790
3434
  defaultMessage: "Back",
@@ -2793,30 +3437,30 @@ var back_messages_default = defineMessages10({
2793
3437
  });
2794
3438
 
2795
3439
  // ../renderers/src/step/topbar/BackButton.tsx
2796
- import { jsx as jsx61, jsxs as jsxs19 } from "react/jsx-runtime";
3440
+ import { jsx as jsx75, jsxs as jsxs25 } from "react/jsx-runtime";
2797
3441
  function BackButton({ title, onClick }) {
2798
- const { formatMessage } = useIntl11();
2799
- return /* @__PURE__ */ jsxs19(IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
2800
- /* @__PURE__ */ jsx61("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
2801
- /* @__PURE__ */ jsx61(ArrowLeft, {})
3442
+ const { formatMessage } = useIntl14();
3443
+ return /* @__PURE__ */ jsxs25(IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
3444
+ /* @__PURE__ */ jsx75("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
3445
+ /* @__PURE__ */ jsx75(ArrowLeft, {})
2802
3446
  ] });
2803
3447
  }
2804
3448
 
2805
3449
  // ../renderers/src/step/topbar/Toolbar.tsx
2806
3450
  import { Button as Button7, IconButton as IconButton2 } from "@transferwise/components";
2807
- import { jsx as jsx62, jsxs as jsxs20 } from "react/jsx-runtime";
3451
+ import { jsx as jsx76, jsxs as jsxs26 } from "react/jsx-runtime";
2808
3452
  var Toolbar = ({ items }) => {
2809
- return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ jsx62("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ jsx62(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
3453
+ return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ jsx76("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ jsx76(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
2810
3454
  };
2811
3455
  function ToolbarButton(props) {
2812
- return prefersMedia(props.control) ? /* @__PURE__ */ jsx62(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ jsx62(TextToolbarButton, __spreadValues({}, props));
3456
+ return prefersMedia(props.control) ? /* @__PURE__ */ jsx76(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ jsx76(TextToolbarButton, __spreadValues({}, props));
2813
3457
  }
2814
3458
  function MediaToolbarButton(props) {
2815
3459
  var _a;
2816
3460
  const { context, control, media, accessibilityDescription, disabled, onClick } = props;
2817
3461
  const priority = getIconButtonPriority(control);
2818
3462
  const type = getSentiment2(context);
2819
- return /* @__PURE__ */ jsxs20(
3463
+ return /* @__PURE__ */ jsxs26(
2820
3464
  IconButton2,
2821
3465
  {
2822
3466
  className: "df-toolbar-button",
@@ -2826,7 +3470,7 @@ function MediaToolbarButton(props) {
2826
3470
  type,
2827
3471
  onClick,
2828
3472
  children: [
2829
- accessibilityDescription ? /* @__PURE__ */ jsx62("span", { className: "sr-only", children: accessibilityDescription }) : null,
3473
+ accessibilityDescription ? /* @__PURE__ */ jsx76("span", { className: "sr-only", children: accessibilityDescription }) : null,
2830
3474
  media ? (_a = getAddonStartMedia(media)) == null ? void 0 : _a.value : null
2831
3475
  ]
2832
3476
  }
@@ -2837,7 +3481,7 @@ function TextToolbarButton(props) {
2837
3481
  const addonStart = media ? getAddonStartMedia(media) : void 0;
2838
3482
  const priority = getPriority2(control);
2839
3483
  const sentiment = getSentiment2(context);
2840
- return /* @__PURE__ */ jsx62(
3484
+ return /* @__PURE__ */ jsx76(
2841
3485
  Button7,
2842
3486
  {
2843
3487
  v2: true,
@@ -2867,16 +3511,16 @@ var getIconButtonPriority = (control) => {
2867
3511
  };
2868
3512
 
2869
3513
  // ../renderers/src/step/topbar/TopBar.tsx
2870
- import { jsx as jsx63, jsxs as jsxs21 } from "react/jsx-runtime";
3514
+ import { jsx as jsx77, jsxs as jsxs27 } from "react/jsx-runtime";
2871
3515
  function TopBar({ back, toolbar }) {
2872
- return back || toolbar ? /* @__PURE__ */ jsxs21("div", { className: "d-flex m-b-2", children: [
2873
- back ? /* @__PURE__ */ jsx63(BackButton, __spreadValues({}, back)) : null,
2874
- toolbar ? /* @__PURE__ */ jsx63(Toolbar, __spreadValues({}, toolbar)) : null
3516
+ return back || toolbar ? /* @__PURE__ */ jsxs27("div", { className: "d-flex m-b-2", children: [
3517
+ back ? /* @__PURE__ */ jsx77(BackButton, __spreadValues({}, back)) : null,
3518
+ toolbar ? /* @__PURE__ */ jsx77(Toolbar, __spreadValues({}, toolbar)) : null
2875
3519
  ] }) : null;
2876
3520
  }
2877
3521
 
2878
3522
  // ../renderers/src/step/SplashCelebrationStepRenderer.tsx
2879
- import { jsx as jsx64, jsxs as jsxs22 } from "react/jsx-runtime";
3523
+ import { jsx as jsx78, jsxs as jsxs28 } from "react/jsx-runtime";
2880
3524
  var SplashCelebrationStepRenderer = {
2881
3525
  canRenderType: "step",
2882
3526
  canRender: ({ control }) => control === "splash-celebration",
@@ -2886,15 +3530,15 @@ function SplashCelebrationStepRendererComponent(props) {
2886
3530
  const { back, toolbar, children, footer, trackEvent } = props;
2887
3531
  const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
2888
3532
  useCustomTheme("forest-green", trackEvent);
2889
- return /* @__PURE__ */ jsxs22("div", { className: "splash-screen m-t-5", children: [
2890
- /* @__PURE__ */ jsx64(TopBar, { back, toolbar }),
3533
+ return /* @__PURE__ */ jsxs28("div", { className: "splash-screen m-t-5", children: [
3534
+ /* @__PURE__ */ jsx78(TopBar, { back, toolbar }),
2891
3535
  children,
2892
- hasFooter ? /* @__PURE__ */ jsx64("div", { className: "df-step-fixed__footer", children: footer }) : void 0
3536
+ hasFooter ? /* @__PURE__ */ jsx78("div", { className: "df-step-fixed__footer", children: footer }) : void 0
2893
3537
  ] });
2894
3538
  }
2895
3539
 
2896
3540
  // ../renderers/src/step/SplashStepRenderer.tsx
2897
- import { jsx as jsx65, jsxs as jsxs23 } from "react/jsx-runtime";
3541
+ import { jsx as jsx79, jsxs as jsxs29 } from "react/jsx-runtime";
2898
3542
  var SplashStepRenderer = {
2899
3543
  canRenderType: "step",
2900
3544
  canRender: ({ control }) => control === "splash",
@@ -2903,16 +3547,16 @@ var SplashStepRenderer = {
2903
3547
  function SplashStepRendererComponent(props) {
2904
3548
  const { back, toolbar, children, footer } = props;
2905
3549
  const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
2906
- return /* @__PURE__ */ jsxs23("div", { className: "splash-screen m-t-5", children: [
2907
- /* @__PURE__ */ jsx65(TopBar, { back, toolbar }),
3550
+ return /* @__PURE__ */ jsxs29("div", { className: "splash-screen m-t-5", children: [
3551
+ /* @__PURE__ */ jsx79(TopBar, { back, toolbar }),
2908
3552
  children,
2909
- hasFooter ? /* @__PURE__ */ jsx65("div", { className: "df-step-fixed__footer", children: footer }) : void 0
3553
+ hasFooter ? /* @__PURE__ */ jsx79("div", { className: "df-step-fixed__footer", children: footer }) : void 0
2910
3554
  ] });
2911
3555
  }
2912
3556
 
2913
3557
  // ../renderers/src/step/StepRenderer.tsx
2914
3558
  import { Alert as Alert2, Title as Title2 } from "@transferwise/components";
2915
- import { Fragment as Fragment8, jsx as jsx66, jsxs as jsxs24 } from "react/jsx-runtime";
3559
+ import { Fragment as Fragment12, jsx as jsx80, jsxs as jsxs30 } from "react/jsx-runtime";
2916
3560
  var StepRenderer = {
2917
3561
  canRenderType: "step",
2918
3562
  render: StepRendererComponent
@@ -2920,19 +3564,19 @@ var StepRenderer = {
2920
3564
  function StepRendererComponent(props) {
2921
3565
  const { back, description, error, title, children, toolbar, footer, tags } = props;
2922
3566
  const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
2923
- return /* @__PURE__ */ jsxs24("div", { children: [
2924
- /* @__PURE__ */ jsx66(TopBar, { back, toolbar }),
2925
- title || description ? /* @__PURE__ */ jsx66("div", { className: "m-b-4", children: /* @__PURE__ */ jsx66(Header6, { title, description, tags }) }) : void 0,
2926
- error ? /* @__PURE__ */ jsx66(Alert2, { type: "negative", className: "m-b-2", message: error }) : null,
3567
+ return /* @__PURE__ */ jsxs30("div", { children: [
3568
+ /* @__PURE__ */ jsx80(TopBar, { back, toolbar }),
3569
+ title || description ? /* @__PURE__ */ jsx80("div", { className: "m-b-4", children: /* @__PURE__ */ jsx80(Header10, { title, description, tags }) }) : void 0,
3570
+ error ? /* @__PURE__ */ jsx80(Alert2, { type: "negative", className: "m-b-2", message: error }) : null,
2927
3571
  children,
2928
- hasFooter ? /* @__PURE__ */ jsx66("div", { className: "df-step-fixed__footer", children: footer }) : void 0
3572
+ hasFooter ? /* @__PURE__ */ jsx80("div", { className: "df-step-fixed__footer", children: footer }) : void 0
2929
3573
  ] });
2930
3574
  }
2931
- var Header6 = ({ title, description, tags }) => {
3575
+ var Header10 = ({ title, description, tags }) => {
2932
3576
  const { titleType, alignmentClassName } = getHeaderStyle(tags);
2933
- return /* @__PURE__ */ jsxs24(Fragment8, { children: [
2934
- title ? /* @__PURE__ */ jsx66(Title2, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
2935
- description ? /* @__PURE__ */ jsx66("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
3577
+ return /* @__PURE__ */ jsxs30(Fragment12, { children: [
3578
+ title ? /* @__PURE__ */ jsx80(Title2, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
3579
+ description ? /* @__PURE__ */ jsx80("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
2936
3580
  ] });
2937
3581
  };
2938
3582
  var getHeaderStyle = (tags) => {
@@ -2944,27 +3588,27 @@ var getHeaderStyle = (tags) => {
2944
3588
 
2945
3589
  // ../renderers/src/TabsRenderer.tsx
2946
3590
  import { Chips, SegmentedControl as SegmentedControl2, Tabs as Tabs2 } from "@transferwise/components";
2947
- import { useState as useState10 } from "react";
2948
- import { jsx as jsx67, jsxs as jsxs25 } from "react/jsx-runtime";
3591
+ import { useState as useState11 } from "react";
3592
+ import { jsx as jsx81, jsxs as jsxs31 } from "react/jsx-runtime";
2949
3593
  var TabsRenderer = {
2950
3594
  canRenderType: "tabs",
2951
3595
  render: (props) => {
2952
3596
  switch (props.control) {
2953
3597
  case "segmented":
2954
3598
  if (props.tabs.length > 3) {
2955
- return /* @__PURE__ */ jsx67(TabsRendererComponent, __spreadValues({}, props));
3599
+ return /* @__PURE__ */ jsx81(TabsRendererComponent, __spreadValues({}, props));
2956
3600
  }
2957
- return /* @__PURE__ */ jsx67(SegmentedTabsRendererComponent, __spreadValues({}, props));
3601
+ return /* @__PURE__ */ jsx81(SegmentedTabsRendererComponent, __spreadValues({}, props));
2958
3602
  case "chips":
2959
- return /* @__PURE__ */ jsx67(ChipsTabsRendererComponent, __spreadValues({}, props));
3603
+ return /* @__PURE__ */ jsx81(ChipsTabsRendererComponent, __spreadValues({}, props));
2960
3604
  default:
2961
- return /* @__PURE__ */ jsx67(TabsRendererComponent, __spreadValues({}, props));
3605
+ return /* @__PURE__ */ jsx81(TabsRendererComponent, __spreadValues({}, props));
2962
3606
  }
2963
3607
  }
2964
3608
  };
2965
3609
  function TabsRendererComponent({ uid, margin, tabs }) {
2966
- const [selectedIndex, setSelectedIndex] = useState10(0);
2967
- return /* @__PURE__ */ jsx67("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx67(
3610
+ const [selectedIndex, setSelectedIndex] = useState11(0);
3611
+ return /* @__PURE__ */ jsx81("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx81(
2968
3612
  Tabs2,
2969
3613
  {
2970
3614
  name: uid,
@@ -2972,7 +3616,7 @@ function TabsRendererComponent({ uid, margin, tabs }) {
2972
3616
  tabs: tabs.map((option) => ({
2973
3617
  title: option.title,
2974
3618
  disabled: false,
2975
- content: /* @__PURE__ */ jsxs25("div", { className: "m-t-2", children: [
3619
+ content: /* @__PURE__ */ jsxs31("div", { className: "m-t-2", children: [
2976
3620
  " ",
2977
3621
  option.children,
2978
3622
  " "
@@ -2984,9 +3628,9 @@ function TabsRendererComponent({ uid, margin, tabs }) {
2984
3628
  }
2985
3629
  function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
2986
3630
  var _a;
2987
- const [selectedIndex, setSelectedIndex] = useState10(0);
2988
- return /* @__PURE__ */ jsxs25("div", { className: getMargin(margin), children: [
2989
- /* @__PURE__ */ jsx67(
3631
+ const [selectedIndex, setSelectedIndex] = useState11(0);
3632
+ return /* @__PURE__ */ jsxs31("div", { className: getMargin(margin), children: [
3633
+ /* @__PURE__ */ jsx81(
2990
3634
  SegmentedControl2,
2991
3635
  {
2992
3636
  name: uid,
@@ -3001,14 +3645,14 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
3001
3645
  onChange: (value) => setSelectedIndex(Number(value))
3002
3646
  }
3003
3647
  ),
3004
- /* @__PURE__ */ jsx67("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
3648
+ /* @__PURE__ */ jsx81("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
3005
3649
  ] });
3006
3650
  }
3007
3651
  function ChipsTabsRendererComponent({ margin, tabs }) {
3008
3652
  var _a;
3009
- const [selectedIndex, setSelectedIndex] = useState10(0);
3010
- return /* @__PURE__ */ jsxs25("div", { className: getMargin(margin), children: [
3011
- /* @__PURE__ */ jsx67("div", { className: "chips-container", children: /* @__PURE__ */ jsx67(
3653
+ const [selectedIndex, setSelectedIndex] = useState11(0);
3654
+ return /* @__PURE__ */ jsxs31("div", { className: getMargin(margin), children: [
3655
+ /* @__PURE__ */ jsx81("div", { className: "chips-container", children: /* @__PURE__ */ jsx81(
3012
3656
  Chips,
3013
3657
  {
3014
3658
  chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
@@ -3016,12 +3660,12 @@ function ChipsTabsRendererComponent({ margin, tabs }) {
3016
3660
  onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
3017
3661
  }
3018
3662
  ) }),
3019
- /* @__PURE__ */ jsx67("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
3663
+ /* @__PURE__ */ jsx81("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
3020
3664
  ] });
3021
3665
  }
3022
3666
 
3023
3667
  // ../renderers/src/TextInputRenderer.tsx
3024
- import { InputGroup as InputGroup3 } from "@transferwise/components";
3668
+ import { InputGroup as InputGroup4 } from "@transferwise/components";
3025
3669
 
3026
3670
  // ../renderers/src/components/VariableTextInput.tsx
3027
3671
  import {
@@ -3031,7 +3675,7 @@ import {
3031
3675
  TextArea,
3032
3676
  TextareaWithDisplayFormat
3033
3677
  } from "@transferwise/components";
3034
- import { jsx as jsx68 } from "react/jsx-runtime";
3678
+ import { jsx as jsx82 } from "react/jsx-runtime";
3035
3679
  var commonKeys = [
3036
3680
  "autoComplete",
3037
3681
  "autoCapitalize",
@@ -3050,12 +3694,12 @@ function VariableTextInput(inputProps) {
3050
3694
  const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
3051
3695
  switch (control) {
3052
3696
  case "email":
3053
- return /* @__PURE__ */ jsx68(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
3697
+ return /* @__PURE__ */ jsx82(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
3054
3698
  case "password":
3055
- return /* @__PURE__ */ jsx68(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
3699
+ return /* @__PURE__ */ jsx82(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
3056
3700
  case "numeric": {
3057
3701
  const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
3058
- return /* @__PURE__ */ jsx68(
3702
+ return /* @__PURE__ */ jsx82(
3059
3703
  TextInput,
3060
3704
  __spreadProps(__spreadValues({}, numericProps), {
3061
3705
  onChange: (newValue) => {
@@ -3066,9 +3710,9 @@ function VariableTextInput(inputProps) {
3066
3710
  );
3067
3711
  }
3068
3712
  case "phone-number":
3069
- return /* @__PURE__ */ jsx68(PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
3713
+ return /* @__PURE__ */ jsx82(PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
3070
3714
  default: {
3071
- return /* @__PURE__ */ jsx68(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
3715
+ return /* @__PURE__ */ jsx82(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
3072
3716
  }
3073
3717
  }
3074
3718
  }
@@ -3076,11 +3720,11 @@ function TextInput(props) {
3076
3720
  const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
3077
3721
  const InputWithPattern = control === "textarea" ? TextareaWithDisplayFormat : InputWithDisplayFormat;
3078
3722
  const InputWithoutPattern = control === "textarea" ? TextArea : Input5;
3079
- return displayFormat ? /* @__PURE__ */ jsx68(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ jsx68(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
3723
+ return displayFormat ? /* @__PURE__ */ jsx82(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ jsx82(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
3080
3724
  }
3081
3725
 
3082
3726
  // ../renderers/src/TextInputRenderer.tsx
3083
- import { jsx as jsx69 } from "react/jsx-runtime";
3727
+ import { jsx as jsx83 } from "react/jsx-runtime";
3084
3728
  var TextInputRenderer = {
3085
3729
  canRenderType: "input-text",
3086
3730
  render: (props) => {
@@ -3113,7 +3757,7 @@ var TextInputRenderer = {
3113
3757
  }
3114
3758
  }
3115
3759
  });
3116
- return /* @__PURE__ */ jsx69(
3760
+ return /* @__PURE__ */ jsx83(
3117
3761
  FieldInput_default,
3118
3762
  {
3119
3763
  id,
@@ -3121,7 +3765,7 @@ var TextInputRenderer = {
3121
3765
  description,
3122
3766
  validation: validationState,
3123
3767
  help,
3124
- children: /* @__PURE__ */ jsx69(InputGroup3, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx69(VariableTextInput, __spreadValues({}, inputProps)) })
3768
+ children: /* @__PURE__ */ jsx83(InputGroup4, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx83(VariableTextInput, __spreadValues({}, inputProps)) })
3125
3769
  }
3126
3770
  );
3127
3771
  }
@@ -3135,7 +3779,7 @@ import { Status as Status2, Upload, UploadInput as UploadInput2 } from "@transfe
3135
3779
  var getRandomId = () => Math.random().toString(36).substring(2);
3136
3780
 
3137
3781
  // ../renderers/src/UploadInputRenderer.tsx
3138
- import { jsx as jsx70 } from "react/jsx-runtime";
3782
+ import { jsx as jsx84 } from "react/jsx-runtime";
3139
3783
  var UploadInputRenderer = {
3140
3784
  canRenderType: "input-upload",
3141
3785
  render: (props) => {
@@ -3151,14 +3795,14 @@ var UploadInputRenderer = {
3151
3795
  };
3152
3796
  return (
3153
3797
  // We don't pass help here as there is no sensible place to display it
3154
- /* @__PURE__ */ jsx70(
3798
+ /* @__PURE__ */ jsx84(
3155
3799
  UploadFieldInput_default,
3156
3800
  {
3157
3801
  id,
3158
3802
  label: void 0,
3159
3803
  description: void 0,
3160
3804
  validation: validationState,
3161
- children: /* @__PURE__ */ jsx70(
3805
+ children: /* @__PURE__ */ jsx84(
3162
3806
  UploadInput2,
3163
3807
  {
3164
3808
  id,
@@ -3224,7 +3868,7 @@ var LargeUploadRenderer = {
3224
3868
  };
3225
3869
  const filetypes = acceptsToFileTypes(accepts);
3226
3870
  const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
3227
- return /* @__PURE__ */ jsx70(
3871
+ return /* @__PURE__ */ jsx84(
3228
3872
  FieldInput_default,
3229
3873
  {
3230
3874
  id,
@@ -3232,7 +3876,7 @@ var LargeUploadRenderer = {
3232
3876
  description,
3233
3877
  validation: validationState,
3234
3878
  help,
3235
- children: /* @__PURE__ */ jsx70(
3879
+ children: /* @__PURE__ */ jsx84(
3236
3880
  Upload,
3237
3881
  __spreadProps(__spreadValues({}, uploadProps), {
3238
3882
  usAccept,
@@ -3247,511 +3891,62 @@ var LargeUploadRenderer = {
3247
3891
  }
3248
3892
  };
3249
3893
 
3250
- // ../renderers/src/ProgressRenderer.tsx
3251
- import { ProgressBar } from "@transferwise/components";
3252
- import { jsx as jsx71 } from "react/jsx-runtime";
3253
- var ProgressRenderer = {
3254
- canRenderType: "progress",
3255
- render: ({ uid, title, help, progress, progressText, margin, description }) => {
3256
- return /* @__PURE__ */ jsx71(
3257
- ProgressBar,
3258
- {
3259
- id: uid,
3260
- className: getMargin(margin),
3261
- title: title && help ? /* @__PURE__ */ jsx71(LabelContentWithHelp, { text: title, help }) : title,
3262
- description,
3263
- progress: {
3264
- max: 1,
3265
- value: progress
3266
- },
3267
- textEnd: progressText
3268
- }
3269
- );
3270
- }
3271
- };
3272
-
3273
- // ../renderers/src/ReviewRenderer.tsx
3274
- import { ListItem as ListItem7, Markdown as Markdown6, Popover } from "@transferwise/components";
3275
- import { QuestionMarkCircle } from "@transferwise/icons";
3276
- import { useIntl as useIntl12 } from "react-intl";
3277
-
3278
- // ../renderers/src/components/Header.tsx
3279
- import { Header as DSHeader } from "@transferwise/components";
3280
- import { jsx as jsx72 } from "react/jsx-runtime";
3281
- var Header7 = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ jsx72(DSHeader, { title: title != null ? title : "", action: getHeaderAction2(callToAction) });
3282
- var getHeaderAction2 = (callToAction) => {
3283
- if (!callToAction) {
3284
- return void 0;
3285
- }
3286
- const { accessibilityDescription, href, title, onClick } = callToAction;
3287
- return href ? {
3288
- "aria-label": accessibilityDescription,
3289
- text: title,
3290
- href,
3291
- target: "_blank"
3292
- } : {
3293
- "aria-label": accessibilityDescription,
3294
- text: title,
3295
- onClick: (event) => {
3296
- event.preventDefault();
3297
- onClick();
3298
- }
3299
- };
3300
- };
3301
-
3302
- // ../renderers/src/utils/listItem/getAdditionalInfo.tsx
3303
- import { ListItem as ListItem5 } from "@transferwise/components";
3304
- import { jsx as jsx73 } from "react/jsx-runtime";
3305
- var getAdditionalInfo = (additionalInfo) => {
3306
- if (!additionalInfo) {
3307
- return void 0;
3308
- }
3309
- const { href, text, onClick } = additionalInfo;
3310
- if (href || onClick) {
3311
- return /* @__PURE__ */ jsx73(
3312
- ListItem5.AdditionalInfo,
3313
- {
3314
- action: {
3315
- label: text,
3316
- href,
3317
- onClick,
3318
- target: "_blank"
3319
- }
3320
- }
3321
- );
3322
- }
3323
- return /* @__PURE__ */ jsx73(ListItem5.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
3324
- };
3325
-
3326
- // ../renderers/src/utils/listItem/getCTAControl.tsx
3327
- import { ListItem as ListItem6 } from "@transferwise/components";
3328
- import { jsx as jsx74 } from "react/jsx-runtime";
3329
- var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
3330
- if (!callToAction) {
3331
- return void 0;
3332
- }
3333
- const { accessibilityDescription, href, title, onClick } = callToAction;
3334
- const priority = ctaSecondary ? "secondary" : "secondary-neutral";
3335
- if (href) {
3336
- return /* @__PURE__ */ jsx74(
3337
- ListItem6.Button,
3338
- {
3339
- href,
3340
- partiallyInteractive: !fullyInteractive,
3341
- priority,
3342
- "aria-description": accessibilityDescription,
3343
- children: title
3344
- }
3345
- );
3346
- }
3347
- return /* @__PURE__ */ jsx74(
3348
- ListItem6.Button,
3894
+ // ../renderers/src/UpsellRenderer.tsx
3895
+ import { Nudge } from "@transferwise/components";
3896
+ import { useState as useState12 } from "react";
3897
+ import { jsx as jsx85 } from "react/jsx-runtime";
3898
+ var UpsellRenderer = {
3899
+ canRenderType: "upsell",
3900
+ render: UpsellRendererComponent
3901
+ };
3902
+ function UpsellRendererComponent(props) {
3903
+ const { text, callToAction, media, margin, onDismiss } = props;
3904
+ const [isVisible, setIsVisible] = useState12(true);
3905
+ return isVisible ? /* @__PURE__ */ jsx85(
3906
+ Nudge,
3349
3907
  {
3350
- "aria-description": accessibilityDescription,
3351
- partiallyInteractive: !fullyInteractive,
3352
- priority,
3353
- onClick,
3354
- children: title
3355
- }
3356
- );
3357
- };
3358
-
3359
- // ../renderers/src/utils/listItem/shouldUseAvatar.ts
3360
- var shouldUseAvatar = (control, tags) => {
3361
- var _a;
3362
- return control === "with-avatar" || ((_a = tags == null ? void 0 : tags.includes("with-avatar")) != null ? _a : false);
3363
- };
3364
-
3365
- // ../renderers/src/ReviewRenderer.tsx
3366
- import { jsx as jsx75, jsxs as jsxs26 } from "react/jsx-runtime";
3367
- var IGNORED_CONTROLS = [
3368
- "horizontal",
3369
- "horizontal-end-aligned",
3370
- "horizontal-start-aligned",
3371
- "vertical-two-column"
3372
- ];
3373
- var ReviewRenderer = {
3374
- canRenderType: "review",
3375
- canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
3376
- render: (props) => /* @__PURE__ */ jsx75(Review, __spreadValues({}, props))
3377
- };
3378
- var Review = ({
3379
- callToAction,
3380
- control,
3381
- margin,
3382
- fields,
3383
- tags,
3384
- title,
3385
- trackEvent
3386
- }) => {
3387
- const intl = useIntl12();
3388
- return /* @__PURE__ */ jsxs26("div", { className: getMargin(margin), children: [
3389
- /* @__PURE__ */ jsx75(Header7, { title, callToAction }),
3390
- fields.map((field) => {
3391
- var _a, _b, _c;
3392
- const {
3393
- label,
3394
- value,
3395
- media,
3396
- additionalInfo,
3397
- inlineAlert,
3398
- help,
3399
- analyticsId,
3400
- callToAction: itemCallToAction,
3401
- tags: itemTags
3402
- } = field;
3403
- const controlOptions = {
3404
- ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
3405
- fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
3406
- };
3407
- return /* @__PURE__ */ jsx75(
3408
- ListItem7,
3409
- {
3410
- title: value,
3411
- subtitle: label,
3412
- inverted: true,
3413
- media: getMedia(media, shouldUseAvatar(control, itemTags)),
3414
- control: (_c = getCTAControl(itemCallToAction, controlOptions)) != null ? _c : help ? getHelpControl(
3415
- help,
3416
- intl.formatMessage(help_messages_default.helpAria),
3417
- () => trackEvent("Help Pressed", { layoutItemId: analyticsId })
3418
- ) : void 0,
3419
- prompt: getInlineAlert(inlineAlert),
3420
- additionalInfo: getAdditionalInfo(additionalInfo)
3421
- },
3422
- JSON.stringify(field)
3423
- );
3424
- })
3425
- ] });
3426
- };
3427
- var getHelpControl = (help, ariaLabel, onClick) => {
3428
- return /* @__PURE__ */ jsx75(Popover, { content: /* @__PURE__ */ jsx75(Markdown6, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ jsx75(ListItem7.IconButton, { partiallyInteractive: true, "aria-label": ariaLabel, onClick, children: /* @__PURE__ */ jsx75(QuestionMarkCircle, {}) }) });
3429
- };
3430
- var ReviewRenderer_default = ReviewRenderer;
3431
-
3432
- // ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
3433
- import { ListItem as ListItem8 } from "@transferwise/components";
3434
-
3435
- // ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
3436
- import { Header as Header9, SearchInput } from "@transferwise/components";
3437
- import { useState as useState11 } from "react";
3438
- import { useIntl as useIntl14 } from "react-intl";
3439
-
3440
- // ../renderers/src/messages/filter.messages.ts
3441
- import { defineMessages as defineMessages11 } from "react-intl";
3442
- var filter_messages_default = defineMessages11({
3443
- placeholder: {
3444
- id: "df.wise.filter.placeholder",
3445
- defaultMessage: "Start typing to search",
3446
- description: "Placeholder for the filter input"
3447
- },
3448
- results: {
3449
- id: "df.wise.filter.results",
3450
- defaultMessage: "Search results",
3451
- description: "Label for the results section"
3452
- },
3453
- noResults: {
3454
- id: "df.wise.filter.noResults",
3455
- defaultMessage: "No results",
3456
- description: "Message for if there are no results"
3457
- }
3458
- });
3459
-
3460
- // ../renderers/src/DecisionRenderer/filter-and-sort-decision-options.ts
3461
- function filterAndSortDecisionOptions(selectOptions, query) {
3462
- const upperQuery = normalizeAndRemoveAccents(query);
3463
- const filteredItems = selectOptions.filter((option) => {
3464
- var _a, _b, _c, _d;
3465
- const searchableWords = [
3466
- option.title,
3467
- option.description,
3468
- option.additionalText,
3469
- (_a = option.supportingValues) == null ? void 0 : _a.value,
3470
- (_b = option.supportingValues) == null ? void 0 : _b.subvalue,
3471
- ...(_c = option.keywords) != null ? _c : []
3472
- ];
3473
- return (_d = searchableWords.some(
3474
- (word) => word && normalizeAndRemoveAccents(word).includes(upperQuery)
3475
- )) != null ? _d : false;
3476
- });
3477
- return [...filteredItems].sort((a, b) => {
3478
- if (a.disabled && !b.disabled) {
3479
- return 1;
3480
- }
3481
- if (!a.disabled && b.disabled) {
3482
- return -1;
3483
- }
3484
- const aTitleUpper = a.title.toUpperCase();
3485
- const bTitleUpper = b.title.toUpperCase();
3486
- const aTitleStarts = aTitleUpper.startsWith(upperQuery);
3487
- const bTitleStarts = bTitleUpper.startsWith(upperQuery);
3488
- if (aTitleStarts && !bTitleStarts) {
3489
- return -1;
3490
- }
3491
- if (!aTitleStarts && bTitleStarts) {
3492
- return 1;
3493
- }
3494
- const aWordStarts = aTitleUpper.split(" ").some((word) => word.startsWith(upperQuery));
3495
- const bWordStarts = bTitleUpper.split(" ").some((word) => word.startsWith(upperQuery));
3496
- if (aWordStarts && !bWordStarts) {
3497
- return -1;
3498
- }
3499
- if (!aWordStarts && bWordStarts) {
3500
- return 1;
3908
+ className: getMargin(margin),
3909
+ mediaName: getMediaName(media),
3910
+ title: text,
3911
+ link: callToAction.title,
3912
+ href: callToAction.href,
3913
+ onClick: callToAction.onClick,
3914
+ onDismiss: onDismiss ? () => {
3915
+ setIsVisible(false);
3916
+ onDismiss();
3917
+ } : void 0
3501
3918
  }
3502
- return a.title.localeCompare(b.title);
3503
- });
3919
+ ) : null;
3504
3920
  }
3505
- var normalizeAndRemoveAccents = (text) => text.trim().toLowerCase().normalize("NFKD").replace(new RegExp("\\p{Diacritic}", "gu"), "");
3506
-
3507
- // ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
3508
- import { Header as Header8, Section } from "@transferwise/components";
3509
- import { useIntl as useIntl13 } from "react-intl";
3510
- import { Fragment as Fragment9, jsx as jsx76, jsxs as jsxs27 } from "react/jsx-runtime";
3511
- var groupingTags2 = Object.keys(group_messages_default).filter((key) => key !== "all");
3512
- var isGroupedDecision = (options) => {
3513
- return getGroupsFromTags(groupingTags2, options).length > 0;
3514
- };
3515
- var GroupedDecisionList = (_a) => {
3516
- var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
3517
- const { formatMessage } = useIntl13();
3518
- const { options } = rest;
3519
- const itemsByTag = [...getGroupsFromTags(groupingTags2, options), { tag: "all", items: options }];
3520
- return /* @__PURE__ */ jsx76(Fragment9, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ jsxs27(Section, { children: [
3521
- /* @__PURE__ */ jsx76(
3522
- Header8,
3523
- {
3524
- as: "h2",
3525
- title: tag in group_messages_default ? formatMessage(group_messages_default[tag]) : tag
3526
- }
3527
- ),
3528
- renderDecisionList2(__spreadProps(__spreadValues({}, rest), { options: items }))
3529
- ] }, tag)) });
3530
- };
3531
-
3532
- // ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
3533
- import { Fragment as Fragment10, jsx as jsx77, jsxs as jsxs28 } from "react/jsx-runtime";
3534
- var DecisionWrapper = (props) => {
3535
- return /* @__PURE__ */ jsxs28("div", { className: getMargin(props.margin), children: [
3536
- props.title && /* @__PURE__ */ jsx77(Header9, { as: "h2", title: props.title }),
3537
- props.control === "filtered" ? /* @__PURE__ */ jsx77(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsx77(UnfilteredDecisionList, __spreadValues({}, props))
3538
- ] });
3539
- };
3540
- var UnfilteredDecisionList = (_a) => {
3541
- var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
3542
- return isGroupedDecision(rest.options) ? /* @__PURE__ */ jsx77(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList2 })) : renderDecisionList2(rest);
3543
- };
3544
- var FilteredDecisionList = (props) => {
3545
- const { formatMessage } = useIntl14();
3546
- const [query, setQuery] = useState11("");
3547
- const { control, options, renderDecisionList: renderDecisionList2 } = props;
3548
- const filteredOptions = (query == null ? void 0 : query.length) > 0 ? filterAndSortDecisionOptions(options, query) : options;
3549
- const isGrouped = isGroupedDecision(options);
3550
- return /* @__PURE__ */ jsxs28(Fragment10, { children: [
3551
- /* @__PURE__ */ jsx77(
3552
- SearchInput,
3553
- {
3554
- placeholder: formatMessage(filter_messages_default.placeholder),
3555
- value: query,
3556
- className: "m-b-2",
3557
- onChange: (e) => {
3558
- var _a;
3559
- return setQuery((_a = e.target.value) != null ? _a : "");
3560
- }
3561
- }
3562
- ),
3563
- isGrouped && query.length === 0 ? /* @__PURE__ */ jsx77(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsxs28(Fragment10, { children: [
3564
- query.length > 0 && /* @__PURE__ */ jsx77(Header9, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
3565
- filteredOptions.length > 0 ? renderDecisionList2({
3566
- control,
3567
- className: query.length === 0 ? "m-t-3" : "",
3568
- options: filteredOptions
3569
- }) : /* @__PURE__ */ jsx77("p", { children: formatMessage(filter_messages_default.noResults) })
3570
- ] })
3571
- ] });
3572
- };
3573
-
3574
- // ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
3575
- import { Fragment as Fragment11, jsx as jsx78 } from "react/jsx-runtime";
3576
- var DecisionRenderer = {
3577
- canRenderType: "decision",
3578
- render: (props) => /* @__PURE__ */ jsx78(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }))
3579
- };
3580
- var renderDecisionList = ({ options, control }) => {
3581
- return /* @__PURE__ */ jsx78(Fragment11, { children: options.map((_a) => {
3582
- var _b = _a, { onClick } = _b, rest = __objRest(_b, ["onClick"]);
3583
- const {
3584
- description,
3585
- disabled,
3586
- media,
3587
- title: itemTitle,
3588
- href,
3589
- additionalText,
3590
- inlineAlert,
3591
- supportingValues,
3592
- tags
3593
- } = rest;
3594
- return /* @__PURE__ */ jsx78(
3595
- ListItem8,
3596
- {
3597
- title: itemTitle,
3598
- subtitle: description,
3599
- spotlight: control === "spotlight" ? (tags == null ? void 0 : tags.includes("spotlight-active")) ? "active" : "inactive" : void 0,
3600
- disabled,
3601
- valueTitle: supportingValues == null ? void 0 : supportingValues.value,
3602
- valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
3603
- media: getMedia(media, shouldUseAvatar(control, tags)),
3604
- prompt: getInlineAlert(inlineAlert),
3605
- additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
3606
- control: href ? /* @__PURE__ */ jsx78(ListItem8.Navigation, { href, target: "_blank" }) : /* @__PURE__ */ jsx78(ListItem8.Navigation, { onClick })
3607
- },
3608
- JSON.stringify(rest)
3609
- );
3610
- }) });
3611
- };
3612
- var DecisionRenderer_default = DecisionRenderer;
3613
-
3614
- // ../renderers/src/ListRenderer.tsx
3615
- import { ListItem as ListItem9 } from "@transferwise/components";
3616
- import { jsx as jsx79, jsxs as jsxs29 } from "react/jsx-runtime";
3617
- var ListRenderer = {
3618
- canRenderType: "list",
3619
- render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ jsxs29("div", { className: getMargin(margin), children: [
3620
- /* @__PURE__ */ jsx79(Header7, { title, callToAction }),
3621
- items.map((item) => {
3622
- var _a, _b;
3623
- const {
3624
- title: itemTitle,
3625
- description,
3626
- supportingValues,
3627
- media,
3628
- additionalInfo,
3629
- inlineAlert,
3630
- callToAction: itemCallToAction,
3631
- tags: itemTags
3632
- } = item;
3633
- const controlOptions = {
3634
- ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
3635
- fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
3636
- };
3637
- return /* @__PURE__ */ jsx79(
3638
- ListItem9,
3639
- {
3640
- title: itemTitle,
3641
- subtitle: description,
3642
- valueTitle: supportingValues == null ? void 0 : supportingValues.value,
3643
- valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
3644
- media: getMedia(media, shouldUseAvatar(control, itemTags)),
3645
- prompt: getInlineAlert(inlineAlert),
3646
- additionalInfo: getAdditionalInfo(additionalInfo),
3647
- control: getCTAControl(itemCallToAction, controlOptions)
3648
- },
3649
- itemTitle
3650
- );
3651
- })
3652
- ] })
3653
- };
3654
- var ListRenderer_default = ListRenderer;
3655
-
3656
- // ../renderers/src/StatusListRenderer.tsx
3657
- import { AvatarView as AvatarView4, Header as Header10, ListItem as ListItem10 } from "@transferwise/components";
3658
- import { jsx as jsx80, jsxs as jsxs30 } from "react/jsx-runtime";
3659
- var StatusListRenderer = {
3660
- canRenderType: "status-list",
3661
- render: ({ margin, items, title }) => /* @__PURE__ */ jsxs30("div", { className: getMargin(margin), children: [
3662
- title ? /* @__PURE__ */ jsx80(Header10, { title }) : null,
3663
- items.map((item) => {
3664
- const { callToAction, description, icon, status, title: itemTitle } = item;
3665
- return /* @__PURE__ */ jsx80(
3666
- ListItem10,
3667
- {
3668
- title: itemTitle,
3669
- subtitle: description,
3670
- media: icon && "name" in icon ? /* @__PURE__ */ jsx80(AvatarView4, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ jsx80(DynamicIcon_default, { name: icon.name }) }) : void 0,
3671
- additionalInfo: callToAction ? /* @__PURE__ */ jsx80(
3672
- ListItem10.AdditionalInfo,
3673
- {
3674
- action: {
3675
- href: callToAction.href,
3676
- onClick: callToAction.href ? void 0 : callToAction.onClick,
3677
- label: callToAction.title,
3678
- target: "_blank"
3679
- }
3680
- }
3681
- ) : void 0
3682
- },
3683
- JSON.stringify(item)
3684
- );
3685
- })
3686
- ] })
3687
- };
3688
- var mapStatus = (status) => {
3689
- switch (status) {
3690
- case "done":
3691
- return "positive";
3692
- case "pending":
3693
- return "pending";
3694
- default:
3695
- return void 0;
3696
- }
3697
- };
3698
- var StatusListRenderer_default = StatusListRenderer;
3699
-
3700
- // ../renderers/src/ReviewLegacyRenderer.tsx
3701
- import { DefinitionList } from "@transferwise/components";
3702
- import { Fragment as Fragment12, jsx as jsx81, jsxs as jsxs31 } from "react/jsx-runtime";
3703
- var ReviewRenderer2 = {
3704
- canRenderType: "review",
3705
- render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
3706
- const orientation = mapControlToDefinitionListLayout(control);
3707
- return /* @__PURE__ */ jsxs31("div", { className: getMargin(margin), children: [
3708
- /* @__PURE__ */ jsx81(Header7, { title, callToAction }),
3709
- /* @__PURE__ */ jsx81("div", { className: margin, children: /* @__PURE__ */ jsx81(
3710
- DefinitionList,
3711
- {
3712
- layout: orientation,
3713
- definitions: fields.map(
3714
- ({ label, value, help, analyticsId: fieldAnalyticsId }, index) => ({
3715
- key: String(index),
3716
- value,
3717
- title: getFieldLabel(
3718
- label,
3719
- help,
3720
- () => trackEvent("Help Pressed", { layoutItemId: fieldAnalyticsId })
3721
- )
3722
- })
3723
- )
3724
- }
3725
- ) })
3726
- ] });
3727
- }
3728
- };
3729
- var ReviewLegacyRenderer_default = ReviewRenderer2;
3730
- var mapControlToDefinitionListLayout = (control) => {
3731
- switch (control) {
3732
- case "horizontal":
3733
- case "horizontal-end-aligned":
3734
- return "HORIZONTAL_RIGHT_ALIGNED";
3735
- case "horizontal-start-aligned":
3736
- return "HORIZONTAL_LEFT_ALIGNED";
3737
- case "vertical-two-column":
3738
- return "VERTICAL_TWO_COLUMN";
3739
- case "vertical":
3740
- case "vertical-one-column":
3741
- default:
3742
- return "VERTICAL_ONE_COLUMN";
3743
- }
3744
- };
3745
- var getFieldLabel = (label, help, onClick) => {
3746
- if (help) {
3747
- return /* @__PURE__ */ jsxs31(Fragment12, { children: [
3748
- label,
3749
- " ",
3750
- /* @__PURE__ */ jsx81(Help_default, { help, onClick })
3751
- ] });
3921
+ var urnPrefix2 = "urn:wise:illustrations:";
3922
+ var getMediaName = (media) => {
3923
+ if (media && media.type === "image" && media.uri.startsWith(urnPrefix2)) {
3924
+ const mediaName = media.uri.substring(urnPrefix2.length);
3925
+ if (supportedMediaNames.includes(mediaName)) {
3926
+ return mediaName;
3927
+ }
3752
3928
  }
3753
- return label;
3754
- };
3929
+ return "globe";
3930
+ };
3931
+ var supportedMediaNames = [
3932
+ "backpack",
3933
+ "business-card",
3934
+ "calendar",
3935
+ "digital-card",
3936
+ "digital-card-2",
3937
+ "flower",
3938
+ "gear",
3939
+ "globe",
3940
+ "heart",
3941
+ "invite-letter",
3942
+ "lock",
3943
+ "magnifying-glass",
3944
+ "multi-currency",
3945
+ "personal-card",
3946
+ "plane",
3947
+ "shopping-bag",
3948
+ "wallet"
3949
+ ];
3755
3950
 
3756
3951
  // ../renderers/src/getWiseRenderers.ts
3757
3952
  var getWiseRenderers = () => [
@@ -3775,10 +3970,11 @@ var getWiseRenderers = () => [
3775
3970
  ListRenderer_default,
3776
3971
  LoadingIndicatorRenderer_default,
3777
3972
  MarkdownRenderer_default,
3973
+ MediaRenderer,
3778
3974
  ModalRenderer,
3779
3975
  ModalLayoutRenderer_default,
3780
3976
  MoneyInputRenderer,
3781
- MultiSelectInputRenderer_default,
3977
+ MultiSelectInputRenderer,
3782
3978
  MultiUploadInputRenderer_default,
3783
3979
  NumberInputRenderer_default,
3784
3980
  ParagraphRenderer_default,
@@ -3792,6 +3988,7 @@ var getWiseRenderers = () => [
3792
3988
  TabsRenderer,
3793
3989
  TextInputRenderer_default,
3794
3990
  UploadInputRenderer,
3991
+ UpsellRenderer,
3795
3992
  SplashStepRenderer,
3796
3993
  SplashCelebrationStepRenderer,
3797
3994
  StepRenderer,
@@ -3800,7 +3997,7 @@ var getWiseRenderers = () => [
3800
3997
  ];
3801
3998
 
3802
3999
  // ../renderers/src/subflow/getSubflowRenderer.tsx
3803
- import { jsx as jsx82 } from "react/jsx-runtime";
4000
+ import { jsx as jsx86 } from "react/jsx-runtime";
3804
4001
  var getSubflowRenderer = ({
3805
4002
  Component: Component2,
3806
4003
  canRender
@@ -3809,7 +4006,7 @@ var getSubflowRenderer = ({
3809
4006
  canRenderType: "subflow",
3810
4007
  canRender,
3811
4008
  render: (props) => {
3812
- return /* @__PURE__ */ jsx82(
4009
+ return /* @__PURE__ */ jsx86(
3813
4010
  Component2,
3814
4011
  {
3815
4012
  presentation: props.presentation,
@@ -3889,24 +4086,24 @@ var handleRejection = (error) => {
3889
4086
  // src/dynamicFlow/DynamicFlowModal.tsx
3890
4087
  import { useDynamicFlowModal } from "@wise/dynamic-flow-client";
3891
4088
  import { Modal as Modal5 } from "@transferwise/components";
3892
- import { jsx as jsx83 } from "react/jsx-runtime";
4089
+ import { jsx as jsx87 } from "react/jsx-runtime";
3893
4090
  function DynamicFlowModal(props) {
3894
4091
  const _a = props, { className = "" } = _a, rest = __objRest(_a, ["className"]);
3895
4092
  const dfProps = useWiseToCoreProps(rest);
3896
4093
  const df = useDynamicFlowModal(dfProps);
3897
- return /* @__PURE__ */ jsx83(
4094
+ return /* @__PURE__ */ jsx87(
3898
4095
  Modal5,
3899
4096
  __spreadProps(__spreadValues({
3900
4097
  className: `dynamic-flow-modal ${className}`,
3901
4098
  disableDimmerClickToClose: true
3902
4099
  }, df.modal), {
3903
- body: /* @__PURE__ */ jsx83("div", { className: "dynamic-flow-modal", children: df.modal.body })
4100
+ body: /* @__PURE__ */ jsx87("div", { className: "dynamic-flow-modal", children: df.modal.body })
3904
4101
  })
3905
4102
  );
3906
4103
  }
3907
4104
 
3908
4105
  // src/dynamicFlow/getMergedRenderers.tsx
3909
- import { jsx as jsx84 } from "react/jsx-runtime";
4106
+ import { jsx as jsx88 } from "react/jsx-runtime";
3910
4107
  var wiseRenderers = getWiseRenderers();
3911
4108
  var getMergedRenderers = (props) => {
3912
4109
  var _d;
@@ -3920,7 +4117,7 @@ var getMergedRenderers = (props) => {
3920
4117
  method: initialRequest.method,
3921
4118
  data: initialRequest.body
3922
4119
  };
3923
- return presentation.type === "push" ? /* @__PURE__ */ jsx84(DynamicFlow, __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), { features: subflowFeatures, initialAction: action })) : /* @__PURE__ */ jsx84(
4120
+ return presentation.type === "push" ? /* @__PURE__ */ jsx88(DynamicFlow, __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), { features: subflowFeatures, initialAction: action })) : /* @__PURE__ */ jsx88(
3924
4121
  DynamicFlowModal,
3925
4122
  __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), {
3926
4123
  features: subflowFeatures,
@@ -3970,12 +4167,12 @@ var openLinkInNewTab = (url) => {
3970
4167
  };
3971
4168
 
3972
4169
  // src/dynamicFlow/DynamicFlow.tsx
3973
- import { jsx as jsx85 } from "react/jsx-runtime";
4170
+ import { jsx as jsx89 } from "react/jsx-runtime";
3974
4171
  function DynamicFlow(props) {
3975
4172
  const { className = "" } = props;
3976
4173
  const dfProps = useWiseToCoreProps(props);
3977
4174
  const df = useDynamicFlow(dfProps);
3978
- return /* @__PURE__ */ jsx85("div", { className, children: df.view });
4175
+ return /* @__PURE__ */ jsx89("div", { className, children: df.view });
3979
4176
  }
3980
4177
 
3981
4178
  // src/dynamicFlow/DynamicFlowWithRef.tsx
@@ -3984,7 +4181,7 @@ import {
3984
4181
  useImperativeHandle
3985
4182
  } from "react";
3986
4183
  import { useDynamicFlow as useDynamicFlow2 } from "@wise/dynamic-flow-client";
3987
- import { jsx as jsx86 } from "react/jsx-runtime";
4184
+ import { jsx as jsx90 } from "react/jsx-runtime";
3988
4185
  var DynamicFlowWithRef = forwardRef(function DynamicFlowWithRef2(props, ref) {
3989
4186
  const { className = "" } = props;
3990
4187
  const dfProps = useWiseToCoreProps(props);
@@ -4000,14 +4197,14 @@ var DynamicFlowWithRef = forwardRef(function DynamicFlowWithRef2(props, ref) {
4000
4197
  }),
4001
4198
  [df]
4002
4199
  );
4003
- return /* @__PURE__ */ jsx86("div", { className, children: df.view });
4200
+ return /* @__PURE__ */ jsx90("div", { className, children: df.view });
4004
4201
  });
4005
4202
 
4006
4203
  // src/index.ts
4007
4204
  import { findRendererPropsByType } from "@wise/dynamic-flow-client";
4008
4205
 
4009
4206
  // src/dynamicFlow/renderers.tsx
4010
- var Header11 = Header7;
4207
+ var Header11 = Header5;
4011
4208
  var Media2 = Media;
4012
4209
  var getMargin2 = getMargin;
4013
4210