@finos/legend-application
Advanced tools
Comparing version 15.1.21 to 15.1.22
{ | ||
"name": "@finos/legend-application", | ||
"version": "15.1.21", | ||
"version": "15.1.22", | ||
"description": "Legend application core", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -45,2 +45,3 @@ /** | ||
notifyError(content: Error | string, actions?: NotificationAction[]): void; | ||
getErrorMessage(content: Error | string): string | undefined; | ||
notifyIllegalState(message: string, actions?: NotificationAction[], autoHideDuration?: number | null): void; | ||
@@ -47,0 +48,0 @@ notifyUnsupportedFeature(featureName: string): void; |
@@ -72,2 +72,8 @@ /** | ||
notifyError(content, actions) { | ||
const message = this.getErrorMessage(content); | ||
if (message) { | ||
this.setNotification(new Notification(NOTIFCATION_SEVERITY.ERROR, message, actions ?? [], undefined)); | ||
} | ||
} | ||
getErrorMessage(content) { | ||
let message; | ||
@@ -84,5 +90,3 @@ if (content instanceof ApplicationError) { | ||
} | ||
if (message) { | ||
this.setNotification(new Notification(NOTIFCATION_SEVERITY.ERROR, message, actions ?? [], undefined)); | ||
} | ||
return message; | ||
} | ||
@@ -89,0 +93,0 @@ notifyIllegalState(message, actions, autoHideDuration) { |
{ | ||
"name": "@finos/legend-application", | ||
"version": "15.1.21", | ||
"version": "15.1.22", | ||
"description": "Legend application core", | ||
@@ -48,4 +48,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@finos/legend-art": "7.1.49", | ||
"@finos/legend-shared": "10.0.50", | ||
"@finos/legend-art": "7.1.50", | ||
"@finos/legend-shared": "10.0.51", | ||
"@types/react": "18.3.3", | ||
@@ -52,0 +52,0 @@ "@types/react-dom": "18.3.0", |
@@ -132,11 +132,3 @@ /** | ||
notifyError(content: Error | string, actions?: NotificationAction[]): void { | ||
let message: string | undefined; | ||
if (content instanceof ApplicationError) { | ||
message = content.detail; | ||
} else if (content instanceof Error) { | ||
message = content.message; | ||
} else { | ||
assertTrue(isString(content), `Can't display error`); | ||
message = content; | ||
} | ||
const message = this.getErrorMessage(content); | ||
if (message) { | ||
@@ -154,2 +146,15 @@ this.setNotification( | ||
getErrorMessage(content: Error | string): string | undefined { | ||
let message: string | undefined; | ||
if (content instanceof ApplicationError) { | ||
message = content.detail; | ||
} else if (content instanceof Error) { | ||
message = content.message; | ||
} else { | ||
assertTrue(isString(content), `Can't display error`); | ||
message = content; | ||
} | ||
return message; | ||
} | ||
notifyIllegalState( | ||
@@ -156,0 +161,0 @@ message: string, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
865495
14754
67
+ Added@finos/legend-art@7.1.50(transitive)
+ Added@finos/legend-shared@10.0.51(transitive)
- Removed@finos/legend-art@7.1.49(transitive)
- Removed@finos/legend-shared@10.0.50(transitive)
Updated@finos/legend-art@7.1.50
Updated@finos/legend-shared@10.0.51