@wise/dynamic-flow-client 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/main.js CHANGED
@@ -541,92 +541,92 @@ __export(src_exports, {
541
541
  module.exports = __toCommonJS(src_exports);
542
542
 
543
543
  // src/step/layoutStep/utils/layout-utils.ts
544
- function convertStepToLayout(step31, { displayStepTitle = true } = {}) {
545
- if (!step31 || !step31.type) {
544
+ function convertStepToLayout(step33, { displayStepTitle = true } = {}) {
545
+ if (!step33 || !step33.type) {
546
546
  throw new Error("Missing step type");
547
547
  }
548
- if (step31.layout) {
549
- return addMissingTitleAndDescriptionToStep(step31, displayStepTitle);
548
+ if (step33.layout) {
549
+ return addMissingTitleAndDescriptionToStep(step33, displayStepTitle);
550
550
  }
551
- switch (step31.type) {
551
+ switch (step33.type) {
552
552
  case "final":
553
- return convertFinalStepToDynamicLayout(step31);
553
+ return convertFinalStepToDynamicLayout(step33);
554
554
  case "decision":
555
- return convertDecisionStepToDynamicLayout(step31);
555
+ return convertDecisionStepToDynamicLayout(step33);
556
556
  case "form":
557
- return convertFormStepToDynamicLayout(step31);
557
+ return convertFormStepToDynamicLayout(step33);
558
558
  case "external":
559
- return convertExternalStepToDynamicLayout(step31);
559
+ return convertExternalStepToDynamicLayout(step33);
560
560
  default:
561
561
  throw new Error("invalid step type");
562
562
  }
563
563
  }
564
- function convertCommonComponents(step31) {
564
+ function convertCommonComponents(step33) {
565
565
  const layout6 = [];
566
- if (step31.title) {
567
- layout6.push(convertStepTitleToDynamicHeading(step31.title));
566
+ if (step33.title) {
567
+ layout6.push(convertStepTitleToDynamicHeading(step33.title));
568
568
  }
569
- if (step31.image) {
570
- const image = convertStepImageToDynamicImage(step31.image);
569
+ if (step33.image) {
570
+ const image = convertStepImageToDynamicImage(step33.image);
571
571
  layout6.push(image);
572
572
  }
573
- if (step31.description) {
574
- layout6.push(convertStepDescriptionToDynamicParagraph(step31.description));
573
+ if (step33.description) {
574
+ layout6.push(convertStepDescriptionToDynamicParagraph(step33.description));
575
575
  }
576
576
  return layout6;
577
577
  }
578
- function convertExternalStepToDynamicLayout(step31) {
579
- return [...convertCommonComponents(step31), convertStepToExternalComponent(step31)];
578
+ function convertExternalStepToDynamicLayout(step33) {
579
+ return [...convertCommonComponents(step33), convertStepToExternalComponent(step33)];
580
580
  }
581
- function convertStepToExternalComponent(step31) {
581
+ function convertStepToExternalComponent(step33) {
582
582
  return {
583
583
  type: "external",
584
- requestUrl: step31.requestUrl,
585
- polling: step31.polling,
586
- responseHandlers: step31.responseHandlers,
587
- retryTitle: step31.retryTitle
584
+ requestUrl: step33.requestUrl,
585
+ polling: step33.polling,
586
+ responseHandlers: step33.responseHandlers,
587
+ retryTitle: step33.retryTitle
588
588
  };
589
589
  }
590
- function convertFormStepToDynamicLayout(step31) {
591
- const layout6 = convertCommonComponents(step31);
592
- if (step31.reviewFields) {
593
- layout6.push(convertStepReviewToDynamicReview(step31.reviewFields));
590
+ function convertFormStepToDynamicLayout(step33) {
591
+ const layout6 = convertCommonComponents(step33);
592
+ if (step33.reviewFields) {
593
+ layout6.push(convertStepReviewToDynamicReview(step33.reviewFields));
594
594
  }
595
- if (step31.schemas) {
596
- layout6.push(...getSchemaLayout(step31));
595
+ if (step33.schemas) {
596
+ layout6.push(...getSchemaLayout(step33));
597
597
  }
598
- if (step31.actions) {
599
- const actions = step31.actions.map(convertStepActionToDynamicAction);
598
+ if (step33.actions) {
599
+ const actions = step33.actions.map(convertStepActionToDynamicAction);
600
600
  layout6.push(dynamicBox(actions, "md"));
601
601
  }
602
602
  return layout6;
603
603
  }
604
- function convertFinalStepToDynamicLayout(step31) {
604
+ function convertFinalStepToDynamicLayout(step33) {
605
605
  const layout6 = [];
606
- if (step31.details) {
607
- if (step31.details.image) {
608
- const image = convertFinalStepImageToDynamicImage(step31.details.image);
606
+ if (step33.details) {
607
+ if (step33.details.image) {
608
+ const image = convertFinalStepImageToDynamicImage(step33.details.image);
609
609
  layout6.push(image);
610
610
  }
611
- if (step31.details.title) {
612
- layout6.push(convertStepTitleToDynamicHeading(step31.details.title));
611
+ if (step33.details.title) {
612
+ layout6.push(convertStepTitleToDynamicHeading(step33.details.title));
613
613
  }
614
- if (step31.details.description) {
615
- layout6.push(convertStepDescriptionToDynamicParagraph(step31.details.description));
614
+ if (step33.details.description) {
615
+ layout6.push(convertStepDescriptionToDynamicParagraph(step33.details.description));
616
616
  }
617
617
  }
618
- if (step31.actions) {
619
- const actions = step31.actions.map(
618
+ if (step33.actions) {
619
+ const actions = step33.actions.map(
620
620
  (action2) => convertStepActionToDynamicAction(__spreadProps(__spreadValues({}, action2), { type: action2.type || "primary" }))
621
621
  );
622
622
  layout6.push(dynamicBox(actions, "md"));
623
623
  }
624
624
  return layout6;
625
625
  }
626
- function convertDecisionStepToDynamicLayout(step31) {
627
- const layout6 = convertCommonComponents(step31);
628
- if (step31.options) {
629
- layout6.push(convertStepDecisionToDynamicDecision(step31.options));
626
+ function convertDecisionStepToDynamicLayout(step33) {
627
+ const layout6 = convertCommonComponents(step33);
628
+ if (step33.options) {
629
+ layout6.push(convertStepDecisionToDynamicDecision(step33.options));
630
630
  }
631
631
  return layout6;
632
632
  }
@@ -712,10 +712,10 @@ function convertReviewFieldToDefinition(reviewField) {
712
712
  value: reviewField.value
713
713
  };
714
714
  }
715
- function getSchemaLayout(step31) {
715
+ function getSchemaLayout(step33) {
716
716
  const layout6 = [];
717
- if (step31.schemas && step31.schemas[0]) {
718
- const schema2 = step31.schemas[0];
717
+ if (step33.schemas && step33.schemas[0]) {
718
+ const schema2 = step33.schemas[0];
719
719
  const dynamicForm = convertStepSchemaToDynamicForm(schema2);
720
720
  if (isWideForm()) {
721
721
  layout6.push(dynamicForm);
@@ -728,11 +728,11 @@ function getSchemaLayout(step31) {
728
728
  function isWideForm() {
729
729
  return false;
730
730
  }
731
- function addMissingTitleAndDescriptionToStep(step31, displayStepTitle) {
731
+ function addMissingTitleAndDescriptionToStep(step33, displayStepTitle) {
732
732
  return [
733
- ...displayStepTitle && step31.title ? [convertStepTitleToDynamicHeading(step31.title)] : [],
734
- ...step31.description ? [convertStepDescriptionToDynamicParagraph(step31.description)] : [],
735
- ...step31.layout || []
733
+ ...displayStepTitle && step33.title ? [convertStepTitleToDynamicHeading(step33.title)] : [],
734
+ ...step33.description ? [convertStepDescriptionToDynamicParagraph(step33.description)] : [],
735
+ ...step33.layout || []
736
736
  ];
737
737
  }
738
738
 
@@ -1715,19 +1715,19 @@ var stepType = {
1715
1715
  LAYOUT: "layout",
1716
1716
  CAMERA: "camera"
1717
1717
  };
1718
- var isCameraStep = (step31) => {
1719
- return isFormStep(step31) && hasSingleAction(step31) && hasSingleFileUploadSchemaWithCameraOnly(step31);
1718
+ var isCameraStep = (step33) => {
1719
+ return isFormStep(step33) && hasSingleAction(step33) && hasSingleFileUploadSchemaWithCameraOnly(step33);
1720
1720
  };
1721
- var isFormStep = (step31) => (step31 == null ? void 0 : step31.type) === "form";
1722
- var hasSingleAction = (step31) => {
1721
+ var isFormStep = (step33) => (step33 == null ? void 0 : step33.type) === "form";
1722
+ var hasSingleAction = (step33) => {
1723
1723
  var _a;
1724
- return ((_a = step31 == null ? void 0 : step31.actions) == null ? void 0 : _a.length) === 1;
1724
+ return ((_a = step33 == null ? void 0 : step33.actions) == null ? void 0 : _a.length) === 1;
1725
1725
  };
1726
- var hasSingleFileUploadSchemaWithCameraOnly = (step31) => {
1727
- if (!step31.schemas) {
1726
+ var hasSingleFileUploadSchemaWithCameraOnly = (step33) => {
1727
+ if (!step33.schemas) {
1728
1728
  return false;
1729
1729
  }
1730
- const schemas = filterHiddenSchemas(step31.schemas);
1730
+ const schemas = filterHiddenSchemas(step33.schemas);
1731
1731
  if ((schemas == null ? void 0 : schemas.length) !== 1) {
1732
1732
  return false;
1733
1733
  }
@@ -1749,8 +1749,8 @@ var filterHiddenSchemas = (schemas) => {
1749
1749
  return (schema2 == null ? void 0 : schema2.hidden) !== true;
1750
1750
  });
1751
1751
  };
1752
- var getStepType = (step31) => {
1753
- if (isCameraStep(step31)) {
1752
+ var getStepType = (step33) => {
1753
+ if (isCameraStep(step33)) {
1754
1754
  return stepType.CAMERA;
1755
1755
  }
1756
1756
  return stepType.LAYOUT;
@@ -2994,7 +2994,7 @@ var _FormControl = class extends import_react13.PureComponent {
2994
2994
  const {
2995
2995
  name,
2996
2996
  placeholder,
2997
- step: step31,
2997
+ step: step33,
2998
2998
  countryCode,
2999
2999
  type,
3000
3000
  options,
@@ -3102,7 +3102,7 @@ var _FormControl = class extends import_react13.PureComponent {
3102
3102
  placeholder,
3103
3103
  readOnly,
3104
3104
  required,
3105
- step: step31,
3105
+ step: step33,
3106
3106
  type: "number",
3107
3107
  value: getSafeStringOrNumberValue(value, { coerceValue: true }),
3108
3108
  onBlur: this.handleOnBlur,
@@ -3318,52 +3318,30 @@ FormControl.defaultProps = {
3318
3318
  // src/jsonSchemaForm/schemaFormControl/utils/mapping-utils.tsx
3319
3319
  var import_components9 = require("@transferwise/components");
3320
3320
 
3321
- // src/layout/icon/DynamicIcon.tsx
3322
- var icons = __toESM(require("@transferwise/icons"));
3321
+ // src/layout/icon/FlagIcon.tsx
3323
3322
  var import_jsx_runtime20 = require("react/jsx-runtime");
3324
- var DynamicIcon = ({ type }) => {
3325
- const iconName = toCapitalisedCamelCase(type);
3326
- if (!Object.keys(icons).includes(iconName)) {
3327
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_jsx_runtime20.Fragment, {});
3323
+ var isFlagIcon = (name) => availableCurrencyFlags.some((currencyCode) => name === `flag-${currencyCode}`);
3324
+ var FlagIcon = ({ name }) => {
3325
+ if (!isFlagIcon(name)) {
3326
+ return null;
3328
3327
  }
3329
- const Icon = icons[iconName];
3330
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { size: 24 });
3331
- };
3332
- function toCapitalisedCamelCase(value) {
3333
- return value.split("-").map(capitaliseFirstChar).join("");
3334
- }
3335
- function capitaliseFirstChar(value) {
3336
- var _a;
3337
- return `${(_a = value[0]) == null ? void 0 : _a.toUpperCase()}${value.slice(1)}`;
3338
- }
3339
- function isValidIconName(name) {
3340
- const iconName = toCapitalisedCamelCase(name);
3341
- return Object.keys(icons).includes(iconName);
3342
- }
3343
- var DynamicIcon_default = DynamicIcon;
3344
-
3345
- // src/jsonSchemaForm/schemaFormControl/utils/currency-utils.ts
3346
- function getCurrencyFlag(iconName) {
3347
- if (iconName) {
3348
- const index = availablePrefixedCurrencyFlags.indexOf(iconName);
3349
- if (index >= 0) {
3350
- return {
3351
- currency: availableCurrencyFlags[index]
3352
- };
3328
+ const currencyCode = name.substring(5);
3329
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3330
+ "img",
3331
+ {
3332
+ src: `https://wise.com/web-art/assets/flags/${currencyCode}.svg`,
3333
+ alt: "",
3334
+ "data-testid": `img-flag-${currencyCode}`
3353
3335
  }
3354
- }
3355
- return null;
3356
- }
3336
+ );
3337
+ };
3357
3338
  var availableCurrencyFlags = [
3358
- "eur",
3359
- "gbp",
3360
- "inr",
3361
- "usd",
3362
3339
  "aed",
3363
3340
  "ars",
3364
3341
  "aud",
3365
3342
  "bdt",
3366
3343
  "bgn",
3344
+ "bnd",
3367
3345
  "brl",
3368
3346
  "bwp",
3369
3347
  "cad",
@@ -3375,7 +3353,9 @@ var availableCurrencyFlags = [
3375
3353
  "czk",
3376
3354
  "dkk",
3377
3355
  "egp",
3356
+ "eur",
3378
3357
  "fjd",
3358
+ "gbp",
3379
3359
  "gel",
3380
3360
  "ghs",
3381
3361
  "hkd",
@@ -3383,10 +3363,14 @@ var availableCurrencyFlags = [
3383
3363
  "huf",
3384
3364
  "idr",
3385
3365
  "ils",
3366
+ "imp",
3367
+ "inr",
3386
3368
  "jpy",
3387
3369
  "kes",
3388
3370
  "krw",
3371
+ "lak",
3389
3372
  "lkr",
3373
+ "lsl",
3390
3374
  "mad",
3391
3375
  "mxn",
3392
3376
  "myr",
@@ -3396,6 +3380,7 @@ var availableCurrencyFlags = [
3396
3380
  "nok",
3397
3381
  "npr",
3398
3382
  "nzd",
3383
+ "pab",
3399
3384
  "pen",
3400
3385
  "php",
3401
3386
  "pkr",
@@ -3405,20 +3390,58 @@ var availableCurrencyFlags = [
3405
3390
  "sek",
3406
3391
  "sgd",
3407
3392
  "thb",
3393
+ "tmt",
3408
3394
  "try",
3409
3395
  "tzs",
3410
3396
  "uah",
3411
3397
  "ugx",
3398
+ "usd",
3412
3399
  "uyu",
3413
3400
  "vnd",
3414
3401
  "xof",
3415
3402
  "zar",
3416
3403
  "zmw"
3417
3404
  ];
3418
- var availablePrefixedCurrencyFlags = availableCurrencyFlags.map((code) => `flag-${code}`);
3419
3405
 
3420
- // src/jsonSchemaForm/schemaFormControl/utils/mapping-utils.tsx
3406
+ // src/layout/icon/NamedIcon.tsx
3407
+ var icons = __toESM(require("@transferwise/icons"));
3421
3408
  var import_jsx_runtime21 = require("react/jsx-runtime");
3409
+ var isNamedIcon = (name) => {
3410
+ const iconName = toCapitalisedCamelCase(name);
3411
+ return Object.keys(icons).includes(iconName);
3412
+ };
3413
+ var NamedIcon = ({ name }) => {
3414
+ if (!isNamedIcon(name)) {
3415
+ return null;
3416
+ }
3417
+ const iconName = toCapitalisedCamelCase(name);
3418
+ const Icon = icons[iconName];
3419
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon, { size: 24 });
3420
+ };
3421
+ var toCapitalisedCamelCase = (value) => value.split("-").map(capitaliseFirstChar).join("");
3422
+ var capitaliseFirstChar = (value) => {
3423
+ var _a;
3424
+ return `${(_a = value[0]) == null ? void 0 : _a.toUpperCase()}${value.slice(1)}`;
3425
+ };
3426
+
3427
+ // src/layout/icon/DynamicIcon.tsx
3428
+ var import_jsx_runtime22 = require("react/jsx-runtime");
3429
+ var DynamicIcon = ({ type }) => {
3430
+ if (isFlagIcon(type)) {
3431
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FlagIcon, { name: type });
3432
+ }
3433
+ if (isNamedIcon(type)) {
3434
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(NamedIcon, { name: type });
3435
+ }
3436
+ return null;
3437
+ };
3438
+ function isValidIconName(name) {
3439
+ return isNamedIcon(name) || isFlagIcon(name);
3440
+ }
3441
+ var DynamicIcon_default = DynamicIcon;
3442
+
3443
+ // src/jsonSchemaForm/schemaFormControl/utils/mapping-utils.tsx
3444
+ var import_jsx_runtime23 = require("react/jsx-runtime");
3422
3445
  var mapConstSchemaToOption = (schema2, controlType) => {
3423
3446
  switch (controlType) {
3424
3447
  case "select":
@@ -3429,56 +3452,58 @@ var mapConstSchemaToOption = (schema2, controlType) => {
3429
3452
  }
3430
3453
  };
3431
3454
  var mapConstSchemaToRadioOption = (schema2) => {
3432
- return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
3455
+ return __spreadValues(__spreadValues(__spreadValues({
3433
3456
  // TODO: LOW avoid type assertion -- using || '' would fail some tests
3434
3457
  label: schema2.title,
3435
3458
  value: schema2.const
3436
- }, getOptionDescription(schema2.title, schema2.description)), mapIconToAvatar(schema2.icon)), mapCurrency(schema2.icon)), mapAvatar(schema2.image)), getDisabled(schema2.disabled));
3459
+ }, getOptionDescription(schema2.title, schema2.description)), getAvatarPropertyForRadioOption(schema2)), getDisabled(schema2.disabled));
3437
3460
  };
3438
3461
  var mapConstSchemaToSelectOption = (schema2) => {
3439
- return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
3462
+ return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
3440
3463
  // TODO: LOW avoid type assertion -- using || '' would fail some tests
3441
3464
  label: schema2.title,
3442
3465
  value: schema2.const
3443
- }, getOptionDescription(schema2.title, schema2.description)), mapIcon(schema2.icon)), mapCurrency(schema2.icon)), mapImage(schema2.image)), getDisabled(schema2.disabled)), mapKeywordsToSearchStrings(schema2.keywords));
3466
+ }, getOptionDescription(schema2.title, schema2.description)), getIconPropertyForSelectOption(schema2.icon)), mapImage(schema2.image)), getDisabled(schema2.disabled)), mapKeywordsToSearchStrings(schema2.keywords));
3444
3467
  };
3445
- var mapCurrency = (icon) => icon ? getCurrencyFlag(icon.name) : null;
3446
3468
  var mapKeywordsToSearchStrings = (searchStrings) => isArray(searchStrings) ? { searchStrings } : {};
3447
3469
  var mapImage = (image) => {
3448
3470
  if (image == null ? void 0 : image.url) {
3449
3471
  return {
3450
- icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "media", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("img", { src: image.url, alt: image.name || "" }) }) })
3472
+ icon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "media", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("img", { src: image.url, alt: image.name || "" }) }) })
3451
3473
  };
3452
3474
  }
3453
3475
  return null;
3454
3476
  };
3455
- var mapIcon = (icon) => {
3477
+ var getIconPropertyForSelectOption = (icon) => {
3478
+ if ((icon == null ? void 0 : icon.name) && isFlagIcon(icon.name)) {
3479
+ return { currency: icon.name.substring(5) };
3480
+ }
3456
3481
  if ((icon == null ? void 0 : icon.name) && isValidIconName(icon.name)) {
3457
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DynamicIcon_default, { type: icon.name }) };
3482
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DynamicIcon_default, { type: icon.name }) };
3458
3483
  }
3459
3484
  if (icon == null ? void 0 : icon.text) {
3460
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: icon.text }) };
3485
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: icon.text }) };
3461
3486
  }
3462
3487
  return null;
3463
3488
  };
3464
- var mapIconToAvatar = (icon) => {
3489
+ var getAvatarPropertyForRadioOption = ({ image, icon }) => {
3490
+ if (image == null ? void 0 : image.url) {
3491
+ return {
3492
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components9.Avatar, { type: import_components9.AvatarType.THUMBNAIL, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("img", { src: image.url, alt: "" }) })
3493
+ };
3494
+ }
3465
3495
  if ((icon == null ? void 0 : icon.name) && isValidIconName(icon.name)) {
3466
3496
  return {
3467
- avatar: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components9.Avatar, { type: import_components9.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DynamicIcon_default, { type: icon.name }) })
3497
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components9.Avatar, { type: import_components9.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DynamicIcon_default, { type: icon.name }) })
3468
3498
  };
3469
3499
  }
3470
3500
  if (icon == null ? void 0 : icon.text) {
3471
3501
  return {
3472
- avatar: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components9.Avatar, { type: import_components9.AvatarType.INITIALS, children: icon.text })
3502
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components9.Avatar, { type: import_components9.AvatarType.INITIALS, children: icon.text })
3473
3503
  };
3474
3504
  }
3475
3505
  return null;
3476
3506
  };
3477
- var mapAvatar = (image) => {
3478
- return image && image.url ? {
3479
- avatar: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components9.Avatar, { type: import_components9.AvatarType.THUMBNAIL, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("img", { src: image.url, alt: "User avatar" }) })
3480
- } : null;
3481
- };
3482
3507
  var mapSchemaToUploadOptions = ({ accepts }) => __spreadValues({}, isArray(accepts) && { usAccept: accepts.join(",") });
