@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.
@@ -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
  }
@@ -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;
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/camunda-composite-components",
3
- "version": "0.0.31",
3
+ "version": "0.0.32",
4
4
  "scripts": {
5
5
  "clean": "rimraf lib/",
6
6
  "copy-css-files": "copyfiles -u 1 src/components/**/*.css lib/esm",