@wise/dynamic-flow-client-internal 4.9.5 → 4.10.1
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.css +3 -0
- package/build/main.js +24 -8
- package/build/main.mjs +24 -8
- package/package.json +11 -11
package/build/main.css
CHANGED
package/build/main.js
CHANGED
|
@@ -1243,7 +1243,7 @@ var HeadingRenderer = {
|
|
|
1243
1243
|
function Heading(props) {
|
|
1244
1244
|
const { text, size, align, margin, control } = props;
|
|
1245
1245
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
1246
|
-
return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StandardHeading, { size, text, className });
|
|
1246
|
+
return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StandardHeading, { size, text, className: `${className} df-standard-heading` });
|
|
1247
1247
|
}
|
|
1248
1248
|
function DisplayHeading({ size, text, className }) {
|
|
1249
1249
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components11.Display, { type: getDisplayType(size), className, children: text });
|
|
@@ -3173,8 +3173,18 @@ var getWiseRenderers = () => [
|
|
|
3173
3173
|
StepRenderer
|
|
3174
3174
|
];
|
|
3175
3175
|
|
|
3176
|
+
// ../renderers/src/ModalContentRenderer.tsx
|
|
3177
|
+
var import_components42 = require("@transferwise/components");
|
|
3178
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3179
|
+
var ModalContentRenderer = {
|
|
3180
|
+
canRenderType: "modal-content",
|
|
3181
|
+
render: ({ title, children, open, onClose }) => {
|
|
3182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_components42.Modal, { open, title, body: children, onClose });
|
|
3183
|
+
}
|
|
3184
|
+
};
|
|
3185
|
+
|
|
3176
3186
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
3177
|
-
var appVersion = "4.
|
|
3187
|
+
var appVersion = "4.10.1";
|
|
3178
3188
|
|
|
3179
3189
|
// src/dynamicFlow/telemetry/getLogEvent.ts
|
|
3180
3190
|
var getLogEvent = (onLog) => (level, message, extra) => {
|
|
@@ -3213,12 +3223,12 @@ var getTrackEvent = (onEvent, onAnalytics, onThemeChange) => (name, properties)
|
|
|
3213
3223
|
};
|
|
3214
3224
|
|
|
3215
3225
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
3216
|
-
var
|
|
3226
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3217
3227
|
var wiseRenderers = getWiseRenderers();
|
|
3218
3228
|
function DynamicFlowLegacy(props) {
|
|
3219
3229
|
const { customFetch = globalThis.fetch } = props;
|
|
3220
3230
|
const coreProps = __spreadProps(__spreadValues({}, props), { httpClient: customFetch });
|
|
3221
|
-
return /* @__PURE__ */ (0,
|
|
3231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_dynamic_flow_client2.DynamicFlow, __spreadValues({}, coreProps));
|
|
3222
3232
|
}
|
|
3223
3233
|
function DynamicFlowRevamp(props) {
|
|
3224
3234
|
const {
|
|
@@ -3231,7 +3241,10 @@ function DynamicFlowRevamp(props) {
|
|
|
3231
3241
|
onThemeChange
|
|
3232
3242
|
} = props;
|
|
3233
3243
|
const httpClient = useWiseHttpClient(customFetch);
|
|
3234
|
-
const mergedRenderers = (0, import_react12.useMemo)(
|
|
3244
|
+
const mergedRenderers = (0, import_react12.useMemo)(
|
|
3245
|
+
() => [ModalContentRenderer, ...renderers != null ? renderers : [], ...wiseRenderers],
|
|
3246
|
+
[renderers]
|
|
3247
|
+
);
|
|
3235
3248
|
const logEvent = (0, import_react12.useMemo)(() => getLogEvent(onLog), [onLog]);
|
|
3236
3249
|
const trackEvent = (0, import_react12.useMemo)(
|
|
3237
3250
|
() => getTrackEvent(onEvent, onAnalytics, onThemeChange),
|
|
@@ -3244,7 +3257,7 @@ function DynamicFlowRevamp(props) {
|
|
|
3244
3257
|
onLog: logEvent,
|
|
3245
3258
|
onLink
|
|
3246
3259
|
});
|
|
3247
|
-
return /* @__PURE__ */ (0,
|
|
3260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_dynamic_flow_client2.DynamicFlowCoreRevamp, __spreadValues({}, coreProps));
|
|
3248
3261
|
}
|
|
3249
3262
|
var DynamicForm = (0, import_react12.forwardRef)(function DynamicForm2(props, ref) {
|
|
3250
3263
|
const {
|
|
@@ -3257,7 +3270,10 @@ var DynamicForm = (0, import_react12.forwardRef)(function DynamicForm2(props, re
|
|
|
3257
3270
|
onThemeChange
|
|
3258
3271
|
} = props;
|
|
3259
3272
|
const httpClient = useWiseHttpClient(customFetch);
|
|
3260
|
-
const mergedRenderers = (0, import_react12.useMemo)(
|
|
3273
|
+
const mergedRenderers = (0, import_react12.useMemo)(
|
|
3274
|
+
() => [ModalContentRenderer, ...renderers != null ? renderers : [], ...wiseRenderers],
|
|
3275
|
+
[renderers]
|
|
3276
|
+
);
|
|
3261
3277
|
const logEvent = (0, import_react12.useMemo)(() => getLogEvent(onLog), [onLog]);
|
|
3262
3278
|
const trackEvent = (0, import_react12.useMemo)(
|
|
3263
3279
|
() => getTrackEvent(onEvent, onAnalytics, onThemeChange),
|
|
@@ -3270,7 +3286,7 @@ var DynamicForm = (0, import_react12.forwardRef)(function DynamicForm2(props, re
|
|
|
3270
3286
|
onLog: logEvent,
|
|
3271
3287
|
onLink
|
|
3272
3288
|
});
|
|
3273
|
-
return /* @__PURE__ */ (0,
|
|
3289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_dynamic_flow_client2.DynamicFormCore, __spreadProps(__spreadValues({}, coreProps), { ref }));
|
|
3274
3290
|
});
|
|
3275
3291
|
var useWiseHttpClient = (httpClient) => {
|
|
3276
3292
|
const { locale } = (0, import_react_intl16.useIntl)();
|
package/build/main.mjs
CHANGED
|
@@ -1209,7 +1209,7 @@ var HeadingRenderer = {
|
|
|
1209
1209
|
function Heading(props) {
|
|
1210
1210
|
const { text, size, align, margin, control } = props;
|
|
1211
1211
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
1212
|
-
return control === "display" ? /* @__PURE__ */ jsx21(DisplayHeading, { size, text, className }) : /* @__PURE__ */ jsx21(StandardHeading, { size, text, className });
|
|
1212
|
+
return control === "display" ? /* @__PURE__ */ jsx21(DisplayHeading, { size, text, className }) : /* @__PURE__ */ jsx21(StandardHeading, { size, text, className: `${className} df-standard-heading` });
|
|
1213
1213
|
}
|
|
1214
1214
|
function DisplayHeading({ size, text, className }) {
|
|
1215
1215
|
return /* @__PURE__ */ jsx21(Display, { type: getDisplayType(size), className, children: text });
|
|
@@ -3149,8 +3149,18 @@ var getWiseRenderers = () => [
|
|
|
3149
3149
|
StepRenderer
|
|
3150
3150
|
];
|
|
3151
3151
|
|
|
3152
|
+
// ../renderers/src/ModalContentRenderer.tsx
|
|
3153
|
+
import { Modal as Modal3 } from "@transferwise/components";
|
|
3154
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
3155
|
+
var ModalContentRenderer = {
|
|
3156
|
+
canRenderType: "modal-content",
|
|
3157
|
+
render: ({ title, children, open, onClose }) => {
|
|
3158
|
+
return /* @__PURE__ */ jsx59(Modal3, { open, title, body: children, onClose });
|
|
3159
|
+
}
|
|
3160
|
+
};
|
|
3161
|
+
|
|
3152
3162
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
3153
|
-
var appVersion = "4.
|
|
3163
|
+
var appVersion = "4.10.1";
|
|
3154
3164
|
|
|
3155
3165
|
// src/dynamicFlow/telemetry/getLogEvent.ts
|
|
3156
3166
|
var getLogEvent = (onLog) => (level, message, extra) => {
|
|
@@ -3189,12 +3199,12 @@ var getTrackEvent = (onEvent, onAnalytics, onThemeChange) => (name, properties)
|
|
|
3189
3199
|
};
|
|
3190
3200
|
|
|
3191
3201
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
3192
|
-
import { jsx as
|
|
3202
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
3193
3203
|
var wiseRenderers = getWiseRenderers();
|
|
3194
3204
|
function DynamicFlowLegacy(props) {
|
|
3195
3205
|
const { customFetch = globalThis.fetch } = props;
|
|
3196
3206
|
const coreProps = __spreadProps(__spreadValues({}, props), { httpClient: customFetch });
|
|
3197
|
-
return /* @__PURE__ */
|
|
3207
|
+
return /* @__PURE__ */ jsx60(DynamicFlowCoreLegacy, __spreadValues({}, coreProps));
|
|
3198
3208
|
}
|
|
3199
3209
|
function DynamicFlowRevamp(props) {
|
|
3200
3210
|
const {
|
|
@@ -3207,7 +3217,10 @@ function DynamicFlowRevamp(props) {
|
|
|
3207
3217
|
onThemeChange
|
|
3208
3218
|
} = props;
|
|
3209
3219
|
const httpClient = useWiseHttpClient(customFetch);
|
|
3210
|
-
const mergedRenderers = useMemo2(
|
|
3220
|
+
const mergedRenderers = useMemo2(
|
|
3221
|
+
() => [ModalContentRenderer, ...renderers != null ? renderers : [], ...wiseRenderers],
|
|
3222
|
+
[renderers]
|
|
3223
|
+
);
|
|
3211
3224
|
const logEvent = useMemo2(() => getLogEvent(onLog), [onLog]);
|
|
3212
3225
|
const trackEvent = useMemo2(
|
|
3213
3226
|
() => getTrackEvent(onEvent, onAnalytics, onThemeChange),
|
|
@@ -3220,7 +3233,7 @@ function DynamicFlowRevamp(props) {
|
|
|
3220
3233
|
onLog: logEvent,
|
|
3221
3234
|
onLink
|
|
3222
3235
|
});
|
|
3223
|
-
return /* @__PURE__ */
|
|
3236
|
+
return /* @__PURE__ */ jsx60(DynamicFlowCoreRevamp, __spreadValues({}, coreProps));
|
|
3224
3237
|
}
|
|
3225
3238
|
var DynamicForm = forwardRef(function DynamicForm2(props, ref) {
|
|
3226
3239
|
const {
|
|
@@ -3233,7 +3246,10 @@ var DynamicForm = forwardRef(function DynamicForm2(props, ref) {
|
|
|
3233
3246
|
onThemeChange
|
|
3234
3247
|
} = props;
|
|
3235
3248
|
const httpClient = useWiseHttpClient(customFetch);
|
|
3236
|
-
const mergedRenderers = useMemo2(
|
|
3249
|
+
const mergedRenderers = useMemo2(
|
|
3250
|
+
() => [ModalContentRenderer, ...renderers != null ? renderers : [], ...wiseRenderers],
|
|
3251
|
+
[renderers]
|
|
3252
|
+
);
|
|
3237
3253
|
const logEvent = useMemo2(() => getLogEvent(onLog), [onLog]);
|
|
3238
3254
|
const trackEvent = useMemo2(
|
|
3239
3255
|
() => getTrackEvent(onEvent, onAnalytics, onThemeChange),
|
|
@@ -3246,7 +3262,7 @@ var DynamicForm = forwardRef(function DynamicForm2(props, ref) {
|
|
|
3246
3262
|
onLog: logEvent,
|
|
3247
3263
|
onLink
|
|
3248
3264
|
});
|
|
3249
|
-
return /* @__PURE__ */
|
|
3265
|
+
return /* @__PURE__ */ jsx60(DynamicFormCore, __spreadProps(__spreadValues({}, coreProps), { ref }));
|
|
3250
3266
|
});
|
|
3251
3267
|
var useWiseHttpClient = (httpClient) => {
|
|
3252
3268
|
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.10.1",
|
|
4
4
|
"description": "Dynamic Flow web client for Wise",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./build/main.js",
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"@testing-library/jest-dom": "6.6.3",
|
|
52
52
|
"@testing-library/react": "16.3.0",
|
|
53
53
|
"@testing-library/user-event": "14.6.1",
|
|
54
|
-
"@transferwise/components": "46.
|
|
54
|
+
"@transferwise/components": "46.96.0",
|
|
55
55
|
"@transferwise/formatting": "^2.13.1",
|
|
56
|
-
"@transferwise/icons": "3.
|
|
57
|
-
"@transferwise/neptune-css": "14.24.
|
|
56
|
+
"@transferwise/icons": "3.20.0",
|
|
57
|
+
"@transferwise/neptune-css": "14.24.2",
|
|
58
58
|
"@types/jest": "29.5.14",
|
|
59
59
|
"@types/react": "18.3.20",
|
|
60
60
|
"@types/react-dom": "18.3.6",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@wise/components-theming": "^1.6.2",
|
|
63
63
|
"babel-jest": "29.7.0",
|
|
64
64
|
"currency-flags": "4.0.7",
|
|
65
|
-
"esbuild": "0.25.
|
|
65
|
+
"esbuild": "0.25.3",
|
|
66
66
|
"jest": "29.7.0",
|
|
67
67
|
"jest-environment-jsdom": "29.7.0",
|
|
68
68
|
"jest-fetch-mock": "^3.0.3",
|
|
@@ -75,16 +75,16 @@
|
|
|
75
75
|
"react-dom": "18.3.1",
|
|
76
76
|
"react-intl": "6.8.9",
|
|
77
77
|
"storybook": "^8.6.12",
|
|
78
|
-
"stylelint": "16.
|
|
78
|
+
"stylelint": "16.19.1",
|
|
79
79
|
"stylelint-config-standard": "36.0.1",
|
|
80
80
|
"stylelint-no-unsupported-browser-features": "8.0.4",
|
|
81
81
|
"stylelint-value-no-unknown-custom-properties": "6.0.1",
|
|
82
82
|
"tsx": "4.19.3",
|
|
83
83
|
"typescript": "5.8.3",
|
|
84
|
-
"webpack": "5.99.
|
|
84
|
+
"webpack": "5.99.7",
|
|
85
85
|
"@wise/dynamic-flow-fixtures": "0.0.1",
|
|
86
|
-
"@wise/dynamic-flow-
|
|
87
|
-
"@wise/dynamic-flow-
|
|
86
|
+
"@wise/dynamic-flow-renderers": "0.0.0",
|
|
87
|
+
"@wise/dynamic-flow-types": "3.2.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.
|
|
103
|
-
"@wise/dynamic-flow-types": "3.
|
|
102
|
+
"@wise/dynamic-flow-client": "4.4.0",
|
|
103
|
+
"@wise/dynamic-flow-types": "3.2.0"
|
|
104
104
|
},
|
|
105
105
|
"scripts": {
|
|
106
106
|
"dev": "pnpm build:visual-tests && storybook dev -p 3005",
|