@wise/dynamic-flow-client-internal 5.20.0-exp-box-cq-2-e95523a → 5.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/main.js CHANGED
@@ -145,7 +145,7 @@ var import_dynamic_flow_client4 = require("@wise/dynamic-flow-client");
145
145
  // src/dynamicFlow/telemetry/app-version.ts
146
146
  var appVersion = (
147
147
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
148
- typeof process !== "undefined" ? "5.19.3" : "0.0.0"
148
+ typeof process !== "undefined" ? "5.21.0" : "0.0.0"
149
149
  );
150
150
 
151
151
  // src/dynamicFlow/context-menu/useContextMenu.tsx
@@ -329,7 +329,7 @@ var recursivelyRemoveNullish = (element) => {
329
329
  };
330
330
 
331
331
  // src/dynamicFlow/useWiseToCoreProps.tsx
332
- var import_react26 = require("react");
332
+ var import_react25 = require("react");
333
333
 
334
334
  // src/dynamicFlow/getMergedRenderers.tsx
335
335
  var import_dynamic_flow_client2 = require("@wise/dynamic-flow-client");
@@ -395,30 +395,25 @@ var AlertRenderer_default = AlertRenderer;
395
395
  // ../renderers/src/BoxRenderer.tsx
396
396
  var import_classnames = __toESM(require_classnames());
397
397
  var import_jsx_runtime3 = require("react/jsx-runtime");
398
- var getBoxRenderer = (className) => {
399
- const renderer = {
400
- canRenderType: "box",
401
- render: ({ children, control, margin, width }) => {
402
- const hasFixedWidth = width !== "xl";
403
- const hasBorder = control === "bordered" || control === "bordered-web";
404
- const contents = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
405
- "div",
406
- {
407
- className: (0, import_classnames.default)({
408
- [className]: !!className,
409
- "df-box-renderer-border": hasBorder,
410
- [`df-box-renderer-width-${width}`]: hasFixedWidth,
411
- [getMargin(margin)]: !hasFixedWidth
412
- }),
413
- children
414
- }
415
- );
416
- return hasFixedWidth ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: (0, import_classnames.default)("df-box-renderer-fixed-width", getMargin(margin)), children: contents }) : contents;
417
- }
418
- };
419
- return renderer;
398
+ var BoxRenderer = {
399
+ canRenderType: "box",
400
+ render: ({ children, control, margin, width }) => {
401
+ const hasFixedWidth = width !== "xl";
402
+ const hasBorder = control === "bordered" || control === "bordered-web";
403
+ const contents = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
404
+ "div",
405
+ {
406
+ className: (0, import_classnames.default)("df-box-renderer", {
407
+ "df-box-renderer-border": hasBorder,
408
+ [`df-box-renderer-width-${width}`]: hasFixedWidth,
409
+ [getMargin(margin)]: !hasFixedWidth
410
+ }),
411
+ children
412
+ }
413
+ );
414
+ return hasFixedWidth ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: (0, import_classnames.default)("df-box-renderer-fixed-width", getMargin(margin)), children: contents }) : contents;
415
+ }
420
416
  };
421
- var BoxRenderer = getBoxRenderer("df-box-renderer");
422
417
  var BoxRenderer_default = BoxRenderer;
423
418
 
424
419
  // ../renderers/src/ButtonRenderer/AddressValidationButtonRenderer.tsx
@@ -874,11 +869,24 @@ var getPriority = (control, tags) => {
874
869
  return control && isButtonPriority(control) ? control : "secondary";
875
870
  };
876
871
 
872
+ // ../renderers/src/CheckboxInputRenderer.tsx
873
+ var import_components11 = require("@transferwise/components");
874
+
877
875
  // ../renderers/src/components/FieldInput.tsx
878
876
  var import_components8 = require("@transferwise/components");
879
- var import_react4 = require("react");
880
877
 