3483
3508
  var getOptionDescription = (title, description) => {
3484
3509
  if (title && description) {
@@ -3495,19 +3520,26 @@ var getDisabled = (disabled) => {
3495
3520
  };
3496
3521
 
3497
3522
  // src/jsonSchemaForm/schemaFormControl/SchemaFormControl.tsx
3498
- var import_jsx_runtime22 = require("react/jsx-runtime");
3523
+ var import_jsx_runtime24 = require("react/jsx-runtime");
3499
3524
  var isNativeInput = (propsSchemaType) => {
3500
3525
  return propsSchemaType === "string" || propsSchemaType === "number";
3501
3526
  };
3502
- var getControlType = (schema2) => {
3503
- if ("control" in schema2 && schema2.control) {
3504
- if (isOneOfSchema(schema2) && schema2.oneOf.length > 3) {
3527
+ var getControlType = (schema2, log) => {
3528
+ if (isOneOfSchema(schema2)) {
3529
+ if (schema2.control === FormControlType.TAB && schema2.oneOf.length > 3) {
3505
3530
  return FormControlType.SELECT;
3506
3531
  }
3507
- return schema2.control;
3532
+ if (schema2.oneOf.length === 2 && !schema2.control) {
3533
+ log.warning(
3534
+ "Deprecation warning",
3535
+ 'A oneOf schema with 2 options and no control type currently renders as a "radio" but will be changed to render as a "select". Please specify control radio to retain the existing behaviour.'
3536
+ );
3537
+ return FormControlType.RADIO;
3538
+ }
3539
+ return schema2.control || FormControlType.SELECT;
3508
3540
  }
3509
- if (schema2.oneOf) {
3510
- return schema2.oneOf.length === 1 || schema2.oneOf.length >= 3 ? "select" : "radio";
3541
+ if ("control" in schema2 && schema2.control) {
3542
+ return schema2.control;
3511
3543
  }
3512
3544
  if (schema2.type === "string") {
3513
3545
  switch (schema2.format) {
@@ -3543,10 +3575,10 @@ var SchemaFormControl = (props) => {
3543
3575
  const onChange = (value, type) => {
3544
3576
  props.onChange(getValidBasicModelOrNull(value, props.schema), type);
3545
3577
  };
3546
- const controlType = getControlType(props.schema);
3578
+ const controlType = getControlType(props.schema, log);
3547
3579
  if (controlType === "file") {
3548
3580
  log.warning(
3549
- "Deprecation advanced warning",
3581
+ "Deprecation warning",
3550
3582
  "Please use a persist-async blob schema instead of string with base64url for file uploads. The base64url does not perform well on low end devices. Support for this schema will be removed in a later release."
3551
3583
  );
3552
3584
  }
@@ -3573,7 +3605,7 @@ var SchemaFormControl = (props) => {
3573
3605
  // TODO: LOW avoid type assertion below
3574
3606
  uploadProps: mapSchemaToUploadOptions(props.schema)
3575
3607
  };
3576
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FormControl, __spreadValues(__spreadValues({ type: controlType, value: safeValue }, events), controlProps));
3608
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FormControl, __spreadValues(__spreadValues({ type: controlType, value: safeValue }, events), controlProps));
3577
3609
  };
3578
3610
  SchemaFormControl.defaultProps = {
3579
3611
  value: null,
@@ -3644,7 +3676,7 @@ function getSchemaProperties(childSchema) {
3644
3676
  }
3645
3677
 
3646
3678
  // src/jsonSchemaForm/oneOfSchema/OneOfSchema.tsx
3647
- var import_jsx_runtime23 = require("react/jsx-runtime");
3679
+ var import_jsx_runtime25 = require("react/jsx-runtime");
3648
3680
  var OneOfSchema5 = (props) => {
3649
3681
  const onEvent = useEventDispatcher();
3650
3682
  const [changed, setChanged] = (0, import_react14.useState)(false);
@@ -3717,11 +3749,11 @@ var OneOfSchema5 = (props) => {
3717
3749
  "form-group": true,
3718
3750
  "has-error": !changed && props.errors && !isEmpty(props.errors) || (props.submitted || changed && blurred) && validations.length
3719
3751
  };
3720
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
3721
- (props.schema.oneOf.length > 1 || isConstSchema(props.schema.oneOf[0])) && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
3722
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: (0, import_classnames4.default)(formGroupClasses), children: [
3752
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
3753
+ (props.schema.oneOf.length > 1 || isConstSchema(props.schema.oneOf[0])) && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
3754
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: (0, import_classnames4.default)(formGroupClasses), children: [
3723
3755
  getTitleAndHelp(props.schema, id),
3724
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3756
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3725
3757
  SchemaFormControl_default,
3726
3758
  {
3727
3759
  id,
@@ -3734,7 +3766,7 @@ var OneOfSchema5 = (props) => {
3734
3766
  onSearchChange
3735
3767
  }
3736
3768
  ),
3737
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3769
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3738
3770
  ControlFeedback_default,
3739
3771
  {
3740
3772
  changed,
@@ -3748,9 +3780,9 @@ var OneOfSchema5 = (props) => {
3748
3780
  }
3749
3781
  )
3750
3782
  ] }),
3751
- props.schema.alert && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DynamicAlert_default, { component: props.schema.alert })
3783
+ props.schema.alert && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DynamicAlert_default, { component: props.schema.alert })
3752
3784
  ] }),
3753
- isNoNConstSchema(props.schema.oneOf[schemaIndex]) && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3785
+ isNoNConstSchema(props.schema.oneOf[schemaIndex]) && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3754
3786
  GenericSchema_default,
3755
3787
  {
3756
3788
  schema: props.schema.oneOf[schemaIndex],
@@ -3766,12 +3798,12 @@ var OneOfSchema5 = (props) => {
3766
3798
  ] });
3767
3799
  };
3768
3800
  function getTitleAndHelp(schema2, id) {
3769
- const helpElement = schema2.help ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Help_default, { help: schema2.help }) : null;
3770
- const titleElement = isConstSchema(schema2.oneOf[0]) ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { className: "control-label d-inline", htmlFor: id, children: [
3801
+ const helpElement = schema2.help ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Help_default, { help: schema2.help }) : null;
3802
+ const titleElement = isConstSchema(schema2.oneOf[0]) ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "control-label d-inline", htmlFor: id, children: [
3771
3803
  schema2.title,
3772
3804
  " ",
3773
3805
  helpElement
3774
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("h4", { className: "m-b-2", children: [
3806
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("h4", { className: "m-b-2", children: [
3775
3807
  schema2.title,
3776
3808
  " ",
3777
3809
  helpElement
@@ -3817,7 +3849,7 @@ var import_react16 = require("react");
3817
3849
  // src/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.tsx
3818
3850
  var import_components10 = require("@transferwise/components");
3819
3851
  var import_react15 = require("react");
3820
- var import_jsx_runtime24 = require("react/jsx-runtime");
3852
+ var import_jsx_runtime26 = require("react/jsx-runtime");
3821
3853
  var UploadInputAdapter = (props) => {
3822
3854
  const {
3823
3855
  id,
@@ -3851,7 +3883,7 @@ var UploadInputAdapter = (props) => {
3851
3883
  }
3852
3884
  });
3853
3885
  };
3854
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3886
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3855
3887
  import_components10.UploadInput,
3856
3888
  {
3857
3889
  id,
@@ -3871,7 +3903,7 @@ var UploadInputAdapter = (props) => {
3871
3903
  };
3872
3904
 
3873
3905
  // src/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.tsx
3874
- var import_jsx_runtime25 = require("react/jsx-runtime");
3906
+ var import_jsx_runtime27 = require("react/jsx-runtime");
3875
3907
  var PersistAsyncBlobSchema = (props) => {
3876
3908
  const [persistAsyncValidationMessages, setPersistAsyncValidationMessages] = (0, import_react16.useState)({});
3877
3909
  const [persistAsyncValidations, setPersistAsyncValidations] = (0, import_react16.useState)(null);
@@ -3913,8 +3945,8 @@ var PersistAsyncBlobSchema = (props) => {
3913
3945
  "form-group": true,
3914
3946
  "has-error": (props.submitted || changed) && !!combinedValidations.length
3915
3947
  };
3916
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: (0, import_classnames5.default)(formGroupClasses), children: [
3917
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3948
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: (0, import_classnames5.default)(formGroupClasses), children: [
3949
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3918
3950
  UploadInputAdapter,
3919
3951
  __spreadValues({
3920
3952
  id: props.schema.$id || props.schema.persistAsync.schema.$id || props.schema.persistAsync.idProperty,
@@ -3931,7 +3963,7 @@ var PersistAsyncBlobSchema = (props) => {
3931
3963
  onCancel
3932
3964
  }, mapSchemaToUploadOptions(props.schema.persistAsync.schema))
3933
3965
  ),
3934
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3966
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3935
3967
  ControlFeedback_default,
3936
3968
  {
3937
3969
  blurred: true,
@@ -3955,17 +3987,17 @@ PersistAsyncBlobSchema.defaultProps = {
3955
3987
  var PersistAsyncBlobSchema_default = PersistAsyncBlobSchema;
3956
3988
 
3957
3989
  // src/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.tsx
3958
- var import_jsx_runtime26 = require("react/jsx-runtime");
3990
+ var import_jsx_runtime28 = require("react/jsx-runtime");
3959
3991
  var PersistAsyncSchema = (props) => {
3960
3992
  const { schema: schema2 } = props;
3961
3993
  const persistAsyncSchemaType = schema2.persistAsync.schema.type;
3962
3994
  if (persistAsyncSchemaType === "blob") {
3963
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3995
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3964
3996
  PersistAsyncBlobSchema_default,
3965
3997
  __spreadValues({}, props)
3966
3998
  );
3967
3999
  }
3968
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(PersistAsyncBasicSchema_default, __spreadValues({}, props));
4000
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PersistAsyncBasicSchema_default, __spreadValues({}, props));
3969
4001
  };
3970
4002
  PersistAsyncSchema.defaultProps = {
3971
4003
  required: false
@@ -3986,7 +4018,7 @@ var getSelectionFromModel = (schema2, model) => {
3986
4018
 
3987
4019
  // src/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.tsx
3988
4020
  var import_components11 = require("@transferwise/components");
3989
- var import_jsx_runtime27 = require("react/jsx-runtime");
4021
+ var import_jsx_runtime29 = require("react/jsx-runtime");
3990
4022
  var PromotedOneOfCheckboxControl = (props) => {
3991
4023
  const { id, selection, setSelection } = props;
3992
4024
  const { promoted, other, checkedMeans } = props.promotion;
@@ -3997,33 +4029,33 @@ var PromotedOneOfCheckboxControl = (props) => {
3997
4029
  const toggleSelection = () => {
3998
4030
  setSelection(checked ? selectionWhenUnchecked : selectionWhenChecked);
3999
4031
  };
4000
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "form-group", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_components11.Checkbox, { id, label: title, checked, onChange: toggleSelection }) });
4032
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "form-group", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components11.Checkbox, { id, label: title, checked, onChange: toggleSelection }) });
4001
4033
  };
4002
4034
  PromotedOneOfCheckboxControl.defaultProps = {};
4003
4035
  var PromotedOneOfCheckboxControl_default = PromotedOneOfCheckboxControl;
4004
4036
 
4005
4037
  // src/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.tsx
4006
4038
  var import_components12 = require("@transferwise/components");
4007
- var import_jsx_runtime28 = require("react/jsx-runtime");
4039
+ var import_jsx_runtime30 = require("react/jsx-runtime");
4008
4040
  var PromotedOneOfRadioControl = (props) => {
4009
4041
  var _a, _b;
4010
4042
  const { id, selection, setSelection, promotion, promotedOneOf, title } = props;
4011
4043
  const radios = [
4012
- __spreadValues(__spreadValues({
4044
+ __spreadValues({
4013
4045
  value: "promoted",
4014
4046
  // TODO: LOW avoid type assertion below the expression may be nullish, but "label" cannot be
4015
4047
  label: ((_a = promotion.promoted) == null ? void 0 : _a.title) || promotedOneOf.title,
4016
4048
  secondary: ((_b = promotion.promoted) == null ? void 0 : _b.description) || promotedOneOf.description
4017
- }, mapIconToAvatar(promotedOneOf.icon)), mapAvatar(promotedOneOf.image)),
4018
- __spreadValues(__spreadValues({
4049
+ }, getAvatarPropertyForRadioOption(promotedOneOf)),
4050
+ __spreadValues({
4019
4051
  value: "other",
4020
4052
  label: promotion.other.title,
4021
4053
  secondary: promotion.other.description
4022
- }, mapIconToAvatar(promotion.other.icon)), mapAvatar(promotion.other.image))
4054
+ }, getAvatarPropertyForRadioOption(promotion.other))
4023
4055
  ];
4024
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "form-group", children: [
4025
- title && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { className: "control-label", htmlFor: id, children: title }),
4026
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4056
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "form-group", children: [
4057
+ title && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("label", { className: "control-label", htmlFor: id, children: title }),
4058
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4027
4059
  import_components12.RadioGroup,
4028
4060
  {
4029
4061
  name: "promoted-selection",
@@ -4041,16 +4073,16 @@ PromotedOneOfRadioControl.defaultProps = {
4041
4073
  var PromotedOneOfRadioControl_default = PromotedOneOfRadioControl;
4042
4074
 
4043
4075
  // src/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.tsx
4044
- var import_jsx_runtime29 = require("react/jsx-runtime");
4076
+ var import_jsx_runtime31 = require("react/jsx-runtime");
4045
4077
  var PromotedOneOfControl = (props) => {
4046
4078
  const controlType = props.promotion.control || "radio";
4047
4079
  switch (controlType) {
4048
4080
  case "radio":
4049
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PromotedOneOfRadioControl_default, __spreadValues({}, props));
4081
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(PromotedOneOfRadioControl_default, __spreadValues({}, props));
4050
4082
  case "checkbox":
4051
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PromotedOneOfCheckboxControl_default, __spreadValues({}, props));
4083
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(PromotedOneOfCheckboxControl_default, __spreadValues({}, props));
4052
4084
  default:
4053
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, {});
4085
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_jsx_runtime31.Fragment, {});
4054
4086
  }
4055
4087
  };
4056
4088
  PromotedOneOfControl.defaultProps = {
@@ -4060,7 +4092,7 @@ PromotedOneOfControl.defaultProps = {
4060
4092
  var PromotedOneOfControl_default = PromotedOneOfControl;
4061
4093
 
4062
4094
  // src/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.tsx
4063
- var import_jsx_runtime30 = require("react/jsx-runtime");
4095
+ var import_jsx_runtime32 = require("react/jsx-runtime");
4064
4096
  var isPromoted = (schema2) => schema2.promoted === true;
4065
4097
  var PromotedOneOfSchema = (props) => {
4066
4098
  var _a;
@@ -4071,9 +4103,9 @@ var PromotedOneOfSchema = (props) => {
4071
4103
  const promotedOneOf = props.schema.oneOf.find(isPromoted);
4072
4104
  const promotedObjectSchema = getPromotedObjectSchema(promotedOneOf);
4073
4105
  const otherOneOf = getOtherOneOf(props.schema);
4074
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
4075
- promotedAlert && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DynamicAlert_default, { component: promotedAlert }),
4076
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4106
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
4107
+ promotedAlert && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DynamicAlert_default, { component: promotedAlert }),
4108
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4077
4109
  PromotedOneOfControl_default,
4078
4110
  {
4079
4111
  id: props.schema.$id,
@@ -4084,8 +4116,8 @@ var PromotedOneOfSchema = (props) => {
4084
4116
  setSelection
4085
4117
  }
4086
4118
  ),
4087
- selection === "promoted" && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ObjectSchema_default, __spreadProps(__spreadValues({}, props), { schema: promotedObjectSchema })),
4088
- selection === "other" && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(GenericSchema_default, __spreadProps(__spreadValues({}, props), { schema: otherOneOf }))
4119
+ selection === "promoted" && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ObjectSchema_default, __spreadProps(__spreadValues({}, props), { schema: promotedObjectSchema })),
4120
+ selection === "other" && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(GenericSchema_default, __spreadProps(__spreadValues({}, props), { schema: otherOneOf }))
4089
4121
  ] });
4090
4122
  };
4091
4123
  function getPromotedObjectSchema(promotedSchema) {
@@ -4134,12 +4166,12 @@ var ReadOnlySchema_messages_default = (0, import_react_intl11.defineMessages)({
4134
4166
  });
4135
4167
 
4136
4168
  // src/jsonSchemaForm/readOnlySchema/ReadOnlySchema.tsx
4137
- var import_jsx_runtime31 = require("react/jsx-runtime");
4169
+ var import_jsx_runtime33 = require("react/jsx-runtime");
4138
4170
  var ReadOnlySchema = ({ schema: schema2, model }) => {
4139
4171
  const { title = "" } = schema2;
4140
4172
  const { formatMessage } = (0, import_react_intl12.useIntl)();
4141
4173
  const value = getValueForSchema({ schema: schema2, model, formatMessage });
4142
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components13.DefinitionList, { layout: import_components13.Layout.VERTICAL_ONE_COLUMN, definitions: [{ title, value, key: "" }] });
4174
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components13.DefinitionList, { layout: import_components13.Layout.VERTICAL_ONE_COLUMN, definitions: [{ title, value, key: "" }] });
4143
4175
  };
4144
4176
  var ReadOnlySchema_default = ReadOnlySchema;
4145
4177
  function getValueForSchema({
@@ -4171,22 +4203,17 @@ function getSelectedOneOf(schema2, model) {
4171
4203
  }
4172
4204
  function getValueFromOption(option) {
4173
4205
  const text = option.title && option.description ? `${option.title} - ${option.description}` : option.title || "";
4174
- const currencyFlag = getCurrencyFlagFromOption(option);
4175
- return currencyFlag ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
4176
- currencyFlag,
4206
+ const icon = getAvatarPropertyForRadioOption({ icon: option.icon });
4207
+ return (icon == null ? void 0 : icon.avatar) ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
4208
+ icon.avatar,
4177
4209
  " ",
4178
4210
  text
4179
4211
  ] }) : text;
4180
4212
  }
4181
- function getCurrencyFlagFromOption(option) {
4182
- var _a, _b;
4183
- const currency = (_b = getCurrencyFlag((_a = option.icon) == null ? void 0 : _a.name)) == null ? void 0 : _b.currency;
4184
- return currency ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("i", { className: `currency-flag currency-flag-${currency} hidden-xs` }) : null;
4185
- }
4186
4213
 
4187
4214
  // src/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.tsx
4188
4215
  var import_react18 = require("react");
4189
- var import_jsx_runtime32 = require("react/jsx-runtime");
4216
+ var import_jsx_runtime34 = require("react/jsx-runtime");
4190
4217
  var ValidationAsyncSchema = (props) => {
4191
4218
  const [validationAsyncModel, setValidationAsyncModel] = (0, import_react18.useState)(props.model);
4192
4219
  const previousRequestedModelReference = (0, import_react18.useRef)(null);
@@ -4269,13 +4296,13 @@ var ValidationAsyncSchema = (props) => {
4269
4296
  onBlur,
4270
4297
  infoMessage: validationAsyncSuccessMessage
4271
4298
  };
4272
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(BasicTypeSchema_default, __spreadValues({}, basicTypeSchemaProps));
4299
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(BasicTypeSchema_default, __spreadValues({}, basicTypeSchemaProps));
4273
4300
  };
4274
4301
  ValidationAsyncSchema.defaultProps = { required: false };
4275
4302
  var ValidationAsyncSchema_default = ValidationAsyncSchema;
4276
4303
 
4277
4304
  // src/jsonSchemaForm/genericSchema/GenericSchema.tsx
4278
- var import_jsx_runtime33 = require("react/jsx-runtime");
4305
+ var import_jsx_runtime35 = require("react/jsx-runtime");
4279
4306
  var GenericSchemaForm = (props) => {
4280
4307
  const { schema: schema2, model = null, errors = null, hideTitle = false, disabled = false } = props;
4281
4308
  const schemaProps = __spreadProps(__spreadValues({}, props), { model, errors, hideTitle, disabled });
@@ -4287,22 +4314,22 @@ var GenericSchemaForm = (props) => {
4287
4314
  );
4288
4315
  switch (type) {
4289
4316
  case "readOnly":
4290
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ReadOnlySchema_default, __spreadValues({}, schemaProps));
4317
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ReadOnlySchema_default, __spreadValues({}, schemaProps));
4291
4318
  case "persistAsync":
4292
4319
  if (isPersistAsyncSchema(schema2) && isNullableStringModel(model) && isBasicError(errors)) {
4293
4320
  const filteredProps = __spreadProps(__spreadValues({}, schemaProps), { schema: schema2, model, errors });
4294
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PersistAsyncSchema_default, __spreadValues({}, filteredProps));
4321
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(PersistAsyncSchema_default, __spreadValues({}, filteredProps));
4295
4322
  } else {
4296
4323
  logInvalidSchemaWarning();
4297
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PersistAsyncSchema_default, __spreadValues({}, props));
4324
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(PersistAsyncSchema_default, __spreadValues({}, props));
4298
4325
  }
4299
4326
  case "validationAsync":
4300
4327
  if (isValidationAsyncSchema(schema2) && isNullableBasicModel(model) && isBasicError(errors)) {
4301
4328
  const filteredProps = __spreadProps(__spreadValues({}, schemaProps), { schema: schema2, model, errors });
4302
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ValidationAsyncSchema_default, __spreadValues({}, filteredProps));
4329
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ValidationAsyncSchema_default, __spreadValues({}, filteredProps));
4303
4330
  } else {
4304
4331
  logInvalidSchemaWarning();
4305
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ValidationAsyncSchema_default, __spreadValues({}, props));
4332
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ValidationAsyncSchema_default, __spreadValues({}, props));
4306
4333
  }
