@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.mjs CHANGED
@@ -494,7 +494,7 @@ var de_default = {
494
494
  "dynamicFlows.ExternalConfirmation.open": "In neuem Tab \xF6ffnen",
495
495
  "dynamicFlows.ExternalConfirmation.title": "Bitte best\xE4tigen",
496
496
  "dynamicFlows.FileUploadSchema.maxFileSizeError": "Diese Datei ist leider zu gro\xDF. Bitte lade eine kleinere Datei hoch.",
497
- "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Sorry, that file format is not supported. Please upload a different file.",
497
+ "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Das Dateiformat wird leider nicht unterst\xFCtzt. Bitte lade eine andere Datei hoch.",
498
498
  "dynamicFlows.Help.ariaLabel": "Klicke hier f\xFCr mehr Informationen.",
499
499
  "dynamicFlows.MultiSelect.summary": "{first} und {count} weitere",
500
500
  "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "Diese Datei ist leider zu gro\xDF. Bitte lade eine kleinere Datei hoch.",
@@ -812,7 +812,7 @@ var it_default = {
812
812
  "dynamicFlows.ExternalConfirmation.open": "Apri in una nuova scheda",
813
813
  "dynamicFlows.ExternalConfirmation.title": "Conferma",
814
814
  "dynamicFlows.FileUploadSchema.maxFileSizeError": "Spiacenti, il file \xE8 troppo grande. Carica un file di dimensioni inferiori.",
815
- "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Sorry, that file format is not supported. Please upload a different file.",
815
+ "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Siamo spiacenti, questo formato di file non \xE8 supportato. Carica un file diverso.",
816
816
  "dynamicFlows.Help.ariaLabel": "Clicca qui per maggiori informazioni.",
817
817
  "dynamicFlows.MultiSelect.summary": "{first} e altri {count}",
818
818
  "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "Spiacenti, il file \xE8 troppo grande. Carica un file di dimensioni inferiori.",
@@ -971,7 +971,7 @@ var pt_default = {
971
971
  "dynamicFlows.ExternalConfirmation.open": "Abrir em uma nova aba",
972
972
  "dynamicFlows.ExternalConfirmation.title": "Por favor, confirme",
973
973
  "dynamicFlows.FileUploadSchema.maxFileSizeError": "Este arquivo \xE9 muito grande. Por favor, envie um arquivo menor.",
974
- "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Sorry, that file format is not supported. Please upload a different file.",
974
+ "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Lamentamos, mas este formato de arquivo n\xE3o \xE9 aceito. Envie um arquivo diferente.",
975
975
  "dynamicFlows.Help.ariaLabel": "Clique aqui para mais informa\xE7\xF5es.",
976
976
  "dynamicFlows.MultiSelect.summary": "{first} e mais {count} ",
977
977
  "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "Este arquivo \xE9 muito grande. Por favor, envie um arquivo menor.",
@@ -1077,7 +1077,7 @@ var ru_default = {
1077
1077
  "dynamicFlows.ExternalConfirmation.open": "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u043D\u043E\u0432\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u0435",
1078
1078
  "dynamicFlows.ExternalConfirmation.title": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435",
1079
1079
  "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.",
1080
- "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Sorry, that file format is not supported. Please upload a different file.",
1080
+ "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.",
1081
1081
  "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.",
1082
1082
  "dynamicFlows.MultiSelect.summary": "{first} \u0438 \u0435\u0449\u0435 {count} \u0434\u0440\u0443\u0433\u0438\u0445",
1083
1083
  "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.",
@@ -1130,7 +1130,7 @@ var th_default = {
1130
1130
  "dynamicFlows.ExternalConfirmation.open": "\u0E40\u0E1B\u0E34\u0E14\u0E43\u0E19\u0E41\u0E17\u0E47\u0E1A\u0E43\u0E2B\u0E21\u0E48",
1131
1131
  "dynamicFlows.ExternalConfirmation.title": "\u0E42\u0E1B\u0E23\u0E14\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19",
1132
1132
  "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",
1133
- "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Sorry, that file format is not supported. Please upload a different file.",
1133
+ "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",
1134
1134
  "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",
1135
1135
  "dynamicFlows.MultiSelect.summary": "{first} \u0E41\u0E25\u0E30\u0E2D\u0E35\u0E01 {count}",
1136
1136
  "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",
@@ -1289,7 +1289,7 @@ var zh_HK_default = {
1289
1289
  "dynamicFlows.ExternalConfirmation.open": "\u5728\u65B0\u5206\u9801\u4E2D\u958B\u555F",
1290
1290
  "dynamicFlows.ExternalConfirmation.title": "\u8ACB\u78BA\u8A8D",
1291
1291
  "dynamicFlows.FileUploadSchema.maxFileSizeError": "\u62B1\u6B49\uFF0C\u8A72\u6A94\u6848\u592A\u5927\u3002\u8ACB\u4E0A\u8F09\u4E00\u500B\u8F03\u5C0F\u7684\u6A94\u6848\u3002",
1292
- "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Sorry, that file format is not supported. Please upload a different file.",
1292
+ "dynamicFlows.FileUploadSchema.wrongFileTypeError": "\u62B1\u6B49\uFF0C\u7CFB\u7D71\u4E0D\u652F\u63F4\u8A72\u6A94\u6848\u3002\u8ACB\u4E0A\u8F09\u5176\u4ED6\u6A94\u6848\u3002",
1293
1293
  "dynamicFlows.Help.ariaLabel": "\u6309\u6B64\u67E5\u770B\u8A73\u60C5\u3002",
1294
1294
  "dynamicFlows.MultiSelect.summary": "{first}\u548C\u5176\u4ED6{count}\u9805",
1295
1295
  "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "\u62B1\u6B49\uFF0C\u8A72\u6A94\u6848\u592A\u5927\u3002\u8ACB\u4E0A\u8F09\u4E00\u500B\u8F03\u5C0F\u7684\u6A94\u6848\u3002",
@@ -1576,7 +1576,7 @@ var boxComponentToProps = ({ border, control, width, margin }, children) => ({ t
1576
1576
 
1577
1577
  // src/revamp/renderers/mappers/buttonComponentToProps.ts
1578
1578
  var buttonComponentToProps = (component) => {
1579
- const { title, control, context, disabled, margin, pinOrder, size, onClick } = component;
1579
+ const { title, control, context, disabled, margin, pinOrder, size: size2, onClick } = component;
1580
1580
  return {
1581
1581
  type: "button",
1582
1582
  title,
@@ -1585,7 +1585,7 @@ var buttonComponentToProps = (component) => {
1585
1585
  disabled,
1586
1586
  margin,
1587
1587
  pinOrder,
1588
- size,
1588
+ size: size2,
1589
1589
  onClick
1590
1590
  };
1591
1591
  };
@@ -1628,14 +1628,14 @@ var headingComponentToProps = ({
1628
1628
  align,
1629
1629
  control,
1630
1630
  margin,
1631
- size,
1631
+ size: size2,
1632
1632
  text
1633
1633
  }) => ({
1634
1634
  type: "heading",
1635
1635
  align,
1636
1636
  control,
1637
1637
  margin,
1638
- size,
1638
+ size: size2,
1639
1639
  text
1640
1640
  });
1641
1641
 
@@ -1649,14 +1649,14 @@ var imageComponentToProps = ({
1649
1649
  accessibilityDescription,
1650
1650
  control,
1651
1651
  margin,
1652
- size,
1652
+ size: size2,
1653
1653
  url
1654
1654
  }) => ({
1655
1655
  type: "image",
1656
1656
  accessibilityDescription,
1657
1657
  control,
1658
1658
  margin,
1659
- size,
1659
+ size: size2,
1660
1660
  url
1661
1661
  });
1662
1662
 
@@ -1685,12 +1685,12 @@ var integerInputComponentToProps = (component) => __spreadProps(__spreadValues({
1685
1685
  var loadingIndicatorComponentToProps = ({
1686
1686
  control,
1687
1687
  margin,
1688
- size
1688
+ size: size2
1689
1689
  }) => ({
1690
1690
  type: "loading-indicator",
1691
1691
  control,
1692
1692
  margin,
1693
- size
1693
+ size: size2
1694
1694
  });
1695
1695
 
1696
1696
  // src/revamp/renderers/mappers/markdownComponentToProps.ts
@@ -5032,8 +5032,8 @@ var ZodSet = class _ZodSet extends ZodType {
5032
5032
  maxSize: { value: maxSize, message: errorUtil.toString(message) }
5033
5033
  }));
5034
5034
  }
5035
- size(size, message) {
5036
- return this.min(size, message).max(size, message);
5035
+ size(size2, message) {
5036
+ return this.min(size2, message).max(size2, message);
5037
5037
  }
5038
5038
  nonempty(message) {
5039
5039
  return this.min(1, message);
@@ -7007,7 +7007,29 @@ var getComponentCallToAction = (callToAction, onAction) => {
7007
7007
  }
7008
7008
  const { accessibilityDescription, behavior, title } = callToAction;
7009
7009
  if ("type" in behavior) {
7010
- return void 0;
7010
+ switch (behavior.type) {
7011
+ case "action": {
7012
+ const { action } = behavior;
7013
+ return {
7014
+ type: "action",
7015
+ accessibilityDescription,
7016
+ title,
7017
+ onClick: () => {
7018
+ void onAction(action);
7019
+ }
7020
+ };
7021
+ }
7022
+ case "link": {
7023
+ return {
7024
+ type: "link",
7025
+ accessibilityDescription,
7026
+ href: behavior.url,
7027
+ title
7028
+ };
7029
+ }
7030
+ default:
7031
+ return void 0;
7032
+ }
7011
7033
  }
7012
7034
  if (behavior.link) {
7013
7035
  const { url } = behavior.link;
@@ -7108,11 +7130,26 @@ var buttonLayoutToComponent = (uid, button, mapperProps) => {
7108
7130
  };
7109
7131
  var buttonLayoutToComponentWithBehavior = (uid, button, mapperProps) => {
7110
7132
  const { onAction, onLink, step } = mapperProps;
7111
- const { context, control, disabled, margin = "md", pinOrder, size, title, behavior } = button;
7133
+ const { context, control, disabled, margin = "md", pinOrder, size: size2, title, behavior } = button;
7112
7134
  const getOnClick = () => {
7113
7135
  if ("type" in behavior) {
7114
- return () => {
7115
- };
7136
+ switch (behavior.type) {
7137
+ case "action": {
7138
+ const action2 = inlineAction(behavior.action, step == null ? void 0 : step.actions);
7139
+ return () => {
7140
+ void onAction(action2);
7141
+ };
7142
+ }
7143
+ case "link": {
7144
+ const { url } = behavior;
7145
+ return () => {
7146
+ onLink(url);
7147
+ };
7148
+ }
7149
+ default:
7150
+ return () => {
7151
+ };
7152
+ }
7116
7153
  }
7117
7154
  const { action, link } = behavior;
7118
7155
  const inlinedAction = action ? inlineAction(action, step == null ? void 0 : step.actions) : null;
@@ -7136,14 +7173,14 @@ var buttonLayoutToComponentWithBehavior = (uid, button, mapperProps) => {
7136
7173
  disabled: disabled != null ? disabled : false,
7137
7174
  margin,
7138
7175
  pinOrder,
7139
- size,
7176
+ size: size2,
7140
7177
  title: title != null ? title : "",
7141
7178
  onClick: getOnClick()
7142
7179
  });
7143
7180
  };
7144
7181
  var buttonLayoutToComponentWithAction = (uid, button, mapperProps) => {
7145
7182
  const { onAction, step } = mapperProps;
7146
- const { context, control, disabled, margin = "md", pinOrder, size, title } = button;
7183
+ const { context, control, disabled, margin = "md", pinOrder, size: size2, title } = button;
7147
7184
  const { action } = button;
7148
7185
  const inlinedAction = action ? inlineAction(action, step == null ? void 0 : step.actions) : {};
7149
7186
  const onClick = () => {
@@ -7156,13 +7193,13 @@ var buttonLayoutToComponentWithAction = (uid, button, mapperProps) => {
7156
7193
  disabled: getButtonDisabled({ disabled, action: inlinedAction }),
7157
7194
  margin,
7158
7195
  pinOrder,
7159
- size,
7196
+ size: size2,
7160
7197
  title: getButtonTitle({ title, action: inlinedAction }),
7161
7198
  onClick
7162
7199
  });
7163
7200
  };
7164
7201
  var buttonLayoutToComponentWithNoop = (uid, button) => {
7165
- const { context, control, disabled, margin = "md", pinOrder, size, title } = button;
7202
+ const { context, control, disabled, margin = "md", pinOrder, size: size2, title } = button;
7166
7203
  return createButtonComponent({
7167
7204
  uid,
7168
7205
  context: mapLegacyContext(context != null ? context : "neutral"),
@@ -7170,7 +7207,7 @@ var buttonLayoutToComponentWithNoop = (uid, button) => {
7170
7207
  disabled: disabled != null ? disabled : false,
7171
7208
  margin,
7172
7209
  pinOrder,
7173
- size,
7210
+ size: size2,
7174
7211
  title: title != null ? title : "",
7175
7212
  onClick: () => {
7176
7213
  }
@@ -10005,12 +10042,12 @@ var createHeadingComponent = (headingProps) => __spreadProps(__spreadValues({
10005
10042
  });
10006
10043
 
10007
10044
  // src/revamp/domain/mappers/layout/headingLayoutToComponent.ts
10008
- var headingLayoutToComponent = (uid, { align = "left", margin = "md", size = "md", control, text }) => createHeadingComponent({
10045
+ var headingLayoutToComponent = (uid, { align = "left", margin = "md", size: size2 = "md", control, text }) => createHeadingComponent({
10009
10046
  uid,
10010
10047
  align: mapLegacyAlign(align),
10011
10048
  control,
10012
10049
  margin,
10013
- size,
10050
+ size: size2,
10014
10051
  text
10015
10052
  });
10016
10053
 
@@ -10027,12 +10064,12 @@ var createImageComponent = (imageProps) => __spreadProps(__spreadValues({
10027
10064
  });
10028
10065
 
10029
10066
  // src/revamp/domain/mappers/layout/imageLayoutToComponent.ts
10030
- var imageLayoutToComponent = (uid, { accessibilityDescription, control, margin = "md", size = "md", text, url }) => createImageComponent({
10067
+ var imageLayoutToComponent = (uid, { accessibilityDescription, control, margin = "md", size: size2 = "md", text, url }) => createImageComponent({
10031
10068
  uid,
10032
10069
  accessibilityDescription: accessibilityDescription != null ? accessibilityDescription : text,
10033
10070
  control,
10034
10071
  margin,
10035
- size,
10072
+ size: size2,
10036
10073
  url
10037
10074
  });
10038
10075
 
@@ -10093,7 +10130,7 @@ var createLoadingIndicatorComponent = (loadingIndicatorProps) => __spreadProps(_
10093
10130
  });
10094
10131
 
10095
10132
  // src/revamp/domain/mappers/layout/loadingIndicatorLayoutToComponent.ts
10096
- var loadingIndicatorLayoutToComponent = (uid, { size = "md", margin = "md", control }) => createLoadingIndicatorComponent({ uid, size, control, margin });
10133
+ var loadingIndicatorLayoutToComponent = (uid, { size: size2 = "md", margin = "md", control }) => createLoadingIndicatorComponent({ uid, size: size2, control, margin });
10097
10134
 
10098
10135
  // src/revamp/domain/mappers/layout/markdownLayoutToComponent.ts
10099
10136
  var markdownLayoutToComponent = (uid, { align = "left", margin = "md", control, content }) => createMarkdownComponent({
@@ -10194,12 +10231,36 @@ var reviewLayoutToComponent = (uid, { fields, title, callToAction, control, marg
10194
10231
  });
10195
10232
  var getReviewAction = ({ onAction, onLink, callToAction, action }) => {
10196
10233
  if (callToAction) {
10197
- const { action: ctaAction, behavior, title } = callToAction;
10234
+ const { accessibilityDescription, action: ctaAction, behavior, title } = callToAction;
10198
10235
  if (behavior) {
10199
10236
  if ("type" in behavior) {
10200
- return void 0;
10237
+ switch (behavior.type) {
10238
+ case "action": {
10239
+ const { action: behaviorAction2 } = behavior;
10240
+ return {
10241
+ accessibilityDescription,
10242
+ title,
10243
+ onClick: () => {
10244
+ void onAction(behaviorAction2);
10245
+ }
10246
+ };
10247
+ }
10248
+ case "link": {
10249
+ const { url } = behavior;
10250
+ return {
10251
+ accessibilityDescription,
10252
+ href: url,
10253
+ title,
10254
+ onClick: () => {
10255
+ onLink(url);
10256
+ }
10257
+ };
10258
+ }
10259
+ default:
10260
+ return void 0;
10261
+ }
10201
10262
  }
10202
- const { accessibilityDescription, action: behaviorAction, link } = behavior;
10263
+ const { action: behaviorAction, link } = behavior;
10203
10264
  if (behaviorAction) {
10204
10265
  return {
10205
10266
  accessibilityDescription,
@@ -10434,7 +10495,31 @@ var getItemCallToAction = (callToAction, onAction, onLink) => {
10434
10495
  }
10435
10496
  const { accessibilityDescription, behavior, title } = callToAction;
10436
10497
  if ("type" in behavior) {
10437
- return void 0;
10498
+ switch (behavior.type) {
10499
+ case "action": {
10500
+ const { action } = behavior;
10501
+ return {
10502
+ accessibilityDescription,
10503
+ title,
10504
+ onClick: () => {
10505
+ void onAction(action);
10506
+ }
10507
+ };
10508
+ }
10509
+ case "link": {
10510
+ const { url } = behavior;
10511
+ return {
10512
+ accessibilityDescription,
10513
+ href: url,
10514
+ title,
10515
+ onClick: () => {
10516
+ void onLink(url);
10517
+ }
10518
+ };
10519
+ }
10520
+ default:
10521
+ return void 0;
10522
+ }
10438
10523
  }
10439
10524
  if (behavior.action) {
10440
10525
  const { action } = behavior;
@@ -11340,8 +11425,8 @@ var useRendererHttpClient = () => {
11340
11425
  import { Alert as Alert2 } from "@transferwise/components";
11341
11426
 
11342
11427
  // ../renderers/src/utils/layout-utils.ts
11343
- var getMargin = (size) => {
11344
- switch (size) {
11428
+ var getMargin = (size2) => {
11429
+ switch (size2) {
11345
11430
  case "xs":
11346
11431
  return "m-b-0";
11347
11432
  case "sm":
@@ -11562,7 +11647,7 @@ function ButtonRendererComponent({
11562
11647
  disabled,
11563
11648
  margin,
11564
11649
  title,
11565
- size,
11650
+ size: size2,
11566
11651
  onClick
11567
11652
  }) {
11568
11653
  const className = getMargin(margin);
@@ -11576,7 +11661,7 @@ function ButtonRendererComponent({
11576
11661
  className,
11577
11662
  disabled: isLoading || disabled,
11578
11663
  priority: mapControl(control),
11579
- size: mapSize(size),
11664
+ size: mapSize(size2),
11580
11665
  type,
11581
11666
  onClick,
11582
11667
  children: title
@@ -11601,11 +11686,11 @@ var mapControl = (control) => {
11601
11686
  return "secondary";
11602
11687
  }
11603
11688
  };
11604
- var mapSize = (size) => {
11605
- if (!size) {
11689
+ var mapSize = (size2) => {
11690
+ if (!size2) {
11606
11691
  return void 0;
11607
11692
  }
11608
- switch (size) {
11693
+ switch (size2) {
11609
11694
  case "xs":
11610
11695
  case "sm":
11611
11696
  return "sm";
@@ -11902,15 +11987,15 @@ var HeadingRenderer = {
11902
11987
  render: (props) => /* @__PURE__ */ jsx26(Heading, __spreadValues({}, props))
11903
11988
  };
11904
11989
  function Heading(props) {
11905
- const { text, size, align, margin, control } = props;
11990
+ const { text, size: size2, align, margin, control } = props;
11906
11991
  const className = getTextAlignmentAndMargin({ align, margin });
11907
- return control === "display" ? /* @__PURE__ */ jsx26(DisplayHeading, { size, text, className }) : /* @__PURE__ */ jsx26(StandardHeading, { size, text, className });
11992
+ return control === "display" ? /* @__PURE__ */ jsx26(DisplayHeading, { size: size2, text, className }) : /* @__PURE__ */ jsx26(StandardHeading, { size: size2, text, className });
11908
11993
  }
11909
- function DisplayHeading({ size, text, className }) {
11910
- return /* @__PURE__ */ jsx26(Display, { type: getDisplayType(size), className, children: text });
11994
+ function DisplayHeading({ size: size2, text, className }) {
11995
+ return /* @__PURE__ */ jsx26(Display, { type: getDisplayType(size2), className, children: text });
11911
11996
  }
11912
- function StandardHeading({ size, text, className }) {
11913
- switch (size) {
11997
+ function StandardHeading({ size: size2, text, className }) {
11998
+ switch (size2) {
11914
11999
  case "xs":
11915
12000
  return /* @__PURE__ */ jsx26("h5", { className, children: text });
11916
12001
  case "sm":
@@ -11924,8 +12009,8 @@ function StandardHeading({ size, text, className }) {
11924
12009
  return /* @__PURE__ */ jsx26("h3", { className, children: text });
11925
12010
  }
11926
12011
  }
11927
- var getDisplayType = (size) => {
11928
- switch (size) {
12012
+ var getDisplayType = (size2) => {
12013
+ switch (size2) {
11929
12014
  case "xs":
11930
12015
  case "sm":
11931
12016
  return "display-small";
@@ -11960,7 +12045,7 @@ var ImageRenderer_default = ImageRenderer;
11960
12045
  function ImageRendererComponent({
11961
12046
  accessibilityDescription,
11962
12047
  margin,
11963
- size,
12048
+ size: size2,
11964
12049
  url
11965
12050
  }) {
11966
12051
  const [imageSource, setImageSource] = useState3("");
@@ -11968,7 +12053,7 @@ function ImageRendererComponent({
11968
12053
  useEffect3(() => {
11969
12054
  void getImageSource(httpClient, url).then(setImageSource);
11970
12055
  }, [url, httpClient]);
11971
- return /* @__PURE__ */ jsx27("div", { className: `df-image ${size || "md"}`, children: /* @__PURE__ */ jsx27(
12056
+ return /* @__PURE__ */ jsx27("div", { className: `df-image ${size2 || "md"}`, children: /* @__PURE__ */ jsx27(
11972
12057
  Image,
11973
12058
  {
11974
12059
  className: `img-responsive ${getMargin(margin)}`,
@@ -12030,7 +12115,7 @@ var InstructionsRenderer = {
12030
12115
  var InstructionsRenderer_default = InstructionsRenderer;
12031
12116
 
12032
12117
  // ../renderers/src/IntegerInputRenderer.tsx
12033
- import { Input } from "@transferwise/components";
12118
+ import { Input, InputGroup } from "@transferwise/components";
12034
12119
 
12035
12120
  // ../renderers/src/utils/input-utils.ts
12036
12121
  var onWheel = (event) => {
@@ -12039,13 +12124,71 @@ var onWheel = (event) => {
12039
12124
  }
12040
12125
  };
12041
12126
 
12042
- // ../renderers/src/IntegerInputRenderer.tsx
12127
+ // ../renderers/src/utils/getIconAvatar.tsx
12128
+ import { Avatar as Avatar2, AvatarType as AvatarType2 } from "@transferwise/components";
12043
12129
  import { jsx as jsx29 } from "react/jsx-runtime";
12130
+ var size = 24;
12131
+ function getIconAvatar({ icon, image }) {
12132
+ if (image == null ? void 0 : image.url) {
12133
+ return /* @__PURE__ */ jsx29(
12134
+ "img",
12135
+ {
12136
+ src: image.url,
12137
+ alt: image.accessibilityDescription,
12138
+ width: `${size}px`,
12139
+ height: `${size}px`
12140
+ }
12141
+ );
12142
+ }
12143
+ if (isFlagIcon2(icon)) {
12144
+ return /* @__PURE__ */ jsx29(Avatar2, { type: AvatarType2.ICON, size, children: /* @__PURE__ */ jsx29(DynamicIcon_default, { name: icon.name }) });
12145
+ }
12146
+ if (isNamedIcon2(icon)) {
12147
+ return /* @__PURE__ */ jsx29(DynamicIcon_default, { name: icon.name });
12148
+ }
12149
+ if (icon && "text" in icon) {
12150
+ return /* @__PURE__ */ jsx29(Avatar2, { type: AvatarType2.ICON, size, children: icon.text });
12151
+ }
12152
+ return null;
12153
+ }
12154
+ var isNamedIcon2 = (icon) => icon ? "name" in icon : false;
12155
+ var isFlagIcon2 = (icon) => isNamedIcon2(icon) && icon.name.startsWith("flag-");
12156
+
12157
+ // ../renderers/src/utils/getInputGroupAddonStart.tsx
12158
+ var getInputGroupAddonStart = ({ icon, image }) => {
12159
+ const content = getIconAvatar({ icon, image });
12160
+ return content ? { content } : void 0;
12161
+ };
12162
+
12163
+ // ../renderers/src/IntegerInputRenderer.tsx
12164
+ import { jsx as jsx30 } from "react/jsx-runtime";
12044
12165
  var IntegerInputRenderer = {
12045
12166
  canRenderType: "input-integer",
12046
12167
  render: (props) => {
12047
- const _a = props, { id, label, description, help, type, validationState, value, onChange } = _a, rest = __objRest(_a, ["id", "label", "description", "help", "type", "validationState", "value", "onChange"]);
12048
- return /* @__PURE__ */ jsx29(
12168
+ const _a = props, {
12169
+ id,
12170
+ label,
12171
+ description,
12172
+ help,
12173
+ icon,
12174
+ image,
12175
+ type,
12176
+ validationState,
12177
+ value,
12178
+ onChange
12179
+ } = _a, rest = __objRest(_a, [
12180
+ "id",
12181
+ "label",
12182
+ "description",
12183
+ "help",
12184
+ "icon",
12185
+ "image",
12186
+ "type",
12187
+ "validationState",
12188
+ "value",
12189
+ "onChange"
12190
+ ]);
12191
+ return /* @__PURE__ */ jsx30(
12049
12192
  FieldInput_default,
12050
12193
  {
12051
12194
  id,
@@ -12053,7 +12196,7 @@ var IntegerInputRenderer = {
12053
12196
  description,
12054
12197
  validation: validationState,
12055
12198
  help,
12056
- children: /* @__PURE__ */ jsx29(
12199
+ children: /* @__PURE__ */ jsx30(InputGroup, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx30(
12057
12200
  Input,
12058
12201
  __spreadValues({
12059
12202
  id,
@@ -12068,7 +12211,7 @@ var IntegerInputRenderer = {
12068
12211
  },
12069
12212
  onWheel
12070
12213
  }, rest)
12071
- )
12214
+ ) })
12072
12215
  }
12073
12216
  );
12074
12217
  }
@@ -12077,13 +12220,13 @@ var IntegerInputRenderer_default = IntegerInputRenderer;
12077
12220
 
12078
12221
  // ../renderers/src/LoadingIndicatorRenderer.tsx
12079
12222
  import { Loader } from "@transferwise/components";
12080
- import { jsx as jsx30 } from "react/jsx-runtime";
12223
+ import { jsx as jsx31 } from "react/jsx-runtime";
12081
12224
  var LoadingIndicatorRenderer = {
12082
12225
  canRenderType: "loading-indicator",
12083
- render: ({ margin, size }) => /* @__PURE__ */ jsx30(
12226
+ render: ({ margin, size: size2 }) => /* @__PURE__ */ jsx31(
12084
12227
  Loader,
12085
12228
  {
12086
- size,
12229
+ size: size2,
12087
12230
  classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin(margin)}` },
12088
12231
  "data-testid": "loading-indicator"
12089
12232
  }
@@ -12093,28 +12236,28 @@ var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
12093
12236
 
12094
12237
  // ../renderers/src/MarkdownRenderer.tsx
12095
12238
  import { Markdown as Markdown2 } from "@transferwise/components";
12096
- import { jsx as jsx31 } from "react/jsx-runtime";
12239
+ import { jsx as jsx32 } from "react/jsx-runtime";
12097
12240
  var MarkdownRenderer = {
12098
12241
  canRenderType: "markdown",
12099
- render: ({ content, align, margin }) => /* @__PURE__ */ jsx31("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ jsx31(Markdown2, { config: { link: { target: "_blank" } }, children: content }) })
12242
+ render: ({ content, align, margin }) => /* @__PURE__ */ jsx32("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ jsx32(Markdown2, { config: { link: { target: "_blank" } }, children: content }) })
12100
12243
  };
12101
12244
  var MarkdownRenderer_default = MarkdownRenderer;
12102
12245
 
12103
12246
  // ../renderers/src/ModalRenderer.tsx
12104
12247
  import { Button as Button2, Modal } from "@transferwise/components";
12105
12248
  import { useState as useState4 } from "react";
12106
- import { jsx as jsx32, jsxs as jsxs8 } from "react/jsx-runtime";
12249
+ import { jsx as jsx33, jsxs as jsxs8 } from "react/jsx-runtime";
12107
12250
  var ModalRenderer = {
12108
12251
  canRenderType: "modal",
12109
- render: (props) => /* @__PURE__ */ jsx32(DFModal, __spreadValues({}, props))
12252
+ render: (props) => /* @__PURE__ */ jsx33(DFModal, __spreadValues({}, props))
12110
12253
  };
12111
12254
  var ModalRenderer_default = ModalRenderer;
12112
12255
  function DFModal({ content, margin, trigger }) {
12113
12256
  const [visible, setVisible] = useState4(false);
12114
12257
  const { components, title } = content;
12115
12258
  return /* @__PURE__ */ jsxs8("div", { className: getMargin(margin), children: [
12116
- /* @__PURE__ */ jsx32(Button2, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
12117
- /* @__PURE__ */ jsx32(
12259
+ /* @__PURE__ */ jsx33(Button2, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
12260
+ /* @__PURE__ */ jsx33(
12118
12261
  Modal,
12119
12262
  {
12120
12263
  scroll: "content",
@@ -12132,17 +12275,17 @@ function DFModal({ content, margin, trigger }) {
12132
12275
  import { SelectInput, SelectInputOptionContent } from "@transferwise/components";
12133
12276
 
12134
12277
  // ../renderers/src/SelectInputRenderer/OptionMedia.tsx
12135
- import { Avatar as Avatar2, AvatarType as AvatarType2 } from "@transferwise/components";
12136
- import { jsx as jsx33 } from "react/jsx-runtime";
12278
+ import { Avatar as Avatar3, AvatarType as AvatarType3 } from "@transferwise/components";
12279
+ import { jsx as jsx34 } from "react/jsx-runtime";
12137
12280
  function OptionMedia({ icon, image }) {
12138
12281
  if (image == null ? void 0 : image.url) {
12139
- return /* @__PURE__ */ jsx33("img", { src: image.url, alt: image.accessibilityDescription || "", width: "64px" });
12282
+ return /* @__PURE__ */ jsx34("img", { src: image.url, alt: image.accessibilityDescription || "", width: "64px" });
12140
12283
  }
12141
12284
  if (icon && "name" in icon) {
12142
- return /* @__PURE__ */ jsx33(Avatar2, { type: AvatarType2.ICON, children: /* @__PURE__ */ jsx33(DynamicIcon_default, { name: icon.name }) });
12285
+ return /* @__PURE__ */ jsx34(Avatar3, { type: AvatarType3.ICON, children: /* @__PURE__ */ jsx34(DynamicIcon_default, { name: icon.name }) });
12143
12286
  }
12144
12287
  if (icon && "text" in icon) {
12145
- return /* @__PURE__ */ jsx33(Avatar2, { type: AvatarType2.INITIALS, children: icon.text });
12288
+ return /* @__PURE__ */ jsx34(Avatar3, { type: AvatarType3.INITIALS, children: icon.text });
12146
12289
  }
12147
12290
  return null;
12148
12291
  }
@@ -12162,10 +12305,10 @@ var multi_select_messages_default = defineMessages7({
12162
12305
 
12163
12306
  // ../renderers/src/MultiSelectInputRenderer.tsx
12164
12307
  import { useState as useState5 } from "react";
12165
- import { jsx as jsx34 } from "react/jsx-runtime";
12308
+ import { jsx as jsx35 } from "react/jsx-runtime";
12166
12309
  var MultiSelectInputRenderer = {
12167
12310
  canRenderType: "input-multi-select",
12168
- render: (props) => /* @__PURE__ */ jsx34(MultiSelectInputRendererComponent, __spreadValues({}, props))
12311
+ render: (props) => /* @__PURE__ */ jsx35(MultiSelectInputRendererComponent, __spreadValues({}, props))
12169
12312
  };
12170
12313
  function MultiSelectInputRendererComponent(props) {
12171
12314
  const { formatMessage } = useIntl4();
@@ -12207,12 +12350,12 @@ function MultiSelectInputRendererComponent(props) {
12207
12350
  const contentProps = {
12208
12351
  title: option.title,
12209
12352
  description: option.description,
12210
- icon: /* @__PURE__ */ jsx34(OptionMedia, { icon: option.icon, image: option.image })
12353
+ icon: /* @__PURE__ */ jsx35(OptionMedia, { icon: option.icon, image: option.image })
12211
12354
  };
12212
- return /* @__PURE__ */ jsx34(SelectInputOptionContent, __spreadValues({}, contentProps));
12355
+ return /* @__PURE__ */ jsx35(SelectInputOptionContent, __spreadValues({}, contentProps));
12213
12356
  };
12214
12357
  const extraProps = { autoComplete };
12215
- return /* @__PURE__ */ jsx34(
12358
+ return /* @__PURE__ */ jsx35(
12216
12359
  FieldInput_default,
12217
12360
  {
12218
12361
  id,
@@ -12220,7 +12363,7 @@ function MultiSelectInputRendererComponent(props) {
12220
12363
  help,
12221
12364
  description,
12222
12365
  validation: validationState,
12223
- children: /* @__PURE__ */ jsx34(
12366
+ children: /* @__PURE__ */ jsx35(
12224
12367
  SelectInput,
12225
12368
  __spreadValues({
12226
12369
  id,
@@ -12264,7 +12407,7 @@ import { UploadInput } from "@transferwise/components";
12264
12407
  // ../renderers/src/components/UploadFieldInput.tsx
12265
12408
  var import_classnames3 = __toESM(require_classnames());
12266
12409
  import { InlineAlert } from "@transferwise/components";
12267
- import { jsx as jsx35, jsxs as jsxs9 } from "react/jsx-runtime";
12410
+ import { jsx as jsx36, jsxs as jsxs9 } from "react/jsx-runtime";
12268
12411
  function UploadFieldInput({
12269
12412
  id,
12270
12413
  children,
@@ -12273,7 +12416,7 @@ function UploadFieldInput({
12273
12416
  help,
12274
12417
  validation
12275
12418
  }) {
12276
- const labelContent = label && help ? /* @__PURE__ */ jsx35(LabelContentWithHelp, { text: label, help }) : label;
12419
+ const labelContent = label && help ? /* @__PURE__ */ jsx36(LabelContentWithHelp, { text: label, help }) : label;
12277
12420
  const descriptionId = description ? `${id}-description` : void 0;
12278
12421
  return /* @__PURE__ */ jsxs9(
12279
12422
  "div",
@@ -12282,9 +12425,9 @@ function UploadFieldInput({
12282
12425
  "has-error": (validation == null ? void 0 : validation.status) === "invalid"
12283
12426
  }),
12284
12427
  children: [
12285
- /* @__PURE__ */ jsx35("label", { htmlFor: id, className: "control-label", children: labelContent }),
12428
+ /* @__PURE__ */ jsx36("label", { htmlFor: id, className: "control-label", children: labelContent }),
12286
12429
  children,
12287
- (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ jsx35(InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
12430
+ (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ jsx36(InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
12288
12431
  ]
12289
12432
  }
12290
12433
  );
@@ -12316,7 +12459,7 @@ var getFileType = (base64Url) => {
12316
12459
  var getRandomId = () => Math.random().toString(36).substring(2);
12317
12460
 
12318
12461
  // ../renderers/src/MultiUploadInputRenderer.tsx
12319
- import { jsx as jsx36 } from "react/jsx-runtime";
12462
+ import { jsx as jsx37 } from "react/jsx-runtime";
12320
12463
  var MultiUploadInputRenderer = {
12321
12464
  canRenderType: "input-upload-multi",
12322
12465
  render: (props) => {
@@ -12343,7 +12486,7 @@ var MultiUploadInputRenderer = {
12343
12486
  };
12344
12487
  const onDeleteFile = async (fileId) => onDelete(String(fileId));
12345
12488
  const descriptionId = description ? `${id}-description` : void 0;
12346
- return /* @__PURE__ */ jsx36(
12489
+ return /* @__PURE__ */ jsx37(
12347
12490
  UploadFieldInput_default,
12348
12491
  {
12349
12492
  id,
@@ -12351,7 +12494,7 @@ var MultiUploadInputRenderer = {
12351
12494
  description,
12352
12495
  validation: validationState,
12353
12496
  help,
12354
- children: /* @__PURE__ */ jsx36(
12497
+ children: /* @__PURE__ */ jsx37(
12355
12498
  UploadInput,
12356
12499
  {
12357
12500
  id,
@@ -12374,13 +12517,35 @@ var MultiUploadInputRenderer = {
12374
12517
  var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
12375
12518
 
12376
12519
  // ../renderers/src/NumberInputRenderer.tsx
12377
- import { Input as Input2 } from "@transferwise/components";
12378
- import { jsx as jsx37 } from "react/jsx-runtime";
12520
+ import { Input as Input2, InputGroup as InputGroup2 } from "@transferwise/components";
12521
+ import { jsx as jsx38 } from "react/jsx-runtime";
12379
12522
  var NumberInputRenderer = {
12380
12523
  canRenderType: "input-number",
12381
12524
  render: (props) => {
12382
- const _a = props, { id, label, description, help, type, validationState, value, onChange } = _a, rest = __objRest(_a, ["id", "label", "description", "help", "type", "validationState", "value", "onChange"]);
12383
- return /* @__PURE__ */ jsx37(
12525
+ const _a = props, {
12526
+ id,
12527
+ label,
12528
+ description,
12529
+ help,
12530
+ icon,
12531
+ image,
12532
+ type,
12533
+ validationState,
12534
+ value,
12535
+ onChange
12536
+ } = _a, rest = __objRest(_a, [
12537
+ "id",
12538
+ "label",
12539
+ "description",
12540
+ "help",
12541
+ "icon",
12542
+ "image",
12543
+ "type",
12544
+ "validationState",
12545
+ "value",
12546
+ "onChange"
12547
+ ]);
12548
+ return /* @__PURE__ */ jsx38(
12384
12549
  FieldInput_default,
12385
12550
  {
12386
12551
  id,
@@ -12388,7 +12553,7 @@ var NumberInputRenderer = {
12388
12553
  description,
12389
12554
  validation: validationState,
12390
12555
  help,
12391
- children: /* @__PURE__ */ jsx37(
12556
+ children: /* @__PURE__ */ jsx38(InputGroup2, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx38(
12392
12557
  Input2,
12393
12558
  __spreadValues({
12394
12559
  id,
@@ -12401,7 +12566,7 @@ var NumberInputRenderer = {
12401
12566
  },
12402
12567
  onWheel
12403
12568
  }, rest)
12404
- )
12569
+ ) })
12405
12570
  }
12406
12571
  );
12407
12572
  }
@@ -12440,17 +12605,17 @@ var paragraph_messages_default = defineMessages8({
12440
12605
  });
12441
12606
 
12442
12607
  // ../renderers/src/ParagraphRenderer.tsx
12443
- import { jsx as jsx38, jsxs as jsxs10 } from "react/jsx-runtime";
12608
+ import { jsx as jsx39, jsxs as jsxs10 } from "react/jsx-runtime";
12444
12609
  var ParagraphRenderer = {
12445
12610
  canRenderType: "paragraph",
12446
- render: (props) => /* @__PURE__ */ jsx38(Paragraph, __spreadValues({}, props))
12611
+ render: (props) => /* @__PURE__ */ jsx39(Paragraph, __spreadValues({}, props))
12447
12612
  };
12448
12613
  function Paragraph({ align, control, margin, text }) {
12449
12614
  const className = getTextAlignmentAndMargin({ align, margin });
12450
- return control === "copyable" ? /* @__PURE__ */ jsx38(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ jsx38(StandardParagraph, { className, text });
12615
+ return control === "copyable" ? /* @__PURE__ */ jsx39(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ jsx39(StandardParagraph, { className, text });
12451
12616
  }
12452
12617
  function StandardParagraph({ text, className }) {
12453
- return /* @__PURE__ */ jsx38("p", { className: `np-text-body-large ${className}`, children: text });
12618
+ return /* @__PURE__ */ jsx39("p", { className: `np-text-body-large ${className}`, children: text });
12454
12619
  }
12455
12620
  function CopyableParagraph({
12456
12621
  text,
@@ -12465,7 +12630,7 @@ function CopyableParagraph({
12465
12630
  };
12466
12631
  const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
12467
12632
  return /* @__PURE__ */ jsxs10("div", { className, children: [
12468
- /* @__PURE__ */ jsx38(
12633
+ /* @__PURE__ */ jsx39(
12469
12634
  Input3,
12470
12635
  {
12471
12636
  type: "text",
@@ -12474,7 +12639,7 @@ function CopyableParagraph({
12474
12639
  className: (0, import_classnames4.default)("text-ellipsis", inputAlignmentClasses)
12475
12640
  }
12476
12641
  ),
12477
- /* @__PURE__ */ jsx38(Button3, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
12642
+ /* @__PURE__ */ jsx39(Button3, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
12478
12643
  ] });
12479
12644
  }
12480
12645
  var ParagraphRenderer_default = ParagraphRenderer;
@@ -12512,10 +12677,10 @@ var repeatable_messages_default = defineMessages9({
12512
12677
 
12513
12678
  // ../renderers/src/RepeatableRenderer.tsx
12514
12679
  var import_classnames5 = __toESM(require_classnames());
12515
- import { Fragment as Fragment4, jsx as jsx39, jsxs as jsxs11 } from "react/jsx-runtime";
12680
+ import { Fragment as Fragment4, jsx as jsx40, jsxs as jsxs11 } from "react/jsx-runtime";
12516
12681
  var RepeatableRenderer = {
12517
12682
  canRenderType: "repeatable",
12518
- render: (props) => /* @__PURE__ */ jsx39(Repeatable, __spreadValues({}, props))
12683
+ render: (props) => /* @__PURE__ */ jsx40(Repeatable, __spreadValues({}, props))
12519
12684
  };
12520
12685
  function Repeatable(props) {
12521
12686
  const {
@@ -12555,8 +12720,8 @@ function Repeatable(props) {
12555
12720
  setOpenModalType(null);
12556
12721
  };
12557
12722
  return /* @__PURE__ */ jsxs11(Fragment4, { children: [
12558
- title && /* @__PURE__ */ jsx39(Header4, { title }),
12559
- description && /* @__PURE__ */ jsx39("p", { children: description }),
12723
+ title && /* @__PURE__ */ jsx40(Header4, { title }),
12724
+ description && /* @__PURE__ */ jsx40("p", { children: description }),
12560
12725
  /* @__PURE__ */ jsxs11(
12561
12726
  "div",
12562
12727
  {
@@ -12564,30 +12729,30 @@ function Repeatable(props) {
12564
12729
  "has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
12565
12730
  }),
12566
12731
  children: [
12567
- items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx39(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
12568
- /* @__PURE__ */ jsx39(
12732
+ items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx40(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
12733
+ /* @__PURE__ */ jsx40(
12569
12734
  NavigationOption2,
12570
12735
  {
12571
- media: /* @__PURE__ */ jsx39(Plus, {}),
12736
+ media: /* @__PURE__ */ jsx40(Plus, {}),
12572
12737
  title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
12573
12738
  showMediaAtAllSizes: true,
12574
12739
  onClick: () => onAddItem()
12575
12740
  }
12576
12741
  ),
12577
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx39(InlineAlert2, { type: "negative", children: validationState.message })
12742
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx40(InlineAlert2, { type: "negative", children: validationState.message })
12578
12743
  ]
12579
12744
  }
12580
12745
  ),
12581
- /* @__PURE__ */ jsx39(
12746
+ /* @__PURE__ */ jsx40(
12582
12747
  Modal2,
12583
12748
  {
12584
12749
  open: openModalType !== null,
12585
12750
  title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
12586
12751
  body: /* @__PURE__ */ jsxs11(Fragment4, { children: [
12587
- /* @__PURE__ */ jsx39("div", { className: "m-b-2", children: editableItem }),
12752
+ /* @__PURE__ */ jsx40("div", { className: "m-b-2", children: editableItem }),
12588
12753
  /* @__PURE__ */ jsxs11("div", { children: [
12589
- /* @__PURE__ */ jsx39(Button4, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
12590
- /* @__PURE__ */ jsx39(Button4, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
12754
+ /* @__PURE__ */ jsx40(Button4, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
12755
+ /* @__PURE__ */ jsx40(Button4, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
12591
12756
  ] })
12592
12757
  ] }),
12593
12758
  onClose: () => onCancelEdit()
@@ -12599,10 +12764,10 @@ function ItemSummaryOption({
12599
12764
  item,
12600
12765
  onClick
12601
12766
  }) {
12602
- return /* @__PURE__ */ jsx39(
12767
+ return /* @__PURE__ */ jsx40(
12603
12768
  NavigationOption2,
12604
12769
  {
12605
- media: /* @__PURE__ */ jsx39(NavigationOptionMedia, __spreadValues({}, item)),
12770
+ media: /* @__PURE__ */ jsx40(NavigationOptionMedia, __spreadValues({}, item)),
12606
12771
  title: item.title,
12607
12772
  content: item.description,
12608
12773
  showMediaAtAllSizes: true,
@@ -12640,7 +12805,7 @@ var generic_error_messages_default2 = defineMessages10({
12640
12805
 
12641
12806
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
12642
12807
  import { Button as Button5 } from "@transferwise/components";
12643
- import { jsx as jsx40, jsxs as jsxs12 } from "react/jsx-runtime";
12808
+ import { jsx as jsx41, jsxs as jsxs12 } from "react/jsx-runtime";
12644
12809
  function ErrorResult({ state }) {
12645
12810
  const intl = useIntl7();
12646
12811
  const buttonVisualProps = {
@@ -12651,7 +12816,7 @@ function ErrorResult({ state }) {
12651
12816
  return /* @__PURE__ */ jsxs12("p", { className: "m-t-2", children: [
12652
12817
  intl.formatMessage(generic_error_messages_default2.genericError),
12653
12818
  "\xA0",
12654
- /* @__PURE__ */ jsx40(
12819
+ /* @__PURE__ */ jsx41(
12655
12820
  Button5,
12656
12821
  __spreadProps(__spreadValues({}, buttonVisualProps), {
12657
12822
  onClick: () => {
@@ -12678,7 +12843,7 @@ var search_messages_default = defineMessages11({
12678
12843
 
12679
12844
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
12680
12845
  import { useIntl as useIntl8 } from "react-intl";
12681
- import { Fragment as Fragment5, jsx as jsx41, jsxs as jsxs13 } from "react/jsx-runtime";
12846
+ import { Fragment as Fragment5, jsx as jsx42, jsxs as jsxs13 } from "react/jsx-runtime";
12682
12847
  function BlockSearchRendererComponent({
12683
12848
  id,
12684
12849
  isLoading,
@@ -12692,7 +12857,7 @@ function BlockSearchRendererComponent({
12692
12857
  const trackEvent = useTrackEvent();
12693
12858
  const { formatMessage } = useIntl8();
12694
12859
  return /* @__PURE__ */ jsxs13("div", { className: getMargin(margin), children: [
12695
- /* @__PURE__ */ jsx41(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx41(
12860
+ /* @__PURE__ */ jsx42(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx42(
12696
12861
  Input4,
12697
12862
  {
12698
12863
  id,
@@ -12709,7 +12874,7 @@ function BlockSearchRendererComponent({
12709
12874
  }
12710
12875
  }
12711
12876
  ) }),
12712
- isLoading ? /* @__PURE__ */ jsx41(Fragment5, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx41(SearchResultContent, { state, onChange })
12877
+ isLoading ? /* @__PURE__ */ jsx42(Fragment5, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx42(SearchResultContent, { state, onChange })
12713
12878
  ] });
12714
12879
  }
12715
12880
  function SearchResultContent({
@@ -12718,26 +12883,26 @@ function SearchResultContent({
12718
12883
  }) {
12719
12884
  switch (state.type) {
12720
12885
  case "error":
12721
- return /* @__PURE__ */ jsx41(ErrorResult, { state });
12886
+ return /* @__PURE__ */ jsx42(ErrorResult, { state });
12722
12887
  case "results":
12723
- return /* @__PURE__ */ jsx41(SearchResults, { state, onChange });
12888
+ return /* @__PURE__ */ jsx42(SearchResults, { state, onChange });
12724
12889
  case "noResults":
12725
- return /* @__PURE__ */ jsx41(EmptySearchResult, { state });
12890
+ return /* @__PURE__ */ jsx42(EmptySearchResult, { state });
12726
12891
  case "pending":
12727
12892
  default:
12728
12893
  return null;
12729
12894
  }
12730
12895
  }
12731
12896
  function EmptySearchResult({ state }) {
12732
- return /* @__PURE__ */ jsx41(Markdown3, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
12897
+ return /* @__PURE__ */ jsx42(Markdown3, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
12733
12898
  }
12734
12899
  function SearchResults({
12735
12900
  state
12736
12901
  }) {
12737
12902
  const trackEvent = useTrackEvent();
12738
- return /* @__PURE__ */ jsx41(NavigationOptionsList2, { children: state.results.map((result) => {
12903
+ return /* @__PURE__ */ jsx42(NavigationOptionsList2, { children: state.results.map((result) => {
12739
12904
  const { icon, image } = result;
12740
- return /* @__PURE__ */ jsx41(
12905
+ return /* @__PURE__ */ jsx42(
12741
12906
  NavigationOption3,
12742
12907
  {
12743
12908
  title: result.title,
@@ -12763,7 +12928,7 @@ import { Markdown as Markdown4, Typeahead } from "@transferwise/components";
12763
12928
  import { Search } from "@transferwise/icons";
12764
12929
  import { useState as useState8 } from "react";
12765
12930
  import { useIntl as useIntl9 } from "react-intl";
12766
- import { jsx as jsx42 } from "react/jsx-runtime";
12931
+ import { jsx as jsx43 } from "react/jsx-runtime";
12767
12932
  function InlineSearchRenderer({
12768
12933
  id,
12769
12934
  isLoading,
@@ -12775,7 +12940,7 @@ function InlineSearchRenderer({
12775
12940
  const [hasSearched, setHasSearched] = useState8(false);
12776
12941
  const trackEvent = useTrackEvent();
12777
12942
  const intl = useIntl9();
12778
- return /* @__PURE__ */ jsx42("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx42(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx42(
12943
+ return /* @__PURE__ */ jsx43("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx43(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx43(
12779
12944
  Typeahead,
12780
12945
  {
12781
12946
  id: "typeahead-input-id",
@@ -12783,10 +12948,10 @@ function InlineSearchRenderer({
12783
12948
  name: "typeahead-input-name",
12784
12949
  size: "md",
12785
12950
  maxHeight: 100,
12786
- footer: /* @__PURE__ */ jsx42(TypeaheadFooter, { state, isLoading }),
12951
+ footer: /* @__PURE__ */ jsx43(TypeaheadFooter, { state, isLoading }),
12787
12952
  multiple: false,
12788
12953
  clearable: false,
12789
- addon: /* @__PURE__ */ jsx42(Search, { size: 24 }),
12954
+ addon: /* @__PURE__ */ jsx43(Search, { size: 24 }),
12790
12955
  options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
12791
12956
  minQueryLength: 1,
12792
12957
  onChange: (values) => {
@@ -12823,29 +12988,29 @@ function mapResultToTypeaheadOption(result) {
12823
12988
  function TypeaheadFooter({ state, isLoading }) {
12824
12989
  const { formatMessage } = useIntl9();
12825
12990
  if (state.type === "noResults") {
12826
- return /* @__PURE__ */ jsx42(Markdown4, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
12991
+ return /* @__PURE__ */ jsx43(Markdown4, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
12827
12992
  }
12828
12993
  if (state.type === "error") {
12829
- return /* @__PURE__ */ jsx42("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx42(ErrorResult, { state }) });
12994
+ return /* @__PURE__ */ jsx43("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx43(ErrorResult, { state }) });
12830
12995
  }
12831
12996
  if (state.type === "pending" || isLoading) {
12832
- return /* @__PURE__ */ jsx42("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
12997
+ return /* @__PURE__ */ jsx43("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
12833
12998
  }
12834
12999
  return null;
12835
13000
  }
12836
13001
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
12837
13002
 
12838
13003
  // ../renderers/src/SearchRenderer/SearchRenderer.tsx
12839
- import { jsx as jsx43 } from "react/jsx-runtime";
13004
+ import { jsx as jsx44 } from "react/jsx-runtime";
12840
13005
  var SearchRenderer = {
12841
13006
  canRenderType: "search",
12842
- render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx43(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx43(BlockSearchRendererComponent_default, __spreadValues({}, props))
13007
+ render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx44(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx44(BlockSearchRendererComponent_default, __spreadValues({}, props))
12843
13008
  };
12844
13009
  var SearchRenderer_default = SearchRenderer;
12845
13010
 
12846
13011
  // ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
12847
13012
  import { RadioGroup } from "@transferwise/components";
12848
- import { Fragment as Fragment6, jsx as jsx44, jsxs as jsxs14 } from "react/jsx-runtime";
13013
+ import { Fragment as Fragment6, jsx as jsx45, jsxs as jsxs14 } from "react/jsx-runtime";
12849
13014
  function RadioInputRendererComponent(props) {
12850
13015
  const {
12851
13016
  id,
@@ -12860,7 +13025,7 @@ function RadioInputRendererComponent(props) {
12860
13025
  onSelect
12861
13026
  } = props;
12862
13027
  return /* @__PURE__ */ jsxs14(Fragment6, { children: [
12863
- /* @__PURE__ */ jsx44(
13028
+ /* @__PURE__ */ jsx45(
12864
13029
  FieldInput_default,
12865
13030
  {
12866
13031
  id,
@@ -12868,7 +13033,7 @@ function RadioInputRendererComponent(props) {
12868
13033
  help,
12869
13034
  description,
12870
13035
  validation: validationState,
12871
- children: /* @__PURE__ */ jsx44("span", { children: /* @__PURE__ */ jsx44(
13036
+ children: /* @__PURE__ */ jsx45("span", { children: /* @__PURE__ */ jsx45(
12872
13037
  RadioGroup,
12873
13038
  {
12874
13039
  name: id,
@@ -12877,7 +13042,7 @@ function RadioInputRendererComponent(props) {
12877
13042
  value: index,
12878
13043
  secondary: option.description,
12879
13044
  disabled: option.disabled || disabled,
12880
- avatar: /* @__PURE__ */ jsx44(OptionMedia, { icon: option.icon, image: option.image })
13045
+ avatar: /* @__PURE__ */ jsx45(OptionMedia, { icon: option.icon, image: option.image })
12881
13046
  })),
12882
13047
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
12883
13048
  onChange: onSelect
@@ -12893,7 +13058,7 @@ function RadioInputRendererComponent(props) {
12893
13058
  // ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
12894
13059
  import { Tabs } from "@transferwise/components";
12895
13060
  import { useEffect as useEffect4 } from "react";
12896
- import { Fragment as Fragment7, jsx as jsx45, jsxs as jsxs15 } from "react/jsx-runtime";
13061
+ import { Fragment as Fragment7, jsx as jsx46, jsxs as jsxs15 } from "react/jsx-runtime";
12897
13062
  function TabInputRendererComponent(props) {
12898
13063
  const {
12899
13064
  id,
@@ -12913,7 +13078,7 @@ function TabInputRendererComponent(props) {
12913
13078
  }
12914
13079
  }, [selectedIndex, onSelect, options.length]);
12915
13080
  return /* @__PURE__ */ jsxs15(Fragment7, { children: [
12916
- /* @__PURE__ */ jsx45(
13081
+ /* @__PURE__ */ jsx46(
12917
13082
  FieldInput_default,
12918
13083
  {
12919
13084
  id,
@@ -12921,7 +13086,7 @@ function TabInputRendererComponent(props) {
12921
13086
  help,
12922
13087
  description,
12923
13088
  validation: validationState,
12924
- children: /* @__PURE__ */ jsx45(
13089
+ children: /* @__PURE__ */ jsx46(
12925
13090
  Tabs,
12926
13091
  {
12927
13092
  name: id,
@@ -12930,7 +13095,7 @@ function TabInputRendererComponent(props) {
12930
13095
  title: option.title,
12931
13096
  // if we pass null, we get some props-types console errors
12932
13097
  // eslint-disable-next-line react/jsx-no-useless-fragment
12933
- content: /* @__PURE__ */ jsx45(Fragment7, {}),
13098
+ content: /* @__PURE__ */ jsx46(Fragment7, {}),
12934
13099
  disabled: option.disabled || disabled
12935
13100
  })),
12936
13101
  onTabSelect: onSelect
@@ -12945,29 +13110,6 @@ var isValidIndex = (index, options) => index !== null && index >= 0 && index < o
12945
13110
 
12946
13111
  // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
12947
13112
  import { SelectInput as SelectInput2, SelectInputOptionContent as SelectInputOptionContent2 } from "@transferwise/components";
12948
-
12949
- // ../renderers/src/SelectInputRenderer/SelectTriggerMedia.tsx
12950
- import { Avatar as Avatar3, AvatarType as AvatarType3 } from "@transferwise/components";
12951
- import { jsx as jsx46 } from "react/jsx-runtime";
12952
- function SelectTriggerMedia({ icon, image }) {
12953
- if (image == null ? void 0 : image.url) {
12954
- return null;
12955
- }
12956
- if (isFlagIcon2(icon)) {
12957
- return /* @__PURE__ */ jsx46(Avatar3, { type: AvatarType3.ICON, size: 24, children: /* @__PURE__ */ jsx46(DynamicIcon_default, { name: icon.name }) });
12958
- }
12959
- if (isNamedIcon2(icon)) {
12960
- return /* @__PURE__ */ jsx46(DynamicIcon_default, { name: icon.name });
12961
- }
12962
- if (icon && "text" in icon) {
12963
- return /* @__PURE__ */ jsx46(Avatar3, { type: AvatarType3.ICON, size: 24, children: icon.text });
12964
- }
12965
- return null;
12966
- }
12967
- var isNamedIcon2 = (icon) => icon ? "name" in icon : false;
12968
- var isFlagIcon2 = (icon) => isNamedIcon2(icon) && icon.name.startsWith("flag-");
12969
-
12970
- // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
12971
13113
  import { Fragment as Fragment8, jsx as jsx47, jsxs as jsxs16 } from "react/jsx-runtime";
12972
13114
  function SelectInputRendererComponent(props) {
12973
13115
  const {
@@ -13004,7 +13146,7 @@ function SelectInputRendererComponent(props) {
13004
13146
  const contentProps = withinTrigger ? {
13005
13147
  title: option.title,
13006
13148
  note: option.description,
13007
- icon: /* @__PURE__ */ jsx47(SelectTriggerMedia, { icon: option.icon, image: option.image })
13149
+ icon: getIconAvatar(option)
13008
13150
  } : {
13009
13151
  title: option.title,
13010
13152
  description: option.description,
@@ -13161,6 +13303,9 @@ var mapStatus = (status) => {
13161
13303
  return status;
13162
13304
  };
13163
13305
 
13306
+ // ../renderers/src/TextInputRenderer.tsx
13307
+ import { InputGroup as InputGroup3 } from "@transferwise/components";
13308
+
13164
13309
  // ../renderers/src/components/VariableTextInput.tsx
13165
13310
  import {
13166
13311
  Input as Input5,
@@ -13248,6 +13393,8 @@ var TextInputRenderer = {
13248
13393
  description,
13249
13394
  help,
13250
13395
  error,
13396
+ icon,
13397
+ image,
13251
13398
  maxLength,
13252
13399
  minLength,
13253
13400
  type,
@@ -13260,6 +13407,8 @@ var TextInputRenderer = {
13260
13407
  "description",
13261
13408
  "help",
13262
13409
  "error",
13410
+ "icon",
13411
+ "image",
13263
13412
  "maxLength",
13264
13413
  "minLength",
13265
13414
  "type",
@@ -13276,7 +13425,7 @@ var TextInputRenderer = {
13276
13425
  description,
13277
13426
  validation: validationState,
13278
13427
  help,
13279
- children: /* @__PURE__ */ jsx52(VariableTextInput_default, { control, inputProps })
13428
+ children: /* @__PURE__ */ jsx52(InputGroup3, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx52(VariableTextInput_default, { control, inputProps }) })
13280
13429
  }
13281
13430
  );
13282
13431
  }
@@ -13844,10 +13993,10 @@ function convertDecisionStepToDynamicLayout(step) {
13844
13993
  }
13845
13994
  return layout;
13846
13995
  }
13847
- function dynamicBox(components, size) {
13996
+ function dynamicBox(components, size2) {
13848
13997
  return {
13849
13998
  type: "box",
13850
- width: size || "md",
13999
+ width: size2 || "md",
13851
14000
  components
13852
14001
  };
13853
14002
  }
@@ -15109,8 +15258,8 @@ var getNavigationOptionMedia = ({ icon, image }) => {
15109
15258
  };
15110
15259
 
15111
15260
  // src/legacy/layout/utils/index.ts
15112
- var getMargin2 = (size) => {
15113
- switch (size) {
15261
+ var getMargin2 = (size2) => {
15262
+ switch (size2) {
15114
15263
  case "xs":
15115
15264
  return "m-b-0";
15116
15265
  case "sm":
@@ -15160,6 +15309,29 @@ var getAlertAction = (component, onAction) => {
15160
15309
  return void 0;
15161
15310
  }
15162
15311
  const { title, accessibilityDescription, behavior } = component.callToAction;
15312
+ if ("type" in behavior) {
15313
+ switch (behavior.type) {
15314
+ case "action": {
15315
+ const { action: action2 } = behavior;
15316
+ return {
15317
+ text: title,
15318
+ "aria-label": accessibilityDescription,
15319
+ onClick: onAction && action2 ? () => {
15320
+ onAction(action2);
15321
+ } : () => {
15322
+ }
15323
+ };
15324
+ }
15325
+ case "link": {
15326
+ return {
15327
+ text: title,
15328
+ "aria-label": accessibilityDescription,
15329
+ href: behavior.url,
15330
+ target: "_blank"
15331
+ };
15332
+ }
15333
+ }
15334
+ }
15163
15335
  const { action, link } = behavior;
15164
15336
  if (link) {
15165
15337
  return {
@@ -15292,8 +15464,8 @@ var getButtonType = (context, action) => {
15292
15464
  var getButtonTypeFromContext = (context) => {
15293
15465
  return context ? contextToType[context] : "accent";
15294
15466
  };
15295
- var getButtonSize = (size) => {
15296
- switch (size) {
15467
+ var getButtonSize = (size2) => {
15468
+ switch (size2) {
15297
15469
  case "xs":
15298
15470
  case "sm":
15299
15471
  return "sm";
@@ -15342,7 +15514,7 @@ function DynamicButtonWithoutBehavior(props) {
15342
15514
  }
15343
15515
  function DynamicButtonWithBehavior(props) {
15344
15516
  var _a, _b;
15345
- const { component } = props;
15517
+ const { component, onAction } = props;
15346
15518
  const type = getButtonTypeFromContext(component.context);
15347
15519
  const priority = (_a = component.control) != null ? _a : "secondary";
15348
15520
  const { loading } = useDynamicFlow();
@@ -15351,11 +15523,31 @@ function DynamicButtonWithBehavior(props) {
15351
15523
  const title = (_b = component.title) != null ? _b : "";
15352
15524
  const onClick = () => {
15353
15525
  const { behavior } = component;
15354
- if (behavior == null ? void 0 : behavior.action) {
15355
- props.onAction(behavior.action);
15526
+ if (!behavior) {
15527
+ return;
15356
15528
  }
15357
- if (behavior == null ? void 0 : behavior.link) {
15358
- window.open(behavior.link.url, "_blank");
15529
+ if ("type" in behavior) {
15530
+ switch (behavior.type) {
15531
+ case "action": {
15532
+ if (behavior.action) {
15533
+ onAction(behavior.action);
15534
+ }
15535
+ break;
15536
+ }
15537
+ case "link": {
15538
+ if (behavior.url) {
15539
+ window.open(behavior.url, "_blank");
15540
+ }
15541
+ break;
15542
+ }
15543
+ }
15544
+ } else {
15545
+ if (behavior == null ? void 0 : behavior.action) {
15546
+ onAction(behavior.action);
15547
+ }
15548
+ if (behavior == null ? void 0 : behavior.link) {
15549
+ window.open(behavior.link.url, "_blank");
15550
+ }
15359
15551
  }
15360
15552
  };
15361
15553
  return /* @__PURE__ */ jsx72(
@@ -16888,7 +17080,7 @@ var _FormControl = class _FormControl extends PureComponent {
16888
17080
  max,
16889
17081
  searchPlaceholder,
16890
17082
  onSearchChange,
16891
- size,
17083
+ size: size2,
16892
17084
  uploadProps,
16893
17085
  label,
16894
17086
  description,
@@ -17076,7 +17268,7 @@ var _FormControl = class _FormControl extends PureComponent {
17076
17268
  dayAutoComplete: this.getAutocompleteValue({ suffix: "-day" }),
17077
17269
  yearAutoComplete: this.getAutocompleteValue({ suffix: "-year" }),
17078
17270
  disabled,
17079
- size,
17271
+ size: size2,
17080
17272
  value: getSafeDateOrStringValue(value),
17081
17273
  mode,
17082
17274
  monthFormat,
@@ -17112,7 +17304,7 @@ var _FormControl = class _FormControl extends PureComponent {
17112
17304
  placeholder,
17113
17305
  required,
17114
17306
  searchPlaceholder,
17115
- size,
17307
+ size: size2,
17116
17308
  initialValue: getSafeStringValue(value),
17117
17309
  onBlur: this.handleOnBlur,
17118
17310
  onChange: (value2) => this.handleOnChange(value2),
@@ -18125,12 +18317,12 @@ var import_classnames13 = __toESM(require_classnames());
18125
18317
  import { Display as Display2 } from "@transferwise/components";
18126
18318
  import { jsx as jsx103 } from "react/jsx-runtime";
18127
18319
  var DynamicHeading = (props) => {
18128
- const { text, size = "md", align = "left", margin = "md", control } = props.component;
18320
+ const { text, size: size2 = "md", align = "left", margin = "md", control } = props.component;
18129
18321
  const classes = (0, import_classnames13.default)(getTextAlignmentAndMargin2({ align, margin }));
18130
- return control === "display" ? /* @__PURE__ */ jsx103(DisplayHeading2, { size, text, classes }) : /* @__PURE__ */ jsx103(StandardHeading2, { size, text, classes });
18322
+ return control === "display" ? /* @__PURE__ */ jsx103(DisplayHeading2, { size: size2, text, classes }) : /* @__PURE__ */ jsx103(StandardHeading2, { size: size2, text, classes });
18131
18323
  };
18132
- var StandardHeading2 = ({ size, text, classes }) => {
18133
- switch (size) {
18324
+ var StandardHeading2 = ({ size: size2, text, classes }) => {
18325
+ switch (size2) {
18134
18326
  case "xs":
18135
18327
  return /* @__PURE__ */ jsx103("h5", { className: classes, children: text });
18136
18328
  case "sm":
@@ -18144,8 +18336,8 @@ var StandardHeading2 = ({ size, text, classes }) => {
18144
18336
  return /* @__PURE__ */ jsx103("h3", { className: classes, children: text });
18145
18337
  }
18146
18338
  };
18147
- var DisplayHeading2 = ({ size, text, classes }) => {
18148
- switch (size) {
18339
+ var DisplayHeading2 = ({ size: size2, text, classes }) => {
18340
+ switch (size2) {
18149
18341
  case "xs":
18150
18342
  case "sm":
18151
18343
  return /* @__PURE__ */ jsx103(Display2, { type: "display-small", className: classes, children: text });
@@ -18175,7 +18367,7 @@ import { Image as Image2 } from "@transferwise/components";
18175
18367
  import { useEffect as useEffect16, useState as useState22 } from "react";
18176
18368
  import { jsx as jsx105 } from "react/jsx-runtime";
18177
18369
  function DynamicImage({ component: image }) {
18178
- const { url, size, text, margin, accessibilityDescription } = image;
18370
+ const { url, size: size2, text, margin, accessibilityDescription } = image;
18179
18371
  const httpClient = useHttpClient();
18180
18372
  const [imageSource, setImageSource] = useState22("");
18181
18373
  useEffect16(() => {
@@ -18190,7 +18382,7 @@ function DynamicImage({ component: image }) {
18190
18382
  if (!imageSource) {
18191
18383
  return null;
18192
18384
  }
18193
- return /* @__PURE__ */ jsx105("div", { className: `df-image ${size || "md"}`, children: /* @__PURE__ */ jsx105(Image2, __spreadValues({ className: `img-responsive ${getMargin2(margin || "md")}` }, imageProps)) });
18385
+ return /* @__PURE__ */ jsx105("div", { className: `df-image ${size2 || "md"}`, children: /* @__PURE__ */ jsx105(Image2, __spreadValues({ className: `img-responsive ${getMargin2(margin || "md")}` }, imageProps)) });
18194
18386
  }
18195
18387
  var readImageBlobAsDataURL2 = (imageBlob) => (
18196
18388
  // we can safely assume the type of reader.result is string
@@ -18368,6 +18560,28 @@ var callToActionToSummaryAction = (callToAction, onAction) => {
18368
18560
  return void 0;
18369
18561
  }
18370
18562
  const { accessibilityDescription, behavior, title } = callToAction;
18563
+ if ("type" in behavior) {
18564
+ switch (behavior.type) {
18565
+ case "action": {
18566
+ const { action } = behavior;
18567
+ return {
18568
+ text: title,
18569
+ "aria-label": accessibilityDescription,
18570
+ onClick: () => {
18571
+ onAction(action);
18572
+ }
18573
+ };
18574
+ }
18575
+ case "link": {
18576
+ return {
18577
+ text: title,
18578
+ "aria-label": accessibilityDescription,
18579
+ href: behavior.url,
18580
+ target: "_blank"
18581
+ };
18582
+ }
18583
+ }
18584
+ }
18371
18585
  if (behavior.link) {
18372
18586
  const { link } = behavior;
18373
18587
  return {
@@ -18411,11 +18625,11 @@ var DynamicStatusList_default = DynamicStatusList;
18411
18625
  import { Loader as Loader3 } from "@transferwise/components";
18412
18626
  import { jsx as jsx109 } from "react/jsx-runtime";
18413
18627
  var DynamicLoadingIndicator = ({ component }) => {
18414
- const { margin = "md", size = "md" } = component;
18628
+ const { margin = "md", size: size2 = "md" } = component;
18415
18629
  return /* @__PURE__ */ jsx109(
18416
18630
  Loader3,
18417
18631
  {
18418
- size,
18632
+ size: size2,
18419
18633
  classNames: {
18420
18634
  "tw-loader": `tw-loader m-x-auto ${getMargin2(margin)}`
18421
18635
  },
@@ -18530,13 +18744,29 @@ var getDefinitionListLayout = (review) => {
18530
18744
  return "VERTICAL_ONE_COLUMN";
18531
18745
  }
18532
18746
  };
18533
- function DynamicReview(props) {
18534
- var _a;
18535
- const review = props.component;
18747
+ function DynamicReview({ component: review, onAction }) {
18748
+ var _a, _b;
18536
18749
  const margin = getMargin2(review.margin || "xs");
18537
18750
  const getReviewAction3 = (callToAction2) => {
18538
18751
  const { title, action, behavior } = callToAction2;
18539
18752
  if (behavior) {
18753
+ if ("type" in behavior) {
18754
+ switch (behavior.type) {
18755
+ case "action": {
18756
+ const { action: behaviorAction2 } = behavior;
18757
+ return {
18758
+ text: title != null ? title : "",
18759
+ onClick: behaviorAction2 ? getOnClick(behaviorAction2) : void 0
18760
+ };
18761
+ }
18762
+ case "link": {
18763
+ return {
18764
+ text: title != null ? title : "",
18765
+ href: behavior.url
18766
+ };
18767
+ }
18768
+ }
18769
+ }
18540
18770
  const { action: behaviorAction, link } = behavior;
18541
18771
  if (behaviorAction) {
18542
18772
  return {
@@ -18560,7 +18790,7 @@ function DynamicReview(props) {
18560
18790
  return (event) => {
18561
18791
  event.preventDefault();
18562
18792
  if (action) {
18563
- props.onAction(action);
18793
+ onAction(action);
18564
18794
  }
18565
18795
  };
18566
18796
  };
@@ -18568,7 +18798,7 @@ function DynamicReview(props) {
18568
18798
  const callToAction = review.callToAction ? getReviewAction3(review.callToAction) : null;
18569
18799
  const legacyCallToAction = !callToAction && review.action ? { text: (_a = review.action.title) != null ? _a : "", onClick: getOnClick(review.action) } : null;
18570
18800
  return /* @__PURE__ */ jsxs40("div", { className: margin, children: [
18571
- review.title && /* @__PURE__ */ jsx111(Header14, { title: review.title, action: callToAction || legacyCallToAction || void 0 }),
18801
+ review.title && /* @__PURE__ */ jsx111(Header14, { title: review.title, action: (_b = callToAction != null ? callToAction : legacyCallToAction) != null ? _b : void 0 }),
18572
18802
  /* @__PURE__ */ jsx111("div", { className: margin, children: /* @__PURE__ */ jsx111(DefinitionList3, { layout: orientation, definitions: getDefinitions(orientation, review) }) })
18573
18803
  ] });
18574
18804
  }