Fix JS test cases and other JS build issues caused due to dependabot updates.

pull/6426/head
Aditya Toshniwal 2023-06-09 18:22:20 +05:30
parent f4ea95da12
commit 745a91393c
9 changed files with 47 additions and 43 deletions

View File

@ -89,8 +89,8 @@
"@emotion/sheet": "^1.0.1",
"@material-ui/core": "4.12.4",
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "4.0.0-alpha.58",
"@material-ui/pickers": "^3.2.10",
"@material-ui/lab": "4.0.0-alpha.61",
"@material-ui/pickers": "3.3.10",
"@projectstorm/react-diagrams": "^6.6.1",
"@simonwep/pickr": "^1.5.1",
"@szhsin/react-menu": "^2.2.0",

View File

@ -8,11 +8,11 @@
//////////////////////////////////////////////////////////////
/* The dark theme */
import { createMuiTheme } from '@material-ui/core/styles';
import { createTheme } from '@material-ui/core/styles';
import { darken } from '@material-ui/core/styles/colorManipulator';
export default function(basicSettings) {
return createMuiTheme(basicSettings, {
return createTheme(basicSettings, {
palette: {
default: {
main: '#6b6b6b',

View File

@ -8,10 +8,10 @@
//////////////////////////////////////////////////////////////
/* The dark theme */
import { createMuiTheme } from '@material-ui/core/styles';
import { createTheme } from '@material-ui/core/styles';
export default function(basicSettings) {
return createMuiTheme(basicSettings, {
return createTheme(basicSettings, {
palette: {
default: {
main: 'transparent',

View File

@ -13,7 +13,7 @@
*/
import React, { useMemo } from 'react';
import { createMuiTheme, ThemeProvider, makeStyles } from '@material-ui/core/styles';
import { createTheme, ThemeProvider, makeStyles } from '@material-ui/core/styles';
import CustomPropTypes from '../custom_prop_types';
import getStandardTheme from './standard';
@ -24,8 +24,8 @@ import pickrOverride from './overrides/pickr.override';
import uplotOverride from './overrides/uplot.override';
/* Common settings across all themes */
let basicSettings = createMuiTheme();
basicSettings = createMuiTheme(basicSettings, {
let basicSettings = createTheme();
basicSettings = createTheme(basicSettings, {
typography: {
fontSize: 14,
htmlFontSize: 14,
@ -296,7 +296,7 @@ function getFinalTheme(baseTheme) {
}
};
return createMuiTheme({
return createTheme({
mixins: mixins,
overrides: {
MuiCssBaseline: {

View File

@ -8,11 +8,11 @@
//////////////////////////////////////////////////////////////
/* The standard theme */
import { createMuiTheme } from '@material-ui/core/styles';
import { fade, darken } from '@material-ui/core/styles/colorManipulator';
import { createTheme } from '@material-ui/core/styles';
import { alpha, darken } from '@material-ui/core/styles/colorManipulator';
export default function(basicSettings) {
return createMuiTheme(basicSettings, {
return createTheme(basicSettings, {
palette: {
default: {
main: '#fff',
@ -86,7 +86,7 @@ export default function(basicSettings) {
},
borderColor: '#dde0e6',
loader: {
backgroundColor: fade('#000', 0.65),
backgroundColor: alpha('#000', 0.65),
color: '#fff',
},
errorColor: '#E53935',

View File

@ -267,6 +267,9 @@ function ModalContainer({ id, title, content, dialogHeight, dialogWidth, onClose
let useModalRef = useModal();
const classes = useModalStyles();
let closeModal = (_e, reason) => {
if(reason == 'backdropClick' && showTitle) {
return;
}
useModalRef.closeModal(id);
if(reason == 'escapeKeyDown') {
onClose?.();
@ -282,7 +285,6 @@ function ModalContainer({ id, title, content, dialogHeight, dialogWidth, onClose
PaperProps={{ 'isfullscreen': isfullScreen.toString(), 'isresizeable': isResizeable.toString(), width: dialogWidth, height: dialogHeight, minHeight: minHeight, minWidth: minWidth }}
fullScreen={isfullScreen}
fullWidth={isFullWidth}
disableBackdropClick={showTitle}
disablePortal
>
{ showTitle && <>

View File

@ -10,14 +10,16 @@
/* eslint-disable no-console */
beforeAll(function () {
spyOn(console, 'warn').and.callThrough();
// Warnings can be ignored
// spyOn(console, 'warn').and.callThrough();
spyOn(console, 'error').and.callThrough();
jasmine.getEnv().allowRespy(true);
});
afterEach(function (done) {
setTimeout(function () {
expect(console.warn).not.toHaveBeenCalled();
// Warnings can be ignored
// expect(console.warn).not.toHaveBeenCalled();
expect(console.error).not.toHaveBeenCalled();
done();
}, 0);

View File

@ -74,19 +74,6 @@ const copyFiles = new CopyPlugin({
],
});
const imageMinimizer = new ImageMinimizerPlugin({
test: /\.(jpe?g|png|gif)$/i,
minimizerOptions: {
// Lossless optimization with custom option
// Feel free to experiment with options for better result for you
plugins: [
['mozjpeg', { progressive: true }],
['optipng', { optimizationLevel: 7 }],
['pngquant', {quality: [0.75, .9], speed: 3}],
],
},
});
function cssToBeSkiped(curr_path) {
/** Skip all templates **/
if(curr_path.indexOf('template') > -1) {
@ -577,7 +564,7 @@ module.exports = [{
ignored: /node_modules/,
},
optimization: {
minimizer: [
minimizer: PRODUCTION ? [
new TerserPlugin({
parallel: true,
extractComments: true,
@ -585,7 +572,21 @@ module.exports = [{
compress: true,
},
}),
],
new ImageMinimizerPlugin({
test: /\.(jpe?g|png|gif)$/i,
minimizer: {
implementation: ImageMinimizerPlugin.imageminMinify,
options: {
plugins: [
'imagemin-gifsicle',
'imagemin-mozjpeg',
'imagemin-pngquant',
'imagemin-svgo',
],
},
},
}),
] : [],
splitChunks: {
cacheGroups: {
vendor_main: {
@ -645,7 +646,6 @@ module.exports = [{
sourceMapDevToolPlugin,
bundleAnalyzer,
copyFiles,
imageMinimizer,
]: [
extractStyle,
providePlugin,

View File

@ -2298,28 +2298,28 @@ __metadata:
languageName: node
linkType: hard
"@material-ui/lab@npm:4.0.0-alpha.58":
version: 4.0.0-alpha.58
resolution: "@material-ui/lab@npm:4.0.0-alpha.58"
"@material-ui/lab@npm:4.0.0-alpha.61":
version: 4.0.0-alpha.61
resolution: "@material-ui/lab@npm:4.0.0-alpha.61"
dependencies:
"@babel/runtime": ^7.4.4
"@material-ui/utils": ^4.11.2
"@material-ui/utils": ^4.11.3
clsx: ^1.0.4
prop-types: ^15.7.2
react-is: ^16.8.0 || ^17.0.0
peerDependencies:
"@material-ui/core": ^4.9.10
"@material-ui/core": ^4.12.1
"@types/react": ^16.8.6 || ^17.0.0
react: ^16.8.0 || ^17.0.0
react-dom: ^16.8.0 || ^17.0.0
peerDependenciesMeta:
"@types/react":
optional: true
checksum: 39777028a72b8ef23a24926fbbc56cb4bef0f109e50c2711d546880b2918c8554fdf39b5eeaea8a0e4214302fd7d02788b91688ce4e26aac362e6cfe755030ac
checksum: 8774a07d72615301e0099415580f87ea8f3d1d106f79e0b014738e302dd3e21959abf01d6c0a629e2e9afb8cb91abd8e9686c2886cddff06c27e6a8a8e063ea0
languageName: node
linkType: hard
"@material-ui/pickers@npm:^3.2.10":
"@material-ui/pickers@npm:3.3.10":
version: 3.3.10
resolution: "@material-ui/pickers@npm:3.3.10"
dependencies:
@ -2401,7 +2401,7 @@ __metadata:
languageName: node
linkType: hard
"@material-ui/utils@npm:^4.11.2, @material-ui/utils@npm:^4.11.3":
"@material-ui/utils@npm:^4.11.3":
version: 4.11.3
resolution: "@material-ui/utils@npm:4.11.3"
dependencies:
@ -12736,8 +12736,8 @@ __metadata:
"@emotion/utils": ^1.0.0
"@material-ui/core": 4.12.4
"@material-ui/icons": ^4.11.2
"@material-ui/lab": 4.0.0-alpha.58
"@material-ui/pickers": ^3.2.10
"@material-ui/lab": 4.0.0-alpha.61
"@material-ui/pickers": 3.3.10
"@projectstorm/react-diagrams": ^6.6.1
"@simonwep/pickr": ^1.5.1
"@svgr/webpack": ^6.2.1