Merge branch 'master' of https://github.com/strapi/strapi into feature/usecase-ui

This commit is contained in:
ronronscelestes 2022-02-10 15:59:08 +01:00
commit 0554469b2b
6 changed files with 870 additions and 5894 deletions

View File

@ -70,17 +70,17 @@
"@babel/polyfill": "7.12.1" "@babel/polyfill": "7.12.1"
}, },
"devDependencies": { "devDependencies": {
"@swc-node/jest": "1.1.0", "@swc-node/jest": "1.4.3",
"@testing-library/react": "11.2.6", "@testing-library/react": "11.2.6",
"@testing-library/react-hooks": "3.4.2", "@testing-library/react-hooks": "3.4.2",
"@testing-library/user-event": "13.1.9", "@testing-library/user-event": "13.5.0",
"axios-mock-adapter": "1.19.0", "axios-mock-adapter": "1.19.0",
"babel-eslint": "10.0.0", "babel-eslint": "10.1.0",
"chalk": "4.1.1", "chalk": "4.1.1",
"chokidar": "3.5.1", "chokidar": "3.5.1",
"cross-env": "7.0.3", "cross-env": "7.0.3",
"dotenv": "14.2.0", "dotenv": "14.2.0",
"enzyme": "3.9.0", "enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.6", "enzyme-adapter-react-16": "1.15.6",
"eslint": "7.25.0", "eslint": "7.25.0",
"eslint-config-airbnb": "18.2.1", "eslint-config-airbnb": "18.2.1",
@ -91,7 +91,7 @@
"eslint-plugin-jsx-a11y": "6.4.1", "eslint-plugin-jsx-a11y": "6.4.1",
"eslint-plugin-node": "11.1.0", "eslint-plugin-node": "11.1.0",
"eslint-plugin-react": "7.23.2", "eslint-plugin-react": "7.23.2",
"eslint-plugin-react-hooks": "4.2.0", "eslint-plugin-react-hooks": "4.3.0",
"eslint-plugin-redux-saga": "1.2.1", "eslint-plugin-redux-saga": "1.2.1",
"execa": "1.0.0", "execa": "1.0.0",
"fs-extra": "10.0.0", "fs-extra": "10.0.0",

View File

@ -22,7 +22,7 @@
}, },
"devDependencies": { "devDependencies": {
"@testing-library/jest-dom": "5.16.1", "@testing-library/jest-dom": "5.16.1",
"enzyme": "3.9.0", "enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.6", "enzyme-adapter-react-16": "1.15.6",
"jest-styled-components": "7.0.2" "jest-styled-components": "7.0.2"
}, },

View File

@ -262,7 +262,7 @@ async function watchAdmin({ plugins, dir, host, port, browser, options }) {
const compiler = webpack(webpackConfig); const compiler = webpack(webpackConfig);
const server = new WebpackDevServer(compiler.options.devServer, compiler); const server = new WebpackDevServer(args.devServer, compiler);
const runServer = async () => { const runServer = async () => {
console.log(chalk.green('Starting the development server...')); console.log(chalk.green('Starting the development server...'));

View File

@ -96,11 +96,15 @@ const DateTimePicker = ({
const handleTimeClear = () => { const handleTimeClear = () => {
setTimeValue(undefined); setTimeValue(undefined);
if (dateValue && onChange) { let dateToSet;
const dateToSet = new Date(dateValue);
if (dateValue) {
dateToSet = new Date(dateValue);
dateToSet.setHours('00'); dateToSet.setHours('00');
dateToSet.setMinutes('00'); dateToSet.setMinutes('00');
}
if (onChange) {
onChange(dateToSet); onChange(dateToSet);
} }
}; };

View File

@ -147,7 +147,7 @@ const GenericInput = ({
onChange({ target: { name, value: formattedDate, type } }); onChange({ target: { name, value: formattedDate, type } });
}} }}
step={step} step={step}
onClear={() => onChange({ target: { name, value: '', type } })} onClear={() => onChange({ target: { name, value: null, type } })}
placeholder={formattedPlaceholder} placeholder={formattedPlaceholder}
required={required} required={required}
value={value ? new Date(value) : null} value={value ? new Date(value) : null}
@ -171,7 +171,7 @@ const GenericInput = ({
onChange({ target: { name, value: formattedDate, type } }); onChange({ target: { name, value: formattedDate, type } });
}} }}
onClear={() => onChange({ target: { name, value: '', type } })} onClear={() => onChange({ target: { name, value: null, type } })}
placeholder={formattedPlaceholder} placeholder={formattedPlaceholder}
required={required} required={required}
selectedDate={value ? new Date(value) : null} selectedDate={value ? new Date(value) : null}

6738
yarn.lock

File diff suppressed because it is too large Load Diff