@replyke/core 5.1.5-beta.8 → 5.1.5

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.
Files changed (313) hide show
  1. package/dist/cjs/config/useAxiosPrivate.js +5 -2
  2. package/dist/cjs/config/useAxiosPrivate.js.map +1 -1
  3. package/dist/cjs/context/app-notifications-context.js.map +1 -0
  4. package/dist/cjs/{legacy/context → context}/auth-context.js +1 -1
  5. package/dist/cjs/context/auth-context.js.map +1 -0
  6. package/dist/cjs/context/index.d.ts +2 -1
  7. package/dist/cjs/context/index.js +5 -3
  8. package/dist/cjs/context/index.js.map +1 -1
  9. package/dist/cjs/context/replyke-context.js +2 -2
  10. package/dist/cjs/context/replyke-context.js.map +1 -1
  11. package/dist/cjs/hooks/app-notifications/index.js.map +1 -0
  12. package/dist/cjs/hooks/app-notifications/useAppNotifications.js.map +1 -0
  13. package/dist/cjs/{legacy/hooks → hooks}/app-notifications/useAppNotificationsData.d.ts +1 -1
  14. package/dist/cjs/{legacy/hooks → hooks}/app-notifications/useAppNotificationsData.js +2 -2
  15. package/dist/cjs/hooks/app-notifications/useAppNotificationsData.js.map +1 -0
  16. package/dist/cjs/{legacy/hooks → hooks}/app-notifications/useCountUnreadNotifications.js +4 -4
  17. package/dist/cjs/hooks/app-notifications/useCountUnreadNotifications.js.map +1 -0
  18. package/dist/cjs/{legacy/hooks → hooks}/app-notifications/useFetchAppNotifications.d.ts +1 -1
  19. package/dist/cjs/{legacy/hooks → hooks}/app-notifications/useFetchAppNotifications.js +4 -4
  20. package/dist/cjs/hooks/app-notifications/useFetchAppNotifications.js.map +1 -0
  21. package/dist/cjs/{legacy/hooks → hooks}/app-notifications/useMarkNotificationAsRead.js +4 -4
  22. package/dist/cjs/hooks/app-notifications/useMarkNotificationAsRead.js.map +1 -0
  23. package/dist/cjs/hooks/auth/index.js.map +1 -0
  24. package/dist/cjs/hooks/auth/useAuth.js.map +1 -0
  25. package/dist/{esm/legacy → cjs}/hooks/auth/useAuthData.d.ts +1 -1
  26. package/dist/cjs/{legacy/hooks → hooks}/auth/useAuthData.js +2 -2
  27. package/dist/cjs/hooks/auth/useAuthData.js.map +1 -0
  28. package/dist/cjs/{legacy/hooks → hooks}/auth/useChangePassword.js +3 -3
  29. package/dist/cjs/hooks/auth/useChangePassword.js.map +1 -0
  30. package/dist/cjs/{legacy/hooks → hooks}/auth/useRequestNewAccessToken.js +3 -3
  31. package/dist/cjs/hooks/auth/useRequestNewAccessToken.js.map +1 -0
  32. package/dist/cjs/{legacy/hooks → hooks}/auth/useSignInWithEmailAndPassword.js +3 -3
  33. package/dist/cjs/hooks/auth/useSignInWithEmailAndPassword.js.map +1 -0
  34. package/dist/cjs/{legacy/hooks → hooks}/auth/useSignOut.js +3 -3
  35. package/dist/cjs/hooks/auth/useSignOut.js.map +1 -0
  36. package/dist/cjs/{legacy/hooks → hooks}/auth/useSignUpWithEmailAndPassword.js +3 -3
  37. package/dist/cjs/hooks/auth/useSignUpWithEmailAndPassword.js.map +1 -0
  38. package/dist/cjs/{legacy/hooks → hooks}/auth/useVerifyExternalUser.js +2 -2
  39. package/dist/cjs/hooks/auth/useVerifyExternalUser.js.map +1 -0
  40. package/dist/cjs/hooks/comments/useCommentSectionData.js +2 -2
  41. package/dist/cjs/hooks/comments/useCommentSectionData.js.map +1 -1
  42. package/dist/cjs/hooks/comments/useCommentVotes.js +2 -2
  43. package/dist/cjs/hooks/comments/useCommentVotes.js.map +1 -1
  44. package/dist/cjs/hooks/comments/useCreateComment.js +2 -2
  45. package/dist/cjs/hooks/comments/useCreateComment.js.map +1 -1
  46. package/dist/cjs/hooks/entities/useEntityData.js +2 -2
  47. package/dist/cjs/hooks/entities/useEntityData.js.map +1 -1
  48. package/dist/cjs/hooks/entities/useEntityVotes.js +2 -2
  49. package/dist/cjs/hooks/entities/useEntityVotes.js.map +1 -1
  50. package/dist/cjs/hooks/lists/useIsEntitySaved.js +2 -2
  51. package/dist/cjs/hooks/lists/useIsEntitySaved.js.map +1 -1
  52. package/dist/cjs/hooks/lists/useListsData.js +2 -2
  53. package/dist/cjs/hooks/lists/useListsData.js.map +1 -1
  54. package/dist/cjs/hooks/reports/useCreateReport.js +2 -2
  55. package/dist/cjs/hooks/reports/useCreateReport.js.map +1 -1
  56. package/dist/cjs/hooks/users/follows/useFetchFollow.js +2 -2
  57. package/dist/cjs/hooks/users/follows/useFetchFollow.js.map +1 -1
  58. package/dist/cjs/hooks/users/follows/useUnfollowUser.js +2 -2
  59. package/dist/cjs/hooks/users/follows/useUnfollowUser.js.map +1 -1
  60. package/dist/cjs/index.d.ts +4 -6
  61. package/dist/cjs/index.js +22 -12
  62. package/dist/cjs/index.js.map +1 -1
  63. package/dist/cjs/interfaces/models/AppNotification.d.ts +1 -1
  64. package/dist/esm/config/useAxiosPrivate.js +2 -2
  65. package/dist/esm/config/useAxiosPrivate.js.map +1 -1
  66. package/dist/esm/context/app-notifications-context.js.map +1 -0
  67. package/dist/esm/{legacy/context → context}/auth-context.js +1 -1
  68. package/dist/esm/context/auth-context.js.map +1 -0
  69. package/dist/esm/context/index.d.ts +2 -1
  70. package/dist/esm/context/index.js +2 -1
  71. package/dist/esm/context/index.js.map +1 -1
  72. package/dist/esm/context/replyke-context.js +2 -2
  73. package/dist/esm/context/replyke-context.js.map +1 -1
  74. package/dist/esm/hooks/app-notifications/index.js.map +1 -0
  75. package/dist/esm/hooks/app-notifications/useAppNotifications.js.map +1 -0
  76. package/dist/esm/{legacy/hooks → hooks}/app-notifications/useAppNotificationsData.d.ts +1 -1
  77. package/dist/esm/{legacy/hooks → hooks}/app-notifications/useAppNotificationsData.js +2 -2
  78. package/dist/esm/hooks/app-notifications/useAppNotificationsData.js.map +1 -0
  79. package/dist/esm/{legacy/hooks → hooks}/app-notifications/useCountUnreadNotifications.js +4 -4
  80. package/dist/esm/hooks/app-notifications/useCountUnreadNotifications.js.map +1 -0
  81. package/dist/esm/{legacy/hooks → hooks}/app-notifications/useFetchAppNotifications.d.ts +1 -1
  82. package/dist/esm/{legacy/hooks → hooks}/app-notifications/useFetchAppNotifications.js +4 -4
  83. package/dist/esm/hooks/app-notifications/useFetchAppNotifications.js.map +1 -0
  84. package/dist/esm/{legacy/hooks → hooks}/app-notifications/useMarkNotificationAsRead.js +4 -4
  85. package/dist/esm/hooks/app-notifications/useMarkNotificationAsRead.js.map +1 -0
  86. package/dist/esm/hooks/auth/index.js.map +1 -0
  87. package/dist/esm/hooks/auth/useAuth.js.map +1 -0
  88. package/dist/{cjs/legacy → esm}/hooks/auth/useAuthData.d.ts +1 -1
  89. package/dist/esm/{legacy/hooks → hooks}/auth/useAuthData.js +2 -2
  90. package/dist/esm/hooks/auth/useAuthData.js.map +1 -0
  91. package/dist/esm/{legacy/hooks → hooks}/auth/useChangePassword.js +3 -3
  92. package/dist/esm/hooks/auth/useChangePassword.js.map +1 -0
  93. package/dist/esm/{legacy/hooks → hooks}/auth/useRequestNewAccessToken.js +3 -3
  94. package/dist/esm/hooks/auth/useRequestNewAccessToken.js.map +1 -0
  95. package/dist/esm/{legacy/hooks → hooks}/auth/useSignInWithEmailAndPassword.js +3 -3
  96. package/dist/esm/hooks/auth/useSignInWithEmailAndPassword.js.map +1 -0
  97. package/dist/esm/{legacy/hooks → hooks}/auth/useSignOut.js +3 -3
  98. package/dist/esm/hooks/auth/useSignOut.js.map +1 -0
  99. package/dist/esm/{legacy/hooks → hooks}/auth/useSignUpWithEmailAndPassword.js +3 -3
  100. package/dist/esm/hooks/auth/useSignUpWithEmailAndPassword.js.map +1 -0
  101. package/dist/esm/{legacy/hooks → hooks}/auth/useVerifyExternalUser.js +2 -2
  102. package/dist/esm/hooks/auth/useVerifyExternalUser.js.map +1 -0
  103. package/dist/esm/hooks/comments/useCommentSectionData.js +2 -2
  104. package/dist/esm/hooks/comments/useCommentSectionData.js.map +1 -1
  105. package/dist/esm/hooks/comments/useCommentVotes.js +2 -2
  106. package/dist/esm/hooks/comments/useCommentVotes.js.map +1 -1
  107. package/dist/esm/hooks/comments/useCreateComment.js +2 -2
  108. package/dist/esm/hooks/comments/useCreateComment.js.map +1 -1
  109. package/dist/esm/hooks/entities/useEntityData.js +2 -2
  110. package/dist/esm/hooks/entities/useEntityData.js.map +1 -1
  111. package/dist/esm/hooks/entities/useEntityVotes.js +2 -2
  112. package/dist/esm/hooks/entities/useEntityVotes.js.map +1 -1
  113. package/dist/esm/hooks/lists/useIsEntitySaved.js +2 -2
  114. package/dist/esm/hooks/lists/useIsEntitySaved.js.map +1 -1
  115. package/dist/esm/hooks/lists/useListsData.js +2 -2
  116. package/dist/esm/hooks/lists/useListsData.js.map +1 -1
  117. package/dist/esm/hooks/reports/useCreateReport.js +2 -2
  118. package/dist/esm/hooks/reports/useCreateReport.js.map +1 -1
  119. package/dist/esm/hooks/users/follows/useFetchFollow.js +2 -2
  120. package/dist/esm/hooks/users/follows/useFetchFollow.js.map +1 -1
  121. package/dist/esm/hooks/users/follows/useUnfollowUser.js +2 -2
  122. package/dist/esm/hooks/users/follows/useUnfollowUser.js.map +1 -1
  123. package/dist/esm/index.d.ts +4 -6
  124. package/dist/esm/index.js +7 -9
  125. package/dist/esm/index.js.map +1 -1
  126. package/dist/esm/interfaces/models/AppNotification.d.ts +1 -1
  127. package/package.json +2 -4
  128. package/dist/cjs/context/replyke-store-context.d.ts +0 -13
  129. package/dist/cjs/context/replyke-store-context.js +0 -37
  130. package/dist/cjs/context/replyke-store-context.js.map +0 -1
  131. package/dist/cjs/hooks/app-notifications-redux/index.d.ts +0 -4
  132. package/dist/cjs/hooks/app-notifications-redux/index.js +0 -14
  133. package/dist/cjs/hooks/app-notifications-redux/index.js.map +0 -1
  134. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsActionsRedux.d.ts +0 -13
  135. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsActionsRedux.js +0 -266
  136. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsActionsRedux.js.map +0 -1
  137. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.d.ts +0 -21
  138. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.js +0 -108
  139. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.js.map +0 -1
  140. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.d.ts +0 -7
  141. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.js +0 -38
  142. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.js.map +0 -1
  143. package/dist/cjs/hooks/auth-redux/index.d.ts +0 -2
  144. package/dist/cjs/hooks/auth-redux/index.js +0 -11
  145. package/dist/cjs/hooks/auth-redux/index.js.map +0 -1
  146. package/dist/cjs/hooks/auth-redux/useAuthRedux.d.ts +0 -32
  147. package/dist/cjs/hooks/auth-redux/useAuthRedux.js +0 -180
  148. package/dist/cjs/hooks/auth-redux/useAuthRedux.js.map +0 -1
  149. package/dist/cjs/hooks/auth-redux/useUserRedux.d.ts +0 -6
  150. package/dist/cjs/hooks/auth-redux/useUserRedux.js +0 -20
  151. package/dist/cjs/hooks/auth-redux/useUserRedux.js.map +0 -1
  152. package/dist/cjs/legacy/context/app-notifications-context.js.map +0 -1
  153. package/dist/cjs/legacy/context/auth-context.js.map +0 -1
  154. package/dist/cjs/legacy/hooks/app-notifications/index.js.map +0 -1
  155. package/dist/cjs/legacy/hooks/app-notifications/useAppNotifications.js.map +0 -1
  156. package/dist/cjs/legacy/hooks/app-notifications/useAppNotificationsData.js.map +0 -1
  157. package/dist/cjs/legacy/hooks/app-notifications/useCountUnreadNotifications.js.map +0 -1
  158. package/dist/cjs/legacy/hooks/app-notifications/useFetchAppNotifications.js.map +0 -1
  159. package/dist/cjs/legacy/hooks/app-notifications/useMarkNotificationAsRead.js.map +0 -1
  160. package/dist/cjs/legacy/hooks/auth/index.js.map +0 -1
  161. package/dist/cjs/legacy/hooks/auth/useAuth.js.map +0 -1
  162. package/dist/cjs/legacy/hooks/auth/useAuthData.js.map +0 -1
  163. package/dist/cjs/legacy/hooks/auth/useChangePassword.js.map +0 -1
  164. package/dist/cjs/legacy/hooks/auth/useRequestNewAccessToken.js.map +0 -1
  165. package/dist/cjs/legacy/hooks/auth/useSignInWithEmailAndPassword.js.map +0 -1
  166. package/dist/cjs/legacy/hooks/auth/useSignOut.js.map +0 -1
  167. package/dist/cjs/legacy/hooks/auth/useSignUpWithEmailAndPassword.js.map +0 -1
  168. package/dist/cjs/legacy/hooks/auth/useVerifyExternalUser.js.map +0 -1
  169. package/dist/cjs/store/api/appNotificationsApi.d.ts +0 -2021
  170. package/dist/cjs/store/api/appNotificationsApi.js +0 -210
  171. package/dist/cjs/store/api/appNotificationsApi.js.map +0 -1
  172. package/dist/cjs/store/api/baseApi.d.ts +0 -1
  173. package/dist/cjs/store/api/baseApi.js +0 -42
  174. package/dist/cjs/store/api/baseApi.js.map +0 -1
  175. package/dist/cjs/store/api/index.d.ts +0 -2
  176. package/dist/cjs/store/api/index.js +0 -27
  177. package/dist/cjs/store/api/index.js.map +0 -1
  178. package/dist/cjs/store/index.d.ts +0 -15
  179. package/dist/cjs/store/index.js +0 -72
  180. package/dist/cjs/store/index.js.map +0 -1
  181. package/dist/cjs/store/middleware.d.ts +0 -4
  182. package/dist/cjs/store/middleware.js +0 -42
  183. package/dist/cjs/store/middleware.js.map +0 -1
  184. package/dist/cjs/store/rootReducer.d.ts +0 -10
  185. package/dist/cjs/store/rootReducer.js +0 -20
  186. package/dist/cjs/store/rootReducer.js.map +0 -1
  187. package/dist/cjs/store/slices/appNotificationsSlice.d.ts +0 -58
  188. package/dist/cjs/store/slices/appNotificationsSlice.js +0 -135
  189. package/dist/cjs/store/slices/appNotificationsSlice.js.map +0 -1
  190. package/dist/cjs/store/slices/authSlice.d.ts +0 -24
  191. package/dist/cjs/store/slices/authSlice.js +0 -79
  192. package/dist/cjs/store/slices/authSlice.js.map +0 -1
  193. package/dist/cjs/store/slices/authThunks.d.ts +0 -40
  194. package/dist/cjs/store/slices/authThunks.js +0 -357
  195. package/dist/cjs/store/slices/authThunks.js.map +0 -1
  196. package/dist/cjs/store/slices/index.d.ts +0 -1
  197. package/dist/cjs/store/slices/index.js +0 -23
  198. package/dist/cjs/store/slices/index.js.map +0 -1
  199. package/dist/cjs/store/types/index.d.ts +0 -8
  200. package/dist/cjs/store/types/index.js +0 -3
  201. package/dist/cjs/store/types/index.js.map +0 -1
  202. package/dist/esm/context/replyke-store-context.d.ts +0 -13
  203. package/dist/esm/context/replyke-store-context.js +0 -33
  204. package/dist/esm/context/replyke-store-context.js.map +0 -1
  205. package/dist/esm/hooks/app-notifications-redux/index.d.ts +0 -4
  206. package/dist/esm/hooks/app-notifications-redux/index.js +0 -5
  207. package/dist/esm/hooks/app-notifications-redux/index.js.map +0 -1
  208. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsActionsRedux.d.ts +0 -13
  209. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsActionsRedux.js +0 -260
  210. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsActionsRedux.js.map +0 -1
  211. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.d.ts +0 -21
  212. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.js +0 -103
  213. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.js.map +0 -1
  214. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.d.ts +0 -7
  215. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.js +0 -35
  216. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.js.map +0 -1
  217. package/dist/esm/hooks/auth-redux/index.d.ts +0 -2
  218. package/dist/esm/hooks/auth-redux/index.js +0 -3
  219. package/dist/esm/hooks/auth-redux/index.js.map +0 -1
  220. package/dist/esm/hooks/auth-redux/useAuthRedux.d.ts +0 -32
  221. package/dist/esm/hooks/auth-redux/useAuthRedux.js +0 -174
  222. package/dist/esm/hooks/auth-redux/useAuthRedux.js.map +0 -1
  223. package/dist/esm/hooks/auth-redux/useUserRedux.d.ts +0 -6
  224. package/dist/esm/hooks/auth-redux/useUserRedux.js +0 -17
  225. package/dist/esm/hooks/auth-redux/useUserRedux.js.map +0 -1
  226. package/dist/esm/legacy/context/app-notifications-context.js.map +0 -1
  227. package/dist/esm/legacy/context/auth-context.js.map +0 -1
  228. package/dist/esm/legacy/hooks/app-notifications/index.js.map +0 -1
  229. package/dist/esm/legacy/hooks/app-notifications/useAppNotifications.js.map +0 -1
  230. package/dist/esm/legacy/hooks/app-notifications/useAppNotificationsData.js.map +0 -1
  231. package/dist/esm/legacy/hooks/app-notifications/useCountUnreadNotifications.js.map +0 -1
  232. package/dist/esm/legacy/hooks/app-notifications/useFetchAppNotifications.js.map +0 -1
  233. package/dist/esm/legacy/hooks/app-notifications/useMarkNotificationAsRead.js.map +0 -1
  234. package/dist/esm/legacy/hooks/auth/index.js.map +0 -1
  235. package/dist/esm/legacy/hooks/auth/useAuth.js.map +0 -1
  236. package/dist/esm/legacy/hooks/auth/useAuthData.js.map +0 -1
  237. package/dist/esm/legacy/hooks/auth/useChangePassword.js.map +0 -1
  238. package/dist/esm/legacy/hooks/auth/useRequestNewAccessToken.js.map +0 -1
  239. package/dist/esm/legacy/hooks/auth/useSignInWithEmailAndPassword.js.map +0 -1
  240. package/dist/esm/legacy/hooks/auth/useSignOut.js.map +0 -1
  241. package/dist/esm/legacy/hooks/auth/useSignUpWithEmailAndPassword.js.map +0 -1
  242. package/dist/esm/legacy/hooks/auth/useVerifyExternalUser.js.map +0 -1
  243. package/dist/esm/store/api/appNotificationsApi.d.ts +0 -2021
  244. package/dist/esm/store/api/appNotificationsApi.js +0 -207
  245. package/dist/esm/store/api/appNotificationsApi.js.map +0 -1
  246. package/dist/esm/store/api/baseApi.d.ts +0 -1
  247. package/dist/esm/store/api/baseApi.js +0 -39
  248. package/dist/esm/store/api/baseApi.js.map +0 -1
  249. package/dist/esm/store/api/index.d.ts +0 -2
  250. package/dist/esm/store/api/index.js +0 -9
  251. package/dist/esm/store/api/index.js.map +0 -1
  252. package/dist/esm/store/index.d.ts +0 -15
  253. package/dist/esm/store/index.js +0 -55
  254. package/dist/esm/store/index.js.map +0 -1
  255. package/dist/esm/store/middleware.d.ts +0 -4
  256. package/dist/esm/store/middleware.js +0 -37
  257. package/dist/esm/store/middleware.js.map +0 -1
  258. package/dist/esm/store/rootReducer.d.ts +0 -10
  259. package/dist/esm/store/rootReducer.js +0 -14
  260. package/dist/esm/store/rootReducer.js.map +0 -1
  261. package/dist/esm/store/slices/appNotificationsSlice.d.ts +0 -58
  262. package/dist/esm/store/slices/appNotificationsSlice.js +0 -124
  263. package/dist/esm/store/slices/appNotificationsSlice.js.map +0 -1
  264. package/dist/esm/store/slices/authSlice.d.ts +0 -24
  265. package/dist/esm/store/slices/authSlice.js +0 -69
  266. package/dist/esm/store/slices/authSlice.js.map +0 -1
  267. package/dist/esm/store/slices/authThunks.d.ts +0 -40
  268. package/dist/esm/store/slices/authThunks.js +0 -351
  269. package/dist/esm/store/slices/authThunks.js.map +0 -1
  270. package/dist/esm/store/slices/index.d.ts +0 -1
  271. package/dist/esm/store/slices/index.js +0 -7
  272. package/dist/esm/store/slices/index.js.map +0 -1
  273. package/dist/esm/store/types/index.d.ts +0 -8
  274. package/dist/esm/store/types/index.js +0 -2
  275. package/dist/esm/store/types/index.js.map +0 -1
  276. /package/dist/cjs/{legacy/context → context}/app-notifications-context.d.ts +0 -0
  277. /package/dist/cjs/{legacy/context → context}/app-notifications-context.js +0 -0
  278. /package/dist/cjs/{legacy/context → context}/auth-context.d.ts +0 -0
  279. /package/dist/cjs/{legacy/hooks → hooks}/app-notifications/index.d.ts +0 -0
  280. /package/dist/cjs/{legacy/hooks → hooks}/app-notifications/index.js +0 -0
  281. /package/dist/cjs/{legacy/hooks → hooks}/app-notifications/useAppNotifications.d.ts +0 -0
  282. /package/dist/cjs/{legacy/hooks → hooks}/app-notifications/useAppNotifications.js +0 -0
  283. /package/dist/cjs/{legacy/hooks → hooks}/app-notifications/useCountUnreadNotifications.d.ts +0 -0
  284. /package/dist/cjs/{legacy/hooks → hooks}/app-notifications/useMarkNotificationAsRead.d.ts +0 -0
  285. /package/dist/cjs/{legacy/hooks → hooks}/auth/index.d.ts +0 -0
  286. /package/dist/cjs/{legacy/hooks → hooks}/auth/index.js +0 -0
  287. /package/dist/cjs/{legacy/hooks → hooks}/auth/useAuth.d.ts +0 -0
  288. /package/dist/cjs/{legacy/hooks → hooks}/auth/useAuth.js +0 -0
  289. /package/dist/cjs/{legacy/hooks → hooks}/auth/useChangePassword.d.ts +0 -0
  290. /package/dist/cjs/{legacy/hooks → hooks}/auth/useRequestNewAccessToken.d.ts +0 -0
  291. /package/dist/cjs/{legacy/hooks → hooks}/auth/useSignInWithEmailAndPassword.d.ts +0 -0
  292. /package/dist/cjs/{legacy/hooks → hooks}/auth/useSignOut.d.ts +0 -0
  293. /package/dist/cjs/{legacy/hooks → hooks}/auth/useSignUpWithEmailAndPassword.d.ts +0 -0
  294. /package/dist/cjs/{legacy/hooks → hooks}/auth/useVerifyExternalUser.d.ts +0 -0
  295. /package/dist/esm/{legacy/context → context}/app-notifications-context.d.ts +0 -0
  296. /package/dist/esm/{legacy/context → context}/app-notifications-context.js +0 -0
  297. /package/dist/esm/{legacy/context → context}/auth-context.d.ts +0 -0
  298. /package/dist/esm/{legacy/hooks → hooks}/app-notifications/index.d.ts +0 -0
  299. /package/dist/esm/{legacy/hooks → hooks}/app-notifications/index.js +0 -0
  300. /package/dist/esm/{legacy/hooks → hooks}/app-notifications/useAppNotifications.d.ts +0 -0
  301. /package/dist/esm/{legacy/hooks → hooks}/app-notifications/useAppNotifications.js +0 -0
  302. /package/dist/esm/{legacy/hooks → hooks}/app-notifications/useCountUnreadNotifications.d.ts +0 -0
  303. /package/dist/esm/{legacy/hooks → hooks}/app-notifications/useMarkNotificationAsRead.d.ts +0 -0
  304. /package/dist/esm/{legacy/hooks → hooks}/auth/index.d.ts +0 -0
  305. /package/dist/esm/{legacy/hooks → hooks}/auth/index.js +0 -0
  306. /package/dist/esm/{legacy/hooks → hooks}/auth/useAuth.d.ts +0 -0
  307. /package/dist/esm/{legacy/hooks → hooks}/auth/useAuth.js +0 -0
  308. /package/dist/esm/{legacy/hooks → hooks}/auth/useChangePassword.d.ts +0 -0
  309. /package/dist/esm/{legacy/hooks → hooks}/auth/useRequestNewAccessToken.d.ts +0 -0
  310. /package/dist/esm/{legacy/hooks → hooks}/auth/useSignInWithEmailAndPassword.d.ts +0 -0
  311. /package/dist/esm/{legacy/hooks → hooks}/auth/useSignOut.d.ts +0 -0
  312. /package/dist/esm/{legacy/hooks → hooks}/auth/useSignUpWithEmailAndPassword.d.ts +0 -0
  313. /package/dist/esm/{legacy/hooks → hooks}/auth/useVerifyExternalUser.d.ts +0 -0
