@wise/dynamic-flow-client 3.27.0 → 3.28.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
@@ -518,7 +518,7 @@ var de_default = {
518
518
  "dynamicFlows.ExternalConfirmation.open": "In neuem Tab \xF6ffnen",
519
519
  "dynamicFlows.ExternalConfirmation.title": "Bitte best\xE4tigen",
520
520
  "dynamicFlows.FileUploadSchema.maxFileSizeError": "Diese Datei ist leider zu gro\xDF. Bitte lade eine kleinere Datei hoch.",
521
- "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Sorry, that file format is not supported. Please upload a different file.",
521
+ "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Das Dateiformat wird leider nicht unterst\xFCtzt. Bitte lade eine andere Datei hoch.",
522
522
  "dynamicFlows.Help.ariaLabel": "Klicke hier f\xFCr mehr Informationen.",
523
523
  "dynamicFlows.MultiSelect.summary": "{first} und {count} weitere",
524
524
  "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "Diese Datei ist leider zu gro\xDF. Bitte lade eine kleinere Datei hoch.",
@@ -836,7 +836,7 @@ var it_default = {
836
836
  "dynamicFlows.ExternalConfirmation.open": "Apri in una nuova scheda",
837
837
  "dynamicFlows.ExternalConfirmation.title": "Conferma",
838
838
  "dynamicFlows.FileUploadSchema.maxFileSizeError": "Spiacenti, il file \xE8 troppo grande. Carica un file di dimensioni inferiori.",
839
- "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Sorry, that file format is not supported. Please upload a different file.",
839
+ "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Siamo spiacenti, questo formato di file non \xE8 supportato. Carica un file diverso.",
840
840
  "dynamicFlows.Help.ariaLabel": "Clicca qui per maggiori informazioni.",
841
841
  "dynamicFlows.MultiSelect.summary": "{first} e altri {count}",
842
842
  "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "Spiacenti, il file \xE8 troppo grande. Carica un file di dimensioni inferiori.",
@@ -995,7 +995,7 @@ var pt_default = {
995
995
  "dynamicFlows.ExternalConfirmation.open": "Abrir em uma nova aba",
996
996
  "dynamicFlows.ExternalConfirmation.title": "Por favor, confirme",
997
997
  "dynamicFlows.FileUploadSchema.maxFileSizeError": "Este arquivo \xE9 muito grande. Por favor, envie um arquivo menor.",
998
- "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Sorry, that file format is not supported. Please upload a different file.",
998
+ "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Lamentamos, mas este formato de arquivo n\xE3o \xE9 aceito. Envie um arquivo diferente.",
999
999
  "dynamicFlows.Help.ariaLabel": "Clique aqui para mais informa\xE7\xF5es.",
1000
1000
  "dynamicFlows.MultiSelect.summary": "{first} e mais {count} ",
1001
1001
  "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "Este arquivo \xE9 muito grande. Por favor, envie um arquivo menor.",
@@ -1101,7 +1101,7 @@ var ru_default = {
1101
1101
  "dynamicFlows.ExternalConfirmation.open": "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u043D\u043E\u0432\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u0435",
1102
1102
  "dynamicFlows.ExternalConfirmation.title": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435",
1103
1103
  "dynamicFlows.FileUploadSchema.maxFileSizeError": "\u0418\u0437\u0432\u0438\u043D\u0438\u0442\u0435, \u0444\u0430\u0439\u043B \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0439. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043B \u043C\u0435\u043D\u044C\u0448\u0435\u0433\u043E \u0440\u0430\u0437\u043C\u0435\u0440\u0430.",
1104
- "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Sorry, that file format is not supported. Please upload a different file.",
1104
+ "dynamicFlows.FileUploadSchema.wrongFileTypeError": "\u042D\u0442\u043E\u0442 \u0444\u043E\u0440\u043C\u0430\u0442 \u0444\u0430\u0439\u043B\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F. \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u043E\u0439 \u0444\u0430\u0439\u043B.",
1105
1105
  "dynamicFlows.Help.ariaLabel": "\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u0437\u0434\u0435\u0441\u044C \u0434\u043B\u044F \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u044F \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0439 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u0438.",
1106
1106
  "dynamicFlows.MultiSelect.summary": "{first} \u0438 \u0435\u0449\u0435 {count} \u0434\u0440\u0443\u0433\u0438\u0445",
1107
1107
  "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "\u0418\u0437\u0432\u0438\u043D\u0438\u0442\u0435, \u0444\u0430\u0439\u043B \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0439. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043B \u043C\u0435\u043D\u044C\u0448\u0435\u0433\u043E \u0440\u0430\u0437\u043C\u0435\u0440\u0430.",
@@ -1154,7 +1154,7 @@ var th_default = {
1154
1154
  "dynamicFlows.ExternalConfirmation.open": "\u0E40\u0E1B\u0E34\u0E14\u0E43\u0E19\u0E41\u0E17\u0E47\u0E1A\u0E43\u0E2B\u0E21\u0E48",
1155
1155
  "dynamicFlows.ExternalConfirmation.title": "\u0E42\u0E1B\u0E23\u0E14\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19",
1156
1156
  "dynamicFlows.FileUploadSchema.maxFileSizeError": "\u0E02\u0E2D\u0E2D\u0E20\u0E31\u0E22 \u0E44\u0E1F\u0E25\u0E4C\u0E19\u0E31\u0E49\u0E19\u0E43\u0E2B\u0E0D\u0E48\u0E40\u0E01\u0E34\u0E19\u0E44\u0E1B \u0E42\u0E1B\u0E23\u0E14\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E1F\u0E25\u0E4C\u0E17\u0E35\u0E48\u0E21\u0E35\u0E02\u0E19\u0E32\u0E14\u0E40\u0E25\u0E47\u0E01\u0E25\u0E07",
1157
- "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Sorry, that file format is not supported. Please upload a different file.",
1157
+ "dynamicFlows.FileUploadSchema.wrongFileTypeError": "\u0E02\u0E2D\u0E2D\u0E20\u0E31\u0E22 \u0E23\u0E30\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E23\u0E2D\u0E07\u0E23\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E1F\u0E25\u0E4C\u0E14\u0E31\u0E07\u0E01\u0E25\u0E48\u0E32\u0E27 \u0E42\u0E1B\u0E23\u0E14\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E1F\u0E25\u0E4C\u0E2D\u0E37\u0E48\u0E19",
1158
1158
  "dynamicFlows.Help.ariaLabel": "\u0E04\u0E25\u0E34\u0E01\u0E17\u0E35\u0E48\u0E19\u0E35\u0E48\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E14\u0E39\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21",
1159
1159
  "dynamicFlows.MultiSelect.summary": "{first} \u0E41\u0E25\u0E30\u0E2D\u0E35\u0E01 {count}",
1160
1160
  "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "\u0E02\u0E2D\u0E2D\u0E20\u0E31\u0E22 \u0E44\u0E1F\u0E25\u0E4C\u0E19\u0E31\u0E49\u0E19\u0E43\u0E2B\u0E0D\u0E48\u0E40\u0E01\u0E34\u0E19\u0E44\u0E1B \u0E42\u0E1B\u0E23\u0E14\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E1F\u0E25\u0E4C\u0E17\u0E35\u0E48\u0E21\u0E35\u0E02\u0E19\u0E32\u0E14\u0E40\u0E25\u0E47\u0E01\u0E25\u0E07",
@@ -1313,7 +1313,7 @@ var zh_HK_default = {
1313
1313
  "dynamicFlows.ExternalConfirmation.open": "\u5728\u65B0\u5206\u9801\u4E2D\u958B\u555F",
1314
1314
  "dynamicFlows.ExternalConfirmation.title": "\u8ACB\u78BA\u8A8D",
1315
1315
  "dynamicFlows.FileUploadSchema.maxFileSizeError": "\u62B1\u6B49\uFF0C\u8A72\u6A94\u6848\u592A\u5927\u3002\u8ACB\u4E0A\u8F09\u4E00\u500B\u8F03\u5C0F\u7684\u6A94\u6848\u3002",
1316
- "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Sorry, that file format is not supported. Please upload a different file.",
1316
+ "dynamicFlows.FileUploadSchema.wrongFileTypeError": "\u62B1\u6B49\uFF0C\u7CFB\u7D71\u4E0D\u652F\u63F4\u8A72\u6A94\u6848\u3002\u8ACB\u4E0A\u8F09\u5176\u4ED6\u6A94\u6848\u3002",
1317
1317
  "dynamicFlows.Help.ariaLabel": "\u6309\u6B64\u67E5\u770B\u8A73\u60C5\u3002",
1318
1318
  "dynamicFlows.MultiSelect.summary": "{first}\u548C\u5176\u4ED6{count}\u9805",
1319
1319
  "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "\u62B1\u6B49\uFF0C\u8A72\u6A94\u6848\u592A\u5927\u3002\u8ACB\u4E0A\u8F09\u4E00\u500B\u8F03\u5C0F\u7684\u6A94\u6848\u3002",
@@ -1600,7 +1600,7 @@ var boxComponentToProps = ({ border, control, width, margin }, children) => ({ t
1600
1600
 
1601
1601
  // src/revamp/renderers/mappers/buttonComponentToProps.ts
1602
1602
  var buttonComponentToProps = (component) => {
1603
- const { title, control, context, disabled, margin, pinOrder, size, onClick } = component;
1603
+ const { title, control, context, disabled, margin, pinOrder, size: size2, onClick } = component;
1604
1604
  return {
1605
1605
  type: "button",
1606
1606
  title,
@@ -1609,7 +1609,7 @@ var buttonComponentToProps = (component) => {
1609
1609
  disabled,
1610
1610
  margin,
1611
1611
  pinOrder,
1612
- size,
1612
+ size: size2,
1613
1613
  onClick
1614
1614
  };
1615
1615
  };
@@ -1652,14 +1652,14 @@ var headingComponentToProps = ({
1652
1652
  align,
1653
1653
  control,
1654
1654
  margin,
1655
- size,
1655
+ size: size2,
1656
1656
  text
1657
1657
  }) => ({
1658
1658
  type: "heading",
1659
1659
  align,
1660
1660
  control,
1661
1661
  margin,
1662
- size,
1662
+ size: size2,
1663
1663
  text
1664
1664
  });
1665
1665
 
@@ -1673,14 +1673,14 @@ var imageComponentToProps = ({
1673
1673
  accessibilityDescription,
1674
1674
  control,
1675
1675
  margin,
1676
- size,
1676
+ size: size2,
1677
1677
  url
1678
1678
  }) => ({
1679
1679
  type: "image",
1680
1680
  accessibilityDescription,
1681
1681
  control,
1682
1682
  margin,
1683
- size,
1683
+ size: size2,
1684
1684
  url
1685
1685
  });
1686
1686
 
@@ -1709,12 +1709,12 @@ var integerInputComponentToProps = (component) => __spreadProps(__spreadValues({
1709
1709
  var loadingIndicatorComponentToProps = ({
1710
1710
  control,
1711
1711
  margin,
1712
- size
1712
+ size: size2
1713
1713
  }) => ({
1714
1714
  type: "loading-indicator",
1715
1715
  control,
1716
1716
  margin,
1717
- size
1717
+ size: size2
1718
1718
  });
1719
1719
 
1720
1720
  // src/revamp/renderers/mappers/markdownComponentToProps.ts
@@ -5056,8 +5056,8 @@ var ZodSet = class _ZodSet extends ZodType {
5056
5056
  maxSize: { value: maxSize, message: errorUtil.toString(message) }
5057
5057
  }));
5058
5058
  }
5059
- size(size, message) {
5060
- return this.min(size, message).max(size, message);
5059
+ size(size2, message) {
5060
+ return this.min(size2, message).max(size2, message);
5061
5061
  }
5062
5062
  nonempty(message) {
5063
5063
  return this.min(1, message);
@@ -7031,7 +7031,29 @@ var getComponentCallToAction = (callToAction, onAction) => {
7031
7031
  }
7032
7032
  const { accessibilityDescription, behavior, title } = callToAction;
7033
7033
  if ("type" in behavior) {
7034
- return void 0;
7034
+ switch (behavior.type) {
7035
+ case "action": {
7036
+ const { action } = behavior;
7037
+ return {
7038
+ type: "action",
7039
+ accessibilityDescription,
7040
+ title,
7041
+ onClick: () => {
7042
+ void onAction(action);
7043
+ }
7044
+ };
7045
+ }
7046
+ case "link": {
7047
+ return {
7048
+ type: "link",
7049
+ accessibilityDescription,
7050
+ href: behavior.url,
7051
+ title
7052
+ };
7053
+ }
7054
+ default:
7055
+ return void 0;
7056
+ }
7035
7057
  }
7036
7058
  if (behavior.link) {
7037
7059
  const { url } = behavior.link;
@@ -7132,11 +7154,26 @@ var buttonLayoutToComponent = (uid, button, mapperProps) => {
7132
7154
  };
7133
7155
  var buttonLayoutToComponentWithBehavior = (uid, button, mapperProps) => {
7134
7156
  const { onAction, onLink, step } = mapperProps;
7135
- const { context, control, disabled, margin = "md", pinOrder, size, title, behavior } = button;
7157
+ const { context, control, disabled, margin = "md", pinOrder, size: size2, title, behavior } = button;
7136
7158
  const getOnClick = () => {
7137
7159
  if ("type" in behavior) {
7138
- return () => {
7139
- };
7160
+ switch (behavior.type) {
7161
+ case "action": {
7162
+ const action2 = inlineAction(behavior.action, step == null ? void 0 : step.actions);
7163
+ return () => {
7164
+ void onAction(action2);
7165
+ };
7166
+ }
7167
+ case "link": {
7168
+ const { url } = behavior;
7169
+ return () => {
7170
+ onLink(url);
7171
+ };
7172
+ }
7173
+ default:
7174
+ return () => {
7175
+ };
7176
+ }
7140
7177
  }
7141
7178
  const { action, link } = behavior;
7142
7179
  const inlinedAction = action ? inlineAction(action, step == null ? void 0 : step.actions) : null;
@@ -7160,14 +7197,14 @@ var buttonLayoutToComponentWithBehavior = (uid, button, mapperProps) => {
7160
7197
  disabled: disabled != null ? disabled : false,
7161
7198
  margin,
7162
7199
  pinOrder,
7163
- size,
7200
+ size: size2,
7164
7201
  title: title != null ? title : "",
7165
7202
  onClick: getOnClick()
7166
7203
  });
7167
7204
  };
7168
7205
  var buttonLayoutToComponentWithAction = (uid, button, mapperProps) => {
7169
7206
  const { onAction, step } = mapperProps;
7170
- const { context, control, disabled, margin = "md", pinOrder, size, title } = button;
7207
+ const { context, control, disabled, margin = "md", pinOrder, size: size2, title } = button;
7171
7208
  const { action } = button;
7172
7209
  const inlinedAction = action ? inlineAction(action, step == null ? void 0 : step.actions) : {};
7173
7210
  const onClick = () => {
@@ -7180,13 +7217,13 @@ var buttonLayoutToComponentWithAction = (uid, button, mapperProps) => {
7180
7217
  disabled: getButtonDisabled({ disabled, action: inlinedAction }),
7181
7218
  margin,
7182
7219
  pinOrder,
7183
- size,
7220
+ size: size2,
7184
7221
  title: getButtonTitle({ title, action: inlinedAction }),
7185
7222
  onClick
7186
7223
  });
7187
7224
  };
7188
7225
  var buttonLayoutToComponentWithNoop = (uid, button) => {
7189
- const { context, control, disabled, margin = "md", pinOrder, size, title } = button;
7226
+ const { context, control, disabled, margin = "md", pinOrder, size: size2, title } = button;
7190
7227
  return createButtonComponent({
7191
7228
  uid,
7192
7229
  context: mapLegacyContext(context != null ? context : "neutral"),
@@ -7194,7 +7231,7 @@ var buttonLayoutToComponentWithNoop = (uid, button) => {
7194
7231
  disabled: disabled != null ? disabled : false,
7195
7232
  margin,
7196
7233
  pinOrder,
7197
- size,
7234
+ size: size2,
7198
7235
  title: title != null ? title : "",
7199
7236
  onClick: () => {
7200
7237
  }
@@ -10029,12 +10066,12 @@ var createHeadingComponent = (headingProps) => __spreadProps(__spreadValues({
10029
10066
  });
10030
10067
 
10031
10068
  // src/revamp/domain/mappers/layout/headingLayoutToComponent.ts
10032
- var headingLayoutToComponent = (uid, { align = "left", margin = "md", size = "md", control, text }) => createHeadingComponent({
10069
+ var headingLayoutToComponent = (uid, { align = "left", margin = "md", size: size2 = "md", control, text }) => createHeadingComponent({
10033
10070
  uid,
10034
10071
  align: mapLegacyAlign(align),
10035
10072
  control,
10036
10073
  margin,
10037
- size,
10074
+ size: size2,
10038
10075
  text
10039
10076
  });
10040
10077
 
@@ -10051,12 +10088,12 @@ var createImageComponent = (imageProps) => __spreadProps(__spreadValues({
10051
10088
  });
10052
10089
 
10053
10090
  // src/revamp/domain/mappers/layout/imageLayoutToComponent.ts
10054
- var imageLayoutToComponent = (uid, { accessibilityDescription, control, margin = "md", size = "md", text, url }) => createImageComponent({
10091
+ var imageLayoutToComponent = (uid, { accessibilityDescription, control, margin = "md", size: size2 = "md", text, url }) => createImageComponent({
10055
10092
  uid,
10056
10093
  accessibilityDescription: accessibilityDescription != null ? accessibilityDescription : text,
10057
10094
  control,
10058
10095
  margin,
10059
- size,
10096
+ size: size2,
10060
10097
  url
10061
10098
  });
10062
10099
 
@@ -10117,7 +10154,7 @@ var createLoadingIndicatorComponent = (loadingIndicatorProps) => __spreadProps(_
10117
10154
  });
10118
10155
 
10119
10156
  // src/revamp/domain/mappers/layout/loadingIndicatorLayoutToComponent.ts
10120
- var loadingIndicatorLayoutToComponent = (uid, { size = "md", margin = "md", control }) => createLoadingIndicatorComponent({ uid, size, control, margin });
10157
+ var loadingIndicatorLayoutToComponent = (uid, { size: size2 = "md", margin = "md", control }) => createLoadingIndicatorComponent({ uid, size: size2, control, margin });
10121
10158
 
10122
10159
  // src/revamp/domain/mappers/layout/markdownLayoutToComponent.ts
10123
10160
  var markdownLayoutToComponent = (uid, { align = "left", margin = "md", control, content }) => createMarkdownComponent({
@@ -10218,12 +10255,36 @@ var reviewLayoutToComponent = (uid, { fields, title, callToAction, control, marg
10218
10255
  });
10219
10256
  var getReviewAction = ({ onAction, onLink, callToAction, action }) => {
10220
10257
  if (callToAction) {
10221
- const { action: ctaAction, behavior, title } = callToAction;
10258
+ const { accessibilityDescription, action: ctaAction, behavior, title } = callToAction;
10222
10259
  if (behavior) {
10223
10260
  if ("type" in behavior) {
10224
- return void 0;
10261
+ switch (behavior.type) {
10262
+ case "action": {
10263
+ const { action: behaviorAction2 } = behavior;
10264
+ return {
10265
+ accessibilityDescription,
10266
+ title,
10267
+ onClick: () => {
10268
+ void onAction(behaviorAction2);
10269
+ }
10270
+ };
10271
+ }
10272
+ case "link": {
10273
+ const { url } = behavior;
10274
+ return {
10275
+ accessibilityDescription,
10276
+ href: url,
10277
+ title,
10278
+ onClick: () => {
10279
+ onLink(url);
10280
+ }
10281
+ };
10282
+ }
10283
+ default:
10284
+ return void 0;
10285
+ }
10225
10286
  }
10226
- const { accessibilityDescription, action: behaviorAction, link } = behavior;
10287
+ const { action: behaviorAction, link } = behavior;
10227
10288
  if (behaviorAction) {
10228
10289
  return {
10229
10290
  accessibilityDescription,
@@ -10458,7 +10519,31 @@ var getItemCallToAction = (callToAction, onAction, onLink) => {
10458
10519
  }
10459
10520
  const { accessibilityDescription, behavior, title } = callToAction;
10460
10521
  if ("type" in behavior) {
10461
- return void 0;
10522
+ switch (behavior.type) {
10523
+ case "action": {
10524
+ const { action } = behavior;
10525
+ return {
10526
+ accessibilityDescription,
10527
+ title,
10528
+ onClick: () => {
10529
+ void onAction(action);
10530
+ }
10531
+ };
10532
+ }
10533
+ case "link": {
10534
+ const { url } = behavior;
10535
+ return {
10536
+ accessibilityDescription,
10537
+ href: url,
10538
+ title,
10539
+ onClick: () => {
10540
+ void onLink(url);
10541
+ }
10542
+ };
10543
+ }
10544
+ default:
10545
+ return void 0;
10546
+ }
10462
10547
  }
10463
10548
  if (behavior.action) {
10464
10549
  const { action } = behavior;
@@ -11364,8 +11449,8 @@ var useRendererHttpClient = () => {
11364
11449
  var import_components2 = require("@transferwise/components");
11365
11450
 
11366
11451
  // ../renderers/src/utils/layout-utils.ts
11367
- var getMargin = (size) => {
11368
- switch (size) {
11452
+ var getMargin = (size2) => {
11453
+ switch (size2) {
11369
11454
  case "xs":
11370
11455
  return "m-b-0";
11371
11456
  case "sm":
@@ -11586,7 +11671,7 @@ function ButtonRendererComponent({
11586
11671
  disabled,
11587
11672
  margin,
11588
11673
  title,
11589
- size,
11674
+ size: size2,
11590
11675
  onClick
11591
11676
  }) {
11592
11677
  const className = getMargin(margin);
@@ -11600,7 +11685,7 @@ function ButtonRendererComponent({
11600
11685
  className,
11601
11686
  disabled: isLoading || disabled,
11602
11687
  priority: mapControl(control),
11603
- size: mapSize(size),
11688
+ size: mapSize(size2),
11604
11689
  type,
11605
11690
  onClick,
11606
11691
  children: title
@@ -11625,11 +11710,11 @@ var mapControl = (control) => {
11625
11710
  return "secondary";
11626
11711
  }
11627
11712
  };
11628
- var mapSize = (size) => {
11629
- if (!size) {
11713
+ var mapSize = (size2) => {
11714
+ if (!size2) {
11630
11715
  return void 0;
11631
11716
  }
11632
- switch (size) {
11717
+ switch (size2) {
11633
11718
  case "xs":
11634
11719
  case "sm":
11635
11720
  return "sm";
@@ -11926,15 +12011,15 @@ var HeadingRenderer = {
11926
12011
  render: (props) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Heading, __spreadValues({}, props))
11927
12012
  };
11928
12013
  function Heading(props) {
11929
- const { text, size, align, margin, control } = props;
12014
+ const { text, size: size2, align, margin, control } = props;
11930
12015
  const className = getTextAlignmentAndMargin({ align, margin });
11931
- return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(StandardHeading, { size, text, className });
12016
+ return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DisplayHeading, { size: size2, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(StandardHeading, { size: size2, text, className });
11932
12017
  }
11933
- function DisplayHeading({ size, text, className }) {
11934
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_components11.Display, { type: getDisplayType(size), className, children: text });
12018
+ function DisplayHeading({ size: size2, text, className }) {
12019
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_components11.Display, { type: getDisplayType(size2), className, children: text });
11935
12020
  }
11936
- function StandardHeading({ size, text, className }) {
11937
- switch (size) {
12021
+ function StandardHeading({ size: size2, text, className }) {
12022
+ switch (size2) {
11938
12023
  case "xs":
11939
12024
  return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h5", { className, children: text });
11940
12025
  case "sm":
@@ -11948,8 +12033,8 @@ function StandardHeading({ size, text, className }) {
11948
12033
  return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h3", { className, children: text });
11949
12034
  }
11950
12035
  }
11951
- var getDisplayType = (size) => {
11952
- switch (size) {
12036
+ var getDisplayType = (size2) => {
12037
+ switch (size2) {
11953
12038
  case "xs":
11954
12039
  case "sm":
11955
12040
  return "display-small";
@@ -11984,7 +12069,7 @@ var ImageRenderer_default = ImageRenderer;
11984
12069
  function ImageRendererComponent({
11985
12070
  accessibilityDescription,
11986
12071
  margin,
11987
- size,
12072
+ size: size2,
11988
12073
  url
11989
12074
  }) {
11990
12075
  const [imageSource, setImageSource] = (0, import_react9.useState)("");
@@ -11992,7 +12077,7 @@ function ImageRendererComponent({
11992
12077
  (0, import_react9.useEffect)(() => {
11993
12078
  void getImageSource(httpClient, url).then(setImageSource);
11994
12079
  }, [url, httpClient]);
11995
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: `df-image ${size || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
12080
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: `df-image ${size2 || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
11996
12081
  import_components12.Image,
11997
12082
  {
11998
12083
  className: `img-responsive ${getMargin(margin)}`,
@@ -12054,7 +12139,7 @@ var InstructionsRenderer = {
12054
12139
  var InstructionsRenderer_default = InstructionsRenderer;
12055
12140
 
12056
12141
  // ../renderers/src/IntegerInputRenderer.tsx
12057
- var import_components14 = require("@transferwise/components");
12142
+ var import_components15 = require("@transferwise/components");
12058
12143
 
12059
12144
  // ../renderers/src/utils/input-utils.ts
12060
12145
  var onWheel = (event) => {
@@ -12063,13 +12148,71 @@ var onWheel = (event) => {
12063
12148
  }
12064
12149
  };
12065
12150
 
12066
- // ../renderers/src/IntegerInputRenderer.tsx
12151
+ // ../renderers/src/utils/getIconAvatar.tsx
12152
+ var import_components14 = require("@transferwise/components");
12067
12153
  var import_jsx_runtime30 = require("react/jsx-runtime");
12154
+ var size = 24;
12155
+ function getIconAvatar({ icon, image }) {
12156
+ if (image == null ? void 0 : image.url) {
12157
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
12158
+ "img",
12159
+ {
12160
+ src: image.url,
12161
+ alt: image.accessibilityDescription,
12162
+ width: `${size}px`,
12163
+ height: `${size}px`
12164
+ }
12165
+ );
12166
+ }
12167
+ if (isFlagIcon2(icon)) {
12168
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components14.Avatar, { type: import_components14.AvatarType.ICON, size, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DynamicIcon_default, { name: icon.name }) });
12169
+ }
12170
+ if (isNamedIcon2(icon)) {
12171
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DynamicIcon_default, { name: icon.name });
12172
+ }
12173
+ if (icon && "text" in icon) {
12174
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components14.Avatar, { type: import_components14.AvatarType.ICON, size, children: icon.text });
12175
+ }
12176
+ return null;
12177
+ }
12178
+ var isNamedIcon2 = (icon) => icon ? "name" in icon : false;
12179
+ var isFlagIcon2 = (icon) => isNamedIcon2(icon) && icon.name.startsWith("flag-");
12180
+
12181
+ // ../renderers/src/utils/getInputGroupAddonStart.tsx
12182
+ var getInputGroupAddonStart = ({ icon, image }) => {
12183
+ const content = getIconAvatar({ icon, image });
12184
+ return content ? { content } : void 0;
12185
+ };
12186
+
12187
+ // ../renderers/src/IntegerInputRenderer.tsx
12188
+ var import_jsx_runtime31 = require("react/jsx-runtime");
12068
12189
  var IntegerInputRenderer = {
12069
12190
  canRenderType: "input-integer",
12070
12191
  render: (props) => {
12071
- const _a = props, { id, label, description, help, type, validationState, value, onChange } = _a, rest = __objRest(_a, ["id", "label", "description", "help", "type", "validationState", "value", "onChange"]);
12072
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
12192
+ const _a = props, {
12193
+ id,
12194
+ label,
12195
+ description,
12196
+ help,
12197
+ icon,
12198
+ image,
12199
+ type,
12200
+ validationState,
12201
+ value,
12202
+ onChange
12203
+ } = _a, rest = __objRest(_a, [
12204
+ "id",
12205
+ "label",
12206
+ "description",
12207
+ "help",
12208
+ "icon",
12209
+ "image",
12210
+ "type",
12211
+ "validationState",
12212
+ "value",
12213
+ "onChange"
12214
+ ]);
12215
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
12073
12216
  FieldInput_default,
12074
12217
  {
12075
12218
  id,
@@ -12077,8 +12220,8 @@ var IntegerInputRenderer = {
12077
12220
  description,
12078
12221
  validation: validationState,
12079
12222
  help,
12080
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
12081
- import_components14.Input,
12223
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components15.InputGroup, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
12224
+ import_components15.Input,
12082
12225
  __spreadValues({
12083
12226
  id,
12084
12227
  name: id,
@@ -12092,7 +12235,7 @@ var IntegerInputRenderer = {
12092
12235
  },
12093
12236
  onWheel
12094
12237
  }, rest)
12095
- )
12238
+ ) })
12096
12239
  }
12097
12240
  );
12098
12241
  }
@@ -12100,14 +12243,14 @@ var IntegerInputRenderer = {
12100
12243
  var IntegerInputRenderer_default = IntegerInputRenderer;
12101
12244
 
12102
12245
  // ../renderers/src/LoadingIndicatorRenderer.tsx
12103
- var import_components15 = require("@transferwise/components");
12104
- var import_jsx_runtime31 = require("react/jsx-runtime");
12246
+ var import_components16 = require("@transferwise/components");
12247
+ var import_jsx_runtime32 = require("react/jsx-runtime");
12105
12248
  var LoadingIndicatorRenderer = {
12106
12249
  canRenderType: "loading-indicator",
12107
- render: ({ margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
12108
- import_components15.Loader,
12250
+ render: ({ margin, size: size2 }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
12251
+ import_components16.Loader,
12109
12252
  {
12110
- size,
12253
+ size: size2,
12111
12254
  classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin(margin)}` },
12112
12255
  "data-testid": "loading-indicator"
12113
12256
  }
@@ -12116,30 +12259,30 @@ var LoadingIndicatorRenderer = {
12116
12259
  var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
12117
12260
 
12118
12261
  // ../renderers/src/MarkdownRenderer.tsx
12119
- var import_components16 = require("@transferwise/components");
12120
- var import_jsx_runtime32 = require("react/jsx-runtime");
12262
+ var import_components17 = require("@transferwise/components");
12263
+ var import_jsx_runtime33 = require("react/jsx-runtime");
12121
12264
  var MarkdownRenderer = {
12122
12265
  canRenderType: "markdown",
12123
- render: ({ content, align, margin }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_components16.Markdown, { config: { link: { target: "_blank" } }, children: content }) })
12266
+ render: ({ content, align, margin }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components17.Markdown, { config: { link: { target: "_blank" } }, children: content }) })
12124
12267
  };
12125
12268
  var MarkdownRenderer_default = MarkdownRenderer;
12126
12269
 
12127
12270
  // ../renderers/src/ModalRenderer.tsx
12128
- var import_components17 = require("@transferwise/components");
12271
+ var import_components18 = require("@transferwise/components");
12129
12272
  var import_react10 = require("react");
12130
- var import_jsx_runtime33 = require("react/jsx-runtime");
12273
+ var import_jsx_runtime34 = require("react/jsx-runtime");
12131
12274
  var ModalRenderer = {
12132
12275
  canRenderType: "modal",
12133
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DFModal, __spreadValues({}, props))
12276
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DFModal, __spreadValues({}, props))
12134
12277
  };
12135
12278
  var ModalRenderer_default = ModalRenderer;
12136
12279
  function DFModal({ content, margin, trigger }) {
12137
12280
  const [visible, setVisible] = (0, import_react10.useState)(false);
12138
12281
  const { components, title } = content;
12139
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: getMargin(margin), children: [
12140
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components17.Button, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
12141
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
12142
- import_components17.Modal,
12282
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: getMargin(margin), children: [
12283
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components18.Button, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
12284
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
12285
+ import_components18.Modal,
12143
12286
  {
12144
12287
  scroll: "content",
12145
12288
  open: visible,
@@ -12153,20 +12296,20 @@ function DFModal({ content, margin, trigger }) {
12153
12296
  }
12154
12297
 
12155
12298
  // ../renderers/src/MultiSelectInputRenderer.tsx
12156
- var import_components19 = require("@transferwise/components");
12299
+ var import_components20 = require("@transferwise/components");
12157
12300
 
12158
12301
  // ../renderers/src/SelectInputRenderer/OptionMedia.tsx
12159
- var import_components18 = require("@transferwise/components");
12160
- var import_jsx_runtime34 = require("react/jsx-runtime");
12302
+ var import_components19 = require("@transferwise/components");
12303
+ var import_jsx_runtime35 = require("react/jsx-runtime");
12161
12304
  function OptionMedia({ icon, image }) {
12162
12305
  if (image == null ? void 0 : image.url) {
12163
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("img", { src: image.url, alt: image.accessibilityDescription || "", width: "64px" });
12306
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("img", { src: image.url, alt: image.accessibilityDescription || "", width: "64px" });
12164
12307
  }
12165
12308
  if (icon && "name" in icon) {
12166
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components18.Avatar, { type: import_components18.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DynamicIcon_default, { name: icon.name }) });
12309
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components19.Avatar, { type: import_components19.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DynamicIcon_default, { name: icon.name }) });
12167
12310
  }
12168
12311
  if (icon && "text" in icon) {
12169
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components18.Avatar, { type: import_components18.AvatarType.INITIALS, children: icon.text });
12312
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components19.Avatar, { type: import_components19.AvatarType.INITIALS, children: icon.text });
12170
12313
  }
12171
12314
  return null;
12172
12315
  }
@@ -12186,10 +12329,10 @@ var multi_select_messages_default = (0, import_react_intl10.defineMessages)({
12186
12329
 
12187
12330
  // ../renderers/src/MultiSelectInputRenderer.tsx
12188
12331
  var import_react11 = require("react");
12189
- var import_jsx_runtime35 = require("react/jsx-runtime");
12332
+ var import_jsx_runtime36 = require("react/jsx-runtime");
12190
12333
  var MultiSelectInputRenderer = {
12191
12334
  canRenderType: "input-multi-select",
12192
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(MultiSelectInputRendererComponent, __spreadValues({}, props))
12335
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(MultiSelectInputRendererComponent, __spreadValues({}, props))
12193
12336
  };
12194
12337
  function MultiSelectInputRendererComponent(props) {
12195
12338
  const { formatMessage } = (0, import_react_intl11.useIntl)();
@@ -12231,12 +12374,12 @@ function MultiSelectInputRendererComponent(props) {
12231
12374
  const contentProps = {
12232
12375
  title: option.title,
12233
12376
  description: option.description,
12234
- icon: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(OptionMedia, { icon: option.icon, image: option.image })
12377
+ icon: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(OptionMedia, { icon: option.icon, image: option.image })
12235
12378
  };
12236
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components19.SelectInputOptionContent, __spreadValues({}, contentProps));
12379
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components20.SelectInputOptionContent, __spreadValues({}, contentProps));
12237
12380
  };
12238
12381
  const extraProps = { autoComplete };
12239
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
12382
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12240
12383
  FieldInput_default,
12241
12384
  {
12242
12385
  id,
@@ -12244,8 +12387,8 @@ function MultiSelectInputRendererComponent(props) {
12244
12387
  help,
12245
12388
  description,
12246
12389
  validation: validationState,
12247
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
12248
- import_components19.SelectInput,
12390
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12391
+ import_components20.SelectInput,
12249
12392
  __spreadValues({
12250
12393
  id,
12251
12394
  items: options.map((option, index) => {
@@ -12283,12 +12426,12 @@ function MultiSelectInputRendererComponent(props) {
12283
12426
  var MultiSelectInputRenderer_default = MultiSelectInputRenderer;
12284
12427
 
12285
12428
  // ../renderers/src/MultiUploadInputRenderer.tsx
12286
- var import_components21 = require("@transferwise/components");
12429
+ var import_components22 = require("@transferwise/components");
12287
12430
 
12288
12431
  // ../renderers/src/components/UploadFieldInput.tsx
12289
- var import_components20 = require("@transferwise/components");
12432
+ var import_components21 = require("@transferwise/components");
12290
12433
  var import_classnames3 = __toESM(require_classnames());
12291
- var import_jsx_runtime36 = require("react/jsx-runtime");
12434
+ var import_jsx_runtime37 = require("react/jsx-runtime");
12292
12435
  function UploadFieldInput({
12293
12436
  id,
12294
12437
  children,
@@ -12297,18 +12440,18 @@ function UploadFieldInput({
12297
12440
  help,
12298
12441
  validation
12299
12442
  }) {
12300
- const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(LabelContentWithHelp, { text: label, help }) : label;
12443
+ const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(LabelContentWithHelp, { text: label, help }) : label;
12301
12444
  const descriptionId = description ? `${id}-description` : void 0;
12302
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
12445
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
12303
12446
  "div",
12304
12447
  {
12305
12448
  className: (0, import_classnames3.default)("form-group d-block", {
12306
12449
  "has-error": (validation == null ? void 0 : validation.status) === "invalid"
12307
12450
  }),
12308
12451
  children: [
12309
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
12452
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
12310
12453
  children,
12311
- (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components20.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
12454
+ (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components21.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
12312
12455
  ]
12313
12456
  }
12314
12457
  );
@@ -12340,7 +12483,7 @@ var getFileType = (base64Url) => {
12340
12483
  var getRandomId = () => Math.random().toString(36).substring(2);
12341
12484
 
12342
12485
  // ../renderers/src/MultiUploadInputRenderer.tsx
12343
- var import_jsx_runtime37 = require("react/jsx-runtime");
12486
+ var import_jsx_runtime38 = require("react/jsx-runtime");
12344
12487
  var MultiUploadInputRenderer = {
12345
12488
  canRenderType: "input-upload-multi",
12346
12489
  render: (props) => {
@@ -12367,7 +12510,7 @@ var MultiUploadInputRenderer = {
12367
12510
  };
12368
12511
  const onDeleteFile = async (fileId) => onDelete(String(fileId));
12369
12512
  const descriptionId = description ? `${id}-description` : void 0;
12370
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
12513
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
12371
12514
  UploadFieldInput_default,
12372
12515
  {
12373
12516
  id,
@@ -12375,8 +12518,8 @@ var MultiUploadInputRenderer = {
12375
12518
  description,
12376
12519
  validation: validationState,
12377
12520
  help,
12378
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
12379
- import_components21.UploadInput,
12521
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
12522
+ import_components22.UploadInput,
12380
12523
  {
12381
12524
  id,
12382
12525
  "aria-describedby": descriptionId,
@@ -12398,13 +12541,35 @@ var MultiUploadInputRenderer = {
12398
12541
  var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
12399
12542
 
12400
12543
  // ../renderers/src/NumberInputRenderer.tsx
12401
- var import_components22 = require("@transferwise/components");
12402
- var import_jsx_runtime38 = require("react/jsx-runtime");
12544
+ var import_components23 = require("@transferwise/components");
12545
+ var import_jsx_runtime39 = require("react/jsx-runtime");
12403
12546
  var NumberInputRenderer = {
12404
12547
  canRenderType: "input-number",
12405
12548
  render: (props) => {
12406
- const _a = props, { id, label, description, help, type, validationState, value, onChange } = _a, rest = __objRest(_a, ["id", "label", "description", "help", "type", "validationState", "value", "onChange"]);
12407
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
12549
+ const _a = props, {
12550
+ id,
12551
+ label,
12552
+ description,
12553
+ help,
12554
+ icon,
12555
+ image,
12556
+ type,
12557
+ validationState,
12558
+ value,
12559
+ onChange
12560
+ } = _a, rest = __objRest(_a, [
12561
+ "id",
12562
+ "label",
12563
+ "description",
12564
+ "help",
12565
+ "icon",
12566
+ "image",
12567
+ "type",
12568
+ "validationState",
12569
+ "value",
12570
+ "onChange"
12571
+ ]);
12572
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
12408
12573
  FieldInput_default,
12409
12574
  {
12410
12575
  id,
@@ -12412,8 +12577,8 @@ var NumberInputRenderer = {
12412
12577
  description,
12413
12578
  validation: validationState,
12414
12579
  help,
12415
- children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
12416
- import_components22.Input,
12580
+ children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components23.InputGroup, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
12581
+ import_components23.Input,
12417
12582
  __spreadValues({
12418
12583
  id,
12419
12584
  name: id,
@@ -12425,7 +12590,7 @@ var NumberInputRenderer = {
12425
12590
  },
12426
12591
  onWheel
12427
12592
  }, rest)
12428
- )
12593
+ ) })
12429
12594
  }
12430
12595
  );
12431
12596
  }
@@ -12436,16 +12601,16 @@ var NumberInputRenderer_default = NumberInputRenderer;
12436
12601
  var import_react_intl13 = require("react-intl");
12437
12602
 
12438
12603
  // ../renderers/src/hooks/useSnackBarIfAvailable.ts
12439
- var import_components23 = require("@transferwise/components");
12604
+ var import_components24 = require("@transferwise/components");
12440
12605
  var import_react12 = require("react");
12441
12606
  function useSnackBarIfAvailable() {
12442
- const context = (0, import_react12.useContext)(import_components23.SnackbarContext);
12607
+ const context = (0, import_react12.useContext)(import_components24.SnackbarContext);
12443
12608
  return context ? context.createSnackbar : () => {
12444
12609
  };
12445
12610
  }
12446
12611
 
12447
12612
  // ../renderers/src/ParagraphRenderer.tsx
12448
- var import_components24 = require("@transferwise/components");
12613
+ var import_components25 = require("@transferwise/components");
12449
12614
  var import_classnames4 = __toESM(require_classnames());
12450
12615
 
12451
12616
  // ../renderers/src/messages/paragraph.messages.ts
@@ -12464,17 +12629,17 @@ var paragraph_messages_default = (0, import_react_intl12.defineMessages)({
12464
12629
  });
12465
12630
 
12466
12631
  // ../renderers/src/ParagraphRenderer.tsx
12467
- var import_jsx_runtime39 = require("react/jsx-runtime");
12632
+ var import_jsx_runtime40 = require("react/jsx-runtime");
12468
12633
  var ParagraphRenderer = {
12469
12634
  canRenderType: "paragraph",
12470
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Paragraph, __spreadValues({}, props))
12635
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Paragraph, __spreadValues({}, props))
12471
12636
  };
12472
12637
  function Paragraph({ align, control, margin, text }) {
12473
12638
  const className = getTextAlignmentAndMargin({ align, margin });
12474
- return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(StandardParagraph, { className, text });
12639
+ return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(StandardParagraph, { className, text });
12475
12640
  }
12476
12641
  function StandardParagraph({ text, className }) {
12477
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: `np-text-body-large ${className}`, children: text });
12642
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: `np-text-body-large ${className}`, children: text });
12478
12643
  }
12479
12644
  function CopyableParagraph({
12480
12645
  text,
@@ -12488,9 +12653,9 @@ function CopyableParagraph({
12488
12653
  });
12489
12654
  };
12490
12655
  const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
12491
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className, children: [
12492
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
12493
- import_components24.Input,
12656
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className, children: [
12657
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12658
+ import_components25.Input,
12494
12659
  {
12495
12660
  type: "text",
12496
12661
  value: text,
@@ -12498,13 +12663,13 @@ function CopyableParagraph({
12498
12663
  className: (0, import_classnames4.default)("text-ellipsis", inputAlignmentClasses)
12499
12664
  }
12500
12665
  ),
12501
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components24.Button, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
12666
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components25.Button, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
12502
12667
  ] });
12503
12668
  }
12504
12669
  var ParagraphRenderer_default = ParagraphRenderer;
12505
12670
 
12506
12671
  // ../renderers/src/RepeatableRenderer.tsx
12507
- var import_components25 = require("@transferwise/components");
12672
+ var import_components26 = require("@transferwise/components");
12508
12673
  var import_react13 = require("react");
12509
12674
  var import_icons = require("@transferwise/icons");
12510
12675
  var import_react_intl15 = require("react-intl");
@@ -12536,10 +12701,10 @@ var repeatable_messages_default = (0, import_react_intl14.defineMessages)({
12536
12701
 
12537
12702
  // ../renderers/src/RepeatableRenderer.tsx
12538
12703
  var import_classnames5 = __toESM(require_classnames());
12539
- var import_jsx_runtime40 = require("react/jsx-runtime");
12704
+ var import_jsx_runtime41 = require("react/jsx-runtime");
12540
12705
  var RepeatableRenderer = {
12541
12706
  canRenderType: "repeatable",
12542
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Repeatable, __spreadValues({}, props))
12707
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Repeatable, __spreadValues({}, props))
12543
12708
  };
12544
12709
  function Repeatable(props) {
12545
12710
  const {
@@ -12578,40 +12743,40 @@ function Repeatable(props) {
12578
12743
  const onCancelEdit = () => {
12579
12744
  setOpenModalType(null);
12580
12745
  };
12581
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
12582
- title && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components25.Header, { title }),
12583
- description && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { children: description }),
12584
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
12746
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
12747
+ title && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components26.Header, { title }),
12748
+ description && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { children: description }),
12749
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
12585
12750
  "div",
12586
12751
  {
12587
12752
  className: (0, import_classnames5.default)("form-group", {
12588
12753
  "has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
12589
12754
  }),
12590
12755
  children: [
12591
- items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
12592
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12593
- import_components25.NavigationOption,
12756
+ items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
12757
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12758
+ import_components26.NavigationOption,
12594
12759
  {
12595
- media: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons.Plus, {}),
12760
+ media: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_icons.Plus, {}),
12596
12761
  title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
12597
12762
  showMediaAtAllSizes: true,
12598
12763
  onClick: () => onAddItem()
12599
12764
  }
12600
12765
  ),
12601
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components25.InlineAlert, { type: "negative", children: validationState.message })
12766
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components26.InlineAlert, { type: "negative", children: validationState.message })
12602
12767
  ]
12603
12768
  }
12604
12769
  ),
12605
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12606
- import_components25.Modal,
12770
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12771
+ import_components26.Modal,
12607
12772
  {
12608
12773
  open: openModalType !== null,
12609
12774
  title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
12610
- body: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
12611
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "m-b-2", children: editableItem }),
12612
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
12613
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components25.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
12614
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components25.Button, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
12775
+ body: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
12776
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "m-b-2", children: editableItem }),
12777
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { children: [
12778
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components26.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
12779
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components26.Button, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
12615
12780
  ] })
12616
12781
  ] }),
12617
12782
  onClose: () => onCancelEdit()
@@ -12623,10 +12788,10 @@ function ItemSummaryOption({
12623
12788
  item,
12624
12789
  onClick
12625
12790
  }) {
12626
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12627
- import_components25.NavigationOption,
12791
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12792
+ import_components26.NavigationOption,
12628
12793
  {
12629
- media: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(NavigationOptionMedia, __spreadValues({}, item)),
12794
+ media: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(NavigationOptionMedia, __spreadValues({}, item)),
12630
12795
  title: item.title,
12631
12796
  content: item.description,
12632
12797
  showMediaAtAllSizes: true,
@@ -12637,7 +12802,7 @@ function ItemSummaryOption({
12637
12802
  var RepeatableRenderer_default = RepeatableRenderer;
12638
12803
 
12639
12804
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
12640
- var import_components27 = require("@transferwise/components");
12805
+ var import_components28 = require("@transferwise/components");
12641
12806
 
12642
12807
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
12643
12808
  var import_react_intl17 = require("react-intl");
@@ -12663,8 +12828,8 @@ var generic_error_messages_default2 = (0, import_react_intl16.defineMessages)({
12663
12828
  });
12664
12829
 
12665
12830
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
12666
- var import_components26 = require("@transferwise/components");
12667
- var import_jsx_runtime41 = require("react/jsx-runtime");
12831
+ var import_components27 = require("@transferwise/components");
12832
+ var import_jsx_runtime42 = require("react/jsx-runtime");
12668
12833
  function ErrorResult({ state }) {
12669
12834
  const intl = (0, import_react_intl17.useIntl)();
12670
12835
  const buttonVisualProps = {
@@ -12672,11 +12837,11 @@ function ErrorResult({ state }) {
12672
12837
  size: "sm",
12673
12838
  style: { marginTop: "-2px", padding: "0", width: "auto", display: "inline" }
12674
12839
  };
12675
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("p", { className: "m-t-2", children: [
12840
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("p", { className: "m-t-2", children: [
12676
12841
  intl.formatMessage(generic_error_messages_default2.genericError),
12677
12842
  "\xA0",
12678
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12679
- import_components26.Button,
12843
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12844
+ import_components27.Button,
12680
12845
  __spreadProps(__spreadValues({}, buttonVisualProps), {
12681
12846
  onClick: () => {
12682
12847
  state.onRetry();
@@ -12702,7 +12867,7 @@ var search_messages_default = (0, import_react_intl18.defineMessages)({
12702
12867
 
12703
12868
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
12704
12869
  var import_react_intl19 = require("react-intl");
12705
- var import_jsx_runtime42 = require("react/jsx-runtime");
12870
+ var import_jsx_runtime43 = require("react/jsx-runtime");
12706
12871
  function BlockSearchRendererComponent({
12707
12872
  id,
12708
12873
  isLoading,
@@ -12715,9 +12880,9 @@ function BlockSearchRendererComponent({
12715
12880
  const [hasSearched, setHasSearched] = (0, import_react14.useState)(false);
12716
12881
  const trackEvent = useTrackEvent();
12717
12882
  const { formatMessage } = (0, import_react_intl19.useIntl)();
12718
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: getMargin(margin), children: [
12719
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12720
- import_components27.Input,
12883
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: getMargin(margin), children: [
12884
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12885
+ import_components28.Input,
12721
12886
  {
12722
12887
  id,
12723
12888
  name: id,
@@ -12733,7 +12898,7 @@ function BlockSearchRendererComponent({
12733
12898
  }
12734
12899
  }
12735
12900
  ) }),
12736
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SearchResultContent, { state, onChange })
12901
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_jsx_runtime43.Fragment, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SearchResultContent, { state, onChange })
12737
12902
  ] });
12738
12903
  }
12739
12904
  function SearchResultContent({
@@ -12742,27 +12907,27 @@ function SearchResultContent({
12742
12907
  }) {
12743
12908
  switch (state.type) {
12744
12909
  case "error":
12745
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ErrorResult, { state });
12910
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ErrorResult, { state });
12746
12911
  case "results":
12747
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SearchResults, { state, onChange });
12912
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SearchResults, { state, onChange });
12748
12913
  case "noResults":
12749
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(EmptySearchResult, { state });
12914
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(EmptySearchResult, { state });
12750
12915
  case "pending":
12751
12916
  default:
12752
12917
  return null;
12753
12918
  }
12754
12919
  }
12755
12920
  function EmptySearchResult({ state }) {
12756
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components27.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
12921
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components28.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
12757
12922
  }
12758
12923
  function SearchResults({
12759
12924
  state
12760
12925
  }) {
12761
12926
  const trackEvent = useTrackEvent();
12762
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components27.NavigationOptionsList, { children: state.results.map((result) => {
12927
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components28.NavigationOptionsList, { children: state.results.map((result) => {
12763
12928
  const { icon, image } = result;
12764
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12765
- import_components27.NavigationOption,
12929
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12930
+ import_components28.NavigationOption,
12766
12931
  {
12767
12932
  title: result.title,
12768
12933
  content: result.description,
@@ -12783,11 +12948,11 @@ function SearchResults({
12783
12948
  var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
12784
12949
 
12785
12950
  // ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
12786
- var import_components28 = require("@transferwise/components");
12951
+ var import_components29 = require("@transferwise/components");
12787
12952
  var import_icons2 = require("@transferwise/icons");
12788
12953
  var import_react15 = require("react");
12789
12954
  var import_react_intl20 = require("react-intl");
12790
- var import_jsx_runtime43 = require("react/jsx-runtime");
12955
+ var import_jsx_runtime44 = require("react/jsx-runtime");
12791
12956
  function InlineSearchRenderer({
12792
12957
  id,
12793
12958
  isLoading,
@@ -12799,18 +12964,18 @@ function InlineSearchRenderer({
12799
12964
  const [hasSearched, setHasSearched] = (0, import_react15.useState)(false);
12800
12965
  const trackEvent = useTrackEvent();
12801
12966
  const intl = (0, import_react_intl20.useIntl)();
12802
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12803
- import_components28.Typeahead,
12967
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12968
+ import_components29.Typeahead,
12804
12969
  {
12805
12970
  id: "typeahead-input-id",
12806
12971
  intl,
12807
12972
  name: "typeahead-input-name",
12808
12973
  size: "md",
12809
12974
  maxHeight: 100,
12810
- footer: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TypeaheadFooter, { state, isLoading }),
12975
+ footer: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TypeaheadFooter, { state, isLoading }),
12811
12976
  multiple: false,
12812
12977
  clearable: false,
12813
- addon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_icons2.Search, { size: 24 }),
12978
+ addon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_icons2.Search, { size: 24 }),
12814
12979
  options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
12815
12980
  minQueryLength: 1,
12816
12981
  onChange: (values) => {
@@ -12847,29 +13012,29 @@ function mapResultToTypeaheadOption(result) {
12847
13012
  function TypeaheadFooter({ state, isLoading }) {
12848
13013
  const { formatMessage } = (0, import_react_intl20.useIntl)();
12849
13014
  if (state.type === "noResults") {
12850
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components28.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
13015
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components29.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
12851
13016
  }
12852
13017
  if (state.type === "error") {
12853
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ErrorResult, { state }) });
13018
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ErrorResult, { state }) });
12854
13019
  }
12855
13020
  if (state.type === "pending" || isLoading) {
12856
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
13021
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
12857
13022
  }
12858
13023
  return null;
12859
13024
  }
12860
13025
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
12861
13026
 
12862
13027
  // ../renderers/src/SearchRenderer/SearchRenderer.tsx
12863
- var import_jsx_runtime44 = require("react/jsx-runtime");
13028
+ var import_jsx_runtime45 = require("react/jsx-runtime");
12864
13029
  var SearchRenderer = {
12865
13030
  canRenderType: "search",
12866
- render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
13031
+ render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
12867
13032
  };
12868
13033
  var SearchRenderer_default = SearchRenderer;
12869
13034
 
12870
13035
  // ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
12871
- var import_components29 = require("@transferwise/components");
12872
- var import_jsx_runtime45 = require("react/jsx-runtime");
13036
+ var import_components30 = require("@transferwise/components");
13037
+ var import_jsx_runtime46 = require("react/jsx-runtime");
12873
13038
  function RadioInputRendererComponent(props) {
12874
13039
  const {
12875
13040
  id,
@@ -12883,8 +13048,8 @@ function RadioInputRendererComponent(props) {
12883
13048
  validationState,
12884
13049
  onSelect
12885
13050
  } = props;
12886
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
12887
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13051
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
13052
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12888
13053
  FieldInput_default,
12889
13054
  {
12890
13055
  id,
@@ -12892,8 +13057,8 @@ function RadioInputRendererComponent(props) {
12892
13057
  help,
12893
13058
  description,
12894
13059
  validation: validationState,
12895
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12896
- import_components29.RadioGroup,
13060
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13061
+ import_components30.RadioGroup,
12897
13062
  {
12898
13063
  name: id,
12899
13064
  radios: options.map((option, index) => ({
@@ -12901,7 +13066,7 @@ function RadioInputRendererComponent(props) {
12901
13066
  value: index,
12902
13067
  secondary: option.description,
12903
13068
  disabled: option.disabled || disabled,
12904
- avatar: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(OptionMedia, { icon: option.icon, image: option.image })
13069
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(OptionMedia, { icon: option.icon, image: option.image })
12905
13070
  })),
12906
13071
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
12907
13072
  onChange: onSelect
@@ -12915,9 +13080,9 @@ function RadioInputRendererComponent(props) {
12915
13080
  }
12916
13081
 
12917
13082
  // ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
12918
- var import_components30 = require("@transferwise/components");
13083
+ var import_components31 = require("@transferwise/components");
12919
13084
  var import_react16 = require("react");
12920
- var import_jsx_runtime46 = require("react/jsx-runtime");
13085
+ var import_jsx_runtime47 = require("react/jsx-runtime");
12921
13086
  function TabInputRendererComponent(props) {
12922
13087
  const {
12923
13088
  id,
@@ -12936,8 +13101,8 @@ function TabInputRendererComponent(props) {
12936
13101
  onSelect(0);
12937
13102
  }
12938
13103
  }, [selectedIndex, onSelect, options.length]);
12939
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
12940
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13104
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
13105
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
12941
13106
  FieldInput_default,
12942
13107
  {
12943
13108
  id,
@@ -12945,8 +13110,8 @@ function TabInputRendererComponent(props) {
12945
13110
  help,
12946
13111
  description,
12947
13112
  validation: validationState,
12948
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12949
- import_components30.Tabs,
13113
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13114
+ import_components31.Tabs,
12950
13115
  {
12951
13116
  name: id,
12952
13117
  selected: selectedIndex != null ? selectedIndex : 0,
@@ -12954,7 +13119,7 @@ function TabInputRendererComponent(props) {
12954
13119
  title: option.title,
12955
13120
  // if we pass null, we get some props-types console errors
12956
13121
  // eslint-disable-next-line react/jsx-no-useless-fragment
12957
- content: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, {}),
13122
+ content: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, {}),
12958
13123
  disabled: option.disabled || disabled
12959
13124
  })),
12960
13125
  onTabSelect: onSelect
@@ -12969,29 +13134,6 @@ var isValidIndex = (index, options) => index !== null && index >= 0 && index < o
12969
13134
 
12970
13135
  // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
12971
13136
  var import_components32 = require("@transferwise/components");
12972
-
12973
- // ../renderers/src/SelectInputRenderer/SelectTriggerMedia.tsx
12974
- var import_components31 = require("@transferwise/components");
12975
- var import_jsx_runtime47 = require("react/jsx-runtime");
12976
- function SelectTriggerMedia({ icon, image }) {
12977
- if (image == null ? void 0 : image.url) {
12978
- return null;
12979
- }
12980
- if (isFlagIcon2(icon)) {
12981
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components31.Avatar, { type: import_components31.AvatarType.ICON, size: 24, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DynamicIcon_default, { name: icon.name }) });
12982
- }
12983
- if (isNamedIcon2(icon)) {
12984
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DynamicIcon_default, { name: icon.name });
12985
- }
12986
- if (icon && "text" in icon) {
12987
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components31.Avatar, { type: import_components31.AvatarType.ICON, size: 24, children: icon.text });
12988
- }
12989
- return null;
12990
- }
12991
- var isNamedIcon2 = (icon) => icon ? "name" in icon : false;
12992
- var isFlagIcon2 = (icon) => isNamedIcon2(icon) && icon.name.startsWith("flag-");
12993
-
12994
- // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
12995
13137
  var import_jsx_runtime48 = require("react/jsx-runtime");
12996
13138
  function SelectInputRendererComponent(props) {
12997
13139
  const {
@@ -13028,7 +13170,7 @@ function SelectInputRendererComponent(props) {
13028
13170
  const contentProps = withinTrigger ? {
13029
13171
  title: option.title,
13030
13172
  note: option.description,
13031
- icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectTriggerMedia, { icon: option.icon, image: option.image })
13173
+ icon: getIconAvatar(option)
13032
13174
  } : {
13033
13175
  title: option.title,
13034
13176
  description: option.description,
@@ -13185,6 +13327,9 @@ var mapStatus = (status) => {
13185
13327
  return status;
13186
13328
  };
13187
13329
 
13330
+ // ../renderers/src/TextInputRenderer.tsx
13331
+ var import_components36 = require("@transferwise/components");
13332
+
13188
13333
  // ../renderers/src/components/VariableTextInput.tsx
13189
13334
  var import_components35 = require("@transferwise/components");
13190
13335
  var import_jsx_runtime52 = require("react/jsx-runtime");
@@ -13266,6 +13411,8 @@ var TextInputRenderer = {
13266
13411
  description,
13267
13412
  help,
13268
13413
  error,
13414
+ icon,
13415
+ image,
13269
13416
  maxLength,
13270
13417
  minLength,
13271
13418
  type,
@@ -13278,6 +13425,8 @@ var TextInputRenderer = {
13278
13425
  "description",
13279
13426
  "help",
13280
13427
  "error",
13428
+ "icon",
13429
+ "image",
13281
13430
  "maxLength",
13282
13431
  "minLength",
13283
13432
  "type",
@@ -13294,7 +13443,7 @@ var TextInputRenderer = {
13294
13443
  description,
13295
13444
  validation: validationState,
13296
13445
  help,
13297
- children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(VariableTextInput_default, { control, inputProps })
13446
+ children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components36.InputGroup, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(VariableTextInput_default, { control, inputProps }) })
13298
13447
  }
13299
13448
  );
13300
13449
  }
@@ -13302,7 +13451,7 @@ var TextInputRenderer = {
13302
13451
  var TextInputRenderer_default = TextInputRenderer;
13303
13452
 
13304
13453
  // ../renderers/src/UploadInputRenderer.tsx
13305
- var import_components36 = require("@transferwise/components");
13454
+ var import_components37 = require("@transferwise/components");
13306
13455
  var import_jsx_runtime54 = require("react/jsx-runtime");
13307
13456
  var UploadInputRenderer = {
13308
13457
  canRenderType: "input-upload",
@@ -13327,7 +13476,7 @@ var UploadInputRenderer = {
13327
13476
  description: void 0,
13328
13477
  validation: validationState,
13329
13478
  children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
13330
- import_components36.UploadInput,
13479
+ import_components37.UploadInput,
13331
13480
  {
13332
13481
  id,
13333
13482
  description,
@@ -13392,7 +13541,7 @@ var LargeUploadRenderer = {
13392
13541
  validation: validationState,
13393
13542
  help,
13394
13543
  children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
13395
- import_components36.Upload,
13544
+ import_components37.Upload,
13396
13545
  __spreadProps(__spreadValues({}, uploadProps), {
13397
13546
  usAccept: getAcceptsString(accepts),
13398
13547
  usDisabled: disabled,
@@ -13407,16 +13556,16 @@ var LargeUploadRenderer = {
13407
13556
  };
13408
13557
 
13409
13558
  // ../renderers/src/ReviewRenderer.tsx
13410
- var import_components37 = require("@transferwise/components");
13559
+ var import_components38 = require("@transferwise/components");
13411
13560
  var import_jsx_runtime55 = require("react/jsx-runtime");
13412
13561
  var ReviewRenderer = {
13413
13562
  canRenderType: "review",
13414
13563
  render: ({ callToAction, control, fields, margin, title }) => {
13415
13564
  const orientation = mapControlToDefinitionListLayout(control);
13416
13565
  return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: getMargin(margin), children: [
13417
- (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components37.Header, { title: title != null ? title : "", action: getReviewAction2(callToAction) }),
13566
+ (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components38.Header, { title: title != null ? title : "", action: getReviewAction2(callToAction) }),
13418
13567
  /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
13419
- import_components37.DefinitionList,
13568
+ import_components38.DefinitionList,
13420
13569
  {
13421
13570
  layout: orientation,
13422
13571
  definitions: fields.map(({ label, value, help }, index) => ({
@@ -13514,7 +13663,7 @@ var external_confirmation_messages_default = (0, import_react_intl21.defineMessa
13514
13663
  });
13515
13664
 
13516
13665
  // ../renderers/src/step/ExternalConfirmationDialog.tsx
13517
- var import_components38 = require("@transferwise/components");
13666
+ var import_components39 = require("@transferwise/components");
13518
13667
  var import_jsx_runtime56 = require("react/jsx-runtime");
13519
13668
  function ExternalConfirmationDialog({
13520
13669
  external,
@@ -13523,10 +13672,10 @@ function ExternalConfirmationDialog({
13523
13672
  const { formatMessage } = (0, import_react_intl22.useIntl)();
13524
13673
  return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
13525
13674
  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("h2", { className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.title) }),
13526
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components38.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(external.url) }) }),
13675
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components39.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(external.url) }) }),
13527
13676
  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
13528
13677
  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
13529
- import_components38.Button,
13678
+ import_components39.Button,
13530
13679
  {
13531
13680
  block: true,
13532
13681
  className: "m-b-2",
@@ -13539,7 +13688,7 @@ function ExternalConfirmationDialog({
13539
13688
  children: formatMessage(external_confirmation_messages_default.open)
13540
13689
  }
13541
13690
  ),
13542
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components38.Button, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onClose, children: formatMessage(external_confirmation_messages_default.cancel) })
13691
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components39.Button, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onClose, children: formatMessage(external_confirmation_messages_default.cancel) })
13543
13692
  ] }) })
13544
13693
  ] }) });
13545
13694
  }
@@ -13568,7 +13717,7 @@ function useExternal(url) {
13568
13717
  }
13569
13718
 
13570
13719
  // ../renderers/src/step/BackButton.tsx
13571
- var import_components39 = require("@transferwise/components");
13720
+ var import_components40 = require("@transferwise/components");
13572
13721
  var import_icons3 = require("@transferwise/icons");
13573
13722
  var import_jsx_runtime57 = require("react/jsx-runtime");
13574
13723
  function BackButton({ title, onClick }) {
@@ -13582,7 +13731,7 @@ function BackButton({ title, onClick }) {
13582
13731
  onClick,
13583
13732
  children: [
13584
13733
  /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "sr-only", children: title }),
13585
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components39.Avatar, { type: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_icons3.ArrowLeft, { size: "24" }) })
13734
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components40.Avatar, { type: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_icons3.ArrowLeft, { size: "24" }) })
13586
13735
  ]
13587
13736
  }
13588
13737
  ) });
@@ -13590,7 +13739,7 @@ function BackButton({ title, onClick }) {
13590
13739
  var BackButton_default = BackButton;
13591
13740
 
13592
13741
  // ../renderers/src/step/StepRenderer.tsx
13593
- var import_components40 = require("@transferwise/components");
13742
+ var import_components41 = require("@transferwise/components");
13594
13743
  var import_jsx_runtime58 = require("react/jsx-runtime");
13595
13744
  var StepRenderer = {
13596
13745
  canRenderType: "step",
@@ -13606,10 +13755,10 @@ function StepRendererComponent(props) {
13606
13755
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(StepRendererContextProvider, { value, children: [
13607
13756
  back ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(BackButton_default, __spreadValues({}, back)) : null,
13608
13757
  title || description ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "m-b-4", children: [
13609
- title ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components40.Title, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
13758
+ title ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components41.Title, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
13610
13759
  description ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-xs-center np-text-body-large", children: description }) : void 0
13611
13760
  ] }) : void 0,
13612
- error ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components40.Alert, { type: "negative", className: "m-b-2", message: error }) : void 0,
13761
+ error ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components41.Alert, { type: "negative", className: "m-b-2", message: error }) : void 0,
13613
13762
  children
13614
13763
  ] });
13615
13764
  }
@@ -13862,10 +14011,10 @@ function convertDecisionStepToDynamicLayout(step) {
13862
14011
  }
13863
14012
  return layout;
13864
14013
  }
13865
- function dynamicBox(components, size) {
14014
+ function dynamicBox(components, size2) {
13866
14015
  return {
13867
14016
  type: "box",
13868
- width: size || "md",
14017
+ width: size2 || "md",
13869
14018
  components
13870
14019
  };
13871
14020
  }
@@ -15060,10 +15209,10 @@ var import_classnames15 = __toESM(require_classnames());
15060
15209
  var import_react53 = require("react");
15061
15210
 
15062
15211
  // src/legacy/layout/alert/DynamicAlert.tsx
15063
- var import_components42 = require("@transferwise/components");
15212
+ var import_components43 = require("@transferwise/components");
15064
15213
 
15065
15214
  // src/legacy/layout/utils/getNavigationOptionMedia.tsx
15066
- var import_components41 = require("@transferwise/components");
15215
+ var import_components42 = require("@transferwise/components");
15067
15216
 
15068
15217
  // src/legacy/layout/icon/FlagIcon.tsx
15069
15218
  var import_jsx_runtime67 = require("react/jsx-runtime");
@@ -15114,10 +15263,10 @@ var DynamicIcon_default2 = DynamicIcon2;
15114
15263
  var import_jsx_runtime70 = require("react/jsx-runtime");
15115
15264
  var getNavigationOptionMedia = ({ icon, image }) => {
15116
15265
  if (icon == null ? void 0 : icon.name) {
15117
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components41.Avatar, { type: import_components41.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(DynamicIcon_default2, { type: icon.name }) });
15266
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components42.Avatar, { type: import_components42.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(DynamicIcon_default2, { type: icon.name }) });
15118
15267
  }
15119
15268
  if (icon == null ? void 0 : icon.text) {
15120
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components41.Avatar, { type: import_components41.AvatarType.INITIALS, children: icon.text });
15269
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components42.Avatar, { type: import_components42.AvatarType.INITIALS, children: icon.text });
15121
15270
  }
15122
15271
  if (image == null ? void 0 : image.url) {
15123
15272
  const { url, text } = image;
@@ -15127,8 +15276,8 @@ var getNavigationOptionMedia = ({ icon, image }) => {
15127
15276
  };
15128
15277
 
15129
15278
  // src/legacy/layout/utils/index.ts
15130
- var getMargin2 = (size) => {
15131
- switch (size) {
15279
+ var getMargin2 = (size2) => {
15280
+ switch (size2) {
15132
15281
  case "xs":
15133
15282
  return "m-b-0";
15134
15283
  case "sm":
@@ -15161,7 +15310,7 @@ var import_jsx_runtime71 = require("react/jsx-runtime");
15161
15310
  var DynamicAlert = ({ component: alert, onAction }) => {
15162
15311
  const { context, markdown, margin } = alert;
15163
15312
  return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
15164
- import_components42.Alert,
15313
+ import_components43.Alert,
15165
15314
  {
15166
15315
  type: mapContextToAlertType(legacy_mapContext(context)),
15167
15316
  className: getMargin2(margin),
@@ -15178,6 +15327,29 @@ var getAlertAction = (component, onAction) => {
15178
15327
  return void 0;
15179
15328
  }
15180
15329
  const { title, accessibilityDescription, behavior } = component.callToAction;
15330
+ if ("type" in behavior) {
15331
+ switch (behavior.type) {
15332
+ case "action": {
15333
+ const { action: action2 } = behavior;
15334
+ return {
15335
+ text: title,
15336
+ "aria-label": accessibilityDescription,
15337
+ onClick: onAction && action2 ? () => {
15338
+ onAction(action2);
15339
+ } : () => {
15340
+ }
15341
+ };
15342
+ }
15343
+ case "link": {
15344
+ return {
15345
+ text: title,
15346
+ "aria-label": accessibilityDescription,
15347
+ href: behavior.url,
15348
+ target: "_blank"
15349
+ };
15350
+ }
15351
+ }
15352
+ }
15181
15353
  const { action, link } = behavior;
15182
15354
  if (link) {
15183
15355
  return {
@@ -15273,7 +15445,7 @@ var getBoxWidthClasses = (component) => {
15273
15445
  var DynamicBox_default = DynamicBox;
15274
15446
 
15275
15447
  // src/legacy/layout/button/DynamicButton.tsx
15276
- var import_components43 = require("@transferwise/components");
15448
+ var import_components44 = require("@transferwise/components");
15277
15449
 
15278
15450
  // src/legacy/layout/button/utils.ts
15279
15451
  var priorities = {
@@ -15310,8 +15482,8 @@ var getButtonType = (context, action) => {
15310
15482
  var getButtonTypeFromContext = (context) => {
15311
15483
  return context ? contextToType[context] : "accent";
15312
15484
  };
15313
- var getButtonSize = (size) => {
15314
- switch (size) {
15485
+ var getButtonSize = (size2) => {
15486
+ switch (size2) {
15315
15487
  case "xs":
15316
15488
  case "sm":
15317
15489
  return "sm";
@@ -15345,7 +15517,7 @@ function DynamicButtonWithoutBehavior(props) {
15345
15517
  }
15346
15518
  };
15347
15519
  return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
15348
- import_components43.Button,
15520
+ import_components44.Button,
15349
15521
  {
15350
15522
  size: getButtonSize(component.size),
15351
15523
  type: priority === "tertiary" ? void 0 : type,
@@ -15360,7 +15532,7 @@ function DynamicButtonWithoutBehavior(props) {
15360
15532
  }
15361
15533
  function DynamicButtonWithBehavior(props) {
15362
15534
  var _a, _b;
15363
- const { component } = props;
15535
+ const { component, onAction } = props;
15364
15536
  const type = getButtonTypeFromContext(component.context);
15365
15537
  const priority = (_a = component.control) != null ? _a : "secondary";
15366
15538
  const { loading } = useDynamicFlow();
@@ -15369,15 +15541,35 @@ function DynamicButtonWithBehavior(props) {
15369
15541
  const title = (_b = component.title) != null ? _b : "";
15370
15542
  const onClick = () => {
15371
15543
  const { behavior } = component;
15372
- if (behavior == null ? void 0 : behavior.action) {
15373
- props.onAction(behavior.action);
15544
+ if (!behavior) {
15545
+ return;
15374
15546
  }
15375
- if (behavior == null ? void 0 : behavior.link) {
15376
- window.open(behavior.link.url, "_blank");
15547
+ if ("type" in behavior) {
15548
+ switch (behavior.type) {
15549
+ case "action": {
15550
+ if (behavior.action) {
15551
+ onAction(behavior.action);
15552
+ }
15553
+ break;
15554
+ }
15555
+ case "link": {
15556
+ if (behavior.url) {
15557
+ window.open(behavior.url, "_blank");
15558
+ }
15559
+ break;
15560
+ }
15561
+ }
15562
+ } else {
15563
+ if (behavior == null ? void 0 : behavior.action) {
15564
+ onAction(behavior.action);
15565
+ }
15566
+ if (behavior == null ? void 0 : behavior.link) {
15567
+ window.open(behavior.link.url, "_blank");
15568
+ }
15377
15569
  }
15378
15570
  };
15379
15571
  return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
15380
- import_components43.Button,
15572
+ import_components44.Button,
15381
15573
  {
15382
15574
  size: getButtonSize(component.size),
15383
15575
  type: priority === "tertiary" ? void 0 : type,
@@ -15445,15 +15637,15 @@ var getWidth = (bias) => {
15445
15637
  var DynamicColumns_default = DynamicColumns;
15446
15638
 
15447
15639
  // src/legacy/layout/decision/DynamicDecision.tsx
15448
- var import_components44 = require("@transferwise/components");
15640
+ var import_components45 = require("@transferwise/components");
15449
15641
  var import_jsx_runtime75 = require("react/jsx-runtime");
15450
15642
  function DynamicDecision({ component, onAction }) {
15451
15643
  const { loading } = useDynamicFlow();
15452
15644
  const { margin, options, title } = component;
15453
15645
  return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: getMargin2(margin), children: [
15454
- title && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components44.Header, { as: "h2", title }),
15455
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components44.NavigationOptionsList, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
15456
- import_components44.NavigationOption,
15646
+ title && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components45.Header, { as: "h2", title }),
15647
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components45.NavigationOptionsList, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
15648
+ import_components45.NavigationOption,
15457
15649
  {
15458
15650
  title: option.title,
15459
15651
  content: option.description,
@@ -15479,7 +15671,7 @@ var DynamicDivider = ({ component }) => {
15479
15671
  var DynamicDivider_default = DynamicDivider;
15480
15672
 
15481
15673
  // src/legacy/layout/external/DynamicExternal.tsx
15482
- var import_components45 = require("@transferwise/components");
15674
+ var import_components46 = require("@transferwise/components");
15483
15675
  var import_react32 = require("react");
15484
15676
  var import_react_intl24 = require("react-intl");
15485
15677
 
@@ -15512,9 +15704,9 @@ var DynamicExternal = ({ component, onAction }) => {
15512
15704
  }, [polling, responseHandlers]);
15513
15705
  useExternalStepPolling(pollingConfiguration, onAction);
15514
15706
  return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
15515
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components45.Loader, { size: import_components45.Size.LARGE, classNames: { "tw-loader": "tw-loader m-x-auto" } }),
15707
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components46.Loader, { size: import_components46.Size.LARGE, classNames: { "tw-loader": "tw-loader m-x-auto" } }),
15516
15708
  /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("br", {}),
15517
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components45.Button, { priority: "tertiary", block: true, onClick: openExternalUrl, children: retryTitle || intl.formatMessage(DynamicExternal_messages_default.retryTitle) })
15709
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components46.Button, { priority: "tertiary", block: true, onClick: openExternalUrl, children: retryTitle || intl.formatMessage(DynamicExternal_messages_default.retryTitle) })
15518
15710
  ] });
15519
15711
  };
15520
15712
  var DynamicExternal_default = DynamicExternal;
@@ -15523,7 +15715,7 @@ var DynamicExternal_default = DynamicExternal;
15523
15715
  var import_react46 = require("react");
15524
15716
 
15525
15717
  // src/legacy/jsonSchemaForm/allOfSchema/AllOfSchema.tsx
15526
- var import_components46 = require("@transferwise/components");
15718
+ var import_components47 = require("@transferwise/components");
15527
15719
  var import_classnames6 = __toESM(require_classnames());
15528
15720
  var import_react33 = require("react");
15529
15721
  var import_jsx_runtime78 = require("react/jsx-runtime");
@@ -15544,7 +15736,7 @@ function AllOfSchema(props) {
15544
15736
  };
15545
15737
  const [models, setModels] = (0, import_react33.useState)(splitModel(props.model, props.schema.allOf));
15546
15738
  return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
15547
- props.schema.title && !hideTitle && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_components46.Header, { title: props.schema.title }),
15739
+ props.schema.title && !hideTitle && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_components47.Header, { title: props.schema.title }),
15548
15740
  props.schema.description && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { children: props.schema.description }),
15549
15741
  /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "row", children: props.schema.allOf.map((schema, index) => (
15550
15742
  // eslint-disable-next-line react/no-array-index-key
@@ -15569,12 +15761,12 @@ function AllOfSchema(props) {
15569
15761
  var AllOfSchema_default = AllOfSchema;
15570
15762
 
15571
15763
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.tsx
15572
- var import_components48 = require("@transferwise/components");
15764
+ var import_components49 = require("@transferwise/components");
15573
15765
  var import_classnames7 = __toESM(require_classnames());
15574
15766
  var import_react34 = require("react");
15575
15767
 
15576
15768
  // src/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.tsx
15577
- var import_components47 = require("@transferwise/components");
15769
+ var import_components48 = require("@transferwise/components");
15578
15770
  var import_formatting2 = require("@transferwise/formatting");
15579
15771
  var import_react_intl25 = require("react-intl");
15580
15772
  var import_jsx_runtime79 = require("react/jsx-runtime");
@@ -15587,9 +15779,9 @@ function ControlFeedback(props) {
15587
15779
  const isDescriptionVisible = props.schema.type !== "boolean" && props.schema.description && !isErrorVisible && !isValidationVisible;
15588
15780
  const hasInfoMessage = Boolean(props.infoMessage);
15589
15781
  return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { id: props.id, children: [
15590
- isErrorVisible ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components47.InlineAlert, { type: "error", children: errors }) : null,
15591
- isValidationVisible ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components47.InlineAlert, { type: "error", children: validations.map((validation) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { children: mergedValidationMessages[validation] }, validation)) }) : null,
15592
- (isDescriptionVisible || hasInfoMessage) && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_components47.InlineAlert, { type: "info", children: [
15782
+ isErrorVisible ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components48.InlineAlert, { type: "error", children: errors }) : null,
15783
+ isValidationVisible ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components48.InlineAlert, { type: "error", children: validations.map((validation) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { children: mergedValidationMessages[validation] }, validation)) }) : null,
15784
+ (isDescriptionVisible || hasInfoMessage) && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_components48.InlineAlert, { type: "info", children: [
15593
15785
  isDescriptionVisible && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { children: props.schema.description }),
15594
15786
  hasInfoMessage && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { children: props.infoMessage })
15595
15787
  ] })
@@ -15774,7 +15966,7 @@ function MultipleFileUploadSchema(props) {
15774
15966
  const feedbackId = `${uid}-feedback`;
15775
15967
  return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: (0, import_classnames7.default)("form-group", { "has-error": showError }), children: [
15776
15968
  /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("label", { className: "d-block control-label", htmlFor: uid, children: props.schema.title }),
15777
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { "aria-describedby": feedbackId, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components48.UploadInput, __spreadValues({}, uploadInputProps)) }),
15969
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { "aria-describedby": feedbackId, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components49.UploadInput, __spreadValues({}, uploadInputProps)) }),
15778
15970
  /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
15779
15971
  ControlFeedback_default,
15780
15972
  {
@@ -15797,7 +15989,7 @@ function getSuccessfullyProcessedFiles(allFiles) {
15797
15989
  return allFiles.filter((file) => !file.error && file.status === "succeeded");
15798
15990
  }
15799
15991
  function convertFileIdsToComponentFileObjects(fileIds) {
15800
- return fileIds.map((id) => isValidId(id) ? { id, status: import_components48.Status.SUCCEEDED } : null).filter((item) => item !== null);
15992
+ return fileIds.map((id) => isValidId(id) ? { id, status: import_components49.Status.SUCCEEDED } : null).filter((item) => item !== null);
15801
15993
  }
15802
15994
  function isValidId(id) {
15803
15995
  return isNumber3(id) || isString2(id);
@@ -15808,13 +16000,13 @@ function getValidationMessages(schema, required, defaultErrorMessages) {
15808
16000
  }
15809
16001
 
15810
16002
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multiSelectSchema/MultiSelectSchema.tsx
15811
- var import_components50 = require("@transferwise/components");
16003
+ var import_components51 = require("@transferwise/components");
15812
16004
  var import_classnames8 = __toESM(require_classnames());
15813
16005
  var import_react35 = require("react");
15814
16006
  var import_react_intl29 = require("react-intl");
15815
16007
 
15816
16008
  // src/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.tsx
15817
- var import_components49 = require("@transferwise/components");
16009
+ var import_components50 = require("@transferwise/components");
15818
16010
  var import_jsx_runtime81 = require("react/jsx-runtime");
15819
16011
  var mapConstSchemaToOption = (schema, controlType) => {
15820
16012
  switch (controlType) {
@@ -15866,17 +16058,17 @@ var getIconPropertyForSelectOption = (icon) => {
15866
16058
  var getAvatarPropertyForRadioOption = ({ image, icon }) => {
15867
16059
  if (image == null ? void 0 : image.url) {
15868
16060
  return {
15869
- avatar: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components49.Avatar, { type: import_components49.AvatarType.THUMBNAIL, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("img", { src: image.url, alt: "" }) })
16061
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components50.Avatar, { type: import_components50.AvatarType.THUMBNAIL, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("img", { src: image.url, alt: "" }) })
15870
16062
  };
15871
16063
  }
15872
16064
  if ((icon == null ? void 0 : icon.name) && isValidIconName(icon.name)) {
15873
16065
  return {
15874
- avatar: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components49.Avatar, { type: import_components49.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(DynamicIcon_default2, { type: icon.name }) })
16066
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components50.Avatar, { type: import_components50.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(DynamicIcon_default2, { type: icon.name }) })
15875
16067
  };
15876
16068
  }
15877
16069
  if (icon == null ? void 0 : icon.text) {
15878
16070
  return {
15879
- avatar: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components49.Avatar, { type: import_components49.AvatarType.INITIALS, children: icon.text })
16071
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components50.Avatar, { type: import_components50.AvatarType.INITIALS, children: icon.text })
15880
16072
  };
15881
16073
  }
15882
16074
  return null;
@@ -15970,7 +16162,7 @@ function MultiSelectSchema({
15970
16162
  return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: (0, import_classnames8.default)("d-flex flex-column", formGroupClasses), children: [
15971
16163
  schema.title ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("label", { htmlFor: id, children: schema.title }) : void 0,
15972
16164
  /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
15973
- import_components50.SelectInput,
16165
+ import_components51.SelectInput,
15974
16166
  {
15975
16167
  id,
15976
16168
  multiple: true,
@@ -15995,7 +16187,7 @@ function MultiSelectSchema({
15995
16187
  if (withinTrigger) {
15996
16188
  return selected && index === selected[0] ? getFormattedMessage() : void 0;
15997
16189
  }
15998
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components50.SelectInputOptionContent, { title: label, note: note != null ? note : secondary, icon });
16190
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components51.SelectInputOptionContent, { title: label, note: note != null ? note : secondary, icon });
15999
16191
  },
16000
16192
  onChange: broadcastModelChange
16001
16193
  }
@@ -16025,17 +16217,17 @@ var getInitialModelIndices2 = (model, options) => {
16025
16217
  };
16026
16218
 
16027
16219
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.tsx
16028
- var import_components52 = require("@transferwise/components");
16220
+ var import_components53 = require("@transferwise/components");
16029
16221
  var import_icons4 = require("@transferwise/icons");
16030
16222
  var import_react37 = require("react");
16031
16223
  var import_react_intl32 = require("react-intl");
16032
16224
 
16033
16225
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.tsx
16034
- var import_components51 = require("@transferwise/components");
16226
+ var import_components52 = require("@transferwise/components");
16035
16227
  var import_jsx_runtime83 = require("react/jsx-runtime");
16036
16228
  function ItemSummaryOption2({ item, onClick }) {
16037
16229
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
16038
- import_components51.NavigationOption,
16230
+ import_components52.NavigationOption,
16039
16231
  {
16040
16232
  media: getNavigationOptionMedia(item),
16041
16233
  title: item.title,
@@ -16406,7 +16598,7 @@ function RepeatableSchema({
16406
16598
  "has-error": (_a = errors && !isEmpty(errors)) != null ? _a : submitted && validations.length
16407
16599
  };
16408
16600
  return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { id, className: (0, import_classnames9.default)(formGroupClasses), children: [
16409
- schema.title && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_components52.Header, { title: schema.title }),
16601
+ schema.title && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_components53.Header, { title: schema.title }),
16410
16602
  itemSummaries == null ? void 0 : itemSummaries.map((itemSummary) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
16411
16603
  ItemSummaryOption2,
16412
16604
  {
@@ -16416,7 +16608,7 @@ function RepeatableSchema({
16416
16608
  JSON.stringify(itemSummary)
16417
16609
  )),
16418
16610
  /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
16419
- import_components52.NavigationOption,
16611
+ import_components53.NavigationOption,
16420
16612
  {
16421
16613
  media: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_icons4.Plus, {}),
16422
16614
  title: schema.addItemTitle || formatMessage(repeatable_messages_default2.addItemTitle),
@@ -16425,7 +16617,7 @@ function RepeatableSchema({
16425
16617
  }
16426
16618
  ),
16427
16619
  /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
16428
- import_components52.Modal,
16620
+ import_components53.Modal,
16429
16621
  {
16430
16622
  open: openModalType !== null,
16431
16623
  title: (openModalType === "add" ? schema.addItemTitle : schema.editItemTitle) || formatMessage(repeatable_messages_default2.addItemTitle),
@@ -16514,7 +16706,7 @@ var ArraySchema = (props) => {
16514
16706
  var ArraySchema_default = ArraySchema;
16515
16707
 
16516
16708
  // src/legacy/jsonSchemaForm/objectSchema/ObjectSchema.tsx
16517
- var import_components53 = require("@transferwise/components");
16709
+ var import_components54 = require("@transferwise/components");
16518
16710
  var import_classnames10 = __toESM(require_classnames());
16519
16711
  var import_react38 = require("react");
16520
16712
  var import_jsx_runtime88 = require("react/jsx-runtime");
@@ -16557,7 +16749,7 @@ function ObjectSchema(props) {
16557
16749
  return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
16558
16750
  props.schema.alert && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(DynamicAlert_default, { component: props.schema.alert }),
16559
16751
  /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("fieldset", { children: [
16560
- props.schema.title && !hideTitle && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_components53.Header, { title: props.schema.title, as: "legend" }),
16752
+ props.schema.title && !hideTitle && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_components54.Header, { title: props.schema.title, as: "legend" }),
16561
16753
  props.schema.description && !hideTitle && /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("p", { children: [
16562
16754
  " ",
16563
16755
  props.schema.description,
@@ -16591,12 +16783,12 @@ function ObjectSchema(props) {
16591
16783
  var ObjectSchema_default = ObjectSchema;
16592
16784
 
16593
16785
  // src/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.tsx
16594
- var import_components56 = require("@transferwise/components");
16786
+ var import_components57 = require("@transferwise/components");
16595
16787
  var import_classnames11 = __toESM(require_classnames());
16596
16788
  var import_react41 = require("react");
16597
16789
 
16598
16790
  // src/legacy/jsonSchemaForm/help/Help.tsx
16599
- var import_components54 = require("@transferwise/components");
16791
+ var import_components55 = require("@transferwise/components");
16600
16792
  var import_react_intl34 = require("react-intl");
16601
16793
 
16602
16794
  // src/common/messages/help.messages.ts
@@ -16614,10 +16806,10 @@ var import_jsx_runtime89 = require("react/jsx-runtime");
16614
16806
  function Help2(props) {
16615
16807
  const intl = (0, import_react_intl34.useIntl)();
16616
16808
  return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
16617
- import_components54.Info,
16809
+ import_components55.Info,
16618
16810
  {
16619
16811
  className: "m-l-1",
16620
- content: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_components54.Markdown, { config: { link: { target: "_blank" } }, children: props.help.markdown }),
16812
+ content: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_components55.Markdown, { config: { link: { target: "_blank" } }, children: props.help.markdown }),
16621
16813
  presentation: "POPOVER",
16622
16814
  size: "sm",
16623
16815
  "aria-label": intl.formatMessage(help_messages_default2.helpAria)
@@ -16631,7 +16823,7 @@ var import_react40 = require("react");
16631
16823
  var import_react_intl35 = require("react-intl");
16632
16824
 
16633
16825
  // src/legacy/formControl/FormControl.tsx
16634
- var import_components55 = require("@transferwise/components");
16826
+ var import_components56 = require("@transferwise/components");
16635
16827
  var import_react39 = require("react");
16636
16828
 
16637
16829
  // src/legacy/formControl/utils/value-utils.ts
@@ -16891,7 +17083,7 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
16891
17083
  max,
16892
17084
  searchPlaceholder,
16893
17085
  onSearchChange,
16894
- size,
17086
+ size: size2,
16895
17087
  uploadProps,
16896
17088
  label,
16897
17089
  description,
@@ -16909,7 +17101,7 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
16909
17101
  switch (type) {
16910
17102
  case FormControlType.RADIO:
16911
17103
  return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
16912
- import_components55.RadioGroup,
17104
+ import_components56.RadioGroup,
16913
17105
  {
16914
17106
  radios: options.map(this.mapOption),
16915
17107
  name,
@@ -16925,7 +17117,7 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
16925
17117
  );
16926
17118
  case FormControlType.CHECKBOX:
16927
17119
  return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
16928
- import_components55.Checkbox,
17120
+ import_components56.Checkbox,
16929
17121
  {
16930
17122
  checked: getSafeBooleanValue(value, { coerceValue: true }),
16931
17123
  disabled,
@@ -16943,7 +17135,7 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
16943
17135
  const items = options;
16944
17136
  const selected = this.getSelectedOption(options);
16945
17137
  return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "d-flex flex-column", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
16946
- import_components55.SelectInput,
17138
+ import_components56.SelectInput,
16947
17139
  {
16948
17140
  id,
16949
17141
  UNSAFE_triggerButtonProps: {
@@ -16959,7 +17151,7 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
16959
17151
  })),
16960
17152
  value: selected != null ? selected : null,
16961
17153
  renderValue: ({ hideIconInTrigger, icon, label: label2, note, secondary }, withinTrigger) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
16962
- import_components55.SelectInputOptionContent,
17154
+ import_components56.SelectInputOptionContent,
16963
17155
  {
16964
17156
  title: label2,
16965
17157
  note: withinTrigger ? note != null ? note : secondary : note,
@@ -16988,7 +17180,7 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
16988
17180
  }
16989
17181
  case FormControlType.TAB:
16990
17182
  return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
16991
- import_components55.Tabs,
17183
+ import_components56.Tabs,
16992
17184
  {
16993
17185
  selected: ((_a = this.getSelectedOption(options)) == null ? void 0 : _a.value) || 0,
16994
17186
  tabs: options.map((option) => ({
@@ -17073,13 +17265,13 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
17073
17265
  case FormControlType.DATE:
17074
17266
  case FormControlType.DATETIME:
17075
17267
  return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
17076
- import_components55.DateInput,
17268
+ import_components56.DateInput,
17077
17269
  {
17078
17270
  "aria-labelledby": labelledBy,
17079
17271
  dayAutoComplete: this.getAutocompleteValue({ suffix: "-day" }),
17080
17272
  yearAutoComplete: this.getAutocompleteValue({ suffix: "-year" }),
17081
17273
  disabled,
17082
- size,
17274
+ size: size2,
17083
17275
  value: getSafeDateOrStringValue(value),
17084
17276
  mode,
17085
17277
  monthFormat,
@@ -17090,7 +17282,7 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
17090
17282
  );
17091
17283
  case FormControlType.DATELOOKUP: {
17092
17284
  return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
17093
- import_components55.DateLookup,
17285
+ import_components56.DateLookup,
17094
17286
  {
17095
17287
  value: getSafeDateStringValue(value),
17096
17288
  min: minDate,
@@ -17108,14 +17300,14 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
17108
17300
  }
17109
17301
  case FormControlType.TEL:
17110
17302
  return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
17111
- import_components55.PhoneNumberInput,
17303
+ import_components56.PhoneNumberInput,
17112
17304
  {
17113
17305
  disabled,
17114
17306
  countryCode,
17115
17307
  placeholder,
17116
17308
  required,
17117
17309
  searchPlaceholder,
17118
- size,
17310
+ size: size2,
17119
17311
  initialValue: getSafeStringValue(value),
17120
17312
  onBlur: this.handleOnBlur,
17121
17313
  onChange: (value2) => this.handleOnChange(value2),
@@ -17140,7 +17332,7 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
17140
17332
  };
17141
17333
  if (this.props.displayPattern) {
17142
17334
  return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
17143
- import_components55.TextareaWithDisplayFormat,
17335
+ import_components56.TextareaWithDisplayFormat,
17144
17336
  __spreadProps(__spreadValues({
17145
17337
  displayPattern: this.props.displayPattern
17146
17338
  }, textareaProps), {
@@ -17159,7 +17351,7 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
17159
17351
  case FormControlType.FILE:
17160
17352
  case FormControlType.UPLOAD: {
17161
17353
  return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
17162
- import_components55.Upload,
17354
+ import_components56.Upload,
17163
17355
  __spreadProps(__spreadValues({}, uploadProps), {
17164
17356
  usAccept: uploadProps.usAccept || "*",
17165
17357
  usDisabled: uploadProps.usDisabled || disabled,
@@ -17196,7 +17388,7 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
17196
17388
  };
17197
17389
  if (this.props.displayPattern) {
17198
17390
  return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
17199
- import_components55.InputWithDisplayFormat,
17391
+ import_components56.InputWithDisplayFormat,
17200
17392
  __spreadProps(__spreadValues({
17201
17393
  displayPattern: this.props.displayPattern
17202
17394
  }, inputProps), {
@@ -17536,7 +17728,7 @@ function getTitleAndHelp(schema, forId, labelId) {
17536
17728
  schema.title,
17537
17729
  " ",
17538
17730
  helpElement
17539
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_components56.Header, { title: (_a = schema.title) != null ? _a : "" }) });
17731
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_components57.Header, { title: (_a = schema.title) != null ? _a : "" }) });
17540
17732
  return schema.title ? titleElement : helpElement;
17541
17733
  }
17542
17734
  function getValidations(props, schemaIndex) {
@@ -17574,7 +17766,7 @@ var import_react43 = require("react");
17574
17766
  var import_react_intl36 = require("react-intl");
17575
17767
 
17576
17768
  // src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.tsx
17577
- var import_components57 = require("@transferwise/components");
17769
+ var import_components58 = require("@transferwise/components");
17578
17770
  var import_react42 = require("react");
17579
17771
  var import_jsx_runtime93 = require("react/jsx-runtime");
17580
17772
  function UploadInputAdapter(props) {
@@ -17592,7 +17784,7 @@ function UploadInputAdapter(props) {
17592
17784
  onCancel
17593
17785
  } = props;
17594
17786
  const onEvent = useEventDispatcher();
17595
- const files = (0, import_react42.useMemo)(() => fileId ? [{ id: fileId, status: import_components57.Status.SUCCEEDED }] : [], [fileId]);
17787
+ const files = (0, import_react42.useMemo)(() => fileId ? [{ id: fileId, status: import_components58.Status.SUCCEEDED }] : [], [fileId]);
17596
17788
  const uploadFile = (formData) => {
17597
17789
  onEvent("Dynamic Flow - PersistAsync", { status: "pending", schemaId: id });
17598
17790
  return httpClient(String(httpOptions.url), {
@@ -17612,7 +17804,7 @@ function UploadInputAdapter(props) {
17612
17804
  });
17613
17805
  };
17614
17806
  return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
17615
- import_components57.UploadInput,
17807
+ import_components58.UploadInput,
17616
17808
  {
17617
17809
  id,
17618
17810
  fileInputName: httpOptions.fileInputName,
@@ -17747,7 +17939,7 @@ var getSelectionFromModel = (schema, model) => {
17747
17939
  };
17748
17940
 
17749
17941
  // src/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.tsx
17750
- var import_components58 = require("@transferwise/components");
17942
+ var import_components59 = require("@transferwise/components");
17751
17943
  var import_jsx_runtime96 = require("react/jsx-runtime");
17752
17944
  var PromotedOneOfCheckboxControl = (props) => {
17753
17945
  const { id, selection, setSelection } = props;
@@ -17759,12 +17951,12 @@ var PromotedOneOfCheckboxControl = (props) => {
17759
17951
  const toggleSelection = () => {
17760
17952
  setSelection(checked ? selectionWhenUnchecked : selectionWhenChecked);
17761
17953
  };
17762
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "form-group", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_components58.Checkbox, { id, label: title, checked, onChange: toggleSelection }) });
17954
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "form-group", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_components59.Checkbox, { id, label: title, checked, onChange: toggleSelection }) });
17763
17955
  };
17764
17956
  var PromotedOneOfCheckboxControl_default = PromotedOneOfCheckboxControl;
17765
17957
 
17766
17958
  // src/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.tsx
17767
- var import_components59 = require("@transferwise/components");
17959
+ var import_components60 = require("@transferwise/components");
17768
17960
  var import_jsx_runtime97 = require("react/jsx-runtime");
17769
17961
  function PromotedOneOfRadioControl(props) {
17770
17962
  var _a, _b;
@@ -17785,7 +17977,7 @@ function PromotedOneOfRadioControl(props) {
17785
17977
  return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "form-group", children: [
17786
17978
  title && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("label", { className: "control-label", htmlFor: id, children: title }),
17787
17979
  /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
17788
- import_components59.RadioGroup,
17980
+ import_components60.RadioGroup,
17789
17981
  {
17790
17982
  name: "promoted-selection",
17791
17983
  selectedValue: selection,
@@ -17876,7 +18068,7 @@ function getOtherOneOf(schema) {
17876
18068
  var PromotedOneOfSchema_default = PromotedOneOfSchema;
17877
18069
 
17878
18070
  // src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.tsx
17879
- var import_components60 = require("@transferwise/components");
18071
+ var import_components61 = require("@transferwise/components");
17880
18072
  var import_react_intl38 = require("react-intl");
17881
18073
 
17882
18074
  // src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.ts
@@ -17900,7 +18092,7 @@ function ReadOnlySchema({ schema, model }) {
17900
18092
  const { title = "" } = schema;
17901
18093
  const { formatMessage } = (0, import_react_intl38.useIntl)();
17902
18094
  const value = getValueForSchema({ schema, model, formatMessage });
17903
- return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_components60.DefinitionList, { layout: import_components60.Layout.VERTICAL_ONE_COLUMN, definitions: [{ title, value, key: "" }] });
18095
+ return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_components61.DefinitionList, { layout: import_components61.Layout.VERTICAL_ONE_COLUMN, definitions: [{ title, value, key: "" }] });
17904
18096
  }
17905
18097
  var ReadOnlySchema_default = ReadOnlySchema;
17906
18098
  function getValueForSchema({
@@ -18124,16 +18316,16 @@ function DynamicForm({
18124
18316
  var DynamicForm_default = DynamicForm;
18125
18317
 
18126
18318
  // src/legacy/layout/heading/DynamicHeading.tsx
18127
- var import_components61 = require("@transferwise/components");
18319
+ var import_components62 = require("@transferwise/components");
18128
18320
  var import_classnames13 = __toESM(require_classnames());
18129
18321
  var import_jsx_runtime104 = require("react/jsx-runtime");
18130
18322
  var DynamicHeading = (props) => {
18131
- const { text, size = "md", align = "left", margin = "md", control } = props.component;
18323
+ const { text, size: size2 = "md", align = "left", margin = "md", control } = props.component;
18132
18324
  const classes = (0, import_classnames13.default)(getTextAlignmentAndMargin2({ align, margin }));
18133
- return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(DisplayHeading2, { size, text, classes }) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(StandardHeading2, { size, text, classes });
18325
+ return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(DisplayHeading2, { size: size2, text, classes }) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(StandardHeading2, { size: size2, text, classes });
18134
18326
  };
18135
- var StandardHeading2 = ({ size, text, classes }) => {
18136
- switch (size) {
18327
+ var StandardHeading2 = ({ size: size2, text, classes }) => {
18328
+ switch (size2) {
18137
18329
  case "xs":
18138
18330
  return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("h5", { className: classes, children: text });
18139
18331
  case "sm":
@@ -18147,38 +18339,38 @@ var StandardHeading2 = ({ size, text, classes }) => {
18147
18339
  return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("h3", { className: classes, children: text });
18148
18340
  }
18149
18341
  };
18150
- var DisplayHeading2 = ({ size, text, classes }) => {
18151
- switch (size) {
18342
+ var DisplayHeading2 = ({ size: size2, text, classes }) => {
18343
+ switch (size2) {
18152
18344
  case "xs":
18153
18345
  case "sm":
18154
- return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_components61.Display, { type: "display-small", className: classes, children: text });
18346
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_components62.Display, { type: "display-small", className: classes, children: text });
18155
18347
  case "xl":
18156
18348
  case "lg":
18157
- return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_components61.Display, { type: "display-large", className: classes, children: text });
18349
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_components62.Display, { type: "display-large", className: classes, children: text });
18158
18350
  case "md":
18159
18351
  default:
18160
- return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_components61.Display, { type: "display-medium", className: classes, children: text });
18352
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_components62.Display, { type: "display-medium", className: classes, children: text });
18161
18353
  }
18162
18354
  };
18163
18355
  var DynamicHeading_default = DynamicHeading;
18164
18356
 
18165
18357
  // src/legacy/layout/markdown/DynamicMarkdown.tsx
18166
- var import_components62 = require("@transferwise/components");
18358
+ var import_components63 = require("@transferwise/components");
18167
18359
  var import_jsx_runtime105 = require("react/jsx-runtime");
18168
18360
  var DynamicMarkdown = ({ component }) => {
18169
18361
  const { content, align, margin } = component;
18170
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: getTextAlignmentAndMargin2({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_components62.Markdown, { config: { link: { target: "_blank" } }, children: content }) });
18362
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: getTextAlignmentAndMargin2({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_components63.Markdown, { config: { link: { target: "_blank" } }, children: content }) });
18171
18363
  };
18172
18364
  var DynamicInfo = ({ component }) => {
18173
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: getTextAlignmentAndMargin2(component), children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_components62.Markdown, { config: { link: { target: "_blank" } }, children: component.markdown }) });
18365
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: getTextAlignmentAndMargin2(component), children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_components63.Markdown, { config: { link: { target: "_blank" } }, children: component.markdown }) });
18174
18366
  };
18175
18367
 
18176
18368
  // src/legacy/layout/image/DynamicImage.tsx
18177
- var import_components63 = require("@transferwise/components");
18369
+ var import_components64 = require("@transferwise/components");
18178
18370
  var import_react48 = require("react");
18179
18371
  var import_jsx_runtime106 = require("react/jsx-runtime");
18180
18372
  function DynamicImage({ component: image }) {
18181
- const { url, size, text, margin, accessibilityDescription } = image;
18373
+ const { url, size: size2, text, margin, accessibilityDescription } = image;
18182
18374
  const httpClient = useHttpClient();
18183
18375
  const [imageSource, setImageSource] = (0, import_react48.useState)("");
18184
18376
  (0, import_react48.useEffect)(() => {
@@ -18193,7 +18385,7 @@ function DynamicImage({ component: image }) {
18193
18385
  if (!imageSource) {
18194
18386
  return null;
18195
18387
  }
18196
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: `df-image ${size || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_components63.Image, __spreadValues({ className: `img-responsive ${getMargin2(margin || "md")}` }, imageProps)) });
18388
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: `df-image ${size2 || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_components64.Image, __spreadValues({ className: `img-responsive ${getMargin2(margin || "md")}` }, imageProps)) });
18197
18389
  }
18198
18390
  var readImageBlobAsDataURL2 = (imageBlob) => (
18199
18391
  // we can safely assume the type of reader.result is string
@@ -18229,7 +18421,7 @@ var getImageSource2 = async (httpClient, imageUrl) => {
18229
18421
  var DynamicImage_default = DynamicImage;
18230
18422
 
18231
18423
  // src/legacy/layout/instructions/DynamicInstructions.tsx
18232
- var import_components64 = require("@transferwise/components");
18424
+ var import_components65 = require("@transferwise/components");
18233
18425
  var import_jsx_runtime107 = require("react/jsx-runtime");
18234
18426
  var doContext2 = ["positive", "neutral"];
18235
18427
  var dontContext2 = ["warning", "negative"];
@@ -18238,8 +18430,8 @@ var DynamicInstructions = ({ component }) => {
18238
18430
  const dos = items.filter((item) => doContext2.includes(item.context)).map(({ text }) => text);
18239
18431
  const donts = items.filter((item) => dontContext2.includes(item.context)).map(({ text }) => text);
18240
18432
  return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: getMargin2(component.margin || "md"), children: [
18241
- component.title ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_components64.Header, { title: component.title }) : null,
18242
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_components64.InstructionsList, { dos, donts })
18433
+ component.title ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_components65.Header, { title: component.title }) : null,
18434
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_components65.InstructionsList, { dos, donts })
18243
18435
  ] });
18244
18436
  };
18245
18437
  var DynamicInstructions_default = DynamicInstructions;
@@ -18349,11 +18541,11 @@ function DynamicLayout(props) {
18349
18541
  var DynamicLayout_default = DynamicLayout;
18350
18542
 
18351
18543
  // src/legacy/layout/list/DynamicStatusList.tsx
18352
- var import_components65 = require("@transferwise/components");
18544
+ var import_components66 = require("@transferwise/components");
18353
18545
  var import_jsx_runtime109 = require("react/jsx-runtime");
18354
18546
  var DynamicStatusList = ({ component, onAction }) => {
18355
18547
  return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: getMargin2(component.margin || "md"), children: [
18356
- component.title ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_components65.Header, { title: component.title }) : null,
18548
+ component.title ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_components66.Header, { title: component.title }) : null,
18357
18549
  component.items.map((item) => mapListItemToSummary(item, onAction))
18358
18550
  ] });
18359
18551
  };
@@ -18364,13 +18556,35 @@ var mapListItemToSummary = (props, onAction) => {
18364
18556
  description,
18365
18557
  action: "callToAction" in props ? callToActionToSummaryAction(props == null ? void 0 : props.callToAction, onAction) : void 0
18366
18558
  }, (icon == null ? void 0 : icon.name) ? { icon: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(DynamicIcon_default2, { type: icon.name }) } : {}), status ? { status: statusMap[status] } : {});
18367
- return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_components65.Summary, __spreadValues({}, summaryProps), `${title}/${description || ""}`);
18559
+ return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_components66.Summary, __spreadValues({}, summaryProps), `${title}/${description || ""}`);
18368
18560
  };
18369
18561
  var callToActionToSummaryAction = (callToAction, onAction) => {
18370
18562
  if (!callToAction) {
18371
18563
  return void 0;
18372
18564
  }
18373
18565
  const { accessibilityDescription, behavior, title } = callToAction;
18566
+ if ("type" in behavior) {
18567
+ switch (behavior.type) {
18568
+ case "action": {
18569
+ const { action } = behavior;
18570
+ return {
18571
+ text: title,
18572
+ "aria-label": accessibilityDescription,
18573
+ onClick: () => {
18574
+ onAction(action);
18575
+ }
18576
+ };
18577
+ }
18578
+ case "link": {
18579
+ return {
18580
+ text: title,
18581
+ "aria-label": accessibilityDescription,
18582
+ href: behavior.url,
18583
+ target: "_blank"
18584
+ };
18585
+ }
18586
+ }
18587
+ }
18374
18588
  if (behavior.link) {
18375
18589
  const { link } = behavior;
18376
18590
  return {
@@ -18411,14 +18625,14 @@ var statusMap = __spreadValues(__spreadValues({}, statusListMap), legacyStatusMa
18411
18625
  var DynamicStatusList_default = DynamicStatusList;
18412
18626
 
18413
18627
  // src/legacy/layout/loadingIndicator/DynamicLoadingIndicator.tsx
18414
- var import_components66 = require("@transferwise/components");
18628
+ var import_components67 = require("@transferwise/components");
18415
18629
  var import_jsx_runtime110 = require("react/jsx-runtime");
18416
18630
  var DynamicLoadingIndicator = ({ component }) => {
18417
- const { margin = "md", size = "md" } = component;
18631
+ const { margin = "md", size: size2 = "md" } = component;
18418
18632
  return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
18419
- import_components66.Loader,
18633
+ import_components67.Loader,
18420
18634
  {
18421
- size,
18635
+ size: size2,
18422
18636
  classNames: {
18423
18637
  "tw-loader": `tw-loader m-x-auto ${getMargin2(margin)}`
18424
18638
  },
@@ -18429,7 +18643,7 @@ var DynamicLoadingIndicator = ({ component }) => {
18429
18643
  var DynamicLoadingIndicator_default = DynamicLoadingIndicator;
18430
18644
 
18431
18645
  // src/legacy/layout/paragraph/DynamicParagraph.tsx
18432
- var import_components68 = require("@transferwise/components");
18646
+ var import_components69 = require("@transferwise/components");
18433
18647
  var import_react_intl40 = require("react-intl");
18434
18648
 
18435
18649
  // src/common/messages/paragraph.messages.ts
@@ -18448,10 +18662,10 @@ var paragraph_messages_default2 = (0, import_react_intl39.defineMessages)({
18448
18662
  });
18449
18663
 
18450
18664
  // src/legacy/layout/paragraph/useSnackBarIfAvailable.ts
18451
- var import_components67 = require("@transferwise/components");
18665
+ var import_components68 = require("@transferwise/components");
18452
18666
  var import_react49 = require("react");
18453
18667
  function useSnackBarIfAvailable2() {
18454
- const context = (0, import_react49.useContext)(import_components67.SnackbarContext);
18668
+ const context = (0, import_react49.useContext)(import_components68.SnackbarContext);
18455
18669
  return context ? context.createSnackbar : noop3;
18456
18670
  }
18457
18671
  function noop3() {
@@ -18488,7 +18702,7 @@ function CopyableDynamicParagraph({ component }) {
18488
18702
  style: { textOverflow: "ellipsis" }
18489
18703
  }
18490
18704
  ),
18491
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_components68.Button, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default2.copy) })
18705
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_components69.Button, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default2.copy) })
18492
18706
  ] });
18493
18707
  }
18494
18708
  function noop4() {
@@ -18496,7 +18710,7 @@ function noop4() {
18496
18710
  var DynamicParagraph_default = DynamicParagraph;
18497
18711
 
18498
18712
  // src/legacy/layout/review/DynamicReview.tsx
18499
- var import_components69 = require("@transferwise/components");
18713
+ var import_components70 = require("@transferwise/components");
18500
18714
  var import_jsx_runtime112 = require("react/jsx-runtime");
18501
18715
  var getDefinitions = (orientation, review) => review.fields.map(({ label, value, help }, index) => ({
18502
18716
  key: String(index),
@@ -18533,13 +18747,29 @@ var getDefinitionListLayout = (review) => {
18533
18747
  return "VERTICAL_ONE_COLUMN";
18534
18748
  }
18535
18749
  };
18536
- function DynamicReview(props) {
18537
- var _a;
18538
- const review = props.component;
18750
+ function DynamicReview({ component: review, onAction }) {
18751
+ var _a, _b;
18539
18752
  const margin = getMargin2(review.margin || "xs");
18540
18753
  const getReviewAction3 = (callToAction2) => {
18541
18754
  const { title, action, behavior } = callToAction2;
18542
18755
  if (behavior) {
18756
+ if ("type" in behavior) {
18757
+ switch (behavior.type) {
18758
+ case "action": {
18759
+ const { action: behaviorAction2 } = behavior;
18760
+ return {
18761
+ text: title != null ? title : "",
18762
+ onClick: behaviorAction2 ? getOnClick(behaviorAction2) : void 0
18763
+ };
18764
+ }
18765
+ case "link": {
18766
+ return {
18767
+ text: title != null ? title : "",
18768
+ href: behavior.url
18769
+ };
18770
+ }
18771
+ }
18772
+ }
18543
18773
  const { action: behaviorAction, link } = behavior;
18544
18774
  if (behaviorAction) {
18545
18775
  return {
@@ -18563,7 +18793,7 @@ function DynamicReview(props) {
18563
18793
  return (event) => {
18564
18794
  event.preventDefault();
18565
18795
  if (action) {
18566
- props.onAction(action);
18796
+ onAction(action);
18567
18797
  }
18568
18798
  };
18569
18799
  };
@@ -18571,8 +18801,8 @@ function DynamicReview(props) {
18571
18801
  const callToAction = review.callToAction ? getReviewAction3(review.callToAction) : null;
18572
18802
  const legacyCallToAction = !callToAction && review.action ? { text: (_a = review.action.title) != null ? _a : "", onClick: getOnClick(review.action) } : null;
18573
18803
  return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { className: margin, children: [
18574
- review.title && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_components69.Header, { title: review.title, action: callToAction || legacyCallToAction || void 0 }),
18575
- /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_components69.DefinitionList, { layout: orientation, definitions: getDefinitions(orientation, review) }) })
18804
+ review.title && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_components70.Header, { title: review.title, action: (_b = callToAction != null ? callToAction : legacyCallToAction) != null ? _b : void 0 }),
18805
+ /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_components70.DefinitionList, { layout: orientation, definitions: getDefinitions(orientation, review) }) })
18576
18806
  ] });
18577
18807
  }
18578
18808
  var DynamicReview_default = DynamicReview;
@@ -18582,13 +18812,13 @@ var import_react51 = require("react");
18582
18812
  var import_icons5 = require("@transferwise/icons");
18583
18813
 
18584
18814
  // src/legacy/layout/search/SearchInput.tsx
18585
- var import_components70 = require("@transferwise/components");
18815
+ var import_components71 = require("@transferwise/components");
18586
18816
  var import_jsx_runtime113 = require("react/jsx-runtime");
18587
18817
  var SearchInput = ({ title, value, onFocus, onChange }) => {
18588
18818
  return /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("label", { className: "control-label d-inline", children: [
18589
18819
  title,
18590
18820
  /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
18591
- import_components70.Input,
18821
+ import_components71.Input,
18592
18822
  {
18593
18823
  type: "text",
18594
18824
  value,
@@ -18601,15 +18831,15 @@ var SearchInput = ({ title, value, onFocus, onChange }) => {
18601
18831
  };
18602
18832
 
18603
18833
  // src/legacy/layout/search/SearchResults.tsx
18604
- var import_components71 = require("@transferwise/components");
18834
+ var import_components72 = require("@transferwise/components");
18605
18835
  var import_react_intl41 = require("react-intl");
18606
18836
  var import_jsx_runtime114 = require("react/jsx-runtime");
18607
18837
  function SearchResults2({ results, emptyMessage, onSelect }) {
18608
18838
  if (results.length === 0) {
18609
18839
  return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("p", { className: "m-t-2", children: emptyMessage });
18610
18840
  }
18611
- return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_components71.NavigationOptionsList, { children: results.map((result) => /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
18612
- import_components71.NavigationOption,
18841
+ return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_components72.NavigationOptionsList, { children: results.map((result) => /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
18842
+ import_components72.NavigationOption,
18613
18843
  {
18614
18844
  title: result.title,
18615
18845
  content: result.description,
@@ -18710,7 +18940,7 @@ var addQueryParameter2 = (url, key, value) => {
18710
18940
  };
18711
18941
 
18712
18942
  // src/legacy/layout/search/DynamicSearch.tsx
18713
- var import_components72 = require("@transferwise/components");
18943
+ var import_components73 = require("@transferwise/components");
18714
18944
  var import_classnames14 = __toESM(require_classnames());
18715
18945
  var import_react_intl43 = require("react-intl");
18716
18946
 
@@ -18766,7 +18996,7 @@ function DynamicSearch({ component, onAction }) {
18766
18996
  return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { className: (0, import_classnames14.default)(getMargin2(margin != null ? margin : "md"), "df-search-typeahead"), children: /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("label", { className: "control-label d-inline", children: [
18767
18997
  title,
18768
18998
  /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { className: "m-t-1", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
18769
- import_components72.Typeahead,
18999
+ import_components73.Typeahead,
18770
19000
  {
18771
19001
  id: "typeahead-input-id",
18772
19002
  intl,
@@ -18824,7 +19054,7 @@ function TypeaheadFooter2({
18824
19054
  onRetrySearch
18825
19055
  }) {
18826
19056
  if (state === "success" && results.length === 0) {
18827
- return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_components72.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: emptyMessage });
19057
+ return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_components73.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: emptyMessage });
18828
19058
  }
18829
19059
  if (state === "error" && results.length === 0) {
18830
19060
  return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(ErrorResult2, { onRetrySearch }) });
@@ -18837,7 +19067,7 @@ function TypeaheadFooter2({
18837
19067
  var DynamicSearch_default = DynamicSearch;
18838
19068
 
18839
19069
  // src/legacy/layout/modal/DynamicModal.tsx
18840
- var import_components73 = require("@transferwise/components");
19070
+ var import_components74 = require("@transferwise/components");
18841
19071
  var import_react52 = require("react");
18842
19072
  var import_jsx_runtime116 = require("react/jsx-runtime");
18843
19073
  function DynamicModal(props) {
@@ -18845,9 +19075,9 @@ function DynamicModal(props) {
18845
19075
  const { component, onAction } = props;
18846
19076
  const { margin = "md" } = component;
18847
19077
  return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: getTextAlignmentAndMargin2({ margin }), children: [
18848
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_components73.Button, { priority: "tertiary", block: true, onClick: () => isVisible(true), children: component.trigger.title }),
19078
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_components74.Button, { priority: "tertiary", block: true, onClick: () => isVisible(true), children: component.trigger.title }),
18849
19079
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
18850
- import_components73.Modal,
19080
+ import_components74.Modal,
18851
19081
  {
18852
19082
  scroll: "content",
18853
19083
  open: visible,
@@ -19398,7 +19628,7 @@ var CameraCapture_messages_default = (0, import_react_intl46.defineMessages)({
19398
19628
  });
19399
19629
 
19400
19630
  // src/common/cameraCapture/components/bottomBar/BottomBar.tsx
19401
- var import_components74 = require("@transferwise/components");
19631
+ var import_components75 = require("@transferwise/components");
19402
19632
  var import_react_intl47 = require("react-intl");
19403
19633
  var import_jsx_runtime120 = require("react/jsx-runtime");
19404
19634
  var CaptureBottomBar = ({ onCapture }) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "bottom-bar", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(CaptureButton, { onClick: onCapture }) });
@@ -19409,24 +19639,24 @@ var ReviewBottomBar = ({
19409
19639
  const intl = (0, import_react_intl47.useIntl)();
19410
19640
  return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "bottom-bar p-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "col-xs-12 col-md-6 col-md-offset-3", children: [
19411
19641
  /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
19412
- import_components74.Button,
19642
+ import_components75.Button,
19413
19643
  {
19414
19644
  className: "m-b-1",
19415
19645
  block: true,
19416
- size: import_components74.Size.MEDIUM,
19417
- type: import_components74.ControlType.ACCENT,
19646
+ size: import_components75.Size.MEDIUM,
19647
+ type: import_components75.ControlType.ACCENT,
19418
19648
  onClick: onSubmit,
19419
19649
  children: intl.formatMessage(CameraCapture_messages_default.reviewSubmit)
19420
19650
  }
19421
19651
  ),
19422
19652
  /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
19423
- import_components74.Button,
19653
+ import_components75.Button,
19424
19654
  {
19425
19655
  className: "m-b-2",
19426
19656
  block: true,
19427
- size: import_components74.Size.MEDIUM,
19428
- type: import_components74.ControlType.ACCENT,
19429
- priority: import_components74.Priority.SECONDARY,
19657
+ size: import_components75.Size.MEDIUM,
19658
+ type: import_components75.ControlType.ACCENT,
19659
+ priority: import_components75.Priority.SECONDARY,
19430
19660
  onClick: onRetry,
19431
19661
  children: intl.formatMessage(CameraCapture_messages_default.reviewRetry)
19432
19662
  }
@@ -19711,13 +19941,13 @@ function Overlay({ overlay, outline, imageUrl, title, instructions, reviewInstru
19711
19941
  var Overlay_default = Overlay;
19712
19942
 
19713
19943
  // src/common/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.tsx
19714
- var import_components75 = require("@transferwise/components");
19944
+ var import_components76 = require("@transferwise/components");
19715
19945
  var import_jsx_runtime123 = require("react/jsx-runtime");
19716
19946
  function CameraErrorScreen({ title, description, actionButton, onAction }) {
19717
19947
  return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "container p-t-5", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "col-md-6 col-md-offset-3", children: [
19718
19948
  /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("h2", { className: "text-xs-center m-b-3", children: title }),
19719
19949
  /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("p", { className: "text-xs-center m-b-5", children: description }),
19720
- onAction && actionButton && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_components75.Button, { block: true, onClick: onAction, children: actionButton })
19950
+ onAction && actionButton && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_components76.Button, { block: true, onClick: onAction, children: actionButton })
19721
19951
  ] }) }) });
19722
19952
  }
19723
19953
  var CameraErrorScreen_default = CameraErrorScreen;
@@ -20071,7 +20301,7 @@ function getOrigin2(url) {
20071
20301
  }
20072
20302
 
20073
20303
  // src/legacy/dynamicFlow/BackButton.tsx
20074
- var import_components77 = require("@transferwise/components");
20304
+ var import_components78 = require("@transferwise/components");
20075
20305
  var import_icons6 = require("@transferwise/icons");
20076
20306
  var import_jsx_runtime127 = require("react/jsx-runtime");
20077
20307
  function BackButton2({ title, action, onAction }) {
@@ -20087,7 +20317,7 @@ function BackButton2({ title, action, onAction }) {
20087
20317
  },
20088
20318
  children: [
20089
20319
  /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "sr-only", children: title }),
20090
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_components77.Avatar, { type: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_icons6.ArrowLeft, { size: "24" }) })
20320
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_components78.Avatar, { type: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_icons6.ArrowLeft, { size: "24" }) })
20091
20321
  ]
20092
20322
  }
20093
20323
  ) });
@@ -20264,19 +20494,19 @@ var getSchemaReference = (component) => {
20264
20494
  var isInlineSchema = (schema) => schema !== void 0 && typeof schema === "object" && !Object.hasOwnProperty.call(schema, "$ref");
20265
20495
 
20266
20496
  // src/legacy/dynamicFlow/utils/useLoader.tsx
20267
- var import_components78 = require("@transferwise/components");
20497
+ var import_components79 = require("@transferwise/components");
20268
20498
  var import_react66 = require("react");
20269
20499
  var import_jsx_runtime129 = require("react/jsx-runtime");
20270
20500
  function useLoader(loaderConfig, initialState) {
20271
20501
  const config = __spreadValues({
20272
- size: import_components78.Size.EXTRA_LARGE,
20502
+ size: import_components79.Size.EXTRA_LARGE,
20273
20503
  initial: true,
20274
20504
  submission: false
20275
20505
  }, loaderConfig);
20276
20506
  const [loadingState, setLoadingState] = (0, import_react66.useState)(initialState);
20277
20507
  const shouldDisplayLoader = config.initial && loadingState === "initial" || config.submission && loadingState === "submission";
20278
20508
  const loader = shouldDisplayLoader ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
20279
- import_components78.Loader,
20509
+ import_components79.Loader,
20280
20510
  {
20281
20511
  size: config.size,
20282
20512
  classNames: { "tw-loader": "tw-loader m-x-auto" },