@wise/dynamic-flow-client-internal 5.32.0 → 5.33.0-experimental-f7c2300

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/main.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 classNames38() {
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 classNames38.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
+ classNames38.default = classNames38;
115
+ module2.exports = classNames38;
116
116
  } else if (typeof define === "function" && typeof define.amd === "object" && define.amd) {
117
117
  define("classnames", [], function() {
118
- return classNames37;
118
+ return classNames38;
119
119
  });
120
120
  } else {
121
- window.classNames = classNames37;
121
+ window.classNames = classNames38;
122
122
  }
123
123
  })();
124
124
  }
@@ -336,7 +336,7 @@ var recursivelyRemoveNullish = (element) => {
336
336
  };
337
337
 
338
338
  // src/dynamicFlow/useWiseToCoreProps.tsx
339
- var import_react32 = require("react");
339
+ var import_react36 = require("react");
340
340
 
341
341
  // src/dynamicFlow/getMergedRenderers.tsx
342
342
  var import_dynamic_flow_client2 = require("@wise/dynamic-flow-client");
@@ -1659,8 +1659,9 @@ var getInlineAlertOrValidation = (validationState, inlineAlert) => {
1659
1659
  };
1660
1660
  var CheckboxInputRenderer_default = CheckboxInputRenderer;
1661
1661
 
1662
- // ../renderers/src/CollectionRenderer/CollectionRenderer.tsx
1663
- var import_components22 = require("@transferwise/components");
1662
+ // ../renderers/src/CollectionRenderer/CollectionRendererComponent.tsx
1663
+ var import_components15 = require("@transferwise/components");
1664
+ var import_react8 = require("motion/react");
1664
1665
 
1665
1666
  // ../renderers/src/messages/generic-error.messages.ts
1666
1667
  var import_react_intl5 = require("react-intl");
@@ -1682,6 +1683,58 @@ 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, depth, pop, Search: Search5, Filters, Results, FocusedResults } = props;
1691
+ const { status, search } = state;
1692
+ const isForked = depth > 0;
1693
+ const isError = status.type === "error" && (status.reason === "search" || status.reason === "filter");
1694
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1695
+ "div",
1696
+ {
1697
+ role: "presentation",
1698
+ onBlur: (event) => {
1699
+ const { target, relatedTarget, currentTarget } = event;
1700
+ const lostFocus = relatedTarget === null && (!target.isConnected || target.matches(":disabled"));
1701
+ if (isForked && !(search == null ? void 0 : search.query) && !lostFocus && !currentTarget.contains(relatedTarget)) {
1702
+ pop();
1703
+ }
1704
+ },
1705
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react8.MotionConfig, { reducedMotion: "user", children: [
1706
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Search5, __spreadValues({}, props)),
1707
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Filters, __spreadValues({}, props)),
1708
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react8.AnimatePresence, { mode: "wait", initial: false, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1709
+ import_react8.motion.div,
1710
+ {
1711
+ variants: contentVariants,
1712
+ initial: "enter",
1713
+ animate: "visible",
1714
+ exit: "exit",
1715
+ transition: { duration: 0.15, ease: "easeOut" },
1716
+ children: isError ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SearchError, { retry: status.retry }) : isForked ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(FocusedResults, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Results, __spreadValues({}, props))
1717
+ },
1718
+ isForked ? "forked" : "root"
1719
+ ) })
1720
+ ] })
1721
+ }
1722
+ );
1723
+ };
1724
+ var contentVariants = {
1725
+ enter: () => ({ opacity: 0, y: 12 }),
1726
+ visible: { opacity: 1, y: 0 },
1727
+ exit: () => ({ opacity: 0, y: -12 })
1728
+ };
1729
+ var SearchError = ({ retry }) => {
1730
+ const { formatMessage } = (0, import_react_intl6.useIntl)();
1731
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_components15.InlinePrompt, { width: "full", sentiment: "negative", children: [
1732
+ formatMessage(generic_error_messages_default.genericError),
1733
+ "\xA0",
1734
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components15.Link, { onClick: retry, children: formatMessage(generic_error_messages_default.retry) })
1735
+ ] });
1736
+ };
1737
+
1685
1738
  // ../../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
1739
  var React = __toESM(require("react"), 1);
1687
1740
  var import_react_dom = require("react-dom");
@@ -3218,18 +3271,18 @@ function useWindowVirtualizer(options) {
3218
3271
  }, options));
3219
3272
  }
3220
3273
 
3221
- // ../renderers/src/CollectionRenderer/components/ContentComponent.tsx
3222
- var import_components16 = require("@transferwise/components");
3223
- var import_react9 = require("react");
3274
+ // ../renderers/src/CollectionRenderer/components/VirtualisedContentComponent.tsx
3275
+ var import_components17 = require("@transferwise/components");
3276
+ var import_react10 = require("react");
3224
3277
 
3225
3278
  // ../renderers/src/step/StepFooter.tsx
3226
- var import_components15 = require("@transferwise/components");
3227
- var import_react8 = require("react");
3228
- var import_react_intl7 = require("react-intl");
3279
+ var import_components16 = require("@transferwise/components");
3280
+ var import_react9 = require("react");
3281
+ var import_react_intl8 = require("react-intl");
3229
3282
 
3230
3283
  // ../renderers/src/messages/step.messages.ts
3231
- var import_react_intl6 = require("react-intl");
3232
- var step_messages_default = (0, import_react_intl6.defineMessages)({
3284
+ var import_react_intl7 = require("react-intl");
3285
+ var step_messages_default = (0, import_react_intl7.defineMessages)({
3233
3286
  scrollToBottom: {
3234
3287
  id: "df.wise.step.scrollToBottom",
3235
3288
  defaultMessage: "Scroll to bottom",
@@ -3238,24 +3291,24 @@ var step_messages_default = (0, import_react_intl6.defineMessages)({
3238
3291
  });
3239
3292
 
3240
3293
  // ../renderers/src/step/StepFooter.tsx
3241
- var import_jsx_runtime35 = require("react/jsx-runtime");
3294
+ var import_jsx_runtime36 = require("react/jsx-runtime");
3242
3295
  var SCROLL_TO_BOTTOM = "scroll-to-bottom";
3243
3296
  var StepFooter = ({ footer, tags }) => {
3244
3297
  if (tags == null ? void 0 : tags.includes(SCROLL_TO_BOTTOM)) {
3245
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(FooterWithScrollButton, { footer });
3298
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(FooterWithScrollButton, { footer });
3246
3299
  }
3247
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DefaultFooter, { footer });
3300
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DefaultFooter, { footer });
3248
3301
  };
3249
3302
  var DefaultFooter = ({ footer }) => {
3250
3303
  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;
3304
+ return hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0;
3252
3305
  };
3253
3306
  var FooterWithScrollButton = ({ footer }) => {
3254
- const { formatMessage } = (0, import_react_intl7.useIntl)();
3255
- const endOfLayoutRef = (0, import_react8.useRef)(null);
3307
+ const { formatMessage } = (0, import_react_intl8.useIntl)();
3308
+ const endOfLayoutRef = (0, import_react9.useRef)(null);
3256
3309
  const isElementVisible = useIsElementVisible(endOfLayoutRef);
3257
- const scrollButton = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3258
- import_components15.Button,
3310
+ const scrollButton = /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3311
+ import_components16.Button,
3259
3312
  {
3260
3313
  className: "m-b-1",
3261
3314
  v2: true,
@@ -3270,19 +3323,19 @@ var FooterWithScrollButton = ({ footer }) => {
3270
3323
  );
3271
3324
  const hasStepFooterContent = footer && Array.isArray(footer) && footer.length > 0;
3272
3325
  if (isElementVisible && !hasStepFooterContent) {
3273
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
3326
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
3274
3327
  }
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: [
3328
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
3329
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
3330
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "df-step-fixed__footer", children: [
3278
3331
  !isElementVisible && scrollButton,
3279
3332
  footer
3280
3333
  ] })
3281
3334
  ] });
3282
3335
  };