@@ -7,7 +7,7 @@ interface BaseAppNotification {
7
7
  metadata: Record<string, any>;
8
8
  title?: string;
9
9
  content?: string;
10
- createdAt: string;
10
+ createdAt: Date;
11
11
  }
12
12
  export interface EntityCommentNotification extends BaseAppNotification {
13
13
  type: "entity-comment";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@replyke/core",
3
- "version": "5.1.5-beta.8",
3
+ "version": "5.1.5",
4
4
  "private": false,
5
5
  "license": "Apache-2.0",
6
6
  "author": "Replyke, maintained by Yanay Tsabary",
@@ -40,11 +40,9 @@
40
40
  "dist"
41
41
  ],
42
42
  "dependencies": {
43
- "@reduxjs/toolkit": "^2.0.1",
44
43
  "axios": "^1.4.0",
45
44
  "js-cookie": "^3.0.5",
46
- "lodash": "^4.17.21",
47
- "react-redux": "^9.0.4"
45
+ "lodash": "^4.17.21"
48
46
  },
49
47
  "devDependencies": {
50
48
  "@types/js-cookie": "^3.0.6",
@@ -1,13 +0,0 @@
1
- import React from "react";
2
- import type { ReactNode } from "react";
3
- export interface ReplykeStoreProviderProps {
4
- children: ReactNode;
5
- projectId: string;
6
- signedToken?: string | null;
7
- }
8
- /**
9
- * Redux store provider for Replyke
10
- * This component provides the Redux store and initializes auth state
11
- */
12
- export declare const ReplykeStoreProvider: React.FC<ReplykeStoreProviderProps>;
13
- export default ReplykeStoreProvider;
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ReplykeStoreProvider = void 0;
4
- var jsx_runtime_1 = require("react/jsx-runtime");
5
- var react_1 = require("react");
6
- var react_redux_1 = require("react-redux");
7
- var store_1 = require("../store");
8
- var authThunks_1 = require("../store/slices/authThunks");
9
- /**
10
- * Component that initializes auth state in Redux
11
- * Must be inside the Redux Provider to dispatch actions
12
- */
13
- var AuthInitializer = function (_a) {
14
- var children = _a.children, projectId = _a.projectId, signedToken = _a.signedToken;
15
- var dispatch = (0, react_redux_1.useDispatch)();
16
- (0, react_1.useEffect)(function () {
17
- // Initialize auth with project and signed token
18
- dispatch((0, authThunks_1.initializeAuthThunk)({
19
- projectId: projectId,
20
- signedToken: signedToken
21
- }));
22
- }, [dispatch, projectId, signedToken]);
23
- return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
24
- };
25
- /**
26
- * Redux store provider for Replyke
27
- * This component provides the Redux store and initializes auth state
28
- */
29
- var ReplykeStoreProvider = function (_a) {
30
- var children = _a.children, projectId = _a.projectId, signedToken = _a.signedToken;
31
- return ((0, jsx_runtime_1.jsx)(react_redux_1.Provider, { store: store_1.replykeStore, children: (0, jsx_runtime_1.jsx)(AuthInitializer, { projectId: projectId, signedToken: signedToken, children: children }) }));
32
- };
33
- exports.ReplykeStoreProvider = ReplykeStoreProvider;
34
- // Clean Redux-only architecture
35
- // Always integrated with ReplykeProvider
36
- exports.default = exports.ReplykeStoreProvider;
37
- //# sourceMappingURL=replyke-store-context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"replyke-store-context.js","sourceRoot":"","sources":["../../../src/context/replyke-store-context.tsx"],"names":[],"mappings":";;;;AAAA,+BAAyC;AACzC,2CAAoD;AACpD,kCAAwC;AAGxC,yDAAiE;AAQjE;;;GAGG;AACH,IAAM,eAAe,GAIhB,UAAC,EAAoC;QAAlC,QAAQ,cAAA,EAAE,SAAS,eAAA,EAAE,WAAW,iBAAA;IACtC,IAAM,QAAQ,GAAG,IAAA,yBAAW,GAAe,CAAC;IAE5C,IAAA,iBAAS,EAAC;QACR,gDAAgD;QAChD,QAAQ,CAAC,IAAA,gCAAmB,EAAC;YAC3B,SAAS,WAAA;YACT,WAAW,aAAA;SACZ,CAAC,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;IAEvC,OAAO,2DAAG,QAAQ,GAAI,CAAC;AACzB,CAAC,CAAC;AAEF;;;GAGG;AACI,IAAM,oBAAoB,GAAwC,UAAC,EAIzE;QAHC,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,WAAW,iBAAA;IAEX,OAAO,CACL,uBAAC,sBAAQ,IAAC,KAAK,EAAE,oBAAY,YAC3B,uBAAC,eAAe,IAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,YAC5D,QAAQ,GACO,GACT,CACZ,CAAC;AACJ,CAAC,CAAC;AAZW,QAAA,oBAAoB,wBAY/B;AAEF,gCAAgC;AAChC,yCAAyC;AAEzC,kBAAe,4BAAoB,CAAC"}
@@ -1,4 +0,0 @@
1
- export { default as useAppNotificationsRedux } from "./useAppNotificationsRedux";
2
- export { default as useAppNotificationsDataRedux } from "./useAppNotificationsDataRedux";
3
- export { default as useAppNotificationsActionsRedux } from "./useAppNotificationsActionsRedux";
4
- export type { UseAppNotificationsDataProps, UseAppNotificationsDataValues, } from "./useAppNotificationsDataRedux";
@@ -1,14 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.useAppNotificationsActionsRedux = exports.useAppNotificationsDataRedux = exports.useAppNotificationsRedux = void 0;
7
- // Export Redux-powered app notifications hooks
8
- var useAppNotificationsRedux_1 = require("./useAppNotificationsRedux");
9
- Object.defineProperty(exports, "useAppNotificationsRedux", { enumerable: true, get: function () { return __importDefault(useAppNotificationsRedux_1).default; } });
10
- var useAppNotificationsDataRedux_1 = require("./useAppNotificationsDataRedux");
11
- Object.defineProperty(exports, "useAppNotificationsDataRedux", { enumerable: true, get: function () { return __importDefault(useAppNotificationsDataRedux_1).default; } });
12
- var useAppNotificationsActionsRedux_1 = require("./useAppNotificationsActionsRedux");
13
- Object.defineProperty(exports, "useAppNotificationsActionsRedux", { enumerable: true, get: function () { return __importDefault(useAppNotificationsActionsRedux_1).default; } });
14
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications-redux/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAA+C;AAC/C,uEAAiF;AAAxE,qJAAA,OAAO,OAA4B;AAC5C,+EAAyF;AAAhF,6JAAA,OAAO,OAAgC;AAChD,qFAA+F;AAAtF,mKAAA,OAAO,OAAmC"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Hook that provides Redux-powered actions for app notifications
3
- * Integrates RTK Query with Redux slice actions
4
- */
5
- export declare function useAppNotificationsActionsRedux(): {
6
- loadMore: () => void;
7
- markNotificationAsRead: (notificationId: string) => Promise<void>;
8
- markAllNotificationsAsRead: () => Promise<void>;
9
- resetAppNotifications: () => Promise<void>;
10
- fetchMoreNotifications: (pageToFetch: number) => Promise<void>;
11
- updateUnreadCount: () => Promise<void>;
12
- };
13
- export default useAppNotificationsActionsRedux;
@@ -1,266 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- var __importDefault = (this && this.__importDefault) || function (mod) {
39
- return (mod && mod.__esModule) ? mod : { "default": mod };
40
- };
41
- Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.useAppNotificationsActionsRedux = useAppNotificationsActionsRedux;
43
- var react_1 = require("react");
44
- var react_redux_1 = require("react-redux");
45
- var appNotificationsSlice_1 = require("../../store/slices/appNotificationsSlice");
46
- var appNotificationsApi_1 = require("../../store/api/appNotificationsApi");
47
- var handleError_1 = require("../../utils/handleError");
48
- var addNotificationsMessages_1 = __importDefault(require("../../helpers/addNotificationsMessages"));
49
- var useProject_1 = __importDefault(require("../projects/useProject"));
50
- var auth_redux_1 = require("../auth-redux");
51
- /**
52
- * Hook that provides Redux-powered actions for app notifications
53
- * Integrates RTK Query with Redux slice actions
54
- */
55
- function useAppNotificationsActionsRedux() {
56
- var _this = this;
57
- var dispatch = (0, react_redux_1.useDispatch)();
58
- // Get current state for actions
59
- var projectIdFromSlice = (0, react_redux_1.useSelector)(function (state) {
60
- return (0, appNotificationsSlice_1.selectCurrentProjectId)(state);
61
- });
62
- var page = (0, react_redux_1.useSelector)(function (state) {
63
- return (0, appNotificationsSlice_1.selectAppNotificationsPage)(state);
64
- });
65
- var limit = (0, react_redux_1.useSelector)(function (state) {
66
- return (0, appNotificationsSlice_1.selectAppNotificationsLimit)(state);
67
- });
68
- var notificationTemplates = (0, react_redux_1.useSelector)(function (state) {
69
- return (0, appNotificationsSlice_1.selectNotificationTemplates)(state);
70
- });
71
- // Get project and user context (fallback to current hooks)
72
- var projectIdFromHook = (0, useProject_1.default)().projectId;
73
- var user = (0, auth_redux_1.useUserRedux)().user;
74
- // Use project ID from slice if available, otherwise from hook
75
- var projectId = projectIdFromSlice || projectIdFromHook;
76
- // RTK Query hooks
77
- var triggerFetchNotifications = (0, appNotificationsApi_1.useLazyFetchAppNotificationsQuery)()[0];
78
- var markNotificationAsReadMutation = (0, appNotificationsApi_1.useMarkNotificationAsReadMutation)()[0];
79
- var markAllNotificationsAsReadMutation = (0, appNotificationsApi_1.useMarkAllNotificationsAsReadMutation)()[0];
80
- var triggerCountUnread = (0, appNotificationsApi_1.useLazyCountUnreadNotificationsQuery)()[0];
81
- // Load more action
82
- var loadMore = (0, react_1.useCallback)(function () {
83
- dispatch((0, appNotificationsSlice_1.loadMore)());
84
- }, [dispatch]);
85
- // Mark notification as read action
86
- var markNotificationAsRead = (0, react_1.useCallback)(function (notificationId) { return __awaiter(_this, void 0, void 0, function () {
87
- var error_1;
88
- return __generator(this, function (_a) {
89
- switch (_a.label) {
90
- case 0:
91
- if (!projectId || !user) {
92
- throw new Error("No project ID or authenticated user available");
93
- }
94
- _a.label = 1;
95
- case 1:
96
- _a.trys.push([1, 3, , 4]);
97
- // Optimistic update
98
- dispatch((0, appNotificationsSlice_1.markAsReadLocally)(notificationId));
99
- // Make API call
100
- return [4 /*yield*/, markNotificationAsReadMutation({
101
- projectId: projectId,
102
- notificationId: notificationId,
103
- }).unwrap()];
104
- case 2:
105
- // Make API call
106
- _a.sent();
107
- return [3 /*break*/, 4];
108
- case 3:
109
- error_1 = _a.sent();
110
- (0, handleError_1.handleError)(error_1, "Failed to mark notification as read:");
111
- throw error_1;
112
- case 4: return [2 /*return*/];
113
- }
114
- });
115
- }); }, [dispatch, projectId, user, markNotificationAsReadMutation]);
116
- // Reset notifications action
117
- var resetAppNotifications = (0, react_1.useCallback)(function () { return __awaiter(_this, void 0, void 0, function () {
118
- var result, completeNotifications, error_2;
119
- return __generator(this, function (_a) {
120
- switch (_a.label) {
121
- case 0:
122
- if (!projectId || !user) {
123
- throw new Error("No project ID or authenticated user available");
124
- }
125
- _a.label = 1;
126
- case 1:
127
- _a.trys.push([1, 3, , 4]);
128
- dispatch((0, appNotificationsSlice_1.setLoading)(true));
129
- dispatch((0, appNotificationsSlice_1.resetNotifications)());
130
- return [4 /*yield*/, triggerFetchNotifications({
131
- projectId: projectId,
132
- page: 1,
133
- limit: limit,
134
- }).unwrap()];
135
- case 2:
136
- result = _a.sent();
137
- if (result) {
138
- completeNotifications = (0, addNotificationsMessages_1.default)(result, notificationTemplates);
139
- dispatch((0, appNotificationsSlice_1.addNotifications)({
140
- notifications: completeNotifications,
141
- isFirstPage: true,
142
- }));
143
- }
144
- return [3 /*break*/, 4];
145
- case 3:
146
- error_2 = _a.sent();
147
- (0, handleError_1.handleError)(error_2, "Failed to refresh notifications:");
148
- throw error_2;
149
- case 4: return [2 /*return*/];
150
- }
151
- });
152
- }); }, [
153
- dispatch,
154
- projectId,
155
- user,
156
- triggerFetchNotifications,
157
- limit,
158
- notificationTemplates,
159
- ]);
160
- // Fetch more notifications (internal action triggered by page changes)
161
- var fetchMoreNotifications = (0, react_1.useCallback)(function (pageToFetch) { return __awaiter(_this, void 0, void 0, function () {
162
- var result, completeNotifications, error_3;
163
- return __generator(this, function (_a) {
164
- switch (_a.label) {
165
- case 0:
166
- if (!projectId || !user)
167
- return [2 /*return*/];
168
- _a.label = 1;
169
- case 1:
170
- _a.trys.push([1, 3, 4, 5]);
171
- dispatch((0, appNotificationsSlice_1.setLoading)(true));
172
- return [4 /*yield*/, triggerFetchNotifications({
173
- projectId: projectId,
174
- page: pageToFetch,
175
- limit: limit,
176
- }).unwrap()];
177
- case 2:
178
- result = _a.sent();
179
- if (result) {
180
- completeNotifications = (0, addNotificationsMessages_1.default)(result, notificationTemplates);
181
- dispatch((0, appNotificationsSlice_1.addNotifications)({ notifications: completeNotifications }));
182
- }
183
- return [3 /*break*/, 5];
184
- case 3:
185
- error_3 = _a.sent();
186
- (0, handleError_1.handleError)(error_3, "Loading more app notifications failed:");
187
- return [3 /*break*/, 5];
188
- case 4:
189
- dispatch((0, appNotificationsSlice_1.setLoading)(false));
190
- return [7 /*endfinally*/];
191
- case 5: return [2 /*return*/];
192
- }
193
- });
194
- }); }, [
195
- dispatch,
196
- projectId,
197
- user,
198
- triggerFetchNotifications,
199
- limit,
200
- notificationTemplates,
201
- ]);
202
- // Update unread count
203
- var updateUnreadCount = (0, react_1.useCallback)(function () { return __awaiter(_this, void 0, void 0, function () {
204
- var count, error_4;
205
- return __generator(this, function (_a) {
206
- switch (_a.label) {
207
- case 0:
208
- if (!projectId || !user)
209
- return [2 /*return*/];
210
- _a.label = 1;
211
- case 1:
212
- _a.trys.push([1, 3, , 4]);
213
- return [4 /*yield*/, triggerCountUnread({ projectId: projectId }).unwrap()];
214
- case 2:
215
- count = _a.sent();
216
- if (typeof count === "number") {
217
- dispatch((0, appNotificationsSlice_1.setUnreadCount)(count));
218
- }
219
- return [3 /*break*/, 4];
220
- case 3:
221
- error_4 = _a.sent();
222
- (0, handleError_1.handleError)(error_4, "Failed to fetch unread count:");
223
- return [3 /*break*/, 4];
224
- case 4: return [2 /*return*/];
225
- }
226
- });
227
- }); }, [dispatch, projectId, user, triggerCountUnread]);
228
- // Mark all notifications as read action
229
- var markAllNotificationsAsRead = (0, react_1.useCallback)(function () { return __awaiter(_this, void 0, void 0, function () {
230
- var error_5;
231
- return __generator(this, function (_a) {
232
- switch (_a.label) {
233
- case 0:
234
- if (!projectId || !user) {
235
- throw new Error("No project ID or authenticated user available");
236
- }
237
- _a.label = 1;
238
- case 1:
239
- _a.trys.push([1, 3, , 4]);
240
- // Optimistic update
241
- dispatch((0, appNotificationsSlice_1.markAllAsReadLocally)());
242
- // Make API call
243
- return [4 /*yield*/, markAllNotificationsAsReadMutation({ projectId: projectId }).unwrap()];
244
- case 2:
245
- // Make API call
246
- _a.sent();
247
- return [3 /*break*/, 4];
248
- case 3:
249
- error_5 = _a.sent();
250
- (0, handleError_1.handleError)(error_5, "Failed to mark all notifications as read:");
251
- throw error_5;
252
- case 4: return [2 /*return*/];
253
- }
254
- });
255
- }); }, [dispatch, projectId, user, markAllNotificationsAsReadMutation]);
256
- return {
257
- loadMore: loadMore,
258
- markNotificationAsRead: markNotificationAsRead,
259
- markAllNotificationsAsRead: markAllNotificationsAsRead,
260
- resetAppNotifications: resetAppNotifications,
261
- fetchMoreNotifications: fetchMoreNotifications, // Internal action
262
- updateUnreadCount: updateUnreadCount,
263
- };
264
- }
265
- exports.default = useAppNotificationsActionsRedux;
266
- //# sourceMappingURL=useAppNotificationsActionsRedux.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAppNotificationsActionsRedux.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications-redux/useAppNotificationsActionsRedux.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,0EAqLC;AApND,+BAAoC;AACpC,2CAAuD;AAEvD,kFAYkD;AAClD,2EAK6C;AAC7C,uDAAsD;AACtD,oGAA8E;AAC9E,sEAAgD;AAChD,4CAA6C;AAE7C;;;GAGG;AACH,SAAgB,+BAA+B;IAA/C,iBAqLC;IApLC,IAAM,QAAQ,GAAG,IAAA,yBAAW,GAAe,CAAC;IAE5C,gCAAgC;IAChC,IAAM,kBAAkB,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAgB;QACtD,OAAA,IAAA,8CAAsB,EAAC,KAAK,CAAC;IAA7B,CAA6B,CAC9B,CAAC;IACF,IAAM,IAAI,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAgB;QACxC,OAAA,IAAA,kDAA0B,EAAC,KAAK,CAAC;IAAjC,CAAiC,CAClC,CAAC;IACF,IAAM,KAAK,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAgB;QACzC,OAAA,IAAA,mDAA2B,EAAC,KAAK,CAAC;IAAlC,CAAkC,CACnC,CAAC;IACF,IAAM,qBAAqB,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAgB;QACzD,OAAA,IAAA,mDAA2B,EAAC,KAAK,CAAC;IAAlC,CAAkC,CACnC,CAAC;IAEF,2DAA2D;IACnD,IAAW,iBAAiB,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IAC9C,IAAA,IAAI,GAAK,IAAA,yBAAY,GAAE,KAAnB,CAAoB;IAEhC,8DAA8D;IAC9D,IAAM,SAAS,GAAG,kBAAkB,IAAI,iBAAiB,CAAC;IAE1D,kBAAkB;IACX,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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,kBAAe,+BAA+B,CAAC"}
@@ -1,21 +0,0 @@
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
- }
16
- /**
17
- * Redux-powered hook that provides the exact same interface as useAppNotificationsData()
18
- * This is a drop-in replacement for the Context-based hook
19
- */
20
- declare function useAppNotificationsDataRedux({ limit, notificationTemplates, }?: UseAppNotificationsDataProps): UseAppNotificationsDataValues;
21
- export default useAppNotificationsDataRedux;
@@ -1,108 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- var react_1 = require("react");
7
- var react_redux_1 = require("react-redux");
8
- var appNotificationsSlice_1 = require("../../store/slices/appNotificationsSlice");
9
- var useAppNotificationsActionsRedux_1 = require("./useAppNotificationsActionsRedux");
10
- var useProject_1 = __importDefault(require("../projects/useProject"));
11
- var auth_redux_1 = require("../auth-redux");
12
- /**
13
- * Redux-powered hook that provides the exact same interface as useAppNotificationsData()
14
- * This is a drop-in replacement for the Context-based hook
15
- */
16
- function useAppNotificationsDataRedux(_a) {
17
- var _b = _a === void 0 ? {} : _a, _c = _b.limit, limit = _c === void 0 ? 10 : _c, notificationTemplates = _b.notificationTemplates;
18
- var dispatch = (0, react_redux_1.useDispatch)();
19
- // Get external context
20
- var projectId = (0, useProject_1.default)().projectId;
21
- var user = (0, auth_redux_1.useUserRedux)().user;
22
- // Get Redux state
23
- var appNotifications = (0, react_redux_1.useSelector)(function (state) {
24
- return (0, appNotificationsSlice_1.selectAppNotifications)(state);
25
- });
26
- var unreadAppNotificationsCount = (0, react_redux_1.useSelector)(function (state) {
27
- return (0, appNotificationsSlice_1.selectUnreadCount)(state);
28
- });
29
- var loading = (0, react_redux_1.useSelector)(function (state) {
30
- return (0, appNotificationsSlice_1.selectAppNotificationsLoading)(state);
31
- });
32
- var hasMore = (0, react_redux_1.useSelector)(function (state) {
33
- return (0, appNotificationsSlice_1.selectAppNotificationsHasMore)(state);
34
- });
35
- var currentPage = (0, react_redux_1.useSelector)(function (state) {
36
- return (0, appNotificationsSlice_1.selectAppNotificationsPage)(state);
37
- });
38
- var currentProjectId = (0, react_redux_1.useSelector)(function (state) {
39
- return (0, appNotificationsSlice_1.selectCurrentProjectId)(state);
40
- });
41
- // Get actions
42
- var _d = (0, useAppNotificationsActionsRedux_1.useAppNotificationsActionsRedux)(), loadMore = _d.loadMore, markNotificationAsRead = _d.markNotificationAsRead, markAllNotificationsAsRead = _d.markAllNotificationsAsRead, resetAppNotifications = _d.resetAppNotifications, fetchMoreNotifications = _d.fetchMoreNotifications, updateUnreadCount = _d.updateUnreadCount;
43
- // Update Redux state when props change
44
- (0, react_1.useEffect)(function () {
45
- if (projectId && projectId !== currentProjectId) {
46
- dispatch((0, appNotificationsSlice_1.setProjectContext)(projectId));
47
- }
48
- }, [dispatch, projectId, currentProjectId]);
49
- (0, react_1.useEffect)(function () {
50
- dispatch((0, appNotificationsSlice_1.setLimit)(limit));
51
- }, [dispatch, limit]);
52
- // Prevent infinite re-renders by comparing current vs new templates
53
- var currentTemplates = (0, react_redux_1.useSelector)(function (state) {
54
- return (0, appNotificationsSlice_1.selectNotificationTemplates)(state);
55
- });
56
- var templatesChanged = (0, react_1.useMemo)(function () {
57
- // If no templates provided, skip comparison
58
- if (!notificationTemplates)
59
- return false;
60
- // Deep comparison using JSON stringify
61
- return (JSON.stringify(currentTemplates) !== JSON.stringify(notificationTemplates));
62
- }, [currentTemplates, notificationTemplates]);
63
- (0, react_1.useEffect)(function () {
64
- if (notificationTemplates && templatesChanged) {
65
- dispatch((0, appNotificationsSlice_1.setNotificationTemplates)(notificationTemplates));
66
- }
67
- }, [dispatch, notificationTemplates, templatesChanged]);
68
- // Fetch unread count on mount and when dependencies change
69
- (0, react_1.useEffect)(function () {
70
- if (projectId && user) {
71
- updateUnreadCount();
72
- }
73
- }, [updateUnreadCount, projectId, user]);
74
- // Reset and fetch initial notifications when dependencies change
75
- (0, react_1.useEffect)(function () {
76
- if (projectId && user) {
77
- resetAppNotifications();
78
- }
79
- }, [resetAppNotifications, projectId, user]);
80
- // Handle page changes (load more notifications)
81
- (0, react_1.useEffect)(function () {
82
- if (currentPage > 1 && projectId && user) {
83
- fetchMoreNotifications(currentPage);
84
- }
85
- }, [currentPage, fetchMoreNotifications, projectId, user]);
86
- // Return the same interface as the original hook
87
- return (0, react_1.useMemo)(function () { return ({
88
- appNotifications: appNotifications,
89
- unreadAppNotificationsCount: unreadAppNotificationsCount,
90
- loading: loading,
91
- hasMore: hasMore,
92
- loadMore: loadMore,
93
- markNotificationAsRead: markNotificationAsRead,
94
- markAllNotificationsAsRead: markAllNotificationsAsRead,
95
- resetAppNotifications: resetAppNotifications,
96
- }); }, [
97
- appNotifications,
98
- unreadAppNotificationsCount,
99
- loading,
100
- hasMore,
101
- loadMore,
102
- markNotificationAsRead,
103
- markAllNotificationsAsRead,
104
- resetAppNotifications,
105
- ]);
106
- }
107
- exports.default = useAppNotificationsDataRedux;
108
- //# sourceMappingURL=useAppNotificationsDataRedux.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAppNotificationsDataRedux.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications-redux/useAppNotificationsDataRedux.ts"],"names":[],"mappings":";;;;;AAAA,+BAA2C;AAC3C,2CAAuD;AAGvD,kFAWkD;AAClD,qFAAoF;AACpF,sEAAgD;AAChD,4CAA6C;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,IAAA,yBAAW,GAAe,CAAC;IAE5C,uBAAuB;IACf,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IAC3B,IAAA,IAAI,GAAK,IAAA,yBAAY,GAAE,KAAnB,CAAoB;IAEhC,kBAAkB;IAClB,IAAM,gBAAgB,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAgB;QACpD,OAAA,IAAA,8CAAsB,EAAC,KAAK,CAAC;IAA7B,CAA6B,CAC9B,CAAC;IACF,IAAM,2BAA2B,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAgB;QAC/D,OAAA,IAAA,yCAAiB,EAAC,KAAK,CAAC;IAAxB,CAAwB,CACzB,CAAC;IACF,IAAM,OAAO,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAgB;QAC3C,OAAA,IAAA,qDAA6B,EAAC,KAAK,CAAC;IAApC,CAAoC,CACrC,CAAC;IACF,IAAM,OAAO,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAgB;QAC3C,OAAA,IAAA,qDAA6B,EAAC,KAAK,CAAC;IAApC,CAAoC,CACrC,CAAC;IACF,IAAM,WAAW,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAgB;QAC/C,OAAA,IAAA,kDAA0B,EAAC,KAAK,CAAC;IAAjC,CAAiC,CAClC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@
1
- import type { UseAppNotificationsDataValues } from "./useAppNotificationsDataRedux";
2
- /**
3
- * Redux-powered hook that provides the same interface as useAppNotifications()
4
- * Returns the current app notifications state and actions
5
- */
6
- export declare function useAppNotificationsRedux(): Partial<UseAppNotificationsDataValues>;
7
- export default useAppNotificationsRedux;
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useAppNotificationsRedux = useAppNotificationsRedux;
4
- var react_redux_1 = require("react-redux");
5
- var appNotificationsSlice_1 = require("../../store/slices/appNotificationsSlice");
6
- var useAppNotificationsActionsRedux_1 = require("./useAppNotificationsActionsRedux");
7
- /**
8
- * Redux-powered hook that provides the same interface as useAppNotifications()
9
- * Returns the current app notifications state and actions
10
- */
11
- function useAppNotificationsRedux() {
12
- // Select data from Redux store
13
- var appNotifications = (0, react_redux_1.useSelector)(function (state) {
14
- return (0, appNotificationsSlice_1.selectAppNotifications)(state);
15
- });
16
- var unreadAppNotificationsCount = (0, react_redux_1.useSelector)(function (state) {
17
- return (0, appNotificationsSlice_1.selectUnreadCount)(state);
18
- });
19
- var loading = (0, react_redux_1.useSelector)(function (state) {
20
- return (0, appNotificationsSlice_1.selectAppNotificationsLoading)(state);
21
- });
22
- var hasMore = (0, react_redux_1.useSelector)(function (state) {
23
- return (0, appNotificationsSlice_1.selectAppNotificationsHasMore)(state);
24
- });
25
- // Get actions
26
- var _a = (0, useAppNotificationsActionsRedux_1.useAppNotificationsActionsRedux)(), loadMore = _a.loadMore, markNotificationAsRead = _a.markNotificationAsRead, resetAppNotifications = _a.resetAppNotifications;
27
- return {
28
- appNotifications: appNotifications,
29
- unreadAppNotificationsCount: unreadAppNotificationsCount,
30
- loading: loading,
31
- hasMore: hasMore,
32
- loadMore: loadMore,
33
- markNotificationAsRead: markNotificationAsRead,
34
- resetAppNotifications: resetAppNotifications,
35
- };
36
- }
37
- exports.default = useAppNotificationsRedux;
38
- //# sourceMappingURL=useAppNotificationsRedux.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAppNotificationsRedux.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications-redux/useAppNotificationsRedux.ts"],"names":[],"mappings":";;AAeA,4DA4BC;AA3CD,2CAA0C;AAG1C,kFAKkD;AAClD,qFAAoF;AAEpF;;;GAGG;AACH,SAAgB,wBAAwB;IACtC,+BAA+B;IAC/B,IAAM,gBAAgB,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAgB;QACpD,OAAA,IAAA,8CAAsB,EAAC,KAAK,CAAC;IAA7B,CAA6B,CAC9B,CAAC;IACF,IAAM,2BAA2B,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAgB;QAC/D,OAAA,IAAA,yCAAiB,EAAC,KAAK,CAAC;IAAxB,CAAwB,CACzB,CAAC;IACF,IAAM,OAAO,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAgB;QAC3C,OAAA,IAAA,qDAA6B,EAAC,KAAK,CAAC;IAApC,CAAoC,CACrC,CAAC;IACF,IAAM,OAAO,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAgB;QAC3C,OAAA,IAAA,qDAA6B,EAAC,KAAK,CAAC;IAApC,CAAoC,CACrC,CAAC;IAEF,cAAc;IACR,IAAA,KACJ,IAAA,iEAA+B,GAAE,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,kBAAe,wBAAwB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { default as useAuthRedux, type UseAuthReduxValues } from './useAuthRedux';
2
- export { default as useUserRedux, type UseUserReduxValues } from './useUserRedux';
@@ -1,11 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.useUserRedux = exports.useAuthRedux = void 0;
7
- var useAuthRedux_1 = require("./useAuthRedux");
8
- Object.defineProperty(exports, "useAuthRedux", { enumerable: true, get: function () { return __importDefault(useAuthRedux_1).default; } });
9
- var useUserRedux_1 = require("./useUserRedux");
10
- Object.defineProperty(exports, "useUserRedux", { enumerable: true, get: function () { return __importDefault(useUserRedux_1).default; } });
11
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/auth-redux/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAkF;AAAzE,6HAAA,OAAO,OAAgB;AAChC,+CAAkF;AAAzE,6HAAA,OAAO,OAAgB"}