@huyooo/ui 1.0.6 → 2.0.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/AuthkitAppSetting-rtYZcSAR.js +2677 -0
- package/dist/{Contact-BWuVR9ho.js → Contact-CcWf3UEZ.js} +9 -9
- package/dist/{CustomTable-BzGfaAVH.js → CustomTable-HDwqEcmB.js} +1 -1
- package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-DpOmbAg-.js +1491 -0
- package/dist/{LegalDocViewer-DM8FYBpf.js → LegalDocViewer-C0tsIbz9.js} +747 -748
- package/dist/MessageHandle-BUufez4S.js +1233 -0
- package/dist/{MessageList-Ce-_LNTk.js → MessageList-rttvPmxV.js} +4 -4
- package/dist/PaySubscriptions-p75aBnHm.js +1331 -0
- package/dist/{PricingPlans-CV97ck9p.js → PricingPlans-CQ0qk9Hb.js} +99 -105
- package/dist/{ReferrerReferees-DgygiIiE.js → ReferrerReferees-BU9IEQgz.js} +47 -46
- package/dist/Upload.vue_vue_type_script_setup_true_lang-bh0NFq9E.js +78 -0
- package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-zgjpFVln.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-DG4AuHiO.js} +64 -65
- package/dist/WidthContainer-DSE4QbW0.js +717 -0
- package/dist/api/billingSubscriptionApi.d.ts +4 -1
- package/dist/apiClients-Ctcq8NZs.js +245 -0
- package/dist/authkit.js +10 -10
- package/dist/common/globalConfig.d.ts +36 -18
- package/dist/common.js +2 -2
- package/dist/components/Authkit/Auth/AuthkitOauthCallback.vue.d.ts +2 -2
- package/dist/components/Authkit/AuthkitProvider.vue.d.ts +0 -5
- package/dist/components/Feedback/FeedbackDetails.vue.d.ts +30 -0
- package/dist/components/Upload/Upload.vue.d.ts +6 -6
- package/dist/composables/Authkit/useAuthkitAuth.d.ts +3 -0
- package/dist/composables/Billing/usePaymentReturn.d.ts +1 -0
- package/dist/composables/uploadFeedbackAttachment.d.ts +2 -1
- package/dist/composables/useMessageList.d.ts +2 -1
- package/dist/composables.d.ts +2 -2
- package/dist/composables.js +46 -46
- package/dist/feedback.js +2 -2
- package/dist/{fetchAuthPageAboutUs-dzTSwRsB.js → fetchAuthPageAboutUs-DiCqMUX3.js} +4 -4
- package/dist/{index-BkLvw1PU.js → index-Cn6LcfZO.js} +1 -1
- package/dist/legalDocs/resolveAppId.d.ts +1 -1
- package/dist/main.d.ts +4 -3
- package/dist/main.js +464 -469
- package/dist/message.js +53 -52
- package/dist/pay.js +4 -4
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/{useUploadCos-C8BqFPkx.js → runtime-BzCSCUNv.js} +2712 -2609
- package/dist/runtime.d.ts +18 -0
- package/dist/style.css +1 -1
- package/dist/types/api/auth.generated.d.ts +0 -10
- package/dist/upload/browserCosTransport.d.ts +25 -0
- package/dist/upload/browserUploadService.d.ts +20 -0
- package/dist/upload.d.ts +2 -1
- package/dist/upload.js +5 -4
- package/dist/{useAuthkitAppsAuthPageInfo-CNudJd04.js → useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js} +18 -21
- package/dist/useAuthkitAuth-BPTZUSkM.js +272 -0
- package/dist/{useAuthkitCreateAndUpdate-BsINsI-E.js → useAuthkitCreateAndUpdate-Bbv7vZZn.js} +1 -1
- package/dist/useAuthkitUsersProfile-CW_exa7E.js +39 -0
- package/dist/useBillingStatusOptions-Br-iL77Z.js +61 -0
- package/dist/{useEnsureAuthenticated-DNkCCy_Y.js → useEnsureAuthenticated-CncOvj2H.js} +2 -2
- package/dist/{useLegalDocs-DQP_Yq6B.js → useLegalDocs-D44qU_q0.js} +25 -25
- package/dist/useMessageNotifications-D9uikt21.js +80 -0
- package/dist/{useRoutePermission-CEiya9AM.js → useRoutePermission-BrQX7NTq.js} +2 -2
- package/dist/{useSEO-CDWxbk8B.js → useSEO-_TNouXE_.js} +89 -86
- package/dist/useSubscriptionCheckout-BDDCRxSs.js +353 -0
- package/dist/user.js +1 -1
- package/dist/utils/apiClients.d.ts +20 -12
- package/dist/utils/apiMiddlewares.d.ts +9 -23
- package/package.json +1 -1
- package/dist/AuthkitAppSetting-BN8-xgNq.js +0 -2674
- package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-B9BqGWm8.js +0 -1480
- package/dist/MessageHandle-mEkCsv9e.js +0 -1173
- package/dist/PaySubscriptions-CXkEjqr2.js +0 -1326
- package/dist/Upload.vue_vue_type_script_setup_true_lang-VGh2V4o0.js +0 -76
- package/dist/WidthContainer-PeWkCK0p.js +0 -721
- package/dist/apiClients-BcXOLuYu.js +0 -272
- package/dist/composables/Upload/useUploadCos.d.ts +0 -12
- package/dist/useAuthkitAuth-3m0yW6uP.js +0 -267
- package/dist/useAuthkitUsersProfile-DJlMsftY.js +0 -40
- package/dist/useBillingStatusOptions-CfHQOFNw.js +0 -71
- package/dist/useMessageNotifications-CAphguOm.js +0 -75
- package/dist/useSubscriptionCheckout-d_M_rKRa.js +0 -368
- package/dist/utils/billingFetch.d.ts +0 -1
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { eden as f, defineMiddleware as p, createClient as U } from "@vafast/api-client";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { Message as b } from "@arco-design/web-vue";
|
|
4
|
+
import { ref as v, computed as A } from "vue";
|
|
5
|
+
function g(e, r = 3) {
|
|
6
|
+
const o = e.indexOf("@");
|
|
7
|
+
if (o > 1) {
|
|
8
|
+
const n = e.slice(0, r), u = e.slice(o);
|
|
9
|
+
return n + "***" + u;
|
|
10
|
+
}
|
|
11
|
+
return e;
|
|
12
|
+
}
|
|
13
|
+
function E(e) {
|
|
14
|
+
const r = e.trim();
|
|
15
|
+
return r.length < 7 ? r : `${r.slice(0, 3)}****${r.slice(-4)}`;
|
|
16
|
+
}
|
|
17
|
+
const j = {
|
|
18
|
+
normal: "正常",
|
|
19
|
+
pending: "待完善",
|
|
20
|
+
forbidden: "已禁用",
|
|
21
|
+
deleted: "已注销"
|
|
22
|
+
};
|
|
23
|
+
function ee(e) {
|
|
24
|
+
return e ? j[e] ?? e : "-";
|
|
25
|
+
}
|
|
26
|
+
function re(e) {
|
|
27
|
+
var o, n, u, h, w, m, a, i, t;
|
|
28
|
+
const r = [];
|
|
29
|
+
if ((o = e.email) != null && o.trim() && r.push(g(e.email.trim())), (n = e.phone) != null && n.trim() && r.push(E(e.phone.trim())), e.wechat) {
|
|
30
|
+
const s = (u = e.wechat.nickname) == null ? void 0 : u.trim();
|
|
31
|
+
r.push(s ? `微信(${s})` : "微信");
|
|
32
|
+
}
|
|
33
|
+
return (w = (h = e.github) == null ? void 0 : h.login) != null && w.trim() && r.push(`GitHub(${e.github.login.trim()})`), (a = (m = e.google) == null ? void 0 : m.email) != null && a.trim() && r.push(g(e.google.email.trim())), (t = (i = e.microsoft) == null ? void 0 : i.email) != null && t.trim() && r.push(g(e.microsoft.email.trim())), r.length > 0 ? r.join(" / ") : "-";
|
|
34
|
+
}
|
|
35
|
+
const k = /* @__PURE__ */ new Set();
|
|
36
|
+
function te(e) {
|
|
37
|
+
return k.add(e), () => {
|
|
38
|
+
k.delete(e);
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function $() {
|
|
42
|
+
try {
|
|
43
|
+
localStorage.removeItem("jwtToken"), localStorage.removeItem("refreshToken");
|
|
44
|
+
} catch (e) {
|
|
45
|
+
console.warn("Failed to clear localStorage:", e);
|
|
46
|
+
}
|
|
47
|
+
k.forEach((e) => e());
|
|
48
|
+
}
|
|
49
|
+
function ne(e) {
|
|
50
|
+
try {
|
|
51
|
+
localStorage.setItem("jwtToken", e.jwtToken), localStorage.setItem("refreshToken", e.refreshToken);
|
|
52
|
+
} catch (r) {
|
|
53
|
+
console.warn("Failed to set localStorage:", r);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function x() {
|
|
57
|
+
try {
|
|
58
|
+
return localStorage.getItem("refreshToken");
|
|
59
|
+
} catch (e) {
|
|
60
|
+
return console.warn("Failed to get refreshToken from localStorage:", e), null;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function O(e) {
|
|
64
|
+
try {
|
|
65
|
+
localStorage.setItem("jwtToken", e);
|
|
66
|
+
} catch (r) {
|
|
67
|
+
console.warn("Failed to update jwtToken in localStorage:", r);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function z(e) {
|
|
71
|
+
return f(e);
|
|
72
|
+
}
|
|
73
|
+
function H(e) {
|
|
74
|
+
return f(e);
|
|
75
|
+
}
|
|
76
|
+
function L(e) {
|
|
77
|
+
return f(e);
|
|
78
|
+
}
|
|
79
|
+
function D(e) {
|
|
80
|
+
return f(e);
|
|
81
|
+
}
|
|
82
|
+
function F(e) {
|
|
83
|
+
return f(e);
|
|
84
|
+
}
|
|
85
|
+
function N(e) {
|
|
86
|
+
return f(e);
|
|
87
|
+
}
|
|
88
|
+
const S = v(!1), y = v("signIn");
|
|
89
|
+
function _(e) {
|
|
90
|
+
e != null && e.view && (y.value = e.view), S.value = !0;
|
|
91
|
+
}
|
|
92
|
+
function B() {
|
|
93
|
+
S.value = !1, y.value = "signIn";
|
|
94
|
+
}
|
|
95
|
+
function q() {
|
|
96
|
+
return {
|
|
97
|
+
open: _,
|
|
98
|
+
close: B,
|
|
99
|
+
isOpen: A(() => S.value),
|
|
100
|
+
view: A(() => y.value)
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
const T = 40101, I = 401;
|
|
104
|
+
function J(e) {
|
|
105
|
+
var r;
|
|
106
|
+
return e.status === I || ((r = e.error) == null ? void 0 : r.code) === I;
|
|
107
|
+
}
|
|
108
|
+
function G(e) {
|
|
109
|
+
var r;
|
|
110
|
+
return J(e) && ((r = e.error) == null ? void 0 : r.code) !== T;
|
|
111
|
+
}
|
|
112
|
+
function K() {
|
|
113
|
+
const {
|
|
114
|
+
open: e
|
|
115
|
+
} = q();
|
|
116
|
+
e();
|
|
117
|
+
}
|
|
118
|
+
function M() {
|
|
119
|
+
$(), K();
|
|
120
|
+
}
|
|
121
|
+
async function V(e) {
|
|
122
|
+
const r = x();
|
|
123
|
+
if (!r)
|
|
124
|
+
throw new Error("No refresh token available");
|
|
125
|
+
try {
|
|
126
|
+
const n = await (await fetch(`${e.authPrefixUrl}/auth/refresh`, {
|
|
127
|
+
method: "POST",
|
|
128
|
+
headers: {
|
|
129
|
+
"Content-Type": "application/json",
|
|
130
|
+
"app-id": e.appId
|
|
131
|
+
},
|
|
132
|
+
body: JSON.stringify({
|
|
133
|
+
refreshToken: r
|
|
134
|
+
})
|
|
135
|
+
})).json();
|
|
136
|
+
if (n.jwtToken)
|
|
137
|
+
return O(n.jwtToken), n.refreshToken && localStorage.setItem("refreshToken", n.refreshToken), n.jwtToken;
|
|
138
|
+
throw new Error(n.message || "Token refresh failed");
|
|
139
|
+
} catch (o) {
|
|
140
|
+
throw console.error("Token refresh failed:", o), o;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
function C(e) {
|
|
144
|
+
let r = !1, o = [];
|
|
145
|
+
function n(a, i = null) {
|
|
146
|
+
o.forEach(({
|
|
147
|
+
resolve: t,
|
|
148
|
+
reject: s
|
|
149
|
+
}) => {
|
|
150
|
+
a ? s(a) : i && t(i);
|
|
151
|
+
}), o = [];
|
|
152
|
+
}
|
|
153
|
+
const u = p(async (a, i) => (a.headers.set("app-id", e.appId), i()), {
|
|
154
|
+
name: "app-id"
|
|
155
|
+
}), h = p(async (a, i) => {
|
|
156
|
+
const t = e.getAccessToken();
|
|
157
|
+
return t && a.headers.set("authorization", `Bearer ${t}`), i();
|
|
158
|
+
}, {
|
|
159
|
+
name: "token"
|
|
160
|
+
}), w = p(async (a, i) => {
|
|
161
|
+
var s;
|
|
162
|
+
const t = await i();
|
|
163
|
+
if (((s = t.error) == null ? void 0 : s.code) !== T)
|
|
164
|
+
return t;
|
|
165
|
+
if (r)
|
|
166
|
+
return new Promise((c, P) => {
|
|
167
|
+
o.push({
|
|
168
|
+
resolve: async (R) => {
|
|
169
|
+
a.headers.set("authorization", `Bearer ${R}`), c(await i());
|
|
170
|
+
},
|
|
171
|
+
reject: () => P(t)
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
r = !0;
|
|
175
|
+
try {
|
|
176
|
+
const c = await V(e);
|
|
177
|
+
return n(null, c), a.headers.set("authorization", `Bearer ${c}`), await i();
|
|
178
|
+
} catch (c) {
|
|
179
|
+
return n(c, null), M(), t;
|
|
180
|
+
} finally {
|
|
181
|
+
r = !1;
|
|
182
|
+
}
|
|
183
|
+
}, {
|
|
184
|
+
name: "token-refresh"
|
|
185
|
+
}), m = p(async (a, i) => {
|
|
186
|
+
const t = await i();
|
|
187
|
+
return G(t) ? (M(), t) : (t.error && t.error.code !== T && b.error(t.error.message || "请求失败"), t);
|
|
188
|
+
}, {
|
|
189
|
+
name: "error-message"
|
|
190
|
+
});
|
|
191
|
+
return {
|
|
192
|
+
appIdMiddleware: u,
|
|
193
|
+
tokenMiddleware: h,
|
|
194
|
+
tokenRefreshMiddleware: w,
|
|
195
|
+
errorMessageMiddleware: m
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
function oe(e, r) {
|
|
199
|
+
const {
|
|
200
|
+
tokenRefreshMiddleware: o,
|
|
201
|
+
errorMessageMiddleware: n
|
|
202
|
+
} = C(r);
|
|
203
|
+
return e.use(o).use(n);
|
|
204
|
+
}
|
|
205
|
+
function l(e, r) {
|
|
206
|
+
return U({
|
|
207
|
+
baseURL: e,
|
|
208
|
+
timeout: 3e4
|
|
209
|
+
}).use(r.appIdMiddleware).use(r.tokenMiddleware).use(r.tokenRefreshMiddleware).use(r.errorMessageMiddleware);
|
|
210
|
+
}
|
|
211
|
+
function W(e) {
|
|
212
|
+
const r = C(e);
|
|
213
|
+
return {
|
|
214
|
+
auth: H(l(e.authPrefixUrl, r)),
|
|
215
|
+
billing: L(l(e.billingPrefixUrl, r)),
|
|
216
|
+
ones: F(l(e.onesPrefixUrl, r)),
|
|
217
|
+
log: D(l(e.logPrefixUrl, r)),
|
|
218
|
+
ai: z(l(e.aiPrefixUrl, r)),
|
|
219
|
+
webhook: N(l(e.webhookPrefixUrl, r))
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
let d = null;
|
|
223
|
+
function ie(e) {
|
|
224
|
+
if (d)
|
|
225
|
+
throw new Error("Huyooo UI Runtime 已初始化,不能重复创建");
|
|
226
|
+
return d = W(e), d;
|
|
227
|
+
}
|
|
228
|
+
function ae() {
|
|
229
|
+
if (!d)
|
|
230
|
+
throw new Error("请先在应用入口调用 app.use(createHuyoooUI(config))");
|
|
231
|
+
return d;
|
|
232
|
+
}
|
|
233
|
+
export {
|
|
234
|
+
re as b,
|
|
235
|
+
C as c,
|
|
236
|
+
ee as f,
|
|
237
|
+
ae as g,
|
|
238
|
+
g as h,
|
|
239
|
+
ie as i,
|
|
240
|
+
te as o,
|
|
241
|
+
$ as r,
|
|
242
|
+
ne as s,
|
|
243
|
+
q as u,
|
|
244
|
+
oe as w
|
|
245
|
+
};
|
package/dist/authkit.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { A as s, B as i, a as e, _ as u, b as h, O as A, P as o, c as r, d as k, e as n, f as d, S as g, g as l, u as p, h as P } from "./AuthkitAppSetting-
|
|
2
|
-
import { A as m, a as c, b as S, c as L, d as O, E as U, e as w, _ as x, f as B, O as D, g as E, P as b, h as y, i as C, j as I, R as v, S as V, k as _, l as G, m as R, n as T, o as M, p as j, L as z } from "./LegalDocViewer-
|
|
3
|
-
import { u as K } from "./useAuthkitAppsAuthPageInfo-
|
|
4
|
-
import { u as q } from "./useAuthkitAuth-
|
|
5
|
-
import { u as J } from "./apiClients-
|
|
6
|
-
import { u as Q } from "./useEnsureAuthenticated-
|
|
7
|
-
import { L as X, a as Z, b as $, i as tt, o as at, r as st, c as it, u as et } from "./useLegalDocs-
|
|
8
|
-
import { f as ht } from "./fetchAuthPageAboutUs-
|
|
9
|
-
import { u as ot } from "./useAuthkitUsersProfile-
|
|
10
|
-
import { u as kt } from "./useAuthkitCreateAndUpdate-
|
|
1
|
+
import { A as s, B as i, a as e, _ as u, b as h, O as A, P as o, c as r, d as k, e as n, f as d, S as g, g as l, u as p, h as P } from "./AuthkitAppSetting-rtYZcSAR.js";
|
|
2
|
+
import { A as m, a as c, b as S, c as L, d as O, E as U, e as w, _ as x, f as B, O as D, g as E, P as b, h as y, i as C, j as I, R as v, S as V, k as _, l as G, m as R, n as T, o as M, p as j, L as z } from "./LegalDocViewer-C0tsIbz9.js";
|
|
3
|
+
import { u as K } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
|
|
4
|
+
import { u as q } from "./useAuthkitAuth-BPTZUSkM.js";
|
|
5
|
+
import { u as J } from "./apiClients-Ctcq8NZs.js";
|
|
6
|
+
import { u as Q } from "./useEnsureAuthenticated-CncOvj2H.js";
|
|
7
|
+
import { L as X, a as Z, b as $, i as tt, o as at, r as st, c as it, u as et } from "./useLegalDocs-D44qU_q0.js";
|
|
8
|
+
import { f as ht } from "./fetchAuthPageAboutUs-DiCqMUX3.js";
|
|
9
|
+
import { u as ot } from "./useAuthkitUsersProfile-CW_exa7E.js";
|
|
10
|
+
import { u as kt } from "./useAuthkitCreateAndUpdate-Bbv7vZZn.js";
|
|
11
11
|
export {
|
|
12
12
|
s as AuthkitAppSetting,
|
|
13
13
|
m as AuthkitAuth,
|
|
@@ -43,32 +43,31 @@ export interface HuyoooUIConfig {
|
|
|
43
43
|
web3formsAccessKey: string;
|
|
44
44
|
/** 法律文档导航:builtin 走 /AboutUsDetails,delegate 由应用监听事件自行处理 */
|
|
45
45
|
legalDocsMode: LegalDocsMode;
|
|
46
|
+
/** 动态获取访问令牌 */
|
|
47
|
+
getAccessToken: () => string | null;
|
|
46
48
|
}
|
|
47
|
-
export declare let globalConfig: HuyoooUIConfig;
|
|
48
49
|
/** 全局 SEO 配置(独立对象) */
|
|
49
50
|
export declare let globalSEOConfig: GlobalSEOConfig;
|
|
50
51
|
/** 设置全局 SEO 配置 */
|
|
51
52
|
export declare function setGlobalSEOConfig(seoConfig: GlobalSEOConfig): void;
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
export interface HuyoooUIEndpoints {
|
|
54
|
+
auth: string;
|
|
55
|
+
ones: string;
|
|
56
|
+
billing: string;
|
|
57
|
+
log: string;
|
|
58
|
+
ai: string;
|
|
59
|
+
webhook: string;
|
|
60
|
+
}
|
|
61
|
+
/** createHuyoooUI 的应用启动配置 */
|
|
62
|
+
export interface CreateHuyoooUIOptions {
|
|
54
63
|
/** 应用ID - 必填 */
|
|
55
64
|
appId: string;
|
|
65
|
+
/** 各领域服务地址,在 Runtime 创建时固定 */
|
|
66
|
+
endpoints: HuyoooUIEndpoints;
|
|
67
|
+
/** 动态获取访问令牌 */
|
|
68
|
+
getAccessToken: () => string | null;
|
|
56
69
|
/** 应用主题:light / dark / system,全局生效(body.dark + Arco) */
|
|
57
70
|
theme?: GlobalTheme;
|
|
58
|
-
/** 旧版 ones-server API 前缀别名;新代码请使用 onesPrefixUrl */
|
|
59
|
-
prefixUrl?: string;
|
|
60
|
-
/** ones-server API前缀 - 默认 '/onesRestfulApi' */
|
|
61
|
-
onesPrefixUrl?: string;
|
|
62
|
-
/** auth-server API前缀 - 默认 '/authRestfulApi' */
|
|
63
|
-
authPrefixUrl?: string;
|
|
64
|
-
/** billing-server API前缀 - 默认 '/billingRestfulApi' */
|
|
65
|
-
billingPrefixUrl?: string;
|
|
66
|
-
/** log-server API前缀 - 默认 '/logRestfulApi' */
|
|
67
|
-
logPrefixUrl?: string;
|
|
68
|
-
/** ai-server API前缀 - 默认 '/aiRestfulApi' */
|
|
69
|
-
aiPrefixUrl?: string;
|
|
70
|
-
/** webhook-server API前缀 - 默认 '/webhookRestfulApi' */
|
|
71
|
-
webhookPrefixUrl?: string;
|
|
72
71
|
/** OAuth 回调地址(可选,默认当前应用首页) */
|
|
73
72
|
oauthCallbackUrl?: string;
|
|
74
73
|
/** 价格页地址(可选,默认当前应用 /Pricing;桌面端可配置为官网价格页) */
|
|
@@ -86,4 +85,23 @@ export interface SetGlobalConfigOptions {
|
|
|
86
85
|
/** 法律文档导航:builtin 走 /AboutUsDetails,delegate 由应用监听事件自行处理 */
|
|
87
86
|
legalDocsMode?: LegalDocsMode;
|
|
88
87
|
}
|
|
89
|
-
|
|
88
|
+
/** 创建 Runtime 私有配置;应用运行期间不可修改。 */
|
|
89
|
+
export declare function createHuyoooRuntimeConfig(options: CreateHuyoooUIOptions): Readonly<{
|
|
90
|
+
appId: string;
|
|
91
|
+
authPrefixUrl: string;
|
|
92
|
+
onesPrefixUrl: string;
|
|
93
|
+
billingPrefixUrl: string;
|
|
94
|
+
logPrefixUrl: string;
|
|
95
|
+
aiPrefixUrl: string;
|
|
96
|
+
webhookPrefixUrl: string;
|
|
97
|
+
oauthCallbackUrl: string;
|
|
98
|
+
pricingUrl: string;
|
|
99
|
+
openPricing: (() => void) | undefined;
|
|
100
|
+
avatarBucketId: string;
|
|
101
|
+
feedbackBucketId: string;
|
|
102
|
+
bucket: string;
|
|
103
|
+
region: string;
|
|
104
|
+
web3formsAccessKey: string;
|
|
105
|
+
legalDocsMode: LegalDocsMode;
|
|
106
|
+
getAccessToken: () => string | null;
|
|
107
|
+
}>;
|
package/dist/common.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as s, a as o, C as r, D as t, G as p, H as n, b as l, S as m, W as u } from "./WidthContainer-
|
|
1
|
+
import { A as s, a as o, C as r, D as t, G as p, H as n, b as l, S as m, W as u } from "./WidthContainer-DSE4QbW0.js";
|
|
2
2
|
import { C as d, a as f } from "./CollapseItem-DUzZA6tx.js";
|
|
3
|
-
import { C as x, E as b } from "./CustomTable-
|
|
3
|
+
import { C as x, E as b } from "./CustomTable-HDwqEcmB.js";
|
|
4
4
|
import { L } from "./Logo-D7fyXyB-.js";
|
|
5
5
|
import { M as g, a as A } from "./Menu-uCexrsKP.js";
|
|
6
6
|
export {
|
|
@@ -13,12 +13,12 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
13
13
|
appId: string;
|
|
14
14
|
needBindIdentity?: boolean;
|
|
15
15
|
}) => any;
|
|
16
|
+
error: (message: string) => any;
|
|
16
17
|
needBindIdentity: (data: {
|
|
17
18
|
token: string;
|
|
18
19
|
userId: string;
|
|
19
20
|
appId: string;
|
|
20
21
|
}) => any;
|
|
21
|
-
error: (message: string) => any;
|
|
22
22
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
23
23
|
onSuccess?: ((data: {
|
|
24
24
|
token: string;
|
|
@@ -26,11 +26,11 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
26
26
|
appId: string;
|
|
27
27
|
needBindIdentity?: boolean;
|
|
28
28
|
}) => any) | undefined;
|
|
29
|
+
onError?: ((message: string) => any) | undefined;
|
|
29
30
|
onNeedBindIdentity?: ((data: {
|
|
30
31
|
token: string;
|
|
31
32
|
userId: string;
|
|
32
33
|
appId: string;
|
|
33
34
|
}) => any) | undefined;
|
|
34
|
-
onError?: ((message: string) => any) | undefined;
|
|
35
35
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
36
36
|
export default _default;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { SetGlobalConfigOptions } from '../../common/globalConfig';
|
|
2
|
-
import { LegalDocsMode } from '../../legalDocs/types';
|
|
3
1
|
import { FormSizeType } from '../../types/auth';
|
|
4
2
|
type __VLS_Props = {
|
|
5
|
-
config?: SetGlobalConfigOptions;
|
|
6
3
|
handleOAuthCallback?: boolean;
|
|
7
4
|
restoreSession?: boolean;
|
|
8
5
|
fetchAppInfo?: boolean;
|
|
@@ -11,7 +8,6 @@ type __VLS_Props = {
|
|
|
11
8
|
bindIdentityRedirect?: string;
|
|
12
9
|
closePopupOnBindSuccess?: boolean;
|
|
13
10
|
restoreRedirectAfterSignIn?: boolean;
|
|
14
|
-
legalDocsMode?: LegalDocsMode;
|
|
15
11
|
};
|
|
16
12
|
declare function __VLS_template(): {
|
|
17
13
|
attrs: Partial<{}>;
|
|
@@ -37,7 +33,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
37
33
|
fetchAppInfo: boolean;
|
|
38
34
|
showAuthModal: boolean;
|
|
39
35
|
authModalSize: FormSizeType;
|
|
40
|
-
legalDocsMode: LegalDocsMode;
|
|
41
36
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
42
37
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
43
38
|
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
id: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
default: () => string;
|
|
6
|
+
};
|
|
7
|
+
senderRole: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
required: true;
|
|
10
|
+
validator: (value: string) => boolean;
|
|
11
|
+
};
|
|
12
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
13
|
+
id: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
required: true;
|
|
16
|
+
default: () => string;
|
|
17
|
+
};
|
|
18
|
+
senderRole: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
required: true;
|
|
21
|
+
validator: (value: string) => boolean;
|
|
22
|
+
};
|
|
23
|
+
}>> & Readonly<{}>, {
|
|
24
|
+
id: string;
|
|
25
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
26
|
+
scrollableContentRef: HTMLDivElement;
|
|
27
|
+
senderRef: unknown;
|
|
28
|
+
fileInputRef: HTMLInputElement;
|
|
29
|
+
}, HTMLDivElement>;
|
|
30
|
+
export default _default;
|
|
@@ -19,9 +19,9 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
19
19
|
required: true;
|
|
20
20
|
};
|
|
21
21
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
22
|
-
progress: (
|
|
23
|
-
fail: (
|
|
24
|
-
fileFinish: (
|
|
22
|
+
progress: (percent: number) => any;
|
|
23
|
+
fail: (error: Error) => any;
|
|
24
|
+
fileFinish: (result: unknown) => any;
|
|
25
25
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
26
26
|
options: {
|
|
27
27
|
type: ObjectConstructor;
|
|
@@ -33,9 +33,9 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
33
33
|
required: true;
|
|
34
34
|
};
|
|
35
35
|
}>> & Readonly<{
|
|
36
|
-
onProgress?: ((
|
|
37
|
-
onFail?: ((
|
|
38
|
-
onFileFinish?: ((
|
|
36
|
+
onProgress?: ((percent: number) => any) | undefined;
|
|
37
|
+
onFail?: ((error: Error) => any) | undefined;
|
|
38
|
+
onFileFinish?: ((result: unknown) => any) | undefined;
|
|
39
39
|
}>, {
|
|
40
40
|
options: Record<string, any>;
|
|
41
41
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -24,6 +24,8 @@ declare function setToken(token: string): void;
|
|
|
24
24
|
declare function completeSignIn(data: SignInResult): void;
|
|
25
25
|
/** 清除 token 并广播 onSignOut(让所有订阅者集中清理依赖 token 的状态) */
|
|
26
26
|
declare function clearAuth(): void;
|
|
27
|
+
/** 主动注销服务端会话;无论网络结果如何都清理本地认证态。 */
|
|
28
|
+
declare function signOut(): Promise<boolean>;
|
|
27
29
|
/** 注册登录成功监听,返回 cleanup */
|
|
28
30
|
declare function onSignIn(listener: SignInListener): Cleanup;
|
|
29
31
|
/** 注册注册成功监听,返回 cleanup */
|
|
@@ -78,5 +80,6 @@ export declare function useAuthkitAuth(): {
|
|
|
78
80
|
completeSignIn: typeof completeSignIn;
|
|
79
81
|
restoreSession: typeof restoreSession;
|
|
80
82
|
clearAuth: typeof clearAuth;
|
|
83
|
+
signOut: typeof signOut;
|
|
81
84
|
};
|
|
82
85
|
export {};
|
|
@@ -4,6 +4,7 @@ export interface PaymentVerifyResult {
|
|
|
4
4
|
status: string;
|
|
5
5
|
message?: string;
|
|
6
6
|
pointsAdded?: number;
|
|
7
|
+
error?: unknown;
|
|
7
8
|
}
|
|
8
9
|
/** 按支付场景查询订单/账单是否已支付完成 */
|
|
9
10
|
export declare function verifyPaymentStatus(scene: PaymentReturnScene, orderId: string): Promise<PaymentVerifyResult>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BrowserUploadService } from '../upload/browserUploadService';
|
|
1
2
|
export type UploadedFeedbackAttachmentKind = 'image' | 'video' | 'file';
|
|
2
3
|
export type UploadedFeedbackAttachment = {
|
|
3
4
|
key: string;
|
|
@@ -6,4 +7,4 @@ export type UploadedFeedbackAttachment = {
|
|
|
6
7
|
mimeType: string;
|
|
7
8
|
kind: UploadedFeedbackAttachmentKind;
|
|
8
9
|
};
|
|
9
|
-
export declare function uploadFeedbackAttachments(files: File[], bucketId: string): Promise<UploadedFeedbackAttachment[]>;
|
|
10
|
+
export declare function uploadFeedbackAttachments(uploadService: BrowserUploadService, files: File[], bucketId: string): Promise<UploadedFeedbackAttachment[]>;
|
package/dist/composables.d.ts
CHANGED
|
@@ -7,11 +7,11 @@ export { useAuthkitUsersProfile } from './composables/Authkit/useAuthkitUsersPro
|
|
|
7
7
|
export { useAuthkitAppsAuthPageInfo } from './composables/Authkit/useAuthkitAppsAuthPageInfo';
|
|
8
8
|
export { useAuthkitCreateAndUpdate } from './composables/Authkit/useAuthkitCreateAndUpdate';
|
|
9
9
|
export { useMessageNotifications } from './composables/useMessageNotifications';
|
|
10
|
-
export {
|
|
10
|
+
export { globalSEOConfig, setGlobalSEOConfig, setTheme, globalThemeRef, type CreateHuyoooUIOptions, type GlobalTheme, type HuyoooUIConfig, } from './common/globalConfig';
|
|
11
|
+
export { createHuyoooUI, getHuyoooRuntime, useHuyoooRuntime, type HuyoooRuntime } from './runtime';
|
|
11
12
|
export { useCreateAndUpdate as useCommonCreateAndUpdate } from './composables/useCreateAndUpdate';
|
|
12
13
|
export { useTableHandle } from './composables/useTableHandle';
|
|
13
14
|
export { useActiveDoc } from './composables/useActiveDoc';
|
|
14
|
-
export { useUploadCos } from './composables/Upload/useUploadCos';
|
|
15
15
|
export { withViewTransition } from './composables/viewTransitions';
|
|
16
16
|
export { useDownloads } from './composables/useDownloads';
|
|
17
17
|
export { useAuthMenu, findMenuPath, findActiveMenuPath, getPathOnly } from './composables/Authkit/useAuthMenu';
|
package/dist/composables.js
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import { u as a } from "./useAuthkitAuth-
|
|
2
|
-
import {
|
|
3
|
-
import { L as
|
|
4
|
-
import { f as
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { u as j } from "./
|
|
1
|
+
import { u as a } from "./useAuthkitAuth-BPTZUSkM.js";
|
|
2
|
+
import { u as t } from "./apiClients-Ctcq8NZs.js";
|
|
3
|
+
import { L as r, a as i, b as n, i as l, o as f, r as p, c as g, u as m } from "./useLegalDocs-D44qU_q0.js";
|
|
4
|
+
import { f as h } from "./fetchAuthPageAboutUs-DiCqMUX3.js";
|
|
5
|
+
import { u as d } from "./useAuthkitUsersProfile-CW_exa7E.js";
|
|
6
|
+
import { u as b } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
|
|
7
|
+
import { u as O } from "./useAuthkitCreateAndUpdate-Bbv7vZZn.js";
|
|
8
|
+
import { u as D } from "./useMessageNotifications-D9uikt21.js";
|
|
9
|
+
import { c as P, g as E, a as R, b as U, s as k, d as M, u as T } from "./runtime-BzCSCUNv.js";
|
|
10
|
+
import { u as w, a as y, b as H, c as I, d as B } from "./useSEO-_TNouXE_.js";
|
|
11
|
+
import { f as _, a as F, g as K, u as N, b as V, c as Y, w as j } from "./useRoutePermission-BrQX7NTq.js";
|
|
12
12
|
import { u as z } from "./useUserMenu-ClPBlvaM.js";
|
|
13
|
-
import { u as Q, a as W } from "./useSubscriptionCheckout-
|
|
14
|
-
import { c as Z, u as $, a as
|
|
13
|
+
import { u as Q, a as W } from "./useSubscriptionCheckout-BDDCRxSs.js";
|
|
14
|
+
import { c as Z, u as $, a as ee, b as se } from "./useBillingStatusOptions-Br-iL77Z.js";
|
|
15
15
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
r as LEGAL_DOCS,
|
|
17
|
+
i as LEGAL_DOC_KEYS,
|
|
18
|
+
n as buildBuiltinLegalDocUrl,
|
|
19
19
|
Z as createBillingStatusOptions,
|
|
20
|
-
|
|
20
|
+
P as createHuyoooUI,
|
|
21
|
+
h as fetchAuthPageAboutUs,
|
|
21
22
|
_ as findActiveMenuPath,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
P as useAuthkitAppsAuthPageInfo,
|
|
23
|
+
F as findMenuPath,
|
|
24
|
+
E as getHuyoooRuntime,
|
|
25
|
+
K as getPathOnly,
|
|
26
|
+
R as globalSEOConfig,
|
|
27
|
+
U as globalThemeRef,
|
|
28
|
+
l as isLegalDocConfigured,
|
|
29
|
+
f as openLegalDocTarget,
|
|
30
|
+
p as resolveLegalAppId,
|
|
31
|
+
g as resolveLegalDocTargetFromData,
|
|
32
|
+
k as setGlobalSEOConfig,
|
|
33
|
+
M as setTheme,
|
|
34
|
+
N as useActiveDoc,
|
|
35
|
+
V as useAuthMenu,
|
|
36
|
+
b as useAuthkitAppsAuthPageInfo,
|
|
37
37
|
a as useAuthkitAuth,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
t as useAuthkitAuthModal,
|
|
39
|
+
O as useAuthkitCreateAndUpdate,
|
|
40
|
+
d as useAuthkitUsersProfile,
|
|
41
41
|
Q as useBillingPlans,
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
w as useCommonCreateAndUpdate,
|
|
43
|
+
y as useDownloads,
|
|
44
|
+
T as useHuyoooRuntime,
|
|
44
45
|
$ as useInvoiceStatusOptions,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
m as useLegalDocs,
|
|
47
|
+
D as useMessageNotifications,
|
|
48
|
+
ee as usePointsRechargeStatusOptions,
|
|
49
|
+
se as useRefundStatusOptions,
|
|
50
|
+
Y as useRoutePermission,
|
|
51
|
+
H as useRouteSEO,
|
|
52
|
+
I as useSEO,
|
|
52
53
|
W as useSubscriptionCheckout,
|
|
53
54
|
B as useTableHandle,
|
|
54
|
-
j as useUploadCos,
|
|
55
55
|
z as useUserMenu,
|
|
56
|
-
|
|
56
|
+
j as withViewTransition
|
|
57
57
|
};
|
package/dist/feedback.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as b, a as s, F as d, b as F, _ as o, c, R as t, V as r } from "./FeedbackModal.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { C as i } from "./index-
|
|
1
|
+
import { B as b, a as s, F as d, b as F, _ as o, c, R as t, V as r } from "./FeedbackModal.vue_vue_type_script_setup_true_lang-DpOmbAg-.js";
|
|
2
|
+
import { C as i } from "./index-Cn6LcfZO.js";
|
|
3
3
|
import { F as m, a as f, b as n, c as p } from "./FeedbackItem-BP-SiJ2u.js";
|
|
4
4
|
export {
|
|
5
5
|
i as Clipboard,
|