analytica-frontend-lib 1.1.47 → 1.1.48

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/dist/index.d.mts CHANGED
@@ -279,9 +279,9 @@ declare const createUseNotifications: (apiClient: NotificationApiClient) => () =
279
279
  deleteNotification: (id: string) => Promise<void>;
280
280
  clearNotifications: () => void;
281
281
  resetError: () => void;
282
- markAsReadAndNavigate: (id: string, entityType?: string, entityId?: string) => Promise<void>;
282
+ markAsReadAndNavigate: (id: string, entityType?: string, entityId?: string, onAfterNavigate?: () => void) => Promise<void>;
283
283
  refreshNotifications: () => Promise<void>;
284
- handleNavigate: (entityType?: string, entityId?: string) => void;
284
+ handleNavigate: (entityType?: string, entityId?: string, onAfterNavigate?: () => void) => void;
285
285
  getActionLabel: (entityType?: string) => string | undefined;
286
286
  getGroupedNotifications: () => NotificationGroup[];
287
287
  getFormattedGroupedNotifications: () => {
@@ -346,9 +346,9 @@ declare const createNotificationsHook: (apiClient: NotificationApiClient) => ()
346
346
  deleteNotification: (id: string) => Promise<void>;
347
347
  clearNotifications: () => void;
348
348
  resetError: () => void;
349
- markAsReadAndNavigate: (id: string, entityType?: string, entityId?: string) => Promise<void>;
349
+ markAsReadAndNavigate: (id: string, entityType?: string, entityId?: string, onAfterNavigate?: () => void) => Promise<void>;
350
350
  refreshNotifications: () => Promise<void>;
351
- handleNavigate: (entityType?: string, entityId?: string) => void;
351
+ handleNavigate: (entityType?: string, entityId?: string, onAfterNavigate?: () => void) => void;
352
352
  getActionLabel: (entityType?: string) => string | undefined;
353
353
  getGroupedNotifications: () => NotificationGroup[];
354
354
  getFormattedGroupedNotifications: () => {
package/dist/index.d.ts CHANGED
@@ -279,9 +279,9 @@ declare const createUseNotifications: (apiClient: NotificationApiClient) => () =
279
279
  deleteNotification: (id: string) => Promise<void>;
280
280
  clearNotifications: () => void;
281
281
  resetError: () => void;
282
- markAsReadAndNavigate: (id: string, entityType?: string, entityId?: string) => Promise<void>;
282
+ markAsReadAndNavigate: (id: string, entityType?: string, entityId?: string, onAfterNavigate?: () => void) => Promise<void>;
283
283
  refreshNotifications: () => Promise<void>;
284
- handleNavigate: (entityType?: string, entityId?: string) => void;
284
+ handleNavigate: (entityType?: string, entityId?: string, onAfterNavigate?: () => void) => void;
285
285
  getActionLabel: (entityType?: string) => string | undefined;
286
286
  getGroupedNotifications: () => NotificationGroup[];
287
287
  getFormattedGroupedNotifications: () => {
@@ -346,9 +346,9 @@ declare const createNotificationsHook: (apiClient: NotificationApiClient) => ()
346
346
  deleteNotification: (id: string) => Promise<void>;
347
347
  clearNotifications: () => void;
348
348
  resetError: () => void;
349
- markAsReadAndNavigate: (id: string, entityType?: string, entityId?: string) => Promise<void>;
349
+ markAsReadAndNavigate: (id: string, entityType?: string, entityId?: string, onAfterNavigate?: () => void) => Promise<void>;
350
350
  refreshNotifications: () => Promise<void>;
351
- handleNavigate: (entityType?: string, entityId?: string) => void;
351
+ handleNavigate: (entityType?: string, entityId?: string, onAfterNavigate?: () => void) => void;
352
352
  getActionLabel: (entityType?: string) => string | undefined;
353
353
  getGroupedNotifications: () => NotificationGroup[];
354
354
  getFormattedGroupedNotifications: () => {
package/dist/index.js CHANGED
@@ -10925,7 +10925,7 @@ var createUseNotifications = (apiClient) => {
10925
10925
  getGroupedNotifications
10926
10926
  } = useNotificationStore();
10927
10927
  const handleNavigate = (0, import_react31.useCallback)(
10928
- (entityType, entityId) => {
10928
+ (entityType, entityId, onAfterNavigate) => {
10929
10929
  if (entityType && entityId) {
10930
10930
  switch (entityType.toUpperCase()) {
10931
10931
  case "ACTIVITY" /* ACTIVITY */:
@@ -10937,6 +10937,7 @@ var createUseNotifications = (apiClient) => {
10937
10937
  default:
10938
10938
  break;
10939
10939
  }
10940
+ onAfterNavigate?.();
10940
10941
  }
10941
10942
  },
10942
10943
  []
@@ -10956,10 +10957,10 @@ var createUseNotifications = (apiClient) => {
10956
10957
  []
10957
10958
  );
10958
10959
  const markAsReadAndNavigate = (0, import_react31.useCallback)(
10959
- async (id, entityType, entityId) => {
10960
+ async (id, entityType, entityId, onAfterNavigate) => {
10960
10961
  await markAsRead(id);
10961
10962
  if (entityType && entityId) {
10962
- handleNavigate(entityType, entityId);
10963
+ handleNavigate(entityType, entityId, onAfterNavigate);
10963
10964
  }
10964
10965
  },
10965
10966
  [markAsRead, handleNavigate]