diff --git a/web/package.json b/web/package.json index 45d32881e..c0ac06141 100644 --- a/web/package.json +++ b/web/package.json @@ -121,7 +121,7 @@ "moment": "^2.29.4", "moment-timezone": "^0.5.34", "notificar": "^1.0.1", - "notistack": "^2.0.8", + "notistack": "^3.0.1", "path-fx": "^2.0.0", "pathfinding": "^0.4.18", "paths-js": "^0.4.9", diff --git a/web/pgadmin/browser/server_groups/servers/static/js/server.js b/web/pgadmin/browser/server_groups/servers/static/js/server.js index bc697cc01..0c7f5748a 100644 --- a/web/pgadmin/browser/server_groups/servers/static/js/server.js +++ b/web/pgadmin/browser/server_groups/servers/static/js/server.js @@ -230,7 +230,7 @@ define('pgadmin.node.server', [ obj.generate_url(i, 'connect', d, true), ).then(({data: res})=> { if (res.success == 1) { - pgAdmin.Browser.notifier.success(res.info, null); + pgAdmin.Browser.notifier.success(res.info); d = t.itemData(i); t.removeIcon(i); d.connected = false; diff --git a/web/pgadmin/static/js/SecurityPages/BasePage.jsx b/web/pgadmin/static/js/SecurityPages/BasePage.jsx index 0a8fcca66..288cf1ef2 100644 --- a/web/pgadmin/static/js/SecurityPages/BasePage.jsx +++ b/web/pgadmin/static/js/SecurityPages/BasePage.jsx @@ -62,7 +62,7 @@ export default function BasePage({pageImage, title, children, messages}) { const snackbar = useSnackbar(); useEffect(()=>{ messages?.forEach((m)=>{ - snackbar.enqueueSnackbar(null, { + snackbar.enqueueSnackbar({ autoHideDuration: null, content: (key)=>{ if(Array.isArray(m[0])) m[0] = m[0][0]; diff --git a/web/pgadmin/static/js/helpers/Notifier.jsx b/web/pgadmin/static/js/helpers/Notifier.jsx index 8eee3447b..97ad063bf 100644 --- a/web/pgadmin/static/js/helpers/Notifier.jsx +++ b/web/pgadmin/static/js/helpers/Notifier.jsx @@ -77,11 +77,11 @@ class SnackbarNotifier { notify(content, autoHideDuration) { if (content) { - let options = {autoHideDuration, content:(key) => ( + let options = {autoHideDuration, content:(key) => ( {React.cloneElement(content, {onClose:()=>{this.snackbarObj.closeSnackbar(key);}})} )}; options.content.displayName = 'content'; - this.snackbarObj.enqueueSnackbar(null, options); + this.snackbarObj.enqueueSnackbar(options); } } diff --git a/web/yarn.lock b/web/yarn.lock index d1065df69..42ce67828 100644 --- a/web/yarn.lock +++ b/web/yarn.lock @@ -8360,6 +8360,15 @@ __metadata: languageName: node linkType: hard +"goober@npm:^2.0.33": + version: 2.1.14 + resolution: "goober@npm:2.1.14" + peerDependencies: + csstype: ^3.0.10 + checksum: 78978b7192d6a1af5cfbf1fd64b661b5f53ee6c733554b1f1b2ad3e1e2c979847fc080434390647640bb8358c0b193895d0007432c0886d12001f02f8f56b5e6 + languageName: node + linkType: hard + "gopd@npm:^1.0.1": version: 1.0.1 resolution: "gopd@npm:1.0.1" @@ -8621,7 +8630,7 @@ __metadata: languageName: node linkType: hard -"hoist-non-react-statics@npm:^3.0.0, hoist-non-react-statics@npm:^3.3.0, hoist-non-react-statics@npm:^3.3.1, hoist-non-react-statics@npm:^3.3.2": +"hoist-non-react-statics@npm:^3.0.0, hoist-non-react-statics@npm:^3.3.1, hoist-non-react-statics@npm:^3.3.2": version: 3.3.2 resolution: "hoist-non-react-statics@npm:3.3.2" dependencies: @@ -11600,24 +11609,16 @@ __metadata: languageName: node linkType: hard -"notistack@npm:^2.0.8": - version: 2.0.8 - resolution: "notistack@npm:2.0.8" +"notistack@npm:^3.0.1": + version: 3.0.1 + resolution: "notistack@npm:3.0.1" dependencies: clsx: ^1.1.0 - hoist-non-react-statics: ^3.3.0 + goober: ^2.0.33 peerDependencies: - "@emotion/react": ^11.4.1 - "@emotion/styled": ^11.3.0 - "@mui/material": ^5.0.0 react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@emotion/react": - optional: true - "@emotion/styled": - optional: true - checksum: f95952ea7209840f6f05a65e74f0fb4e7a1bb321753b2955ae6052f2205d47a6a3c50a42b72db11eac2fc491c4105b4687bed89e79287399530973fa133a5380 + checksum: 421c970308690b8c8cb2e275e7f66020db7c1955e104f638e7fa562396a6b9322ff95f0e62492b07f3d36b0ef72adb4de2c2ce9803089c1c8f028d1a3b088e01 languageName: node linkType: hard @@ -14332,7 +14333,7 @@ __metadata: moment: ^2.29.4 moment-timezone: ^0.5.34 notificar: ^1.0.1 - notistack: ^2.0.8 + notistack: ^3.0.1 path-fx: ^2.0.0 pathfinding: ^0.4.18 paths-js: ^0.4.9