@replyke/core 5.1.6-beta.0 → 5.1.6-beta.2

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 (321) hide show
  1. package/dist/cjs/context/index.d.ts +0 -1
  2. package/dist/cjs/context/index.js +3 -3
  3. package/dist/cjs/context/index.js.map +1 -1
  4. package/dist/cjs/helpers/addNotificationsMessages.js +7 -7
  5. package/dist/cjs/helpers/addNotificationsMessages.js.map +1 -1
  6. package/dist/cjs/hooks/app-notifications-redux/index.d.ts +1 -2
  7. package/dist/cjs/hooks/app-notifications-redux/index.js +1 -3
  8. package/dist/cjs/hooks/app-notifications-redux/index.js.map +1 -1
  9. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.d.ts +18 -4
  10. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.js +78 -8
  11. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.js.map +1 -1
  12. package/dist/cjs/hooks/lists-redux/index.d.ts +2 -0
  13. package/dist/cjs/hooks/lists-redux/index.js +12 -0
  14. package/dist/cjs/hooks/lists-redux/index.js.map +1 -0
  15. package/dist/cjs/hooks/lists-redux/useListsActionsRedux.d.ts +21 -0
  16. package/dist/cjs/hooks/lists-redux/useListsActionsRedux.js +329 -0
  17. package/dist/cjs/hooks/lists-redux/useListsActionsRedux.js.map +1 -0
  18. package/dist/cjs/hooks/{lists/useListsData.d.ts → lists-redux/useListsRedux.d.ts} +9 -5
  19. package/dist/cjs/hooks/lists-redux/useListsRedux.js +239 -0
  20. package/dist/cjs/hooks/lists-redux/useListsRedux.js.map +1 -0
  21. package/dist/cjs/hooks/user-redux/index.d.ts +2 -0
  22. package/dist/cjs/hooks/user-redux/index.js +12 -0
  23. package/dist/cjs/hooks/user-redux/index.js.map +1 -0
  24. package/dist/cjs/hooks/user-redux/useUserActionsRedux.d.ts +12 -0
  25. package/dist/cjs/hooks/user-redux/useUserActionsRedux.js +125 -0
  26. package/dist/cjs/hooks/user-redux/useUserActionsRedux.js.map +1 -0
  27. package/dist/cjs/hooks/user-redux/useUserRedux.d.ts +18 -0
  28. package/dist/cjs/hooks/user-redux/useUserRedux.js +116 -0
  29. package/dist/cjs/hooks/user-redux/useUserRedux.js.map +1 -0
  30. package/dist/cjs/hooks/users/index.d.ts +0 -2
  31. package/dist/cjs/hooks/users/index.js +4 -5
  32. package/dist/cjs/hooks/users/index.js.map +1 -1
  33. package/dist/cjs/index.d.ts +7 -6
  34. package/dist/cjs/index.js +11 -18
  35. package/dist/cjs/index.js.map +1 -1
  36. package/dist/cjs/store/api/appNotificationsApi.d.ts +144 -141
  37. package/dist/cjs/store/api/appNotificationsApi.js +11 -0
  38. package/dist/cjs/store/api/appNotificationsApi.js.map +1 -1
  39. package/dist/cjs/store/api/baseApi.d.ts +1 -1
  40. package/dist/cjs/store/api/baseApi.js +2 -2
  41. package/dist/cjs/store/api/baseApi.js.map +1 -1
  42. package/dist/cjs/store/api/index.d.ts +1 -0
  43. package/dist/cjs/store/api/index.js +2 -1
  44. package/dist/cjs/store/api/index.js.map +1 -1
  45. package/dist/cjs/store/api/listsApi.d.ts +3044 -0
  46. package/dist/cjs/store/api/listsApi.js +288 -0
  47. package/dist/cjs/store/api/listsApi.js.map +1 -0
  48. package/dist/cjs/store/api/userApi.d.ts +183 -0
  49. package/dist/cjs/store/api/userApi.js +38 -0
  50. package/dist/cjs/store/api/userApi.js.map +1 -0
  51. package/dist/cjs/store/index.d.ts +6 -2
  52. package/dist/cjs/store/rootReducer.d.ts +6 -2
  53. package/dist/cjs/store/rootReducer.js +4 -0
  54. package/dist/cjs/store/rootReducer.js.map +1 -1
  55. package/dist/cjs/store/slices/authThunks.js +6 -0
  56. package/dist/cjs/store/slices/authThunks.js.map +1 -1
  57. package/dist/cjs/store/slices/listsSlice.d.ts +66 -0
  58. package/dist/cjs/store/slices/listsSlice.js +213 -0
  59. package/dist/cjs/store/slices/listsSlice.js.map +1 -0
  60. package/dist/cjs/store/slices/userSlice.d.ts +29 -0
  61. package/dist/cjs/store/slices/userSlice.js +87 -0
  62. package/dist/cjs/store/slices/userSlice.js.map +1 -0
  63. package/dist/esm/context/index.d.ts +0 -1
  64. package/dist/esm/context/index.js +2 -1
  65. package/dist/esm/context/index.js.map +1 -1
  66. package/dist/esm/helpers/addNotificationsMessages.js +7 -7
  67. package/dist/esm/helpers/addNotificationsMessages.js.map +1 -1
  68. package/dist/esm/hooks/app-notifications-redux/index.d.ts +1 -2
  69. package/dist/esm/hooks/app-notifications-redux/index.js +0 -1
  70. package/dist/esm/hooks/app-notifications-redux/index.js.map +1 -1
  71. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.d.ts +18 -4
  72. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.js +77 -9
  73. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.js.map +1 -1
  74. package/dist/esm/hooks/lists-redux/index.d.ts +2 -0
  75. package/dist/esm/hooks/lists-redux/index.js +4 -0
  76. package/dist/esm/hooks/lists-redux/index.js.map +1 -0
  77. package/dist/esm/hooks/lists-redux/useListsActionsRedux.d.ts +21 -0
  78. package/dist/esm/hooks/lists-redux/useListsActionsRedux.js +326 -0
  79. package/dist/esm/hooks/lists-redux/useListsActionsRedux.js.map +1 -0
  80. package/dist/esm/hooks/{lists/useListsData.d.ts → lists-redux/useListsRedux.d.ts} +9 -5
  81. package/dist/esm/hooks/lists-redux/useListsRedux.js +234 -0
  82. package/dist/esm/hooks/lists-redux/useListsRedux.js.map +1 -0
  83. package/dist/esm/hooks/user-redux/index.d.ts +2 -0
  84. package/dist/esm/hooks/user-redux/index.js +4 -0
  85. package/dist/esm/hooks/user-redux/index.js.map +1 -0
  86. package/dist/esm/hooks/user-redux/useUserActionsRedux.d.ts +12 -0
  87. package/dist/esm/hooks/user-redux/useUserActionsRedux.js +122 -0
  88. package/dist/esm/hooks/user-redux/useUserActionsRedux.js.map +1 -0
  89. package/dist/esm/hooks/user-redux/useUserRedux.d.ts +18 -0
  90. package/dist/esm/hooks/user-redux/useUserRedux.js +111 -0
  91. package/dist/esm/hooks/user-redux/useUserRedux.js.map +1 -0
  92. package/dist/esm/hooks/users/index.d.ts +0 -2
  93. package/dist/esm/hooks/users/index.js +3 -2
  94. package/dist/esm/hooks/users/index.js.map +1 -1
  95. package/dist/esm/index.d.ts +7 -6
  96. package/dist/esm/index.js +9 -7
  97. package/dist/esm/index.js.map +1 -1
  98. package/dist/esm/store/api/appNotificationsApi.d.ts +144 -141
  99. package/dist/esm/store/api/appNotificationsApi.js +11 -0
  100. package/dist/esm/store/api/appNotificationsApi.js.map +1 -1
  101. package/dist/esm/store/api/baseApi.d.ts +1 -1
  102. package/dist/esm/store/api/baseApi.js +2 -2
  103. package/dist/esm/store/api/baseApi.js.map +1 -1
  104. package/dist/esm/store/api/index.d.ts +1 -0
  105. package/dist/esm/store/api/index.js +2 -1
  106. package/dist/esm/store/api/index.js.map +1 -1
  107. package/dist/esm/store/api/listsApi.d.ts +3044 -0
  108. package/dist/esm/store/api/listsApi.js +285 -0
  109. package/dist/esm/store/api/listsApi.js.map +1 -0
  110. package/dist/esm/store/api/userApi.d.ts +183 -0
  111. package/dist/esm/store/api/userApi.js +35 -0
  112. package/dist/esm/store/api/userApi.js.map +1 -0
  113. package/dist/esm/store/index.d.ts +6 -2
  114. package/dist/esm/store/rootReducer.d.ts +6 -2
  115. package/dist/esm/store/rootReducer.js +4 -0
  116. package/dist/esm/store/rootReducer.js.map +1 -1
  117. package/dist/esm/store/slices/authThunks.js +6 -0
  118. package/dist/esm/store/slices/authThunks.js.map +1 -1
  119. package/dist/esm/store/slices/listsSlice.d.ts +66 -0
  120. package/dist/esm/store/slices/listsSlice.js +203 -0
  121. package/dist/esm/store/slices/listsSlice.js.map +1 -0
  122. package/dist/esm/store/slices/userSlice.d.ts +29 -0
  123. package/dist/esm/store/slices/userSlice.js +78 -0
  124. package/dist/esm/store/slices/userSlice.js.map +1 -0
  125. package/package.json +1 -1
  126. package/dist/cjs/context/lists-context.d.ts +0 -9
  127. package/dist/cjs/context/lists-context.js +0 -17
  128. package/dist/cjs/context/lists-context.js.map +0 -1
  129. package/dist/cjs/context/user-context.d.ts +0 -8
  130. package/dist/cjs/context/user-context.js +0 -28
  131. package/dist/cjs/context/user-context.js.map +0 -1
  132. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.d.ts +0 -21
  133. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.js +0 -108
  134. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.js.map +0 -1
  135. package/dist/cjs/hooks/lists/index.d.ts +0 -10
  136. package/dist/cjs/hooks/lists/index.js +0 -27
  137. package/dist/cjs/hooks/lists/index.js.map +0 -1
  138. package/dist/cjs/hooks/lists/useAddToList.d.ts +0 -6
  139. package/dist/cjs/hooks/lists/useAddToList.js +0 -70
  140. package/dist/cjs/hooks/lists/useAddToList.js.map +0 -1
  141. package/dist/cjs/hooks/lists/useCreateList.d.ts +0 -6
  142. package/dist/cjs/hooks/lists/useCreateList.js +0 -70
  143. package/dist/cjs/hooks/lists/useCreateList.js.map +0 -1
  144. package/dist/cjs/hooks/lists/useDeleteList.d.ts +0 -4
  145. package/dist/cjs/hooks/lists/useDeleteList.js +0 -69
  146. package/dist/cjs/hooks/lists/useDeleteList.js.map +0 -1
  147. package/dist/cjs/hooks/lists/useFetchRootList.d.ts +0 -3
  148. package/dist/cjs/hooks/lists/useFetchRootList.js +0 -69
  149. package/dist/cjs/hooks/lists/useFetchRootList.js.map +0 -1
  150. package/dist/cjs/hooks/lists/useFetchSubLists.d.ts +0 -5
  151. package/dist/cjs/hooks/lists/useFetchSubLists.js +0 -68
  152. package/dist/cjs/hooks/lists/useFetchSubLists.js.map +0 -1
  153. package/dist/cjs/hooks/lists/useIsEntitySaved.d.ts +0 -5
  154. package/dist/cjs/hooks/lists/useIsEntitySaved.js +0 -78
  155. package/dist/cjs/hooks/lists/useIsEntitySaved.js.map +0 -1
  156. package/dist/cjs/hooks/lists/useLists.d.ts +0 -2
  157. package/dist/cjs/hooks/lists/useLists.js +0 -9
  158. package/dist/cjs/hooks/lists/useLists.js.map +0 -1
  159. package/dist/cjs/hooks/lists/useListsData.js +0 -391
  160. package/dist/cjs/hooks/lists/useListsData.js.map +0 -1
  161. package/dist/cjs/hooks/lists/useRemoveFromList.d.ts +0 -6
  162. package/dist/cjs/hooks/lists/useRemoveFromList.js +0 -70
  163. package/dist/cjs/hooks/lists/useRemoveFromList.js.map +0 -1
  164. package/dist/cjs/hooks/lists/useUpdateList.d.ts +0 -8
  165. package/dist/cjs/hooks/lists/useUpdateList.js +0 -70
  166. package/dist/cjs/hooks/lists/useUpdateList.js.map +0 -1
  167. package/dist/cjs/hooks/users/useUser.d.ts +0 -2
  168. package/dist/cjs/hooks/users/useUser.js +0 -9
  169. package/dist/cjs/hooks/users/useUser.js.map +0 -1
  170. package/dist/cjs/hooks/users/useUserData.d.ts +0 -12
  171. package/dist/cjs/hooks/users/useUserData.js +0 -76
  172. package/dist/cjs/hooks/users/useUserData.js.map +0 -1
  173. package/dist/cjs/legacy/context/app-notifications-context.d.ts +0 -8
  174. package/dist/cjs/legacy/context/app-notifications-context.js +0 -28
  175. package/dist/cjs/legacy/context/app-notifications-context.js.map +0 -1
  176. package/dist/cjs/legacy/context/auth-context.d.ts +0 -8
  177. package/dist/cjs/legacy/context/auth-context.js +0 -29
  178. package/dist/cjs/legacy/context/auth-context.js.map +0 -1
  179. package/dist/cjs/legacy/hooks/app-notifications/index.d.ts +0 -5
  180. package/dist/cjs/legacy/hooks/app-notifications/index.js +0 -17
  181. package/dist/cjs/legacy/hooks/app-notifications/index.js.map +0 -1
  182. package/dist/cjs/legacy/hooks/app-notifications/useAppNotifications.d.ts +0 -2
  183. package/dist/cjs/legacy/hooks/app-notifications/useAppNotifications.js +0 -9
  184. package/dist/cjs/legacy/hooks/app-notifications/useAppNotifications.js.map +0 -1
  185. package/dist/cjs/legacy/hooks/app-notifications/useAppNotificationsData.d.ts +0 -16
  186. package/dist/cjs/legacy/hooks/app-notifications/useAppNotificationsData.js +0 -225
  187. package/dist/cjs/legacy/hooks/app-notifications/useAppNotificationsData.js.map +0 -1
  188. package/dist/cjs/legacy/hooks/app-notifications/useCountUnreadNotifications.d.ts +0 -2
  189. package/dist/cjs/legacy/hooks/app-notifications/useCountUnreadNotifications.js +0 -72
  190. package/dist/cjs/legacy/hooks/app-notifications/useCountUnreadNotifications.js.map +0 -1
  191. package/dist/cjs/legacy/hooks/app-notifications/useFetchAppNotifications.d.ts +0 -6
  192. package/dist/cjs/legacy/hooks/app-notifications/useFetchAppNotifications.js +0 -79
  193. package/dist/cjs/legacy/hooks/app-notifications/useFetchAppNotifications.js.map +0 -1
  194. package/dist/cjs/legacy/hooks/app-notifications/useMarkNotificationAsRead.d.ts +0 -2
  195. package/dist/cjs/legacy/hooks/app-notifications/useMarkNotificationAsRead.js +0 -74
  196. package/dist/cjs/legacy/hooks/app-notifications/useMarkNotificationAsRead.js.map +0 -1
  197. package/dist/cjs/legacy/hooks/auth/index.d.ts +0 -8
  198. package/dist/cjs/legacy/hooks/auth/index.js +0 -23
  199. package/dist/cjs/legacy/hooks/auth/index.js.map +0 -1
  200. package/dist/cjs/legacy/hooks/auth/useAuth.d.ts +0 -2
  201. package/dist/cjs/legacy/hooks/auth/useAuth.js +0 -9
  202. package/dist/cjs/legacy/hooks/auth/useAuth.js.map +0 -1
  203. package/dist/cjs/legacy/hooks/auth/useAuthData.d.ts +0 -41
  204. package/dist/cjs/legacy/hooks/auth/useAuthData.js +0 -271
  205. package/dist/cjs/legacy/hooks/auth/useAuthData.js.map +0 -1
  206. package/dist/cjs/legacy/hooks/auth/useChangePassword.d.ts +0 -5
  207. package/dist/cjs/legacy/hooks/auth/useChangePassword.js +0 -70
  208. package/dist/cjs/legacy/hooks/auth/useChangePassword.js.map +0 -1
  209. package/dist/cjs/legacy/hooks/auth/useRequestNewAccessToken.d.ts +0 -7
  210. package/dist/cjs/legacy/hooks/auth/useRequestNewAccessToken.js +0 -71
  211. package/dist/cjs/legacy/hooks/auth/useRequestNewAccessToken.js.map +0 -1
  212. package/dist/cjs/legacy/hooks/auth/useSignInWithEmailAndPassword.d.ts +0 -9
  213. package/dist/cjs/legacy/hooks/auth/useSignInWithEmailAndPassword.js +0 -72
  214. package/dist/cjs/legacy/hooks/auth/useSignInWithEmailAndPassword.js.map +0 -1
  215. package/dist/cjs/legacy/hooks/auth/useSignOut.d.ts +0 -4
  216. package/dist/cjs/legacy/hooks/auth/useSignOut.js +0 -67
  217. package/dist/cjs/legacy/hooks/auth/useSignOut.js.map +0 -1
  218. package/dist/cjs/legacy/hooks/auth/useSignUpWithEmailAndPassword.d.ts +0 -20
  219. package/dist/cjs/legacy/hooks/auth/useSignUpWithEmailAndPassword.js +0 -80
  220. package/dist/cjs/legacy/hooks/auth/useSignUpWithEmailAndPassword.js.map +0 -1
  221. package/dist/cjs/legacy/hooks/auth/useVerifyExternalUser.d.ts +0 -8
  222. package/dist/cjs/legacy/hooks/auth/useVerifyExternalUser.js +0 -70
  223. package/dist/cjs/legacy/hooks/auth/useVerifyExternalUser.js.map +0 -1
  224. package/dist/esm/context/lists-context.d.ts +0 -9
  225. package/dist/esm/context/lists-context.js +0 -10
  226. package/dist/esm/context/lists-context.js.map +0 -1
  227. package/dist/esm/context/user-context.d.ts +0 -8
  228. package/dist/esm/context/user-context.js +0 -21
  229. package/dist/esm/context/user-context.js.map +0 -1
  230. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.d.ts +0 -21
  231. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.js +0 -103
  232. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.js.map +0 -1
  233. package/dist/esm/hooks/lists/index.d.ts +0 -10
  234. package/dist/esm/hooks/lists/index.js +0 -11
  235. package/dist/esm/hooks/lists/index.js.map +0 -1
  236. package/dist/esm/hooks/lists/useAddToList.d.ts +0 -6
  237. package/dist/esm/hooks/lists/useAddToList.js +0 -65
  238. package/dist/esm/hooks/lists/useAddToList.js.map +0 -1
  239. package/dist/esm/hooks/lists/useCreateList.d.ts +0 -6
  240. package/dist/esm/hooks/lists/useCreateList.js +0 -65
  241. package/dist/esm/hooks/lists/useCreateList.js.map +0 -1
  242. package/dist/esm/hooks/lists/useDeleteList.d.ts +0 -4
  243. package/dist/esm/hooks/lists/useDeleteList.js +0 -64
  244. package/dist/esm/hooks/lists/useDeleteList.js.map +0 -1
  245. package/dist/esm/hooks/lists/useFetchRootList.d.ts +0 -3
  246. package/dist/esm/hooks/lists/useFetchRootList.js +0 -64
  247. package/dist/esm/hooks/lists/useFetchRootList.js.map +0 -1
  248. package/dist/esm/hooks/lists/useFetchSubLists.d.ts +0 -5
  249. package/dist/esm/hooks/lists/useFetchSubLists.js +0 -63
  250. package/dist/esm/hooks/lists/useFetchSubLists.js.map +0 -1
  251. package/dist/esm/hooks/lists/useIsEntitySaved.d.ts +0 -5
  252. package/dist/esm/hooks/lists/useIsEntitySaved.js +0 -73
  253. package/dist/esm/hooks/lists/useIsEntitySaved.js.map +0 -1
  254. package/dist/esm/hooks/lists/useLists.d.ts +0 -2
  255. package/dist/esm/hooks/lists/useLists.js +0 -6
  256. package/dist/esm/hooks/lists/useLists.js.map +0 -1
  257. package/dist/esm/hooks/lists/useListsData.js +0 -386
  258. package/dist/esm/hooks/lists/useListsData.js.map +0 -1
  259. package/dist/esm/hooks/lists/useRemoveFromList.d.ts +0 -6
  260. package/dist/esm/hooks/lists/useRemoveFromList.js +0 -65
  261. package/dist/esm/hooks/lists/useRemoveFromList.js.map +0 -1
  262. package/dist/esm/hooks/lists/useUpdateList.d.ts +0 -8
  263. package/dist/esm/hooks/lists/useUpdateList.js +0 -65
  264. package/dist/esm/hooks/lists/useUpdateList.js.map +0 -1
  265. package/dist/esm/hooks/users/useUser.d.ts +0 -2
  266. package/dist/esm/hooks/users/useUser.js +0 -6
  267. package/dist/esm/hooks/users/useUser.js.map +0 -1
  268. package/dist/esm/hooks/users/useUserData.d.ts +0 -12
  269. package/dist/esm/hooks/users/useUserData.js +0 -71
  270. package/dist/esm/hooks/users/useUserData.js.map +0 -1
  271. package/dist/esm/legacy/context/app-notifications-context.d.ts +0 -8
  272. package/dist/esm/legacy/context/app-notifications-context.js +0 -21
  273. package/dist/esm/legacy/context/app-notifications-context.js.map +0 -1
  274. package/dist/esm/legacy/context/auth-context.d.ts +0 -8
  275. package/dist/esm/legacy/context/auth-context.js +0 -22
  276. package/dist/esm/legacy/context/auth-context.js.map +0 -1
  277. package/dist/esm/legacy/hooks/app-notifications/index.d.ts +0 -5
  278. package/dist/esm/legacy/hooks/app-notifications/index.js +0 -6
  279. package/dist/esm/legacy/hooks/app-notifications/index.js.map +0 -1
  280. package/dist/esm/legacy/hooks/app-notifications/useAppNotifications.d.ts +0 -2
  281. package/dist/esm/legacy/hooks/app-notifications/useAppNotifications.js +0 -6
  282. package/dist/esm/legacy/hooks/app-notifications/useAppNotifications.js.map +0 -1
  283. package/dist/esm/legacy/hooks/app-notifications/useAppNotificationsData.d.ts +0 -16
  284. package/dist/esm/legacy/hooks/app-notifications/useAppNotificationsData.js +0 -220
  285. package/dist/esm/legacy/hooks/app-notifications/useAppNotificationsData.js.map +0 -1
  286. package/dist/esm/legacy/hooks/app-notifications/useCountUnreadNotifications.d.ts +0 -2
  287. package/dist/esm/legacy/hooks/app-notifications/useCountUnreadNotifications.js +0 -67
  288. package/dist/esm/legacy/hooks/app-notifications/useCountUnreadNotifications.js.map +0 -1
  289. package/dist/esm/legacy/hooks/app-notifications/useFetchAppNotifications.d.ts +0 -6
  290. package/dist/esm/legacy/hooks/app-notifications/useFetchAppNotifications.js +0 -74
  291. package/dist/esm/legacy/hooks/app-notifications/useFetchAppNotifications.js.map +0 -1
  292. package/dist/esm/legacy/hooks/app-notifications/useMarkNotificationAsRead.d.ts +0 -2
  293. package/dist/esm/legacy/hooks/app-notifications/useMarkNotificationAsRead.js +0 -69
  294. package/dist/esm/legacy/hooks/app-notifications/useMarkNotificationAsRead.js.map +0 -1
  295. package/dist/esm/legacy/hooks/auth/index.d.ts +0 -8
  296. package/dist/esm/legacy/hooks/auth/index.js +0 -9
  297. package/dist/esm/legacy/hooks/auth/index.js.map +0 -1
  298. package/dist/esm/legacy/hooks/auth/useAuth.d.ts +0 -2
  299. package/dist/esm/legacy/hooks/auth/useAuth.js +0 -6
  300. package/dist/esm/legacy/hooks/auth/useAuth.js.map +0 -1
  301. package/dist/esm/legacy/hooks/auth/useAuthData.d.ts +0 -41
  302. package/dist/esm/legacy/hooks/auth/useAuthData.js +0 -266
  303. package/dist/esm/legacy/hooks/auth/useAuthData.js.map +0 -1
  304. package/dist/esm/legacy/hooks/auth/useChangePassword.d.ts +0 -5
  305. package/dist/esm/legacy/hooks/auth/useChangePassword.js +0 -65
  306. package/dist/esm/legacy/hooks/auth/useChangePassword.js.map +0 -1
  307. package/dist/esm/legacy/hooks/auth/useRequestNewAccessToken.d.ts +0 -7
  308. package/dist/esm/legacy/hooks/auth/useRequestNewAccessToken.js +0 -66
  309. package/dist/esm/legacy/hooks/auth/useRequestNewAccessToken.js.map +0 -1
  310. package/dist/esm/legacy/hooks/auth/useSignInWithEmailAndPassword.d.ts +0 -9
  311. package/dist/esm/legacy/hooks/auth/useSignInWithEmailAndPassword.js +0 -67
  312. package/dist/esm/legacy/hooks/auth/useSignInWithEmailAndPassword.js.map +0 -1
  313. package/dist/esm/legacy/hooks/auth/useSignOut.d.ts +0 -4
  314. package/dist/esm/legacy/hooks/auth/useSignOut.js +0 -62
  315. package/dist/esm/legacy/hooks/auth/useSignOut.js.map +0 -1
  316. package/dist/esm/legacy/hooks/auth/useSignUpWithEmailAndPassword.d.ts +0 -20
  317. package/dist/esm/legacy/hooks/auth/useSignUpWithEmailAndPassword.js +0 -75
  318. package/dist/esm/legacy/hooks/auth/useSignUpWithEmailAndPassword.js.map +0 -1
  319. package/dist/esm/legacy/hooks/auth/useVerifyExternalUser.d.ts +0 -8
  320. package/dist/esm/legacy/hooks/auth/useVerifyExternalUser.js +0 -65
  321. package/dist/esm/legacy/hooks/auth/useVerifyExternalUser.js.map +0 -1