3283
3336
  var useIsElementVisible = (elementRef, root = null) => {
3284
- const [isVisible, setIsVisible] = (0, import_react8.useState)(false);
3285
- (0, import_react8.useEffect)(() => {
3337
+ const [isVisible, setIsVisible] = (0, import_react9.useState)(false);
3338
+ (0, import_react9.useEffect)(() => {
3286
3339
  const element = elementRef.current;
3287
3340
  if (!element) return;
3288
3341
  const observer = new IntersectionObserver(
@@ -3297,12 +3350,12 @@ var useIsElementVisible = (elementRef, root = null) => {
3297
3350
  return isVisible;
3298
3351
  };
3299
3352
 
3300
- // ../renderers/src/CollectionRenderer/components/ContentComponent.tsx
3301
- var import_react_intl9 = require("react-intl");
3353
+ // ../renderers/src/CollectionRenderer/components/VirtualisedContentComponent.tsx
3354
+ var import_react_intl10 = require("react-intl");
3302
3355
 
3303
3356
  // ../renderers/src/messages/collection.messages.ts
3304
- var import_react_intl8 = require("react-intl");
3305
- var collection_messages_default = (0, import_react_intl8.defineMessages)({
3357
+ var import_react_intl9 = require("react-intl");
3358
+ var collection_messages_default = (0, import_react_intl9.defineMessages)({
3306
3359
  loadMoreButton: {
3307
3360
  id: "df.wise.Collection.loadMoreMessage",
3308
3361
  defaultMessage: "Load more",
@@ -3312,6 +3365,16 @@ var collection_messages_default = (0, import_react_intl8.defineMessages)({
3312
3365
  id: "df.wise.Collection.clearText",
3313
3366
  defaultMessage: "Clear text",
3314
3367
  description: "A message shown at the edge of the search bar to clear the users query"
3368
+ },
3369
+ showMoreResultsButton: {
3370
+ id: "df.wise.Collection.showMoreResultsButton",
3371
+ defaultMessage: "Show all {count} results",
3372
+ description: "A message shown at the bottom of a truncated list of items, clicking will expand to show more"
3373
+ },
3374
+ showLessResultsButton: {
3375
+ id: "df.wise.Collection.showLessResultsButton",
3376
+ defaultMessage: "Show less results",
3377
+ description: "A message shown at the bottom of an expanded list of items, clicking will truncate to show only a few"
3315
3378
  }
3316
3379
  });
3317
3380
 
@@ -3335,54 +3398,78 @@ var getScrollableAncestor = (element) => {
3335
3398
  return null;
3336
3399
  };
3337
3400
 
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;
3342
- const contentRef = (0, import_react9.useRef)(null);
3343
- const [scrollElement, setScrollElement] = (0, import_react9.useState)(null);
3344
- (0, import_react9.useLayoutEffect)(() => {
3401
+ // ../renderers/src/CollectionRenderer/components/flattenCollectionItems.ts
3402
+ var flattenCollectionItems = (sections) => {
3403
+ return sections.flatMap((section) => {
3404
+ if (section.type === "items") {
3405
+ return flattenItemsBody(section);
3406
+ }
3407
+ if (section.type === "layout") {
3408
+ return flattenLayoutBody(section);
3409
+ }
3410
+ return [];
3411
+ });
3412
+ };
3413
+ var flattenItemsBody = (section) => {
3414
+ return [
3415
+ ...flattenSectionHeader(section),
3416
+ ...section.items.map((item) => ({
3417
+ item,
3418
+ type: "item"
3419
+ }))
3420
+ ];
3421
+ };
3422
+ var flattenLayoutBody = (section) => [
3423
+ ...flattenSectionHeader(section),
3424
+ __spreadProps(__spreadValues({}, section), {
3425
+ type: "layout"
3426
+ })
3427
+ ];
3428
+ var flattenSectionHeader = (section) => section.title ? [
3429
+ {
3430
+ type: "header",
3431
+ title: section.title,
3432
+ items: section.type === "items" ? section.items : void 0,
3433
+ id: section.id,
3434
+ callToAction: section.callToAction
3435
+ }
3436
+ ] : [];
3437
+
3438
+ // ../renderers/src/CollectionRenderer/components/VirtualisedContentComponent.tsx
3439
+ var import_jsx_runtime37 = require("react/jsx-runtime");
3440
+ var VirtualisedContentComponent = (props) => {
3441
+ const { state, SectionHeader, Item } = props;
3442
+ const { status } = state;
3443
+ const contentRef = (0, import_react10.useRef)(null);
3444
+ const [scrollElement, setScrollElement] = (0, import_react10.useState)(null);
3445
+ (0, import_react10.useLayoutEffect)(() => {
3345
3446
  const nextScrollElement = getScrollableAncestor(contentRef.current);
3346
3447
  setScrollElement(
3347
3448
  (currentScrollElement) => currentScrollElement === nextScrollElement ? currentScrollElement : nextScrollElement
3348
3449
  );
3349
3450
  }, []);
3350
- const endOfContentRef = (0, import_react9.useRef)(null);
3451
+ const endOfContentRef = (0, import_react10.useRef)(null);
3351
3452
  const isBottomVisible = useIsElementVisible(endOfContentRef, scrollElement);
3352
- (0, import_react9.useEffect)(() => {
3453
+ (0, import_react10.useEffect)(() => {
3353
3454
  const shouldAutoLoad = isBottomVisible && status.type === "idle" && state.afterSectionsProps.length === 0;
3354
3455
  if (shouldAutoLoad && status.loadMore) {
3355
3456
  status.loadMore();
3356
3457
  }
3357
3458
  }, [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
- ]);
3377
- const listRef = (0, import_react9.useRef)(null);
3378
- const listOffsetRef = (0, import_react9.useRef)(0);
3379
- (0, import_react9.useLayoutEffect)(() => {
3459
+ const stateCount = state.sections.reduce((total, section) => {
3460
+ const count = section.type === "items" ? section.items.length : 1;
3461
+ return count + total + (section.title ? 1 : 0);
3462
+ }, 0);
3463
+ const items = flattenCollectionItems(state.sections);
3464
+ const listRef = (0, import_react10.useRef)(null);
3465
+ const listOffsetRef = (0, import_react10.useRef)(0);
3466
+ (0, import_react10.useLayoutEffect)(() => {
3380
3467
  var _a, _b;
3381
3468
  listOffsetRef.current = (_b = (_a = listRef.current) == null ? void 0 : _a.offsetTop) != null ? _b : 0;
3382
3469
  });
3383
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { ref: contentRef, children: [
3470
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { ref: contentRef, children: [
3384
3471
  state.beforeSections,
3385
- scrollElement ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3472
+ scrollElement ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3386
3473
  ElementVirtualizedItems,
3387
3474
  {
3388
3475
  Item,
@@ -3391,7 +3478,7 @@ var ContentComponent = (props) => {
3391
3478
  scrollElement,
3392
3479
  stateCount
3393
3480
  }
3394
- ) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3481
+ ) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3395
3482
  WindowVirtualizedItems,
3396
3483
  {
3397
3484
  Item,
@@ -3400,30 +3487,30 @@ var ContentComponent = (props) => {
3400
3487
  stateCount
3401
3488
  }
3402
3489
  ),
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 }) }),
3490
+ /* @__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
3491
  state.afterSections
3405
3492
  ] });
3406
3493
  };
3407
3494
  var WindowVirtualizedItems = (props) => {
3408
3495
  const { stateCount } = props;
3409
- const virtualItemsRef = (0, import_react9.useRef)(null);
3496
+ const virtualItemsRef = (0, import_react10.useRef)(null);
3410
3497
  const virtualizer = useWindowVirtualizer({
3411
3498
  count: stateCount,
3412
3499
  estimateSize: () => 120,
3413
3500
  overscan: 10
3414
3501
  });
3415
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(VirtualizedItems, __spreadProps(__spreadValues({}, props), { virtualItemsRef, virtualizer }));
3502
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(VirtualizedItems, __spreadProps(__spreadValues({}, props), { virtualItemsRef, virtualizer }));
3416
3503
  };
3417
3504
  var ElementVirtualizedItems = (props) => {
3418
3505
  const { scrollElement, stateCount } = props;
3419
- const virtualItemsRef = (0, import_react9.useRef)(null);
3506
+ const virtualItemsRef = (0, import_react10.useRef)(null);
3420
3507
  const virtualizer = useVirtualizer({
3421
3508
  count: stateCount,
3422
3509
  getScrollElement: () => scrollElement,
3423
3510
  estimateSize: () => 120,
3424
3511
  overscan: 10
3425
3512
  });
3426
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(VirtualizedItems, __spreadProps(__spreadValues({}, props), { virtualItemsRef, virtualizer }));
3513
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(VirtualizedItems, __spreadProps(__spreadValues({}, props), { virtualItemsRef, virtualizer }));
3427
3514
  };
3428
3515
  var VirtualizedItems = ({
3429
3516
  Item,
@@ -3431,7 +3518,7 @@ var VirtualizedItems = ({
3431
3518
  items,
3432
3519
  virtualItemsRef,
3433
3520
  virtualizer
3434
- }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3521
+ }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3435
3522
  "div",
3436
3523
  {
3437
3524
  ref: virtualItemsRef,
@@ -3445,7 +3532,7 @@ var VirtualizedItems = ({
3445
3532
  if (!i) {
3446
3533
  return null;
3447
3534
  }
3448
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3535
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
3449
3536
  "div",
3450
3537
  {
3451
3538
  ref: virtualizer.measureElement,
@@ -3457,17 +3544,19 @@ var VirtualizedItems = ({
3457
3544
  width: "100%",
3458
3545
  transform: `translateY(${item.start - virtualizer.options.scrollMargin}px)`
3459
3546
  },
3460
- children: i.type === "header" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SectionHeader, __spreadValues({}, i)) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Item, __spreadValues({}, i.item))
3547
+ children: [
3548
+ i.type === "header" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SectionHeader, __spreadValues({}, i)),
3549
+ i.type === "item" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Item, __spreadValues({}, i.item)),
3550
+ i.type === "layout" && i.children
3551
+ ]
3461
3552
  },
3462
3553
  item.key
3463
3554
  );
3464
3555
  })
3465
3556
  }
3466
3557
  );
3467
- var PaginationComponent = ({
3468
- status,
3469
- state
3470
- }) => {
3558
+ var PaginationComponent = ({ state }) => {
3559
+ const { status } = state;
3471
3560
  const isPaginationError = status.type === "error" && status.reason === "pagination";
3472
3561
  const isPaginationLoading = status.type === "loading" && status.reason === "pagination";
3473
3562
  const loadMore = status.type === "idle" ? status.loadMore : void 0;
@@ -3475,35 +3564,42 @@ var PaginationComponent = ({
3475
3564
  return null;
3476
3565
  }
3477
3566
  if (isPaginationError) {
3478
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(LoadMoreButton, { onClick: status.retry });
3567
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(LoadMoreButton, { onClick: status.retry });
3479
3568
  }
3480
3569
  if (state.afterSectionsProps.length > 0 && loadMore) {
3481
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(LoadMoreButton, { onClick: loadMore });
3570
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(LoadMoreButton, { onClick: loadMore });
3482
3571
  }
3483
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components16.ProcessIndicator, { size: "xs", "data-testid": "collection-pagination-loader" });
3572
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components17.ProcessIndicator, { size: "xs", "data-testid": "collection-pagination-loader" });
3484
3573
  };
3485
3574
  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) }) });
3575
+ const { formatMessage } = (0, import_react_intl10.useIntl)();
3576
+ 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
3577
  };
3489
3578
 
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)));
3579
+ // ../renderers/src/CollectionRenderer/v1/FilterComponent.tsx
3580
+ var import_components18 = require("@transferwise/components");
3581
+ var import_jsx_runtime38 = require("react/jsx-runtime");
3582
+ var FiltersComponent = (props) => {
3583
+ const _a = props, { Filter } = _a, collectionProps = __objRest(_a, ["Filter"]);
3584
+ const { filters } = collectionProps.state;
3585
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "df-filters-container", children: filters.map((filter) => {
3586
+ var _a2;
3587
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3588
+ Filter,
3589
+ __spreadProps(__spreadValues({}, collectionProps), {
3590
+ filter
3591
+ }),
3592
+ JSON.stringify((_a2 = filter.options) == null ? void 0 : _a2.map((o) => o.value))
3593
+ );
3498
3594
  }) });
3499
3595
  };
3500
- var FilterComponent = (filter) => {
3596
+ var FilterComponent = ({ filter }) => {
3501
3597
  const { multiSelect, options } = filter;
3502
3598
  if (!options) {
3503
3599
  return null;
3504
3600
  }
3505
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3506
- import_components17.Chips,
3601
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3602
+ import_components18.Chips,
3507
3603
  {
3508
3604
  className: "m-b-1",
3509
3605
  multiple: multiSelect,
@@ -3528,11 +3624,11 @@ var FilterComponent = (filter) => {
3528
3624
  };
3529
3625
 
3530
3626
  // ../renderers/src/CollectionRenderer/components/ItemComponent.tsx
3531
- var import_components20 = require("@transferwise/components");
3627
+ var import_components21 = require("@transferwise/components");
3532
3628
 
3533
3629
  // ../renderers/src/utils/listItem/getAdditionalInfo.tsx
3534
- var import_components18 = require("@transferwise/components");
3535
- var import_jsx_runtime38 = require("react/jsx-runtime");
3630
+ var import_components19 = require("@transferwise/components");
3631
+ var import_jsx_runtime39 = require("react/jsx-runtime");
3536
3632
  var getAdditionalInfo = (additionalInfo) => {
3537
3633
  var _a, _b;
3538
3634
  if (!additionalInfo) {
@@ -3540,8 +3636,8 @@ var getAdditionalInfo = (additionalInfo) => {
3540
3636
  }
3541
3637
  const { href, text, onClick } = additionalInfo;
3542
3638
  if (href || onClick) {
3543
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3544
- import_components18.ListItem.AdditionalInfo,
3639
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3640
+ import_components19.ListItem.AdditionalInfo,
3545
3641
  {
3546
3642
  action: __spreadValues({
3547
3643
  label: text
@@ -3549,20 +3645,20 @@ var getAdditionalInfo = (additionalInfo) => {
3549
3645
  }
3550
3646
  );
3551
3647
  }
3552
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_components18.ListItem.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
3648
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components19.ListItem.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
3553
3649
  };
3554
3650
 
3555
3651
  // ../renderers/src/utils/listItem/getCTAControl.tsx
3556
- var import_components19 = require("@transferwise/components");
3557
- var import_jsx_runtime39 = require("react/jsx-runtime");
3652
+ var import_components20 = require("@transferwise/components");
3653
+ var import_jsx_runtime40 = require("react/jsx-runtime");
3558
3654
  var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
3559
3655
  if (!callToAction) {
3560
3656
  return void 0;
3561
3657
  }
3562
3658
  const { accessibilityDescription, title, context } = callToAction;
3563
3659
  const { priority, sentiment } = getPriorityAndSentiment(ctaSecondary, context);
3564
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3565
- import_components19.ListItem.Button,
3660
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3661
+ import_components20.ListItem.Button,
3566
3662
  __spreadProps(__spreadValues({}, callToAction.getAnchorProps()), {
3567
3663
  partiallyInteractive: !fullyInteractive,
3568
3664
  priority,
@@ -3586,7 +3682,7 @@ var shouldUseAvatar = (control, tags) => {
3586
3682
  };
3587
3683
 
3588
3684
  // ../renderers/src/CollectionRenderer/components/ItemComponent.tsx
3589
- var import_jsx_runtime40 = require("react/jsx-runtime");
3685
+ var import_jsx_runtime41 = require("react/jsx-runtime");
3590
3686
  var ItemComponent = (props) => {
3591
3687
  var _a, _b;
3592
3688
  const {
@@ -3608,8 +3704,8 @@ var ItemComponent = (props) => {
3608
3704
  ctaSecondary: (_a = tags == null ? void 0 : tags.includes("cta-secondary")) != null ? _a : false,
3609
3705
  fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
3610
3706
  };
3611
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3612
- import_components20.ListItem,
3707
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3708
+ import_components21.ListItem,
3613
3709
  {
3614
3710
  title,
3615
3711
  subtitle: description,
@@ -3625,57 +3721,52 @@ var ItemComponent = (props) => {
3625
3721
  };
3626
3722
  var getNavigationControl = (onClick, href) => {
3627
3723
  if (href) {
3628
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components20.ListItem.Navigation, { href });
3724
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components21.ListItem.Navigation, { href });
3629
3725
  }
3630
3726
  if (onClick) {
3631
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components20.ListItem.Navigation, { onClick });
3727
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components21.ListItem.Navigation, { onClick });
3632
3728
  }
3633
3729
  return null;
3634
3730
  };
3635
3731
 
3636
- // ../renderers/src/CollectionRenderer/components/SearchComponent.tsx
3637
- var import_components21 = require("@transferwise/components");
3732
+ // ../renderers/src/CollectionRenderer/v1/SearchComponent.tsx
3733
+ var import_components22 = require("@transferwise/components");
3638
3734
  var import_icons = require("@transferwise/icons");
3639
- var import_react_intl10 = require("react-intl");
3640
- var import_jsx_runtime41 = require("react/jsx-runtime");
3641
- var SearchComponent = ({
3642
- state,
3643
- status,
3644
- features,
3645
- control,
3646
- tags
3647
- }) => {
3735
+ var import_react_intl11 = require("react-intl");
3736
+ var import_jsx_runtime42 = require("react/jsx-runtime");
3737
+ var SearchComponent = ({ state, features, control, tags }) => {
3738
+ var _a;
3648
3739
  const { search } = state;
3649
- const { formatMessage } = (0, import_react_intl10.useIntl)();
3740
+ const { formatMessage } = (0, import_react_intl11.useIntl)();
3650
3741
  if (!search) {
3651
3742
  return;
3652
3743
  }
3653
3744
  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" }) };
3745
+ var _a2;
3746
+ if (state.status.type === "loading") {
3747
+ return { content: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components22.ProcessIndicator, { size: "xs", "data-testid": "collection-search-loader" }) };
3657
3748
  }
3658
- if ((_a = state.search) == null ? void 0 : _a.query) {
3749
+ if ((_a2 = state.search) == null ? void 0 : _a2.query) {
3659
3750
  return {
3660
3751
  interactive: true,
3661
- content: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3662
- import_components21.IconButton,
3752
+ content: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3753
+ import_components22.IconButton,
3663
3754
  {
3664
3755
  priority: "minimal",
3665
3756
  size: 24,
3666
3757
  "aria-label": formatMessage(collection_messages_default.clearTextLabel),
3667
3758
  onClick: () => {
3668
- var _a2;
3669
- return (_a2 = state.search) == null ? void 0 : _a2.onChange("");
3759
+ var _a3;
3760
+ return (_a3 = state.search) == null ? void 0 : _a3.onChange("");
3670
3761
  },
3671
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_icons.CrossCircleFill, {})
3762
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_icons.CrossCircleFill, {})
3672
3763
  }
3673
3764
  )
3674
3765
  };
3675
3766
  }
3676
3767
  return void 0;
3677
3768
  };
3678
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3769
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3679
3770
  FieldInput_default,
3680
3771
  {
3681
3772
  id: "search",
@@ -3686,13 +3777,13 @@ var SearchComponent = ({
3686
3777
  features,
3687
3778
  control,
3688
3779
  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,
3780
+ 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)(
3781
+ import_components22.Input,
3691
3782
  {
3692
3783
  id: "search",
3693
3784
  name: "search",
3694
3785
  shape: "pill",
3695
- placeholder: search.hint,
3786
+ placeholder: (_a = search.hints) == null ? void 0 : _a[0],
3696
3787
  type: "text",
3697
3788
  value: search.query,
3698
3789
  onChange: ({ currentTarget: { value } }) => {
@@ -3705,14 +3796,74 @@ var SearchComponent = ({
3705
3796
  };
3706
3797
 
3707
3798
  // ../renderers/src/CollectionRenderer/components/SectionHeaderComponent.tsx
3708
- var import_jsx_runtime42 = require("react/jsx-runtime");
3799
+ var import_jsx_runtime43 = require("react/jsx-runtime");
3709
3800
  var SectionHeaderComponent = ({
3710
3801
  title,
3711
3802
  callToAction
3712
- }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Header, { title, callToAction });
3803
+ }) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Header, { title, callToAction });
3804
+
3805
+ // ../renderers/src/CollectionRenderer/components/CollapsibleContentComponent.tsx
3806
+ var import_react11 = require("react");
3807
+ var import_components23 = require("@transferwise/components");
3808
+ var import_react_intl12 = require("react-intl");
3809
+ var import_jsx_runtime44 = require("react/jsx-runtime");
3810
+ var CollapsibleContentComponent = (props) => {
3811
+ var _a;
3812
+ const { state, SectionHeader, Item } = props;
3813
+ const { search, status } = state;
3814
+ const [isShowingInitialState, setIsShowingInitialState] = (0, import_react11.useState)(true);
3815
+ const isSearchRunning = status.type === "loading" && status.reason === "search";
3816
+ const shouldShowInitialState = !(search == null ? void 0 : search.query) || isSearchRunning && isShowingInitialState;
3817
+ if (shouldShowInitialState !== isShowingInitialState) {
3818
+ setIsShowingInitialState(shouldShowInitialState);
3819
+ }
3820
+ const sections = shouldShowInitialState ? (_a = search == null ? void 0 : search.initialSections) != null ? _a : state.sections : state.sections;
3821
+ return (
3822
+ // keep focus in the search input when clicking the results, so clicking doesn't blur it and
3823
+ // pop the collection before the click is handled
3824
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { role: "presentation", onMouseDown: (event) => event.preventDefault(), children: sections.map((section) => {
3825
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Section, { section, SectionHeader, Item }, section.id);
3826
+ }) })
3827
+ );
3828
+ };
3829
+ var Section = ({ section, SectionHeader, Item }) => {
3830
+ const { formatMessage } = (0, import_react_intl12.useIntl)();
3831
+ const [expanded, setExpanded] = (0, import_react11.useState)(false);
3832
+ const itemIds = section.type === "items" ? section.items.map(({ id }) => id).join("") : section.id;
3833
+ const [prevItemIds, setPrevItemIds] = (0, import_react11.useState)(itemIds);
3834
+ if (itemIds !== prevItemIds) {
3835
+ setExpanded(false);
3836
+ setPrevItemIds(itemIds);
3837
+ }
3838
+ const showLoadMore = section.type === "items" && section.items.some((item) => {
3839
+ var _a;
3840
+ return (_a = item.tags) == null ? void 0 : _a.includes("hidden");
3841
+ });
3842
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
3843
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(SectionHeader, __spreadValues({}, section)),
3844
+ section.type === "items" && section.items.filter((item) => {
3845
+ var _a;
3846
+ return expanded || !((_a = item.tags) == null ? void 0 : _a.includes("hidden"));
3847
+ }).map((item) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Item, __spreadValues({}, item), item.id)),
3848
+ section.type === "layout" && section.children,
3849
+ showLoadMore ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3850
+ import_components23.Button,
3851
+ {
3852
+ priority: "tertiary",
3853
+ onClick: () => {
3854
+ setExpanded(!expanded);
3855
+ },
3856
+ children: expanded ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { children: [
3857
+ formatMessage(collection_messages_default.showLessResultsButton),
3858
+ " "
3859
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { children: formatMessage(collection_messages_default.showMoreResultsButton, { count: section.items.length }) })
3860
+ }
3861
+ ) : void 0
3862
+ ] });
3863
+ };
3713
3864
 
3714
3865
  // ../renderers/src/CollectionRenderer/createCollectionRenderer.tsx
3715
- var import_jsx_runtime43 = require("react/jsx-runtime");
3866
+ var import_jsx_runtime45 = require("react/jsx-runtime");
3716
3867
  var createCollectionRenderer = (canRender, components) => {
3717
3868
  const componentsWithDefaults = __spreadValues({
3718
3869
  Search: SearchComponent,
@@ -3720,114 +3871,252 @@ var createCollectionRenderer = (canRender, components) => {
3720
3871
  Filter: FilterComponent,
3721
3872
  Item: ItemComponent,
3722
3873
  SectionHeader: SectionHeaderComponent,
3723
- Results: ContentComponent
3874
+ Results: VirtualisedContentComponent,
3875
+ FocusedResults: CollapsibleContentComponent
3724
3876
  }, components);
3725
3877
  return {
3726
3878
  canRenderType: "collection",
3727
3879
  canRender,
3728
3880
  render: (props) => {
3729
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(CollectionRendererComponent, __spreadValues(__spreadValues({}, props), componentsWithDefaults));
3881
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(CollectionRendererComponent, __spreadValues(__spreadValues({}, props), componentsWithDefaults));
3730
3882
  }
3731
3883
  };
3732
3884
  };
3733
3885
 
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;
3886
+ // ../renderers/src/CollectionRenderer/v1/CollectionRendererV1.tsx
3887
+ var CollectionRendererV1 = createCollectionRenderer(
3888
+ () => true
3889
+ );
3890
+ var CollectionRendererV1_default = CollectionRendererV1;
3755
3891
 
3756
- // ../renderers/src/ColumnsRenderer.tsx
3892
+ // ../renderers/src/CollectionRenderer/v2/FilterComponent.tsx
3893
+ var import_components24 = require("@transferwise/components");
3757
3894
  var import_classnames12 = __toESM(require_classnames());
3758
-
3759
- // ../renderers/src/utils/useIsCollapsed.ts
3760
- 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;
3895
+ var import_react12 = require("motion/react");
3896
+ var import_jsx_runtime46 = require("react/jsx-runtime");
3897
+ var FiltersComponent2 = (props) => {
3898
+ var _b;
3899
+ const _a = props, { Filter } = _a, collectionProps = __objRest(_a, ["Filter"]);
3900
+ const { state, depth } = collectionProps;
3901
+ const { filters, status } = state;
3902
+ const isHidden = depth > 0 && !((_b = state.search) == null ? void 0 : _b.query);
3903
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react12.AnimatePresence, { initial: false, children: !isHidden && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3904
+ import_react12.motion.div,
3905
+ {
3906
+ variants: filtersVariants,
3907
+ initial: "collapsed",
3908
+ animate: "expanded",
3909
+ exit: "collapsed",
3910
+ transition: { duration: 0.15, ease: "easeOut" },
3911
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3912
+ "div",
3913
+ {
3914
+ className: (0, import_classnames12.default)("df-filters-container", {
3915
+ "df-filter-loader": status.type === "loading" && status.reason === "search"
3916
+ }),
3917
+ children: filters.map((filter) => {
3918
+ var _a2;
3919
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3920
+ Filter,
3921
+ __spreadProps(__spreadValues({}, collectionProps), {
3922
+ filter
3923
+ }),
3924
+ JSON.stringify((_a2 = filter.options) == null ? void 0 : _a2.map((o) => o.value))
3925
+ );
3926
+ })
3927
+ }
3928
+ )
3929
+ },
3930
+ "filters"
3931
+ ) });
3777
3932
  };
3778
-
3779
- // ../renderers/src/ColumnsRenderer.tsx
3780
- 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
3933
+ var filtersVariants = {
3934
+ collapsed: { height: 0, opacity: 0, overflow: "hidden" },
3935
+ expanded: { height: "auto", opacity: 1, transitionEnd: { overflow: "visible" } }
3785
3936
  };
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)(
3794
- "div",
3937
+ var FilterComponent2 = ({
3938
+ filter,
3939
+ state
3940
+ }) => {
3941
+ const { multiSelect, options } = filter;
3942
+ const { status } = state;
3943
+ const disabled = status.type === "loading" && status.reason === "search";
3944
+ if (!options) {
3945
+ return null;
3946
+ }
3947
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3948
+ import_components24.Chips,
3795
3949
  {
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
- ]
3809
- }
3950
+ className: "m-b-1",
3951
+ multiple: multiSelect,
3952
+ selected: options.some((option) => option.selected) ? options.filter((option) => option.selected).map((option) => option.value) : multiSelect ? [] : "",
3953
+ chips: [
3954
+ ...options.map((option) => ({
3955
+ value: option.value,
3956
+ label: option.title
3957
+ }))
3958
+ ],
3959
+ onChange: (value) => {
3960
+ var _a;
3961
+ if (disabled) {
3962
+ return;
3963
+ }
3964
+ if (value.selectedValue === "") {
3965
+ options == null ? void 0 : options.filter((option) => option.selected).map((option) => option == null ? void 0 : option.onSelect());
3966
+ return;
3967
+ }
3968
+ (_a = options == null ? void 0 : options.find((option) => value.selectedValue === option.value)) == null ? void 0 : _a.onSelect();
3969
+ }
3970
+ },
3971
+ JSON.stringify(options)
3810
3972
  );
3811
- }
3812
- var ColumnsRenderer_default = ColumnsRenderer;
3813
-
3814
- // ../renderers/src/components/VariableDateInput.tsx
3815
- var import_components23 = require("@transferwise/components");
3973
+ };
3816
3974
 
3817
- // ../renderers/src/hooks/useAvailabilityRules.ts
3818
- var import_react11 = require("react");
3975
+ // ../renderers/src/CollectionRenderer/v2/SearchComponent.tsx
3976
+ var import_components25 = require("@transferwise/components");
3977
+ var import_icons2 = require("@transferwise/icons");
3978
+ var import_react13 = require("react");
3819
3979
  var import_react_intl13 = require("react-intl");
3980
+ var import_jsx_runtime47 = require("react/jsx-runtime");
3981
+ var SearchComponent2 = ({
3982
+ state,
3983
+ depth,
3984
+ fork,
3985
+ features,
3986
+ control,
3987
+ tags
3988
+ }) => {
3989
+ var _a;
3990
+ const { search } = state;
3991
+ const { formatMessage } = (0, import_react_intl13.useIntl)();
3992
+ const inputRef = (0, import_react13.useRef)(null);
3993
+ if (!search) {
3994
+ return;
3995
+ }
3996
+ const isForked = depth > 0;
3997
+ const getAddon = () => {
3998
+ if (state.status.type === "loading") {
3999
+ return { content: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components25.ProcessIndicator, { size: "xs", "data-testid": "collection-search-loader" }) };
4000
+ }
4001
+ if (search.query) {
4002
+ return {
4003
+ interactive: true,
4004
+ content: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4005
+ import_components25.IconButton,
4006
+ {
4007
+ priority: "minimal",
4008
+ size: 24,
4009
+ "aria-label": formatMessage(collection_messages_default.clearTextLabel),
4010
+ onClick: () => {
4011
+ var _a2;
4012
+ search.onChange("");
4013
+ (_a2 = inputRef.current) == null ? void 0 : _a2.focus();
4014
+ },
4015
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_icons2.CrossCircleFill, {})
4016
+ }
4017
+ )
4018
+ };
4019
+ }
4020
+ return void 0;
4021
+ };
4022
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4023
+ FieldInput_default,
4024
+ {
4025
+ id: "search",
4026
+ description: "",
4027
+ validation: void 0,
4028
+ help: "",
4029
+ label: search.title,
4030
+ features,
4031
+ control,
4032
+ tags,
4033
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components25.InputGroup, { addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_icons2.Search, { size: 24 }) }, addonEnd: getAddon(), children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4034
+ import_components25.Input,
4035
+ {
4036
+ ref: inputRef,
4037
+ id: "search",
4038
+ name: "search",
4039
+ shape: "pill",
4040
+ placeholder: (_a = search.hints) == null ? void 0 : _a[0],
4041
+ type: "text",
4042
+ value: search.query,
4043
+ onFocus: () => {
4044
+ if (!isForked) {
4045
+ fork();
4046
+ }
4047
+ },
4048
+ onChange: ({ currentTarget: { value } }) => search.onChange(value)
4049
+ }
4050
+ ) })
4051
+ }
4052
+ );
4053
+ };
4054
+
4055
+ // ../renderers/src/CollectionRenderer/v2/CollectionRendererV2.tsx
4056
+ var CollectionRendererV2 = createCollectionRenderer(
4057
+ ({ control }) => control === "contacts-collection-v2",
4058
+ { Search: SearchComponent2, Filters: FiltersComponent2, Filter: FilterComponent2 }
4059
+ );
4060
+ var CollectionRendererV2_default = CollectionRendererV2;
4061
+
4062
+ // ../renderers/src/ColumnsRenderer.tsx
4063
+ var import_classnames13 = __toESM(require_classnames());
4064
+
4065
+ // ../renderers/src/utils/useIsCollapsed.ts
4066
+ var import_react14 = require("react");
4067
+ var COLLAPSE_QUERY = "(max-width: 767.98px)";
4068
+ var supportsMatchMedia = () => typeof window !== "undefined" && !!window.matchMedia;
4069
+ var useIsCollapsed = () => {
4070
+ const [collapsed, setCollapsed] = (0, import_react14.useState)(
4071
+ () => supportsMatchMedia() && window.matchMedia(COLLAPSE_QUERY).matches
4072
+ );
4073
+ (0, import_react14.useEffect)(() => {
4074
+ if (supportsMatchMedia()) {
4075
+ const mql = window.matchMedia(COLLAPSE_QUERY);
4076
+ const update = () => setCollapsed(mql.matches);
4077
+ mql.addEventListener("change", update);
4078
+ return () => mql.removeEventListener("change", update);
4079
+ }
4080
+ return void 0;
4081
+ }, []);
4082
+ return collapsed;
4083
+ };
4084
+
4085
+ // ../renderers/src/ColumnsRenderer.tsx
4086
+ var import_jsx_runtime48 = require("react/jsx-runtime");
4087
+ var RIGHT_FIRST_STACKING = "right-first-stacking";
4088
+ var ColumnsRenderer = {
4089
+ canRenderType: "columns",
4090
+ render: ColumnsRendererComponent
4091
+ };
4092
+ function ColumnsRendererComponent(props) {
4093
+ var _a;
4094
+ const { bias, margin, startChildren, endChildren, tags } = props;
4095
+ const isCollapsed = useIsCollapsed();
4096
+ const reverse = isCollapsed && ((_a = tags == null ? void 0 : tags.includes(RIGHT_FIRST_STACKING)) != null ? _a : false);
4097
+ const startColumn = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "df-columns-renderer-column", children: startChildren });
4098
+ const endColumn = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "df-columns-renderer-column", children: endChildren });
4099
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
4100
+ "div",
4101
+ {
4102
+ className: (0, import_classnames13.default)(
4103
+ "df-columns-renderer-container",
4104
+ getMargin(margin),
4105
+ {
4106
+ "df-columns-renderer-bias-start": bias === "start",
4107
+ "df-columns-renderer-bias-end": bias === "end"
4108
+ },
4109
+ controlAndTagsToCSSClass(props)
4110
+ ),
4111
+ children: [
4112
+ reverse ? endColumn : startColumn,
4113
+ reverse ? startColumn : endColumn
4114
+ ]
4115
+ }
4116
+ );
4117
+ }
4118
+ var ColumnsRenderer_default = ColumnsRenderer;
3820
4119
 
3821
- // ../renderers/src/messages/date-input.messages.ts
3822
- var import_react_intl12 = require("react-intl");
3823
- var date_input_messages_default = (0, import_react_intl12.defineMessages)({
3824
- unavailableDates: {
3825
- id: "df.wise.DateInput.unavailableDates",
3826
- defaultMessage: "Some dates are unavailable.",
3827
- description: "General explanation shown below a calendar containing unavailable dates"
3828
- }
3829
- });
3830
-
3831
4120
  // ../renderers/src/validators/type-validators.ts
3832
4121
  var isNumber = (value) => typeof value === "number" && !Number.isNaN(value);
3833
4122
 
@@ -3856,14 +4145,31 @@ var dateToDateString = (date) => {
3856
4145
  return [year, formattedMonth, formattedDay].join("-");
3857
4146
  };
3858
4147
 
4148
+ // ../renderers/src/DateInputRenderer/DateLookupControl.tsx
4149
+ var import_components26 = require("@transferwise/components");
4150
+
4151
+ // ../renderers/src/hooks/useAvailabilityRules.ts
4152
+ var import_react15 = require("react");
4153
+ var import_react_intl15 = require("react-intl");
4154
+
4155
+ // ../renderers/src/messages/date-input.messages.ts
4156
+ var import_react_intl14 = require("react-intl");
4157
+ var date_input_messages_default = (0, import_react_intl14.defineMessages)({
4158
+ unavailableDates: {
4159
+ id: "df.wise.DateInput.unavailableDates",
4160
+ defaultMessage: "Some dates are unavailable.",
4161
+ description: "General explanation shown below a calendar containing unavailable dates"
4162
+ }
4163
+ });
4164
+
3859
4165
  // ../renderers/src/hooks/useAvailabilityRules.ts
3860
4166
  var useAvailabilityRules = (availability) => {
3861
4167
  var _a, _b;
3862
- const { formatMessage } = (0, import_react_intl13.useIntl)();
3863
- const [focusedDate, setFocusedDate] = (0, import_react11.useState)(null);
4168
+ const { formatMessage } = (0, import_react_intl15.useIntl)();
4169
+ const [focusedDate, setFocusedDate] = (0, import_react15.useState)(null);
3864
4170
  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
4171
  const onDateSelect = ({ date }) => {
3866
- setFocusedDate(date);
4172
+ setFocusedDate((current) => (current == null ? void 0 : current.getTime()) === date.getTime() ? current : date);
3867
4173
  };
3868
4174
  return {
3869
4175
  disabledRules: mapAvailabilityToDisabledRules(availability, unavailableMessage),
@@ -3911,64 +4217,124 @@ var matchesDateRule = (date, weekday, rule) => {
3911
4217
  };
3912
4218
  var isDate = (date) => date !== null;
3913
4219
 
3914
- // ../renderers/src/components/VariableDateInput.tsx
3915
- var import_jsx_runtime46 = require("react/jsx-runtime");
3916
- function VariableDateInput({
3917
- control,
3918
- inputProps
3919
- }) {
3920
- const {
3921
- autoComplete,
3922
- availability,
3923
- minimumDate,
3924
- maximumDate,
3925
- placeholder,
3926
- disabled,
3927
- onBlur,
3928
- onChange,
3929
- onFocus
3930
- } = inputProps;
4220
+ // ../renderers/src/DateInputRenderer/DateLookupControl.tsx
4221
+ var import_jsx_runtime49 = require("react/jsx-runtime");
4222
+ var DateLookupControl = ({
4223
+ value,
4224
+ minimumDate,
4225
+ maximumDate,
4226
+ placeholder,
4227
+ disabled,
4228
+ availability,
4229
+ onChange,
4230
+ onBlur,
4231
+ onFocus
4232
+ }) => {
4233
+ const { disabledRules, onDateSelect, resetFocusedDate } = useAvailabilityRules(availability);
4234
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4235
+ import_components26.DateLookup,
4236
+ {
4237
+ value: dateStringToDateOrNull(value),
4238
+ min: dateStringToDateOrNull(minimumDate),
4239
+ max: dateStringToDateOrNull(maximumDate),
4240
+ placeholder,
4241
+ disabled,
4242
+ disabledRules,
4243
+ onChange: (date) => {
4244
+ onChange(date !== null ? dateToDateString(date) : null);
4245
+ },
4246
+ onDateSelect,
4247
+ onBlur,
4248
+ onFocus: () => {
4249
+ resetFocusedDate();
4250
+ onFocus();
4251
+ }
4252
+ }
4253
+ );
4254
+ };
4255
+
4256
+ // ../renderers/src/DateInputRenderer/CalendarControl.tsx
4257
+ var import_components27 = require("@transferwise/components");
4258
+ var import_jsx_runtime50 = require("react/jsx-runtime");
4259
+ var CalendarControl = ({
4260
+ id,
4261
+ title,
4262
+ value,
4263
+ minimumDate,
4264
+ maximumDate,
4265
+ validationState,
4266
+ availability,
4267
+ onChange,
4268
+ onFocus,
4269
+ onBlur
4270
+ }) => {
3931
4271
  const { disabledRules, onDateSelect, resetFocusedDate } = useAvailabilityRules(availability);
3932
- if (control === "date-lookup") {
3933
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3934
- import_components23.DateLookup,
4272
+ const handleDateFocus = (date, { isEnabled }) => {
4273
+ if (date === null) {
4274
+ resetFocusedDate();
4275
+ return;
4276
+ }
4277
+ onDateSelect({ date, isEnabled });
4278
+ };
4279
+ return (
4280
+ // Wrapping in a <fieldset> to address some a11y gaps in the current inline Calendar component
4281
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4282
+ "fieldset",
3935
4283
  {
3936
- value: dateStringToDateOrNull(inputProps.value),
3937
- min: dateStringToDateOrNull(minimumDate),
3938
- max: dateStringToDateOrNull(maximumDate),
3939
- placeholder,
3940
- disabled,
3941
- disabledRules,
3942
- onChange: (date) => {
3943
- onChange(date !== null ? dateToDateString(date) : null);
4284
+ id,
4285
+ "aria-label": title,
4286
+ "aria-invalid": (validationState == null ? void 0 : validationState.status) === "invalid",
4287
+ onFocus: (event) => {
4288
+ if (!event.currentTarget.contains(event.relatedTarget)) {
4289
+ resetFocusedDate();
4290
+ onFocus();
4291
+ }
3944
4292
  },
3945
- onDateSelect,
3946
- onBlur,
3947
- onFocus: () => {
3948
- resetFocusedDate();
3949
- onFocus();
3950
- }
4293
+ onBlur: (event) => {
4294
+ if (!event.currentTarget.contains(event.relatedTarget)) {
4295
+ onBlur();
4296
+ }
4297
+ },
4298
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4299
+ import_components27.Calendar,
4300
+ {
4301
+ value: dateStringToDateOrNull(value),
4302
+ min: dateStringToDateOrNull(minimumDate),
4303
+ max: dateStringToDateOrNull(maximumDate),
4304
+ disabledRules,
4305
+ onChange: (date) => {
4306
+ onChange(date !== null ? dateToDateString(date) : null);
4307
+ },
4308
+ onDateFocus: handleDateFocus
4309
+ }
4310
+ )
3951
4311
  }
3952
- );
3953
- }
3954
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3955
- import_components23.DateInput,
3956
- __spreadProps(__spreadValues({}, inputProps), {
4312
+ )
4313
+ );
4314
+ };
4315
+
4316
+ // ../renderers/src/DateInputRenderer/DateInputControl.tsx
4317
+ var import_components28 = require("@transferwise/components");
4318
+ var import_jsx_runtime51 = require("react/jsx-runtime");
4319
+ var DateInputControl = (_a) => {
4320
+ var _b = _a, { autoComplete } = _b, props = __objRest(_b, ["autoComplete"]);
4321
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4322
+ import_components28.DateInput,
4323
+ __spreadProps(__spreadValues({}, props), {
3957
4324
  dayAutoComplete: getAutocompleteString(autoComplete, "day"),
3958
4325
  yearAutoComplete: getAutocompleteString(autoComplete, "year")
3959
4326
  })
3960
4327
  );
3961
- }
4328
+ };
3962
4329
  var getAutocompleteString = (value, suffix) => {
3963
4330
  if (value === "bday") {
3964
4331
  return `${value}-${suffix}`;
3965
4332
  }
3966
4333
  return void 0;
3967
4334
  };
3968
- var VariableDateInput_default = VariableDateInput;
3969
4335
 
3970
- // ../renderers/src/DateInputRenderer.tsx
3971
- var import_jsx_runtime47 = require("react/jsx-runtime");
4336
+ // ../renderers/src/DateInputRenderer/DateInputRenderer.tsx
4337
+ var import_jsx_runtime52 = require("react/jsx-runtime");
3972
4338
  var DateInputRenderer = {
3973
4339
  canRenderType: "input-date",
3974
4340
  render: (props) => {
@@ -3992,8 +4358,17 @@ var DateInputRenderer = {
3992
4358
  "value"
3993
4359
  ]);
3994
4360
  const value = initialValue != null ? initialValue : "";
3995
- const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
3996
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4361
+ const inputProps = __spreadProps(__spreadValues({}, rest), { value, id, title, validationState });
4362
+ const UIComponent = (() => {
4363
+ if (control === "calendar") {
4364
+ return !props.disabled ? CalendarControl : DateLookupControl;
4365
+ }
4366
+ if (control === "date-lookup") {
4367
+ return DateLookupControl;
4368
+ }
4369
+ return DateInputControl;
4370
+ })();
4371
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3997
4372
  FieldInput_default,
3998
4373
  {
3999
4374
  id,
@@ -4006,7 +4381,7 @@ var DateInputRenderer = {
4006
4381
  features: props.features,
4007
4382
  control,
4008
4383
  tags: props.tags,
4009
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(VariableDateInput_default, { control, inputProps })
4384
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(UIComponent, __spreadValues({}, inputProps))
4010
4385
  }
4011
4386
  );
4012
4387
  }
@@ -4014,16 +4389,16 @@ var DateInputRenderer = {
4014
4389
  var DateInputRenderer_default = DateInputRenderer;
4015
4390
 
4016
4391
  // ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
4017
- var import_components26 = require("@transferwise/components");
4392
+ var import_components31 = require("@transferwise/components");
4018
4393
 
4019
4394
  // ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
4020
- var import_components25 = require("@transferwise/components");
4021
- var import_react12 = require("react");
4022
- var import_react_intl17 = require("react-intl");
4395
+ var import_components30 = require("@transferwise/components");
4396
+ var import_react16 = require("react");
4397
+ var import_react_intl19 = require("react-intl");
4023
4398
 
4024
4399
  // ../renderers/src/messages/filter.messages.ts
4025
- var import_react_intl14 = require("react-intl");
4026
- var filter_messages_default = (0, import_react_intl14.defineMessages)({
4400
+ var import_react_intl16 = require("react-intl");
4401
+ var filter_messages_default = (0, import_react_intl16.defineMessages)({
4027
4402
  placeholder: {
4028
4403
  id: "df.wise.filter.placeholder",
4029
4404
  defaultMessage: "Start typing to search",
@@ -4089,12 +4464,12 @@ function filterAndSortItems(options, query) {
4089
4464
  var normalizeAndRemoveAccents = (text) => text.trim().toLowerCase().normalize("NFKD").replace(new RegExp("\\p{Diacritic}", "gu"), "");
4090
4465
 
4091
4466
  // ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
4092
- var import_components24 = require("@transferwise/components");
4093
- var import_react_intl16 = require("react-intl");
4467
+ var import_components29 = require("@transferwise/components");
4468
+ var import_react_intl18 = require("react-intl");
4094
4469
 
4095
4470
  // ../renderers/src/messages/group.messages.ts
4096
- var import_react_intl15 = require("react-intl");
4097
- var group_messages_default = (0, import_react_intl15.defineMessages)({
4471
+ var import_react_intl17 = require("react-intl");
4472
+ var group_messages_default = (0, import_react_intl17.defineMessages)({
4098
4473
  all: {
4099
4474
  id: "df.wise.group.all",
4100
4475
  defaultMessage: "All",
@@ -4128,19 +4503,19 @@ var getGroupsFromTags = (knownTags, items) => {
4128
4503
  };
4129
4504
 
4130
4505
  // ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
4131
- var import_jsx_runtime48 = require("react/jsx-runtime");
4506
+ var import_jsx_runtime53 = require("react/jsx-runtime");
4132
4507
  var groupingTags = Object.keys(group_messages_default).filter((key) => key !== "all");
4133
4508
  var isGroupedDecision = (options) => {
4134
4509
  return getGroupsFromTags(groupingTags, options).length > 0;
4135
4510
  };
4136
4511
  var GroupedDecisionList = (_a) => {
4137
4512
  var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
4138
- const { formatMessage } = (0, import_react_intl16.useIntl)();
4513
+ const { formatMessage } = (0, import_react_intl18.useIntl)();
4139
4514
  const { options } = rest;
4140
4515
  const itemsByTag = [...getGroupsFromTags(groupingTags, options), { tag: "all", items: options }];
4141
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_components24.Section, { children: [
4142
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4143
- import_components24.Header,
4516
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_jsx_runtime53.Fragment, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_components29.Section, { children: [
4517
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4518
+ import_components29.Header,
4144
4519
  {
4145
4520
  as: "h2",
4146
4521
  title: tag in group_messages_default ? formatMessage(group_messages_default[tag]) : tag
@@ -4151,28 +4526,28 @@ var GroupedDecisionList = (_a) => {
4151
4526
  };
4152
4527
 
4153
4528
  // ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
4154
- var import_classnames13 = __toESM(require_classnames());
4155
- var import_jsx_runtime49 = require("react/jsx-runtime");
4529
+ var import_classnames14 = __toESM(require_classnames());
4530
+ var import_jsx_runtime54 = require("react/jsx-runtime");
4156
4531
  var DecisionWrapper = (props) => {
4157
4532
  const { margin, control, title, tags } = props;
4158
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: (0, import_classnames13.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
4159
- title && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components25.Header, { as: "h2", title }),
4160
- control === "filtered" ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(UnfilteredDecisionList, __spreadValues({}, props))
4533
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: (0, import_classnames14.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
4534
+ title && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components30.Header, { as: "h2", title }),
4535
+ control === "filtered" ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(UnfilteredDecisionList, __spreadValues({}, props))
4161
4536
  ] });
4162
4537
  };
4163
4538
  var UnfilteredDecisionList = (_a) => {
4164
4539
  var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
4165
- return isGroupedDecision(rest.options) ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList2 })) : renderDecisionList2(rest);
4540
+ return isGroupedDecision(rest.options) ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList2 })) : renderDecisionList2(rest);
4166
4541
  };
4167
4542
  var FilteredDecisionList = (props) => {
4168
- const { formatMessage } = (0, import_react_intl17.useIntl)();
4169
- const [query, setQuery] = (0, import_react12.useState)("");
4543
+ const { formatMessage } = (0, import_react_intl19.useIntl)();
4544
+ const [query, setQuery] = (0, import_react16.useState)("");
4170
4545
  const { control, options, renderDecisionList: renderDecisionList2 } = props;
4171
4546
  const filteredOptions = (query == null ? void 0 : query.length) > 0 ? filterAndSortItems(options, query) : options;
4172
4547
  const isGrouped = isGroupedDecision(options);
4173
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
4174
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4175
- import_components25.SearchInput,
4548
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
4549
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4550
+ import_components30.SearchInput,
4176
4551
  {
4177
4552
  placeholder: formatMessage(filter_messages_default.placeholder),
4178
4553
  value: query,
@@ -4183,25 +4558,25 @@ var FilteredDecisionList = (props) => {
4183
4558
  }
4184
4559
  }
4185
4560
  ),
4186
- isGrouped && query.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
4187
- query.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components25.Header, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
4561
+ isGrouped && query.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
4562
+ query.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components30.Header, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
4188
4563
  filteredOptions.length > 0 ? renderDecisionList2({
4189
4564
  control,
4190
4565
  className: query.length === 0 ? "m-t-3" : "",
4191
4566
  options: filteredOptions
4192
- }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { children: formatMessage(filter_messages_default.noResults) })
4567
+ }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { children: formatMessage(filter_messages_default.noResults) })
4193
4568
  ] })
4194
4569
  ] });
4195
4570
  };
4196
4571
 
4197
4572
  // ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
4198
- var import_jsx_runtime50 = require("react/jsx-runtime");
4573
+ var import_jsx_runtime55 = require("react/jsx-runtime");
4199
4574
  var DecisionRenderer = {
4200
4575
  canRenderType: "decision",
4201
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }))
4576
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }))
4202
4577
  };
4203
4578
  var renderDecisionList = ({ options, control }) => {
4204
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, { children: options.map((_a) => {
4579
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_jsx_runtime55.Fragment, { children: options.map((_a) => {
4205
4580
  var _b = _a, { onClick } = _b, rest = __objRest(_b, ["onClick"]);
4206
4581
  const {
4207
4582
  description,
@@ -4214,8 +4589,8 @@ var renderDecisionList = ({ options, control }) => {
4214
4589
  supportingValues,
4215
4590
  tags
4216
4591
  } = rest;
4217
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4218
- import_components26.ListItem,
4592
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4593
+ import_components31.ListItem,
4219
4594
  {
4220
4595
  title: itemTitle,
4221
4596
  subtitle: description,
@@ -4226,7 +4601,7 @@ var renderDecisionList = ({ options, control }) => {
4226
4601
  media: getMedia(media, shouldUseAvatar(control, tags)),
4227
4602
  prompt: getInlineAlert(inlineAlert),
4228
4603
  additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
4229
- control: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_components26.ListItem.Navigation, __spreadValues({}, getAnchorProps()))
4604
+ control: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components31.ListItem.Navigation, __spreadValues({}, getAnchorProps()))
4230
4605
  },
4231
4606
  JSON.stringify(rest)
4232
4607
  );
@@ -4235,9 +4610,9 @@ var renderDecisionList = ({ options, control }) => {
4235
4610
  var DecisionRenderer_default = DecisionRenderer;
4236
4611
 
4237
4612
  // ../renderers/src/DividerRenderer.tsx
4238
- var import_components27 = require("@transferwise/components");
4239
- var import_classnames14 = __toESM(require_classnames());
4240
- var import_jsx_runtime51 = require("react/jsx-runtime");
4613
+ var import_components32 = require("@transferwise/components");
4614
+ var import_classnames15 = __toESM(require_classnames());
4615
+ var import_jsx_runtime56 = require("react/jsx-runtime");
4241
4616
  var mapControlToLevel = (control) => {
4242
4617
  switch (control) {
4243
4618
  case "section":
@@ -4250,10 +4625,10 @@ var mapControlToLevel = (control) => {
4250
4625
  };
4251
4626
  var DividerRenderer = {
4252
4627
  canRenderType: "divider",
4253
- render: ({ margin, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4254
- import_components27.Divider,
4628
+ render: ({ margin, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4629
+ import_components32.Divider,
4255
4630
  {
4256
- className: (0, import_classnames14.default)(
4631
+ className: (0, import_classnames15.default)(
4257
4632
  "m-t-0",
4258
4633
  "d-block",
4259
4634
  getMargin(margin),
@@ -4266,11 +4641,11 @@ var DividerRenderer = {
4266
4641
  var DividerRenderer_default = DividerRenderer;
4267
4642
 
4268
4643
  // ../renderers/src/ExternalConfirmationRenderer.tsx
4269
- var import_components28 = require("@transferwise/components");
4644
+ var import_components33 = require("@transferwise/components");
4270
4645
 
4271
4646
  // ../renderers/src/messages/external-confirmation.messages.ts
4272
- var import_react_intl18 = require("react-intl");
4273
- var external_confirmation_messages_default = (0, import_react_intl18.defineMessages)({
4647
+ var import_react_intl20 = require("react-intl");
4648
+ var external_confirmation_messages_default = (0, import_react_intl20.defineMessages)({
4274
4649
  title: {
4275
4650
  id: "df.wise.ExternalConfirmation.title",
4276
4651
  defaultMessage: "Please confirm",
@@ -4294,9 +4669,9 @@ var external_confirmation_messages_default = (0, import_react_intl18.defineMessa
4294
4669
  });
4295
4670
 
4296
4671
  // ../renderers/src/ExternalConfirmationRenderer.tsx
4297
- var import_react_intl19 = require("react-intl");
4298
- var import_react13 = require("react");
4299
- var import_jsx_runtime52 = require("react/jsx-runtime");
4672
+ var import_react_intl21 = require("react-intl");
4673
+ var import_react17 = require("react");
4674
+ var import_jsx_runtime57 = require("react/jsx-runtime");
4300
4675
  var ExternalConfirmationRenderer = {
4301
4676
  canRenderType: "external-confirmation",
4302
4677
  render: ExternalConfirmationRendererComponent
@@ -4309,20 +4684,20 @@ function ExternalConfirmationRendererComponent({
4309
4684
  control,
4310
4685
  tags
4311
4686
  }) {
4312
- const { formatMessage } = (0, import_react_intl19.useIntl)();
4313
- (0, import_react13.useEffect)(() => {
4687
+ const { formatMessage } = (0, import_react_intl21.useIntl)();
4688
+ (0, import_react17.useEffect)(() => {
4314
4689
  open();
4315
4690
  }, []);
4316
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4317
- import_components28.Modal,
4691
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4692
+ import_components33.Modal,
4318
4693
  {
4319
4694
  open: visible,
4320
4695
  title: formatMessage(external_confirmation_messages_default.title),
4321
- body: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
4322
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components28.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
4323
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
4324
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4325
- import_components28.Button,
4696
+ body: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
4697
+ /* @__PURE__ */ (0, import_jsx_runtime57.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) }) }),
4698
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
4699
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4700
+ import_components33.Button,
4326
4701
  {
4327
4702
  v2: true,
4328
4703
  block: true,
@@ -4335,7 +4710,7 @@ function ExternalConfirmationRendererComponent({
4335
4710
  children: formatMessage(external_confirmation_messages_default.open)
4336
4711
  }
4337
4712
  ),
4338
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components28.Button, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
4713
+ /* @__PURE__ */ (0, import_jsx_runtime57.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) })
4339
4714
  ] }) })
4340
4715
  ] }),
4341
4716
  className: controlAndTagsToCSSClass({ control, tags }),
@@ -4353,51 +4728,51 @@ function getOrigin(url) {
4353
4728
  var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
4354
4729
 
4355
4730
  // ../renderers/src/FormRenderer.tsx
4356
- var import_classnames15 = __toESM(require_classnames());
4357
- var import_jsx_runtime53 = require("react/jsx-runtime");
4731
+ var import_classnames16 = __toESM(require_classnames());
4732
+ var import_jsx_runtime58 = require("react/jsx-runtime");
4358
4733
  var FormRenderer = {
4359
4734
  canRenderType: "form",
4360
- render: ({ children, margin, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: (0, import_classnames15.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children })
4735
+ render: ({ children, margin, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: (0, import_classnames16.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children })
4361
4736
  };
4362
4737
  var FormRenderer_default = FormRenderer;
4363
4738
 
4364
4739
  // ../renderers/src/FormSectionRenderer.tsx
4365
- var import_components29 = require("@transferwise/components");
4366
- var import_jsx_runtime54 = require("react/jsx-runtime");
4740
+ var import_components34 = require("@transferwise/components");
4741
+ var import_jsx_runtime59 = require("react/jsx-runtime");
4367
4742
  var FormSectionRenderer = {
4368
4743
  canRenderType: "form-section",
4369
- render: ({ title, description, children, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("fieldset", { className: controlAndTagsToCSSClass({ control, tags }), children: [
4370
- title && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4371
- import_components29.Header,
4744
+ render: ({ title, description, children, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("fieldset", { className: controlAndTagsToCSSClass({ control, tags }), children: [
4745
+ title && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
4746
+ import_components34.Header,
4372
4747
  {
4373
4748
  as: "h2",
4374
4749
  title
4375
4750
  }
4376
4751
  ),
4377
- description && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { children: description }),
4752
+ description && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { children: description }),
4378
4753
  children
4379
4754
  ] })
4380
4755
  };
4381
4756
  var FormSectionRenderer_default = FormSectionRenderer;
4382
4757
 
4383
4758
  // ../renderers/src/HeadingRenderer.tsx
4384
- var import_components30 = require("@transferwise/components");
4385
- var import_classnames16 = __toESM(require_classnames());
4386
- var import_jsx_runtime55 = require("react/jsx-runtime");
4759
+ var import_components35 = require("@transferwise/components");
4760
+ var import_classnames17 = __toESM(require_classnames());
4761
+ var import_jsx_runtime60 = require("react/jsx-runtime");
4387
4762
  var HeadingRenderer = {
4388
4763
  canRenderType: "heading",
4389
4764
  render: Heading
4390
4765
  };
4391
4766
  function Heading(props) {
4392
4767
  const { text, size, align, margin, control } = props;
4393
- const className = (0, import_classnames16.default)(
4768
+ const className = (0, import_classnames17.default)(
4394
4769
  getTextAlignmentAndMargin({ align, margin }),
4395
4770
  controlAndTagsToCSSClass(props)
4396
4771
  );
4397
- return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(StandardHeading, { size, text, className });
4772
+ return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(StandardHeading, { size, text, className });
4398
4773
  }
4399
4774
  function DisplayHeading({ size, text, className }) {
4400
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components30.Display, { type: getDisplayType(size), className, children: text });
4775
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components35.Display, { type: getDisplayType(size), className, children: text });
4401
4776
  }
4402
4777
  var getDisplayType = (size) => {
4403
4778
  switch (size) {
@@ -4413,7 +4788,7 @@ var getDisplayType = (size) => {
4413
4788
  }
4414
4789
  };
4415
4790
  function StandardHeading({ size, text, className }) {
4416
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components30.Title, { type: getTitleTypeBySize(size), className, children: text });
4791
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components35.Title, { type: getTitleTypeBySize(size), className, children: text });
4417
4792
  }
4418
4793
  var getTitleTypeBySize = (size) => {
4419
4794
  var _a;
@@ -4429,9 +4804,9 @@ var getTitleTypeBySize = (size) => {
4429
4804
  var HeadingRenderer_default = HeadingRenderer;
4430
4805
 
4431
4806
  // ../renderers/src/ImageRenderer/UrlImage.tsx
4432
- var import_components31 = require("@transferwise/components");
4433
- var import_classnames17 = __toESM(require_classnames());
4434
- var import_react14 = require("react");
4807
+ var import_components36 = require("@transferwise/components");
4808
+ var import_classnames18 = __toESM(require_classnames());
4809
+ var import_react18 = require("react");
4435
4810
 
4436
4811
  // ../renderers/src/utils/api-utils.ts
4437
4812
  function isRelativePath(url = "") {
@@ -4441,7 +4816,7 @@ function isRelativePath(url = "") {
4441
4816
  }
4442
4817
 
4443
4818
  // ../renderers/src/ImageRenderer/UrlImage.tsx
4444
- var import_jsx_runtime56 = require("react/jsx-runtime");
4819
+ var import_jsx_runtime61 = require("react/jsx-runtime");
4445
4820
  function UrlImage({
4446
4821
  accessibilityDescription,
4447
4822
  align,
@@ -4452,24 +4827,24 @@ function UrlImage({
4452
4827
  uri,
4453
4828
  httpClient
4454
4829
  }) {
4455
- const [imageSource, setImageSource] = (0, import_react14.useState)("");
4456
- (0, import_react14.useEffect)(() => {
4830
+ const [imageSource, setImageSource] = (0, import_react18.useState)("");
4831
+ (0, import_react18.useEffect)(() => {
4457
4832
  if (!uri.startsWith("urn:")) {
4458
4833
  void getImageSource(httpClient, uri).then(setImageSource);
4459
4834
  }
4460
4835
  }, [uri, httpClient]);
4461
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4836
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
4462
4837
  "div",
4463
4838
  {
4464
- className: (0, import_classnames17.default)(
4839
+ className: (0, import_classnames18.default)(
4465
4840
  "df-image",
4466
4841
  align,
4467
4842
  size || "md",
4468
4843
  getMargin(margin),
4469
4844
  controlAndTagsToCSSClass({ control, tags })
4470
4845
  ),
4471
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4472
- import_components31.Image,
4846
+ children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
4847
+ import_components36.Image,
4473
4848
  {
4474
4849
  className: "df-reserve-space",
4475
4850
  alt: accessibilityDescription != null ? accessibilityDescription : "",
@@ -4514,19 +4889,19 @@ var getImageSource = async (httpClient, imageUrl) => {
4514
4889
  };
4515
4890
 
4516
4891
  // ../renderers/src/ImageRenderer/ImageRenderer.tsx
4517
- var import_jsx_runtime57 = require("react/jsx-runtime");
4892
+ var import_jsx_runtime62 = require("react/jsx-runtime");
4518
4893
  var ImageRenderer = {
4519
4894
  canRenderType: "image",
4520
- render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(UrlImage, __spreadValues({}, props))
4895
+ render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(UrlImage, __spreadValues({}, props))
4521
4896
  };
4522
4897
 
4523
4898
  // ../renderers/src/ImageRenderer/index.tsx
4524
4899
  var ImageRenderer_default = ImageRenderer;
4525
4900
 
4526
4901
  // ../renderers/src/InstructionsRenderer.tsx
4527
- var import_components32 = require("@transferwise/components");
4528
- var import_classnames18 = __toESM(require_classnames());
4529
- var import_jsx_runtime58 = require("react/jsx-runtime");
4902
+ var import_components37 = require("@transferwise/components");
4903
+ var import_classnames19 = __toESM(require_classnames());
4904
+ var import_jsx_runtime63 = require("react/jsx-runtime");
4530
4905
  var doContext = ["positive", "neutral", "proposition"];
4531
4906
  var dontContext = ["warning", "negative"];
4532
4907
  var InstructionsRenderer = {
@@ -4534,16 +4909,16 @@ var InstructionsRenderer = {
4534
4909
  render: ({ items, margin, title, control, tags }) => {
4535
4910
  const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
4536
4911
  const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
4537
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: (0, import_classnames18.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
4538
- title ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components32.Header, { title }) : null,
4539
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components32.InstructionsList, { dos, donts })
4912
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: (0, import_classnames19.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
4913
+ title ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_components37.Header, { title }) : null,
4914
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_components37.InstructionsList, { dos, donts })
4540
4915
  ] });
4541
4916
  }
4542
4917
  };
4543
4918
  var InstructionsRenderer_default = InstructionsRenderer;
4544
4919
 
4545
4920
  // ../renderers/src/IntegerInputRenderer.tsx
4546
- var import_components33 = require("@transferwise/components");
4921
+ var import_components38 = require("@transferwise/components");
4547
4922
 
4548
4923
  // ../renderers/src/utils/input-utils.ts
4549
4924
  var onWheel = (event) => {
@@ -4568,7 +4943,7 @@ function pick(obj, ...keys) {
4568
4943
  }
4569
4944
 
4570
4945
  // ../renderers/src/IntegerInputRenderer.tsx
4571
- var import_jsx_runtime59 = require("react/jsx-runtime");
4946
+ var import_jsx_runtime64 = require("react/jsx-runtime");
4572
4947
  var IntegerInputRenderer = {
4573
4948
  canRenderType: "input-integer",
4574
4949
  render: (props) => {
@@ -4583,7 +4958,7 @@ var IntegerInputRenderer = {
4583
4958
  "maximum",
4584
4959
  "minimum"
4585
4960
  );
4586
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
4961
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4587
4962
  FieldInput_default,
4588
4963
  {
4589
4964
  id,
@@ -4596,8 +4971,8 @@ var IntegerInputRenderer = {
4596
4971
  features: props.features,
4597
4972
  control: props.control,
4598
4973
  tags: props.tags,
4599
- children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_components33.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
4600
- import_components33.Input,
4974
+ children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components38.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4975
+ import_components38.Input,
4601
4976
  __spreadValues({
4602
4977
  id,
4603
4978
  name: id,
@@ -4619,13 +4994,13 @@ var IntegerInputRenderer = {
4619
4994
  var IntegerInputRenderer_default = IntegerInputRenderer;
4620
4995
 
4621
4996
  // ../renderers/src/ListRenderer.tsx
4622
- var import_components35 = require("@transferwise/components");
4623
- var import_classnames19 = __toESM(require_classnames());
4997
+ var import_components40 = require("@transferwise/components");
4998
+ var import_classnames20 = __toESM(require_classnames());
4624
4999
 
4625
5000
  // ../renderers/src/components/Header.tsx
4626
- var import_components34 = require("@transferwise/components");
4627
- var import_jsx_runtime60 = require("react/jsx-runtime");
4628
- var Header = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components34.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) });
5001
+ var import_components39 = require("@transferwise/components");
5002
+ var import_jsx_runtime65 = require("react/jsx-runtime");
5003
+ var Header = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_components39.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) });
4629
5004
  var getHeaderAction = (callToAction) => {
4630
5005
  if (!callToAction) {
4631
5006
  return void 0;
@@ -4637,11 +5012,11 @@ var getHeaderAction = (callToAction) => {
4637
5012
  };
4638
5013
 
4639
5014
  // ../renderers/src/ListRenderer.tsx
4640
- var import_jsx_runtime61 = require("react/jsx-runtime");
5015
+ var import_jsx_runtime66 = require("react/jsx-runtime");
4641
5016
  var ListRenderer = {
4642
5017
  canRenderType: "list",
4643
- render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: (0, import_classnames19.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
4644
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Header, { title, callToAction }),
5018
+ render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: (0, import_classnames20.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
5019
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Header, { title, callToAction }),
4645
5020
  items.map((item) => {
4646
5021
  var _a, _b;
4647
5022
  const {
@@ -4658,8 +5033,8 @@ var ListRenderer = {
4658
5033
  ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
4659
5034
  fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
4660
5035
  };
4661
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
4662
- import_components35.ListItem,
5036
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5037
+ import_components40.ListItem,
4663
5038
  {
4664
5039
  title: itemTitle,
4665
5040
  subtitle: description,
@@ -4678,17 +5053,17 @@ var ListRenderer = {
4678
5053
  var ListRenderer_default = ListRenderer;
4679
5054
 
4680
5055
  // ../renderers/src/LoadingIndicatorRenderer.tsx
4681
- var import_components36 = require("@transferwise/components");
4682
- var import_classnames20 = __toESM(require_classnames());
4683
- var import_jsx_runtime62 = require("react/jsx-runtime");
5056
+ var import_components41 = require("@transferwise/components");
5057
+ var import_classnames21 = __toESM(require_classnames());
5058
+ var import_jsx_runtime67 = require("react/jsx-runtime");
4684
5059
  var LoadingIndicatorRenderer = {
4685
5060
  canRenderType: "loading-indicator",
4686
- render: ({ size, margin, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4687
- import_components36.Loader,
5061
+ render: ({ size, margin, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5062
+ import_components41.Loader,
4688
5063
  {
4689
5064
  size,
4690
5065
  classNames: {
4691
- "tw-loader": (0, import_classnames20.default)(
5066
+ "tw-loader": (0, import_classnames21.default)(
4692
5067
  "tw-loader",
4693
5068
  "m-x-auto",
4694
5069
  getMargin(margin),
@@ -4702,24 +5077,24 @@ var LoadingIndicatorRenderer = {
4702
5077
  var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
4703
5078
 
4704
5079
  // ../renderers/src/MarkdownRenderer.tsx
4705
- var import_components37 = require("@transferwise/components");
4706
- var import_classnames21 = __toESM(require_classnames());
4707
- var import_jsx_runtime63 = require("react/jsx-runtime");
5080
+ var import_components42 = require("@transferwise/components");
5081
+ var import_classnames22 = __toESM(require_classnames());
5082
+ var import_jsx_runtime68 = require("react/jsx-runtime");
4708
5083
  var MarkdownRenderer = {
4709
5084
  canRenderType: "markdown",
4710
5085
  render: ({ content, align, margin, size, control, tags }) => {
4711
5086
  const isLarge = !["xs", "sm"].includes(size);
4712
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5087
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
4713
5088
  "div",
4714
5089
  {
4715
- className: (0, import_classnames21.default)(
5090
+ className: (0, import_classnames22.default)(
4716
5091
  getTextAlignmentAndMargin({ align, margin }),
4717
5092
  controlAndTagsToCSSClass({ control, tags })
4718
5093
  ),
4719
- children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4720
- import_components37.Markdown,
5094
+ children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5095
+ import_components42.Markdown,
4721
5096
  {
4722
- className: (0, import_classnames21.default)("df-markdown", {
5097
+ className: (0, import_classnames22.default)("df-markdown", {
4723
5098
  "np-text-body-large": isLarge,
4724
5099
  "np-text-body-default": !isLarge
4725
5100
  }),
@@ -4734,17 +5109,17 @@ var MarkdownRenderer = {
4734
5109
  var MarkdownRenderer_default = MarkdownRenderer;
4735
5110
 
4736
5111
  // ../renderers/src/MediaRenderer.tsx
4737
- var import_classnames22 = __toESM(require_classnames());
4738
- var import_jsx_runtime64 = require("react/jsx-runtime");
5112
+ var import_classnames23 = __toESM(require_classnames());
5113
+ var import_jsx_runtime69 = require("react/jsx-runtime");
4739
5114
  var MediaRenderer = {
4740
5115
  canRenderType: "media",
4741
5116
  render: (_a) => {
4742
5117
  var _b = _a, { media } = _b, rest = __objRest(_b, ["media"]);
4743
5118
  switch (media.type) {
4744
5119
  case "avatar":
4745
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(AvatarMediaRendererComponent, __spreadValues({ media }, rest));
5120
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(AvatarMediaRendererComponent, __spreadValues({ media }, rest));
4746
5121
  case "image":
4747
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(ImageMediaRendererComponent, __spreadValues({ media }, rest));
5122
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ImageMediaRendererComponent, __spreadValues({ media }, rest));
4748
5123
  case "legacy":
4749
5124
  return null;
4750
5125
  }
@@ -4758,16 +5133,16 @@ var AvatarMediaRendererComponent = ({
4758
5133
  control,
4759
5134
  tags
4760
5135
  }) => {
4761
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5136
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
4762
5137
  "div",
4763
5138
  {
4764
- className: (0, import_classnames22.default)(
5139
+ className: (0, import_classnames23.default)(
4765
5140
  "df-media-layout-avatar",
4766
5141
  align,
4767
5142
  getMargin(margin),
4768
5143
  controlAndTagsToCSSClass({ control, tags })
4769
5144
  ),
4770
- children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Media, { media, size: mapAvatarMediaSize(size) })
5145
+ children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Media, { media, size: mapAvatarMediaSize(size) })
4771
5146
  }
4772
5147
  );
4773
5148
  };
@@ -4780,14 +5155,14 @@ var ImageMediaRendererComponent = (_a) => {
4780
5155
  "size"
4781
5156
  ]);
4782
5157
  var _a2, _b2;
4783
- return isUrnImage(media.uri) ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5158
+ return isUrnImage(media.uri) ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
4784
5159
  UrnImage,
4785
5160
  __spreadValues({
4786
5161
  uri: media.uri,
4787
5162
  size: (_a2 = media.size) != null ? _a2 : size,
4788
5163
  accessibilityDescription: media.accessibilityDescription
4789
5164
  }, rest)
4790
- ) : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5165
+ ) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
4791
5166
  UrlImage,
4792
5167
  __spreadValues({
4793
5168
  uri: media.uri,
@@ -4812,22 +5187,22 @@ var mapAvatarMediaSize = (size) => {
4812
5187
  };
4813
5188
 
4814
5189
  // ../renderers/src/ModalLayoutRenderer.tsx
4815
- var import_components38 = require("@transferwise/components");
4816
- var import_classnames23 = __toESM(require_classnames());
4817
- var import_react15 = require("react");
4818
- var import_jsx_runtime65 = require("react/jsx-runtime");
5190
+ var import_components43 = require("@transferwise/components");
5191
+ var import_classnames24 = __toESM(require_classnames());
5192
+ var import_react19 = require("react");
5193
+ var import_jsx_runtime70 = require("react/jsx-runtime");
4819
5194
  var ModalLayoutRenderer = {
4820
5195
  canRenderType: "modal-layout",
4821
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(DFModal, __spreadValues({}, props))
5196
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(DFModal, __spreadValues({}, props))
4822
5197
  };
4823
5198
  var ModalLayoutRenderer_default = ModalLayoutRenderer;
4824
5199
  function DFModal({ content, margin, trigger, control, tags }) {
4825
- const [visible, setVisible] = (0, import_react15.useState)(false);
5200
+ const [visible, setVisible] = (0, import_react19.useState)(false);
4826
5201
  const { children, title } = content;
4827
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: (0, import_classnames23.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
4828
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_components38.Button, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
4829
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4830
- import_components38.Modal,
5202
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: (0, import_classnames24.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
5203
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components43.Button, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
5204
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5205
+ import_components43.Modal,
4831
5206
  {
4832
5207
  scroll: "content",
4833
5208
  open: visible,
@@ -4841,13 +5216,13 @@ function DFModal({ content, margin, trigger, control, tags }) {
4841
5216
  }
4842
5217
 
4843
5218
  // ../renderers/src/ModalRenderer.tsx
4844
- var import_components39 = require("@transferwise/components");
4845
- var import_jsx_runtime66 = require("react/jsx-runtime");
5219
+ var import_components44 = require("@transferwise/components");
5220
+ var import_jsx_runtime71 = require("react/jsx-runtime");
4846
5221
  var ModalRenderer = {
4847
5222
  canRenderType: "modal",
4848
5223
  render: ({ title, children, open, onClose, control, tags }) => {
4849
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4850
- import_components39.Modal,
5224
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
5225
+ import_components44.Modal,
4851
5226
  {
4852
5227
  open,
4853
5228
  title,
@@ -4860,10 +5235,10 @@ var ModalRenderer = {
4860
5235
  };
4861
5236
 
4862
5237
  // ../renderers/src/MoneyInputRenderer.tsx
4863
- var import_components40 = require("@transferwise/components");
4864
- var import_react16 = require("react");
4865
- var import_react_intl20 = require("react-intl");
4866
- var import_jsx_runtime67 = require("react/jsx-runtime");
5238
+ var import_components45 = require("@transferwise/components");
5239
+ var import_react20 = require("react");
5240
+ var import_react_intl22 = require("react-intl");
5241
+ var import_jsx_runtime72 = require("react/jsx-runtime");
4867
5242
  var groupingTags2 = Object.keys(group_messages_default).filter((key) => key !== "all");
4868
5243
  var MoneyInputRenderer = {
4869
5244
  canRenderType: "money-input",
@@ -4887,13 +5262,13 @@ function MoneyInputRendererComponent(props) {
4887
5262
  onAmountChange,
4888
5263
  onCurrencyChange
4889
5264
  } = props;
4890
- (0, import_react16.useEffect)(() => {
5265
+ (0, import_react20.useEffect)(() => {
4891
5266
  if (!isValidIndex(selectedCurrencyIndex, currencies.length)) {
4892
5267
  onCurrencyChange(0);
4893
5268
  }
4894
5269
  }, [selectedCurrencyIndex, onCurrencyChange, currencies.length]);
4895
- const { formatMessage } = (0, import_react_intl20.useIntl)();
4896
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5270
+ const { formatMessage } = (0, import_react_intl22.useIntl)();
5271
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
4897
5272
  FieldInput_default,
4898
5273
  {
4899
5274
  id: uid,
@@ -4904,8 +5279,8 @@ function MoneyInputRendererComponent(props) {
4904
5279
  features,
4905
5280
  control,
4906
5281
  tags,
4907
- children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
4908
- import_components40.MoneyInput,
5282
+ children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5283
+ import_components45.MoneyInput,
4909
5284
  {
4910
5285
  amount: parseFloatOrNull(amountValue),
4911
5286
  searchPlaceholder: "",
@@ -4966,9 +5341,9 @@ function assertCurrencyCodeIsString(currencyCode) {
4966
5341
  }
4967
5342
 
4968
5343
  // ../renderers/src/MultiSelectInputRenderer/InlineComponent.tsx
4969
- var import_components41 = require("@transferwise/components");
4970
- var import_react17 = require("react");
4971
- var import_react_intl21 = require("react-intl");
5344
+ var import_components46 = require("@transferwise/components");
5345
+ var import_react21 = require("react");
5346
+ var import_react_intl23 = require("react-intl");
4972
5347
 
4973
5348
  // ../renderers/src/utils/items-with-index.ts
4974
5349
  var zipWithIndex = (items) => items.map((item, index) => __spreadProps(__spreadValues({}, item), {
@@ -4976,7 +5351,7 @@ var zipWithIndex = (items) => items.map((item, index) => __spreadProps(__spreadV
4976
5351
  }));
4977
5352
 
4978
5353
  // ../renderers/src/MultiSelectInputRenderer/InlineComponent.tsx
4979
- var import_jsx_runtime68 = require("react/jsx-runtime");
5354
+ var import_jsx_runtime73 = require("react/jsx-runtime");
4980
5355
  function InlineComponent(props) {
4981
5356
  const {
4982
5357
  id,
@@ -4993,13 +5368,13 @@ function InlineComponent(props) {
4993
5368
  onSelect
4994
5369
  } = props;
4995
5370
  const optionsWithIndex = zipWithIndex(options);
4996
- const [query, setQuery] = (0, import_react17.useState)("");
4997
- const { formatMessage } = (0, import_react_intl21.useIntl)();
5371
+ const [query, setQuery] = (0, import_react21.useState)("");
5372
+ const { formatMessage } = (0, import_react_intl23.useIntl)();
4998
5373
  const filtered = tags == null ? void 0 : tags.includes("filtered");
4999
5374
  const filteredOptions = query ? filterAndSortItems(optionsWithIndex, filtered ? query : "") : optionsWithIndex;
5000
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
5001
- filtered && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5002
- import_components41.SearchInput,
5375
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
5376
+ filtered && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
5377
+ import_components46.SearchInput,
5003
5378
  {
5004
5379
  placeholder: formatMessage(filter_messages_default.placeholder),
5005
5380
  disabled,
@@ -5011,7 +5386,7 @@ function InlineComponent(props) {
5011
5386
  }
5012
5387
  }
5013
5388
  ),
5014
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5389
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
5015
5390
  FieldInput_default,
5016
5391
  {
5017
5392
  id,
@@ -5036,8 +5411,8 @@ function InlineComponent(props) {
5036
5411
  childrenProps
5037
5412
  } = option;
5038
5413
  const key = (_a = childrenProps == null ? void 0 : childrenProps.uid) != null ? _a : index;
5039
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5040
- import_components41.ListItem,
5414
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
5415
+ import_components46.ListItem,
5041
5416
  {
5042
5417
  title: itemTitle,
5043
5418
  subtitle,
@@ -5045,10 +5420,10 @@ function InlineComponent(props) {
5045
5420
  valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
5046
5421
  media: getMedia(media, false),
5047
5422
  prompt: getInlineAlert(inlineAlert),
5048
- additionalInfo: additionalText ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_components41.ListItem.AdditionalInfo, { children: additionalText }) : void 0,
5423
+ additionalInfo: additionalText ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_components46.ListItem.AdditionalInfo, { children: additionalText }) : void 0,
5049
5424
  disabled: disabled || optionDisabled,
5050
- control: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5051
- import_components41.ListItem.Checkbox,
5425
+ control: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
5426
+ import_components46.ListItem.Checkbox,
5052
5427
  {
5053
5428
  checked: selectedIndices.includes(index),
5054
5429
  onChange: (e) => {
@@ -5067,13 +5442,13 @@ function InlineComponent(props) {
5067
5442
  }
5068
5443
 
5069
5444
  // ../renderers/src/MultiSelectInputRenderer/DefaultComponent.tsx
5070
- var import_components42 = require("@transferwise/components");
5071
- var import_react18 = require("react");
5072
- var import_react_intl23 = require("react-intl");
5445
+ var import_components47 = require("@transferwise/components");
5446
+ var import_react22 = require("react");
5447
+ var import_react_intl25 = require("react-intl");
5073
5448
 
5074
5449
  // ../renderers/src/messages/multi-select.messages.ts
5075
- var import_react_intl22 = require("react-intl");
5076
- var multi_select_messages_default = (0, import_react_intl22.defineMessages)({
5450
+ var import_react_intl24 = require("react-intl");
5451
+ var multi_select_messages_default = (0, import_react_intl24.defineMessages)({
5077
5452
  summary: {
5078
5453
  id: "df.wise.MultiSelect.summary",
5079
5454
  defaultMessage: "{first} and {count} more",
@@ -5082,10 +5457,10 @@ var multi_select_messages_default = (0, import_react_intl22.defineMessages)({
5082
5457
  });
5083
5458
 
5084
5459
  // ../renderers/src/MultiSelectInputRenderer/DefaultComponent.tsx
5085
- var import_jsx_runtime69 = require("react/jsx-runtime");
5460
+ var import_jsx_runtime74 = require("react/jsx-runtime");
5086
5461
  function DefaultComponent(props) {
5087
- const { formatMessage } = (0, import_react_intl23.useIntl)();
5088
- const [stagedIndices, setStagedIndices] = (0, import_react18.useState)();
5462
+ const { formatMessage } = (0, import_react_intl25.useIntl)();
5463
+ const [stagedIndices, setStagedIndices] = (0, import_react22.useState)();
5089
5464
  const {
5090
5465
  id,
5091
5466
  autoComplete,
@@ -5126,12 +5501,12 @@ function DefaultComponent(props) {
5126
5501
  const contentProps = {
5127
5502
  title: option.title,
5128
5503
  description: option.description,
5129
- icon: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
5504
+ icon: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
5130
5505
  };
5131
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_components42.SelectInputOptionContent, __spreadValues({}, contentProps));
5506
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components47.SelectInputOptionContent, __spreadValues({}, contentProps));
5132
5507
  };
5133
5508
  const extraProps = { autoComplete };
5134
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
5509
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
5135
5510
  FieldInput_default,
5136
5511
  {
5137
5512
  id,
@@ -5142,8 +5517,8 @@ function DefaultComponent(props) {
5142
5517
  features,
5143
5518
  control,
5144
5519
  tags,
5145
- children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
5146
- import_components42.SelectInput,
5520
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
5521
+ import_components47.SelectInput,
5147
5522
  __spreadValues({
5148
5523
  id,
5149
5524
  items: options.map((option, index) => {
@@ -5181,8 +5556,8 @@ function DefaultComponent(props) {
5181
5556
  }
5182
5557
 
5183
5558
  // ../renderers/src/MultiSelectInputRenderer/InlineCheckboxComponent.tsx
5184
- var import_components43 = require("@transferwise/components");
5185
- var import_jsx_runtime70 = require("react/jsx-runtime");
5559
+ var import_components48 = require("@transferwise/components");
5560
+ var import_jsx_runtime75 = require("react/jsx-runtime");
5186
5561
  function InlineCheckboxComponent(props) {
5187
5562
  const {
5188
5563
  id,
@@ -5198,7 +5573,7 @@ function InlineCheckboxComponent(props) {
5198
5573
  tags,
5199
5574
  onSelect
5200
5575
  } = props;
5201
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5576
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
5202
5577
  FieldInput_default,
5203
5578
  {
5204
5579
  id,
@@ -5229,35 +5604,35 @@ function InlineCheckboxComponent(props) {
5229
5604
  onSelect(newSelectedIndices);
5230
5605
  }
5231
5606
  };
5232
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components43.Checkbox, __spreadProps(__spreadValues({}, checkboxProps), { className: "m-t-1" }), key);
5607
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components48.Checkbox, __spreadProps(__spreadValues({}, checkboxProps), { className: "m-t-1" }), key);
5233
5608
  })
5234
5609
  }
5235
5610
  );
5236
5611
  }
5237
5612
 
5238
5613
  // ../renderers/src/MultiSelectInputRenderer/MultiSelectInputRenderer.tsx
5239
- var import_jsx_runtime71 = require("react/jsx-runtime");
5614
+ var import_jsx_runtime76 = require("react/jsx-runtime");
5240
5615
  var MultiSelectInputRenderer = {
5241
5616
  canRenderType: "input-multi-select",
5242
5617
  render: (props) => {
5243
5618
  switch (props.control) {
5244
5619
  case "inline":
5245
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(InlineComponent, __spreadValues({}, props));
5620
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(InlineComponent, __spreadValues({}, props));
5246
5621
  case "inline-checkbox-group":
5247
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(InlineCheckboxComponent, __spreadValues({}, props));
5622
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(InlineCheckboxComponent, __spreadValues({}, props));
5248
5623
  default:
5249
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(DefaultComponent, __spreadValues({}, props));
5624
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(DefaultComponent, __spreadValues({}, props));
5250
5625
  }
5251
5626
  }
5252
5627
  };
5253
5628
 
5254
5629
  // ../renderers/src/MultiUploadInputRenderer.tsx
5255
- var import_components45 = require("@transferwise/components");
5630
+ var import_components50 = require("@transferwise/components");
5256
5631
 
5257
5632
  // ../renderers/src/components/UploadFieldInput.tsx
5258
- var import_components44 = require("@transferwise/components");
5259
- var import_classnames24 = __toESM(require_classnames());
5260
- var import_jsx_runtime72 = require("react/jsx-runtime");
5633
+ var import_components49 = require("@transferwise/components");
5634
+ var import_classnames25 = __toESM(require_classnames());
5635
+ var import_jsx_runtime77 = require("react/jsx-runtime");
5261
5636
  function UploadFieldInput({
5262
5637
  id,
5263
5638
  children,
@@ -5269,14 +5644,14 @@ function UploadFieldInput({
5269
5644
  control,
5270
5645
  tags
5271
5646
  }) {
5272
- const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(LabelContentWithHelp, { text: label, help }) : label;
5647
+ const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(LabelContentWithHelp, { text: label, help }) : label;
5273
5648
  const descriptionId = description ? `${id}-description` : void 0;
5274
5649
  const { ref } = useScrollToError(validation, features);
5275
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
5650
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
5276
5651
  "div",
5277
5652
  {
5278
5653
  ref,
5279
- className: (0, import_classnames24.default)(
5654
+ className: (0, import_classnames25.default)(
5280
5655
  "form-group d-block",
5281
5656
  {
5282
5657
  "has-error": (validation == null ? void 0 : validation.status) === "invalid"
@@ -5284,9 +5659,9 @@ function UploadFieldInput({
5284
5659
  controlAndTagsToCSSClass({ control, tags })
5285
5660
  ),
5286
5661
  children: [
5287
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
5662
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
5288
5663
  children,
5289
- (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_components44.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
5664
+ (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components49.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
5290
5665
  ]
5291
5666
  }
5292
5667
  );
@@ -5321,7 +5696,7 @@ var getSizeLimit = (maxSize) => {
5321
5696
  };
5322
5697
 
5323
5698
  // ../renderers/src/MultiUploadInputRenderer.tsx
5324
- var import_jsx_runtime73 = require("react/jsx-runtime");
5699
+ var import_jsx_runtime78 = require("react/jsx-runtime");
5325
5700
  var MultiUploadInputRenderer = {
5326
5701
  canRenderType: "input-upload-multi",
5327
5702
  render: (props) => {
@@ -5349,7 +5724,7 @@ var MultiUploadInputRenderer = {
5349
5724
  };
5350
5725
  const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
5351
5726
  const descriptionId = description ? `${id}-description` : void 0;
5352
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
5727
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
5353
5728
  UploadFieldInput_default,
5354
5729
  {
5355
5730
  id,
@@ -5360,8 +5735,8 @@ var MultiUploadInputRenderer = {
5360
5735
  features,
5361
5736
  control,
5362
5737
  tags,
5363
- children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
5364
- import_components45.UploadInput,
5738
+ children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
5739
+ import_components50.UploadInput,
5365
5740
  {
5366
5741
  id,
5367
5742
  "aria-describedby": descriptionId,
@@ -5370,7 +5745,7 @@ var MultiUploadInputRenderer = {
5370
5745
  files: value.map(({ id: fileId, file, validationState: fileValidationState }) => ({
5371
5746
  id: fileId,
5372
5747
  filename: file.name,
5373
- status: (fileValidationState == null ? void 0 : fileValidationState.status) === "invalid" ? import_components45.Status.FAILED : import_components45.Status.SUCCEEDED
5748
+ status: (fileValidationState == null ? void 0 : fileValidationState.status) === "invalid" ? import_components50.Status.FAILED : import_components50.Status.SUCCEEDED
5374
5749
  })),
5375
5750
  fileTypes: acceptsToFileTypes(accepts),
5376
5751
  maxFiles: maxItems,
@@ -5388,8 +5763,8 @@ var MultiUploadInputRenderer = {
5388
5763
  var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
5389
5764
 
5390
5765
  // ../renderers/src/NumberInputRenderer.tsx
5391
- var import_components46 = require("@transferwise/components");
5392
- var import_jsx_runtime74 = require("react/jsx-runtime");
5766
+ var import_components51 = require("@transferwise/components");
5767
+ var import_jsx_runtime79 = require("react/jsx-runtime");
5393
5768
  var NumberInputRenderer = {
5394
5769
  canRenderType: "input-number",
5395
5770
  render: (props) => {
@@ -5403,7 +5778,7 @@ var NumberInputRenderer = {
5403
5778
  "maximum",
5404
5779
  "minimum"
5405
5780
  );
5406
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
5781
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
5407
5782
  FieldInput_default,
5408
5783
  {
5409
5784
  id,
@@ -5416,8 +5791,8 @@ var NumberInputRenderer = {
5416
5791
  features: props.features,
5417
5792
  control: props.control,
5418
5793
  tags: props.tags,
5419
- children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components46.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
5420
- import_components46.Input,
5794
+ children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components51.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
5795
+ import_components51.Input,
5421
5796
  __spreadValues({
5422
5797
  id,
5423
5798
  name: id,
@@ -5437,22 +5812,22 @@ var NumberInputRenderer = {
5437
5812
  var NumberInputRenderer_default = NumberInputRenderer;
5438
5813
 
5439
5814
  // ../renderers/src/ParagraphRenderer.tsx
5440
- var import_components48 = require("@transferwise/components");
5441
- var import_classnames25 = __toESM(require_classnames());
5442
- var import_react_intl25 = require("react-intl");
5815
+ var import_components53 = require("@transferwise/components");
5816
+ var import_classnames26 = __toESM(require_classnames());
5817
+ var import_react_intl27 = require("react-intl");
5443
5818
 
5444
5819
  // ../renderers/src/hooks/useSnackBarIfAvailable.ts
5445
- var import_components47 = require("@transferwise/components");
5446
- var import_react19 = require("react");
5820
+ var import_components52 = require("@transferwise/components");
5821
+ var import_react23 = require("react");
5447
5822
  function useSnackBarIfAvailable() {
5448
- const context = (0, import_react19.useContext)(import_components47.SnackbarContext);
5823
+ const context = (0, import_react23.useContext)(import_components52.SnackbarContext);
5449
5824
  return context ? context.createSnackbar : () => {
5450
5825
  };
5451
5826
  }
5452
5827
 
5453
5828
  // ../renderers/src/messages/paragraph.messages.ts
5454
- var import_react_intl24 = require("react-intl");
5455
- var paragraph_messages_default = (0, import_react_intl24.defineMessages)({
5829
+ var import_react_intl26 = require("react-intl");
5830
+ var paragraph_messages_default = (0, import_react_intl26.defineMessages)({
5456
5831
  copy: {
5457
5832
  id: "df.wise.DynamicParagraph.copy",
5458
5833
  defaultMessage: "Copy",
@@ -5466,18 +5841,18 @@ var paragraph_messages_default = (0, import_react_intl24.defineMessages)({
5466
5841
  });
5467
5842
 
5468
5843
  // ../renderers/src/ParagraphRenderer.tsx
5469
- var import_jsx_runtime75 = require("react/jsx-runtime");
5844
+ var import_jsx_runtime80 = require("react/jsx-runtime");
5470
5845
  var ParagraphRenderer = {
5471
5846
  canRenderType: "paragraph",
5472
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Paragraph, __spreadValues({}, props))
5847
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Paragraph, __spreadValues({}, props))
5473
5848
  };
5474
5849
  function Paragraph(props) {
5475
5850
  const { align, control, margin, size, text } = props;
5476
- const className = (0, import_classnames25.default)(
5851
+ const className = (0, import_classnames26.default)(
5477
5852
  getTextAlignmentAndMargin({ align, margin }),
5478
5853
  controlAndTagsToCSSClass(props)
5479
5854
  );
5480
- return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
5855
+ return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
5481
5856
  "p",
5482
5857
  {
5483
5858
  className: `${["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large"} ${className}`,
@@ -5490,41 +5865,41 @@ function CopyableParagraph({
5490
5865
  align,
5491
5866
  className
5492
5867
  }) {
5493
- const { formatMessage } = (0, import_react_intl25.useIntl)();
5868
+ const { formatMessage } = (0, import_react_intl27.useIntl)();
5494
5869
  const createSnackbar = useSnackBarIfAvailable();
5495
5870
  const copy = () => {
5496
5871
  navigator.clipboard.writeText(text).then(() => createSnackbar({ text: formatMessage(paragraph_messages_default.copied) })).catch(() => {
5497
5872
  });
5498
5873
  };
5499
5874
  const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
5500
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className, children: [
5501
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
5502
- import_components48.Input,
5875
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className, children: [
5876
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
5877
+ import_components53.Input,
5503
5878
  {
5504
5879
  type: "text",
5505
5880
  value: text,
5506
5881
  readOnly: true,
5507
- className: (0, import_classnames25.default)("text-ellipsis", inputAlignmentClasses)
5882
+ className: (0, import_classnames26.default)("text-ellipsis", inputAlignmentClasses)
5508
5883
  }
5509
5884
  ),
5510
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components48.Button, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
5885
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components53.Button, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
5511
5886
  ] });
5512
5887
  }
5513
5888
  var ParagraphRenderer_default = ParagraphRenderer;
5514
5889
 
5515
5890
  // ../renderers/src/ProgressRenderer.tsx
5516
- var import_components49 = require("@transferwise/components");
5517
- var import_classnames26 = __toESM(require_classnames());
5518
- var import_jsx_runtime76 = require("react/jsx-runtime");
5891
+ var import_components54 = require("@transferwise/components");
5892
+ var import_classnames27 = __toESM(require_classnames());
5893
+ var import_jsx_runtime81 = require("react/jsx-runtime");
5519
5894
  var ProgressRenderer = {
5520
5895
  canRenderType: "progress",
5521
5896
  render: ({ uid, title, help, progress, progressText, margin, description, control, tags }) => {
5522
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
5523
- import_components49.ProgressBar,
5897
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
5898
+ import_components54.ProgressBar,
5524
5899
  {
5525
5900
  id: uid,
5526
- className: (0, import_classnames26.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
5527
- title: title && help ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(LabelContentWithHelp, { text: title, help }) : title,
5901
+ className: (0, import_classnames27.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
5902
+ title: title && help ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(LabelContentWithHelp, { text: title, help }) : title,
5528
5903
  description,
5529
5904
  progress: {
5530
5905
  max: 1,
@@ -5537,15 +5912,15 @@ var ProgressRenderer = {
5537
5912
  };
5538
5913
 
5539
5914
  // ../renderers/src/RepeatableRenderer.tsx
5540
- var import_components50 = require("@transferwise/components");
5541
- var import_icons2 = require("@transferwise/icons");
5542
- var import_classnames27 = __toESM(require_classnames());
5543
- var import_react20 = require("react");
5544
- var import_react_intl27 = require("react-intl");
5915
+ var import_components55 = require("@transferwise/components");
5916
+ var import_icons3 = require("@transferwise/icons");
5917
+ var import_classnames28 = __toESM(require_classnames());
5918
+ var import_react24 = require("react");
5919
+ var import_react_intl29 = require("react-intl");
5545
5920
 
5546
5921
  // ../renderers/src/messages/repeatable.messages.ts
5547
- var import_react_intl26 = require("react-intl");
5548
- var repeatable_messages_default = (0, import_react_intl26.defineMessages)({
5922
+ var import_react_intl28 = require("react-intl");
5923
+ var repeatable_messages_default = (0, import_react_intl28.defineMessages)({
5549
5924
  addItemTitle: {
5550
5925
  id: "df.wise.ArraySchema.addItemTitle",
5551
5926
  defaultMessage: "Add Item",
@@ -5569,10 +5944,10 @@ var repeatable_messages_default = (0, import_react_intl26.defineMessages)({
5569
5944
  });
5570
5945
 
5571
5946
  // ../renderers/src/RepeatableRenderer.tsx
5572
- var import_jsx_runtime77 = require("react/jsx-runtime");
5947
+ var import_jsx_runtime82 = require("react/jsx-runtime");
5573
5948
  var RepeatableRenderer = {
5574
5949
  canRenderType: "repeatable",
5575
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Repeatable, __spreadValues({}, props))
5950
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Repeatable, __spreadValues({}, props))
5576
5951
  };
5577
5952
  function Repeatable(props) {
5578
5953
  const {
@@ -5589,8 +5964,8 @@ function Repeatable(props) {
5589
5964
  onSave,
5590
5965
  onRemove
5591
5966
  } = props;
5592
- const { formatMessage } = (0, import_react_intl27.useIntl)();
5593
- const [openModalType, setOpenModalType] = (0, import_react20.useState)(null);
5967
+ const { formatMessage } = (0, import_react_intl29.useIntl)();
5968
+ const [openModalType, setOpenModalType] = (0, import_react24.useState)(null);
5594
5969
  const { ref } = useScrollToError(validationState, features);
5595
5970
  const onAddItem = () => {
5596
5971
  onAdd();
@@ -5613,43 +5988,43 @@ function Repeatable(props) {
5613
5988
  const onCancelEdit = () => {
5614
5989
  setOpenModalType(null);
5615
5990
  };
5616
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
5617
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { ref, className: controlAndTagsToCSSClass(props), children: [
5618
- title && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components50.Header, { title }),
5619
- description && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("p", { children: description }),
5620
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
5991
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
5992
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { ref, className: controlAndTagsToCSSClass(props), children: [
5993
+ title && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components55.Header, { title }),
5994
+ description && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { children: description }),
5995
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
5621
5996
  "div",
5622
5997
  {
5623
- className: (0, import_classnames27.default)("form-group", {
5998
+ className: (0, import_classnames28.default)("form-group", {
5624
5999
  "has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
5625
6000
  }),
5626
6001
  children: [
5627
- items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
5628
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
5629
- import_components50.NavigationOption,
6002
+ items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
6003
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
6004
+ import_components55.NavigationOption,
5630
6005
  {
5631
- media: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_icons2.Plus, {}),
6006
+ media: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_icons3.Plus, {}),
5632
6007
  title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
5633
6008
  showMediaAtAllSizes: true,
5634
6009
  onClick: () => onAddItem()
5635
6010
  }
5636
6011
  ),
5637
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components50.InlineAlert, { type: "negative", children: validationState.message })
6012
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components55.InlineAlert, { type: "negative", children: validationState.message })
5638
6013
  ]
5639
6014
  }
5640
6015
  )
5641
6016
  ] }),
5642
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
5643
- import_components50.Modal,
6017
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
6018
+ import_components55.Modal,
5644
6019
  {
5645
6020
  open: openModalType !== null,
5646
6021
  title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
5647
- body: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
5648
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "m-b-2", children: editableItem }),
5649
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { children: [
5650
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components50.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
5651
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
5652
- import_components50.Button,
6022
+ body: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
6023
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "m-b-2", children: editableItem }),
6024
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { children: [
6025
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components55.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
6026
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
6027
+ import_components55.Button,
5653
6028
  {
5654
6029
  v2: true,
5655
6030
  priority: "secondary",
@@ -5670,10 +6045,10 @@ function ItemSummaryOption({
5670
6045
  item,
5671
6046
  onClick
5672
6047
  }) {
5673
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
5674
- import_components50.NavigationOption,
6048
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
6049
+ import_components55.NavigationOption,
5675
6050
  {
5676
- media: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(OptionMedia, { media: item.media, preferAvatar: false }),
6051
+ media: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(OptionMedia, { media: item.media, preferAvatar: false }),
5677
6052
  title: item.title,
5678
6053
  content: item.description,
5679
6054
  showMediaAtAllSizes: true,
@@ -5685,17 +6060,17 @@ function ItemSummaryOption({
5685
6060
  var RepeatableRenderer_default = RepeatableRenderer;
5686
6061
 
5687
6062
  // ../renderers/src/ReviewLegacyRenderer.tsx
5688
- var import_components51 = require("@transferwise/components");
5689
- var import_classnames28 = __toESM(require_classnames());
5690
- var import_jsx_runtime78 = require("react/jsx-runtime");
6063
+ var import_components56 = require("@transferwise/components");
6064
+ var import_classnames29 = __toESM(require_classnames());
6065
+ var import_jsx_runtime83 = require("react/jsx-runtime");
5691
6066
  var ReviewRenderer = {
5692
6067
  canRenderType: "review",
5693
6068
  render: ({ callToAction, control, fields, margin, title, trackEvent, tags }) => {
5694
6069
  const orientation = mapControlToDefinitionListLayout(control);
5695
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: (0, import_classnames28.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
5696
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Header, { title, callToAction }),
5697
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
5698
- import_components51.DefinitionList,
6070
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: (0, import_classnames29.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
6071
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Header, { title, callToAction }),
6072
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
6073
+ import_components56.DefinitionList,
5699
6074
  {
5700
6075
  layout: orientation,
5701
6076
  definitions: fields.map(
@@ -5732,21 +6107,21 @@ var mapControlToDefinitionListLayout = (control) => {
5732
6107
  };
5733
6108
  var getFieldLabel = (label, help, onClick) => {
5734
6109
  if (help) {
5735
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
6110
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
5736
6111
  label,
5737
6112
  " ",
5738
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Help_default, { help, onClick })
6113
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Help_default, { help, onClick })
5739
6114
  ] });
5740
6115
  }
5741
6116
  return label;
5742
6117
  };
5743
6118
 
5744
6119
  // ../renderers/src/ReviewRenderer.tsx
5745
- var import_components52 = require("@transferwise/components");
5746
- var import_icons3 = require("@transferwise/icons");
5747
- var import_classnames29 = __toESM(require_classnames());
5748
- var import_react_intl28 = require("react-intl");
5749
- var import_jsx_runtime79 = require("react/jsx-runtime");
6120
+ var import_components57 = require("@transferwise/components");
6121
+ var import_icons4 = require("@transferwise/icons");
6122
+ var import_classnames30 = __toESM(require_classnames());
6123
+ var import_react_intl30 = require("react-intl");
6124
+ var import_jsx_runtime84 = require("react/jsx-runtime");
5750
6125
  var IGNORED_CONTROLS = [
5751
6126
  "horizontal",
5752
6127
  "horizontal-end-aligned",
@@ -5756,7 +6131,7 @@ var IGNORED_CONTROLS = [
5756
6131
  var ReviewRenderer2 = {
5757
6132
  canRenderType: "review",
5758
6133
  canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
5759
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Review, __spreadValues({}, props))
6134
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Review, __spreadValues({}, props))
5760
6135
  };
5761
6136
  var Review = ({
5762
6137
  callToAction,
@@ -5767,9 +6142,9 @@ var Review = ({
5767
6142
  title,
5768
6143
  trackEvent
5769
6144
  }) => {
5770
- const intl = (0, import_react_intl28.useIntl)();
5771
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: (0, import_classnames29.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
5772
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Header, { title, callToAction }),
6145
+ const intl = (0, import_react_intl30.useIntl)();
6146
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: (0, import_classnames30.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
6147
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Header, { title, callToAction }),
5773
6148
  fields.map((field) => {
5774
6149
  var _a, _b, _c;
5775
6150
  const {
@@ -5787,8 +6162,8 @@ var Review = ({
5787
6162
  ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
5788
6163
  fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
5789
6164
  };
5790
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
5791
- import_components52.ListItem,
6165
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6166
+ import_components57.ListItem,
5792
6167
  {
5793
6168
  title: value,
5794
6169
  subtitle: label,
@@ -5808,18 +6183,18 @@ var Review = ({
5808
6183
  ] });
5809
6184
  };
5810
6185
  var getHelpControl = (help, ariaLabel, onClick) => {
5811
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components52.Popover, { content: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components52.Markdown, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components52.ListItem.IconButton, { partiallyInteractive: true, "aria-label": ariaLabel, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_icons3.QuestionMarkCircle, {}) }) });
6186
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components57.Popover, { content: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components57.Markdown, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components57.ListItem.IconButton, { partiallyInteractive: true, "aria-label": ariaLabel, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_icons4.QuestionMarkCircle, {}) }) });
5812
6187
  };
5813
6188
  var ReviewRenderer_default = ReviewRenderer2;
5814
6189
 
5815
6190
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
5816
- var import_components54 = require("@transferwise/components");
5817
- var import_react21 = require("react");
5818
- var import_react_intl31 = require("react-intl");
6191
+ var import_components59 = require("@transferwise/components");
6192
+ var import_react25 = require("react");
6193
+ var import_react_intl33 = require("react-intl");
5819
6194
 
5820
6195
  // ../renderers/src/messages/search.messages.ts
5821
- var import_react_intl29 = require("react-intl");
5822
- var search_messages_default = (0, import_react_intl29.defineMessages)({
6196
+ var import_react_intl31 = require("react-intl");
6197
+ var search_messages_default = (0, import_react_intl31.defineMessages)({
5823
6198
  loading: {
5824
6199
  id: "df.wise.SearchLayout.loading",
5825
6200
  defaultMessage: "Loading...",
@@ -5828,21 +6203,21 @@ var search_messages_default = (0, import_react_intl29.defineMessages)({
5828
6203
  });
5829
6204
 
5830
6205
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
5831
- var import_react_intl30 = require("react-intl");
5832
- var import_components53 = require("@transferwise/components");
5833
- var import_jsx_runtime80 = require("react/jsx-runtime");
6206
+ var import_react_intl32 = require("react-intl");
6207
+ var import_components58 = require("@transferwise/components");
6208
+ var import_jsx_runtime85 = require("react/jsx-runtime");
5834
6209
  function ErrorResult({ state }) {
5835
- const intl = (0, import_react_intl30.useIntl)();
5836
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("p", { className: "m-t-2", children: [
6210
+ const intl = (0, import_react_intl32.useIntl)();
6211
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("p", { className: "m-t-2", children: [
5837
6212
  intl.formatMessage(generic_error_messages_default.genericError),
5838
6213
  "\xA0",
5839
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components53.Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
6214
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_components58.Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
5840
6215
  ] });
5841
6216
  }
5842
6217
 
5843
6218
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
5844
- var import_icons4 = require("@transferwise/icons");
5845
- var import_jsx_runtime81 = require("react/jsx-runtime");
6219
+ var import_icons5 = require("@transferwise/icons");
6220
+ var import_jsx_runtime86 = require("react/jsx-runtime");
5846
6221
  function BlockSearchRendererComponent({
5847
6222
  id,
5848
6223
  hint,
@@ -5857,10 +6232,10 @@ function BlockSearchRendererComponent({
5857
6232
  trackEvent,
5858
6233
  onChange
5859
6234
  }) {
5860
- const [hasSearched, setHasSearched] = (0, import_react21.useState)(false);
5861
- const { formatMessage } = (0, import_react_intl31.useIntl)();
5862
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: getMargin(margin), children: [
5863
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
6235
+ const [hasSearched, setHasSearched] = (0, import_react25.useState)(false);
6236
+ const { formatMessage } = (0, import_react_intl33.useIntl)();
6237
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: getMargin(margin), children: [
6238
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
5864
6239
  FieldInput_default,
5865
6240
  {
5866
6241
  id,
@@ -5871,8 +6246,8 @@ function BlockSearchRendererComponent({
5871
6246
  features,
5872
6247
  control,
5873
6248
  tags,
5874
- children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components54.InputGroup, { addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_icons4.Search, { size: 24 }) }, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
5875
- import_components54.Input,
6249
+ children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_components59.InputGroup, { addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_icons5.Search, { size: 24 }) }, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
6250
+ import_components59.Input,
5876
6251
  {
5877
6252
  id,
5878
6253
  name: id,
@@ -5891,7 +6266,7 @@ function BlockSearchRendererComponent({
5891
6266
  ) })
5892
6267
  }
5893
6268
  ),
5894
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(SearchResultContent, { state, trackEvent })
6269
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(SearchResultContent, { state, trackEvent })
5895
6270
  ] });
5896
6271
  }
5897
6272
  function SearchResultContent({
@@ -5900,39 +6275,39 @@ function SearchResultContent({
5900
6275
  }) {
5901
6276
  switch (state.type) {
5902
6277
  case "error":
5903
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(ErrorResult, { state });
6278
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ErrorResult, { state });
5904
6279
  case "results":
5905
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(SearchResults, { state, trackEvent });
6280
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(SearchResults, { state, trackEvent });
5906
6281
  case "layout":
5907
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
6282
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
5908
6283
  " ",
5909
6284
  state.layout,
5910
6285
  " "
5911
6286
  ] });
5912
6287
  case "noResults":
5913
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(EmptySearchResult, { state });
6288
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(EmptySearchResult, { state });
5914
6289
  case "pending":
5915
6290
  default:
5916
6291
  return null;
5917
6292
  }
5918
6293
  }
5919
6294
  function EmptySearchResult({ state }) {
5920
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components54.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
6295
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_components59.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
5921
6296
  }
5922
6297
  function SearchResults({
5923
6298
  state,
5924
6299
  trackEvent
5925
6300
  }) {
5926
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components54.List, { children: state.results.map((result) => {
6301
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_components59.List, { children: state.results.map((result) => {
5927
6302
  const { media } = result;
5928
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
5929
- import_components54.ListItem,
6303
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
6304
+ import_components59.ListItem,
5930
6305
  {
5931
6306
  title: result.title,
5932
6307
  subtitle: result.description,
5933
- media: media ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(OptionMedia, { media, preferAvatar: false }) : void 0,
5934
- control: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
5935
- import_components54.ListItem.Navigation,
6308
+ media: media ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(OptionMedia, { media, preferAvatar: false }) : void 0,
6309
+ control: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
6310
+ import_components59.ListItem.Navigation,
5936
6311
  {
5937
6312
  onClick: () => {
5938
6313
  trackEvent("Search Result Selected", __spreadValues({
@@ -5950,11 +6325,11 @@ function SearchResults({
5950
6325
  var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
5951
6326
 
5952
6327
  // ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
5953
- var import_components55 = require("@transferwise/components");
5954
- var import_icons5 = require("@transferwise/icons");
5955
- var import_react22 = require("react");
5956
- var import_react_intl32 = require("react-intl");
5957
- var import_jsx_runtime82 = require("react/jsx-runtime");
6328
+ var import_components60 = require("@transferwise/components");
6329
+ var import_icons6 = require("@transferwise/icons");
6330
+ var import_react26 = require("react");
6331
+ var import_react_intl34 = require("react-intl");
6332
+ var import_jsx_runtime87 = require("react/jsx-runtime");
5958
6333
  function InlineSearchRenderer({
5959
6334
  id,
5960
6335
  hint,
@@ -5968,9 +6343,9 @@ function InlineSearchRenderer({
5968
6343
  onChange,
5969
6344
  trackEvent
5970
6345
  }) {
5971
- const [hasSearched, setHasSearched] = (0, import_react22.useState)(false);
5972
- const intl = (0, import_react_intl32.useIntl)();
5973
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
6346
+ const [hasSearched, setHasSearched] = (0, import_react26.useState)(false);
6347
+ const intl = (0, import_react_intl34.useIntl)();
6348
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
5974
6349
  FieldInput_default,
5975
6350
  {
5976
6351
  id,
@@ -5981,8 +6356,8 @@ function InlineSearchRenderer({
5981
6356
  features,
5982
6357
  control,
5983
6358
  tags,
5984
- children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
5985
- import_components55.Typeahead,
6359
+ children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
6360
+ import_components60.Typeahead,
5986
6361
  {
5987
6362
  id: "typeahead-input-id",
5988
6363
  intl,
@@ -5990,10 +6365,10 @@ function InlineSearchRenderer({
5990
6365
  size: "md",
5991
6366
  placeholder: hint,
5992
6367
  maxHeight: 100,
5993
- footer: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(TypeaheadFooter, { state, isLoading }),
6368
+ footer: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(TypeaheadFooter, { state, isLoading }),
5994
6369
  multiple: false,
5995
6370
  clearable: false,
5996
- addon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_icons5.Search, { size: 24 }),
6371
+ addon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_icons6.Search, { size: 24 }),
5997
6372
  options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
5998
6373
  minQueryLength: 1,
5999
6374
  onChange: (values) => {
@@ -6030,34 +6405,34 @@ function mapResultToTypeaheadOption(result) {
6030
6405
  };
6031
6406
  }
6032
6407
  function TypeaheadFooter({ state, isLoading }) {
6033
- const { formatMessage } = (0, import_react_intl32.useIntl)();
6408
+ const { formatMessage } = (0, import_react_intl34.useIntl)();
6034
6409
  if (state.type === "layout") {
6035
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "m-x-1 m-y-1", children: state.layout });
6410
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "m-x-1 m-y-1", children: state.layout });
6036
6411
  }
6037
6412
  if (state.type === "noResults") {
6038
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components55.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
6413
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_components60.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
6039
6414
  }
6040
6415
  if (state.type === "error") {
6041
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(ErrorResult, { state }) });
6416
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(ErrorResult, { state }) });
6042
6417
  }
6043
6418
  if (state.type === "pending" || isLoading) {
6044
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
6419
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
6045
6420
  }
6046
6421
  return null;
6047
6422
  }
6048
6423
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
6049
6424
 
6050
6425
  // ../renderers/src/SearchRenderer/SearchRenderer.tsx
6051
- var import_jsx_runtime83 = require("react/jsx-runtime");
6426
+ var import_jsx_runtime88 = require("react/jsx-runtime");
6052
6427
  var SearchRenderer = {
6053
6428
  canRenderType: "search",
6054
- render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
6429
+ render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
6055
6430
  };
6056
6431
  var SearchRenderer_default = SearchRenderer;
6057
6432
 
6058
6433
  // ../renderers/src/SectionRenderer.tsx
6059
- var import_components56 = require("@transferwise/components");
6060
- var import_classnames30 = __toESM(require_classnames());
6434
+ var import_components61 = require("@transferwise/components");
6435
+ var import_classnames31 = __toESM(require_classnames());
6061
6436
 
6062
6437
  // ../renderers/src/utils/getHeaderAction.tsx
6063
6438
  var getHeaderAction2 = (callToAction) => {
@@ -6081,16 +6456,16 @@ var getHeaderAction2 = (callToAction) => {
6081
6456
  };
6082
6457
 
6083
6458
  // ../renderers/src/SectionRenderer.tsx
6084
- var import_jsx_runtime84 = require("react/jsx-runtime");
6459
+ var import_jsx_runtime89 = require("react/jsx-runtime");
6085
6460
  var SectionRenderer = {
6086
6461
  canRenderType: "section",
6087
6462
  render: ({ children, callToAction, margin, title, control, tags }) => {
6088
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
6463
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
6089
6464
  "section",
6090
6465
  {
6091
- className: (0, import_classnames30.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
6466
+ className: (0, import_classnames31.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
6092
6467
  children: [
6093
- (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components56.Header, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
6468
+ (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_components61.Header, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
6094
6469
  children
6095
6470
  ]
6096
6471
  }
@@ -6100,8 +6475,8 @@ var SectionRenderer = {
6100
6475
  var SectionRenderer_default = SectionRenderer;
6101
6476
 
6102
6477
  // ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
6103
- var import_components57 = require("@transferwise/components");
6104
- var import_jsx_runtime85 = require("react/jsx-runtime");
6478
+ var import_components62 = require("@transferwise/components");
6479
+ var import_jsx_runtime90 = require("react/jsx-runtime");
6105
6480
  function RadioInputRendererComponent(props) {
6106
6481
  const {
6107
6482
  id,
@@ -6118,8 +6493,8 @@ function RadioInputRendererComponent(props) {
6118
6493
  tags,
6119
6494
  onSelect
6120
6495
  } = props;
6121
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
6122
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
6496
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_jsx_runtime90.Fragment, { children: [
6497
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
6123
6498
  FieldInput_default,
6124
6499
  {
6125
6500
  id,
@@ -6130,8 +6505,8 @@ function RadioInputRendererComponent(props) {
6130
6505
  features,
6131
6506
  control,
6132
6507
  tags,
6133
- children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
6134
- import_components57.RadioGroup,
6508
+ children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
6509
+ import_components62.RadioGroup,
6135
6510
  {
6136
6511
  name: id,
6137
6512
  radios: options.map((option, index) => ({
@@ -6139,7 +6514,7 @@ function RadioInputRendererComponent(props) {
6139
6514
  value: index,
6140
6515
  secondary: option.description,
6141
6516
  disabled: option.disabled || disabled,
6142
- avatar: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
6517
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
6143
6518
  })),
6144
6519
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
6145
6520
  onChange: onSelect
@@ -6153,9 +6528,9 @@ function RadioInputRendererComponent(props) {
6153
6528
  }
6154
6529
 
6155
6530
  // ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
6156
- var import_components58 = require("@transferwise/components");
6157
- var import_react23 = require("react");
6158
- var import_jsx_runtime86 = require("react/jsx-runtime");
6531
+ var import_components63 = require("@transferwise/components");
6532
+ var import_react27 = require("react");
6533
+ var import_jsx_runtime91 = require("react/jsx-runtime");
6159
6534
  function TabInputRendererComponent(props) {
6160
6535
  const {
6161
6536
  id,
@@ -6172,13 +6547,13 @@ function TabInputRendererComponent(props) {
6172
6547
  tags,
6173
6548
  onSelect
6174
6549
  } = props;
6175
- (0, import_react23.useEffect)(() => {
6550
+ (0, import_react27.useEffect)(() => {
6176
6551
  if (!isValidIndex2(selectedIndex, options.length)) {
6177
6552
  onSelect(0);
6178
6553
  }
6179
6554
  }, [selectedIndex, onSelect, options.length]);
6180
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
6181
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
6555
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(import_jsx_runtime91.Fragment, { children: [
6556
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
6182
6557
  FieldInput_default,
6183
6558
  {
6184
6559
  id,
@@ -6189,8 +6564,8 @@ function TabInputRendererComponent(props) {
6189
6564
  features,
6190
6565
  control,
6191
6566
  tags,
6192
- children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
6193
- import_components58.Tabs,
6567
+ children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
6568
+ import_components63.Tabs,
6194
6569
  {
6195
6570
  name: id,
6196
6571
  selected: selectedIndex != null ? selectedIndex : 0,
@@ -6198,7 +6573,7 @@ function TabInputRendererComponent(props) {
6198
6573
  title: option.title,
6199
6574
  // if we pass null, we get some props-types console errors
6200
6575
  // eslint-disable-next-line react/jsx-no-useless-fragment
6201
- content: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_jsx_runtime86.Fragment, {}),
6576
+ content: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_jsx_runtime91.Fragment, {}),
6202
6577
  disabled: option.disabled || disabled
6203
6578
  })),
6204
6579
  onTabSelect: onSelect
@@ -6212,8 +6587,8 @@ function TabInputRendererComponent(props) {
6212
6587
  var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
6213
6588
 
6214
6589
  // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
6215
- var import_components59 = require("@transferwise/components");
6216
- var import_jsx_runtime87 = require("react/jsx-runtime");
6590
+ var import_components64 = require("@transferwise/components");
6591
+ var import_jsx_runtime92 = require("react/jsx-runtime");
6217
6592
  function SelectInputRendererComponent(props) {
6218
6593
  const {
6219
6594
  id,
@@ -6256,13 +6631,13 @@ function SelectInputRendererComponent(props) {
6256
6631
  } : {
6257
6632
  title: option.title,
6258
6633
  description: option.description,
6259
- icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
6634
+ icon: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
6260
6635
  };
6261
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_components59.SelectInputOptionContent, __spreadValues({}, contentProps));
6636
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_components64.SelectInputOptionContent, __spreadValues({}, contentProps));
6262
6637
  };
6263
6638
  const extraProps = { autoComplete };
6264
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
6265
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
6639
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
6640
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
6266
6641
  FieldInput_default,
6267
6642
  {
6268
6643
  id,
@@ -6273,8 +6648,8 @@ function SelectInputRendererComponent(props) {
6273
6648
  features,
6274
6649
  control,
6275
6650
  tags,
6276
- children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
6277
- import_components59.SelectInput,
6651
+ children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
6652
+ import_components64.SelectInput,
6278
6653
  __spreadValues({
6279
6654
  name: id,
6280
6655
  placeholder,
@@ -6294,9 +6669,9 @@ function SelectInputRendererComponent(props) {
6294
6669
  }
6295
6670
 
6296
6671
  // ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
6297
- var import_react24 = require("react");
6298
- var import_components60 = require("@transferwise/components");
6299
- var import_jsx_runtime88 = require("react/jsx-runtime");
6672
+ var import_react28 = require("react");
6673
+ var import_components65 = require("@transferwise/components");
6674
+ var import_jsx_runtime93 = require("react/jsx-runtime");
6300
6675
  function SegmentedInputRendererComponent(props) {
6301
6676
  const {
6302
6677
  id,
@@ -6312,13 +6687,13 @@ function SegmentedInputRendererComponent(props) {
6312
6687
  tags,
6313
6688
  onSelect
6314
6689
  } = props;
6315
- (0, import_react24.useEffect)(() => {
6690
+ (0, import_react28.useEffect)(() => {
6316
6691
  if (!isValidIndex3(selectedIndex, options.length)) {
6317
6692
  onSelect(0);
6318
6693
  }
6319
6694
  }, [selectedIndex, onSelect, options.length]);
6320
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
6321
- /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
6695
+ return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
6696
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
6322
6697
  FieldInput_default,
6323
6698
  {
6324
6699
  id,
@@ -6329,8 +6704,8 @@ function SegmentedInputRendererComponent(props) {
6329
6704
  features,
6330
6705
  control,
6331
6706
  tags,
6332
- children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
6333
- import_components60.SegmentedControl,
6707
+ children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
6708
+ import_components65.SegmentedControl,
6334
6709
  {
6335
6710
  name: `${id}-segmented-control`,
6336
6711
  value: String(selectedIndex),
@@ -6346,14 +6721,14 @@ function SegmentedInputRendererComponent(props) {
6346
6721
  )
6347
6722
  }
6348
6723
  ),
6349
- /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { id: `${id}-children`, children })
6724
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { id: `${id}-children`, children })
6350
6725
  ] });
6351
6726
  }
6352
6727
  var isValidIndex3 = (index, options) => index !== null && index >= 0 && index < options;
6353
6728
 
6354
6729
  // ../renderers/src/SelectInputRenderer/RadioItemRendererComponent.tsx
6355
- var import_components61 = require("@transferwise/components");
6356
- var import_jsx_runtime89 = require("react/jsx-runtime");
6730
+ var import_components66 = require("@transferwise/components");
6731
+ var import_jsx_runtime94 = require("react/jsx-runtime");
6357
6732
  function RadioItemRendererComponent(props) {
6358
6733
  const {
6359
6734
  id,
@@ -6369,23 +6744,23 @@ function RadioItemRendererComponent(props) {
6369
6744
  onSelect
6370
6745
  } = props;
6371
6746
  const { ref } = useScrollToError(validationState, features);
6372
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { ref, className: controlAndTagsToCSSClass(props), children: [
6373
- rootTitle && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
6374
- import_components61.Header,
6747
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { ref, className: controlAndTagsToCSSClass(props), children: [
6748
+ rootTitle && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
6749
+ import_components66.Header,
6375
6750
  {
6376
6751
  as: "h2",
6377
- title: help ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
6752
+ title: help ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
6378
6753
  }
6379
6754
  ),
6380
- rootDescription && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("p", { children: rootDescription }),
6381
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_components61.List, { children: options.map(
6382
- ({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
6383
- import_components61.ListItem,
6755
+ rootDescription && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { children: rootDescription }),
6756
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_components66.List, { children: options.map(
6757
+ ({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
6758
+ import_components66.ListItem,
6384
6759
  __spreadValues({
6385
6760
  title,
6386
6761
  subtitle: description,
6387
- control: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
6388
- import_components61.ListItem.Radio,
6762
+ control: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
6763
+ import_components66.ListItem.Radio,
6389
6764
  {
6390
6765
  name: title,
6391
6766
  checked: selectedIndex === index,
@@ -6400,51 +6775,51 @@ function RadioItemRendererComponent(props) {
6400
6775
  title
6401
6776
  )
6402
6777
  ) }, `${id}-${selectedIndex}`),
6403
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_components61.InlineAlert, { type: "negative", children: validationState.message }),
6778
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_components66.InlineAlert, { type: "negative", children: validationState.message }),
6404
6779
  children
6405
6780
  ] });
6406
6781
  }
6407
6782
 
6408
6783
  // ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
6409
- var import_jsx_runtime90 = require("react/jsx-runtime");
6784
+ var import_jsx_runtime95 = require("react/jsx-runtime");
6410
6785
  var SelectInputRenderer = {
6411
6786
  canRenderType: "input-select",
6412
6787
  render: (props) => {
6413
6788
  switch (props.control) {
6414
6789
  case "radio":
6415
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
6790
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
6416
6791
  case "radio-item":
6417
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(RadioItemRendererComponent, __spreadValues({}, props));
6792
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(RadioItemRendererComponent, __spreadValues({}, props));
6418
6793
  case "tab":
6419
- return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(TabInputRendererComponent, __spreadValues({}, props));
6794
+ return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(TabInputRendererComponent, __spreadValues({}, props));
6420
6795
  case "segmented":
6421
- return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
6796
+ return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
6422
6797
  case "select":
6423
6798
  default:
6424
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
6799
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
6425
6800
  }
6426
6801
  }
6427
6802
  };
6428
6803
  var SelectInputRenderer_default = SelectInputRenderer;
6429
6804
 
6430
6805
  // ../renderers/src/StatusListRenderer.tsx
6431
- var import_components62 = require("@transferwise/components");
6432
- var import_classnames31 = __toESM(require_classnames());
6433
- var import_jsx_runtime91 = require("react/jsx-runtime");
6806
+ var import_components67 = require("@transferwise/components");
6807
+ var import_classnames32 = __toESM(require_classnames());
6808
+ var import_jsx_runtime96 = require("react/jsx-runtime");
6434
6809
  var StatusListRenderer = {
6435
6810
  canRenderType: "status-list",
6436
- render: ({ margin, items, title, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: (0, import_classnames31.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
6437
- title ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_components62.Header, { title }) : null,
6811
+ render: ({ margin, items, title, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: (0, import_classnames32.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
6812
+ title ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_components67.Header, { title }) : null,
6438
6813
  items.map((item) => {
6439
6814
  const { callToAction, description, title: itemTitle } = item;
6440
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
6441
- import_components62.ListItem,
6815
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6816
+ import_components67.ListItem,
6442
6817
  {
6443
6818
  title: itemTitle,
6444
6819
  subtitle: description,
6445
- media: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(StatusListItemMedia, __spreadValues({}, item)),
6446
- additionalInfo: callToAction ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
6447
- import_components62.ListItem.AdditionalInfo,
6820
+ media: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(StatusListItemMedia, __spreadValues({}, item)),
6821
+ additionalInfo: callToAction ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6822
+ import_components67.ListItem.AdditionalInfo,
6448
6823
  {
6449
6824
  action: __spreadValues({
6450
6825
  label: callToAction.title
@@ -6462,10 +6837,10 @@ var StatusListItemMedia = ({ icon, status }) => {
6462
6837
  return void 0;
6463
6838
  }
6464
6839
  if ("name" in icon) {
6465
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_components62.AvatarView, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(DynamicIcon_default, { name: icon.name }) });
6840
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_components67.AvatarView, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(DynamicIcon_default, { name: icon.name }) });
6466
6841
  }
6467
6842
  if ("text" in icon) {
6468
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_components62.AvatarView, { badge: { status: mapStatus(status) }, children: icon.text });
6843
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_components67.AvatarView, { badge: { status: mapStatus(status) }, children: icon.text });
6469
6844
  }
6470
6845
  return void 0;
6471
6846
  };
@@ -6482,16 +6857,16 @@ var mapStatus = (status) => {
6482
6857
  var StatusListRenderer_default = StatusListRenderer;
6483
6858
 
6484
6859
  // ../renderers/src/step/SplashCelebrationStepRenderer.tsx
6485
- var import_classnames32 = __toESM(require_classnames());
6860
+ var import_classnames33 = __toESM(require_classnames());
6486
6861
 
6487
6862
  // ../renderers/src/utils/useCustomTheme.ts
6488
6863
  var import_components_theming = require("@wise/components-theming");
6489
- var import_react25 = require("react");
6864
+ var import_react29 = require("react");
6490
6865
  var ThemeRequiredEventName = "Theme Required";
6491
6866
  var useCustomTheme = (theme, trackEvent) => {
6492
6867
  const theming = (0, import_components_theming.useTheme)();
6493
- const previousTheme = (0, import_react25.useMemo)(() => theming.theme, []);
6494
- (0, import_react25.useEffect)(() => {
6868
+ const previousTheme = (0, import_react29.useMemo)(() => theming.theme, []);
6869
+ (0, import_react29.useEffect)(() => {
6495
6870
  theming.setTheme(theme);
6496
6871
  trackEvent(ThemeRequiredEventName, { theme });
6497
6872
  return theme !== previousTheme ? () => {
@@ -6503,13 +6878,13 @@ var useCustomTheme = (theme, trackEvent) => {
6503
6878
  };
6504
6879
 
6505
6880
  // ../renderers/src/step/StepHeader.tsx
6506
- var import_components63 = require("@transferwise/components");
6507
- var import_jsx_runtime92 = require("react/jsx-runtime");
6881
+ var import_components68 = require("@transferwise/components");
6882
+ var import_jsx_runtime97 = require("react/jsx-runtime");
6508
6883
  var StepHeader = ({ title, description, tags }) => {
6509
6884
  const { titleType, alignmentClassName } = getHeaderStyle(tags);
6510
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
6511
- title ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_components63.Title, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
6512
- description ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
6885
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_jsx_runtime97.Fragment, { children: [
6886
+ title ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_components68.Title, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
6887
+ description ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
6513
6888
  ] });
6514
6889
  };
6515
6890
  var getHeaderStyle = (tags) => {
@@ -6520,13 +6895,13 @@ var getHeaderStyle = (tags) => {
6520
6895
  };
6521
6896
 
6522
6897
  // ../renderers/src/step/topbar/BackButton.tsx
6523
- var import_components64 = require("@transferwise/components");
6524
- var import_icons6 = require("@transferwise/icons");
6525
- var import_react_intl34 = require("react-intl");
6898
+ var import_components69 = require("@transferwise/components");
6899
+ var import_icons7 = require("@transferwise/icons");
6900
+ var import_react_intl36 = require("react-intl");
6526
6901
 
6527
6902
  // ../renderers/src/messages/back.messages.ts
6528
- var import_react_intl33 = require("react-intl");
6529
- var back_messages_default = (0, import_react_intl33.defineMessages)({
6903
+ var import_react_intl35 = require("react-intl");
6904
+ var back_messages_default = (0, import_react_intl35.defineMessages)({
6530
6905
  back: {
6531
6906
  id: "df.wise.back.label",
6532
6907
  defaultMessage: "Back",
@@ -6535,31 +6910,31 @@ var back_messages_default = (0, import_react_intl33.defineMessages)({
6535
6910
  });
6536
6911
 
6537
6912
  // ../renderers/src/step/topbar/BackButton.tsx
6538
- var import_jsx_runtime93 = require("react/jsx-runtime");
6913
+ var import_jsx_runtime98 = require("react/jsx-runtime");
6539
6914
  function BackButton({ title, onClick }) {
6540
- const { formatMessage } = (0, import_react_intl34.useIntl)();
6541
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_components64.IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
6542
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
6543
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_icons6.ArrowLeft, {})
6915
+ const { formatMessage } = (0, import_react_intl36.useIntl)();
6916
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_components69.IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
6917
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
6918
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_icons7.ArrowLeft, {})
6544
6919
  ] });
6545
6920
  }
6546
6921
 
6547
6922
  // ../renderers/src/step/topbar/Toolbar.tsx
6548
- var import_components65 = require("@transferwise/components");
6549
- var import_jsx_runtime94 = require("react/jsx-runtime");
6923
+ var import_components70 = require("@transferwise/components");
6924
+ var import_jsx_runtime99 = require("react/jsx-runtime");
6550
6925
  var Toolbar = ({ items }) => {
6551
- return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
6926
+ return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
6552
6927
  };
6553
6928
  function ToolbarButton(props) {
6554
- return prefersMedia(props.control) ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(TextToolbarButton, __spreadValues({}, props));
6929
+ return prefersMedia(props.control) ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(TextToolbarButton, __spreadValues({}, props));
6555
6930
  }
6556
6931
  function MediaToolbarButton(props) {
6557
6932
  var _a;
6558
6933
  const { context, control, media, accessibilityDescription, disabled, onClick } = props;
6559
6934
  const priority = getIconButtonPriority(control);
6560
6935
  const type = getSentiment2(context);
6561
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
6562
- import_components65.IconButton,
6936
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
6937
+ import_components70.IconButton,
6563
6938
  {
6564
6939
  className: "df-toolbar-button",
6565
6940
  disabled,
@@ -6568,7 +6943,7 @@ function MediaToolbarButton(props) {
6568
6943
  type,
6569
6944
  onClick,
6570
6945
  children: [
6571
- accessibilityDescription ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "sr-only", children: accessibilityDescription }) : null,
6946
+ accessibilityDescription ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "sr-only", children: accessibilityDescription }) : null,
6572
6947
  media ? (_a = getAddonStartMedia(media)) == null ? void 0 : _a.value : null
6573
6948
  ]
6574
6949
  }
@@ -6579,8 +6954,8 @@ function TextToolbarButton(props) {
6579
6954
  const addonStart = media ? getAddonStartMedia(media) : void 0;
6580
6955
  const priority = getPriority2(control);
6581
6956
  const sentiment = getSentiment2(context);
6582
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
6583
- import_components65.Button,
6957
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
6958
+ import_components70.Button,
6584
6959
  {
6585
6960
  v2: true,
6586
6961
  size: "sm",
@@ -6609,18 +6984,18 @@ var getIconButtonPriority = (control) => {
6609
6984
  };
6610
6985
 
6611
6986
  // ../renderers/src/step/topbar/TopBar.tsx
6612
- var import_jsx_runtime95 = require("react/jsx-runtime");
6987
+ var import_jsx_runtime100 = require("react/jsx-runtime");
6613
6988
  function TopBar({ back, toolbar, tags }) {
6614
6989
  const isBackAllowed = !(tags == null ? void 0 : tags.includes("non-dismissible"));
6615
6990
  const backCTA = isBackAllowed ? back : void 0;
6616
- return backCTA || toolbar ? /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "d-flex m-b-2", children: [
6617
- backCTA ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(BackButton, __spreadValues({}, backCTA)) : null,
6618
- toolbar ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Toolbar, __spreadValues({}, toolbar)) : null
6991
+ return backCTA || toolbar ? /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "d-flex m-b-2", children: [
6992
+ backCTA ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(BackButton, __spreadValues({}, backCTA)) : null,
6993
+ toolbar ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Toolbar, __spreadValues({}, toolbar)) : null
6619
6994
  ] }) : null;
6620
6995
  }
6621
6996
 
6622
6997
  // ../renderers/src/step/SplashCelebrationStepRenderer.tsx
6623
- var import_jsx_runtime96 = require("react/jsx-runtime");
6998
+ var import_jsx_runtime101 = require("react/jsx-runtime");
6624
6999
  var SplashCelebrationStepRenderer = {
6625
7000
  canRenderType: "step",
6626
7001
  canRender: ({ control }) => control === "splash-celebration",
@@ -6629,23 +7004,23 @@ var SplashCelebrationStepRenderer = {
6629
7004
  function SplashCelebrationStepRendererComponent(props) {
6630
7005
  const { back, title, description, toolbar, children, footer, control, tags, trackEvent } = props;
6631
7006
  useCustomTheme("forest-green", trackEvent);
6632
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
7007
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
6633
7008
  "div",
6634
7009
  {
6635
- className: (0, import_classnames32.default)("splash-screen", "m-t-5", controlAndTagsToCSSClass({ control, tags })),
7010
+ className: (0, import_classnames33.default)("splash-screen", "m-t-5", controlAndTagsToCSSClass({ control, tags })),
6636
7011
  children: [
6637
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TopBar, { back, toolbar, tags }),
6638
- title || description ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(StepHeader, { title, description, tags }) }) : void 0,
7012
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(TopBar, { back, toolbar, tags }),
7013
+ title || description ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(StepHeader, { title, description, tags }) }) : void 0,
6639
7014
  children,
6640
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(StepFooter, { footer, tags })
7015
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(StepFooter, { footer, tags })
6641
7016
  ]
6642
7017
  }
6643
7018
  );
6644
7019
  }
6645
7020
 
6646
7021
  // ../renderers/src/step/SplashStepRenderer.tsx
6647
- var import_classnames33 = __toESM(require_classnames());
6648
- var import_jsx_runtime97 = require("react/jsx-runtime");
7022
+ var import_classnames34 = __toESM(require_classnames());
7023
+ var import_jsx_runtime102 = require("react/jsx-runtime");
6649
7024
  var SplashStepRenderer = {
6650
7025
  canRenderType: "step",
6651
7026
  canRender: ({ control }) => control === "splash",
@@ -6653,70 +7028,70 @@ var SplashStepRenderer = {
6653
7028
  };
6654
7029
  function SplashStepRendererComponent(props) {
6655
7030
  const { back, title, description, toolbar, children, footer, control, tags } = props;
6656
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
7031
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
6657
7032
  "div",
6658
7033
  {
6659
- className: (0, import_classnames33.default)("splash-screen", "m-t-5", controlAndTagsToCSSClass({ control, tags })),
7034
+ className: (0, import_classnames34.default)("splash-screen", "m-t-5", controlAndTagsToCSSClass({ control, tags })),
6660
7035
  children: [
6661
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(TopBar, { back, toolbar, tags }),
6662
- title || description ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(StepHeader, { title, description, tags }) }) : void 0,
7036
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(TopBar, { back, toolbar, tags }),
7037
+ title || description ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(StepHeader, { title, description, tags }) }) : void 0,
6663
7038
  children,
6664
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(StepFooter, { footer, tags })
7039
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(StepFooter, { footer, tags })
6665
7040
  ]
6666
7041
  }
6667
7042
  );
6668
7043
  }
6669
7044
 
6670
7045
  // ../renderers/src/step/StepRenderer.tsx
6671
- var import_components66 = require("@transferwise/components");
6672
- var import_jsx_runtime98 = require("react/jsx-runtime");
7046
+ var import_components71 = require("@transferwise/components");
7047
+ var import_jsx_runtime103 = require("react/jsx-runtime");
6673
7048
  var StepRenderer = {
6674
7049
  canRenderType: "step",
6675
7050
  render: StepRendererComponent
6676
7051
  };
6677
7052
  function StepRendererComponent(props) {
6678
7053
  const { back, description, error, title, children, toolbar, footer, control, tags } = props;
6679
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: controlAndTagsToCSSClass({ control, tags }), children: [
6680
- /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(TopBar, { back, toolbar, tags }),
6681
- 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,
6682
- error ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_components66.Alert, { type: "negative", className: "m-b-2", message: error }) : null,
7054
+ return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: controlAndTagsToCSSClass({ control, tags }), children: [
7055
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(TopBar, { back, toolbar, tags }),
7056
+ 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,
7057
+ error ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_components71.Alert, { type: "negative", className: "m-b-2", message: error }) : null,
6683
7058
  children,
6684
- /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(StepFooter, { footer, tags })
7059
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(StepFooter, { footer, tags })
6685
7060
  ] });
6686
7061
  }
6687
7062
 
6688
7063
  // ../renderers/src/TabsRenderer.tsx
6689
- var import_components67 = require("@transferwise/components");
6690
- var import_classnames34 = __toESM(require_classnames());
6691
- var import_react26 = require("react");
6692
- var import_jsx_runtime99 = require("react/jsx-runtime");
7064
+ var import_components72 = require("@transferwise/components");
7065
+ var import_classnames35 = __toESM(require_classnames());
7066
+ var import_react30 = require("react");
7067
+ var import_jsx_runtime104 = require("react/jsx-runtime");
6693
7068
  var TabsRenderer = {
6694
7069
  canRenderType: "tabs",
6695
7070
  render: (props) => {
6696
7071
  switch (props.control) {
6697
7072
  case "segmented":
6698
7073
  if (props.tabs.length > 3) {
6699
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(TabsRendererComponent, __spreadValues({}, props));
7074
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(TabsRendererComponent, __spreadValues({}, props));
6700
7075
  }
6701
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(SegmentedTabsRendererComponent, __spreadValues({}, props));
7076
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(SegmentedTabsRendererComponent, __spreadValues({}, props));
6702
7077
  case "chips":
6703
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ChipsTabsRendererComponent, __spreadValues({}, props));
7078
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(ChipsTabsRendererComponent, __spreadValues({}, props));
6704
7079
  default:
6705
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(TabsRendererComponent, __spreadValues({}, props));
7080
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(TabsRendererComponent, __spreadValues({}, props));
6706
7081
  }
6707
7082
  }
6708
7083
  };
6709
7084
  function TabsRendererComponent({ uid, margin, tabs, control, tags }) {
6710
- const [selectedIndex, setSelectedIndex] = (0, import_react26.useState)(0);
6711
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: (0, import_classnames34.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
6712
- import_components67.Tabs,
7085
+ const [selectedIndex, setSelectedIndex] = (0, import_react30.useState)(0);
7086
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: (0, import_classnames35.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
7087
+ import_components72.Tabs,
6713
7088
  {
6714
7089
  name: uid,
6715
7090
  selected: selectedIndex != null ? selectedIndex : 0,
6716
7091
  tabs: tabs.map((option) => ({
6717
7092
  title: option.title,
6718
7093
  disabled: false,
6719
- content: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "m-t-2", children: [
7094
+ content: /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "m-t-2", children: [
6720
7095
  " ",
6721
7096
  option.children,
6722
7097
  " "
@@ -6728,10 +7103,10 @@ function TabsRendererComponent({ uid, margin, tabs, control, tags }) {
6728
7103
  }
6729
7104
  function SegmentedTabsRendererComponent({ uid, margin, tabs, control, tags }) {
6730
7105
  var _a;
6731
- const [selectedIndex, setSelectedIndex] = (0, import_react26.useState)(0);
6732
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: (0, import_classnames34.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
6733
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
6734
- import_components67.SegmentedControl,
7106
+ const [selectedIndex, setSelectedIndex] = (0, import_react30.useState)(0);
7107
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: (0, import_classnames35.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
7108
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
7109
+ import_components72.SegmentedControl,
6735
7110
  {
6736
7111
  name: uid,
6737
7112
  value: String(selectedIndex),
@@ -6745,38 +7120,38 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs, control, tags }) {
6745
7120
  onChange: (value) => setSelectedIndex(Number(value))
6746
7121
  }
6747
7122
  ),
6748
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
7123
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
6749
7124
  ] });
6750
7125
  }
6751
7126
  function ChipsTabsRendererComponent({ margin, tabs, control, tags }) {
6752
7127
  var _a;
6753
- const [selectedIndex, setSelectedIndex] = (0, import_react26.useState)(0);
6754
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: (0, import_classnames34.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
6755
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "chips-container", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
6756
- import_components67.Chips,
7128
+ const [selectedIndex, setSelectedIndex] = (0, import_react30.useState)(0);
7129
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: (0, import_classnames35.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
7130
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "chips-container", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
7131
+ import_components72.Chips,
6757
7132
  {
6758
7133
  chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
6759
7134
  selected: selectedIndex,
6760
7135
  onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
6761
7136
  }
6762
7137
  ) }),
6763
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
7138
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
6764
7139
  ] });
6765
7140
  }
6766
7141
 
6767
7142
  // ../renderers/src/TextInputRenderer.tsx
6768
- var import_components69 = require("@transferwise/components");
6769
- var import_react28 = require("react");
7143
+ var import_components74 = require("@transferwise/components");
7144
+ var import_react32 = require("react");
6770
7145
 
6771
7146
  // ../renderers/src/components/VariableTextInput.tsx
6772
- var import_components68 = require("@transferwise/components");
6773
- var import_icons7 = require("@transferwise/icons");
6774
- var import_react_intl36 = require("react-intl");
6775
- var import_react27 = require("react");
7147
+ var import_components73 = require("@transferwise/components");
7148
+ var import_icons8 = require("@transferwise/icons");
7149
+ var import_react_intl38 = require("react-intl");
7150
+ var import_react31 = require("react");
6776
7151
 
6777
7152
  // ../renderers/src/messages/ssn-input.messages.ts
6778
- var import_react_intl35 = require("react-intl");
6779
- var ssn_input_messages_default = (0, import_react_intl35.defineMessages)({
7153
+ var import_react_intl37 = require("react-intl");
7154
+ var ssn_input_messages_default = (0, import_react_intl37.defineMessages)({
6780
7155
  showValue: {
6781
7156
  id: "df.wise.ssnInput.showValue",
6782
7157
  defaultMessage: "Show value",
@@ -6861,7 +7236,7 @@ function getDisplayOffset(displayValue, rawOffset) {
6861
7236
  }
6862
7237
 
6863
7238
  // ../renderers/src/components/VariableTextInput.tsx
6864
- var import_jsx_runtime100 = require("react/jsx-runtime");
7239
+ var import_jsx_runtime105 = require("react/jsx-runtime");
6865
7240
  var commonKeys = [
6866
7241
  "autoComplete",
6867
7242
  "autoCapitalize",
@@ -6880,14 +7255,14 @@ function VariableTextInput(inputProps) {
6880
7255
  const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
6881
7256
  switch (control) {
6882
7257
  case "email":
6883
- return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
7258
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
6884
7259
  case "password":
6885
- return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
7260
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
6886
7261
  case "ssn-input":
6887
- return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(SsnInput, __spreadProps(__spreadValues({}, commonProps), { isVisible: isSsnVisible, onChange }));
7262
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(SsnInput, __spreadProps(__spreadValues({}, commonProps), { isVisible: isSsnVisible, onChange }));
6888
7263
  case "numeric": {
6889
7264
  const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
6890
- return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
7265
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
6891
7266
  TextInput,
6892
7267
  __spreadProps(__spreadValues({}, numericProps), {
6893
7268
  onChange: (newValue) => {
@@ -6898,9 +7273,9 @@ function VariableTextInput(inputProps) {
6898
7273
  );
6899
7274
  }
6900
7275
  case "phone-number":
6901
- return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_components68.PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
7276
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_components73.PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
6902
7277
  default: {
6903
- return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
7278
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
6904
7279
  }
6905
7280
  }
6906
7281
  }
@@ -6908,31 +7283,31 @@ function SsnInputToggle({
6908
7283
  isVisible,
6909
7284
  onClick
6910
7285
  }) {
6911
- const { formatMessage } = (0, import_react_intl36.useIntl)();
6912
- return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
6913
- import_components68.IconButton,
7286
+ const { formatMessage } = (0, import_react_intl38.useIntl)();
7287
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
7288
+ import_components73.IconButton,
6914
7289
  {
6915
7290
  priority: "minimal",
6916
7291
  size: 24,
6917
7292
  "aria-label": formatMessage(isVisible ? ssn_input_messages_default.hideValue : ssn_input_messages_default.showValue),
6918
7293
  "aria-pressed": isVisible,
6919
7294
  onClick,
6920
- children: isVisible ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_icons7.EyeShut, { size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_icons7.Eye, { size: 24 })
7295
+ children: isVisible ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_icons8.EyeShut, { size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_icons8.Eye, { size: 24 })
6921
7296
  }
6922
7297
  );
6923
7298
  }
6924
7299
  function TextInput(props) {
6925
7300
  const _a = props, { control, displayFormat, onChange, type } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange", "type"]);
6926
- const InputWithPattern = control === "textarea" ? import_components68.TextareaWithDisplayFormat : import_components68.InputWithDisplayFormat;
6927
- const InputWithoutPattern = control === "textarea" ? import_components68.TextArea : import_components68.Input;
6928
- return displayFormat ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { type, onChange: (e) => onChange(e.target.value) }));
7301
+ const InputWithPattern = control === "textarea" ? import_components73.TextareaWithDisplayFormat : import_components73.InputWithDisplayFormat;
7302
+ const InputWithoutPattern = control === "textarea" ? import_components73.TextArea : import_components73.Input;
7303
+ return displayFormat ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { type, onChange: (e) => onChange(e.target.value) }));
6929
7304
  }
6930
7305
  function SsnInput(props) {
6931
7306
  const _a = props, { displayFormat = "", isVisible = false, onChange, value = "" } = _a, commonProps = __objRest(_a, ["displayFormat", "isVisible", "onChange", "value"]);
6932
- const [editVersion, setEditVersion] = (0, import_react27.useState)(0);
6933
- const inputRef = (0, import_react27.useRef)(null);
6934
- const selection = (0, import_react27.useRef)({ start: 0, end: 0 });
6935
- const pendingCaret = (0, import_react27.useRef)(null);
7307
+ const [editVersion, setEditVersion] = (0, import_react31.useState)(0);
7308
+ const inputRef = (0, import_react31.useRef)(null);
7309
+ const selection = (0, import_react31.useRef)({ start: 0, end: 0 });
7310
+ const pendingCaret = (0, import_react31.useRef)(null);
6936
7311
  const rawValue = value.replace(/\D/g, "");
6937
7312
  const formattedValue = formatSsnValue(rawValue, displayFormat, isVisible);
6938
7313
  const scheduleCaret = (rawOffset) => {
@@ -6952,7 +7327,7 @@ function SsnInput(props) {
6952
7327
  scheduleCaret(result.caret);
6953
7328
  onChange(result.value);
6954
7329
  };
6955
- (0, import_react27.useLayoutEffect)(() => {
7330
+ (0, import_react31.useLayoutEffect)(() => {
6956
7331
  if (pendingCaret.current === null || !inputRef.current) {
6957
7332
  return;
6958
7333
  }
@@ -6962,7 +7337,7 @@ function SsnInput(props) {
6962
7337
  );
6963
7338
  pendingCaret.current = null;
6964
7339
  }, [editVersion, formattedValue, rawValue]);
6965
- return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
7340
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
6966
7341
  "input",
6967
7342
  __spreadProps(__spreadValues({
6968
7343
  ref: inputRef
@@ -7025,13 +7400,13 @@ function SsnInput(props) {
7025
7400
  }
7026
7401
 
7027
7402
  // ../renderers/src/TextInputRenderer.tsx
7028
- var import_jsx_runtime101 = require("react/jsx-runtime");
7403
+ var import_jsx_runtime106 = require("react/jsx-runtime");
7029
7404
  var TextInputRenderer = {
7030
7405
  canRenderType: "input-text",
7031
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(TextInputRendererComponent, __spreadValues({}, props))
7406
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(TextInputRendererComponent, __spreadValues({}, props))
7032
7407
  };
7033
7408
  function TextInputRendererComponent(props) {
7034
- const [isSsnVisible, setIsSsnVisible] = (0, import_react28.useState)(false);
7409
+ const [isSsnVisible, setIsSsnVisible] = (0, import_react32.useState)(false);
7035
7410
  const _a = props, {
7036
7411
  id,
7037
7412
  title,
@@ -7063,7 +7438,7 @@ function TextInputRendererComponent(props) {
7063
7438
  }
7064
7439
  }
7065
7440
  });
7066
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
7441
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
7067
7442
  FieldInput_default,
7068
7443
  {
7069
7444
  id,
@@ -7076,13 +7451,13 @@ function TextInputRendererComponent(props) {
7076
7451
  features: props.features,
7077
7452
  control: props.control,
7078
7453
  tags: props.tags,
7079
- children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
7080
- import_components69.InputGroup,
7454
+ children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
7455
+ import_components74.InputGroup,
7081
7456
  {
7082
7457
  addonStart: getInputGroupAddonStart(media),
7083
7458
  addonEnd: isSsnInput ? {
7084
7459
  interactive: true,
7085
- content: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
7460
+ content: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
7086
7461
  SsnInputToggle,
7087
7462
  {
7088
7463
  isVisible: isSsnVisible,
@@ -7090,7 +7465,7 @@ function TextInputRendererComponent(props) {
7090
7465
  }
7091
7466
  )
7092
7467
  } : void 0,
7093
- children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(VariableTextInput, __spreadValues({}, inputProps))
7468
+ children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(VariableTextInput, __spreadValues({}, inputProps))
7094
7469
  }
7095
7470
  )
7096
7471
  }
@@ -7099,23 +7474,23 @@ function TextInputRendererComponent(props) {
7099
7474
  var TextInputRenderer_default = TextInputRenderer;
7100
7475
 
7101
7476
  // ../renderers/src/UpdatableRenderer.tsx
7102
- var import_classnames35 = __toESM(require_classnames());
7103
- var import_jsx_runtime102 = require("react/jsx-runtime");
7477
+ var import_classnames36 = __toESM(require_classnames());
7478
+ var import_jsx_runtime107 = require("react/jsx-runtime");
7104
7479
  var UpdatableRenderer = {
7105
7480
  canRenderType: "updatable",
7106
7481
  render: ({ children, control, margin, tags }) => {
7107
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: (0, import_classnames35.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children });
7482
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: (0, import_classnames36.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children });
7108
7483
  }
7109
7484
  };
7110
7485
 
7111
7486
  // ../renderers/src/UploadInputRenderer.tsx
7112
- var import_components70 = require("@transferwise/components");
7487
+ var import_components75 = require("@transferwise/components");
7113
7488
 
7114
7489
  // ../renderers/src/utils/getRandomId.ts
7115
7490
  var getRandomId = () => Math.random().toString(36).substring(2);
7116
7491
 
7117
7492
  // ../renderers/src/UploadInputRenderer.tsx
7118
- var import_jsx_runtime103 = require("react/jsx-runtime");
7493
+ var import_jsx_runtime108 = require("react/jsx-runtime");
7119
7494
  var UploadInputRenderer = {
7120
7495
  canRenderType: "input-upload",
7121
7496
  render: (props) => {
@@ -7144,7 +7519,7 @@ var UploadInputRenderer = {
7144
7519
  };
7145
7520
  return (
7146
7521
  // We don't pass help here as there is no sensible place to display it
7147
- /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
7522
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
7148
7523
  UploadFieldInput_default,
7149
7524
  {
7150
7525
  id,
@@ -7154,8 +7529,8 @@ var UploadInputRenderer = {
7154
7529
  features,
7155
7530
  control,
7156
7531
  tags,
7157
- children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
7158
- import_components70.UploadInput,
7532
+ children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
7533
+ import_components75.UploadInput,
7159
7534
  {
7160
7535
  id,
7161
7536
  description,
@@ -7165,7 +7540,7 @@ var UploadInputRenderer = {
7165
7540
  {
7166
7541
  id: "my-file",
7167
7542
  filename: value.name,
7168
- status: (validationState == null ? void 0 : validationState.status) === "invalid" ? import_components70.Status.FAILED : import_components70.Status.SUCCEEDED
7543
+ status: (validationState == null ? void 0 : validationState.status) === "invalid" ? import_components75.Status.FAILED : import_components75.Status.SUCCEEDED
7169
7544
  }
7170
7545
  ] : void 0,
7171
7546
  fileTypes: acceptsToFileTypes(accepts),
@@ -7224,7 +7599,7 @@ var LargeUploadRenderer = {
7224
7599
  };
7225
7600
  const filetypes = acceptsToFileTypes(accepts);
7226
7601
  const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
7227
- return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
7602
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
7228
7603
  FieldInput_default,
7229
7604
  {
7230
7605
  id,
@@ -7235,8 +7610,8 @@ var LargeUploadRenderer = {
7235
7610
  features,
7236
7611
  control,
7237
7612
  tags,
7238
- children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
7239
- import_components70.Upload,
7613
+ children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
7614
+ import_components75.Upload,
7240
7615
  __spreadProps(__spreadValues({}, uploadProps), {
7241
7616
  usAccept,
7242
7617
  usDisabled: disabled,
@@ -7251,21 +7626,21 @@ var LargeUploadRenderer = {
7251
7626
  };
7252
7627
 
7253
7628
  // ../renderers/src/UpsellRenderer.tsx
7254
- var import_components71 = require("@transferwise/components");
7255
- var import_classnames36 = __toESM(require_classnames());
7256
- var import_react29 = require("react");
7257
- var import_jsx_runtime104 = require("react/jsx-runtime");
7629
+ var import_components76 = require("@transferwise/components");
7630
+ var import_classnames37 = __toESM(require_classnames());
7631
+ var import_react33 = require("react");
7632
+ var import_jsx_runtime109 = require("react/jsx-runtime");
7258
7633
  var UpsellRenderer = {
7259
7634
  canRenderType: "upsell",
7260
7635
  render: UpsellRendererComponent
7261
7636
  };
7262
7637
  function UpsellRendererComponent(props) {
7263
7638
  const { text, callToAction, media, margin, onDismiss, control, tags } = props;
7264
- const [isVisible, setIsVisible] = (0, import_react29.useState)(true);
7265
- return isVisible ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
7266
- import_components71.Nudge,
7639
+ const [isVisible, setIsVisible] = (0, import_react33.useState)(true);
7640
+ return isVisible ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
7641
+ import_components76.Nudge,
7267
7642
  {
7268
- className: (0, import_classnames36.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
7643
+ className: (0, import_classnames37.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
7269
7644
  mediaName: getMediaName(media),
7270
7645
  title: text,
7271
7646
  action: __spreadValues({
@@ -7316,7 +7691,8 @@ var getWiseRenderers = () => [
7316
7691
  CircularButtonRenderer,
7317
7692
  BorderedBackgroundColoredBoxRenderer,
7318
7693
  BoxRenderer_default,
7319
- CollectionRenderer_default,
7694
+ CollectionRendererV2_default,
7695
+ CollectionRendererV1_default,
7320
7696
  ButtonRenderer,
7321
7697
  ColumnsRenderer_default,
7322
7698
  DateInputRenderer_default,
@@ -7362,13 +7738,13 @@ var getWiseRenderers = () => [
7362
7738
  ];
7363
7739
 
7364
7740
  // ../renderers/src/InitialLoadingStateRenderer.tsx
7365
- var import_components72 = require("@transferwise/components");
7366
- var import_jsx_runtime105 = require("react/jsx-runtime");
7741
+ var import_components77 = require("@transferwise/components");
7742
+ var import_jsx_runtime110 = require("react/jsx-runtime");
7367
7743
  var InitialLoadingStateRenderer = {
7368
7744
  canRenderType: "loading-state",
7369
7745
  canRender: ({ stepLoadingState }) => stepLoadingState === "initial",
7370
- render: () => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
7371
- import_components72.Loader,
7746
+ render: () => /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
7747
+ import_components77.Loader,
7372
7748
  {
7373
7749
  size: "md",
7374
7750
  classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin("md")}` },
@@ -7379,25 +7755,25 @@ var InitialLoadingStateRenderer = {
7379
7755
 
7380
7756
  // src/dynamicFlow/DynamicFlowModal.tsx
7381
7757
  var import_dynamic_flow_client = require("@wise/dynamic-flow-client");
7382
- var import_components73 = require("@transferwise/components");
7383
- var import_jsx_runtime106 = require("react/jsx-runtime");
7758
+ var import_components78 = require("@transferwise/components");
7759
+ var import_jsx_runtime111 = require("react/jsx-runtime");
7384
7760
  function DynamicFlowModal(props) {
7385
7761
  const _a = props, { className = "" } = _a, rest = __objRest(_a, ["className"]);
7386
7762
  const dfProps = useWiseToCoreProps(rest);
7387
7763
  const df = (0, import_dynamic_flow_client.useDynamicFlowModal)(dfProps);
7388
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
7389
- import_components73.Modal,
7764
+ return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
7765
+ import_components78.Modal,
7390
7766
  __spreadProps(__spreadValues({
7391
7767
  className: `dynamic-flow-modal ${className}`,
7392
7768
  disableDimmerClickToClose: true
7393
7769
  }, df.modal), {
7394
- body: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "dynamic-flow-modal", children: df.modal.body })
7770
+ body: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className: "dynamic-flow-modal", children: df.modal.body })
7395
7771
  })
7396
7772
  );
7397
7773
  }
7398
7774
 
7399
7775
  // src/dynamicFlow/getMergedRenderers.tsx
7400
- var import_jsx_runtime107 = require("react/jsx-runtime");
7776
+ var import_jsx_runtime112 = require("react/jsx-runtime");
7401
7777
  var wiseRenderers = getWiseRenderers();
7402
7778
  var getMergedRenderers = (props) => {
7403
7779
  var _d, _e;
@@ -7411,7 +7787,7 @@ var getMergedRenderers = (props) => {
7411
7787
  method: initialRequest.method,
7412
7788
  data: initialRequest.body
7413
7789
  };
7414
- return presentation.type === "push" ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(DynamicFlow, __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), { features: subflowFeatures, initialAction: action })) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
7790
+ return presentation.type === "push" ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(DynamicFlow, __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), { features: subflowFeatures, initialAction: action })) : /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
7415
7791
  DynamicFlowModal,
7416
7792
  __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), {
7417
7793
  features: subflowFeatures,
@@ -7490,12 +7866,12 @@ var customEventsToAnalytics = {
7490
7866
  };
7491
7867
 
7492
7868
  // src/dynamicFlow/useOnCopy.tsx
7493
- var import_react30 = require("react");
7494
- var import_react_intl38 = require("react-intl");
7869
+ var import_react34 = require("react");
7870
+ var import_react_intl40 = require("react-intl");
7495
7871
 
7496
7872
  // src/dynamicFlow/messages.ts
7497
- var import_react_intl37 = require("react-intl");
7498
- var messages_default = (0, import_react_intl37.defineMessages)({
7873
+ var import_react_intl39 = require("react-intl");
7874
+ var messages_default = (0, import_react_intl39.defineMessages)({
7499
7875
  copied: {
7500
7876
  id: "df.wise.CopyFeedback.copy",
7501
7877
  defaultMessage: "Copied to clipboard",
@@ -7510,9 +7886,9 @@ var messages_default = (0, import_react_intl37.defineMessages)({
7510
7886
 
7511
7887
  // src/dynamicFlow/useOnCopy.tsx
7512
7888
  var useOnCopy = () => {
7513
- const { formatMessage } = (0, import_react_intl38.useIntl)();
7889
+ const { formatMessage } = (0, import_react_intl40.useIntl)();
7514
7890
  const createSnackBar = useSnackBarIfAvailable();
7515
- return (0, import_react30.useCallback)(
7891
+ return (0, import_react34.useCallback)(
7516
7892
  (copiedContent) => {
7517
7893
  if (copiedContent) {
7518
7894
  createSnackBar({ text: formatMessage(messages_default.copied) });
@@ -7525,11 +7901,11 @@ var useOnCopy = () => {
7525
7901
  };
7526
7902
 
7527
7903
  // src/dynamicFlow/useWiseHttpClient.tsx
7528
- var import_react31 = require("react");
7529
- var import_react_intl39 = require("react-intl");
7904
+ var import_react35 = require("react");
7905
+ var import_react_intl41 = require("react-intl");
7530
7906
  var useWiseHttpClient = (httpClient) => {
7531
- const { locale } = (0, import_react_intl39.useIntl)();
7532
- return (0, import_react31.useCallback)(
7907
+ const { locale } = (0, import_react_intl41.useIntl)();
7908
+ return (0, import_react35.useCallback)(
7533
7909
  async (input, init = {}) => {
7534
7910
  const headers = new Headers(init.headers);
7535
7911
  headers.set("accept-language", locale);
@@ -7570,10 +7946,10 @@ var useWiseToCoreProps = (props) => {
7570
7946
  onLog
7571
7947
  } = props;
7572
7948
  const httpClient = useWiseHttpClient(customFetch);
7573
- const mergedRenderers = (0, import_react32.useMemo)(() => getMergedRenderers(props), [renderers]);
7949
+ const mergedRenderers = (0, import_react36.useMemo)(() => getMergedRenderers(props), [renderers]);
7574
7950
  const createSnackBar = useCreateSnackBar();
7575
- const logEvent = (0, import_react32.useMemo)(() => getLogEvent(onLog), [onLog]);
7576
- const trackEvent = (0, import_react32.useMemo)(() => getTrackEvent(onEvent, onAnalytics), [onEvent, onAnalytics]);
7951
+ const logEvent = (0, import_react36.useMemo)(() => getLogEvent(onLog), [onLog]);
7952
+ const trackEvent = (0, import_react36.useMemo)(() => getTrackEvent(onEvent, onAnalytics), [onEvent, onAnalytics]);
7577
7953
  const onCopy = useOnCopy();
7578
7954
  return __spreadProps(__spreadValues({}, props), {
7579
7955
  httpClient,
@@ -7608,27 +7984,27 @@ var openLinkInNewTab = (url) => {
7608
7984
  };
7609
7985
 
7610
7986
  // src/dynamicFlow/DynamicFlow.tsx
7611
- var import_jsx_runtime108 = require("react/jsx-runtime");
7987
+ var import_jsx_runtime113 = require("react/jsx-runtime");
7612
7988
  function DynamicFlow(props) {
7613
7989
  const { className = "" } = props;
7614
7990
  const dfProps = useWiseToCoreProps(props);
7615
7991
  const df = (0, import_dynamic_flow_client4.useDynamicFlow)(dfProps);
7616
7992
  const { onContextMenu, contextMenu } = useDFContextMenu(df.controller);
7617
- return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className, onContextMenu, children: [
7993
+ return /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className, onContextMenu, children: [
7618
7994
  df.view,
7619
7995
  contextMenu
7620
7996
  ] });
7621
7997
  }
7622
7998
 
7623
7999
  // src/dynamicFlow/DynamicFlowWithRef.tsx
7624
- var import_react33 = require("react");
8000
+ var import_react37 = require("react");
7625
8001
  var import_dynamic_flow_client5 = require("@wise/dynamic-flow-client");
7626
- var import_jsx_runtime109 = require("react/jsx-runtime");
7627
- var DynamicFlowWithRef = (0, import_react33.forwardRef)(function DynamicFlowWithRef2(props, ref) {
8002
+ var import_jsx_runtime114 = require("react/jsx-runtime");
8003
+ var DynamicFlowWithRef = (0, import_react37.forwardRef)(function DynamicFlowWithRef2(props, ref) {
7628
8004
  const { className = "" } = props;
7629
8005
  const dfProps = useWiseToCoreProps(props);
7630
8006
  const df = (0, import_dynamic_flow_client5.useDynamicFlow)(dfProps);
7631
- (0, import_react33.useImperativeHandle)(
8007
+ (0, import_react37.useImperativeHandle)(
7632
8008
  ref,
7633
8009
  () => ({
7634
8010
  getValue: () => {
@@ -7639,7 +8015,7 @@ var DynamicFlowWithRef = (0, import_react33.forwardRef)(function DynamicFlowWith
7639
8015
  }),
7640
8016
  [df]
7641
8017
  );
7642
- return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className, children: df.view });
8018
+ return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { className, children: df.view });
7643
8019
  });
7644
8020
 
7645
8021
  // src/index.ts
@@ -7701,8 +8077,8 @@ var cs_default = {
7701
8077
  "df.wise.group.currencies-with-account-details": "M\u011Bny s detaily \xFA\u010Dtu",
7702
8078
  "df.wise.group.popular": "Popul\xE1rn\xED",
7703
8079
  "df.wise.group.recent": "Ned\xE1vn\xE9",
7704
- "df.wise.ssnInput.hideValue": "Hide value",
7705
- "df.wise.ssnInput.showValue": "Show value",
8080
+ "df.wise.ssnInput.hideValue": "Skr\xFDt hodnotu",
8081
+ "df.wise.ssnInput.showValue": "Zobrazit hodnotu",
7706
8082
  "df.wise.step.scrollToBottom": "P\u0159ej\xEDt na konec"
7707
8083
  };
7708
8084
 
@@ -7769,6 +8145,8 @@ var en_default = {
7769
8145
  "df.wise.ButtonLayout.buttonLoadingMessage": "This might take a few seconds",
7770
8146
  "df.wise.Collection.clearText": "Clear text",
7771
8147
  "df.wise.Collection.loadMoreMessage": "Load more",
8148
+ "df.wise.Collection.showLessResultsButton": "Show less results",
8149
+ "df.wise.Collection.showMoreResultsButton": "Show all {count} results",
7772
8150
  "df.wise.ControlFeedback.maxLength": "Please enter {maxLength} or fewer characters.",
7773
8151
  "df.wise.ControlFeedback.maximum": "Please enter a number that's {maximum} or less.",
7774
8152
  "df.wise.ControlFeedback.maximumDate": "Please enter a date that's on or before {maximum}.",
@@ -7961,8 +8339,8 @@ var hu_default = {
7961
8339
  "df.wise.group.currencies-with-account-details": "P\xE9nznemek sz\xE1mlaadatokkal",
7962
8340
  "df.wise.group.popular": "N\xE9pszer\u0171",
7963
8341
  "df.wise.group.recent": "Legut\xF3bbi",
7964
- "df.wise.ssnInput.hideValue": "Hide value",
7965
- "df.wise.ssnInput.showValue": "Show value",
8342
+ "df.wise.ssnInput.hideValue": "\xC9rt\xE9k elrejt\xE9se",
8343
+ "df.wise.ssnInput.showValue": "\xC9rt\xE9k megjelen\xEDt\xE9se",
7966
8344
  "df.wise.step.scrollToBottom": "G\xF6rgess legalulra"
7967
8345
  };
7968
8346
 
@@ -8065,8 +8443,8 @@ var it_default = {
8065
8443
  "df.wise.group.currencies-with-account-details": "Valute con estremi del conto",
8066
8444
  "df.wise.group.popular": "Popolari",
8067
8445
  "df.wise.group.recent": "Recenti",
8068
- "df.wise.ssnInput.hideValue": "Hide value",
8069
- "df.wise.ssnInput.showValue": "Show value",
8446
+ "df.wise.ssnInput.hideValue": "Nascondi valore",
8447
+ "df.wise.ssnInput.showValue": "Mostra valore",
8070
8448
  "df.wise.step.scrollToBottom": "Scorri fino in fondo"
8071
8449
  };
8072
8450
 
@@ -8117,8 +8495,8 @@ var ja_default = {
8117
8495
  "df.wise.group.currencies-with-account-details": "\u53E3\u5EA7\u60C5\u5831\u3092\u53D6\u5F97\u3067\u304D\u308B\u901A\u8CA8",
8118
8496
  "df.wise.group.popular": "\u4EBA\u6C17",
8119
8497
  "df.wise.group.recent": "\u6700\u8FD1",
8120
- "df.wise.ssnInput.hideValue": "Hide value",
8121
- "df.wise.ssnInput.showValue": "Show value",
8498
+ "df.wise.ssnInput.hideValue": "\u756A\u53F7\u3092\u975E\u8868\u793A",
8499
+ "df.wise.ssnInput.showValue": "\u756A\u53F7\u3092\u8868\u793A",
8122
8500
  "df.wise.step.scrollToBottom": "\u4E0B\u307E\u3067\u30B9\u30AF\u30ED\u30FC\u30EB\u3059\u308B"
8123
8501
  };
8124
8502
 
@@ -8169,8 +8547,8 @@ var nl_default = {
8169
8547
  "df.wise.group.currencies-with-account-details": "Valuta's met rekeninggegevens",
8170
8548
  "df.wise.group.popular": "Populair",
8171
8549
  "df.wise.group.recent": "Recent",
8172
- "df.wise.ssnInput.hideValue": "Hide value",
8173
- "df.wise.ssnInput.showValue": "Show value",
8550
+ "df.wise.ssnInput.hideValue": "Waarde verbergen",
8551
+ "df.wise.ssnInput.showValue": "Waarde weergeven",
8174
8552
  "df.wise.step.scrollToBottom": "Scrol omlaag"
8175
8553
  };
8176
8554
 
@@ -8221,8 +8599,8 @@ var pl_default = {
8221
8599
  "df.wise.group.currencies-with-account-details": "Waluty z danymi bankowymi",
8222
8600
  "df.wise.group.popular": "Popularne",
8223
8601
  "df.wise.group.recent": "Ostatnie",
8224
- "df.wise.ssnInput.hideValue": "Hide value",
8225
- "df.wise.ssnInput.showValue": "Show value",
8602
+ "df.wise.ssnInput.hideValue": "Ukryj warto\u015B\u0107",
8603
+ "df.wise.ssnInput.showValue": "Poka\u017C warto\u015B\u0107",
8226
8604
  "df.wise.step.scrollToBottom": "Przewi\u0144 w d\xF3\u0142"
8227
8605
  };
8228
8606
 
@@ -8273,8 +8651,8 @@ var pt_default = {
8273
8651
  "df.wise.group.currencies-with-account-details": "Moedas com dados de conta",
8274
8652
  "df.wise.group.popular": "Popular",
8275
8653
  "df.wise.group.recent": "Recente",
8276
- "df.wise.ssnInput.hideValue": "Hide value",
8277
- "df.wise.ssnInput.showValue": "Show value",
8654
+ "df.wise.ssnInput.hideValue": "Ocultar valor",
8655
+ "df.wise.ssnInput.showValue": "Exibir valor",
8278
8656
  "df.wise.step.scrollToBottom": "Descer at\xE9 o final da p\xE1gina"
8279
8657
  };
8280
8658
 
@@ -8325,8 +8703,8 @@ var ro_default = {
8325
8703
  "df.wise.group.currencies-with-account-details": "Monede cu detalii de cont",
8326
8704
  "df.wise.group.popular": "Populare",
8327
8705
  "df.wise.group.recent": "Recente",
8328
- "df.wise.ssnInput.hideValue": "Hide value",
8329
- "df.wise.ssnInput.showValue": "Show value",
8706
+ "df.wise.ssnInput.hideValue": "Ascunde valoarea",
8707
+ "df.wise.ssnInput.showValue": "Arat\u0103 valoarea",
8330
8708
  "df.wise.step.scrollToBottom": "Deruleaz\u0103 \xEEn jos"
8331
8709
  };
8332
8710
 
@@ -8377,8 +8755,8 @@ var ru_default = {
8377
8755
  "df.wise.group.currencies-with-account-details": "\u0412\u0430\u043B\u044E\u0442\u044B \u0441 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u0430\u043C\u0438 \u0441\u0447\u0435\u0442\u0430",
8378
8756
  "df.wise.group.popular": "\u041F\u043E\u043F\u0443\u043B\u044F\u0440\u043D\u044B\u0435",
8379
8757
  "df.wise.group.recent": "\u041D\u0435\u0434\u0430\u0432\u043D\u0438\u0435",
8380
- "df.wise.ssnInput.hideValue": "Hide value",
8381
- "df.wise.ssnInput.showValue": "Show value",
8758
+ "df.wise.ssnInput.hideValue": "\u0421\u043A\u0440\u044B\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435",
8759
+ "df.wise.ssnInput.showValue": "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435",
8382
8760
  "df.wise.step.scrollToBottom": "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0439\u0442\u0435 \u0432\u043D\u0438\u0437"
8383
8761
  };
8384
8762
 
@@ -8585,8 +8963,8 @@ var zh_HK_default = {
8585
8963
  "df.wise.group.currencies-with-account-details": "\u63D0\u4F9B\u5E33\u6236\u8CC7\u6599\u7684\u8CA8\u5E63",
8586
8964
  "df.wise.group.popular": "\u71B1\u9580",
8587
8965
  "df.wise.group.recent": "\u6700\u8FD1\u7684",
8588
- "df.wise.ssnInput.hideValue": "Hide value",
8589
- "df.wise.ssnInput.showValue": "Show value",
8966
+ "df.wise.ssnInput.hideValue": "\u96B1\u85CF\u503C",
8967
+ "df.wise.ssnInput.showValue": "\u986F\u793A\u503C",
8590
8968
  "df.wise.step.scrollToBottom": "\u6ED1\u52D5\u5230\u6700\u5E95\u90E8"
8591
8969
  };
8592
8970