@wise/dynamic-flow-client-internal 4.12.5 → 4.13.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 +67 -36
- package/build/main.mjs +66 -35
- package/package.json +13 -20
- package/build/types/stories/DynamicFlow.story.d.ts +0 -8
- package/build/types/stories/DynamicForm.story.d.ts +0 -5
- package/build/types/stories/Editable.story.d.ts +0 -23
- package/build/types/stories/Examples.story.d.ts +0 -20
- package/build/types/stories/Features.story.d.ts +0 -12
- package/build/types/stories/Initialisation.story.d.ts +0 -12
- package/build/types/stories/SCAIntegration.story.d.ts +0 -12
package/build/main.js
CHANGED
|
@@ -1080,7 +1080,7 @@ function FlagIcon({ name }) {
|
|
|
1080
1080
|
return null;
|
|
1081
1081
|
}
|
|
1082
1082
|
const code = name.substring(5);
|
|
1083
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_art.Flag, { code });
|
|
1083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_art.Flag, { code, intrinsicSize: 24 });
|
|
1084
1084
|
}
|
|
1085
1085
|
|
|
1086
1086
|
// ../renderers/src/components/icon/NamedIcon.tsx
|
|
@@ -1190,14 +1190,21 @@ var DecisionRenderer = {
|
|
|
1190
1190
|
render: ({ control, margin, options, title }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: getMargin(margin), children: [
|
|
1191
1191
|
title && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_components9.Header, { as: "h2", title }),
|
|
1192
1192
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_components9.NavigationOptionsList, { children: options.map((option) => {
|
|
1193
|
-
const { description, disabled, icon, image, title: itemTitle, onClick } = option;
|
|
1193
|
+
const { description, disabled, icon, image, title: itemTitle, tag, onClick } = option;
|
|
1194
1194
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1195
1195
|
import_components9.NavigationOption,
|
|
1196
1196
|
{
|
|
1197
1197
|
title: itemTitle,
|
|
1198
1198
|
content: description,
|
|
1199
1199
|
disabled,
|
|
1200
|
-
media: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1200
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1201
|
+
OptionMedia,
|
|
1202
|
+
{
|
|
1203
|
+
icon,
|
|
1204
|
+
image,
|
|
1205
|
+
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
1206
|
+
}
|
|
1207
|
+
),
|
|
1201
1208
|
showMediaCircle: false,
|
|
1202
1209
|
showMediaAtAllSizes: true,
|
|
1203
1210
|
onClick
|
|
@@ -2819,13 +2826,36 @@ var LargeUploadRenderer = {
|
|
|
2819
2826
|
|
|
2820
2827
|
// ../renderers/src/ReviewRenderer.tsx
|
|
2821
2828
|
var import_components37 = require("@transferwise/components");
|
|
2829
|
+
|
|
2830
|
+
// ../renderers/src/utils/getHeaderAction.tsx
|
|
2831
|
+
var getHeaderAction = (callToAction) => {
|
|
2832
|
+
if (!callToAction) {
|
|
2833
|
+
return void 0;
|
|
2834
|
+
}
|
|
2835
|
+
const { accessibilityDescription, href, title, onClick } = callToAction;
|
|
2836
|
+
return href ? {
|
|
2837
|
+
"aria-label": accessibilityDescription,
|
|
2838
|
+
text: title,
|
|
2839
|
+
href,
|
|
2840
|
+
target: "_blank"
|
|
2841
|
+
} : {
|
|
2842
|
+
"aria-label": accessibilityDescription,
|
|
2843
|
+
text: title,
|
|
2844
|
+
onClick: (event) => {
|
|
2845
|
+
event.preventDefault();
|
|
2846
|
+
onClick();
|
|
2847
|
+
}
|
|
2848
|
+
};
|
|
2849
|
+
};
|
|
2850
|
+
|
|
2851
|
+
// ../renderers/src/ReviewRenderer.tsx
|
|
2822
2852
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2823
2853
|
var ReviewRenderer = {
|
|
2824
2854
|
canRenderType: "review",
|
|
2825
2855
|
render: ({ callToAction, control, fields, margin, title }) => {
|
|
2826
2856
|
const orientation = mapControlToDefinitionListLayout(control);
|
|
2827
2857
|
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: getMargin(margin), children: [
|
|
2828
|
-
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components37.Header, { title: title != null ? title : "", action:
|
|
2858
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components37.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
|
|
2829
2859
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2830
2860
|
import_components37.DefinitionList,
|
|
2831
2861
|
{
|
|
@@ -2870,28 +2900,6 @@ var getFieldValue = (value, help, orientation) => {
|
|
|
2870
2900
|
}
|
|
2871
2901
|
return value;
|
|
2872
2902
|
};
|
|
2873
|
-
var getReviewAction = (callToAction) => {
|
|
2874
|
-
if (!callToAction) {
|
|
2875
|
-
return void 0;
|
|
2876
|
-
}
|
|
2877
|
-
const { accessibilityDescription, href, title, onClick } = callToAction;
|
|
2878
|
-
if (!href) {
|
|
2879
|
-
return {
|
|
2880
|
-
"aria-label": accessibilityDescription,
|
|
2881
|
-
text: title,
|
|
2882
|
-
onClick: (event) => {
|
|
2883
|
-
event.preventDefault();
|
|
2884
|
-
onClick();
|
|
2885
|
-
}
|
|
2886
|
-
};
|
|
2887
|
-
}
|
|
2888
|
-
return {
|
|
2889
|
-
"aria-label": accessibilityDescription,
|
|
2890
|
-
href,
|
|
2891
|
-
target: "_blank",
|
|
2892
|
-
text: title
|
|
2893
|
-
};
|
|
2894
|
-
};
|
|
2895
2903
|
|
|
2896
2904
|
// ../renderers/src/step/StepRenderer.tsx
|
|
2897
2905
|
var import_components39 = require("@transferwise/components");
|
|
@@ -2954,7 +2962,8 @@ var DesignSystemListItem = ({
|
|
|
2954
2962
|
supportingValues,
|
|
2955
2963
|
icon,
|
|
2956
2964
|
image,
|
|
2957
|
-
control
|
|
2965
|
+
control,
|
|
2966
|
+
tag
|
|
2958
2967
|
}) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2959
2968
|
"label",
|
|
2960
2969
|
{
|
|
@@ -2963,7 +2972,14 @@ var DesignSystemListItem = ({
|
|
|
2963
2972
|
"np-option__container-aligned": true
|
|
2964
2973
|
}),
|
|
2965
2974
|
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "media", children: [
|
|
2966
|
-
icon || image ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "media-left", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2975
|
+
icon || image ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "media-left", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2976
|
+
ListItemMedia,
|
|
2977
|
+
{
|
|
2978
|
+
image,
|
|
2979
|
+
icon,
|
|
2980
|
+
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
2981
|
+
}
|
|
2982
|
+
) }) : null,
|
|
2967
2983
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "media-body", children: [
|
|
2968
2984
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "d-flex justify-content-between", children: [
|
|
2969
2985
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: title }),
|
|
@@ -3141,6 +3157,20 @@ function getOrigin(url) {
|
|
|
3141
3157
|
}
|
|
3142
3158
|
var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
|
|
3143
3159
|
|
|
3160
|
+
// ../renderers/src/SectionRenderer.tsx
|
|
3161
|
+
var import_components42 = require("@transferwise/components");
|
|
3162
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3163
|
+
var SectionRenderer = {
|
|
3164
|
+
canRenderType: "section",
|
|
3165
|
+
render: ({ children, callToAction, margin, title }) => {
|
|
3166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("section", { className: getMargin(margin), children: [
|
|
3167
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_components42.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
|
|
3168
|
+
children
|
|
3169
|
+
] });
|
|
3170
|
+
}
|
|
3171
|
+
};
|
|
3172
|
+
var SectionRenderer_default = SectionRenderer;
|
|
3173
|
+
|
|
3144
3174
|
// ../renderers/src/getWiseRenderers.ts
|
|
3145
3175
|
var getWiseRenderers = () => [
|
|
3146
3176
|
AlertRenderer_default,
|
|
@@ -3171,6 +3201,7 @@ var getWiseRenderers = () => [
|
|
|
3171
3201
|
ReviewRenderer_default,
|
|
3172
3202
|
SearchRenderer_default,
|
|
3173
3203
|
SelectInputRenderer_default,
|
|
3204
|
+
SectionRenderer_default,
|
|
3174
3205
|
StatusListRenderer_default,
|
|
3175
3206
|
TextInputRenderer_default,
|
|
3176
3207
|
UploadInputRenderer,
|
|
@@ -3180,17 +3211,17 @@ var getWiseRenderers = () => [
|
|
|
3180
3211
|
];
|
|
3181
3212
|
|
|
3182
3213
|
// ../renderers/src/ModalContentRenderer.tsx
|
|
3183
|
-
var
|
|
3184
|
-
var
|
|
3214
|
+
var import_components43 = require("@transferwise/components");
|
|
3215
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3185
3216
|
var ModalContentRenderer = {
|
|
3186
3217
|
canRenderType: "modal-content",
|
|
3187
3218
|
render: ({ title, children, open, onClose }) => {
|
|
3188
|
-
return /* @__PURE__ */ (0,
|
|
3219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components43.Modal, { open, title, body: children, onClose });
|
|
3189
3220
|
}
|
|
3190
3221
|
};
|
|
3191
3222
|
|
|
3192
3223
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
3193
|
-
var appVersion = "4.
|
|
3224
|
+
var appVersion = "4.13.0";
|
|
3194
3225
|
|
|
3195
3226
|
// src/dynamicFlow/telemetry/getLogEvent.ts
|
|
3196
3227
|
var getLogEvent = (onLog) => (level, message, extra) => {
|
|
@@ -3229,12 +3260,12 @@ var getTrackEvent = (onEvent, onAnalytics, onThemeChange) => (name, properties)
|
|
|
3229
3260
|
};
|
|
3230
3261
|
|
|
3231
3262
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
3232
|
-
var
|
|
3263
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
3233
3264
|
var wiseRenderers = getWiseRenderers();
|
|
3234
3265
|
function DynamicFlowLegacy(props) {
|
|
3235
3266
|
const { customFetch = globalThis.fetch } = props;
|
|
3236
3267
|
const coreProps = __spreadProps(__spreadValues({}, props), { httpClient: customFetch });
|
|
3237
|
-
return /* @__PURE__ */ (0,
|
|
3268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_dynamic_flow_client2.DynamicFlow, __spreadValues({}, coreProps));
|
|
3238
3269
|
}
|
|
3239
3270
|
function DynamicFlowRevamp(props) {
|
|
3240
3271
|
const {
|
|
@@ -3263,7 +3294,7 @@ function DynamicFlowRevamp(props) {
|
|
|
3263
3294
|
onLog: logEvent,
|
|
3264
3295
|
onLink
|
|
3265
3296
|
});
|
|
3266
|
-
return /* @__PURE__ */ (0,
|
|
3297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_dynamic_flow_client2.DynamicFlowCoreRevamp, __spreadValues({}, coreProps));
|
|
3267
3298
|
}
|
|
3268
3299
|
var DynamicForm = (0, import_react13.forwardRef)(function DynamicForm2(props, ref) {
|
|
3269
3300
|
const {
|
|
@@ -3292,7 +3323,7 @@ var DynamicForm = (0, import_react13.forwardRef)(function DynamicForm2(props, re
|
|
|
3292
3323
|
onLog: logEvent,
|
|
3293
3324
|
onLink
|
|
3294
3325
|
});
|
|
3295
|
-
return /* @__PURE__ */ (0,
|
|
3326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_dynamic_flow_client2.DynamicFormCore, __spreadProps(__spreadValues({}, coreProps), { ref }));
|
|
3296
3327
|
});
|
|
3297
3328
|
var useWiseHttpClient = (httpClient) => {
|
|
3298
3329
|
const { locale } = (0, import_react_intl16.useIntl)();
|
package/build/main.mjs
CHANGED
|
@@ -1046,7 +1046,7 @@ function FlagIcon({ name }) {
|
|
|
1046
1046
|
return null;
|
|
1047
1047
|
}
|
|
1048
1048
|
const code = name.substring(5);
|
|
1049
|
-
return /* @__PURE__ */ jsx11(Flag, { code });
|
|
1049
|
+
return /* @__PURE__ */ jsx11(Flag, { code, intrinsicSize: 24 });
|
|
1050
1050
|
}
|
|
1051
1051
|
|
|
1052
1052
|
// ../renderers/src/components/icon/NamedIcon.tsx
|
|
@@ -1156,14 +1156,21 @@ var DecisionRenderer = {
|
|
|
1156
1156
|
render: ({ control, margin, options, title }) => /* @__PURE__ */ jsxs3("div", { className: getMargin(margin), children: [
|
|
1157
1157
|
title && /* @__PURE__ */ jsx17(Header, { as: "h2", title }),
|
|
1158
1158
|
/* @__PURE__ */ jsx17(NavigationOptionsList, { children: options.map((option) => {
|
|
1159
|
-
const { description, disabled, icon, image, title: itemTitle, onClick } = option;
|
|
1159
|
+
const { description, disabled, icon, image, title: itemTitle, tag, onClick } = option;
|
|
1160
1160
|
return /* @__PURE__ */ jsx17(
|
|
1161
1161
|
NavigationOption,
|
|
1162
1162
|
{
|
|
1163
1163
|
title: itemTitle,
|
|
1164
1164
|
content: description,
|
|
1165
1165
|
disabled,
|
|
1166
|
-
media: /* @__PURE__ */ jsx17(
|
|
1166
|
+
media: /* @__PURE__ */ jsx17(
|
|
1167
|
+
OptionMedia,
|
|
1168
|
+
{
|
|
1169
|
+
icon,
|
|
1170
|
+
image,
|
|
1171
|
+
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
1172
|
+
}
|
|
1173
|
+
),
|
|
1167
1174
|
showMediaCircle: false,
|
|
1168
1175
|
showMediaAtAllSizes: true,
|
|
1169
1176
|
onClick
|
|
@@ -2795,13 +2802,36 @@ var LargeUploadRenderer = {
|
|
|
2795
2802
|
|
|
2796
2803
|
// ../renderers/src/ReviewRenderer.tsx
|
|
2797
2804
|
import { DefinitionList, Header as Header6 } from "@transferwise/components";
|
|
2805
|
+
|
|
2806
|
+
// ../renderers/src/utils/getHeaderAction.tsx
|
|
2807
|
+
var getHeaderAction = (callToAction) => {
|
|
2808
|
+
if (!callToAction) {
|
|
2809
|
+
return void 0;
|
|
2810
|
+
}
|
|
2811
|
+
const { accessibilityDescription, href, title, onClick } = callToAction;
|
|
2812
|
+
return href ? {
|
|
2813
|
+
"aria-label": accessibilityDescription,
|
|
2814
|
+
text: title,
|
|
2815
|
+
href,
|
|
2816
|
+
target: "_blank"
|
|
2817
|
+
} : {
|
|
2818
|
+
"aria-label": accessibilityDescription,
|
|
2819
|
+
text: title,
|
|
2820
|
+
onClick: (event) => {
|
|
2821
|
+
event.preventDefault();
|
|
2822
|
+
onClick();
|
|
2823
|
+
}
|
|
2824
|
+
};
|
|
2825
|
+
};
|
|
2826
|
+
|
|
2827
|
+
// ../renderers/src/ReviewRenderer.tsx
|
|
2798
2828
|
import { Fragment as Fragment7, jsx as jsx52, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2799
2829
|
var ReviewRenderer = {
|
|
2800
2830
|
canRenderType: "review",
|
|
2801
2831
|
render: ({ callToAction, control, fields, margin, title }) => {
|
|
2802
2832
|
const orientation = mapControlToDefinitionListLayout(control);
|
|
2803
2833
|
return /* @__PURE__ */ jsxs17("div", { className: getMargin(margin), children: [
|
|
2804
|
-
(title || callToAction) && /* @__PURE__ */ jsx52(Header6, { title: title != null ? title : "", action:
|
|
2834
|
+
(title || callToAction) && /* @__PURE__ */ jsx52(Header6, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
|
|
2805
2835
|
/* @__PURE__ */ jsx52("div", { className: margin, children: /* @__PURE__ */ jsx52(
|
|
2806
2836
|
DefinitionList,
|
|
2807
2837
|
{
|
|
@@ -2846,28 +2876,6 @@ var getFieldValue = (value, help, orientation) => {
|
|
|
2846
2876
|
}
|
|
2847
2877
|
return value;
|
|
2848
2878
|
};
|
|
2849
|
-
var getReviewAction = (callToAction) => {
|
|
2850
|
-
if (!callToAction) {
|
|
2851
|
-
return void 0;
|
|
2852
|
-
}
|
|
2853
|
-
const { accessibilityDescription, href, title, onClick } = callToAction;
|
|
2854
|
-
if (!href) {
|
|
2855
|
-
return {
|
|
2856
|
-
"aria-label": accessibilityDescription,
|
|
2857
|
-
text: title,
|
|
2858
|
-
onClick: (event) => {
|
|
2859
|
-
event.preventDefault();
|
|
2860
|
-
onClick();
|
|
2861
|
-
}
|
|
2862
|
-
};
|
|
2863
|
-
}
|
|
2864
|
-
return {
|
|
2865
|
-
"aria-label": accessibilityDescription,
|
|
2866
|
-
href,
|
|
2867
|
-
target: "_blank",
|
|
2868
|
-
text: title
|
|
2869
|
-
};
|
|
2870
|
-
};
|
|
2871
2879
|
|
|
2872
2880
|
// ../renderers/src/step/StepRenderer.tsx
|
|
2873
2881
|
import { Alert as Alert2, Title as Title2 } from "@transferwise/components";
|
|
@@ -2930,7 +2938,8 @@ var DesignSystemListItem = ({
|
|
|
2930
2938
|
supportingValues,
|
|
2931
2939
|
icon,
|
|
2932
2940
|
image,
|
|
2933
|
-
control
|
|
2941
|
+
control,
|
|
2942
|
+
tag
|
|
2934
2943
|
}) => /* @__PURE__ */ jsx55(
|
|
2935
2944
|
"label",
|
|
2936
2945
|
{
|
|
@@ -2939,7 +2948,14 @@ var DesignSystemListItem = ({
|
|
|
2939
2948
|
"np-option__container-aligned": true
|
|
2940
2949
|
}),
|
|
2941
2950
|
children: /* @__PURE__ */ jsxs20("div", { className: "media", children: [
|
|
2942
|
-
icon || image ? /* @__PURE__ */ jsx55("div", { className: "media-left", children: /* @__PURE__ */ jsx55(
|
|
2951
|
+
icon || image ? /* @__PURE__ */ jsx55("div", { className: "media-left", children: /* @__PURE__ */ jsx55(
|
|
2952
|
+
ListItemMedia,
|
|
2953
|
+
{
|
|
2954
|
+
image,
|
|
2955
|
+
icon,
|
|
2956
|
+
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
2957
|
+
}
|
|
2958
|
+
) }) : null,
|
|
2943
2959
|
/* @__PURE__ */ jsxs20("div", { className: "media-body", children: [
|
|
2944
2960
|
/* @__PURE__ */ jsxs20("div", { className: "d-flex justify-content-between", children: [
|
|
2945
2961
|
/* @__PURE__ */ jsx55("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: title }),
|
|
@@ -3117,6 +3133,20 @@ function getOrigin(url) {
|
|
|
3117
3133
|
}
|
|
3118
3134
|
var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
|
|
3119
3135
|
|
|
3136
|
+
// ../renderers/src/SectionRenderer.tsx
|
|
3137
|
+
import { Header as Header8 } from "@transferwise/components";
|
|
3138
|
+
import { jsx as jsx59, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3139
|
+
var SectionRenderer = {
|
|
3140
|
+
canRenderType: "section",
|
|
3141
|
+
render: ({ children, callToAction, margin, title }) => {
|
|
3142
|
+
return /* @__PURE__ */ jsxs24("section", { className: getMargin(margin), children: [
|
|
3143
|
+
(title || callToAction) && /* @__PURE__ */ jsx59(Header8, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
|
|
3144
|
+
children
|
|
3145
|
+
] });
|
|
3146
|
+
}
|
|
3147
|
+
};
|
|
3148
|
+
var SectionRenderer_default = SectionRenderer;
|
|
3149
|
+
|
|
3120
3150
|
// ../renderers/src/getWiseRenderers.ts
|
|
3121
3151
|
var getWiseRenderers = () => [
|
|
3122
3152
|
AlertRenderer_default,
|
|
@@ -3147,6 +3177,7 @@ var getWiseRenderers = () => [
|
|
|
3147
3177
|
ReviewRenderer_default,
|
|
3148
3178
|
SearchRenderer_default,
|
|
3149
3179
|
SelectInputRenderer_default,
|
|
3180
|
+
SectionRenderer_default,
|
|
3150
3181
|
StatusListRenderer_default,
|
|
3151
3182
|
TextInputRenderer_default,
|
|
3152
3183
|
UploadInputRenderer,
|
|
@@ -3157,16 +3188,16 @@ var getWiseRenderers = () => [
|
|
|
3157
3188
|
|
|
3158
3189
|
// ../renderers/src/ModalContentRenderer.tsx
|
|
3159
3190
|
import { Modal as Modal4 } from "@transferwise/components";
|
|
3160
|
-
import { jsx as
|
|
3191
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
3161
3192
|
var ModalContentRenderer = {
|
|
3162
3193
|
canRenderType: "modal-content",
|
|
3163
3194
|
render: ({ title, children, open, onClose }) => {
|
|
3164
|
-
return /* @__PURE__ */
|
|
3195
|
+
return /* @__PURE__ */ jsx60(Modal4, { open, title, body: children, onClose });
|
|
3165
3196
|
}
|
|
3166
3197
|
};
|
|
3167
3198
|
|
|
3168
3199
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
3169
|
-
var appVersion = "4.
|
|
3200
|
+
var appVersion = "4.13.0";
|
|
3170
3201
|
|
|
3171
3202
|
// src/dynamicFlow/telemetry/getLogEvent.ts
|
|
3172
3203
|
var getLogEvent = (onLog) => (level, message, extra) => {
|
|
@@ -3205,12 +3236,12 @@ var getTrackEvent = (onEvent, onAnalytics, onThemeChange) => (name, properties)
|
|
|
3205
3236
|
};
|
|
3206
3237
|
|
|
3207
3238
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
3208
|
-
import { jsx as
|
|
3239
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
3209
3240
|
var wiseRenderers = getWiseRenderers();
|
|
3210
3241
|
function DynamicFlowLegacy(props) {
|
|
3211
3242
|
const { customFetch = globalThis.fetch } = props;
|
|
3212
3243
|
const coreProps = __spreadProps(__spreadValues({}, props), { httpClient: customFetch });
|
|
3213
|
-
return /* @__PURE__ */
|
|
3244
|
+
return /* @__PURE__ */ jsx61(DynamicFlowCoreLegacy, __spreadValues({}, coreProps));
|
|
3214
3245
|
}
|
|
3215
3246
|
function DynamicFlowRevamp(props) {
|
|
3216
3247
|
const {
|
|
@@ -3239,7 +3270,7 @@ function DynamicFlowRevamp(props) {
|
|
|
3239
3270
|
onLog: logEvent,
|
|
3240
3271
|
onLink
|
|
3241
3272
|
});
|
|
3242
|
-
return /* @__PURE__ */
|
|
3273
|
+
return /* @__PURE__ */ jsx61(DynamicFlowCoreRevamp, __spreadValues({}, coreProps));
|
|
3243
3274
|
}
|
|
3244
3275
|
var DynamicForm = forwardRef(function DynamicForm2(props, ref) {
|
|
3245
3276
|
const {
|
|
@@ -3268,7 +3299,7 @@ var DynamicForm = forwardRef(function DynamicForm2(props, ref) {
|
|
|
3268
3299
|
onLog: logEvent,
|
|
3269
3300
|
onLink
|
|
3270
3301
|
});
|
|
3271
|
-
return /* @__PURE__ */
|
|
3302
|
+
return /* @__PURE__ */ jsx61(DynamicFormCore, __spreadProps(__spreadValues({}, coreProps), { ref }));
|
|
3272
3303
|
});
|
|
3273
3304
|
var useWiseHttpClient = (httpClient) => {
|
|
3274
3305
|
const { locale } = useIntl9();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/dynamic-flow-client-internal",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.13.0",
|
|
4
4
|
"description": "Dynamic Flow web client for Wise",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./build/main.js",
|
|
@@ -36,17 +36,9 @@
|
|
|
36
36
|
"@babel/preset-env": "7.27.2",
|
|
37
37
|
"@babel/preset-react": "7.27.1",
|
|
38
38
|
"@babel/preset-typescript": "7.27.1",
|
|
39
|
-
"@chromatic-com/storybook": "
|
|
39
|
+
"@chromatic-com/storybook": "4.0.0",
|
|
40
40
|
"@formatjs/cli": "^6.7.1",
|
|
41
|
-
"@storybook/
|
|
42
|
-
"@storybook/addon-actions": "^8.6.14",
|
|
43
|
-
"@storybook/addon-essentials": "^8.6.14",
|
|
44
|
-
"@storybook/addon-interactions": "^8.6.14",
|
|
45
|
-
"@storybook/addon-links": "^8.6.14",
|
|
46
|
-
"@storybook/addon-webpack5-compiler-babel": "^3.0.6",
|
|
47
|
-
"@storybook/react": "^8.6.14",
|
|
48
|
-
"@storybook/react-webpack5": "^8.6.14",
|
|
49
|
-
"@storybook/test": "^8.6.14",
|
|
41
|
+
"@storybook/react-vite": "9.0.4",
|
|
50
42
|
"@testing-library/dom": "10.4.0",
|
|
51
43
|
"@testing-library/jest-dom": "6.6.3",
|
|
52
44
|
"@testing-library/react": "16.3.0",
|
|
@@ -63,6 +55,7 @@
|
|
|
63
55
|
"babel-jest": "29.7.0",
|
|
64
56
|
"currency-flags": "4.0.7",
|
|
65
57
|
"esbuild": "0.25.5",
|
|
58
|
+
"eslint-plugin-storybook": "9.0.4",
|
|
66
59
|
"jest": "29.7.0",
|
|
67
60
|
"jest-environment-jsdom": "29.7.0",
|
|
68
61
|
"jest-fetch-mock": "^3.0.3",
|
|
@@ -74,17 +67,16 @@
|
|
|
74
67
|
"react": "18.3.1",
|
|
75
68
|
"react-dom": "18.3.1",
|
|
76
69
|
"react-intl": "6.8.9",
|
|
77
|
-
"storybook": "^
|
|
70
|
+
"storybook": "^9.0.4",
|
|
78
71
|
"stylelint": "16.19.1",
|
|
79
72
|
"stylelint-config-standard": "36.0.1",
|
|
80
73
|
"stylelint-no-unsupported-browser-features": "8.0.4",
|
|
81
74
|
"stylelint-value-no-unknown-custom-properties": "6.0.1",
|
|
82
75
|
"tsx": "4.19.4",
|
|
83
76
|
"typescript": "5.8.3",
|
|
84
|
-
"webpack": "5.99.9",
|
|
85
77
|
"@wise/dynamic-flow-fixtures": "0.0.1",
|
|
86
|
-
"@wise/dynamic-flow-
|
|
87
|
-
"@wise/dynamic-flow-
|
|
78
|
+
"@wise/dynamic-flow-renderers": "0.0.0",
|
|
79
|
+
"@wise/dynamic-flow-types": "3.4.0"
|
|
88
80
|
},
|
|
89
81
|
"peerDependencies": {
|
|
90
82
|
"@transferwise/components": "^46.92.0",
|
|
@@ -93,14 +85,14 @@
|
|
|
93
85
|
"@transferwise/neptune-css": "^14.22.0",
|
|
94
86
|
"@wise/art": "^2.19.0",
|
|
95
87
|
"@wise/components-theming": "^0.7.1 || ^1",
|
|
88
|
+
"react": "^18",
|
|
96
89
|
"react-dom": "^18",
|
|
97
|
-
"react-intl": "^6"
|
|
98
|
-
"react": "^18"
|
|
90
|
+
"react-intl": "^6"
|
|
99
91
|
},
|
|
100
92
|
"dependencies": {
|
|
101
93
|
"classnames": "2.5.1",
|
|
102
|
-
"@wise/dynamic-flow-client": "4.
|
|
103
|
-
"@wise/dynamic-flow-types": "3.
|
|
94
|
+
"@wise/dynamic-flow-client": "4.6.0",
|
|
95
|
+
"@wise/dynamic-flow-types": "3.4.0"
|
|
104
96
|
},
|
|
105
97
|
"scripts": {
|
|
106
98
|
"dev": "pnpm build:visual-tests && storybook dev -p 3005",
|
|
@@ -120,6 +112,7 @@
|
|
|
120
112
|
"lint": "npm-run-all lint:ts lint:css",
|
|
121
113
|
"lint:ts": "eslint 'src/**/*.{js,jsx,ts,tsx}' --quiet",
|
|
122
114
|
"lint:css": "stylelint --allow-empty-input './src/**/*.css'",
|
|
123
|
-
"build-storybook": "pnpm build:visual-tests && storybook build -c .storybook --disable-telemetry"
|
|
115
|
+
"build-storybook": "pnpm build:visual-tests && storybook build -c .storybook --disable-telemetry",
|
|
116
|
+
"audit-i18n": "tsx ./scripts/audit-i18n.mjs"
|
|
124
117
|
}
|
|
125
118
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { StoryObj, Meta } from '@storybook/react';
|
|
2
|
-
declare function DynamicFlowRenderer({ initialStepName, revampEnabled, }: {
|
|
3
|
-
initialStepName?: string;
|
|
4
|
-
revampEnabled?: boolean;
|
|
5
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
declare const meta: Meta<typeof DynamicFlowRenderer>;
|
|
7
|
-
export declare const AllFixtures: StoryObj<typeof DynamicFlowRenderer>;
|
|
8
|
-
export default meta;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
declare function DynamicFormStory(): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
declare const meta: Meta<typeof DynamicFormStory>;
|
|
4
|
-
export declare const AllFixtures: StoryObj<typeof DynamicFormStory>;
|
|
5
|
-
export default meta;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export declare function Editable({ initialStepName }: {
|
|
2
|
-
initialStepName?: string;
|
|
3
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
declare const _default: {
|
|
5
|
-
component: typeof Editable;
|
|
6
|
-
title: string;
|
|
7
|
-
parameters: {
|
|
8
|
-
chromatic: {
|
|
9
|
-
disableSnapshot: boolean;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
argTypes: {
|
|
13
|
-
initialStepName: {
|
|
14
|
-
label: string;
|
|
15
|
-
control: string;
|
|
16
|
-
options: string[];
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
args: {
|
|
20
|
-
initialStepName: string;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export default _default;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import DynamicFlowSideBySide from './utils/DynamicFlowSideBySide';
|
|
2
|
-
import { StoryObj } from '@storybook/react';
|
|
3
|
-
declare const _default: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof DynamicFlowSideBySide;
|
|
6
|
-
parameters: {
|
|
7
|
-
chromatic: {
|
|
8
|
-
disableSnapshot: boolean;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
argTypes: {};
|
|
12
|
-
};
|
|
13
|
-
export default _default;
|
|
14
|
-
type Story = StoryObj<typeof DynamicFlowSideBySide>;
|
|
15
|
-
export declare const CameraCapture: Story;
|
|
16
|
-
export declare const RecipientUpdate: Story;
|
|
17
|
-
export declare const SingleFileUpload: Story;
|
|
18
|
-
export declare const RecipientCreation: Story;
|
|
19
|
-
export declare const StepValidationErrors: Story;
|
|
20
|
-
export declare const RecipientCreationWithInitialModel: Story;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import DynamicFlowSideBySide from './utils/DynamicFlowSideBySide';
|
|
3
|
-
declare const meta: Meta<typeof DynamicFlowSideBySide>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof DynamicFlowSideBySide>;
|
|
6
|
-
export declare const ActionResponse: Story;
|
|
7
|
-
export declare const ArrayUploadBase64: Story;
|
|
8
|
-
export declare const External: Story;
|
|
9
|
-
export declare const PersistAsync: Story;
|
|
10
|
-
export declare const Polling: Story;
|
|
11
|
-
export declare const Search: Story;
|
|
12
|
-
export declare const Modal: Story;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { DynamicFlowRevamp } from '../dynamicFlow/DynamicFlow';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: typeof DynamicFlowRevamp;
|
|
5
|
-
};
|
|
6
|
-
export default _default;
|
|
7
|
-
export declare const InitialisationWithSuccessfulStep: {
|
|
8
|
-
render: () => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
};
|
|
10
|
-
export declare const InitialisationWith404Step: {
|
|
11
|
-
render: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { DynamicFlowRevamp } from '../index';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
component: typeof DynamicFlowRevamp;
|
|
4
|
-
title: string;
|
|
5
|
-
parameters: {
|
|
6
|
-
chromatic: {
|
|
7
|
-
disableSnapshot: boolean;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export default _default;
|
|
12
|
-
export declare function SCAIntegration(): import("react/jsx-runtime").JSX.Element;
|