@@ -2,5 +2,4 @@ export { ReplykeProvider } from "./replyke-context";
2
2
  export { ReplykeStoreProvider } from "./replyke-store-context";
3
3
  export { EntityListProvider } from "./entity-list-context";
4
4
  export { EntityProvider } from "./entity-context";
5
- export { ListsProvider } from "./lists-context";
6
5
  export { CommentSectionProvider } from "./comment-section-context";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CommentSectionProvider = exports.ListsProvider = exports.EntityProvider = exports.EntityListProvider = exports.ReplykeStoreProvider = exports.ReplykeProvider = void 0;
3
+ exports.CommentSectionProvider = exports.EntityProvider = exports.EntityListProvider = exports.ReplykeStoreProvider = exports.ReplykeProvider = void 0;
4
4
  var replyke_context_1 = require("./replyke-context");
5
5
  Object.defineProperty(exports, "ReplykeProvider", { enumerable: true, get: function () { return replyke_context_1.ReplykeProvider; } });
6
6
  var replyke_store_context_1 = require("./replyke-store-context");
@@ -9,8 +9,8 @@ var entity_list_context_1 = require("./entity-list-context");
9
9
  Object.defineProperty(exports, "EntityListProvider", { enumerable: true, get: function () { return entity_list_context_1.EntityListProvider; } });
