@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.css +15 -0
- package/build/main.js +1170 -1051
- package/build/main.mjs +1013 -888
- package/build/types/dynamicFlow/renderers.d.ts +1 -1
- package/package.json +5 -5
package/build/main.js
CHANGED
|
@@ -139,12 +139,12 @@ var import_dynamic_flow_client6 = require("@wise/dynamic-flow-client");
|
|
|
139
139
|
var import_dynamic_flow_client3 = require("@wise/dynamic-flow-client");
|
|
140
140
|
|
|
141
141
|
// src/dynamicFlow/useWiseToCoreProps.tsx
|
|
142
|
-
var
|
|
142
|
+
var import_react22 = require("react");
|
|
143
143
|
|
|
144
144
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
145
145
|
var appVersion = (
|
|
146
146
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
147
|
-
typeof process !== "undefined" ? "5.
|
|
147
|
+
typeof process !== "undefined" ? "5.7.0" : "0.0.0"
|
|
148
148
|
);
|
|
149
149
|
|
|
150
150
|
// src/dynamicFlow/telemetry/getLogEvent.ts
|
|
@@ -1050,9 +1050,258 @@ var DateInputRenderer = {
|
|
|
1050
1050
|
};
|
|
1051
1051
|
var DateInputRenderer_default = DateInputRenderer;
|
|
1052
1052
|
|
|
1053
|
-
// ../renderers/src/
|
|
1053
|
+
// ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
|
|
1054
|
+
var import_components16 = require("@transferwise/components");
|
|
1055
|
+
|
|
1056
|
+
// ../renderers/src/utils/listItem/getAdditionalInfo.tsx
|
|
1054
1057
|
var import_components13 = require("@transferwise/components");
|
|
1055
1058
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1059
|
+
var getAdditionalInfo = (additionalInfo) => {
|
|
1060
|
+
if (!additionalInfo) {
|
|
1061
|
+
return void 0;
|
|
1062
|
+
}
|
|
1063
|
+
const { href, text, onClick } = additionalInfo;
|
|
1064
|
+
if (href || onClick) {
|
|
1065
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1066
|
+
import_components13.ListItem.AdditionalInfo,
|
|
1067
|
+
{
|
|
1068
|
+
action: {
|
|
1069
|
+
label: text,
|
|
1070
|
+
href,
|
|
1071
|
+
onClick,
|
|
1072
|
+
target: "_blank"
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
);
|
|
1076
|
+
}
|
|
1077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_components13.ListItem.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
|
|
1078
|
+
};
|
|
1079
|
+
|
|
1080
|
+
// ../renderers/src/utils/listItem/shouldUseAvatar.ts
|
|
1081
|
+
var shouldUseAvatar = (control, tags) => {
|
|
1082
|
+
var _a;
|
|
1083
|
+
return control === "with-avatar" || ((_a = tags == null ? void 0 : tags.includes("with-avatar")) != null ? _a : false);
|
|
1084
|
+
};
|
|
1085
|
+
|
|
1086
|
+
// ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
|
|
1087
|
+
var import_components15 = require("@transferwise/components");
|
|
1088
|
+
var import_react3 = require("react");
|
|
1089
|
+
var import_react_intl8 = require("react-intl");
|
|
1090
|
+
|
|
1091
|
+
// ../renderers/src/messages/filter.messages.ts
|
|
1092
|
+
var import_react_intl5 = require("react-intl");
|
|
1093
|
+
var filter_messages_default = (0, import_react_intl5.defineMessages)({
|
|
1094
|
+
placeholder: {
|
|
1095
|
+
id: "df.wise.filter.placeholder",
|
|
1096
|
+
defaultMessage: "Start typing to search",
|
|
1097
|
+
description: "Placeholder for the filter input"
|
|
1098
|
+
},
|
|
1099
|
+
results: {
|
|
1100
|
+
id: "df.wise.filter.results",
|
|
1101
|
+
defaultMessage: "Search results",
|
|
1102
|
+
description: "Label for the results section"
|
|
1103
|
+
},
|
|
1104
|
+
noResults: {
|
|
1105
|
+
id: "df.wise.filter.noResults",
|
|
1106
|
+
defaultMessage: "No results",
|
|
1107
|
+
description: "Message for if there are no results"
|
|
1108
|
+
}
|
|
1109
|
+
});
|
|
1110
|
+
|
|
1111
|
+
// ../renderers/src/DecisionRenderer/filter-and-sort-decision-options.ts
|
|
1112
|
+
function filterAndSortDecisionOptions(selectOptions, query) {
|
|
1113
|
+
const upperQuery = normalizeAndRemoveAccents(query);
|
|
1114
|
+
const filteredItems = selectOptions.filter((option) => {
|
|
1115
|
+
var _a, _b, _c, _d;
|
|
1116
|
+
const searchableWords = [
|
|
1117
|
+
option.title,
|
|
1118
|
+
option.description,
|
|
1119
|
+
option.additionalText,
|
|
1120
|
+
(_a = option.supportingValues) == null ? void 0 : _a.value,
|
|
1121
|
+
(_b = option.supportingValues) == null ? void 0 : _b.subvalue,
|
|
1122
|
+
...(_c = option.keywords) != null ? _c : []
|
|
1123
|
+
];
|
|
1124
|
+
return (_d = searchableWords.some(
|
|
1125
|
+
(word) => word && normalizeAndRemoveAccents(word).includes(upperQuery)
|
|
1126
|
+
)) != null ? _d : false;
|
|
1127
|
+
});
|
|
1128
|
+
return [...filteredItems].sort((a, b) => {
|
|
1129
|
+
if (a.disabled && !b.disabled) {
|
|
1130
|
+
return 1;
|
|
1131
|
+
}
|
|
1132
|
+
if (!a.disabled && b.disabled) {
|
|
1133
|
+
return -1;
|
|
1134
|
+
}
|
|
1135
|
+
const aTitleUpper = a.title.toUpperCase();
|
|
1136
|
+
const bTitleUpper = b.title.toUpperCase();
|
|
1137
|
+
const aTitleStarts = aTitleUpper.startsWith(upperQuery);
|
|
1138
|
+
const bTitleStarts = bTitleUpper.startsWith(upperQuery);
|
|
1139
|
+
if (aTitleStarts && !bTitleStarts) {
|
|
1140
|
+
return -1;
|
|
1141
|
+
}
|
|
1142
|
+
if (!aTitleStarts && bTitleStarts) {
|
|
1143
|
+
return 1;
|
|
1144
|
+
}
|
|
1145
|
+
const aWordStarts = aTitleUpper.split(" ").some((word) => word.startsWith(upperQuery));
|
|
1146
|
+
const bWordStarts = bTitleUpper.split(" ").some((word) => word.startsWith(upperQuery));
|
|
1147
|
+
if (aWordStarts && !bWordStarts) {
|
|
1148
|
+
return -1;
|
|
1149
|
+
}
|
|
1150
|
+
if (!aWordStarts && bWordStarts) {
|
|
1151
|
+
return 1;
|
|
1152
|
+
}
|
|
1153
|
+
return a.title.localeCompare(b.title);
|
|
1154
|
+
});
|
|
1155
|
+
}
|
|
1156
|
+
var normalizeAndRemoveAccents = (text) => text.trim().toLowerCase().normalize("NFKD").replace(new RegExp("\\p{Diacritic}", "gu"), "");
|
|
1157
|
+
|
|
1158
|
+
// ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
|
|
1159
|
+
var import_components14 = require("@transferwise/components");
|
|
1160
|
+
var import_react_intl7 = require("react-intl");
|
|
1161
|
+
|
|
1162
|
+
// ../renderers/src/messages/group.messages.ts
|
|
1163
|
+
var import_react_intl6 = require("react-intl");
|
|
1164
|
+
var group_messages_default = (0, import_react_intl6.defineMessages)({
|
|
1165
|
+
all: {
|
|
1166
|
+
id: "df.wise.group.all",
|
|
1167
|
+
defaultMessage: "All",
|
|
1168
|
+
description: "Label for the group of options that encompasses all options"
|
|
1169
|
+
},
|
|
1170
|
+
popular: {
|
|
1171
|
+
id: "df.wise.group.popular",
|
|
1172
|
+
defaultMessage: "Popular",
|
|
1173
|
+
description: "Label for the group of options that are tagged as popular"
|
|
1174
|
+
},
|
|
1175
|
+
recent: {
|
|
1176
|
+
id: "df.wise.group.recent",
|
|
1177
|
+
defaultMessage: "Recent",
|
|
1178
|
+
description: "Label for the group of options that are tagged as recent"
|
|
1179
|
+
},
|
|
1180
|
+
"currencies-with-account-details": {
|
|
1181
|
+
id: "df.wise.group.currencies-with-account-details",
|
|
1182
|
+
defaultMessage: "Currencies with account details",
|
|
1183
|
+
description: "Label for the group of options that are tagged as currencies with account details"
|
|
1184
|
+
}
|
|
1185
|
+
});
|
|
1186
|
+
|
|
1187
|
+
// ../renderers/src/utils/grouping-utils.ts
|
|
1188
|
+
var getGroupsFromTags = (knownTags, items) => {
|
|
1189
|
+
return knownTags.map((tag) => {
|
|
1190
|
+
return { tag, items: items.filter((item) => {
|
|
1191
|
+
var _a;
|
|
1192
|
+
return (_a = item.tags) == null ? void 0 : _a.includes(tag);
|
|
1193
|
+
}) };
|
|
1194
|
+
}).filter((group) => group.items.length > 0);
|
|
1195
|
+
};
|
|
1196
|
+
|
|
1197
|
+
// ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
|
|
1198
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1199
|
+
var groupingTags = Object.keys(group_messages_default).filter((key) => key !== "all");
|
|
1200
|
+
var isGroupedDecision = (options) => {
|
|
1201
|
+
return getGroupsFromTags(groupingTags, options).length > 0;
|
|
1202
|
+
};
|
|
1203
|
+
var GroupedDecisionList = (_a) => {
|
|
1204
|
+
var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
|
|
1205
|
+
const { formatMessage } = (0, import_react_intl7.useIntl)();
|
|
1206
|
+
const { options } = rest;
|
|
1207
|
+
const itemsByTag = [...getGroupsFromTags(groupingTags, options), { tag: "all", items: options }];
|
|
1208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_jsx_runtime27.Fragment, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_components14.Section, { children: [
|
|
1209
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1210
|
+
import_components14.Header,
|
|
1211
|
+
{
|
|
1212
|
+
as: "h2",
|
|
1213
|
+
title: tag in group_messages_default ? formatMessage(group_messages_default[tag]) : tag
|
|
1214
|
+
}
|
|
1215
|
+
),
|
|
1216
|
+
renderDecisionList2(__spreadProps(__spreadValues({}, rest), { options: items }))
|
|
1217
|
+
] }, tag)) });
|
|
1218
|
+
};
|
|
1219
|
+
|
|
1220
|
+
// ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
|
|
1221
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1222
|
+
var DecisionWrapper = (props) => {
|
|
1223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: getMargin(props.margin), children: [
|
|
1224
|
+
props.title && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components15.Header, { as: "h2", title: props.title }),
|
|
1225
|
+
props.control === "filtered" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(UnfilteredDecisionList, __spreadValues({}, props))
|
|
1226
|
+
] });
|
|
1227
|
+
};
|
|
1228
|
+
var UnfilteredDecisionList = (_a) => {
|
|
1229
|
+
var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
|
|
1230
|
+
return isGroupedDecision(rest.options) ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList2 })) : renderDecisionList2(rest);
|
|
1231
|
+
};
|
|
1232
|
+
var FilteredDecisionList = (props) => {
|
|
1233
|
+
const { formatMessage } = (0, import_react_intl8.useIntl)();
|
|
1234
|
+
const [query, setQuery] = (0, import_react3.useState)("");
|
|
1235
|
+
const { control, options, renderDecisionList: renderDecisionList2 } = props;
|
|
1236
|
+
const filteredOptions = (query == null ? void 0 : query.length) > 0 ? filterAndSortDecisionOptions(options, query) : options;
|
|
1237
|
+
const isGrouped = isGroupedDecision(options);
|
|
1238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
|
|
1239
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1240
|
+
import_components15.SearchInput,
|
|
1241
|
+
{
|
|
1242
|
+
placeholder: formatMessage(filter_messages_default.placeholder),
|
|
1243
|
+
value: query,
|
|
1244
|
+
className: "m-b-2",
|
|
1245
|
+
onChange: (e) => {
|
|
1246
|
+
var _a;
|
|
1247
|
+
return setQuery((_a = e.target.value) != null ? _a : "");
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
),
|
|
1251
|
+
isGrouped && query.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
|
|
1252
|
+
query.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components15.Header, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
|
|
1253
|
+
filteredOptions.length > 0 ? renderDecisionList2({
|
|
1254
|
+
control,
|
|
1255
|
+
className: query.length === 0 ? "m-t-3" : "",
|
|
1256
|
+
options: filteredOptions
|
|
1257
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { children: formatMessage(filter_messages_default.noResults) })
|
|
1258
|
+
] })
|
|
1259
|
+
] });
|
|
1260
|
+
};
|
|
1261
|
+
|
|
1262
|
+
// ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
|
|
1263
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1264
|
+
var DecisionRenderer = {
|
|
1265
|
+
canRenderType: "decision",
|
|
1266
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }))
|
|
1267
|
+
};
|
|
1268
|
+
var renderDecisionList = ({ options, control }) => {
|
|
1269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, { children: options.map((_a) => {
|
|
1270
|
+
var _b = _a, { onClick } = _b, rest = __objRest(_b, ["onClick"]);
|
|
1271
|
+
const {
|
|
1272
|
+
description,
|
|
1273
|
+
disabled,
|
|
1274
|
+
media,
|
|
1275
|
+
title: itemTitle,
|
|
1276
|
+
href,
|
|
1277
|
+
additionalText,
|
|
1278
|
+
inlineAlert,
|
|
1279
|
+
supportingValues,
|
|
1280
|
+
tags
|
|
1281
|
+
} = rest;
|
|
1282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1283
|
+
import_components16.ListItem,
|
|
1284
|
+
{
|
|
1285
|
+
title: itemTitle,
|
|
1286
|
+
subtitle: description,
|
|
1287
|
+
spotlight: control === "spotlight" ? (tags == null ? void 0 : tags.includes("spotlight-active")) ? "active" : "inactive" : void 0,
|
|
1288
|
+
disabled,
|
|
1289
|
+
valueTitle: supportingValues == null ? void 0 : supportingValues.value,
|
|
1290
|
+
valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
|
|
1291
|
+
media: getMedia(media, shouldUseAvatar(control, tags)),
|
|
1292
|
+
prompt: getInlineAlert(inlineAlert),
|
|
1293
|
+
additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
|
|
1294
|
+
control: href ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components16.ListItem.Navigation, { href, target: "_blank" }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components16.ListItem.Navigation, { onClick })
|
|
1295
|
+
},
|
|
1296
|
+
JSON.stringify(rest)
|
|
1297
|
+
);
|
|
1298
|
+
}) });
|
|
1299
|
+
};
|
|
1300
|
+
var DecisionRenderer_default = DecisionRenderer;
|
|
1301
|
+
|
|
1302
|
+
// ../renderers/src/DividerRenderer.tsx
|
|
1303
|
+
var import_components17 = require("@transferwise/components");
|
|
1304
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1056
1305
|
var mapControlToLevel = (control) => {
|
|
1057
1306
|
switch (control) {
|
|
1058
1307
|
case "section":
|
|
@@ -1065,16 +1314,16 @@ var mapControlToLevel = (control) => {
|
|
|
1065
1314
|
};
|
|
1066
1315
|
var DividerRenderer = {
|
|
1067
1316
|
canRenderType: "divider",
|
|
1068
|
-
render: ({ margin, control }) => /* @__PURE__ */ (0,
|
|
1317
|
+
render: ({ margin, control }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components17.Divider, { className: `m-t-0 d-block ${getMargin(margin)}`, level: mapControlToLevel(control) })
|
|
1069
1318
|
};
|
|
1070
1319
|
var DividerRenderer_default = DividerRenderer;
|
|
1071
1320
|
|
|
1072
1321
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
1073
|
-
var
|
|
1322
|
+
var import_components18 = require("@transferwise/components");
|
|
1074
1323
|
|
|
1075
1324
|
// ../renderers/src/messages/external-confirmation.messages.ts
|
|
1076
|
-
var
|
|
1077
|
-
var external_confirmation_messages_default = (0,
|
|
1325
|
+
var import_react_intl9 = require("react-intl");
|
|
1326
|
+
var external_confirmation_messages_default = (0, import_react_intl9.defineMessages)({
|
|
1078
1327
|
title: {
|
|
1079
1328
|
id: "df.wise.ExternalConfirmation.title",
|
|
1080
1329
|
defaultMessage: "Please confirm",
|
|
@@ -1098,9 +1347,9 @@ var external_confirmation_messages_default = (0, import_react_intl5.defineMessag
|
|
|
1098
1347
|
});
|
|
1099
1348
|
|
|
1100
1349
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
1101
|
-
var
|
|
1102
|
-
var
|
|
1103
|
-
var
|
|
1350
|
+
var import_react_intl10 = require("react-intl");
|
|
1351
|
+
var import_react4 = require("react");
|
|
1352
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1104
1353
|
var ExternalConfirmationRenderer = {
|
|
1105
1354
|
canRenderType: "external-confirmation",
|
|
1106
1355
|
render: ExternalConfirmationRendererComponent
|
|
@@ -1112,8 +1361,8 @@ function ExternalConfirmationRendererComponent({
|
|
|
1112
1361
|
onFailure,
|
|
1113
1362
|
onCancel
|
|
1114
1363
|
}) {
|
|
1115
|
-
const { formatMessage } = (0,
|
|
1116
|
-
(0,
|
|
1364
|
+
const { formatMessage } = (0, import_react_intl10.useIntl)();
|
|
1365
|
+
(0, import_react4.useEffect)(() => {
|
|
1117
1366
|
if (url) {
|
|
1118
1367
|
const w = window.open(url, "_blank");
|
|
1119
1368
|
if (w) {
|
|
@@ -1123,16 +1372,16 @@ function ExternalConfirmationRendererComponent({
|
|
|
1123
1372
|
}
|
|
1124
1373
|
}
|
|
1125
1374
|
}, []);
|
|
1126
|
-
return /* @__PURE__ */ (0,
|
|
1127
|
-
|
|
1375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1376
|
+
import_components18.Modal,
|
|
1128
1377
|
{
|
|
1129
1378
|
open: status === "failure",
|
|
1130
1379
|
title: formatMessage(external_confirmation_messages_default.title),
|
|
1131
|
-
body: /* @__PURE__ */ (0,
|
|
1132
|
-
/* @__PURE__ */ (0,
|
|
1133
|
-
/* @__PURE__ */ (0,
|
|
1134
|
-
/* @__PURE__ */ (0,
|
|
1135
|
-
|
|
1380
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
|
|
1381
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components18.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
|
|
1382
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
|
|
1383
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1384
|
+
import_components18.Button,
|
|
1136
1385
|
{
|
|
1137
1386
|
v2: true,
|
|
1138
1387
|
block: true,
|
|
@@ -1146,7 +1395,7 @@ function ExternalConfirmationRendererComponent({
|
|
|
1146
1395
|
children: formatMessage(external_confirmation_messages_default.open)
|
|
1147
1396
|
}
|
|
1148
1397
|
),
|
|
1149
|
-
/* @__PURE__ */ (0,
|
|
1398
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components18.Button, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
|
|
1150
1399
|
] }) })
|
|
1151
1400
|
] }),
|
|
1152
1401
|
onClose: onCancel
|
|
@@ -1163,46 +1412,46 @@ function getOrigin(url) {
|
|
|
1163
1412
|
var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
|
|
1164
1413
|
|
|
1165
1414
|
// ../renderers/src/FormRenderer.tsx
|
|
1166
|
-
var
|
|
1415
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1167
1416
|
var FormRenderer = {
|
|
1168
1417
|
canRenderType: "form",
|
|
1169
|
-
render: ({ children, margin }) => /* @__PURE__ */ (0,
|
|
1418
|
+
render: ({ children, margin }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: getMargin(margin), children })
|
|
1170
1419
|
};
|
|
1171
1420
|
var FormRenderer_default = FormRenderer;
|
|
1172
1421
|
|
|
1173
1422
|
// ../renderers/src/FormSectionRenderer.tsx
|
|
1174
|
-
var
|
|
1175
|
-
var
|
|
1423
|
+
var import_components19 = require("@transferwise/components");
|
|
1424
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1176
1425
|
var FormSectionRenderer = {
|
|
1177
1426
|
canRenderType: "form-section",
|
|
1178
|
-
render: ({ title, description, children }) => /* @__PURE__ */ (0,
|
|
1179
|
-
title && /* @__PURE__ */ (0,
|
|
1180
|
-
|
|
1427
|
+
render: ({ title, description, children }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("fieldset", { children: [
|
|
1428
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1429
|
+
import_components19.Header,
|
|
1181
1430
|
{
|
|
1182
1431
|
as: "h2",
|
|
1183
1432
|
title
|
|
1184
1433
|
}
|
|
1185
1434
|
),
|
|
1186
|
-
description && /* @__PURE__ */ (0,
|
|
1435
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { children: description }),
|
|
1187
1436
|
children
|
|
1188
1437
|
] })
|
|
1189
1438
|
};
|
|
1190
1439
|
var FormSectionRenderer_default = FormSectionRenderer;
|
|
1191
1440
|
|
|
1192
1441
|
// ../renderers/src/HeadingRenderer.tsx
|
|
1193
|
-
var
|
|
1194
|
-
var
|
|
1442
|
+
var import_components20 = require("@transferwise/components");
|
|
1443
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1195
1444
|
var HeadingRenderer = {
|
|
1196
1445
|
canRenderType: "heading",
|
|
1197
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
1446
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Heading, __spreadValues({}, props))
|
|
1198
1447
|
};
|
|
1199
1448
|
function Heading(props) {
|
|
1200
1449
|
const { text, size, align, margin, control } = props;
|
|
1201
1450
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
1202
|
-
return control === "display" ? /* @__PURE__ */ (0,
|
|
1451
|
+
return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(StandardHeading, { size, text, className });
|
|
1203
1452
|
}
|
|
1204
1453
|
function DisplayHeading({ size, text, className }) {
|
|
1205
|
-
return /* @__PURE__ */ (0,
|
|
1454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components20.Display, { type: getDisplayType(size), className, children: text });
|
|
1206
1455
|
}
|
|
1207
1456
|
var getDisplayType = (size) => {
|
|
1208
1457
|
switch (size) {
|
|
@@ -1218,7 +1467,7 @@ var getDisplayType = (size) => {
|
|
|
1218
1467
|
}
|
|
1219
1468
|
};
|
|
1220
1469
|
function StandardHeading({ size, text, className }) {
|
|
1221
|
-
return /* @__PURE__ */ (0,
|
|
1470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components20.Title, { type: getTitleTypeBySize(size), className, children: text });
|
|
1222
1471
|
}
|
|
1223
1472
|
var getTitleTypeBySize = (size) => {
|
|
1224
1473
|
var _a;
|
|
@@ -1234,8 +1483,8 @@ var getTitleTypeBySize = (size) => {
|
|
|
1234
1483
|
var HeadingRenderer_default = HeadingRenderer;
|
|
1235
1484
|
|
|
1236
1485
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
1237
|
-
var
|
|
1238
|
-
var
|
|
1486
|
+
var import_components21 = require("@transferwise/components");
|
|
1487
|
+
var import_react5 = require("react");
|
|
1239
1488
|
|
|
1240
1489
|
// ../renderers/src/utils/api-utils.ts
|
|
1241
1490
|
function isRelativePath(url = "") {
|
|
@@ -1245,7 +1494,7 @@ function isRelativePath(url = "") {
|
|
|
1245
1494
|
}
|
|
1246
1495
|
|
|
1247
1496
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
1248
|
-
var
|
|
1497
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1249
1498
|
function UrlImage({
|
|
1250
1499
|
accessibilityDescription,
|
|
1251
1500
|
align,
|
|
@@ -1254,14 +1503,14 @@ function UrlImage({
|
|
|
1254
1503
|
uri,
|
|
1255
1504
|
httpClient
|
|
1256
1505
|
}) {
|
|
1257
|
-
const [imageSource, setImageSource] = (0,
|
|
1258
|
-
(0,
|
|
1506
|
+
const [imageSource, setImageSource] = (0, import_react5.useState)("");
|
|
1507
|
+
(0, import_react5.useEffect)(() => {
|
|
1259
1508
|
if (!uri.startsWith("urn:")) {
|
|
1260
1509
|
void getImageSource(httpClient, uri).then(setImageSource);
|
|
1261
1510
|
}
|
|
1262
1511
|
}, [uri, httpClient]);
|
|
1263
|
-
return /* @__PURE__ */ (0,
|
|
1264
|
-
|
|
1512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: `df-image ${align} ${size || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1513
|
+
import_components21.Image,
|
|
1265
1514
|
{
|
|
1266
1515
|
className: `img-responsive ${getMargin(margin)}`,
|
|
1267
1516
|
alt: accessibilityDescription != null ? accessibilityDescription : "",
|
|
@@ -1304,7 +1553,7 @@ var getImageSource = async (httpClient, imageUrl) => {
|
|
|
1304
1553
|
};
|
|
1305
1554
|
|
|
1306
1555
|
// ../renderers/src/ImageRenderer/UrnFlagImage.tsx
|
|
1307
|
-
var
|
|
1556
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1308
1557
|
var maxFlagSize = 600;
|
|
1309
1558
|
function UrnFlagImage({
|
|
1310
1559
|
accessibilityDescription,
|
|
@@ -1313,12 +1562,12 @@ function UrnFlagImage({
|
|
|
1313
1562
|
size,
|
|
1314
1563
|
uri
|
|
1315
1564
|
}) {
|
|
1316
|
-
return /* @__PURE__ */ (0,
|
|
1565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
|
|
1317
1566
|
}
|
|
1318
1567
|
|
|
1319
1568
|
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
1320
1569
|
var import_art4 = require("@wise/art");
|
|
1321
|
-
var
|
|
1570
|
+
var import_react7 = require("react");
|
|
1322
1571
|
|
|
1323
1572
|
// ../renderers/src/ImageRenderer/isAnimated.ts
|
|
1324
1573
|
var isAnimated = (uri) => {
|
|
@@ -1328,9 +1577,9 @@ var isAnimated = (uri) => {
|
|
|
1328
1577
|
|
|
1329
1578
|
// ../renderers/src/ImageRenderer/SafeIllustration3D.tsx
|
|
1330
1579
|
var import_art3 = require("@wise/art");
|
|
1331
|
-
var
|
|
1332
|
-
var
|
|
1333
|
-
var Illustration3DErrorBoundary = class extends
|
|
1580
|
+
var import_react6 = require("react");
|
|
1581
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1582
|
+
var Illustration3DErrorBoundary = class extends import_react6.Component {
|
|
1334
1583
|
constructor(props) {
|
|
1335
1584
|
super(props);
|
|
1336
1585
|
this.state = { hasError: false };
|
|
@@ -1353,12 +1602,12 @@ var SafeIllustration3D = ({
|
|
|
1353
1602
|
size,
|
|
1354
1603
|
onError
|
|
1355
1604
|
}) => {
|
|
1356
|
-
return /* @__PURE__ */ (0,
|
|
1605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Illustration3DErrorBoundary, { onError, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_art3.Illustration3D, { name, size }) });
|
|
1357
1606
|
};
|
|
1358
1607
|
var SafeIllustration3D_default = SafeIllustration3D;
|
|
1359
1608
|
|
|
1360
1609
|
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
1361
|
-
var
|
|
1610
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1362
1611
|
var urnPrefix = "urn:wise:illustrations:";
|
|
1363
1612
|
var isUrnIllustration = (uri) => uri.startsWith(urnPrefix);
|
|
1364
1613
|
function UrnIllustration({
|
|
@@ -1368,12 +1617,12 @@ function UrnIllustration({
|
|
|
1368
1617
|
size,
|
|
1369
1618
|
uri
|
|
1370
1619
|
}) {
|
|
1371
|
-
const [has3DFailed, setHas3DFailed] = (0,
|
|
1620
|
+
const [has3DFailed, setHas3DFailed] = (0, import_react7.useState)(false);
|
|
1372
1621
|
const illustrationSize = getIllustrationSize(size);
|
|
1373
1622
|
const illustrationName = getIllustrationName(uri);
|
|
1374
1623
|
const illustration3DName = getIllustration3DName(uri);
|
|
1375
1624
|
if (illustration3DName && isAnimated(uri) && !has3DFailed) {
|
|
1376
|
-
return /* @__PURE__ */ (0,
|
|
1625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1377
1626
|
SafeIllustration3D_default,
|
|
1378
1627
|
{
|
|
1379
1628
|
name: illustration3DName,
|
|
@@ -1382,7 +1631,7 @@ function UrnIllustration({
|
|
|
1382
1631
|
}
|
|
1383
1632
|
) });
|
|
1384
1633
|
}
|
|
1385
|
-
return /* @__PURE__ */ (0,
|
|
1634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1386
1635
|
import_art4.Illustration,
|
|
1387
1636
|
{
|
|
1388
1637
|
className: "df-illustration",
|
|
@@ -1402,32 +1651,32 @@ var getIllustration3DName = (uri) => {
|
|
|
1402
1651
|
};
|
|
1403
1652
|
|
|
1404
1653
|
// ../renderers/src/ImageRenderer/UrnImage.tsx
|
|
1405
|
-
var
|
|
1654
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1406
1655
|
var isUrnImage = (uri) => uri.startsWith("urn:");
|
|
1407
1656
|
function UrnImage(props) {
|
|
1408
1657
|
const { uri } = props;
|
|
1409
1658
|
if (isUrnIllustration(uri)) {
|
|
1410
|
-
return /* @__PURE__ */ (0,
|
|
1659
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(UrnIllustration, __spreadValues({}, props));
|
|
1411
1660
|
}
|
|
1412
1661
|
if (isUrnFlag(uri)) {
|
|
1413
|
-
return /* @__PURE__ */ (0,
|
|
1662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(UrnFlagImage, __spreadValues({}, props));
|
|
1414
1663
|
}
|
|
1415
1664
|
return null;
|
|
1416
1665
|
}
|
|
1417
1666
|
|
|
1418
1667
|
// ../renderers/src/ImageRenderer/ImageRenderer.tsx
|
|
1419
|
-
var
|
|
1668
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1420
1669
|
var ImageRenderer = {
|
|
1421
1670
|
canRenderType: "image",
|
|
1422
|
-
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0,
|
|
1671
|
+
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(UrlImage, __spreadValues({}, props))
|
|
1423
1672
|
};
|
|
1424
1673
|
|
|
1425
1674
|
// ../renderers/src/ImageRenderer/index.tsx
|
|
1426
1675
|
var ImageRenderer_default = ImageRenderer;
|
|
1427
1676
|
|
|
1428
1677
|
// ../renderers/src/InstructionsRenderer.tsx
|
|
1429
|
-
var
|
|
1430
|
-
var
|
|
1678
|
+
var import_components22 = require("@transferwise/components");
|
|
1679
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1431
1680
|
var doContext = ["positive", "neutral"];
|
|
1432
1681
|
var dontContext = ["warning", "negative"];
|
|
1433
1682
|
var InstructionsRenderer = {
|
|
@@ -1435,16 +1684,16 @@ var InstructionsRenderer = {
|
|
|
1435
1684
|
render: ({ items, margin, title }) => {
|
|
1436
1685
|
const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
|
|
1437
1686
|
const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
|
|
1438
|
-
return /* @__PURE__ */ (0,
|
|
1439
|
-
title ? /* @__PURE__ */ (0,
|
|
1440
|
-
/* @__PURE__ */ (0,
|
|
1687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: getMargin(margin), children: [
|
|
1688
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components22.Header, { title }) : null,
|
|
1689
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components22.InstructionsList, { dos, donts })
|
|
1441
1690
|
] });
|
|
1442
1691
|
}
|
|
1443
1692
|
};
|
|
1444
1693
|
var InstructionsRenderer_default = InstructionsRenderer;
|
|
1445
1694
|
|
|
1446
1695
|
// ../renderers/src/IntegerInputRenderer.tsx
|
|
1447
|
-
var
|
|
1696
|
+
var import_components23 = require("@transferwise/components");
|
|
1448
1697
|
|
|
1449
1698
|
// ../renderers/src/utils/input-utils.ts
|
|
1450
1699
|
var onWheel = (event) => {
|
|
@@ -1469,7 +1718,7 @@ function pick(obj, ...keys) {
|
|
|
1469
1718
|
}
|
|
1470
1719
|
|
|
1471
1720
|
// ../renderers/src/IntegerInputRenderer.tsx
|
|
1472
|
-
var
|
|
1721
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1473
1722
|
var IntegerInputRenderer = {
|
|
1474
1723
|
canRenderType: "input-integer",
|
|
1475
1724
|
render: (props) => {
|
|
@@ -1484,7 +1733,7 @@ var IntegerInputRenderer = {
|
|
|
1484
1733
|
"maximum",
|
|
1485
1734
|
"minimum"
|
|
1486
1735
|
);
|
|
1487
|
-
return /* @__PURE__ */ (0,
|
|
1736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
1488
1737
|
FieldInput_default,
|
|
1489
1738
|
{
|
|
1490
1739
|
id,
|
|
@@ -1492,8 +1741,8 @@ var IntegerInputRenderer = {
|
|
|
1492
1741
|
description,
|
|
1493
1742
|
validation: validationState,
|
|
1494
1743
|
help,
|
|
1495
|
-
children: /* @__PURE__ */ (0,
|
|
1496
|
-
|
|
1744
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components23.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
1745
|
+
import_components23.Input,
|
|
1497
1746
|
__spreadValues({
|
|
1498
1747
|
id,
|
|
1499
1748
|
name: id,
|
|
@@ -1514,13 +1763,122 @@ var IntegerInputRenderer = {
|
|
|
1514
1763
|
};
|
|
1515
1764
|
var IntegerInputRenderer_default = IntegerInputRenderer;
|
|
1516
1765
|
|
|
1766
|
+
// ../renderers/src/ListRenderer.tsx
|
|
1767
|
+
var import_components26 = require("@transferwise/components");
|
|
1768
|
+
|
|
1769
|
+
// ../renderers/src/utils/listItem/getCTAControl.tsx
|
|
1770
|
+
var import_components24 = require("@transferwise/components");
|
|
1771
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1772
|
+
var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
|
|
1773
|
+
if (!callToAction) {
|
|
1774
|
+
return void 0;
|
|
1775
|
+
}
|
|
1776
|
+
const { accessibilityDescription, href, title, context, onClick } = callToAction;
|
|
1777
|
+
const { priority, sentiment } = getPriorityAndSentiment(ctaSecondary, context);
|
|
1778
|
+
if (href) {
|
|
1779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
1780
|
+
import_components24.ListItem.Button,
|
|
1781
|
+
{
|
|
1782
|
+
href,
|
|
1783
|
+
partiallyInteractive: !fullyInteractive,
|
|
1784
|
+
priority,
|
|
1785
|
+
"aria-description": accessibilityDescription,
|
|
1786
|
+
sentiment,
|
|
1787
|
+
children: title
|
|
1788
|
+
}
|
|
1789
|
+
);
|
|
1790
|
+
}
|
|
1791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
1792
|
+
import_components24.ListItem.Button,
|
|
1793
|
+
{
|
|
1794
|
+
"aria-description": accessibilityDescription,
|
|
1795
|
+
partiallyInteractive: !fullyInteractive,
|
|
1796
|
+
priority,
|
|
1797
|
+
sentiment,
|
|
1798
|
+
onClick,
|
|
1799
|
+
children: title
|
|
1800
|
+
}
|
|
1801
|
+
);
|
|
1802
|
+
};
|
|
1803
|
+
var getPriorityAndSentiment = (ctaSecondary, context) => {
|
|
1804
|
+
if (context === "negative") {
|
|
1805
|
+
return { priority: "secondary", sentiment: "negative" };
|
|
1806
|
+
}
|
|
1807
|
+
return { priority: ctaSecondary ? "secondary" : "secondary-neutral", sentiment: "default" };
|
|
1808
|
+
};
|
|
1809
|
+
|
|
1810
|
+
// ../renderers/src/components/Header.tsx
|
|
1811
|
+
var import_components25 = require("@transferwise/components");
|
|
1812
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1813
|
+
var Header5 = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components25.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) });
|
|
1814
|
+
var getHeaderAction = (callToAction) => {
|
|
1815
|
+
if (!callToAction) {
|
|
1816
|
+
return void 0;
|
|
1817
|
+
}
|
|
1818
|
+
const { accessibilityDescription, href, title, onClick } = callToAction;
|
|
1819
|
+
return href ? {
|
|
1820
|
+
"aria-label": accessibilityDescription,
|
|
1821
|
+
text: title,
|
|
1822
|
+
href,
|
|
1823
|
+
target: "_blank"
|
|
1824
|
+
} : {
|
|
1825
|
+
"aria-label": accessibilityDescription,
|
|
1826
|
+
text: title,
|
|
1827
|
+
onClick: (event) => {
|
|
1828
|
+
event.preventDefault();
|
|
1829
|
+
onClick();
|
|
1830
|
+
}
|
|
1831
|
+
};
|
|
1832
|
+
};
|
|
1833
|
+
|
|
1834
|
+
// ../renderers/src/ListRenderer.tsx
|
|
1835
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
1836
|
+
var ListRenderer = {
|
|
1837
|
+
canRenderType: "list",
|
|
1838
|
+
render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: getMargin(margin), children: [
|
|
1839
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Header5, { title, callToAction }),
|
|
1840
|
+
items.map((item) => {
|
|
1841
|
+
var _a, _b;
|
|
1842
|
+
const {
|
|
1843
|
+
title: itemTitle,
|
|
1844
|
+
description,
|
|
1845
|
+
supportingValues,
|
|
1846
|
+
media,
|
|
1847
|
+
additionalInfo,
|
|
1848
|
+
inlineAlert,
|
|
1849
|
+
callToAction: itemCallToAction,
|
|
1850
|
+
tags: itemTags
|
|
1851
|
+
} = item;
|
|
1852
|
+
const controlOptions = {
|
|
1853
|
+
ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
|
|
1854
|
+
fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
|
|
1855
|
+
};
|
|
1856
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
1857
|
+
import_components26.ListItem,
|
|
1858
|
+
{
|
|
1859
|
+
title: itemTitle,
|
|
1860
|
+
subtitle: description,
|
|
1861
|
+
valueTitle: supportingValues == null ? void 0 : supportingValues.value,
|
|
1862
|
+
valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
|
|
1863
|
+
media: getMedia(media, shouldUseAvatar(control, itemTags)),
|
|
1864
|
+
prompt: getInlineAlert(inlineAlert),
|
|
1865
|
+
additionalInfo: getAdditionalInfo(additionalInfo),
|
|
1866
|
+
control: getCTAControl(itemCallToAction, controlOptions)
|
|
1867
|
+
},
|
|
1868
|
+
itemTitle
|
|
1869
|
+
);
|
|
1870
|
+
})
|
|
1871
|
+
] })
|
|
1872
|
+
};
|
|
1873
|
+
var ListRenderer_default = ListRenderer;
|
|
1874
|
+
|
|
1517
1875
|
// ../renderers/src/LoadingIndicatorRenderer.tsx
|
|
1518
|
-
var
|
|
1519
|
-
var
|
|
1876
|
+
var import_components27 = require("@transferwise/components");
|
|
1877
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
1520
1878
|
var LoadingIndicatorRenderer = {
|
|
1521
1879
|
canRenderType: "loading-indicator",
|
|
1522
|
-
render: ({ margin, size }) => /* @__PURE__ */ (0,
|
|
1523
|
-
|
|
1880
|
+
render: ({ margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
1881
|
+
import_components27.Loader,
|
|
1524
1882
|
{
|
|
1525
1883
|
size,
|
|
1526
1884
|
classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin(margin)}` },
|
|
@@ -1531,12 +1889,12 @@ var LoadingIndicatorRenderer = {
|
|
|
1531
1889
|
var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
|
|
1532
1890
|
|
|
1533
1891
|
// ../renderers/src/MarkdownRenderer.tsx
|
|
1534
|
-
var
|
|
1535
|
-
var
|
|
1892
|
+
var import_components28 = require("@transferwise/components");
|
|
1893
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
1536
1894
|
var MarkdownRenderer = {
|
|
1537
1895
|
canRenderType: "markdown",
|
|
1538
|
-
render: ({ content, align, margin, size }) => /* @__PURE__ */ (0,
|
|
1539
|
-
|
|
1896
|
+
render: ({ content, align, margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1897
|
+
import_components28.Markdown,
|
|
1540
1898
|
{
|
|
1541
1899
|
className: ["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large",
|
|
1542
1900
|
config: { link: { target: "_blank" } },
|
|
@@ -1546,22 +1904,69 @@ var MarkdownRenderer = {
|
|
|
1546
1904
|
};
|
|
1547
1905
|
var MarkdownRenderer_default = MarkdownRenderer;
|
|
1548
1906
|
|
|
1907
|
+
// ../renderers/src/MediaRenderer.tsx
|
|
1908
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
1909
|
+
var MediaRenderer = {
|
|
1910
|
+
canRenderType: "media",
|
|
1911
|
+
render: (_a) => {
|
|
1912
|
+
var _b = _a, { media } = _b, rest = __objRest(_b, ["media"]);
|
|
1913
|
+
switch (media.type) {
|
|
1914
|
+
case "avatar":
|
|
1915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(AvatarMediaRendererComponent, __spreadValues({ media }, rest));
|
|
1916
|
+
case "image":
|
|
1917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ImageMediaRendererComponent, __spreadValues({ media }, rest));
|
|
1918
|
+
case "legacy":
|
|
1919
|
+
return null;
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
};
|
|
1923
|
+
var AvatarMediaRendererComponent = ({
|
|
1924
|
+
media,
|
|
1925
|
+
align,
|
|
1926
|
+
margin,
|
|
1927
|
+
size
|
|
1928
|
+
}) => {
|
|
1929
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: `df-media-layout-avatar ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Media, { media, size: mapAvatarMediaSize(size) }) });
|
|
1930
|
+
};
|
|
1931
|
+
var ImageMediaRendererComponent = (_a) => {
|
|
1932
|
+
var _b = _a, {
|
|
1933
|
+
media
|
|
1934
|
+
} = _b, rest = __objRest(_b, [
|
|
1935
|
+
"media"
|
|
1936
|
+
]);
|
|
1937
|
+
return isUrnImage(media.uri) ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(UrnImage, __spreadValues({ uri: media.uri, accessibilityDescription: media.accessibilityDescription }, rest)) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(UrlImage, __spreadValues({ uri: media.uri, accessibilityDescription: media.accessibilityDescription }, rest));
|
|
1938
|
+
};
|
|
1939
|
+
var mapAvatarMediaSize = (size) => {
|
|
1940
|
+
switch (size) {
|
|
1941
|
+
case "xs":
|
|
1942
|
+
return 32;
|
|
1943
|
+
case "sm":
|
|
1944
|
+
return 40;
|
|
1945
|
+
case "md":
|
|
1946
|
+
return 48;
|
|
1947
|
+
case "lg":
|
|
1948
|
+
return 56;
|
|
1949
|
+
case "xl":
|
|
1950
|
+
return 72;
|
|
1951
|
+
}
|
|
1952
|
+
};
|
|
1953
|
+
|
|
1549
1954
|
// ../renderers/src/ModalLayoutRenderer.tsx
|
|
1550
|
-
var
|
|
1551
|
-
var
|
|
1552
|
-
var
|
|
1955
|
+
var import_components29 = require("@transferwise/components");
|
|
1956
|
+
var import_react8 = require("react");
|
|
1957
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
1553
1958
|
var ModalLayoutRenderer = {
|
|
1554
1959
|
canRenderType: "modal-layout",
|
|
1555
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
1960
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DFModal, __spreadValues({}, props))
|
|
1556
1961
|
};
|
|
1557
1962
|
var ModalLayoutRenderer_default = ModalLayoutRenderer;
|
|
1558
1963
|
function DFModal({ content, margin, trigger }) {
|
|
1559
|
-
const [visible, setVisible] = (0,
|
|
1964
|
+
const [visible, setVisible] = (0, import_react8.useState)(false);
|
|
1560
1965
|
const { children, title } = content;
|
|
1561
|
-
return /* @__PURE__ */ (0,
|
|
1562
|
-
/* @__PURE__ */ (0,
|
|
1563
|
-
/* @__PURE__ */ (0,
|
|
1564
|
-
|
|
1966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: getMargin(margin), children: [
|
|
1967
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components29.Button, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
|
|
1968
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
1969
|
+
import_components29.Modal,
|
|
1565
1970
|
{
|
|
1566
1971
|
scroll: "content",
|
|
1567
1972
|
open: visible,
|
|
@@ -1575,60 +1980,21 @@ function DFModal({ content, margin, trigger }) {
|
|
|
1575
1980
|
}
|
|
1576
1981
|
|
|
1577
1982
|
// ../renderers/src/ModalRenderer.tsx
|
|
1578
|
-
var
|
|
1579
|
-
var
|
|
1983
|
+
var import_components30 = require("@transferwise/components");
|
|
1984
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
1580
1985
|
var ModalRenderer = {
|
|
1581
1986
|
canRenderType: "modal",
|
|
1582
1987
|
render: ({ title, children, open, onClose }) => {
|
|
1583
|
-
return /* @__PURE__ */ (0,
|
|
1988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_components30.Modal, { open, title, body: children, onClose });
|
|
1584
1989
|
}
|
|
1585
1990
|
};
|
|
1586
1991
|
|
|
1587
1992
|
// ../renderers/src/MoneyInputRenderer.tsx
|
|
1588
|
-
var
|
|
1589
|
-
var
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
var
|
|
1593
|
-
return knownTags.map((tag) => {
|
|
1594
|
-
return { tag, items: items.filter((item) => {
|
|
1595
|
-
var _a;
|
|
1596
|
-
return (_a = item.tags) == null ? void 0 : _a.includes(tag);
|
|
1597
|
-
}) };
|
|
1598
|
-
}).filter((group) => group.items.length > 0);
|
|
1599
|
-
};
|
|
1600
|
-
|
|
1601
|
-
// ../renderers/src/MoneyInputRenderer.tsx
|
|
1602
|
-
var import_react_intl8 = require("react-intl");
|
|
1603
|
-
|
|
1604
|
-
// ../renderers/src/messages/group.messages.ts
|
|
1605
|
-
var import_react_intl7 = require("react-intl");
|
|
1606
|
-
var group_messages_default = (0, import_react_intl7.defineMessages)({
|
|
1607
|
-
all: {
|
|
1608
|
-
id: "df.wise.group.all",
|
|
1609
|
-
defaultMessage: "All",
|
|
1610
|
-
description: "Label for the group of options that encompasses all options"
|
|
1611
|
-
},
|
|
1612
|
-
popular: {
|
|
1613
|
-
id: "df.wise.group.popular",
|
|
1614
|
-
defaultMessage: "Popular",
|
|
1615
|
-
description: "Label for the group of options that are tagged as popular"
|
|
1616
|
-
},
|
|
1617
|
-
recent: {
|
|
1618
|
-
id: "df.wise.group.recent",
|
|
1619
|
-
defaultMessage: "Recent",
|
|
1620
|
-
description: "Label for the group of options that are tagged as recent"
|
|
1621
|
-
},
|
|
1622
|
-
"currencies-with-account-details": {
|
|
1623
|
-
id: "df.wise.group.currencies-with-account-details",
|
|
1624
|
-
defaultMessage: "Currencies with account details",
|
|
1625
|
-
description: "Label for the group of options that are tagged as currencies with account details"
|
|
1626
|
-
}
|
|
1627
|
-
});
|
|
1628
|
-
|
|
1629
|
-
// ../renderers/src/MoneyInputRenderer.tsx
|
|
1630
|
-
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1631
|
-
var groupingTags = Object.keys(group_messages_default).filter((key) => key !== "all");
|
|
1993
|
+
var import_components31 = require("@transferwise/components");
|
|
1994
|
+
var import_react9 = require("react");
|
|
1995
|
+
var import_react_intl11 = require("react-intl");
|
|
1996
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
1997
|
+
var groupingTags2 = Object.keys(group_messages_default).filter((key) => key !== "all");
|
|
1632
1998
|
var MoneyInputRenderer = {
|
|
1633
1999
|
canRenderType: "money-input",
|
|
1634
2000
|
render: MoneyInputRendererComponent
|
|
@@ -1648,13 +2014,13 @@ function MoneyInputRendererComponent(props) {
|
|
|
1648
2014
|
onAmountChange,
|
|
1649
2015
|
onCurrencyChange
|
|
1650
2016
|
} = props;
|
|
1651
|
-
(0,
|
|
2017
|
+
(0, import_react9.useEffect)(() => {
|
|
1652
2018
|
if (!isValidIndex(selectedCurrencyIndex, currencies.length)) {
|
|
1653
2019
|
onCurrencyChange(0);
|
|
1654
2020
|
}
|
|
1655
2021
|
}, [selectedCurrencyIndex, onCurrencyChange, currencies.length]);
|
|
1656
|
-
const { formatMessage } = (0,
|
|
1657
|
-
return /* @__PURE__ */ (0,
|
|
2022
|
+
const { formatMessage } = (0, import_react_intl11.useIntl)();
|
|
2023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
1658
2024
|
FieldInput_default,
|
|
1659
2025
|
{
|
|
1660
2026
|
id: uid,
|
|
@@ -1662,8 +2028,8 @@ function MoneyInputRendererComponent(props) {
|
|
|
1662
2028
|
description,
|
|
1663
2029
|
validation: validationState,
|
|
1664
2030
|
help,
|
|
1665
|
-
children: /* @__PURE__ */ (0,
|
|
1666
|
-
|
|
2031
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2032
|
+
import_components31.MoneyInput,
|
|
1667
2033
|
{
|
|
1668
2034
|
amount: parseFloatOrNull(amountValue),
|
|
1669
2035
|
searchPlaceholder: "",
|
|
@@ -1691,7 +2057,7 @@ var parseFloatOrNull = (value) => {
|
|
|
1691
2057
|
return Number.isNaN(parsed) ? null : parsed;
|
|
1692
2058
|
};
|
|
1693
2059
|
var mapCurrencies = (options, formatMessage) => {
|
|
1694
|
-
const groupsFromTags = getGroupsFromTags(
|
|
2060
|
+
const groupsFromTags = getGroupsFromTags(groupingTags2, options);
|
|
1695
2061
|
if (groupsFromTags.length > 0) {
|
|
1696
2062
|
return [...groupsFromTags, { tag: "all", items: options }].flatMap(({ tag, items }) => {
|
|
1697
2063
|
return [
|
|
@@ -1724,13 +2090,13 @@ function assertCurrencyCodeIsString(currencyCode) {
|
|
|
1724
2090
|
}
|
|
1725
2091
|
|
|
1726
2092
|
// ../renderers/src/MultiSelectInputRenderer.tsx
|
|
1727
|
-
var
|
|
1728
|
-
var
|
|
1729
|
-
var
|
|
2093
|
+
var import_components32 = require("@transferwise/components");
|
|
2094
|
+
var import_react10 = require("react");
|
|
2095
|
+
var import_react_intl13 = require("react-intl");
|
|
1730
2096
|
|
|
1731
2097
|
// ../renderers/src/messages/multi-select.messages.ts
|
|
1732
|
-
var
|
|
1733
|
-
var multi_select_messages_default = (0,
|
|
2098
|
+
var import_react_intl12 = require("react-intl");
|
|
2099
|
+
var multi_select_messages_default = (0, import_react_intl12.defineMessages)({
|
|
1734
2100
|
summary: {
|
|
1735
2101
|
id: "df.wise.MultiSelect.summary",
|
|
1736
2102
|
defaultMessage: "{first} and {count} more",
|
|
@@ -1739,14 +2105,14 @@ var multi_select_messages_default = (0, import_react_intl9.defineMessages)({
|
|
|
1739
2105
|
});
|
|
1740
2106
|
|
|
1741
2107
|
// ../renderers/src/MultiSelectInputRenderer.tsx
|
|
1742
|
-
var
|
|
2108
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
1743
2109
|
var MultiSelectInputRenderer = {
|
|
1744
2110
|
canRenderType: "input-multi-select",
|
|
1745
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
2111
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(MultiSelectInputRendererComponent, __spreadValues({}, props))
|
|
1746
2112
|
};
|
|
1747
2113
|
function MultiSelectInputRendererComponent(props) {
|
|
1748
|
-
const { formatMessage } = (0,
|
|
1749
|
-
const [stagedIndices, setStagedIndices] = (0,
|
|
2114
|
+
const { formatMessage } = (0, import_react_intl13.useIntl)();
|
|
2115
|
+
const [stagedIndices, setStagedIndices] = (0, import_react10.useState)();
|
|
1750
2116
|
const {
|
|
1751
2117
|
id,
|
|
1752
2118
|
autoComplete,
|
|
@@ -1784,12 +2150,12 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
1784
2150
|
const contentProps = {
|
|
1785
2151
|
title: option.title,
|
|
1786
2152
|
description: option.description,
|
|
1787
|
-
icon: /* @__PURE__ */ (0,
|
|
2153
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
|
|
1788
2154
|
};
|
|
1789
|
-
return /* @__PURE__ */ (0,
|
|
2155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components32.SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
1790
2156
|
};
|
|
1791
2157
|
const extraProps = { autoComplete };
|
|
1792
|
-
return /* @__PURE__ */ (0,
|
|
2158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
1793
2159
|
FieldInput_default,
|
|
1794
2160
|
{
|
|
1795
2161
|
id,
|
|
@@ -1797,8 +2163,8 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
1797
2163
|
help,
|
|
1798
2164
|
description,
|
|
1799
2165
|
validation: validationState,
|
|
1800
|
-
children: /* @__PURE__ */ (0,
|
|
1801
|
-
|
|
2166
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2167
|
+
import_components32.SelectInput,
|
|
1802
2168
|
__spreadValues({
|
|
1803
2169
|
id,
|
|
1804
2170
|
items: options.map((option, index) => {
|
|
@@ -1837,12 +2203,12 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
1837
2203
|
var MultiSelectInputRenderer_default = MultiSelectInputRenderer;
|
|
1838
2204
|
|
|
1839
2205
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
1840
|
-
var
|
|
2206
|
+
var import_components34 = require("@transferwise/components");
|
|
1841
2207
|
|
|
1842
2208
|
// ../renderers/src/components/UploadFieldInput.tsx
|
|
1843
|
-
var
|
|
2209
|
+
var import_components33 = require("@transferwise/components");
|
|
1844
2210
|
var import_classnames4 = __toESM(require_classnames());
|
|
1845
|
-
var
|
|
2211
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
1846
2212
|
function UploadFieldInput({
|
|
1847
2213
|
id,
|
|
1848
2214
|
children,
|
|
@@ -1851,18 +2217,18 @@ function UploadFieldInput({
|
|
|
1851
2217
|
help,
|
|
1852
2218
|
validation
|
|
1853
2219
|
}) {
|
|
1854
|
-
const labelContent = label && help ? /* @__PURE__ */ (0,
|
|
2220
|
+
const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(LabelContentWithHelp, { text: label, help }) : label;
|
|
1855
2221
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
1856
|
-
return /* @__PURE__ */ (0,
|
|
2222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
1857
2223
|
"div",
|
|
1858
2224
|
{
|
|
1859
2225
|
className: (0, import_classnames4.default)("form-group d-block", {
|
|
1860
2226
|
"has-error": (validation == null ? void 0 : validation.status) === "invalid"
|
|
1861
2227
|
}),
|
|
1862
2228
|
children: [
|
|
1863
|
-
/* @__PURE__ */ (0,
|
|
2229
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
|
|
1864
2230
|
children,
|
|
1865
|
-
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0,
|
|
2231
|
+
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components33.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
|
|
1866
2232
|
]
|
|
1867
2233
|
}
|
|
1868
2234
|
);
|
|
@@ -1897,7 +2263,7 @@ var getSizeLimit = (maxSize) => {
|
|
|
1897
2263
|
};
|
|
1898
2264
|
|
|
1899
2265
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
1900
|
-
var
|
|
2266
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
1901
2267
|
var MultiUploadInputRenderer = {
|
|
1902
2268
|
canRenderType: "input-upload-multi",
|
|
1903
2269
|
render: (props) => {
|
|
@@ -1922,7 +2288,7 @@ var MultiUploadInputRenderer = {
|
|
|
1922
2288
|
};
|
|
1923
2289
|
const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
|
|
1924
2290
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
1925
|
-
return /* @__PURE__ */ (0,
|
|
2291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
1926
2292
|
UploadFieldInput_default,
|
|
1927
2293
|
{
|
|
1928
2294
|
id,
|
|
@@ -1930,8 +2296,8 @@ var MultiUploadInputRenderer = {
|
|
|
1930
2296
|
description,
|
|
1931
2297
|
validation: validationState,
|
|
1932
2298
|
help,
|
|
1933
|
-
children: /* @__PURE__ */ (0,
|
|
1934
|
-
|
|
2299
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2300
|
+
import_components34.UploadInput,
|
|
1935
2301
|
{
|
|
1936
2302
|
id,
|
|
1937
2303
|
"aria-describedby": descriptionId,
|
|
@@ -1940,7 +2306,7 @@ var MultiUploadInputRenderer = {
|
|
|
1940
2306
|
files: value.map(({ id: id2, file, validationState: validationState2 }) => ({
|
|
1941
2307
|
id: id2,
|
|
1942
2308
|
filename: file.name,
|
|
1943
|
-
status: (validationState2 == null ? void 0 : validationState2.status) === "invalid" ?
|
|
2309
|
+
status: (validationState2 == null ? void 0 : validationState2.status) === "invalid" ? import_components34.Status.FAILED : import_components34.Status.SUCCEEDED
|
|
1944
2310
|
})),
|
|
1945
2311
|
fileTypes: acceptsToFileTypes(accepts),
|
|
1946
2312
|
maxFiles: maxItems,
|
|
@@ -1958,8 +2324,8 @@ var MultiUploadInputRenderer = {
|
|
|
1958
2324
|
var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
|
|
1959
2325
|
|
|
1960
2326
|
// ../renderers/src/NumberInputRenderer.tsx
|
|
1961
|
-
var
|
|
1962
|
-
var
|
|
2327
|
+
var import_components35 = require("@transferwise/components");
|
|
2328
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
1963
2329
|
var NumberInputRenderer = {
|
|
1964
2330
|
canRenderType: "input-number",
|
|
1965
2331
|
render: (props) => {
|
|
@@ -1973,7 +2339,7 @@ var NumberInputRenderer = {
|
|
|
1973
2339
|
"maximum",
|
|
1974
2340
|
"minimum"
|
|
1975
2341
|
);
|
|
1976
|
-
return /* @__PURE__ */ (0,
|
|
2342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
1977
2343
|
FieldInput_default,
|
|
1978
2344
|
{
|
|
1979
2345
|
id,
|
|
@@ -1981,8 +2347,8 @@ var NumberInputRenderer = {
|
|
|
1981
2347
|
description,
|
|
1982
2348
|
validation: validationState,
|
|
1983
2349
|
help,
|
|
1984
|
-
children: /* @__PURE__ */ (0,
|
|
1985
|
-
|
|
2350
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components35.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2351
|
+
import_components35.Input,
|
|
1986
2352
|
__spreadValues({
|
|
1987
2353
|
id,
|
|
1988
2354
|
name: id,
|
|
@@ -2002,24 +2368,24 @@ var NumberInputRenderer = {
|
|
|
2002
2368
|
var NumberInputRenderer_default = NumberInputRenderer;
|
|
2003
2369
|
|
|
2004
2370
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
2005
|
-
var
|
|
2371
|
+
var import_react_intl15 = require("react-intl");
|
|
2006
2372
|
|
|
2007
2373
|
// ../renderers/src/hooks/useSnackBarIfAvailable.ts
|
|
2008
|
-
var
|
|
2009
|
-
var
|
|
2374
|
+
var import_components36 = require("@transferwise/components");
|
|
2375
|
+
var import_react11 = require("react");
|
|
2010
2376
|
function useSnackBarIfAvailable() {
|
|
2011
|
-
const context = (0,
|
|
2377
|
+
const context = (0, import_react11.useContext)(import_components36.SnackbarContext);
|
|
2012
2378
|
return context ? context.createSnackbar : () => {
|
|
2013
2379
|
};
|
|
2014
2380
|
}
|
|
2015
2381
|
|
|
2016
2382
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
2017
|
-
var
|
|
2383
|
+
var import_components37 = require("@transferwise/components");
|
|
2018
2384
|
var import_classnames5 = __toESM(require_classnames());
|
|
2019
2385
|
|
|
2020
2386
|
// ../renderers/src/messages/paragraph.messages.ts
|
|
2021
|
-
var
|
|
2022
|
-
var paragraph_messages_default = (0,
|
|
2387
|
+
var import_react_intl14 = require("react-intl");
|
|
2388
|
+
var paragraph_messages_default = (0, import_react_intl14.defineMessages)({
|
|
2023
2389
|
copy: {
|
|
2024
2390
|
id: "df.wise.DynamicParagraph.copy",
|
|
2025
2391
|
defaultMessage: "Copy",
|
|
@@ -2033,14 +2399,14 @@ var paragraph_messages_default = (0, import_react_intl11.defineMessages)({
|
|
|
2033
2399
|
});
|
|
2034
2400
|
|
|
2035
2401
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
2036
|
-
var
|
|
2402
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2037
2403
|
var ParagraphRenderer = {
|
|
2038
2404
|
canRenderType: "paragraph",
|
|
2039
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
2405
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Paragraph, __spreadValues({}, props))
|
|
2040
2406
|
};
|
|
2041
2407
|
function Paragraph({ align, control, margin, size, text }) {
|
|
2042
2408
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
2043
|
-
return control === "copyable" ? /* @__PURE__ */ (0,
|
|
2409
|
+
return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2044
2410
|
"p",
|
|
2045
2411
|
{
|
|
2046
2412
|
className: `${["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large"} ${className}`,
|
|
@@ -2053,16 +2419,16 @@ function CopyableParagraph({
|
|
|
2053
2419
|
align,
|
|
2054
2420
|
className
|
|
2055
2421
|
}) {
|
|
2056
|
-
const { formatMessage } = (0,
|
|
2422
|
+
const { formatMessage } = (0, import_react_intl15.useIntl)();
|
|
2057
2423
|
const createSnackbar = useSnackBarIfAvailable();
|
|
2058
2424
|
const copy = () => {
|
|
2059
2425
|
navigator.clipboard.writeText(text).then(() => createSnackbar({ text: formatMessage(paragraph_messages_default.copied) })).catch(() => {
|
|
2060
2426
|
});
|
|
2061
2427
|
};
|
|
2062
2428
|
const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
|
|
2063
|
-
return /* @__PURE__ */ (0,
|
|
2064
|
-
/* @__PURE__ */ (0,
|
|
2065
|
-
|
|
2429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className, children: [
|
|
2430
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2431
|
+
import_components37.Input,
|
|
2066
2432
|
{
|
|
2067
2433
|
type: "text",
|
|
2068
2434
|
value: text,
|
|
@@ -2070,28 +2436,51 @@ function CopyableParagraph({
|
|
|
2070
2436
|
className: (0, import_classnames5.default)("text-ellipsis", inputAlignmentClasses)
|
|
2071
2437
|
}
|
|
2072
2438
|
),
|
|
2073
|
-
/* @__PURE__ */ (0,
|
|
2439
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components37.Button, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
|
|
2074
2440
|
] });
|
|
2075
2441
|
}
|
|
2076
2442
|
var ParagraphRenderer_default = ParagraphRenderer;
|
|
2077
2443
|
|
|
2078
|
-
// ../renderers/src/
|
|
2079
|
-
var
|
|
2080
|
-
var
|
|
2081
|
-
var
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2444
|
+
// ../renderers/src/ProgressRenderer.tsx
|
|
2445
|
+
var import_components38 = require("@transferwise/components");
|
|
2446
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
2447
|
+
var ProgressRenderer = {
|
|
2448
|
+
canRenderType: "progress",
|
|
2449
|
+
render: ({ uid, title, help, progress, progressText, margin, description }) => {
|
|
2450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
2451
|
+
import_components38.ProgressBar,
|
|
2452
|
+
{
|
|
2453
|
+
id: uid,
|
|
2454
|
+
className: getMargin(margin),
|
|
2455
|
+
title: title && help ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(LabelContentWithHelp, { text: title, help }) : title,
|
|
2456
|
+
description,
|
|
2457
|
+
progress: {
|
|
2458
|
+
max: 1,
|
|
2459
|
+
value: progress
|
|
2460
|
+
},
|
|
2461
|
+
textEnd: progressText
|
|
2462
|
+
}
|
|
2463
|
+
);
|
|
2464
|
+
}
|
|
2465
|
+
};
|
|
2466
|
+
|
|
2467
|
+
// ../renderers/src/RepeatableRenderer.tsx
|
|
2468
|
+
var import_components39 = require("@transferwise/components");
|
|
2469
|
+
var import_icons = require("@transferwise/icons");
|
|
2470
|
+
var import_classnames6 = __toESM(require_classnames());
|
|
2471
|
+
var import_react12 = require("react");
|
|
2472
|
+
var import_react_intl17 = require("react-intl");
|
|
2473
|
+
|
|
2474
|
+
// ../renderers/src/messages/repeatable.messages.ts
|
|
2475
|
+
var import_react_intl16 = require("react-intl");
|
|
2476
|
+
var repeatable_messages_default = (0, import_react_intl16.defineMessages)({
|
|
2477
|
+
addItemTitle: {
|
|
2478
|
+
id: "df.wise.ArraySchema.addItemTitle",
|
|
2479
|
+
defaultMessage: "Add Item",
|
|
2480
|
+
description: "Label on the button used to open a form to add an item"
|
|
2481
|
+
},
|
|
2482
|
+
addItem: {
|
|
2483
|
+
id: "df.wise.ArraySchema.addItem",
|
|
2095
2484
|
defaultMessage: "Save",
|
|
2096
2485
|
description: "Label on the add button used to submit a form that adds an item"
|
|
2097
2486
|
},
|
|
@@ -2108,10 +2497,10 @@ var repeatable_messages_default = (0, import_react_intl13.defineMessages)({
|
|
|
2108
2497
|
});
|
|
2109
2498
|
|
|
2110
2499
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
2111
|
-
var
|
|
2500
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
2112
2501
|
var RepeatableRenderer = {
|
|
2113
2502
|
canRenderType: "repeatable",
|
|
2114
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
2503
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Repeatable, __spreadValues({}, props))
|
|
2115
2504
|
};
|
|
2116
2505
|
function Repeatable(props) {
|
|
2117
2506
|
const {
|
|
@@ -2127,8 +2516,8 @@ function Repeatable(props) {
|
|
|
2127
2516
|
onSave,
|
|
2128
2517
|
onRemove
|
|
2129
2518
|
} = props;
|
|
2130
|
-
const { formatMessage } = (0,
|
|
2131
|
-
const [openModalType, setOpenModalType] = (0,
|
|
2519
|
+
const { formatMessage } = (0, import_react_intl17.useIntl)();
|
|
2520
|
+
const [openModalType, setOpenModalType] = (0, import_react12.useState)(null);
|
|
2132
2521
|
const onAddItem = () => {
|
|
2133
2522
|
onAdd();
|
|
2134
2523
|
setOpenModalType("add");
|
|
@@ -2150,41 +2539,41 @@ function Repeatable(props) {
|
|
|
2150
2539
|
const onCancelEdit = () => {
|
|
2151
2540
|
setOpenModalType(null);
|
|
2152
2541
|
};
|
|
2153
|
-
return /* @__PURE__ */ (0,
|
|
2154
|
-
title && /* @__PURE__ */ (0,
|
|
2155
|
-
description && /* @__PURE__ */ (0,
|
|
2156
|
-
/* @__PURE__ */ (0,
|
|
2542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
|
2543
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components39.Header, { title }),
|
|
2544
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { children: description }),
|
|
2545
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
2157
2546
|
"div",
|
|
2158
2547
|
{
|
|
2159
2548
|
className: (0, import_classnames6.default)("form-group", {
|
|
2160
2549
|
"has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
|
|
2161
2550
|
}),
|
|
2162
2551
|
children: [
|
|
2163
|
-
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0,
|
|
2164
|
-
/* @__PURE__ */ (0,
|
|
2165
|
-
|
|
2552
|
+
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
|
|
2553
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2554
|
+
import_components39.NavigationOption,
|
|
2166
2555
|
{
|
|
2167
|
-
media: /* @__PURE__ */ (0,
|
|
2556
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_icons.Plus, {}),
|
|
2168
2557
|
title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2169
2558
|
showMediaAtAllSizes: true,
|
|
2170
2559
|
onClick: () => onAddItem()
|
|
2171
2560
|
}
|
|
2172
2561
|
),
|
|
2173
|
-
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0,
|
|
2562
|
+
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components39.InlineAlert, { type: "negative", children: validationState.message })
|
|
2174
2563
|
]
|
|
2175
2564
|
}
|
|
2176
2565
|
),
|
|
2177
|
-
/* @__PURE__ */ (0,
|
|
2178
|
-
|
|
2566
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2567
|
+
import_components39.Modal,
|
|
2179
2568
|
{
|
|
2180
2569
|
open: openModalType !== null,
|
|
2181
2570
|
title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2182
|
-
body: /* @__PURE__ */ (0,
|
|
2183
|
-
/* @__PURE__ */ (0,
|
|
2184
|
-
/* @__PURE__ */ (0,
|
|
2185
|
-
/* @__PURE__ */ (0,
|
|
2186
|
-
/* @__PURE__ */ (0,
|
|
2187
|
-
|
|
2571
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
|
2572
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "m-b-2", children: editableItem }),
|
|
2573
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { children: [
|
|
2574
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components39.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
|
|
2575
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2576
|
+
import_components39.Button,
|
|
2188
2577
|
{
|
|
2189
2578
|
v2: true,
|
|
2190
2579
|
priority: "secondary",
|
|
@@ -2205,10 +2594,10 @@ function ItemSummaryOption({
|
|
|
2205
2594
|
item,
|
|
2206
2595
|
onClick
|
|
2207
2596
|
}) {
|
|
2208
|
-
return /* @__PURE__ */ (0,
|
|
2209
|
-
|
|
2597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2598
|
+
import_components39.NavigationOption,
|
|
2210
2599
|
{
|
|
2211
|
-
media: /* @__PURE__ */ (0,
|
|
2600
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(OptionMedia, { media: item.media, preferAvatar: false }),
|
|
2212
2601
|
title: item.title,
|
|
2213
2602
|
content: item.description,
|
|
2214
2603
|
showMediaAtAllSizes: true,
|
|
@@ -2219,14 +2608,140 @@ function ItemSummaryOption({
|
|
|
2219
2608
|
}
|
|
2220
2609
|
var RepeatableRenderer_default = RepeatableRenderer;
|
|
2221
2610
|
|
|
2222
|
-
// ../renderers/src/
|
|
2223
|
-
var
|
|
2224
|
-
var
|
|
2611
|
+
// ../renderers/src/ReviewLegacyRenderer.tsx
|
|
2612
|
+
var import_components40 = require("@transferwise/components");
|
|
2613
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
2614
|
+
var ReviewRenderer = {
|
|
2615
|
+
canRenderType: "review",
|
|
2616
|
+
render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
|
|
2617
|
+
const orientation = mapControlToDefinitionListLayout(control);
|
|
2618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: getMargin(margin), children: [
|
|
2619
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Header5, { title, callToAction }),
|
|
2620
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
2621
|
+
import_components40.DefinitionList,
|
|
2622
|
+
{
|
|
2623
|
+
layout: orientation,
|
|
2624
|
+
definitions: fields.map(
|
|
2625
|
+
({ label, value, help, analyticsId: fieldAnalyticsId }, index) => ({
|
|
2626
|
+
key: String(index),
|
|
2627
|
+
value,
|
|
2628
|
+
title: getFieldLabel(
|
|
2629
|
+
label,
|
|
2630
|
+
help,
|
|
2631
|
+
() => trackEvent("Help Pressed", { layoutItemId: fieldAnalyticsId })
|
|
2632
|
+
)
|
|
2633
|
+
})
|
|
2634
|
+
)
|
|
2635
|
+
}
|
|
2636
|
+
) })
|
|
2637
|
+
] });
|
|
2638
|
+
}
|
|
2639
|
+
};
|
|
2640
|
+
var ReviewLegacyRenderer_default = ReviewRenderer;
|
|
2641
|
+
var mapControlToDefinitionListLayout = (control) => {
|
|
2642
|
+
switch (control) {
|
|
2643
|
+
case "horizontal":
|
|
2644
|
+
case "horizontal-end-aligned":
|
|
2645
|
+
return "HORIZONTAL_RIGHT_ALIGNED";
|
|
2646
|
+
case "horizontal-start-aligned":
|
|
2647
|
+
return "HORIZONTAL_LEFT_ALIGNED";
|
|
2648
|
+
case "vertical-two-column":
|
|
2649
|
+
return "VERTICAL_TWO_COLUMN";
|
|
2650
|
+
case "vertical":
|
|
2651
|
+
case "vertical-one-column":
|
|
2652
|
+
default:
|
|
2653
|
+
return "VERTICAL_ONE_COLUMN";
|
|
2654
|
+
}
|
|
2655
|
+
};
|
|
2656
|
+
var getFieldLabel = (label, help, onClick) => {
|
|
2657
|
+
if (help) {
|
|
2658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
|
|
2659
|
+
label,
|
|
2660
|
+
" ",
|
|
2661
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Help_default, { help, onClick })
|
|
2662
|
+
] });
|
|
2663
|
+
}
|
|
2664
|
+
return label;
|
|
2665
|
+
};
|
|
2666
|
+
|
|
2667
|
+
// ../renderers/src/ReviewRenderer.tsx
|
|
2668
|
+
var import_components41 = require("@transferwise/components");
|
|
2669
|
+
var import_icons2 = require("@transferwise/icons");
|
|
2225
2670
|
var import_react_intl18 = require("react-intl");
|
|
2671
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
2672
|
+
var IGNORED_CONTROLS = [
|
|
2673
|
+
"horizontal",
|
|
2674
|
+
"horizontal-end-aligned",
|
|
2675
|
+
"horizontal-start-aligned",
|
|
2676
|
+
"vertical-two-column"
|
|
2677
|
+
];
|
|
2678
|
+
var ReviewRenderer2 = {
|
|
2679
|
+
canRenderType: "review",
|
|
2680
|
+
canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
|
|
2681
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Review, __spreadValues({}, props))
|
|
2682
|
+
};
|
|
2683
|
+
var Review = ({
|
|
2684
|
+
callToAction,
|
|
2685
|
+
control,
|
|
2686
|
+
margin,
|
|
2687
|
+
fields,
|
|
2688
|
+
tags,
|
|
2689
|
+
title,
|
|
2690
|
+
trackEvent
|
|
2691
|
+
}) => {
|
|
2692
|
+
const intl = (0, import_react_intl18.useIntl)();
|
|
2693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: getMargin(margin), children: [
|
|
2694
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Header5, { title, callToAction }),
|
|
2695
|
+
fields.map((field) => {
|
|
2696
|
+
var _a, _b, _c;
|
|
2697
|
+
const {
|
|
2698
|
+
label,
|
|
2699
|
+
value,
|
|
2700
|
+
media,
|
|
2701
|
+
additionalInfo,
|
|
2702
|
+
inlineAlert,
|
|
2703
|
+
help,
|
|
2704
|
+
analyticsId,
|
|
2705
|
+
callToAction: itemCallToAction,
|
|
2706
|
+
tags: itemTags
|
|
2707
|
+
} = field;
|
|
2708
|
+
const controlOptions = {
|
|
2709
|
+
ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
|
|
2710
|
+
fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
|
|
2711
|
+
};
|
|
2712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2713
|
+
import_components41.ListItem,
|
|
2714
|
+
{
|
|
2715
|
+
title: value,
|
|
2716
|
+
subtitle: label,
|
|
2717
|
+
inverted: true,
|
|
2718
|
+
media: getMedia(media, shouldUseAvatar(control, itemTags)),
|
|
2719
|
+
control: (_c = getCTAControl(itemCallToAction, controlOptions)) != null ? _c : help ? getHelpControl(
|
|
2720
|
+
help,
|
|
2721
|
+
intl.formatMessage(help_messages_default.helpAria),
|
|
2722
|
+
() => trackEvent("Help Pressed", { layoutItemId: analyticsId })
|
|
2723
|
+
) : void 0,
|
|
2724
|
+
prompt: getInlineAlert(inlineAlert),
|
|
2725
|
+
additionalInfo: getAdditionalInfo(additionalInfo)
|
|
2726
|
+
},
|
|
2727
|
+
JSON.stringify(field)
|
|
2728
|
+
);
|
|
2729
|
+
})
|
|
2730
|
+
] });
|
|
2731
|
+
};
|
|
2732
|
+
var getHelpControl = (help, ariaLabel, onClick) => {
|
|
2733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components41.Popover, { content: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components41.Markdown, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components41.ListItem.IconButton, { partiallyInteractive: true, "aria-label": ariaLabel, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_icons2.QuestionMarkCircle, {}) }) });
|
|
2734
|
+
};
|
|
2735
|
+
var ReviewRenderer_default = ReviewRenderer2;
|
|
2736
|
+
|
|
2737
|
+
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
2738
|
+
var import_components43 = require("@transferwise/components");
|
|
2739
|
+
var import_react13 = require("react");
|
|
2740
|
+
var import_react_intl22 = require("react-intl");
|
|
2226
2741
|
|
|
2227
2742
|
// ../renderers/src/messages/search.messages.ts
|
|
2228
|
-
var
|
|
2229
|
-
var search_messages_default = (0,
|
|
2743
|
+
var import_react_intl19 = require("react-intl");
|
|
2744
|
+
var search_messages_default = (0, import_react_intl19.defineMessages)({
|
|
2230
2745
|
loading: {
|
|
2231
2746
|
id: "df.wise.SearchLayout.loading",
|
|
2232
2747
|
defaultMessage: "Loading...",
|
|
@@ -2235,11 +2750,11 @@ var search_messages_default = (0, import_react_intl15.defineMessages)({
|
|
|
2235
2750
|
});
|
|
2236
2751
|
|
|
2237
2752
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
2238
|
-
var
|
|
2753
|
+
var import_react_intl21 = require("react-intl");
|
|
2239
2754
|
|
|
2240
2755
|
// ../renderers/src/messages/generic-error.messages.ts
|
|
2241
|
-
var
|
|
2242
|
-
var generic_error_messages_default = (0,
|
|
2756
|
+
var import_react_intl20 = require("react-intl");
|
|
2757
|
+
var generic_error_messages_default = (0, import_react_intl20.defineMessages)({
|
|
2243
2758
|
genericErrorRetryHint: {
|
|
2244
2759
|
id: "df.wise.PersistAsyncSchema.genericError",
|
|
2245
2760
|
defaultMessage: "Something went wrong, please try again.",
|
|
@@ -2258,21 +2773,23 @@ var generic_error_messages_default = (0, import_react_intl16.defineMessages)({
|
|
|
2258
2773
|
});
|
|
2259
2774
|
|
|
2260
2775
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
2261
|
-
var
|
|
2262
|
-
var
|
|
2776
|
+
var import_components42 = require("@transferwise/components");
|
|
2777
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
2263
2778
|
function ErrorResult({ state }) {
|
|
2264
|
-
const intl = (0,
|
|
2265
|
-
return /* @__PURE__ */ (0,
|
|
2779
|
+
const intl = (0, import_react_intl21.useIntl)();
|
|
2780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("p", { className: "m-t-2", children: [
|
|
2266
2781
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
2267
2782
|
"\xA0",
|
|
2268
|
-
/* @__PURE__ */ (0,
|
|
2783
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_components42.Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
|
|
2269
2784
|
] });
|
|
2270
2785
|
}
|
|
2271
2786
|
|
|
2272
2787
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
2273
|
-
var
|
|
2788
|
+
var import_icons3 = require("@transferwise/icons");
|
|
2789
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
2274
2790
|
function BlockSearchRendererComponent({
|
|
2275
2791
|
id,
|
|
2792
|
+
hint,
|
|
2276
2793
|
isLoading,
|
|
2277
2794
|
margin,
|
|
2278
2795
|
query,
|
|
@@ -2281,17 +2798,17 @@ function BlockSearchRendererComponent({
|
|
|
2281
2798
|
trackEvent,
|
|
2282
2799
|
onChange
|
|
2283
2800
|
}) {
|
|
2284
|
-
const [hasSearched, setHasSearched] = (0,
|
|
2285
|
-
const { formatMessage } = (0,
|
|
2286
|
-
return /* @__PURE__ */ (0,
|
|
2287
|
-
/* @__PURE__ */ (0,
|
|
2288
|
-
|
|
2801
|
+
const [hasSearched, setHasSearched] = (0, import_react13.useState)(false);
|
|
2802
|
+
const { formatMessage } = (0, import_react_intl22.useIntl)();
|
|
2803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: getMargin(margin), children: [
|
|
2804
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components43.InputGroup, { addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_icons3.Search, { size: 24 }) }, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2805
|
+
import_components43.Input,
|
|
2289
2806
|
{
|
|
2290
2807
|
id,
|
|
2291
2808
|
name: id,
|
|
2809
|
+
placeholder: hint,
|
|
2292
2810
|
type: "text",
|
|
2293
2811
|
value: query,
|
|
2294
|
-
className: "m-t-1",
|
|
2295
2812
|
onChange: ({ currentTarget: { value } }) => {
|
|
2296
2813
|
if (!hasSearched) {
|
|
2297
2814
|
setHasSearched(true);
|
|
@@ -2300,8 +2817,8 @@ function BlockSearchRendererComponent({
|
|
|
2300
2817
|
onChange(value);
|
|
2301
2818
|
}
|
|
2302
2819
|
}
|
|
2303
|
-
) }),
|
|
2304
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
2820
|
+
) }) }),
|
|
2821
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(SearchResultContent, { state, trackEvent })
|
|
2305
2822
|
] });
|
|
2306
2823
|
}
|
|
2307
2824
|
function SearchResultContent({
|
|
@@ -2310,39 +2827,42 @@ function SearchResultContent({
|
|
|
2310
2827
|
}) {
|
|
2311
2828
|
switch (state.type) {
|
|
2312
2829
|
case "error":
|
|
2313
|
-
return /* @__PURE__ */ (0,
|
|
2830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(ErrorResult, { state });
|
|
2314
2831
|
case "results":
|
|
2315
|
-
return /* @__PURE__ */ (0,
|
|
2832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(SearchResults, { state, trackEvent });
|
|
2316
2833
|
case "noResults":
|
|
2317
|
-
return /* @__PURE__ */ (0,
|
|
2834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(EmptySearchResult, { state });
|
|
2318
2835
|
case "pending":
|
|
2319
2836
|
default:
|
|
2320
2837
|
return null;
|
|
2321
2838
|
}
|
|
2322
2839
|
}
|
|
2323
2840
|
function EmptySearchResult({ state }) {
|
|
2324
|
-
return /* @__PURE__ */ (0,
|
|
2841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components43.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
2325
2842
|
}
|
|
2326
2843
|
function SearchResults({
|
|
2327
2844
|
state,
|
|
2328
2845
|
trackEvent
|
|
2329
2846
|
}) {
|
|
2330
|
-
return /* @__PURE__ */ (0,
|
|
2847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components43.List, { children: state.results.map((result) => {
|
|
2331
2848
|
const { media } = result;
|
|
2332
|
-
return /* @__PURE__ */ (0,
|
|
2333
|
-
|
|
2849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2850
|
+
import_components43.ListItem,
|
|
2334
2851
|
{
|
|
2335
2852
|
title: result.title,
|
|
2336
|
-
|
|
2337
|
-
media: media ? /* @__PURE__ */ (0,
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2853
|
+
subtitle: result.description,
|
|
2854
|
+
media: media ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(OptionMedia, { media, preferAvatar: false }) : void 0,
|
|
2855
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2856
|
+
import_components43.ListItem.Navigation,
|
|
2857
|
+
{
|
|
2858
|
+
onClick: () => {
|
|
2859
|
+
trackEvent("Search Result Selected", __spreadValues({
|
|
2860
|
+
type: result.type
|
|
2861
|
+
}, result.type === "action" ? { actionId: result.id } : {}));
|
|
2862
|
+
result.onClick();
|
|
2863
|
+
}
|
|
2864
|
+
}
|
|
2865
|
+
)
|
|
2346
2866
|
},
|
|
2347
2867
|
JSON.stringify(result)
|
|
2348
2868
|
);
|
|
@@ -2351,13 +2871,14 @@ function SearchResults({
|
|
|
2351
2871
|
var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
|
|
2352
2872
|
|
|
2353
2873
|
// ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
|
|
2354
|
-
var
|
|
2355
|
-
var
|
|
2356
|
-
var
|
|
2357
|
-
var
|
|
2358
|
-
var
|
|
2874
|
+
var import_components44 = require("@transferwise/components");
|
|
2875
|
+
var import_icons4 = require("@transferwise/icons");
|
|
2876
|
+
var import_react14 = require("react");
|
|
2877
|
+
var import_react_intl23 = require("react-intl");
|
|
2878
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2359
2879
|
function InlineSearchRenderer({
|
|
2360
2880
|
id,
|
|
2881
|
+
hint,
|
|
2361
2882
|
isLoading,
|
|
2362
2883
|
margin,
|
|
2363
2884
|
onChange,
|
|
@@ -2365,20 +2886,21 @@ function InlineSearchRenderer({
|
|
|
2365
2886
|
title,
|
|
2366
2887
|
trackEvent
|
|
2367
2888
|
}) {
|
|
2368
|
-
const [hasSearched, setHasSearched] = (0,
|
|
2369
|
-
const intl = (0,
|
|
2370
|
-
return /* @__PURE__ */ (0,
|
|
2371
|
-
|
|
2889
|
+
const [hasSearched, setHasSearched] = (0, import_react14.useState)(false);
|
|
2890
|
+
const intl = (0, import_react_intl23.useIntl)();
|
|
2891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2892
|
+
import_components44.Typeahead,
|
|
2372
2893
|
{
|
|
2373
2894
|
id: "typeahead-input-id",
|
|
2374
2895
|
intl,
|
|
2375
2896
|
name: "typeahead-input-name",
|
|
2376
2897
|
size: "md",
|
|
2898
|
+
placeholder: hint,
|
|
2377
2899
|
maxHeight: 100,
|
|
2378
|
-
footer: /* @__PURE__ */ (0,
|
|
2900
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(TypeaheadFooter, { state, isLoading }),
|
|
2379
2901
|
multiple: false,
|
|
2380
2902
|
clearable: false,
|
|
2381
|
-
addon: /* @__PURE__ */ (0,
|
|
2903
|
+
addon: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_icons4.Search, { size: 24 }),
|
|
2382
2904
|
options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
|
|
2383
2905
|
minQueryLength: 1,
|
|
2384
2906
|
onChange: (values) => {
|
|
@@ -2413,33 +2935,33 @@ function mapResultToTypeaheadOption(result) {
|
|
|
2413
2935
|
};
|
|
2414
2936
|
}
|
|
2415
2937
|
function TypeaheadFooter({ state, isLoading }) {
|
|
2416
|
-
const { formatMessage } = (0,
|
|
2938
|
+
const { formatMessage } = (0, import_react_intl23.useIntl)();
|
|
2417
2939
|
if (state.type === "noResults") {
|
|
2418
|
-
return /* @__PURE__ */ (0,
|
|
2940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_components44.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
2419
2941
|
}
|
|
2420
2942
|
if (state.type === "error") {
|
|
2421
|
-
return /* @__PURE__ */ (0,
|
|
2943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(ErrorResult, { state }) });
|
|
2422
2944
|
}
|
|
2423
2945
|
if (state.type === "pending" || isLoading) {
|
|
2424
|
-
return /* @__PURE__ */ (0,
|
|
2946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
|
|
2425
2947
|
}
|
|
2426
2948
|
return null;
|
|
2427
2949
|
}
|
|
2428
2950
|
var InlineSearchRendererComponent_default = InlineSearchRenderer;
|
|
2429
2951
|
|
|
2430
2952
|
// ../renderers/src/SearchRenderer/SearchRenderer.tsx
|
|
2431
|
-
var
|
|
2953
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2432
2954
|
var SearchRenderer = {
|
|
2433
2955
|
canRenderType: "search",
|
|
2434
|
-
render: (props) => props.control === "inline" ? /* @__PURE__ */ (0,
|
|
2956
|
+
render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
|
|
2435
2957
|
};
|
|
2436
2958
|
var SearchRenderer_default = SearchRenderer;
|
|
2437
2959
|
|
|
2438
2960
|
// ../renderers/src/SectionRenderer.tsx
|
|
2439
|
-
var
|
|
2961
|
+
var import_components45 = require("@transferwise/components");
|
|
2440
2962
|
|
|
2441
2963
|
// ../renderers/src/utils/getHeaderAction.tsx
|
|
2442
|
-
var
|
|
2964
|
+
var getHeaderAction2 = (callToAction) => {
|
|
2443
2965
|
if (!callToAction) {
|
|
2444
2966
|
return void 0;
|
|
2445
2967
|
}
|
|
@@ -2460,12 +2982,12 @@ var getHeaderAction = (callToAction) => {
|
|
|
2460
2982
|
};
|
|
2461
2983
|
|
|
2462
2984
|
// ../renderers/src/SectionRenderer.tsx
|
|
2463
|
-
var
|
|
2985
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2464
2986
|
var SectionRenderer = {
|
|
2465
2987
|
canRenderType: "section",
|
|
2466
2988
|
render: ({ children, callToAction, margin, title }) => {
|
|
2467
|
-
return /* @__PURE__ */ (0,
|
|
2468
|
-
(title || callToAction) && /* @__PURE__ */ (0,
|
|
2989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("section", { className: getMargin(margin), children: [
|
|
2990
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_components45.Header, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
|
|
2469
2991
|
children
|
|
2470
2992
|
] });
|
|
2471
2993
|
}
|
|
@@ -2473,8 +2995,8 @@ var SectionRenderer = {
|
|
|
2473
2995
|
var SectionRenderer_default = SectionRenderer;
|
|
2474
2996
|
|
|
2475
2997
|
// ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
2476
|
-
var
|
|
2477
|
-
var
|
|
2998
|
+
var import_components46 = require("@transferwise/components");
|
|
2999
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
2478
3000
|
function RadioInputRendererComponent(props) {
|
|
2479
3001
|
const {
|
|
2480
3002
|
id,
|
|
@@ -2488,8 +3010,8 @@ function RadioInputRendererComponent(props) {
|
|
|
2488
3010
|
validationState,
|
|
2489
3011
|
onSelect
|
|
2490
3012
|
} = props;
|
|
2491
|
-
return /* @__PURE__ */ (0,
|
|
2492
|
-
/* @__PURE__ */ (0,
|
|
3013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
|
|
3014
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
2493
3015
|
FieldInput_default,
|
|
2494
3016
|
{
|
|
2495
3017
|
id,
|
|
@@ -2497,8 +3019,8 @@ function RadioInputRendererComponent(props) {
|
|
|
2497
3019
|
help,
|
|
2498
3020
|
description,
|
|
2499
3021
|
validation: validationState,
|
|
2500
|
-
children: /* @__PURE__ */ (0,
|
|
2501
|
-
|
|
3022
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3023
|
+
import_components46.RadioGroup,
|
|
2502
3024
|
{
|
|
2503
3025
|
name: id,
|
|
2504
3026
|
radios: options.map((option, index) => ({
|
|
@@ -2506,7 +3028,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2506
3028
|
value: index,
|
|
2507
3029
|
secondary: option.description,
|
|
2508
3030
|
disabled: option.disabled || disabled,
|
|
2509
|
-
avatar: /* @__PURE__ */ (0,
|
|
3031
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
|
|
2510
3032
|
})),
|
|
2511
3033
|
selectedValue: selectedIndex != null ? selectedIndex : void 0,
|
|
2512
3034
|
onChange: onSelect
|
|
@@ -2520,9 +3042,9 @@ function RadioInputRendererComponent(props) {
|
|
|
2520
3042
|
}
|
|
2521
3043
|
|
|
2522
3044
|
// ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
2523
|
-
var
|
|
2524
|
-
var
|
|
2525
|
-
var
|
|
3045
|
+
var import_components47 = require("@transferwise/components");
|
|
3046
|
+
var import_react15 = require("react");
|
|
3047
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
2526
3048
|
function TabInputRendererComponent(props) {
|
|
2527
3049
|
const {
|
|
2528
3050
|
id,
|
|
@@ -2536,13 +3058,13 @@ function TabInputRendererComponent(props) {
|
|
|
2536
3058
|
validationState,
|
|
2537
3059
|
onSelect
|
|
2538
3060
|
} = props;
|
|
2539
|
-
(0,
|
|
3061
|
+
(0, import_react15.useEffect)(() => {
|
|
2540
3062
|
if (!isValidIndex2(selectedIndex, options.length)) {
|
|
2541
3063
|
onSelect(0);
|
|
2542
3064
|
}
|
|
2543
3065
|
}, [selectedIndex, onSelect, options.length]);
|
|
2544
|
-
return /* @__PURE__ */ (0,
|
|
2545
|
-
/* @__PURE__ */ (0,
|
|
3066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
3067
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2546
3068
|
FieldInput_default,
|
|
2547
3069
|
{
|
|
2548
3070
|
id,
|
|
@@ -2550,8 +3072,8 @@ function TabInputRendererComponent(props) {
|
|
|
2550
3072
|
help,
|
|
2551
3073
|
description,
|
|
2552
3074
|
validation: validationState,
|
|
2553
|
-
children: /* @__PURE__ */ (0,
|
|
2554
|
-
|
|
3075
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3076
|
+
import_components47.Tabs,
|
|
2555
3077
|
{
|
|
2556
3078
|
name: id,
|
|
2557
3079
|
selected: selectedIndex != null ? selectedIndex : 0,
|
|
@@ -2559,7 +3081,7 @@ function TabInputRendererComponent(props) {
|
|
|
2559
3081
|
title: option.title,
|
|
2560
3082
|
// if we pass null, we get some props-types console errors
|
|
2561
3083
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
2562
|
-
content: /* @__PURE__ */ (0,
|
|
3084
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_jsx_runtime67.Fragment, {}),
|
|
2563
3085
|
disabled: option.disabled || disabled
|
|
2564
3086
|
})),
|
|
2565
3087
|
onTabSelect: onSelect
|
|
@@ -2573,8 +3095,8 @@ function TabInputRendererComponent(props) {
|
|
|
2573
3095
|
var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
|
|
2574
3096
|
|
|
2575
3097
|
// ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
2576
|
-
var
|
|
2577
|
-
var
|
|
3098
|
+
var import_components48 = require("@transferwise/components");
|
|
3099
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
2578
3100
|
function SelectInputRendererComponent(props) {
|
|
2579
3101
|
const {
|
|
2580
3102
|
id,
|
|
@@ -2614,13 +3136,13 @@ function SelectInputRendererComponent(props) {
|
|
|
2614
3136
|
} : {
|
|
2615
3137
|
title: option.title,
|
|
2616
3138
|
description: option.description,
|
|
2617
|
-
icon: /* @__PURE__ */ (0,
|
|
3139
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
|
|
2618
3140
|
};
|
|
2619
|
-
return /* @__PURE__ */ (0,
|
|
3141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_components48.SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
2620
3142
|
};
|
|
2621
3143
|
const extraProps = { autoComplete };
|
|
2622
|
-
return /* @__PURE__ */ (0,
|
|
2623
|
-
/* @__PURE__ */ (0,
|
|
3144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
|
|
3145
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
2624
3146
|
FieldInput_default,
|
|
2625
3147
|
{
|
|
2626
3148
|
id,
|
|
@@ -2628,8 +3150,8 @@ function SelectInputRendererComponent(props) {
|
|
|
2628
3150
|
help,
|
|
2629
3151
|
description,
|
|
2630
3152
|
validation: validationState,
|
|
2631
|
-
children: /* @__PURE__ */ (0,
|
|
2632
|
-
|
|
3153
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3154
|
+
import_components48.SelectInput,
|
|
2633
3155
|
__spreadValues({
|
|
2634
3156
|
name: id,
|
|
2635
3157
|
placeholder,
|
|
@@ -2649,9 +3171,9 @@ function SelectInputRendererComponent(props) {
|
|
|
2649
3171
|
}
|
|
2650
3172
|
|
|
2651
3173
|
// ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
|
|
2652
|
-
var
|
|
2653
|
-
var
|
|
2654
|
-
var
|
|
3174
|
+
var import_react16 = require("react");
|
|
3175
|
+
var import_components49 = require("@transferwise/components");
|
|
3176
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
2655
3177
|
function SegmentedInputRendererComponent(props) {
|
|
2656
3178
|
const {
|
|
2657
3179
|
id,
|
|
@@ -2664,13 +3186,13 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2664
3186
|
validationState,
|
|
2665
3187
|
onSelect
|
|
2666
3188
|
} = props;
|
|
2667
|
-
(0,
|
|
3189
|
+
(0, import_react16.useEffect)(() => {
|
|
2668
3190
|
if (!isValidIndex3(selectedIndex, options.length)) {
|
|
2669
3191
|
onSelect(0);
|
|
2670
3192
|
}
|
|
2671
3193
|
}, [selectedIndex, onSelect, options.length]);
|
|
2672
|
-
return /* @__PURE__ */ (0,
|
|
2673
|
-
/* @__PURE__ */ (0,
|
|
3194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
|
|
3195
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
2674
3196
|
FieldInput_default,
|
|
2675
3197
|
{
|
|
2676
3198
|
id,
|
|
@@ -2678,8 +3200,8 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2678
3200
|
help,
|
|
2679
3201
|
description,
|
|
2680
3202
|
validation: validationState,
|
|
2681
|
-
children: /* @__PURE__ */ (0,
|
|
2682
|
-
|
|
3203
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3204
|
+
import_components49.SegmentedControl,
|
|
2683
3205
|
{
|
|
2684
3206
|
name: `${id}-segmented-control`,
|
|
2685
3207
|
value: String(selectedIndex),
|
|
@@ -2695,14 +3217,14 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2695
3217
|
)
|
|
2696
3218
|
}
|
|
2697
3219
|
),
|
|
2698
|
-
/* @__PURE__ */ (0,
|
|
3220
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { id: `${id}-children`, children })
|
|
2699
3221
|
] });
|
|
2700
3222
|
}
|
|
2701
3223
|
var isValidIndex3 = (index, options) => index !== null && index >= 0 && index < options;
|
|
2702
3224
|
|
|
2703
3225
|
// ../renderers/src/SelectInputRenderer/RadioItemRendererComponent.tsx
|
|
2704
|
-
var
|
|
2705
|
-
var
|
|
3226
|
+
var import_components50 = require("@transferwise/components");
|
|
3227
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
2706
3228
|
function RadioItemRendererComponent(props) {
|
|
2707
3229
|
const {
|
|
2708
3230
|
id,
|
|
@@ -2716,23 +3238,23 @@ function RadioItemRendererComponent(props) {
|
|
|
2716
3238
|
validationState,
|
|
2717
3239
|
onSelect
|
|
2718
3240
|
} = props;
|
|
2719
|
-
return /* @__PURE__ */ (0,
|
|
2720
|
-
rootTitle && /* @__PURE__ */ (0,
|
|
2721
|
-
|
|
3241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
|
|
3242
|
+
rootTitle && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3243
|
+
import_components50.Header,
|
|
2722
3244
|
{
|
|
2723
3245
|
as: "h2",
|
|
2724
|
-
title: help ? /* @__PURE__ */ (0,
|
|
3246
|
+
title: help ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
|
|
2725
3247
|
}
|
|
2726
3248
|
),
|
|
2727
|
-
rootDescription && /* @__PURE__ */ (0,
|
|
2728
|
-
/* @__PURE__ */ (0,
|
|
2729
|
-
({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ (0,
|
|
2730
|
-
|
|
3249
|
+
rootDescription && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("p", { children: rootDescription }),
|
|
3250
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components50.List, { children: options.map(
|
|
3251
|
+
({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3252
|
+
import_components50.ListItem,
|
|
2731
3253
|
__spreadValues({
|
|
2732
3254
|
title,
|
|
2733
3255
|
subtitle: description,
|
|
2734
|
-
control: /* @__PURE__ */ (0,
|
|
2735
|
-
|
|
3256
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3257
|
+
import_components50.ListItem.Radio,
|
|
2736
3258
|
{
|
|
2737
3259
|
name: title,
|
|
2738
3260
|
checked: selectedIndex === index,
|
|
@@ -2747,59 +3269,103 @@ function RadioItemRendererComponent(props) {
|
|
|
2747
3269
|
title
|
|
2748
3270
|
)
|
|
2749
3271
|
) }, `${id}-${selectedIndex}`),
|
|
2750
|
-
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0,
|
|
3272
|
+
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components50.InlineAlert, { type: "negative", children: validationState.message }),
|
|
2751
3273
|
children
|
|
2752
3274
|
] });
|
|
2753
3275
|
}
|
|
2754
3276
|
|
|
2755
3277
|
// ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
|
|
2756
|
-
var
|
|
3278
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
2757
3279
|
var SelectInputRenderer = {
|
|
2758
3280
|
canRenderType: "input-select",
|
|
2759
3281
|
render: (props) => {
|
|
2760
3282
|
switch (props.control) {
|
|
2761
3283
|
case "radio":
|
|
2762
|
-
return /* @__PURE__ */ (0,
|
|
3284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
|
|
2763
3285
|
case "radio-item":
|
|
2764
|
-
return /* @__PURE__ */ (0,
|
|
3286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(RadioItemRendererComponent, __spreadValues({}, props));
|
|
2765
3287
|
case "tab":
|
|
2766
|
-
return props.options.length > 3 ? /* @__PURE__ */ (0,
|
|
3288
|
+
return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(TabInputRendererComponent, __spreadValues({}, props));
|
|
2767
3289
|
case "segmented":
|
|
2768
|
-
return props.options.length > 3 ? /* @__PURE__ */ (0,
|
|
3290
|
+
return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
|
|
2769
3291
|
case "select":
|
|
2770
3292
|
default:
|
|
2771
|
-
return /* @__PURE__ */ (0,
|
|
3293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
|
|
2772
3294
|
}
|
|
2773
3295
|
}
|
|
2774
3296
|
};
|
|
2775
3297
|
var SelectInputRenderer_default = SelectInputRenderer;
|
|
2776
3298
|
|
|
2777
|
-
// ../renderers/src/
|
|
2778
|
-
var
|
|
2779
|
-
var
|
|
2780
|
-
var
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
3299
|
+
// ../renderers/src/StatusListRenderer.tsx
|
|
3300
|
+
var import_components51 = require("@transferwise/components");
|
|
3301
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
3302
|
+
var StatusListRenderer = {
|
|
3303
|
+
canRenderType: "status-list",
|
|
3304
|
+
render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: getMargin(margin), children: [
|
|
3305
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_components51.Header, { title }) : null,
|
|
3306
|
+
items.map((item) => {
|
|
3307
|
+
const { callToAction, description, icon, status, title: itemTitle } = item;
|
|
3308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
3309
|
+
import_components51.ListItem,
|
|
3310
|
+
{
|
|
3311
|
+
title: itemTitle,
|
|
3312
|
+
subtitle: description,
|
|
3313
|
+
media: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_components51.AvatarView, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(DynamicIcon_default, { name: icon.name }) }) : void 0,
|
|
3314
|
+
additionalInfo: callToAction ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
3315
|
+
import_components51.ListItem.AdditionalInfo,
|
|
3316
|
+
{
|
|
3317
|
+
action: {
|
|
3318
|
+
href: callToAction.href,
|
|
3319
|
+
onClick: callToAction.href ? void 0 : callToAction.onClick,
|
|
3320
|
+
label: callToAction.title,
|
|
3321
|
+
target: "_blank"
|
|
3322
|
+
}
|
|
3323
|
+
}
|
|
3324
|
+
) : void 0
|
|
3325
|
+
},
|
|
3326
|
+
JSON.stringify(item)
|
|
3327
|
+
);
|
|
3328
|
+
})
|
|
3329
|
+
] })
|
|
3330
|
+
};
|
|
3331
|
+
var mapStatus = (status) => {
|
|
3332
|
+
switch (status) {
|
|
3333
|
+
case "done":
|
|
3334
|
+
return "positive";
|
|
3335
|
+
case "pending":
|
|
3336
|
+
return "pending";
|
|
3337
|
+
default:
|
|
3338
|
+
return void 0;
|
|
3339
|
+
}
|
|
3340
|
+
};
|
|
3341
|
+
var StatusListRenderer_default = StatusListRenderer;
|
|
3342
|
+
|
|
3343
|
+
// ../renderers/src/utils/useCustomTheme.ts
|
|
3344
|
+
var import_components_theming = require("@wise/components-theming");
|
|
3345
|
+
var import_react17 = require("react");
|
|
3346
|
+
var ThemeRequiredEventName = "Theme Required";
|
|
3347
|
+
var useCustomTheme = (theme, trackEvent) => {
|
|
3348
|
+
const theming = (0, import_components_theming.useTheme)();
|
|
3349
|
+
const previousTheme = (0, import_react17.useMemo)(() => theming.theme, []);
|
|
3350
|
+
(0, import_react17.useEffect)(() => {
|
|
3351
|
+
theming.setTheme(theme);
|
|
3352
|
+
trackEvent(ThemeRequiredEventName, { theme });
|
|
3353
|
+
return theme !== previousTheme ? () => {
|
|
3354
|
+
theming.setTheme(previousTheme);
|
|
3355
|
+
trackEvent(ThemeRequiredEventName, { theme: previousTheme });
|
|
3356
|
+
} : () => {
|
|
3357
|
+
};
|
|
3358
|
+
}, []);
|
|
3359
|
+
};
|
|
3360
|
+
|
|
3361
|
+
// ../renderers/src/step/topbar/BackButton.tsx
|
|
3362
|
+
var import_components52 = require("@transferwise/components");
|
|
3363
|
+
var import_icons5 = require("@transferwise/icons");
|
|
3364
|
+
var import_react_intl25 = require("react-intl");
|
|
3365
|
+
|
|
3366
|
+
// ../renderers/src/messages/back.messages.ts
|
|
3367
|
+
var import_react_intl24 = require("react-intl");
|
|
3368
|
+
var back_messages_default = (0, import_react_intl24.defineMessages)({
|
|
2803
3369
|
back: {
|
|
2804
3370
|
id: "df.wise.back.label",
|
|
2805
3371
|
defaultMessage: "Back",
|
|
@@ -2808,31 +3374,31 @@ var back_messages_default = (0, import_react_intl20.defineMessages)({
|
|
|
2808
3374
|
});
|
|
2809
3375
|
|
|
2810
3376
|
// ../renderers/src/step/topbar/BackButton.tsx
|
|
2811
|
-
var
|
|
3377
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
2812
3378
|
function BackButton({ title, onClick }) {
|
|
2813
|
-
const { formatMessage } = (0,
|
|
2814
|
-
return /* @__PURE__ */ (0,
|
|
2815
|
-
/* @__PURE__ */ (0,
|
|
2816
|
-
/* @__PURE__ */ (0,
|
|
3379
|
+
const { formatMessage } = (0, import_react_intl25.useIntl)();
|
|
3380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_components52.IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
|
|
3381
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
|
|
3382
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_icons5.ArrowLeft, {})
|
|
2817
3383
|
] });
|
|
2818
3384
|
}
|
|
2819
3385
|
|
|
2820
3386
|
// ../renderers/src/step/topbar/Toolbar.tsx
|
|
2821
|
-
var
|
|
2822
|
-
var
|
|
3387
|
+
var import_components53 = require("@transferwise/components");
|
|
3388
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
2823
3389
|
var Toolbar = ({ items }) => {
|
|
2824
|
-
return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ (0,
|
|
3390
|
+
return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
|
|
2825
3391
|
};
|
|
2826
3392
|
function ToolbarButton(props) {
|
|
2827
|
-
return prefersMedia(props.control) ? /* @__PURE__ */ (0,
|
|
3393
|
+
return prefersMedia(props.control) ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TextToolbarButton, __spreadValues({}, props));
|
|
2828
3394
|
}
|
|
2829
3395
|
function MediaToolbarButton(props) {
|
|
2830
3396
|
var _a;
|
|
2831
3397
|
const { context, control, media, accessibilityDescription, disabled, onClick } = props;
|
|
2832
3398
|
const priority = getIconButtonPriority(control);
|
|
2833
3399
|
const type = getSentiment2(context);
|
|
2834
|
-
return /* @__PURE__ */ (0,
|
|
2835
|
-
|
|
3400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
3401
|
+
import_components53.IconButton,
|
|
2836
3402
|
{
|
|
2837
3403
|
className: "df-toolbar-button",
|
|
2838
3404
|
disabled,
|
|
@@ -2841,7 +3407,7 @@ function MediaToolbarButton(props) {
|
|
|
2841
3407
|
type,
|
|
2842
3408
|
onClick,
|
|
2843
3409
|
children: [
|
|
2844
|
-
accessibilityDescription ? /* @__PURE__ */ (0,
|
|
3410
|
+
accessibilityDescription ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "sr-only", children: accessibilityDescription }) : null,
|
|
2845
3411
|
media ? (_a = getAddonStartMedia(media)) == null ? void 0 : _a.value : null
|
|
2846
3412
|
]
|
|
2847
3413
|
}
|
|
@@ -2852,8 +3418,8 @@ function TextToolbarButton(props) {
|
|
|
2852
3418
|
const addonStart = media ? getAddonStartMedia(media) : void 0;
|
|
2853
3419
|
const priority = getPriority2(control);
|
|
2854
3420
|
const sentiment = getSentiment2(context);
|
|
2855
|
-
return /* @__PURE__ */ (0,
|
|
2856
|
-
|
|
3421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3422
|
+
import_components53.Button,
|
|
2857
3423
|
{
|
|
2858
3424
|
v2: true,
|
|
2859
3425
|
size: "sm",
|
|
@@ -2882,16 +3448,16 @@ var getIconButtonPriority = (control) => {
|
|
|
2882
3448
|
};
|
|
2883
3449
|
|
|
2884
3450
|
// ../renderers/src/step/topbar/TopBar.tsx
|
|
2885
|
-
var
|
|
3451
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
2886
3452
|
function TopBar({ back, toolbar }) {
|
|
2887
|
-
return back || toolbar ? /* @__PURE__ */ (0,
|
|
2888
|
-
back ? /* @__PURE__ */ (0,
|
|
2889
|
-
toolbar ? /* @__PURE__ */ (0,
|
|
3453
|
+
return back || toolbar ? /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "d-flex m-b-2", children: [
|
|
3454
|
+
back ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(BackButton, __spreadValues({}, back)) : null,
|
|
3455
|
+
toolbar ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Toolbar, __spreadValues({}, toolbar)) : null
|
|
2890
3456
|
] }) : null;
|
|
2891
3457
|
}
|
|
2892
3458
|
|
|
2893
3459
|
// ../renderers/src/step/SplashCelebrationStepRenderer.tsx
|
|
2894
|
-
var
|
|
3460
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
2895
3461
|
var SplashCelebrationStepRenderer = {
|
|
2896
3462
|
canRenderType: "step",
|
|
2897
3463
|
canRender: ({ control }) => control === "splash-celebration",
|
|
@@ -2901,15 +3467,15 @@ function SplashCelebrationStepRendererComponent(props) {
|
|
|
2901
3467
|
const { back, toolbar, children, footer, trackEvent } = props;
|
|
2902
3468
|
const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
|
|
2903
3469
|
useCustomTheme("forest-green", trackEvent);
|
|
2904
|
-
return /* @__PURE__ */ (0,
|
|
2905
|
-
/* @__PURE__ */ (0,
|
|
3470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "splash-screen m-t-5", children: [
|
|
3471
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(TopBar, { back, toolbar }),
|
|
2906
3472
|
children,
|
|
2907
|
-
hasFooter ? /* @__PURE__ */ (0,
|
|
3473
|
+
hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0
|
|
2908
3474
|
] });
|
|
2909
3475
|
}
|
|
2910
3476
|
|
|
2911
3477
|
// ../renderers/src/step/SplashStepRenderer.tsx
|
|
2912
|
-
var
|
|
3478
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
2913
3479
|
var SplashStepRenderer = {
|
|
2914
3480
|
canRenderType: "step",
|
|
2915
3481
|
canRender: ({ control }) => control === "splash",
|
|
@@ -2918,16 +3484,16 @@ var SplashStepRenderer = {
|
|
|
2918
3484
|
function SplashStepRendererComponent(props) {
|
|
2919
3485
|
const { back, toolbar, children, footer } = props;
|
|
2920
3486
|
const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
|
|
2921
|
-
return /* @__PURE__ */ (0,
|
|
2922
|
-
/* @__PURE__ */ (0,
|
|
3487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "splash-screen m-t-5", children: [
|
|
3488
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(TopBar, { back, toolbar }),
|
|
2923
3489
|
children,
|
|
2924
|
-
hasFooter ? /* @__PURE__ */ (0,
|
|
3490
|
+
hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0
|
|
2925
3491
|
] });
|
|
2926
3492
|
}
|
|
2927
3493
|
|
|
2928
3494
|
// ../renderers/src/step/StepRenderer.tsx
|
|
2929
|
-
var
|
|
2930
|
-
var
|
|
3495
|
+
var import_components54 = require("@transferwise/components");
|
|
3496
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
2931
3497
|
var StepRenderer = {
|
|
2932
3498
|
canRenderType: "step",
|
|
2933
3499
|
render: StepRendererComponent
|
|
@@ -2935,19 +3501,19 @@ var StepRenderer = {
|
|
|
2935
3501
|
function StepRendererComponent(props) {
|
|
2936
3502
|
const { back, description, error, title, children, toolbar, footer, tags } = props;
|
|
2937
3503
|
const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
|
|
2938
|
-
return /* @__PURE__ */ (0,
|
|
2939
|
-
/* @__PURE__ */ (0,
|
|
2940
|
-
title || description ? /* @__PURE__ */ (0,
|
|
2941
|
-
error ? /* @__PURE__ */ (0,
|
|
3504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { children: [
|
|
3505
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(TopBar, { back, toolbar }),
|
|
3506
|
+
title || description ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Header10, { title, description, tags }) }) : void 0,
|
|
3507
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_components54.Alert, { type: "negative", className: "m-b-2", message: error }) : null,
|
|
2942
3508
|
children,
|
|
2943
|
-
hasFooter ? /* @__PURE__ */ (0,
|
|
3509
|
+
hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0
|
|
2944
3510
|
] });
|
|
2945
3511
|
}
|
|
2946
|
-
var
|
|
3512
|
+
var Header10 = ({ title, description, tags }) => {
|
|
2947
3513
|
const { titleType, alignmentClassName } = getHeaderStyle(tags);
|
|
2948
|
-
return /* @__PURE__ */ (0,
|
|
2949
|
-
title ? /* @__PURE__ */ (0,
|
|
2950
|
-
description ? /* @__PURE__ */ (0,
|
|
3514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
3515
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_components54.Title, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
|
|
3516
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
|
|
2951
3517
|
] });
|
|
2952
3518
|
};
|
|
2953
3519
|
var getHeaderStyle = (tags) => {
|
|
@@ -2958,36 +3524,36 @@ var getHeaderStyle = (tags) => {
|
|
|
2958
3524
|
};
|
|
2959
3525
|
|
|
2960
3526
|
// ../renderers/src/TabsRenderer.tsx
|
|
2961
|
-
var
|
|
2962
|
-
var
|
|
2963
|
-
var
|
|
3527
|
+
var import_components55 = require("@transferwise/components");
|
|
3528
|
+
var import_react18 = require("react");
|
|
3529
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
2964
3530
|
var TabsRenderer = {
|
|
2965
3531
|
canRenderType: "tabs",
|
|
2966
3532
|
render: (props) => {
|
|
2967
3533
|
switch (props.control) {
|
|
2968
3534
|
case "segmented":
|
|
2969
3535
|
if (props.tabs.length > 3) {
|
|
2970
|
-
return /* @__PURE__ */ (0,
|
|
3536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(TabsRendererComponent, __spreadValues({}, props));
|
|
2971
3537
|
}
|
|
2972
|
-
return /* @__PURE__ */ (0,
|
|
3538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(SegmentedTabsRendererComponent, __spreadValues({}, props));
|
|
2973
3539
|
case "chips":
|
|
2974
|
-
return /* @__PURE__ */ (0,
|
|
3540
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(ChipsTabsRendererComponent, __spreadValues({}, props));
|
|
2975
3541
|
default:
|
|
2976
|
-
return /* @__PURE__ */ (0,
|
|
3542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(TabsRendererComponent, __spreadValues({}, props));
|
|
2977
3543
|
}
|
|
2978
3544
|
}
|
|
2979
3545
|
};
|
|
2980
3546
|
function TabsRendererComponent({ uid, margin, tabs }) {
|
|
2981
|
-
const [selectedIndex, setSelectedIndex] = (0,
|
|
2982
|
-
return /* @__PURE__ */ (0,
|
|
2983
|
-
|
|
3547
|
+
const [selectedIndex, setSelectedIndex] = (0, import_react18.useState)(0);
|
|
3548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
3549
|
+
import_components55.Tabs,
|
|
2984
3550
|
{
|
|
2985
3551
|
name: uid,
|
|
2986
3552
|
selected: selectedIndex != null ? selectedIndex : 0,
|
|
2987
3553
|
tabs: tabs.map((option) => ({
|
|
2988
3554
|
title: option.title,
|
|
2989
3555
|
disabled: false,
|
|
2990
|
-
content: /* @__PURE__ */ (0,
|
|
3556
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "m-t-2", children: [
|
|
2991
3557
|
" ",
|
|
2992
3558
|
option.children,
|
|
2993
3559
|
" "
|
|
@@ -2999,10 +3565,10 @@ function TabsRendererComponent({ uid, margin, tabs }) {
|
|
|
2999
3565
|
}
|
|
3000
3566
|
function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
3001
3567
|
var _a;
|
|
3002
|
-
const [selectedIndex, setSelectedIndex] = (0,
|
|
3003
|
-
return /* @__PURE__ */ (0,
|
|
3004
|
-
/* @__PURE__ */ (0,
|
|
3005
|
-
|
|
3568
|
+
const [selectedIndex, setSelectedIndex] = (0, import_react18.useState)(0);
|
|
3569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: getMargin(margin), children: [
|
|
3570
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
3571
|
+
import_components55.SegmentedControl,
|
|
3006
3572
|
{
|
|
3007
3573
|
name: uid,
|
|
3008
3574
|
value: String(selectedIndex),
|
|
@@ -3016,31 +3582,31 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
|
3016
3582
|
onChange: (value) => setSelectedIndex(Number(value))
|
|
3017
3583
|
}
|
|
3018
3584
|
),
|
|
3019
|
-
/* @__PURE__ */ (0,
|
|
3585
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
3020
3586
|
] });
|
|
3021
3587
|
}
|
|
3022
3588
|
function ChipsTabsRendererComponent({ margin, tabs }) {
|
|
3023
3589
|
var _a;
|
|
3024
|
-
const [selectedIndex, setSelectedIndex] = (0,
|
|
3025
|
-
return /* @__PURE__ */ (0,
|
|
3026
|
-
/* @__PURE__ */ (0,
|
|
3027
|
-
|
|
3590
|
+
const [selectedIndex, setSelectedIndex] = (0, import_react18.useState)(0);
|
|
3591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: getMargin(margin), children: [
|
|
3592
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "chips-container", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
3593
|
+
import_components55.Chips,
|
|
3028
3594
|
{
|
|
3029
3595
|
chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
|
|
3030
3596
|
selected: selectedIndex,
|
|
3031
3597
|
onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
|
|
3032
3598
|
}
|
|
3033
3599
|
) }),
|
|
3034
|
-
/* @__PURE__ */ (0,
|
|
3600
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
3035
3601
|
] });
|
|
3036
3602
|
}
|
|
3037
3603
|
|
|
3038
3604
|
// ../renderers/src/TextInputRenderer.tsx
|
|
3039
|
-
var
|
|
3605
|
+
var import_components57 = require("@transferwise/components");
|
|
3040
3606
|
|
|
3041
3607
|
// ../renderers/src/components/VariableTextInput.tsx
|
|
3042
|
-
var
|
|
3043
|
-
var
|
|
3608
|
+
var import_components56 = require("@transferwise/components");
|
|
3609
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
3044
3610
|
var commonKeys = [
|
|
3045
3611
|
"autoComplete",
|
|
3046
3612
|
"autoCapitalize",
|
|
@@ -3059,12 +3625,12 @@ function VariableTextInput(inputProps) {
|
|
|
3059
3625
|
const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
|
|
3060
3626
|
switch (control) {
|
|
3061
3627
|
case "email":
|
|
3062
|
-
return /* @__PURE__ */ (0,
|
|
3628
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
|
|
3063
3629
|
case "password":
|
|
3064
|
-
return /* @__PURE__ */ (0,
|
|
3630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
|
|
3065
3631
|
case "numeric": {
|
|
3066
3632
|
const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
|
|
3067
|
-
return /* @__PURE__ */ (0,
|
|
3633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3068
3634
|
TextInput,
|
|
3069
3635
|
__spreadProps(__spreadValues({}, numericProps), {
|
|
3070
3636
|
onChange: (newValue) => {
|
|
@@ -3075,21 +3641,21 @@ function VariableTextInput(inputProps) {
|
|
|
3075
3641
|
);
|
|
3076
3642
|
}
|
|
3077
3643
|
case "phone-number":
|
|
3078
|
-
return /* @__PURE__ */ (0,
|
|
3644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components56.PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
|
|
3079
3645
|
default: {
|
|
3080
|
-
return /* @__PURE__ */ (0,
|
|
3646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
|
|
3081
3647
|
}
|
|
3082
3648
|
}
|
|
3083
3649
|
}
|
|
3084
3650
|
function TextInput(props) {
|
|
3085
3651
|
const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
|
|
3086
|
-
const InputWithPattern = control === "textarea" ?
|
|
3087
|
-
const InputWithoutPattern = control === "textarea" ?
|
|
3088
|
-
return displayFormat ? /* @__PURE__ */ (0,
|
|
3652
|
+
const InputWithPattern = control === "textarea" ? import_components56.TextareaWithDisplayFormat : import_components56.InputWithDisplayFormat;
|
|
3653
|
+
const InputWithoutPattern = control === "textarea" ? import_components56.TextArea : import_components56.Input;
|
|
3654
|
+
return displayFormat ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
|
|
3089
3655
|
}
|
|
3090
3656
|
|
|
3091
3657
|
// ../renderers/src/TextInputRenderer.tsx
|
|
3092
|
-
var
|
|
3658
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
3093
3659
|
var TextInputRenderer = {
|
|
3094
3660
|
canRenderType: "input-text",
|
|
3095
3661
|
render: (props) => {
|
|
@@ -3122,7 +3688,7 @@ var TextInputRenderer = {
|
|
|
3122
3688
|
}
|
|
3123
3689
|
}
|
|
3124
3690
|
});
|
|
3125
|
-
return /* @__PURE__ */ (0,
|
|
3691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
3126
3692
|
FieldInput_default,
|
|
3127
3693
|
{
|
|
3128
3694
|
id,
|
|
@@ -3130,7 +3696,7 @@ var TextInputRenderer = {
|
|
|
3130
3696
|
description,
|
|
3131
3697
|
validation: validationState,
|
|
3132
3698
|
help,
|
|
3133
|
-
children: /* @__PURE__ */ (0,
|
|
3699
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components57.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(VariableTextInput, __spreadValues({}, inputProps)) })
|
|
3134
3700
|
}
|
|
3135
3701
|
);
|
|
3136
3702
|
}
|
|
@@ -3138,13 +3704,13 @@ var TextInputRenderer = {
|
|
|
3138
3704
|
var TextInputRenderer_default = TextInputRenderer;
|
|
3139
3705
|
|
|
3140
3706
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
3141
|
-
var
|
|
3707
|
+
var import_components58 = require("@transferwise/components");
|
|
3142
3708
|
|
|
3143
3709
|
// ../renderers/src/utils/getRandomId.ts
|
|
3144
3710
|
var getRandomId = () => Math.random().toString(36).substring(2);
|
|
3145
3711
|
|
|
3146
3712
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
3147
|
-
var
|
|
3713
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
3148
3714
|
var UploadInputRenderer = {
|
|
3149
3715
|
canRenderType: "input-upload",
|
|
3150
3716
|
render: (props) => {
|
|
@@ -3160,15 +3726,15 @@ var UploadInputRenderer = {
|
|
|
3160
3726
|
};
|
|
3161
3727
|
return (
|
|
3162
3728
|
// We don't pass help here as there is no sensible place to display it
|
|
3163
|
-
/* @__PURE__ */ (0,
|
|
3729
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
3164
3730
|
UploadFieldInput_default,
|
|
3165
3731
|
{
|
|
3166
3732
|
id,
|
|
3167
3733
|
label: void 0,
|
|
3168
3734
|
description: void 0,
|
|
3169
3735
|
validation: validationState,
|
|
3170
|
-
children: /* @__PURE__ */ (0,
|
|
3171
|
-
|
|
3736
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
3737
|
+
import_components58.UploadInput,
|
|
3172
3738
|
{
|
|
3173
3739
|
id,
|
|
3174
3740
|
description,
|
|
@@ -3178,7 +3744,7 @@ var UploadInputRenderer = {
|
|
|
3178
3744
|
{
|
|
3179
3745
|
id: "my-file",
|
|
3180
3746
|
filename: value.name,
|
|
3181
|
-
status: (validationState == null ? void 0 : validationState.status) === "invalid" ?
|
|
3747
|
+
status: (validationState == null ? void 0 : validationState.status) === "invalid" ? import_components58.Status.FAILED : import_components58.Status.SUCCEEDED
|
|
3182
3748
|
}
|
|
3183
3749
|
] : void 0,
|
|
3184
3750
|
fileTypes: acceptsToFileTypes(accepts),
|
|
@@ -3233,7 +3799,7 @@ var LargeUploadRenderer = {
|
|
|
3233
3799
|
};
|
|
3234
3800
|
const filetypes = acceptsToFileTypes(accepts);
|
|
3235
3801
|
const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
|
|
3236
|
-
return /* @__PURE__ */ (0,
|
|
3802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
3237
3803
|
FieldInput_default,
|
|
3238
3804
|
{
|
|
3239
3805
|
id,
|
|
@@ -3241,8 +3807,8 @@ var LargeUploadRenderer = {
|
|
|
3241
3807
|
description,
|
|
3242
3808
|
validation: validationState,
|
|
3243
3809
|
help,
|
|
3244
|
-
children: /* @__PURE__ */ (0,
|
|
3245
|
-
|
|
3810
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
3811
|
+
import_components58.Upload,
|
|
3246
3812
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
3247
3813
|
usAccept,
|
|
3248
3814
|
usDisabled: disabled,
|
|
@@ -3256,600 +3822,153 @@ var LargeUploadRenderer = {
|
|
|
3256
3822
|
}
|
|
3257
3823
|
};
|
|
3258
3824
|
|
|
3259
|
-
// ../renderers/src/
|
|
3260
|
-
var
|
|
3261
|
-
var
|
|
3262
|
-
var
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3825
|
+
// ../renderers/src/UpsellRenderer.tsx
|
|
3826
|
+
var import_components59 = require("@transferwise/components");
|
|
3827
|
+
var import_react19 = require("react");
|
|
3828
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
3829
|
+
var UpsellRenderer = {
|
|
3830
|
+
canRenderType: "upsell",
|
|
3831
|
+
render: UpsellRendererComponent
|
|
3832
|
+
};
|
|
3833
|
+
function UpsellRendererComponent(props) {
|
|
3834
|
+
const { text, callToAction, media, margin, onDismiss } = props;
|
|
3835
|
+
const [isVisible, setIsVisible] = (0, import_react19.useState)(true);
|
|
3836
|
+
return isVisible ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
3837
|
+
import_components59.Nudge,
|
|
3838
|
+
{
|
|
3839
|
+
className: getMargin(margin),
|
|
3840
|
+
mediaName: getMediaName(media),
|
|
3841
|
+
title: text,
|
|
3842
|
+
link: callToAction.title,
|
|
3843
|
+
href: callToAction.href,
|
|
3844
|
+
onClick: callToAction.onClick,
|
|
3845
|
+
onDismiss: onDismiss ? () => {
|
|
3846
|
+
setIsVisible(false);
|
|
3847
|
+
onDismiss();
|
|
3848
|
+
} : void 0
|
|
3849
|
+
}
|
|
3850
|
+
) : null;
|
|
3851
|
+
}
|
|
3852
|
+
var urnPrefix2 = "urn:wise:illustrations:";
|
|
3853
|
+
var getMediaName = (media) => {
|
|
3854
|
+
if (media && media.type === "image" && media.uri.startsWith(urnPrefix2)) {
|
|
3855
|
+
const mediaName = media.uri.substring(urnPrefix2.length);
|
|
3856
|
+
if (supportedMediaNames.includes(mediaName)) {
|
|
3857
|
+
return mediaName;
|
|
3858
|
+
}
|
|
3279
3859
|
}
|
|
3280
|
-
|
|
3860
|
+
return "globe";
|
|
3861
|
+
};
|
|
3862
|
+
var supportedMediaNames = [
|
|
3863
|
+
"backpack",
|
|
3864
|
+
"business-card",
|
|
3865
|
+
"calendar",
|
|
3866
|
+
"digital-card",
|
|
3867
|
+
"digital-card-2",
|
|
3868
|
+
"flower",
|
|
3869
|
+
"gear",
|
|
3870
|
+
"globe",
|
|
3871
|
+
"heart",
|
|
3872
|
+
"invite-letter",
|
|
3873
|
+
"lock",
|
|
3874
|
+
"magnifying-glass",
|
|
3875
|
+
"multi-currency",
|
|
3876
|
+
"personal-card",
|
|
3877
|
+
"plane",
|
|
3878
|
+
"shopping-bag",
|
|
3879
|
+
"wallet"
|
|
3880
|
+
];
|
|
3281
3881
|
|
|
3282
|
-
// ../renderers/src/
|
|
3283
|
-
var
|
|
3284
|
-
|
|
3285
|
-
|
|
3882
|
+
// ../renderers/src/getWiseRenderers.ts
|
|
3883
|
+
var getWiseRenderers = () => [
|
|
3884
|
+
AddressValidationButtonRenderer_default,
|
|
3885
|
+
AlertRenderer_default,
|
|
3886
|
+
CheckboxInputRenderer_default,
|
|
3887
|
+
BoxRenderer_default,
|
|
3888
|
+
ButtonRenderer,
|
|
3889
|
+
ColumnsRenderer_default,
|
|
3890
|
+
DateInputRenderer_default,
|
|
3891
|
+
DecisionRenderer_default,
|
|
3892
|
+
DividerRenderer_default,
|
|
3893
|
+
ExternalConfirmationRenderer_default,
|
|
3894
|
+
FormRenderer_default,
|
|
3895
|
+
FormSectionRenderer_default,
|
|
3896
|
+
HeadingRenderer_default,
|
|
3897
|
+
ImageRenderer_default,
|
|
3898
|
+
InstructionsRenderer_default,
|
|
3899
|
+
IntegerInputRenderer_default,
|
|
3900
|
+
LargeUploadRenderer,
|
|
3901
|
+
ListRenderer_default,
|
|
3902
|
+
LoadingIndicatorRenderer_default,
|
|
3903
|
+
MarkdownRenderer_default,
|
|
3904
|
+
MediaRenderer,
|
|
3905
|
+
ModalRenderer,
|
|
3906
|
+
ModalLayoutRenderer_default,
|
|
3907
|
+
MoneyInputRenderer,
|
|
3908
|
+
MultiSelectInputRenderer_default,
|
|
3909
|
+
MultiUploadInputRenderer_default,
|
|
3910
|
+
NumberInputRenderer_default,
|
|
3911
|
+
ParagraphRenderer_default,
|
|
3912
|
+
ProgressRenderer,
|
|
3913
|
+
RepeatableRenderer_default,
|
|
3914
|
+
ReviewRenderer_default,
|
|
3915
|
+
SearchRenderer_default,
|
|
3916
|
+
SelectInputRenderer_default,
|
|
3917
|
+
SectionRenderer_default,
|
|
3918
|
+
StatusListRenderer_default,
|
|
3919
|
+
TabsRenderer,
|
|
3920
|
+
TextInputRenderer_default,
|
|
3921
|
+
UploadInputRenderer,
|
|
3922
|
+
UpsellRenderer,
|
|
3923
|
+
SplashStepRenderer,
|
|
3924
|
+
SplashCelebrationStepRenderer,
|
|
3925
|
+
StepRenderer,
|
|
3926
|
+
// Legacy renderer must come afterwards
|
|
3927
|
+
ReviewLegacyRenderer_default
|
|
3928
|
+
];
|
|
3286
3929
|
|
|
3287
|
-
// ../renderers/src/
|
|
3288
|
-
var
|
|
3289
|
-
var
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3930
|
+
// ../renderers/src/subflow/getSubflowRenderer.tsx
|
|
3931
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
3932
|
+
var getSubflowRenderer = ({
|
|
3933
|
+
Component: Component2,
|
|
3934
|
+
canRender
|
|
3935
|
+
}) => {
|
|
3936
|
+
return {
|
|
3937
|
+
canRenderType: "subflow",
|
|
3938
|
+
canRender,
|
|
3939
|
+
render: (props) => {
|
|
3940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
3941
|
+
Component2,
|
|
3942
|
+
{
|
|
3943
|
+
presentation: props.presentation,
|
|
3944
|
+
requestCache: props.requestCache,
|
|
3945
|
+
initialRequest: props.initialRequest,
|
|
3946
|
+
onCompletion: props.onCompletion,
|
|
3947
|
+
onError: props.onError,
|
|
3948
|
+
onCancellation: props.onCancellation,
|
|
3949
|
+
onEvent: props.onEvent
|
|
3950
|
+
}
|
|
3951
|
+
);
|
|
3307
3952
|
}
|
|
3308
3953
|
};
|
|
3309
3954
|
};
|
|
3310
3955
|
|
|
3311
|
-
//
|
|
3312
|
-
var
|
|
3313
|
-
var
|
|
3314
|
-
var getAdditionalInfo = (additionalInfo) => {
|
|
3315
|
-
if (!additionalInfo) {
|
|
3316
|
-
return void 0;
|
|
3317
|
-
}
|
|
3318
|
-
const { href, text, onClick } = additionalInfo;
|
|
3319
|
-
if (href || onClick) {
|
|
3320
|
-
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3321
|
-
import_components50.ListItem.AdditionalInfo,
|
|
3322
|
-
{
|
|
3323
|
-
action: {
|
|
3324
|
-
label: text,
|
|
3325
|
-
href,
|
|
3326
|
-
onClick,
|
|
3327
|
-
target: "_blank"
|
|
3328
|
-
}
|
|
3329
|
-
}
|
|
3330
|
-
);
|
|
3331
|
-
}
|
|
3332
|
-
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_components50.ListItem.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
|
|
3333
|
-
};
|
|
3956
|
+
// src/dynamicFlow/useOnCopy.tsx
|
|
3957
|
+
var import_react20 = require("react");
|
|
3958
|
+
var import_react_intl27 = require("react-intl");
|
|
3334
3959
|
|
|
3335
|
-
//
|
|
3336
|
-
var
|
|
3337
|
-
var
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
{
|
|
3348
|
-
href,
|
|
3349
|
-
partiallyInteractive: !fullyInteractive,
|
|
3350
|
-
priority,
|
|
3351
|
-
"aria-description": accessibilityDescription,
|
|
3352
|
-
children: title
|
|
3353
|
-
}
|
|
3354
|
-
);
|
|
3355
|
-
}
|
|
3356
|
-
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3357
|
-
import_components51.ListItem.Button,
|
|
3358
|
-
{
|
|
3359
|
-
"aria-description": accessibilityDescription,
|
|
3360
|
-
partiallyInteractive: !fullyInteractive,
|
|
3361
|
-
priority,
|
|
3362
|
-
onClick,
|
|
3363
|
-
children: title
|
|
3364
|
-
}
|
|
3365
|
-
);
|
|
3366
|
-
};
|
|
3367
|
-
|
|
3368
|
-
// ../renderers/src/utils/listItem/shouldUseAvatar.ts
|
|
3369
|
-
var shouldUseAvatar = (control, tags) => {
|
|
3370
|
-
var _a;
|
|
3371
|
-
return control === "with-avatar" || ((_a = tags == null ? void 0 : tags.includes("with-avatar")) != null ? _a : false);
|
|
3372
|
-
};
|
|
3373
|
-
|
|
3374
|
-
// ../renderers/src/ReviewRenderer.tsx
|
|
3375
|
-
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
3376
|
-
var IGNORED_CONTROLS = [
|
|
3377
|
-
"horizontal",
|
|
3378
|
-
"horizontal-end-aligned",
|
|
3379
|
-
"horizontal-start-aligned",
|
|
3380
|
-
"vertical-two-column"
|
|
3381
|
-
];
|
|
3382
|
-
var ReviewRenderer = {
|
|
3383
|
-
canRenderType: "review",
|
|
3384
|
-
canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
|
|
3385
|
-
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Review, __spreadValues({}, props))
|
|
3386
|
-
};
|
|
3387
|
-
var Review = ({
|
|
3388
|
-
callToAction,
|
|
3389
|
-
control,
|
|
3390
|
-
margin,
|
|
3391
|
-
fields,
|
|
3392
|
-
tags,
|
|
3393
|
-
title,
|
|
3394
|
-
trackEvent
|
|
3395
|
-
}) => {
|
|
3396
|
-
const intl = (0, import_react_intl22.useIntl)();
|
|
3397
|
-
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: getMargin(margin), children: [
|
|
3398
|
-
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Header7, { title, callToAction }),
|
|
3399
|
-
fields.map((field) => {
|
|
3400
|
-
var _a, _b, _c;
|
|
3401
|
-
const {
|
|
3402
|
-
label,
|
|
3403
|
-
value,
|
|
3404
|
-
media,
|
|
3405
|
-
additionalInfo,
|
|
3406
|
-
inlineAlert,
|
|
3407
|
-
help,
|
|
3408
|
-
analyticsId,
|
|
3409
|
-
callToAction: itemCallToAction,
|
|
3410
|
-
tags: itemTags
|
|
3411
|
-
} = field;
|
|
3412
|
-
const controlOptions = {
|
|
3413
|
-
ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
|
|
3414
|
-
fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
|
|
3415
|
-
};
|
|
3416
|
-
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
3417
|
-
import_components52.ListItem,
|
|
3418
|
-
{
|
|
3419
|
-
title: value,
|
|
3420
|
-
subtitle: label,
|
|
3421
|
-
inverted: true,
|
|
3422
|
-
media: getMedia(media, shouldUseAvatar(control, itemTags)),
|
|
3423
|
-
control: (_c = getCTAControl(itemCallToAction, controlOptions)) != null ? _c : help ? getHelpControl(
|
|
3424
|
-
help,
|
|
3425
|
-
intl.formatMessage(help_messages_default.helpAria),
|
|
3426
|
-
() => trackEvent("Help Pressed", { layoutItemId: analyticsId })
|
|
3427
|
-
) : void 0,
|
|
3428
|
-
prompt: getInlineAlert(inlineAlert),
|
|
3429
|
-
additionalInfo: getAdditionalInfo(additionalInfo)
|
|
3430
|
-
},
|
|
3431
|
-
JSON.stringify(field)
|
|
3432
|
-
);
|
|
3433
|
-
})
|
|
3434
|
-
] });
|
|
3435
|
-
};
|
|
3436
|
-
var getHelpControl = (help, ariaLabel, onClick) => {
|
|
3437
|
-
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components52.Popover, { content: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components52.Markdown, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components52.ListItem.IconButton, { partiallyInteractive: true, "aria-label": ariaLabel, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_icons4.QuestionMarkCircle, {}) }) });
|
|
3438
|
-
};
|
|
3439
|
-
var ReviewRenderer_default = ReviewRenderer;
|
|
3440
|
-
|
|
3441
|
-
// ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
|
|
3442
|
-
var import_components55 = require("@transferwise/components");
|
|
3443
|
-
|
|
3444
|
-
// ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
|
|
3445
|
-
var import_components54 = require("@transferwise/components");
|
|
3446
|
-
var import_react18 = require("react");
|
|
3447
|
-
var import_react_intl25 = require("react-intl");
|
|
3448
|
-
|
|
3449
|
-
// ../renderers/src/messages/filter.messages.ts
|
|
3450
|
-
var import_react_intl23 = require("react-intl");
|
|
3451
|
-
var filter_messages_default = (0, import_react_intl23.defineMessages)({
|
|
3452
|
-
placeholder: {
|
|
3453
|
-
id: "df.wise.filter.placeholder",
|
|
3454
|
-
defaultMessage: "Start typing to search",
|
|
3455
|
-
description: "Placeholder for the filter input"
|
|
3456
|
-
},
|
|
3457
|
-
results: {
|
|
3458
|
-
id: "df.wise.filter.results",
|
|
3459
|
-
defaultMessage: "Search results",
|
|
3460
|
-
description: "Label for the results section"
|
|
3461
|
-
},
|
|
3462
|
-
noResults: {
|
|
3463
|
-
id: "df.wise.filter.noResults",
|
|
3464
|
-
defaultMessage: "No results",
|
|
3465
|
-
description: "Message for if there are no results"
|
|
3466
|
-
}
|
|
3467
|
-
});
|
|
3468
|
-
|
|
3469
|
-
// ../renderers/src/DecisionRenderer/filter-and-sort-decision-options.ts
|
|
3470
|
-
function filterAndSortDecisionOptions(selectOptions, query) {
|
|
3471
|
-
const upperQuery = normalizeAndRemoveAccents(query);
|
|
3472
|
-
const filteredItems = selectOptions.filter((option) => {
|
|
3473
|
-
var _a, _b, _c, _d;
|
|
3474
|
-
const searchableWords = [
|
|
3475
|
-
option.title,
|
|
3476
|
-
option.description,
|
|
3477
|
-
option.additionalText,
|
|
3478
|
-
(_a = option.supportingValues) == null ? void 0 : _a.value,
|
|
3479
|
-
(_b = option.supportingValues) == null ? void 0 : _b.subvalue,
|
|
3480
|
-
...(_c = option.keywords) != null ? _c : []
|
|
3481
|
-
];
|
|
3482
|
-
return (_d = searchableWords.some(
|
|
3483
|
-
(word) => word && normalizeAndRemoveAccents(word).includes(upperQuery)
|
|
3484
|
-
)) != null ? _d : false;
|
|
3485
|
-
});
|
|
3486
|
-
return [...filteredItems].sort((a, b) => {
|
|
3487
|
-
if (a.disabled && !b.disabled) {
|
|
3488
|
-
return 1;
|
|
3489
|
-
}
|
|
3490
|
-
if (!a.disabled && b.disabled) {
|
|
3491
|
-
return -1;
|
|
3492
|
-
}
|
|
3493
|
-
const aTitleUpper = a.title.toUpperCase();
|
|
3494
|
-
const bTitleUpper = b.title.toUpperCase();
|
|
3495
|
-
const aTitleStarts = aTitleUpper.startsWith(upperQuery);
|
|
3496
|
-
const bTitleStarts = bTitleUpper.startsWith(upperQuery);
|
|
3497
|
-
if (aTitleStarts && !bTitleStarts) {
|
|
3498
|
-
return -1;
|
|
3499
|
-
}
|
|
3500
|
-
if (!aTitleStarts && bTitleStarts) {
|
|
3501
|
-
return 1;
|
|
3502
|
-
}
|
|
3503
|
-
const aWordStarts = aTitleUpper.split(" ").some((word) => word.startsWith(upperQuery));
|
|
3504
|
-
const bWordStarts = bTitleUpper.split(" ").some((word) => word.startsWith(upperQuery));
|
|
3505
|
-
if (aWordStarts && !bWordStarts) {
|
|
3506
|
-
return -1;
|
|
3507
|
-
}
|
|
3508
|
-
if (!aWordStarts && bWordStarts) {
|
|
3509
|
-
return 1;
|
|
3510
|
-
}
|
|
3511
|
-
return a.title.localeCompare(b.title);
|
|
3512
|
-
});
|
|
3513
|
-
}
|
|
3514
|
-
var normalizeAndRemoveAccents = (text) => text.trim().toLowerCase().normalize("NFKD").replace(new RegExp("\\p{Diacritic}", "gu"), "");
|
|
3515
|
-
|
|
3516
|
-
// ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
|
|
3517
|
-
var import_components53 = require("@transferwise/components");
|
|
3518
|
-
var import_react_intl24 = require("react-intl");
|
|
3519
|
-
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
3520
|
-
var groupingTags2 = Object.keys(group_messages_default).filter((key) => key !== "all");
|
|
3521
|
-
var isGroupedDecision = (options) => {
|
|
3522
|
-
return getGroupsFromTags(groupingTags2, options).length > 0;
|
|
3523
|
-
};
|
|
3524
|
-
var GroupedDecisionList = (_a) => {
|
|
3525
|
-
var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
|
|
3526
|
-
const { formatMessage } = (0, import_react_intl24.useIntl)();
|
|
3527
|
-
const { options } = rest;
|
|
3528
|
-
const itemsByTag = [...getGroupsFromTags(groupingTags2, options), { tag: "all", items: options }];
|
|
3529
|
-
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_jsx_runtime76.Fragment, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_components53.Section, { children: [
|
|
3530
|
-
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
3531
|
-
import_components53.Header,
|
|
3532
|
-
{
|
|
3533
|
-
as: "h2",
|
|
3534
|
-
title: tag in group_messages_default ? formatMessage(group_messages_default[tag]) : tag
|
|
3535
|
-
}
|
|
3536
|
-
),
|
|
3537
|
-
renderDecisionList2(__spreadProps(__spreadValues({}, rest), { options: items }))
|
|
3538
|
-
] }, tag)) });
|
|
3539
|
-
};
|
|
3540
|
-
|
|
3541
|
-
// ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
|
|
3542
|
-
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
3543
|
-
var DecisionWrapper = (props) => {
|
|
3544
|
-
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: getMargin(props.margin), children: [
|
|
3545
|
-
props.title && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components54.Header, { as: "h2", title: props.title }),
|
|
3546
|
-
props.control === "filtered" ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(UnfilteredDecisionList, __spreadValues({}, props))
|
|
3547
|
-
] });
|
|
3548
|
-
};
|
|
3549
|
-
var UnfilteredDecisionList = (_a) => {
|
|
3550
|
-
var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
|
|
3551
|
-
return isGroupedDecision(rest.options) ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList2 })) : renderDecisionList2(rest);
|
|
3552
|
-
};
|
|
3553
|
-
var FilteredDecisionList = (props) => {
|
|
3554
|
-
const { formatMessage } = (0, import_react_intl25.useIntl)();
|
|
3555
|
-
const [query, setQuery] = (0, import_react18.useState)("");
|
|
3556
|
-
const { control, options, renderDecisionList: renderDecisionList2 } = props;
|
|
3557
|
-
const filteredOptions = (query == null ? void 0 : query.length) > 0 ? filterAndSortDecisionOptions(options, query) : options;
|
|
3558
|
-
const isGrouped = isGroupedDecision(options);
|
|
3559
|
-
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
3560
|
-
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3561
|
-
import_components54.SearchInput,
|
|
3562
|
-
{
|
|
3563
|
-
placeholder: formatMessage(filter_messages_default.placeholder),
|
|
3564
|
-
value: query,
|
|
3565
|
-
className: "m-b-2",
|
|
3566
|
-
onChange: (e) => {
|
|
3567
|
-
var _a;
|
|
3568
|
-
return setQuery((_a = e.target.value) != null ? _a : "");
|
|
3569
|
-
}
|
|
3570
|
-
}
|
|
3571
|
-
),
|
|
3572
|
-
isGrouped && query.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
3573
|
-
query.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components54.Header, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
|
|
3574
|
-
filteredOptions.length > 0 ? renderDecisionList2({
|
|
3575
|
-
control,
|
|
3576
|
-
className: query.length === 0 ? "m-t-3" : "",
|
|
3577
|
-
options: filteredOptions
|
|
3578
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("p", { children: formatMessage(filter_messages_default.noResults) })
|
|
3579
|
-
] })
|
|
3580
|
-
] });
|
|
3581
|
-
};
|
|
3582
|
-
|
|
3583
|
-
// ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
|
|
3584
|
-
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
3585
|
-
var DecisionRenderer = {
|
|
3586
|
-
canRenderType: "decision",
|
|
3587
|
-
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }))
|
|
3588
|
-
};
|
|
3589
|
-
var renderDecisionList = ({ options, control }) => {
|
|
3590
|
-
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_jsx_runtime78.Fragment, { children: options.map((_a) => {
|
|
3591
|
-
var _b = _a, { onClick } = _b, rest = __objRest(_b, ["onClick"]);
|
|
3592
|
-
const {
|
|
3593
|
-
description,
|
|
3594
|
-
disabled,
|
|
3595
|
-
media,
|
|
3596
|
-
title: itemTitle,
|
|
3597
|
-
href,
|
|
3598
|
-
additionalText,
|
|
3599
|
-
inlineAlert,
|
|
3600
|
-
supportingValues,
|
|
3601
|
-
tags
|
|
3602
|
-
} = rest;
|
|
3603
|
-
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
3604
|
-
import_components55.ListItem,
|
|
3605
|
-
{
|
|
3606
|
-
title: itemTitle,
|
|
3607
|
-
subtitle: description,
|
|
3608
|
-
spotlight: control === "spotlight" ? (tags == null ? void 0 : tags.includes("spotlight-active")) ? "active" : "inactive" : void 0,
|
|
3609
|
-
disabled,
|
|
3610
|
-
valueTitle: supportingValues == null ? void 0 : supportingValues.value,
|
|
3611
|
-
valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
|
|
3612
|
-
media: getMedia(media, shouldUseAvatar(control, tags)),
|
|
3613
|
-
prompt: getInlineAlert(inlineAlert),
|
|
3614
|
-
additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
|
|
3615
|
-
control: href ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_components55.ListItem.Navigation, { href, target: "_blank" }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_components55.ListItem.Navigation, { onClick })
|
|
3616
|
-
},
|
|
3617
|
-
JSON.stringify(rest)
|
|
3618
|
-
);
|
|
3619
|
-
}) });
|
|
3620
|
-
};
|
|
3621
|
-
var DecisionRenderer_default = DecisionRenderer;
|
|
3622
|
-
|
|
3623
|
-
// ../renderers/src/ListRenderer.tsx
|
|
3624
|
-
var import_components56 = require("@transferwise/components");
|
|
3625
|
-
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
3626
|
-
var ListRenderer = {
|
|
3627
|
-
canRenderType: "list",
|
|
3628
|
-
render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: getMargin(margin), children: [
|
|
3629
|
-
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Header7, { title, callToAction }),
|
|
3630
|
-
items.map((item) => {
|
|
3631
|
-
var _a, _b;
|
|
3632
|
-
const {
|
|
3633
|
-
title: itemTitle,
|
|
3634
|
-
description,
|
|
3635
|
-
supportingValues,
|
|
3636
|
-
media,
|
|
3637
|
-
additionalInfo,
|
|
3638
|
-
inlineAlert,
|
|
3639
|
-
callToAction: itemCallToAction,
|
|
3640
|
-
tags: itemTags
|
|
3641
|
-
} = item;
|
|
3642
|
-
const controlOptions = {
|
|
3643
|
-
ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
|
|
3644
|
-
fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
|
|
3645
|
-
};
|
|
3646
|
-
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
3647
|
-
import_components56.ListItem,
|
|
3648
|
-
{
|
|
3649
|
-
title: itemTitle,
|
|
3650
|
-
subtitle: description,
|
|
3651
|
-
valueTitle: supportingValues == null ? void 0 : supportingValues.value,
|
|
3652
|
-
valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
|
|
3653
|
-
media: getMedia(media, shouldUseAvatar(control, itemTags)),
|
|
3654
|
-
prompt: getInlineAlert(inlineAlert),
|
|
3655
|
-
additionalInfo: getAdditionalInfo(additionalInfo),
|
|
3656
|
-
control: getCTAControl(itemCallToAction, controlOptions)
|
|
3657
|
-
},
|
|
3658
|
-
itemTitle
|
|
3659
|
-
);
|
|
3660
|
-
})
|
|
3661
|
-
] })
|
|
3662
|
-
};
|
|
3663
|
-
var ListRenderer_default = ListRenderer;
|
|
3664
|
-
|
|
3665
|
-
// ../renderers/src/StatusListRenderer.tsx
|
|
3666
|
-
var import_components57 = require("@transferwise/components");
|
|
3667
|
-
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
3668
|
-
var StatusListRenderer = {
|
|
3669
|
-
canRenderType: "status-list",
|
|
3670
|
-
render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: getMargin(margin), children: [
|
|
3671
|
-
title ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components57.Header, { title }) : null,
|
|
3672
|
-
items.map((item) => {
|
|
3673
|
-
const { callToAction, description, icon, status, title: itemTitle } = item;
|
|
3674
|
-
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3675
|
-
import_components57.ListItem,
|
|
3676
|
-
{
|
|
3677
|
-
title: itemTitle,
|
|
3678
|
-
subtitle: description,
|
|
3679
|
-
media: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components57.AvatarView, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(DynamicIcon_default, { name: icon.name }) }) : void 0,
|
|
3680
|
-
additionalInfo: callToAction ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3681
|
-
import_components57.ListItem.AdditionalInfo,
|
|
3682
|
-
{
|
|
3683
|
-
action: {
|
|
3684
|
-
href: callToAction.href,
|
|
3685
|
-
onClick: callToAction.href ? void 0 : callToAction.onClick,
|
|
3686
|
-
label: callToAction.title,
|
|
3687
|
-
target: "_blank"
|
|
3688
|
-
}
|
|
3689
|
-
}
|
|
3690
|
-
) : void 0
|
|
3691
|
-
},
|
|
3692
|
-
JSON.stringify(item)
|
|
3693
|
-
);
|
|
3694
|
-
})
|
|
3695
|
-
] })
|
|
3696
|
-
};
|
|
3697
|
-
var mapStatus = (status) => {
|
|
3698
|
-
switch (status) {
|
|
3699
|
-
case "done":
|
|
3700
|
-
return "positive";
|
|
3701
|
-
case "pending":
|
|
3702
|
-
return "pending";
|
|
3703
|
-
default:
|
|
3704
|
-
return void 0;
|
|
3705
|
-
}
|
|
3706
|
-
};
|
|
3707
|
-
var StatusListRenderer_default = StatusListRenderer;
|
|
3708
|
-
|
|
3709
|
-
// ../renderers/src/ReviewLegacyRenderer.tsx
|
|
3710
|
-
var import_components58 = require("@transferwise/components");
|
|
3711
|
-
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
3712
|
-
var ReviewRenderer2 = {
|
|
3713
|
-
canRenderType: "review",
|
|
3714
|
-
render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
|
|
3715
|
-
const orientation = mapControlToDefinitionListLayout(control);
|
|
3716
|
-
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: getMargin(margin), children: [
|
|
3717
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Header7, { title, callToAction }),
|
|
3718
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
3719
|
-
import_components58.DefinitionList,
|
|
3720
|
-
{
|
|
3721
|
-
layout: orientation,
|
|
3722
|
-
definitions: fields.map(
|
|
3723
|
-
({ label, value, help, analyticsId: fieldAnalyticsId }, index) => ({
|
|
3724
|
-
key: String(index),
|
|
3725
|
-
value,
|
|
3726
|
-
title: getFieldLabel(
|
|
3727
|
-
label,
|
|
3728
|
-
help,
|
|
3729
|
-
() => trackEvent("Help Pressed", { layoutItemId: fieldAnalyticsId })
|
|
3730
|
-
)
|
|
3731
|
-
})
|
|
3732
|
-
)
|
|
3733
|
-
}
|
|
3734
|
-
) })
|
|
3735
|
-
] });
|
|
3736
|
-
}
|
|
3737
|
-
};
|
|
3738
|
-
var ReviewLegacyRenderer_default = ReviewRenderer2;
|
|
3739
|
-
var mapControlToDefinitionListLayout = (control) => {
|
|
3740
|
-
switch (control) {
|
|
3741
|
-
case "horizontal":
|
|
3742
|
-
case "horizontal-end-aligned":
|
|
3743
|
-
return "HORIZONTAL_RIGHT_ALIGNED";
|
|
3744
|
-
case "horizontal-start-aligned":
|
|
3745
|
-
return "HORIZONTAL_LEFT_ALIGNED";
|
|
3746
|
-
case "vertical-two-column":
|
|
3747
|
-
return "VERTICAL_TWO_COLUMN";
|
|
3748
|
-
case "vertical":
|
|
3749
|
-
case "vertical-one-column":
|
|
3750
|
-
default:
|
|
3751
|
-
return "VERTICAL_ONE_COLUMN";
|
|
3752
|
-
}
|
|
3753
|
-
};
|
|
3754
|
-
var getFieldLabel = (label, help, onClick) => {
|
|
3755
|
-
if (help) {
|
|
3756
|
-
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
3757
|
-
label,
|
|
3758
|
-
" ",
|
|
3759
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Help_default, { help, onClick })
|
|
3760
|
-
] });
|
|
3761
|
-
}
|
|
3762
|
-
return label;
|
|
3763
|
-
};
|
|
3764
|
-
|
|
3765
|
-
// ../renderers/src/getWiseRenderers.ts
|
|
3766
|
-
var getWiseRenderers = () => [
|
|
3767
|
-
AddressValidationButtonRenderer_default,
|
|
3768
|
-
AlertRenderer_default,
|
|
3769
|
-
CheckboxInputRenderer_default,
|
|
3770
|
-
BoxRenderer_default,
|
|
3771
|
-
ButtonRenderer,
|
|
3772
|
-
ColumnsRenderer_default,
|
|
3773
|
-
DateInputRenderer_default,
|
|
3774
|
-
DecisionRenderer_default,
|
|
3775
|
-
DividerRenderer_default,
|
|
3776
|
-
ExternalConfirmationRenderer_default,
|
|
3777
|
-
FormRenderer_default,
|
|
3778
|
-
FormSectionRenderer_default,
|
|
3779
|
-
HeadingRenderer_default,
|
|
3780
|
-
ImageRenderer_default,
|
|
3781
|
-
InstructionsRenderer_default,
|
|
3782
|
-
IntegerInputRenderer_default,
|
|
3783
|
-
LargeUploadRenderer,
|
|
3784
|
-
ListRenderer_default,
|
|
3785
|
-
LoadingIndicatorRenderer_default,
|
|
3786
|
-
MarkdownRenderer_default,
|
|
3787
|
-
ModalRenderer,
|
|
3788
|
-
ModalLayoutRenderer_default,
|
|
3789
|
-
MoneyInputRenderer,
|
|
3790
|
-
MultiSelectInputRenderer_default,
|
|
3791
|
-
MultiUploadInputRenderer_default,
|
|
3792
|
-
NumberInputRenderer_default,
|
|
3793
|
-
ParagraphRenderer_default,
|
|
3794
|
-
ProgressRenderer,
|
|
3795
|
-
RepeatableRenderer_default,
|
|
3796
|
-
ReviewRenderer_default,
|
|
3797
|
-
SearchRenderer_default,
|
|
3798
|
-
SelectInputRenderer_default,
|
|
3799
|
-
SectionRenderer_default,
|
|
3800
|
-
StatusListRenderer_default,
|
|
3801
|
-
TabsRenderer,
|
|
3802
|
-
TextInputRenderer_default,
|
|
3803
|
-
UploadInputRenderer,
|
|
3804
|
-
SplashStepRenderer,
|
|
3805
|
-
SplashCelebrationStepRenderer,
|
|
3806
|
-
StepRenderer,
|
|
3807
|
-
// Legacy renderer must come afterwards
|
|
3808
|
-
ReviewLegacyRenderer_default
|
|
3809
|
-
];
|
|
3810
|
-
|
|
3811
|
-
// ../renderers/src/subflow/getSubflowRenderer.tsx
|
|
3812
|
-
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
3813
|
-
var getSubflowRenderer = ({
|
|
3814
|
-
Component: Component2,
|
|
3815
|
-
canRender
|
|
3816
|
-
}) => {
|
|
3817
|
-
return {
|
|
3818
|
-
canRenderType: "subflow",
|
|
3819
|
-
canRender,
|
|
3820
|
-
render: (props) => {
|
|
3821
|
-
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
3822
|
-
Component2,
|
|
3823
|
-
{
|
|
3824
|
-
presentation: props.presentation,
|
|
3825
|
-
requestCache: props.requestCache,
|
|
3826
|
-
initialRequest: props.initialRequest,
|
|
3827
|
-
onCompletion: props.onCompletion,
|
|
3828
|
-
onError: props.onError,
|
|
3829
|
-
onCancellation: props.onCancellation,
|
|
3830
|
-
onEvent: props.onEvent
|
|
3831
|
-
}
|
|
3832
|
-
);
|
|
3833
|
-
}
|
|
3834
|
-
};
|
|
3835
|
-
};
|
|
3836
|
-
|
|
3837
|
-
// src/dynamicFlow/useOnCopy.tsx
|
|
3838
|
-
var import_react19 = require("react");
|
|
3839
|
-
var import_react_intl27 = require("react-intl");
|
|
3840
|
-
|
|
3841
|
-
// src/dynamicFlow/messages.ts
|
|
3842
|
-
var import_react_intl26 = require("react-intl");
|
|
3843
|
-
var messages_default = (0, import_react_intl26.defineMessages)({
|
|
3844
|
-
copied: {
|
|
3845
|
-
id: "df.wise.CopyFeedback.copy",
|
|
3846
|
-
defaultMessage: "Copied to clipboard",
|
|
3847
|
-
description: "Appears in a snackbar when the copy operation succeeds."
|
|
3848
|
-
},
|
|
3849
|
-
copyFailed: {
|
|
3850
|
-
id: "df.wise.CopyFeedback.copyFailed",
|
|
3851
|
-
defaultMessage: "Failed to copy to clipboard",
|
|
3852
|
-
description: "Appears in a snackbar when the copy operation fails."
|
|
3960
|
+
// src/dynamicFlow/messages.ts
|
|
3961
|
+
var import_react_intl26 = require("react-intl");
|
|
3962
|
+
var messages_default = (0, import_react_intl26.defineMessages)({
|
|
3963
|
+
copied: {
|
|
3964
|
+
id: "df.wise.CopyFeedback.copy",
|
|
3965
|
+
defaultMessage: "Copied to clipboard",
|
|
3966
|
+
description: "Appears in a snackbar when the copy operation succeeds."
|
|
3967
|
+
},
|
|
3968
|
+
copyFailed: {
|
|
3969
|
+
id: "df.wise.CopyFeedback.copyFailed",
|
|
3970
|
+
defaultMessage: "Failed to copy to clipboard",
|
|
3971
|
+
description: "Appears in a snackbar when the copy operation fails."
|
|
3853
3972
|
}
|
|
3854
3973
|
});
|
|
3855
3974
|
|
|
@@ -3857,7 +3976,7 @@ var messages_default = (0, import_react_intl26.defineMessages)({
|
|
|
3857
3976
|
var useOnCopy = () => {
|
|
3858
3977
|
const { formatMessage } = (0, import_react_intl27.useIntl)();
|
|
3859
3978
|
const createSnackBar = useSnackBarIfAvailable();
|
|
3860
|
-
return (0,
|
|
3979
|
+
return (0, import_react20.useCallback)(
|
|
3861
3980
|
(copiedContent) => {
|
|
3862
3981
|
if (copiedContent) {
|
|
3863
3982
|
createSnackBar({ text: formatMessage(messages_default.copied) });
|
|
@@ -3870,11 +3989,11 @@ var useOnCopy = () => {
|
|
|
3870
3989
|
};
|
|
3871
3990
|
|
|
3872
3991
|
// src/dynamicFlow/useWiseHttpClient.tsx
|
|
3873
|
-
var
|
|
3992
|
+
var import_react21 = require("react");
|
|
3874
3993
|
var import_react_intl28 = require("react-intl");
|
|
3875
3994
|
var useWiseHttpClient = (httpClient) => {
|
|
3876
3995
|
const { locale } = (0, import_react_intl28.useIntl)();
|
|
3877
|
-
return (0,
|
|
3996
|
+
return (0, import_react21.useCallback)(
|
|
3878
3997
|
async (input, init = {}) => {
|
|
3879
3998
|
const headers = new Headers(init.headers);
|
|
3880
3999
|
headers.set("accept-language", locale);
|
|
@@ -3897,25 +4016,25 @@ var handleRejection = (error) => {
|
|
|
3897
4016
|
|
|
3898
4017
|
// src/dynamicFlow/DynamicFlowModal.tsx
|
|
3899
4018
|
var import_dynamic_flow_client2 = require("@wise/dynamic-flow-client");
|
|
3900
|
-
var
|
|
3901
|
-
var
|
|
4019
|
+
var import_components60 = require("@transferwise/components");
|
|
4020
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
3902
4021
|
function DynamicFlowModal(props) {
|
|
3903
4022
|
const _a = props, { className = "" } = _a, rest = __objRest(_a, ["className"]);
|
|
3904
4023
|
const dfProps = useWiseToCoreProps(rest);
|
|
3905
4024
|
const df = (0, import_dynamic_flow_client2.useDynamicFlowModal)(dfProps);
|
|
3906
|
-
return /* @__PURE__ */ (0,
|
|
3907
|
-
|
|
4025
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
4026
|
+
import_components60.Modal,
|
|
3908
4027
|
__spreadProps(__spreadValues({
|
|
3909
4028
|
className: `dynamic-flow-modal ${className}`,
|
|
3910
4029
|
disableDimmerClickToClose: true
|
|
3911
4030
|
}, df.modal), {
|
|
3912
|
-
body: /* @__PURE__ */ (0,
|
|
4031
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "dynamic-flow-modal", children: df.modal.body })
|
|
3913
4032
|
})
|
|
3914
4033
|
);
|
|
3915
4034
|
}
|
|
3916
4035
|
|
|
3917
4036
|
// src/dynamicFlow/getMergedRenderers.tsx
|
|
3918
|
-
var
|
|
4037
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
3919
4038
|
var wiseRenderers = getWiseRenderers();
|
|
3920
4039
|
var getMergedRenderers = (props) => {
|
|
3921
4040
|
var _d;
|
|
@@ -3929,7 +4048,7 @@ var getMergedRenderers = (props) => {
|
|
|
3929
4048
|
method: initialRequest.method,
|
|
3930
4049
|
data: initialRequest.body
|
|
3931
4050
|
};
|
|
3932
|
-
return presentation.type === "push" ? /* @__PURE__ */ (0,
|
|
4051
|
+
return presentation.type === "push" ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(DynamicFlow, __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), { features: subflowFeatures, initialAction: action })) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
3933
4052
|
DynamicFlowModal,
|
|
3934
4053
|
__spreadProps(__spreadValues(__spreadValues({}, restProps), rest), {
|
|
3935
4054
|
features: subflowFeatures,
|
|
@@ -3954,9 +4073,9 @@ var useWiseToCoreProps = (props) => {
|
|
|
3954
4073
|
onLog
|
|
3955
4074
|
} = props;
|
|
3956
4075
|
const httpClient = useWiseHttpClient(customFetch);
|
|
3957
|
-
const mergedRenderers = (0,
|
|
3958
|
-
const logEvent = (0,
|
|
3959
|
-
const trackEvent = (0,
|
|
4076
|
+
const mergedRenderers = (0, import_react22.useMemo)(() => getMergedRenderers(props), [renderers]);
|
|
4077
|
+
const logEvent = (0, import_react22.useMemo)(() => getLogEvent(onLog), [onLog]);
|
|
4078
|
+
const trackEvent = (0, import_react22.useMemo)(() => getTrackEvent(onEvent, onAnalytics), [onEvent, onAnalytics]);
|
|
3960
4079
|
const onCopy = useOnCopy();
|
|
3961
4080
|
return __spreadProps(__spreadValues({}, props), {
|
|
3962
4081
|
httpClient,
|
|
@@ -3979,23 +4098,23 @@ var openLinkInNewTab = (url) => {
|
|
|
3979
4098
|
};
|
|
3980
4099
|
|
|
3981
4100
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
3982
|
-
var
|
|
4101
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
3983
4102
|
function DynamicFlow(props) {
|
|
3984
4103
|
const { className = "" } = props;
|
|
3985
4104
|
const dfProps = useWiseToCoreProps(props);
|
|
3986
4105
|
const df = (0, import_dynamic_flow_client3.useDynamicFlow)(dfProps);
|
|
3987
|
-
return /* @__PURE__ */ (0,
|
|
4106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className, children: df.view });
|
|
3988
4107
|
}
|
|
3989
4108
|
|
|
3990
4109
|
// src/dynamicFlow/DynamicFlowWithRef.tsx
|
|
3991
|
-
var
|
|
4110
|
+
var import_react23 = require("react");
|
|
3992
4111
|
var import_dynamic_flow_client4 = require("@wise/dynamic-flow-client");
|
|
3993
|
-
var
|
|
3994
|
-
var DynamicFlowWithRef = (0,
|
|
4112
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
4113
|
+
var DynamicFlowWithRef = (0, import_react23.forwardRef)(function DynamicFlowWithRef2(props, ref) {
|
|
3995
4114
|
const { className = "" } = props;
|
|
3996
4115
|
const dfProps = useWiseToCoreProps(props);
|
|
3997
4116
|
const df = (0, import_dynamic_flow_client4.useDynamicFlow)(dfProps);
|
|
3998
|
-
(0,
|
|
4117
|
+
(0, import_react23.useImperativeHandle)(
|
|
3999
4118
|
ref,
|
|
4000
4119
|
() => ({
|
|
4001
4120
|
getValue: async () => {
|
|
@@ -4006,14 +4125,14 @@ var DynamicFlowWithRef = (0, import_react22.forwardRef)(function DynamicFlowWith
|
|
|
4006
4125
|
}),
|
|
4007
4126
|
[df]
|
|
4008
4127
|
);
|
|
4009
|
-
return /* @__PURE__ */ (0,
|
|
4128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className, children: df.view });
|
|
4010
4129
|
});
|
|
4011
4130
|
|
|
4012
4131
|
// src/index.ts
|
|
4013
4132
|
var import_dynamic_flow_client7 = require("@wise/dynamic-flow-client");
|
|
4014
4133
|
|
|
4015
4134
|
// src/dynamicFlow/renderers.tsx
|
|
4016
|
-
var Header11 =
|
|
4135
|
+
var Header11 = Header5;
|
|
4017
4136
|
var Media2 = Media;
|
|
4018
4137
|
var getMargin2 = getMargin;
|
|
4019
4138
|
|