@huyooo/ui 0.10.3 → 0.10.7
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/AuthkitSignInPhone-BWPCpUie.js +3034 -0
- package/dist/{Clipboard-CMm8I4Rb.js → Clipboard-CK_nROjb.js} +1 -1
- package/dist/CollapseItem-DUzZA6tx.js +124 -0
- package/dist/{Contact-Dgn8_it4.js → Contact-CpHU1bJ7.js} +2 -2
- package/dist/{CustomTable-CVZ4mFzi.js → CustomTable-1W5byjgJ.js} +3 -2
- package/dist/FeedbackModal-qAJLL3V3.js +1535 -0
- package/dist/{LandingPageSectionTabs-Dv_xOLqR.js → LandingPageSectionTabs-B6ZVxR47.js} +1 -1
- package/dist/MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-D109kT8_.js +1282 -0
- package/dist/{PaySubscriptions-W6GJ28uE.js → PaySubscriptions-C4Een__-.js} +17 -16
- package/dist/{ReferrerReferees-C5Sjn7aD.js → ReferrerReferees-DIassvGO.js} +8 -8
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-C4-In_x4.js → Upload.vue_vue_type_script_setup_true_lang-DA8VZBrl.js} +1 -1
- package/dist/UserAccountMenu-BIRTtjLb.js +266 -0
- package/dist/UserSubscriptionBaseInformation-BUs3qiHd.js +60 -0
- package/dist/WidthContainer-TXsvW1ut.js +673 -0
- package/dist/{apiClients-DJchWBAG.js → apiClients-ANEApCyY.js} +84 -75
- package/dist/authkit.d.ts +5 -6
- package/dist/authkit.js +43 -43
- package/dist/common.js +3 -3
- package/dist/components/Authkit/Auth/AuthkitServiceAgreementAndPrivacyProtection.vue.d.ts +5 -5
- package/dist/components/Authkit/AuthkitAuthModal.vue.d.ts +13 -31
- package/dist/components/Feedback/FeedbackBubbleEnd.vue.d.ts +1 -1
- package/dist/components/Feedback/FeedbackBubbleStart.vue.d.ts +1 -1
- package/dist/components/User/UserButton.vue.d.ts +1 -36
- package/dist/components/User/UserPanel.vue.d.ts +26 -201
- package/dist/components/User/UserPanelItem.vue.d.ts +38 -0
- package/dist/composables/Authkit/useAuthkitAuth.d.ts +34 -10
- package/dist/composables/Authkit/useAuthkitAuthModal.d.ts +22 -3
- package/dist/composables/Authkit/useLegalLinks.d.ts +34 -0
- package/dist/composables/Authkit/useOauth.d.ts +0 -1
- package/dist/composables.d.ts +3 -2
- package/dist/composables.js +27 -25
- package/dist/{useUploadCos-BO3W_uqs.js → cos-js-sdk-v5-BJ5AlBRu.js} +2232 -2469
- package/dist/feedback.js +15 -16
- package/dist/landingPage.js +1 -1
- package/dist/main.js +177 -177
- package/dist/message.js +9 -10
- package/dist/pay.js +1 -1
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/style.css +1 -1
- package/dist/upload.js +2 -2
- package/dist/{useAuthkitAppsAuthPageInfo-C3EHOtlk.js → useAuthkitAppsAuthPageInfo-Da2yJTT-.js} +1 -1
- package/dist/{useAuthkitCreateAndUpdate-CPkogY7K.js → useAuthkitCreateAndUpdate-BLs5vQOu.js} +1 -1
- package/dist/useAuthkitUsersProfile-Cx8NXjlt.js +186 -0
- package/dist/{useDownloads-COXmopbe.js → useDownloads-DT5W2af6.js} +1 -1
- package/dist/useLegalLinks-BIF45kUt.js +60 -0
- package/dist/{useMessageNotifications-SIM85vdb.js → useMessageNotifications-CavBmgO7.js} +1 -1
- package/dist/{useSEO-DeAU9YEc.js → useSEO-MPXQf0dn.js} +2 -2
- package/dist/{useTableHandle-CWu0LbeI.js → useTableHandle--NSbZ-57.js} +1 -1
- package/dist/useUploadCos-D6y0INvP.js +242 -0
- package/dist/user.d.ts +1 -0
- package/dist/user.js +9 -7
- package/dist/utils/legalLinks.d.ts +22 -0
- package/package.json +1 -1
- package/dist/AuthkitAuthModal-De0eEWOC.js +0 -2112
- package/dist/AuthkitSignInPhone-DEUVn3Rq.js +0 -920
- package/dist/CollapseItem-BAuejDBZ.js +0 -57
- package/dist/FeedbackItem-CRiLkWMh.js +0 -495
- package/dist/FeedbackModal-B8WLPCy_.js +0 -1053
- package/dist/MessageHandle-DpIUeQ7U.js +0 -1147
- package/dist/MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-BbtfWRUD.js +0 -142
- package/dist/UserAccountMenu-OdwonGFa.js +0 -633
- package/dist/WidthContainer-Cpdc67hQ.js +0 -652
- package/dist/index-CUfrjRxu.js +0 -73
- package/dist/useAuthkitUsersProfile-BqW74gfs.js +0 -172
|
@@ -1,216 +1,41 @@
|
|
|
1
|
-
interface VisibleOptions {
|
|
2
|
-
messages?: boolean;
|
|
3
|
-
setting?: boolean;
|
|
4
|
-
subscription?: boolean;
|
|
5
|
-
feedBack?: boolean;
|
|
6
|
-
invitations?: boolean;
|
|
7
|
-
homePage?: boolean;
|
|
8
|
-
signOut?: boolean;
|
|
9
|
-
}
|
|
10
1
|
type __VLS_Props = {
|
|
11
2
|
position?: "tl" | "tr" | "bl" | "br" | "top" | "bottom" | "left" | "right" | "lt" | "lb" | "rt" | "rb";
|
|
3
|
+
/** 下拉弹层 X 轴偏移(透传到 CSS 变量 --dropdown-translate-x) */
|
|
12
4
|
dropdownOffsetX?: string;
|
|
5
|
+
/** 下拉弹层 Y 轴偏移(透传到 CSS 变量 --dropdown-translate-y) */
|
|
13
6
|
dropdownOffsetY?: string;
|
|
14
|
-
/** 控制各个下拉选项的显示隐藏 */
|
|
15
|
-
visibleOptions?: VisibleOptions;
|
|
16
7
|
};
|
|
17
8
|
type __VLS_PublicProps = {
|
|
18
9
|
modelValue?: boolean;
|
|
19
10
|
} & __VLS_Props;
|
|
20
|
-
declare
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
11
|
+
declare function __VLS_template(): {
|
|
12
|
+
attrs: Partial<{}>;
|
|
13
|
+
slots: {
|
|
14
|
+
trigger?(_: {
|
|
15
|
+
user: import('../../user').UserProfileType | null;
|
|
16
|
+
}): any;
|
|
17
|
+
header?(_: {
|
|
18
|
+
user: import('../../user').UserProfileType | null;
|
|
19
|
+
}): any;
|
|
20
|
+
items?(_: {}): any;
|
|
21
|
+
};
|
|
22
|
+
refs: {};
|
|
23
|
+
rootEl: HTMLDivElement;
|
|
24
|
+
};
|
|
25
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
26
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
27
|
+
"update:modelValue": (value: boolean) => any;
|
|
25
28
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
26
|
-
onSignIn?: ((...args: any[]) => any) | undefined;
|
|
27
|
-
onSignOut?: ((...args: any[]) => any) | undefined;
|
|
28
29
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
29
|
-
onToHomePage?: ((...args: any[]) => any) | undefined;
|
|
30
30
|
}>, {
|
|
31
31
|
position: "tl" | "tr" | "bl" | "br" | "top" | "bottom" | "left" | "right" | "lt" | "lb" | "rt" | "rb";
|
|
32
32
|
dropdownOffsetX: string;
|
|
33
33
|
dropdownOffsetY: string;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
AuthModalRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
37
|
-
size: {
|
|
38
|
-
type: import('vue').PropType<import('../../authkit').FormSizeType>;
|
|
39
|
-
required: true;
|
|
40
|
-
};
|
|
41
|
-
appId: {
|
|
42
|
-
type: StringConstructor;
|
|
43
|
-
default: () => string;
|
|
44
|
-
};
|
|
45
|
-
}>> & Readonly<{
|
|
46
|
-
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
47
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
|
48
|
-
onToUserServiceAgreement?: ((...args: any[]) => any) | undefined;
|
|
49
|
-
onToPrivacyPolicy?: ((...args: any[]) => any) | undefined;
|
|
50
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
51
|
-
confirm: (...args: any[]) => void;
|
|
52
|
-
close: (...args: any[]) => void;
|
|
53
|
-
toUserServiceAgreement: (...args: any[]) => void;
|
|
54
|
-
toPrivacyPolicy: (...args: any[]) => void;
|
|
55
|
-
}, import('vue').PublicProps, {
|
|
56
|
-
appId: string;
|
|
57
|
-
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
58
|
-
P: {};
|
|
59
|
-
B: {};
|
|
60
|
-
D: {};
|
|
61
|
-
C: {};
|
|
62
|
-
M: {};
|
|
63
|
-
Defaults: {};
|
|
64
|
-
}, Readonly<import('vue').ExtractPropTypes<{
|
|
65
|
-
size: {
|
|
66
|
-
type: import('vue').PropType<import('../../authkit').FormSizeType>;
|
|
67
|
-
required: true;
|
|
68
|
-
};
|
|
69
|
-
appId: {
|
|
70
|
-
type: StringConstructor;
|
|
71
|
-
default: () => string;
|
|
72
|
-
};
|
|
73
|
-
}>> & Readonly<{
|
|
74
|
-
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
75
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
|
76
|
-
onToUserServiceAgreement?: ((...args: any[]) => any) | undefined;
|
|
77
|
-
onToPrivacyPolicy?: ((...args: any[]) => any) | undefined;
|
|
78
|
-
}>, {}, {}, {}, {}, {
|
|
79
|
-
appId: string;
|
|
80
|
-
}> | null;
|
|
81
|
-
AppSettingRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
|
|
82
|
-
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
83
|
-
onCancel?: ((...args: any[]) => any) | undefined;
|
|
84
|
-
}>, {
|
|
85
|
-
setData: (_data: unknown, state: false) => void;
|
|
86
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
87
|
-
confirm: (...args: any[]) => void;
|
|
88
|
-
cancel: (...args: any[]) => void;
|
|
89
|
-
}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
90
|
-
P: {};
|
|
91
|
-
B: {};
|
|
92
|
-
D: {};
|
|
93
|
-
C: {};
|
|
94
|
-
M: {};
|
|
95
|
-
Defaults: {};
|
|
96
|
-
}, Readonly<{}> & Readonly<{
|
|
97
|
-
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
98
|
-
onCancel?: ((...args: any[]) => any) | undefined;
|
|
99
|
-
}>, {
|
|
100
|
-
setData: (_data: unknown, state: false) => void;
|
|
101
|
-
}, {}, {}, {}, {}> | null;
|
|
102
|
-
RefereesRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
|
|
103
|
-
onCancel?: ((...args: any[]) => any) | undefined;
|
|
104
|
-
}>, {
|
|
105
|
-
setData: (state: false) => void;
|
|
106
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
107
|
-
cancel: (...args: any[]) => void;
|
|
108
|
-
}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
109
|
-
P: {};
|
|
110
|
-
B: {};
|
|
111
|
-
D: {};
|
|
112
|
-
C: {};
|
|
113
|
-
M: {};
|
|
114
|
-
Defaults: {};
|
|
115
|
-
}, Readonly<{}> & Readonly<{
|
|
116
|
-
onCancel?: ((...args: any[]) => any) | undefined;
|
|
117
|
-
}>, {
|
|
118
|
-
setData: (state: false) => void;
|
|
119
|
-
}, {}, {}, {}, {}> | null;
|
|
120
|
-
SubscriptionsRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
|
|
121
|
-
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
122
|
-
onCancel?: ((...args: any[]) => any) | undefined;
|
|
123
|
-
}>, {
|
|
124
|
-
setData: (_data: unknown, state: boolean) => void;
|
|
125
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
126
|
-
confirm: (...args: any[]) => void;
|
|
127
|
-
cancel: (...args: any[]) => void;
|
|
128
|
-
}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
129
|
-
P: {};
|
|
130
|
-
B: {};
|
|
131
|
-
D: {};
|
|
132
|
-
C: {};
|
|
133
|
-
M: {};
|
|
134
|
-
Defaults: {};
|
|
135
|
-
}, Readonly<{}> & Readonly<{
|
|
136
|
-
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
137
|
-
onCancel?: ((...args: any[]) => any) | undefined;
|
|
138
|
-
}>, {
|
|
139
|
-
setData: (_data: unknown, state: boolean) => void;
|
|
140
|
-
}, {}, {}, {}, {}> | null;
|
|
141
|
-
MessageHandleRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {
|
|
142
|
-
openNotification: () => void;
|
|
143
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
144
|
-
MessageNotificationsRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
145
|
-
menus: {
|
|
146
|
-
type: import('vue').PropType<any[]>;
|
|
147
|
-
required: true;
|
|
148
|
-
};
|
|
149
|
-
selectedKeys: {
|
|
150
|
-
type: import('vue').PropType<string[]>;
|
|
151
|
-
};
|
|
152
|
-
}>> & Readonly<{
|
|
153
|
-
onCancel?: ((...args: any[]) => any) | undefined;
|
|
154
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
155
|
-
"onUpdate:selectedKeys"?: ((value: string[]) => any) | undefined;
|
|
156
|
-
}>, {
|
|
157
|
-
setData: (state: false) => void;
|
|
158
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
159
|
-
cancel: (...args: any[]) => void;
|
|
160
|
-
change: (...args: any[]) => void;
|
|
161
|
-
"update:selectedKeys": (value: string[]) => void;
|
|
162
|
-
}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
163
|
-
P: {};
|
|
164
|
-
B: {};
|
|
165
|
-
D: {};
|
|
166
|
-
C: {};
|
|
167
|
-
M: {};
|
|
168
|
-
Defaults: {};
|
|
169
|
-
}, Readonly<import('vue').ExtractPropTypes<{
|
|
170
|
-
menus: {
|
|
171
|
-
type: import('vue').PropType<any[]>;
|
|
172
|
-
required: true;
|
|
173
|
-
};
|
|
174
|
-
selectedKeys: {
|
|
175
|
-
type: import('vue').PropType<string[]>;
|
|
176
|
-
};
|
|
177
|
-
}>> & Readonly<{
|
|
178
|
-
onCancel?: ((...args: any[]) => any) | undefined;
|
|
179
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
180
|
-
"onUpdate:selectedKeys"?: ((value: string[]) => any) | undefined;
|
|
181
|
-
}>, {
|
|
182
|
-
setData: (state: false) => void;
|
|
183
|
-
}, {}, {}, {}, {}> | null;
|
|
184
|
-
}, any, import('vue').ComponentProvideOptions, {
|
|
185
|
-
P: {};
|
|
186
|
-
B: {};
|
|
187
|
-
D: {};
|
|
188
|
-
C: {};
|
|
189
|
-
M: {};
|
|
190
|
-
Defaults: {};
|
|
191
|
-
}, Readonly<{}> & Readonly<{}>, {
|
|
192
|
-
openNotification: () => void;
|
|
193
|
-
}, {}, {}, {}, {}> | null;
|
|
194
|
-
FeedBackModalRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
|
|
195
|
-
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
196
|
-
onCancel?: ((...args: any[]) => any) | undefined;
|
|
197
|
-
}>, {
|
|
198
|
-
setData: (state: boolean) => void;
|
|
199
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
200
|
-
confirm: (...args: any[]) => void;
|
|
201
|
-
cancel: (...args: any[]) => void;
|
|
202
|
-
}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
203
|
-
P: {};
|
|
204
|
-
B: {};
|
|
205
|
-
D: {};
|
|
206
|
-
C: {};
|
|
207
|
-
M: {};
|
|
208
|
-
Defaults: {};
|
|
209
|
-
}, Readonly<{}> & Readonly<{
|
|
210
|
-
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
211
|
-
onCancel?: ((...args: any[]) => any) | undefined;
|
|
212
|
-
}>, {
|
|
213
|
-
setData: (state: boolean) => void;
|
|
214
|
-
}, {}, {}, {}, {}> | null;
|
|
215
|
-
}, HTMLDivElement>;
|
|
34
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
35
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
216
36
|
export default _default;
|
|
37
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** 唯一值,传给 Doption(用于 Arco Dropdown 内部识别),不显式传也可工作 */
|
|
3
|
+
value?: string;
|
|
4
|
+
/** iconify 图标名,例如 lucide:settings */
|
|
5
|
+
icon?: string;
|
|
6
|
+
/** 危险态(红色),常用于退出登录 */
|
|
7
|
+
danger?: boolean;
|
|
8
|
+
/** 禁用态 */
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare function __VLS_template(): {
|
|
12
|
+
attrs: Partial<{}>;
|
|
13
|
+
slots: {
|
|
14
|
+
icon?(_: {}): any;
|
|
15
|
+
default?(_: {}): any;
|
|
16
|
+
suffix?(_: {}): any;
|
|
17
|
+
};
|
|
18
|
+
refs: {};
|
|
19
|
+
rootEl: any;
|
|
20
|
+
};
|
|
21
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
22
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
23
|
+
click: (event: MouseEvent) => any;
|
|
24
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
26
|
+
}>, {
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
value: string;
|
|
29
|
+
icon: string;
|
|
30
|
+
danger: boolean;
|
|
31
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
32
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
35
|
+
new (): {
|
|
36
|
+
$slots: S;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -1,11 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* 登录成功后触发的数据负载
|
|
3
|
+
* - signIn 成功:来自接口返回的 data
|
|
4
|
+
* - OAuth 回调成功:来自 URL 参数 + token
|
|
5
|
+
*/
|
|
6
|
+
export interface SignInResult {
|
|
7
|
+
jwtToken: string;
|
|
8
|
+
userId?: string | null;
|
|
9
|
+
appId?: string | null;
|
|
10
|
+
/** 接口返回的其他字段透传 */
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
}
|
|
13
|
+
type SignInListener = (data: SignInResult) => void | Promise<void>;
|
|
14
|
+
type VoidListener = () => void | Promise<void>;
|
|
15
|
+
type Cleanup = () => void;
|
|
16
|
+
/**
|
|
17
|
+
* 恢复一次会话:先尝试 OAuth 回调(一次性),再尝试 localStorage token。
|
|
18
|
+
* 任一路径成功返回 true,宿主据此判断是否需要拉取 userProfile。
|
|
19
|
+
*/
|
|
20
|
+
declare function restoreSession(): boolean;
|
|
3
21
|
declare function getToken(): string | null;
|
|
4
22
|
declare function setToken(token: string): void;
|
|
23
|
+
/** 清除 token 并广播 onSignOut(让所有订阅者集中清理依赖 token 的状态) */
|
|
5
24
|
declare function clearAuth(): void;
|
|
6
|
-
|
|
7
|
-
declare function
|
|
8
|
-
|
|
25
|
+
/** 注册登录成功监听,返回 cleanup */
|
|
26
|
+
declare function onSignIn(listener: SignInListener): Cleanup;
|
|
27
|
+
/** 注册注册成功监听,返回 cleanup */
|
|
28
|
+
declare function onSignUp(listener: VoidListener): Cleanup;
|
|
29
|
+
/** 注册重置密码成功监听,返回 cleanup */
|
|
30
|
+
declare function onResetPassword(listener: VoidListener): Cleanup;
|
|
31
|
+
/** 注册登出监听,返回 cleanup */
|
|
32
|
+
declare function onSignOut(listener: VoidListener): Cleanup;
|
|
9
33
|
export declare function useAuthkitAuth(): {
|
|
10
34
|
signInSubmit: (state: {
|
|
11
35
|
email: string;
|
|
@@ -31,14 +55,14 @@ export declare function useAuthkitAuth(): {
|
|
|
31
55
|
switchSignUp: () => void;
|
|
32
56
|
switchResetPassword: () => void;
|
|
33
57
|
switchSignIn: () => void;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
58
|
+
onSignIn: typeof onSignIn;
|
|
59
|
+
onSignUp: typeof onSignUp;
|
|
60
|
+
onResetPassword: typeof onResetPassword;
|
|
61
|
+
onSignOut: typeof onSignOut;
|
|
37
62
|
jwtToken: Readonly<import('vue').Ref<string | null, string | null>>;
|
|
38
63
|
getToken: typeof getToken;
|
|
39
64
|
setToken: typeof setToken;
|
|
40
|
-
|
|
65
|
+
restoreSession: typeof restoreSession;
|
|
41
66
|
clearAuth: typeof clearAuth;
|
|
42
|
-
handleOAuthCallback: typeof handleOAuthCallback;
|
|
43
67
|
};
|
|
44
68
|
export {};
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
export type AuthModalView = "signIn" | "signUp" | "resetPassword";
|
|
3
|
+
export interface OpenAuthModalOptions {
|
|
4
|
+
/** 打开时切换到指定视图,缺省保持当前视图 */
|
|
5
|
+
view?: AuthModalView;
|
|
6
|
+
}
|
|
7
|
+
export interface UseAuthkitAuthModalReturn {
|
|
8
|
+
/** 打开弹窗,可选指定视图 */
|
|
9
|
+
open: (options?: OpenAuthModalOptions) => void;
|
|
10
|
+
/** 关闭弹窗 */
|
|
11
|
+
close: () => void;
|
|
12
|
+
/** 当前是否打开(只读响应式) */
|
|
13
|
+
isOpen: ComputedRef<boolean>;
|
|
14
|
+
/** 当前视图(只读响应式) */
|
|
15
|
+
view: ComputedRef<AuthModalView>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* 函数式 API:通过 open()/close() 控制全局唯一的认证弹窗。
|
|
19
|
+
* - open() 不改视图;open({ view: 'signUp' }) 切到注册
|
|
20
|
+
* - isOpen / view 仅暴露 readonly computed,禁止外部直接 mutate(用 open/close 维护状态机)
|
|
21
|
+
*/
|
|
22
|
+
export declare function useAuthkitAuthModal(): UseAuthkitAuthModalReturn;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { LegalDocKey } from '../../utils/legalLinks';
|
|
3
|
+
export interface LegalLink {
|
|
4
|
+
/** 后端字段 key(与 aboutUs 一致) */
|
|
5
|
+
key: LegalDocKey;
|
|
6
|
+
/** UI 展示文案 */
|
|
7
|
+
label: string;
|
|
8
|
+
/** 外链 URL(统一指向 ones 关于我们详情页) */
|
|
9
|
+
url: string;
|
|
10
|
+
/** 后端是否配置了内容(content 非空) */
|
|
11
|
+
configured: boolean;
|
|
12
|
+
/** 在新标签打开链接 */
|
|
13
|
+
open: () => void;
|
|
14
|
+
}
|
|
15
|
+
export interface UseLegalLinksReturn {
|
|
16
|
+
/** 所有法律文档(含未配置项) */
|
|
17
|
+
all: ComputedRef<LegalLink[]>;
|
|
18
|
+
/** 后端已配置的法律文档(用于直接渲染列表) */
|
|
19
|
+
items: ComputedRef<LegalLink[]>;
|
|
20
|
+
/** 取单个文档:返回完整 LegalLink 对象,用于读 URL / 自定义渲染 */
|
|
21
|
+
getLink: (key: LegalDocKey) => LegalLink | undefined;
|
|
22
|
+
/** 一行打开指定文档(最常用语法糖;未配置时静默 noop) */
|
|
23
|
+
openLegalLink: (key: LegalDocKey) => void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* 数据驱动的法律链接:
|
|
27
|
+
* - 来源:appsAuthPageInfo 接口返回的 aboutUs 配置
|
|
28
|
+
* - URL:统一指向 ones.huyooo.com/AboutUsDetails?type=xxx&appId=yyy
|
|
29
|
+
* - 渲染:消费者按需用 items(已配置的)渲染列表,或 getLink(key) 取单项
|
|
30
|
+
*
|
|
31
|
+
* 桌面端(Electron)调用 window.open 会被主进程拦截路由到默认浏览器,与 Web 行为一致,
|
|
32
|
+
* 因此库内不需要任何 openExternal 抽象。
|
|
33
|
+
*/
|
|
34
|
+
export declare function useLegalLinks(): UseLegalLinksReturn;
|
package/dist/composables.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { useAuthkitAuth } from './composables/Authkit/useAuthkitAuth';
|
|
2
|
-
export { useAuthkitAuthModal } from './composables/Authkit/useAuthkitAuthModal';
|
|
1
|
+
export { useAuthkitAuth, type SignInResult, } from './composables/Authkit/useAuthkitAuth';
|
|
2
|
+
export { useAuthkitAuthModal, type AuthModalView, type OpenAuthModalOptions, type UseAuthkitAuthModalReturn, } from './composables/Authkit/useAuthkitAuthModal';
|
|
3
|
+
export { useLegalLinks, type LegalLink, type UseLegalLinksReturn, } from './composables/Authkit/useLegalLinks';
|
|
3
4
|
export { useAuthkitUsersProfile } from './composables/Authkit/useAuthkitUsersProfile';
|
|
4
5
|
export { useAuthkitAppsAuthPageInfo } from './composables/Authkit/useAuthkitAppsAuthPageInfo';
|
|
5
6
|
export { useAuthkitCreateAndUpdate } from './composables/Authkit/useAuthkitCreateAndUpdate';
|
package/dist/composables.js
CHANGED
|
@@ -1,36 +1,38 @@
|
|
|
1
|
-
import { u as a, a as o } from "./useAuthkitUsersProfile-
|
|
2
|
-
import { g as u, a as r, b as i, s as f, c as n, d as l, u as h } from "./apiClients-
|
|
3
|
-
import { u as p } from "./
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as x } from "./
|
|
6
|
-
import { u as C
|
|
7
|
-
import { u as k } from "./
|
|
8
|
-
import {
|
|
9
|
-
import { u as
|
|
1
|
+
import { u as a, a as o } from "./useAuthkitUsersProfile-Cx8NXjlt.js";
|
|
2
|
+
import { g as u, a as r, b as i, s as f, c as n, d as l, u as h } from "./apiClients-ANEApCyY.js";
|
|
3
|
+
import { u as p } from "./useLegalLinks-BIF45kUt.js";
|
|
4
|
+
import { u as g } from "./useAuthkitAppsAuthPageInfo-Da2yJTT-.js";
|
|
5
|
+
import { u as x } from "./useAuthkitCreateAndUpdate-BLs5vQOu.js";
|
|
6
|
+
import { u as C } from "./useMessageNotifications-CavBmgO7.js";
|
|
7
|
+
import { u as k, a as P } from "./useDownloads-DT5W2af6.js";
|
|
8
|
+
import { u as O } from "./useTableHandle--NSbZ-57.js";
|
|
9
|
+
import { f as E, a as S, g as T, u as U, b as R, c as v, d as D, e as G, w as L } from "./useSEO-MPXQf0dn.js";
|
|
10
|
+
import { u as H } from "./useUploadCos-D6y0INvP.js";
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
E as findActiveMenuPath,
|
|
13
|
+
S as findMenuPath,
|
|
14
|
+
T as getPathOnly,
|
|
14
15
|
u as globalConfig,
|
|
15
16
|
r as globalSEOConfig,
|
|
16
17
|
i as globalThemeRef,
|
|
17
18
|
f as setGlobalConfig,
|
|
18
19
|
n as setGlobalSEOConfig,
|
|
19
20
|
l as setTheme,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
U as useActiveDoc,
|
|
22
|
+
R as useAuthMenu,
|
|
23
|
+
g as useAuthkitAppsAuthPageInfo,
|
|
23
24
|
a as useAuthkitAuth,
|
|
24
25
|
h as useAuthkitAuthModal,
|
|
25
|
-
|
|
26
|
+
x as useAuthkitCreateAndUpdate,
|
|
26
27
|
o as useAuthkitUsersProfile,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
k as useCommonCreateAndUpdate,
|
|
29
|
+
P as useDownloads,
|
|
30
|
+
p as useLegalLinks,
|
|
31
|
+
C as useMessageNotifications,
|
|
32
|
+
v as useRoutePermission,
|
|
33
|
+
D as useRouteSEO,
|
|
34
|
+
G as useSEO,
|
|
35
|
+
O as useTableHandle,
|
|
36
|
+
H as useUploadCos,
|
|
37
|
+
L as withViewTransition
|
|
36
38
|
};
|