4307
4334
  case "basic": {
4308
4335
  if (isBasicSchema(schema2) && isNullableBasicModel(model) && isBasicError(errors)) {
@@ -4313,7 +4340,7 @@ var GenericSchemaForm = (props) => {
4313
4340
  model,
4314
4341
  errors
4315
4342
  });
4316
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(BasicTypeSchema_default, __spreadValues({}, filteredProps));
4343
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(BasicTypeSchema_default, __spreadValues({}, filteredProps));
4317
4344
  } else {
4318
4345
  const filteredProps = __spreadProps(__spreadValues({
4319
4346
  infoMessage: null
@@ -4323,56 +4350,56 @@ var GenericSchemaForm = (props) => {
4323
4350
  errors
4324
4351
  });
4325
4352
  logInvalidSchemaWarning();
4326
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(BasicTypeSchema_default, __spreadValues({}, filteredProps));
4353
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(BasicTypeSchema_default, __spreadValues({}, filteredProps));
4327
4354
  }
4328
4355
  }
4329
4356
  case "object":
4330
4357
  if (isObjectSchema(schema2) && isNullableObjectModel(model)) {
4331
4358
  const filteredProps = __spreadProps(__spreadValues({}, schemaProps), { schema: schema2, model, errors });
4332
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ObjectSchema_default, __spreadValues({}, filteredProps), JSON.stringify(schema2));
4359
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ObjectSchema_default, __spreadValues({}, filteredProps), JSON.stringify(schema2));
4333
4360
  } else {
4334
4361
  logInvalidSchemaWarning();
4335
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ObjectSchema_default, __spreadValues({}, props));
4362
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ObjectSchema_default, __spreadValues({}, props));
4336
4363
  }
4337
4364
  case "array":
4338
4365
  if (isArraySchema(schema2) && isNullableArrayModel(model) && isBasicError(errors)) {
4339
4366
  const filteredProps = __spreadProps(__spreadValues({}, schemaProps), { schema: schema2, model, errors });
4340
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ArraySchema_default, __spreadValues({}, filteredProps));
4367
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ArraySchema_default, __spreadValues({}, filteredProps));
4341
4368
  } else {
4342
4369
  logInvalidSchemaWarning();
4343
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ArraySchema_default, __spreadValues({}, props));
4370
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ArraySchema_default, __spreadValues({}, props));
4344
4371
  }
4345
4372
  case "promotedOneOf":
4346
4373
  if (isOneOfObjectSchema(schema2) && isNullableObjectModel(model)) {
4347
4374
  const filteredProps = __spreadProps(__spreadValues({}, schemaProps), { schema: schema2, model, errors });
4348
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PromotedOneOfSchema_default, __spreadValues({}, filteredProps));
4375
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(PromotedOneOfSchema_default, __spreadValues({}, filteredProps));
4349
4376
  } else {
4350
4377
  logInvalidSchemaWarning();
4351
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PromotedOneOfSchema_default, __spreadValues({}, props));
4378
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(PromotedOneOfSchema_default, __spreadValues({}, props));
4352
4379
  }
4353
4380
  case "oneOf":
4354
4381
  if (isOneOfSchema(schema2)) {
4355
4382
  const filteredProps = __spreadProps(__spreadValues({}, schemaProps), { schema: schema2, model, errors });
4356
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(OneOfSchema_default, __spreadValues({}, filteredProps));
4383
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(OneOfSchema_default, __spreadValues({}, filteredProps));
4357
4384
  } else {
4358
4385
  logInvalidSchemaWarning();
4359
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(OneOfSchema_default, __spreadValues({}, props));
4386
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(OneOfSchema_default, __spreadValues({}, props));
4360
4387
  }