881
- // ../renderers/src/utils/scroll-to-if-not-visible.ts
878
+ // ../renderers/src/utils/useScrollToError.ts
879
+ var import_react4 = require("react");
880
+ var useScrollToError = (validationState, features) => {
881
+ const ref = (0, import_react4.useRef)(null);
882
+ const enabled = (features == null ? void 0 : features.scrollToError) !== false;
883
+ (0, import_react4.useEffect)(() => {
884
+ if ((validationState == null ? void 0 : validationState.status) === "invalid" && (validationState == null ? void 0 : validationState.message) && enabled) {
885
+ scrollToIfNotVisible(ref.current);
886
+ }
887
+ }, [validationState == null ? void 0 : validationState.status, validationState == null ? void 0 : validationState.message, enabled]);
888
+ return { ref };
889
+ };
882
890
  var scrollToIfNotVisible = (ref) => {
883
891
  const rect = ref == null ? void 0 : ref.getBoundingClientRect();
884
892
  if (!ref || !rect) {
@@ -939,23 +947,19 @@ function FieldInput({
939
947
  description,
940
948
  help,
941
949
  loadingState = "idle",
942
- inlineAlert
950
+ inlineAlert,
951
+ features
943
952
  }) {
953
+ var _a;
944
954
  const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(LabelContentWithHelp, { text: label, help }) : label;
945
- const message = validation == null ? void 0 : validation.message;
946
- const ref = (0, import_react4.useRef)(null);
947
- (0, import_react4.useEffect)(() => {
948
- if (message) {
949
- scrollToIfNotVisible(ref.current);
950
- }
951
- }, [message]);
955
+ const { ref } = useScrollToError(validation, features);
952
956
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { ref, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
953
957
  import_components8.Field,
954
958
  {
955
959
  id,
956
960
  label: labelContent,
957
961
  description,
958
- message: message != null ? message : inlineAlert == null ? void 0 : inlineAlert.content,
962
+ message: (_a = validation == null ? void 0 : validation.message) != null ? _a : inlineAlert == null ? void 0 : inlineAlert.content,
959
963
  messageLoading: loadingState !== "idle",
960
964
  sentiment: mapStatusToSentiment(validation, inlineAlert == null ? void 0 : inlineAlert.context),
961
965
  children
@@ -975,33 +979,30 @@ var mapStatusToSentiment = (validation, defaultContext) => {
975
979
  };
976
980
  var FieldInput_default = FieldInput;
977
981
 
978
- // ../renderers/src/CheckboxInputRenderer.tsx
979
- var import_components11 = require("@transferwise/components");
980
-
981
- // ../renderers/src/utils/listItem/getMedia.tsx
982
- var import_jsx_runtime20 = require("react/jsx-runtime");
983
- var getMedia = (media, preferAvatar) => media ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(OptionMedia, { media, preferAvatar }) : void 0;
984
-
985
982
  // ../renderers/src/utils/listItem/getAdditionalText.tsx
986
983
  var import_components9 = require("@transferwise/components");
987
- var import_jsx_runtime21 = require("react/jsx-runtime");
984
+ var import_jsx_runtime20 = require("react/jsx-runtime");
988
985
  var getAdditionalText = (additionalText) => {
989
986
  if (!additionalText) {
990
987
  return void 0;
991
988
  }
992
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components9.ListItem.AdditionalInfo, { children: additionalText });
989
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_components9.ListItem.AdditionalInfo, { children: additionalText });
993
990
  };
994
991
 
992
+ // ../renderers/src/utils/listItem/getInlineAlert.tsx
993
+ var import_components10 = require("@transferwise/components");
994
+ var import_jsx_runtime21 = require("react/jsx-runtime");
995
+ var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components10.ListItem.Prompt, { sentiment: inlineAlert == null ? void 0 : inlineAlert.context, children: inlineAlert.content }) : void 0;
996
+
997
+ // ../renderers/src/utils/listItem/getMedia.tsx
998
+ var import_jsx_runtime22 = require("react/jsx-runtime");
999
+ var getMedia = (media, preferAvatar) => media ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(OptionMedia, { media, preferAvatar }) : void 0;
1000
+
995
1001
  // ../renderers/src/utils/listItem/getSupportingValues.ts
996
1002
  var getSupportingValues = (supportingValues) => {
997
1003
  return __spreadValues(__spreadValues({}, (supportingValues == null ? void 0 : supportingValues.value) ? { valueTitle: supportingValues.value } : {}), (supportingValues == null ? void 0 : supportingValues.subvalue) ? { valueSubtitle: supportingValues.subvalue } : {});
998
1004
  };
999
1005
 
1000
- // ../renderers/src/utils/listItem/getInlineAlert.tsx
1001
- var import_components10 = require("@transferwise/components");
1002
- var import_jsx_runtime22 = require("react/jsx-runtime");
1003
- var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_components10.ListItem.Prompt, { sentiment: inlineAlert == null ? void 0 : inlineAlert.context, children: inlineAlert.content }) : void 0;
1004
-
1005
1006
  // ../renderers/src/CheckboxInputRenderer.tsx
1006
1007
  var import_jsx_runtime23 = require("react/jsx-runtime");
1007
1008
  var CheckboxInputRenderer = {
@@ -1049,6 +1050,7 @@ var CheckboxComponent = (props) => {
1049
1050
  help,
1050
1051
  inlineAlert: rest.inlineAlert,
1051
1052
  loadingState: rest.fieldLoadingState,
1053
+ features: rest.features,
1052
1054
  children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components11.Checkbox, __spreadValues({ id }, checkboxProps))
1053
1055
  }
1054
1056
  );
@@ -1064,9 +1066,11 @@ var CheckboxItemComponent = (props) => {
1064
1066
  title,
1065
1067
  validationState,
1066
1068
  value,
1069
+ features,
1067
1070
  onChange
1068
1071
  } = props;
1069
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1072
+ const { ref } = useScrollToError(validationState, features);
1073
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { ref, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1070
1074
  import_components11.ListItem,
1071
1075
  __spreadValues({
1072
1076
  title,
@@ -1077,7 +1081,7 @@ var CheckboxItemComponent = (props) => {
1077
1081
  prompt: getInlineAlertOrValidation(validationState, inlineAlert),
1078
1082
  control: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components11.ListItem.Checkbox, { checked: value, onChange: () => onChange(!value) })
1079
1083
  }, getSupportingValues(supportingValues))
1080
- );
1084
+ ) });
1081
1085
  };
1082
1086
  var SwitchItemComponent = (props) => {
1083
1087
  const {
@@ -1090,9 +1094,11 @@ var SwitchItemComponent = (props) => {
1090
1094
  title,
1091
1095
  validationState,
1092
1096
  value,
1097
+ features,
1093
1098
  onChange
1094
1099
  } = props;
1095
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1100
+ const { ref } = useScrollToError(validationState, features);
1101
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { ref, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1096
1102
  import_components11.ListItem,
1097
1103
  __spreadValues({
1098
1104
  title,
@@ -1103,7 +1109,7 @@ var SwitchItemComponent = (props) => {
1103
1109
  prompt: getInlineAlertOrValidation(validationState, inlineAlert),
1104
1110
  control: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components11.ListItem.Switch, { checked: value, onClick: () => onChange(!value) })
1105
1111
  }, getSupportingValues(supportingValues))
1106
- );
1112
+ ) });
1107
1113
  };
