@replyke/core 5.1.5-beta.6 → 5.1.5-beta.8
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/cjs/context/index.d.ts +0 -1
- package/dist/cjs/context/index.js +1 -6
- package/dist/cjs/context/index.js.map +1 -1
- package/dist/cjs/hooks/app-notifications-redux/index.d.ts +1 -1
- package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsActionsRedux.d.ts +1 -0
- package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsActionsRedux.js +67 -9
- package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsActionsRedux.js.map +1 -1
- package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.d.ts +15 -1
- package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.js +25 -9
- package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.js.map +1 -1
- package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.d.ts +1 -1
- package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.js +12 -4
- package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -2
- package/dist/cjs/index.js +2 -10
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/models/AppNotification.d.ts +1 -1
- package/dist/cjs/legacy/context/app-notifications-context.js.map +1 -0
- package/dist/cjs/{context → legacy/context}/auth-context.js +1 -1
- package/dist/cjs/legacy/context/auth-context.js.map +1 -0
- package/dist/cjs/legacy/hooks/app-notifications/index.js.map +1 -0
- package/dist/cjs/legacy/hooks/app-notifications/useAppNotifications.js.map +1 -0
- package/dist/{esm → cjs/legacy}/hooks/app-notifications/useAppNotificationsData.d.ts +1 -1
- package/dist/cjs/{hooks → legacy/hooks}/app-notifications/useAppNotificationsData.js +2 -2
- package/dist/cjs/legacy/hooks/app-notifications/useAppNotificationsData.js.map +1 -0
- package/dist/cjs/{hooks → legacy/hooks}/app-notifications/useCountUnreadNotifications.js +3 -3
- package/dist/cjs/legacy/hooks/app-notifications/useCountUnreadNotifications.js.map +1 -0
- package/dist/cjs/{hooks → legacy/hooks}/app-notifications/useFetchAppNotifications.d.ts +1 -1
- package/dist/cjs/{hooks → legacy/hooks}/app-notifications/useFetchAppNotifications.js +3 -3
- package/dist/cjs/legacy/hooks/app-notifications/useFetchAppNotifications.js.map +1 -0
- package/dist/cjs/{hooks → legacy/hooks}/app-notifications/useMarkNotificationAsRead.js +3 -3
- package/dist/cjs/legacy/hooks/app-notifications/useMarkNotificationAsRead.js.map +1 -0
- package/dist/cjs/legacy/hooks/auth/index.js.map +1 -0
- package/dist/cjs/legacy/hooks/auth/useAuth.js.map +1 -0
- package/dist/cjs/{hooks → legacy/hooks}/auth/useAuthData.d.ts +1 -1
- package/dist/cjs/{hooks → legacy/hooks}/auth/useAuthData.js +2 -2
- package/dist/cjs/legacy/hooks/auth/useAuthData.js.map +1 -0
- package/dist/cjs/{hooks → legacy/hooks}/auth/useChangePassword.js +3 -3
- package/dist/cjs/legacy/hooks/auth/useChangePassword.js.map +1 -0
- package/dist/cjs/{hooks → legacy/hooks}/auth/useRequestNewAccessToken.js +3 -3
- package/dist/cjs/legacy/hooks/auth/useRequestNewAccessToken.js.map +1 -0
- package/dist/cjs/{hooks → legacy/hooks}/auth/useSignInWithEmailAndPassword.js +3 -3
- package/dist/cjs/legacy/hooks/auth/useSignInWithEmailAndPassword.js.map +1 -0
- package/dist/cjs/{hooks → legacy/hooks}/auth/useSignOut.js +3 -3
- package/dist/cjs/legacy/hooks/auth/useSignOut.js.map +1 -0
- package/dist/cjs/{hooks → legacy/hooks}/auth/useSignUpWithEmailAndPassword.js +3 -3
- package/dist/cjs/legacy/hooks/auth/useSignUpWithEmailAndPassword.js.map +1 -0
- package/dist/cjs/{hooks → legacy/hooks}/auth/useVerifyExternalUser.js +2 -2
- package/dist/cjs/legacy/hooks/auth/useVerifyExternalUser.js.map +1 -0
- package/dist/cjs/store/api/appNotificationsApi.d.ts +334 -0
- package/dist/cjs/store/api/appNotificationsApi.js +59 -18
- package/dist/cjs/store/api/appNotificationsApi.js.map +1 -1
- package/dist/cjs/store/index.js +26 -3
- package/dist/cjs/store/index.js.map +1 -1
- package/dist/cjs/store/slices/appNotificationsSlice.d.ts +2 -1
- package/dist/cjs/store/slices/appNotificationsSlice.js +10 -2
- package/dist/cjs/store/slices/appNotificationsSlice.js.map +1 -1
- package/dist/esm/context/index.d.ts +0 -1
- package/dist/esm/context/index.js +0 -4
- package/dist/esm/context/index.js.map +1 -1
- package/dist/esm/hooks/app-notifications-redux/index.d.ts +1 -1
- package/dist/esm/hooks/app-notifications-redux/useAppNotificationsActionsRedux.d.ts +1 -0
- package/dist/esm/hooks/app-notifications-redux/useAppNotificationsActionsRedux.js +69 -11
- package/dist/esm/hooks/app-notifications-redux/useAppNotificationsActionsRedux.js.map +1 -1
- package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.d.ts +15 -1
- package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.js +25 -9
- package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.js.map +1 -1
- package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.d.ts +1 -1
- package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.js +12 -4
- package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.js.map +1 -1
- package/dist/esm/index.d.ts +1 -2
- package/dist/esm/index.js +1 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/models/AppNotification.d.ts +1 -1
- package/dist/esm/legacy/context/app-notifications-context.js.map +1 -0
- package/dist/esm/{context → legacy/context}/auth-context.js +1 -1
- package/dist/esm/legacy/context/auth-context.js.map +1 -0
- package/dist/esm/legacy/hooks/app-notifications/index.js.map +1 -0
- package/dist/esm/legacy/hooks/app-notifications/useAppNotifications.js.map +1 -0
- package/dist/{cjs → esm/legacy}/hooks/app-notifications/useAppNotificationsData.d.ts +1 -1
- package/dist/esm/{hooks → legacy/hooks}/app-notifications/useAppNotificationsData.js +2 -2
- package/dist/esm/legacy/hooks/app-notifications/useAppNotificationsData.js.map +1 -0
- package/dist/esm/{hooks → legacy/hooks}/app-notifications/useCountUnreadNotifications.js +3 -3
- package/dist/esm/legacy/hooks/app-notifications/useCountUnreadNotifications.js.map +1 -0
- package/dist/esm/{hooks → legacy/hooks}/app-notifications/useFetchAppNotifications.d.ts +1 -1
- package/dist/esm/{hooks → legacy/hooks}/app-notifications/useFetchAppNotifications.js +3 -3
- package/dist/esm/legacy/hooks/app-notifications/useFetchAppNotifications.js.map +1 -0
- package/dist/esm/{hooks → legacy/hooks}/app-notifications/useMarkNotificationAsRead.js +3 -3
- package/dist/esm/legacy/hooks/app-notifications/useMarkNotificationAsRead.js.map +1 -0
- package/dist/esm/legacy/hooks/auth/index.js.map +1 -0
- package/dist/esm/legacy/hooks/auth/useAuth.js.map +1 -0
- package/dist/esm/{hooks → legacy/hooks}/auth/useAuthData.d.ts +1 -1
- package/dist/esm/{hooks → legacy/hooks}/auth/useAuthData.js +2 -2
- package/dist/esm/legacy/hooks/auth/useAuthData.js.map +1 -0
- package/dist/esm/{hooks → legacy/hooks}/auth/useChangePassword.js +3 -3
- package/dist/esm/legacy/hooks/auth/useChangePassword.js.map +1 -0
- package/dist/esm/{hooks → legacy/hooks}/auth/useRequestNewAccessToken.js +3 -3
- package/dist/esm/legacy/hooks/auth/useRequestNewAccessToken.js.map +1 -0
- package/dist/esm/{hooks → legacy/hooks}/auth/useSignInWithEmailAndPassword.js +3 -3
- package/dist/esm/legacy/hooks/auth/useSignInWithEmailAndPassword.js.map +1 -0
- package/dist/esm/{hooks → legacy/hooks}/auth/useSignOut.js +3 -3
- package/dist/esm/legacy/hooks/auth/useSignOut.js.map +1 -0
- package/dist/esm/{hooks → legacy/hooks}/auth/useSignUpWithEmailAndPassword.js +3 -3
- package/dist/esm/legacy/hooks/auth/useSignUpWithEmailAndPassword.js.map +1 -0
- package/dist/esm/{hooks → legacy/hooks}/auth/useVerifyExternalUser.js +2 -2
- package/dist/esm/legacy/hooks/auth/useVerifyExternalUser.js.map +1 -0
- package/dist/esm/store/api/appNotificationsApi.d.ts +334 -0
- package/dist/esm/store/api/appNotificationsApi.js +58 -17
- package/dist/esm/store/api/appNotificationsApi.js.map +1 -1
- package/dist/esm/store/index.js +26 -3
- package/dist/esm/store/index.js.map +1 -1
- package/dist/esm/store/slices/appNotificationsSlice.d.ts +2 -1
- package/dist/esm/store/slices/appNotificationsSlice.js +9 -1
- package/dist/esm/store/slices/appNotificationsSlice.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/context/app-notifications-context.js.map +0 -1
- package/dist/cjs/context/auth-context.js.map +0 -1
- package/dist/cjs/hooks/app-notifications/index.js.map +0 -1
- package/dist/cjs/hooks/app-notifications/useAppNotifications.js.map +0 -1
- package/dist/cjs/hooks/app-notifications/useAppNotificationsData.js.map +0 -1
- package/dist/cjs/hooks/app-notifications/useCountUnreadNotifications.js.map +0 -1
- package/dist/cjs/hooks/app-notifications/useFetchAppNotifications.js.map +0 -1
- package/dist/cjs/hooks/app-notifications/useMarkNotificationAsRead.js.map +0 -1
- package/dist/cjs/hooks/auth/index.js.map +0 -1
- package/dist/cjs/hooks/auth/useAuth.js.map +0 -1
- package/dist/cjs/hooks/auth/useAuthData.js.map +0 -1
- package/dist/cjs/hooks/auth/useChangePassword.js.map +0 -1
- package/dist/cjs/hooks/auth/useRequestNewAccessToken.js.map +0 -1
- package/dist/cjs/hooks/auth/useSignInWithEmailAndPassword.js.map +0 -1
- package/dist/cjs/hooks/auth/useSignOut.js.map +0 -1
- package/dist/cjs/hooks/auth/useSignUpWithEmailAndPassword.js.map +0 -1
- package/dist/cjs/hooks/auth/useVerifyExternalUser.js.map +0 -1
- package/dist/esm/context/app-notifications-context.js.map +0 -1
- package/dist/esm/context/auth-context.js.map +0 -1
- package/dist/esm/hooks/app-notifications/index.js.map +0 -1
- package/dist/esm/hooks/app-notifications/useAppNotifications.js.map +0 -1
- package/dist/esm/hooks/app-notifications/useAppNotificationsData.js.map +0 -1
- package/dist/esm/hooks/app-notifications/useCountUnreadNotifications.js.map +0 -1
- package/dist/esm/hooks/app-notifications/useFetchAppNotifications.js.map +0 -1
- package/dist/esm/hooks/app-notifications/useMarkNotificationAsRead.js.map +0 -1
- package/dist/esm/hooks/auth/index.js.map +0 -1
- package/dist/esm/hooks/auth/useAuth.js.map +0 -1
- package/dist/esm/hooks/auth/useAuthData.js.map +0 -1
- package/dist/esm/hooks/auth/useChangePassword.js.map +0 -1
- package/dist/esm/hooks/auth/useRequestNewAccessToken.js.map +0 -1
- package/dist/esm/hooks/auth/useSignInWithEmailAndPassword.js.map +0 -1
- package/dist/esm/hooks/auth/useSignOut.js.map +0 -1
- package/dist/esm/hooks/auth/useSignUpWithEmailAndPassword.js.map +0 -1
- package/dist/esm/hooks/auth/useVerifyExternalUser.js.map +0 -1
- /package/dist/cjs/{context → legacy/context}/app-notifications-context.d.ts +0 -0
- /package/dist/cjs/{context → legacy/context}/app-notifications-context.js +0 -0
- /package/dist/cjs/{context → legacy/context}/auth-context.d.ts +0 -0
- /package/dist/cjs/{hooks → legacy/hooks}/app-notifications/index.d.ts +0 -0
- /package/dist/cjs/{hooks → legacy/hooks}/app-notifications/index.js +0 -0
- /package/dist/cjs/{hooks → legacy/hooks}/app-notifications/useAppNotifications.d.ts +0 -0
- /package/dist/cjs/{hooks → legacy/hooks}/app-notifications/useAppNotifications.js +0 -0
- /package/dist/cjs/{hooks → legacy/hooks}/app-notifications/useCountUnreadNotifications.d.ts +0 -0
- /package/dist/cjs/{hooks → legacy/hooks}/app-notifications/useMarkNotificationAsRead.d.ts +0 -0
- /package/dist/cjs/{hooks → legacy/hooks}/auth/index.d.ts +0 -0
- /package/dist/cjs/{hooks → legacy/hooks}/auth/index.js +0 -0
- /package/dist/cjs/{hooks → legacy/hooks}/auth/useAuth.d.ts +0 -0
- /package/dist/cjs/{hooks → legacy/hooks}/auth/useAuth.js +0 -0
- /package/dist/cjs/{hooks → legacy/hooks}/auth/useChangePassword.d.ts +0 -0
- /package/dist/cjs/{hooks → legacy/hooks}/auth/useRequestNewAccessToken.d.ts +0 -0
- /package/dist/cjs/{hooks → legacy/hooks}/auth/useSignInWithEmailAndPassword.d.ts +0 -0
- /package/dist/cjs/{hooks → legacy/hooks}/auth/useSignOut.d.ts +0 -0
- /package/dist/cjs/{hooks → legacy/hooks}/auth/useSignUpWithEmailAndPassword.d.ts +0 -0
- /package/dist/cjs/{hooks → legacy/hooks}/auth/useVerifyExternalUser.d.ts +0 -0
- /package/dist/esm/{context → legacy/context}/app-notifications-context.d.ts +0 -0
- /package/dist/esm/{context → legacy/context}/app-notifications-context.js +0 -0
- /package/dist/esm/{context → legacy/context}/auth-context.d.ts +0 -0
- /package/dist/esm/{hooks → legacy/hooks}/app-notifications/index.d.ts +0 -0
- /package/dist/esm/{hooks → legacy/hooks}/app-notifications/index.js +0 -0
- /package/dist/esm/{hooks → legacy/hooks}/app-notifications/useAppNotifications.d.ts +0 -0
- /package/dist/esm/{hooks → legacy/hooks}/app-notifications/useAppNotifications.js +0 -0
- /package/dist/esm/{hooks → legacy/hooks}/app-notifications/useCountUnreadNotifications.d.ts +0 -0
- /package/dist/esm/{hooks → legacy/hooks}/app-notifications/useMarkNotificationAsRead.d.ts +0 -0
- /package/dist/esm/{hooks → legacy/hooks}/auth/index.d.ts +0 -0
- /package/dist/esm/{hooks → legacy/hooks}/auth/index.js +0 -0
- /package/dist/esm/{hooks → legacy/hooks}/auth/useAuth.d.ts +0 -0
- /package/dist/esm/{hooks → legacy/hooks}/auth/useAuth.js +0 -0
- /package/dist/esm/{hooks → legacy/hooks}/auth/useChangePassword.d.ts +0 -0
- /package/dist/esm/{hooks → legacy/hooks}/auth/useRequestNewAccessToken.d.ts +0 -0
- /package/dist/esm/{hooks → legacy/hooks}/auth/useSignInWithEmailAndPassword.d.ts +0 -0
- /package/dist/esm/{hooks → legacy/hooks}/auth/useSignOut.d.ts +0 -0
- /package/dist/esm/{hooks → legacy/hooks}/auth/useSignUpWithEmailAndPassword.d.ts +0 -0
- /package/dist/esm/{hooks → legacy/hooks}/auth/useVerifyExternalUser.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appNotificationsApi.js","sourceRoot":"","sources":["../../../../src/store/api/appNotificationsApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"appNotificationsApi.js","sourceRoot":"","sources":["../../../../src/store/api/appNotificationsApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAoC;AAuBpC,gDAAgD;AACnC,QAAA,mBAAmB,GAAG,iBAAO,CAAC,eAAe,CAAC;IACzD,SAAS,EAAE,UAAC,OAAO,IAAK,OAAA,CAAC;QACvB,oCAAoC;QACpC,qBAAqB,EAAE,OAAO,CAAC,KAAK,CAAwD;YAC1F,KAAK,EAAE,UAAC,EAA0B;oBAAxB,SAAS,eAAA,EAAE,IAAI,UAAA,EAAE,KAAK,WAAA;gBAAO,OAAA,CAAC;oBACtC,GAAG,EAAE,WAAI,SAAS,uBAAoB;oBACtC,MAAM,EAAE,KAAK;oBACb,MAAM,EAAE;wBACN,IAAI,MAAA;wBACJ,KAAK,OAAA;qBACN;iBACF,CAAC;YAPqC,CAOrC;YACF,YAAY,EAAE,UAAC,MAAM,EAAE,KAAK,EAAE,EAAa;;oBAAX,SAAS,eAAA;gBAAO;oBAC9C,EAAE,IAAI,EAAE,iBAA0B,EAAE,EAAE,EAAE,UAAG,SAAS,UAAO,EAAE;mBAC1D,CAAC,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,GAAG,CAAC,UAAC,EAAM;wBAAJ,EAAE,QAAA;oBAAO,OAAA,CAAC,EAAE,IAAI,EAAE,iBAA0B,EAAE,EAAE,IAAA,EAAE,CAAC;gBAA1C,CAA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 @@ exports.store = (0, toolkit_1.configureStore)({
|
|
|
26
26
|
return getDefaultMiddleware({
|
|
27
27
|
serializableCheck: {
|
|
28
28
|
// Ignore these action types for serializable check
|
|
29
|
-
ignoredActions: [
|
|
29
|
+
ignoredActions: [
|
|
30
|
+
'persist/PERSIST',
|
|
31
|
+
'persist/REHYDRATE',
|
|
32
|
+
// RTK Query actions that might contain functions
|
|
33
|
+
'appNotificationsApi/executeQuery/pending',
|
|
34
|
+
'appNotificationsApi/executeQuery/fulfilled',
|
|
35
|
+
'appNotificationsApi/executeQuery/rejected',
|
|
36
|
+
'appNotificationsApi/executeMutation/pending',
|
|
37
|
+
'appNotificationsApi/executeMutation/fulfilled',
|
|
38
|
+
'appNotificationsApi/executeMutation/rejected',
|
|
39
|
+
],
|
|
30
40
|
// Ignore these field paths in all actions
|
|
31
|
-
ignoredActionsPaths: [
|
|
41
|
+
ignoredActionsPaths: [
|
|
42
|
+
'meta.arg',
|
|
43
|
+
'payload.timestamp',
|
|
44
|
+
// RTK Query meta fields that may contain functions
|
|
45
|
+
'meta.baseQueryMeta',
|
|
46
|
+
'meta.arg.originalArgs',
|
|
47
|
+
'meta.arg.endpointName',
|
|
48
|
+
'payload.meta',
|
|
49
|
+
],
|
|
32
50
|
// Ignore these paths in the state
|
|
33
|
-
ignoredPaths: [
|
|
51
|
+
ignoredPaths: [
|
|
52
|
+
'items.dates',
|
|
53
|
+
// RTK Query state paths that may contain functions/metadata
|
|
54
|
+
'api',
|
|
55
|
+
'appNotificationsApi',
|
|
56
|
+
],
|
|
34
57
|
},
|
|
35
58
|
})
|
|
36
59
|
// Add RTK Query middleware
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/store/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,4CAAkD;AAClD,6CAA4C;AAC5C,2CAAgD;AAChD,yCAAwC;AAExC,4BAA4B;AACf,QAAA,KAAK,GAAG,IAAA,wBAAc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
|
@@ -22,13 +22,14 @@ export declare const appNotificationsSlice: import("@reduxjs/toolkit").Slice<App
|
|
|
22
22
|
isFirstPage?: boolean;
|
|
23
23
|
}>) => void;
|
|
24
24
|
markAsReadLocally: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>, action: PayloadAction<string>) => void;
|
|
25
|
+
markAllAsReadLocally: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>) => void;
|
|
25
26
|
setUnreadCount: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>, action: PayloadAction<number>) => void;
|
|
26
27
|
handleError: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>) => void;
|
|
27
28
|
}, "appNotifications", "appNotifications", import("@reduxjs/toolkit").SliceSelectors<AppNotificationsState>>;
|
|
28
29
|
export declare const setProjectContext: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "appNotifications/setProjectContext">, setLimit: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "appNotifications/setLimit">, setNotificationTemplates: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<NotificationTemplates>, "appNotifications/setNotificationTemplates">, resetNotifications: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"appNotifications/resetNotifications">, loadMore: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"appNotifications/loadMore">, setLoading: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "appNotifications/setLoading">, addNotifications: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
29
30
|
notifications: UnifiedAppNotification[];
|
|
30
31
|
isFirstPage?: boolean;
|
|
31
|
-
}, "appNotifications/addNotifications">, markAsReadLocally: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "appNotifications/markAsReadLocally">, setUnreadCount: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "appNotifications/setUnreadCount">, handleError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"appNotifications/handleError">;
|
|
32
|
+
}, "appNotifications/addNotifications">, markAsReadLocally: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "appNotifications/markAsReadLocally">, markAllAsReadLocally: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"appNotifications/markAllAsReadLocally">, setUnreadCount: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "appNotifications/setUnreadCount">, handleError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"appNotifications/handleError">;
|
|
32
33
|
declare const _default: import("@reduxjs/toolkit").Reducer<AppNotificationsState>;
|
|
33
34
|
export default _default;
|
|
34
35
|
export declare const selectAppNotifications: (state: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.selectCurrentProjectId = exports.selectNotificationTemplates = exports.selectAppNotificationsLimit = exports.selectAppNotificationsPage = exports.selectAppNotificationsHasMore = exports.selectAppNotificationsLoading = exports.selectUnreadCount = exports.selectAppNotifications = exports.handleError = exports.setUnreadCount = exports.markAsReadLocally = exports.addNotifications = exports.setLoading = exports.loadMore = exports.resetNotifications = exports.setNotificationTemplates = exports.setLimit = exports.setProjectContext = exports.appNotificationsSlice = void 0;
|
|
4
|
+
exports.selectCurrentProjectId = exports.selectNotificationTemplates = exports.selectAppNotificationsLimit = exports.selectAppNotificationsPage = exports.selectAppNotificationsHasMore = exports.selectAppNotificationsLoading = exports.selectUnreadCount = exports.selectAppNotifications = exports.handleError = exports.setUnreadCount = exports.markAllAsReadLocally = exports.markAsReadLocally = exports.addNotifications = exports.setLoading = exports.loadMore = exports.resetNotifications = exports.setNotificationTemplates = exports.setLimit = exports.setProjectContext = exports.appNotificationsSlice = void 0;
|
|
5
5
|
var toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
// Initial state
|
|
7
7
|
var initialState = {
|
|
@@ -77,6 +77,14 @@ exports.appNotificationsSlice = (0, toolkit_1.createSlice)({
|
|
|
77
77
|
state.unreadCount = Math.max(state.unreadCount - 1, 0);
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
|
+
// Mark all notifications as read locally (optimistic update)
|
|
81
|
+
markAllAsReadLocally: function (state) {
|
|
82
|
+
state.notifications.forEach(function (notification) {
|
|
83
|
+
notification.isRead = true;
|
|
84
|
+
});
|
|
85
|
+
// Set unread count to 0
|
|
86
|
+
state.unreadCount = 0;
|
|
87
|
+
},
|
|
80
88
|
// Set unread count
|
|
81
89
|
setUnreadCount: function (state, action) {
|
|
82
90
|
state.unreadCount = action.payload;
|
|
@@ -88,7 +96,7 @@ exports.appNotificationsSlice = (0, toolkit_1.createSlice)({
|
|
|
88
96
|
},
|
|
89
97
|
});
|
|
90
98
|
// Export actions
|
|
91
|
-
exports.setProjectContext = (_a = exports.appNotificationsSlice.actions, _a.setProjectContext), exports.setLimit = _a.setLimit, exports.setNotificationTemplates = _a.setNotificationTemplates, exports.resetNotifications = _a.resetNotifications, exports.loadMore = _a.loadMore, exports.setLoading = _a.setLoading, exports.addNotifications = _a.addNotifications, exports.markAsReadLocally = _a.markAsReadLocally, exports.setUnreadCount = _a.setUnreadCount, exports.handleError = _a.handleError;
|
|
99
|
+
exports.setProjectContext = (_a = exports.appNotificationsSlice.actions, _a.setProjectContext), exports.setLimit = _a.setLimit, exports.setNotificationTemplates = _a.setNotificationTemplates, exports.resetNotifications = _a.resetNotifications, exports.loadMore = _a.loadMore, exports.setLoading = _a.setLoading, exports.addNotifications = _a.addNotifications, exports.markAsReadLocally = _a.markAsReadLocally, exports.markAllAsReadLocally = _a.markAllAsReadLocally, exports.setUnreadCount = _a.setUnreadCount, exports.handleError = _a.handleError;
|
|
92
100
|
// Export reducer
|
|
93
101
|
exports.default = exports.appNotificationsSlice.reducer;
|
|
94
102
|
// Selectors
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appNotificationsSlice.js","sourceRoot":"","sources":["../../../../src/store/slices/appNotificationsSlice.ts"],"names":[],"mappings":";;;;AAAA,4CAA8D;AA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AC;gBACzC,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC;gBAC3B,wBAAwB;gBACxB,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;YACzD,CAAC;QACH,CAAC;QAED,mBAAmB;QACnB,cAAc,EAAE,UAAC,KAAK,EAAE,MAA6B;YACnD,KAAK,CAAC,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC;QACrC,CAAC;QAED,oCAAoC;QACpC,WAAW,EAAE,UAAC,KAAK;YACjB,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;QACxB,CAAC;KACF;CACF,CAAC,CAAC;AAEH,iBAAiB;AAEf,QAAA,iBAAiB,IADN,
|
|
1
|
+
{"version":3,"file":"appNotificationsSlice.js","sourceRoot":"","sources":["../../../../src/store/slices/appNotificationsSlice.ts"],"names":[],"mappings":";;;;AAAA,4CAA8D;AAwB9D,gBAAgB;AAChB,IAAM,YAAY,GAA0B;IAC1C,aAAa,EAAE,EAAE;IACjB,WAAW,EAAE,CAAC;IACd,OAAO,EAAE,KAAK;IACd,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,EAAE;IACT,qBAAqB,EAAE,SAAS;IAChC,gBAAgB,EAAE,SAAS;CAC5B,CAAC;AAEF,mBAAmB;AACN,QAAA,qBAAqB,GAAG,IAAA,qBAAW,EAAC;IAC/C,IAAI,EAAE,kBAAkB;IACxB,YAAY,cAAA;IACZ,QAAQ,EAAE;QACR,kCAAkC;QAClC,iBAAiB,EAAE,UAAC,KAAK,EAAE,MAA6B;YACtD,KAAK,CAAC,gBAAgB,GAAG,MAAM,CAAC,OAAO,CAAC;QAC1C,CAAC;QAED,uBAAuB;QACvB,QAAQ,EAAE,UAAC,KAAK,EAAE,MAA6B;YAC7C,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC;QAC/B,CAAC;QAED,6BAA6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A,KAAK,CAAC,gBAAgB,CAAC,qBAAqB;AAA5C,CAA4C,CAAC;AADlC,QAAA,2BAA2B,+BACO;AAExC,IAAM,sBAAsB,GAAG,UAAC,KAAkD;IACvF,OAAA,KAAK,CAAC,gBAAgB,CAAC,gBAAgB;AAAvC,CAAuC,CAAC;AAD7B,QAAA,sBAAsB,0BACO"}
|
|
@@ -3,5 +3,4 @@ export { ReplykeStoreProvider } from "./replyke-store-context";
|
|
|
3
3
|
export { EntityListProvider } from "./entity-list-context";
|
|
4
4
|
export { EntityProvider } from "./entity-context";
|
|
5
5
|
export { ListsProvider } from "./lists-context";
|
|
6
|
-
export { AppNotificationsProvider } from "./app-notifications-context";
|
|
7
6
|
export { CommentSectionProvider } from "./comment-section-context";
|
|
@@ -3,9 +3,5 @@ export { ReplykeStoreProvider } from "./replyke-store-context";
|
|
|
3
3
|
export { EntityListProvider } from "./entity-list-context";
|
|
4
4
|
export { EntityProvider } from "./entity-context";
|
|
5
5
|
export { ListsProvider } from "./lists-context";
|
|
6
|
-
export { AppNotificationsProvider } from "./app-notifications-context";
|
|
7
6
|
export { CommentSectionProvider } from "./comment-section-context";
|
|
8
|
-
// Legacy Context providers (kept in codebase for reference, not recommended for use)
|
|
9
|
-
// AuthProvider is now handled by Redux inside ReplykeProvider
|
|
10
|
-
// export { AuthProvider } from "./auth-context";
|
|
11
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as useAppNotificationsRedux } from "./useAppNotificationsRedux";
|
|
2
2
|
export { default as useAppNotificationsDataRedux } from "./useAppNotificationsDataRedux";
|
|
3
3
|
export { default as useAppNotificationsActionsRedux } from "./useAppNotificationsActionsRedux";
|
|
4
|
-
export type { UseAppNotificationsDataProps, UseAppNotificationsDataValues, } from "
|
|
4
|
+
export type { UseAppNotificationsDataProps, UseAppNotificationsDataValues, } from "./useAppNotificationsDataRedux";
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
export declare function useAppNotificationsActionsRedux(): {
|
|
6
6
|
loadMore: () => void;
|
|
7
7
|
markNotificationAsRead: (notificationId: string) => Promise<void>;
|
|
8
|
+
markAllNotificationsAsRead: () => Promise<void>;
|
|
8
9
|
resetAppNotifications: () => Promise<void>;
|
|
9
10
|
fetchMoreNotifications: (pageToFetch: number) => Promise<void>;
|
|
10
11
|
updateUnreadCount: () => Promise<void>;
|
|
@@ -36,8 +36,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
};
|
|
37
37
|
import { useCallback } from "react";
|
|
38
38
|
import { useDispatch, useSelector } from "react-redux";
|
|
39
|
-
import { loadMore as loadMoreAction, resetNotifications, setLoading, addNotifications, markAsReadLocally, setUnreadCount, selectCurrentProjectId, selectAppNotificationsPage, selectAppNotificationsLimit, selectNotificationTemplates, } from "../../store/slices/appNotificationsSlice";
|
|
40
|
-
import { useLazyFetchAppNotificationsQuery, useMarkNotificationAsReadMutation, useLazyCountUnreadNotificationsQuery, } from "../../store/api/appNotificationsApi";
|
|
39
|
+
import { loadMore as loadMoreAction, resetNotifications, setLoading, addNotifications, markAsReadLocally, markAllAsReadLocally, setUnreadCount, selectCurrentProjectId, selectAppNotificationsPage, selectAppNotificationsLimit, selectNotificationTemplates, } from "../../store/slices/appNotificationsSlice";
|
|
40
|
+
import { useLazyFetchAppNotificationsQuery, useMarkNotificationAsReadMutation, useMarkAllNotificationsAsReadMutation, useLazyCountUnreadNotificationsQuery, } from "../../store/api/appNotificationsApi";
|
|
41
41
|
import { handleError } from "../../utils/handleError";
|
|
42
42
|
import addNotificationsMessages from "../../helpers/addNotificationsMessages";
|
|
43
43
|
import useProject from "../projects/useProject";
|
|
@@ -50,10 +50,18 @@ export function useAppNotificationsActionsRedux() {
|
|
|
50
50
|
var _this = this;
|
|
51
51
|
var dispatch = useDispatch();
|
|
52
52
|
// Get current state for actions
|
|
53
|
-
var projectIdFromSlice = useSelector(function (state) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
var
|
|
53
|
+
var projectIdFromSlice = useSelector(function (state) {
|
|
54
|
+
return selectCurrentProjectId(state);
|
|
55
|
+
});
|
|
56
|
+
var page = useSelector(function (state) {
|
|
57
|
+
return selectAppNotificationsPage(state);
|
|
58
|
+
});
|
|
59
|
+
var limit = useSelector(function (state) {
|
|
60
|
+
return selectAppNotificationsLimit(state);
|
|
61
|
+
});
|
|
62
|
+
var notificationTemplates = useSelector(function (state) {
|
|
63
|
+
return selectNotificationTemplates(state);
|
|
64
|
+
});
|
|
57
65
|
// Get project and user context (fallback to current hooks)
|
|
58
66
|
var projectIdFromHook = useProject().projectId;
|
|
59
67
|
var user = useUserRedux().user;
|
|
@@ -62,6 +70,7 @@ export function useAppNotificationsActionsRedux() {
|
|
|
62
70
|
// RTK Query hooks
|
|
63
71
|
var triggerFetchNotifications = useLazyFetchAppNotificationsQuery()[0];
|
|
64
72
|
var markNotificationAsReadMutation = useMarkNotificationAsReadMutation()[0];
|
|
73
|
+
var markAllNotificationsAsReadMutation = useMarkAllNotificationsAsReadMutation()[0];
|
|
65
74
|
var triggerCountUnread = useLazyCountUnreadNotificationsQuery()[0];
|
|
66
75
|
// Load more action
|
|
67
76
|
var loadMore = useCallback(function () {
|
|
@@ -82,7 +91,10 @@ export function useAppNotificationsActionsRedux() {
|
|
|
82
91
|
// Optimistic update
|
|
83
92
|
dispatch(markAsReadLocally(notificationId));
|
|
84
93
|
// Make API call
|
|
85
|
-
return [4 /*yield*/, markNotificationAsReadMutation({
|
|
94
|
+
return [4 /*yield*/, markNotificationAsReadMutation({
|
|
95
|
+
projectId: projectId,
|
|
96
|
+
notificationId: notificationId,
|
|
97
|
+
}).unwrap()];
|
|
86
98
|
case 2:
|
|
87
99
|
// Make API call
|
|
88
100
|
_a.sent();
|
|
@@ -118,7 +130,10 @@ export function useAppNotificationsActionsRedux() {
|
|
|
118
130
|
result = _a.sent();
|
|
119
131
|
if (result) {
|
|
120
132
|
completeNotifications = addNotificationsMessages(result, notificationTemplates);
|
|
121
|
-
dispatch(addNotifications({
|
|
133
|
+
dispatch(addNotifications({
|
|
134
|
+
notifications: completeNotifications,
|
|
135
|
+
isFirstPage: true,
|
|
136
|
+
}));
|
|
122
137
|
}
|
|
123
138
|
return [3 /*break*/, 4];
|
|
124
139
|
case 3:
|
|
@@ -128,7 +143,14 @@ export function useAppNotificationsActionsRedux() {
|
|
|
128
143
|
case 4: return [2 /*return*/];
|
|
129
144
|
}
|
|
130
145
|
});
|
|
131
|
-
}); }, [
|
|
146
|
+
}); }, [
|
|
147
|
+
dispatch,
|
|
148
|
+
projectId,
|
|
149
|
+
user,
|
|
150
|
+
triggerFetchNotifications,
|
|
151
|
+
limit,
|
|
152
|
+
notificationTemplates,
|
|
153
|
+
]);
|
|
132
154
|
// Fetch more notifications (internal action triggered by page changes)
|
|
133
155
|
var fetchMoreNotifications = useCallback(function (pageToFetch) { return __awaiter(_this, void 0, void 0, function () {
|
|
134
156
|
var result, completeNotifications, error_3;
|
|
@@ -163,7 +185,14 @@ export function useAppNotificationsActionsRedux() {
|
|
|
163
185
|
case 5: return [2 /*return*/];
|
|
164
186
|
}
|
|
165
187
|
});
|
|
166
|
-
}); }, [
|
|
188
|
+
}); }, [
|
|
189
|
+
dispatch,
|
|
190
|
+
projectId,
|
|
191
|
+
user,
|
|
192
|
+
triggerFetchNotifications,
|
|
193
|
+
limit,
|
|
194
|
+
notificationTemplates,
|
|
195
|
+
]);
|
|
167
196
|
// Update unread count
|
|
168
197
|
var updateUnreadCount = useCallback(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
169
198
|
var count, error_4;
|
|
@@ -178,7 +207,7 @@ export function useAppNotificationsActionsRedux() {
|
|
|
178
207
|
return [4 /*yield*/, triggerCountUnread({ projectId: projectId }).unwrap()];
|
|
179
208
|
case 2:
|
|
180
209
|
count = _a.sent();
|
|
181
|
-
if (typeof count ===
|
|
210
|
+
if (typeof count === "number") {
|
|
182
211
|
dispatch(setUnreadCount(count));
|
|
183
212
|
}
|
|
184
213
|
return [3 /*break*/, 4];
|
|
@@ -190,9 +219,38 @@ export function useAppNotificationsActionsRedux() {
|
|
|
190
219
|
}
|
|
191
220
|
});
|
|
192
221
|
}); }, [dispatch, projectId, user, triggerCountUnread]);
|
|
222
|
+
// Mark all notifications as read action
|
|
223
|
+
var markAllNotificationsAsRead = useCallback(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
224
|
+
var error_5;
|
|
225
|
+
return __generator(this, function (_a) {
|
|
226
|
+
switch (_a.label) {
|
|
227
|
+
case 0:
|
|
228
|
+
if (!projectId || !user) {
|
|
229
|
+
throw new Error("No project ID or authenticated user available");
|
|
230
|
+
}
|
|
231
|
+
_a.label = 1;
|
|
232
|
+
case 1:
|
|
233
|
+
_a.trys.push([1, 3, , 4]);
|
|
234
|
+
// Optimistic update
|
|
235
|
+
dispatch(markAllAsReadLocally());
|
|
236
|
+
// Make API call
|
|
237
|
+
return [4 /*yield*/, markAllNotificationsAsReadMutation({ projectId: projectId }).unwrap()];
|
|
238
|
+
case 2:
|
|
239
|
+
// Make API call
|
|
240
|
+
_a.sent();
|
|
241
|
+
return [3 /*break*/, 4];
|
|
242
|
+
case 3:
|
|
243
|
+
error_5 = _a.sent();
|
|
244
|
+
handleError(error_5, "Failed to mark all notifications as read:");
|
|
245
|
+
throw error_5;
|
|
246
|
+
case 4: return [2 /*return*/];
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
}); }, [dispatch, projectId, user, markAllNotificationsAsReadMutation]);
|
|
193
250
|
return {
|
|
194
251
|
loadMore: loadMore,
|
|
195
252
|
markNotificationAsRead: markNotificationAsRead,
|
|
253
|
+
markAllNotificationsAsRead: markAllNotificationsAsRead,
|
|
196
254
|
resetAppNotifications: resetAppNotifications,
|
|
197
255
|
fetchMoreNotifications: fetchMoreNotifications, // Internal action
|
|
198
256
|
updateUnreadCount: updateUnreadCount,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAppNotificationsActionsRedux.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications-redux/useAppNotificationsActionsRedux.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EACL,QAAQ,IAAI,cAAc,EAC1B,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,iCAAiC,EACjC,iCAAiC,EACjC,oCAAoC,GACrC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,wBAAwB,MAAM,wCAAwC,CAAC;AAC9E,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C;;;GAGG;AACH,MAAM,UAAU,+BAA+B;IAA/C,
|
|
1
|
+
{"version":3,"file":"useAppNotificationsActionsRedux.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications-redux/useAppNotificationsActionsRedux.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EACL,QAAQ,IAAI,cAAc,EAC1B,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,iCAAiC,EACjC,iCAAiC,EACjC,qCAAqC,EACrC,oCAAoC,GACrC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,wBAAwB,MAAM,wCAAwC,CAAC;AAC9E,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C;;;GAGG;AACH,MAAM,UAAU,+BAA+B;IAA/C,iBAqLC;IApLC,IAAM,QAAQ,GAAG,WAAW,EAAe,CAAC;IAE5C,gCAAgC;IAChC,IAAM,kBAAkB,GAAG,WAAW,CAAC,UAAC,KAAgB;QACtD,OAAA,sBAAsB,CAAC,KAAK,CAAC;IAA7B,CAA6B,CAC9B,CAAC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AI,CAAC,SAAS,IAAI,CAAC,IAAI,EAAE,CAAC;wBACxB,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;oBACnE,CAAC;;;;oBAGC,oBAAoB;oBACpB,QAAQ,CAAC,oBAAoB,EAAE,CAAC,CAAC;oBAEjC,gBAAgB;oBAChB,qBAAM,kCAAkC,CAAC,EAAE,SAAS,WAAA,EAAE,CAAC,CAAC,MAAM,EAAE,EAAA;;oBADhE,gBAAgB;oBAChB,SAAgE,CAAC;;;;oBAEjE,WAAW,CAAC,OAAK,EAAE,2CAA2C,CAAC,CAAC;oBAChE,MAAM,OAAK,CAAC;;;;SAEf,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,kCAAkC,CAAC,CAAC,CAAC;IAEpE,OAAO;QACL,QAAQ,UAAA;QACR,sBAAsB,wBAAA;QACtB,0BAA0B,4BAAA;QAC1B,qBAAqB,uBAAA;QACrB,sBAAsB,wBAAA,EAAE,kBAAkB;QAC1C,iBAAiB,mBAAA;KAClB,CAAC;AACJ,CAAC;AAED,eAAe,+BAA+B,CAAC"}
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { NotificationTemplates, UnifiedAppNotification } from "../../interfaces/models/AppNotification";
|
|
2
|
+
export interface UseAppNotificationsDataProps {
|
|
3
|
+
limit?: number;
|
|
4
|
+
notificationTemplates?: Partial<NotificationTemplates>;
|
|
5
|
+
}
|
|
6
|
+
export interface UseAppNotificationsDataValues {
|
|
7
|
+
appNotifications: UnifiedAppNotification[];
|
|
8
|
+
unreadAppNotificationsCount: number;
|
|
9
|
+
loading: boolean;
|
|
10
|
+
hasMore: boolean;
|
|
11
|
+
loadMore: () => void;
|
|
12
|
+
markNotificationAsRead: (notificationId: string) => Promise<void>;
|
|
13
|
+
markAllNotificationsAsRead: () => Promise<void>;
|
|
14
|
+
resetAppNotifications: () => Promise<void>;
|
|
15
|
+
}
|
|
2
16
|
/**
|
|
3
17
|
* Redux-powered hook that provides the exact same interface as useAppNotificationsData()
|
|
4
18
|
* This is a drop-in replacement for the Context-based hook
|
|
@@ -15,14 +15,26 @@ function useAppNotificationsDataRedux(_a) {
|
|
|
15
15
|
var projectId = useProject().projectId;
|
|
16
16
|
var user = useUserRedux().user;
|
|
17
17
|
// Get Redux state
|
|
18
|
-
var appNotifications = useSelector(function (state) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
var appNotifications = useSelector(function (state) {
|
|
19
|
+
return selectAppNotifications(state);
|
|
20
|
+
});
|
|
21
|
+
var unreadAppNotificationsCount = useSelector(function (state) {
|
|
22
|
+
return selectUnreadCount(state);
|
|
23
|
+
});
|
|
24
|
+
var loading = useSelector(function (state) {
|
|
25
|
+
return selectAppNotificationsLoading(state);
|
|
26
|
+
});
|
|
27
|
+
var hasMore = useSelector(function (state) {
|
|
28
|
+
return selectAppNotificationsHasMore(state);
|
|
29
|
+
});
|
|
30
|
+
var currentPage = useSelector(function (state) {
|
|
31
|
+
return selectAppNotificationsPage(state);
|
|
32
|
+
});
|
|
33
|
+
var currentProjectId = useSelector(function (state) {
|
|
34
|
+
return selectCurrentProjectId(state);
|
|
35
|
+
});
|
|
24
36
|
// Get actions
|
|
25
|
-
var _d = useAppNotificationsActionsRedux(), loadMore = _d.loadMore, markNotificationAsRead = _d.markNotificationAsRead, resetAppNotifications = _d.resetAppNotifications, fetchMoreNotifications = _d.fetchMoreNotifications, updateUnreadCount = _d.updateUnreadCount;
|
|
37
|
+
var _d = useAppNotificationsActionsRedux(), loadMore = _d.loadMore, markNotificationAsRead = _d.markNotificationAsRead, markAllNotificationsAsRead = _d.markAllNotificationsAsRead, resetAppNotifications = _d.resetAppNotifications, fetchMoreNotifications = _d.fetchMoreNotifications, updateUnreadCount = _d.updateUnreadCount;
|
|
26
38
|
// Update Redux state when props change
|
|
27
39
|
useEffect(function () {
|
|
28
40
|
if (projectId && projectId !== currentProjectId) {
|
|
@@ -33,13 +45,15 @@ function useAppNotificationsDataRedux(_a) {
|
|
|
33
45
|
dispatch(setLimit(limit));
|
|
34
46
|
}, [dispatch, limit]);
|
|
35
47
|
// Prevent infinite re-renders by comparing current vs new templates
|
|
36
|
-
var currentTemplates = useSelector(function (state) {
|
|
48
|
+
var currentTemplates = useSelector(function (state) {
|
|
49
|
+
return selectNotificationTemplates(state);
|
|
50
|
+
});
|
|
37
51
|
var templatesChanged = useMemo(function () {
|
|
38
52
|
// If no templates provided, skip comparison
|
|
39
53
|
if (!notificationTemplates)
|
|
40
54
|
return false;
|
|
41
55
|
// Deep comparison using JSON stringify
|
|
42
|
-
return JSON.stringify(currentTemplates) !== JSON.stringify(notificationTemplates);
|
|
56
|
+
return (JSON.stringify(currentTemplates) !== JSON.stringify(notificationTemplates));
|
|
43
57
|
}, [currentTemplates, notificationTemplates]);
|
|
44
58
|
useEffect(function () {
|
|
45
59
|
if (notificationTemplates && templatesChanged) {
|
|
@@ -72,6 +86,7 @@ function useAppNotificationsDataRedux(_a) {
|
|
|
72
86
|
hasMore: hasMore,
|
|
73
87
|
loadMore: loadMore,
|
|
74
88
|
markNotificationAsRead: markNotificationAsRead,
|
|
89
|
+
markAllNotificationsAsRead: markAllNotificationsAsRead,
|
|
75
90
|
resetAppNotifications: resetAppNotifications,
|
|
76
91
|
}); }, [
|
|
77
92
|
appNotifications,
|
|
@@ -80,6 +95,7 @@ function useAppNotificationsDataRedux(_a) {
|
|
|
80
95
|
hasMore,
|
|
81
96
|
loadMore,
|
|
82
97
|
markNotificationAsRead,
|
|
98
|
+
markAllNotificationsAsRead,
|
|
83
99
|
resetAppNotifications,
|
|
84
100
|
]);
|
|
85
101
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAppNotificationsDataRedux.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications-redux/useAppNotificationsDataRedux.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGvD,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,wBAAwB,EACxB,sBAAsB,EACtB,iBAAiB,EACjB,6BAA6B,EAC7B,6BAA6B,EAC7B,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"useAppNotificationsDataRedux.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications-redux/useAppNotificationsDataRedux.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGvD,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,wBAAwB,EACxB,sBAAsB,EACtB,iBAAiB,EACjB,6BAA6B,EAC7B,6BAA6B,EAC7B,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAmB7C;;;GAGG;AACH,SAAS,4BAA4B,CAAC,EAGF;QAHE,qBAGJ,EAAE,KAAA,EAFlC,aAAU,EAAV,KAAK,mBAAG,EAAE,KAAA,EACV,qBAAqB,2BAAA;IAErB,IAAM,QAAQ,GAAG,WAAW,EAAe,CAAC;IAE5C,uBAAuB;IACf,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAC3B,IAAA,I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IACH,CAAC,EAAE,CAAC,WAAW,EAAE,sBAAsB,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;IAE3D,iDAAiD;IACjD,OAAO,OAAO,CACZ,cAAM,OAAA,CAAC;QACL,gBAAgB,kBAAA;QAChB,2BAA2B,6BAAA;QAC3B,OAAO,SAAA;QACP,OAAO,SAAA;QACP,QAAQ,UAAA;QACR,sBAAsB,wBAAA;QACtB,0BAA0B,4BAAA;QAC1B,qBAAqB,uBAAA;KACtB,CAAC,EATI,CASJ,EACF;QACE,gBAAgB;QAChB,2BAA2B;QAC3B,OAAO;QACP,OAAO;QACP,QAAQ;QACR,sBAAsB;QACtB,0BAA0B;QAC1B,qBAAqB;KACtB,CACF,CAAC;AACJ,CAAC;AAED,eAAe,4BAA4B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UseAppNotificationsDataValues } from "
|
|
1
|
+
import type { UseAppNotificationsDataValues } from "./useAppNotificationsDataRedux";
|
|
2
2
|
/**
|
|
3
3
|
* Redux-powered hook that provides the same interface as useAppNotifications()
|
|
4
4
|
* Returns the current app notifications state and actions
|
|
@@ -7,10 +7,18 @@ import { useAppNotificationsActionsRedux } from "./useAppNotificationsActionsRed
|
|
|
7
7
|
*/
|
|
8
8
|
export function useAppNotificationsRedux() {
|
|
9
9
|
// Select data from Redux store
|
|
10
|
-
var appNotifications = useSelector(function (state) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var
|
|
10
|
+
var appNotifications = useSelector(function (state) {
|
|
11
|
+
return selectAppNotifications(state);
|
|
12
|
+
});
|
|
13
|
+
var unreadAppNotificationsCount = useSelector(function (state) {
|
|
14
|
+
return selectUnreadCount(state);
|
|
15
|
+
});
|
|
16
|
+
var loading = useSelector(function (state) {
|
|
17
|
+
return selectAppNotificationsLoading(state);
|
|
18
|
+
});
|
|
19
|
+
var hasMore = useSelector(function (state) {
|
|
20
|
+
return selectAppNotificationsHasMore(state);
|
|
21
|
+
});
|
|
14
22
|
// Get actions
|
|
15
23
|
var _a = useAppNotificationsActionsRedux(), loadMore = _a.loadMore, markNotificationAsRead = _a.markNotificationAsRead, resetAppNotifications = _a.resetAppNotifications;
|
|
16
24
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAppNotificationsRedux.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications-redux/useAppNotificationsRedux.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,6BAA6B,EAC7B,6BAA6B,GAC9B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AAEpF;;;GAGG;AACH,MAAM,UAAU,wBAAwB;IACtC,+BAA+B;IAC/B,IAAM,gBAAgB,GAAG,WAAW,CAAC,UAAC,KAAgB,
|
|
1
|
+
{"version":3,"file":"useAppNotificationsRedux.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications-redux/useAppNotificationsRedux.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,6BAA6B,EAC7B,6BAA6B,GAC9B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AAEpF;;;GAGG;AACH,MAAM,UAAU,wBAAwB;IACtC,+BAA+B;IAC/B,IAAM,gBAAgB,GAAG,WAAW,CAAC,UAAC,KAAgB;QACpD,OAAA,sBAAsB,CAAC,KAAK,CAAC;IAA7B,CAA6B,CAC9B,CAAC;IACF,IAAM,2BAA2B,GAAG,WAAW,CAAC,UAAC,KAAgB;QAC/D,OAAA,iBAAiB,CAAC,KAAK,CAAC;IAAxB,CAAwB,CACzB,CAAC;IACF,IAAM,OAAO,GAAG,WAAW,CAAC,UAAC,KAAgB;QAC3C,OAAA,6BAA6B,CAAC,KAAK,CAAC;IAApC,CAAoC,CACrC,CAAC;IACF,IAAM,OAAO,GAAG,WAAW,CAAC,UAAC,KAAgB;QAC3C,OAAA,6BAA6B,CAAC,KAAK,CAAC;IAApC,CAAoC,CACrC,CAAC;IAEF,cAAc;IACR,IAAA,KACJ,+BAA+B,EAAE,EAD3B,QAAQ,cAAA,EAAE,sBAAsB,4BAAA,EAAE,qBAAqB,2BAC5B,CAAC;IAEpC,OAAO;QACL,gBAAgB,kBAAA;QAChB,2BAA2B,6BAAA;QAC3B,OAAO,SAAA;QACP,OAAO,SAAA;QACP,QAAQ,UAAA;QACR,sBAAsB,wBAAA;QACtB,qBAAqB,uBAAA;KACtB,CAAC;AACJ,CAAC;AAED,eAAe,wBAAwB,CAAC"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -6,11 +6,10 @@ export { reportReasons } from "./constants/reportReasons";
|
|
|
6
6
|
export type { ReportReasonKey } from "./constants/reportReasons";
|
|
7
7
|
export { ReplykeProvider, // Always includes Redux auth and notification management
|
|
8
8
|
ReplykeStoreProvider, // Advanced: standalone Redux provider
|
|
9
|
-
EntityListProvider, EntityProvider, ListsProvider,
|
|
9
|
+
EntityListProvider, EntityProvider, ListsProvider, CommentSectionProvider, } from "./context";
|
|
10
10
|
export { useProject, useProjectData } from "./hooks/projects";
|
|
11
11
|
export { useSignTestingJwt } from "./hooks/crypto";
|
|
12
12
|
export { useAuthRedux, useUserRedux, type UseAuthReduxValues, type UseUserReduxValues, } from "./hooks/auth-redux";
|
|
13
|
-
export { useAppNotifications, useAppNotificationsData, useCountUnreadNotifications, useFetchAppNotifications, useMarkNotificationAsRead, } from "./hooks/app-notifications";
|
|
14
13
|
export { useAppNotificationsRedux, useAppNotificationsDataRedux, type UseAppNotificationsDataProps, type UseAppNotificationsDataValues, } from "./hooks/app-notifications-redux";
|
|
15
14
|
export { useEntity, useEntityData, useCreateEntity, useFetchEntity, useFetchEntityByForeignId, useFetchEntityByShortId, useUpdateEntity, useEntityVotes, useDeleteEntity, useEntityList, useEntityListData, useInfusedData, } from "./hooks/entities";
|
|
16
15
|
export { useCommentSection, useCommentSectionData, useCreateComment, useFetchManyComments, useFetchComment, useFetchCommentByForeignId, useReplies, useUpdateComment, useCommentVotes, useDeleteComment, useEntityComments, useProfileComments, } from "./hooks/comments";
|
package/dist/esm/index.js
CHANGED
|
@@ -8,15 +8,13 @@ export { reportReasons } from "./constants/reportReasons";
|
|
|
8
8
|
// Context providers (Redux-powered by default)
|
|
9
9
|
export { ReplykeProvider, // Always includes Redux auth and notification management
|
|
10
10
|
ReplykeStoreProvider, // Advanced: standalone Redux provider
|
|
11
|
-
EntityListProvider, EntityProvider, ListsProvider,
|
|
11
|
+
EntityListProvider, EntityProvider, ListsProvider, CommentSectionProvider, } from "./context";
|
|
12
12
|
// -- projects
|
|
13
13
|
export { useProject, useProjectData } from "./hooks/projects";
|
|
14
14
|
// -- crypto
|
|
15
15
|
export { useSignTestingJwt } from "./hooks/crypto";
|
|
16
16
|
// -- authentication (Redux-powered)
|
|
17
17
|
export { useAuthRedux, useUserRedux, } from "./hooks/auth-redux";
|
|
18
|
-
// -- app notifications
|
|
19
|
-
export { useAppNotifications, useAppNotificationsData, useCountUnreadNotifications, useFetchAppNotifications, useMarkNotificationAsRead, } from "./hooks/app-notifications";
|
|
20
18
|
// -- app notifications (Redux-powered)
|
|
21
19
|
export { useAppNotificationsRedux, useAppNotificationsDataRedux, } from "./hooks/app-notifications-redux";
|
|
22
20
|
// -- entities
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,sBAAsB;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;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AAiB,EACjB,cAAc,GACf,MAAM,kBAAkB,CAAC;AAE1B,cAAc;AACd,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,0BAA0B,EAC1B,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAE1B,WAAW;AACX,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,aAAa,GACd,MAAM,eAAe,CAAC;AAEvB,WAAW;AACX,OAAO,EACL,WAAW,EACX,YAAY,EACZ,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,4BAA4B,EAC5B,uBAAuB,EACvB,WAAW,EACX,aAAa,EACb,cAAc,EACd,aAAa,EACb,eAAe,GAChB,MAAM,eAAe,CAAC;AAEvB,aAAa;AACb,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,aAAa;AACb,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,aAAa;AACb,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAKhD,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-notifications-context.js","sourceRoot":"","sources":["../../../../src/legacy/context/app-notifications-context.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,uBAGN,MAAM,oDAAoD,CAAC;AAU5D,MAAM,CAAC,IAAM,uBAAuB,GAAG,aAAa,CAElD,EAAE,CAAC,CAAC;AAEN,MAAM,CAAC,IAAM,wBAAwB,GAEjC,UAAC,EAA0D;IAAxD,IAAA,QAAQ,cAAA,EAAK,WAAW,cAA1B,YAA4B,CAAF;IAC7B,IAAM,IAAI,GAAG,uBAAuB,CAAC,WAAW,CAAC,CAAC;IAClD,OAAO,CACL,KAAC,uBAAuB,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,YAC1C,QAAQ,GACwB,CACpC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { createContext } from "react";
|
|
14
14
|
import useAuthData from "../hooks/auth/useAuthData";
|
|
15
|
-
import { UserProvider } from "
|
|
15
|
+
import { UserProvider } from "../../context/user-context";
|
|
16
16
|
export var AuthContext = createContext({});
|
|
17
17
|
export var AuthProvider = function (_a) {
|
|
18
18
|
var children = _a.children, restOfProps = __rest(_a, ["children"]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-context.js","sourceRoot":"","sources":["../../../../src/legacy/context/auth-context.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,WAGN,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAS1D,MAAM,CAAC,IAAM,WAAW,GAAG,aAAa,CAA6B,EAAE,CAAC,CAAC;AAEzE,MAAM,CAAC,IAAM,YAAY,GAA+B,UAAC,EAGtC;IAFjB,IAAA,QAAQ,cAAA,EACL,WAAW,cAFyC,YAGxD,CADe;IAEd,IAAM,KAAqC,WAAW,CAAC,WAAW,CAAC,EAA3D,IAAI,UAAA,EAAE,OAAO,aAAA,EAAK,YAAY,cAAhC,mBAAkC,CAA2B,CAAC;IAEpE,OAAO,CACL,KAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,YACvC,KAAC,YAAY,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,YACvC,QAAQ,GACI,GACM,CACxB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/legacy/hooks/app-notifications/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAppNotifications.js","sourceRoot":"","sources":["../../../../../src/legacy/hooks/app-notifications/useAppNotifications.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EACL,uBAAuB,GAExB,MAAM,yCAAyC,CAAC;AAEjD,MAAM,CAAC,OAAO,UAAU,mBAAmB;IACzC,OAAO,UAAU,CAAC,uBAAuB,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NotificationTemplates, UnifiedAppNotification } from "
|
|
1
|
+
import { NotificationTemplates, UnifiedAppNotification } from "../../../interfaces/models/AppNotification";
|
|
2
2
|
export interface UseAppNotificationsDataProps {
|
|
3
3
|
limit?: number;
|
|
4
4
|
notificationTemplates?: Partial<NotificationTemplates>;
|
|
@@ -58,8 +58,8 @@ import { useCallback, useEffect, useRef, useState } from "react";
|
|
|
58
58
|
import useFetchAppNotifications from "./useFetchAppNotifications";
|
|
59
59
|
import useCountUnreadNotifications from "./useCountUnreadNotifications";
|
|
60
60
|
import useMarkNotificationAsRead from "./useMarkNotificationAsRead";
|
|
61
|
-
import { handleError } from "
|
|
62
|
-
import addNotificationsMessages from "
|
|
61
|
+
import { handleError } from "../../../utils/handleError";
|
|
62
|
+
import addNotificationsMessages from "../../../helpers/addNotificationsMessages";
|
|
63
63
|
function useAppNotificationsData(_a) {
|
|
64
64
|
var _this = this;
|
|
65
65
|
var _b = _a.limit, limit = _b === void 0 ? 10 : _b, notificationTemplates = _a.notificationTemplates;
|