@wise/dynamic-flow-client-internal 4.15.5-experimental-f87d7c4 → 4.15.6
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 +21 -12
- package/build/main.mjs +21 -12
- package/package.json +8 -8
package/build/main.js
CHANGED
|
@@ -746,7 +746,7 @@ var help_messages_default = (0, import_react_intl.defineMessages)({
|
|
|
746
746
|
|
|
747
747
|
// ../renderers/src/components/Help.tsx
|
|
748
748
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
749
|
-
function Help({ help }) {
|
|
749
|
+
function Help({ help, onClick }) {
|
|
750
750
|
const intl = (0, import_react_intl2.useIntl)();
|
|
751
751
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
752
752
|
import_components2.Info,
|
|
@@ -755,7 +755,8 @@ function Help({ help }) {
|
|
|
755
755
|
content: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_components2.Markdown, { config: { link: { target: "_blank" } }, children: help }),
|
|
756
756
|
presentation: "POPOVER",
|
|
757
757
|
size: "sm",
|
|
758
|
-
"aria-label": intl.formatMessage(help_messages_default.helpAria)
|
|
758
|
+
"aria-label": intl.formatMessage(help_messages_default.helpAria),
|
|
759
|
+
onClick
|
|
759
760
|
}
|
|
760
761
|
);
|
|
761
762
|
}
|
|
@@ -2855,19 +2856,27 @@ var getHeaderAction = (callToAction) => {
|
|
|
2855
2856
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2856
2857
|
var ReviewRenderer = {
|
|
2857
2858
|
canRenderType: "review",
|
|
2858
|
-
render: ({ callToAction, control, fields, margin, title }) => {
|
|
2859
|
+
render: ({ analyticsId, callToAction, control, fields, margin, title, trackEvent }) => {
|
|
2859
2860
|
const orientation = mapControlToDefinitionListLayout(control);
|
|
2861
|
+
const onHelpClick = (fieldAnalyticsId) => {
|
|
2862
|
+
trackEvent("Dynamic Flow - Help Pressed", {
|
|
2863
|
+
layoutId: analyticsId,
|
|
2864
|
+
layoutItemId: fieldAnalyticsId
|
|
2865
|
+
});
|
|
2866
|
+
};
|
|
2860
2867
|
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: getMargin(margin), children: [
|
|
2861
2868
|
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components37.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
|
|
2862
2869
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2863
2870
|
import_components37.DefinitionList,
|
|
2864
2871
|
{
|
|
2865
2872
|
layout: orientation,
|
|
2866
|
-
definitions: fields.map(
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2873
|
+
definitions: fields.map(
|
|
2874
|
+
({ label, value, help, analyticsId: fieldAnalyticsId }, index) => ({
|
|
2875
|
+
key: String(index),
|
|
2876
|
+
title: label,
|
|
2877
|
+
value: getFieldValue(value, help, orientation, () => onHelpClick(fieldAnalyticsId))
|
|
2878
|
+
})
|
|
2879
|
+
)
|
|
2871
2880
|
}
|
|
2872
2881
|
) })
|
|
2873
2882
|
] });
|
|
@@ -2889,16 +2898,16 @@ var mapControlToDefinitionListLayout = (control) => {
|
|
|
2889
2898
|
return "VERTICAL_ONE_COLUMN";
|
|
2890
2899
|
}
|
|
2891
2900
|
};
|
|
2892
|
-
var getFieldValue = (value, help, orientation) => {
|
|
2901
|
+
var getFieldValue = (value, help, orientation, onClick) => {
|
|
2893
2902
|
if (help) {
|
|
2894
2903
|
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
2895
|
-
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Help_default, { help }),
|
|
2904
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Help_default, { help, onClick }),
|
|
2896
2905
|
" ",
|
|
2897
2906
|
value
|
|
2898
2907
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
2899
2908
|
value,
|
|
2900
2909
|
" ",
|
|
2901
|
-
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Help_default, { help })
|
|
2910
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Help_default, { help, onClick })
|
|
2902
2911
|
] });
|
|
2903
2912
|
}
|
|
2904
2913
|
return value;
|
|
@@ -3305,7 +3314,7 @@ var ModalContentRenderer = {
|
|
|
3305
3314
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
3306
3315
|
var appVersion = (
|
|
3307
3316
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
3308
|
-
typeof process !== "undefined" ? "4.15.
|
|
3317
|
+
typeof process !== "undefined" ? "4.15.6" : "0.0.0"
|
|
3309
3318
|
);
|
|
3310
3319
|
|
|
3311
3320
|
// src/dynamicFlow/telemetry/getLogEvent.ts
|
package/build/main.mjs
CHANGED
|
@@ -712,7 +712,7 @@ var help_messages_default = defineMessages({
|
|
|
712
712
|
|
|
713
713
|
// ../renderers/src/components/Help.tsx
|
|
714
714
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
715
|
-
function Help({ help }) {
|
|
715
|
+
function Help({ help, onClick }) {
|
|
716
716
|
const intl = useIntl();
|
|
717
717
|
return /* @__PURE__ */ jsx2(
|
|
718
718
|
Info,
|
|
@@ -721,7 +721,8 @@ function Help({ help }) {
|
|
|
721
721
|
content: /* @__PURE__ */ jsx2(Markdown, { config: { link: { target: "_blank" } }, children: help }),
|
|
722
722
|
presentation: "POPOVER",
|
|
723
723
|
size: "sm",
|
|
724
|
-
"aria-label": intl.formatMessage(help_messages_default.helpAria)
|
|
724
|
+
"aria-label": intl.formatMessage(help_messages_default.helpAria),
|
|
725
|
+
onClick
|
|
725
726
|
}
|
|
726
727
|
);
|
|
727
728
|
}
|
|
@@ -2831,19 +2832,27 @@ var getHeaderAction = (callToAction) => {
|
|
|
2831
2832
|
import { Fragment as Fragment7, jsx as jsx52, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2832
2833
|
var ReviewRenderer = {
|
|
2833
2834
|
canRenderType: "review",
|
|
2834
|
-
render: ({ callToAction, control, fields, margin, title }) => {
|
|
2835
|
+
render: ({ analyticsId, callToAction, control, fields, margin, title, trackEvent }) => {
|
|
2835
2836
|
const orientation = mapControlToDefinitionListLayout(control);
|
|
2837
|
+
const onHelpClick = (fieldAnalyticsId) => {
|
|
2838
|
+
trackEvent("Dynamic Flow - Help Pressed", {
|
|
2839
|
+
layoutId: analyticsId,
|
|
2840
|
+
layoutItemId: fieldAnalyticsId
|
|
2841
|
+
});
|
|
2842
|
+
};
|
|
2836
2843
|
return /* @__PURE__ */ jsxs17("div", { className: getMargin(margin), children: [
|
|
2837
2844
|
(title || callToAction) && /* @__PURE__ */ jsx52(Header6, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
|
|
2838
2845
|
/* @__PURE__ */ jsx52("div", { className: margin, children: /* @__PURE__ */ jsx52(
|
|
2839
2846
|
DefinitionList,
|
|
2840
2847
|
{
|
|
2841
2848
|
layout: orientation,
|
|
2842
|
-
definitions: fields.map(
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2849
|
+
definitions: fields.map(
|
|
2850
|
+
({ label, value, help, analyticsId: fieldAnalyticsId }, index) => ({
|
|
2851
|
+
key: String(index),
|
|
2852
|
+
title: label,
|
|
2853
|
+
value: getFieldValue(value, help, orientation, () => onHelpClick(fieldAnalyticsId))
|
|
2854
|
+
})
|
|
2855
|
+
)
|
|
2847
2856
|
}
|
|
2848
2857
|
) })
|
|
2849
2858
|
] });
|
|
@@ -2865,16 +2874,16 @@ var mapControlToDefinitionListLayout = (control) => {
|
|
|
2865
2874
|
return "VERTICAL_ONE_COLUMN";
|
|
2866
2875
|
}
|
|
2867
2876
|
};
|
|
2868
|
-
var getFieldValue = (value, help, orientation) => {
|
|
2877
|
+
var getFieldValue = (value, help, orientation, onClick) => {
|
|
2869
2878
|
if (help) {
|
|
2870
2879
|
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs17(Fragment7, { children: [
|
|
2871
|
-
/* @__PURE__ */ jsx52(Help_default, { help }),
|
|
2880
|
+
/* @__PURE__ */ jsx52(Help_default, { help, onClick }),
|
|
2872
2881
|
" ",
|
|
2873
2882
|
value
|
|
2874
2883
|
] }) : /* @__PURE__ */ jsxs17(Fragment7, { children: [
|
|
2875
2884
|
value,
|
|
2876
2885
|
" ",
|
|
2877
|
-
/* @__PURE__ */ jsx52(Help_default, { help })
|
|
2886
|
+
/* @__PURE__ */ jsx52(Help_default, { help, onClick })
|
|
2878
2887
|
] });
|
|
2879
2888
|
}
|
|
2880
2889
|
return value;
|
|
@@ -3281,7 +3290,7 @@ var ModalContentRenderer = {
|
|
|
3281
3290
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
3282
3291
|
var appVersion = (
|
|
3283
3292
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
3284
|
-
typeof process !== "undefined" ? "4.15.
|
|
3293
|
+
typeof process !== "undefined" ? "4.15.6" : "0.0.0"
|
|
3285
3294
|
);
|
|
3286
3295
|
|
|
3287
3296
|
// src/dynamicFlow/telemetry/getLogEvent.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/dynamic-flow-client-internal",
|
|
3
|
-
"version": "4.15.
|
|
3
|
+
"version": "4.15.6",
|
|
4
4
|
"description": "Dynamic Flow web client for Wise",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./build/main.js",
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
"@testing-library/jest-dom": "6.6.3",
|
|
44
44
|
"@testing-library/react": "16.3.0",
|
|
45
45
|
"@testing-library/user-event": "14.6.1",
|
|
46
|
-
"@transferwise/components": "46.
|
|
46
|
+
"@transferwise/components": "46.100.0",
|
|
47
47
|
"@transferwise/formatting": "^2.13.3",
|
|
48
|
-
"@transferwise/icons": "3.22.
|
|
48
|
+
"@transferwise/icons": "3.22.3",
|
|
49
49
|
"@transferwise/neptune-css": "14.24.4",
|
|
50
50
|
"@types/jest": "29.5.14",
|
|
51
51
|
"@types/react": "18.3.23",
|
|
52
52
|
"@types/react-dom": "18.3.7",
|
|
53
|
-
"@wise/art": "2.
|
|
53
|
+
"@wise/art": "2.22.0",
|
|
54
54
|
"@wise/components-theming": "^1.6.3",
|
|
55
55
|
"babel-jest": "30.0.2",
|
|
56
56
|
"currency-flags": "4.0.7",
|
|
@@ -74,9 +74,9 @@
|
|
|
74
74
|
"stylelint-value-no-unknown-custom-properties": "6.0.1",
|
|
75
75
|
"tsx": "4.20.3",
|
|
76
76
|
"typescript": "5.8.3",
|
|
77
|
-
"@wise/dynamic-flow-fixtures": "0.0.1",
|
|
78
77
|
"@wise/dynamic-flow-renderers": "0.0.0",
|
|
79
|
-
"@wise/dynamic-flow-types": "3.
|
|
78
|
+
"@wise/dynamic-flow-types": "3.7.0",
|
|
79
|
+
"@wise/dynamic-flow-fixtures": "0.0.1"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
82
|
"@transferwise/components": "^46.92.0",
|
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"classnames": "2.5.1",
|
|
94
|
-
"@wise/dynamic-flow-client": "4.8.
|
|
95
|
-
"@wise/dynamic-flow-types": "3.
|
|
94
|
+
"@wise/dynamic-flow-client": "4.8.6",
|
|
95
|
+
"@wise/dynamic-flow-types": "3.7.0"
|
|
96
96
|
},
|
|
97
97
|
"scripts": {
|
|
98
98
|
"dev": "pnpm build:visual-tests && storybook dev -p 3005",
|