@huyooo/ui 0.11.2 → 0.11.6
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/AuthkitAppSetting-CjQiWZab.js +1914 -0
- package/dist/{Clipboard---tG2Zxz.js → Clipboard-ChMNfcO5.js} +1 -1
- package/dist/{Contact-BEUbBGiB.js → Contact-Yqmjh47e.js} +8 -7
- package/dist/{CustomTable-CVZ4mFzi.js → CustomTable-BUkwlbzN.js} +3 -2
- package/dist/{FeedbackItem-CN041vTm.js → FeedbackItem-DHp_C0pN.js} +3 -3
- package/dist/FeedbackModal-Dzl0Alp7.js +1050 -0
- package/dist/LandingPageFAQ-CZJXvor9.js +80 -0
- package/dist/LandingPageLinkGroup-DDNRivMt.js +521 -0
- package/dist/LandingPageSectionHeader-D_74W4My.js +69 -0
- package/dist/{LandingPageSectionTabs-B6ZVxR47.js → LandingPageSectionTabs-Ce3_Rc2L.js} +354 -426
- package/dist/MessageHandle-BcRjYeVi.js +924 -0
- package/dist/MessageList-Bo6YCfRO.js +233 -0
- package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-F6neJUg3.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-BOtgTje-.js} +2 -2
- package/dist/PaySubscriptions-BsU0XmXf.js +515 -0
- package/dist/PricingPlans-BfVy4xU0.js +210 -0
- package/dist/ReferrerReferees-CHSoGrE1.js +106 -0
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-D_-oMTOo.js → Upload.vue_vue_type_script_setup_true_lang-CDWyo3RL.js} +1 -1
- package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-B4tD8pIE.js +508 -0
- package/dist/WidthContainer-BzS-A143.js +693 -0
- package/dist/{apiClients-9b4zNZ2S.js → apiClients-KFp-rs-C.js} +79 -73
- package/dist/authkit.d.ts +7 -0
- package/dist/authkit.js +52 -45
- package/dist/common/globalConfig.d.ts +4 -2
- package/dist/common/userMenuModal.d.ts +1 -0
- package/dist/common.js +2 -2
- package/dist/components/Authkit/AppSetting/AuthkitOAuthBinding.vue.d.ts +31 -0
- package/dist/components/Authkit/AppSetting/AuthkitPhoneBinding.vue.d.ts +14 -0
- package/dist/components/Authkit/AppSetting/AuthkitPhoneVerify.vue.d.ts +66 -0
- package/dist/components/Authkit/Auth/AuthkitBindPhone.vue.d.ts +27 -0
- package/dist/components/Authkit/Auth/AuthkitEmailUpdate.vue.d.ts +11 -1
- package/dist/components/Authkit/Auth/AuthkitOauthCallback.vue.d.ts +2 -2
- package/dist/components/Authkit/Auth/AuthkitOauthItem.vue.d.ts +1 -1
- package/dist/components/Authkit/Auth/AuthkitPasswordAuth.vue.d.ts +11 -1
- package/dist/components/Authkit/Auth/AuthkitPhonePasswordUpdateAndVerify.vue.d.ts +68 -0
- package/dist/components/Authkit/Auth/AuthkitSignInEmailCode.vue.d.ts +68 -0
- package/dist/components/Authkit/Auth/AuthkitSwitchSignUpOrResetPassword.vue.d.ts +15 -3
- package/dist/components/Authkit/AuthkitOAuthCallbackProvider.vue.d.ts +11 -0
- package/dist/components/Authkit/AuthkitProvider.vue.d.ts +45 -0
- package/dist/components/Feedback/FeedbackBubbleEnd.vue.d.ts +9 -0
- package/dist/components/Feedback/FeedbackBubbleStart.vue.d.ts +11 -6
- package/dist/components/LandingPage/LandingPageSections.vue.d.ts +1 -1
- package/dist/components/Pay/PaySubscriptions.vue.d.ts +2 -1
- package/dist/components/Pay/PricingFAQ.vue.d.ts +17 -0
- package/dist/components/Pay/PricingPlans.vue.d.ts +12 -0
- package/dist/components/UserMenu/UserMenuModals.vue.d.ts +2 -2
- package/dist/components/UserMenu/parts/UserSubscriptionBaseInformation.vue.d.ts +8 -0
- package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +26 -0
- package/dist/composables/Authkit/useAuthkitAuth.d.ts +21 -9
- package/dist/composables/Authkit/useEnsureAuthenticated.d.ts +26 -0
- package/dist/composables/Authkit/useOauth.d.ts +4 -1
- package/dist/composables/Billing/useBillingPlans.d.ts +201 -0
- package/dist/composables/Billing/useBillingSubscriptionSummary.d.ts +280 -0
- package/dist/composables/Billing/useSubscriptionCheckout.d.ts +12 -0
- package/dist/composables/UserMenu/useUserMenu.d.ts +5 -1
- package/dist/composables.d.ts +2 -0
- package/dist/composables.js +25 -22
- package/dist/feedback.js +3 -3
- package/dist/index-D3Kp6R4z.js +4 -0
- package/dist/landingPage.js +42 -40
- package/dist/main.d.ts +1 -0
- package/dist/main.js +677 -631
- package/dist/message.js +19 -18
- package/dist/pay.d.ts +5 -0
- package/dist/pay.js +9 -2
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/api/auth.generated.d.ts +103 -39
- package/dist/types/api/billing.generated.d.ts +61 -28
- package/dist/types/api.d.ts +1 -1
- package/dist/types/app.d.ts +14 -0
- package/dist/upload.js +2 -2
- package/dist/{useAuthkitAppsAuthPageInfo-494yLvsu.js → useAuthkitAppsAuthPageInfo-B9_VzVkQ.js} +20 -7
- package/dist/{useAuthkitCreateAndUpdate-DyRtFxZS.js → useAuthkitCreateAndUpdate-DomftQMK.js} +1 -1
- package/dist/useAuthkitUsersProfile-D4h6OOdR.js +201 -0
- package/dist/{useDownloads-DaeIY0E9.js → useDownloads-CzC3gLUV.js} +1 -1
- package/dist/useEnsureAuthenticated-C_Ss0e9n.js +2247 -0
- package/dist/{useLegalLinks-CPbWqlu6.js → useLegalLinks-OGVbqXVy.js} +2 -2
- package/dist/{useMessageNotifications-Dg5q-C_o.js → useMessageNotifications-DeHFJFcX.js} +1 -1
- package/dist/{useSEO-CXX9dcBx.js → useSEO--jTDDkXk.js} +2 -2
- package/dist/useSubscriptionCheckout-CQ6wHuLI.js +345 -0
- package/dist/{useTableHandle-Cjq4gcC0.js → useTableHandle-jw0P7-2a.js} +1 -1
- package/dist/{useUploadCos-DiJmmbRf.js → useUploadCos-keDKcs0j.js} +501 -515
- package/dist/useUserMenu-ClPBlvaM.js +44 -0
- package/dist/user.js +12 -13
- package/dist/utils/apiMiddlewares.d.ts +6 -0
- package/dist/utils/legacyApi.d.ts +18 -0
- package/package.json +1 -1
- package/dist/AuthkitAppSetting-BCrLMpLg.js +0 -1322
- package/dist/AuthkitSignInPhone-DmCQ2fWs.js +0 -1721
- package/dist/FeedbackModal-aI28o-w5.js +0 -1053
- package/dist/LandingPageSectionHeader-Cs1x8i3q.js +0 -584
- package/dist/MessageHandle-BV1nKlxs.js +0 -1147
- package/dist/PaySubscriptions-B3gI1Eme.js +0 -408
- package/dist/ReferrerReferees-DJzPo7X5.js +0 -106
- package/dist/UserAccountMenu-CJ9KKVYa.js +0 -371
- package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-ClAXNSgl.js +0 -81
- package/dist/WidthContainer-BG10rumn.js +0 -669
- package/dist/useAuthkitUsersProfile-lGlQP54m.js +0 -186
- package/dist/useUserMenu-B3HKZKJ4.js +0 -43
package/dist/{useAuthkitAppsAuthPageInfo-494yLvsu.js → useAuthkitAppsAuthPageInfo-B9_VzVkQ.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as n } from "vue";
|
|
2
|
-
import { e as u } from "./apiClients-
|
|
3
|
-
const
|
|
2
|
+
import { e as u } from "./apiClients-KFp-rs-C.js";
|
|
3
|
+
const a = n({
|
|
4
4
|
id: "",
|
|
5
5
|
appKey: "",
|
|
6
6
|
name: "",
|
|
@@ -35,6 +35,19 @@ const e = n({
|
|
|
35
35
|
enabled: !1
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
|
+
authMethods: {
|
|
39
|
+
login: {
|
|
40
|
+
emailPassword: !0,
|
|
41
|
+
phonePassword: !1,
|
|
42
|
+
phoneCode: !1,
|
|
43
|
+
emailCode: !1,
|
|
44
|
+
passkey: !1
|
|
45
|
+
},
|
|
46
|
+
signUp: {
|
|
47
|
+
email: !0,
|
|
48
|
+
phone: !1
|
|
49
|
+
}
|
|
50
|
+
},
|
|
38
51
|
authorizationCallback: "",
|
|
39
52
|
aboutUs: {
|
|
40
53
|
// 个人信息收集清单
|
|
@@ -74,16 +87,16 @@ const e = n({
|
|
|
74
87
|
}
|
|
75
88
|
}), o = n(!1), t = n(!1);
|
|
76
89
|
function r() {
|
|
77
|
-
async function l
|
|
90
|
+
async function i(l) {
|
|
78
91
|
o.value = !0, t.value = !1;
|
|
79
92
|
const {
|
|
80
|
-
data:
|
|
93
|
+
data: e
|
|
81
94
|
} = await u.apps.authPageInfo.post({});
|
|
82
|
-
o.value = !1,
|
|
95
|
+
o.value = !1, e && (t.value = !0, a.value.id = e.id, a.value.appKey = e.appKey, a.value.name = e.name, a.value.description = e.description, a.value.homePageUrl = e.homePageUrl, a.value.applicationLogo = e.applicationLogo, a.value.applicationLogoUrl = e.applicationLogoUrl, a.value.publicRoutes = e.publicRoutes || [], a.value.oauth = e.oauth, a.value.authMethods = e.authMethods || a.value.authMethods, a.value.authorizationCallback = e.authorizationCallback, a.value.aboutUs = e.aboutUs, a.value.brand = e.brand, l && l());
|
|
83
96
|
}
|
|
84
97
|
return {
|
|
85
|
-
appsData:
|
|
86
|
-
appsAuthPageInfoApi:
|
|
98
|
+
appsData: a,
|
|
99
|
+
appsAuthPageInfoApi: i,
|
|
87
100
|
appsAuthPageInfoLoading: o,
|
|
88
101
|
appsAuthPageInfoSuccess: t
|
|
89
102
|
};
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { ref as t, readonly as A, computed as E } from "vue";
|
|
2
|
+
import { e as d } from "./apiClients-KFp-rs-C.js";
|
|
3
|
+
const c = t("signIn"), S = /* @__PURE__ */ new Set(), k = /* @__PURE__ */ new Set(), y = /* @__PURE__ */ new Set(), P = /* @__PURE__ */ new Set(), s = t(null), I = "jwtToken";
|
|
4
|
+
function T() {
|
|
5
|
+
try {
|
|
6
|
+
const e = localStorage.getItem(I);
|
|
7
|
+
if (e)
|
|
8
|
+
return s.value = e, !0;
|
|
9
|
+
} catch (e) {
|
|
10
|
+
console.warn("Failed to access localStorage:", e);
|
|
11
|
+
}
|
|
12
|
+
return !1;
|
|
13
|
+
}
|
|
14
|
+
function O() {
|
|
15
|
+
try {
|
|
16
|
+
const e = new URL(window.location.href), o = e.searchParams.get("token");
|
|
17
|
+
if (!o) return !1;
|
|
18
|
+
const i = e.searchParams.get("userId"), u = e.searchParams.get("appId"), r = e.searchParams.get("needBindIdentity") === "true";
|
|
19
|
+
h(o), ["token", "userId", "appId", "needBindIdentity"].forEach((p) => e.searchParams.delete(p));
|
|
20
|
+
const g = `${e.pathname}${e.search}${e.hash}`;
|
|
21
|
+
return window.history.replaceState({}, "", g), v({
|
|
22
|
+
jwtToken: o,
|
|
23
|
+
userId: i,
|
|
24
|
+
appId: u,
|
|
25
|
+
needBindIdentity: r
|
|
26
|
+
}), !0;
|
|
27
|
+
} catch (e) {
|
|
28
|
+
return console.warn("Failed to handle OAuth callback:", e), !1;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function V() {
|
|
32
|
+
return O() ? !0 : T();
|
|
33
|
+
}
|
|
34
|
+
function j() {
|
|
35
|
+
return s.value || T() ? s.value : null;
|
|
36
|
+
}
|
|
37
|
+
function h(e) {
|
|
38
|
+
s.value = e;
|
|
39
|
+
try {
|
|
40
|
+
localStorage.setItem(I, e);
|
|
41
|
+
} catch (o) {
|
|
42
|
+
console.warn("Failed to save token to localStorage:", o);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function b(e) {
|
|
46
|
+
h(e.jwtToken), v(e);
|
|
47
|
+
}
|
|
48
|
+
function F() {
|
|
49
|
+
s.value = null;
|
|
50
|
+
try {
|
|
51
|
+
localStorage.removeItem(I);
|
|
52
|
+
} catch (e) {
|
|
53
|
+
console.warn("Failed to clear localStorage:", e);
|
|
54
|
+
}
|
|
55
|
+
$();
|
|
56
|
+
}
|
|
57
|
+
function w(e, o) {
|
|
58
|
+
return e.add(o), () => {
|
|
59
|
+
e.delete(o);
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function v(e) {
|
|
63
|
+
S.forEach((o) => {
|
|
64
|
+
o(e);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function R() {
|
|
68
|
+
k.forEach((e) => void e());
|
|
69
|
+
}
|
|
70
|
+
function B() {
|
|
71
|
+
y.forEach((e) => void e());
|
|
72
|
+
}
|
|
73
|
+
function $() {
|
|
74
|
+
P.forEach((e) => void e());
|
|
75
|
+
}
|
|
76
|
+
function K(e) {
|
|
77
|
+
return w(S, e);
|
|
78
|
+
}
|
|
79
|
+
function N(e) {
|
|
80
|
+
return w(k, e);
|
|
81
|
+
}
|
|
82
|
+
function _(e) {
|
|
83
|
+
return w(y, e);
|
|
84
|
+
}
|
|
85
|
+
function x(e) {
|
|
86
|
+
return w(P, e);
|
|
87
|
+
}
|
|
88
|
+
function C() {
|
|
89
|
+
const e = t(!1), o = t(!1), i = t(!1);
|
|
90
|
+
async function u(n) {
|
|
91
|
+
e.value = !0;
|
|
92
|
+
const {
|
|
93
|
+
data: a
|
|
94
|
+
} = await d.auth.signIn.unified.post({
|
|
95
|
+
identifier: n.identifier || n.email || "",
|
|
96
|
+
password: n.password,
|
|
97
|
+
code: n.code,
|
|
98
|
+
emailVerifyId: n.emailVerifyId,
|
|
99
|
+
method: n.method || "password"
|
|
100
|
+
});
|
|
101
|
+
e.value = !1, a && (h(a.jwtToken), v(a));
|
|
102
|
+
}
|
|
103
|
+
async function r(n) {
|
|
104
|
+
o.value = !0;
|
|
105
|
+
const {
|
|
106
|
+
error: a
|
|
107
|
+
} = n.type === "phone" ? await d.auth.signUp.phone.post({
|
|
108
|
+
phone: n.phone || "",
|
|
109
|
+
code: n.code || "",
|
|
110
|
+
password: n.password,
|
|
111
|
+
referrerId: n.referrerId
|
|
112
|
+
}) : await d.auth.signUp.post({
|
|
113
|
+
email: n.email || "",
|
|
114
|
+
userToken: n.userToken || "",
|
|
115
|
+
emailVerifyId: n.emailVerifyId || "",
|
|
116
|
+
password: n.password || "",
|
|
117
|
+
referrerId: n.referrerId
|
|
118
|
+
});
|
|
119
|
+
o.value = !1, a || (c.value = "signIn", R());
|
|
120
|
+
}
|
|
121
|
+
async function g(n) {
|
|
122
|
+
i.value = !0;
|
|
123
|
+
const {
|
|
124
|
+
error: a
|
|
125
|
+
} = await d.auth.resetPassword.post({
|
|
126
|
+
method: n.method || "email",
|
|
127
|
+
email: n.email,
|
|
128
|
+
phone: n.phone,
|
|
129
|
+
userToken: n.userToken,
|
|
130
|
+
code: n.code,
|
|
131
|
+
emailVerifyId: n.emailVerifyId,
|
|
132
|
+
password: n.password
|
|
133
|
+
});
|
|
134
|
+
i.value = !1, a || (c.value = "signIn", B());
|
|
135
|
+
}
|
|
136
|
+
function p() {
|
|
137
|
+
c.value = "signUp";
|
|
138
|
+
}
|
|
139
|
+
function U() {
|
|
140
|
+
c.value = "resetPassword";
|
|
141
|
+
}
|
|
142
|
+
function L() {
|
|
143
|
+
c.value = "signIn";
|
|
144
|
+
}
|
|
145
|
+
return {
|
|
146
|
+
signInSubmit: u,
|
|
147
|
+
signUpSubmit: r,
|
|
148
|
+
resetPasswordSubmit: g,
|
|
149
|
+
currentView: c,
|
|
150
|
+
authSignInLoading: e,
|
|
151
|
+
authSignUpLoading: o,
|
|
152
|
+
resetPasswordLoading: i,
|
|
153
|
+
switchSignUp: p,
|
|
154
|
+
switchResetPassword: U,
|
|
155
|
+
switchSignIn: L,
|
|
156
|
+
onSignIn: K,
|
|
157
|
+
onSignUp: N,
|
|
158
|
+
onResetPassword: _,
|
|
159
|
+
onSignOut: x,
|
|
160
|
+
jwtToken: A(s),
|
|
161
|
+
getToken: j,
|
|
162
|
+
setToken: h,
|
|
163
|
+
completeSignIn: b,
|
|
164
|
+
restoreSession: V,
|
|
165
|
+
clearAuth: F
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
const l = t(null), m = t(!1), f = t(!1), G = E(() => !!l.value);
|
|
169
|
+
async function Y() {
|
|
170
|
+
const {
|
|
171
|
+
getToken: e,
|
|
172
|
+
clearAuth: o
|
|
173
|
+
} = C();
|
|
174
|
+
if (!e()) {
|
|
175
|
+
console.warn("No authentication token found"), l.value = null;
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
m.value = !0, f.value = !1;
|
|
179
|
+
const {
|
|
180
|
+
data: u,
|
|
181
|
+
error: r
|
|
182
|
+
} = await d.users.profile.post({});
|
|
183
|
+
m.value = !1, u ? (l.value = u, f.value = !0) : (l.value = null, f.value = !1, ((r == null ? void 0 : r.code) === 401 || (r == null ? void 0 : r.code) === 40101) && (console.warn("认证已过期,清除认证状态"), o()));
|
|
184
|
+
}
|
|
185
|
+
function q() {
|
|
186
|
+
l.value = null;
|
|
187
|
+
}
|
|
188
|
+
function H() {
|
|
189
|
+
return {
|
|
190
|
+
userProfile: l,
|
|
191
|
+
loading: m,
|
|
192
|
+
usersProfileSuccess: f,
|
|
193
|
+
isLoggedIn: G,
|
|
194
|
+
fetchUserProfile: Y,
|
|
195
|
+
clearUserProfile: q
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
export {
|
|
199
|
+
H as a,
|
|
200
|
+
C as u
|
|
201
|
+
};
|