@wise/dynamic-flow-client-internal 4.9.1 → 4.9.3

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
@@ -717,26 +717,11 @@ var AlertRenderer = {
717
717
  )
718
718
  };
719
719
  var mapCtaToAlertAction = (callToAction) => {
720
- if (!callToAction) {
721
- return void 0;
722
- }
723
- const { accessibilityDescription, title } = callToAction;
724
- const sharedProps = {
725
- "aria-label": accessibilityDescription,
726
- text: title
727
- };
728
- if (callToAction.type === "link") {
729
- const { href } = callToAction;
730
- return __spreadProps(__spreadValues({}, sharedProps), {
731
- href,
732
- target: "_blank"
733
- });
734
- }
735
- if (callToAction.type === "action") {
736
- const { onClick } = callToAction;
737
- return __spreadProps(__spreadValues({}, sharedProps), {
738
- onClick
739
- });
720
+ if (callToAction) {
721
+ return __spreadValues(__spreadValues({
722
+ text: callToAction.title,
723
+ "aria-label": callToAction.accessibilityDescription
724
+ }, "onClick" in callToAction ? { onClick: callToAction.onClick } : {}), callToAction.type === "link" ? { href: callToAction.href, target: "_blank" } : {});
740
725
  }
741
726
  return void 0;
742
727
  };
@@ -3085,26 +3070,14 @@ var ListItemMedia = ({
3085
3070
  }
3086
3071
  };
3087
3072
  var getListAction = (callToAction) => {
3088
- if (!callToAction) {
3089
- return void 0;
3073
+ if (callToAction) {
3074
+ return __spreadValues({
3075
+ "aria-label": callToAction.accessibilityDescription,
3076
+ text: callToAction.title,
3077
+ onClick: callToAction.onClick
3078
+ }, callToAction.type === "link" ? { href: callToAction.href, target: "_blank" } : {});
3090
3079
  }
3091
- const { accessibilityDescription, title, onClick } = callToAction;
3092
- if (callToAction.type === "action") {
3093
- return {
3094
- "aria-label": accessibilityDescription,
3095
- text: title,
3096
- onClick: (event) => {
3097
- event.preventDefault();
3098
- onClick();
3099
- }
3100
- };
3101
- }
3102
- return {
3103
- "aria-label": accessibilityDescription,
3104
- href: callToAction.href,
3105
- target: "_blank",
3106
- text: title
3107
- };
3080
+ return void 0;
3108
3081
  };
3109
3082
  var ListRenderer_default = ListRenderer;
3110
3083
 
@@ -3201,7 +3174,7 @@ var getWiseRenderers = () => [
3201
3174
  ];
3202
3175
 
3203
3176
  // src/dynamicFlow/telemetry/app-version.ts
3204
- var appVersion = "4.9.1";
3177
+ var appVersion = "4.9.3";
3205
3178
 
3206
3179
  // src/dynamicFlow/telemetry/getLogEvent.ts
3207
3180
  var getLogEvent = (onLog) => (level, message, extra) => {
package/build/main.mjs CHANGED
@@ -683,26 +683,11 @@ var AlertRenderer = {
683
683
  )
684
684
  };
685
685
  var mapCtaToAlertAction = (callToAction) => {
686
- if (!callToAction) {
687
- return void 0;
688
- }
689
- const { accessibilityDescription, title } = callToAction;
690
- const sharedProps = {
691
- "aria-label": accessibilityDescription,
692
- text: title
693
- };
694
- if (callToAction.type === "link") {
695
- const { href } = callToAction;
696
- return __spreadProps(__spreadValues({}, sharedProps), {
697
- href,
698
- target: "_blank"
699
- });
700
- }
701
- if (callToAction.type === "action") {
702
- const { onClick } = callToAction;
703
- return __spreadProps(__spreadValues({}, sharedProps), {
704
- onClick
705
- });
686
+ if (callToAction) {
687
+ return __spreadValues(__spreadValues({
688
+ text: callToAction.title,
689
+ "aria-label": callToAction.accessibilityDescription
690
+ }, "onClick" in callToAction ? { onClick: callToAction.onClick } : {}), callToAction.type === "link" ? { href: callToAction.href, target: "_blank" } : {});
706
691
  }
707
692
  return void 0;
708
693
  };
@@ -3061,26 +3046,14 @@ var ListItemMedia = ({
3061
3046
  }
3062
3047
  };
3063
3048
  var getListAction = (callToAction) => {
3064
- if (!callToAction) {
3065
- return void 0;
3049
+ if (callToAction) {
3050
+ return __spreadValues({
3051
+ "aria-label": callToAction.accessibilityDescription,
3052
+ text: callToAction.title,
3053
+ onClick: callToAction.onClick
3054
+ }, callToAction.type === "link" ? { href: callToAction.href, target: "_blank" } : {});
3066
3055
  }
3067
- const { accessibilityDescription, title, onClick } = callToAction;
3068
- if (callToAction.type === "action") {
3069
- return {
3070
- "aria-label": accessibilityDescription,
3071
- text: title,
3072
- onClick: (event) => {
3073
- event.preventDefault();
3074
- onClick();
3075
- }
3076
- };
3077
- }
3078
- return {
3079
- "aria-label": accessibilityDescription,
3080
- href: callToAction.href,
3081
- target: "_blank",
3082
- text: title
3083
- };
3056
+ return void 0;
3084
3057
  };
3085
3058
  var ListRenderer_default = ListRenderer;
3086
3059
 
@@ -3177,7 +3150,7 @@ var getWiseRenderers = () => [
3177
3150
  ];
3178
3151
 
3179
3152
  // src/dynamicFlow/telemetry/app-version.ts
3180
- var appVersion = "4.9.1";
3153
+ var appVersion = "4.9.3";
3181
3154
 
3182
3155
  // src/dynamicFlow/telemetry/getLogEvent.ts
3183
3156
  var getLogEvent = (onLog) => (level, message, extra) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-client-internal",
3
- "version": "4.9.1",
3
+ "version": "4.9.3",
4
4
  "description": "Dynamic Flow web client for Wise",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./build/main.js",
@@ -83,8 +83,8 @@
83
83
  "typescript": "5.8.3",
84
84
  "webpack": "5.98.0",
85
85
  "@wise/dynamic-flow-fixtures": "0.0.1",
86
- "@wise/dynamic-flow-renderers": "0.0.0",
87
- "@wise/dynamic-flow-types": "3.1.3"
86
+ "@wise/dynamic-flow-types": "3.1.4",
87
+ "@wise/dynamic-flow-renderers": "0.0.0"
88
88
  },
89
89
  "peerDependencies": {
90
90
  "@transferwise/components": "^46.92.0",
@@ -99,8 +99,8 @@
99
99
  },
100
100
  "dependencies": {
101
101
  "classnames": "2.5.1",
102
- "@wise/dynamic-flow-client": "4.3.10",
103
- "@wise/dynamic-flow-types": "3.1.3"
102
+ "@wise/dynamic-flow-types": "3.1.4",
103
+ "@wise/dynamic-flow-client": "4.3.12"
104
104
  },
105
105
  "scripts": {
106
106
  "dev": "pnpm build:visual-tests && storybook dev -p 3005",