@camunda/camunda-composite-components 0.0.31 → 0.0.32
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/components/c3-navigation/c3-navigation-sidebar/c3-notification-sidebar.js +1 -1
- package/lib/esm/components/c3-navigation/c3-notification-provider/c3-notification-container.d.ts +1 -0
- package/lib/esm/components/c3-navigation/c3-notification-provider/c3-notification-container.js +4 -3
- package/package.json +1 -1
|
@@ -96,7 +96,7 @@ export const C3NotificationSidebar = ({ sideBar }) => {
|
|
|
96
96
|
if (notification.state === "new") {
|
|
97
97
|
markAsRead(notification);
|
|
98
98
|
}
|
|
99
|
-
}, onDismiss: () => dismiss(notification), onLinkClick: () => {
|
|
99
|
+
}, onDismiss: () => dismiss(notification), originalOnLinkClick: onLinkClick, onLinkClick: () => {
|
|
100
100
|
if (enabled && analytics) {
|
|
101
101
|
analytics("notification-clicked-cta", notification.meta?.identifier);
|
|
102
102
|
}
|
package/lib/esm/components/c3-navigation/c3-notification-provider/c3-notification-container.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ declare const C3NotificationContainer: FC<NotificationProps & {
|
|
|
7
7
|
onRead: () => void;
|
|
8
8
|
onDismiss: () => void;
|
|
9
9
|
onLinkClick?: (meta: NotificationProps["meta"]) => void;
|
|
10
|
+
originalOnLinkClick?: (meta: NotificationProps["meta"]) => void;
|
|
10
11
|
unread?: boolean;
|
|
11
12
|
}>;
|
|
12
13
|
export default C3NotificationContainer;
|
package/lib/esm/components/c3-navigation/c3-notification-provider/c3-notification-container.js
CHANGED
|
@@ -73,14 +73,15 @@ const getReadableTimestamp = (timestamp) => {
|
|
|
73
73
|
}
|
|
74
74
|
return date.toDateString();
|
|
75
75
|
};
|
|
76
|
-
const C3NotificationContainer = ({ description, state, timestamp, title, onDismiss, meta, onLinkClick, unread = false, }) => {
|
|
76
|
+
const C3NotificationContainer = ({ description, state, timestamp, title, onDismiss, meta, onLinkClick, originalOnLinkClick, unread = false, }) => {
|
|
77
77
|
const [isHovering, setIsHovering] = useState(false);
|
|
78
78
|
const dismissNotification = (e) => {
|
|
79
79
|
e.stopPropagation();
|
|
80
80
|
onDismiss();
|
|
81
81
|
};
|
|
82
|
-
const handleLinkClick = () => {
|
|
83
|
-
if (onLinkClick) {
|
|
82
|
+
const handleLinkClick = (event) => {
|
|
83
|
+
if (originalOnLinkClick && onLinkClick) {
|
|
84
|
+
event.preventDefault();
|
|
84
85
|
onLinkClick(meta);
|
|
85
86
|
return false;
|
|
86
87
|
}
|