@wise/dynamic-flow-client 3.1.2 → 3.2.0-beta-928206.39

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.
@@ -1,9 +1,10 @@
1
- import type { RadioGroupRadios } from '@transferwise/components/build/types/radioGroup/RadioGroup';
1
+ import { type RadioGroupProps } from '@transferwise/components';
2
2
  import type { UploadProps } from '@transferwise/components/build/types/upload/Upload';
3
3
  import type { AutocompleteToken } from '@wise/dynamic-flow-types';
4
4
  import { type ReactNode, PureComponent } from 'react';
5
5
  import { FormControlType } from '../common/constants';
6
6
  import type { OnChangeProps } from '../jsonSchemaForm/JsonSchemaForm';
7
+ type RadioGroupRadios = RadioGroupProps<string | number>['radios'][number];
7
8
  export default class FormControl extends PureComponent<FormControlProps, FormControlState> {
8
9
  static Type: {
9
10
  RADIO: string;
@@ -17,7 +17,7 @@ export type PromotedOneOfControlProps = {
17
17
  icon?: Icon;
18
18
  };
19
19
  promotion: Promotion;
20
- selection: string;
20
+ selection: 'promoted' | 'other';
21
21
  setSelection: React.Dispatch<React.SetStateAction<'promoted' | 'other'>>;
22
22
  };
23
23
  export default PromotedOneOfControl;
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-client",
3
- "version": "3.1.2",
3
+ "version": "3.2.0-beta-928206.39",
4
4
  "description": "Dynamic Flow web client",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./build/main.min.js",
7
+ "module": "./build/main.mjs",
7
8
  "types": "./build/types/index.d.ts",
8
9
  "style": "./build/main.css",
9
10
  "sideEffects": [
@@ -17,11 +18,30 @@
17
18
  "fullname": "transferwise/dynamic-flow",
18
19
  "url": "git+https://github.com/transferwise/dynamic-flow.git"
19
20
  },
21
+ "scripts": {
22
+ "dev": "storybook dev -p 3003",
23
+ "build": "rm -rf build && npm-run-all build:*",
24
+ "build:types": "tsc --project ./tsconfig.types.json",
25
+ "build:js": "node ./scripts/build.mjs",
26
+ "build:css": "postcss src/main.css -o build/main.css",
27
+ "build:messages-source": "formatjs extract 'src/**/{*.messages,messages}.{js,ts}' --out-file src/i18n/en.json --format simple && prettier --find-config-path --write src/i18n/*.json",
28
+ "build:compiled-messages": "mkdir -p build/i18n && cp src/i18n/*.json build/i18n",
29
+ "test": "npm-run-all test:once test:tz",
30
+ "test:once": "jest --config jest.config.js --env=jsdom -w 2",
31
+ "test:coverage": "jest --config jest.config.js --env=jsdom --coverage",
32
+ "test:tz": "TZ=US/Pacific jest ./src/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.errors.spec.jsx ./src/legacy/formControl/FormControl.spec.jsx",
33
+ "test:watch": "pnpm test:once --watch",
34
+ "types": "pnpm tsc",
35
+ "lint": "npm-run-all lint:ts lint:css",
36
+ "lint:ts": "eslint 'src/**/*.{js,jsx,ts,tsx}' --quiet",
37
+ "lint:css": "stylelint './src/**/*.css'",
38
+ "build-storybook": "storybook build -c .storybook --disable-telemetry"
39
+ },
20
40
  "devDependencies": {
21
- "@babel/core": "7.23.9",
41
+ "@babel/core": "7.24.0",
22
42
  "@babel/plugin-syntax-flow": "7.23.3",
23
43
  "@babel/plugin-transform-react-jsx": "7.23.4",
24
- "@babel/preset-env": "7.23.9",
44
+ "@babel/preset-env": "7.24.0",
25
45
  "@babel/preset-react": "7.23.3",
26
46
  "@babel/preset-typescript": "7.23.3",
27
47
  "@cfaester/enzyme-adapter-react-18": "0.7.1",
@@ -39,11 +59,11 @@
39
59
  "@testing-library/react": "14.2.1",
40
60
  "@testing-library/react-hooks": "8.0.1",
41
61
  "@testing-library/user-event": "14.5.2",
42
- "@transferwise/components": "46.10.0",
62
+ "@transferwise/components": "46.17.2",
43
63
  "@transferwise/formatting": "^2.13.0",
44
64
  "@transferwise/icons": "3.13.0",
45
- "@transferwise/neptune-css": "14.8.0",
46
- "@transferwise/neptune-tokens": "8.7.0",
65
+ "@transferwise/neptune-css": "14.9.5",
66
+ "@transferwise/neptune-tokens": "8.8.1",
47
67
  "@types/enzyme": "^3.10.18",
48
68
  "@types/jest": "29.5.12",
49
69
  "@types/react": "18",
@@ -52,18 +72,19 @@
52
72
  "@types/testing-library__jest-dom": "5.14.9",
53
73
  "@wise/art": "2.9.2",
54
74
  "@wise/components-theming": "^0.8.4",
75
+ "@wise/dynamic-flow-fixtures": "workspace:*",
55
76
  "@wise/forms": "0.3.1",
56
77
  "babel-jest": "29.7.0",
57
78
  "currency-flags": "4.0.7",
58
79
  "enzyme": "^3.11.0",
59
- "esbuild": "0.20.1",
80
+ "esbuild": "0.20.2",
60
81
  "jest": "29.7.0",
61
82
  "jest-environment-jsdom": "29.7.0",
62
83
  "jest-fetch-mock": "^3.0.3",
63
84
  "jest-watch-typeahead": "^2.2.2",
64
85
  "nanoid": "5.0.6",
65
86
  "npm-run-all2": "5.0.2",
66
- "postcss": "^8.4.35",
87
+ "postcss": "^8.4.36",
67
88
  "postcss-cli": "^10.1.0",
68
89
  "postcss-import": "^15.1.0",
69
90
  "react": "18.2.0",
@@ -75,8 +96,7 @@
75
96
  "stylelint-no-unsupported-browser-features": "5.0.4",
76
97
  "stylelint-value-no-unknown-custom-properties": "6.0.1",
77
98
  "typescript": "4.9.5",
78
- "webpack": "5.90.3",
79
- "@wise/dynamic-flow-fixtures": "0.0.1"
99
+ "webpack": "5.90.3"
80
100
  },
81
101
  "peerDependencies": {
82
102
  "@transferwise/components": "^46.10",
@@ -88,28 +108,9 @@
88
108
  "react-intl": "^6"
89
109
  },
90
110
  "dependencies": {
111
+ "@wise/dynamic-flow-types": "2.8.0",
91
112
  "classnames": "2.5.1",
92
113
  "react-webcam": "^7.2.0",
93
- "screenfull": "^5.2.0",
94
- "@wise/dynamic-flow-types": "2.8.0"
95
- },
96
- "scripts": {
97
- "dev": "storybook dev -p 3003",
98
- "build": "rm -rf build && npm-run-all build:*",
99
- "build:types": "tsc --project ./tsconfig.types.json",
100
- "build:js": "node ./scripts/build.mjs",
101
- "build:css": "postcss src/main.css -o build/main.css",
102
- "build:messages-source": "formatjs extract 'src/**/{*.messages,messages}.{js,ts}' --out-file src/i18n/en.json --format simple && prettier --find-config-path --write src/i18n/*.json",
103
- "build:compiled-messages": "mkdir -p build/i18n && cp src/i18n/*.json build/i18n",
104
- "test": "npm-run-all test:once test:tz",
105
- "test:once": "jest --config jest.config.js --env=jsdom -w 2",
106
- "test:coverage": "jest --config jest.config.js --env=jsdom --coverage",
107
- "test:tz": "TZ=US/Pacific jest ./src/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.errors.spec.jsx ./src/legacy/formControl/FormControl.spec.jsx",
108
- "test:watch": "pnpm test:once --watch",
109
- "types": "pnpm tsc",
110
- "lint": "npm-run-all lint:ts lint:css",
111
- "lint:ts": "eslint 'src/**/*.{js,jsx,ts,tsx}' --quiet",
112
- "lint:css": "stylelint './src/**/*.css'",
113
- "build-storybook": "storybook build -c .storybook --disable-telemetry"
114
+ "screenfull": "^5.2.0"
114
115
  }
115
- }
116
+ }