@wise/dynamic-flow-client 4.0.2 → 4.0.4-experimental-df596b9

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.
@@ -0,0 +1,2 @@
1
+ import { LocalValue } from '../../types';
2
+ export declare const isOrWasValid: <V extends LocalValue>(getErrors: (value: V) => string[], previous: V, current: V) => boolean;
@@ -1,4 +1,4 @@
1
1
  import type { StepRendererProps } from '@wise/dynamic-flow-types/build/renderers';
2
2
  import type { StepDomainComponent } from '../domain/components/StepDomainComponent';
3
3
  import { type RendererMapperProps } from './mappers/componentToRendererProps';
4
- export declare const stepComponentToProps: ({ uid, back, control, description, error, external, loadingState, title, components, }: StepDomainComponent, rendererMapperProps: RendererMapperProps) => StepRendererProps;
4
+ export declare const stepComponentToProps: ({ uid, back, control, description, error, external, loadingState, step, title, components, onAction, }: StepDomainComponent, rendererMapperProps: RendererMapperProps) => StepRendererProps;
@@ -1,10 +1,15 @@
1
1
  import { DynamicFlowCorePropsWithInitialAction, DynamicFlowCorePropsWithInitialStep } from '../types';
2
+ import { Theming } from '@wise/components-theming';
2
3
  type MakeOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
3
4
  export type DynamicFlowWisePropsWithInitialAction = MakeOptional<DynamicFlowCorePropsWithInitialAction, 'renderers' | 'onLink'>;
4
5
  export type DynamicFlowWisePropsWithInitialStep = MakeOptional<DynamicFlowCorePropsWithInitialStep, 'renderers' | 'onLink'>;
5
- export type DynamicFlowWiseProps = DynamicFlowWisePropsWithInitialAction | DynamicFlowWisePropsWithInitialStep;
6
+ export type DynamicFlowWiseProps = (DynamicFlowWisePropsWithInitialAction | DynamicFlowWisePropsWithInitialStep) & {
7
+ onAnalytics?: DynamicFlowWiseProps['onEvent'];
8
+ onThemeChange?: OnThemeChange;
9
+ };
6
10
  /**
7
11
  * This component is only used in tests.
8
12
  */
9
13
  declare function DynamicFlowWise(props: DynamicFlowWiseProps): import("react/jsx-runtime").JSX.Element;
14
+ type OnThemeChange = (theme: Theming['theme']) => void;
10
15
  export default DynamicFlowWise;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-client",
3
- "version": "4.0.2",
3
+ "version": "4.0.4-experimental-df596b9",
4
4
  "description": "Dynamic Flow web client",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./build/main.js",
@@ -30,34 +30,34 @@
30
30
  "url": "git+https://github.com/transferwise/dynamic-flow.git"
31
31
  },
32
32
  "devDependencies": {
33
- "@babel/core": "7.26.9",
33
+ "@babel/core": "7.26.10",
34
34
  "@babel/plugin-syntax-flow": "7.26.0",
35
35
  "@babel/plugin-transform-react-jsx": "7.25.9",
36
36
  "@babel/preset-env": "7.26.9",
37
37
  "@babel/preset-react": "7.26.3",
38
38
  "@babel/preset-typescript": "7.26.0",
39
- "@chromatic-com/storybook": "3.2.5",
39
+ "@chromatic-com/storybook": "3.2.6",
40
40
  "@formatjs/cli": "^6.6.1",
41
- "@storybook/addon-a11y": "^8.6.3",
42
- "@storybook/addon-actions": "^8.6.3",
43
- "@storybook/addon-essentials": "^8.6.3",
44
- "@storybook/addon-interactions": "^8.6.3",
45
- "@storybook/addon-links": "^8.6.3",
41
+ "@storybook/addon-a11y": "^8.6.7",
42
+ "@storybook/addon-actions": "^8.6.7",
43
+ "@storybook/addon-essentials": "^8.6.7",
44
+ "@storybook/addon-interactions": "^8.6.7",
45
+ "@storybook/addon-links": "^8.6.7",
46
46
  "@storybook/addon-webpack5-compiler-babel": "^3.0.5",
47
- "@storybook/manager-api": "^8.6.3",
48
- "@storybook/react": "^8.6.3",
49
- "@storybook/react-webpack5": "^8.6.3",
50
- "@storybook/test": "^8.6.3",
51
- "@storybook/types": "^8.6.3",
47
+ "@storybook/manager-api": "^8.6.7",
48
+ "@storybook/react": "^8.6.7",
49
+ "@storybook/react-webpack5": "^8.6.7",
50
+ "@storybook/test": "^8.6.7",
51
+ "@storybook/types": "^8.6.7",
52
52
  "@testing-library/dom": "10.4.0",
53
53
  "@testing-library/jest-dom": "6.6.3",
54
54
  "@testing-library/react": "16.2.0",
55
55
  "@testing-library/user-event": "14.6.1",
56
- "@transferwise/components": "46.93.1",
56
+ "@transferwise/components": "46.94.1",
57
57
  "@transferwise/formatting": "^2.13.1",
58
- "@transferwise/icons": "3.18.0",
58
+ "@transferwise/icons": "3.19.1",
59
59
  "@transferwise/neptune-css": "14.22.0",
60
- "@types/node": "22.13.9",
60
+ "@types/node": "22.13.10",
61
61
  "@types/jest": "29.5.14",
62
62
  "@types/react": "18.3.18",
63
63
  "@types/react-dom": "18.3.5",
@@ -65,20 +65,20 @@
65
65
  "@wise/art": "2.20.0",
66
66
  "@wise/components-theming": "^1.6.1",
67
67
  "babel-jest": "29.7.0",
68
- "esbuild": "0.25.0",
68
+ "esbuild": "0.25.1",
69
69
  "jest": "29.7.0",
70
70
  "jest-environment-jsdom": "29.7.0",
71
71
  "jest-fetch-mock": "^3.0.3",
72
72
  "jest-watch-typeahead": "^2.2.2",
73
73
  "npm-run-all2": "7.0.2",
74
74
  "postcss": "^8.5.3",
75
- "postcss-cli": "^11.0.0",
75
+ "postcss-cli": "^11.0.1",
76
76
  "postcss-import": "^16.1.0",
77
77
  "react": "18.3.1",
78
78
  "react-dom": "18.3.1",
79
79
  "react-intl": "6.8.9",
80
- "storybook": "^8.6.3",
81
- "stylelint": "16.15.0",
80
+ "storybook": "^8.6.7",
81
+ "stylelint": "16.16.0",
82
82
  "stylelint-config-standard": "36.0.1",
83
83
  "stylelint-no-unsupported-browser-features": "8.0.4",
84
84
  "stylelint-value-no-unknown-custom-properties": "6.0.1",
@@ -102,7 +102,7 @@
102
102
  "classnames": "2.5.1",
103
103
  "react-webcam": "^7.2.0",
104
104
  "screenfull": "^5.2.0",
105
- "@wise/dynamic-flow-types": "3.0.1"
105
+ "@wise/dynamic-flow-types": "3.1.0"
106
106
  },
107
107
  "scripts": {
108
108
  "dev": "pnpm build:visual-tests && storybook dev -p 3003",