jupyterlab_notifications_extension 1.0.19 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +4 -0
- package/package.json +1 -1
- package/src/index.ts +6 -0
package/lib/index.js
CHANGED
|
@@ -16,6 +16,10 @@ async function fetchAndDisplayNotifications(app) {
|
|
|
16
16
|
const options = {
|
|
17
17
|
autoClose: notif.autoClose
|
|
18
18
|
};
|
|
19
|
+
// Add data field if present
|
|
20
|
+
if (notif.data !== undefined) {
|
|
21
|
+
options.data = notif.data;
|
|
22
|
+
}
|
|
19
23
|
// Build actions array if present (actions are passed as part of options)
|
|
20
24
|
if (notif.actions && notif.actions.length > 0) {
|
|
21
25
|
options.actions = notif.actions.map(action => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jupyterlab_notifications_extension",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.20",
|
|
4
4
|
"description": "Jupyterlab extension to receive and display notifications in the main panel. Those can be from the jupyterjub administrator or from other places.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jupyter",
|
package/src/index.ts
CHANGED
|
@@ -19,6 +19,7 @@ interface INotificationData {
|
|
|
19
19
|
caption?: string;
|
|
20
20
|
displayType?: 'default' | 'accent' | 'warn' | 'link';
|
|
21
21
|
}>;
|
|
22
|
+
data?: any;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
/**
|
|
@@ -48,6 +49,11 @@ async function fetchAndDisplayNotifications(
|
|
|
48
49
|
autoClose: notif.autoClose
|
|
49
50
|
};
|
|
50
51
|
|
|
52
|
+
// Add data field if present
|
|
53
|
+
if (notif.data !== undefined) {
|
|
54
|
+
options.data = notif.data;
|
|
55
|
+
}
|
|
56
|
+
|
|
51
57
|
// Build actions array if present (actions are passed as part of options)
|
|
52
58
|
if (notif.actions && notif.actions.length > 0) {
|
|
53
59
|
options.actions = notif.actions.map(action => ({
|