@wise/dynamic-flow-client-internal 5.9.2 → 5.10.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
@@ -144,7 +144,7 @@ var import_react22 = require("react");
144
144
  // src/dynamicFlow/telemetry/app-version.ts
145
145
  var appVersion = (
146
146
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
147
- typeof process !== "undefined" ? "5.9.2" : "0.0.0"
147
+ typeof process !== "undefined" ? "5.10.0" : "0.0.0"
148
148
  );
149
149
 
150
150
  // src/dynamicFlow/telemetry/getLogEvent.ts
@@ -309,6 +309,11 @@ function AddressValidationButtonComponent(props) {
309
309
  setSpinny(false);
310
310
  }
311
311
  }, [stepLoadingState]);
312
+ const onBlur = () => {
313
+ if (stepLoadingState === "idle") {
314
+ setSpinny(false);
315
+ }
316
+ };
312
317
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: `d-flex flex-column ${getMargin(margin)}`, children: [
313
318
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
314
319
  import_components2.Button,
@@ -323,6 +328,7 @@ function AddressValidationButtonComponent(props) {
323
328
  setSpinny(true);
324
329
  onClick();
325
330
  },
331
+ onBlur,
326
332
  children: title
327
333
  }
328
334
  ),
@@ -689,6 +695,11 @@ function ButtonComponent(props) {
689
695
  setSpinny(false);
690
696
  }
691
697
  }, [stepLoadingState]);
698
+ const onBlur = () => {
699
+ if (stepLoadingState === "idle") {
700
+ setSpinny(false);
701
+ }
702
+ };
692
703
  const loading = spinny && stepLoadingState !== "idle";
693
704
  const buttonProps = {
694
705
  v2: true,
@@ -703,6 +714,7 @@ function ButtonComponent(props) {
703
714
  loading,
704
715
  size: control === "small" ? "sm" : mapLegacyButtonSize(size),
705
716
  sentiment: getSentiment(context),
717
+ onBlur,
706
718
  onClick: () => {
707
719
  setSpinny(true);
708
720
  onClick();
@@ -3920,9 +3932,12 @@ function UpsellRendererComponent(props) {
3920
3932
  className: getMargin(margin),
3921
3933
  mediaName: getMediaName(media),
3922
3934
  title: text,
3923
- link: callToAction.title,
3924
- href: callToAction.href,
3925
- onClick: callToAction.onClick,
3935
+ action: {
3936
+ href: callToAction.href,
3937
+ onClick: callToAction.href ? void 0 : callToAction.onClick,
3938
+ target: callToAction.href ? "_blank" : void 0,
3939
+ text: callToAction.title
3940
+ },
3926
3941
  onDismiss: onDismiss ? () => {
3927
3942
  setIsVisible(false);
3928
3943
  onDismiss();
package/build/main.mjs CHANGED
@@ -126,7 +126,7 @@ import { useMemo as useMemo2 } from "react";
126
126
  // src/dynamicFlow/telemetry/app-version.ts
127
127
  var appVersion = (
128
128
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
129
- typeof process !== "undefined" ? "5.9.2" : "0.0.0"
129
+ typeof process !== "undefined" ? "5.10.0" : "0.0.0"
130
130
  );
131
131
 
132
132
  // src/dynamicFlow/telemetry/getLogEvent.ts
@@ -291,6 +291,11 @@ function AddressValidationButtonComponent(props) {
291
291
  setSpinny(false);
292
292
  }
293
293
  }, [stepLoadingState]);
294
+ const onBlur = () => {
295
+ if (stepLoadingState === "idle") {
296
+ setSpinny(false);
297
+ }
298
+ };
294
299
  return /* @__PURE__ */ jsxs("div", { className: `d-flex flex-column ${getMargin(margin)}`, children: [
295
300
  /* @__PURE__ */ jsx3(
296
301
  Button,
@@ -305,6 +310,7 @@ function AddressValidationButtonComponent(props) {
305
310
  setSpinny(true);
306
311
  onClick();
307
312
  },
313
+ onBlur,
308
314
  children: title
309
315
  }
310
316
  ),
@@ -671,6 +677,11 @@ function ButtonComponent(props) {
671
677
  setSpinny(false);
672
678
  }
673
679
  }, [stepLoadingState]);
680
+ const onBlur = () => {
681
+ if (stepLoadingState === "idle") {
682
+ setSpinny(false);
683
+ }
684
+ };
674
685
  const loading = spinny && stepLoadingState !== "idle";
675
686
  const buttonProps = {
676
687
  v2: true,
@@ -685,6 +696,7 @@ function ButtonComponent(props) {
685
696
  loading,
686
697
  size: control === "small" ? "sm" : mapLegacyButtonSize(size),
687
698
  sentiment: getSentiment(context),
699
+ onBlur,
688
700
  onClick: () => {
689
701
  setSpinny(true);
690
702
  onClick();
@@ -3911,9 +3923,12 @@ function UpsellRendererComponent(props) {
3911
3923
  className: getMargin(margin),
3912
3924
  mediaName: getMediaName(media),
3913
3925
  title: text,
3914
- link: callToAction.title,
3915
- href: callToAction.href,
3916
- onClick: callToAction.onClick,
3926
+ action: {
3927
+ href: callToAction.href,
3928
+ onClick: callToAction.href ? void 0 : callToAction.onClick,
3929
+ target: callToAction.href ? "_blank" : void 0,
3930
+ text: callToAction.title
3931
+ },
3917
3932
  onDismiss: onDismiss ? () => {
3918
3933
  setIsVisible(false);
3919
3934
  onDismiss();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-client-internal",
3
- "version": "5.9.2",
3
+ "version": "5.10.0",
4
4
  "description": "Dynamic Flow web client for Wise",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./build/main.js",
@@ -68,9 +68,9 @@
68
68
  "typescript": "5.9.3",
69
69
  "vitest": "4.0.18",
70
70
  "vitest-fetch-mock": "0.4.5",
71
- "@wise/dynamic-flow-fixtures": "0.0.1",
71
+ "@wise/dynamic-flow-types": "4.10.0",
72
72
  "@wise/dynamic-flow-renderers": "0.0.0",
73
- "@wise/dynamic-flow-types": "4.9.0"
73
+ "@wise/dynamic-flow-fixtures": "0.0.1"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "@transferwise/components": "^46.104.0",
@@ -84,8 +84,8 @@
84
84
  "react-intl": "^6 || ^7"
85
85
  },
86
86
  "dependencies": {
87
- "@wise/dynamic-flow-client": "5.9.2",
88
- "@wise/dynamic-flow-types": "4.9.0"
87
+ "@wise/dynamic-flow-client": "5.10.0",
88
+ "@wise/dynamic-flow-types": "4.10.0"
89
89
  },
90
90
  "scripts": {
91
91
  "dev": "pnpm build:visual-tests && storybook dev -p 3005",