@wise/dynamic-flow-client-internal 5.0.1-exp-css-28d60ea → 5.1.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/README.md CHANGED
@@ -37,9 +37,14 @@ pnpm install @transferwise/components @transferwise/formatting @transferwise/ico
37
37
 
38
38
  **Note:** Keep in mind that some of these dependencies have their own peer dependencies. Don't forget to install those, for instance: `@transferwise/components` needs `@wise/art` and `@wise/components-theming`.
39
39
 
40
+ 3. In addition to the design system styles, you need to import the DynamicFlow styles once into your application. You can do this either via JavaScript or CSS.
41
+
40
42
  ```js
41
- // Should be imported once in your application
42
- import '@wise/dynamic-flow-client-internal/build/main.css';
43
+ import '@wise/dynamic-flow-client-internal/main.css'; // JavaScript
44
+ ```
45
+
46
+ ```css
47
+ @import url('@wise/dynamic-flow-client-internal/build/main.css'); /* CSS */
43
48
  ```
44
49
 
45
50
  The `DynamicFlow` component must be wraped in a Neptune `Provider` to support localisation, a `ThemeProvider` to provide theming, and a `SnackbarProvider` to ensure snackbars display correctly. Translations should be imported from both components and dynamic flows, merged, and passed to the `Provider` component (as below).
package/build/main.js CHANGED
@@ -1584,7 +1584,7 @@ function MoneyInputRendererComponent(props) {
1584
1584
  ),
1585
1585
  placeholder: (_a = parseFloatOrNull(placeholder)) != null ? _a : void 0,
1586
1586
  onAmountChange: (newAmount) => {
1587
- onAmountChange(String(newAmount));
1587
+ onAmountChange(newAmount !== null ? String(newAmount) : null);
1588
1588
  },
