@wise/dynamic-flow-client-internal 5.33.0 → 5.34.0-experimental-7a76ef5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/build/i18n/en.json +2 -0
  2. package/build/main.css +97 -0
  3. package/build/main.js +1191 -827
  4. package/build/main.mjs +964 -595
  5. package/build/tsconfig.types.tsbuildinfo +1 -1
  6. package/build/types/dynamicFlow/renderers.d.ts +2 -0
  7. package/build/types/dynamicFlow/renderers.d.ts.map +1 -1
  8. package/build/types/index.d.ts +1 -1
  9. package/build/types/index.d.ts.map +1 -1
  10. package/package.json +4 -4
  11. package/build/dynamicFlow/DynamicFlow.js +0 -11
  12. package/build/dynamicFlow/DynamicFlowModal.js +0 -21
  13. package/build/dynamicFlow/DynamicFlowWiseProps.js +0 -1
  14. package/build/dynamicFlow/DynamicFlowWithRef.js +0 -19
  15. package/build/dynamicFlow/context-menu/useContextMenu.js +0 -33
  16. package/build/dynamicFlow/context-menu/useDFContextMenu.js +0 -135
  17. package/build/dynamicFlow/context-menu/useDFContextMenu.test.js +0 -101
  18. package/build/dynamicFlow/getMergedRenderers.js +0 -36
  19. package/build/dynamicFlow/messages.js +0 -13
  20. package/build/dynamicFlow/renderers.js +0 -10
  21. package/build/dynamicFlow/telemetry/app-version.js +0 -4
  22. package/build/dynamicFlow/telemetry/dispatchAnalyticsEvent.js +0 -8
  23. package/build/dynamicFlow/telemetry/getLogEvent.js +0 -22
  24. package/build/dynamicFlow/telemetry/getTrackEvent.js +0 -39
  25. package/build/dynamicFlow/telemetry/index.js +0 -2
  26. package/build/dynamicFlow/useCreateSnackBar.js +0 -9
  27. package/build/dynamicFlow/useOnCopy.js +0 -16
  28. package/build/dynamicFlow/useWiseHttpClient.js +0 -24
  29. package/build/dynamicFlow/useWiseToCoreProps.js +0 -42
  30. package/build/i18n/index.js +0 -43
  31. package/build/index.js +0 -6
  32. package/build/stories/ButtonLoader.story.js +0 -109
  33. package/build/stories/ContainerQueries.story.js +0 -74
  34. package/build/stories/DynamicFlow.story.js +0 -37
  35. package/build/stories/DynamicFlowWithRef.story.js +0 -72
  36. package/build/stories/Editable.story.js +0 -58
  37. package/build/stories/Initialisation.story.js +0 -33
  38. package/build/stories/PinnedButtons.story.js +0 -94
  39. package/build/stories/SCAIntegration.story.js +0 -67
  40. package/build/stories/utils/fixtureHttpClient.js +0 -59
  41. package/build/test-utils/NeptuneProviders.js +0 -11
  42. package/build/test-utils/index.js +0 -4
  43. package/build/test-utils/respond-with.js +0 -6
  44. package/build/test-utils/rtl-utils.js +0 -7
  45. package/build/test-utils/wait.js +0 -3
  46. package/build/tests/DynamicFlow.test.js +0 -177
  47. package/build/tests/HideStepTitle.test.js +0 -58
  48. package/build/tests/RequestCache.test.js +0 -34
  49. package/build/tests/SCARejectionHandling.test.js +0 -71
  50. package/build/tests/Subflow.Wise.test.js +0 -650
  51. package/build/tests/events.test.js +0 -124
  52. package/build/tests/logging.test.js +0 -12
  53. package/build/tests/onNotification.test.js +0 -96
  54. package/build/tests/renderers/ControlAndTags.test.js +0 -225
  55. package/build/tests/renderers/ImageRenderer.test.js +0 -129
  56. package/build/tests/renderers/RadioInputRendererComponent.test.js +0 -89
  57. package/build/tests/renderers/ReviewRenderer.test.js +0 -41
  58. package/build/tests/renderers/TextInputRenderer.test.js +0 -245
  59. package/build/tests/renderers/TimeZoneHeader.test.js +0 -19
  60. package/build/tests/renderers/UploadInputRenderer.maxSize.test.js +0 -22
  61. package/build/tests/renderers/value-utils.test.js +0 -24
package/build/main.js CHANGED
@@ -70,7 +70,7 @@ var require_classnames = __commonJS({
70
70
  (function() {
71
71
  "use strict";
72
72
  var hasOwn = {}.hasOwnProperty;
73
- function classNames37() {
73
+ function classNames39() {
74
74
  var classes = "";
75
75
  for (var i = 0; i < arguments.length; i++) {
76
76
  var arg = arguments[i];
@@ -88,7 +88,7 @@ var require_classnames = __commonJS({
88
88
  return "";
89
89
  }
90
90
  if (Array.isArray(arg)) {
91
- return classNames37.apply(null, arg);
91
+ return classNames39.apply(null, arg);
92
92
  }
93
93
  if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
94
94
  return arg.toString();
@@ -111,14 +111,14 @@ var require_classnames = __commonJS({
111
111
  return value + newClass;
112
112
  }
113
113
  if (typeof module2 !== "undefined" && module2.exports) {
114
- classNames37.default = classNames37;
115
- module2.exports = classNames37;
114
+ classNames39.default = classNames39;
115
+ module2.exports = classNames39;
116
116
  } else if (typeof define === "function" && typeof define.amd === "object" && define.amd) {
117
117
  define("classnames", [], function() {
118
- return classNames37;
118
+ return classNames39;
119
119
  });
120
120
  } else {
121
- window.classNames = classNames37;
121
+ window.classNames = classNames39;
122
122
  }
123
123
  })();
124
124
  }
@@ -132,6 +132,7 @@ __export(index_exports, {
132
132
  Header: () => Header10,
133
133
  Media: () => Media2,
134
134
  createCollectionRenderer: () => createCollectionRenderer2,
135
+ createContactsCollectionRenderer: () => createContactsCollectionRenderer2,
135
136
  findRendererPropsByType: () => import_dynamic_flow_client8.findRendererPropsByType,
136
137
  getMargin: () => getMargin2,
137
138
  makeCustomFetch: () => import_dynamic_flow_client7.makeHttpClient,
@@ -336,7 +337,7 @@ var recursivelyRemoveNullish = (element) => {
336
337
  };
337
338
 
338
339
  // src/dynamicFlow/useWiseToCoreProps.tsx
339
- var import_react32 = require("react");
340
+ var import_react36 = require("react");
340
341
 
341
342
  // src/dynamicFlow/getMergedRenderers.tsx
342
343
  var import_dynamic_flow_client2 = require("@wise/dynamic-flow-client");
@@ -1659,8 +1660,8 @@ var getInlineAlertOrValidation = (validationState, inlineAlert) => {
1659
1660
  };
1660
1661
  var CheckboxInputRenderer_default = CheckboxInputRenderer;
1661
1662
 
1662
- // ../renderers/src/CollectionRenderer/CollectionRenderer.tsx
1663
- var import_components22 = require("@transferwise/components");
1663
+ // ../renderers/src/CollectionRenderer/CollectionRendererComponent.tsx
1664
+ var import_components15 = require("@transferwise/components");
1664
1665
 
1665
1666
  // ../renderers/src/messages/generic-error.messages.ts
1666
1667
  var import_react_intl5 = require("react-intl");
@@ -1682,6 +1683,29 @@ var generic_error_messages_default = (0, import_react_intl5.defineMessages)({
1682
1683
  }
1683
1684
  });
1684
1685
 
1686
+ // ../renderers/src/CollectionRenderer/CollectionRendererComponent.tsx
1687
+ var import_react_intl6 = require("react-intl");
1688
+ var import_jsx_runtime35 = require("react/jsx-runtime");
1689
+ var CollectionRendererComponent = (props) => {
1690
+ const { state, Search: Search5, AfterSearch, Filters, Results } = props;
1691
+ const { status } = state;
1692
+ const isError = status.type === "error" && (status.reason === "search" || status.reason === "filter");
1693
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
1694
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Search5, __spreadValues({}, props)),
1695
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(AfterSearch, __spreadValues({}, props)),
1696
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Filters, __spreadValues({}, props)),
1697
+ isError ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SearchError, { retry: status.retry }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Results, __spreadValues({}, props))
1698
+ ] });
1699
+ };
1700
+ var SearchError = ({ retry }) => {
1701
+ const { formatMessage } = (0, import_react_intl6.useIntl)();
1702
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_components15.InlinePrompt, { width: "full", sentiment: "negative", children: [
1703
+ formatMessage(generic_error_messages_default.genericError),
1704
+ "\xA0",
1705
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components15.Link, { onClick: retry, children: formatMessage(generic_error_messages_default.retry) })
1706
+ ] });
1707
+ };
1708
+
1685
1709
  // ../../node_modules/.pnpm/@tanstack+react-virtual@3.14.10_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-virtual/dist/esm/index.js
1686
1710
  var React = __toESM(require("react"), 1);
1687
1711
  var import_react_dom = require("react-dom");
@@ -3218,18 +3242,18 @@ function useWindowVirtualizer(options) {
3218
3242
  }, options));
3219
3243
  }
3220
3244
 
3221
- // ../renderers/src/CollectionRenderer/components/ContentComponent.tsx
3222
- var import_components16 = require("@transferwise/components");
3245
+ // ../renderers/src/CollectionRenderer/components/VirtualisedContentComponent.tsx
3246
+ var import_components17 = require("@transferwise/components");
3223
3247
  var import_react9 = require("react");
3224
3248
 
3225
3249
  // ../renderers/src/step/StepFooter.tsx
3226
- var import_components15 = require("@transferwise/components");
3250
+ var import_components16 = require("@transferwise/components");
3227
3251
  var import_react8 = require("react");
3228
- var import_react_intl7 = require("react-intl");
3252
+ var import_react_intl8 = require("react-intl");
3229
3253
 
3230
3254
  // ../renderers/src/messages/step.messages.ts
3231
- var import_react_intl6 = require("react-intl");
3232
- var step_messages_default = (0, import_react_intl6.defineMessages)({
3255
+ var import_react_intl7 = require("react-intl");
3256
+ var step_messages_default = (0, import_react_intl7.defineMessages)({
3233
3257
  scrollToBottom: {
3234
3258
  id: "df.wise.step.scrollToBottom",
3235
3259
  defaultMessage: "Scroll to bottom",
@@ -3238,24 +3262,24 @@ var step_messages_default = (0, import_react_intl6.defineMessages)({
3238
3262
  });
3239
3263
 
3240
3264
  // ../renderers/src/step/StepFooter.tsx
3241
- var import_jsx_runtime35 = require("react/jsx-runtime");
3265
+ var import_jsx_runtime36 = require("react/jsx-runtime");
3242
3266
  var SCROLL_TO_BOTTOM = "scroll-to-bottom";
3243
3267
  var StepFooter = ({ footer, tags }) => {
3244
3268
  if (tags == null ? void 0 : tags.includes(SCROLL_TO_BOTTOM)) {
3245
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(FooterWithScrollButton, { footer });
3269
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(FooterWithScrollButton, { footer });
3246
3270
  }
3247
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DefaultFooter, { footer });
3271
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DefaultFooter, { footer });
3248
3272
  };
3249
3273
  var DefaultFooter = ({ footer }) => {
3250
3274
  const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
3251
- return hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0;
3275
+ return hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0;
3252
3276
  };
3253
3277
  var FooterWithScrollButton = ({ footer }) => {
3254
- const { formatMessage } = (0, import_react_intl7.useIntl)();
3278
+ const { formatMessage } = (0, import_react_intl8.useIntl)();
3255
3279
  const endOfLayoutRef = (0, import_react8.useRef)(null);
3256
3280
  const isElementVisible = useIsElementVisible(endOfLayoutRef);
3257
- const scrollButton = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3258
- import_components15.Button,
3281
+ const scrollButton = /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3282
+ import_components16.Button,
3259
3283
  {
3260
3284
  className: "m-b-1",
3261
3285
  v2: true,
@@ -3270,11 +3294,11 @@ var FooterWithScrollButton = ({ footer }) => {
3270
3294
  );
3271
3295
  const hasStepFooterContent = footer && Array.isArray(footer) && footer.length > 0;
3272
3296
  if (isElementVisible && !hasStepFooterContent) {
3273
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
3297
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
3274
3298
  }
3275
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
3276
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
3277
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "df-step-fixed__footer", children: [
3299
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
3300
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
3301
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "df-step-fixed__footer", children: [
3278
3302
  !isElementVisible && scrollButton,
3279
3303
  footer
3280
3304
  ] })
@@ -3297,12 +3321,12 @@ var useIsElementVisible = (elementRef, root = null) => {
3297
3321
  return isVisible;
3298
3322
  };
3299
3323
 
3300
- // ../renderers/src/CollectionRenderer/components/ContentComponent.tsx
3301
- var import_react_intl9 = require("react-intl");
3324
+ // ../renderers/src/CollectionRenderer/components/VirtualisedContentComponent.tsx
3325
+ var import_react_intl10 = require("react-intl");
3302
3326
 
3303
3327
  // ../renderers/src/messages/collection.messages.ts
3304
- var import_react_intl8 = require("react-intl");
3305
- var collection_messages_default = (0, import_react_intl8.defineMessages)({
3328
+ var import_react_intl9 = require("react-intl");
3329
+ var collection_messages_default = (0, import_react_intl9.defineMessages)({
3306
3330
  loadMoreButton: {
3307
3331
  id: "df.wise.Collection.loadMoreMessage",
3308
3332
  defaultMessage: "Load more",
@@ -3312,6 +3336,16 @@ var collection_messages_default = (0, import_react_intl8.defineMessages)({
3312
3336
  id: "df.wise.Collection.clearText",
3313
3337
  defaultMessage: "Clear text",
3314
3338
  description: "A message shown at the edge of the search bar to clear the users query"
3339
+ },
3340
+ showMoreResultsButton: {
3341
+ id: "df.wise.Collection.showMoreResultsButton",
3342
+ defaultMessage: "Show all {count} results",
3343
+ description: "A message shown at the bottom of a truncated list of items, clicking will expand to show more"
3344
+ },
3345
+ showLessResultsButton: {
3346
+ id: "df.wise.Collection.showLessResultsButton",
3347
+ defaultMessage: "Show less results",
3348
+ description: "A message shown at the bottom of an expanded list of items, clicking will truncate to show only a few"
3315
3349
  }
3316
3350
  });
3317
3351
 
@@ -3335,10 +3369,48 @@ var getScrollableAncestor = (element) => {
3335
3369
  return null;
3336
3370
  };
3337
3371
 
3338
- // ../renderers/src/CollectionRenderer/components/ContentComponent.tsx
3339
- var import_jsx_runtime36 = require("react/jsx-runtime");
3340
- var ContentComponent = (props) => {
3341
- const { state, status, SectionHeader, Item } = props;
3372
+ // ../renderers/src/CollectionRenderer/components/flattenCollectionItems.ts
3373
+ var flattenCollectionItems = (sections) => {
3374
+ return sections.flatMap((section) => {
3375
+ if (section.type === "items") {
3376
+ return flattenItemsBody(section);
3377
+ }
3378
+ if (section.type === "layout") {
3379
+ return flattenLayoutBody(section);
3380
+ }
3381
+ return [];
3382
+ });
3383
+ };
3384
+ var flattenItemsBody = (section) => {
3385
+ return [
3386
+ ...flattenSectionHeader(section),
3387
+ ...section.items.map((item) => ({
3388
+ item,
3389
+ type: "item"
3390
+ }))
3391
+ ];
3392
+ };
3393
+ var flattenLayoutBody = (section) => [
3394
+ ...flattenSectionHeader(section),
3395
+ __spreadProps(__spreadValues({}, section), {
3396
+ type: "layout"
3397
+ })
3398
+ ];
3399
+ var flattenSectionHeader = (section) => section.title ? [
3400
+ {
3401
+ type: "header",
3402
+ title: section.title,
3403
+ items: section.type === "items" ? section.items : void 0,
3404
+ id: section.id,
3405
+ callToAction: section.callToAction
3406
+ }
3407
+ ] : [];
3408
+
3409
+ // ../renderers/src/CollectionRenderer/components/VirtualisedContentComponent.tsx
3410
+ var import_jsx_runtime37 = require("react/jsx-runtime");
3411
+ var VirtualisedContentComponent = (props) => {
3412
+ const { state, SectionHeader, Item } = props;
3413
+ const { status } = state;
3342
3414
  const contentRef = (0, import_react9.useRef)(null);
3343
3415
  const [scrollElement, setScrollElement] = (0, import_react9.useState)(null);
3344
3416
  (0, import_react9.useLayoutEffect)(() => {
@@ -3355,34 +3427,20 @@ var ContentComponent = (props) => {
3355
3427
  status.loadMore();
3356
3428
  }
3357
3429
  }, [isBottomVisible, state.afterSectionsProps.length, status]);
3358
- const stateCount = state.sections.reduce(
3359
- (total, section) => section.items.length + total + (section.title ? 1 : 0),
3360
- 0
3361
- );
3362
- const items = state.sections.flatMap((section) => [
3363
- ...section.title ? [
3364
- {
3365
- type: "header",
3366
- title: section.title,
3367
- items: section.items,
3368
- id: section.id,
3369
- callToAction: section.callToAction
3370
- }
3371
- ] : [],
3372
- ...section.items.map((item) => ({
3373
- item,
3374
- type: "item"
3375
- }))
3376
- ]);
3430
+ const stateCount = state.sections.reduce((total, section) => {
3431
+ const count = section.type === "items" ? section.items.length : 1;
3432
+ return count + total + (section.title ? 1 : 0);
3433
+ }, 0);
3434
+ const items = flattenCollectionItems(state.sections);
3377
3435
  const listRef = (0, import_react9.useRef)(null);
3378
3436
  const listOffsetRef = (0, import_react9.useRef)(0);
3379
3437
  (0, import_react9.useLayoutEffect)(() => {
3380
3438
  var _a, _b;
3381
3439
  listOffsetRef.current = (_b = (_a = listRef.current) == null ? void 0 : _a.offsetTop) != null ? _b : 0;
3382
3440
  });
3383
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { ref: contentRef, children: [
3441
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { ref: contentRef, children: [
3384
3442
  state.beforeSections,
3385
- scrollElement ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3443
+ scrollElement ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3386
3444
  ElementVirtualizedItems,
3387
3445
  {
3388
3446
  Item,
@@ -3391,7 +3449,7 @@ var ContentComponent = (props) => {
3391
3449
  scrollElement,
3392
3450
  stateCount
3393
3451
  }
3394
- ) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3452
+ ) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3395
3453
  WindowVirtualizedItems,
3396
3454
  {
3397
3455
  Item,
@@ -3400,7 +3458,7 @@ var ContentComponent = (props) => {
3400
3458
  stateCount
3401
3459
  }
3402
3460
  ),
3403
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { ref: endOfContentRef, className: "d-flex m-x-auto m-y-2", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(PaginationComponent, { status, state }) }),
3461
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { ref: endOfContentRef, className: "d-flex m-x-auto m-y-2", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(PaginationComponent, { state }) }),
3404
3462
  state.afterSections
3405
3463
  ] });
3406
3464
  };
@@ -3412,7 +3470,7 @@ var WindowVirtualizedItems = (props) => {
3412
3470
  estimateSize: () => 120,
3413
3471
  overscan: 10
3414
3472
  });
3415
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(VirtualizedItems, __spreadProps(__spreadValues({}, props), { virtualItemsRef, virtualizer }));
3473
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(VirtualizedItems, __spreadProps(__spreadValues({}, props), { virtualItemsRef, virtualizer }));
3416
3474
  };
3417
3475
  var ElementVirtualizedItems = (props) => {
3418
3476
  const { scrollElement, stateCount } = props;
@@ -3423,7 +3481,7 @@ var ElementVirtualizedItems = (props) => {
3423
3481
  estimateSize: () => 120,
3424
3482
  overscan: 10
3425
3483
  });
3426
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(VirtualizedItems, __spreadProps(__spreadValues({}, props), { virtualItemsRef, virtualizer }));
3484
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(VirtualizedItems, __spreadProps(__spreadValues({}, props), { virtualItemsRef, virtualizer }));
3427
3485
  };
3428
3486
  var VirtualizedItems = ({
3429
3487
  Item,
@@ -3431,7 +3489,7 @@ var VirtualizedItems = ({
3431
3489
  items,
3432
3490
  virtualItemsRef,
3433
3491
  virtualizer
3434
- }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3492
+ }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3435
3493
  "div",
3436
3494
  {
3437
3495
  ref: virtualItemsRef,
@@ -3445,7 +3503,7 @@ var VirtualizedItems = ({
3445
3503
  if (!i) {
3446
3504
  return null;
3447
3505
  }
3448
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3506
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
3449
3507
  "div",
3450
3508
  {
3451
3509
  ref: virtualizer.measureElement,
@@ -3457,17 +3515,19 @@ var VirtualizedItems = ({
3457
3515
  width: "100%",
3458
3516
  transform: `translateY(${item.start - virtualizer.options.scrollMargin}px)`
3459
3517
  },
3460
- children: i.type === "header" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SectionHeader, __spreadValues({}, i)) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Item, __spreadValues({}, i.item))
3518
+ children: [
3519
+ i.type === "header" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SectionHeader, __spreadValues({}, i)),
3520
+ i.type === "item" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Item, __spreadValues({}, i.item)),
3521
+ i.type === "layout" && i.children
3522
+ ]
3461
3523
  },
3462
3524
  item.key
3463
3525
  );
3464
3526
  })
3465
3527
  }
3466
3528
  );
3467
- var PaginationComponent = ({
3468
- status,
3469
- state
3470
- }) => {
3529
+ var PaginationComponent = ({ state }) => {
3530
+ const { status } = state;
3471
3531
  const isPaginationError = status.type === "error" && status.reason === "pagination";
3472
3532
  const isPaginationLoading = status.type === "loading" && status.reason === "pagination";
3473
3533
  const loadMore = status.type === "idle" ? status.loadMore : void 0;
@@ -3475,35 +3535,42 @@ var PaginationComponent = ({
3475
3535
  return null;
3476
3536
  }
3477
3537
  if (isPaginationError) {
3478
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(LoadMoreButton, { onClick: status.retry });
3538
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(LoadMoreButton, { onClick: status.retry });
3479
3539
  }
3480
3540
  if (state.afterSectionsProps.length > 0 && loadMore) {
3481
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(LoadMoreButton, { onClick: loadMore });
3541
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(LoadMoreButton, { onClick: loadMore });
3482
3542
  }
3483
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components16.ProcessIndicator, { size: "xs", "data-testid": "collection-pagination-loader" });
3543
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components17.ProcessIndicator, { size: "xs", "data-testid": "collection-pagination-loader" });
3484
3544
  };
3485
3545
  var LoadMoreButton = ({ onClick }) => {
3486
- const { formatMessage } = (0, import_react_intl9.useIntl)();
3487
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "d-flex m-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components16.Button, { v2: true, size: "sm", priority: "secondary-neutral", onClick, children: formatMessage(collection_messages_default.loadMoreButton) }) });
3546
+ const { formatMessage } = (0, import_react_intl10.useIntl)();
3547
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "d-flex m-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components17.Button, { v2: true, size: "sm", priority: "secondary-neutral", onClick, children: formatMessage(collection_messages_default.loadMoreButton) }) });
3488
3548
  };
3489
3549
 
3490
- // ../renderers/src/CollectionRenderer/components/FilterComponent.tsx
3491
- var import_components17 = require("@transferwise/components");
3492
- var import_jsx_runtime37 = require("react/jsx-runtime");
3493
- var FiltersComponent = ({ state }) => {
3494
- const { filters } = state;
3495
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "df-filters-container", children: filters.map((filter) => {
3496
- var _a;
3497
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(FilterComponent, __spreadValues({}, filter), JSON.stringify((_a = filter.options) == null ? void 0 : _a.map((o) => o.value)));
3550
+ // ../renderers/src/CollectionRenderer/v1/FilterComponent.tsx
3551
+ var import_components18 = require("@transferwise/components");
3552
+ var import_jsx_runtime38 = require("react/jsx-runtime");
3553
+ var FiltersComponent = (props) => {
3554
+ const _a = props, { Filter } = _a, collectionProps = __objRest(_a, ["Filter"]);
3555
+ const { filters } = collectionProps.state;
3556
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "df-filters-container", children: filters.map((filter) => {
3557
+ var _a2;
3558
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3559
+ Filter,
3560
+ __spreadProps(__spreadValues({}, collectionProps), {
3561
+ filter
3562
+ }),
3563
+ JSON.stringify((_a2 = filter.options) == null ? void 0 : _a2.map((o) => o.value))
3564
+ );
3498
3565
  }) });
3499
3566
  };
3500
- var FilterComponent = (filter) => {
3567
+ var FilterComponent = ({ filter }) => {
3501
3568
  const { multiSelect, options } = filter;
3502
3569
  if (!options) {
3503
3570
  return null;
3504
3571
  }
3505
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3506
- import_components17.Chips,
3572
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3573
+ import_components18.Chips,
3507
3574
  {
3508
3575
  className: "m-b-1",
3509
3576
  multiple: multiSelect,
@@ -3528,11 +3595,11 @@ var FilterComponent = (filter) => {
3528
3595
  };
3529
3596
 
3530
3597
  // ../renderers/src/CollectionRenderer/components/ItemComponent.tsx
3531
- var import_components20 = require("@transferwise/components");
3598
+ var import_components21 = require("@transferwise/components");
3532
3599
 
3533
3600
  // ../renderers/src/utils/listItem/getAdditionalInfo.tsx
3534
- var import_components18 = require("@transferwise/components");
3535
- var import_jsx_runtime38 = require("react/jsx-runtime");
3601
+ var import_components19 = require("@transferwise/components");
3602
+ var import_jsx_runtime39 = require("react/jsx-runtime");
3536
3603
  var getAdditionalInfo = (additionalInfo) => {
3537
3604
  var _a, _b;
3538
3605
  if (!additionalInfo) {
@@ -3540,8 +3607,8 @@ var getAdditionalInfo = (additionalInfo) => {
3540
3607
  }
3541
3608
  const { href, text, onClick } = additionalInfo;
3542
3609
  if (href || onClick) {
3543
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3544
- import_components18.ListItem.AdditionalInfo,
3610
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3611
+ import_components19.ListItem.AdditionalInfo,
3545
3612
  {
3546
3613
  action: __spreadValues({
3547
3614
  label: text
@@ -3549,20 +3616,20 @@ var getAdditionalInfo = (additionalInfo) => {
3549
3616
  }
3550
3617
  );
3551
3618
  }
3552
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_components18.ListItem.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
3619
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components19.ListItem.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
3553
3620
  };
3554
3621
 
3555
3622
  // ../renderers/src/utils/listItem/getCTAControl.tsx
3556
- var import_components19 = require("@transferwise/components");
3557
- var import_jsx_runtime39 = require("react/jsx-runtime");
3623
+ var import_components20 = require("@transferwise/components");
3624
+ var import_jsx_runtime40 = require("react/jsx-runtime");
3558
3625
  var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
3559
3626
  if (!callToAction) {
3560
3627
  return void 0;
3561
3628
  }
3562
3629
  const { accessibilityDescription, title, context } = callToAction;
3563
3630
  const { priority, sentiment } = getPriorityAndSentiment(ctaSecondary, context);
3564
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3565
- import_components19.ListItem.Button,
3631
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3632
+ import_components20.ListItem.Button,
3566
3633
  __spreadProps(__spreadValues({}, callToAction.getAnchorProps()), {
3567
3634
  partiallyInteractive: !fullyInteractive,
3568
3635
  priority,
@@ -3586,7 +3653,7 @@ var shouldUseAvatar = (control, tags) => {
3586
3653
  };
3587
3654
 
3588
3655
  // ../renderers/src/CollectionRenderer/components/ItemComponent.tsx
3589
- var import_jsx_runtime40 = require("react/jsx-runtime");
3656
+ var import_jsx_runtime41 = require("react/jsx-runtime");
3590
3657
  var ItemComponent = (props) => {
3591
3658
  var _a, _b;
3592
3659
  const {
@@ -3608,8 +3675,8 @@ var ItemComponent = (props) => {
3608
3675
  ctaSecondary: (_a = tags == null ? void 0 : tags.includes("cta-secondary")) != null ? _a : false,
3609
3676
  fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
3610
3677
  };
3611
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3612
- import_components20.ListItem,
3678
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3679
+ import_components21.ListItem,
3613
3680
  {
3614
3681
  title,
3615
3682
  subtitle: description,
@@ -3625,57 +3692,55 @@ var ItemComponent = (props) => {
3625
3692
  };
3626
3693
  var getNavigationControl = (onClick, href) => {
3627
3694
  if (href) {
3628
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components20.ListItem.Navigation, { href });
3695
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components21.ListItem.Navigation, { href });
3629
3696
  }
3630
3697
  if (onClick) {
3631
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components20.ListItem.Navigation, { onClick });
3698
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components21.ListItem.Navigation, { onClick });
3632
3699
  }
3633
3700
  return null;
3634
3701
  };
3635
3702
 
3636
- // ../renderers/src/CollectionRenderer/components/SearchComponent.tsx
3637
- var import_components21 = require("@transferwise/components");
3703
+ // ../renderers/src/CollectionRenderer/v1/SearchComponent.tsx
3704
+ var import_components22 = require("@transferwise/components");
3638
3705
  var import_icons = require("@transferwise/icons");
3639
- var import_react_intl10 = require("react-intl");
3640
- var import_jsx_runtime41 = require("react/jsx-runtime");
3706
+ var import_react_intl11 = require("react-intl");
3707
+ var import_jsx_runtime42 = require("react/jsx-runtime");
3641
3708
  var SearchComponent = ({
3642
3709
  state,
3643
- status,
3644
3710
  features,
3645
3711
  control,
3646
- tags
3712
+ tags,
3713
+ onSearchChange
3647
3714
  }) => {
3715
+ var _a;
3648
3716
  const { search } = state;
3649
- const { formatMessage } = (0, import_react_intl10.useIntl)();
3717
+ const { formatMessage } = (0, import_react_intl11.useIntl)();
3650
3718
  if (!search) {
3651
3719
  return;
3652
3720
  }
3653
3721
  const getAddon = () => {
3654
- var _a;
3655
- if (status.type === "loading") {
3656
- return { content: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components21.ProcessIndicator, { size: "xs", "data-testid": "collection-search-loader" }) };
3722
+ var _a2;
3723
+ if (state.status.type === "loading") {
3724
+ return { content: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components22.ProcessIndicator, { size: "xs", "data-testid": "collection-search-loader" }) };
3657
3725
  }
3658
- if ((_a = state.search) == null ? void 0 : _a.query) {
3726
+ if ((_a2 = state.search) == null ? void 0 : _a2.query) {
3659
3727
  return {
3660
3728
  interactive: true,
3661
- content: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3662
- import_components21.IconButton,
3729
+ content: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3730
+ import_components22.IconButton,
3663
3731
  {
3664
3732
  priority: "minimal",
3665
3733
  size: 24,
3666
3734
  "aria-label": formatMessage(collection_messages_default.clearTextLabel),
3667
- onClick: () => {
3668
- var _a2;
3669
- return (_a2 = state.search) == null ? void 0 : _a2.onChange("");
3670
- },
3671
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_icons.CrossCircleFill, {})
3735
+ onClick: () => onSearchChange(""),
3736
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_icons.CrossCircleFill, {})
3672
3737
  }
3673
3738
  )
3674
3739
  };
3675
3740
  }
3676
3741
  return void 0;
3677
3742
  };
3678
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3743
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3679
3744
  FieldInput_default,
3680
3745
  {
3681
3746
  id: "search",
@@ -3686,17 +3751,17 @@ var SearchComponent = ({
3686
3751
  features,
3687
3752
  control,
3688
3753
  tags,
3689
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components21.InputGroup, { addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_icons.Search, { size: 24 }) }, addonEnd: getAddon(), children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3690
- import_components21.Input,
3754
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components22.InputGroup, { addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_icons.Search, { size: 24 }) }, addonEnd: getAddon(), children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3755
+ import_components22.Input,
3691
3756
  {
3692
3757
  id: "search",
3693
3758
  name: "search",
3694
3759
  shape: "pill",
3695
- placeholder: search.hint,
3760
+ placeholder: (_a = search.hints) == null ? void 0 : _a[0],
3696
3761
  type: "text",
3697
3762
  value: search.query,
3698
3763
  onChange: ({ currentTarget: { value } }) => {
3699
- search.onChange(value);
3764
+ onSearchChange(value);
3700
3765
  }
3701
3766
  }
3702
3767
  ) })
@@ -3705,168 +3770,463 @@ var SearchComponent = ({
3705
3770
  };
3706
3771
 
3707
3772
  // ../renderers/src/CollectionRenderer/components/SectionHeaderComponent.tsx
3708
- var import_jsx_runtime42 = require("react/jsx-runtime");
3773
+ var import_jsx_runtime43 = require("react/jsx-runtime");
3709
3774
  var SectionHeaderComponent = ({
3710
3775
  title,
3711
3776
  callToAction
3712
- }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Header, { title, callToAction });
3777
+ }) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Header, { title, callToAction });
3713
3778
 
3714
3779
  // ../renderers/src/CollectionRenderer/createCollectionRenderer.tsx
3715
- var import_jsx_runtime43 = require("react/jsx-runtime");
3780
+ var import_jsx_runtime44 = require("react/jsx-runtime");
3716
3781
  var createCollectionRenderer = (canRender, components) => {
3717
3782
  const componentsWithDefaults = __spreadValues({
3718
3783
  Search: SearchComponent,
3784
+ AfterSearch: () => null,
3719
3785
  Filters: FiltersComponent,
3720
3786
  Filter: FilterComponent,
3721
3787
  Item: ItemComponent,
3722
3788
  SectionHeader: SectionHeaderComponent,
3723
- Results: ContentComponent
3789
+ Results: VirtualisedContentComponent
3724
3790
  }, components);
3725
3791
  return {
3726
3792
  canRenderType: "collection",
3727
3793
  canRender,
3728
3794
  render: (props) => {
3729
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(CollectionRendererComponent, __spreadValues(__spreadValues({}, props), componentsWithDefaults));
3795
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(CollectionRendererComponent, __spreadValues(__spreadValues({}, props), componentsWithDefaults));
3730
3796
  }
3731
3797
  };
3732
3798
  };
3733
3799
 
3734
- // ../renderers/src/CollectionRenderer/CollectionRenderer.tsx
3735
- var import_react_intl11 = require("react-intl");
3736
- var import_jsx_runtime44 = require("react/jsx-runtime");
3737
- var CollectionRendererComponent = (props) => {
3738
- const { status, Search: Search4, Filters, Results } = props;
3739
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
3740
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Search4, __spreadValues({}, props)),
3741
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Filters, __spreadValues({}, props)),
3742
- status.type === "error" && status.reason === "search" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(SearchError, { retry: status.retry }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Results, __spreadValues({}, props))
3743
- ] });
3744
- };
3745
- var SearchError = ({ retry }) => {
3746
- const { formatMessage } = (0, import_react_intl11.useIntl)();
3747
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_components22.InlinePrompt, { width: "full", sentiment: "negative", children: [
3748
- formatMessage(generic_error_messages_default.genericError),
3749
- "\xA0",
3750
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components22.Link, { onClick: retry, children: formatMessage(generic_error_messages_default.retry) })
3751
- ] });
3752
- };
3753
- var CollectionRenderer = createCollectionRenderer(() => true);
3754
- var CollectionRenderer_default = CollectionRenderer;
3800
+ // ../renderers/src/CollectionRenderer/v1/CollectionRendererV1.tsx
3801
+ var CollectionRendererV1 = createCollectionRenderer(
3802
+ () => true
3803
+ );
3804
+ var CollectionRendererV1_default = CollectionRendererV1;
3755
3805
 
