@jctrans-materials/comps-vue3 1.0.42-beta.0 → 1.0.42-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/components/JcLoginDialog/cmps/ThirdBindLogin.d.ts +6 -2
- package/dist/components/JcLoginDialog/composables/useAuthLogin.d.ts +1 -0
- package/dist/components/JcLoginDialog/composables/useThirdPartyLogin.d.ts +2 -0
- package/dist/components/JcLoginDialog/constant.d.ts +18 -0
- package/dist/components/JcLoginDialog/index.d.ts +7 -2
- package/dist/index.cjs.js +2 -2
- package/dist/index.css +1 -1
- package/dist/index.esm.js +291 -165
- package/package.json +2 -2
|
@@ -7,7 +7,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
7
7
|
type: () => Array<any>;
|
|
8
8
|
default: () => never[];
|
|
9
9
|
};
|
|
10
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
"login-success": (payload: Record<string, unknown>) => void;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
11
13
|
isEn: {
|
|
12
14
|
type: BooleanConstructor;
|
|
13
15
|
default: boolean;
|
|
@@ -16,7 +18,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
16
18
|
type: () => Array<any>;
|
|
17
19
|
default: () => never[];
|
|
18
20
|
};
|
|
19
|
-
}>> & Readonly<{
|
|
21
|
+
}>> & Readonly<{
|
|
22
|
+
"onLogin-success"?: ((payload: Record<string, unknown>) => any) | undefined;
|
|
23
|
+
}>, {
|
|
20
24
|
isEn: boolean;
|
|
21
25
|
bindList: any[];
|
|
22
26
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -6,6 +6,7 @@ interface AuthOptions {
|
|
|
6
6
|
isEn?: boolean | ComputedRef<boolean>;
|
|
7
7
|
onSuccess?: (data: any) => void;
|
|
8
8
|
onNeedComplete?: (data: any) => void;
|
|
9
|
+
test?: boolean | ComputedRef<boolean>;
|
|
9
10
|
}
|
|
10
11
|
type LoginType = "account" | "code" | "wechat" | "TEST" | "linkedin" | "facebook";
|
|
11
12
|
export declare function useAuthLogin(options?: AuthOptions): {
|
|
@@ -8,6 +8,8 @@ interface ThirdPartyConfig {
|
|
|
8
8
|
onSuccess?: (data: any) => void;
|
|
9
9
|
onError?: (error: any) => void;
|
|
10
10
|
onNeedBind?: (list: any[]) => void;
|
|
11
|
+
onNeedComplete?: (data: any) => void;
|
|
12
|
+
test?: boolean | ComputedRef<boolean>;
|
|
11
13
|
}
|
|
12
14
|
export declare const getThirdPartySessions: () => {
|
|
13
15
|
thirdPartyId: string;
|
|
@@ -5,6 +5,7 @@ interface ValidationRule {
|
|
|
5
5
|
type?: string;
|
|
6
6
|
msg?: string;
|
|
7
7
|
}
|
|
8
|
+
export declare function validateEmailFormat(rule: ValidationRule, value: string | null | undefined, callback: (error?: Error) => void, isEn?: boolean): void;
|
|
8
9
|
export declare function validateUserEmail(rule: ValidationRule, value: string | null | undefined, callback: (error?: Error) => void, isEn?: boolean, // 注入文案
|
|
9
10
|
checkExist?: boolean): Promise<void>;
|
|
10
11
|
export declare function validateThirdPartyEmail(rule: ValidationRule, value: string | null | undefined, callback: (error?: Error) => void, isEn?: boolean, // 注入文案
|
|
@@ -43,6 +44,7 @@ export declare function validateUserPass(rule: any, value: any, callback: any, i
|
|
|
43
44
|
* @param {Function} callback 回调函数
|
|
44
45
|
* @param {Boolean} isEn 是否为英文环境
|
|
45
46
|
*/
|
|
47
|
+
export declare function validateMobileFormat(rule: any, value: any, callback: any, isEn?: boolean): any;
|
|
46
48
|
export declare function validateUserMobilefive(rule: any, value: any, callback: any, isEn?: boolean, checkExist?: boolean): Promise<any>;
|
|
47
49
|
/**
|
|
48
50
|
* 空格处理工具函数
|
|
@@ -74,6 +76,22 @@ export declare function go2Policy(target?: string): void;
|
|
|
74
76
|
* @param {number} delay - 延迟时间(ms),默认100ms
|
|
75
77
|
*/
|
|
76
78
|
export declare const handleRedirect: (path: any, delay?: number) => void;
|
|
79
|
+
/**
|
|
80
|
+
* 判断是否处于「测试模式」。满足以下任一条件即视为开启:
|
|
81
|
+
* 1. 组件显式传入 `test` prop 为 true;
|
|
82
|
+
* 2. 运行时检测到测试模式已开启:
|
|
83
|
+
* - 全局标记 `window.__JC_TEST_MODE__ === true`(测试脚本可手动设置)
|
|
84
|
+
* - URL query:`?test=1` 或 `?testMode=1`
|
|
85
|
+
* - Cookie:`jc-test-mode=1`
|
|
86
|
+
*
|
|
87
|
+
* 设计意图:测试模式下登录接口照常调用,但跳过 redirect 跳转,
|
|
88
|
+
* 改为在控制台打印接口完整返回值,便于联调与自动化断言。
|
|
89
|
+
*/
|
|
90
|
+
export declare const detectTestMode: (propTest?: boolean) => boolean;
|
|
91
|
+
/**
|
|
92
|
+
* 测试模式下,打印登录接口完整返回值(替代 redirect 行为)。
|
|
93
|
+
*/
|
|
94
|
+
export declare const logTestLoginResult: (label: string, data: unknown) => void;
|
|
77
95
|
/**
|
|
78
96
|
* 统一将重定向延迟输入规范化为毫秒数
|
|
79
97
|
* - undefined / null / "" → 0
|
|
@@ -8,6 +8,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
8
8
|
showTestThirdBtn?: boolean;
|
|
9
9
|
baseMode?: string;
|
|
10
10
|
appId?: string;
|
|
11
|
+
test?: boolean;
|
|
11
12
|
}>, {
|
|
12
13
|
visible: boolean;
|
|
13
14
|
lang: string;
|
|
@@ -16,9 +17,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
16
17
|
showTestThirdBtn: boolean;
|
|
17
18
|
baseMode: string;
|
|
18
19
|
appId: string;
|
|
20
|
+
test: boolean;
|
|
19
21
|
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
22
|
"update:visible": (value: boolean) => void;
|
|
21
23
|
open: () => void;
|
|
24
|
+
"login-success": (payload: Record<string, unknown>) => void;
|
|
22
25
|
"update:baseMode": (value: string) => void;
|
|
23
26
|
"mode-change": (payload: {
|
|
24
27
|
formMode: FormMode;
|
|
@@ -28,7 +31,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
28
31
|
loginType: LoginType;
|
|
29
32
|
formMode: FormMode;
|
|
30
33
|
}) => void;
|
|
31
|
-
"login-success": (payload: Record<string, unknown>) => void;
|
|
32
34
|
"register-success": (payload: Record<string, unknown>) => void;
|
|
33
35
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
34
36
|
visible?: boolean;
|
|
@@ -38,6 +40,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
38
40
|
showTestThirdBtn?: boolean;
|
|
39
41
|
baseMode?: string;
|
|
40
42
|
appId?: string;
|
|
43
|
+
test?: boolean;
|
|
41
44
|
}>, {
|
|
42
45
|
visible: boolean;
|
|
43
46
|
lang: string;
|
|
@@ -46,9 +49,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
46
49
|
showTestThirdBtn: boolean;
|
|
47
50
|
baseMode: string;
|
|
48
51
|
appId: string;
|
|
52
|
+
test: boolean;
|
|
49
53
|
}>>> & Readonly<{
|
|
50
54
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
51
55
|
onOpen?: (() => any) | undefined;
|
|
56
|
+
"onLogin-success"?: ((payload: Record<string, unknown>) => any) | undefined;
|
|
52
57
|
"onUpdate:baseMode"?: ((value: string) => any) | undefined;
|
|
53
58
|
"onMode-change"?: ((payload: {
|
|
54
59
|
formMode: FormMode;
|
|
@@ -58,9 +63,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
58
63
|
loginType: LoginType;
|
|
59
64
|
formMode: FormMode;
|
|
60
65
|
}) => any) | undefined;
|
|
61
|
-
"onLogin-success"?: ((payload: Record<string, unknown>) => any) | undefined;
|
|
62
66
|
"onRegister-success"?: ((payload: Record<string, unknown>) => any) | undefined;
|
|
63
67
|
}>, {
|
|
68
|
+
test: boolean;
|
|
64
69
|
visible: boolean;
|
|
65
70
|
lang: string;
|
|
66
71
|
appId: string;
|