react-redux-django-auth 1.0.0 → 1.1.0
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/index.d.mts +39 -6
- package/dist/index.d.ts +39 -6
- package/dist/index.js +904 -14
- package/dist/index.mjs +406 -11
- package/package.json +10 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,42 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React$1 from 'react';
|
|
2
2
|
|
|
3
|
-
interface
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
interface ActivateHookReturn {
|
|
4
|
+
loading: boolean;
|
|
5
|
+
error: any;
|
|
6
|
+
onSubmit: (e: React.FormEvent) => Promise<void>;
|
|
7
|
+
status: any;
|
|
8
|
+
isStatus204: boolean;
|
|
6
9
|
}
|
|
7
|
-
declare const
|
|
10
|
+
declare const useActivate: (uid: string, token: string, apiUrl: string) => ActivateHookReturn;
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
interface LoginHookReturn {
|
|
13
|
+
loading: boolean;
|
|
14
|
+
formData: any;
|
|
15
|
+
error: any;
|
|
16
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
17
|
+
onSubmit: (e: React.FormEvent) => Promise<void>;
|
|
18
|
+
isAuthenticated: boolean | null;
|
|
19
|
+
isStatus200: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare const useLogin: (initialFields: any, apiUrl: string) => LoginHookReturn;
|
|
22
|
+
|
|
23
|
+
declare const useLogout: () => (() => void);
|
|
24
|
+
|
|
25
|
+
interface SignupHookReturn {
|
|
26
|
+
loading: boolean;
|
|
27
|
+
formData: any;
|
|
28
|
+
error: any;
|
|
29
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
30
|
+
onSubmit: (e: React.FormEvent) => Promise<void>;
|
|
31
|
+
isAuthenticated: boolean | null;
|
|
32
|
+
status: any;
|
|
33
|
+
isStatus201: boolean;
|
|
34
|
+
}
|
|
35
|
+
declare const useSignup: (initialFields: any, apiUrl: string) => SignupHookReturn;
|
|
36
|
+
|
|
37
|
+
type AuthProviderProps = {
|
|
38
|
+
children: React$1.ReactNode;
|
|
39
|
+
};
|
|
40
|
+
declare const AuthProvider: React$1.FC<AuthProviderProps>;
|
|
41
|
+
|
|
42
|
+
export { AuthProvider, useActivate, useLogin, useLogout, useSignup };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,42 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React$1 from 'react';
|
|
2
2
|
|
|
3
|
-
interface
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
interface ActivateHookReturn {
|
|
4
|
+
loading: boolean;
|
|
5
|
+
error: any;
|
|
6
|
+
onSubmit: (e: React.FormEvent) => Promise<void>;
|
|
7
|
+
status: any;
|
|
8
|
+
isStatus204: boolean;
|
|
6
9
|
}
|
|
7
|
-
declare const
|
|
10
|
+
declare const useActivate: (uid: string, token: string, apiUrl: string) => ActivateHookReturn;
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
interface LoginHookReturn {
|
|
13
|
+
loading: boolean;
|
|
14
|
+
formData: any;
|
|
15
|
+
error: any;
|
|
16
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
17
|
+
onSubmit: (e: React.FormEvent) => Promise<void>;
|
|
18
|
+
isAuthenticated: boolean | null;
|
|
19
|
+
isStatus200: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare const useLogin: (initialFields: any, apiUrl: string) => LoginHookReturn;
|
|
22
|
+
|
|
23
|
+
declare const useLogout: () => (() => void);
|
|
24
|
+
|
|
25
|
+
interface SignupHookReturn {
|
|
26
|
+
loading: boolean;
|
|
27
|
+
formData: any;
|
|
28
|
+
error: any;
|
|
29
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
30
|
+
onSubmit: (e: React.FormEvent) => Promise<void>;
|
|
31
|
+
isAuthenticated: boolean | null;
|
|
32
|
+
status: any;
|
|
33
|
+
isStatus201: boolean;
|
|
34
|
+
}
|
|
35
|
+
declare const useSignup: (initialFields: any, apiUrl: string) => SignupHookReturn;
|
|
36
|
+
|
|
37
|
+
type AuthProviderProps = {
|
|
38
|
+
children: React$1.ReactNode;
|
|
39
|
+
};
|
|
40
|
+
declare const AuthProvider: React$1.FC<AuthProviderProps>;
|
|
41
|
+
|
|
42
|
+
export { AuthProvider, useActivate, useLogin, useLogout, useSignup };
|