@huyooo/ui 0.15.0 → 0.15.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.
Files changed (47) hide show
  1. package/dist/{AuthkitAppSetting-Xe-QQSQ4.js → AuthkitAppSetting-Ds7mYFV5.js} +6 -6
  2. package/dist/{AuthkitGithubBinding-Uya3rVdX.js → AuthkitGithubBinding-LVDS1PNQ.js} +231 -228
  3. package/dist/{Clipboard-C8ncjaAJ.js → Clipboard-R3AURqvU.js} +1 -1
  4. package/dist/{Contact-mb7deQOs.js → Contact-B3AMSHoN.js} +2 -2
  5. package/dist/{FeedbackItem-C4MZUC-3.js → FeedbackItem-DkvSQT33.js} +3 -3
  6. package/dist/{FeedbackModal-yVKcsuaE.js → FeedbackModal-C45pNoiw.js} +3 -3
  7. package/dist/{MessageHandle-rRAQnE-q.js → MessageHandle-CEQtGyVZ.js} +2 -2
  8. package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-CsXEBH4f.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-87v_RIQa.js} +2 -2
  9. package/dist/{PaySubscriptions-B6R71CHm.js → PaySubscriptions-D3g1OhiA.js} +4 -4
  10. package/dist/{PricingPlans-Ddl98xpp.js → PricingPlans-DXea7rl0.js} +79 -80
  11. package/dist/{ReferrerReferees-DFCwvXJ6.js → ReferrerReferees-BxmZ1w_L.js} +4 -4
  12. package/dist/{Upload.vue_vue_type_script_setup_true_lang-dLSky4Yx.js → Upload.vue_vue_type_script_setup_true_lang-DLKSHzxG.js} +1 -1
  13. package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-f2mzNg6i.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-C7mV8kGe.js} +9 -9
  14. package/dist/{WidthContainer-DSxG-FRN.js → WidthContainer-DKasAIgU.js} +9 -9
  15. package/dist/{apiClients-CkI47p36.js → apiClients-DT7o0IpO.js} +124 -109
  16. package/dist/authkit.js +9 -9
  17. package/dist/common.js +1 -1
  18. package/dist/composables/Billing/useBillingPlans.d.ts +1 -19
  19. package/dist/composables.js +13 -13
  20. package/dist/feedback.js +3 -3
  21. package/dist/main.d.ts +1 -0
  22. package/dist/main.js +248 -243
  23. package/dist/message.js +3 -3
  24. package/dist/pay.js +4 -4
  25. package/dist/privateCom.js +1 -1
  26. package/dist/referrer.js +1 -1
  27. package/dist/style.css +1 -1
  28. package/dist/types/api/billing.generated.d.ts +2 -6
  29. package/dist/types/api/log.generated.d.ts +4 -2
  30. package/dist/upload.js +2 -2
  31. package/dist/{useAuthkitAppsAuthPageInfo-nCjfAjiw.js → useAuthkitAppsAuthPageInfo-DScDQfj5.js} +1 -1
  32. package/dist/{useAuthkitAuth-C--qS6UE.js → useAuthkitAuth-DpdKRuJm.js} +65 -67
  33. package/dist/{useAuthkitCreateAndUpdate-u-ceTc-m.js → useAuthkitCreateAndUpdate-MzA4qtTh.js} +1 -1
  34. package/dist/{useAuthkitUsersProfile-BC5EsA2f.js → useAuthkitUsersProfile-aw_A7IWb.js} +2 -2
  35. package/dist/{useBillingStatusOptions-D5Ehwtbj.js → useBillingStatusOptions-CAsu1hrf.js} +3 -3
  36. package/dist/{useEnsureAuthenticated-C4tsSfv6.js → useEnsureAuthenticated-BEKhtQAl.js} +2 -2
  37. package/dist/{useLegalLinks-DeXLE-yv.js → useLegalLinks-BijRF_ZD.js} +2 -2
  38. package/dist/{useMessageNotifications-BMUx5xfX.js → useMessageNotifications-CFku0c2R.js} +1 -1
  39. package/dist/{useRoutePermission-CxRJlooW.js → useRoutePermission-v4_0B-aO.js} +2 -2
  40. package/dist/{useSEO-DFmbAH-7.js → useSEO-CbHCw4gq.js} +1 -1
  41. package/dist/{useSubscriptionCheckout-CHAF20s-.js → useSubscriptionCheckout-BjPiHSjA.js} +103 -104
  42. package/dist/{useTableHandle-9alnSWt0.js → useTableHandle-TDJa_Czn.js} +1 -1
  43. package/dist/{useUploadCos-DGPnLOC9.js → useUploadCos-CvG6EL5Q.js} +1 -1
  44. package/dist/user.js +1 -1
  45. package/dist/utils/apiMiddlewares.d.ts +3 -0
  46. package/dist/utils/authkit.d.ts +6 -0
  47. package/package.json +2 -2