4361
4388
  case "allOf":
4362
4389
  if (isAllOfSchema(schema2) && isObjectModel(model)) {
4363
4390
  const filteredProps = __spreadProps(__spreadValues({}, schemaProps), { schema: schema2, model, errors });
4364
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(AllOfSchema_default, __spreadValues({}, filteredProps));
4391
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(AllOfSchema_default, __spreadValues({}, filteredProps));
4365
4392
  } else {
4366
4393
  logInvalidSchemaWarning();
4367
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(AllOfSchema_default, __spreadValues({}, props));
4394
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(AllOfSchema_default, __spreadValues({}, props));
4368
4395
  }
4369
4396
  }
4370
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_jsx_runtime33.Fragment, {});
4397
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_jsx_runtime35.Fragment, {});
4371
4398
  };
4372
4399
  var GenericSchema_default = GenericSchemaForm;
4373
4400
 
4374
4401
  // src/jsonSchemaForm/JsonSchemaForm.tsx
4375
- var import_jsx_runtime34 = require("react/jsx-runtime");
4402
+ var import_jsx_runtime36 = require("react/jsx-runtime");
4376
4403
  var JsonSchemaForm = (props) => {
4377
4404
  const schemaProps = __spreadValues({
4378
4405
  model: null,
@@ -4381,26 +4408,26 @@ var JsonSchemaForm = (props) => {
4381
4408
  baseUrl: ""
4382
4409
  }, props);
4383
4410
  if (useHasHttpClientProvider() || schemaProps.baseUrl == null) {
4384
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(GenericSchema_default, __spreadValues({}, schemaProps));
4411
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(GenericSchema_default, __spreadValues({}, schemaProps));
4385
4412
  }
4386
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4413
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
4387
4414
  Providers,
4388
4415
  {
4389
4416
  baseUrl: schemaProps.baseUrl,
4390
4417
  onEvent: schemaProps.onEvent,
4391
4418
  onLog: schemaProps.onLog,
4392
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(GenericSchema_default, __spreadValues({}, schemaProps))
4419
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(GenericSchema_default, __spreadValues({}, schemaProps))
4393
4420
  }
4394
4421
  );
4395
4422
  };
4396
4423
  var JsonSchemaForm_default = JsonSchemaForm;
4397
4424
  var Providers = ({ baseUrl, onEvent, onLog, children }) => {
4398
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(LogProvider, { flowId: "JsonSchemaForm", stepId: "JsonSchemaForm", onLog: onLog != null ? onLog : noop2, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4425
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(LogProvider, { flowId: "JsonSchemaForm", stepId: "JsonSchemaForm", onLog: onLog != null ? onLog : noop2, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
4399
4426
  EventsContextProvider,
4400
4427
  {
4401
4428
  metadata: { flowId: "JsonSchemaForm", stepId: "JsonSchemaForm" },
4402
4429
  onEvent: onEvent != null ? onEvent : noop2,
4403
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(HttpClientProviderFromBaseUrl, { baseUrl, children })
4430
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(HttpClientProviderFromBaseUrl, { baseUrl, children })
4404
4431
  }
4405
4432
  ) });
4406
4433
  };
@@ -4408,11 +4435,11 @@ var noop2 = () => {
4408
4435
  };
4409
4436
 
4410
4437
  // src/layout/form/DynamicForm.tsx
4411
- var import_jsx_runtime35 = require("react/jsx-runtime");
4438
+ var import_jsx_runtime37 = require("react/jsx-runtime");
4412
4439
  var DynamicForm = (props) => {
4413
4440
  const form = props.component;
4414
4441
  const formSchema = form.schema;
4415
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: getMarginBottom(form.margin || "md"), children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4442
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: getMarginBottom(form.margin || "md"), children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
4416
4443
  JsonSchemaForm_default,
4417
4444
  {
4418
4445
  schema: formSchema,
@@ -4429,38 +4456,38 @@ var DynamicForm = (props) => {
4429
4456
  var DynamicForm_default = DynamicForm;
4430
4457
 
4431
4458
  // src/layout/heading/DynamicHeading.tsx
4432
- var import_jsx_runtime36 = require("react/jsx-runtime");
4459
+ var import_jsx_runtime38 = require("react/jsx-runtime");
4433
4460
  var DynamicHeading = (props) => {
4434
4461
  const { text, size = "md", align = "left", margin = "md" } = props.component;
4435
4462
  const classes = getTextAlignmentAndMargin({ align, margin });
4436
4463
  switch (size) {
4437
4464
  case "xs":
4438
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("h5", { className: classes, children: text });
4465
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h5", { className: classes, children: text });
4439
4466
  case "sm":
4440
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("h4", { className: classes, children: text });
4467
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h4", { className: classes, children: text });
4441
4468
  case "lg":
4442
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("h2", { className: classes, children: text });
4469
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h2", { className: classes, children: text });
4443
4470
  case "xl":
4444
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("h1", { className: classes, children: text });
4471
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h1", { className: classes, children: text });
4445
4472
  case "md":
4446
4473
  default:
4447
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("h3", { className: classes, children: text });
4474
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h3", { className: classes, children: text });
4448
4475
  }
4449
4476
  };
4450
4477
  var DynamicHeading_default = DynamicHeading;
4451
4478
 
4452
4479
  // src/layout/info/DynamicInfo.tsx
4453
4480
  var import_components14 = require("@transferwise/components");
4454
- var import_jsx_runtime37 = require("react/jsx-runtime");
4481
+ var import_jsx_runtime39 = require("react/jsx-runtime");
4455
4482
  var DynamicInfo = ({ component }) => {
4456
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: getTextAlignmentAndMargin(component), children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components14.Markdown, { config: { link: { target: "_blank" } }, children: component.markdown }) });
4483
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: getTextAlignmentAndMargin(component), children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components14.Markdown, { config: { link: { target: "_blank" } }, children: component.markdown }) });
4457
4484
  };
4458
4485
  var DynamicInfo_default = DynamicInfo;
4459
4486
 
4460
4487
  // src/layout/image/DynamicImage.tsx
4461
4488
  var import_components15 = require("@transferwise/components");
4462
4489
  var import_react19 = require("react");
4463
- var import_jsx_runtime38 = require("react/jsx-runtime");
4490
+ var import_jsx_runtime40 = require("react/jsx-runtime");
4464
4491
  var DynamicImage = ({ component: image }) => {
4465
4492
  const { url, size, text, margin } = image;
4466
4493
  const httpClient = useHttpClient();
@@ -4477,7 +4504,7 @@ var DynamicImage = ({ component: image }) => {
4477
4504
  if (!imageSource) {
4478
4505
  return null;
4479
4506
  }
4480
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: `df-image ${size || "xl"}`, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_components15.Image, __spreadValues({ className: `img-responsive ${getMarginBottom(margin || "lg")}` }, imageProps)) });
4507
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: `df-image ${size || "xl"}`, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components15.Image, __spreadValues({ className: `img-responsive ${getMarginBottom(margin || "lg")}` }, imageProps)) });
4481
4508
  };
4482
4509
  var readImageBlobAsDataURL = (imageBlob) => {
4483
4510
  return new Promise((resolve, reject) => {
@@ -4510,28 +4537,28 @@ var getImageSource = async (httpClient, imageUrl) => {
4510
4537
  var DynamicImage_default = DynamicImage;
4511
4538
 
4512
4539
  // src/layout/DynamicLayout.tsx
4513
- var import_jsx_runtime39 = require("react/jsx-runtime");
4540
+ var import_jsx_runtime41 = require("react/jsx-runtime");
4514
4541
  var getKey = (component) => JSON.stringify(component);
4515
4542
  var DynamicLayout = (props) => {
4516
4543
  const { components, model, submitted, errors, onModelChange, onAction, onPersistAsync, baseUrl } = props;
4517
4544
  const renderComponent = (component) => {
4518
4545
  switch (component.type) {
4519
4546
  case "heading":
4520
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DynamicHeading_default, { component }, getKey(component));
4547
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DynamicHeading_default, { component }, getKey(component));
4521
4548
  case "paragraph":
4522
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DynamicParagraph_default, { component }, getKey(component));
4549
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DynamicParagraph_default, { component }, getKey(component));
4523
4550
  case "image":
4524
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DynamicImage_default, { component }, getKey(component));
4551
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DynamicImage_default, { component }, getKey(component));
4525
4552
  case "alert":
4526
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DynamicAlert_default, { component }, getKey(component));
4553
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DynamicAlert_default, { component }, getKey(component));
4527
4554
  case "review":
4528
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DynamicReview_default, { component, onAction }, getKey(component));
4555
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DynamicReview_default, { component, onAction }, getKey(component));
4529
4556
  case "divider":
4530
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DynamicDivider_default, { component }, getKey(component));
4557
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DynamicDivider_default, { component }, getKey(component));
4531
4558
  case "info":
4532
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DynamicInfo_default, { component }, getKey(component));
4559
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DynamicInfo_default, { component }, getKey(component));
4533
4560
  case "columns":
4534
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4561
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4535
4562
  DynamicColumns_default,
4536
4563
  {
4537
4564
  component,
@@ -4545,7 +4572,7 @@ var DynamicLayout = (props) => {
4545
4572
  getKey(component)
4546
4573
  );
4547
4574
  case "form":
4548
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4575
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4549
4576
  DynamicForm_default,
4550
4577
  {
4551
4578
  component,
@@ -4558,9 +4585,9 @@ var DynamicLayout = (props) => {
4558
4585
  getKey(component)
4559
4586
  );
4560
4587
  case "button":
4561
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DynamicButton_default, { component, onAction }, getKey(component));
4588
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DynamicButton_default, { component, onAction }, getKey(component));
4562
4589
  case "box":
4563
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4590
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4564
4591
  DynamicBox_default,
4565
4592
  {
4566
4593
  component,
@@ -4574,31 +4601,31 @@ var DynamicLayout = (props) => {
4574
4601
  getKey(component)
4575
4602
  );
4576
4603
  case "decision":
4577
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DynamicDecision_default, { component, onAction }, getKey(component));
4604
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DynamicDecision_default, { component, onAction }, getKey(component));
4578
4605
  case "external":
4579
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DynamicExternal_default, { component, onAction }, getKey(component));
4606
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DynamicExternal_default, { component, onAction }, getKey(component));
4580
4607
  case "list":
4581
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DynamicList_default, { component, onAction }, getKey(component));
4608
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DynamicList_default, { component, onAction }, getKey(component));
4582
4609
  case "loading-indicator":
4583
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DynamicLoadingIndicator_default, { component }, getKey(component));
4610
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DynamicLoadingIndicator_default, { component }, getKey(component));
4584
4611
  default:
4585
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", {}, getKey(component));
4612
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", {}, getKey(component));
4586
4613
  }
4587
4614
  };
4588
4615
  if (useHasHttpClientProvider() || baseUrl == null) {
4589
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_jsx_runtime39.Fragment, { children: components.map(renderComponent) });
4616
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children: components.map(renderComponent) });
4590
4617
  } else {
4591
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(HttpClientProviderFromBaseUrl, { baseUrl, children: components.map(renderComponent) });
4618
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(HttpClientProviderFromBaseUrl, { baseUrl, children: components.map(renderComponent) });
4592
4619
  }
4593
4620
  };
4594
4621
  var DynamicLayout_default = DynamicLayout;
4595
4622
 
4596
4623
  // src/layout/list/DynamicList.tsx
4597
4624
  var import_components16 = require("@transferwise/components");
4598
- var import_jsx_runtime40 = require("react/jsx-runtime");
4625
+ var import_jsx_runtime42 = require("react/jsx-runtime");
4599
4626
  var DynamicList = ({ component }) => {
4600
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: getMarginBottom(component.margin || "md"), children: [
4601
- component.title ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("h4", { className: "m-b-2", children: [
4627
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: getMarginBottom(component.margin || "md"), children: [
4628
+ component.title ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("h4", { className: "m-b-2", children: [
4602
4629
  " ",
4603
4630
  component.title,
4604
4631
  " "
@@ -4611,8 +4638,8 @@ function mapItemToSummary({ title, description, icon, status }) {
4611
4638
  key: `${title}/${description || ""}`,
4612
4639
  title,
4613
4640
  description
4614
- }, (icon == null ? void 0 : icon.name) ? { icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DynamicIcon_default, { type: icon.name }) } : {}), status ? { status: statusMap[status] } : {});
4615
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components16.Summary, __spreadValues({}, props));
4641
+ }, (icon == null ? void 0 : icon.name) ? { icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DynamicIcon_default, { type: icon.name }) } : {}), status ? { status: statusMap[status] } : {});
4642
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components16.Summary, __spreadValues({}, props));
4616
4643
  }
