@camunda/camunda-composite-components 0.8.0 → 0.8.1-rc.1
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/esm/package.json +18 -18
- package/lib/esm/src/api/notifications.js +27 -17
- package/package.json +18 -18
package/lib/esm/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "git+https://github.com/camunda-cloud/camunda-composite-components.git"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.8.1-rc.0",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"clean": "rimraf lib/",
|
|
10
10
|
"build": "yarn clean && tsc",
|
|
@@ -30,29 +30,29 @@
|
|
|
30
30
|
"test": "yarn test:ts && yarn test:storybook && yarn test:visual-regression:docker"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@babel/core": "7.24.
|
|
34
|
-
"@babel/preset-env": "7.24.
|
|
35
|
-
"@babel/preset-react": "7.24.
|
|
36
|
-
"@babel/preset-typescript": "7.24.
|
|
33
|
+
"@babel/core": "7.24.7",
|
|
34
|
+
"@babel/preset-env": "7.24.7",
|
|
35
|
+
"@babel/preset-react": "7.24.7",
|
|
36
|
+
"@babel/preset-typescript": "7.24.7",
|
|
37
37
|
"@carbon/react": "1.55.0",
|
|
38
38
|
"@mdx-js/react": "3.0.1",
|
|
39
39
|
"@playwright/test": "1.42.1",
|
|
40
40
|
"@semantic-release/changelog": "6.0.3",
|
|
41
41
|
"@semantic-release/git": "10.0.1",
|
|
42
|
-
"@storybook/addon-a11y": "8.1.
|
|
43
|
-
"@storybook/addon-actions": "8.1.
|
|
44
|
-
"@storybook/addon-docs": "8.1.
|
|
45
|
-
"@storybook/addon-essentials": "8.1.
|
|
46
|
-
"@storybook/addon-interactions": "8.1.
|
|
47
|
-
"@storybook/addon-links": "8.1.
|
|
48
|
-
"@storybook/addon-mdx-gfm": "8.1.
|
|
42
|
+
"@storybook/addon-a11y": "8.1.10",
|
|
43
|
+
"@storybook/addon-actions": "8.1.10",
|
|
44
|
+
"@storybook/addon-docs": "8.1.10",
|
|
45
|
+
"@storybook/addon-essentials": "8.1.10",
|
|
46
|
+
"@storybook/addon-interactions": "8.1.10",
|
|
47
|
+
"@storybook/addon-links": "8.1.10",
|
|
48
|
+
"@storybook/addon-mdx-gfm": "8.1.10",
|
|
49
49
|
"@storybook/addon-webpack5-compiler-babel": "3.0.3",
|
|
50
|
-
"@storybook/blocks": "8.1.
|
|
50
|
+
"@storybook/blocks": "8.1.10",
|
|
51
51
|
"@storybook/preset-scss": "1.0.3",
|
|
52
|
-
"@storybook/react": "8.1.
|
|
53
|
-
"@storybook/react-webpack5": "8.1.
|
|
54
|
-
"@storybook/test": "8.1.
|
|
55
|
-
"@storybook/test-runner": "0.18.
|
|
52
|
+
"@storybook/react": "8.1.10",
|
|
53
|
+
"@storybook/react-webpack5": "8.1.10",
|
|
54
|
+
"@storybook/test": "8.1.10",
|
|
55
|
+
"@storybook/test-runner": "0.18.2",
|
|
56
56
|
"@types/carbon-components-react": "7.55.10",
|
|
57
57
|
"@types/event-source-polyfill": "1.0.5",
|
|
58
58
|
"@types/mixpanel-browser": "2.49.0",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"sass-loader": "14.1.1",
|
|
87
87
|
"semantic-release": "23.0.7",
|
|
88
88
|
"serve": "14.2.1",
|
|
89
|
-
"storybook": "8.1.
|
|
89
|
+
"storybook": "8.1.10",
|
|
90
90
|
"style-loader": "4.0.0",
|
|
91
91
|
"styled-components": "6.1.8",
|
|
92
92
|
"typescript": "5.4.4",
|
|
@@ -71,24 +71,34 @@ export class NotificationService {
|
|
|
71
71
|
...options,
|
|
72
72
|
endpoint: NOTIFICATIONS,
|
|
73
73
|
});
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
74
|
+
try {
|
|
75
|
+
const source = new EventSourcePolyfill(`${baseUrl}/notifications/events`, {
|
|
76
|
+
headers: {
|
|
77
|
+
authorization: `Bearer ${options.userToken}`,
|
|
78
|
+
},
|
|
79
|
+
heartbeatTimeout: 1000 * 60 * 60,
|
|
80
|
+
});
|
|
81
|
+
source.onmessage = function (event) {
|
|
82
|
+
try {
|
|
83
|
+
const notification = JSON.parse(event.data);
|
|
84
|
+
if (!notification.keepAlive) {
|
|
85
|
+
handler(notification);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
if (options.enableLogs)
|
|
90
|
+
console.error(`Failed to handle SSE event`, { error });
|
|
85
91
|
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
+
};
|
|
93
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
94
|
+
source.onerror = function (_event) {
|
|
95
|
+
// ignore
|
|
96
|
+
};
|
|
97
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
98
|
+
}
|
|
99
|
+
catch (_error) {
|
|
100
|
+
// ignore
|
|
101
|
+
}
|
|
92
102
|
}
|
|
93
103
|
// updates <allNotifications> with <newNotification>
|
|
94
104
|
// if <newNotification> is read or new, it will be added to <allNotifications>
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "git+https://github.com/camunda-cloud/camunda-composite-components.git"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.8.
|
|
7
|
+
"version": "0.8.1-rc.1",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"clean": "rimraf lib/",
|
|
10
10
|
"build": "yarn clean && tsc",
|
|
@@ -30,29 +30,29 @@
|
|
|
30
30
|
"test": "yarn test:ts && yarn test:storybook && yarn test:visual-regression:docker"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@babel/core": "7.24.
|
|
34
|
-
"@babel/preset-env": "7.24.
|
|
35
|
-
"@babel/preset-react": "7.24.
|
|
36
|
-
"@babel/preset-typescript": "7.24.
|
|
33
|
+
"@babel/core": "7.24.7",
|
|
34
|
+
"@babel/preset-env": "7.24.7",
|
|
35
|
+
"@babel/preset-react": "7.24.7",
|
|
36
|
+
"@babel/preset-typescript": "7.24.7",
|
|
37
37
|
"@carbon/react": "1.55.0",
|
|
38
38
|
"@mdx-js/react": "3.0.1",
|
|
39
39
|
"@playwright/test": "1.42.1",
|
|
40
40
|
"@semantic-release/changelog": "6.0.3",
|
|
41
41
|
"@semantic-release/git": "10.0.1",
|
|
42
|
-
"@storybook/addon-a11y": "8.1.
|
|
43
|
-
"@storybook/addon-actions": "8.1.
|
|
44
|
-
"@storybook/addon-docs": "8.1.
|
|
45
|
-
"@storybook/addon-essentials": "8.1.
|
|
46
|
-
"@storybook/addon-interactions": "8.1.
|
|
47
|
-
"@storybook/addon-links": "8.1.
|
|
48
|
-
"@storybook/addon-mdx-gfm": "8.1.
|
|
42
|
+
"@storybook/addon-a11y": "8.1.10",
|
|
43
|
+
"@storybook/addon-actions": "8.1.10",
|
|
44
|
+
"@storybook/addon-docs": "8.1.10",
|
|
45
|
+
"@storybook/addon-essentials": "8.1.10",
|
|
46
|
+
"@storybook/addon-interactions": "8.1.10",
|
|
47
|
+
"@storybook/addon-links": "8.1.10",
|
|
48
|
+
"@storybook/addon-mdx-gfm": "8.1.10",
|
|
49
49
|
"@storybook/addon-webpack5-compiler-babel": "3.0.3",
|
|
50
|
-
"@storybook/blocks": "8.1.
|
|
50
|
+
"@storybook/blocks": "8.1.10",
|
|
51
51
|
"@storybook/preset-scss": "1.0.3",
|
|
52
|
-
"@storybook/react": "8.1.
|
|
53
|
-
"@storybook/react-webpack5": "8.1.
|
|
54
|
-
"@storybook/test": "8.1.
|
|
55
|
-
"@storybook/test-runner": "0.18.
|
|
52
|
+
"@storybook/react": "8.1.10",
|
|
53
|
+
"@storybook/react-webpack5": "8.1.10",
|
|
54
|
+
"@storybook/test": "8.1.10",
|
|
55
|
+
"@storybook/test-runner": "0.18.2",
|
|
56
56
|
"@types/carbon-components-react": "7.55.10",
|
|
57
57
|
"@types/event-source-polyfill": "1.0.5",
|
|
58
58
|
"@types/mixpanel-browser": "2.49.0",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"sass-loader": "14.1.1",
|
|
87
87
|
"semantic-release": "23.0.7",
|
|
88
88
|
"serve": "14.2.1",
|
|
89
|
-
"storybook": "8.1.
|
|
89
|
+
"storybook": "8.1.10",
|
|
90
90
|
"style-loader": "4.0.0",
|
|
91
91
|
"styled-components": "6.1.8",
|
|
92
92
|
"typescript": "5.4.4",
|