@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,103 +0,0 @@
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";
4
- import { useAppNotificationsActionsRedux } from "./useAppNotificationsActionsRedux";
5
- import useProject from "../projects/useProject";
6
- import { useUserRedux } from "../auth-redux";
7
- /**
8
- * Redux-powered hook that provides the exact same interface as useAppNotificationsData()
9
- * This is a drop-in replacement for the Context-based hook
10
- */
11
- function useAppNotificationsDataRedux(_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
18
- var appNotifications = useSelector(function (state) {
19
- return selectAppNotifications(state);
20
- });
21
- var unreadAppNotificationsCount = useSelector(function (state) {
22
- return selectUnreadCount(state);
23
- });
24
- var loading = useSelector(function (state) {
25
- return selectAppNotificationsLoading(state);
26
- });
27
- var hasMore = useSelector(function (state) {
28
- return selectAppNotificationsHasMore(state);
29
- });
30
- var currentPage = useSelector(function (state) {
31
- return selectAppNotificationsPage(state);
32
- });
33
- var currentProjectId = useSelector(function (state) {
34
- return selectCurrentProjectId(state);
35
- });
36
- // Get actions
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 ({
83
- appNotifications: appNotifications,
84
- unreadAppNotificationsCount: unreadAppNotificationsCount,
85
- loading: loading,
86
- hasMore: hasMore,
87
- loadMore: loadMore,
88
- markNotificationAsRead: markNotificationAsRead,
89
- markAllNotificationsAsRead: markAllNotificationsAsRead,
90
- resetAppNotifications: resetAppNotifications,
91
- }); }, [
92
- appNotifications,
93
- unreadAppNotificationsCount,
94
- loading,
95
- hasMore,
96
- loadMore,
97
- markNotificationAsRead,
98
- markAllNotificationsAsRead,
99
- resetAppNotifications,
100
- ]);
101
- }
102
- export default useAppNotificationsDataRedux;
103
- //# sourceMappingURL=useAppNotificationsDataRedux.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAppNotificationsDataRedux.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications-redux/useAppNotificationsDataRedux.ts"],"names":[],"mappings":"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"}
@@ -1,10 +0,0 @@
1
- export { default as useLists } from "./useLists";
2
- export { default as useListsData } from "./useListsData";
3
- export { default as useCreateList } from "./useCreateList";
4
- export { default as useFetchRootList } from "./useFetchRootList";
5
- export { default as useFetchSubLists } from "./useFetchSubLists";
6
- export { default as useIsEntitySaved } from "./useIsEntitySaved";
7
- export { default as useUpdateList } from "./useUpdateList";
8
- export { default as useAddToList } from "./useAddToList";
9
- export { default as useRemoveFromList } from "./useRemoveFromList";
10
- export { default as useDeleteList } from "./useDeleteList";
@@ -1,11 +0,0 @@
1
- export { default as useLists } from "./useLists";
2
- export { default as useListsData } from "./useListsData";
3
- export { default as useCreateList } from "./useCreateList";
4
- export { default as useFetchRootList } from "./useFetchRootList";
5
- export { default as useFetchSubLists } from "./useFetchSubLists";
6
- export { default as useIsEntitySaved } from "./useIsEntitySaved";
7
- export { default as useUpdateList } from "./useUpdateList";
8
- export { default as useAddToList } from "./useAddToList";
9
- export { default as useRemoveFromList } from "./useRemoveFromList";
10
- export { default as useDeleteList } from "./useDeleteList";
11
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/lists/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,6 +0,0 @@
1
- import { List } from "../../interfaces/models/List";
2
- declare function useAddToList(): ({ entityId, listId }: {
3
- entityId: string;
4
- listId: string;
5
- }) => Promise<List>;
6
- export default useAddToList;
@@ -1,65 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- var __generator = (this && this.__generator) || function (thisArg, body) {
11
- 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);
12
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
- function verb(n) { return function (v) { return step([n, v]); }; }
14
- function step(op) {
15
- if (f) throw new TypeError("Generator is already executing.");
16
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
- 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;
18
- if (y = 0, t) op = [op[0] & 2, t.value];
19
- switch (op[0]) {
20
- case 0: case 1: t = op; break;
21
- case 4: _.label++; return { value: op[1], done: false };
22
- case 5: _.label++; y = op[1]; op = [0]; continue;
23
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
- default:
25
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
- if (t[2]) _.ops.pop();
30
- _.trys.pop(); continue;
31
- }
32
- op = body.call(thisArg, _);
33
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
- }
36
- };
37
- import { useCallback } from "react";
38
- import useAxiosPrivate from "../../config/useAxiosPrivate";
39
- import useProject from "../projects/useProject";
40
- function useAddToList() {
41
- var _this = this;
42
- var axios = useAxiosPrivate();
43
- var projectId = useProject().projectId;
44
- var addToList = useCallback(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
45
- var response;
46
- var entityId = _b.entityId, listId = _b.listId;
47
- return __generator(this, function (_c) {
48
- switch (_c.label) {
49
- case 0:
50
- if (!projectId) {
51
- throw new Error("No projectId available.");
52
- }
53
- return [4 /*yield*/, axios.patch("/".concat(projectId, "/lists/").concat(listId, "/add-entity"), {
54
- entityId: entityId,
55
- }, { withCredentials: true })];
56
- case 1:
57
- response = _c.sent();
58
- return [2 /*return*/, response.data];
59
- }
60
- });
61
- }); }, [axios, projectId]);
62
- return addToList;
63
- }
64
- export default useAddToList;
65
- //# sourceMappingURL=useAddToList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAddToList.js","sourceRoot":"","sources":["../../../../src/hooks/lists/useAddToList.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAE3D,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,SAAS,YAAY;IAArB,iBAwBC;IAvBC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IACxB,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAEnC,IAAM,SAAS,GAAG,WAAW,CAC3B,gEAAO,EAA0D;;YAAxD,QAAQ,cAAA,EAAE,MAAM,YAAA;;;;oBACvB,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,KAAK,CAChC,WAAI,SAAS,oBAAU,MAAM,gBAAa,EAC1C;4BACE,QAAQ,UAAA;yBACT,EACD,EAAE,eAAe,EAAE,IAAI,EAAE,CAC1B,EAAA;;oBANK,QAAQ,GAAG,SAMhB;oBAED,sBAAO,QAAQ,CAAC,IAAY,EAAC;;;SAC9B,EACD,CAAC,KAAK,EAAE,SAAS,CAAC,CACnB,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,eAAe,YAAY,CAAC"}
@@ -1,6 +0,0 @@
1
- import { List } from "../../interfaces/models/List";
2
- declare function useCreateList(): ({ listName, parentListId, }: {
3
- listName: string;
4
- parentListId: string;
5
- }) => Promise<List>;
6
- export default useCreateList;
@@ -1,65 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- var __generator = (this && this.__generator) || function (thisArg, body) {
11
- 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);
12
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
- function verb(n) { return function (v) { return step([n, v]); }; }
14
- function step(op) {
15
- if (f) throw new TypeError("Generator is already executing.");
16
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
- 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;
18
- if (y = 0, t) op = [op[0] & 2, t.value];
19
- switch (op[0]) {
20
- case 0: case 1: t = op; break;
21
- case 4: _.label++; return { value: op[1], done: false };
22
- case 5: _.label++; y = op[1]; op = [0]; continue;
23
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
- default:
25
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
- if (t[2]) _.ops.pop();
30
- _.trys.pop(); continue;
31
- }
32
- op = body.call(thisArg, _);
33
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
- }
36
- };
37
- import { useCallback } from "react";
38
- import useAxiosPrivate from "../../config/useAxiosPrivate";
39
- import useProject from "../projects/useProject";
40
- function useCreateList() {
41
- var _this = this;
42
- var axios = useAxiosPrivate();
43
- var projectId = useProject().projectId;
44
- var createList = useCallback(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
45
- var response;
46
- var listName = _b.listName, parentListId = _b.parentListId;
47
- return __generator(this, function (_c) {
48
- switch (_c.label) {
49
- case 0:
50
- if (!projectId) {
51
- throw new Error("No projectId available.");
52
- }
53
- return [4 /*yield*/, axios.post("/".concat(projectId, "/lists/").concat(parentListId, "/sub-lists"), {
54
- listName: listName,
55
- }, { withCredentials: true })];
56
- case 1:
57
- response = _c.sent();
58
- return [2 /*return*/, response.data];
59
- }
60
- });
61
- }); }, [axios, projectId]);
62
- return createList;
63
- }
64
- export default useCreateList;
65
- //# sourceMappingURL=useCreateList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCreateList.js","sourceRoot":"","sources":["../../../../src/hooks/lists/useCreateList.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAE3D,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,SAAS,aAAa;IAAtB,iBA8BC;IA7BC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IACxB,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAEnC,IAAM,UAAU,GAAG,WAAW,CAC5B,gEAAO,EAMN;;YALC,QAAQ,cAAA,EACR,YAAY,kBAAA;;;;oBAKZ,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,IAAI,CAC/B,WAAI,SAAS,oBAAU,YAAY,eAAY,EAC/C;4BACE,QAAQ,UAAA;yBACT,EACD,EAAE,eAAe,EAAE,IAAI,EAAE,CAC1B,EAAA;;oBANK,QAAQ,GAAG,SAMhB;oBAED,sBAAO,QAAQ,CAAC,IAAY,EAAC;;;SAC9B,EACD,CAAC,KAAK,EAAE,SAAS,CAAC,CACnB,CAAC;IAEF,OAAO,UAAU,CAAC;AACpB,CAAC;AACD,eAAe,aAAa,CAAC"}
@@ -1,4 +0,0 @@
1
- declare function useDeleteList(): ({ listId }: {
2
- listId: string;
3
- }) => Promise<void>;
4
- export default useDeleteList;
@@ -1,64 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- var __generator = (this && this.__generator) || function (thisArg, body) {
11
- 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);
12
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
- function verb(n) { return function (v) { return step([n, v]); }; }
14
- function step(op) {
15
- if (f) throw new TypeError("Generator is already executing.");
16
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
- 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;
18
- if (y = 0, t) op = [op[0] & 2, t.value];
19
- switch (op[0]) {
20
- case 0: case 1: t = op; break;
21
- case 4: _.label++; return { value: op[1], done: false };
22
- case 5: _.label++; y = op[1]; op = [0]; continue;
23
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
- default:
25
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
- if (t[2]) _.ops.pop();
30
- _.trys.pop(); continue;
31
- }
32
- op = body.call(thisArg, _);
33
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
- }
36
- };
37
- import { useCallback } from "react";
38
- import useAxiosPrivate from "../../config/useAxiosPrivate";
39
- import useProject from "../projects/useProject";
40
- function useDeleteList() {
41
- var _this = this;
42
- var axios = useAxiosPrivate();
43
- var projectId = useProject().projectId;
44
- var deleteList = useCallback(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
45
- var listId = _b.listId;
46
- return __generator(this, function (_c) {
47
- switch (_c.label) {
48
- case 0:
49
- if (!projectId) {
50
- throw new Error("No projectId available.");
51
- }
52
- return [4 /*yield*/, axios.delete("/".concat(projectId, "/lists/").concat(listId), {
53
- withCredentials: true,
54
- })];
55
- case 1:
56
- _c.sent();
57
- return [2 /*return*/];
58
- }
59
- });
60
- }); }, [axios, projectId]);
61
- return deleteList;
62
- }
63
- export default useDeleteList;
64
- //# sourceMappingURL=useDeleteList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDeleteList.js","sourceRoot":"","sources":["../../../../src/hooks/lists/useDeleteList.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,SAAS,aAAa;IAAtB,iBAmBC;IAlBC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IACxB,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAEnC,IAAM,UAAU,GAAG,WAAW,CAC5B,gEAAO,EAA8B;YAA5B,MAAM,YAAA;;;;oBAEb,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAED,qBAAM,KAAK,CAAC,MAAM,CAAC,WAAI,SAAS,oBAAU,MAAM,CAAE,EAAE;4BAClD,eAAe,EAAE,IAAI;yBACtB,CAAC,EAAA;;oBAFF,SAEE,CAAC;;;;SACJ,EACD,CAAC,KAAK,EAAE,SAAS,CAAC,CACnB,CAAC;IAEF,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,eAAe,aAAa,CAAC"}
@@ -1,3 +0,0 @@
1
- import { List } from "../../interfaces/models/List";
2
- declare function useFetchRootList(): () => Promise<List>;
3
- export default useFetchRootList;
@@ -1,64 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- var __generator = (this && this.__generator) || function (thisArg, body) {
11
- 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);
12
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
- function verb(n) { return function (v) { return step([n, v]); }; }
14
- function step(op) {
15
- if (f) throw new TypeError("Generator is already executing.");
16
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
- 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;
18
- if (y = 0, t) op = [op[0] & 2, t.value];
19
- switch (op[0]) {
20
- case 0: case 1: t = op; break;
21
- case 4: _.label++; return { value: op[1], done: false };
22
- case 5: _.label++; y = op[1]; op = [0]; continue;
23
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
- default:
25
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
- if (t[2]) _.ops.pop();
30
- _.trys.pop(); continue;
31
- }
32
- op = body.call(thisArg, _);
33
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
- }
36
- };
37
- import { useCallback } from "react";
38
- import useAxiosPrivate from "../../config/useAxiosPrivate";
39
- import useProject from "../projects/useProject";
40
- function useFetchRootList() {
41
- var _this = this;
42
- var axios = useAxiosPrivate();
43
- var projectId = useProject().projectId;
44
- var fetchRootList = useCallback(function () { return __awaiter(_this, void 0, void 0, function () {
45
- var response;
46
- return __generator(this, function (_a) {
47
- switch (_a.label) {
48
- case 0:
49
- if (!projectId) {
50
- throw new Error("No projectId available.");
51
- }
52
- return [4 /*yield*/, axios.get("/".concat(projectId, "/lists/root"), {
53
- withCredentials: true,
54
- })];
55
- case 1:
56
- response = _a.sent();
57
- return [2 /*return*/, response.data];
58
- }
59
- });
60
- }); }, [axios, projectId]);
61
- return fetchRootList;
62
- }
63
- export default useFetchRootList;
64
- //# sourceMappingURL=useFetchRootList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useFetchRootList.js","sourceRoot":"","sources":["../../../../src/hooks/lists/useFetchRootList.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAE3D,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,SAAS,gBAAgB;IAAzB,iBAiBC;IAhBC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IACxB,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAEnC,IAAM,aAAa,GAAG,WAAW,CAAC;;;;;oBAChC,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAAO,WAAI,SAAS,gBAAa,EAAE;4BACjE,eAAe,EAAE,IAAI;yBACtB,CAAC,EAAA;;oBAFI,QAAQ,GAAG,SAEf;oBAEF,sBAAO,QAAQ,CAAC,IAAY,EAAC;;;SAC9B,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;IAEvB,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,eAAe,gBAAgB,CAAC"}
@@ -1,5 +0,0 @@
1
- import { List } from "../../interfaces/models/List";
2
- declare function useFetchSubLists(): ({ listId }: {
3
- listId: string;
4
- }) => Promise<List[]>;
5
- export default useFetchSubLists;
@@ -1,63 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- var __generator = (this && this.__generator) || function (thisArg, body) {
11
- 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);
12
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
- function verb(n) { return function (v) { return step([n, v]); }; }
14
- function step(op) {
15
- if (f) throw new TypeError("Generator is already executing.");
16
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
- 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;
18
- if (y = 0, t) op = [op[0] & 2, t.value];
19
- switch (op[0]) {
20
- case 0: case 1: t = op; break;
21
- case 4: _.label++; return { value: op[1], done: false };
22
- case 5: _.label++; y = op[1]; op = [0]; continue;
23
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
- default:
25
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
- if (t[2]) _.ops.pop();
30
- _.trys.pop(); continue;
31
- }
32
- op = body.call(thisArg, _);
33
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
- }
36
- };
37
- import { useCallback } from "react";
38
- import useAxiosPrivate from "../../config/useAxiosPrivate";
39
- import useProject from "../projects/useProject";
40
- function useFetchSubLists() {
41
- var _this = this;
42
- var axios = useAxiosPrivate();
43
- var projectId = useProject().projectId;
44
- var fetchSubLists = useCallback(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
45
- var response;
46
- var listId = _b.listId;
47
- return __generator(this, function (_c) {
48
- switch (_c.label) {
49
- case 0:
50
- if (!projectId) {
51
- throw new Error("No projectId available.");
52
- }
53
- return [4 /*yield*/, axios.get("/".concat(projectId, "/lists/").concat(listId, "/sub-lists"), { withCredentials: true })];
54
- case 1:
55
- response = _c.sent();
56
- return [2 /*return*/, response.data];
57
- }
58
- });
59
- }); }, [axios, projectId]);
60
- return fetchSubLists;
61
- }
62
- export default useFetchSubLists;
63
- //# sourceMappingURL=useFetchSubLists.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useFetchSubLists.js","sourceRoot":"","sources":["../../../../src/hooks/lists/useFetchSubLists.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAE3D,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,SAAS,gBAAgB;IAAzB,iBAqBC;IApBC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IACxB,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAEnC,IAAM,aAAa,GAAG,WAAW,CAC/B,gEAAO,EAA8B;;YAA5B,MAAM,YAAA;;;;oBACb,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAC9B,WAAI,SAAS,oBAAU,MAAM,eAAY,EACzC,EAAE,eAAe,EAAE,IAAI,EAAE,CAC1B,EAAA;;oBAHK,QAAQ,GAAG,SAGhB;oBAED,sBAAO,QAAQ,CAAC,IAAc,EAAC;;;SAChC,EACD,CAAC,KAAK,EAAE,SAAS,CAAC,CACnB,CAAC;IAEF,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,eAAe,gBAAgB,CAAC"}
@@ -1,5 +0,0 @@
1
- declare function useIsEntitySaved(): {
2
- checkIfEntityIsSaved: (entityId: string) => Promise<void>;
3
- entityIsSaved: boolean | null;
4
- };
5
- export default useIsEntitySaved;
@@ -1,73 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- var __generator = (this && this.__generator) || function (thisArg, body) {
11
- 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);
12
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
- function verb(n) { return function (v) { return step([n, v]); }; }
14
- function step(op) {
15
- if (f) throw new TypeError("Generator is already executing.");
16
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
- 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;
18
- if (y = 0, t) op = [op[0] & 2, t.value];
19
- switch (op[0]) {
20
- case 0: case 1: t = op; break;
21
- case 4: _.label++; return { value: op[1], done: false };
22
- case 5: _.label++; y = op[1]; op = [0]; continue;
23
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
- default:
25
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
- if (t[2]) _.ops.pop();
30
- _.trys.pop(); continue;
31
- }
32
- op = body.call(thisArg, _);
33
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
- }
36
- };
37
- import useAxiosPrivate from "../../config/useAxiosPrivate";
38
- import useProject from "../projects/useProject";
39
- import { useCallback, useRef, useState } from "react";
40
- import { useUserRedux } from "../auth-redux";
41
- function useIsEntitySaved() {
42
- var _this = this;
43
- var axios = useAxiosPrivate();
44
- var projectId = useProject().projectId;
45
- var user = useUserRedux().user;
46
- var _a = useState(null), entityIsSaved = _a[0], setEntityIsSaved = _a[1];
47
- var checkedStatus = useRef({}); // Track status by entityId
48
- var checkIfEntityIsSaved = useCallback(function (entityId) { return __awaiter(_this, void 0, void 0, function () {
49
- var response;
50
- return __generator(this, function (_a) {
51
- switch (_a.label) {
52
- case 0:
53
- if (!user || !entityId || checkedStatus.current[entityId])
54
- return [2 /*return*/];
55
- if (!projectId) {
56
- throw new Error("No projectId available.");
57
- }
58
- checkedStatus.current[entityId] = true; // Mark this entityId as checked
59
- return [4 /*yield*/, axios.get("/".concat(projectId, "/lists/is-entity-saved"), {
60
- params: { entityId: entityId },
61
- withCredentials: true,
62
- })];
63
- case 1:
64
- response = _a.sent();
65
- setEntityIsSaved(response.data);
66
- return [2 /*return*/];
67
- }
68
- });
69
- }); }, [user, axios, projectId]);
70
- return { checkIfEntityIsSaved: checkIfEntityIsSaved, entityIsSaved: entityIsSaved };
71
- }
72
- export default useIsEntitySaved;
73
- //# sourceMappingURL=useIsEntitySaved.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useIsEntitySaved.js","sourceRoot":"","sources":["../../../../src/hooks/lists/useIsEntitySaved.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,SAAS,gBAAgB;IAAzB,iBA+BC;IA9BC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IACxB,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAC3B,IAAA,IAAI,GAAK,YAAY,EAAE,KAAnB,CAAoB;IAE1B,IAAA,KAAoC,QAAQ,CAAiB,IAAI,CAAC,EAAjE,aAAa,QAAA,EAAE,gBAAgB,QAAkC,CAAC;IACzE,IAAM,aAAa,GAAG,MAAM,CAA0B,EAAE,CAAC,CAAC,CAAC,2BAA2B;IAEtF,IAAM,oBAAoB,GAAG,WAAW,CACtC,UAAO,QAAgB;;;;;oBACrB,IAAI,CAAC,IAAI,IAAI,CAAC,QAAQ,IAAI,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC;wBAAE,sBAAO;oBAElE,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAED,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC,gCAAgC;oBACvD,qBAAM,KAAK,CAAC,GAAG,CAC9B,WAAI,SAAS,2BAAwB,EACrC;4BACE,MAAM,EAAE,EAAE,QAAQ,UAAA,EAAE;4BACpB,eAAe,EAAE,IAAI;yBACtB,CACF,EAAA;;oBANK,QAAQ,GAAG,SAMhB;oBAED,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;;;;SACjC,EACD,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CACzB,CAAC;IAEF,OAAO,EAAE,oBAAoB,sBAAA,EAAE,aAAa,eAAA,EAAE,CAAC;AACjD,CAAC;AAED,eAAe,gBAAgB,CAAC"}
@@ -1,2 +0,0 @@
1
- import { ListsContextValues } from "../../context/lists-context";
2
- export default function useLists(): Partial<ListsContextValues>;
@@ -1,6 +0,0 @@
1
- import { useContext } from "react";
2
- import { ListsContext } from "../../context/lists-context";
3
- export default function useLists() {
4
- return useContext(ListsContext);
5
- }
6
- //# sourceMappingURL=useLists.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLists.js","sourceRoot":"","sources":["../../../../src/hooks/lists/useLists.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,YAAY,EAAsB,MAAM,6BAA6B,CAAC;AAE/E,MAAM,CAAC,OAAO,UAAU,QAAQ;IAC9B,OAAO,UAAU,CAAC,YAAY,CAAC,CAAC;AAClC,CAAC"}