1108
1114
  var getInlineAlertOrValidation = (validationState, inlineAlert) => {
1109
1115
  if ((validationState == null ? void 0 : validationState.status) === "invalid") {
@@ -1246,6 +1252,7 @@ var DateInputRenderer = {
1246
1252
  inlineAlert: props.inlineAlert,
1247
1253
  loadingState: props.fieldLoadingState,
1248
1254
  help,
1255
+ features: props.features,
1249
1256
  children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(VariableDateInput_default, { control, inputProps })
1250
1257
  }
1251
1258
  );
@@ -1935,6 +1942,7 @@ var IntegerInputRenderer = {
1935
1942
  inlineAlert: props.inlineAlert,
1936
1943
  loadingState: props.fieldLoadingState,
1937
1944
  help,
1945
+ features: props.features,
1938
1946
  children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components23.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
1939
1947
  import_components23.Input,
1940
1948
  __spreadValues({
@@ -2198,6 +2206,7 @@ function MoneyInputRendererComponent(props) {
2198
2206
  description,
2199
2207
  validation: validationState,
2200
2208
  help,
2209
+ features: props.features,
2201
2210
  children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
2202
2211
  import_components31.MoneyInput,
2203
2212
  {
@@ -2267,6 +2276,7 @@ function InlineComponent(props) {
2267
2276
  id,
2268
2277
  description,
2269
2278
  disabled,
2279
+ features,
2270
2280
  help,
2271
2281
  options,
2272
2282
  selectedIndices,
@@ -2282,6 +2292,7 @@ function InlineComponent(props) {
2282
2292
  help,
2283
2293
  description,
2284
2294
  validation: validationState,
2295
+ features,
2285
2296
  children: options.map((option, index) => {
2286
2297
  var _a;
2287
2298
  const {
@@ -2349,6 +2360,7 @@ function DefaultComponent(props) {
2349
2360
  autoComplete,
2350
2361
  description,
2351
2362
  disabled,
2363
+ features,
2352
2364
  help,
2353
2365
  options,
2354
2366
  placeholder,
@@ -2394,6 +2406,7 @@ function DefaultComponent(props) {
2394
2406
  help,
2395
2407
  description,
2396
2408
  validation: validationState,
2409
+ features,
2397
2410
  children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
2398
2411
  import_components33.SelectInput,
2399
2412
  __spreadValues({
@@ -2440,6 +2453,7 @@ function InlineCheckboxComponent(props) {
2440
2453
  id,
2441
2454
  description,
2442
2455
  disabled,
2456
+ features,
2443
2457
  help,
2444
2458
  options,
2445
2459
  selectedIndices,
@@ -2455,6 +2469,7 @@ function InlineCheckboxComponent(props) {
2455
2469
  help,
2456
2470
  description,
2457
2471
  validation: validationState,
2472
+ features,
2458
2473
  children: options.map((option, index) => {
2459
2474
  var _a;
2460
2475
  const {
@@ -2501,7 +2516,6 @@ var MultiSelectInputRenderer = {
2501
2516
  var import_components36 = require("@transferwise/components");
2502
2517
 
2503
2518
  // ../renderers/src/components/UploadFieldInput.tsx
2504
- var import_react13 = require("react");
2505
2519
  var import_components35 = require("@transferwise/components");
2506
2520
  var import_classnames4 = __toESM(require_classnames());
2507
2521
  var import_jsx_runtime57 = require("react/jsx-runtime");
@@ -2511,17 +2525,12 @@ function UploadFieldInput({
2511
2525
  label,
2512
2526
  description,
2513
2527
  help,
2514
- validation
2528
+ validation,
2529
+ features
2515
2530
  }) {
2516
2531
  const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(LabelContentWithHelp, { text: label, help }) : label;
2517
2532
  const descriptionId = description ? `${id}-description` : void 0;
2518
- const message = validation == null ? void 0 : validation.message;
2519
- const ref = (0, import_react13.useRef)(null);
2520
- (0, import_react13.useEffect)(() => {
2521
- if (message) {
2522
- scrollToIfNotVisible(ref.current);
2523
- }
2524
- }, [message]);
2533
+ const { ref } = useScrollToError(validation, features);
2525
2534
  return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
2526
2535
  "div",
2527
2536
  {
@@ -2578,6 +2587,7 @@ var MultiUploadInputRenderer = {
2578
2587
  title,
2579
2588
  description,
2580
2589
  disabled,
2590
+ features,
2581
2591
  maxSize,
2582
2592
  maxItems,
2583
2593
  uploadLabel,
@@ -2600,6 +2610,7 @@ var MultiUploadInputRenderer = {
2600
2610
  description,
2601
2611
  validation: validationState,
2602
2612
  help,
2613
+ features,
2603
2614
  children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
2604
2615
  import_components36.UploadInput,
2605
2616
  {
@@ -2653,6 +2664,7 @@ var NumberInputRenderer = {
2653
2664
  inlineAlert: props.inlineAlert,
2654
2665
  loadingState: props.fieldLoadingState,
2655
2666
  help,
2667
+ features: props.features,
2656
2668
  children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_components37.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
2657
2669
  import_components37.Input,
2658
2670
  __spreadValues({
@@ -2678,9 +2690,9 @@ var import_react_intl15 = require("react-intl");
2678
2690
 
2679
2691
  // ../renderers/src/hooks/useSnackBarIfAvailable.ts
2680
2692
  var import_components38 = require("@transferwise/components");
2681
- var import_react14 = require("react");
2693
+ var import_react13 = require("react");
2682
2694
  function useSnackBarIfAvailable() {
2683
- const context = (0, import_react14.useContext)(import_components38.SnackbarContext);
2695
+ const context = (0, import_react13.useContext)(import_components38.SnackbarContext);
2684
2696
  return context ? context.createSnackbar : () => {
2685
2697
  };
2686
2698
  }
@@ -2774,7 +2786,7 @@ var ProgressRenderer = {
2774
2786
  var import_components41 = require("@transferwise/components");
2775
2787
  var import_icons = require("@transferwise/icons");
2776
2788
  var import_classnames6 = __toESM(require_classnames());
2777
- var import_react15 = require("react");
2789
+ var import_react14 = require("react");
2778
2790
  var import_react_intl17 = require("react-intl");
2779
2791
 
2780
2792
  // ../renderers/src/messages/repeatable.messages.ts
@@ -2814,6 +2826,7 @@ function Repeatable(props) {
2814
2826
  description,
2815
2827
  editableItem,
2816
2828
  editItemTitle,
2829
+ features,
2817
2830
  items,
2818
2831
  title,
2819
2832
  validationState,
@@ -2823,7 +2836,8 @@ function Repeatable(props) {
2823
2836
  onRemove
2824
2837
  } = props;
2825
2838
  const { formatMessage } = (0, import_react_intl17.useIntl)();
2826
- const [openModalType, setOpenModalType] = (0, import_react15.useState)(null);
2839
+ const [openModalType, setOpenModalType] = (0, import_react14.useState)(null);
2840
+ const { ref } = useScrollToError(validationState, features);
2827
2841
  const onAddItem = () => {
2828
2842
  onAdd();
2829
2843
  setOpenModalType("add");
@@ -2846,29 +2860,31 @@ function Repeatable(props) {
2846
2860
  setOpenModalType(null);
2847
2861
  };
2848
2862
  return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
2849
- title && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components41.Header, { title }),
2850
- description && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { children: description }),
2851
- /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
2852
- "div",
2853
- {
2854
- className: (0, import_classnames6.default)("form-group", {
2855
- "has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
2856
- }),
2857
- children: [
2858
- items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
2859
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
2860
- import_components41.NavigationOption,
2861
- {
2862
- media: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_icons.Plus, {}),
2863
- title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
2864
- showMediaAtAllSizes: true,
2865
- onClick: () => onAddItem()
2866
- }
2867
- ),
2868
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components41.InlineAlert, { type: "negative", children: validationState.message })
2869
- ]
2870
- }
2871
- ),
2863
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { ref, children: [
2864
+ title && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components41.Header, { title }),
2865
+ description && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { children: description }),
2866
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
2867
+ "div",
2868
+ {
2869
+ className: (0, import_classnames6.default)("form-group", {
2870
+ "has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
2871
+ }),
2872
+ children: [
2873
+ items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
2874
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
2875
+ import_components41.NavigationOption,
2876
+ {
2877
+ media: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_icons.Plus, {}),
2878
+ title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
2879
+ showMediaAtAllSizes: true,
2880
+ onClick: () => onAddItem()
2881
+ }
2882
+ ),
2883
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components41.InlineAlert, { type: "negative", children: validationState.message })
2884
+ ]
2885
+ }
2886
+ )
2887
+ ] }),
2872
2888
  /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
2873
2889
  import_components41.Modal,
2874
2890
  {
@@ -3042,7 +3058,7 @@ var ReviewRenderer_default = ReviewRenderer2;
3042
3058
 
3043
3059
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
3044
3060
  var import_components45 = require("@transferwise/components");
3045
- var import_react16 = require("react");
3061
+ var import_react15 = require("react");
3046
3062
  var import_react_intl22 = require("react-intl");
3047
3063
 
3048
3064
  // ../renderers/src/messages/search.messages.ts
@@ -3097,6 +3113,7 @@ function BlockSearchRendererComponent({
3097
3113
  id,
3098
3114
  hint,
3099
3115
  isLoading,
3116
+ features,
3100
3117
  margin,
3101
3118
  query,
3102
3119
  state,
@@ -3104,26 +3121,37 @@ function BlockSearchRendererComponent({
3104
3121
  trackEvent,
3105
3122
  onChange
3106
3123
  }) {
3107
- const [hasSearched, setHasSearched] = (0, import_react16.useState)(false);
3124
+ const [hasSearched, setHasSearched] = (0, import_react15.useState)(false);
3108
3125
  const { formatMessage } = (0, import_react_intl22.useIntl)();
3109
3126
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: getMargin(margin), children: [
3110
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_components45.InputGroup, { addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_icons3.Search, { size: 24 }) }, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3111
- import_components45.Input,
3127
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3128
+ FieldInput_default,
3112
3129
  {
3113
3130
  id,
3114
- name: id,
3115
- placeholder: hint,
3116
- type: "text",
3117
- value: query,
3118
- onChange: ({ currentTarget: { value } }) => {
3119
- if (!hasSearched) {
3120
- setHasSearched(true);
3121
- trackEvent("Search Started");
3131
+ description: "",
3132
+ validation: void 0,
3133
+ help: "",
3134
+ label: title,
3135
+ features,
3136
+ children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_components45.InputGroup, { addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_icons3.Search, { size: 24 }) }, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3137
+ import_components45.Input,
3138
+ {
3139
+ id,
3140
+ name: id,
3141
+ placeholder: hint,
3142
+ type: "text",
3143
+ value: query,
3144
+ onChange: ({ currentTarget: { value } }) => {
3145
+ if (!hasSearched) {
3146
+ setHasSearched(true);
3147
+ trackEvent("Search Started");
3148
+ }
3149
+ onChange(value);
3150
+ }
3122
3151
  }
3123
- onChange(value);
3124
- }
3152
+ ) })
3125
3153
  }
3126
- ) }) }),
3154
+ ),
3127
3155
  isLoading ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SearchResultContent, { state, trackEvent })
3128
3156
  ] });
3129
3157
  }
@@ -3185,57 +3213,69 @@ var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
3185
3213
  // ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
3186
3214
  var import_components46 = require("@transferwise/components");
3187
3215
  var import_icons4 = require("@transferwise/icons");
3188
- var import_react17 = require("react");
3216
+ var import_react16 = require("react");
3189
3217
  var import_react_intl23 = require("react-intl");
3190
3218
  var import_jsx_runtime67 = require("react/jsx-runtime");
3191
3219
  function InlineSearchRenderer({
3192
3220
  id,
3193
3221
  hint,
3194
3222
  isLoading,
3223
+ features,
3195
3224
  margin,
3196
- onChange,
3197
3225
  state,
3198
3226
  title,
3227
+ onChange,
3199
3228
  trackEvent
3200
3229
  }) {
3201
- const [hasSearched, setHasSearched] = (0, import_react17.useState)(false);
3230
+ const [hasSearched, setHasSearched] = (0, import_react16.useState)(false);
3202
3231
  const intl = (0, import_react_intl23.useIntl)();
3203
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
3204
- import_components46.Typeahead,
3232
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
3233
+ FieldInput_default,
3205
3234
  {
3206
- id: "typeahead-input-id",
3207
- intl,
3208
- name: "typeahead-input-name",
3209
- size: "md",
3210
- placeholder: hint,
3211
- maxHeight: 100,
3212
- footer: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(TypeaheadFooter, { state, isLoading }),
3213
- multiple: false,
3214
- clearable: false,
3215
- addon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_icons4.Search, { size: 24 }),
3216
- options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
3217
- minQueryLength: 1,
3218
- onChange: (values) => {
3219
- if (values.length > 0) {
3220
- const [updatedValue] = values;
3221
- const { value: result } = updatedValue;
3222
- if (result) {
3223
- trackEvent("Search Result Selected", __spreadValues({
3224
- type: result.type
3225
- }, result.type === "action" ? { actionId: result.id } : {}));
3226
- result.onClick();
3235
+ id,
3236
+ description: "",
3237
+ validation: void 0,
3238
+ help: "",
3239
+ label: title,
3240
+ features,
3241
+ children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
3242
+ import_components46.Typeahead,
3243
+ {
3244
+ id: "typeahead-input-id",
3245
+ intl,
3246
+ name: "typeahead-input-name",
3247
+ size: "md",
3248
+ placeholder: hint,
3249
+ maxHeight: 100,
3250
+ footer: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(TypeaheadFooter, { state, isLoading }),
3251
+ multiple: false,
3252
+ clearable: false,
3253
+ addon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_icons4.Search, { size: 24 }),
3254
+ options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
3255
+ minQueryLength: 1,
3256
+ onChange: (values) => {
3257
+ if (values.length > 0) {
3258
+ const [updatedValue] = values;
3259
+ const { value: result } = updatedValue;
3260
+ if (result) {
3261
+ trackEvent("Search Result Selected", __spreadValues({
3262
+ type: result.type
3263
+ }, result.type === "action" ? { actionId: result.id } : {}));
3264
+ result.onClick();
3265
+ }
3266
+ }
3267
+ },
3268
+ onInputChange: (query) => {
3269
+ if (!hasSearched) {
3270
+ setHasSearched(true);
3271
+ trackEvent("Search Started");
3272
+ }
3273
+ onChange(query);
3227
3274
  }
3228
3275
  }
3229
- },
3230
- onInputChange: (query) => {
3231
- if (!hasSearched) {
3232
- setHasSearched(true);
3233
- trackEvent("Search Started");
3234
- }
3235
- onChange(query);
3236
- }
3276
+ )
3237
3277
  }
3238
- ) }) });
3278
+ ) });
3239
3279
  }
