@wise/dynamic-flow-client 3.26.1 → 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.",
@@ -706,7 +706,7 @@ var hu_default = {
706
706
  "dynamicFlows.ExternalConfirmation.open": "Megnyit\xE1s \xFAj lapon",
707
707
  "dynamicFlows.ExternalConfirmation.title": "Meger\u0151s\xEDt\xE9s",
708
708
  "dynamicFlows.FileUploadSchema.maxFileSizeError": "Sajnos ez a f\xE1jl t\xFAl nagy. K\xE9r\xFCnk, t\xF6lts fel egy kisebb f\xE1jlt.",
709
- "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Sorry, that file format is not supported. Please upload a different file.",
709
+ "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Sajnos ez a f\xE1jlform\xE1tum nem t\xE1mogatott. K\xE9r\xFCnk, t\xF6lts fel egy m\xE1sik f\xE1jlt.",
710
710
  "dynamicFlows.Help.ariaLabel": "Kattints ide tov\xE1bbi inform\xE1ci\xF3\xE9rt.",
711
711
  "dynamicFlows.MultiSelect.summary": "{first} \xE9s tov\xE1bbi {count}",
712
712
  "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "Sajnos ez a f\xE1jl t\xFAl nagy. K\xE9r\xFCnk, t\xF6lts fel egy kisebb f\xE1jlt.",
@@ -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.",
@@ -918,7 +918,7 @@ var pl_default = {
918
918
  "dynamicFlows.ExternalConfirmation.open": "Otw\xF3rz w nowej zak\u0142adce",
919
919
  "dynamicFlows.ExternalConfirmation.title": "Potwierd\u017A",
920
920
  "dynamicFlows.FileUploadSchema.maxFileSizeError": "Przepraszamy, ten plik jest zbyt du\u017Cy. Prze\u015Blij mniejszy plik.",
921
- "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Sorry, that file format is not supported. Please upload a different file.",
921
+ "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Przepraszamy, ten format pliku nie jest obs\u0142ugiwany. Prosimy przes\u0142a\u0107 inny plik.",
922
922
  "dynamicFlows.Help.ariaLabel": "Kliknij tutaj, \u017Ceby uzyska\u0107 wi\u0119cej informacji.",
923
923
  "dynamicFlows.MultiSelect.summary": "{first} oraz {count} wi\u0119cej",
924
924
  "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "Przepraszamy, ten plik jest zbyt du\u017Cy. Prze\u015Blij mniejszy plik.",
@@ -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",
@@ -1183,7 +1183,7 @@ var tr_default = {
1183
1183
  "dynamicFlows.ExternalConfirmation.open": "Yeni sekmede a\xE7",
1184
1184
  "dynamicFlows.ExternalConfirmation.title": "L\xFCtfen onaylay\u0131n",
1185
1185
  "dynamicFlows.FileUploadSchema.maxFileSizeError": "\xDCzg\xFCn\xFCz, bu dosya \xE7ok b\xFCy\xFCk. L\xFCtfen daha k\xFC\xE7\xFCk bir dosya y\xFCkleyin.",
1186
- "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Sorry, that file format is not supported. Please upload a different file.",
1186
+ "dynamicFlows.FileUploadSchema.wrongFileTypeError": "\xDCzg\xFCn\xFCz, bu dosya bi\xE7imi desteklenmiyor. L\xFCtfen farkl\u0131 bir dosya y\xFCkleyin.",
1187
1187
  "dynamicFlows.Help.ariaLabel": "Ayr\u0131nt\u0131lar i\xE7in t\u0131klay\u0131n.",
1188
1188
  "dynamicFlows.MultiSelect.summary": "{first} ve {count} daha",
1189
1189
  "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "\xDCzg\xFCn\xFCz, bu dosya \xE7ok b\xFCy\xFCk. L\xFCtfen daha k\xFC\xE7\xFCk bir dosya y\xFCkleyin.",
@@ -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,16 +12305,17 @@ 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();
12172
12315
  const [stagedIndices, setStagedIndices] = useState5();
12173
12316
  const {
12174
12317
  id,
12318
+ autoComplete,
12175
12319
  description,
12176
12320
  disabled,
12177
12321
  label,
@@ -12206,11 +12350,12 @@ function MultiSelectInputRendererComponent(props) {
12206
12350
  const contentProps = {
12207
12351
  title: option.title,
12208
12352
  description: option.description,
12209
- icon: /* @__PURE__ */ jsx34(OptionMedia, { icon: option.icon, image: option.image })
12353
+ icon: /* @__PURE__ */ jsx35(OptionMedia, { icon: option.icon, image: option.image })
12210
12354
  };
12211
- return /* @__PURE__ */ jsx34(SelectInputOptionContent, __spreadValues({}, contentProps));
12355
+ return /* @__PURE__ */ jsx35(SelectInputOptionContent, __spreadValues({}, contentProps));
12212
12356
  };
12213
- return /* @__PURE__ */ jsx34(
12357
+ const extraProps = { autoComplete };
12358
+ return /* @__PURE__ */ jsx35(
12214
12359
  FieldInput_default,
12215
12360
  {
12216
12361
  id,
@@ -12218,9 +12363,9 @@ function MultiSelectInputRendererComponent(props) {
12218
12363
  help,
12219
12364
  description,
12220
12365
  validation: validationState,
12221
- children: /* @__PURE__ */ jsx34(
12366
+ children: /* @__PURE__ */ jsx35(
12222
12367
  SelectInput,
12223
- {
12368
+ __spreadValues({
12224
12369
  id,
12225
12370
  items: options.map((option, index) => {
12226
12371
  var _a, _b, _c;
@@ -12249,7 +12394,7 @@ function MultiSelectInputRendererComponent(props) {
12249
12394
  setStagedIndices(void 0);
12250
12395
  }
12251
12396
  }
12252
- }
12397
+ }, extraProps)
12253
12398
  )
12254
12399
  }
12255
12400
  );
@@ -12262,7 +12407,7 @@ import { UploadInput } from "@transferwise/components";
12262
12407
  // ../renderers/src/components/UploadFieldInput.tsx
12263
12408
  var import_classnames3 = __toESM(require_classnames());
12264
12409
  import { InlineAlert } from "@transferwise/components";
12265
- import { jsx as jsx35, jsxs as jsxs9 } from "react/jsx-runtime";
12410
+ import { jsx as jsx36, jsxs as jsxs9 } from "react/jsx-runtime";
12266
12411
  function UploadFieldInput({
12267
12412
  id,
12268
12413
  children,
@@ -12271,7 +12416,7 @@ function UploadFieldInput({
12271
12416
  help,
12272
12417
  validation
12273
12418
  }) {
12274
- const labelContent = label && help ? /* @__PURE__ */ jsx35(LabelContentWithHelp, { text: label, help }) : label;
12419
+ const labelContent = label && help ? /* @__PURE__ */ jsx36(LabelContentWithHelp, { text: label, help }) : label;
12275
12420
  const descriptionId = description ? `${id}-description` : void 0;
12276
12421
  return /* @__PURE__ */ jsxs9(
12277
12422
  "div",
@@ -12280,9 +12425,9 @@ function UploadFieldInput({
12280
12425
  "has-error": (validation == null ? void 0 : validation.status) === "invalid"
12281
12426
  }),
12282
12427
  children: [
12283
- /* @__PURE__ */ jsx35("label", { htmlFor: id, className: "control-label", children: labelContent }),
12428
+ /* @__PURE__ */ jsx36("label", { htmlFor: id, className: "control-label", children: labelContent }),
12284
12429
  children,
12285
- (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 })
12286
12431
  ]
12287
12432
  }
12288
12433
  );
@@ -12314,7 +12459,7 @@ var getFileType = (base64Url) => {
12314
12459
  var getRandomId = () => Math.random().toString(36).substring(2);
12315
12460
 
12316
12461
  // ../renderers/src/MultiUploadInputRenderer.tsx
12317
- import { jsx as jsx36 } from "react/jsx-runtime";
12462
+ import { jsx as jsx37 } from "react/jsx-runtime";
12318
12463
  var MultiUploadInputRenderer = {
12319
12464
  canRenderType: "input-upload-multi",
12320
12465
  render: (props) => {
@@ -12341,7 +12486,7 @@ var MultiUploadInputRenderer = {
12341
12486
  };
12342
12487
  const onDeleteFile = async (fileId) => onDelete(String(fileId));
12343
12488
  const descriptionId = description ? `${id}-description` : void 0;
12344
- return /* @__PURE__ */ jsx36(
12489
+ return /* @__PURE__ */ jsx37(
12345
12490
  UploadFieldInput_default,
12346
12491
  {
12347
12492
  id,
@@ -12349,7 +12494,7 @@ var MultiUploadInputRenderer = {
12349
12494
  description,
12350
12495
  validation: validationState,
12351
12496
  help,
12352
- children: /* @__PURE__ */ jsx36(
12497
+ children: /* @__PURE__ */ jsx37(
12353
12498
  UploadInput,
12354
12499
  {
12355
12500
  id,
@@ -12372,13 +12517,35 @@ var MultiUploadInputRenderer = {
12372
12517
  var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
12373
12518
 
12374
12519
  // ../renderers/src/NumberInputRenderer.tsx
12375
- import { Input as Input2 } from "@transferwise/components";
12376
- 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";
12377
12522
  var NumberInputRenderer = {
12378
12523
  canRenderType: "input-number",
12379
12524
  render: (props) => {
12380
- const _a = props, { id, label, description, help, type, validationState, value, onChange } = _a, rest = __objRest(_a, ["id", "label", "description", "help", "type", "validationState", "value", "onChange"]);
12381
- 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(
12382
12549
  FieldInput_default,
12383
12550
  {
12384
12551
  id,
@@ -12386,7 +12553,7 @@ var NumberInputRenderer = {
12386
12553
  description,
12387
12554
  validation: validationState,
12388
12555
  help,
12389
- children: /* @__PURE__ */ jsx37(
12556
+ children: /* @__PURE__ */ jsx38(InputGroup2, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx38(
12390
12557
  Input2,
12391
12558
  __spreadValues({
12392
12559
  id,
@@ -12399,7 +12566,7 @@ var NumberInputRenderer = {
12399
12566
  },
12400
12567
  onWheel
12401
12568
  }, rest)
12402
- )
12569
+ ) })
12403
12570
  }
12404
12571
  );
12405
12572
  }
@@ -12438,17 +12605,17 @@ var paragraph_messages_default = defineMessages8({
12438
12605
  });
12439
12606
 
12440
12607
  // ../renderers/src/ParagraphRenderer.tsx
12441
- import { jsx as jsx38, jsxs as jsxs10 } from "react/jsx-runtime";
12608
+ import { jsx as jsx39, jsxs as jsxs10 } from "react/jsx-runtime";
12442
12609
  var ParagraphRenderer = {
12443
12610
  canRenderType: "paragraph",
12444
- render: (props) => /* @__PURE__ */ jsx38(Paragraph, __spreadValues({}, props))
12611
+ render: (props) => /* @__PURE__ */ jsx39(Paragraph, __spreadValues({}, props))
12445
12612
  };
12446
12613
  function Paragraph({ align, control, margin, text }) {
12447
12614
  const className = getTextAlignmentAndMargin({ align, margin });
12448
- 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 });
12449
12616
  }
12450
12617
  function StandardParagraph({ text, className }) {
12451
- 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 });
12452
12619
  }
12453
12620
  function CopyableParagraph({
12454
12621
  text,
@@ -12463,7 +12630,7 @@ function CopyableParagraph({
12463
12630
  };
12464
12631
  const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
12465
12632
  return /* @__PURE__ */ jsxs10("div", { className, children: [
12466
- /* @__PURE__ */ jsx38(
12633
+ /* @__PURE__ */ jsx39(
12467
12634
  Input3,
12468
12635
  {
12469
12636
  type: "text",
@@ -12472,7 +12639,7 @@ function CopyableParagraph({
12472
12639
  className: (0, import_classnames4.default)("text-ellipsis", inputAlignmentClasses)
12473
12640
  }
12474
12641
  ),
12475
- /* @__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) })
12476
12643
  ] });
12477
12644
  }
12478
12645
  var ParagraphRenderer_default = ParagraphRenderer;
@@ -12510,10 +12677,10 @@ var repeatable_messages_default = defineMessages9({
12510
12677
 
12511
12678
  // ../renderers/src/RepeatableRenderer.tsx
12512
12679
  var import_classnames5 = __toESM(require_classnames());
12513
- 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";
12514
12681
  var RepeatableRenderer = {
12515
12682
  canRenderType: "repeatable",
12516
- render: (props) => /* @__PURE__ */ jsx39(Repeatable, __spreadValues({}, props))
12683
+ render: (props) => /* @__PURE__ */ jsx40(Repeatable, __spreadValues({}, props))
12517
12684
  };
12518
12685
  function Repeatable(props) {
12519
12686
  const {
@@ -12553,8 +12720,8 @@ function Repeatable(props) {
12553
12720
  setOpenModalType(null);
12554
12721
  };
12555
12722
  return /* @__PURE__ */ jsxs11(Fragment4, { children: [
12556
- title && /* @__PURE__ */ jsx39(Header4, { title }),
12557
- description && /* @__PURE__ */ jsx39("p", { children: description }),
12723
+ title && /* @__PURE__ */ jsx40(Header4, { title }),
12724
+ description && /* @__PURE__ */ jsx40("p", { children: description }),
12558
12725
  /* @__PURE__ */ jsxs11(
12559
12726
  "div",
12560
12727
  {
@@ -12562,30 +12729,30 @@ function Repeatable(props) {
12562
12729
  "has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
12563
12730
  }),
12564
12731
  children: [
12565
- items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx39(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
12566
- /* @__PURE__ */ jsx39(
12732
+ items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx40(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
12733
+ /* @__PURE__ */ jsx40(
12567
12734
  NavigationOption2,
12568
12735
  {
12569
- media: /* @__PURE__ */ jsx39(Plus, {}),
12736
+ media: /* @__PURE__ */ jsx40(Plus, {}),
12570
12737
  title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
12571
12738
  showMediaAtAllSizes: true,
12572
12739
  onClick: () => onAddItem()
12573
12740
  }
12574
12741
  ),
12575
- (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 })
12576
12743
  ]
12577
12744
  }
12578
12745
  ),
12579
- /* @__PURE__ */ jsx39(
12746
+ /* @__PURE__ */ jsx40(
12580
12747
  Modal2,
12581
12748
  {
12582
12749
  open: openModalType !== null,
12583
12750
  title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
12584
12751
  body: /* @__PURE__ */ jsxs11(Fragment4, { children: [
12585
- /* @__PURE__ */ jsx39("div", { className: "m-b-2", children: editableItem }),
12752
+ /* @__PURE__ */ jsx40("div", { className: "m-b-2", children: editableItem }),
12586
12753
  /* @__PURE__ */ jsxs11("div", { children: [
12587
- /* @__PURE__ */ jsx39(Button4, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
12588
- /* @__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) })
12589
12756
  ] })
12590
12757
  ] }),
12591
12758
  onClose: () => onCancelEdit()
@@ -12597,10 +12764,10 @@ function ItemSummaryOption({
12597
12764
  item,
12598
12765
  onClick
12599
12766
  }) {
12600
- return /* @__PURE__ */ jsx39(
12767
+ return /* @__PURE__ */ jsx40(
12601
12768
  NavigationOption2,
12602
12769
  {
12603
- media: /* @__PURE__ */ jsx39(NavigationOptionMedia, __spreadValues({}, item)),
12770
+ media: /* @__PURE__ */ jsx40(NavigationOptionMedia, __spreadValues({}, item)),
12604
12771
  title: item.title,
12605
12772
  content: item.description,
12606
12773
  showMediaAtAllSizes: true,
@@ -12638,7 +12805,7 @@ var generic_error_messages_default2 = defineMessages10({
12638
12805
 
12639
12806
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
12640
12807
  import { Button as Button5 } from "@transferwise/components";
12641
- import { jsx as jsx40, jsxs as jsxs12 } from "react/jsx-runtime";
12808
+ import { jsx as jsx41, jsxs as jsxs12 } from "react/jsx-runtime";
12642
12809
  function ErrorResult({ state }) {
12643
12810
  const intl = useIntl7();
12644
12811
  const buttonVisualProps = {
@@ -12649,7 +12816,7 @@ function ErrorResult({ state }) {
12649
12816
  return /* @__PURE__ */ jsxs12("p", { className: "m-t-2", children: [
12650
12817
  intl.formatMessage(generic_error_messages_default2.genericError),
12651
12818
  "\xA0",
12652
- /* @__PURE__ */ jsx40(
12819
+ /* @__PURE__ */ jsx41(
12653
12820
  Button5,
12654
12821
  __spreadProps(__spreadValues({}, buttonVisualProps), {
12655
12822
  onClick: () => {
@@ -12676,7 +12843,7 @@ var search_messages_default = defineMessages11({
12676
12843
 
12677
12844
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
12678
12845
  import { useIntl as useIntl8 } from "react-intl";
12679
- 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";
12680
12847
  function BlockSearchRendererComponent({
12681
12848
  id,
12682
12849
  isLoading,
@@ -12690,7 +12857,7 @@ function BlockSearchRendererComponent({
12690
12857
  const trackEvent = useTrackEvent();
12691
12858
  const { formatMessage } = useIntl8();
12692
12859
  return /* @__PURE__ */ jsxs13("div", { className: getMargin(margin), children: [
12693
- /* @__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(
12694
12861
  Input4,
12695
12862
  {
12696
12863
  id,
@@ -12707,7 +12874,7 @@ function BlockSearchRendererComponent({
12707
12874
  }
12708
12875
  }
12709
12876
  ) }),
12710
- 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 })
12711
12878
  ] });
12712
12879
  }
12713
12880
  function SearchResultContent({
@@ -12716,26 +12883,26 @@ function SearchResultContent({
12716
12883
  }) {
12717
12884
  switch (state.type) {
12718
12885
  case "error":
12719
- return /* @__PURE__ */ jsx41(ErrorResult, { state });
12886
+ return /* @__PURE__ */ jsx42(ErrorResult, { state });
12720
12887
  case "results":
12721
- return /* @__PURE__ */ jsx41(SearchResults, { state, onChange });
12888
+ return /* @__PURE__ */ jsx42(SearchResults, { state, onChange });
12722
12889
  case "noResults":
12723
- return /* @__PURE__ */ jsx41(EmptySearchResult, { state });
12890
+ return /* @__PURE__ */ jsx42(EmptySearchResult, { state });
12724
12891
  case "pending":
12725
12892
  default:
12726
12893
  return null;
12727
12894
  }
12728
12895
  }
12729
12896
  function EmptySearchResult({ state }) {
12730
- 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 });
12731
12898
  }
12732
12899
  function SearchResults({
12733
12900
  state
12734
12901
  }) {
12735
12902
  const trackEvent = useTrackEvent();
12736
- return /* @__PURE__ */ jsx41(NavigationOptionsList2, { children: state.results.map((result) => {
12903
+ return /* @__PURE__ */ jsx42(NavigationOptionsList2, { children: state.results.map((result) => {
12737
12904
  const { icon, image } = result;
12738
- return /* @__PURE__ */ jsx41(
12905
+ return /* @__PURE__ */ jsx42(
12739
12906
  NavigationOption3,
12740
12907
  {
12741
12908
  title: result.title,
@@ -12761,7 +12928,7 @@ import { Markdown as Markdown4, Typeahead } from "@transferwise/components";
12761
12928
  import { Search } from "@transferwise/icons";
12762
12929
  import { useState as useState8 } from "react";
12763
12930
  import { useIntl as useIntl9 } from "react-intl";
12764
- import { jsx as jsx42 } from "react/jsx-runtime";
12931
+ import { jsx as jsx43 } from "react/jsx-runtime";
12765
12932
  function InlineSearchRenderer({
12766
12933
  id,
12767
12934
  isLoading,
@@ -12773,7 +12940,7 @@ function InlineSearchRenderer({
12773
12940
  const [hasSearched, setHasSearched] = useState8(false);
12774
12941
  const trackEvent = useTrackEvent();
12775
12942
  const intl = useIntl9();
12776
- 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(
12777
12944
  Typeahead,
12778
12945
  {
12779
12946
  id: "typeahead-input-id",
@@ -12781,10 +12948,10 @@ function InlineSearchRenderer({
12781
12948
  name: "typeahead-input-name",
12782
12949
  size: "md",
12783
12950
  maxHeight: 100,
12784
- footer: /* @__PURE__ */ jsx42(TypeaheadFooter, { state, isLoading }),
12951
+ footer: /* @__PURE__ */ jsx43(TypeaheadFooter, { state, isLoading }),
12785
12952
  multiple: false,
12786
12953
  clearable: false,
12787
- addon: /* @__PURE__ */ jsx42(Search, { size: 24 }),
12954
+ addon: /* @__PURE__ */ jsx43(Search, { size: 24 }),
12788
12955
  options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
12789
12956
  minQueryLength: 1,
12790
12957
  onChange: (values) => {
@@ -12821,29 +12988,29 @@ function mapResultToTypeaheadOption(result) {
12821
12988
  function TypeaheadFooter({ state, isLoading }) {
12822
12989
  const { formatMessage } = useIntl9();
12823
12990
  if (state.type === "noResults") {
12824
- 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 });
12825
12992
  }
12826
12993
  if (state.type === "error") {
12827
- 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 }) });
12828
12995
  }
12829
12996
  if (state.type === "pending" || isLoading) {
12830
- 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) });
12831
12998
  }
12832
12999
  return null;
12833
13000
  }
12834
13001
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
12835
13002
 
12836
13003
  // ../renderers/src/SearchRenderer/SearchRenderer.tsx
12837
- import { jsx as jsx43 } from "react/jsx-runtime";
13004
+ import { jsx as jsx44 } from "react/jsx-runtime";
12838
13005
  var SearchRenderer = {
12839
13006
  canRenderType: "search",
12840
- 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))
12841
13008
  };
12842
13009
  var SearchRenderer_default = SearchRenderer;
12843
13010
 
12844
13011
  // ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
12845
13012
  import { RadioGroup } from "@transferwise/components";
12846
- 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";
12847
13014
  function RadioInputRendererComponent(props) {
12848
13015
  const {
12849
13016
  id,
@@ -12858,7 +13025,7 @@ function RadioInputRendererComponent(props) {
12858
13025
  onSelect
12859
13026
  } = props;
12860
13027
  return /* @__PURE__ */ jsxs14(Fragment6, { children: [
12861
- /* @__PURE__ */ jsx44(
13028
+ /* @__PURE__ */ jsx45(
12862
13029
  FieldInput_default,
12863
13030
  {
12864
13031
  id,
@@ -12866,7 +13033,7 @@ function RadioInputRendererComponent(props) {
12866
13033
  help,
12867
13034
  description,
12868
13035
  validation: validationState,
12869
- children: /* @__PURE__ */ jsx44("span", { children: /* @__PURE__ */ jsx44(
13036
+ children: /* @__PURE__ */ jsx45("span", { children: /* @__PURE__ */ jsx45(
12870
13037
  RadioGroup,
12871
13038
  {
12872
13039
  name: id,
@@ -12875,7 +13042,7 @@ function RadioInputRendererComponent(props) {
12875
13042
  value: index,
12876
13043
  secondary: option.description,
12877
13044
  disabled: option.disabled || disabled,
12878
- avatar: /* @__PURE__ */ jsx44(OptionMedia, { icon: option.icon, image: option.image })
13045
+ avatar: /* @__PURE__ */ jsx45(OptionMedia, { icon: option.icon, image: option.image })
12879
13046
  })),
12880
13047
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
12881
13048
  onChange: onSelect
@@ -12891,7 +13058,7 @@ function RadioInputRendererComponent(props) {
12891
13058
  // ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
12892
13059
  import { Tabs } from "@transferwise/components";
12893
13060
  import { useEffect as useEffect4 } from "react";
12894
- 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";
12895
13062
  function TabInputRendererComponent(props) {
12896
13063
  const {
12897
13064
  id,
@@ -12911,7 +13078,7 @@ function TabInputRendererComponent(props) {
12911
13078
  }
12912
13079
  }, [selectedIndex, onSelect, options.length]);
12913
13080
  return /* @__PURE__ */ jsxs15(Fragment7, { children: [
12914
- /* @__PURE__ */ jsx45(
13081
+ /* @__PURE__ */ jsx46(
12915
13082
  FieldInput_default,
12916
13083
  {
12917
13084
  id,
@@ -12919,7 +13086,7 @@ function TabInputRendererComponent(props) {
12919
13086
  help,
12920
13087
  description,
12921
13088
  validation: validationState,
12922
- children: /* @__PURE__ */ jsx45(
13089
+ children: /* @__PURE__ */ jsx46(
12923
13090
  Tabs,
12924
13091
  {
12925
13092
  name: id,
@@ -12928,7 +13095,7 @@ function TabInputRendererComponent(props) {
12928
13095
  title: option.title,
12929
13096
  // if we pass null, we get some props-types console errors
12930
13097
  // eslint-disable-next-line react/jsx-no-useless-fragment
12931
- content: /* @__PURE__ */ jsx45(Fragment7, {}),
13098
+ content: /* @__PURE__ */ jsx46(Fragment7, {}),
12932
13099
  disabled: option.disabled || disabled
12933
13100
  })),
12934
13101
  onTabSelect: onSelect
@@ -12943,28 +13110,11 @@ var isValidIndex = (index, options) => index !== null && index >= 0 && index < o
12943
13110
 
12944
13111
  // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
12945
13112
  import { SelectInput as SelectInput2, SelectInputOptionContent as SelectInputOptionContent2 } from "@transferwise/components";
12946
-
12947
- // ../renderers/src/SelectInputRenderer/SelectTriggerMedia.tsx
12948
- import { Avatar as Avatar3, AvatarType as AvatarType3 } from "@transferwise/components";
12949
- import { jsx as jsx46 } from "react/jsx-runtime";
12950
- function SelectTriggerMedia({ icon, image }) {
12951
- if (image == null ? void 0 : image.url) {
12952
- return null;
12953
- }
12954
- if (icon && "name" in icon) {
12955
- return /* @__PURE__ */ jsx46(Avatar3, { type: AvatarType3.ICON, size: 24, children: /* @__PURE__ */ jsx46(DynamicIcon_default, { name: icon.name }) });
12956
- }
12957
- if (icon && "text" in icon) {
12958
- return /* @__PURE__ */ jsx46(Avatar3, { type: AvatarType3.ICON, size: 24, children: icon.text });
12959
- }
12960
- return null;
12961
- }
12962
-
12963
- // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
12964
13113
  import { Fragment as Fragment8, jsx as jsx47, jsxs as jsxs16 } from "react/jsx-runtime";
12965
13114
  function SelectInputRendererComponent(props) {
12966
13115
  const {
12967
13116
  id,
13117
+ autoComplete,
12968
13118
  children,
12969
13119
  description,
12970
13120
  disabled,
@@ -12996,7 +13146,7 @@ function SelectInputRendererComponent(props) {
12996
13146
  const contentProps = withinTrigger ? {
12997
13147
  title: option.title,
12998
13148
  note: option.description,
12999
- icon: /* @__PURE__ */ jsx47(SelectTriggerMedia, { icon: option.icon, image: option.image })
13149
+ icon: getIconAvatar(option)
13000
13150
  } : {
13001
13151
  title: option.title,
13002
13152
  description: option.description,
@@ -13004,6 +13154,7 @@ function SelectInputRendererComponent(props) {
13004
13154
  };
13005
13155
  return /* @__PURE__ */ jsx47(SelectInputOptionContent2, __spreadValues({}, contentProps));
13006
13156
  };
13157
+ const extraProps = { autoComplete };
13007
13158
  return /* @__PURE__ */ jsxs16(Fragment8, { children: [
13008
13159
  /* @__PURE__ */ jsx47(
13009
13160
  FieldInput_default,
@@ -13015,7 +13166,7 @@ function SelectInputRendererComponent(props) {
13015
13166
  validation: validationState,
13016
13167
  children: /* @__PURE__ */ jsx47(
13017
13168
  SelectInput2,
13018
- {
13169
+ __spreadValues({
13019
13170
  name: id,
13020
13171
  placeholder,
13021
13172
  items,
@@ -13025,7 +13176,7 @@ function SelectInputRendererComponent(props) {
13025
13176
  filterable: items.length >= 8,
13026
13177
  onChange: onSelect,
13027
13178
  onClear: required ? void 0 : () => onSelect(null)
13028
- }
13179
+ }, extraProps)
13029
13180
  )
13030
13181
  }
13031
13182
  ),
@@ -13152,6 +13303,9 @@ var mapStatus = (status) => {
13152
13303
  return status;
13153
13304
  };
13154
13305
 
13306
+ // ../renderers/src/TextInputRenderer.tsx
13307
+ import { InputGroup as InputGroup3 } from "@transferwise/components";
13308
+
13155
13309
  // ../renderers/src/components/VariableTextInput.tsx
13156
13310
  import {
13157
13311
  Input as Input5,
@@ -13239,6 +13393,8 @@ var TextInputRenderer = {
13239
13393
  description,
13240
13394
  help,
13241
13395
  error,
13396
+ icon,
13397
+ image,
13242
13398
  maxLength,
13243
13399
  minLength,
13244
13400
  type,
@@ -13251,6 +13407,8 @@ var TextInputRenderer = {
13251
13407
  "description",
13252
13408
  "help",
13253
13409
  "error",
13410
+ "icon",
13411
+ "image",
13254
13412
  "maxLength",
13255
13413
  "minLength",
13256
13414
  "type",
@@ -13267,7 +13425,7 @@ var TextInputRenderer = {
13267
13425
  description,
13268
13426
  validation: validationState,
13269
13427
  help,
13270
- children: /* @__PURE__ */ jsx52(VariableTextInput_default, { control, inputProps })
13428
+ children: /* @__PURE__ */ jsx52(InputGroup3, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx52(VariableTextInput_default, { control, inputProps }) })
13271
13429
  }
13272
13430
  );
13273
13431
  }
@@ -13835,10 +13993,10 @@ function convertDecisionStepToDynamicLayout(step) {
13835
13993
  }
13836
13994
  return layout;
13837
13995
  }
13838
- function dynamicBox(components, size) {
13996
+ function dynamicBox(components, size2) {
13839
13997
  return {
13840
13998
  type: "box",
13841
- width: size || "md",
13999
+ width: size2 || "md",
13842
14000
  components
13843
14001
  };
13844
14002
  }
@@ -15040,9 +15198,9 @@ import { Avatar as Avatar5, AvatarType as AvatarType4 } from "@transferwise/comp
15040
15198
 
15041
15199
  // src/legacy/layout/icon/FlagIcon.tsx
15042
15200
  import { jsx as jsx66 } from "react/jsx-runtime";
15043
- var isFlagIcon2 = (name) => name.startsWith("flag-");
15201
+ var isFlagIcon3 = (name) => name.startsWith("flag-");
15044
15202
  function FlagIcon2({ name }) {
15045
- if (!isFlagIcon2(name)) {
15203
+ if (!isFlagIcon3(name)) {
15046
15204
  return null;
15047
15205
  }
15048
15206
  const code = name.substring(5);
@@ -15052,12 +15210,12 @@ function FlagIcon2({ name }) {
15052
15210
  // src/legacy/layout/icon/NamedIcon.tsx
15053
15211
  import * as icons2 from "@transferwise/icons";
15054
15212
  import { jsx as jsx67 } from "react/jsx-runtime";
15055
- var isNamedIcon2 = (name) => {
15213
+ var isNamedIcon3 = (name) => {
15056
15214
  const iconName = toCapitalisedCamelCase2(name);
15057
15215
  return Object.keys(icons2).includes(iconName);
15058
15216
  };
15059
15217
  function NamedIcon2({ name }) {
15060
- if (!isNamedIcon2(name)) {
15218
+ if (!isNamedIcon3(name)) {
15061
15219
  return null;
15062
15220
  }
15063
15221
  const iconName = toCapitalisedCamelCase2(name);
@@ -15070,16 +15228,16 @@ var capitaliseFirstChar2 = (value) => `${value[0].toUpperCase()}${value.slice(1)
15070
15228
  // src/legacy/layout/icon/DynamicIcon.tsx
15071
15229
  import { jsx as jsx68 } from "react/jsx-runtime";
15072
15230
  function DynamicIcon2({ type }) {
15073
- if (isFlagIcon2(type)) {
15231
+ if (isFlagIcon3(type)) {
15074
15232
  return /* @__PURE__ */ jsx68(FlagIcon2, { name: type });
15075
15233
  }
15076
- if (isNamedIcon2(type)) {
15234
+ if (isNamedIcon3(type)) {
15077
15235
  return /* @__PURE__ */ jsx68(NamedIcon2, { name: type });
15078
15236
  }
15079
15237
  return null;
15080
15238
  }
15081
15239
  function isValidIconName(name) {
15082
- return isNamedIcon2(name) || isFlagIcon2(name);
15240
+ return isNamedIcon3(name) || isFlagIcon3(name);
15083
15241
  }
15084
15242
  var DynamicIcon_default2 = DynamicIcon2;
15085
15243
 
@@ -15100,8 +15258,8 @@ var getNavigationOptionMedia = ({ icon, image }) => {
15100
15258
  };
15101
15259
 
15102
15260
  // src/legacy/layout/utils/index.ts
15103
- var getMargin2 = (size) => {
15104
- switch (size) {
15261
+ var getMargin2 = (size2) => {
15262
+ switch (size2) {
15105
15263
  case "xs":
15106
15264
  return "m-b-0";
15107
15265
  case "sm":
@@ -15151,6 +15309,29 @@ var getAlertAction = (component, onAction) => {
15151
15309
  return void 0;
15152
15310
  }
15153
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
+ }
15154
15335
  const { action, link } = behavior;
15155
15336
  if (link) {
15156
15337
  return {
@@ -15283,8 +15464,8 @@ var getButtonType = (context, action) => {
15283
15464
  var getButtonTypeFromContext = (context) => {
15284
15465
  return context ? contextToType[context] : "accent";
15285
15466
  };
15286
- var getButtonSize = (size) => {
15287
- switch (size) {
15467
+ var getButtonSize = (size2) => {
15468
+ switch (size2) {
15288
15469
  case "xs":
15289
15470
  case "sm":
15290
15471
  return "sm";
@@ -15333,7 +15514,7 @@ function DynamicButtonWithoutBehavior(props) {
15333
15514
  }
15334
15515
  function DynamicButtonWithBehavior(props) {
15335
15516
  var _a, _b;
15336
- const { component } = props;
15517
+ const { component, onAction } = props;
15337
15518
  const type = getButtonTypeFromContext(component.context);
15338
15519
  const priority = (_a = component.control) != null ? _a : "secondary";
15339
15520
  const { loading } = useDynamicFlow();
@@ -15342,11 +15523,31 @@ function DynamicButtonWithBehavior(props) {
15342
15523
  const title = (_b = component.title) != null ? _b : "";
15343
15524
  const onClick = () => {
15344
15525
  const { behavior } = component;
15345
- if (behavior == null ? void 0 : behavior.action) {
15346
- props.onAction(behavior.action);
15526
+ if (!behavior) {
15527
+ return;
15347
15528
  }
15348
- if (behavior == null ? void 0 : behavior.link) {
15349
- 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
+ }
15350
15551
  }
15351
15552
  };
15352
15553
  return /* @__PURE__ */ jsx72(
@@ -15822,7 +16023,7 @@ var mapImage = (image) => {
15822
16023
  return null;
15823
16024
  };
15824
16025
  var getIconPropertyForSelectOption = (icon) => {
15825
- if ((icon == null ? void 0 : icon.name) && isFlagIcon2(icon.name)) {
16026
+ if ((icon == null ? void 0 : icon.name) && isFlagIcon3(icon.name)) {
15826
16027
  return {
15827
16028
  icon: /* @__PURE__ */ jsx80(Flag, { code: icon.name.substring(5), intrinsicSize: 24 })
15828
16029
  };
@@ -16879,7 +17080,7 @@ var _FormControl = class _FormControl extends PureComponent {
16879
17080
  max,
16880
17081
  searchPlaceholder,
16881
17082
  onSearchChange,
16882
- size,
17083
+ size: size2,
16883
17084
  uploadProps,
16884
17085
  label,
16885
17086
  description,
@@ -17067,7 +17268,7 @@ var _FormControl = class _FormControl extends PureComponent {
17067
17268
  dayAutoComplete: this.getAutocompleteValue({ suffix: "-day" }),
17068
17269
  yearAutoComplete: this.getAutocompleteValue({ suffix: "-year" }),
17069
17270
  disabled,
17070
- size,
17271
+ size: size2,
17071
17272
  value: getSafeDateOrStringValue(value),
17072
17273
  mode,
17073
17274
  monthFormat,
@@ -17103,7 +17304,7 @@ var _FormControl = class _FormControl extends PureComponent {
17103
17304
  placeholder,
17104
17305
  required,
17105
17306
  searchPlaceholder,
17106
- size,
17307
+ size: size2,
17107
17308
  initialValue: getSafeStringValue(value),
17108
17309
  onBlur: this.handleOnBlur,
17109
17310
  onChange: (value2) => this.handleOnChange(value2),
@@ -18116,12 +18317,12 @@ var import_classnames13 = __toESM(require_classnames());
18116
18317
  import { Display as Display2 } from "@transferwise/components";
18117
18318
  import { jsx as jsx103 } from "react/jsx-runtime";
18118
18319
  var DynamicHeading = (props) => {
18119
- const { text, size = "md", align = "left", margin = "md", control } = props.component;
18320
+ const { text, size: size2 = "md", align = "left", margin = "md", control } = props.component;
18120
18321
  const classes = (0, import_classnames13.default)(getTextAlignmentAndMargin2({ align, margin }));
18121
- 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 });
18122
18323
  };
18123
- var StandardHeading2 = ({ size, text, classes }) => {
18124
- switch (size) {
18324
+ var StandardHeading2 = ({ size: size2, text, classes }) => {
18325
+ switch (size2) {
18125
18326
  case "xs":
18126
18327
  return /* @__PURE__ */ jsx103("h5", { className: classes, children: text });
18127
18328
  case "sm":
@@ -18135,8 +18336,8 @@ var StandardHeading2 = ({ size, text, classes }) => {
18135
18336
  return /* @__PURE__ */ jsx103("h3", { className: classes, children: text });
18136
18337
  }
18137
18338
  };
18138
- var DisplayHeading2 = ({ size, text, classes }) => {
18139
- switch (size) {
18339
+ var DisplayHeading2 = ({ size: size2, text, classes }) => {
18340
+ switch (size2) {
18140
18341
  case "xs":
18141
18342
  case "sm":
18142
18343
  return /* @__PURE__ */ jsx103(Display2, { type: "display-small", className: classes, children: text });
@@ -18166,7 +18367,7 @@ import { Image as Image2 } from "@transferwise/components";
18166
18367
  import { useEffect as useEffect16, useState as useState22 } from "react";
18167
18368
  import { jsx as jsx105 } from "react/jsx-runtime";
18168
18369
  function DynamicImage({ component: image }) {
18169
- const { url, size, text, margin, accessibilityDescription } = image;
18370
+ const { url, size: size2, text, margin, accessibilityDescription } = image;
18170
18371
  const httpClient = useHttpClient();
18171
18372
  const [imageSource, setImageSource] = useState22("");
18172
18373
  useEffect16(() => {
@@ -18181,7 +18382,7 @@ function DynamicImage({ component: image }) {
18181
18382
  if (!imageSource) {
18182
18383
  return null;
18183
18384
  }
18184
- 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)) });
18185
18386
  }
18186
18387
  var readImageBlobAsDataURL2 = (imageBlob) => (
18187
18388
  // we can safely assume the type of reader.result is string
@@ -18359,6 +18560,28 @@ var callToActionToSummaryAction = (callToAction, onAction) => {
18359
18560
  return void 0;
18360
18561
  }
18361
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
+ }
18362
18585
  if (behavior.link) {
18363
18586
  const { link } = behavior;
18364
18587
  return {
@@ -18402,11 +18625,11 @@ var DynamicStatusList_default = DynamicStatusList;
18402
18625
  import { Loader as Loader3 } from "@transferwise/components";
18403
18626
  import { jsx as jsx109 } from "react/jsx-runtime";
18404
18627
  var DynamicLoadingIndicator = ({ component }) => {
18405
- const { margin = "md", size = "md" } = component;
18628
+ const { margin = "md", size: size2 = "md" } = component;
18406
18629
  return /* @__PURE__ */ jsx109(
18407
18630
  Loader3,
18408
18631
  {
18409
- size,
18632
+ size: size2,
18410
18633
  classNames: {
18411
18634
  "tw-loader": `tw-loader m-x-auto ${getMargin2(margin)}`
18412
18635
  },
@@ -18521,13 +18744,29 @@ var getDefinitionListLayout = (review) => {
18521
18744
  return "VERTICAL_ONE_COLUMN";
18522
18745
  }
18523
18746
  };
18524
- function DynamicReview(props) {
18525
- var _a;
18526
- const review = props.component;
18747
+ function DynamicReview({ component: review, onAction }) {
18748
+ var _a, _b;
18527
18749
  const margin = getMargin2(review.margin || "xs");
18528
18750
  const getReviewAction3 = (callToAction2) => {
18529
18751
  const { title, action, behavior } = callToAction2;
18530
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
+ }
18531
18770
  const { action: behaviorAction, link } = behavior;
18532
18771
  if (behaviorAction) {
18533
18772
  return {
@@ -18551,7 +18790,7 @@ function DynamicReview(props) {
18551
18790
  return (event) => {
18552
18791
  event.preventDefault();
18553
18792
  if (action) {
18554
- props.onAction(action);
18793
+ onAction(action);
18555
18794
  }
18556
18795
  };
18557
18796
  };
@@ -18559,7 +18798,7 @@ function DynamicReview(props) {
18559
18798
  const callToAction = review.callToAction ? getReviewAction3(review.callToAction) : null;
18560
18799
  const legacyCallToAction = !callToAction && review.action ? { text: (_a = review.action.title) != null ? _a : "", onClick: getOnClick(review.action) } : null;
18561
18800
  return /* @__PURE__ */ jsxs40("div", { className: margin, children: [
18562
- 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 }),
18563
18802
  /* @__PURE__ */ jsx111("div", { className: margin, children: /* @__PURE__ */ jsx111(DefinitionList3, { layout: orientation, definitions: getDefinitions(orientation, review) }) })
18564
18803
  ] });
18565
18804
  }