Updated to the latest version of the Notistack library. #7501

This commit is contained in:
Pravesh Sharma 2024-07-01 11:26:45 +05:30 committed by GitHub
parent 6f8cde67a6
commit 4457a6a6a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 21 additions and 20 deletions

View File

@ -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",

View File

@ -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;

View File

@ -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];

View File

@ -77,11 +77,11 @@ class SnackbarNotifier {
notify(content, autoHideDuration) {
if (content) {
let options = {autoHideDuration, content:(key) => (
let options = {autoHideDuration, content:(key) => (
<FinalNotifyContent>{React.cloneElement(content, {onClose:()=>{this.snackbarObj.closeSnackbar(key);}})}</FinalNotifyContent>
)};
options.content.displayName = 'content';
this.snackbarObj.enqueueSnackbar(null, options);
this.snackbarObj.enqueueSnackbar(options);
}
}

View File

@ -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