@griddo/ax 11.4.7-rc.0 → 11.4.7-rc.2
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/package.json +120 -110
- package/src/__tests__/components/Fields/Wysiwyg/Wysiwyg.test.tsx +0 -1
- package/src/api/utils.tsx +8 -9
- package/src/components/Fields/AsyncSelect/index.tsx +4 -4
- package/src/components/Fields/AsyncSelect/style.tsx +3 -2
- package/src/components/Fields/DateField/style.tsx +0 -6
- package/src/components/Fields/Select/index.tsx +2 -2
- package/src/components/Fields/Select/style.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@griddo/ax",
|
|
3
3
|
"description": "Griddo Author Experience",
|
|
4
|
-
"version": "11.4.7-rc.
|
|
4
|
+
"version": "11.4.7-rc.2",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
7
|
+
"Carlos Torres <carlos.torres@secuoyas.com>",
|
|
7
8
|
"Diego M. Béjar <diego.bejar@secuoyas.com>",
|
|
8
9
|
"Francis Vega <francis.vega@secuoyas.com>",
|
|
9
10
|
"Gonzalo Hernández <gonzalo.hernandez@secuoyas.com>",
|
|
@@ -40,144 +41,153 @@
|
|
|
40
41
|
},
|
|
41
42
|
"dependencies": {
|
|
42
43
|
"@atlaskit/tree": "8.12.0",
|
|
43
|
-
"@
|
|
44
|
+
"@babel/plugin-transform-optional-chaining": "7.24.5",
|
|
45
|
+
"@babel/preset-react": "^7.14.5",
|
|
46
|
+
"@pmmmwh/react-refresh-webpack-plugin": "0.5.0-rc.0",
|
|
44
47
|
"@styled-system/prop-types": "5.1.5",
|
|
45
48
|
"@styled-system/theme-get": "5.1.2",
|
|
46
49
|
"@svgr/webpack": "5.5.0",
|
|
47
|
-
"@
|
|
48
|
-
"@
|
|
49
|
-
"@
|
|
50
|
-
"@types/
|
|
50
|
+
"@testing-library/jest-dom": "^5.16.4",
|
|
51
|
+
"@testing-library/react": "^13.0.0",
|
|
52
|
+
"@testing-library/user-event": "^14.0.4",
|
|
53
|
+
"@types/compress.js": "^1.1.0",
|
|
54
|
+
"@types/draft-js": "^0.10.44",
|
|
55
|
+
"@types/lodash.isequal": "^4.5.5",
|
|
56
|
+
"@types/markdown-draft-js": "^2.2.2",
|
|
51
57
|
"@types/node": "20.17.10",
|
|
52
|
-
"@types/react": "18.2.
|
|
53
|
-
"@types/react-beautiful-dnd": "13.1.
|
|
54
|
-
"@types/react-datepicker": "
|
|
55
|
-
"@types/react-dom": "18.
|
|
56
|
-
"@types/react-draft-wysiwyg": "1.13.
|
|
57
|
-
"@types/react-redux": "7.1.
|
|
58
|
+
"@types/react": "18.2.11",
|
|
59
|
+
"@types/react-beautiful-dnd": "^13.1.2",
|
|
60
|
+
"@types/react-datepicker": "^3.1.1",
|
|
61
|
+
"@types/react-dom": "18.0.11",
|
|
62
|
+
"@types/react-draft-wysiwyg": "^1.13.1",
|
|
63
|
+
"@types/react-redux": "^7.1.23",
|
|
58
64
|
"@types/react-router-dom": "5.3.3",
|
|
59
|
-
"@types/react-
|
|
65
|
+
"@types/react-select": "4.0.18",
|
|
66
|
+
"@types/react-slick": "^0.23.10",
|
|
60
67
|
"@types/react-test-renderer": "17.0.1",
|
|
61
|
-
"@types/
|
|
62
|
-
"@types/
|
|
63
|
-
"
|
|
64
|
-
"
|
|
68
|
+
"@types/react-textarea-autosize": "^4.3.5",
|
|
69
|
+
"@types/styled-components": "^5.1.25",
|
|
70
|
+
"@types/uuid": "8.3.4",
|
|
71
|
+
"@types/webpack-env": "^1.14.1",
|
|
72
|
+
"@typescript-eslint/eslint-plugin": "7.18.0",
|
|
73
|
+
"@typescript-eslint/parser": "7.18.0",
|
|
74
|
+
"add": "^2.0.6",
|
|
75
|
+
"axios": "0.19.0",
|
|
76
|
+
"babel-eslint": "10.0.3",
|
|
77
|
+
"babel-loader": "8.2.2",
|
|
78
|
+
"babel-plugin-named-asset-import": "^0.3.7",
|
|
79
|
+
"babel-plugin-require-context-hook": "^1.0.0",
|
|
80
|
+
"babel-plugin-root-import": "^6.4.1",
|
|
81
|
+
"babel-plugin-styled-components": "^1.13.2",
|
|
82
|
+
"babel-preset-react-app": "^10.0.0",
|
|
65
83
|
"case-sensitive-paths-webpack-plugin": "2.4.0",
|
|
66
|
-
"compress.js": "1.
|
|
67
|
-
"connected-react-router": "6.9.
|
|
68
|
-
"css-loader": "
|
|
84
|
+
"compress.js": "^1.1.2",
|
|
85
|
+
"connected-react-router": "^6.9.2",
|
|
86
|
+
"css-loader": "^4.3.0",
|
|
69
87
|
"css-minimizer-webpack-plugin": "3.0.2",
|
|
70
|
-
"date-fns": "2.
|
|
71
|
-
"dotenv": "
|
|
72
|
-
"dotenv-expand": "
|
|
73
|
-
"draft-js": "0.11.7",
|
|
74
|
-
"draft-js-import-html": "1.4.1",
|
|
75
|
-
"draftjs-to-html": "0.9.1",
|
|
76
|
-
"enhanced-resolve": "5.
|
|
77
|
-
"env-cmd": "10.1.0",
|
|
78
|
-
"file-loader": "6.2.0",
|
|
79
|
-
"find-up": "5.0.0",
|
|
80
|
-
"fs-extra": "
|
|
81
|
-
"html-to-draftjs": "1.5.0",
|
|
82
|
-
"html-to-image": "1.
|
|
88
|
+
"date-fns": "^2.21.3",
|
|
89
|
+
"dotenv": "6.2.0",
|
|
90
|
+
"dotenv-expand": "5.1.0",
|
|
91
|
+
"draft-js": "^0.11.7",
|
|
92
|
+
"draft-js-import-html": "^1.4.1",
|
|
93
|
+
"draftjs-to-html": "^0.9.1",
|
|
94
|
+
"enhanced-resolve": "^5.8.2",
|
|
95
|
+
"env-cmd": "^10.1.0",
|
|
96
|
+
"file-loader": "^6.2.0",
|
|
97
|
+
"find-up": "^5.0.0",
|
|
98
|
+
"fs-extra": "7.0.1",
|
|
99
|
+
"html-to-draftjs": "^1.5.0",
|
|
100
|
+
"html-to-image": "^1.9.0",
|
|
83
101
|
"html-webpack-plugin": "4.5.0",
|
|
84
102
|
"identity-obj-proxy": "3.0.0",
|
|
85
|
-
"ignore-loader": "0.1.2",
|
|
86
|
-
"is-wsl": "
|
|
87
|
-
"jsdom": "
|
|
88
|
-
"jsdom-
|
|
103
|
+
"ignore-loader": "^0.1.2",
|
|
104
|
+
"is-wsl": "^1.1.0",
|
|
105
|
+
"jest-environment-jsdom": "^27.5.1",
|
|
106
|
+
"jest-environment-jsdom-fourteen": "0.1.0",
|
|
107
|
+
"jest-resolve": "24.9.0",
|
|
108
|
+
"jest-watch-typeahead": "0.4.0",
|
|
109
|
+
"jsdom": "^19.0.0",
|
|
110
|
+
"jsdom-global": "^3.0.2",
|
|
89
111
|
"lodash.isequal": "4.5.0",
|
|
90
|
-
"markdown-draft-js": "2.
|
|
91
|
-
"masonic": "4.1
|
|
112
|
+
"markdown-draft-js": "^2.2.1",
|
|
113
|
+
"masonic": "^4.0.1",
|
|
92
114
|
"mini-css-extract-plugin": "0.11.3",
|
|
93
|
-
"optimize-css-assets-webpack-plugin": "6.0.1",
|
|
94
|
-
"pkg-dir": "5.0.0",
|
|
95
|
-
"pnp-webpack-plugin": "1.7.0",
|
|
115
|
+
"optimize-css-assets-webpack-plugin": "^6.0.1",
|
|
116
|
+
"pkg-dir": "^5.0.0",
|
|
117
|
+
"pnp-webpack-plugin": "^1.7.0",
|
|
96
118
|
"polished": "3.4.1",
|
|
97
|
-
"postcss": "8.5
|
|
119
|
+
"postcss": "^8.4.5",
|
|
98
120
|
"postcss-flexbugs-fixes": "4.1.0",
|
|
99
121
|
"postcss-loader": "3.0.0",
|
|
100
122
|
"postcss-normalize": "7.0.1",
|
|
101
123
|
"postcss-preset-env": "6.7.0",
|
|
102
|
-
"postcss-safe-parser": "6.0.0",
|
|
103
|
-
"react": "18.
|
|
104
|
-
"react-
|
|
105
|
-
"react-
|
|
106
|
-
"react-
|
|
107
|
-
"react-
|
|
108
|
-
"react-
|
|
124
|
+
"postcss-safe-parser": "^6.0.0",
|
|
125
|
+
"react": "18.1.0",
|
|
126
|
+
"react-app-polyfill": "^1.0.4",
|
|
127
|
+
"react-beautiful-dnd": "^13.1.0",
|
|
128
|
+
"react-datepicker": "^3.2.2",
|
|
129
|
+
"react-dev-utils": "^11.0.4",
|
|
130
|
+
"react-dom": "18.1.0",
|
|
131
|
+
"react-draft-wysiwyg": "^1.14.5",
|
|
109
132
|
"react-error-boundary": "4.0.13",
|
|
110
|
-
"react-
|
|
111
|
-
"react-
|
|
112
|
-
"react-
|
|
133
|
+
"react-frame-component": "^5.2.1",
|
|
134
|
+
"react-froala-wysiwyg": "^3.2.7",
|
|
135
|
+
"react-redux": "^7.2.8",
|
|
136
|
+
"react-refresh": "^0.10.0",
|
|
113
137
|
"react-router-dom": "5.1.2",
|
|
114
|
-
"react-select": "
|
|
115
|
-
"react-slick": "0.
|
|
116
|
-
"react-textarea-autosize": "
|
|
117
|
-
"redux": "4.
|
|
118
|
-
"redux-devtools-extension": "2.13.
|
|
138
|
+
"react-select": "4.3.1",
|
|
139
|
+
"react-slick": "^0.29.0",
|
|
140
|
+
"react-textarea-autosize": "^7.1.2",
|
|
141
|
+
"redux": "4.0.4",
|
|
142
|
+
"redux-devtools-extension": "2.13.8",
|
|
119
143
|
"redux-persist": "6.0.0",
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"resolve
|
|
123
|
-
"
|
|
124
|
-
"
|
|
144
|
+
"redux-thunk": "^2.4.1",
|
|
145
|
+
"reflect-metadata": "0.1.13",
|
|
146
|
+
"resolve": "^1.20.0",
|
|
147
|
+
"resolve-url-loader": "^4.0.0",
|
|
148
|
+
"sass-alias": "^1.0.5",
|
|
149
|
+
"sass-loader": "^10.0.0",
|
|
150
|
+
"semver": "7.6.3",
|
|
125
151
|
"slick-carousel": "1.8.1",
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"
|
|
152
|
+
"source-map-loader": "^1.1.2",
|
|
153
|
+
"string-replace-loader": "^3.0.1",
|
|
154
|
+
"style-loader": "^1.2.1",
|
|
155
|
+
"styled-components": "^5.3.5",
|
|
156
|
+
"styled-reset": "4.0.1",
|
|
129
157
|
"styled-system": "5.1.5",
|
|
130
|
-
"terser-webpack-plugin": "1.4.
|
|
131
|
-
"ts-pnp": "1.
|
|
158
|
+
"terser-webpack-plugin": "1.4.1",
|
|
159
|
+
"ts-pnp": "1.1.4",
|
|
160
|
+
"typescript": "^4.6.3",
|
|
132
161
|
"url-loader": "4.1.1",
|
|
133
|
-
"
|
|
162
|
+
"uuid": "8.3.2",
|
|
163
|
+
"webpack": "4.44.2",
|
|
134
164
|
"webpack-dev-server": "3.11.1",
|
|
135
165
|
"webpack-manifest-plugin": "2.2.0",
|
|
136
166
|
"workbox-webpack-plugin": "5.1.4"
|
|
137
167
|
},
|
|
138
168
|
"devDependencies": {
|
|
139
|
-
"@babel/core": "7.
|
|
140
|
-
"@babel/
|
|
141
|
-
"@babel/preset-
|
|
142
|
-
"@
|
|
143
|
-
"@
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"@testing-library/user-event": "14.6.1",
|
|
147
|
-
"@types/jest": "27.5.2",
|
|
148
|
-
"@types/redux-mock-store": "1.0.3",
|
|
149
|
-
"@types/uuid": "8.3.4",
|
|
150
|
-
"@typescript-eslint/eslint-plugin": "7.18.0",
|
|
151
|
-
"@typescript-eslint/parser": "7.18.0",
|
|
152
|
-
"axios-mock-adapter": "1.22.0",
|
|
153
|
-
"babel-eslint": "10.0.3",
|
|
154
|
-
"babel-jest": "27.5.1",
|
|
155
|
-
"babel-loader": "8.2.2",
|
|
156
|
-
"babel-plugin-named-asset-import": "0.3.8",
|
|
157
|
-
"babel-plugin-require-context-hook": "1.0.0",
|
|
158
|
-
"babel-plugin-root-import": "6.6.0",
|
|
159
|
-
"babel-plugin-styled-components": "2.1.4",
|
|
160
|
-
"babel-preset-react-app": "10.1.0",
|
|
169
|
+
"@babel/core": "^7.21.0",
|
|
170
|
+
"@babel/preset-env": "^7.16.11",
|
|
171
|
+
"@babel/preset-typescript": "^7.16.7",
|
|
172
|
+
"@types/jest": "^27.4.1",
|
|
173
|
+
"@types/redux-mock-store": "^1.0.3",
|
|
174
|
+
"axios-mock-adapter": "^1.21.2",
|
|
175
|
+
"babel-jest": "^27.5.1",
|
|
161
176
|
"eslint": "8.57.1",
|
|
162
|
-
"eslint-
|
|
163
|
-
"eslint-plugin-
|
|
164
|
-
"eslint-plugin-
|
|
165
|
-
"eslint-plugin-react
|
|
166
|
-
"
|
|
167
|
-
"jest
|
|
168
|
-
"jest-
|
|
169
|
-
"jest-
|
|
170
|
-
"jest-resolve": "24.9.0",
|
|
171
|
-
"jest-styled-components": "7.1.1",
|
|
172
|
-
"jest-watch-typeahead": "0.4.0",
|
|
177
|
+
"eslint-loader": "^4.0.2",
|
|
178
|
+
"eslint-plugin-import": "^2.23.4",
|
|
179
|
+
"eslint-plugin-jsx-a11y": "6.2.3",
|
|
180
|
+
"eslint-plugin-react": "7.14.3",
|
|
181
|
+
"eslint-plugin-react-hooks": "^4.2.0",
|
|
182
|
+
"jest": "^27.5.1",
|
|
183
|
+
"jest-mock-extended": "^2.0.5",
|
|
184
|
+
"jest-styled-components": "^7.0.8",
|
|
173
185
|
"prettier": "3.4.2",
|
|
174
|
-
"react-test-
|
|
175
|
-
"
|
|
176
|
-
"redux-
|
|
177
|
-
"ts-jest": "27.1.
|
|
178
|
-
"ts-node": "10.9.
|
|
179
|
-
"typescript": "4.9.5",
|
|
180
|
-
"uuid": "8.3.2"
|
|
186
|
+
"react-test-render": "1.1.2",
|
|
187
|
+
"react-test-renderer": "^18.2.0",
|
|
188
|
+
"redux-mock-store": "^1.5.4",
|
|
189
|
+
"ts-jest": "^27.1.4",
|
|
190
|
+
"ts-node": "^10.9.1"
|
|
181
191
|
},
|
|
182
192
|
"babel": {
|
|
183
193
|
"presets": [
|
|
@@ -216,5 +226,5 @@
|
|
|
216
226
|
"publishConfig": {
|
|
217
227
|
"access": "public"
|
|
218
228
|
},
|
|
219
|
-
"gitHead": "
|
|
229
|
+
"gitHead": "ad958b5ae9970910fcf0a26b6858b71dd8c7116f"
|
|
220
230
|
}
|
package/src/api/utils.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import axios, { AxiosRequestConfig,
|
|
1
|
+
import axios, { AxiosRequestConfig, AxiosResponse, Method, ResponseType } from "axios";
|
|
2
2
|
import { SET_ERROR } from "./../containers/App/constants";
|
|
3
3
|
|
|
4
4
|
export interface IServiceConfig {
|
|
@@ -31,7 +31,7 @@ const getLang = (): Record<string, unknown> => {
|
|
|
31
31
|
return { lang };
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
const getHeaders = (headers: Record<string, unknown>, hasToken: boolean) => {
|
|
34
|
+
const getHeaders = (headers: Record<string, unknown>, hasToken: boolean): Record<string, unknown> => {
|
|
35
35
|
return hasToken
|
|
36
36
|
? {
|
|
37
37
|
...headers,
|
|
@@ -47,7 +47,7 @@ const getHeaders = (headers: Record<string, unknown>, hasToken: boolean) => {
|
|
|
47
47
|
const wrapConfig = (serviceConfig: IServiceConfig): AxiosRequestConfig => {
|
|
48
48
|
const { host, endpoint, method, headers: configHeaders, hasToken, dynamicUrl, responseType } = serviceConfig;
|
|
49
49
|
|
|
50
|
-
const headers = getHeaders(configHeaders, hasToken)
|
|
50
|
+
const headers = getHeaders(configHeaders, hasToken);
|
|
51
51
|
|
|
52
52
|
return {
|
|
53
53
|
url: dynamicUrl ? dynamicUrl : `${host}${endpoint}`,
|
|
@@ -57,7 +57,7 @@ const wrapConfig = (serviceConfig: IServiceConfig): AxiosRequestConfig => {
|
|
|
57
57
|
};
|
|
58
58
|
};
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
class RequestCache {
|
|
61
61
|
private _cacheTime = 1; // SECONDS
|
|
62
62
|
private _cache: { [key: string]: { timestamp: number; value: string } } = {};
|
|
63
63
|
|
|
@@ -80,7 +80,7 @@ const wrapConfig = (serviceConfig: IServiceConfig): AxiosRequestConfig => {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
const requestCache = new RequestCache()
|
|
83
|
+
const requestCache = new RequestCache();
|
|
84
84
|
|
|
85
85
|
export const sendInitialRequest = async (
|
|
86
86
|
serviceConfig: IServiceConfig,
|
|
@@ -89,13 +89,13 @@ export const sendInitialRequest = async (
|
|
|
89
89
|
): Promise<AxiosResponse> => {
|
|
90
90
|
const { headers: configHeaders, method, host, endpoint, dynamicUrl } = serviceConfig;
|
|
91
91
|
|
|
92
|
-
const config
|
|
92
|
+
const config = {
|
|
93
93
|
url: dynamicUrl ? dynamicUrl : `${host}${endpoint}`,
|
|
94
94
|
method,
|
|
95
95
|
headers: {
|
|
96
96
|
...configHeaders,
|
|
97
97
|
Authorization: "bearer " + token,
|
|
98
|
-
}
|
|
98
|
+
},
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
try {
|
|
@@ -118,10 +118,9 @@ export const sendRequest = async (
|
|
|
118
118
|
dataHeader?: Record<string, unknown>
|
|
119
119
|
): Promise<AxiosResponse> => {
|
|
120
120
|
let config = wrapConfig(serviceConfig);
|
|
121
|
-
const headers = { ...config.headers, ...dataHeader } as AxiosRequestHeaders;
|
|
122
121
|
|
|
123
122
|
if (dataHeader) {
|
|
124
|
-
config = { ...config, headers };
|
|
123
|
+
config = { ...config, headers: { ...config.headers, ...dataHeader } };
|
|
125
124
|
}
|
|
126
125
|
|
|
127
126
|
try {
|
|
@@ -94,8 +94,8 @@ const AsyncSelect = (props: IAsyncSelectProps): JSX.Element => {
|
|
|
94
94
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
95
95
|
}, [entity, site, lang, selectedContent, entityId, mandatory, placeholder, filter, isCategories, isPage, options]);
|
|
96
96
|
|
|
97
|
-
const handleChange = (selectedValue:
|
|
98
|
-
const newValue = selectedValue ?
|
|
97
|
+
const handleChange = (selectedValue: ICheck | IOption | null) => {
|
|
98
|
+
const newValue = selectedValue ? selectedValue.value : selectedValue;
|
|
99
99
|
onChange(newValue);
|
|
100
100
|
};
|
|
101
101
|
|
|
@@ -141,8 +141,8 @@ const AsyncSelect = (props: IAsyncSelectProps): JSX.Element => {
|
|
|
141
141
|
error={error}
|
|
142
142
|
isDisabled={disabled}
|
|
143
143
|
className={className}
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
mandatory={mandatory}
|
|
145
|
+
hasEmptyOption={state.hasEmptyOption}
|
|
146
146
|
isSearchable={searchable}
|
|
147
147
|
maxWidth={maxWidth}
|
|
148
148
|
inputValue={state.inputText}
|
|
@@ -68,8 +68,8 @@ export const StyledSelect = styled(AsyncSelect)<{
|
|
|
68
68
|
padding: ${(p) => `13px ${p.theme.spacing.s} 12px ${p.theme.spacing.s}`};
|
|
69
69
|
&:first-child {
|
|
70
70
|
${(p) =>
|
|
71
|
-
!p.
|
|
72
|
-
p.
|
|
71
|
+
!p.mandatory &&
|
|
72
|
+
p.hasEmptyOption &&
|
|
73
73
|
css`
|
|
74
74
|
font-style: italic;
|
|
75
75
|
color: ${(p) => p.theme.color.textLowEmphasis};
|
|
@@ -103,6 +103,7 @@ export const StyledSelect = styled(AsyncSelect)<{
|
|
|
103
103
|
background: transparent;
|
|
104
104
|
border: none;
|
|
105
105
|
height: auto;
|
|
106
|
+
justify-content: ${(p) => (p.alignRight ? "flex-end" : "flex-start")};
|
|
106
107
|
min-width: auto;
|
|
107
108
|
|
|
108
109
|
.react-select__value-container {
|
|
@@ -49,20 +49,14 @@ export const DatePickerWrapper = styled.div`
|
|
|
49
49
|
border: none;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
.react-datepicker__navigation-icon {
|
|
53
|
-
display: none;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
52
|
&.react-datepicker__navigation--next {
|
|
57
53
|
background-image: url(/img/icons/Right-arrow.svg);
|
|
58
54
|
margin-right: ${(p) => p.theme.spacing.s};
|
|
59
|
-
margin-top: ${(p) => p.theme.spacing.xs};
|
|
60
55
|
}
|
|
61
56
|
|
|
62
57
|
&.react-datepicker__navigation--previous {
|
|
63
58
|
background-image: url(/img/icons/Left-arrow.svg);
|
|
64
59
|
margin-left: ${(p) => p.theme.spacing.s};
|
|
65
|
-
margin-top: ${(p) => p.theme.spacing.xs};
|
|
66
60
|
}
|
|
67
61
|
}
|
|
68
62
|
|
|
@@ -27,7 +27,7 @@ const Select = (props: ISelectProps): JSX.Element => {
|
|
|
27
27
|
|
|
28
28
|
const optionValues: IOptionProps[] = hasEmptyOption ? [emptyOption, ...options] : options;
|
|
29
29
|
|
|
30
|
-
const handleChange = (selectedValue:
|
|
30
|
+
const handleChange = (selectedValue: IOptionProps) => onChange(selectedValue.value);
|
|
31
31
|
|
|
32
32
|
const handleInputChange = (inputText: string, meta: InputActionMeta) => {
|
|
33
33
|
if (meta.action !== "input-blur" && meta.action !== "menu-close") {
|
|
@@ -57,7 +57,7 @@ const Select = (props: ISelectProps): JSX.Element => {
|
|
|
57
57
|
error={error}
|
|
58
58
|
onChange={handleChange}
|
|
59
59
|
isSearchable={searchable}
|
|
60
|
-
|
|
60
|
+
hasEmptyOption={hasEmptyOption}
|
|
61
61
|
onInputChange={handleInputChange}
|
|
62
62
|
alignRight={alignRight}
|
|
63
63
|
aria-label={name}
|
|
@@ -68,7 +68,7 @@ export const StyledSelect = styled(Select)<{
|
|
|
68
68
|
padding: ${(p) => `13px ${p.theme.spacing.s} 12px ${p.theme.spacing.s}`};
|
|
69
69
|
&:first-child {
|
|
70
70
|
${(p) =>
|
|
71
|
-
p.
|
|
71
|
+
p.hasEmptyOption &&
|
|
72
72
|
css`
|
|
73
73
|
font-style: italic;
|
|
74
74
|
color: ${(p) => p.theme.color.textLowEmphasis};
|