@nocios/crudify-ui 1.0.80 → 1.0.81
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 +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -18,11 +18,19 @@ interface CrudifyLoginConfig {
|
|
|
18
18
|
interface CrudifyLoginTranslations {
|
|
19
19
|
[key: string]: string | CrudifyLoginTranslations;
|
|
20
20
|
}
|
|
21
|
+
interface UserLoginData {
|
|
22
|
+
token: string;
|
|
23
|
+
username?: string;
|
|
24
|
+
email?: string;
|
|
25
|
+
userId?: string;
|
|
26
|
+
profile?: any;
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
}
|
|
21
29
|
interface CrudifyLoginProps {
|
|
22
30
|
config?: CrudifyLoginConfig;
|
|
23
31
|
onScreenChange?: (screen: BoxScreenType, params?: Record<string, string>) => void;
|
|
24
32
|
onExternalNavigate?: (path: string) => void;
|
|
25
|
-
onLoginSuccess?: (
|
|
33
|
+
onLoginSuccess?: (userData: UserLoginData, redirectUrl?: string) => void;
|
|
26
34
|
onError?: (error: string) => void;
|
|
27
35
|
initialScreen?: BoxScreenType;
|
|
28
36
|
redirectUrl?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -18,11 +18,19 @@ interface CrudifyLoginConfig {
|
|
|
18
18
|
interface CrudifyLoginTranslations {
|
|
19
19
|
[key: string]: string | CrudifyLoginTranslations;
|
|
20
20
|
}
|
|
21
|
+
interface UserLoginData {
|
|
22
|
+
token: string;
|
|
23
|
+
username?: string;
|
|
24
|
+
email?: string;
|
|
25
|
+
userId?: string;
|
|
26
|
+
profile?: any;
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
}
|
|
21
29
|
interface CrudifyLoginProps {
|
|
22
30
|
config?: CrudifyLoginConfig;
|
|
23
31
|
onScreenChange?: (screen: BoxScreenType, params?: Record<string, string>) => void;
|
|
24
32
|
onExternalNavigate?: (path: string) => void;
|
|
25
|
-
onLoginSuccess?: (
|
|
33
|
+
onLoginSuccess?: (userData: UserLoginData, redirectUrl?: string) => void;
|
|
26
34
|
onError?: (error: string) => void;
|
|
27
35
|
initialScreen?: BoxScreenType;
|
|
28
36
|
redirectUrl?: string;
|
package/dist/index.js
CHANGED
|
@@ -883,7 +883,7 @@ var LoginForm = ({ onScreenChange, onExternalNavigate, onLoginSuccess, onError,
|
|
|
883
883
|
const finalRedirectUrl = getRedirectUrl();
|
|
884
884
|
setTimeout(() => {
|
|
885
885
|
if (onLoginSuccess) {
|
|
886
|
-
onLoginSuccess(response.data
|
|
886
|
+
onLoginSuccess(response.data, finalRedirectUrl);
|
|
887
887
|
}
|
|
888
888
|
}, 50);
|
|
889
889
|
} else {
|
package/dist/index.mjs
CHANGED
|
@@ -832,7 +832,7 @@ var LoginForm = ({ onScreenChange, onExternalNavigate, onLoginSuccess, onError,
|
|
|
832
832
|
const finalRedirectUrl = getRedirectUrl();
|
|
833
833
|
setTimeout(() => {
|
|
834
834
|
if (onLoginSuccess) {
|
|
835
|
-
onLoginSuccess(response.data
|
|
835
|
+
onLoginSuccess(response.data, finalRedirectUrl);
|
|
836
836
|
}
|
|
837
837
|
}, 50);
|
|
838
838
|
} else {
|