3756
- // ../renderers/src/ColumnsRenderer.tsx
3806
+ // ../renderers/src/CollectionRenderer/v2/FilterComponent.tsx
3807
+ var import_components23 = require("@transferwise/components");
3757
3808
  var import_classnames12 = __toESM(require_classnames());
3758
-
3759
- // ../renderers/src/utils/useIsCollapsed.ts
3760
3809
  var import_react10 = require("react");
3761
- var COLLAPSE_QUERY = "(max-width: 767.98px)";
3762
- var supportsMatchMedia = () => typeof window !== "undefined" && !!window.matchMedia;
3763
- var useIsCollapsed = () => {
3764
- const [collapsed, setCollapsed] = (0, import_react10.useState)(
3765
- () => supportsMatchMedia() && window.matchMedia(COLLAPSE_QUERY).matches
3766
- );
3767
- (0, import_react10.useEffect)(() => {
3768
- if (supportsMatchMedia()) {
3769
- const mql = window.matchMedia(COLLAPSE_QUERY);
3770
- const update = () => setCollapsed(mql.matches);
3771
- mql.addEventListener("change", update);
3772
- return () => mql.removeEventListener("change", update);
3773
- }
3774
- return void 0;
3775
- }, []);
3776
- return collapsed;
3777
- };
3778
-
3779
- // ../renderers/src/ColumnsRenderer.tsx
3780
3810
  var import_jsx_runtime45 = require("react/jsx-runtime");
3781
- var RIGHT_FIRST_STACKING = "right-first-stacking";
3782
- var ColumnsRenderer = {
3783
- canRenderType: "columns",
3784
- render: ColumnsRendererComponent
3785
- };
3786
- function ColumnsRendererComponent(props) {
3787
- var _a;
3788
- const { bias, margin, startChildren, endChildren, tags } = props;
3789
- const isCollapsed = useIsCollapsed();
3790
- const reverse = isCollapsed && ((_a = tags == null ? void 0 : tags.includes(RIGHT_FIRST_STACKING)) != null ? _a : false);
3791
- const startColumn = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "df-columns-renderer-column", children: startChildren });
3792
- const endColumn = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "df-columns-renderer-column", children: endChildren });
3793
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
3811
+ var FiltersComponent2 = (props) => {
3812
+ const _a = props, { Filter } = _a, collectionProps = __objRest(_a, ["Filter"]);
3813
+ const { state, depth, tags } = collectionProps;
3814
+ const { filters, status, search } = state;
3815
+ const isForked = depth > 0;
3816
+ const isSearching = status.type === "loading" && status.reason === "search";
3817
+ const [searchedStateId, setSearchedStateId] = (0, import_react10.useState)();
3818
+ if (isForked && !isSearching && (search == null ? void 0 : search.query) && searchedStateId !== state.id) {
3819
+ setSearchedStateId(state.id);
3820
+ }
3821
+ const showDivider = (search == null ? void 0 : search.query) === "" && (tags == null ? void 0 : tags.includes("filter-divider"));
3822
+ const isFirstSearchPending = isForked && isSearching && searchedStateId !== state.id;
3823
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3794
3824
  "div",
3795
3825
  {
3796
- className: (0, import_classnames12.default)(
3797
- "df-columns-renderer-container",
3798
- getMargin(margin),
3799
- {
3800
- "df-columns-renderer-bias-start": bias === "start",
3801
- "df-columns-renderer-bias-end": bias === "end"
3802
- },
3803
- controlAndTagsToCSSClass(props)
3804
- ),
3805
- children: [
3806
- reverse ? endColumn : startColumn,
3807
- reverse ? startColumn : endColumn
3808
- ]
3826
+ className: (0, import_classnames12.default)("df-filters-collapsible m-t-5", {
3827
+ "df-filters-collapsible--hidden": isFirstSearchPending
3828
+ }),
3829
+ "aria-hidden": isFirstSearchPending,
3830
+ inert: isFirstSearchPending,
3831
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "df-filters-collapsible-content", children: [
3832
+ showDivider && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_components23.Divider, { className: "m-b-4", level: "subsection" }),
3833
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: (0, import_classnames12.default)("df-filters-container", { "df-filter-loader": isSearching }), children: filters.map((filter) => {
3834
+ var _a2;
3835
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3836
+ Filter,
3837
+ __spreadProps(__spreadValues({}, collectionProps), {
3838
+ filter
3839
+ }),
3840
+ JSON.stringify((_a2 = filter.options) == null ? void 0 : _a2.map((o) => o.value))
3841
+ );
3842
+ }) })
3843
+ ] })
3809
3844
  }
3810
3845
  );
3811
- }
3812
- var ColumnsRenderer_default = ColumnsRenderer;
3813
-
3814
- // ../renderers/src/validators/type-validators.ts
3815
- var isNumber = (value) => typeof value === "number" && !Number.isNaN(value);
3816
-
3817
- // ../renderers/src/utils/value-utils.ts
3818
- var dateStringToDateOrNull = (dateString) => {
3819
- const match = dateString ? /^(\d{4})-(\d{2})-(\d{2})$/.exec(dateString) : null;
3820
- if (!match) {
3821
- return null;
3822
- }
3823
- const [, year, month, day] = match.map(Number);
3824
- if (!isNumber(year) || !isNumber(month) || !isNumber(day)) {
3846
+ };
3847
+ var FilterComponent2 = ({
3848
+ filter,
3849
+ state
3850
+ }) => {
3851
+ const { multiSelect, options } = filter;
3852
+ const { status } = state;
3853
+ const disabled = status.type === "loading" && status.reason === "search";
3854
+ if (!options) {
3825
3855
  return null;
3826
3856
  }
3827
- const date = /* @__PURE__ */ new Date(0);
3828
- date.setHours(0, 0, 0, 0);
3829
- date.setFullYear(year, month - 1, day);
3830
- return date.getFullYear() === year && date.getMonth() === month - 1 && date.getDate() === day ? date : null;
3831
- };
3832
- var dateToDateString = (date) => {
3833
- const d = new Date(date);
3834
- const month = String(d.getMonth() + 1);
3835
- const day = String(d.getDate());
3836
- const year = d.getFullYear();
3837
- const formattedMonth = month.length < 2 ? `0${month}` : month;
3838
- const formattedDay = day.length < 2 ? `0${day}` : day;
3839
- return [year, formattedMonth, formattedDay].join("-");
3857
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3858
+ import_components23.Chips,
3859
+ {
3860
+ className: "m-b-1",
3861
+ multiple: multiSelect,
3862
+ selected: options.some((option) => option.selected) ? options.filter((option) => option.selected).map((option) => option.value) : multiSelect ? [] : "",
3863
+ chips: [
3864
+ ...options.map((option) => ({
3865
+ value: option.value,
3866
+ label: option.title
3867
+ }))
3868
+ ],
3869
+ onChange: (value) => {
3870
+ var _a;
3871
+ if (disabled) {
3872
+ return;
3873
+ }
3874
+ if (value.selectedValue === "") {
3875
+ options == null ? void 0 : options.filter((option) => option.selected).map((option) => option == null ? void 0 : option.onSelect());
3876
+ return;
3877
+ }
3878
+ (_a = options == null ? void 0 : options.find((option) => value.selectedValue === option.value)) == null ? void 0 : _a.onSelect();
3879
+ }
3880
+ },
3881
+ JSON.stringify(options)
3882
+ );
3840
3883
  };
3841
3884
 
3842
- // ../renderers/src/DateInputRenderer/DateLookupControl.tsx
3843
- var import_components23 = require("@transferwise/components");
3844
-
3845
- // ../renderers/src/hooks/useAvailabilityRules.ts
3846
- var import_react11 = require("react");
3885
+ // ../renderers/src/CollectionRenderer/v2/SearchComponent.tsx
3886
+ var import_components24 = require("@transferwise/components");
3887
+ var import_icons2 = require("@transferwise/icons");
3888
+ var import_react12 = require("react");
3847
3889
  var import_react_intl13 = require("react-intl");
3848
3890
 
3849
- // ../renderers/src/messages/date-input.messages.ts
3891
+ // ../renderers/src/CollectionRenderer/v2/AnimatedSearchHint.tsx
3892
+ var import_classnames13 = __toESM(require_classnames());
3893
+ var import_react11 = require("react");
3850
3894
  var import_react_intl12 = require("react-intl");
3851
- var date_input_messages_default = (0, import_react_intl12.defineMessages)({
3852
- unavailableDates: {
3853
- id: "df.wise.DateInput.unavailableDates",
3854
- defaultMessage: "Some dates are unavailable.",
3855
- description: "General explanation shown below a calendar containing unavailable dates"
3895
+ var import_jsx_runtime46 = require("react/jsx-runtime");
3896
+ var STEP_DURATION = 3e3;
3897
+ var AnimatedSearchHint = ({ hints }) => {
3898
+ const { prefix: prefix2, words, allWords } = useSearchHints(hints);
3899
+ const [step, setStep] = (0, import_react11.useState)(0);
3900
+ (0, import_react11.useEffect)(() => {
3901
+ const interval = setInterval(() => setStep((current) => current + 1), STEP_DURATION);
3902
+ return () => clearInterval(interval);
3903
+ }, []);
3904
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
3905
+ "span",
3906
+ {
3907
+ "aria-hidden": true,
3908
+ className: "df-search-hint np-text-body-large",
3909
+ "data-testid": "collection-search-hint",
3910
+ children: [
3911
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "df-search-hint-prefix", children: prefix2 }),
3912
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "df-search-hint-viewport", children: [...words, allWords].map((word, index) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3913
+ "span",
3914
+ {
3915
+ className: (0, import_classnames13.default)("df-search-hint-word", {
3916
+ "df-search-hint-word--current": index === step,
3917
+ "df-search-hint-word--past": index < step
3918
+ }),
3919
+ children: word
3920
+ },
3921
+ word
3922
+ )) })
3923
+ ]
3924
+ }
3925
+ );
3926
+ };
3927
+ var useSearchHints = (hints) => {
3928
+ var _a;
3929
+ const { formatList } = (0, import_react_intl12.useIntl)();
3930
+ if (hints.length < 2) {
3931
+ return { prefix: "", words: [], allWords: "", placeholder: (_a = hints[0]) != null ? _a : "" };
3856
3932
  }
3857
- });
3933
+ const [hintPrefix, ...words] = hints;
3934
+ const prefix2 = `${hintPrefix} `;
3935
+ const allWords = formatList(words, { type: "disjunction" });
3936
+ return { prefix: prefix2, words, allWords, placeholder: `${prefix2}${allWords}` };
3937
+ };
3858
3938
 