1589
1589
  onCurrencyChange: (item) => {
1590
1590
  const selectedIndex = Number.parseInt(item.value, 10);
@@ -3749,7 +3749,7 @@ var messages_default = (0, import_react_intl26.defineMessages)({
3749
3749
  // src/dynamicFlow/telemetry/app-version.ts
3750
3750
  var appVersion = (
3751
3751
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
3752
- typeof process !== "undefined" ? "5.0.0" : "0.0.0"
3752
+ typeof process !== "undefined" ? "5.1.0" : "0.0.0"
3753
3753
  );
3754
3754
 
3755
3755
  // src/dynamicFlow/telemetry/getLogEvent.ts
package/build/main.mjs CHANGED
@@ -1572,7 +1572,7 @@ function MoneyInputRendererComponent(props) {
1572
1572
  ),
1573
1573
  placeholder: (_a = parseFloatOrNull(placeholder)) != null ? _a : void 0,
1574
1574
  onAmountChange: (newAmount) => {
1575
- onAmountChange(String(newAmount));
1575
+ onAmountChange(newAmount !== null ? String(newAmount) : null);
1576
1576
  },
1577
1577
  onCurrencyChange: (item) => {
1578
1578
  const selectedIndex = Number.parseInt(item.value, 10);
@@ -3743,7 +3743,7 @@ var messages_default = defineMessages12({
3743
3743
  // src/dynamicFlow/telemetry/app-version.ts
3744
3744
  var appVersion = (
3745
3745
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
3746
- typeof process !== "undefined" ? "5.0.0" : "0.0.0"
3746
+ typeof process !== "undefined" ? "5.1.0" : "0.0.0"
3747
3747
  );
3748
3748
 
3749
3749
  // 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": "5.0.1-exp-css-28d60ea",
3
+ "version": "5.1.0",
4
4
  "description": "Dynamic Flow web client for Wise",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./build/main.js",
@@ -31,40 +31,28 @@
31
31
  "url": "git+https://github.com/transferwise/dynamic-flow.git"
32
32
  },
33
33
  "devDependencies": {
34
- "@babel/core": "7.28.5",
35
- "@babel/plugin-syntax-flow": "7.27.1",
36
- "@babel/plugin-transform-react-jsx": "7.27.1",
37
- "@babel/preset-env": "7.28.5",
38
- "@babel/preset-react": "7.28.5",
39
- "@babel/preset-typescript": "7.28.5",
40
- "@chromatic-com/storybook": "4.1.2",
34
+ "@chromatic-com/storybook": "4.1.3",
41
35
  "@formatjs/cli": "^6.7.4",
42
- "@storybook/addon-a11y": "^9.1.16",
43
- "@storybook/addon-docs": "^9.1.16",
44
- "@storybook/addon-links": "^9.1.16",
45
- "@storybook/react-vite": "9.1.16",
36
+ "@storybook/addon-a11y": "^10.1.4",
37
+ "@storybook/addon-docs": "^10.1.4",
38
+ "@storybook/addon-links": "^10.1.4",
39
+ "@storybook/react-vite": "10.1.4",
46
40
  "@testing-library/dom": "10.4.1",
47
41
  "@testing-library/jest-dom": "6.9.1",
48
42
  "@testing-library/react": "16.3.0",
49
43
  "@testing-library/user-event": "14.6.1",
50
- "@transferwise/components": "46.113.1",
44
+ "@transferwise/components": "^46.115.1",
51
45
  "@transferwise/formatting": "^2.13.4",
52
46
  "@transferwise/icons": "4.0.0",
53
- "@transferwise/neptune-css": "14.25.1",
54
- "@types/jest": "30.0.0",
55
- "@types/react": "18.3.26",
47
+ "@transferwise/neptune-css": "14.25.2",
48
+ "@types/react": "18.3.27",
56
49
  "@types/react-dom": "18.3.7",
57
50
  "@wise/art": "2.24.7",
58
- "@wise/components-theming": "^1.8.0",
59
- "babel-jest": "30.2.0",
51
+ "@wise/components-theming": "^1.9.0",
60
52
  "currency-flags": "4.0.7",
61
53
  "esbuild": "0.27.0",
62
- "eslint-plugin-storybook": "9.1.16",
63
- "framer-motion": "^12.23.24",
64
- "jest": "30.2.0",
65
- "jest-environment-jsdom": "30.2.0",
66
- "jest-fetch-mock": "^3.0.3",
67
- "jest-watch-typeahead": "^3.0.1",
54
+ "eslint-plugin-storybook": "10.1.4",
55
+ "framer-motion": "^12.23.25",
68
56
  "npm-run-all2": "8.0.4",
69
57
  "postcss": "^8.5.6",
70
58
  "postcss-cli": "^11.0.1",
@@ -72,16 +60,18 @@
72
60
  "react": "18.3.1",
73
61
  "react-dom": "18.3.1",
74
62
  "react-intl": "6.8.9",
75
- "storybook": "^9.1.16",
76
- "stylelint": "16.25.0",
63
+ "storybook": "^10.1.4",
64
+ "stylelint": "16.26.1",
77
65
  "stylelint-config-standard": "36.0.1",
78
66
  "stylelint-no-unsupported-browser-features": "8.0.5",
79
67
  "stylelint-value-no-unknown-custom-properties": "6.0.1",
80
- "tsx": "4.20.6",
68
+ "tsx": "4.21.0",
81
69
  "typescript": "5.9.3",
70
+ "vitest": "4.0.15",
71
+ "vitest-fetch-mock": "0.4.5",
82
72
  "@wise/dynamic-flow-fixtures": "0.0.1",
83
- "@wise/dynamic-flow-types": "4.0.0",
84
- "@wise/dynamic-flow-renderers": "0.0.0"
73
+ "@wise/dynamic-flow-renderers": "0.0.0",
74
+ "@wise/dynamic-flow-types": "4.1.0"
85
75
  },
86
76
  "peerDependencies": {
87
77
  "@transferwise/components": "^46.104.0",
@@ -95,8 +85,8 @@
95
85
  "react-intl": "^6"
96
86
  },
97
87
  "dependencies": {
98
- "@wise/dynamic-flow-client": "5.0.1-exp-css-28d60ea",
99
- "@wise/dynamic-flow-types": "4.0.0"
88
+ "@wise/dynamic-flow-client": "5.1.0",
89
+ "@wise/dynamic-flow-types": "4.1.0"
100
90
  },
101
91
  "scripts": {
102
92
  "dev": "pnpm build:visual-tests && storybook dev -p 3005",
@@ -107,10 +97,10 @@
107
97
  "build:messages-source": "formatjs extract '../renderers/src/**/{*.messages,messages}.{js,ts}' './src/**/{*.messages,messages}.{js,ts}' --out-file src/i18n/en.json --format simple && prettier --find-config-path --write src/i18n/*.json",
108
98
  "build:compiled-messages": "mkdir -p build/i18n && cp src/i18n/*.json build/i18n",
109
99
  "build:visual-tests": "tsx ./scripts/build-visual-tests.mjs",
110
- "test": "pnpm test:once",
111
- "test:once": "jest --config jest.config.js --env=jsdom --passWithNoTests",
112
- "test:coverage": "jest --config jest.config.js --env=jsdom --coverage",
113
- "test:watch": "pnpm test:once --watch",
100
+ "test": "npm-run-all test:once",
101
+ "test:once": "vitest run",
102
+ "test:coverage": "vitest run --coverage",
103
+ "test:watch": "vitest",
114
104
  "types": "pnpm tsc",
115
105
  "types:watch": "pnpm tsc --watch",
116
106
  "lint": "npm-run-all lint:ts lint:css",