4617
4644
  var statusMap = {
4618
4645
  positive: "done",
@@ -4623,10 +4650,10 @@ var DynamicList_default = DynamicList;
4623
4650
 
4624
4651
  // src/layout/loadingIndicator/DynamicLoadingIndicator.tsx
4625
4652
  var import_components17 = require("@transferwise/components");
4626
- var import_jsx_runtime41 = require("react/jsx-runtime");
4653
+ var import_jsx_runtime43 = require("react/jsx-runtime");
4627
4654
  var DynamicLoadingIndicator = ({ component }) => {
4628
4655
  const { margin, size = "md" } = component;
4629
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4656
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4630
4657
  import_components17.Loader,
4631
4658
  {
4632
4659
  size,
@@ -4669,9 +4696,9 @@ function noop3() {
4669
4696
  }
4670
4697
 
4671
4698
  // src/layout/paragraph/DynamicParagraph.tsx
4672
- var import_jsx_runtime42 = require("react/jsx-runtime");
4673
- var DynamicParagraph = ({ component }) => component.control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(CopyableDynamicParagraph, { component }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(BasicDynamicParagraph, { component });
4674
- var BasicDynamicParagraph = ({ component }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("p", { className: getTextAlignmentAndMargin(component), children: [
4699
+ var import_jsx_runtime44 = require("react/jsx-runtime");
4700
+ var DynamicParagraph = ({ component }) => component.control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(CopyableDynamicParagraph, { component }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(BasicDynamicParagraph, { component });
4701
+ var BasicDynamicParagraph = ({ component }) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("p", { className: getTextAlignmentAndMargin(component), children: [
4675
4702
  " ",
4676
4703
  component.text,
4677
4704
  " "
@@ -4685,8 +4712,8 @@ var CopyableDynamicParagraph = ({ component }) => {
4685
4712
  (_a = navigator.clipboard) == null ? void 0 : _a.writeText(text).then(() => createSnackbar({ text: formatMessage(DynamicParagraph_messages_default.copied) })).catch(noop4);
4686
4713
  };
4687
4714
  const classNames7 = getTextAlignmentAndMargin({ align: component.align, margin: "sm" }) + " form-control";
4688
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: getTextAlignmentAndMargin(component), children: [
4689
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4715
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: getTextAlignmentAndMargin(component), children: [
4716
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4690
4717
  "input",
4691
4718
  {
4692
4719
  type: "text",
@@ -4696,7 +4723,7 @@ var CopyableDynamicParagraph = ({ component }) => {
4696
4723
  style: { textOverflow: "ellipsis" }
4697
4724
  }
4698
4725
  ),
4699
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components19.Button, { block: true, onClick: copy, children: formatMessage(DynamicParagraph_messages_default.copy) })
4726
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components19.Button, { block: true, onClick: copy, children: formatMessage(DynamicParagraph_messages_default.copy) })
4700
4727
  ] });
4701
4728
  };
4702
4729
  function noop4() {
@@ -4705,7 +4732,7 @@ var DynamicParagraph_default = DynamicParagraph;
4705
4732
 
4706
4733
  // src/layout/review/DynamicReview.tsx
4707
4734
  var import_components20 = require("@transferwise/components");
4708
- var import_jsx_runtime43 = require("react/jsx-runtime");
4735
+ var import_jsx_runtime45 = require("react/jsx-runtime");
4709
4736
  var mapFieldsToDefinitions = ({ label, value }, index) => {
4710
4737
  return { key: String(index), title: label, value };
4711
4738
  };
@@ -4716,7 +4743,7 @@ var DynamicReview = (props) => {
4716
4743
  const review = props.component;
4717
4744
  const margin = getMarginBottom(review.margin || "xs");
4718
4745
  const getReviewAction = (action2) => {
4719
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4746
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4720
4747
  "a",
4721
4748
  {
4722
4749
  href: action2.url,
@@ -4730,12 +4757,12 @@ var DynamicReview = (props) => {
4730
4757
  }
4731
4758
  );
4732
4759
  };
4733
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
4734
- review.title && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("h6", { className: "m-b-2", children: [
4760
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
4761
+ review.title && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("h6", { className: "m-b-2", children: [
4735
4762
  review.title,
4736
4763
  review.action && getReviewAction(review.action)
4737
4764
  ] }),
4738
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4765
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4739
4766
  import_components20.DefinitionList,
4740
4767
  {
4741
4768
  layout: getReviewLayout(review.orientation),
@@ -4747,7 +4774,7 @@ var DynamicReview = (props) => {
4747
4774
  var DynamicReview_default = DynamicReview;
4748
4775
 
4749
4776
  // src/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.tsx
4750
- var import_jsx_runtime44 = require("react/jsx-runtime");
4777
+ var import_jsx_runtime46 = require("react/jsx-runtime");
4751
4778
  var isNullish = (value) => isNull(value) || isUndefined(value);
4752
4779
  var getDefaultValue = (schema2) => {
4753
4780
  return schema2.type === "boolean" && isNullish(schema2.default) ? false : schema2.default;
@@ -4818,15 +4845,15 @@ var BasicTypeSchema = (props) => {
4818
4845
  };
4819
4846
  const showLabel = props.schema.format !== "file" && props.schema.type !== "boolean";
4820
4847
  const schemaHelp = props.schema.help;
4821
- return !isHidden ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
4822
- props.schema.alert && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DynamicAlert_default, { component: props.schema.alert }),
4823
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: (0, import_classnames6.default)(formGroupClasses), children: [
4824
- showLabel && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "d-inline-block", children: [
4825
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("label", { className: "control-label d-inline", htmlFor: id, children: props.schema.title }),
4826
- !!schemaHelp && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Help_default, { help: schemaHelp })
4848
+ return !isHidden ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
4849
+ props.schema.alert && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(DynamicAlert_default, { component: props.schema.alert }),
4850
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: (0, import_classnames6.default)(formGroupClasses), children: [
4851
+ showLabel && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "d-inline-block", children: [
4852
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("label", { className: "control-label d-inline", htmlFor: id, children: props.schema.title }),
4853
+ !!schemaHelp && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Help_default, { help: schemaHelp })
4827
4854
  ] }),
4828
- !showLabel && !!schemaHelp && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Help_default, { help: schemaHelp }),
4829
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4855
+ !showLabel && !!schemaHelp && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Help_default, { help: schemaHelp }),
4856
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4830
4857
  SchemaFormControl_default,
4831
4858
  {
4832
4859
  id,
@@ -4838,7 +4865,7 @@ var BasicTypeSchema = (props) => {
4838
4865
  onBlur
4839
4866
  }
4840
4867
  ),
4841
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4868
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4842
4869
  ControlFeedback_default,
4843
4870
  {
4844
4871
  changed,
@@ -4862,7 +4889,7 @@ BasicTypeSchema.defaultProps = {
4862
4889
  var BasicTypeSchema_default = BasicTypeSchema;
4863
4890
 
4864
4891
  // src/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.tsx
4865
- var import_jsx_runtime45 = require("react/jsx-runtime");
4892
+ var import_jsx_runtime47 = require("react/jsx-runtime");
4866
4893
  var getIdFromResponse = (idProperty, response) => {
4867
4894
  return response[idProperty];
4868
4895
  };
@@ -4886,10 +4913,11 @@ var PersistAsyncBasicSchema = (props) => {
4886
4913
  const [persistAsyncError, setPersistAsyncError] = (0, import_react22.useState)(null);
4887
4914
  const [fieldSubmitted, setFieldSubmitted] = (0, import_react22.useState)(false);
4888
4915
  const [abortController, setAbortController] = (0, import_react22.useState)(null);
4916
+ const log = useLogger();
4889
4917
  (0, import_react22.useEffect)(() => {
4890
4918
  if (controlTypesWithPersistOnChange.has(
4891
4919
  // TODO: LOW avoid type assertion below -- control type may be nullish. consider ?? ''
4892
- getControlType(props.schema.persistAsync.schema)
4920
+ getControlType(props.schema.persistAsync.schema, log)
4893
4921
  )) {
4894
4922
  persistAsyncIfValid();
4895
4923
  }
@@ -4953,7 +4981,7 @@ var PersistAsyncBasicSchema = (props) => {
4953
4981
  setPersistAsyncModel(newPersistAsyncModel);
4954
4982
  }
4955
4983
  };
4956
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4984
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4957
4985
  BasicTypeSchema_default,
4958
4986
  {
4959
4987
  required: props.required,
@@ -5164,18 +5192,18 @@ function useStepPolling(polling, onAction) {
5164
5192
  }
5165
5193
 
5166
5194
  // src/step/layoutStep/LayoutStep.tsx
5167
- var import_jsx_runtime46 = require("react/jsx-runtime");
5168
- var getComponents = (step31, options) => {
5195
+ var import_jsx_runtime48 = require("react/jsx-runtime");
5196
+ var getComponents = (step33, options) => {
5169
5197
  var _a;
5170
- if (!step31 || isEmpty(step31) || !step31.layout && !step31.type) {
5198
+ if (!step33 || isEmpty(step33) || !step33.layout && !step33.type) {
5171
5199
  return [];
5172
5200
  }
5173
- const layout6 = convertStepToLayout(step31, options);
5201
+ const layout6 = convertStepToLayout(step33, options);
5174
5202
  return inlineReferences({
5175
5203
  layout: layout6,
5176
- schemas: step31.schemas || [],
5177
- actions: step31.actions || [],
5178
- model: (_a = step31.model) != null ? _a : null
5204
+ schemas: step33.schemas || [],
5205
+ actions: step33.actions || [],
5206
+ model: (_a = step33.model) != null ? _a : null
5179
5207
  });
5180
5208
  };
5181
5209
  var LayoutStep = (props) => {
@@ -5187,7 +5215,7 @@ var LayoutStep = (props) => {
5187
5215
  onEvent("Dynamic Flow - onAction supressed", { reason: "LayoutStep - loading state" });
5188
5216
  };
5189
5217
  useStepPolling(stepSpecification.polling, onAction);
5190
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5218
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
5191
5219
  DynamicLayout_default,
5192
5220
  {
5193
5221
  components,
@@ -5233,15 +5261,15 @@ var CameraCapture_messages_default = (0, import_react_intl17.defineMessages)({
5233
5261
  // src/step/cameraStep/cameraCapture/components/index.tsx
5234
5262
  var import_components21 = require("@transferwise/components");
5235
5263
  var import_react_intl18 = require("react-intl");
5236
- var import_jsx_runtime47 = require("react/jsx-runtime");
5237
- var CaptureBottomBar = ({ onCapture }) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "bottom-bar", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(CaptureButton, { onClick: onCapture }) });
5264
+ var import_jsx_runtime49 = require("react/jsx-runtime");
5265
+ var CaptureBottomBar = ({ onCapture }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "bottom-bar", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(CaptureButton, { onClick: onCapture }) });
5238
5266
  var ReviewBottomBar = ({
5239
5267
  onSubmit,
5240
5268
  onRetry
5241
5269
  }) => {
5242
5270
  const intl = (0, import_react_intl18.useIntl)();
5243
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "bottom-bar p-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "col-xs-12 col-md-6 col-md-offset-3", children: [
5244
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
5271
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "bottom-bar p-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "col-xs-12 col-md-6 col-md-offset-3", children: [
5272
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
5245
5273
  import_components21.Button,
5246
5274
  {
5247
5275
  className: "m-b-1",
@@ -5252,7 +5280,7 @@ var ReviewBottomBar = ({
5252
5280
  children: intl.formatMessage(CameraCapture_messages_default.reviewSubmit)
5253
5281
  }
5254
5282
  ),
5255
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
5283
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
5256
5284
  import_components21.Button,
5257
5285
  {
5258
5286
  className: "m-b-2",
@@ -5266,14 +5294,14 @@ var ReviewBottomBar = ({
5266
5294
  )
5267
5295
  ] }) }) });
5268
5296
  };
5269
- var CaptureButton = ({ onClick }) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
5297
+ var CaptureButton = ({ onClick }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
5270
5298
  "button",
5271
5299
  {
5272
5300
  type: "button",
5273
5301
  className: "camera-capture-btn m-b-2",
5274
5302
  "data-testid": "camera-capture-button",
5275
5303
  onClick,
5276
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "camera-capture-btn-inner" })
5304
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "camera-capture-btn-inner" })
5277
5305
  }
5278
5306
  );
5279
5307
 
@@ -5353,7 +5381,7 @@ var useVideoConstraints = (direction) => {
5353
5381
 
5354
5382
  // src/step/cameraStep/cameraCapture/overlay/Overlay.tsx
5355
5383
  var import_react28 = require("react");
5356
- var import_jsx_runtime48 = require("react/jsx-runtime");
5384
+ var import_jsx_runtime50 = require("react/jsx-runtime");
5357
5385
  var captureButtonHeight = 92;
5358
5386
  var reviewButtonsHeight = 120;
5359
5387
  var imageHeight = 40;
@@ -5382,18 +5410,18 @@ var Overlay = ({
5382
5410
  return () => window.removeEventListener("resize", listener);
5383
5411
  });
5384
5412
  let helperBoxHeight = (imageUrl ? imageHeight : 0) + (title ? titleHeight : 0) + (instructions ? instructionsHeight : 0);
5385
- let helperBox = /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
5386
- imageUrl && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("img", { className: "camera-capture-img", src: imageUrl, alt: "" }),
5387
- title && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h4", { className: "camera-capture-title", children: title }),
5388
- instructions && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("small", { className: "camera-capture-instructions", children: instructions })
5413
+ let helperBox = /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
5414
+ imageUrl && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("img", { className: "camera-capture-img", src: imageUrl, alt: "" }),
5415
+ title && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("h4", { className: "camera-capture-title", children: title }),
5416
+ instructions && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("small", { className: "camera-capture-instructions", children: instructions })
5389
5417
  ] });
5390
5418
  const frameBottomMargin = captureButtonHeight + helperBoxHeight;
5391
5419
  if (reviewInstructions) {
5392
5420
  helperBoxHeight = frameBottomMargin - reviewButtonsHeight;
5393
- helperBox = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("small", { className: "camera-capture-instructions", children: reviewInstructions });
5421
+ helperBox = /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("small", { className: "camera-capture-instructions", children: reviewInstructions });
5394
5422
  const frameWithReviewInstructionsMinBottomMargin = reviewButtonsHeight + reviewInstructionsHeight;
5395
5423
  if (frameBottomMargin < frameWithReviewInstructionsMinBottomMargin) {
5396
- helperBox = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, {});
5424
+ helperBox = /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, {});
5397
5425
  }
5398
5426
  }
5399
5427
  const framePosition = {
@@ -5411,14 +5439,14 @@ var Overlay = ({
5411
5439
  width: "90%"
5412
5440
  }
5413
5441
  };
5414
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("svg", { ref: svgReference, xmlns: "http://www.w3.org/2000/svg", children: [
5415
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("mask", { id: "mask", children: [
5416
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("rect", { width: "100%", height: "100%", fill: "#fff" }),
5417
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("image", __spreadValues({ href: overlay }, framePosition))
5442
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("svg", { ref: svgReference, xmlns: "http://www.w3.org/2000/svg", children: [
5443
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("mask", { id: "mask", children: [
5444
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("rect", { width: "100%", height: "100%", fill: "#fff" }),
5445
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("image", __spreadValues({ href: overlay }, framePosition))
5418
5446
  ] }) }),
5419
- overlay && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("rect", { width: "100%", height: "100%", mask: "url(#mask)", fillOpacity: "0.72" }),
5420
- outline && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("image", __spreadValues({ href: outline }, framePosition)),
5421
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("foreignObject", { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", __spreadProps(__spreadValues({ className: "camera-capture-text-and-image-container" }, helperBoxPosition), { children: helperBox })) })
5447
+ overlay && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("rect", { width: "100%", height: "100%", mask: "url(#mask)", fillOpacity: "0.72" }),
5448
+ outline && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("image", __spreadValues({ href: outline }, framePosition)),
5449
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("foreignObject", { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", __spreadProps(__spreadValues({ className: "camera-capture-text-and-image-container" }, helperBoxPosition), { children: helperBox })) })
5422
5450
  ] });
5423
5451
  };
5424
5452
  var Overlay_default = Overlay;
@@ -5448,13 +5476,13 @@ var NoCameraAccess_messages_default = (0, import_react_intl19.defineMessages)({
5448
5476
  });
5449
5477
 
5450
5478
  // src/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.tsx
5451
- var import_jsx_runtime49 = require("react/jsx-runtime");
5479
+ var import_jsx_runtime51 = require("react/jsx-runtime");
5452
5480
  var NoCameraAccess = ({ onAction }) => {
5453
5481
  const intl = (0, import_react_intl20.useIntl)();
5454
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { id: "no-camera-access", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "container p-t-5", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "col-md-6 col-md-offset-3", children: [
5455
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h2", { className: "text-xs-center m-b-3", children: intl.formatMessage(NoCameraAccess_messages_default.title) }),
5456
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-xs-center m-b-5", children: intl.formatMessage(NoCameraAccess_messages_default.paragraph) }),
5457
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components22.Button, { block: true, onClick: onAction, children: intl.formatMessage(NoCameraAccess_messages_default.action) })
5482
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { id: "no-camera-access", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "container p-t-5", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "col-md-6 col-md-offset-3", children: [
5483
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("h2", { className: "text-xs-center m-b-3", children: intl.formatMessage(NoCameraAccess_messages_default.title) }),
5484
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-xs-center m-b-5", children: intl.formatMessage(NoCameraAccess_messages_default.paragraph) }),
5485
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components22.Button, { block: true, onClick: onAction, children: intl.formatMessage(NoCameraAccess_messages_default.action) })
5458
5486
  ] }) }) }) });
5459
5487
  };
5460
5488
  var NoCameraAccess_default = NoCameraAccess;
@@ -5478,12 +5506,12 @@ var CameraNotSupported_messages_default = (0, import_react_intl21.defineMessages
5478
5506
  });
5479
5507
 
5480
5508
  // src/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.tsx
5481
- var import_jsx_runtime50 = require("react/jsx-runtime");
5509
+ var import_jsx_runtime52 = require("react/jsx-runtime");
5482
5510
  var CameraNotSupported = () => {
5483
5511
  const intl = (0, import_react_intl22.useIntl)();
5484
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { id: "camera-not-supported", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "container p-t-5", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "col-md-6 col-md-offset-3", children: [
5485
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("h2", { className: "text-xs-center m-b-3", children: intl.formatMessage(CameraNotSupported_messages_default.title) }),
5486
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "text-xs-center m-b-5", children: intl.formatMessage(CameraNotSupported_messages_default.paragraph) })
5512
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { id: "camera-not-supported", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "container p-t-5", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "col-md-6 col-md-offset-3", children: [
5513
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h2", { className: "text-xs-center m-b-3", children: intl.formatMessage(CameraNotSupported_messages_default.title) }),
5514
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-xs-center m-b-5", children: intl.formatMessage(CameraNotSupported_messages_default.paragraph) })
5487
5515
  ] }) }) }) });
5488
5516
  };
5489
5517
  var CameraNotSupported_default = CameraNotSupported;
@@ -5508,7 +5536,7 @@ var getCameraStartedProperties = async (props, videoStream) => {
5508
5536
  };
5509
5537
 
5510
5538
  // src/step/cameraStep/cameraCapture/CameraCapture.tsx
5511
- var import_jsx_runtime51 = require("react/jsx-runtime");
5539
+ var import_jsx_runtime53 = require("react/jsx-runtime");
5512
5540
  var CameraCapture = ({
5513
5541
  direction = "back",
5514
5542
  overlay = "",
@@ -5577,8 +5605,8 @@ var CameraCapture = ({
5577
5605
  setReviewImage(void 0);
5578
5606
  };
5579
5607
  const handleRetryCameraAccess = () => setMode("CAPTURE");
5580
- const captureScreen = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
5581
- videoConstraints && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
5608
+ const captureScreen = /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
5609
+ videoConstraints && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
5582
5610
  import_react_webcam.default,
5583
5611
  {
5584
5612
  ref: webcamReference,
@@ -5589,7 +5617,7 @@ var CameraCapture = ({
5589
5617
  onUserMedia: handleUserMedia
5590
5618
  }
5591
5619
  ),
5592
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
5620
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
5593
5621
  Overlay_default,
5594
5622
  {
5595
5623
  overlay,
@@ -5599,11 +5627,11 @@ var CameraCapture = ({
5599
5627
  instructions
5600
5628
  }
5601
5629
  ),
5602
- ready && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(CaptureBottomBar, { onCapture: () => void handleCapture() })
5630
+ ready && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(CaptureBottomBar, { onCapture: () => void handleCapture() })
5603
5631
  ] });
5604
- const reviewScreen = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
5605
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("img", { className: "review-image", src: reviewImage == null ? void 0 : reviewImage.source, alt: "" }),
5606
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
5632
+ const reviewScreen = /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
5633
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("img", { className: "review-image", src: reviewImage == null ? void 0 : reviewImage.source, alt: "" }),
5634
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
5607
5635
  Overlay_default,
5608
5636
  {
5609
5637
  overlay,
@@ -5613,19 +5641,19 @@ var CameraCapture = ({
5613
5641
  reviewInstructions: intl.formatMessage(CameraCapture_messages_default.reviewInstructions)
5614
5642
  }
5615
5643
  ),
5616
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ReviewBottomBar, { onSubmit: handleReviewSubmit, onRetry: handleReviewRetry })
5644
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ReviewBottomBar, { onSubmit: handleReviewSubmit, onRetry: handleReviewRetry })
5617
5645
  ] });
