@replyke/core 5.1.6-beta.1 → 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 +1 -1
  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 +1 -1
  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
@@ -1,12 +1,20 @@
1
- import { useSelector } from "react-redux";
2
- import { selectAppNotifications, selectUnreadCount, selectAppNotificationsLoading, selectAppNotificationsHasMore, } from "../../store/slices/appNotificationsSlice";
1
+ import { useEffect, useMemo } from "react";
2
+ import { useDispatch, useSelector } from "react-redux";
3
+ import { setProjectContext, setLimit, setNotificationTemplates, selectAppNotifications, selectUnreadCount, selectAppNotificationsLoading, selectAppNotificationsHasMore, selectAppNotificationsPage, selectCurrentProjectId, selectNotificationTemplates, } from "../../store/slices/appNotificationsSlice";
3
4
  import { useAppNotificationsActionsRedux } from "./useAppNotificationsActionsRedux";
5
+ import useProject from "../projects/useProject";
6
+ import { useUserRedux } from "../auth-redux";
4
7
  /**
5
- * Redux-powered hook that provides the same interface as useAppNotifications()
6
- * Returns the current app notifications state and actions
8
+ * Redux-powered hook that provides the exact same interface as useAppNotificationsData()
9
+ * This is a drop-in replacement for the Context-based hook
7
10
  */