3240
3280
  function mapResultToTypeaheadOption(result) {
3241
3281
  return {
@@ -3318,6 +3358,7 @@ function RadioInputRendererComponent(props) {
3318
3358
  children,
3319
3359
  description,
3320
3360
  disabled,
3361
+ features,
3321
3362
  help,
3322
3363
  title,
3323
3364
  options,
@@ -3334,6 +3375,7 @@ function RadioInputRendererComponent(props) {
3334
3375
  help,
3335
3376
  description,
3336
3377
  validation: validationState,
3378
+ features,
3337
3379
  children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
3338
3380
  import_components48.RadioGroup,
3339
3381
  {
@@ -3358,7 +3400,7 @@ function RadioInputRendererComponent(props) {
3358
3400
 
3359
3401
  // ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
3360
3402
  var import_components49 = require("@transferwise/components");
3361
- var import_react18 = require("react");
3403
+ var import_react17 = require("react");
3362
3404
  var import_jsx_runtime71 = require("react/jsx-runtime");
3363
3405
  function TabInputRendererComponent(props) {
3364
3406
  const {
@@ -3366,6 +3408,7 @@ function TabInputRendererComponent(props) {
3366
3408
  children,
3367
3409
  description,
3368
3410
  disabled,
3411
+ features,
3369
3412
  help,
3370
3413
  title,
3371
3414
  options,
@@ -3373,7 +3416,7 @@ function TabInputRendererComponent(props) {
3373
3416
  validationState,
3374
3417
  onSelect
3375
3418
  } = props;
3376
- (0, import_react18.useEffect)(() => {
3419
+ (0, import_react17.useEffect)(() => {
3377
3420
  if (!isValidIndex2(selectedIndex, options.length)) {
3378
3421
  onSelect(0);
3379
3422
  }
@@ -3387,6 +3430,7 @@ function TabInputRendererComponent(props) {
3387
3430
  help,
3388
3431
  description,
3389
3432
  validation: validationState,
3433
+ features,
3390
3434
  children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
3391
3435
  import_components49.Tabs,
3392
3436
  {
@@ -3419,6 +3463,7 @@ function SelectInputRendererComponent(props) {
3419
3463
  children,
3420
3464
  description,
3421
3465
  disabled,
3466
+ features,
3422
3467
  help,
3423
3468
  title,
3424
3469
  options,
@@ -3465,6 +3510,7 @@ function SelectInputRendererComponent(props) {
3465
3510
  help,
3466
3511
  description,
3467
3512
  validation: validationState,
3513
+ features,
3468
3514
  children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
3469
3515
  import_components50.SelectInput,
3470
3516
  __spreadValues({
@@ -3486,7 +3532,7 @@ function SelectInputRendererComponent(props) {
3486
3532
  }
3487
3533
 
3488
3534
  // ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
3489
- var import_react19 = require("react");
3535
+ var import_react18 = require("react");
3490
3536
  var import_components51 = require("@transferwise/components");
3491
3537
  var import_jsx_runtime73 = require("react/jsx-runtime");
3492
3538
  function SegmentedInputRendererComponent(props) {
@@ -3494,6 +3540,7 @@ function SegmentedInputRendererComponent(props) {
3494
3540
  id,
3495
3541
  children,
3496
3542
  description,
3543
+ features,
3497
3544
  help,
3498
3545
  title,
3499
3546
  options,
@@ -3501,7 +3548,7 @@ function SegmentedInputRendererComponent(props) {
3501
3548
  validationState,
3502
3549
  onSelect
3503
3550
  } = props;
3504
- (0, import_react19.useEffect)(() => {
3551
+ (0, import_react18.useEffect)(() => {
3505
3552
  if (!isValidIndex3(selectedIndex, options.length)) {
3506
3553
  onSelect(0);
3507
3554
  }
@@ -3515,6 +3562,7 @@ function SegmentedInputRendererComponent(props) {
3515
3562
  help,
3516
3563
  description,
3517
3564
  validation: validationState,
3565
+ features,
3518
3566
  children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
3519
3567
  import_components51.SegmentedControl,
3520
3568
  {
@@ -3546,6 +3594,7 @@ function RadioItemRendererComponent(props) {
3546
3594
  children,
3547
3595
  description: rootDescription,
3548
3596
  disabled: rootDisabled,
3597
+ features,
3549
3598
  help,
3550
3599
  title: rootTitle,
3551
3600
  options,
@@ -3553,7 +3602,8 @@ function RadioItemRendererComponent(props) {
3553
3602
  validationState,
3554
3603
  onSelect
3555
3604
  } = props;
3556
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
3605
+ const { ref } = useScrollToError(validationState, features);
3606
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { ref, children: [
3557
3607
  rootTitle && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
3558
3608
  import_components52.Header,
3559
3609
  {
@@ -3666,12 +3716,12 @@ var StatusListRenderer_default = StatusListRenderer;
3666
3716
 
3667
3717
  // ../renderers/src/utils/useCustomTheme.ts
3668
3718
  var import_components_theming = require("@wise/components-theming");
3669
- var import_react20 = require("react");
3719
+ var import_react19 = require("react");
3670
3720
  var ThemeRequiredEventName = "Theme Required";
3671
3721
  var useCustomTheme = (theme, trackEvent) => {
3672
3722
  const theming = (0, import_components_theming.useTheme)();
3673
- const previousTheme = (0, import_react20.useMemo)(() => theming.theme, []);
3674
- (0, import_react20.useEffect)(() => {
3723
+ const previousTheme = (0, import_react19.useMemo)(() => theming.theme, []);
3724
+ (0, import_react19.useEffect)(() => {
3675
3725
  theming.setTheme(theme);
3676
3726
  trackEvent(ThemeRequiredEventName, { theme });
3677
3727
  return theme !== previousTheme ? () => {
@@ -3684,7 +3734,7 @@ var useCustomTheme = (theme, trackEvent) => {
3684
3734
 
3685
3735
  // ../renderers/src/step/StepFooter.tsx
3686
3736
  var import_components54 = require("@transferwise/components");
3687
- var import_react21 = require("react");
3737
+ var import_react20 = require("react");
3688
3738
  var import_react_intl25 = require("react-intl");
3689
3739
 
3690
3740
  // ../renderers/src/messages/step.messages.ts
@@ -3712,7 +3762,7 @@ var DefaultFooter = ({ footer }) => {
3712
3762
  };
3713
3763
  var FooterWithScrollButton = ({ footer }) => {
3714
3764
  const { formatMessage } = (0, import_react_intl25.useIntl)();
3715
- const endOfLayoutRef = (0, import_react21.useRef)(null);
3765
+ const endOfLayoutRef = (0, import_react20.useRef)(null);
3716
3766
  const isElementVisible = useIsElementVisible(endOfLayoutRef);
3717
3767
  const scrollButton = /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
3718
3768
  import_components54.Button,
@@ -3741,8 +3791,8 @@ var FooterWithScrollButton = ({ footer }) => {
3741
3791
  ] });
3742
3792
  };
3743
3793
  var useIsElementVisible = (elementRef) => {
3744
- const [isVisible, setIsVisible] = (0, import_react21.useState)(false);
3745
- (0, import_react21.useEffect)(() => {
3794
+ const [isVisible, setIsVisible] = (0, import_react20.useState)(false);
3795
+ (0, import_react20.useEffect)(() => {
3746
3796
  const element = elementRef.current;
3747
3797
  if (!element) return;
3748
3798
  const observer = new IntersectionObserver(([entry]) => {
@@ -3926,7 +3976,7 @@ function StepRendererComponent(props) {
3926
3976
 
3927
3977
  // ../renderers/src/TabsRenderer.tsx
3928
3978
  var import_components59 = require("@transferwise/components");
3929
- var import_react22 = require("react");
3979
+ var import_react21 = require("react");
3930
3980
  var import_jsx_runtime85 = require("react/jsx-runtime");
3931
3981
  var TabsRenderer = {
3932
3982
  canRenderType: "tabs",
@@ -3945,7 +3995,7 @@ var TabsRenderer = {
3945
3995
  }
3946
3996
  };
3947
3997
  function TabsRendererComponent({ uid, margin, tabs }) {
3948
- const [selectedIndex, setSelectedIndex] = (0, import_react22.useState)(0);
3998
+ const [selectedIndex, setSelectedIndex] = (0, import_react21.useState)(0);
3949
3999
  return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
3950
4000
  import_components59.Tabs,
3951
4001
  {
@@ -3966,7 +4016,7 @@ function TabsRendererComponent({ uid, margin, tabs }) {
3966
4016
  }
3967
4017
  function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
3968
4018
  var _a;
3969
- const [selectedIndex, setSelectedIndex] = (0, import_react22.useState)(0);
4019
+ const [selectedIndex, setSelectedIndex] = (0, import_react21.useState)(0);
3970
4020
  return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: getMargin(margin), children: [
3971
4021
  /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
3972
4022
  import_components59.SegmentedControl,
@@ -3988,7 +4038,7 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
3988
4038
  }
3989
4039
  function ChipsTabsRendererComponent({ margin, tabs }) {
3990
4040
  var _a;
3991
- const [selectedIndex, setSelectedIndex] = (0, import_react22.useState)(0);
4041
+ const [selectedIndex, setSelectedIndex] = (0, import_react21.useState)(0);
3992
4042
  return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: getMargin(margin), children: [
3993
4043
  /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "chips-container", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
3994
4044
  import_components59.Chips,
@@ -4099,6 +4149,7 @@ var TextInputRenderer = {
4099
4149
  inlineAlert: props.inlineAlert,
4100
4150
  loadingState: props.fieldLoadingState,
4101
4151
  help,
4152
+ features: props.features,
4102
4153
  children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_components61.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(VariableTextInput, __spreadValues({}, inputProps)) })
4103
4154
  }
4104
4155
  );
@@ -4117,7 +4168,18 @@ var import_jsx_runtime88 = require("react/jsx-runtime");
4117
4168
  var UploadInputRenderer = {
4118
4169
  canRenderType: "input-upload",
4119
4170
  render: (props) => {
4120
- const { id, accepts, title, description, disabled, maxSize, validationState, value, onUpload } = props;
4171
+ const {
4172
+ id,
4173
+ accepts,
4174
+ title,
4175
+ description,
4176
+ disabled,
4177
+ features,
4178
+ maxSize,
4179
+ validationState,
4180
+ value,
4181
+ onUpload
4182
+ } = props;
4121
4183
  const onUploadFile = async (formData) => {
4122
4184
  const file = formData.get("file");
4123
4185
  return onUpload(file).then(() => ({
@@ -4136,6 +4198,7 @@ var UploadInputRenderer = {
4136
4198
  label: void 0,
4137
4199
  description: void 0,
4138
4200
  validation: validationState,
4201
+ features,
4139
4202
  children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
4140
4203
  import_components62.UploadInput,
4141
4204
  {
@@ -4176,6 +4239,7 @@ var LargeUploadRenderer = {
4176
4239
  type,
4177
4240
  validationState,
4178
4241
  maxSize = null,
4242
+ features,
4179
4243
  onUpload
4180
4244
  } = _a, rest = __objRest(_a, [
4181
4245
  "id",
@@ -4188,6 +4252,7 @@ var LargeUploadRenderer = {
4188
4252
  "type",
4189
4253
  "validationState",
4190
4254
  "maxSize",
4255
+ "features",
4191
4256
  "onUpload"
4192
4257
  ]);
4193
4258
  const uploadProps = __spreadProps(__spreadValues({}, rest), { id, name: id, maxSize });
@@ -4210,6 +4275,7 @@ var LargeUploadRenderer = {
4210
4275
  description,
4211
4276
  validation: validationState,
4212
4277
  help,
4278
+ features,
4213
4279
  children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
4214
4280
  import_components62.Upload,
4215
4281
  __spreadProps(__spreadValues({}, uploadProps), {
@@ -4227,7 +4293,7 @@ var LargeUploadRenderer = {
4227
4293
 
4228
4294
  // ../renderers/src/UpsellRenderer.tsx
4229
4295
  var import_components63 = require("@transferwise/components");
4230
- var import_react23 = require("react");
4296
+ var import_react22 = require("react");
4231
4297
  var import_jsx_runtime89 = require("react/jsx-runtime");
4232
4298
  var UpsellRenderer = {
4233
4299
  canRenderType: "upsell",
@@ -4235,7 +4301,7 @@ var UpsellRenderer = {
4235
4301
  };
4236
4302
  function UpsellRendererComponent(props) {
4237
4303
  const { text, callToAction, media, margin, onDismiss } = props;
4238
- const [isVisible, setIsVisible] = (0, import_react23.useState)(true);
4304
+ const [isVisible, setIsVisible] = (0, import_react22.useState)(true);
4239
4305
  return isVisible ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
4240
4306
  import_components63.Nudge,
4241
4307
  {
@@ -4483,7 +4549,7 @@ var customEventsToAnalytics = {
4483
4549
  };
4484
4550
 
4485
4551
  // src/dynamicFlow/useOnCopy.tsx
4486
- var import_react24 = require("react");
4552
+ var import_react23 = require("react");
4487
4553
  var import_react_intl29 = require("react-intl");
4488
4554
 
4489
4555
  // src/dynamicFlow/messages.ts
@@ -4505,7 +4571,7 @@ var messages_default = (0, import_react_intl28.defineMessages)({
4505
4571
  var useOnCopy = () => {
4506
4572
  const { formatMessage } = (0, import_react_intl29.useIntl)();
4507
4573
  const createSnackBar = useSnackBarIfAvailable();
4508
- return (0, import_react24.useCallback)(
4574
+ return (0, import_react23.useCallback)(
4509
4575
  (copiedContent) => {
4510
4576
  if (copiedContent) {
4511
4577
  createSnackBar({ text: formatMessage(messages_default.copied) });
@@ -4518,11 +4584,11 @@ var useOnCopy = () => {
4518
4584
  };
4519
4585
 
4520
4586
  // src/dynamicFlow/useWiseHttpClient.tsx
4521
- var import_react25 = require("react");
4587
+ var import_react24 = require("react");
4522
4588
  var import_react_intl30 = require("react-intl");
4523
4589
  var useWiseHttpClient = (httpClient) => {
4524
4590
  const { locale } = (0, import_react_intl30.useIntl)();
4525
- return (0, import_react25.useCallback)(
4591
+ return (0, import_react24.useCallback)(
4526
4592
  async (input, init = {}) => {
4527
4593
  const headers = new Headers(init.headers);
4528
4594
  headers.set("accept-language", locale);
@@ -4563,10 +4629,10 @@ var useWiseToCoreProps = (props) => {
4563
4629
  onLog
4564
4630
  } = props;
4565
4631
  const httpClient = useWiseHttpClient(customFetch);
4566
- const mergedRenderers = (0, import_react26.useMemo)(() => getMergedRenderers(props), [renderers]);
4632
+ const mergedRenderers = (0, import_react25.useMemo)(() => getMergedRenderers(props), [renderers]);
4567
4633
  const createSnackBar = useCreateSnackBar();
4568
- const logEvent = (0, import_react26.useMemo)(() => getLogEvent(onLog), [onLog]);
4569
- const trackEvent = (0, import_react26.useMemo)(() => getTrackEvent(onEvent, onAnalytics), [onEvent, onAnalytics]);
4634
+ const logEvent = (0, import_react25.useMemo)(() => getLogEvent(onLog), [onLog]);
4635
+ const trackEvent = (0, import_react25.useMemo)(() => getTrackEvent(onEvent, onAnalytics), [onEvent, onAnalytics]);
4570
4636
  const onCopy = useOnCopy();
4571
4637
  return __spreadProps(__spreadValues({}, props), {
4572
4638
  httpClient,
@@ -4611,14 +4677,14 @@ function DynamicFlow(props) {
4611
4677
  }
4612
4678
 
4613
4679
  // src/dynamicFlow/DynamicFlowWithRef.tsx
4614
- var import_react27 = require("react");
4680
+ var import_react26 = require("react");
4615
4681
  var import_dynamic_flow_client5 = require("@wise/dynamic-flow-client");
4616
4682
  var import_jsx_runtime95 = require("react/jsx-runtime");
4617
- var DynamicFlowWithRef = (0, import_react27.forwardRef)(function DynamicFlowWithRef2(props, ref) {
4683
+ var DynamicFlowWithRef = (0, import_react26.forwardRef)(function DynamicFlowWithRef2(props, ref) {
4618
4684
  const { className = "" } = props;
4619
4685
  const dfProps = useWiseToCoreProps(props);
4620
4686
  const df = (0, import_dynamic_flow_client5.useDynamicFlow)(dfProps);
4621
- (0, import_react27.useImperativeHandle)(
4687
+ (0, import_react26.useImperativeHandle)(
4622
4688
  ref,
4623
4689
  () => ({
4624
4690
  getValue: async () => {