@wise/dynamic-flow-client-internal 5.6.2 → 5.7.0

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