3859
- // ../renderers/src/hooks/useAvailabilityRules.ts
3860
- var useAvailabilityRules = (availability) => {
3861
- var _a, _b;
3862
- const { formatMessage } = (0, import_react_intl13.useIntl)();
3863
- const [focusedDate, setFocusedDate] = (0, import_react11.useState)(null);
3864
- const unavailableMessage = (_b = (_a = focusedDate ? getUnavailableDateReason(focusedDate, availability) : null) != null ? _a : availability == null ? void 0 : availability.message) != null ? _b : formatMessage(date_input_messages_default.unavailableDates);
3865
- const onDateSelect = ({ date }) => {
3866
- setFocusedDate((current) => (current == null ? void 0 : current.getTime()) === date.getTime() ? current : date);
3867
- };
3868
- return {
3869
- disabledRules: mapAvailabilityToDisabledRules(availability, unavailableMessage),
3939
+ // ../renderers/src/utils/prefersReducedMotion.ts
3940
+ var REDUCED_MOTION_QUERY = "(prefers-reduced-motion: reduce)";
3941
+ var prefersReducedMotion = () => {
3942
+ return typeof window !== "undefined" && window.matchMedia(REDUCED_MOTION_QUERY).matches;
3943
+ };
3944
+
3945
+ // ../renderers/src/CollectionRenderer/v2/SearchComponent.tsx
3946
+ var import_jsx_runtime47 = require("react/jsx-runtime");
3947
+ var SearchComponent2 = ({
3948
+ state,
3949
+ depth,
3950
+ fork,
3951
+ pop,
3952
+ features,
3953
+ control,
3954
+ tags,
3955
+ onSearchChange
3956
+ }) => {
3957
+ var _a, _b, _c;
3958
+ const { search } = state;
3959
+ const { formatMessage } = (0, import_react_intl13.useIntl)();
3960
+ const inputRef = (0, import_react12.useRef)(null);
3961
+ const { words, placeholder } = useSearchHints((_a = search == null ? void 0 : search.hints) != null ? _a : []);
3962
+ if (!search) {
3963
+ return;
3964
+ }
3965
+ const showAnimatedHint = !search.query && !prefersReducedMotion() && words.length > 1;
3966
+ const getAddon = () => {
3967
+ if (state.status.type === "loading") {
3968
+ return { content: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components24.ProcessIndicator, { size: "xs", "data-testid": "collection-search-loader" }) };
3969
+ }
3970
+ if (search.query) {
3971
+ return {
3972
+ interactive: true,
3973
+ content: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3974
+ import_components24.IconButton,
3975
+ {
3976
+ priority: "minimal",
3977
+ size: 24,
3978
+ "aria-label": formatMessage(collection_messages_default.clearTextLabel),
3979
+ onClick: () => {
3980
+ onSearchChange("");
3981
+ pop();
3982
+ },
3983
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_icons2.CrossCircleFill, {})
3984
+ }
3985
+ )
3986
+ };
3987
+ }
3988
+ return void 0;
3989
+ };
3990
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3991
+ FieldInput_default,
3992
+ {
3993
+ id: "search",
3994
+ description: "",
3995
+ validation: void 0,
3996
+ help: "",
3997
+ label: search.title,
3998
+ features,
3999
+ control,
4000
+ tags,
4001
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
4002
+ import_components24.InputGroup,
4003
+ {
4004
+ addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_icons2.Search, { size: 24 }), initialContentWidth: 24 },
4005
+ addonEnd: getAddon(),
4006
+ children: [
4007
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4008
+ import_components24.Input,
4009
+ {
4010
+ ref: inputRef,
4011
+ id: "search",
4012
+ name: "search",
4013
+ shape: "pill",
4014
+ "aria-label": (_b = search.title) != null ? _b : placeholder,
4015
+ placeholder: showAnimatedHint ? "" : placeholder,
4016
+ type: "text",
4017
+ value: search.query,
4018
+ onChange: ({ currentTarget: { value } }) => {
4019
+ if (depth === 0) {
4020
+ fork();
4021
+ }
4022
+ onSearchChange(value);
4023
+ if (value === "") {
4024
+ pop();
4025
+ }
4026
+ }
4027
+ }
4028
+ ),
4029
+ showAnimatedHint && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(AnimatedSearchHint, { hints: (_c = search.hints) != null ? _c : [] })
4030
+ ]
4031
+ }
4032
+ )
4033
+ }
4034
+ );
4035
+ };
4036
+
4037
+ // ../renderers/src/CollectionRenderer/components/CollapsibleContentComponent.tsx
4038
+ var import_react13 = require("react");
4039
+ var import_components25 = require("@transferwise/components");
4040
+ var import_react_intl14 = require("react-intl");
4041
+ var import_jsx_runtime48 = require("react/jsx-runtime");
4042
+ var CollapsibleContentComponent = (props) => {
4043
+ const { state, SectionHeader, Item } = props;
4044
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
4045
+ state.beforeSections,
4046
+ state.sections.map((section) => {
4047
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Section, { section, SectionHeader, Item }, section.id);
4048
+ }),
4049
+ state.afterSections
4050
+ ] });
4051
+ };
4052
+ var Section = ({ section, SectionHeader, Item }) => {
4053
+ const { formatMessage } = (0, import_react_intl14.useIntl)();
4054
+ const [expanded, setExpanded] = (0, import_react13.useState)(false);
4055
+ const itemIds = section.type === "items" ? section.items.map(({ id }) => id).join("") : section.id;
4056
+ const [prevItemIds, setPrevItemIds] = (0, import_react13.useState)(itemIds);
4057
+ if (itemIds !== prevItemIds) {
4058
+ setExpanded(false);
4059
+ setPrevItemIds(itemIds);
4060
+ }
4061
+ const showLoadMore = section.type === "items" && section.items.some((item) => {
4062
+ var _a;
4063
+ return (_a = item.tags) == null ? void 0 : _a.includes("hidden");
4064
+ });
4065
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
4066
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SectionHeader, __spreadValues({}, section)),
4067
+ section.type === "items" && section.items.filter((item) => {
4068
+ var _a;
4069
+ return expanded || !((_a = item.tags) == null ? void 0 : _a.includes("hidden"));
4070
+ }).map((item) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Item, __spreadValues({}, item), item.id)),
4071
+ section.type === "layout" && section.children,
4072
+ showLoadMore ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4073
+ import_components25.Button,
4074
+ {
4075
+ priority: "tertiary",
4076
+ onClick: () => {
4077
+ setExpanded(!expanded);
4078
+ },
4079
+ children: expanded ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { children: [
4080
+ formatMessage(collection_messages_default.showLessResultsButton),
4081
+ " "
4082
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { children: formatMessage(collection_messages_default.showMoreResultsButton, { count: section.items.length }) })
4083
+ }
4084
+ ) : void 0
4085
+ ] });
4086
+ };
4087
+
4088
+ // ../renderers/src/CollectionRenderer/v2/createContactsCollectionRenderer.tsx
4089
+ var import_jsx_runtime49 = require("react/jsx-runtime");
4090
+ var createContactsCollectionRenderer = (canRender, components) => {
4091
+ const componentsWithDefaults = __spreadValues({
4092
+ Search: SearchComponent2,
4093
+ AfterSearch: () => null,
4094
+ Filters: FiltersComponent2,
4095
+ Filter: FilterComponent2,
4096
+ Item: ItemComponent,
4097
+ SectionHeader: SectionHeaderComponent,
4098
+ Results: (props) => {
4099
+ const { depth } = props;
4100
+ return depth > 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(CollapsibleContentComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(VirtualisedContentComponent, __spreadValues({}, props));
4101
+ }
4102
+ }, components);
4103
+ return {
4104
+ canRenderType: "collection",
4105
+ canRender,
4106
+ render: (props) => {
4107
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(CollectionRendererComponent, __spreadValues(__spreadValues({}, props), componentsWithDefaults));
4108
+ }
4109
+ };
4110
+ };
4111
+
4112
+ // ../renderers/src/CollectionRenderer/v2/CollectionRendererV2.tsx
4113
+ var ContactsCollectionRenderer = createContactsCollectionRenderer(({ control }) => control === "contacts-collection-v2");
4114
+ var CollectionRendererV2_default = ContactsCollectionRenderer;
4115
+
4116
+ // ../renderers/src/ColumnsRenderer.tsx
4117
+ var import_classnames14 = __toESM(require_classnames());
4118
+
4119
+ // ../renderers/src/utils/useIsCollapsed.ts
4120
+ var import_react14 = require("react");
4121
+ var COLLAPSE_QUERY = "(max-width: 767.98px)";
4122
+ var supportsMatchMedia = () => typeof window !== "undefined" && !!window.matchMedia;
4123
+ var useIsCollapsed = () => {
4124
+ const [collapsed, setCollapsed] = (0, import_react14.useState)(
4125
+ () => supportsMatchMedia() && window.matchMedia(COLLAPSE_QUERY).matches
4126
+ );
4127
+ (0, import_react14.useEffect)(() => {
4128
+ if (supportsMatchMedia()) {
4129
+ const mql = window.matchMedia(COLLAPSE_QUERY);
4130
+ const update = () => setCollapsed(mql.matches);
4131
+ mql.addEventListener("change", update);
4132
+ return () => mql.removeEventListener("change", update);
4133
+ }
4134
+ return void 0;
4135
+ }, []);
4136
+ return collapsed;
4137
+ };
4138
+
4139
+ // ../renderers/src/ColumnsRenderer.tsx
4140
+ var import_jsx_runtime50 = require("react/jsx-runtime");
4141
+ var RIGHT_FIRST_STACKING = "right-first-stacking";
4142
+ var ColumnsRenderer = {
4143
+ canRenderType: "columns",
4144
+ render: ColumnsRendererComponent
4145
+ };
4146
+ function ColumnsRendererComponent(props) {
4147
+ var _a;
4148
+ const { bias, margin, startChildren, endChildren, tags } = props;
4149
+ const isCollapsed = useIsCollapsed();
4150
+ const reverse = isCollapsed && ((_a = tags == null ? void 0 : tags.includes(RIGHT_FIRST_STACKING)) != null ? _a : false);
4151
+ const startColumn = /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "df-columns-renderer-column", children: startChildren });
4152
+ const endColumn = /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "df-columns-renderer-column", children: endChildren });
4153
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
4154
+ "div",
4155
+ {
4156
+ className: (0, import_classnames14.default)(
4157
+ "df-columns-renderer-container",
4158
+ getMargin(margin),
4159
+ {
4160
+ "df-columns-renderer-bias-start": bias === "start",
4161
+ "df-columns-renderer-bias-end": bias === "end"
4162
+ },
4163
+ controlAndTagsToCSSClass(props)
4164
+ ),
4165
+ children: [
4166
+ reverse ? endColumn : startColumn,
4167
+ reverse ? startColumn : endColumn
4168
+ ]
4169
+ }
4170
+ );
4171
+ }
4172
+ var ColumnsRenderer_default = ColumnsRenderer;
4173
+
4174
+ // ../renderers/src/validators/type-validators.ts
4175
+ var isNumber = (value) => typeof value === "number" && !Number.isNaN(value);
4176
+
4177
+ // ../renderers/src/utils/value-utils.ts
4178
+ var dateStringToDateOrNull = (dateString) => {
4179
+ const match = dateString ? /^(\d{4})-(\d{2})-(\d{2})$/.exec(dateString) : null;
4180
+ if (!match) {
4181
+ return null;
4182
+ }
4183
+ const [, year, month, day] = match.map(Number);
4184
+ if (!isNumber(year) || !isNumber(month) || !isNumber(day)) {
4185
+ return null;
4186
+ }
4187
+ const date = /* @__PURE__ */ new Date(0);
4188
+ date.setHours(0, 0, 0, 0);
4189
+ date.setFullYear(year, month - 1, day);
4190
+ return date.getFullYear() === year && date.getMonth() === month - 1 && date.getDate() === day ? date : null;
4191
+ };
4192
+ var dateToDateString = (date) => {
4193
+ const d = new Date(date);
4194
+ const month = String(d.getMonth() + 1);
4195
+ const day = String(d.getDate());
4196
+ const year = d.getFullYear();
4197
+ const formattedMonth = month.length < 2 ? `0${month}` : month;
4198
+ const formattedDay = day.length < 2 ? `0${day}` : day;
4199
+ return [year, formattedMonth, formattedDay].join("-");
4200
+ };
4201
+
4202
+ // ../renderers/src/DateInputRenderer/DateLookupControl.tsx
4203
+ var import_components26 = require("@transferwise/components");
4204
+
4205
+ // ../renderers/src/hooks/useAvailabilityRules.ts
4206
+ var import_react15 = require("react");
4207
+ var import_react_intl16 = require("react-intl");
4208
+
4209
+ // ../renderers/src/messages/date-input.messages.ts
4210
+ var import_react_intl15 = require("react-intl");
4211
+ var date_input_messages_default = (0, import_react_intl15.defineMessages)({
4212
+ unavailableDates: {
4213
+ id: "df.wise.DateInput.unavailableDates",
4214
+ defaultMessage: "Some dates are unavailable.",
4215
+ description: "General explanation shown below a calendar containing unavailable dates"
4216
+ }
4217
+ });
4218
+
4219
+ // ../renderers/src/hooks/useAvailabilityRules.ts
4220
+ var useAvailabilityRules = (availability) => {
4221
+ var _a, _b;
4222
+ const { formatMessage } = (0, import_react_intl16.useIntl)();
4223
+ const [focusedDate, setFocusedDate] = (0, import_react15.useState)(null);
4224
+ const unavailableMessage = (_b = (_a = focusedDate ? getUnavailableDateReason(focusedDate, availability) : null) != null ? _a : availability == null ? void 0 : availability.message) != null ? _b : formatMessage(date_input_messages_default.unavailableDates);
4225
+ const onDateSelect = ({ date }) => {
4226
+ setFocusedDate((current) => (current == null ? void 0 : current.getTime()) === date.getTime() ? current : date);
4227
+ };
4228
+ return {
4229
+ disabledRules: mapAvailabilityToDisabledRules(availability, unavailableMessage),
3870
4230
  onDateSelect,
3871
4231
  resetFocusedDate: () => setFocusedDate(null)
3872
4232
  };
@@ -3912,7 +4272,7 @@ var matchesDateRule = (date, weekday, rule) => {
3912
4272
  var isDate = (date) => date !== null;
3913
4273
 
3914
4274
  // ../renderers/src/DateInputRenderer/DateLookupControl.tsx
3915
- var import_jsx_runtime46 = require("react/jsx-runtime");
4275
+ var import_jsx_runtime51 = require("react/jsx-runtime");
3916
4276
  var DateLookupControl = ({
3917
4277
  value,
3918
4278
  minimumDate,
@@ -3925,8 +4285,8 @@ var DateLookupControl = ({
3925
4285
  onFocus
3926
4286
  }) => {
3927
4287
  const { disabledRules, onDateSelect, resetFocusedDate } = useAvailabilityRules(availability);
3928
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3929
- import_components23.DateLookup,
4288
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4289
+ import_components26.DateLookup,
3930
4290
  {
3931
4291
  value: dateStringToDateOrNull(value),
3932
4292
  min: dateStringToDateOrNull(minimumDate),
@@ -3948,8 +4308,8 @@ var DateLookupControl = ({
3948
4308
  };
3949
4309
 
3950
4310
  // ../renderers/src/DateInputRenderer/CalendarControl.tsx
3951
- var import_components24 = require("@transferwise/components");
3952
- var import_jsx_runtime47 = require("react/jsx-runtime");
4311
+ var import_components27 = require("@transferwise/components");
4312
+ var import_jsx_runtime52 = require("react/jsx-runtime");
3953
4313
  var CalendarControl = ({
3954
4314
  id,
3955
4315
  title,
@@ -3972,7 +4332,7 @@ var CalendarControl = ({
3972
4332
  };
3973
4333
  return (
3974
4334
  // Wrapping in a <fieldset> to address some a11y gaps in the current inline Calendar component
3975
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4335
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3976
4336
  "fieldset",
3977
4337
  {
3978
4338
  id,
@@ -3989,8 +4349,8 @@ var CalendarControl = ({
3989
4349
  onBlur();
3990
4350
  }
3991
4351
  },
3992
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3993
- import_components24.Calendar,
4352
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4353
+ import_components27.Calendar,
3994
4354
  {
3995
4355
  value: dateStringToDateOrNull(value),
3996
4356
  min: dateStringToDateOrNull(minimumDate),
@@ -4008,12 +4368,12 @@ var CalendarControl = ({
4008
4368
  };
4009
4369
 
4010
4370
  // ../renderers/src/DateInputRenderer/DateInputControl.tsx
4011
- var import_components25 = require("@transferwise/components");
4012
- var import_jsx_runtime48 = require("react/jsx-runtime");
4371
+ var import_components28 = require("@transferwise/components");
4372
+ var import_jsx_runtime53 = require("react/jsx-runtime");
4013
4373
  var DateInputControl = (_a) => {
4014
4374
  var _b = _a, { autoComplete } = _b, props = __objRest(_b, ["autoComplete"]);
4015
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4016
- import_components25.DateInput,
4375
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4376
+ import_components28.DateInput,
4017
4377
  __spreadProps(__spreadValues({}, props), {
4018
4378
  dayAutoComplete: getAutocompleteString(autoComplete, "day"),
4019
4379
  yearAutoComplete: getAutocompleteString(autoComplete, "year")
@@ -4028,7 +4388,7 @@ var getAutocompleteString = (value, suffix) => {
4028
4388
  };
4029
4389
 
4030
4390
  // ../renderers/src/DateInputRenderer/DateInputRenderer.tsx
4031
- var import_jsx_runtime49 = require("react/jsx-runtime");
4391
+ var import_jsx_runtime54 = require("react/jsx-runtime");
4032
4392
  var DateInputRenderer = {
4033
4393
  canRenderType: "input-date",
4034
4394
  render: (props) => {
@@ -4062,7 +4422,7 @@ var DateInputRenderer = {
4062
4422
  }
4063
4423
  return DateInputControl;
4064
4424
  })();
4065
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4425
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4066
4426
  FieldInput_default,
4067
4427
  {
4068
4428
  id,
@@ -4075,7 +4435,7 @@ var DateInputRenderer = {
4075
4435
  features: props.features,
4076
4436
  control,
4077
4437
  tags: props.tags,
4078
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(UIComponent, __spreadValues({}, inputProps))
4438
+ children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(UIComponent, __spreadValues({}, inputProps))
4079
4439
  }
4080
4440
  );
4081
4441
  }
@@ -4083,16 +4443,16 @@ var DateInputRenderer = {
4083
4443
  var DateInputRenderer_default = DateInputRenderer;
4084
4444
 
4085
4445
  // ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
4086
- var import_components28 = require("@transferwise/components");
4446
+ var import_components31 = require("@transferwise/components");
4087
4447
 
4088
4448
  // ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
4089
- var import_components27 = require("@transferwise/components");
4090
- var import_react12 = require("react");
4091
- var import_react_intl17 = require("react-intl");
4449
+ var import_components30 = require("@transferwise/components");
4450
+ var import_react16 = require("react");
4451
+ var import_react_intl20 = require("react-intl");
4092
4452
 
4093
4453
  // ../renderers/src/messages/filter.messages.ts
4094
- var import_react_intl14 = require("react-intl");
4095
- var filter_messages_default = (0, import_react_intl14.defineMessages)({
4454
+ var import_react_intl17 = require("react-intl");
4455
+ var filter_messages_default = (0, import_react_intl17.defineMessages)({
4096
4456
  placeholder: {
4097
4457
  id: "df.wise.filter.placeholder",
4098
4458
  defaultMessage: "Start typing to search",
@@ -4158,12 +4518,12 @@ function filterAndSortItems(options, query) {
4158
4518
  var normalizeAndRemoveAccents = (text) => text.trim().toLowerCase().normalize("NFKD").replace(new RegExp("\\p{Diacritic}", "gu"), "");
4159
4519
 
4160
4520
  // ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
4161
- var import_components26 = require("@transferwise/components");
4162
- var import_react_intl16 = require("react-intl");
4521
+ var import_components29 = require("@transferwise/components");
4522
+ var import_react_intl19 = require("react-intl");
4163
4523
 
4164
4524
  // ../renderers/src/messages/group.messages.ts
4165
- var import_react_intl15 = require("react-intl");
4166
- var group_messages_default = (0, import_react_intl15.defineMessages)({
4525
+ var import_react_intl18 = require("react-intl");
4526
+ var group_messages_default = (0, import_react_intl18.defineMessages)({
4167
4527
  all: {
4168
4528
  id: "df.wise.group.all",
4169
4529
  defaultMessage: "All",
@@ -4197,19 +4557,19 @@ var getGroupsFromTags = (knownTags, items) => {
4197
4557
  };
4198
4558
 
4199
4559
  // ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
4200
- var import_jsx_runtime50 = require("react/jsx-runtime");
4560
+ var import_jsx_runtime55 = require("react/jsx-runtime");
4201
4561
  var groupingTags = Object.keys(group_messages_default).filter((key) => key !== "all");
4202
4562
  var isGroupedDecision = (options) => {
4203
4563
  return getGroupsFromTags(groupingTags, options).length > 0;
4204
4564
  };
4205
4565
  var GroupedDecisionList = (_a) => {
4206
4566
  var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
4207
- const { formatMessage } = (0, import_react_intl16.useIntl)();
4567
+ const { formatMessage } = (0, import_react_intl19.useIntl)();
4208
4568
  const { options } = rest;
4209
4569
  const itemsByTag = [...getGroupsFromTags(groupingTags, options), { tag: "all", items: options }];
4210
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_components26.Section, { children: [
4211
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4212
- import_components26.Header,
4570
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_jsx_runtime55.Fragment, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_components29.Section, { children: [
4571
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4572
+ import_components29.Header,
4213
4573
  {
4214
4574
  as: "h2",
4215
4575
  title: tag in group_messages_default ? formatMessage(group_messages_default[tag]) : tag
@@ -4220,28 +4580,28 @@ var GroupedDecisionList = (_a) => {
4220
4580
  };
4221
4581
 
4222
4582
  // ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
4223
- var import_classnames13 = __toESM(require_classnames());
4224
- var import_jsx_runtime51 = require("react/jsx-runtime");
4583
+ var import_classnames15 = __toESM(require_classnames());
4584
+ var import_jsx_runtime56 = require("react/jsx-runtime");
4225
4585
  var DecisionWrapper = (props) => {
4226
4586
  const { margin, control, title, tags } = props;
4227
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: (0, import_classnames13.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
4228
- title && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components27.Header, { as: "h2", title }),
4229
- control === "filtered" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(UnfilteredDecisionList, __spreadValues({}, props))
4587
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: (0, import_classnames15.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
4588
+ title && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components30.Header, { as: "h2", title }),
4589
+ control === "filtered" ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(UnfilteredDecisionList, __spreadValues({}, props))
4230
4590
  ] });
4231
4591
  };
4232
4592
  var UnfilteredDecisionList = (_a) => {
4233
4593
  var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
4234
- return isGroupedDecision(rest.options) ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList2 })) : renderDecisionList2(rest);
4594
+ return isGroupedDecision(rest.options) ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList2 })) : renderDecisionList2(rest);
4235
4595
  };
4236
4596
  var FilteredDecisionList = (props) => {
4237
- const { formatMessage } = (0, import_react_intl17.useIntl)();
4238
- const [query, setQuery] = (0, import_react12.useState)("");
4597
+ const { formatMessage } = (0, import_react_intl20.useIntl)();
4598
+ const [query, setQuery] = (0, import_react16.useState)("");
4239
4599
  const { control, options, renderDecisionList: renderDecisionList2 } = props;
4240
4600
  const filteredOptions = (query == null ? void 0 : query.length) > 0 ? filterAndSortItems(options, query) : options;
4241
4601
  const isGrouped = isGroupedDecision(options);
4242
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
4243
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4244
- import_components27.SearchInput,
4602
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
4603
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4604
+ import_components30.SearchInput,
4245
4605
  {
4246
4606
  placeholder: formatMessage(filter_messages_default.placeholder),
4247
4607
  value: query,
@@ -4252,25 +4612,25 @@ var FilteredDecisionList = (props) => {
4252
4612
  }
4253
4613
  }
4254
4614
  ),
4255
- isGrouped && query.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
4256
- query.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components27.Header, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
4615
+ isGrouped && query.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
4616
+ query.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components30.Header, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
4257
4617
  filteredOptions.length > 0 ? renderDecisionList2({
4258
4618
  control,
4259
4619
  className: query.length === 0 ? "m-t-3" : "",
4260
4620
  options: filteredOptions
4261
- }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { children: formatMessage(filter_messages_default.noResults) })
4621
+ }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { children: formatMessage(filter_messages_default.noResults) })
4262
4622
  ] })
4263
4623
  ] });
4264
4624
  };
4265
4625
 
4266
4626
  // ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
4267
- var import_jsx_runtime52 = require("react/jsx-runtime");
4627
+ var import_jsx_runtime57 = require("react/jsx-runtime");
4268
4628
  var DecisionRenderer = {
4269
4629
  canRenderType: "decision",
4270
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }))
4630
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }))
4271
4631
  };
4272
4632
  var renderDecisionList = ({ options, control }) => {
4273
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx_runtime52.Fragment, { children: options.map((_a) => {
4633
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_jsx_runtime57.Fragment, { children: options.map((_a) => {
4274
4634
  var _b = _a, { onClick } = _b, rest = __objRest(_b, ["onClick"]);
4275
4635
  const {
4276
4636
  description,
@@ -4283,8 +4643,8 @@ var renderDecisionList = ({ options, control }) => {
4283
4643
  supportingValues,
4284
4644
  tags
4285
4645
  } = rest;
4286
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4287
- import_components28.ListItem,
4646
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4647
+ import_components31.ListItem,
4288
4648
  {
4289
4649
  title: itemTitle,
4290
4650
  subtitle: description,
@@ -4295,7 +4655,7 @@ var renderDecisionList = ({ options, control }) => {
4295
4655
  media: getMedia(media, shouldUseAvatar(control, tags)),
4296
4656
  prompt: getInlineAlert(inlineAlert),
4297
4657
  additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
4298
- control: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components28.ListItem.Navigation, __spreadValues({}, getAnchorProps()))
4658
+ control: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components31.ListItem.Navigation, __spreadValues({}, getAnchorProps()))
4299
4659
  },
4300
4660
  JSON.stringify(rest)
4301
4661
  );
@@ -4304,9 +4664,9 @@ var renderDecisionList = ({ options, control }) => {
4304
4664
  var DecisionRenderer_default = DecisionRenderer;
4305
4665
 
4306
4666
  // ../renderers/src/DividerRenderer.tsx
4307
- var import_components29 = require("@transferwise/components");
4308
- var import_classnames14 = __toESM(require_classnames());
4309
- var import_jsx_runtime53 = require("react/jsx-runtime");
4667
+ var import_components32 = require("@transferwise/components");
4668
+ var import_classnames16 = __toESM(require_classnames());
4669
+ var import_jsx_runtime58 = require("react/jsx-runtime");
4310
4670
  var mapControlToLevel = (control) => {
4311
4671
  switch (control) {
4312
4672
  case "section":
@@ -4319,10 +4679,10 @@ var mapControlToLevel = (control) => {
4319
4679
  };
4320
4680
  var DividerRenderer = {
4321
4681
  canRenderType: "divider",
4322
- render: ({ margin, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4323
- import_components29.Divider,
4682
+ render: ({ margin, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4683
+ import_components32.Divider,
4324
4684
  {
4325
- className: (0, import_classnames14.default)(
4685
+ className: (0, import_classnames16.default)(
4326
4686
  "m-t-0",
4327
4687
  "d-block",
4328
4688
  getMargin(margin),
@@ -4335,11 +4695,11 @@ var DividerRenderer = {
4335
4695
  var DividerRenderer_default = DividerRenderer;
4336
4696
 
4337
4697
  // ../renderers/src/ExternalConfirmationRenderer.tsx
4338
- var import_components30 = require("@transferwise/components");
4698
+ var import_components33 = require("@transferwise/components");
4339
4699
 
4340
4700
  // ../renderers/src/messages/external-confirmation.messages.ts
4341
- var import_react_intl18 = require("react-intl");
4342
- var external_confirmation_messages_default = (0, import_react_intl18.defineMessages)({
4701
+ var import_react_intl21 = require("react-intl");
4702
+ var external_confirmation_messages_default = (0, import_react_intl21.defineMessages)({
4343
4703
  title: {
4344
4704
  id: "df.wise.ExternalConfirmation.title",
4345
4705
  defaultMessage: "Please confirm",
@@ -4363,9 +4723,9 @@ var external_confirmation_messages_default = (0, import_react_intl18.defineMessa
4363
4723
  });
4364
4724
 
4365
4725
  // ../renderers/src/ExternalConfirmationRenderer.tsx
4366
- var import_react_intl19 = require("react-intl");
4367
- var import_react13 = require("react");
4368
- var import_jsx_runtime54 = require("react/jsx-runtime");
4726
+ var import_react_intl22 = require("react-intl");
4727
+ var import_react17 = require("react");
4728
+ var import_jsx_runtime59 = require("react/jsx-runtime");
4369
4729
  var ExternalConfirmationRenderer = {
4370
4730
  canRenderType: "external-confirmation",
4371
4731
  render: ExternalConfirmationRendererComponent
@@ -4378,20 +4738,20 @@ function ExternalConfirmationRendererComponent({
4378
4738
  control,
4379
4739
  tags
4380
4740
  }) {
4381
- const { formatMessage } = (0, import_react_intl19.useIntl)();
4382
- (0, import_react13.useEffect)(() => {
4741
+ const { formatMessage } = (0, import_react_intl22.useIntl)();
4742
+ (0, import_react17.useEffect)(() => {
4383
4743
  open();
4384
4744
  }, []);
4385
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4386
- import_components30.Modal,
4745
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
4746
+ import_components33.Modal,
4387
4747
  {
4388
4748
  open: visible,
4389
4749
  title: formatMessage(external_confirmation_messages_default.title),
4390
- body: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
4391
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components30.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
4392
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
4393
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4394
- import_components30.Button,
4750
+ body: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
4751
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_components33.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
4752
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
4753
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
4754
+ import_components33.Button,
4395
4755
  {
4396
4756
  v2: true,
4397
4757
  block: true,
@@ -4404,7 +4764,7 @@ function ExternalConfirmationRendererComponent({
4404
4764
  children: formatMessage(external_confirmation_messages_default.open)
4405
4765
  }
4406
4766
  ),
4407
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components30.Button, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
4767
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_components33.Button, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
4408
4768
  ] }) })
4409
4769
  ] }),
4410
4770
  className: controlAndTagsToCSSClass({ control, tags }),
@@ -4422,51 +4782,51 @@ function getOrigin(url) {
4422
4782
  var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
4423
4783
 
4424
4784
  // ../renderers/src/FormRenderer.tsx
4425
- var import_classnames15 = __toESM(require_classnames());
4426
- var import_jsx_runtime55 = require("react/jsx-runtime");
4785
+ var import_classnames17 = __toESM(require_classnames());
4786
+ var import_jsx_runtime60 = require("react/jsx-runtime");
4427
4787
  var FormRenderer = {
4428
4788
  canRenderType: "form",
4429
- render: ({ children, margin, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: (0, import_classnames15.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children })
4789
+ render: ({ children, margin, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: (0, import_classnames17.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children })
4430
4790
  };
4431
4791
  var FormRenderer_default = FormRenderer;
4432
4792
 
4433
4793
  // ../renderers/src/FormSectionRenderer.tsx
4434
- var import_components31 = require("@transferwise/components");
4435
- var import_jsx_runtime56 = require("react/jsx-runtime");
4794
+ var import_components34 = require("@transferwise/components");
4795
+ var import_jsx_runtime61 = require("react/jsx-runtime");
4436
4796
  var FormSectionRenderer = {
4437
4797
  canRenderType: "form-section",
4438
- render: ({ title, description, children, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("fieldset", { className: controlAndTagsToCSSClass({ control, tags }), children: [
4439
- title && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4440
- import_components31.Header,
4798
+ render: ({ title, description, children, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("fieldset", { className: controlAndTagsToCSSClass({ control, tags }), children: [
4799
+ title && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
4800
+ import_components34.Header,
4441
4801
  {
4442
4802
  as: "h2",
4443
4803
  title
4444
4804
  }
4445
4805
  ),
4446
- description && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { children: description }),
4806
+ description && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { children: description }),
4447
4807
  children
4448
4808
  ] })
4449
4809
  };
4450
4810
  var FormSectionRenderer_default = FormSectionRenderer;
4451
4811
 
4452
4812
  // ../renderers/src/HeadingRenderer.tsx
4453
- var import_components32 = require("@transferwise/components");
4454
- var import_classnames16 = __toESM(require_classnames());
4455
- var import_jsx_runtime57 = require("react/jsx-runtime");
4813
+ var import_components35 = require("@transferwise/components");
4814
+ var import_classnames18 = __toESM(require_classnames());
4815
+ var import_jsx_runtime62 = require("react/jsx-runtime");
4456
4816
  var HeadingRenderer = {
4457
4817
  canRenderType: "heading",
4458
4818
  render: Heading
4459
4819
  };
4460
4820
  function Heading(props) {
4461
4821
  const { text, size, align, margin, control } = props;
4462
- const className = (0, import_classnames16.default)(
4822
+ const className = (0, import_classnames18.default)(
4463
4823
  getTextAlignmentAndMargin({ align, margin }),
4464
4824
  controlAndTagsToCSSClass(props)
4465
4825
  );
4466
- return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(StandardHeading, { size, text, className });
4826
+ return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(StandardHeading, { size, text, className });
4467
4827
  }
4468
4828
  function DisplayHeading({ size, text, className }) {
4469
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components32.Display, { type: getDisplayType(size), className, children: text });
4829
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components35.Display, { type: getDisplayType(size), className, children: text });
4470
4830
  }
4471
4831
  var getDisplayType = (size) => {
4472
4832
  switch (size) {
@@ -4482,7 +4842,7 @@ var getDisplayType = (size) => {
4482
4842
  }
4483
4843
  };
4484
4844
  function StandardHeading({ size, text, className }) {
4485
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components32.Title, { type: getTitleTypeBySize(size), className, children: text });
4845
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components35.Title, { type: getTitleTypeBySize(size), className, children: text });
4486
4846
  }
4487
4847
  var getTitleTypeBySize = (size) => {
4488
4848
  var _a;
@@ -4498,9 +4858,9 @@ var getTitleTypeBySize = (size) => {
4498
4858
  var HeadingRenderer_default = HeadingRenderer;
4499
4859
 
4500
4860
  // ../renderers/src/ImageRenderer/UrlImage.tsx
4501
- var import_components33 = require("@transferwise/components");
4502
- var import_classnames17 = __toESM(require_classnames());
4503
- var import_react14 = require("react");
4861
+ var import_components36 = require("@transferwise/components");
4862
+ var import_classnames19 = __toESM(require_classnames());
4863
+ var import_react18 = require("react");
4504
4864
 
4505
4865
  // ../renderers/src/utils/api-utils.ts
4506
4866
  function isRelativePath(url = "") {
@@ -4510,7 +4870,7 @@ function isRelativePath(url = "") {
4510
4870
  }
4511
4871
 
4512
4872
  // ../renderers/src/ImageRenderer/UrlImage.tsx
4513
- var import_jsx_runtime58 = require("react/jsx-runtime");
4873
+ var import_jsx_runtime63 = require("react/jsx-runtime");
4514
4874
  function UrlImage({
4515
4875
  accessibilityDescription,
4516
4876
  align,
@@ -4521,24 +4881,24 @@ function UrlImage({
4521
4881
  uri,
4522
4882
  httpClient
4523
4883
  }) {
4524
- const [imageSource, setImageSource] = (0, import_react14.useState)("");
4525
- (0, import_react14.useEffect)(() => {
4884
+ const [imageSource, setImageSource] = (0, import_react18.useState)("");
4885
+ (0, import_react18.useEffect)(() => {
4526
4886
  if (!uri.startsWith("urn:")) {
4527
4887
  void getImageSource(httpClient, uri).then(setImageSource);
4528
4888
  }
4529
4889
  }, [uri, httpClient]);
4530
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4890
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4531
4891
  "div",
4532
4892
  {
4533
- className: (0, import_classnames17.default)(
4893
+ className: (0, import_classnames19.default)(
4534
4894
  "df-image",
4535
4895
  align,
4536
4896
  size || "md",
4537
4897
  getMargin(margin),
4538
4898
  controlAndTagsToCSSClass({ control, tags })
4539
4899
  ),
4540
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4541
- import_components33.Image,
4900
+ children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4901
+ import_components36.Image,
4542
4902
  {
4543
4903
  className: "df-reserve-space",
4544
4904
  alt: accessibilityDescription != null ? accessibilityDescription : "",
@@ -4583,19 +4943,19 @@ var getImageSource = async (httpClient, imageUrl) => {
4583
4943
  };
4584
4944
 
4585
4945
  // ../renderers/src/ImageRenderer/ImageRenderer.tsx
4586
- var import_jsx_runtime59 = require("react/jsx-runtime");
4946
+ var import_jsx_runtime64 = require("react/jsx-runtime");
4587
4947
  var ImageRenderer = {
4588
4948
  canRenderType: "image",
4589
- render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(UrlImage, __spreadValues({}, props))
4949
+ render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(UrlImage, __spreadValues({}, props))
4590
4950
  };
4591
4951
 
4592
4952
  // ../renderers/src/ImageRenderer/index.tsx
4593
4953
  var ImageRenderer_default = ImageRenderer;
4594
4954
 
4595
4955
  // ../renderers/src/InstructionsRenderer.tsx
4596
- var import_components34 = require("@transferwise/components");
4597
- var import_classnames18 = __toESM(require_classnames());
4598
- var import_jsx_runtime60 = require("react/jsx-runtime");
4956
+ var import_components37 = require("@transferwise/components");
4957
+ var import_classnames20 = __toESM(require_classnames());
4958
+ var import_jsx_runtime65 = require("react/jsx-runtime");
4599
4959
  var doContext = ["positive", "neutral", "proposition"];
4600
4960
  var dontContext = ["warning", "negative"];
4601
4961
  var InstructionsRenderer = {
@@ -4603,16 +4963,16 @@ var InstructionsRenderer = {
4603
4963
  render: ({ items, margin, title, control, tags }) => {
4604
4964
  const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
4605
4965
  const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
4606
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: (0, import_classnames18.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
4607
- title ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components34.Header, { title }) : null,
4608
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components34.InstructionsList, { dos, donts })
4966
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: (0, import_classnames20.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
4967
+ title ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_components37.Header, { title }) : null,
4968
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_components37.InstructionsList, { dos, donts })
4609
4969
  ] });
4610
4970
  }
4611
4971
  };
4612
4972
  var InstructionsRenderer_default = InstructionsRenderer;
4613
4973
 
4614
4974
  // ../renderers/src/IntegerInputRenderer.tsx
4615
- var import_components35 = require("@transferwise/components");
4975
+ var import_components38 = require("@transferwise/components");
4616
4976
 
4617
4977
  // ../renderers/src/utils/input-utils.ts
4618
4978
  var onWheel = (event) => {
@@ -4637,7 +4997,7 @@ function pick(obj, ...keys) {
4637
4997
  }
4638
4998
 
4639
4999
  // ../renderers/src/IntegerInputRenderer.tsx
4640
- var import_jsx_runtime61 = require("react/jsx-runtime");
5000
+ var import_jsx_runtime66 = require("react/jsx-runtime");
4641
5001
  var IntegerInputRenderer = {
4642
5002
  canRenderType: "input-integer",
4643
5003
  render: (props) => {
@@ -4652,7 +5012,7 @@ var IntegerInputRenderer = {
4652
5012
  "maximum",
4653
5013
  "minimum"
4654
5014
  );
4655
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5015
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4656
5016
  FieldInput_default,
4657
5017
  {
4658
5018
  id,
@@ -4665,8 +5025,8 @@ var IntegerInputRenderer = {
4665
5025
  features: props.features,
4666
5026
  control: props.control,
4667
5027
  tags: props.tags,
4668
- children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_components35.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
4669
- import_components35.Input,
5028
+ children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_components38.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5029
+ import_components38.Input,
4670
5030
  __spreadValues({
4671
5031
  id,
4672
5032
  name: id,
@@ -4688,13 +5048,13 @@ var IntegerInputRenderer = {
4688
5048
  var IntegerInputRenderer_default = IntegerInputRenderer;
4689
5049
 
4690
5050
  // ../renderers/src/ListRenderer.tsx
4691
- var import_components37 = require("@transferwise/components");
4692
- var import_classnames19 = __toESM(require_classnames());
5051
+ var import_components40 = require("@transferwise/components");
5052
+ var import_classnames21 = __toESM(require_classnames());
4693
5053
 
4694
5054
  // ../renderers/src/components/Header.tsx
4695
- var import_components36 = require("@transferwise/components");
4696
- var import_jsx_runtime62 = require("react/jsx-runtime");
4697
- var Header = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components36.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) });
5055
+ var import_components39 = require("@transferwise/components");
5056
+ var import_jsx_runtime67 = require("react/jsx-runtime");
5057
+ var Header = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_components39.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) });
4698
5058
  var getHeaderAction = (callToAction) => {
4699
5059
  if (!callToAction) {
4700
5060
  return void 0;
@@ -4706,11 +5066,11 @@ var getHeaderAction = (callToAction) => {
4706
5066
  };
4707
5067
 
4708
5068
  // ../renderers/src/ListRenderer.tsx
4709
- var import_jsx_runtime63 = require("react/jsx-runtime");
5069
+ var import_jsx_runtime68 = require("react/jsx-runtime");
4710
5070
  var ListRenderer = {
4711
5071
  canRenderType: "list",
4712
- render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: (0, import_classnames19.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
4713
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Header, { title, callToAction }),
5072
+ render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: (0, import_classnames21.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
5073
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Header, { title, callToAction }),
4714
5074
  items.map((item) => {
4715
5075
  var _a, _b;
4716
5076
  const {
@@ -4727,8 +5087,8 @@ var ListRenderer = {
4727
5087
  ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
4728
5088
  fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
4729
5089
  };
4730
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4731
- import_components37.ListItem,
5090
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5091
+ import_components40.ListItem,
4732
5092
  {
4733
5093
  title: itemTitle,
4734
5094
  subtitle: description,
@@ -4747,17 +5107,17 @@ var ListRenderer = {
4747
5107
  var ListRenderer_default = ListRenderer;
4748
5108
 
4749
5109
  // ../renderers/src/LoadingIndicatorRenderer.tsx
4750
- var import_components38 = require("@transferwise/components");
4751
- var import_classnames20 = __toESM(require_classnames());
4752
- var import_jsx_runtime64 = require("react/jsx-runtime");
5110
+ var import_components41 = require("@transferwise/components");
5111
+ var import_classnames22 = __toESM(require_classnames());
5112
+ var import_jsx_runtime69 = require("react/jsx-runtime");
4753
5113
  var LoadingIndicatorRenderer = {
4754
5114
  canRenderType: "loading-indicator",
4755
- render: ({ size, margin, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4756
- import_components38.Loader,
5115
+ render: ({ size, margin, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
5116
+ import_components41.Loader,
4757
5117
  {
4758
5118
  size,
4759
5119
  classNames: {
4760
- "tw-loader": (0, import_classnames20.default)(
5120
+ "tw-loader": (0, import_classnames22.default)(
4761
5121
  "tw-loader",
4762
5122
  "m-x-auto",
4763
5123
  getMargin(margin),
@@ -4771,24 +5131,24 @@ var LoadingIndicatorRenderer = {
4771
5131
  var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
4772
5132
 
4773
5133
  // ../renderers/src/MarkdownRenderer.tsx
4774
- var import_components39 = require("@transferwise/components");
4775
- var import_classnames21 = __toESM(require_classnames());
4776
- var import_jsx_runtime65 = require("react/jsx-runtime");
5134
+ var import_components42 = require("@transferwise/components");
5135
+ var import_classnames23 = __toESM(require_classnames());
5136
+ var import_jsx_runtime70 = require("react/jsx-runtime");
4777
5137
  var MarkdownRenderer = {
4778
5138
  canRenderType: "markdown",
4779
5139
  render: ({ content, align, margin, size, control, tags }) => {
4780
5140
  const isLarge = !["xs", "sm"].includes(size);
4781
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5141
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4782
5142
  "div",
4783
5143
  {
4784
- className: (0, import_classnames21.default)(
5144
+ className: (0, import_classnames23.default)(
4785
5145
  getTextAlignmentAndMargin({ align, margin }),
4786
5146
  controlAndTagsToCSSClass({ control, tags })
4787
5147
  ),
4788
- children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4789
- import_components39.Markdown,
5148
+ children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5149
+ import_components42.Markdown,
4790
5150
  {
4791
- className: (0, import_classnames21.default)("df-markdown", {
5151
+ className: (0, import_classnames23.default)("df-markdown", {
4792
5152
  "np-text-body-large": isLarge,
4793
5153
  "np-text-body-default": !isLarge
4794
5154
  }),
@@ -4803,17 +5163,17 @@ var MarkdownRenderer = {
4803
5163
  var MarkdownRenderer_default = MarkdownRenderer;
4804
5164
 
4805
5165
  // ../renderers/src/MediaRenderer.tsx
4806
- var import_classnames22 = __toESM(require_classnames());
4807
- var import_jsx_runtime66 = require("react/jsx-runtime");
5166
+ var import_classnames24 = __toESM(require_classnames());
5167
+ var import_jsx_runtime71 = require("react/jsx-runtime");
4808
5168
  var MediaRenderer = {
4809
5169
  canRenderType: "media",
4810
5170
  render: (_a) => {
4811
5171
  var _b = _a, { media } = _b, rest = __objRest(_b, ["media"]);
4812
5172
  switch (media.type) {
4813
5173
  case "avatar":
4814
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(AvatarMediaRendererComponent, __spreadValues({ media }, rest));
5174
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(AvatarMediaRendererComponent, __spreadValues({ media }, rest));
4815
5175
  case "image":
4816
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ImageMediaRendererComponent, __spreadValues({ media }, rest));
5176
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ImageMediaRendererComponent, __spreadValues({ media }, rest));
4817
5177
  case "legacy":
4818
5178
  return null;
4819
5179
  }
@@ -4827,16 +5187,16 @@ var AvatarMediaRendererComponent = ({
4827
5187
  control,
4828
5188
  tags
4829
5189
  }) => {
4830
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5190
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
4831
5191
  "div",
4832
5192
  {
4833
- className: (0, import_classnames22.default)(
5193
+ className: (0, import_classnames24.default)(
4834
5194
  "df-media-layout-avatar",
4835
5195
  align,
4836
5196
  getMargin(margin),
4837
5197
  controlAndTagsToCSSClass({ control, tags })
4838
5198
  ),
4839
- children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Media, { media, size: mapAvatarMediaSize(size) })
5199
+ children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Media, { media, size: mapAvatarMediaSize(size) })
4840
5200
  }
4841
5201
  );
4842
5202
  };
@@ -4849,14 +5209,14 @@ var ImageMediaRendererComponent = (_a) => {
4849
5209
  "size"
4850
5210
  ]);
4851
5211
  var _a2, _b2;
4852
- return isUrnImage(media.uri) ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5212
+ return isUrnImage(media.uri) ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
4853
5213
  UrnImage,
4854
5214
  __spreadValues({
4855
5215
  uri: media.uri,
4856
5216
  size: (_a2 = media.size) != null ? _a2 : size,
4857
5217
  accessibilityDescription: media.accessibilityDescription
4858
5218
  }, rest)
4859
- ) : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5219
+ ) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
4860
5220
  UrlImage,
4861
5221
  __spreadValues({
4862
5222
  uri: media.uri,
@@ -4881,22 +5241,22 @@ var mapAvatarMediaSize = (size) => {
4881
5241
  };
4882
5242
 
4883
5243
  // ../renderers/src/ModalLayoutRenderer.tsx
4884
- var import_components40 = require("@transferwise/components");
4885
- var import_classnames23 = __toESM(require_classnames());
4886
- var import_react15 = require("react");
4887
- var import_jsx_runtime67 = require("react/jsx-runtime");
5244
+ var import_components43 = require("@transferwise/components");
5245
+ var import_classnames25 = __toESM(require_classnames());
5246
+ var import_react19 = require("react");
5247
+ var import_jsx_runtime72 = require("react/jsx-runtime");
4888
5248
  var ModalLayoutRenderer = {
4889
5249
  canRenderType: "modal-layout",
4890
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(DFModal, __spreadValues({}, props))
5250
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(DFModal, __spreadValues({}, props))
4891
5251
  };
4892
5252
  var ModalLayoutRenderer_default = ModalLayoutRenderer;
4893
5253
  function DFModal({ content, margin, trigger, control, tags }) {
4894
- const [visible, setVisible] = (0, import_react15.useState)(false);
5254
+ const [visible, setVisible] = (0, import_react19.useState)(false);
4895
5255
  const { children, title } = content;
4896
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: (0, import_classnames23.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
4897
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_components40.Button, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
4898
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
4899
- import_components40.Modal,
5256
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: (0, import_classnames25.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
5257
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_components43.Button, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
5258
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5259
+ import_components43.Modal,
4900
5260
  {
4901
5261
  scroll: "content",
4902
5262
  open: visible,
@@ -4910,13 +5270,13 @@ function DFModal({ content, margin, trigger, control, tags }) {
4910
5270
  }
4911
5271
 
4912
5272
  // ../renderers/src/ModalRenderer.tsx
4913
- var import_components41 = require("@transferwise/components");
4914
- var import_jsx_runtime68 = require("react/jsx-runtime");
5273
+ var import_components44 = require("@transferwise/components");
5274
+ var import_jsx_runtime73 = require("react/jsx-runtime");
4915
5275
  var ModalRenderer = {
4916
5276
  canRenderType: "modal",
4917
5277
  render: ({ title, children, open, onClose, control, tags }) => {
4918
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
4919
- import_components41.Modal,
5278
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
5279
+ import_components44.Modal,
4920
5280
  {
4921
5281
  open,
4922
5282
  title,
@@ -4929,10 +5289,10 @@ var ModalRenderer = {
4929
5289
  };
4930
5290
 
4931
5291
  // ../renderers/src/MoneyInputRenderer.tsx
4932
- var import_components42 = require("@transferwise/components");
4933
- var import_react16 = require("react");
4934
- var import_react_intl20 = require("react-intl");
4935
- var import_jsx_runtime69 = require("react/jsx-runtime");
5292
+ var import_components45 = require("@transferwise/components");
5293
+ var import_react20 = require("react");
5294
+ var import_react_intl23 = require("react-intl");
5295
+ var import_jsx_runtime74 = require("react/jsx-runtime");
4936
5296
  var groupingTags2 = Object.keys(group_messages_default).filter((key) => key !== "all");
4937
5297
  var MoneyInputRenderer = {
4938
5298
  canRenderType: "money-input",
@@ -4956,13 +5316,13 @@ function MoneyInputRendererComponent(props) {
4956
5316
  onAmountChange,
4957
5317
  onCurrencyChange
4958
5318
  } = props;
4959
- (0, import_react16.useEffect)(() => {
5319
+ (0, import_react20.useEffect)(() => {
4960
5320
  if (!isValidIndex(selectedCurrencyIndex, currencies.length)) {
4961
5321
  onCurrencyChange(0);
4962
5322
  }
4963
5323
  }, [selectedCurrencyIndex, onCurrencyChange, currencies.length]);
4964
- const { formatMessage } = (0, import_react_intl20.useIntl)();
4965
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
5324
+ const { formatMessage } = (0, import_react_intl23.useIntl)();
5325
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
4966
5326
  FieldInput_default,
4967
5327
  {
4968
5328
  id: uid,
@@ -4973,8 +5333,8 @@ function MoneyInputRendererComponent(props) {
4973
5333
  features,
4974
5334
  control,
4975
5335
  tags,
4976
- children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
4977
- import_components42.MoneyInput,
5336
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
5337
+ import_components45.MoneyInput,
4978
5338
  {
4979
5339
  amount: parseFloatOrNull(amountValue),
4980
5340
  searchPlaceholder: "",
@@ -5035,9 +5395,9 @@ function assertCurrencyCodeIsString(currencyCode) {
5035
5395
  }
5036
5396
 
5037
5397
  // ../renderers/src/MultiSelectInputRenderer/InlineComponent.tsx
5038
- var import_components43 = require("@transferwise/components");
5039
- var import_react17 = require("react");
5040
- var import_react_intl21 = require("react-intl");
5398
+ var import_components46 = require("@transferwise/components");
5399
+ var import_react21 = require("react");
5400
+ var import_react_intl24 = require("react-intl");
5041
5401
 
5042
5402
  // ../renderers/src/utils/items-with-index.ts
5043
5403
  var zipWithIndex = (items) => items.map((item, index) => __spreadProps(__spreadValues({}, item), {
@@ -5045,7 +5405,7 @@ var zipWithIndex = (items) => items.map((item, index) => __spreadProps(__spreadV
5045
5405
  }));
5046
5406
 
5047
5407
  // ../renderers/src/MultiSelectInputRenderer/InlineComponent.tsx
5048
- var import_jsx_runtime70 = require("react/jsx-runtime");
5408
+ var import_jsx_runtime75 = require("react/jsx-runtime");
5049
5409
  function InlineComponent(props) {
5050
5410
  const {
5051
5411
  id,
@@ -5062,13 +5422,13 @@ function InlineComponent(props) {
5062
5422
  onSelect
5063
5423
  } = props;
5064
5424
  const optionsWithIndex = zipWithIndex(options);
5065
- const [query, setQuery] = (0, import_react17.useState)("");
5066
- const { formatMessage } = (0, import_react_intl21.useIntl)();
5425
+ const [query, setQuery] = (0, import_react21.useState)("");
5426
+ const { formatMessage } = (0, import_react_intl24.useIntl)();
5067
5427
  const filtered = tags == null ? void 0 : tags.includes("filtered");
5068
5428
  const filteredOptions = query ? filterAndSortItems(optionsWithIndex, filtered ? query : "") : optionsWithIndex;
5069
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
5070
- filtered && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5071
- import_components43.SearchInput,
5429
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_jsx_runtime75.Fragment, { children: [
5430
+ filtered && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
5431
+ import_components46.SearchInput,
5072
5432
  {
5073
5433
  placeholder: formatMessage(filter_messages_default.placeholder),
5074
5434
  disabled,
@@ -5080,7 +5440,7 @@ function InlineComponent(props) {
5080
5440
  }
5081
5441
  }
5082
5442
  ),
5083
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5443
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
5084
5444
  FieldInput_default,
5085
5445
  {
5086
5446
  id,
@@ -5105,8 +5465,8 @@ function InlineComponent(props) {
5105
5465
  childrenProps
5106
5466
  } = option;
5107
5467
  const key = (_a = childrenProps == null ? void 0 : childrenProps.uid) != null ? _a : index;
5108
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5109
- import_components43.ListItem,
5468
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
5469
+ import_components46.ListItem,
5110
5470
  {
5111
5471
  title: itemTitle,
5112
5472
  subtitle,
@@ -5114,10 +5474,10 @@ function InlineComponent(props) {
5114
5474
  valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
5115
5475
  media: getMedia(media, false),
5116
5476
  prompt: getInlineAlert(inlineAlert),
5117
- additionalInfo: additionalText ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components43.ListItem.AdditionalInfo, { children: additionalText }) : void 0,
5477
+ additionalInfo: additionalText ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components46.ListItem.AdditionalInfo, { children: additionalText }) : void 0,
5118
5478
  disabled: disabled || optionDisabled,
5119
- control: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5120
- import_components43.ListItem.Checkbox,
5479
+ control: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
5480
+ import_components46.ListItem.Checkbox,
5121
5481
  {
5122
5482
  checked: selectedIndices.includes(index),
5123
5483
  onChange: (e) => {
@@ -5136,13 +5496,13 @@ function InlineComponent(props) {
5136
5496
  }
5137
5497
 
5138
5498
  // ../renderers/src/MultiSelectInputRenderer/DefaultComponent.tsx
5139
- var import_components44 = require("@transferwise/components");
5140
- var import_react18 = require("react");
5141
- var import_react_intl23 = require("react-intl");
5499
+ var import_components47 = require("@transferwise/components");
5500
+ var import_react22 = require("react");
5501
+ var import_react_intl26 = require("react-intl");
5142
5502
 
5143
5503
  // ../renderers/src/messages/multi-select.messages.ts
5144
- var import_react_intl22 = require("react-intl");
5145
- var multi_select_messages_default = (0, import_react_intl22.defineMessages)({
5504
+ var import_react_intl25 = require("react-intl");
5505
+ var multi_select_messages_default = (0, import_react_intl25.defineMessages)({
5146
5506
  summary: {
5147
5507
  id: "df.wise.MultiSelect.summary",
5148
5508
  defaultMessage: "{first} and {count} more",
@@ -5151,10 +5511,10 @@ var multi_select_messages_default = (0, import_react_intl22.defineMessages)({
5151
5511
  });
5152
5512
 
5153
5513
  // ../renderers/src/MultiSelectInputRenderer/DefaultComponent.tsx
5154
- var import_jsx_runtime71 = require("react/jsx-runtime");
5514
+ var import_jsx_runtime76 = require("react/jsx-runtime");
5155
5515
  function DefaultComponent(props) {
5156
- const { formatMessage } = (0, import_react_intl23.useIntl)();
5157
- const [stagedIndices, setStagedIndices] = (0, import_react18.useState)();
5516
+ const { formatMessage } = (0, import_react_intl26.useIntl)();
5517
+ const [stagedIndices, setStagedIndices] = (0, import_react22.useState)();
5158
5518
  const {
5159
5519
  id,
5160
5520
  autoComplete,
@@ -5195,12 +5555,12 @@ function DefaultComponent(props) {
5195
5555
  const contentProps = {
5196
5556
  title: option.title,
5197
5557
  description: option.description,
5198
- icon: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
5558
+ icon: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
5199
5559
  };
5200
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_components44.SelectInputOptionContent, __spreadValues({}, contentProps));
5560
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_components47.SelectInputOptionContent, __spreadValues({}, contentProps));
5201
5561
  };
5202
5562
  const extraProps = { autoComplete };
5203
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
5563
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
5204
5564
  FieldInput_default,
5205
5565
  {
5206
5566
  id,
@@ -5211,8 +5571,8 @@ function DefaultComponent(props) {
5211
5571
  features,
5212
5572
  control,
5213
5573
  tags,
5214
- children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
5215
- import_components44.SelectInput,
5574
+ children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
5575
+ import_components47.SelectInput,
5216
5576
  __spreadValues({
5217
5577
  id,
5218
5578
  items: options.map((option, index) => {
@@ -5250,8 +5610,8 @@ function DefaultComponent(props) {
5250
5610
  }
5251
5611
 
5252
5612
  // ../renderers/src/MultiSelectInputRenderer/InlineCheckboxComponent.tsx
5253
- var import_components45 = require("@transferwise/components");
5254
- var import_jsx_runtime72 = require("react/jsx-runtime");
5613
+ var import_components48 = require("@transferwise/components");
5614
+ var import_jsx_runtime77 = require("react/jsx-runtime");
5255
5615
  function InlineCheckboxComponent(props) {
5256
5616
  const {
5257
5617
  id,
@@ -5267,7 +5627,7 @@ function InlineCheckboxComponent(props) {
5267
5627
  tags,
5268
5628
  onSelect
5269
5629
  } = props;
5270
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5630
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
5271
5631
  FieldInput_default,
5272
5632
  {
5273
5633
  id,
@@ -5298,35 +5658,35 @@ function InlineCheckboxComponent(props) {
5298
5658
  onSelect(newSelectedIndices);
5299
5659
  }
5300
5660
  };
5301
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_components45.Checkbox, __spreadProps(__spreadValues({}, checkboxProps), { className: "m-t-1" }), key);
5661
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components48.Checkbox, __spreadProps(__spreadValues({}, checkboxProps), { className: "m-t-1" }), key);
5302
5662
  })
5303
5663
  }
5304
5664
  );
5305
5665
  }
5306
5666
 
5307
5667
  // ../renderers/src/MultiSelectInputRenderer/MultiSelectInputRenderer.tsx
5308
- var import_jsx_runtime73 = require("react/jsx-runtime");
5668
+ var import_jsx_runtime78 = require("react/jsx-runtime");
5309
5669
  var MultiSelectInputRenderer = {
5310
5670
  canRenderType: "input-multi-select",
5311
5671
  render: (props) => {
5312
5672
  switch (props.control) {
5313
5673
  case "inline":
5314
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(InlineComponent, __spreadValues({}, props));
5674
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(InlineComponent, __spreadValues({}, props));
5315
5675
  case "inline-checkbox-group":
5316
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(InlineCheckboxComponent, __spreadValues({}, props));
5676
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(InlineCheckboxComponent, __spreadValues({}, props));
5317
5677
  default:
5318
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(DefaultComponent, __spreadValues({}, props));
5678
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(DefaultComponent, __spreadValues({}, props));
5319
5679
  }
5320
5680
  }
5321
5681
  };
5322
5682
 
5323
5683
  // ../renderers/src/MultiUploadInputRenderer.tsx
5324
- var import_components47 = require("@transferwise/components");
5684
+ var import_components50 = require("@transferwise/components");
5325
5685
 
5326
5686
  // ../renderers/src/components/UploadFieldInput.tsx
5327
- var import_components46 = require("@transferwise/components");
5328
- var import_classnames24 = __toESM(require_classnames());
5329
- var import_jsx_runtime74 = require("react/jsx-runtime");
5687
+ var import_components49 = require("@transferwise/components");
5688
+ var import_classnames26 = __toESM(require_classnames());
5689
+ var import_jsx_runtime79 = require("react/jsx-runtime");
5330
5690
  function UploadFieldInput({
5331
5691
  id,
5332
5692
  children,
@@ -5338,14 +5698,14 @@ function UploadFieldInput({
5338
5698
  control,
5339
5699
  tags
5340
5700
  }) {
5341
- const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(LabelContentWithHelp, { text: label, help }) : label;
5701
+ const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(LabelContentWithHelp, { text: label, help }) : label;
5342
5702
  const descriptionId = description ? `${id}-description` : void 0;
5343
5703
  const { ref } = useScrollToError(validation, features);
5344
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
5704
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
5345
5705
  "div",
5346
5706
  {
5347
5707
  ref,
5348
- className: (0, import_classnames24.default)(
5708
+ className: (0, import_classnames26.default)(
5349
5709
  "form-group d-block",
5350
5710
  {
5351
5711
  "has-error": (validation == null ? void 0 : validation.status) === "invalid"
@@ -5353,9 +5713,9 @@ function UploadFieldInput({
5353
5713
  controlAndTagsToCSSClass({ control, tags })
5354
5714
  ),
5355
5715
  children: [
5356
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
5716
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
5357
5717
  children,
5358
- (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components46.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
5718
+ (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components49.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
5359
5719
  ]
5360
5720
  }
5361
5721
  );
@@ -5390,7 +5750,7 @@ var getSizeLimit = (maxSize) => {
5390
5750
  };
5391
5751
 
5392
5752
  // ../renderers/src/MultiUploadInputRenderer.tsx
5393
- var import_jsx_runtime75 = require("react/jsx-runtime");
5753
+ var import_jsx_runtime80 = require("react/jsx-runtime");
5394
5754
  var MultiUploadInputRenderer = {
5395
5755
  canRenderType: "input-upload-multi",
5396
5756
  render: (props) => {
@@ -5418,7 +5778,7 @@ var MultiUploadInputRenderer = {
5418
5778
  };
5419
5779
  const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
5420
5780
  const descriptionId = description ? `${id}-description` : void 0;
5421
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
5781
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
5422
5782
  UploadFieldInput_default,
5423
5783
  {
5424
5784
  id,
@@ -5429,8 +5789,8 @@ var MultiUploadInputRenderer = {
5429
5789
  features,
5430
5790
  control,
5431
5791
  tags,
5432
- children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
5433
- import_components47.UploadInput,
5792
+ children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
5793
+ import_components50.UploadInput,
5434
5794
  {
5435
5795
  id,
5436
5796
  "aria-describedby": descriptionId,
@@ -5439,7 +5799,7 @@ var MultiUploadInputRenderer = {
5439
5799
  files: value.map(({ id: fileId, file, validationState: fileValidationState }) => ({
5440
5800
  id: fileId,
5441
5801
  filename: file.name,
5442
- status: (fileValidationState == null ? void 0 : fileValidationState.status) === "invalid" ? import_components47.Status.FAILED : import_components47.Status.SUCCEEDED
5802
+ status: (fileValidationState == null ? void 0 : fileValidationState.status) === "invalid" ? import_components50.Status.FAILED : import_components50.Status.SUCCEEDED
5443
5803
  })),
5444
5804
  fileTypes: acceptsToFileTypes(accepts),
5445
5805
  maxFiles: maxItems,
@@ -5457,8 +5817,8 @@ var MultiUploadInputRenderer = {
5457
5817
  var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
5458
5818
 
5459
5819
  // ../renderers/src/NumberInputRenderer.tsx
5460
- var import_components48 = require("@transferwise/components");
5461
- var import_jsx_runtime76 = require("react/jsx-runtime");
5820
+ var import_components51 = require("@transferwise/components");
5821
+ var import_jsx_runtime81 = require("react/jsx-runtime");
5462
5822
  var NumberInputRenderer = {
5463
5823
  canRenderType: "input-number",
5464
5824
  render: (props) => {
@@ -5472,7 +5832,7 @@ var NumberInputRenderer = {
5472
5832
  "maximum",
5473
5833
  "minimum"
5474
5834
  );
5475
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
5835
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
5476
5836
  FieldInput_default,
5477
5837
  {
5478
5838
  id,
@@ -5485,8 +5845,8 @@ var NumberInputRenderer = {
5485
5845
  features: props.features,
5486
5846
  control: props.control,
5487
5847
  tags: props.tags,
5488
- children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_components48.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
5489
- import_components48.Input,
5848
+ children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components51.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
5849
+ import_components51.Input,
5490
5850
  __spreadValues({
5491
5851
  id,
5492
5852
  name: id,
@@ -5506,22 +5866,22 @@ var NumberInputRenderer = {
5506
5866
  var NumberInputRenderer_default = NumberInputRenderer;
5507
5867
 
5508
5868
  // ../renderers/src/ParagraphRenderer.tsx
5509
- var import_components50 = require("@transferwise/components");
5510
- var import_classnames25 = __toESM(require_classnames());
5511
- var import_react_intl25 = require("react-intl");
5869
+ var import_components53 = require("@transferwise/components");
5870
+ var import_classnames27 = __toESM(require_classnames());
5871
+ var import_react_intl28 = require("react-intl");
5512
5872
 
5513
5873
  // ../renderers/src/hooks/useSnackBarIfAvailable.ts
5514
- var import_components49 = require("@transferwise/components");
5515
- var import_react19 = require("react");
5874
+ var import_components52 = require("@transferwise/components");
5875
+ var import_react23 = require("react");
5516
5876
  function useSnackBarIfAvailable() {
5517
- const context = (0, import_react19.useContext)(import_components49.SnackbarContext);
5877
+ const context = (0, import_react23.useContext)(import_components52.SnackbarContext);
5518
5878
  return context ? context.createSnackbar : () => {
5519
5879
  };
5520
5880
  }
5521
5881
 
5522
5882
  // ../renderers/src/messages/paragraph.messages.ts
5523
- var import_react_intl24 = require("react-intl");
5524
- var paragraph_messages_default = (0, import_react_intl24.defineMessages)({
5883
+ var import_react_intl27 = require("react-intl");
5884
+ var paragraph_messages_default = (0, import_react_intl27.defineMessages)({
5525
5885
  copy: {
5526
5886
  id: "df.wise.DynamicParagraph.copy",
5527
5887
  defaultMessage: "Copy",
@@ -5535,18 +5895,18 @@ var paragraph_messages_default = (0, import_react_intl24.defineMessages)({
5535
5895
  });
5536
5896
 
5537
5897
  // ../renderers/src/ParagraphRenderer.tsx
5538
- var import_jsx_runtime77 = require("react/jsx-runtime");
5898
+ var import_jsx_runtime82 = require("react/jsx-runtime");
5539
5899
  var ParagraphRenderer = {
5540
5900
  canRenderType: "paragraph",
5541
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Paragraph, __spreadValues({}, props))
5901
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Paragraph, __spreadValues({}, props))
5542
5902
  };
5543
5903
  function Paragraph(props) {
5544
5904
  const { align, control, margin, size, text } = props;
5545
- const className = (0, import_classnames25.default)(
5905
+ const className = (0, import_classnames27.default)(
5546
5906
  getTextAlignmentAndMargin({ align, margin }),
5547
5907
  controlAndTagsToCSSClass(props)
5548
5908
  );
5549
- return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
5909
+ return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
5550
5910
  "p",
5551
5911
  {
5552
5912
  className: `${["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large"} ${className}`,
@@ -5559,41 +5919,41 @@ function CopyableParagraph({
5559
5919
  align,
5560
5920
  className
5561
5921
  }) {
5562
- const { formatMessage } = (0, import_react_intl25.useIntl)();
5922
+ const { formatMessage } = (0, import_react_intl28.useIntl)();
5563
5923
  const createSnackbar = useSnackBarIfAvailable();
5564
5924
  const copy = () => {
5565
5925
  navigator.clipboard.writeText(text).then(() => createSnackbar({ text: formatMessage(paragraph_messages_default.copied) })).catch(() => {
5566
5926
  });
5567
5927
  };
5568
5928
  const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
5569
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className, children: [
5570
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
5571
- import_components50.Input,
5929
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className, children: [
5930
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
5931
+ import_components53.Input,
5572
5932
  {
5573
5933
  type: "text",
5574
5934
  value: text,
5575
5935
  readOnly: true,
5576
- className: (0, import_classnames25.default)("text-ellipsis", inputAlignmentClasses)
5936
+ className: (0, import_classnames27.default)("text-ellipsis", inputAlignmentClasses)
5577
5937
  }
5578
5938
  ),
5579
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components50.Button, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
5939
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components53.Button, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
5580
5940
  ] });
5581
5941
  }
5582
5942
  var ParagraphRenderer_default = ParagraphRenderer;
5583
5943
 
5584
5944
  // ../renderers/src/ProgressRenderer.tsx
5585
- var import_components51 = require("@transferwise/components");
5586
- var import_classnames26 = __toESM(require_classnames());
5587
- var import_jsx_runtime78 = require("react/jsx-runtime");
5945
+ var import_components54 = require("@transferwise/components");
5946
+ var import_classnames28 = __toESM(require_classnames());
5947
+ var import_jsx_runtime83 = require("react/jsx-runtime");
5588
5948
  var ProgressRenderer = {
5589
5949
  canRenderType: "progress",
5590
5950
  render: ({ uid, title, help, progress, progressText, margin, description, control, tags }) => {
5591
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
5592
- import_components51.ProgressBar,
5951
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
5952
+ import_components54.ProgressBar,
5593
5953
  {
5594
5954
  id: uid,
5595
- className: (0, import_classnames26.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
5596
- title: title && help ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(LabelContentWithHelp, { text: title, help }) : title,
5955
+ className: (0, import_classnames28.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
5956
+ title: title && help ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(LabelContentWithHelp, { text: title, help }) : title,
5597
5957
  description,
5598
5958
  progress: {
5599
5959
  max: 1,
@@ -5606,15 +5966,15 @@ var ProgressRenderer = {
5606
5966
  };
5607
5967
 
5608
5968
  // ../renderers/src/RepeatableRenderer.tsx
5609
- var import_components52 = require("@transferwise/components");
5610
- var import_icons2 = require("@transferwise/icons");
5611
- var import_classnames27 = __toESM(require_classnames());
5612
- var import_react20 = require("react");
5613
- var import_react_intl27 = require("react-intl");
5969
+ var import_components55 = require("@transferwise/components");
5970
+ var import_icons3 = require("@transferwise/icons");
5971
+ var import_classnames29 = __toESM(require_classnames());
5972
+ var import_react24 = require("react");
5973
+ var import_react_intl30 = require("react-intl");
5614
5974
 
5615
5975
  // ../renderers/src/messages/repeatable.messages.ts
5616
- var import_react_intl26 = require("react-intl");
5617
- var repeatable_messages_default = (0, import_react_intl26.defineMessages)({
5976
+ var import_react_intl29 = require("react-intl");
5977
+ var repeatable_messages_default = (0, import_react_intl29.defineMessages)({
5618
5978
  addItemTitle: {
5619
5979
  id: "df.wise.ArraySchema.addItemTitle",
5620
5980
  defaultMessage: "Add Item",
@@ -5638,10 +5998,10 @@ var repeatable_messages_default = (0, import_react_intl26.defineMessages)({
5638
5998
  });
5639
5999
 
5640
6000
  // ../renderers/src/RepeatableRenderer.tsx
5641
- var import_jsx_runtime79 = require("react/jsx-runtime");
6001
+ var import_jsx_runtime84 = require("react/jsx-runtime");
5642
6002
  var RepeatableRenderer = {
5643
6003
  canRenderType: "repeatable",
5644
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Repeatable, __spreadValues({}, props))
6004
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Repeatable, __spreadValues({}, props))
5645
6005
  };
5646
6006
  function Repeatable(props) {
5647
6007
  const {
@@ -5658,8 +6018,8 @@ function Repeatable(props) {
5658
6018
  onSave,
5659
6019
  onRemove
5660
6020
  } = props;
5661
- const { formatMessage } = (0, import_react_intl27.useIntl)();
5662
- const [openModalType, setOpenModalType] = (0, import_react20.useState)(null);
6021
+ const { formatMessage } = (0, import_react_intl30.useIntl)();
6022
+ const [openModalType, setOpenModalType] = (0, import_react24.useState)(null);
5663
6023
  const { ref } = useScrollToError(validationState, features);
5664
6024
  const onAddItem = () => {
5665
6025
  onAdd();
@@ -5682,43 +6042,43 @@ function Repeatable(props) {
5682
6042
  const onCancelEdit = () => {
5683
6043
  setOpenModalType(null);
5684
6044
  };
5685
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
5686
- /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { ref, className: controlAndTagsToCSSClass(props), children: [
5687
- title && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components52.Header, { title }),
5688
- description && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { children: description }),
5689
- /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
6045
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_jsx_runtime84.Fragment, { children: [
6046
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { ref, className: controlAndTagsToCSSClass(props), children: [
6047
+ title && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components55.Header, { title }),
6048
+ description && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("p", { children: description }),
6049
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
5690
6050
  "div",
5691
6051
  {
5692
- className: (0, import_classnames27.default)("form-group", {
6052
+ className: (0, import_classnames29.default)("form-group", {
5693
6053
  "has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
5694
6054
  }),
5695
6055
  children: [
5696
- items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
5697
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
5698
- import_components52.NavigationOption,
6056
+ items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
6057
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6058
+ import_components55.NavigationOption,
5699
6059
  {
5700
- media: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_icons2.Plus, {}),
6060
+ media: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_icons3.Plus, {}),
5701
6061
  title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
5702
6062
  showMediaAtAllSizes: true,
5703
6063
  onClick: () => onAddItem()
5704
6064
  }
5705
6065
  ),
5706
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components52.InlineAlert, { type: "negative", children: validationState.message })
6066
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components55.InlineAlert, { type: "negative", children: validationState.message })
5707
6067
  ]
5708
6068
  }
5709
6069
  )
5710
6070
  ] }),
5711
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
5712
- import_components52.Modal,
6071
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6072
+ import_components55.Modal,
5713
6073
  {
5714
6074
  open: openModalType !== null,
5715
6075
  title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
5716
- body: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
5717
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "m-b-2", children: editableItem }),
5718
- /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { children: [
5719
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components52.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
5720
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
5721
- import_components52.Button,
6076
+ body: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_jsx_runtime84.Fragment, { children: [
6077
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "m-b-2", children: editableItem }),
6078
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { children: [
6079
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components55.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
6080
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6081
+ import_components55.Button,
5722
6082
  {
5723
6083
  v2: true,
5724
6084
  priority: "secondary",
@@ -5739,10 +6099,10 @@ function ItemSummaryOption({
5739
6099
  item,
5740
6100
  onClick
5741
6101
  }) {
5742
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
5743
- import_components52.NavigationOption,
6102
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6103
+ import_components55.NavigationOption,
5744
6104
  {
5745
- media: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(OptionMedia, { media: item.media, preferAvatar: false }),
6105
+ media: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(OptionMedia, { media: item.media, preferAvatar: false }),
5746
6106
  title: item.title,
5747
6107
  content: item.description,
5748
6108
  showMediaAtAllSizes: true,
@@ -5754,17 +6114,17 @@ function ItemSummaryOption({
5754
6114
  var RepeatableRenderer_default = RepeatableRenderer;
5755
6115
 
5756
6116
  // ../renderers/src/ReviewLegacyRenderer.tsx
5757
- var import_components53 = require("@transferwise/components");
5758
- var import_classnames28 = __toESM(require_classnames());
5759
- var import_jsx_runtime80 = require("react/jsx-runtime");
6117
+ var import_components56 = require("@transferwise/components");
6118
+ var import_classnames30 = __toESM(require_classnames());
6119
+ var import_jsx_runtime85 = require("react/jsx-runtime");
5760
6120
  var ReviewRenderer = {
5761
6121
  canRenderType: "review",
5762
6122
  render: ({ callToAction, control, fields, margin, title, trackEvent, tags }) => {
5763
6123
  const orientation = mapControlToDefinitionListLayout(control);
5764
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: (0, import_classnames28.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
5765
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Header, { title, callToAction }),
5766
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
5767
- import_components53.DefinitionList,
6124
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: (0, import_classnames30.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
6125
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Header, { title, callToAction }),
6126
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
6127
+ import_components56.DefinitionList,
5768
6128
  {
5769
6129
  layout: orientation,
5770
6130
  definitions: fields.map(
@@ -5801,21 +6161,21 @@ var mapControlToDefinitionListLayout = (control) => {
5801
6161
  };
5802
6162
  var getFieldLabel = (label, help, onClick) => {
5803
6163
  if (help) {
5804
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
6164
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
5805
6165
  label,
5806
6166
  " ",
5807
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Help_default, { help, onClick })
6167
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Help_default, { help, onClick })
5808
6168
  ] });
5809
6169
  }
5810
6170
  return label;
5811
6171
  };
5812
6172
 
5813
6173
  // ../renderers/src/ReviewRenderer.tsx
5814
- var import_components54 = require("@transferwise/components");
5815
- var import_icons3 = require("@transferwise/icons");
5816
- var import_classnames29 = __toESM(require_classnames());
5817
- var import_react_intl28 = require("react-intl");
5818
- var import_jsx_runtime81 = require("react/jsx-runtime");
6174
+ var import_components57 = require("@transferwise/components");
6175
+ var import_icons4 = require("@transferwise/icons");
6176
+ var import_classnames31 = __toESM(require_classnames());
6177
+ var import_react_intl31 = require("react-intl");
6178
+ var import_jsx_runtime86 = require("react/jsx-runtime");
5819
6179
  var IGNORED_CONTROLS = [
5820
6180
  "horizontal",
5821
6181
  "horizontal-end-aligned",
@@ -5825,7 +6185,7 @@ var IGNORED_CONTROLS = [
5825
6185
  var ReviewRenderer2 = {
5826
6186
  canRenderType: "review",
5827
6187
  canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
5828
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Review, __spreadValues({}, props))
6188
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Review, __spreadValues({}, props))
5829
6189
  };
5830
6190
  var Review = ({
5831
6191
  callToAction,
@@ -5836,9 +6196,9 @@ var Review = ({
5836
6196
  title,
5837
6197
  trackEvent
5838
6198
  }) => {
5839
- const intl = (0, import_react_intl28.useIntl)();
5840
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: (0, import_classnames29.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
5841
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Header, { title, callToAction }),
6199
+ const intl = (0, import_react_intl31.useIntl)();
6200
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: (0, import_classnames31.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
6201
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Header, { title, callToAction }),
5842
6202
  fields.map((field) => {
5843
6203
  var _a, _b, _c;
5844
6204
  const {
@@ -5856,8 +6216,8 @@ var Review = ({
5856
6216
  ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
5857
6217
  fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
5858
6218
  };
5859
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
5860
- import_components54.ListItem,
6219
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
6220
+ import_components57.ListItem,
5861
6221
  {
5862
6222
  title: value,
5863
6223
  subtitle: label,
@@ -5877,18 +6237,18 @@ var Review = ({
5877
6237
  ] });
5878
6238
  };
5879
6239
  var getHelpControl = (help, ariaLabel, onClick) => {
5880
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components54.Popover, { content: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components54.Markdown, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components54.ListItem.IconButton, { partiallyInteractive: true, "aria-label": ariaLabel, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_icons3.QuestionMarkCircle, {}) }) });
6240
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_components57.Popover, { content: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_components57.Markdown, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_components57.ListItem.IconButton, { partiallyInteractive: true, "aria-label": ariaLabel, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_icons4.QuestionMarkCircle, {}) }) });
5881
6241
  };
5882
6242
  var ReviewRenderer_default = ReviewRenderer2;
5883
6243
 
5884
6244
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
5885
- var import_components56 = require("@transferwise/components");
5886
- var import_react21 = require("react");
5887
- var import_react_intl31 = require("react-intl");
6245
+ var import_components59 = require("@transferwise/components");
6246
+ var import_react25 = require("react");
6247
+ var import_react_intl34 = require("react-intl");
5888
6248
 
5889
6249
  // ../renderers/src/messages/search.messages.ts
5890
- var import_react_intl29 = require("react-intl");
5891
- var search_messages_default = (0, import_react_intl29.defineMessages)({
6250
+ var import_react_intl32 = require("react-intl");
6251
+ var search_messages_default = (0, import_react_intl32.defineMessages)({
5892
6252
  loading: {
5893
6253
  id: "df.wise.SearchLayout.loading",
5894
6254
  defaultMessage: "Loading...",
@@ -5897,21 +6257,21 @@ var search_messages_default = (0, import_react_intl29.defineMessages)({
5897
6257
  });
5898
6258
 
5899
6259
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
5900
- var import_react_intl30 = require("react-intl");
5901
- var import_components55 = require("@transferwise/components");
5902
- var import_jsx_runtime82 = require("react/jsx-runtime");
6260
+ var import_react_intl33 = require("react-intl");
6261
+ var import_components58 = require("@transferwise/components");
6262
+ var import_jsx_runtime87 = require("react/jsx-runtime");
5903
6263
  function ErrorResult({ state }) {
5904
- const intl = (0, import_react_intl30.useIntl)();
5905
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("p", { className: "m-t-2", children: [
6264
+ const intl = (0, import_react_intl33.useIntl)();
6265
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("p", { className: "m-t-2", children: [
5906
6266
  intl.formatMessage(generic_error_messages_default.genericError),
5907
6267
  "\xA0",
5908
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components55.Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
6268
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_components58.Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
5909
6269
  ] });
5910
6270
  }
5911
6271
 
5912
6272
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
5913
- var import_icons4 = require("@transferwise/icons");
5914
- var import_jsx_runtime83 = require("react/jsx-runtime");
6273
+ var import_icons5 = require("@transferwise/icons");
6274
+ var import_jsx_runtime88 = require("react/jsx-runtime");
5915
6275
  function BlockSearchRendererComponent({
5916
6276
  id,
5917
6277
  hint,
@@ -5926,10 +6286,10 @@ function BlockSearchRendererComponent({
5926
6286
  trackEvent,
5927
6287
  onChange
5928
6288
  }) {
5929
- const [hasSearched, setHasSearched] = (0, import_react21.useState)(false);
5930
- const { formatMessage } = (0, import_react_intl31.useIntl)();
5931
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: getMargin(margin), children: [
5932
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
6289
+ const [hasSearched, setHasSearched] = (0, import_react25.useState)(false);
6290
+ const { formatMessage } = (0, import_react_intl34.useIntl)();
6291
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: getMargin(margin), children: [
6292
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
5933
6293
  FieldInput_default,
5934
6294
  {
5935
6295
  id,
@@ -5940,8 +6300,8 @@ function BlockSearchRendererComponent({
5940
6300
  features,
5941
6301
  control,
5942
6302
  tags,
5943
- children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_components56.InputGroup, { addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_icons4.Search, { size: 24 }) }, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
5944
- import_components56.Input,
6303
+ children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_components59.InputGroup, { addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_icons5.Search, { size: 24 }) }, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
6304
+ import_components59.Input,
5945
6305
  {
5946
6306
  id,
5947
6307
  name: id,
@@ -5960,7 +6320,7 @@ function BlockSearchRendererComponent({
5960
6320
  ) })
5961
6321
  }
5962
6322
  ),
5963
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(SearchResultContent, { state, trackEvent })
6323
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(SearchResultContent, { state, trackEvent })
5964
6324
  ] });
5965
6325
  }
5966
6326
  function SearchResultContent({
@@ -5969,39 +6329,39 @@ function SearchResultContent({
5969
6329
  }) {
5970
6330
  switch (state.type) {
5971
6331
  case "error":
5972
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(ErrorResult, { state });
6332
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(ErrorResult, { state });
5973
6333
  case "results":
5974
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(SearchResults, { state, trackEvent });
6334
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(SearchResults, { state, trackEvent });
5975
6335
  case "layout":
5976
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
6336
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
5977
6337
  " ",
5978
6338
  state.layout,
5979
6339
  " "
5980
6340
  ] });
5981
6341
  case "noResults":
5982
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(EmptySearchResult, { state });
6342
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(EmptySearchResult, { state });
5983
6343
  case "pending":
5984
6344
  default:
5985
6345
  return null;
5986
6346
  }
5987
6347
  }
5988
6348
  function EmptySearchResult({ state }) {
5989
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_components56.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
6349
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_components59.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
5990
6350
  }
5991
6351
  function SearchResults({
5992
6352
  state,
5993
6353
  trackEvent
5994
6354
  }) {
5995
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_components56.List, { children: state.results.map((result) => {
6355
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_components59.List, { children: state.results.map((result) => {
5996
6356
  const { media } = result;
5997
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
5998
- import_components56.ListItem,
6357
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
6358
+ import_components59.ListItem,
5999
6359
  {
6000
6360
  title: result.title,
6001
6361
  subtitle: result.description,
6002
- media: media ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(OptionMedia, { media, preferAvatar: false }) : void 0,
6003
- control: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
6004
- import_components56.ListItem.Navigation,
6362
+ media: media ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(OptionMedia, { media, preferAvatar: false }) : void 0,
6363
+ control: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
6364
+ import_components59.ListItem.Navigation,
6005
6365
  {
6006
6366
  onClick: () => {
6007
6367
  trackEvent("Search Result Selected", __spreadValues({
@@ -6019,11 +6379,11 @@ function SearchResults({
6019
6379
  var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
6020
6380
 
6021
6381
  // ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
6022
- var import_components57 = require("@transferwise/components");
6023
- var import_icons5 = require("@transferwise/icons");
6024
- var import_react22 = require("react");
6025
- var import_react_intl32 = require("react-intl");
6026
- var import_jsx_runtime84 = require("react/jsx-runtime");
6382
+ var import_components60 = require("@transferwise/components");
6383
+ var import_icons6 = require("@transferwise/icons");
6384
+ var import_react26 = require("react");
6385
+ var import_react_intl35 = require("react-intl");
6386
+ var import_jsx_runtime89 = require("react/jsx-runtime");
6027
6387
  function InlineSearchRenderer({
6028
6388
  id,
6029
6389
  hint,
@@ -6037,9 +6397,9 @@ function InlineSearchRenderer({
6037
6397
  onChange,
6038
6398
  trackEvent
6039
6399
  }) {
6040
- const [hasSearched, setHasSearched] = (0, import_react22.useState)(false);
6041
- const intl = (0, import_react_intl32.useIntl)();
6042
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6400
+ const [hasSearched, setHasSearched] = (0, import_react26.useState)(false);
6401
+ const intl = (0, import_react_intl35.useIntl)();
6402
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
6043
6403
  FieldInput_default,
6044
6404
  {
6045
6405
  id,
@@ -6050,8 +6410,8 @@ function InlineSearchRenderer({
6050
6410
  features,
6051
6411
  control,
6052
6412
  tags,
6053
- children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6054
- import_components57.Typeahead,
6413
+ children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
6414
+ import_components60.Typeahead,
6055
6415
  {
6056
6416
  id: "typeahead-input-id",
6057
6417
  intl,
@@ -6059,10 +6419,10 @@ function InlineSearchRenderer({
6059
6419
  size: "md",
6060
6420
  placeholder: hint,
6061
6421
  maxHeight: 100,
6062
- footer: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TypeaheadFooter, { state, isLoading }),
6422
+ footer: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(TypeaheadFooter, { state, isLoading }),
6063
6423
  multiple: false,
6064
6424
  clearable: false,
6065
- addon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_icons5.Search, { size: 24 }),
6425
+ addon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_icons6.Search, { size: 24 }),
6066
6426
  options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
6067
6427
  minQueryLength: 1,
6068
6428
  onChange: (values) => {
@@ -6099,34 +6459,34 @@ function mapResultToTypeaheadOption(result) {
6099
6459
  };
6100
6460
  }
6101
6461
  function TypeaheadFooter({ state, isLoading }) {
6102
- const { formatMessage } = (0, import_react_intl32.useIntl)();
6462
+ const { formatMessage } = (0, import_react_intl35.useIntl)();
6103
6463
  if (state.type === "layout") {
6104
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "m-x-1 m-y-1", children: state.layout });
6464
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "m-x-1 m-y-1", children: state.layout });
6105
6465
  }
6106
6466
  if (state.type === "noResults") {
6107
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components57.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
6467
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_components60.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
6108
6468
  }
6109
6469
  if (state.type === "error") {
6110
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ErrorResult, { state }) });
6470
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ErrorResult, { state }) });
6111
6471
  }
6112
6472
  if (state.type === "pending" || isLoading) {
6113
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
6473
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
6114
6474
  }
6115
6475
  return null;
6116
6476
  }
6117
6477
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
6118
6478
 
6119
6479
  // ../renderers/src/SearchRenderer/SearchRenderer.tsx
6120
- var import_jsx_runtime85 = require("react/jsx-runtime");
6480
+ var import_jsx_runtime90 = require("react/jsx-runtime");
6121
6481
  var SearchRenderer = {
6122
6482
  canRenderType: "search",
6123
- render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
6483
+ render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
6124
6484
  };
6125
6485
  var SearchRenderer_default = SearchRenderer;
6126
6486
 
6127
6487
  // ../renderers/src/SectionRenderer.tsx
6128
- var import_components58 = require("@transferwise/components");
6129
- var import_classnames30 = __toESM(require_classnames());
6488
+ var import_components61 = require("@transferwise/components");
6489
+ var import_classnames32 = __toESM(require_classnames());
6130
6490
 
6131
6491
  // ../renderers/src/utils/getHeaderAction.tsx
6132
6492
  var getHeaderAction2 = (callToAction) => {
@@ -6150,16 +6510,16 @@ var getHeaderAction2 = (callToAction) => {
6150
6510
  };
6151
6511
 
6152
6512
  // ../renderers/src/SectionRenderer.tsx
6153
- var import_jsx_runtime86 = require("react/jsx-runtime");
6513
+ var import_jsx_runtime91 = require("react/jsx-runtime");
6154
6514
  var SectionRenderer = {
6155
6515
  canRenderType: "section",
6156
6516
  render: ({ children, callToAction, margin, title, control, tags }) => {
6157
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
6517
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
6158
6518
  "section",
6159
6519
  {
6160
- className: (0, import_classnames30.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
6520
+ className: (0, import_classnames32.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
6161
6521
  children: [
6162
- (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_components58.Header, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
6522
+ (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_components61.Header, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
6163
6523
  children
6164
6524
  ]
6165
6525
  }
@@ -6169,8 +6529,8 @@ var SectionRenderer = {
6169
6529
  var SectionRenderer_default = SectionRenderer;
6170
6530
 
6171
6531
  // ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
6172
- var import_components59 = require("@transferwise/components");
6173
- var import_jsx_runtime87 = require("react/jsx-runtime");
6532
+ var import_components62 = require("@transferwise/components");
6533
+ var import_jsx_runtime92 = require("react/jsx-runtime");
6174
6534
  function RadioInputRendererComponent(props) {
6175
6535
  const {
6176
6536
  id,
@@ -6187,8 +6547,8 @@ function RadioInputRendererComponent(props) {
6187
6547
  tags,
6188
6548
  onSelect
6189
6549
  } = props;
6190
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
6191
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
6550
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
6551
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
6192
6552
  FieldInput_default,
6193
6553
  {
6194
6554
  id,
@@ -6199,8 +6559,8 @@ function RadioInputRendererComponent(props) {
6199
6559
  features,
6200
6560
  control,
6201
6561
  tags,
6202
- children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
6203
- import_components59.RadioGroup,
6562
+ children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
6563
+ import_components62.RadioGroup,
6204
6564
  {
6205
6565
  name: id,
6206
6566
  radios: options.map((option, index) => ({
@@ -6208,7 +6568,7 @@ function RadioInputRendererComponent(props) {
6208
6568
  value: index,
6209
6569
  secondary: option.description,
6210
6570
  disabled: option.disabled || disabled,
6211
- avatar: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
6571
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
6212
6572
  })),
6213
6573
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
6214
6574
  onChange: onSelect
@@ -6222,9 +6582,9 @@ function RadioInputRendererComponent(props) {
6222
6582
  }
6223
6583
 
6224
6584
  // ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
6225
- var import_components60 = require("@transferwise/components");
6226
- var import_react23 = require("react");
6227
- var import_jsx_runtime88 = require("react/jsx-runtime");
6585
+ var import_components63 = require("@transferwise/components");
6586
+ var import_react27 = require("react");
6587
+ var import_jsx_runtime93 = require("react/jsx-runtime");
6228
6588
  function TabInputRendererComponent(props) {
6229
6589
  const {
6230
6590
  id,
@@ -6241,13 +6601,13 @@ function TabInputRendererComponent(props) {
6241
6601
  tags,
6242
6602
  onSelect
6243
6603
  } = props;
6244
- (0, import_react23.useEffect)(() => {
6604
+ (0, import_react27.useEffect)(() => {
6245
6605
  if (!isValidIndex2(selectedIndex, options.length)) {
6246
6606
  onSelect(0);
6247
6607
  }
6248
6608
  }, [selectedIndex, onSelect, options.length]);
6249
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
6250
- /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
6609
+ return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
6610
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
6251
6611
  FieldInput_default,
6252
6612
  {
6253
6613
  id,
@@ -6258,8 +6618,8 @@ function TabInputRendererComponent(props) {
6258
6618
  features,
6259
6619
  control,
6260
6620
  tags,
6261
- children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
6262
- import_components60.Tabs,
6621
+ children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
6622
+ import_components63.Tabs,
6263
6623
  {
6264
6624
  name: id,
6265
6625
  selected: selectedIndex != null ? selectedIndex : 0,
@@ -6267,7 +6627,7 @@ function TabInputRendererComponent(props) {
6267
6627
  title: option.title,
6268
6628
  // if we pass null, we get some props-types console errors
6269
6629
  // eslint-disable-next-line react/jsx-no-useless-fragment
6270
- content: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_jsx_runtime88.Fragment, {}),
6630
+ content: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_jsx_runtime93.Fragment, {}),
6271
6631
  disabled: option.disabled || disabled
6272
6632
  })),
6273
6633
  onTabSelect: onSelect
@@ -6281,8 +6641,8 @@ function TabInputRendererComponent(props) {
6281
6641
  var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
6282
6642
 
6283
6643
  // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
6284
- var import_components61 = require("@transferwise/components");
6285
- var import_jsx_runtime89 = require("react/jsx-runtime");
6644
+ var import_components64 = require("@transferwise/components");
6645
+ var import_jsx_runtime94 = require("react/jsx-runtime");
6286
6646
  function SelectInputRendererComponent(props) {
6287
6647
  const {
6288
6648
  id,
@@ -6325,13 +6685,13 @@ function SelectInputRendererComponent(props) {
6325
6685
  } : {
6326
6686
  title: option.title,
6327
6687
  description: option.description,
6328
- icon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
6688
+ icon: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
6329
6689
  };
6330
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_components61.SelectInputOptionContent, __spreadValues({}, contentProps));
6690
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_components64.SelectInputOptionContent, __spreadValues({}, contentProps));
6331
6691
  };
6332
6692
  const extraProps = { autoComplete };
6333
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_jsx_runtime89.Fragment, { children: [
6334
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
6693
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_jsx_runtime94.Fragment, { children: [
6694
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
6335
6695
  FieldInput_default,
6336
6696
  {
6337
6697
  id,
@@ -6342,8 +6702,8 @@ function SelectInputRendererComponent(props) {
6342
6702
  features,
6343
6703
  control,
6344
6704
  tags,
6345
- children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
6346
- import_components61.SelectInput,
6705
+ children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
6706
+ import_components64.SelectInput,
6347
6707
  __spreadValues({
6348
6708
  name: id,
6349
6709
  placeholder,
@@ -6363,9 +6723,9 @@ function SelectInputRendererComponent(props) {
6363
6723
  }
6364
6724
 
6365
6725
  // ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
6366
- var import_react24 = require("react");
6367
- var import_components62 = require("@transferwise/components");
6368
- var import_jsx_runtime90 = require("react/jsx-runtime");
6726
+ var import_react28 = require("react");
6727
+ var import_components65 = require("@transferwise/components");
6728
+ var import_jsx_runtime95 = require("react/jsx-runtime");
6369
6729
  function SegmentedInputRendererComponent(props) {
6370
6730
  const {
6371
6731
  id,
@@ -6381,13 +6741,13 @@ function SegmentedInputRendererComponent(props) {
6381
6741
  tags,
6382
6742
  onSelect
6383
6743
  } = props;
6384
- (0, import_react24.useEffect)(() => {
6744
+ (0, import_react28.useEffect)(() => {
6385
6745
  if (!isValidIndex3(selectedIndex, options.length)) {
6386
6746
  onSelect(0);
6387
6747
  }
6388
6748
  }, [selectedIndex, onSelect, options.length]);
6389
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_jsx_runtime90.Fragment, { children: [
6390
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
6749
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
6750
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
6391
6751
  FieldInput_default,
6392
6752
  {
6393
6753
  id,
@@ -6398,8 +6758,8 @@ function SegmentedInputRendererComponent(props) {
6398
6758
  features,
6399
6759
  control,
6400
6760
  tags,
6401
- children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
6402
- import_components62.SegmentedControl,
6761
+ children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
6762
+ import_components65.SegmentedControl,
6403
6763
  {
6404
6764
  name: `${id}-segmented-control`,
6405
6765
  value: String(selectedIndex),
@@ -6415,14 +6775,14 @@ function SegmentedInputRendererComponent(props) {
6415
6775
  )
6416
6776
  }
6417
6777
  ),
6418
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { id: `${id}-children`, children })
6778
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { id: `${id}-children`, children })
6419
6779
  ] });
6420
6780
  }
6421
6781
  var isValidIndex3 = (index, options) => index !== null && index >= 0 && index < options;
6422
6782
 
6423
6783
  // ../renderers/src/SelectInputRenderer/RadioItemRendererComponent.tsx
6424
- var import_components63 = require("@transferwise/components");
6425
- var import_jsx_runtime91 = require("react/jsx-runtime");
6784
+ var import_components66 = require("@transferwise/components");
6785
+ var import_jsx_runtime96 = require("react/jsx-runtime");
6426
6786
  function RadioItemRendererComponent(props) {
6427
6787
  const {
6428
6788
  id,
@@ -6438,23 +6798,23 @@ function RadioItemRendererComponent(props) {
6438
6798
  onSelect
6439
6799
  } = props;
6440
6800
  const { ref } = useScrollToError(validationState, features);
6441
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { ref, className: controlAndTagsToCSSClass(props), children: [
6442
- rootTitle && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
6443
- import_components63.Header,
6801
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { ref, className: controlAndTagsToCSSClass(props), children: [
6802
+ rootTitle && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6803
+ import_components66.Header,
6444
6804
  {
6445
6805
  as: "h2",
6446
- title: help ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
6806
+ title: help ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
6447
6807
  }
6448
6808
  ),
6449
- rootDescription && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { children: rootDescription }),
6450
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_components63.List, { children: options.map(
6451
- ({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
6452
- import_components63.ListItem,
6809
+ rootDescription && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("p", { children: rootDescription }),
6810
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_components66.List, { children: options.map(
6811
+ ({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6812
+ import_components66.ListItem,
6453
6813
  __spreadValues({
6454
6814
  title,
6455
6815
  subtitle: description,
6456
- control: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
6457
- import_components63.ListItem.Radio,
6816
+ control: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6817
+ import_components66.ListItem.Radio,
6458
6818
  {
6459
6819
  name: title,
6460
6820
  checked: selectedIndex === index,
@@ -6469,51 +6829,51 @@ function RadioItemRendererComponent(props) {
6469
6829
  title
6470
6830
  )
6471
6831
  ) }, `${id}-${selectedIndex}`),
6472
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_components63.InlineAlert, { type: "negative", children: validationState.message }),
6832
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_components66.InlineAlert, { type: "negative", children: validationState.message }),
6473
6833
  children
6474
6834
  ] });
6475
6835
  }
6476
6836
 
6477
6837
  // ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
6478
- var import_jsx_runtime92 = require("react/jsx-runtime");
6838
+ var import_jsx_runtime97 = require("react/jsx-runtime");
6479
6839
  var SelectInputRenderer = {
6480
6840
  canRenderType: "input-select",
6481
6841
  render: (props) => {
6482
6842
  switch (props.control) {
6483
6843
  case "radio":
6484
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
6844
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
6485
6845
  case "radio-item":
6486
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(RadioItemRendererComponent, __spreadValues({}, props));
6846
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(RadioItemRendererComponent, __spreadValues({}, props));
6487
6847
  case "tab":
6488
- return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(TabInputRendererComponent, __spreadValues({}, props));
6848
+ return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(TabInputRendererComponent, __spreadValues({}, props));
6489
6849
  case "segmented":
6490
- return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
6850
+ return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
6491
6851
  case "select":
6492
6852
  default:
6493
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
6853
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
6494
6854
  }
6495
6855
  }
6496
6856
  };
6497
6857
  var SelectInputRenderer_default = SelectInputRenderer;
6498
6858
 
6499
6859
  // ../renderers/src/StatusListRenderer.tsx
6500
- var import_components64 = require("@transferwise/components");
6501
- var import_classnames31 = __toESM(require_classnames());
6502
- var import_jsx_runtime93 = require("react/jsx-runtime");
6860
+ var import_components67 = require("@transferwise/components");
6861
+ var import_classnames33 = __toESM(require_classnames());
6862
+ var import_jsx_runtime98 = require("react/jsx-runtime");
6503
6863
  var StatusListRenderer = {
6504
6864
  canRenderType: "status-list",
6505
- render: ({ margin, items, title, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: (0, import_classnames31.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
6506
- title ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_components64.Header, { title }) : null,
6865
+ render: ({ margin, items, title, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: (0, import_classnames33.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
6866
+ title ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_components67.Header, { title }) : null,
6507
6867
  items.map((item) => {
6508
6868
  const { callToAction, description, title: itemTitle } = item;
6509
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
6510
- import_components64.ListItem,
6869
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
6870
+ import_components67.ListItem,
6511
6871
  {
6512
6872
  title: itemTitle,
6513
6873
  subtitle: description,
6514
- media: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(StatusListItemMedia, __spreadValues({}, item)),
6515
- additionalInfo: callToAction ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
6516
- import_components64.ListItem.AdditionalInfo,
6874
+ media: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(StatusListItemMedia, __spreadValues({}, item)),
6875
+ additionalInfo: callToAction ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
6876
+ import_components67.ListItem.AdditionalInfo,
6517
6877
  {
6518
6878
  action: __spreadValues({
6519
6879
  label: callToAction.title
@@ -6531,10 +6891,10 @@ var StatusListItemMedia = ({ icon, status }) => {
6531
6891
  return void 0;
6532
6892
  }
6533
6893
  if ("name" in icon) {
6534
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_components64.AvatarView, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(DynamicIcon_default, { name: icon.name }) });
6894
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_components67.AvatarView, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(DynamicIcon_default, { name: icon.name }) });
6535
6895
  }
6536
6896
  if ("text" in icon) {
6537
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_components64.AvatarView, { badge: { status: mapStatus(status) }, children: icon.text });
6897
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_components67.AvatarView, { badge: { status: mapStatus(status) }, children: icon.text });
6538
6898
  }
6539
6899
  return void 0;
6540
6900
  };
@@ -6551,16 +6911,16 @@ var mapStatus = (status) => {
6551
6911
  var StatusListRenderer_default = StatusListRenderer;
6552
6912
 
6553
6913
  // ../renderers/src/step/SplashCelebrationStepRenderer.tsx
6554
- var import_classnames32 = __toESM(require_classnames());
6914
+ var import_classnames34 = __toESM(require_classnames());
6555
6915
 
6556
6916
  // ../renderers/src/utils/useCustomTheme.ts
6557
6917
  var import_components_theming = require("@wise/components-theming");
6558
- var import_react25 = require("react");
6918
+ var import_react29 = require("react");
6559
6919
  var ThemeRequiredEventName = "Theme Required";
6560
6920
  var useCustomTheme = (theme, trackEvent) => {
6561
6921
  const theming = (0, import_components_theming.useTheme)();
6562
- const previousTheme = (0, import_react25.useMemo)(() => theming.theme, []);
6563
- (0, import_react25.useEffect)(() => {
6922
+ const previousTheme = (0, import_react29.useMemo)(() => theming.theme, []);
6923
+ (0, import_react29.useEffect)(() => {
6564
6924
  theming.setTheme(theme);
6565
6925
  trackEvent(ThemeRequiredEventName, { theme });
6566
6926
  return theme !== previousTheme ? () => {
@@ -6572,13 +6932,13 @@ var useCustomTheme = (theme, trackEvent) => {
6572
6932
  };
6573
6933
 
6574
6934
  // ../renderers/src/step/StepHeader.tsx
6575
- var import_components65 = require("@transferwise/components");
6576
- var import_jsx_runtime94 = require("react/jsx-runtime");
6935
+ var import_components68 = require("@transferwise/components");
6936
+ var import_jsx_runtime99 = require("react/jsx-runtime");
6577
6937
  var StepHeader = ({ title, description, tags }) => {
6578
6938
  const { titleType, alignmentClassName } = getHeaderStyle(tags);
6579
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_jsx_runtime94.Fragment, { children: [
6580
- title ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_components65.Title, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
6581
- description ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
6939
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
6940
+ title ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_components68.Title, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
6941
+ description ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
6582
6942
  ] });
6583
6943
  };
6584
6944
  var getHeaderStyle = (tags) => {
@@ -6589,13 +6949,13 @@ var getHeaderStyle = (tags) => {
6589
6949
  };
6590
6950
 
6591
6951
  // ../renderers/src/step/topbar/BackButton.tsx
6592
- var import_components66 = require("@transferwise/components");
6593
- var import_icons6 = require("@transferwise/icons");
6594
- var import_react_intl34 = require("react-intl");
6952
+ var import_components69 = require("@transferwise/components");
6953
+ var import_icons7 = require("@transferwise/icons");
6954
+ var import_react_intl37 = require("react-intl");
6595
6955
 
6596
6956
  // ../renderers/src/messages/back.messages.ts
6597
- var import_react_intl33 = require("react-intl");
6598
- var back_messages_default = (0, import_react_intl33.defineMessages)({
6957
+ var import_react_intl36 = require("react-intl");
6958
+ var back_messages_default = (0, import_react_intl36.defineMessages)({
6599
6959
  back: {
6600
6960
  id: "df.wise.back.label",
6601
6961
  defaultMessage: "Back",
@@ -6604,31 +6964,31 @@ var back_messages_default = (0, import_react_intl33.defineMessages)({
6604
6964
  });
6605
6965
 
6606
6966
  // ../renderers/src/step/topbar/BackButton.tsx
6607
- var import_jsx_runtime95 = require("react/jsx-runtime");
6967
+ var import_jsx_runtime100 = require("react/jsx-runtime");
6608
6968
  function BackButton({ title, onClick }) {
6609
- const { formatMessage } = (0, import_react_intl34.useIntl)();
6610
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_components66.IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
6611
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
6612
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_icons6.ArrowLeft, {})
6969
+ const { formatMessage } = (0, import_react_intl37.useIntl)();
6970
+ return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(import_components69.IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
6971
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
6972
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_icons7.ArrowLeft, {})
6613
6973
  ] });
6614
6974
  }
6615
6975
 
6616
6976
  // ../renderers/src/step/topbar/Toolbar.tsx
6617
- var import_components67 = require("@transferwise/components");
6618
- var import_jsx_runtime96 = require("react/jsx-runtime");
6977
+ var import_components70 = require("@transferwise/components");
6978
+ var import_jsx_runtime101 = require("react/jsx-runtime");
6619
6979
  var Toolbar = ({ items }) => {
6620
- return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
6980
+ return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
6621
6981
  };
6622
6982
  function ToolbarButton(props) {
6623
- return prefersMedia(props.control) ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TextToolbarButton, __spreadValues({}, props));
6983
+ return prefersMedia(props.control) ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(TextToolbarButton, __spreadValues({}, props));
6624
6984
  }
6625
6985
  function MediaToolbarButton(props) {
6626
6986
  var _a;
6627
6987
  const { context, control, media, accessibilityDescription, disabled, onClick } = props;
6628
6988
  const priority = getIconButtonPriority(control);
6629
6989
  const type = getSentiment2(context);
6630
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
6631
- import_components67.IconButton,
6990
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
6991
+ import_components70.IconButton,
6632
6992
  {
6633
6993
  className: "df-toolbar-button",
6634
6994
  disabled,
@@ -6637,7 +6997,7 @@ function MediaToolbarButton(props) {
6637
6997
  type,
6638
6998
  onClick,
6639
6999
  children: [
6640
- accessibilityDescription ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "sr-only", children: accessibilityDescription }) : null,
7000
+ accessibilityDescription ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "sr-only", children: accessibilityDescription }) : null,
6641
7001
  media ? (_a = getAddonStartMedia(media)) == null ? void 0 : _a.value : null
6642
7002
  ]
6643
7003
  }
@@ -6648,8 +7008,8 @@ function TextToolbarButton(props) {
6648
7008
  const addonStart = media ? getAddonStartMedia(media) : void 0;
6649
7009
  const priority = getPriority2(control);
6650
7010
  const sentiment = getSentiment2(context);
6651
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6652
- import_components67.Button,
7011
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
7012
+ import_components70.Button,
6653
7013
  {
6654
7014
  v2: true,
6655
7015
  size: "sm",
@@ -6678,18 +7038,18 @@ var getIconButtonPriority = (control) => {
6678
7038
  };
6679
7039
 
6680
7040
  // ../renderers/src/step/topbar/TopBar.tsx
6681
- var import_jsx_runtime97 = require("react/jsx-runtime");
7041
+ var import_jsx_runtime102 = require("react/jsx-runtime");
6682
7042
  function TopBar({ back, toolbar, tags }) {
6683
7043
  const isBackAllowed = !(tags == null ? void 0 : tags.includes("non-dismissible"));
6684
7044
  const backCTA = isBackAllowed ? back : void 0;
6685
- return backCTA || toolbar ? /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "d-flex m-b-2", children: [
6686
- backCTA ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(BackButton, __spreadValues({}, backCTA)) : null,
6687
- toolbar ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Toolbar, __spreadValues({}, toolbar)) : null
7045
+ return backCTA || toolbar ? /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "d-flex m-b-2", children: [
7046
+ backCTA ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(BackButton, __spreadValues({}, backCTA)) : null,
7047
+ toolbar ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Toolbar, __spreadValues({}, toolbar)) : null
6688
7048
  ] }) : null;
6689
7049
  }
6690
7050
 
6691
7051
  // ../renderers/src/step/SplashCelebrationStepRenderer.tsx
6692
- var import_jsx_runtime98 = require("react/jsx-runtime");
7052
+ var import_jsx_runtime103 = require("react/jsx-runtime");
6693
7053
  var SplashCelebrationStepRenderer = {
6694
7054
  canRenderType: "step",
6695
7055
  canRender: ({ control }) => control === "splash-celebration",
@@ -6698,23 +7058,23 @@ var SplashCelebrationStepRenderer = {
6698
7058
  function SplashCelebrationStepRendererComponent(props) {
6699
7059
  const { back, title, description, toolbar, children, footer, control, tags, trackEvent } = props;
6700
7060
  useCustomTheme("forest-green", trackEvent);
6701
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
7061
+ return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
6702
7062
  "div",
6703
7063
  {
6704
- className: (0, import_classnames32.default)("splash-screen", "m-t-5", controlAndTagsToCSSClass({ control, tags })),
7064
+ className: (0, import_classnames34.default)("splash-screen", "m-t-5", controlAndTagsToCSSClass({ control, tags })),
6705
7065
  children: [
6706
- /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(TopBar, { back, toolbar, tags }),
6707
- title || description ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(StepHeader, { title, description, tags }) }) : void 0,
7066
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(TopBar, { back, toolbar, tags }),
7067
+ title || description ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(StepHeader, { title, description, tags }) }) : void 0,
6708
7068
  children,
6709
- /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(StepFooter, { footer, tags })
7069
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(StepFooter, { footer, tags })
6710
7070
  ]
6711
7071
  }
6712
7072
  );
6713
7073
  }
6714
7074
 
6715
7075
  // ../renderers/src/step/SplashStepRenderer.tsx
6716
- var import_classnames33 = __toESM(require_classnames());
6717
- var import_jsx_runtime99 = require("react/jsx-runtime");
7076
+ var import_classnames35 = __toESM(require_classnames());
7077
+ var import_jsx_runtime104 = require("react/jsx-runtime");
6718
7078
  var SplashStepRenderer = {
6719
7079
  canRenderType: "step",
6720
7080
  canRender: ({ control }) => control === "splash",
@@ -6722,70 +7082,70 @@ var SplashStepRenderer = {
6722
7082
  };
6723
7083
  function SplashStepRendererComponent(props) {
6724
7084
  const { back, title, description, toolbar, children, footer, control, tags } = props;
6725
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
7085
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
6726
7086
  "div",
6727
7087
  {
6728
- className: (0, import_classnames33.default)("splash-screen", "m-t-5", controlAndTagsToCSSClass({ control, tags })),
7088
+ className: (0, import_classnames35.default)("splash-screen", "m-t-5", controlAndTagsToCSSClass({ control, tags })),
6729
7089
  children: [
6730
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(TopBar, { back, toolbar, tags }),
6731
- title || description ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(StepHeader, { title, description, tags }) }) : void 0,
7090
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(TopBar, { back, toolbar, tags }),
7091
+ title || description ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(StepHeader, { title, description, tags }) }) : void 0,
6732
7092
  children,
6733
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(StepFooter, { footer, tags })
7093
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(StepFooter, { footer, tags })
6734
7094
  ]
6735
7095
  }
6736
7096
  );
6737
7097
  }
6738
7098
 
6739
7099
  // ../renderers/src/step/StepRenderer.tsx
6740
- var import_components68 = require("@transferwise/components");
6741
- var import_jsx_runtime100 = require("react/jsx-runtime");
7100
+ var import_components71 = require("@transferwise/components");
7101
+ var import_jsx_runtime105 = require("react/jsx-runtime");
6742
7102
  var StepRenderer = {
6743
7103
  canRenderType: "step",
6744
7104
  render: StepRendererComponent
6745
7105
  };
6746
7106
  function StepRendererComponent(props) {
6747
7107
  const { back, description, error, title, children, toolbar, footer, control, tags } = props;
6748
- return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: controlAndTagsToCSSClass({ control, tags }), children: [
6749
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(TopBar, { back, toolbar, tags }),
6750
- title || description ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(StepHeader, { title, description, tags }) }) : void 0,
6751
- error ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_components68.Alert, { type: "negative", className: "m-b-2", message: error }) : null,
7108
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: controlAndTagsToCSSClass({ control, tags }), children: [
7109
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(TopBar, { back, toolbar, tags }),
7110
+ title || description ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(StepHeader, { title, description, tags }) }) : void 0,
7111
+ error ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_components71.Alert, { type: "negative", className: "m-b-2", message: error }) : null,
6752
7112
  children,
6753
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(StepFooter, { footer, tags })
7113
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(StepFooter, { footer, tags })
6754
7114
  ] });
6755
7115
  }
6756
7116
 
6757
7117
  // ../renderers/src/TabsRenderer.tsx
6758
- var import_components69 = require("@transferwise/components");
6759
- var import_classnames34 = __toESM(require_classnames());
6760
- var import_react26 = require("react");
6761
- var import_jsx_runtime101 = require("react/jsx-runtime");
7118
+ var import_components72 = require("@transferwise/components");
7119
+ var import_classnames36 = __toESM(require_classnames());
7120
+ var import_react30 = require("react");
7121
+ var import_jsx_runtime106 = require("react/jsx-runtime");
6762
7122
  var TabsRenderer = {
6763
7123
  canRenderType: "tabs",
6764
7124
  render: (props) => {
6765
7125
  switch (props.control) {
6766
7126
  case "segmented":
6767
7127
  if (props.tabs.length > 3) {
6768
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(TabsRendererComponent, __spreadValues({}, props));
7128
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(TabsRendererComponent, __spreadValues({}, props));
6769
7129
  }
6770
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(SegmentedTabsRendererComponent, __spreadValues({}, props));
7130
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(SegmentedTabsRendererComponent, __spreadValues({}, props));
6771
7131
  case "chips":
6772
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(ChipsTabsRendererComponent, __spreadValues({}, props));
7132
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ChipsTabsRendererComponent, __spreadValues({}, props));
6773
7133
  default:
6774
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(TabsRendererComponent, __spreadValues({}, props));
7134
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(TabsRendererComponent, __spreadValues({}, props));
6775
7135
  }
6776
7136
  }
6777
7137
  };
6778
7138
  function TabsRendererComponent({ uid, margin, tabs, control, tags }) {
6779
- const [selectedIndex, setSelectedIndex] = (0, import_react26.useState)(0);
6780
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: (0, import_classnames34.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6781
- import_components69.Tabs,
7139
+ const [selectedIndex, setSelectedIndex] = (0, import_react30.useState)(0);
7140
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: (0, import_classnames36.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
7141
+ import_components72.Tabs,
6782
7142
  {
6783
7143
  name: uid,
6784
7144
  selected: selectedIndex != null ? selectedIndex : 0,
6785
7145
  tabs: tabs.map((option) => ({
6786
7146
  title: option.title,
6787
7147
  disabled: false,
6788
- content: /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "m-t-2", children: [
7148
+ content: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "m-t-2", children: [
6789
7149
  " ",
6790
7150
  option.children,
6791
7151
  " "
@@ -6797,10 +7157,10 @@ function TabsRendererComponent({ uid, margin, tabs, control, tags }) {
6797
7157
  }
6798
7158
  function SegmentedTabsRendererComponent({ uid, margin, tabs, control, tags }) {
6799
7159
  var _a;
6800
- const [selectedIndex, setSelectedIndex] = (0, import_react26.useState)(0);
6801
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: (0, import_classnames34.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
6802
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6803
- import_components69.SegmentedControl,
7160
+ const [selectedIndex, setSelectedIndex] = (0, import_react30.useState)(0);
7161
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: (0, import_classnames36.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
7162
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
7163
+ import_components72.SegmentedControl,
6804
7164
  {
6805
7165
  name: uid,
6806
7166
  value: String(selectedIndex),
@@ -6814,38 +7174,38 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs, control, tags }) {
6814
7174
  onChange: (value) => setSelectedIndex(Number(value))
6815
7175
  }
6816
7176
  ),
6817
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
7177
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
6818
7178
  ] });
6819
7179
  }
6820
7180
  function ChipsTabsRendererComponent({ margin, tabs, control, tags }) {
6821
7181
  var _a;
6822
- const [selectedIndex, setSelectedIndex] = (0, import_react26.useState)(0);
6823
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: (0, import_classnames34.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
6824
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "chips-container", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6825
- import_components69.Chips,
7182
+ const [selectedIndex, setSelectedIndex] = (0, import_react30.useState)(0);
7183
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: (0, import_classnames36.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
7184
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "chips-container", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
7185
+ import_components72.Chips,
6826
7186
  {
6827
7187
  chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
6828
7188
  selected: selectedIndex,
6829
7189
  onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
6830
7190
  }
6831
7191
  ) }),
6832
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
7192
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
6833
7193
  ] });
6834
7194
  }
6835
7195
 
6836
7196
  // ../renderers/src/TextInputRenderer.tsx
6837
- var import_components71 = require("@transferwise/components");
6838
- var import_react28 = require("react");
7197
+ var import_components74 = require("@transferwise/components");
7198
+ var import_react32 = require("react");
6839
7199
 
6840
7200
  // ../renderers/src/components/VariableTextInput.tsx
6841
- var import_components70 = require("@transferwise/components");
6842
- var import_icons7 = require("@transferwise/icons");
6843
- var import_react_intl36 = require("react-intl");
6844
- var import_react27 = require("react");
7201
+ var import_components73 = require("@transferwise/components");
7202
+ var import_icons8 = require("@transferwise/icons");
7203
+ var import_react_intl39 = require("react-intl");
7204
+ var import_react31 = require("react");
6845
7205
 
6846
7206
  // ../renderers/src/messages/ssn-input.messages.ts
6847
- var import_react_intl35 = require("react-intl");
6848
- var ssn_input_messages_default = (0, import_react_intl35.defineMessages)({
7207
+ var import_react_intl38 = require("react-intl");
7208
+ var ssn_input_messages_default = (0, import_react_intl38.defineMessages)({
6849
7209
  showValue: {
6850
7210
  id: "df.wise.ssnInput.showValue",
6851
7211
  defaultMessage: "Show value",
@@ -6930,7 +7290,7 @@ function getDisplayOffset(displayValue, rawOffset) {
6930
7290
  }
6931
7291
 
6932
7292
  // ../renderers/src/components/VariableTextInput.tsx
6933
- var import_jsx_runtime102 = require("react/jsx-runtime");
7293
+ var import_jsx_runtime107 = require("react/jsx-runtime");
6934
7294
  var commonKeys = [
6935
7295
  "autoComplete",
6936
7296
  "autoCapitalize",
@@ -6949,14 +7309,14 @@ function VariableTextInput(inputProps) {
6949
7309
  const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
6950
7310
  switch (control) {
6951
7311
  case "email":
6952
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
7312
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
6953
7313
  case "password":
6954
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
7314
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
6955
7315
  case "ssn-input":
6956
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(SsnInput, __spreadProps(__spreadValues({}, commonProps), { isVisible: isSsnVisible, onChange }));
7316
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(SsnInput, __spreadProps(__spreadValues({}, commonProps), { isVisible: isSsnVisible, onChange }));
6957
7317
  case "numeric": {
6958
7318
  const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
6959
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
7319
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
6960
7320
  TextInput,
6961
7321
  __spreadProps(__spreadValues({}, numericProps), {
6962
7322
  onChange: (newValue) => {
@@ -6967,9 +7327,9 @@ function VariableTextInput(inputProps) {
6967
7327
  );
6968
7328
  }
6969
7329
  case "phone-number":
6970
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_components70.PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
7330
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_components73.PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
6971
7331
  default: {
6972
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
7332
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
6973
7333
  }
6974
7334
  }
6975
7335
  }
@@ -6977,31 +7337,31 @@ function SsnInputToggle({
6977
7337
  isVisible,
6978
7338
  onClick
6979
7339
  }) {
6980
- const { formatMessage } = (0, import_react_intl36.useIntl)();
6981
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
6982
- import_components70.IconButton,
7340
+ const { formatMessage } = (0, import_react_intl39.useIntl)();
7341
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
7342
+ import_components73.IconButton,
6983
7343
  {
6984
7344
  priority: "minimal",
6985
7345
  size: 24,
6986
7346
  "aria-label": formatMessage(isVisible ? ssn_input_messages_default.hideValue : ssn_input_messages_default.showValue),
6987
7347
  "aria-pressed": isVisible,
6988
7348
  onClick,
6989
- children: isVisible ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_icons7.EyeShut, { size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_icons7.Eye, { size: 24 })
7349
+ children: isVisible ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_icons8.EyeShut, { size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_icons8.Eye, { size: 24 })
6990
7350
  }
6991
7351
  );
6992
7352
  }
6993
7353
  function TextInput(props) {
6994
7354
  const _a = props, { control, displayFormat, onChange, type } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange", "type"]);
6995
- const InputWithPattern = control === "textarea" ? import_components70.TextareaWithDisplayFormat : import_components70.InputWithDisplayFormat;
6996
- const InputWithoutPattern = control === "textarea" ? import_components70.TextArea : import_components70.Input;
6997
- return displayFormat ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { type, onChange: (e) => onChange(e.target.value) }));
7355
+ const InputWithPattern = control === "textarea" ? import_components73.TextareaWithDisplayFormat : import_components73.InputWithDisplayFormat;
7356
+ const InputWithoutPattern = control === "textarea" ? import_components73.TextArea : import_components73.Input;
7357
+ return displayFormat ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { type, onChange: (e) => onChange(e.target.value) }));
6998
7358
  }
6999
7359
  function SsnInput(props) {
7000
7360
  const _a = props, { displayFormat = "", isVisible = false, onChange, value = "" } = _a, commonProps = __objRest(_a, ["displayFormat", "isVisible", "onChange", "value"]);
7001
- const [editVersion, setEditVersion] = (0, import_react27.useState)(0);
7002
- const inputRef = (0, import_react27.useRef)(null);
7003
- const selection = (0, import_react27.useRef)({ start: 0, end: 0 });
7004
- const pendingCaret = (0, import_react27.useRef)(null);
7361
+ const [editVersion, setEditVersion] = (0, import_react31.useState)(0);
7362
+ const inputRef = (0, import_react31.useRef)(null);
7363
+ const selection = (0, import_react31.useRef)({ start: 0, end: 0 });
7364
+ const pendingCaret = (0, import_react31.useRef)(null);
7005
7365
  const rawValue = value.replace(/\D/g, "");
7006
7366
  const formattedValue = formatSsnValue(rawValue, displayFormat, isVisible);
7007
7367
  const scheduleCaret = (rawOffset) => {
@@ -7021,7 +7381,7 @@ function SsnInput(props) {
7021
7381
  scheduleCaret(result.caret);
7022
7382
  onChange(result.value);
7023
7383
  };
7024
- (0, import_react27.useLayoutEffect)(() => {
7384
+ (0, import_react31.useLayoutEffect)(() => {
7025
7385
  if (pendingCaret.current === null || !inputRef.current) {
7026
7386
  return;
7027
7387
  }
@@ -7031,7 +7391,7 @@ function SsnInput(props) {
7031
7391
  );
7032
7392
  pendingCaret.current = null;
7033
7393
  }, [editVersion, formattedValue, rawValue]);
7034
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
7394
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
7035
7395
  "input",
7036
7396
  __spreadProps(__spreadValues({
7037
7397
  ref: inputRef
@@ -7094,13 +7454,13 @@ function SsnInput(props) {
7094
7454
  }
7095
7455
 
7096
7456
  // ../renderers/src/TextInputRenderer.tsx
7097
- var import_jsx_runtime103 = require("react/jsx-runtime");
7457
+ var import_jsx_runtime108 = require("react/jsx-runtime");
7098
7458
  var TextInputRenderer = {
7099
7459
  canRenderType: "input-text",
7100
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(TextInputRendererComponent, __spreadValues({}, props))
7460
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(TextInputRendererComponent, __spreadValues({}, props))
7101
7461
  };
7102
7462
  function TextInputRendererComponent(props) {
7103
- const [isSsnVisible, setIsSsnVisible] = (0, import_react28.useState)(false);
7463
+ const [isSsnVisible, setIsSsnVisible] = (0, import_react32.useState)(false);
7104
7464
  const _a = props, {
7105
7465
  id,
7106
7466
  title,
@@ -7132,7 +7492,7 @@ function TextInputRendererComponent(props) {
7132
7492
  }
7133
7493
  }
7134
7494
  });
7135
- return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
7495
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
7136
7496
  FieldInput_default,
7137
7497
  {
7138
7498
  id,
@@ -7145,13 +7505,13 @@ function TextInputRendererComponent(props) {
7145
7505
  features: props.features,
7146
7506
  control: props.control,
7147
7507
  tags: props.tags,
7148
- children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
7149
- import_components71.InputGroup,
7508
+ children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
7509
+ import_components74.InputGroup,
7150
7510
  {
7151
7511
  addonStart: getInputGroupAddonStart(media),
7152
7512
  addonEnd: isSsnInput ? {
7153
7513
  interactive: true,
7154
- content: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
7514
+ content: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
7155
7515
  SsnInputToggle,
7156
7516
  {
7157
7517
  isVisible: isSsnVisible,
@@ -7159,7 +7519,7 @@ function TextInputRendererComponent(props) {
7159
7519
  }
7160
7520
  )
7161
7521
  } : void 0,
7162
- children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(VariableTextInput, __spreadValues({}, inputProps))
7522
+ children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(VariableTextInput, __spreadValues({}, inputProps))
7163
7523
  }
7164
7524
  )
7165
7525
  }
@@ -7168,23 +7528,23 @@ function TextInputRendererComponent(props) {
7168
7528
  var TextInputRenderer_default = TextInputRenderer;
7169
7529
 
7170
7530
  // ../renderers/src/UpdatableRenderer.tsx
7171
- var import_classnames35 = __toESM(require_classnames());
7172
- var import_jsx_runtime104 = require("react/jsx-runtime");
7531
+ var import_classnames37 = __toESM(require_classnames());
7532
+ var import_jsx_runtime109 = require("react/jsx-runtime");
7173
7533
  var UpdatableRenderer = {
7174
7534
  canRenderType: "updatable",
7175
7535
  render: ({ children, control, margin, tags }) => {
7176
- return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: (0, import_classnames35.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children });
7536
+ return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: (0, import_classnames37.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children });
7177
7537
  }
7178
7538
  };
7179
7539
 
7180
7540
  // ../renderers/src/UploadInputRenderer.tsx
7181
- var import_components72 = require("@transferwise/components");
7541
+ var import_components75 = require("@transferwise/components");
7182
7542
 
7183
7543
  // ../renderers/src/utils/getRandomId.ts
7184
7544
  var getRandomId = () => Math.random().toString(36).substring(2);
7185
7545
 
7186
7546
  // ../renderers/src/UploadInputRenderer.tsx
7187
- var import_jsx_runtime105 = require("react/jsx-runtime");
7547
+ var import_jsx_runtime110 = require("react/jsx-runtime");
7188
7548
  var UploadInputRenderer = {
7189
7549
  canRenderType: "input-upload",
7190
7550
  render: (props) => {
@@ -7213,7 +7573,7 @@ var UploadInputRenderer = {
7213
7573
  };
7214
7574
  return (
7215
7575
  // We don't pass help here as there is no sensible place to display it
7216
- /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
7576
+ /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
7217
7577
  UploadFieldInput_default,
7218
7578
  {
7219
7579
  id,
@@ -7223,8 +7583,8 @@ var UploadInputRenderer = {
7223
7583
  features,
7224
7584
  control,
7225
7585
  tags,
7226
- children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
7227
- import_components72.UploadInput,
7586
+ children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
7587
+ import_components75.UploadInput,
7228
7588
  {
7229
7589
  id,
7230
7590
  description,
@@ -7234,7 +7594,7 @@ var UploadInputRenderer = {
7234
7594
  {
7235
7595
  id: "my-file",
7236
7596
  filename: value.name,
7237
- status: (validationState == null ? void 0 : validationState.status) === "invalid" ? import_components72.Status.FAILED : import_components72.Status.SUCCEEDED
7597
+ status: (validationState == null ? void 0 : validationState.status) === "invalid" ? import_components75.Status.FAILED : import_components75.Status.SUCCEEDED
7238
7598
  }
7239
7599
  ] : void 0,
7240
7600
  fileTypes: acceptsToFileTypes(accepts),
@@ -7293,7 +7653,7 @@ var LargeUploadRenderer = {
7293
7653
  };
7294
7654
  const filetypes = acceptsToFileTypes(accepts);
7295
7655
  const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
7296
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
7656
+ return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
7297
7657
  FieldInput_default,
7298
7658
  {
7299
7659
  id,
@@ -7304,8 +7664,8 @@ var LargeUploadRenderer = {
7304
7664
  features,
7305
7665
  control,
7306
7666
  tags,
7307
- children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
7308
- import_components72.Upload,
7667
+ children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
7668
+ import_components75.Upload,
7309
7669
  __spreadProps(__spreadValues({}, uploadProps), {
7310
7670
  usAccept,
7311
7671
  usDisabled: disabled,
@@ -7320,21 +7680,21 @@ var LargeUploadRenderer = {
7320
7680
  };
7321
7681
 
7322
7682
  // ../renderers/src/UpsellRenderer.tsx
7323
- var import_components73 = require("@transferwise/components");
7324
- var import_classnames36 = __toESM(require_classnames());
7325
- var import_react29 = require("react");
7326
- var import_jsx_runtime106 = require("react/jsx-runtime");
7683
+ var import_components76 = require("@transferwise/components");
7684
+ var import_classnames38 = __toESM(require_classnames());
7685
+ var import_react33 = require("react");
7686
+ var import_jsx_runtime111 = require("react/jsx-runtime");
7327
7687
  var UpsellRenderer = {
7328
7688
  canRenderType: "upsell",
7329
7689
  render: UpsellRendererComponent
7330
7690
  };
7331
7691
  function UpsellRendererComponent(props) {
7332
7692
  const { text, callToAction, media, margin, onDismiss, control, tags } = props;
7333
- const [isVisible, setIsVisible] = (0, import_react29.useState)(true);
7334
- return isVisible ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
7335
- import_components73.Nudge,
7693
+ const [isVisible, setIsVisible] = (0, import_react33.useState)(true);
7694
+ return isVisible ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
7695
+ import_components76.Nudge,
7336
7696
  {
7337
- className: (0, import_classnames36.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
7697
+ className: (0, import_classnames38.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
7338
7698
  mediaName: getMediaName(media),
7339
7699
  title: text,
7340
7700
  action: __spreadValues({
@@ -7385,7 +7745,8 @@ var getWiseRenderers = () => [
7385
7745
  CircularButtonRenderer,
7386
7746
  BorderedBackgroundColoredBoxRenderer,
7387
7747
  BoxRenderer_default,
7388
- CollectionRenderer_default,
7748
+ CollectionRendererV2_default,
7749
+ CollectionRendererV1_default,
7389
7750
  ButtonRenderer,
7390
7751
  ColumnsRenderer_default,
7391
7752
  DateInputRenderer_default,
@@ -7431,13 +7792,13 @@ var getWiseRenderers = () => [
7431
7792
  ];
7432
7793
 
7433
7794
  // ../renderers/src/InitialLoadingStateRenderer.tsx
7434
- var import_components74 = require("@transferwise/components");
7435
- var import_jsx_runtime107 = require("react/jsx-runtime");
7795
+ var import_components77 = require("@transferwise/components");
7796
+ var import_jsx_runtime112 = require("react/jsx-runtime");
7436
7797
  var InitialLoadingStateRenderer = {
7437
7798
  canRenderType: "loading-state",
7438
7799
  canRender: ({ stepLoadingState }) => stepLoadingState === "initial",
7439
- render: () => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
7440
- import_components74.Loader,
7800
+ render: () => /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
7801
+ import_components77.Loader,
7441
7802
  {
7442
7803
  size: "md",
7443
7804
  classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin("md")}` },
@@ -7448,25 +7809,25 @@ var InitialLoadingStateRenderer = {
7448
7809
 
7449
7810
  // src/dynamicFlow/DynamicFlowModal.tsx
7450
7811
  var import_dynamic_flow_client = require("@wise/dynamic-flow-client");
7451
- var import_components75 = require("@transferwise/components");
7452
- var import_jsx_runtime108 = require("react/jsx-runtime");
7812
+ var import_components78 = require("@transferwise/components");
7813
+ var import_jsx_runtime113 = require("react/jsx-runtime");
7453
7814
  function DynamicFlowModal(props) {
7454
7815
  const _a = props, { className = "" } = _a, rest = __objRest(_a, ["className"]);
7455
7816
  const dfProps = useWiseToCoreProps(rest);
7456
7817
  const df = (0, import_dynamic_flow_client.useDynamicFlowModal)(dfProps);
7457
- return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
7458
- import_components75.Modal,
7818
+ return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
7819
+ import_components78.Modal,
7459
7820
  __spreadProps(__spreadValues({
7460
7821
  className: `dynamic-flow-modal ${className}`,
7461
7822
  disableDimmerClickToClose: true
7462
7823
  }, df.modal), {
7463
- body: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "dynamic-flow-modal", children: df.modal.body })
7824
+ body: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: "dynamic-flow-modal", children: df.modal.body })
7464
7825
  })
7465
7826
  );
7466
7827
  }
7467
7828
 
7468
7829
  // src/dynamicFlow/getMergedRenderers.tsx
7469
- var import_jsx_runtime109 = require("react/jsx-runtime");
7830
+ var import_jsx_runtime114 = require("react/jsx-runtime");
7470
7831
  var wiseRenderers = getWiseRenderers();
7471
7832
  var getMergedRenderers = (props) => {
7472
7833
  var _d, _e;
@@ -7480,7 +7841,7 @@ var getMergedRenderers = (props) => {
7480
7841
  method: initialRequest.method,
7481
7842
  data: initialRequest.body
7482
7843
  };
7483
- return presentation.type === "push" ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(DynamicFlow, __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), { features: subflowFeatures, initialAction: action })) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
7844
+ return presentation.type === "push" ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(DynamicFlow, __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), { features: subflowFeatures, initialAction: action })) : /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
7484
7845
  DynamicFlowModal,
7485
7846
  __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), {
7486
7847
  features: subflowFeatures,
@@ -7559,12 +7920,12 @@ var customEventsToAnalytics = {
7559
7920
  };
7560
7921
 
7561
7922
  // src/dynamicFlow/useOnCopy.tsx
7562
- var import_react30 = require("react");
7563
- var import_react_intl38 = require("react-intl");
7923
+ var import_react34 = require("react");
7924
+ var import_react_intl41 = require("react-intl");
7564
7925
 
7565
7926
  // src/dynamicFlow/messages.ts
7566
- var import_react_intl37 = require("react-intl");
7567
- var messages_default = (0, import_react_intl37.defineMessages)({
7927
+ var import_react_intl40 = require("react-intl");
7928
+ var messages_default = (0, import_react_intl40.defineMessages)({
7568
7929
  copied: {
7569
7930
  id: "df.wise.CopyFeedback.copy",
7570
7931
  defaultMessage: "Copied to clipboard",
@@ -7579,9 +7940,9 @@ var messages_default = (0, import_react_intl37.defineMessages)({
7579
7940
 
7580
7941
  // src/dynamicFlow/useOnCopy.tsx
7581
7942
  var useOnCopy = () => {
7582
- const { formatMessage } = (0, import_react_intl38.useIntl)();
7943
+ const { formatMessage } = (0, import_react_intl41.useIntl)();
7583
7944
  const createSnackBar = useSnackBarIfAvailable();
7584
- return (0, import_react30.useCallback)(
7945
+ return (0, import_react34.useCallback)(
7585
7946
  (copiedContent) => {
7586
7947
  if (copiedContent) {
7587
7948
  createSnackBar({ text: formatMessage(messages_default.copied) });
@@ -7594,11 +7955,11 @@ var useOnCopy = () => {
7594
7955
  };
7595
7956
 
7596
7957
  // src/dynamicFlow/useWiseHttpClient.tsx
7597
- var import_react31 = require("react");
7598
- var import_react_intl39 = require("react-intl");
7958
+ var import_react35 = require("react");
7959
+ var import_react_intl42 = require("react-intl");
7599
7960
  var useWiseHttpClient = (httpClient) => {
7600
- const { locale } = (0, import_react_intl39.useIntl)();
7601
- return (0, import_react31.useCallback)(
7961
+ const { locale } = (0, import_react_intl42.useIntl)();
7962
+ return (0, import_react35.useCallback)(
7602
7963
  async (input, init = {}) => {
7603
7964
  const headers = new Headers(init.headers);
7604
7965
  headers.set("accept-language", locale);
@@ -7639,10 +8000,10 @@ var useWiseToCoreProps = (props) => {
7639
8000
  onLog
7640
8001
  } = props;
7641
8002
  const httpClient = useWiseHttpClient(customFetch);
7642
- const mergedRenderers = (0, import_react32.useMemo)(() => getMergedRenderers(props), [renderers]);
8003
+ const mergedRenderers = (0, import_react36.useMemo)(() => getMergedRenderers(props), [renderers]);
7643
8004
  const createSnackBar = useCreateSnackBar();
7644
- const logEvent = (0, import_react32.useMemo)(() => getLogEvent(onLog), [onLog]);
7645
- const trackEvent = (0, import_react32.useMemo)(() => getTrackEvent(onEvent, onAnalytics), [onEvent, onAnalytics]);
8005
+ const logEvent = (0, import_react36.useMemo)(() => getLogEvent(onLog), [onLog]);
8006
+ const trackEvent = (0, import_react36.useMemo)(() => getTrackEvent(onEvent, onAnalytics), [onEvent, onAnalytics]);
7646
8007
  const onCopy = useOnCopy();
7647
8008
  return __spreadProps(__spreadValues({}, props), {
7648
8009
  httpClient,
@@ -7677,27 +8038,27 @@ var openLinkInNewTab = (url) => {
7677
8038
  };
7678
8039
 
7679
8040
  // src/dynamicFlow/DynamicFlow.tsx
7680
- var import_jsx_runtime110 = require("react/jsx-runtime");
8041
+ var import_jsx_runtime115 = require("react/jsx-runtime");
7681
8042
  function DynamicFlow(props) {
7682
8043
  const { className = "" } = props;
7683
8044
  const dfProps = useWiseToCoreProps(props);
7684
8045
  const df = (0, import_dynamic_flow_client4.useDynamicFlow)(dfProps);
7685
8046
  const { onContextMenu, contextMenu } = useDFContextMenu(df.controller);
7686
- return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className, onContextMenu, children: [
8047
+ return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { className, onContextMenu, children: [
7687
8048
  df.view,
7688
8049
  contextMenu
7689
8050
  ] });
7690
8051
  }
7691
8052
 
7692
8053
  // src/dynamicFlow/DynamicFlowWithRef.tsx
7693
- var import_react33 = require("react");
8054
+ var import_react37 = require("react");
7694
8055
  var import_dynamic_flow_client5 = require("@wise/dynamic-flow-client");
7695
- var import_jsx_runtime111 = require("react/jsx-runtime");
7696
- var DynamicFlowWithRef = (0, import_react33.forwardRef)(function DynamicFlowWithRef2(props, ref) {
8056
+ var import_jsx_runtime116 = require("react/jsx-runtime");
8057
+ var DynamicFlowWithRef = (0, import_react37.forwardRef)(function DynamicFlowWithRef2(props, ref) {
7697
8058
  const { className = "" } = props;
7698
8059
  const dfProps = useWiseToCoreProps(props);
7699
8060
  const df = (0, import_dynamic_flow_client5.useDynamicFlow)(dfProps);
7700
- (0, import_react33.useImperativeHandle)(
8061
+ (0, import_react37.useImperativeHandle)(
7701
8062
  ref,
7702
8063
  () => ({
7703
8064
  getValue: () => {
@@ -7708,7 +8069,7 @@ var DynamicFlowWithRef = (0, import_react33.forwardRef)(function DynamicFlowWith
7708
8069
  }),
7709
8070
  [df]
7710
8071
  );
7711
- return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className, children: df.view });
8072
+ return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", { className, children: df.view });
7712
8073
  });
7713
8074
 
7714
8075
  // src/index.ts
@@ -7719,6 +8080,7 @@ var Header10 = Header;
7719
8080
  var Media2 = Media;
7720
8081
  var getMargin2 = getMargin;
7721
8082
  var createCollectionRenderer2 = createCollectionRenderer;
8083
+ var createContactsCollectionRenderer2 = createContactsCollectionRenderer;
7722
8084
 
7723
8085
  // src/i18n/index.ts
7724
8086
  var import_dynamic_flow_client6 = require("@wise/dynamic-flow-client");
@@ -7838,6 +8200,8 @@ var en_default = {
7838
8200
  "df.wise.ButtonLayout.buttonLoadingMessage": "This might take a few seconds",
7839
8201
  "df.wise.Collection.clearText": "Clear text",
7840
8202
  "df.wise.Collection.loadMoreMessage": "Load more",
8203
+ "df.wise.Collection.showLessResultsButton": "Show less results",
8204
+ "df.wise.Collection.showMoreResultsButton": "Show all {count} results",
7841
8205
  "df.wise.ControlFeedback.maxLength": "Please enter {maxLength} or fewer characters.",
7842
8206
  "df.wise.ControlFeedback.maximum": "Please enter a number that's {maximum} or less.",
7843
8207
  "df.wise.ControlFeedback.maximumDate": "Please enter a date that's on or before {maximum}.",