@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.
- package/dist/cjs/context/index.d.ts +0 -1
- package/dist/cjs/context/index.js +3 -3
- package/dist/cjs/context/index.js.map +1 -1
- package/dist/cjs/helpers/addNotificationsMessages.js +1 -1
- package/dist/cjs/helpers/addNotificationsMessages.js.map +1 -1
- package/dist/cjs/hooks/app-notifications-redux/index.d.ts +1 -2
- package/dist/cjs/hooks/app-notifications-redux/index.js +1 -3
- package/dist/cjs/hooks/app-notifications-redux/index.js.map +1 -1
- package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.d.ts +18 -4
- package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.js +78 -8
- package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.js.map +1 -1
- package/dist/cjs/hooks/lists-redux/index.d.ts +2 -0
- package/dist/cjs/hooks/lists-redux/index.js +12 -0
- package/dist/cjs/hooks/lists-redux/index.js.map +1 -0
- package/dist/cjs/hooks/lists-redux/useListsActionsRedux.d.ts +21 -0
- package/dist/cjs/hooks/lists-redux/useListsActionsRedux.js +329 -0
- package/dist/cjs/hooks/lists-redux/useListsActionsRedux.js.map +1 -0
- package/dist/cjs/hooks/{lists/useListsData.d.ts → lists-redux/useListsRedux.d.ts} +9 -5
- package/dist/cjs/hooks/lists-redux/useListsRedux.js +239 -0
- package/dist/cjs/hooks/lists-redux/useListsRedux.js.map +1 -0
- package/dist/cjs/hooks/user-redux/index.d.ts +2 -0
- package/dist/cjs/hooks/user-redux/index.js +12 -0
- package/dist/cjs/hooks/user-redux/index.js.map +1 -0
- package/dist/cjs/hooks/user-redux/useUserActionsRedux.d.ts +12 -0
- package/dist/cjs/hooks/user-redux/useUserActionsRedux.js +125 -0
- package/dist/cjs/hooks/user-redux/useUserActionsRedux.js.map +1 -0
- package/dist/cjs/hooks/user-redux/useUserRedux.d.ts +18 -0
- package/dist/cjs/hooks/user-redux/useUserRedux.js +116 -0
- package/dist/cjs/hooks/user-redux/useUserRedux.js.map +1 -0
- package/dist/cjs/hooks/users/index.d.ts +0 -2
- package/dist/cjs/hooks/users/index.js +4 -5
- package/dist/cjs/hooks/users/index.js.map +1 -1
- package/dist/cjs/index.d.ts +7 -6
- package/dist/cjs/index.js +11 -18
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/store/api/appNotificationsApi.d.ts +144 -141
- package/dist/cjs/store/api/appNotificationsApi.js +11 -0
- package/dist/cjs/store/api/appNotificationsApi.js.map +1 -1
- package/dist/cjs/store/api/baseApi.d.ts +1 -1
- package/dist/cjs/store/api/baseApi.js +2 -2
- package/dist/cjs/store/api/baseApi.js.map +1 -1
- package/dist/cjs/store/api/index.d.ts +1 -0
- package/dist/cjs/store/api/index.js +2 -1
- package/dist/cjs/store/api/index.js.map +1 -1
- package/dist/cjs/store/api/listsApi.d.ts +3044 -0
- package/dist/cjs/store/api/listsApi.js +288 -0
- package/dist/cjs/store/api/listsApi.js.map +1 -0
- package/dist/cjs/store/api/userApi.d.ts +183 -0
- package/dist/cjs/store/api/userApi.js +38 -0
- package/dist/cjs/store/api/userApi.js.map +1 -0
- package/dist/cjs/store/index.d.ts +6 -2
- package/dist/cjs/store/rootReducer.d.ts +6 -2
- package/dist/cjs/store/rootReducer.js +4 -0
- package/dist/cjs/store/rootReducer.js.map +1 -1
- package/dist/cjs/store/slices/authThunks.js +6 -0
- package/dist/cjs/store/slices/authThunks.js.map +1 -1
- package/dist/cjs/store/slices/listsSlice.d.ts +66 -0
- package/dist/cjs/store/slices/listsSlice.js +213 -0
- package/dist/cjs/store/slices/listsSlice.js.map +1 -0
- package/dist/cjs/store/slices/userSlice.d.ts +29 -0
- package/dist/cjs/store/slices/userSlice.js +87 -0
- package/dist/cjs/store/slices/userSlice.js.map +1 -0
- package/dist/esm/context/index.d.ts +0 -1
- package/dist/esm/context/index.js +2 -1
- package/dist/esm/context/index.js.map +1 -1
- package/dist/esm/helpers/addNotificationsMessages.js +1 -1
- package/dist/esm/helpers/addNotificationsMessages.js.map +1 -1
- package/dist/esm/hooks/app-notifications-redux/index.d.ts +1 -2
- package/dist/esm/hooks/app-notifications-redux/index.js +0 -1
- package/dist/esm/hooks/app-notifications-redux/index.js.map +1 -1
- package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.d.ts +18 -4
- package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.js +77 -9
- package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.js.map +1 -1
- package/dist/esm/hooks/lists-redux/index.d.ts +2 -0
- package/dist/esm/hooks/lists-redux/index.js +4 -0
- package/dist/esm/hooks/lists-redux/index.js.map +1 -0
- package/dist/esm/hooks/lists-redux/useListsActionsRedux.d.ts +21 -0
- package/dist/esm/hooks/lists-redux/useListsActionsRedux.js +326 -0
- package/dist/esm/hooks/lists-redux/useListsActionsRedux.js.map +1 -0
- package/dist/esm/hooks/{lists/useListsData.d.ts → lists-redux/useListsRedux.d.ts} +9 -5
- package/dist/esm/hooks/lists-redux/useListsRedux.js +234 -0
- package/dist/esm/hooks/lists-redux/useListsRedux.js.map +1 -0
- package/dist/esm/hooks/user-redux/index.d.ts +2 -0
- package/dist/esm/hooks/user-redux/index.js +4 -0
- package/dist/esm/hooks/user-redux/index.js.map +1 -0
- package/dist/esm/hooks/user-redux/useUserActionsRedux.d.ts +12 -0
- package/dist/esm/hooks/user-redux/useUserActionsRedux.js +122 -0
- package/dist/esm/hooks/user-redux/useUserActionsRedux.js.map +1 -0
- package/dist/esm/hooks/user-redux/useUserRedux.d.ts +18 -0
- package/dist/esm/hooks/user-redux/useUserRedux.js +111 -0
- package/dist/esm/hooks/user-redux/useUserRedux.js.map +1 -0
- package/dist/esm/hooks/users/index.d.ts +0 -2
- package/dist/esm/hooks/users/index.js +3 -2
- package/dist/esm/hooks/users/index.js.map +1 -1
- package/dist/esm/index.d.ts +7 -6
- package/dist/esm/index.js +9 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/store/api/appNotificationsApi.d.ts +144 -141
- package/dist/esm/store/api/appNotificationsApi.js +11 -0
- package/dist/esm/store/api/appNotificationsApi.js.map +1 -1
- package/dist/esm/store/api/baseApi.d.ts +1 -1
- package/dist/esm/store/api/baseApi.js +2 -2
- package/dist/esm/store/api/baseApi.js.map +1 -1
- package/dist/esm/store/api/index.d.ts +1 -0
- package/dist/esm/store/api/index.js +2 -1
- package/dist/esm/store/api/index.js.map +1 -1
- package/dist/esm/store/api/listsApi.d.ts +3044 -0
- package/dist/esm/store/api/listsApi.js +285 -0
- package/dist/esm/store/api/listsApi.js.map +1 -0
- package/dist/esm/store/api/userApi.d.ts +183 -0
- package/dist/esm/store/api/userApi.js +35 -0
- package/dist/esm/store/api/userApi.js.map +1 -0
- package/dist/esm/store/index.d.ts +6 -2
- package/dist/esm/store/rootReducer.d.ts +6 -2
- package/dist/esm/store/rootReducer.js +4 -0
- package/dist/esm/store/rootReducer.js.map +1 -1
- package/dist/esm/store/slices/authThunks.js +6 -0
- package/dist/esm/store/slices/authThunks.js.map +1 -1
- package/dist/esm/store/slices/listsSlice.d.ts +66 -0
- package/dist/esm/store/slices/listsSlice.js +203 -0
- package/dist/esm/store/slices/listsSlice.js.map +1 -0
- package/dist/esm/store/slices/userSlice.d.ts +29 -0
- package/dist/esm/store/slices/userSlice.js +78 -0
- package/dist/esm/store/slices/userSlice.js.map +1 -0
- package/package.json +1 -1
- package/dist/cjs/context/lists-context.d.ts +0 -9
- package/dist/cjs/context/lists-context.js +0 -17
- package/dist/cjs/context/lists-context.js.map +0 -1
- package/dist/cjs/context/user-context.d.ts +0 -8
- package/dist/cjs/context/user-context.js +0 -28
- package/dist/cjs/context/user-context.js.map +0 -1
- package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.d.ts +0 -21
- package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.js +0 -108
- package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.js.map +0 -1
- package/dist/cjs/hooks/lists/index.d.ts +0 -10
- package/dist/cjs/hooks/lists/index.js +0 -27
- package/dist/cjs/hooks/lists/index.js.map +0 -1
- package/dist/cjs/hooks/lists/useAddToList.d.ts +0 -6
- package/dist/cjs/hooks/lists/useAddToList.js +0 -70
- package/dist/cjs/hooks/lists/useAddToList.js.map +0 -1
- package/dist/cjs/hooks/lists/useCreateList.d.ts +0 -6
- package/dist/cjs/hooks/lists/useCreateList.js +0 -70
- package/dist/cjs/hooks/lists/useCreateList.js.map +0 -1
- package/dist/cjs/hooks/lists/useDeleteList.d.ts +0 -4
- package/dist/cjs/hooks/lists/useDeleteList.js +0 -69
- package/dist/cjs/hooks/lists/useDeleteList.js.map +0 -1
- package/dist/cjs/hooks/lists/useFetchRootList.d.ts +0 -3
- package/dist/cjs/hooks/lists/useFetchRootList.js +0 -69
- package/dist/cjs/hooks/lists/useFetchRootList.js.map +0 -1
- package/dist/cjs/hooks/lists/useFetchSubLists.d.ts +0 -5
- package/dist/cjs/hooks/lists/useFetchSubLists.js +0 -68
- package/dist/cjs/hooks/lists/useFetchSubLists.js.map +0 -1
- package/dist/cjs/hooks/lists/useIsEntitySaved.d.ts +0 -5
- package/dist/cjs/hooks/lists/useIsEntitySaved.js +0 -78
- package/dist/cjs/hooks/lists/useIsEntitySaved.js.map +0 -1
- package/dist/cjs/hooks/lists/useLists.d.ts +0 -2
- package/dist/cjs/hooks/lists/useLists.js +0 -9
- package/dist/cjs/hooks/lists/useLists.js.map +0 -1
- package/dist/cjs/hooks/lists/useListsData.js +0 -391
- package/dist/cjs/hooks/lists/useListsData.js.map +0 -1
- package/dist/cjs/hooks/lists/useRemoveFromList.d.ts +0 -6
- package/dist/cjs/hooks/lists/useRemoveFromList.js +0 -70
- package/dist/cjs/hooks/lists/useRemoveFromList.js.map +0 -1
- package/dist/cjs/hooks/lists/useUpdateList.d.ts +0 -8
- package/dist/cjs/hooks/lists/useUpdateList.js +0 -70
- package/dist/cjs/hooks/lists/useUpdateList.js.map +0 -1
- package/dist/cjs/hooks/users/useUser.d.ts +0 -2
- package/dist/cjs/hooks/users/useUser.js +0 -9
- package/dist/cjs/hooks/users/useUser.js.map +0 -1
- package/dist/cjs/hooks/users/useUserData.d.ts +0 -12
- package/dist/cjs/hooks/users/useUserData.js +0 -76
- package/dist/cjs/hooks/users/useUserData.js.map +0 -1
- package/dist/cjs/legacy/context/app-notifications-context.d.ts +0 -8
- package/dist/cjs/legacy/context/app-notifications-context.js +0 -28
- package/dist/cjs/legacy/context/app-notifications-context.js.map +0 -1
- package/dist/cjs/legacy/context/auth-context.d.ts +0 -8
- package/dist/cjs/legacy/context/auth-context.js +0 -29
- package/dist/cjs/legacy/context/auth-context.js.map +0 -1
- package/dist/cjs/legacy/hooks/app-notifications/index.d.ts +0 -5
- package/dist/cjs/legacy/hooks/app-notifications/index.js +0 -17
- package/dist/cjs/legacy/hooks/app-notifications/index.js.map +0 -1
- package/dist/cjs/legacy/hooks/app-notifications/useAppNotifications.d.ts +0 -2
- package/dist/cjs/legacy/hooks/app-notifications/useAppNotifications.js +0 -9
- package/dist/cjs/legacy/hooks/app-notifications/useAppNotifications.js.map +0 -1
- package/dist/cjs/legacy/hooks/app-notifications/useAppNotificationsData.d.ts +0 -16
- package/dist/cjs/legacy/hooks/app-notifications/useAppNotificationsData.js +0 -225
- package/dist/cjs/legacy/hooks/app-notifications/useAppNotificationsData.js.map +0 -1
- package/dist/cjs/legacy/hooks/app-notifications/useCountUnreadNotifications.d.ts +0 -2
- package/dist/cjs/legacy/hooks/app-notifications/useCountUnreadNotifications.js +0 -72
- package/dist/cjs/legacy/hooks/app-notifications/useCountUnreadNotifications.js.map +0 -1
- package/dist/cjs/legacy/hooks/app-notifications/useFetchAppNotifications.d.ts +0 -6
- package/dist/cjs/legacy/hooks/app-notifications/useFetchAppNotifications.js +0 -79
- package/dist/cjs/legacy/hooks/app-notifications/useFetchAppNotifications.js.map +0 -1
- package/dist/cjs/legacy/hooks/app-notifications/useMarkNotificationAsRead.d.ts +0 -2
- package/dist/cjs/legacy/hooks/app-notifications/useMarkNotificationAsRead.js +0 -74
- package/dist/cjs/legacy/hooks/app-notifications/useMarkNotificationAsRead.js.map +0 -1
- package/dist/cjs/legacy/hooks/auth/index.d.ts +0 -8
- package/dist/cjs/legacy/hooks/auth/index.js +0 -23
- package/dist/cjs/legacy/hooks/auth/index.js.map +0 -1
- package/dist/cjs/legacy/hooks/auth/useAuth.d.ts +0 -2
- package/dist/cjs/legacy/hooks/auth/useAuth.js +0 -9
- package/dist/cjs/legacy/hooks/auth/useAuth.js.map +0 -1
- package/dist/cjs/legacy/hooks/auth/useAuthData.d.ts +0 -41
- package/dist/cjs/legacy/hooks/auth/useAuthData.js +0 -271
- package/dist/cjs/legacy/hooks/auth/useAuthData.js.map +0 -1
- package/dist/cjs/legacy/hooks/auth/useChangePassword.d.ts +0 -5
- package/dist/cjs/legacy/hooks/auth/useChangePassword.js +0 -70
- package/dist/cjs/legacy/hooks/auth/useChangePassword.js.map +0 -1
- package/dist/cjs/legacy/hooks/auth/useRequestNewAccessToken.d.ts +0 -7
- package/dist/cjs/legacy/hooks/auth/useRequestNewAccessToken.js +0 -71
- package/dist/cjs/legacy/hooks/auth/useRequestNewAccessToken.js.map +0 -1
- package/dist/cjs/legacy/hooks/auth/useSignInWithEmailAndPassword.d.ts +0 -9
- package/dist/cjs/legacy/hooks/auth/useSignInWithEmailAndPassword.js +0 -72
- package/dist/cjs/legacy/hooks/auth/useSignInWithEmailAndPassword.js.map +0 -1
- package/dist/cjs/legacy/hooks/auth/useSignOut.d.ts +0 -4
- package/dist/cjs/legacy/hooks/auth/useSignOut.js +0 -67
- package/dist/cjs/legacy/hooks/auth/useSignOut.js.map +0 -1
- package/dist/cjs/legacy/hooks/auth/useSignUpWithEmailAndPassword.d.ts +0 -20
- package/dist/cjs/legacy/hooks/auth/useSignUpWithEmailAndPassword.js +0 -80
- package/dist/cjs/legacy/hooks/auth/useSignUpWithEmailAndPassword.js.map +0 -1
- package/dist/cjs/legacy/hooks/auth/useVerifyExternalUser.d.ts +0 -8
- package/dist/cjs/legacy/hooks/auth/useVerifyExternalUser.js +0 -70
- package/dist/cjs/legacy/hooks/auth/useVerifyExternalUser.js.map +0 -1
- package/dist/esm/context/lists-context.d.ts +0 -9
- package/dist/esm/context/lists-context.js +0 -10
- package/dist/esm/context/lists-context.js.map +0 -1
- package/dist/esm/context/user-context.d.ts +0 -8
- package/dist/esm/context/user-context.js +0 -21
- package/dist/esm/context/user-context.js.map +0 -1
- package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.d.ts +0 -21
- package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.js +0 -103
- package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.js.map +0 -1
- package/dist/esm/hooks/lists/index.d.ts +0 -10
- package/dist/esm/hooks/lists/index.js +0 -11
- package/dist/esm/hooks/lists/index.js.map +0 -1
- package/dist/esm/hooks/lists/useAddToList.d.ts +0 -6
- package/dist/esm/hooks/lists/useAddToList.js +0 -65
- package/dist/esm/hooks/lists/useAddToList.js.map +0 -1
- package/dist/esm/hooks/lists/useCreateList.d.ts +0 -6
- package/dist/esm/hooks/lists/useCreateList.js +0 -65
- package/dist/esm/hooks/lists/useCreateList.js.map +0 -1
- package/dist/esm/hooks/lists/useDeleteList.d.ts +0 -4
- package/dist/esm/hooks/lists/useDeleteList.js +0 -64
- package/dist/esm/hooks/lists/useDeleteList.js.map +0 -1
- package/dist/esm/hooks/lists/useFetchRootList.d.ts +0 -3
- package/dist/esm/hooks/lists/useFetchRootList.js +0 -64
- package/dist/esm/hooks/lists/useFetchRootList.js.map +0 -1
- package/dist/esm/hooks/lists/useFetchSubLists.d.ts +0 -5
- package/dist/esm/hooks/lists/useFetchSubLists.js +0 -63
- package/dist/esm/hooks/lists/useFetchSubLists.js.map +0 -1
- package/dist/esm/hooks/lists/useIsEntitySaved.d.ts +0 -5
- package/dist/esm/hooks/lists/useIsEntitySaved.js +0 -73
- package/dist/esm/hooks/lists/useIsEntitySaved.js.map +0 -1
- package/dist/esm/hooks/lists/useLists.d.ts +0 -2
- package/dist/esm/hooks/lists/useLists.js +0 -6
- package/dist/esm/hooks/lists/useLists.js.map +0 -1
- package/dist/esm/hooks/lists/useListsData.js +0 -386
- package/dist/esm/hooks/lists/useListsData.js.map +0 -1
- package/dist/esm/hooks/lists/useRemoveFromList.d.ts +0 -6
- package/dist/esm/hooks/lists/useRemoveFromList.js +0 -65
- package/dist/esm/hooks/lists/useRemoveFromList.js.map +0 -1
- package/dist/esm/hooks/lists/useUpdateList.d.ts +0 -8
- package/dist/esm/hooks/lists/useUpdateList.js +0 -65
- package/dist/esm/hooks/lists/useUpdateList.js.map +0 -1
- package/dist/esm/hooks/users/useUser.d.ts +0 -2
- package/dist/esm/hooks/users/useUser.js +0 -6
- package/dist/esm/hooks/users/useUser.js.map +0 -1
- package/dist/esm/hooks/users/useUserData.d.ts +0 -12
- package/dist/esm/hooks/users/useUserData.js +0 -71
- package/dist/esm/hooks/users/useUserData.js.map +0 -1
- package/dist/esm/legacy/context/app-notifications-context.d.ts +0 -8
- package/dist/esm/legacy/context/app-notifications-context.js +0 -21
- package/dist/esm/legacy/context/app-notifications-context.js.map +0 -1
- package/dist/esm/legacy/context/auth-context.d.ts +0 -8
- package/dist/esm/legacy/context/auth-context.js +0 -22
- package/dist/esm/legacy/context/auth-context.js.map +0 -1
- package/dist/esm/legacy/hooks/app-notifications/index.d.ts +0 -5
- package/dist/esm/legacy/hooks/app-notifications/index.js +0 -6
- package/dist/esm/legacy/hooks/app-notifications/index.js.map +0 -1
- package/dist/esm/legacy/hooks/app-notifications/useAppNotifications.d.ts +0 -2
- package/dist/esm/legacy/hooks/app-notifications/useAppNotifications.js +0 -6
- package/dist/esm/legacy/hooks/app-notifications/useAppNotifications.js.map +0 -1
- package/dist/esm/legacy/hooks/app-notifications/useAppNotificationsData.d.ts +0 -16
- package/dist/esm/legacy/hooks/app-notifications/useAppNotificationsData.js +0 -220
- package/dist/esm/legacy/hooks/app-notifications/useAppNotificationsData.js.map +0 -1
- package/dist/esm/legacy/hooks/app-notifications/useCountUnreadNotifications.d.ts +0 -2
- package/dist/esm/legacy/hooks/app-notifications/useCountUnreadNotifications.js +0 -67
- package/dist/esm/legacy/hooks/app-notifications/useCountUnreadNotifications.js.map +0 -1
- package/dist/esm/legacy/hooks/app-notifications/useFetchAppNotifications.d.ts +0 -6
- package/dist/esm/legacy/hooks/app-notifications/useFetchAppNotifications.js +0 -74
- package/dist/esm/legacy/hooks/app-notifications/useFetchAppNotifications.js.map +0 -1
- package/dist/esm/legacy/hooks/app-notifications/useMarkNotificationAsRead.d.ts +0 -2
- package/dist/esm/legacy/hooks/app-notifications/useMarkNotificationAsRead.js +0 -69
- package/dist/esm/legacy/hooks/app-notifications/useMarkNotificationAsRead.js.map +0 -1
- package/dist/esm/legacy/hooks/auth/index.d.ts +0 -8
- package/dist/esm/legacy/hooks/auth/index.js +0 -9
- package/dist/esm/legacy/hooks/auth/index.js.map +0 -1
- package/dist/esm/legacy/hooks/auth/useAuth.d.ts +0 -2
- package/dist/esm/legacy/hooks/auth/useAuth.js +0 -6
- package/dist/esm/legacy/hooks/auth/useAuth.js.map +0 -1
- package/dist/esm/legacy/hooks/auth/useAuthData.d.ts +0 -41
- package/dist/esm/legacy/hooks/auth/useAuthData.js +0 -266
- package/dist/esm/legacy/hooks/auth/useAuthData.js.map +0 -1
- package/dist/esm/legacy/hooks/auth/useChangePassword.d.ts +0 -5
- package/dist/esm/legacy/hooks/auth/useChangePassword.js +0 -65
- package/dist/esm/legacy/hooks/auth/useChangePassword.js.map +0 -1
- package/dist/esm/legacy/hooks/auth/useRequestNewAccessToken.d.ts +0 -7
- package/dist/esm/legacy/hooks/auth/useRequestNewAccessToken.js +0 -66
- package/dist/esm/legacy/hooks/auth/useRequestNewAccessToken.js.map +0 -1
- package/dist/esm/legacy/hooks/auth/useSignInWithEmailAndPassword.d.ts +0 -9
- package/dist/esm/legacy/hooks/auth/useSignInWithEmailAndPassword.js +0 -67
- package/dist/esm/legacy/hooks/auth/useSignInWithEmailAndPassword.js.map +0 -1
- package/dist/esm/legacy/hooks/auth/useSignOut.d.ts +0 -4
- package/dist/esm/legacy/hooks/auth/useSignOut.js +0 -62
- package/dist/esm/legacy/hooks/auth/useSignOut.js.map +0 -1
- package/dist/esm/legacy/hooks/auth/useSignUpWithEmailAndPassword.d.ts +0 -20
- package/dist/esm/legacy/hooks/auth/useSignUpWithEmailAndPassword.js +0 -75
- package/dist/esm/legacy/hooks/auth/useSignUpWithEmailAndPassword.js.map +0 -1
- package/dist/esm/legacy/hooks/auth/useVerifyExternalUser.d.ts +0 -8
- package/dist/esm/legacy/hooks/auth/useVerifyExternalUser.js +0 -65
- 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,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,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,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,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,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,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 +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"}
|