@@ -285,7 +285,7 @@ export type Api = {
285
285
  statistics: {
286
286
  /** 获取订阅概览页统计数据(状态计数、MRR、产品分布、最近订阅) */
287
287
  post: {
288
- body: {
288
+ query: {
289
289
  recentLimit?: number;
290
290
  };
291
291
  return: any;
@@ -366,7 +366,6 @@ export type Api = {
366
366
  body: {
367
367
  priceId: string;
368
368
  featureKey: string;
369
- name: string;
370
369
  description?: string;
371
370
  limit: number;
372
371
  period: "day" | "week" | "month" | "year" | "lifetime";
@@ -389,7 +388,6 @@ export type Api = {
389
388
  post: {
390
389
  body: {
391
390
  id: string;
392
- name?: string;
393
391
  description?: string;
394
392
  limit?: number;
395
393
  period?: "day" | "week" | "month" | "year" | "lifetime";
@@ -3315,7 +3313,7 @@ export interface ApiClient {
3315
3313
  };
3316
3314
  statistics: {
3317
3315
  /** 获取订阅概览页统计数据(状态计数、MRR、产品分布、最近订阅) */
3318
- post: (body: {
3316
+ post: (query?: {
3319
3317
  recentLimit?: number;
3320
3318
  }, config?: RequestConfig) => RequestBuilder<any>;
3321
3319
  };
@@ -3375,7 +3373,6 @@ export interface ApiClient {
3375
3373
  post: (body: {
3376
3374
  priceId: string;
3377
3375
  featureKey: string;
3378
- name: string;
3379
3376
  description?: string;
3380
3377
  limit: number;
3381
3378
  period: "day" | "week" | "month" | "year" | "lifetime";
@@ -3392,7 +3389,6 @@ export interface ApiClient {
3392
3389
  /** 更新配额定义 */
3393
3390
  post: (body: {
3394
3391
  id: string;
3395
- name?: string;
3396
3392
  description?: string;
3397
3393
  limit?: number;
3398
3394
  period?: "day" | "week" | "month" | "year" | "lifetime";
@@ -122,7 +122,8 @@ export type Api = {
122
122
  startTime?: string;
123
123
  endTime?: string;
124
124
  limit?: number;
125
- sortBy?: "count" | "errorRate" | "avgDuration";
125
+ sortBy?: "count" | "errorRate" | "avgDuration" | "slowRequestCount" | "p95Duration";
126
+ sortOrder?: "asc" | "desc";
126
127
  service?: string;
127
128
  };
128
129
  return: any;
@@ -699,7 +700,8 @@ export interface ApiClient {
699
700
  startTime?: string;
700
701
  endTime?: string;
701
702
  limit?: number;
702
- sortBy?: "count" | "errorRate" | "avgDuration";
703
+ sortBy?: "count" | "errorRate" | "avgDuration" | "slowRequestCount" | "p95Duration";
704
+ sortOrder?: "asc" | "desc";
703
705
  service?: string;
704
706
  }, config?: RequestConfig) => Promise<ApiResponse<any>>;
705
707
  };
package/dist/upload.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as p } from "./Upload.vue_vue_type_script_setup_true_lang-dLSky4Yx.js";
2
- import { u as s } from "./useUploadCos-DGPnLOC9.js";
1
+ import { _ as p } from "./Upload.vue_vue_type_script_setup_true_lang-DLKSHzxG.js";
2
+ import { u as s } from "./useUploadCos-CvG6EL5Q.js";
3
3
  export {
4
4
  p as Upload,
5
5
  s as useUploadCos
@@ -1,5 +1,5 @@
1
1
  import { ref as n } from "vue";
2
- import { e as l } from "./apiClients-CkI47p36.js";
2
+ import { e as l } from "./apiClients-DT7o0IpO.js";
3
3
  const a = n({
4
4
  id: "",
5
5
  appKey: "",
@@ -1,9 +1,9 @@
1
- import { ref as s, readonly as P } from "vue";
2
- import { e as c } from "./apiClients-CkI47p36.js";
3
- const a = s("signIn"), m = /* @__PURE__ */ new Set(), I = /* @__PURE__ */ new Set(), S = /* @__PURE__ */ new Set(), v = /* @__PURE__ */ new Set(), t = s(null), p = "jwtToken";
1
+ import { ref as a, readonly as P } from "vue";
2
+ import { f as U, r as A, e as u } from "./apiClients-DT7o0IpO.js";
3
+ const i = a("signIn"), m = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Set(), I = /* @__PURE__ */ new Set(), S = /* @__PURE__ */ new Set(), t = a(null), v = "jwtToken";
4
4
  function k() {
5
5
  try {
6
- const e = localStorage.getItem(p);
6
+ const e = localStorage.getItem(v);
7
7
  if (e)
8
8
  return t.value = e, !0;
9
9
  } catch (e) {
@@ -11,118 +11,116 @@ function k() {
11
11
  }
12
12
  return !1;
13
13
  }
14
- function U() {
14
+ function L() {
15
15
  try {
16
16
  const e = new URL(window.location.href), r = e.searchParams.get("token");
17
17
  if (!r) return !1;
18
- const i = e.searchParams.get("userId"), d = e.searchParams.get("appId"), f = e.searchParams.get("needBindIdentity") === "true";
19
- u(r), ["token", "userId", "appId", "needBindIdentity"].forEach((w) => e.searchParams.delete(w));
18
+ const s = e.searchParams.get("userId"), l = e.searchParams.get("appId"), f = e.searchParams.get("needBindIdentity") === "true";
19
+ c(r), ["token", "userId", "appId", "needBindIdentity"].forEach((w) => e.searchParams.delete(w));
20
20
  const h = `${e.pathname}${e.search}${e.hash}`;
21
- return window.history.replaceState({}, "", h), g({
21
+ return window.history.replaceState({}, "", h), p({
22
22
  jwtToken: r,
23
- userId: i,
24
- appId: d,
23
+ userId: s,
24
+ appId: l,
25
25
  needBindIdentity: f
26
26
  }), !0;
27
27
  } catch (e) {
28
28
  return console.warn("Failed to handle OAuth callback:", e), !1;
29
29
  }
30
30
  }
31
- function L() {
32
- return U() ? !0 : k();
33
- }
34
31
  function E() {
32
+ return L() ? !0 : k();
33
+ }
34
+ function O() {
35
35
  return t.value || k() ? t.value : null;
36
36
  }
37
- function u(e) {
37
+ function c(e) {
38
38
  t.value = e;
39
39
  try {
40
- localStorage.setItem(p, e);
40
+ localStorage.setItem(v, e);
41
41
  } catch (r) {
42
42
  console.warn("Failed to save token to localStorage:", r);
43
43
  }
44
44
  }
45
- function O(e) {
46
- u(e.jwtToken), g(e);
45
+ function V(e) {
46
+ c(e.jwtToken), p(e);
47
47
  }
48
- function V() {
49
- t.value = null;
50
- try {
51
- localStorage.removeItem(p);
52
- } catch (e) {
53
- console.warn("Failed to clear localStorage:", e);
54
- }
55
- b();
48
+ function j() {
49
+ t.value = null, B();
56
50
  }
57
- function l(e, r) {
51
+ U(j);
52
+ function R() {
53
+ A();
54
+ }
55
+ function d(e, r) {
58
56
  return e.add(r), () => {
59
57
  e.delete(r);
60
58
  };
61
59
  }
62
- function g(e) {
60
+ function p(e) {
63
61
  m.forEach((r) => {
64
62
  r(e);
65
63
  });
66
64
  }
67
- function j() {
65
+ function b() {
66
+ g.forEach((e) => void e());
67
+ }
68
+ function F() {
68
69
  I.forEach((e) => void e());
69
70
  }
70
- function A() {
71
+ function B() {
71
72
  S.forEach((e) => void e());
72
73
  }
73
- function b() {
74
- v.forEach((e) => void e());
75
- }
76
- function F(e) {
77
- return l(m, e);
74
+ function $(e) {
75
+ return d(m, e);
78
76
  }
79
- function R(e) {
80
- return l(I, e);
77
+ function K(e) {
78
+ return d(g, e);
81
79
  }
82
- function B(e) {
83
- return l(S, e);
80
+ function _(e) {
81
+ return d(I, e);
84
82
  }
85
- function $(e) {
86
- return l(v, e);
83
+ function x(e) {
84
+ return d(S, e);
87
85
  }
88
- function x() {
89
- const e = s(!1), r = s(!1), i = s(!1);
90
- async function d(n) {
86
+ function M() {
87
+ const e = a(!1), r = a(!1), s = a(!1);
88
+ async function l(n) {
91
89
  e.value = !0;
92
90
  const {
93
91
  data: o
94
- } = await c.auth.signIn.unified.post({
92
+ } = await u.auth.signIn.unified.post({
95
93
  identifier: n.identifier || n.email || "",
96
94
  password: n.password,
97
95
  code: n.code,
98
96
  emailVerifyId: n.emailVerifyId,
99
97
  method: n.method || "password"
100
98
  });
101
- e.value = !1, o && (u(o.jwtToken), g(o));
99
+ e.value = !1, o && (c(o.jwtToken), p(o));
102
100
  }
103
101
  async function f(n) {
104
102
  r.value = !0;
105
103
  const {
106
104
  error: o
107
- } = n.type === "phone" ? await c.auth.signUp.phone.post({
105
+ } = n.type === "phone" ? await u.auth.signUp.phone.post({
108
106
  phone: n.phone || "",
109
107
  code: n.code || "",
110
108
  password: n.password,
111
109
  referrerId: n.referrerId
112
- }) : await c.auth.signUp.post({
110
+ }) : await u.auth.signUp.post({
113
111
  email: n.email || "",
114
112
  userToken: n.userToken || "",
115
113
  emailVerifyId: n.emailVerifyId || "",
116
114
  password: n.password || "",
117
115
  referrerId: n.referrerId
118
116
  });
119
- r.value = !1, o || (a.value = "signIn", j());
117
+ r.value = !1, o || (i.value = "signIn", b());
120
118
  }
121
119
  async function h(n) {
122
- i.value = !0;
120
+ s.value = !0;
123
121
  const {
124
122
  error: o
125
- } = await c.auth.resetPassword.post({
123
+ } = await u.auth.resetPassword.post({
126
124
  method: n.method || "email",
127
125
  email: n.email,
128
126
  phone: n.phone,
@@ -131,40 +129,40 @@ function x() {
131
129
  emailVerifyId: n.emailVerifyId,
132
130
  password: n.password
133
131
  });
134
- i.value = !1, o || (a.value = "signIn", A());
132
+ s.value = !1, o || (i.value = "signIn", F());
135
133
  }
136
134
  function w() {
137
- a.value = "signUp";
135
+ i.value = "signUp";
138
136
  }
139
137
  function y() {
140
- a.value = "resetPassword";
138
+ i.value = "resetPassword";
141
139
  }
142
140
  function T() {
143
- a.value = "signIn";
141
+ i.value = "signIn";
144
142
  }
145
143
  return {
146
- signInSubmit: d,
144
+ signInSubmit: l,
147
145
  signUpSubmit: f,
148
146
  resetPasswordSubmit: h,
149
- currentView: a,
147
+ currentView: i,
150
148
  authSignInLoading: e,
151
149
  authSignUpLoading: r,
152
- resetPasswordLoading: i,
150
+ resetPasswordLoading: s,
153
151
  switchSignUp: w,
154
152
  switchResetPassword: y,
155
153
  switchSignIn: T,
156
- onSignIn: F,
157
- onSignUp: R,
158
- onResetPassword: B,
159
- onSignOut: $,
154
+ onSignIn: $,
155
+ onSignUp: K,
156
+ onResetPassword: _,
157
+ onSignOut: x,
160
158
  jwtToken: P(t),
161
- getToken: E,
162
- setToken: u,
163
- completeSignIn: O,
164
- restoreSession: L,
165
- clearAuth: V
159
+ getToken: O,
160
+ setToken: c,
161
+ completeSignIn: V,
162
+ restoreSession: E,
163
+ clearAuth: R
166
164
  };
167
165
  }
168
166
  export {
169
- x as u
167
+ M as u
170
168
  };
@@ -1,5 +1,5 @@
1
1
  /* empty css */
2
- import "./apiClients-CkI47p36.js";
2
+ import "./apiClients-DT7o0IpO.js";
3
3
  import { Message as u } from "@arco-design/web-vue";
4
4
  import { ref as e } from "vue";
5
5
  function h(o) {
@@ -1,6 +1,6 @@
1
1
  import { ref as o, computed as r } from "vue";
2
- import { e as f } from "./apiClients-CkI47p36.js";
3
- import { u as i } from "./useAuthkitAuth-C--qS6UE.js";
2
+ import { e as f } from "./apiClients-DT7o0IpO.js";
3
+ import { u as i } from "./useAuthkitAuth-DpdKRuJm.js";
4
4
  const t = o(null), l = o(!1), u = o(!1), c = r(() => !!t.value);
5
5
  async function v() {
6
6
  const {
@@ -1,5 +1,5 @@
1
1
  import { createClient as y } from "@vafast/api-client";
2
- import { g as f, h as b, t as k, i as v, j as S, f as u } from "./apiClients-CkI47p36.js";
2
+ import { g as b, i as f, t as k, j as v, k as S, h as u } from "./apiClients-DT7o0IpO.js";
3
3
  import { ref as g } from "vue";
4
4
  async function O(t, o) {
5
5
  const {
@@ -13,9 +13,9 @@ async function O(t, o) {
13
13
  return r;
14
14
  }
15
15
  const A = y({
16
- baseURL: f.billingPrefixUrl,
16
+ baseURL: b.billingPrefixUrl,
17
17
  timeout: 3e4
18
- }).use(b).use(k).use(v).use(S), m = {
18
+ }).use(f).use(k).use(v).use(S), m = {
19
19
  productOptions: () => O("/products/options")
20
20
  }, w = [{
21
21
  key: "pending",
@@ -1,6 +1,6 @@
1
1
  import { computed as f } from "vue";
2
- import { u as r } from "./useAuthkitAuth-C--qS6UE.js";
3
- import { u as d } from "./apiClients-CkI47p36.js";
2
+ import { u as r } from "./useAuthkitAuth-DpdKRuJm.js";
3
+ import { u as d } from "./apiClients-DT7o0IpO.js";
4
4
  const A = "jwtToken";
5
5
  let e = null, i = !1;
6
6
  async function h(n) {
@@ -1,6 +1,6 @@
1
1
  import { computed as c } from "vue";
2
- import { g as L } from "./apiClients-CkI47p36.js";
3
- import { u as m } from "./useAuthkitAppsAuthPageInfo-nCjfAjiw.js";
2
+ import { g as L } from "./apiClients-DT7o0IpO.js";
3
+ import { u as m } from "./useAuthkitAppsAuthPageInfo-DScDQfj5.js";
4
4
  const l = {
5
5
  userServiceAgreement: "用户服务协议",
6
6
  privacyPolicy: "隐私协议",
@@ -1,5 +1,5 @@
1
1
  import { ref as a, computed as L } from "vue";
2
- import { o as c } from "./apiClients-CkI47p36.js";
2
+ import { o as c } from "./apiClients-DT7o0IpO.js";
3
3
  function S(f = "system") {
4
4
  const n = a(!0), d = a(""), i = a(!1), g = a(!1), o = a([]), t = a({
5
5
  total: 0,
@@ -1,7 +1,7 @@
1
1
  import { ref as w, computed as b, watch as S } from "vue";
2
2
  import { useRouter as I, useRoute as T } from "vue-router";
3
- import { u as k } from "./useAuthkitAppsAuthPageInfo-nCjfAjiw.js";
4
- import { u as M } from "./useAuthkitUsersProfile-BC5EsA2f.js";
3
+ import { u as k } from "./useAuthkitAppsAuthPageInfo-DScDQfj5.js";
4
+ import { u as M } from "./useAuthkitUsersProfile-aw_A7IWb.js";
5
5
  const y = w({
6
6
  key: "",
7
7
  name: ""
@@ -1,5 +1,5 @@
1
1
  /* empty css */
2
- import { g } from "./apiClients-CkI47p36.js";
2
+ import { g } from "./apiClients-DT7o0IpO.js";
3
3
  import { Message as f } from "@arco-design/web-vue";
4
4
  import { ref as i, computed as r } from "vue";
5
5
  import { useHead as p, useSeoMeta as m } from "@unhead/vue";