@wise/dynamic-flow-client 2.4.0 → 2.5.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.
@@ -1,5 +1,6 @@
1
1
  import { RadioGroupRadios } from '@transferwise/components/build/types/radioGroup/RadioGroup';
2
2
  import { UploadProps } from '@transferwise/components/build/types/upload/Upload';
3
+ import { AutocompleteHint } from '@wise/dynamic-flow-types';
3
4
  import { ReactNode } from 'react';
4
5
  import { PureComponent } from 'react';
5
6
  import { FormControlType } from '../common/constants';
@@ -43,12 +44,7 @@ export default class FormControl extends PureComponent<FormControlProps, FormCon
43
44
  prevValue: string | number | boolean | Date | null;
44
45
  value: string | number | boolean | Date | null;
45
46
  } | null;
46
- /**
47
- * autocomplete hides our form help so we need to disable it when help text
48
- * is present. Chrome ignores autocomplete=off, the only way to disable it is
49
- * to provide an 'invalid' value, for which 'disabled' serves.
50
- */
51
- getAutocompleteStatus: () => "on" | "disabled";
47
+ getAutocompleteValue: () => string;
52
48
  handleOnChange: (value: string | number | boolean | null) => void;
53
49
  handleInputOnChange: React.ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>;
54
50
  handleOnFocus: () => void;
@@ -106,7 +102,9 @@ type FormControlSelectedOption = {
106
102
  type FormControlProps = {
107
103
  name: string;
108
104
  onChange: (value: string | number | boolean | null, type?: 'init' | 'user') => void;
105
+ /** @deprecated - Use autocompleteHint instead */
109
106
  autoComplete?: boolean;
107
+ autocompleteHint?: AutocompleteHint[];
110
108
  countryCode?: string;
111
109
  disabled?: boolean;
112
110
  displayPattern?: string;
@@ -0,0 +1,2 @@
1
+ import { AutocompleteHint } from '@wise/dynamic-flow-types';
2
+ export declare const getAutocompleteString: (hints: AutocompleteHint[]) => string;
@@ -1 +1,2 @@
1
1
  export * from './value-utils';
2
+ export { getAutocompleteString } from './getAutocompleteString';
@@ -1,5 +1,5 @@
1
1
  import { Align, Size } from '../../../renderers/types';
2
- declare const getTopMargin: (size: Size) => "" | "m-t-2" | "m-t-0" | "m-t-1" | "m-t-3" | "m-t-5";
2
+ declare const getTopMargin: (size: Size) => "" | "m-t-1" | "m-t-2" | "m-t-0" | "m-t-3" | "m-t-5";
3
3
  declare const getTextAlignmentAndTopMargin: (component: {
4
4
  align: Align;
5
5
  margin: Size;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-client",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "description": "Dynamic Flow web client",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./build/main.min.js",
@@ -18,35 +18,35 @@
18
18
  "url": "git+https://github.com/transferwise/dynamic-flow.git"
19
19
  },
20
20
  "devDependencies": {
21
- "@babel/core": "7.23.2",
22
- "@babel/plugin-syntax-flow": "7.22.5",
21
+ "@babel/core": "7.23.3",
22
+ "@babel/plugin-syntax-flow": "7.23.3",
23
23
  "@babel/plugin-transform-react-jsx": "7.22.15",
24
- "@babel/preset-env": "7.23.2",
25
- "@babel/preset-react": "7.22.15",
26
- "@babel/preset-typescript": "7.23.2",
24
+ "@babel/preset-env": "7.23.3",
25
+ "@babel/preset-react": "7.23.3",
26
+ "@babel/preset-typescript": "7.23.3",
27
27
  "@cfaester/enzyme-adapter-react-18": "0.7.1",
28
28
  "@formatjs/cli": "^4.8.4",
29
- "@storybook/addon-a11y": "7.5.1",
30
- "@storybook/addon-actions": "7.5.1",
31
- "@storybook/addon-essentials": "7.5.1",
32
- "@storybook/addon-interactions": "7.5.1",
33
- "@storybook/addon-links": "7.5.1",
34
- "@storybook/react": "7.5.1",
35
- "@storybook/react-webpack5": "7.5.1",
29
+ "@storybook/addon-a11y": "7.5.3",
30
+ "@storybook/addon-actions": "7.5.3",
31
+ "@storybook/addon-essentials": "7.5.3",
32
+ "@storybook/addon-interactions": "7.5.3",
33
+ "@storybook/addon-links": "7.5.3",
34
+ "@storybook/react": "7.5.3",
35
+ "@storybook/react-webpack5": "7.5.3",
36
36
  "@storybook/testing-library": "0.2.2",
37
37
  "@testing-library/dom": "9.3.3",
38
38
  "@testing-library/jest-dom": "6.1.4",
39
- "@testing-library/react": "14.0.0",
39
+ "@testing-library/react": "14.1.0",
40
40
  "@testing-library/react-hooks": "8.0.1",
41
41
  "@testing-library/user-event": "14.5.1",
42
42
  "@transferwise/components": "45.17.1",
43
43
  "@transferwise/eslint-config": "8.2.0",
44
44
  "@transferwise/formatting": "^2.10.0",
45
- "@transferwise/icons": "3.10.0",
45
+ "@transferwise/icons": "3.12.0",
46
46
  "@transferwise/neptune-css": "14.6.1",
47
47
  "@transferwise/neptune-tokens": "8.5.1",
48
- "@types/enzyme": "^3.10.15",
49
- "@types/jest": "29.5.6",
48
+ "@types/enzyme": "^3.10.16",
49
+ "@types/jest": "29.5.8",
50
50
  "@types/react": "18",
51
51
  "@types/react-dom": "18",
52
52
  "@types/testing-library__jest-dom": "5.14.9",
@@ -57,21 +57,21 @@
57
57
  "currency-flags": "4.0.7",
58
58
  "enzyme": "^3.11.0",
59
59
  "esbuild": "0.19.5",
60
- "eslint": "8.52.0",
60
+ "eslint": "8.53.0",
61
61
  "eslint-plugin-storybook": "0.6.15",
62
62
  "jest": "29.7.0",
63
63
  "jest-environment-jsdom": "29.7.0",
64
64
  "jest-fetch-mock": "^3.0.3",
65
65
  "jest-watch-typeahead": "^2.2.2",
66
66
  "npm-run-all": "4.1.5",
67
- "postcss": "^8.4.21",
67
+ "postcss": "^8.4.31",
68
68
  "postcss-cli": "^10.1.0",
69
69
  "postcss-import": "^15.1.0",
70
70
  "prettier": "2.8.8",
71
71
  "react": "18.2.0",
72
72
  "react-dom": "18.2.0",
73
- "react-intl": "6.5.1",
74
- "storybook": "7.5.1",
73
+ "react-intl": "6.5.4",
74
+ "storybook": "7.5.3",
75
75
  "stylelint": "14.16.1",
76
76
  "stylelint-config-standard": "25.0.0",
77
77
  "stylelint-no-unsupported-browser-features": "5.0.4",
@@ -91,9 +91,9 @@
91
91
  },
92
92
  "dependencies": {
93
93
  "classnames": "2.3.2",
94
- "react-webcam": "^7.1.1",
94
+ "react-webcam": "^7.2.0",
95
95
  "screenfull": "^5.2.0",
96
- "@wise/dynamic-flow-types": "2.1.0"
96
+ "@wise/dynamic-flow-types": "2.2.0"
97
97
  },
98
98
  "prettier": "@transferwise/eslint-config/.prettierrc.js",
99
99
  "scripts": {