5618
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("section", { className: "camera-capture", children: [
5646
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("section", { className: "camera-capture", children: [
5619
5647
  mode === "CAPTURE" && captureScreen,
5620
5648
  mode === "REVIEW" && reviewScreen,
5621
- mode === "NO_CAMERA_ACCESS" && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(NoCameraAccess_default, { onAction: handleRetryCameraAccess }),
5622
- mode === "CAMERA_NOT_SUPPORTED" && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(CameraNotSupported_default, {})
5649
+ mode === "NO_CAMERA_ACCESS" && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(NoCameraAccess_default, { onAction: handleRetryCameraAccess }),
5650
+ mode === "CAMERA_NOT_SUPPORTED" && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(CameraNotSupported_default, {})
5623
5651
  ] });
5624
5652
  };
5625
5653
  var CameraCapture_default = CameraCapture;
5626
5654
 
5627
5655
  // src/step/cameraStep/CameraStep.tsx
5628
- var import_jsx_runtime52 = require("react/jsx-runtime");
5656
+ var import_jsx_runtime54 = require("react/jsx-runtime");
5629
5657
  function blobToBase64(blob) {
5630
5658
  return new Promise((resolve, _) => {
5631
5659
  const reader = new FileReader();
@@ -5634,11 +5662,11 @@ function blobToBase64(blob) {
5634
5662
  });
5635
5663
  }
5636
5664
  var CameraStep = (props) => {
5637
- const { step: step31, model, onModelChange, onAction } = props;
5665
+ const { step: step33, model, onModelChange, onAction } = props;
5638
5666
  const onEvent = useEventDispatcher();
5639
- const objectSchema = getObjectSchema(step31);
5640
- const cameraSchema = getCameraSchema(step31);
5641
- const action2 = getFirstAction(step31);
5667
+ const objectSchema = getObjectSchema(step33);
5668
+ const cameraSchema = getCameraSchema(step33);
5669
+ const action2 = getFirstAction(step33);
5642
5670
  const { title, image, cameraConfig } = cameraSchema;
5643
5671
  const { assets, direction, instructions } = cameraConfig || {};
5644
5672
  const { overlay, outline } = assets || {};
@@ -5663,7 +5691,7 @@ var CameraStep = (props) => {
5663
5691
  });
5664
5692
  }
5665
5693
  };
5666
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
5694
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
5667
5695
  CameraCapture_default,
5668
5696
  {
5669
5697
  overlay,
@@ -5680,8 +5708,8 @@ var CameraStep = (props) => {
5680
5708
  );
5681
5709
  };
5682
5710
  var CameraStep_default = CameraStep;
5683
- function getObjectSchema(step31) {
5684
- const nonHiddenSchemas = filterHiddenSchemas(step31.schemas || []);
5711
+ function getObjectSchema(step33) {
5712
+ const nonHiddenSchemas = filterHiddenSchemas(step33.schemas || []);
5685
5713
  const objectSchema = nonHiddenSchemas[0];
5686
5714
  if (!objectSchema || !isObjectSchema(objectSchema)) {
5687
5715
  throw new Error(
@@ -5690,8 +5718,8 @@ function getObjectSchema(step31) {
5690
5718
  }
5691
5719
  return objectSchema;
5692
5720
  }
5693
- function getCameraSchema(step31) {
5694
- const objectSchema = getObjectSchema(step31);
5721
+ function getCameraSchema(step33) {
5722
+ const objectSchema = getObjectSchema(step33);
5695
5723
  const firstProperty = Object.values(objectSchema.properties)[0];
5696
5724
  if (!firstProperty) {
5697
5725
  throw new Error(
@@ -5700,15 +5728,15 @@ function getCameraSchema(step31) {
5700
5728
  }
5701
5729
  return firstProperty;
5702
5730
  }
5703
- function getFirstAction(step31) {
5731
+ function getFirstAction(step33) {
5704
5732
  var _a, _b;
5705
- if (!step31.schemas || ((_a = filterHiddenSchemas(step31.schemas)) == null ? void 0 : _a.length) !== 1) {
5733
+ if (!step33.schemas || ((_a = filterHiddenSchemas(step33.schemas)) == null ? void 0 : _a.length) !== 1) {
5706
5734
  throw new Error("camera step expects 1 non-hidden object schema");
5707
5735
  }
5708
- if (((_b = step31 == null ? void 0 : step31.actions) == null ? void 0 : _b.length) !== 1) {
5736
+ if (((_b = step33 == null ? void 0 : step33.actions) == null ? void 0 : _b.length) !== 1) {
5709
5737
  throw new Error("camera step expects 1 action");
5710
5738
  }
5711
- return step31.actions[0];
5739
+ return step33.actions[0];
5712
5740
  }
5713
5741
 
5714
5742
  // src/step/externalConfirmationStep/ExternalConfirmationStep.tsx
@@ -5740,12 +5768,12 @@ var ExternalConfirmationStep_messages_default = (0, import_react_intl24.defineMe
5740
5768
  });
5741
5769
 
5742
5770
  // src/step/externalConfirmationStep/ExternalConfirmationStep.tsx
5743
- var import_jsx_runtime53 = require("react/jsx-runtime");
5771
+ var import_jsx_runtime55 = require("react/jsx-runtime");
5744
5772
  var noop5 = () => {
5745
5773
  };
5746
5774
  var ExternalConfirmationStep = ({ url, onClose }) => {
5747
5775
  const { formatMessage } = (0, import_react_intl25.useIntl)();
5748
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
5776
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5749
5777
  DynamicLayout_default,
5750
5778
  {
5751
5779
  components: [
@@ -5810,24 +5838,24 @@ function getOrigin(url) {
5810
5838
  }
5811
5839
 
5812
5840
  // src/dynamicFlow/DynamicFlowStep.tsx
5813
- var import_jsx_runtime54 = require("react/jsx-runtime");
5841
+ var import_jsx_runtime56 = require("react/jsx-runtime");
5814
5842
  var DynamicFlowStep = (props) => {
5815
5843
  var _a;
5816
- const { step: step31, globalError } = props;
5817
- const externalUrl = (_a = step31 == null ? void 0 : step31.external) == null ? void 0 : _a.url;
5844
+ const { step: step33, globalError } = props;
5845
+ const externalUrl = (_a = step33 == null ? void 0 : step33.external) == null ? void 0 : _a.url;
5818
5846
  const { requiresManualTrigger, dismissConfirmation } = useExternal(externalUrl);
5819
- if (step31 === void 0) {
5847
+ if (step33 === void 0) {
5820
5848
  return null;
5821
5849
  }
5822
5850
  if (externalUrl && requiresManualTrigger) {
5823
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ExternalConfirmationStep_default, { url: externalUrl, onClose: dismissConfirmation });
5851
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ExternalConfirmationStep_default, { url: externalUrl, onClose: dismissConfirmation });
5824
5852
  }
5825
- if (getStepType(step31) === "camera") {
5826
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(CameraStep_default, __spreadProps(__spreadValues({}, props), { step: step31 }));
5853
+ if (getStepType(step33) === "camera") {
5854
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(CameraStep_default, __spreadProps(__spreadValues({}, props), { step: step33 }));
5827
5855
  }
5828
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
5829
- globalError ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DynamicAlert_default, { component: { context: "negative", markdown: globalError, margin: "lg" } }) : null,
5830
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(LayoutStep_default, __spreadProps(__spreadValues({}, props), { stepSpecification: step31 }))
5856
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
5857
+ globalError ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DynamicAlert_default, { component: { context: "negative", markdown: globalError, margin: "lg" } }) : null,
5858
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(LayoutStep_default, __spreadProps(__spreadValues({}, props), { stepSpecification: step33 }))
5831
5859
  ] });
5832
5860
  };
5833
5861
 
@@ -5875,16 +5903,16 @@ var useDynamicFlowState = (initialStep) => {
5875
5903
  models: (initialStep == null ? void 0 : initialStep.model) ? buildInitialModels(initialStep.model, getAllSchemas(initialStep)) : {},
5876
5904
  etag: void 0
5877
5905
  });
5878
- const { step: step31, models, etag } = stepAndModels;
5879
- const setStepAndEtag = (step32, etag2) => {
5906
+ const { step: step33, models, etag } = stepAndModels;
5907
+ const setStepAndEtag = (step34, etag2) => {
5880
5908
  var _a2, _b2, _c, _d;
5881
5909
  setStepAndModels((previous) => ({
5882
- step: step32,
5883
- models: step32.model ? buildInitialModels(step32.model, getAllSchemas(step32)) : previous.models,
5910
+ step: step34,
5911
+ models: step34.model ? buildInitialModels(step34.model, getAllSchemas(step34)) : previous.models,
5884
5912
  etag: etag2
5885
5913
  }));
5886
- setFormErrors((_b2 = (_a2 = step32 == null ? void 0 : step32.errors) == null ? void 0 : _a2.validation) != null ? _b2 : null);
5887
- setGlobalError((_d = (_c = step32 == null ? void 0 : step32.errors) == null ? void 0 : _c.error) != null ? _d : null);
5914
+ setFormErrors((_b2 = (_a2 = step34 == null ? void 0 : step34.errors) == null ? void 0 : _a2.validation) != null ? _b2 : null);
5915
+ setGlobalError((_d = (_c = step34 == null ? void 0 : step34.errors) == null ? void 0 : _c.error) != null ? _d : null);
5888
5916
  };
5889
5917
  const setSchemaModel = (schemaId, objectModel, onModelsUpdated) => {
5890
5918
  setStepAndModels((previous) => {
@@ -5900,11 +5928,11 @@ var useDynamicFlowState = (initialStep) => {
5900
5928
  return updatedState;
5901
5929
  });
5902
5930
  };
5903
- const modelIsValid = (0, import_react32.useMemo)(() => areModelsValid(models, getAllSchemas(step31)), [models, step31]);
5931
+ const modelIsValid = (0, import_react32.useMemo)(() => areModelsValid(models, getAllSchemas(step33)), [models, step33]);
5904
5932
  return {
5905
5933
  formErrors,
5906
5934
  globalError,
5907
- step: step31,
5935
+ step: step33,
5908
5936
  models,
5909
5937
  etag,
5910
5938
  modelIsValid,
@@ -5924,9 +5952,9 @@ var buildInitialModels = (model, schemas = []) => {
5924
5952
  });
5925
5953
  }, {});
5926
5954
  };
5927
- var getAllSchemas = (step31) => [
5928
- ...getAllSchemasInLayout((step31 == null ? void 0 : step31.layout) || []),
5929
- ...(step31 == null ? void 0 : step31.schemas) || []
5955
+ var getAllSchemas = (step33) => [
5956
+ ...getAllSchemasInLayout((step33 == null ? void 0 : step33.layout) || []),
5957
+ ...(step33 == null ? void 0 : step33.schemas) || []
5930
5958
  ];
5931
5959
  var getAllSchemasInLayout = (components) => components.flatMap((component) => {
5932
5960
  switch (component.type) {
@@ -5952,7 +5980,7 @@ var areModelsValid = (formModels, schemas = []) => {
5952
5980
  // src/dynamicFlow/utils/useLoader.tsx
5953
5981
  var import_components24 = require("@transferwise/components");
5954
5982
  var import_react33 = require("react");
5955
- var import_jsx_runtime55 = require("react/jsx-runtime");
5983
+ var import_jsx_runtime57 = require("react/jsx-runtime");
5956
5984
  function useLoader(loaderConfig, initialState) {
5957
5985
  const config = __spreadValues({
5958
5986
  size: import_components24.Size.EXTRA_LARGE,
@@ -5961,7 +5989,7 @@ function useLoader(loaderConfig, initialState) {
5961
5989
  }, loaderConfig);
5962
5990
  const [loadingState, setLoadingState] = (0, import_react33.useState)(initialState);
5963
5991
  const shouldDisplayLoader = config.initial && loadingState === "initial" || config.submission && loadingState === "submission";
5964
- const loader = shouldDisplayLoader ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5992
+ const loader = shouldDisplayLoader ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5965
5993
  import_components24.Loader,
5966
5994
  {
5967
5995
  size: config.size,
@@ -5995,10 +6023,10 @@ var ErrorBoundary_messages_default = (0, import_react_intl26.defineMessages)({
5995
6023
  });
5996
6024
 
5997
6025
  // src/dynamicFlow/utils/errorBoundary/ErrorBoundaryAlert.tsx
5998
- var import_jsx_runtime56 = require("react/jsx-runtime");
6026
+ var import_jsx_runtime58 = require("react/jsx-runtime");
5999
6027
  var ErrorBoundaryAlert = ({ onDismiss }) => {
6000
6028
  const { formatMessage } = (0, import_react_intl27.useIntl)();
6001
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
6029
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
6002
6030
  import_components25.Alert,
6003
6031
  {
6004
6032
  action: {
@@ -6014,7 +6042,7 @@ var ErrorBoundaryAlert = ({ onDismiss }) => {
6014
6042
  };
6015
6043
 
6016
6044
  // src/dynamicFlow/utils/errorBoundary/ErrorBoundary.tsx
6017
- var import_jsx_runtime57 = require("react/jsx-runtime");
6045
+ var import_jsx_runtime59 = require("react/jsx-runtime");
6018
6046
  var noop6 = () => {
6019
6047
  };
6020
6048
  var ErrorBoundary = class extends import_react34.Component {
@@ -6035,8 +6063,8 @@ var ErrorBoundary = class extends import_react34.Component {
6035
6063
  render() {
6036
6064
  const { children } = this.props;
6037
6065
  const { hasError, isFatalError } = this.state;
6038
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
6039
- hasError && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ErrorBoundaryAlert, { onDismiss: this.handleErrorReset }),
6066
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
6067
+ hasError && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ErrorBoundaryAlert, { onDismiss: this.handleErrorReset }),
6040
6068
  !isFatalError && children
6041
6069
  ] });
6042
6070
  }
@@ -6105,7 +6133,7 @@ var assertResponseIsValid = (response) => {
6105
6133
  var isResponse = (response) => typeof response === "object" && response !== null && "clone" in response && "bodyUsed" in response;
6106
6134
 
6107
6135
  // src/dynamicFlow/DynamicFlow.tsx
6108
- var import_jsx_runtime58 = require("react/jsx-runtime");
6136
+ var import_jsx_runtime60 = require("react/jsx-runtime");
6109
6137
  var noop7 = () => {
6110
6138
  };
6111
6139
  var DynamicFlowComponent = ({
@@ -6124,7 +6152,7 @@ var DynamicFlowComponent = ({
6124
6152
  const {
6125
6153
  formErrors,
6126
6154
  globalError,
6127
- step: step31,
6155
+ step: step33,
6128
6156
  models,
6129
6157
  etag,
6130
6158
  modelIsValid,
@@ -6138,15 +6166,15 @@ var DynamicFlowComponent = ({
6138
6166
  loaderConfig,
6139
6167
  initialStep ? "idle" : "initial"
6140
6168
  );
6141
- const logWarning = getLogger("warning", onLog, flowId, step31 == null ? void 0 : step31.key);
6142
- const logError = getLogger("error", onLog, flowId, step31 == null ? void 0 : step31.key);
6143
- const logCritical = getLogger("critical", onLog, flowId, step31 == null ? void 0 : step31.key);
6169
+ const logWarning = getLogger("warning", onLog, flowId, step33 == null ? void 0 : step33.key);
6170
+ const logError = getLogger("error", onLog, flowId, step33 == null ? void 0 : step33.key);
6171
+ const logCritical = getLogger("critical", onLog, flowId, step33 == null ? void 0 : step33.key);
6144
6172
  const analyticsMetadata = (0, import_react35.useMemo)(
6145
6173
  () => {
6146
6174
  var _a;
6147
- return __spreadValues({ flowId, stepId: step31 == null ? void 0 : step31.key }, (_a = step31 == null ? void 0 : step31.analytics) != null ? _a : {});
6175
+ return __spreadValues({ flowId, stepId: step33 == null ? void 0 : step33.key }, (_a = step33 == null ? void 0 : step33.analytics) != null ? _a : {});
6148
6176
  },
6149
- [flowId, step31]
6177
+ [flowId, step33]
6150
6178
  );
6151
6179
  const dispatchEvent = (0, import_react35.useMemo)(
6152
6180
  () => getEventDispatcher(onEvent, analyticsMetadata),
@@ -6230,8 +6258,8 @@ var DynamicFlowComponent = ({
6230
6258
  return dispatchEventAndComplete(parsedResponse.result);
6231
6259
  case "step":
6232
6260
  default: {
6233
- const { step: step32, etag: etag2 } = parsedResponse;
6234
- return fetchType === "submission" ? updateStepAfterSubmission(step32, etag2) : updateStepAfterRefresh(step32, etag2);
6261
+ const { step: step34, etag: etag2 } = parsedResponse;
6262
+ return fetchType === "submission" ? updateStepAfterSubmission(step34, etag2) : updateStepAfterRefresh(step34, etag2);
6235
6263
  }
6236
6264
  }
6237
6265
  } catch (error) {
@@ -6246,8 +6274,8 @@ var DynamicFlowComponent = ({
6246
6274
  setLoadingState("idle");
6247
6275
  dispatchEvent("Dynamic Flow - Step Started", __spreadValues({ stepId: newStep.key }, newStep == null ? void 0 : newStep.analytics));
6248
6276
  };
6249
- const updateStepAfterRefresh = (step32, etag2) => {
6250
- setStepAndEtag(step32, etag2);
6277
+ const updateStepAfterRefresh = (step34, etag2) => {
6278
+ setStepAndEtag(step34, etag2);
6251
6279
  setLoadingState("idle");
6252
6280
  dispatchEvent("Dynamic Flow - Step Refreshed", { status: "success" });
6253
6281
  };
@@ -6308,7 +6336,7 @@ var DynamicFlowComponent = ({
6308
6336
  const refreshOnChangeIfNeeded = (props, updatedModels) => {
6309
6337
  const { triggerSchema } = props;
6310
6338
  if (shouldTriggerRefresh(props)) {
6311
- const url = triggerSchema.refreshFormUrl || (step31 == null ? void 0 : step31.refreshFormUrl);
6339
+ const url = triggerSchema.refreshFormUrl || (step33 == null ? void 0 : step33.refreshFormUrl);
6312
6340
  const action2 = { url, method: "POST" };
6313
6341
  debouncedFetchRefresh(action2, combineModels2(updatedModels), etag, triggerSchema);
6314
6342
  }
@@ -6360,10 +6388,10 @@ var DynamicFlowComponent = ({
6360
6388
  }
6361
6389
  void fetchNextStep(action2);
6362
6390
  };
6363
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(LogProvider, { flowId, stepId: step31 == null ? void 0 : step31.key, onLog, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(EventsContextProvider, { metadata: analyticsMetadata, onEvent, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DynamicFlowProvider, { loading: loadingState !== "idle", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(HttpClientProvider, { httpClient, children: loader !== null ? loader : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
6391
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(LogProvider, { flowId, stepId: step33 == null ? void 0 : step33.key, onLog, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(EventsContextProvider, { metadata: analyticsMetadata, onEvent, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DynamicFlowProvider, { loading: loadingState !== "idle", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(HttpClientProvider, { httpClient, children: loader !== null ? loader : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
6364
6392
  DynamicFlowStep,
6365
6393
  {
6366
- step: step31,
6394
+ step: step33,
6367
6395
  model: combineModels2(models),
6368
6396
  submitted,
6369
6397
  globalError,
@@ -6376,7 +6404,7 @@ var DynamicFlowComponent = ({
6376
6404
  }
6377
6405
  ) }) }) }) });
6378
6406
  };
6379
- var DynamicFlow = (props) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ErrorBoundary_default, { onError: props.onError, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DynamicFlowComponent, __spreadValues({}, props)) });
6407
+ var DynamicFlow = (props) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ErrorBoundary_default, { onError: props.onError, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DynamicFlowComponent, __spreadValues({}, props)) });
6380
6408
  var DynamicFlow_default = DynamicFlow;
6381
6409
  var combineModels2 = (formModels) => {
6382
6410
  return Object.values(formModels).reduce((previous, model) => __spreadValues(__spreadValues({}, previous), model), {});
@@ -6401,6 +6429,8 @@ __export(components_exports, {
6401
6429
  columns: () => columns_default,
6402
6430
  copyable: () => copyable_default,
6403
6431
  decision: () => decision_default,
6432
+ decisionFlags: () => decision_flags_default,
6433
+ decisionIcons: () => decision_icons_default,
6404
6434
  heading: () => heading_default,
6405
6435
  image: () => image_default,
6406
6436
  info: () => info_default,
@@ -6634,6 +6664,17 @@ var step6 = {
6634
6664
  title: "",
6635
6665
  url: "external"
6636
6666
  }
6667
+ },
6668
+ {
6669
+ title: "Currency flags are now supported as well",
6670
+ disabled: false,
6671
+ icon: {
6672
+ name: "flag-eur"
6673
+ },
6674
+ action: {
6675
+ title: "",
6676
+ url: "external"
6677
+ }
6637
6678
  }
6638
6679
  ]
6639
6680
  }
@@ -6641,8 +6682,69 @@ var step6 = {
6641
6682
  };
6642
6683
  var decision_default = step6;
6643
6684
 
6644
- // src/fixtures/components/heading.ts
6685
+ // src/fixtures/components/decision-flags.ts
6645
6686
  var step7 = {
6687
+ type: "form",
6688
+ key: "Components/Decision Flags",
6689
+ title: "Decision Component",
6690
+ description: "A step with a decision Component.",
6691
+ actions: [],
6692
+ schemas: [],
6693
+ layout: [
6694
+ {
6695
+ type: "heading",
6696
+ size: "sm",
6697
+ text: "Please continue using one of the following options:"
6698
+ },
6699
+ {
6700
+ type: "decision",
6701
+ options: availableCurrencyFlags.map((currencyCode) => {
6702
+ return {
6703
+ title: `${currencyCode.toUpperCase()}`,
6704
+ icon: {
6705
+ name: `flag-${currencyCode}`
6706
+ },
6707
+ action: { url: "/" }
6708
+ };
6709
+ })
6710
+ }
6711
+ ]
6712
+ };
6713
+ var decision_flags_default = step7;
6714
+
6715
+ // src/fixtures/components/decision-icons.ts
6716
+ var icons2 = __toESM(require("@transferwise/icons"));
6717
+ var step8 = {
6718
+ type: "form",
6719
+ key: "Components/Decision Icons",
6720
+ title: "Decision Component",
6721
+ description: "A step with a decision Component.",
6722
+ actions: [],
6723
+ schemas: [],
6724
+ layout: [
6725
+ {
6726
+ type: "heading",
6727
+ size: "sm",
6728
+ text: "Please continue using one of the following options:"
6729
+ },
6730
+ {
6731
+ type: "decision",
6732
+ options: Object.keys(icons2).map((iconName) => {
6733
+ return {
6734
+ title: `${iconName} Icon`,
6735
+ icon: {
6736
+ name: iconName
6737
+ },
6738
+ action: { url: "/" }
6739
+ };
6740
+ })
6741
+ }
6742
+ ]
6743
+ };
6744
+ var decision_icons_default = step8;
6745
+
6746
+ // src/fixtures/components/heading.ts
6747
+ var step9 = {
6646
6748
  type: "form",
6647
6749
  key: "Components/Heading",
6648
6750
  title: "Heading Component",
@@ -6655,11 +6757,11 @@ var step7 = {
6655
6757
  size
6656
6758
  }))
6657
6759
  };
6658
- var heading_default = step7;
6760
+ var heading_default = step9;
6659
6761
 
6660
6762
  // src/fixtures/components/image.ts
6661
6763
  var sizes = ["xs", "sm", "md", "lg", "xl"];
6662
- var step8 = {
6764
+ var step10 = {
6663
6765
  type: "form",
6664
6766
  key: "Components/Image",
6665
6767
  title: "Image Component",
@@ -6680,10 +6782,10 @@ var step8 = {
6680
6782
  }
6681
6783
  ])
6682
6784
  };
6683
- var image_default = step8;
6785
+ var image_default = step10;
6684
6786
 
6685
6787
  // src/fixtures/components/info.ts
6686
- var step9 = {
6788
+ var step11 = {
6687
6789
  type: "form",
6688
6790
  key: "Components/Info",
6689
6791
  title: "Info Component",
@@ -6715,10 +6817,10 @@ But the best part? Bananas are biodegradable and environmentally-friendly, makin
6715
6817
  { type: "alert", markdown: "Links always open in a new tab.", context: "neutral" }
6716
6818
  ]
6717
6819
  };
6718
- var info_default = step9;
6820
+ var info_default = step11;
6719
6821
 
6720
6822
  // src/fixtures/components/list.ts
6721
- var step10 = {
6823
+ var step12 = {
6722
6824
  type: "form",
6723
6825
  key: "Components/List",
6724
6826
  title: "List Component",
@@ -6751,10 +6853,10 @@ var step10 = {
6751
6853
  }
6752
6854
  ]
6753
6855
  };
6754
- var list_default = step10;
6856
+ var list_default = step12;
6755
6857
 
6756
6858
  // src/fixtures/components/loading-indicator.ts
6757
- var step11 = {
6859
+ var step13 = {
6758
6860
  type: "form",
6759
6861
  key: "Components/Loading Indicator",
6760
6862
  title: "Loading Indicator Component",
@@ -6769,10 +6871,10 @@ var step11 = {
6769
6871
  }
6770
6872
  ]
6771
6873
  };
6772
- var loading_indicator_default = step11;
6874
+ var loading_indicator_default = step13;
6773
6875
 
6774
6876
  // src/fixtures/components/paragraph.ts
6775
- var step12 = {
6877
+ var step14 = {
6776
6878
  type: "form",
6777
6879
  key: "Components/Paragraph",
6778
6880
  title: "Paragraph Component",
@@ -6799,10 +6901,10 @@ var step12 = {
6799
6901
  }
6800
6902
  ]
6801
6903
  };
6802
- var paragraph_default = step12;
6904
+ var paragraph_default = step14;
6803
6905
 
6804
6906
  // src/fixtures/components/review.ts
6805
- var step13 = {
6907
+ var step15 = {
6806
6908
  type: "form",
6807
6909
  key: "Components/Review",
6808
6910
  title: "Review Component",
@@ -6861,7 +6963,7 @@ var step13 = {
6861
6963
  }
6862
6964
  ]
6863
6965
  };
6864
- var review_default = step13;
6966
+ var review_default = step15;
6865
6967
 
6866
6968
  // src/fixtures/examples/index.ts
6867
6969
  var examples_exports = {};
@@ -6874,7 +6976,7 @@ __export(examples_exports, {
6874
6976
  });
6875
6977
 
6876
6978
  // src/fixtures/examples/camera-capture.ts
6877
- var step14 = {
6979
+ var step16 = {
6878
6980
  key: "Examples/Camera Capture",
6879
6981
  title: "Camera Capture Example",
6880
6982
  type: "form",
@@ -6994,10 +7096,10 @@ var step14 = {
6994
7096
  },
6995
7097
  refreshFormUrl: "/"
6996
7098
  };
6997
- var camera_capture_default = step14;
7099
+ var camera_capture_default = step16;
6998
7100
 
6999
7101
  // src/fixtures/examples/recipient.ts
7000
- var step15 = {
7102
+ var step17 = {
7001
7103
  key: "Examples/Recipient Creation",
7002
7104
  type: "form",
7003
7105
  title: "Recipient Creation Example",
@@ -7309,10 +7411,10 @@ var step15 = {
7309
7411
  details: {}
7310
7412
  }
7311
7413
  };
7312
- var recipient_default = step15;
7414
+ var recipient_default = step17;
7313
7415
 
7314
7416
  // src/fixtures/examples/recipient-update.ts
7315
- var step16 = {
7417
+ var step18 = {
7316
7418
  key: "Examples/Recipient Update",
7317
7419
  type: "form",
7318
7420
  title: "Edit recipient",
@@ -7561,10 +7663,10 @@ var step16 = {
7561
7663
  }
7562
7664
  ]
7563
7665
  };
7564
- var recipient_update_default = step16;
7666
+ var recipient_update_default = step18;
7565
7667
 
7566
7668
  // src/fixtures/examples/single-file-upload.ts
7567
- var step17 = {
7669
+ var step19 = {
7568
7670
  key: "Examples/Single File Upload",
7569
7671
  type: "form",
7570
7672
  title: "Single File Upload Example",
@@ -7661,10 +7763,10 @@ var step17 = {
7661
7763
  frontSide: 0
7662
7764
  }
7663
7765
  };
7664
- var single_file_upload_default = step17;
7766
+ var single_file_upload_default = step19;
7665
7767
 
7666
7768
  // src/fixtures/examples/step-validation-errors.ts
7667
- var step18 = {
7769
+ var step20 = {
7668
7770
  key: "Examples/Step Validation Errors",
7669
7771
  title: "Step with validation errors",
7670
7772
  type: "form",
@@ -7738,7 +7840,7 @@ var step18 = {
7738
7840
  }
7739
7841
  ]
7740
7842
  };
7741
- var step_validation_errors_default = step18;
7843
+ var step_validation_errors_default = step20;
7742
7844
 
7743
7845
  // src/fixtures/features/index.ts
7744
7846
  var features_exports = {};
@@ -7751,7 +7853,7 @@ __export(features_exports, {
7751
7853
  });
7752
7854
 
7753
7855
  // src/fixtures/features/action-response.ts
7754
- var step19 = {
7856
+ var step21 = {
7755
7857
  key: "Features/Action Response",
7756
7858
  title: "Action Response",
7757
7859
  description: "",
@@ -7779,10 +7881,10 @@ var step19 = {
7779
7881
  }
7780
7882
  ]
7781
7883
  };
7782
- var action_response_default = step19;
7884
+ var action_response_default = step21;
7783
7885
 
7784
7886
  // src/fixtures/features/external.ts
7785
- var step20 = {
7887
+ var step22 = {
7786
7888
  type: "form",
7787
7889
  key: "Features/External",
7788
7890
  title: "External Feature",
@@ -7812,10 +7914,10 @@ var step20 = {
7812
7914
  actions: [],
7813
7915
  schemas: []
7814
7916
  };
7815
- var external_default = step20;
7917
+ var external_default = step22;
7816
7918
 
7817
7919
  // src/fixtures/features/persist-async.ts
7818
- var step21 = {
7920
+ var step23 = {
7819
7921
  type: "form",
7820
7922
  key: "Features/Persist Async",
7821
7923
  title: "Persist Async Feature",
@@ -7858,10 +7960,10 @@ var step21 = {
7858
7960
  }
7859
7961
  ]
7860
7962
  };
7861
- var persist_async_default = step21;
7963
+ var persist_async_default = step23;
7862
7964
 
7863
7965
  // src/fixtures/features/polling.ts
7864
- var step22 = {
7966
+ var step24 = {
7865
7967
  type: "form",
7866
7968
  key: "Features/Polling",
7867
7969
  title: "Polling Feature",
@@ -7893,10 +7995,10 @@ var step22 = {
7893
7995
  actions: [],
7894
7996
  schemas: []
7895
7997
  };
7896
- var polling_default = step22;
7998
+ var polling_default = step24;
7897
7999
 
7898
8000
  // src/fixtures/features/validation-async.ts
7899
- var step23 = {
8001
+ var step25 = {
7900
8002
  type: "form",
7901
8003
  key: "Features/Validation Async",
7902
8004
  title: "Validation Async Feature",
@@ -7933,7 +8035,7 @@ var step23 = {
7933
8035
  // name: 'Colin Robinson',
7934
8036
  }
7935
8037
  };
7936
- var validation_async_default = step23;
8038
+ var validation_async_default = step25;
7937
8039
 
7938
8040
  // src/fixtures/layouts/index.ts
7939
8041
  var layouts_exports = {};
@@ -8201,7 +8303,7 @@ var layout3 = [
8201
8303
  var list_default2 = layout3;
8202
8304
 
8203
8305
  // src/fixtures/layouts/pay-in.ts
8204
- var step24 = {
8306
+ var step26 = {
8205
8307
  key: "PAY_ID",
8206
8308
  type: "form",
8207
8309
  title: "Pay Using PayID",
@@ -8297,7 +8399,7 @@ var step24 = {
8297
8399
  }
8298
8400
  ]
8299
8401
  };
8300
- var pay_in_default = step24;
8402
+ var pay_in_default = step26;
8301
8403
 
8302
8404
  // src/fixtures/layouts/review.ts
8303
8405
  var layout4 = [
@@ -8543,7 +8645,7 @@ var action = { action: { url: "/responses/success", method: "POST" } };
8543
8645
  var action_default = action;
8544
8646
 
8545
8647
  // src/fixtures/responses/action-response-final.ts
8546
- var step25 = {
8648
+ var step27 = {
8547
8649
  type: "form",
8548
8650
  key: "action-response-final",
8549
8651
  title: "Action Response Final Step",
@@ -8566,14 +8668,14 @@ var step25 = {
8566
8668
  }
8567
8669
  ]
8568
8670
  };
8569
- var action_response_final_default = step25;
8671
+ var action_response_final_default = step27;
8570
8672
 
8571
8673
  // src/fixtures/responses/exit.ts
8572
8674
  var exit = { id: "123456", name: "Bob Loblaw", country: "US" };
8573
8675
  var exit_default = exit;
8574
8676
 
8575
8677
  // src/fixtures/responses/recipient-update-final.ts
8576
- var step26 = {
8678
+ var step28 = {
8577
8679
  type: "form",
8578
8680
  key: "recipient-update-final",
8579
8681
  title: "Recipient Update Final Step",
@@ -8596,7 +8698,7 @@ var step26 = {
8596
8698
  }
8597
8699
  ]
8598
8700
  };
8599
- var recipient_update_final_default = step26;
8701
+ var recipient_update_final_default = step28;
8600
8702
 
8601
8703
  // src/fixtures/schemas/index.ts
8602
8704
  var schemas_exports = {};
@@ -8608,7 +8710,7 @@ __export(schemas_exports, {
8608
8710
  });
8609
8711
 
8610
8712
  // src/fixtures/schemas/basic-form.ts
8611
- var step27 = {
8713
+ var step29 = {
8612
8714
  key: "Schemas/Basic Form",
8613
8715
  title: "Simple Form",
8614
8716
  description: "A simple form with text fields and a checkbox.",
@@ -8646,10 +8748,10 @@ var step27 = {
8646
8748
  }
8647
8749
  ]
8648
8750
  };
8649
- var basic_form_default = step27;
8751
+ var basic_form_default = step29;
8650
8752
 
8651
8753
  // src/fixtures/schemas/number-and-integer.ts
8652
- var step28 = {
8754
+ var step30 = {
8653
8755
  key: "Schemas/Number And Integer",
8654
8756
  title: "Number and Integer Schemas",
8655
8757
  description: "Number and Integer Schemas.",
@@ -8689,7 +8791,7 @@ var step28 = {
8689
8791
  }
8690
8792
  ]
8691
8793
  };
8692
- var number_and_integer_default = step28;
8794
+ var number_and_integer_default = step30;
8693
8795
 
8694
8796
  // src/fixtures/schemas/one-of.ts
8695
8797
  var currencies = [
@@ -8754,7 +8856,7 @@ var currencies = [
8754
8856
  ["ZAR", "South African rand"],
8755
8857
  ["ZMW", "Zambian kwacha"]
8756
8858
  ];
8757
- var step29 = {
8859
+ var step31 = {
8758
8860
  key: "Schemas/OneOf",
8759
8861
  title: "OneOf Schemas",
8760
8862
  description: "OneOf Schema using select, radio buttons and tabs.",
@@ -8771,6 +8873,7 @@ var step29 = {
8771
8873
  "account-type-radio": {
8772
8874
  title: 'Personal or Business Account? (oneOf schema with two options default to control: "radio")',
8773
8875
  analyticsId: "account-type-radio",
8876
+ control: "radio",
8774
8877
  oneOf: [
8775
8878
  {
8776
8879
  title: "Personal",
@@ -8911,10 +9014,10 @@ var step29 = {
8911
9014
  }
8912
9015
  ]
8913
9016
  };
8914
- var one_of_default = step29;
9017
+ var one_of_default = step31;
8915
9018
 
8916
9019
  // src/fixtures/schemas/string-formats.ts
8917
- var step30 = {
9020
+ var step32 = {
8918
9021
  key: "Schemas/String Formats",
8919
9022
  title: "String Schema Formats",
8920
9023
  description: "String schemas with different formats (password, date, telephone).",
@@ -8975,7 +9078,7 @@ var step30 = {
8975
9078
  "date-lookup": "2023-01-01"
8976
9079
  }
8977
9080
  };
8978
- var string_formats_default = step30;
9081
+ var string_formats_default = step32;
8979
9082
 
8980
9083
  // src/fixtures/utils/image-util.ts
8981
9084
  var getImageStep = (size) => {
@@ -9343,10 +9446,10 @@ var pl_default = {
9343
9446
  "dynamicFlows.CameraCapture.reviewRetry": "Nie, spr\xF3buj ponownie",
9344
9447
  "dynamicFlows.CameraCapture.reviewSubmit": "Tak, prze\u015Blij",
9345
9448
  "dynamicFlows.ControlFeedback.maxLength": "Prosimy wprowadzi\u0107 do {maxLength} znak\xF3w.",
9346
- "dynamicFlows.ControlFeedback.maximum": "Wprowad\u017A liczb\u0119 {maximum} lub mniejsz\u0105.",
9449
+ "dynamicFlows.ControlFeedback.maximum": "Wprowad\u017A liczb\u0119 r\xF3wn\u0105 lub mniejsz\u0105 ni\u017C {maximum}.",
9347
9450
  "dynamicFlows.ControlFeedback.maximumDate": "Wprowad\u017A dat\u0119 nie p\xF3\u017Aniejsz\u0105 ni\u017C {maximum}.",
9348
9451
  "dynamicFlows.ControlFeedback.minLength": "Prosz\u0119 wpisa\u0107 co najmniej {minLength} znak\xF3w.",
9349
- "dynamicFlows.ControlFeedback.minimum": "Wprowad\u017A liczb\u0119 {minimum} lub wi\u0119ksz\u0105.",
9452
+ "dynamicFlows.ControlFeedback.minimum": "Wprowad\u017A liczb\u0119 r\xF3wn\u0105 lub wi\u0119ksz\u0105 ni\u017C {minimum}.",
9350
9453
  "dynamicFlows.ControlFeedback.minimumDate": "Wprowad\u017A dat\u0119 nie wcze\u015Bniejsz\u0105 ni\u017C {minimum}.",
9351
9454
  "dynamicFlows.ControlFeedback.pattern": "Wprowad\u017A t\u0119 warto\u015B\u0107 w prawid\u0142owym formacie.",
9352
9455
  "dynamicFlows.ControlFeedback.patternDate": "Wprowad\u017A dat\u0119 w prawid\u0142owym formacie.",
@@ -9534,10 +9637,10 @@ var tr_default = {
9534
9637
  var zh_default = {
9535
9638
  "dynamicFlows.ArraySchema.maxItemsError": "\u8ACB\u6DFB\u52A0\u4E0D\u8D85\u904E{maxItems}\u9805\u3002",
9536
9639
  "dynamicFlows.ArraySchema.minItemsError": "\u8ACB\u81F3\u5C11\u6DFB\u52A0{minItems}\u9805\u3002",
9537
- "dynamicFlows.CameraCapture.CameraNotSupported.paragraph": "\u4F60\u76EE\u524D\u4F7F\u7528\u7684\u700F\u89BD\u5668\u4E0D\u652F\u6301\u76F8\u6A5F\u529F\u80FD\u3002\u8ACB\u5617\u8A66\u4F7F\u7528\u5176\u4ED6\u700F\u89BD\u5668\u6216\u5176\u4ED6\u88DD\u7F6E\uFF0C\u6216\u8005\u4F60\u53EF\u4EE5\u4E0B\u8F09\u6211\u5011\u7684\u61C9\u7528\u7A0B\u5F0F\u3002",
9538
- "dynamicFlows.CameraCapture.CameraNotSupported.title": "\u4E0D\u652F\u6301\u76F8\u6A5F\u529F\u80FD",
9640
+ "dynamicFlows.CameraCapture.CameraNotSupported.paragraph": "\u4F60\u76EE\u524D\u4F7F\u7528\u7684\u700F\u89BD\u5668\u4E0D\u652F\u6301\u76F8\u6A5F\u3002\u8ACB\u5617\u8A66\u4F7F\u7528\u5176\u4ED6\u700F\u89BD\u5668\u6216\u5176\u4ED6\u88DD\u7F6E\uFF0C\u6216\u8005\u4F60\u53EF\u4EE5\u4E0B\u8F09\u6211\u5011\u7684\u61C9\u7528\u7A0B\u5F0F\u3002",
9641
+ "dynamicFlows.CameraCapture.CameraNotSupported.title": "\u4E0D\u652F\u6301\u76F8\u6A5F",
9539
9642
  "dynamicFlows.CameraCapture.NoCameraAccess.action": "\u5141\u8A31\u53D6\u7528\u76F8\u6A5F",
9540
- "dynamicFlows.CameraCapture.NoCameraAccess.paragraph": "\u4F60\u53EF\u4EE5\u5728\u700F\u89BD\u5668\u7684\u8A2D\u5B9A\u4E2D\u958B\u555F\u76F8\u6A5F\u5B58\u53D6\u6B0A\u9650",
9643
+ "dynamicFlows.CameraCapture.NoCameraAccess.paragraph": "\u4F60\u53EF\u4EE5\u5728\u700F\u89BD\u5668\u7684\u8A2D\u5B9A\u4E2D\u958B\u555F\u76F8\u6A5F\u5B58\u53D6\u6B0A\u9650\u3002",
9541
9644
  "dynamicFlows.CameraCapture.NoCameraAccess.title": "\u6211\u5011\u7121\u6CD5\u53D6\u7528\u4F60\u7684\u76F8\u6A5F",
9542
9645
  "dynamicFlows.CameraCapture.reviewInstructions": "\u4F60\u7684\u7167\u7247\u662F\u5426\u5B8C\u6574\u3001\u6E05\u6670\u53CA\u53EF\u8B80\uFF1F",
9543
9646
  "dynamicFlows.CameraCapture.reviewRetry": "\u5426\uFF0C\u518D\u8A66\u4E00\u6B21",
@@ -9552,13 +9655,13 @@ var zh_default = {
9552
9655
  "dynamicFlows.ControlFeedback.patternDate": "\u8ACB\u4EE5\u6B63\u78BA\u683C\u5F0F\u8F38\u5165\u65E5\u671F\u3002",
9553
9656
  "dynamicFlows.ControlFeedback.required": "\u8ACB\u586B\u5BEB\u6B64\u6B04\u4F4D\u3002",
9554
9657
  "dynamicFlows.ControlFeedback.type": "\u932F\u8AA4\u7684\u985E\u578B",
9555
- "dynamicFlows.DynamicExternal.retryTitle": "\u91CD\u65B0\u958B\u555F\u8996\u7A97",
9658
+ "dynamicFlows.DynamicExternal.retryTitle": "\u91CD\u65B0\u6253\u958B\u8996\u7A97",
9556
9659
  "dynamicFlows.DynamicParagraph.copied": "\u8907\u88FD\u5230\u526A\u8CBC\u677F",
9557
9660
  "dynamicFlows.DynamicParagraph.copy": "\u8907\u88FD",
9558
9661
  "dynamicFlows.ErrorBoundary.errorAlert": "\u5662\uFF01\u51FA\u4E86\u4E9B\u554F\u984C...",
9559
9662
  "dynamicFlows.ErrorBoundary.retry": "\u91CD\u8A66",
9560
9663
  "dynamicFlows.ExternalConfirmation.cancel": "\u53D6\u6D88",
9561
- "dynamicFlows.ExternalConfirmation.description": "\u8ACB\u78BA\u8A8D\u4F60\u60F3\u5728\u700F\u89BD\u5668\u7684\u65B0\u5206\u9801\u4E2D\u958B\u555F**{origin}**\u3002",
9664
+ "dynamicFlows.ExternalConfirmation.description": "\u8ACB\u78BA\u8A8D\u4F60\u662F\u5426\u8981\u5728\u700F\u89BD\u5668\u7684\u65B0\u5206\u9801\u6253\u958B**{origin}**\u3002",
9562
9665
  "dynamicFlows.ExternalConfirmation.open": "\u5728\u65B0\u5206\u9801\u4E2D\u958B\u555F",
9563
9666
  "dynamicFlows.ExternalConfirmation.title": "\u8ACB\u78BA\u8A8D",
9564
9667
  "dynamicFlows.Help.ariaLabel": "\u6309\u6B64\u67E5\u770B\u8A73\u60C5\u3002",