8
- export function useAppNotificationsRedux() {
9
- // Select data from Redux store
11
+ function useAppNotificationsRedux(_a) {
12
+ var _b = _a === void 0 ? {} : _a, _c = _b.limit, limit = _c === void 0 ? 10 : _c, notificationTemplates = _b.notificationTemplates;
13
+ var dispatch = useDispatch();
14
+ // Get external context
15
+ var projectId = useProject().projectId;
16
+ var user = useUserRedux().user;
17
+ // Get Redux state
10
18
  var appNotifications = useSelector(function (state) {
11
19
  return selectAppNotifications(state);
12
20
  });
@@ -19,17 +27,77 @@ export function useAppNotificationsRedux() {
19
27
  var hasMore = useSelector(function (state) {
20
28
  return selectAppNotificationsHasMore(state);
21
29
  });
30
+ var currentPage = useSelector(function (state) {
31
+ return selectAppNotificationsPage(state);
32
+ });
33
+ var currentProjectId = useSelector(function (state) {
34
+ return selectCurrentProjectId(state);
35
+ });
22
36
  // Get actions
23
- var _a = useAppNotificationsActionsRedux(), loadMore = _a.loadMore, markNotificationAsRead = _a.markNotificationAsRead, resetAppNotifications = _a.resetAppNotifications;
24
- return {
37
+ var _d = useAppNotificationsActionsRedux(), loadMore = _d.loadMore, markNotificationAsRead = _d.markNotificationAsRead, markAllNotificationsAsRead = _d.markAllNotificationsAsRead, resetAppNotifications = _d.resetAppNotifications, fetchMoreNotifications = _d.fetchMoreNotifications, updateUnreadCount = _d.updateUnreadCount;
38
+ // Update Redux state when props change
39
+ useEffect(function () {
40
+ if (projectId && projectId !== currentProjectId) {
41
+ dispatch(setProjectContext(projectId));
42
+ }
43
+ }, [dispatch, projectId, currentProjectId]);
44
+ useEffect(function () {
45
+ dispatch(setLimit(limit));
46
+ }, [dispatch, limit]);
47
+ // Prevent infinite re-renders by comparing current vs new templates
48
+ var currentTemplates = useSelector(function (state) {
49
+ return selectNotificationTemplates(state);
50
+ });
51
+ var templatesChanged = useMemo(function () {
52
+ // If no templates provided, skip comparison
53
+ if (!notificationTemplates)
54
+ return false;
55
+ // Deep comparison using JSON stringify
56
+ return (JSON.stringify(currentTemplates) !== JSON.stringify(notificationTemplates));
57
+ }, [currentTemplates, notificationTemplates]);
58
+ useEffect(function () {
59
+ if (notificationTemplates && templatesChanged) {
60
+ dispatch(setNotificationTemplates(notificationTemplates));
61
+ }
62
+ }, [dispatch, notificationTemplates, templatesChanged]);
63
+ // Fetch unread count on mount and when dependencies change
64
+ useEffect(function () {
65
+ if (projectId && user) {
66
+ updateUnreadCount();
67
+ }
68
+ }, [updateUnreadCount, projectId, user]);
69
+ // Reset and fetch initial notifications when dependencies change
70
+ useEffect(function () {
71
+ if (projectId && user) {
72
+ resetAppNotifications();
73
+ }
74
+ }, [resetAppNotifications, projectId, user]);
75
+ // Handle page changes (load more notifications)
76
+ useEffect(function () {
77
+ if (currentPage > 1 && projectId && user) {
78
+ fetchMoreNotifications(currentPage);
79
+ }
80
+ }, [currentPage, fetchMoreNotifications, projectId, user]);
81
+ // Return the same interface as the original hook
82
+ return useMemo(function () { return ({
25
83
  appNotifications: appNotifications,
26
84
  unreadAppNotificationsCount: unreadAppNotificationsCount,
27
85
  loading: loading,
28
86
  hasMore: hasMore,
29
87
  loadMore: loadMore,
30
88
  markNotificationAsRead: markNotificationAsRead,
89
+ markAllNotificationsAsRead: markAllNotificationsAsRead,
31
90
  resetAppNotifications: resetAppNotifications,
32
- };
91
+ }); }, [
92
+ appNotifications,
93
+ unreadAppNotificationsCount,
94
+ loading,
95
+ hasMore,
96
+ loadMore,
97
+ markNotificationAsRead,
98
+ markAllNotificationsAsRead,
99
+ resetAppNotifications,
100
+ ]);
33
101
  }
34
102
  export default useAppNotificationsRedux;
35
103
  //# sourceMappingURL=useAppNotificationsRedux.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAppNotificationsRedux.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications-redux/useAppNotificationsRedux.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,6BAA6B,EAC7B,6BAA6B,GAC9B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AAEpF;;;GAGG;AACH,MAAM,UAAU,wBAAwB;IACtC,+BAA+B;IAC/B,IAAM,gBAAgB,GAAG,WAAW,CAAC,UAAC,KAAgB;QACpD,OAAA,sBAAsB,CAAC,KAAK,CAAC;IAA7B,CAA6B,CAC9B,CAAC;IACF,IAAM,2BAA2B,GAAG,WAAW,CAAC,UAAC,KAAgB;QAC/D,OAAA,iBAAiB,CAAC,KAAK,CAAC;IAAxB,CAAwB,CACzB,CAAC;IACF,IAAM,OAAO,GAAG,WAAW,CAAC,UAAC,KAAgB;QAC3C,OAAA,6BAA6B,CAAC,KAAK,CAAC;IAApC,CAAoC,CACrC,CAAC;IACF,IAAM,OAAO,GAAG,WAAW,CAAC,UAAC,KAAgB;QAC3C,OAAA,6BAA6B,CAAC,KAAK,CAAC;IAApC,CAAoC,CACrC,CAAC;IAEF,cAAc;IACR,IAAA,KACJ,+BAA+B,EAAE,EAD3B,QAAQ,cAAA,EAAE,sBAAsB,4BAAA,EAAE,qBAAqB,2BAC5B,CAAC;IAEpC,OAAO;QACL,gBAAgB,kBAAA;QAChB,2BAA2B,6BAAA;QAC3B,OAAO,SAAA;QACP,OAAO,SAAA;QACP,QAAQ,UAAA;QACR,sBAAsB,wBAAA;QACtB,qBAAqB,uBAAA;KACtB,CAAC;AACJ,CAAC;AAED,eAAe,wBAAwB,CAAC"}
1
+ {"version":3,"file":"useAppNotificationsRedux.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications-redux/useAppNotificationsRedux.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGvD,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,wBAAwB,EACxB,sBAAsB,EACtB,iBAAiB,EACjB,6BAA6B,EAC7B,6BAA6B,EAC7B,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAmB7C;;;GAGG;AACH,SAAS,wBAAwB,CAAC,EAGG;QAHH,qBAGC,EAAE,KAAA,EAFnC,aAAU,EAAV,KAAK,mBAAG,EAAE,KAAA,EACV,qBAAqB,2BAAA;IAErB,IAAM,QAAQ,GAAG,WAAW,EAAe,CAAC;IAE5C,uBAAuB;IACf,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAC3B,IAAA,IAAI,GAAK,YAAY,EAAE,KAAnB,CAAoB;IAEhC,kBAAk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AAS,EAAE,IAAI,CAAC,CAAC,CAAC;IAE3D,iDAAiD;IACjD,OAAO,OAAO,CACZ,cAAM,OAAA,CAAC;QACL,gBAAgB,kBAAA;QAChB,2BAA2B,6BAAA;QAC3B,OAAO,SAAA;QACP,OAAO,SAAA;QACP,QAAQ,UAAA;QACR,sBAAsB,wBAAA;QACtB,0BAA0B,4BAAA;QAC1B,qBAAqB,uBAAA;KACtB,CAAC,EATI,CASJ,EACF;QACE,gBAAgB;QAChB,2BAA2B;QAC3B,OAAO;QACP,OAAO;QACP,QAAQ;QACR,sBAAsB;QACtB,0BAA0B;QAC1B,qBAAqB;KACtB,CACF,CAAC;AACJ,CAAC;AAED,eAAe,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,4 @@
1
+ // Export Redux-powered lists hooks
2
+ export { useListsActionsRedux } from "./useListsActionsRedux";
3
+ export { default as useListsRedux, } from "./useListsRedux";
4
+ //# 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,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EACL,OAAO,IAAI,aAAa,GAGzB,MAAM,iBAAiB,CAAC"}
@@ -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,326 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ 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);
23
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
28
+ 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;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
48
+ import { useCallback } from "react";
49
+ import { useDispatch } from "react-redux";
50
+ import { setLoading, openList, goBack, goToRoot, setCurrentList, setSubLists, updateCurrentList, updateListInSubLists, addNewListAndNavigate, handleListDeletion, resetLists, handleError, } from "../../store/slices/listsSlice";
51
+ import { useLazyFetchRootListQuery, useLazyFetchSubListsQuery, useCreateListMutation, useUpdateListMutation, useDeleteListMutation, useAddToListMutation, useRemoveFromListMutation, } from "../../store/api/listsApi";
52
+ import { handleError as handleErrorUtil } from "../../utils/handleError";
53
+ /**
54
+ * Redux-powered hook that provides all lists actions
55
+ * This replaces the individual hooks and provides a centralized way to manage lists
56
+ */
57
+ export function useListsActionsRedux() {
58
+ var _this = this;
59
+ var dispatch = useDispatch();
60
+ // RTK Query hooks
61
+ var fetchRootListQuery = useLazyFetchRootListQuery()[0];
62
+ var fetchSubListsQuery = useLazyFetchSubListsQuery()[0];
63
+ var createListMutation = useCreateListMutation()[0];
64
+ var updateListMutation = useUpdateListMutation()[0];
65
+ var deleteListMutation = useDeleteListMutation()[0];
66
+ var addToListMutation = useAddToListMutation()[0];
67
+ var removeFromListMutation = useRemoveFromListMutation()[0];
68
+ // Navigation actions
69
+ var openListAction = useCallback(function (list) {
70
+ dispatch(openList(list));
71
+ }, [dispatch]);
72
+ var goBackAction = useCallback(function () {
73
+ dispatch(goBack());
74
+ }, [dispatch]);
75
+ var goToRootAction = useCallback(function () {
76
+ dispatch(goToRoot());
77
+ }, [dispatch]);
78
+ // Fetch root list
79
+ var fetchRootList = useCallback(function (projectId) { return __awaiter(_this, void 0, void 0, function () {
80
+ var result, rootList, err_1;
81
+ return __generator(this, function (_a) {
82
+ switch (_a.label) {
83
+ case 0:
84
+ if (!projectId) {
85
+ console.warn("Can't fetch root list without projectId.");
86
+ return [2 /*return*/];
87
+ }
88
+ dispatch(setLoading(true));
89
+ _a.label = 1;
90
+ case 1:
91
+ _a.trys.push([1, 3, 4, 5]);
92
+ return [4 /*yield*/, fetchRootListQuery({ projectId: projectId }).unwrap()];
93
+ case 2:
94
+ result = _a.sent();
95
+ if (result) {
96
+ rootList = __assign(__assign({}, result), { parentId: null });
97
+ dispatch(setCurrentList(rootList));
98
+ }
99
+ return [3 /*break*/, 5];
100
+ case 3:
101
+ err_1 = _a.sent();
102
+ handleErrorUtil(err_1, "Failed fetching root list");
103
+ dispatch(handleError());
104
+ return [3 /*break*/, 5];
105
+ case 4:
106
+ dispatch(setLoading(false));
107
+ return [7 /*endfinally*/];
108
+ case 5: return [2 /*return*/];
109
+ }
110
+ });
111
+ }); }, [dispatch, fetchRootListQuery]);
112
+ // Fetch sub-lists
113
+ var fetchSubLists = useCallback(function (projectId, listId) { return __awaiter(_this, void 0, void 0, function () {
114
+ var result, err_2;
115
+ return __generator(this, function (_a) {
116
+ switch (_a.label) {
117
+ case 0:
118
+ if (!projectId || !listId) {
119
+ console.warn("Can't fetch sub-lists without projectId and listId.");
120
+ return [2 /*return*/];
121
+ }
122
+ dispatch(setLoading(true));
123
+ _a.label = 1;
124
+ case 1:
125
+ _a.trys.push([1, 3, 4, 5]);
126
+ return [4 /*yield*/, fetchSubListsQuery({ projectId: projectId, listId: listId }).unwrap()];
127
+ case 2:
128
+ result = _a.sent();
129
+ if (result) {
130
+ dispatch(setSubLists({ lists: result, parentListId: listId }));
131
+ }
132
+ return [3 /*break*/, 5];
133
+ case 3:
134
+ err_2 = _a.sent();
135
+ handleErrorUtil(err_2, "Failed fetching sub-lists");
136
+ dispatch(handleError());
137
+ return [3 /*break*/, 5];
138
+ case 4:
139
+ dispatch(setLoading(false));
140
+ return [7 /*endfinally*/];
141
+ case 5: return [2 /*return*/];
142
+ }
143
+ });
144
+ }); }, [dispatch, fetchSubListsQuery]);
145
+ // Create list
146
+ var createList = useCallback(function (projectId, parentListId, listName) { return __awaiter(_this, void 0, void 0, function () {
147
+ var result, err_3;
148
+ return __generator(this, function (_a) {
149
+ switch (_a.label) {
150
+ case 0:
151
+ if (!projectId || !parentListId || !listName) {
152
+ console.error("Missing required parameters for creating list.");
153
+ return [2 /*return*/];
154
+ }
155
+ _a.label = 1;
156
+ case 1:
157
+ _a.trys.push([1, 3, , 4]);
158
+ return [4 /*yield*/, createListMutation({
159
+ projectId: projectId,
160
+ parentListId: parentListId,
161
+ listName: listName,
162
+ }).unwrap()];
163
+ case 2:
164
+ result = _a.sent();
165
+ if (result) {
166
+ dispatch(addNewListAndNavigate(result));
167
+ }
168
+ return [3 /*break*/, 4];
169
+ case 3:
170
+ err_3 = _a.sent();
171
+ handleErrorUtil(err_3, "Failed to create list");
172
+ return [3 /*break*/, 4];
173
+ case 4: return [2 /*return*/];
174
+ }
175
+ });
176
+ }); }, [createListMutation, dispatch]);
177
+ // Update list
178
+ var updateList = useCallback(function (projectId, listId, update) { return __awaiter(_this, void 0, void 0, function () {
179
+ var result, err_4;
180
+ return __generator(this, function (_a) {
181
+ switch (_a.label) {
182
+ case 0:
183
+ if (!projectId || !listId) {
184
+ console.error("Missing required parameters for updating list.");
185
+ return [2 /*return*/];
186
+ }
187
+ _a.label = 1;
188
+ case 1:
189
+ _a.trys.push([1, 3, , 4]);
190
+ return [4 /*yield*/, updateListMutation({
191
+ projectId: projectId,
192
+ listId: listId,
193
+ update: update,
194
+ }).unwrap()];
195
+ case 2:
196
+ result = _a.sent();
197
+ if (result) {
198
+ // Check if it's the current list or a sub-list
199
+ dispatch(updateListInSubLists(result));
200
+ }
201
+ return [3 /*break*/, 4];
202
+ case 3:
203
+ err_4 = _a.sent();
204
+ handleErrorUtil(err_4, "Failed to update list");
205
+ return [3 /*break*/, 4];
206
+ case 4: return [2 /*return*/];
207
+ }
208
+ });
209
+ }); }, [updateListMutation, dispatch]);
210
+ // Delete list
211
+ var deleteList = useCallback(function (projectId, list) { return __awaiter(_this, void 0, void 0, function () {
212
+ var err_5;
213
+ return __generator(this, function (_a) {
214
+ switch (_a.label) {
215
+ case 0:
216
+ if (!projectId || !list) {
217
+ console.error("Missing required parameters for deleting list.");
218
+ return [2 /*return*/];
219
+ }
220
+ _a.label = 1;
221
+ case 1:
222
+ _a.trys.push([1, 3, , 4]);
223
+ return [4 /*yield*/, deleteListMutation({
224
+ projectId: projectId,
225
+ listId: list.id,
226
+ }).unwrap()];
227
+ case 2:
228
+ _a.sent();
229
+ dispatch(handleListDeletion({ listId: list.id, parentId: list.parentId }));
230
+ return [3 /*break*/, 4];
231
+ case 3:
232
+ err_5 = _a.sent();
233
+ handleErrorUtil(err_5, "Failed to delete list");
234
+ return [3 /*break*/, 4];
235
+ case 4: return [2 /*return*/];
236
+ }
237
+ });
238
+ }); }, [deleteListMutation, dispatch]);
239
+ // Add entity to list
240
+ var addToList = useCallback(function (projectId, listId, entityId) { return __awaiter(_this, void 0, void 0, function () {
241
+ var result, err_6;
242
+ return __generator(this, function (_a) {
243
+ switch (_a.label) {
244
+ case 0:
245
+ if (!projectId || !listId || !entityId) {
246
+ console.error("Missing required parameters for adding to list.");
247
+ return [2 /*return*/];
248
+ }
249
+ _a.label = 1;
250
+ case 1:
251
+ _a.trys.push([1, 3, , 4]);
252
+ return [4 /*yield*/, addToListMutation({
253
+ projectId: projectId,
254
+ listId: listId,
255
+ entityId: entityId,
256
+ }).unwrap()];
257
+ case 2:
258
+ result = _a.sent();
259
+ if (result) {
260
+ dispatch(updateCurrentList(result));
261
+ }
262
+ return [3 /*break*/, 4];
263
+ case 3:
264
+ err_6 = _a.sent();
265
+ handleErrorUtil(err_6, "Failed to add entity to list");
266
+ return [3 /*break*/, 4];
267
+ case 4: return [2 /*return*/];
268
+ }
269
+ });
270
+ }); }, [addToListMutation, dispatch]);
271
+ // Remove entity from list
272
+ var removeFromList = useCallback(function (projectId, listId, entityId) { return __awaiter(_this, void 0, void 0, function () {
273
+ var result, err_7;
274
+ return __generator(this, function (_a) {
275
+ switch (_a.label) {
276
+ case 0:
277
+ if (!projectId || !listId || !entityId) {
278
+ console.error("Missing required parameters for removing from list.");
279
+ return [2 /*return*/];
280
+ }
281
+ _a.label = 1;
282
+ case 1:
283
+ _a.trys.push([1, 3, , 4]);
284
+ return [4 /*yield*/, removeFromListMutation({
285
+ projectId: projectId,
286
+ listId: listId,
287
+ entityId: entityId,
288
+ }).unwrap()];
289
+ case 2:
290
+ result = _a.sent();
291
+ if (result) {
292
+ dispatch(updateCurrentList(result));
293
+ }
294
+ return [3 /*break*/, 4];
295
+ case 3:
296
+ err_7 = _a.sent();
297
+ handleErrorUtil(err_7, "Failed to remove entity from list");
298
+ return [3 /*break*/, 4];
299
+ case 4: return [2 /*return*/];
300
+ }
301
+ });
302
+ }); }, [removeFromListMutation, dispatch]);
303
+ // Reset lists
304
+ var resetListsAction = useCallback(function () {
305
+ dispatch(resetLists());
306
+ }, [dispatch]);
307
+ return {
308
+ // Navigation
309
+ openList: openListAction,
310
+ goBack: goBackAction,
311
+ goToRoot: goToRootAction,
312
+ // Data fetching
313
+ fetchRootList: fetchRootList,
314
+ fetchSubLists: fetchSubLists,
315
+ // CRUD operations
316
+ createList: createList,
317
+ updateList: updateList,
318
+ deleteList: deleteList,
319
+ addToList: addToList,
320
+ removeFromList: removeFromList,
321
+ // Utility
322
+ resetLists: resetListsAction,
323
+ };
324
+ }
325
+ export default useListsActionsRedux;
326
+ //# sourceMappingURL=useListsActionsRedux.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useListsActionsRedux.js","sourceRoot":"","sources":["../../../../src/hooks/lists-redux/useListsActionsRedux.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EACL,UAAU,EACV,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,UAAU,EACV,WAAW,GACZ,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAGzE;;;GAGG;AACH,MAAM,UAAU,oBAAoB;IAApC,iBA+NC;IA9NC,IAAM,QAAQ,GAAG,WAAW,EAAe,CAAC;IAE5C,kBAAkB;IACX,IAAA,kBAAkB,GAAI,yBAAyB,EAAE,GAA/B,CAAgC;IAClD,IAAA,kBAAkB,GAAI,yBAAyB,EAAE,GAA/B,CAAgC;IAClD,IAAA,kBAAkB,GAAI,qBAAqB,EAAE,GAA3B,CAA4B;IAC9C,IAAA,kBAAkB,GAAI,qBAAqB,EAAE,GAA3B,CAA4B;IAC9C,IAAA,kBAAkB,GAAI,qBAAqB,EAAE,GAA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A;;oBAJL,MAAM,GAAG,SAIJ;oBAEX,IAAI,MAAM,EAAE,CAAC;wBACX,QAAQ,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;oBACtC,CAAC;;;;oBAED,eAAe,CAAC,KAAG,EAAE,mCAAmC,CAAC,CAAC;;;;;SAE7D,EAAE,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEvC,cAAc;IACd,IAAM,gBAAgB,GAAG,WAAW,CAAC;QACnC,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;IACzB,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO;QACL,aAAa;QACb,QAAQ,EAAE,cAAc;QACxB,MAAM,EAAE,YAAY;QACpB,QAAQ,EAAE,cAAc;QAExB,gBAAgB;QAChB,aAAa,eAAA;QACb,aAAa,eAAA;QAEb,kBAAkB;QAClB,UAAU,YAAA;QACV,UAAU,YAAA;QACV,UAAU,YAAA;QACV,SAAS,WAAA;QACT,cAAc,gBAAA;QAEd,UAAU;QACV,UAAU,EAAE,gBAAgB;KAC7B,CAAC;AACJ,CAAC;AAED,eAAe,oBAAoB,CAAC"}
@@ -1,7 +1,7 @@
1
- import { List } from "../../interfaces/models/List";
2
- export interface UseListsDataProps {
1
+ import type { List } from "../../interfaces/models/List";
2
+ export interface UseListsReduxProps {
3
3
  }
4
- export interface UseListsDataValues {
4
+ export interface UseListsReduxValues {
5
5
  currentList: List | null;
6
6
  subLists: List[];
7
7
  loading: boolean;
@@ -28,5 +28,9 @@ export interface UseListsDataValues {
28
28
  entityId: string;
29
29
  }) => Promise<void>;
30
30
  }
31
- declare function useListsData(_: UseListsDataProps): UseListsDataValues;
32
- export default useListsData;
31
+ /**
32
+ * Redux-powered hook that provides the exact same interface as useListsData()
33
+ * This is a drop-in replacement for the Context-based hook
34
+ */
35
+ declare function useListsRedux(_?: UseListsReduxProps): UseListsReduxValues;
36
+ export default useListsRedux;