10
10
  var entity_context_1 = require("./entity-context");
11
11
  Object.defineProperty(exports, "EntityProvider", { enumerable: true, get: function () { return entity_context_1.EntityProvider; } });
12
- var lists_context_1 = require("./lists-context");
13
- Object.defineProperty(exports, "ListsProvider", { enumerable: true, get: function () { return lists_context_1.ListsProvider; } });
12
+ // TODO: Create Redux-based ListsProvider
13
+ // export { ListsProvider } from "../legacy/context/lists-context";
14
14
  var comment_section_context_1 = require("./comment-section-context");
15
15
  Object.defineProperty(exports, "CommentSectionProvider", { enumerable: true, get: function () { return comment_section_context_1.CommentSectionProvider; } });
16
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/context/index.ts"],"names":[],"mappings":";;;AAAA,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,iEAA+D;AAAtD,6HAAA,oBAAoB,OAAA;AAC7B,6DAA2D;AAAlD,yHAAA,kBAAkB,OAAA;AAC3B,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,qEAAmE;AAA1D,iIAAA,sBAAsB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/context/index.ts"],"names":[],"mappings":";;;AAAA,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,iEAA+D;AAAtD,6HAAA,oBAAoB,OAAA;AAC7B,6DAA2D;AAAlD,yHAAA,kBAAkB,OAAA;AAC3B,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,yCAAyC;AACzC,mEAAmE;AACnE,qEAAmE;AAA1D,iIAAA,sBAAsB,OAAA"}
@@ -58,25 +58,25 @@ exports.default = (function (notifications, notificationTemplates) {
58
58
  var content;
59
59
  switch (notification.type) {
60
60
  case "entity-comment":
61
- (_a = configureMessage(notification, "$userName commented on your post", "$commentContent", notificationTemplates === null || notificationTemplates === void 0 ? void 0 : notificationTemplates.entityComment), title = _a.title, content = _a.content);
61
+ (_a = configureMessage(notification, "$initiatorUsername commented on your post", "$commentContent", notificationTemplates === null || notificationTemplates === void 0 ? void 0 : notificationTemplates.entityComment), title = _a.title, content = _a.content);
62
62
  break;
63
63
  case "comment-reply":
64
- (_b = configureMessage(notification, "$userName replied to your comment", "$replyContent", notificationTemplates === null || notificationTemplates === void 0 ? void 0 : notificationTemplates.commentReply), title = _b.title, content = _b.content);
64
+ (_b = configureMessage(notification, "$initiatorUsername replied to your comment", "$replyContent", notificationTemplates === null || notificationTemplates === void 0 ? void 0 : notificationTemplates.commentReply), title = _b.title, content = _b.content);
65
65
  break;
66
66
  case "entity-mention":
67
- (_c = configureMessage(notification, "$userName mentioned you in their post", "$entityTitle", notificationTemplates === null || notificationTemplates === void 0 ? void 0 : notificationTemplates.entityMention), title = _c.title, content = _c.content);
67
+ (_c = configureMessage(notification, "$initiatorUsername mentioned you in their post", "$entityTitle", notificationTemplates === null || notificationTemplates === void 0 ? void 0 : notificationTemplates.entityMention), title = _c.title, content = _c.content);
68
68
  break;
69
69
  case "comment-mention":
70
- (_d = configureMessage(notification, "$userName mentioned you in their comment", "$commentContent", notificationTemplates === null || notificationTemplates === void 0 ? void 0 : notificationTemplates.commentMention), title = _d.title, content = _d.content);
70
+ (_d = configureMessage(notification, "$initiatorUsername mentioned you in their comment", "$commentContent", notificationTemplates === null || notificationTemplates === void 0 ? void 0 : notificationTemplates.commentMention), title = _d.title, content = _d.content);
71
71
  break;
72
72
  case "entity-upvote":
73
- (_e = configureMessage(notification, "$userName upvoted your post", "", notificationTemplates === null || notificationTemplates === void 0 ? void 0 : notificationTemplates.entityUpvote), title = _e.title, content = _e.content);
73
+ (_e = configureMessage(notification, "$initiatorUsername upvoted your post", "", notificationTemplates === null || notificationTemplates === void 0 ? void 0 : notificationTemplates.entityUpvote), title = _e.title, content = _e.content);
74
74
  break;
75
75
  case "comment-upvote":
76
- (_f = configureMessage(notification, "$userName upvoted your comment on", "$commentContent", notificationTemplates === null || notificationTemplates === void 0 ? void 0 : notificationTemplates.commentUpvote), title = _f.title, content = _f.content);
76
+ (_f = configureMessage(notification, "$initiatorUsername upvoted your comment", "$commentContent", notificationTemplates === null || notificationTemplates === void 0 ? void 0 : notificationTemplates.commentUpvote), title = _f.title, content = _f.content);
77
77
  break;
78
78
  case "new-follow":
79
- (_g = configureMessage(notification, "$userName started following you", "", notificationTemplates === null || notificationTemplates === void 0 ? void 0 : notificationTemplates.newFollow), title = _g.title, content = _g.content);
79
+ (_g = configureMessage(notification, "$initiatorUsername started following you", "", notificationTemplates === null || notificationTemplates === void 0 ? void 0 : notificationTemplates.newFollow), title = _g.title, content = _g.content);
80
80
  break;
81
81
  default:
82
82
  break;
@@ -1 +1 @@
1
- {"version":3,"file":"addNotificationsMessages.js","sourceRoot":"","sources":["../../../src/helpers/addNotificationsMessages.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAKA,6CAA4C;AAE5C,sDAAsD;AACtD,IAAM,wBAAwB,GAAG,UAC/B,QAAgB,EAChB,SAAiC;IAEjC,OAAO,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,CACrC,UAAC,MAAM,EAAE,EAAY;YAAX,GAAG,QAAA,EAAE,KAAK,QAAA;QAClB,OAAA,MAAM,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,aAAM,GAAG,CAAE,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC;IAAnD,CAAmD,EACrD,QAAQ,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,mDAAmD;AACnD,IAAM,uBAAuB,GAAG,UAAC,YAAiB;IAChD,OAAO;QACL,aAAa,EAAE,IAAA,yBAAW,EACxB;YACE,EAAE,EAAE,YAAY,CAAC,QAAQ,CAAC,WAAW;YACrC,IAAI,EAAE,YAAY,CAAC,QAAQ,CAAC,aAAa;YACzC,QAAQ,EAAE,YAAY,CAAC,QAAQ,CAAC,iBAAiB;SAClD,EACD,MAAM,CACP;QACD,iBAAiB,EAAE,IAAA,yBAAW,EAC5B;YACE,EAAE,EAAE,YAAY,CAAC,QAAQ,CAAC,WAAW;YACrC,IAAI,EAAE,YAAY,CAAC,QAAQ,CAAC,aAAa;YACzC,QAAQ,EAAE,YAAY,CAAC,QAAQ,CAAC,iBAAiB;SAClD,EACD,UAAU,CACX;QACD,WAAW,EAAE,YAAY,CAAC,QAAQ,CAAC,WAAW,IAAI,EAAE;QACpD,aAAa,EAAE,YAAY,CAAC,QAAQ,CAAC,aAAa,IAAI,EAAE;QACxD,cAAc,EAAE,YAAY,CAAC,QAAQ,CAAC,cAAc,IAAI,EAAE;QAC1D,YAAY,EAAE,YAAY,CAAC,QAAQ,CAAC,YAAY,IAAI,EAAE;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,YAAY,KACf,KAAK,OAAA,EACL,OAAO,SAAA,GACkB,CAAC;IAC9B,CAAC,CAAC,CAAC;AACL,CAAC,EAAC"}
@@ -1,4 +1,3 @@
1
1
  export { default as useAppNotificationsRedux } from "./useAppNotificationsRedux";
2
- export { default as useAppNotificationsDataRedux } from "./useAppNotificationsDataRedux";
3
2
  export { default as useAppNotificationsActionsRedux } from "./useAppNotificationsActionsRedux";
4
- export type { UseAppNotificationsDataProps, UseAppNotificationsDataValues, } from "./useAppNotificationsDataRedux";
3
+ export type { UseAppNotificationsReduxProps, UseAppNotificationsReduxValues, } from "./useAppNotificationsRedux";
@@ -3,12 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.useAppNotificationsActionsRedux = exports.useAppNotificationsDataRedux = exports.useAppNotificationsRedux = void 0;
6
+ exports.useAppNotificationsActionsRedux = exports.useAppNotificationsRedux = void 0;
7
7
  // Export Redux-powered app notifications hooks
8
8
  var useAppNotificationsRedux_1 = require("./useAppNotificationsRedux");
9
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
10
  var useAppNotificationsActionsRedux_1 = require("./useAppNotificationsActionsRedux");
13
11
  Object.defineProperty(exports, "useAppNotificationsActionsRedux", { enumerable: true, get: function () { return __importDefault(useAppNotificationsActionsRedux_1).default; } });
14
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
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
+ {"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,qFAA+F;AAAtF,mKAAA,OAAO,OAAmC"}
@@ -1,7 +1,21 @@
1
- import type { UseAppNotificationsDataValues } from "./useAppNotificationsDataRedux";
1
+ import { NotificationTemplates, UnifiedAppNotification } from "../../interfaces/models/AppNotification";
2
+ export interface UseAppNotificationsReduxProps {
3
+ limit?: number;
4
+ notificationTemplates?: Partial<NotificationTemplates>;
5
+ }
6
+ export interface UseAppNotificationsReduxValues {
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
- * Redux-powered hook that provides the same interface as useAppNotifications()
4
- * Returns the current app notifications state and actions
17
+ * Redux-powered hook that provides the exact same interface as useAppNotificationsData()
18
+ * This is a drop-in replacement for the Context-based hook
5
19
  */
6
- export declare function useAppNotificationsRedux(): Partial<UseAppNotificationsDataValues>;
20
+ declare function useAppNotificationsRedux({ limit, notificationTemplates, }?: UseAppNotificationsReduxProps): UseAppNotificationsReduxValues;
7
21
  export default useAppNotificationsRedux;
@@ -1,15 +1,25 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useAppNotificationsRedux = useAppNotificationsRedux;
6
+ var react_1 = require("react");
4
7
  var react_redux_1 = require("react-redux");
5
8
  var appNotificationsSlice_1 = require("../../store/slices/appNotificationsSlice");
6
9
  var useAppNotificationsActionsRedux_1 = require("./useAppNotificationsActionsRedux");
10
+ var useProject_1 = __importDefault(require("../projects/useProject"));
11
+ var auth_redux_1 = require("../auth-redux");
7
12
  /**
8
- * Redux-powered hook that provides the same interface as useAppNotifications()
9
- * Returns the current app notifications state and actions
13
+ * Redux-powered hook that provides the exact same interface as useAppNotificationsData()
14
+ * This is a drop-in replacement for the Context-based hook
10
15
  */
11
- function useAppNotificationsRedux() {
12
- // Select data from Redux store
16
+ function useAppNotificationsRedux(_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
13
23
  var appNotifications = (0, react_redux_1.useSelector)(function (state) {
14
24
  return (0, appNotificationsSlice_1.selectAppNotifications)(state);
15
25
  });
@@ -22,17 +32,77 @@ function useAppNotificationsRedux() {
22
32
  var hasMore = (0, react_redux_1.useSelector)(function (state) {
23
33
  return (0, appNotificationsSlice_1.selectAppNotificationsHasMore)(state);
24
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
+ });
25
41
  // Get actions
26
- var _a = (0, useAppNotificationsActionsRedux_1.useAppNotificationsActionsRedux)(), loadMore = _a.loadMore, markNotificationAsRead = _a.markNotificationAsRead, resetAppNotifications = _a.resetAppNotifications;
27
- return {
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 ({
28
88
  appNotifications: appNotifications,
29
89
  unreadAppNotificationsCount: unreadAppNotificationsCount,
30
90
  loading: loading,
31
91
  hasMore: hasMore,
32
92
  loadMore: loadMore,
33
93
  markNotificationAsRead: markNotificationAsRead,
94
+ markAllNotificationsAsRead: markAllNotificationsAsRead,
34
95
  resetAppNotifications: resetAppNotifications,
35
- };
96
+ }); }, [
97
+ appNotifications,
98
+ unreadAppNotificationsCount,
99
+ loading,
100
+ hasMore,
101
+ loadMore,
102
+ markNotificationAsRead,
103
+ markAllNotificationsAsRead,
104
+ resetAppNotifications,
105
+ ]);
36
106
  }
37
107
  exports.default = useAppNotificationsRedux;
38
108
  //# sourceMappingURL=useAppNotificationsRedux.js.map
@@ -1 +1 @@
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
+ {"version":3,"file":"useAppNotificationsRedux.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications-redux/useAppNotificationsRedux.ts"],"names":[],"mappings":";;;;;AAAA,+BAA2C;AAC3C,2CAAuD;AAGvD,kFAWkD;AAClD,qFAAoF;AACpF,sEAAgD;AAChD,4CAA6C;AAmB7C;;;GAGG;AACH,SAAS,wBAAwB,CAAC,EAGG;QAHH,qBAGC,EAAE,KAAA,EAFnC,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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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,kBAAe,wBAAwB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { useListsActionsRedux } from "./useListsActionsRedux";
2
+ export { default as useListsRedux, type UseListsReduxProps, type UseListsReduxValues, } from "./useListsRedux";
@@ -0,0 +1,12 @@
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.useListsRedux = exports.useListsActionsRedux = void 0;
7
+ // Export Redux-powered lists hooks
8
+ var useListsActionsRedux_1 = require("./useListsActionsRedux");
9
+ Object.defineProperty(exports, "useListsActionsRedux", { enumerable: true, get: function () { return useListsActionsRedux_1.useListsActionsRedux; } });
10
+ var useListsRedux_1 = require("./useListsRedux");
11
+ Object.defineProperty(exports, "useListsRedux", { enumerable: true, get: function () { return __importDefault(useListsRedux_1).default; } });
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/lists-redux/index.ts"],"names":[],"mappings":";;;;;;AAAA,mCAAmC;AACnC,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,iDAIyB;AAHvB,+HAAA,OAAO,OAAiB"}
@@ -0,0 +1,21 @@
1
+ import type { List } from "../../interfaces/models/List";
2
+ /**
3
+ * Redux-powered hook that provides all lists actions
4
+ * This replaces the individual hooks and provides a centralized way to manage lists
5
+ */
6
+ export declare function useListsActionsRedux(): {
7
+ openList: (list: List) => void;
8
+ goBack: () => void;
9
+ goToRoot: () => void;
10
+ fetchRootList: (projectId: string) => Promise<void>;
11
+ fetchSubLists: (projectId: string, listId: string) => Promise<void>;
12
+ createList: (projectId: string, parentListId: string, listName: string) => Promise<void>;
13
+ updateList: (projectId: string, listId: string, update: Partial<{
14
+ name: string;
15
+ }>) => Promise<void>;
16
+ deleteList: (projectId: string, list: List) => Promise<void>;
17
+ addToList: (projectId: string, listId: string, entityId: string) => Promise<void>;
18
+ removeFromList: (projectId: string, listId: string, entityId: string) => Promise<void>;
19
+ resetLists: () => void;
20
+ };
21
+ export default useListsActionsRedux;
@@ -0,0 +1,329 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15
+ return new (P || (P = Promise))(function (resolve, reject) {
16
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
17
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
18
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
19
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
20
+ });
21
+ };
22
+ var __generator = (this && this.__generator) || function (thisArg, body) {
23
+ 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);
24
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
+ function verb(n) { return function (v) { return step([n, v]); }; }
26
+ function step(op) {
27
+ if (f) throw new TypeError("Generator is already executing.");
28
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
29
+ 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;
30
+ if (y = 0, t) op = [op[0] & 2, t.value];
31
+ switch (op[0]) {
32
+ case 0: case 1: t = op; break;
33
+ case 4: _.label++; return { value: op[1], done: false };
34
+ case 5: _.label++; y = op[1]; op = [0]; continue;
35
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
36
+ default:
37
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
38
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
39
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
40
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
41
+ if (t[2]) _.ops.pop();
42
+ _.trys.pop(); continue;
43
+ }
44
+ op = body.call(thisArg, _);
45
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
46
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
+ }
48
+ };
49
+ Object.defineProperty(exports, "__esModule", { value: true });
50
+ exports.useListsActionsRedux = useListsActionsRedux;
51
+ var react_1 = require("react");
52
+ var react_redux_1 = require("react-redux");
53
+ var listsSlice_1 = require("../../store/slices/listsSlice");
54
+ var listsApi_1 = require("../../store/api/listsApi");
55
+ var handleError_1 = require("../../utils/handleError");
56
+ /**
57
+ * Redux-powered hook that provides all lists actions
58
+ * This replaces the individual hooks and provides a centralized way to manage lists
59
+ */
60
+ function useListsActionsRedux() {
61
+ var _this = this;
62
+ var dispatch = (0, react_redux_1.useDispatch)();
63
+ // RTK Query hooks
64
+ var fetchRootListQuery = (0, listsApi_1.useLazyFetchRootListQuery)()[0];
65
+ var fetchSubListsQuery = (0, listsApi_1.useLazyFetchSubListsQuery)()[0];
66
+ var createListMutation = (0, listsApi_1.useCreateListMutation)()[0];
67
+ var updateListMutation = (0, listsApi_1.useUpdateListMutation)()[0];
68
+ var deleteListMutation = (0, listsApi_1.useDeleteListMutation)()[0];
69
+ var addToListMutation = (0, listsApi_1.useAddToListMutation)()[0];
70
+ var removeFromListMutation = (0, listsApi_1.useRemoveFromListMutation)()[0];
71
+ // Navigation actions
72
+ var openListAction = (0, react_1.useCallback)(function (list) {
73
+ dispatch((0, listsSlice_1.openList)(list));
74
+ }, [dispatch]);
75
+ var goBackAction = (0, react_1.useCallback)(function () {
76
+ dispatch((0, listsSlice_1.goBack)());
77
+ }, [dispatch]);
78
+ var goToRootAction = (0, react_1.useCallback)(function () {
79
+ dispatch((0, listsSlice_1.goToRoot)());
80
+ }, [dispatch]);
81
+ // Fetch root list
82
+ var fetchRootList = (0, react_1.useCallback)(function (projectId) { return __awaiter(_this, void 0, void 0, function () {
83
+ var result, rootList, err_1;
84
+ return __generator(this, function (_a) {
85
+ switch (_a.label) {
86
+ case 0:
87
+ if (!projectId) {
88
+ console.warn("Can't fetch root list without projectId.");
89
+ return [2 /*return*/];
90
+ }
91
+ dispatch((0, listsSlice_1.setLoading)(true));
92
+ _a.label = 1;
93
+ case 1:
94
+ _a.trys.push([1, 3, 4, 5]);
95
+ return [4 /*yield*/, fetchRootListQuery({ projectId: projectId }).unwrap()];
96
+ case 2:
97
+ result = _a.sent();
98
+ if (result) {
99
+ rootList = __assign(__assign({}, result), { parentId: null });
100
+ dispatch((0, listsSlice_1.setCurrentList)(rootList));
101
+ }
102
+ return [3 /*break*/, 5];
103
+ case 3:
104
+ err_1 = _a.sent();
105
+ (0, handleError_1.handleError)(err_1, "Failed fetching root list");
106
+ dispatch((0, listsSlice_1.handleError)());
107
+ return [3 /*break*/, 5];
108
+ case 4:
109
+ dispatch((0, listsSlice_1.setLoading)(false));
110
+ return [7 /*endfinally*/];
111
+ case 5: return [2 /*return*/];
112
+ }
113
+ });
114
+ }); }, [dispatch, fetchRootListQuery]);
115
+ // Fetch sub-lists
116
+ var fetchSubLists = (0, react_1.useCallback)(function (projectId, listId) { return __awaiter(_this, void 0, void 0, function () {
117
+ var result, err_2;
118
+ return __generator(this, function (_a) {
119
+ switch (_a.label) {
120
+ case 0:
121
+ if (!projectId || !listId) {
122
+ console.warn("Can't fetch sub-lists without projectId and listId.");
123
+ return [2 /*return*/];
124
+ }
125
+ dispatch((0, listsSlice_1.setLoading)(true));
126
+ _a.label = 1;
127
+ case 1:
128
+ _a.trys.push([1, 3, 4, 5]);
129
+ return [4 /*yield*/, fetchSubListsQuery({ projectId: projectId, listId: listId }).unwrap()];
130
+ case 2:
131
+ result = _a.sent();
132
+ if (result) {
133
+ dispatch((0, listsSlice_1.setSubLists)({ lists: result, parentListId: listId }));
134
+ }
135
+ return [3 /*break*/, 5];
136
+ case 3:
137
+ err_2 = _a.sent();
138
+ (0, handleError_1.handleError)(err_2, "Failed fetching sub-lists");
139
+ dispatch((0, listsSlice_1.handleError)());
140
+ return [3 /*break*/, 5];
141
+ case 4:
142
+ dispatch((0, listsSlice_1.setLoading)(false));
143
+ return [7 /*endfinally*/];
144
+ case 5: return [2 /*return*/];
145
+ }
146
+ });
147
+ }); }, [dispatch, fetchSubListsQuery]);
148
+ // Create list
149
+ var createList = (0, react_1.useCallback)(function (projectId, parentListId, listName) { return __awaiter(_this, void 0, void 0, function () {
150
+ var result, err_3;
151
+ return __generator(this, function (_a) {
152
+ switch (_a.label) {
153
+ case 0:
154
+ if (!projectId || !parentListId || !listName) {
155
+ console.error("Missing required parameters for creating list.");
156
+ return [2 /*return*/];
157
+ }
158
+ _a.label = 1;
159
+ case 1:
160
+ _a.trys.push([1, 3, , 4]);
161
+ return [4 /*yield*/, createListMutation({
162
+ projectId: projectId,
163
+ parentListId: parentListId,
164
+ listName: listName,
165
+ }).unwrap()];
166
+ case 2:
167
+ result = _a.sent();
168
+ if (result) {
169
+ dispatch((0, listsSlice_1.addNewListAndNavigate)(result));
170
+ }
171
+ return [3 /*break*/, 4];
172
+ case 3:
173
+ err_3 = _a.sent();
174
+ (0, handleError_1.handleError)(err_3, "Failed to create list");
175
+ return [3 /*break*/, 4];
176
+ case 4: return [2 /*return*/];
177
+ }
178
+ });
179
+ }); }, [createListMutation, dispatch]);
180
+ // Update list
181
+ var updateList = (0, react_1.useCallback)(function (projectId, listId, update) { return __awaiter(_this, void 0, void 0, function () {
182
+ var result, err_4;
183
+ return __generator(this, function (_a) {
184
+ switch (_a.label) {
185
+ case 0:
186
+ if (!projectId || !listId) {
187
+ console.error("Missing required parameters for updating list.");
188
+ return [2 /*return*/];
189
+ }
190
+ _a.label = 1;
191
+ case 1:
192
+ _a.trys.push([1, 3, , 4]);
193
+ return [4 /*yield*/, updateListMutation({
194
+ projectId: projectId,
195
+ listId: listId,
196
+ update: update,
197
+ }).unwrap()];
198
+ case 2:
199
+ result = _a.sent();
200
+ if (result) {
201
+ // Check if it's the current list or a sub-list
202
+ dispatch((0, listsSlice_1.updateListInSubLists)(result));
203
+ }
204
+ return [3 /*break*/, 4];
205
+ case 3:
206
+ err_4 = _a.sent();
207
+ (0, handleError_1.handleError)(err_4, "Failed to update list");
208
+ return [3 /*break*/, 4];
209
+ case 4: return [2 /*return*/];
210
+ }
211
+ });
212
+ }); }, [updateListMutation, dispatch]);
213
+ // Delete list
214
+ var deleteList = (0, react_1.useCallback)(function (projectId, list) { return __awaiter(_this, void 0, void 0, function () {
215
+ var err_5;
216
+ return __generator(this, function (_a) {
217
+ switch (_a.label) {
218
+ case 0:
219
+ if (!projectId || !list) {
220
+ console.error("Missing required parameters for deleting list.");
221
+ return [2 /*return*/];
222
+ }
223
+ _a.label = 1;
224
+ case 1:
225
+ _a.trys.push([1, 3, , 4]);
226
+ return [4 /*yield*/, deleteListMutation({
227
+ projectId: projectId,
228
+ listId: list.id,
229
+ }).unwrap()];
230
+ case 2:
231
+ _a.sent();
232
+ dispatch((0, listsSlice_1.handleListDeletion)({ listId: list.id, parentId: list.parentId }));
233
+ return [3 /*break*/, 4];
234
+ case 3:
235
+ err_5 = _a.sent();
236
+ (0, handleError_1.handleError)(err_5, "Failed to delete list");
237
+ return [3 /*break*/, 4];
238
+ case 4: return [2 /*return*/];
239
+ }
240
+ });
241
+ }); }, [deleteListMutation, dispatch]);
242
+ // Add entity to list
243
+ var addToList = (0, react_1.useCallback)(function (projectId, listId, entityId) { return __awaiter(_this, void 0, void 0, function () {
244
+ var result, err_6;
245
+ return __generator(this, function (_a) {
246
+ switch (_a.label) {
247
+ case 0:
248
+ if (!projectId || !listId || !entityId) {
249
+ console.error("Missing required parameters for adding to list.");
250
+ return [2 /*return*/];
251
+ }
252
+ _a.label = 1;
253
+ case 1:
254
+ _a.trys.push([1, 3, , 4]);
255
+ return [4 /*yield*/, addToListMutation({
256
+ projectId: projectId,
257
+ listId: listId,
258
+ entityId: entityId,
259
+ }).unwrap()];
260
+ case 2:
261
+ result = _a.sent();
262
+ if (result) {
263
+ dispatch((0, listsSlice_1.updateCurrentList)(result));
264
+ }
265
+ return [3 /*break*/, 4];
266
+ case 3:
267
+ err_6 = _a.sent();
268
+ (0, handleError_1.handleError)(err_6, "Failed to add entity to list");
269
+ return [3 /*break*/, 4];
270
+ case 4: return [2 /*return*/];
271
+ }
272
+ });
273
+ }); }, [addToListMutation, dispatch]);
274
+ // Remove entity from list
275
+ var removeFromList = (0, react_1.useCallback)(function (projectId, listId, entityId) { return __awaiter(_this, void 0, void 0, function () {
276
+ var result, err_7;
277
+ return __generator(this, function (_a) {
278
+ switch (_a.label) {
279
+ case 0:
280
+ if (!projectId || !listId || !entityId) {
281
+ console.error("Missing required parameters for removing from list.");
282
+ return [2 /*return*/];
283
+ }
284
+ _a.label = 1;
285
+ case 1:
286
+ _a.trys.push([1, 3, , 4]);
287
+ return [4 /*yield*/, removeFromListMutation({
288
+ projectId: projectId,
289
+ listId: listId,
290
+ entityId: entityId,
291
+ }).unwrap()];
292
+ case 2:
293
+ result = _a.sent();
294
+ if (result) {
295
+ dispatch((0, listsSlice_1.updateCurrentList)(result));
296
+ }
297
+ return [3 /*break*/, 4];
298
+ case 3:
299
+ err_7 = _a.sent();
300
+ (0, handleError_1.handleError)(err_7, "Failed to remove entity from list");
301
+ return [3 /*break*/, 4];
302
+ case 4: return [2 /*return*/];
303
+ }
304
+ });
305
+ }); }, [removeFromListMutation, dispatch]);
306
+ // Reset lists
307
+ var resetListsAction = (0, react_1.useCallback)(function () {
308
+ dispatch((0, listsSlice_1.resetLists)());
309
+ }, [dispatch]);
310
+ return {
311
+ // Navigation
312
+ openList: openListAction,
313
+ goBack: goBackAction,
314
+ goToRoot: goToRootAction,
315
+ // Data fetching
316
+ fetchRootList: fetchRootList,
317
+ fetchSubLists: fetchSubLists,
318
+ // CRUD operations
319
+ createList: createList,
320
+ updateList: updateList,
321
+ deleteList: deleteList,
322
+ addToList: addToList,
323
+ removeFromList: removeFromList,
324
+ // Utility
325
+ resetLists: resetListsAction,
326
+ };
327
+ }
328
+ exports.default = useListsActionsRedux;
329
+ //# sourceMappingURL=useListsActionsRedux.js.map