@huyooo/ui 0.7.24 → 0.8.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.
Files changed (85) hide show
  1. package/dist/{AuthkitAuthModal-DcZ69VKT.js → AuthkitAuthModal-CX6-EB-D.js} +563 -628
  2. package/dist/{AuthkitSignInPhone-CJLeElZ1.js → AuthkitSignInPhone-D3hR0dGZ.js} +100 -100
  3. package/dist/{Clipboard-BVSUEtX_.js → Clipboard-CI4IUrMw.js} +13 -14
  4. package/dist/{Contact-DWQjd6yu.js → Contact-mQa-gB4k.js} +3 -3
  5. package/dist/{CustomTable-BCOwLyRJ.js → CustomTable-D8ubfrWL.js} +2 -2
  6. package/dist/{FeedbackItem-qppn-rOs.js → FeedbackItem-qaxaQ8gu.js} +4 -4
  7. package/dist/{FeedbackModal-28L6QJaB.js → FeedbackModal-CUSOWVn5.js} +268 -303
  8. package/dist/{LandingPageSectionTabs-DYNXKElT.js → LandingPageSectionTabs-BOX6nVdh.js} +2 -2
  9. package/dist/MessageHandle-WcCeYl7E.js +1147 -0
  10. package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-DHO6VGx-.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-BwZM2SQn.js} +38 -37
  11. package/dist/{PaySubscriptions-BqtXFPHR.js → PaySubscriptions-DO2W3Y5v.js} +131 -171
  12. package/dist/ReferrerReferees-CXVi2pUl.js +106 -0
  13. package/dist/{Upload.vue_vue_type_script_setup_true_lang-D2gY_z-p.js → Upload.vue_vue_type_script_setup_true_lang-CY_Pk57x.js} +2 -2
  14. package/dist/{UserAccountMenu--fY2QkYw.js → UserAccountMenu-CHkdka0u.js} +8 -8
  15. package/dist/{WidthContainer-DMJSBs_q.js → WidthContainer-BBoIS50Z.js} +10 -10
  16. package/dist/apiClients-CChPISR0.js +1805 -0
  17. package/dist/authkit.js +6 -6
  18. package/dist/common/globalConfig.d.ts +2 -2
  19. package/dist/common.js +2 -2
  20. package/dist/components/Authkit/Auth/AuthkitAuthContainer.vue.d.ts +1 -1
  21. package/dist/components/Authkit/Auth/AuthkitAuthorize.vue.d.ts +1 -1
  22. package/dist/components/LandingPage/LandingPageLogo.vue.d.ts +1 -1
  23. package/dist/components/LandingPage/LandingPageStats.vue.d.ts +1 -1
  24. package/dist/components/Logo.vue.d.ts +1 -1
  25. package/dist/components/MenuItem.vue.d.ts +1 -1
  26. package/dist/components/Message/MessageTabs.vue.d.ts +2 -2
  27. package/dist/components/Upload/Upload.vue.d.ts +2 -2
  28. package/dist/components/User/UserBasicInformation.vue.d.ts +1 -1
  29. package/dist/components/User/UserPanel.vue.d.ts +2 -2
  30. package/dist/composables/Authkit/useAuthkitAuth.d.ts +1 -1
  31. package/dist/composables.js +9 -9
  32. package/dist/feedback.js +3 -3
  33. package/dist/{index-Bb-d5pBq.js → index-4_tj9bS1.js} +1 -1
  34. package/dist/index-96pA3ONI.js +30 -0
  35. package/dist/index.js +191 -189
  36. package/dist/landingPage.js +1 -1
  37. package/dist/main.d.ts +1 -1
  38. package/dist/message.js +3 -3
  39. package/dist/pay.js +1 -1
  40. package/dist/privateCom.js +1 -1
  41. package/dist/referrer.js +1 -1
  42. package/dist/style.css +1 -1
  43. package/dist/types/api/auth.generated.d.ts +2747 -0
  44. package/dist/types/api/billing.generated.d.ts +1964 -0
  45. package/dist/types/api/ones.generated.d.ts +5567 -0
  46. package/dist/upload.js +2 -2
  47. package/dist/{useAuthkitAppsAuthPageInfo-Bu-Q-44G.js → useAuthkitAppsAuthPageInfo-gn2zm_NY.js} +13 -27
  48. package/dist/{useAuthkitCreateAndUpdate-DHGgpk14.js → useAuthkitCreateAndUpdate-yNpIyVXV.js} +2 -2
  49. package/dist/useAuthkitUsersProfile-D32zPSn2.js +174 -0
  50. package/dist/{useDownloads-jzTsK6S6.js → useDownloads-MF9rK9J_.js} +2 -2
  51. package/dist/useMessageNotifications-CCfM6W6J.js +78 -0
  52. package/dist/{useSEO-Curqg3Re.js → useSEO-DivOwPWc.js} +2 -2
  53. package/dist/{useTableHandle-MuavycJ7.js → useTableHandle-DpemWl6Y.js} +2 -2
  54. package/dist/{useUploadCos-C4mpMNhT.js → useUploadCos-BVvRc0BW.js} +159 -181
  55. package/dist/user.js +1 -1
  56. package/dist/utils/apiClients.d.ts +6 -0
  57. package/dist/utils/apiMiddlewares.d.ts +16 -0
  58. package/package.json +8 -3
  59. package/dist/MessageHandle-DaczDI82.js +0 -1207
  60. package/dist/MessageNotifications-IluYhczu.js +0 -35
  61. package/dist/ReferrerReferees-D6CNoqs4.js +0 -113
  62. package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
  63. package/dist/api/Authkit/Users.d.ts +0 -15
  64. package/dist/api/Authkit/apps.d.ts +0 -2
  65. package/dist/api/Authkit/auth.d.ts +0 -50
  66. package/dist/api/Authkit/oauth.d.ts +0 -12
  67. package/dist/api/Authkit/verify.d.ts +0 -25
  68. package/dist/api/Buckets/Files.d.ts +0 -7
  69. package/dist/api/Buckets.d.ts +0 -2
  70. package/dist/api/Invoices.d.ts +0 -32
  71. package/dist/api/Message/ChangelogNotifications.d.ts +0 -17
  72. package/dist/api/Message/EventNotifications.d.ts +0 -16
  73. package/dist/api/Message/MessageNotifications.d.ts +0 -25
  74. package/dist/api/Message/NoticeNotifications.d.ts +0 -37
  75. package/dist/api/Messages.d.ts +0 -2
  76. package/dist/api/Orders.d.ts +0 -9
  77. package/dist/api/Products.d.ts +0 -20
  78. package/dist/api/Quotas.d.ts +0 -21
  79. package/dist/api/Referrer.d.ts +0 -1
  80. package/dist/api/Subscriptions.d.ts +0 -35
  81. package/dist/api/index.d.ts +0 -8
  82. package/dist/request-BkNyIDws.js +0 -196
  83. package/dist/useAuthkitUsersProfile-D58I5n2T.js +0 -257
  84. package/dist/useMessageNotifications-CLowHpNV.js +0 -78
  85. package/dist/utils/request.d.ts +0 -26
package/dist/upload.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as p } from "./Upload.vue_vue_type_script_setup_true_lang-D2gY_z-p.js";
2
- import { u as s } from "./useUploadCos-C4mpMNhT.js";
1
+ import { _ as p } from "./Upload.vue_vue_type_script_setup_true_lang-CY_Pk57x.js";
2
+ import { u as s } from "./useUploadCos-BVvRc0BW.js";
3
3
  export {
4
4
  p as Upload,
5
5
  s as useUploadCos
@@ -1,19 +1,6 @@
1
- import { ref as i } from "vue";
2
- import { c as u, g as p } from "./request-BkNyIDws.js";
3
- function f(o) {
4
- return u({
5
- url: `${p.authPrefixUrl}/apps/findOne`,
6
- method: "post",
7
- data: o
8
- });
9
- }
10
- function r() {
11
- return u({
12
- url: `${p.authPrefixUrl}/apps/authPageInfo`,
13
- method: "post"
14
- });
15
- }
16
- const e = i({
1
+ import { ref as n } from "vue";
2
+ import { c as u } from "./apiClients-CChPISR0.js";
3
+ const e = n({
17
4
  id: "",
18
5
  appKey: "",
19
6
  name: "",
@@ -85,23 +72,22 @@ const e = i({
85
72
  backgroundImageUrl: "",
86
73
  backgroundImage: "/66a0d5b35203890887f0e1a4/6714e2458fe86895bf3da8ae/1ef8ed72-1731-6e00-93d1-fa24165f1a3e.webp"
87
74
  }
88
- }), t = i(!1), n = i(!1);
89
- function d() {
90
- async function o(l) {
91
- t.value = !0, n.value = !1;
75
+ }), o = n(!1), t = n(!1);
76
+ function r() {
77
+ async function l(i) {
78
+ o.value = !0, t.value = !1;
92
79
  const {
93
80
  data: a
94
- } = await r();
95
- t.value = !1, a && (n.value = !0, e.value.id = a.id, e.value.appKey = a.appKey, e.value.name = a.name, e.value.description = a.description, e.value.homePageUrl = a.homePageUrl, e.value.applicationLogo = a.applicationLogo, e.value.applicationLogoUrl = a.applicationLogoUrl, e.value.publicRoutes = a.publicRoutes || [], e.value.oauth = a.oauth, e.value.authorizationCallback = a.authorizationCallback, e.value.aboutUs = a.aboutUs, e.value.brand = a.brand, l && l());
81
+ } = await u.apps.authPageInfo.post({});
82
+ o.value = !1, a && (t.value = !0, e.value.id = a.id, e.value.appKey = a.appKey, e.value.name = a.name, e.value.description = a.description, e.value.homePageUrl = a.homePageUrl, e.value.applicationLogo = a.applicationLogo, e.value.applicationLogoUrl = a.applicationLogoUrl, e.value.publicRoutes = a.publicRoutes || [], e.value.oauth = a.oauth, e.value.authorizationCallback = a.authorizationCallback, e.value.aboutUs = a.aboutUs, e.value.brand = a.brand, i && i());
96
83
  }
97
84
  return {
98
85
  appsData: e,
99
- appsAuthPageInfoApi: o,
100
- appsAuthPageInfoLoading: t,
101
- appsAuthPageInfoSuccess: n
86
+ appsAuthPageInfoApi: l,
87
+ appsAuthPageInfoLoading: o,
88
+ appsAuthPageInfoSuccess: t
102
89
  };
103
90
  }
104
91
  export {
105
- f as a,
106
- d as u
92
+ r as u
107
93
  };
@@ -1,5 +1,5 @@
1
- /* empty css */
2
- import "./request-BkNyIDws.js";
1
+ import "./index-96pA3ONI.js";
2
+ import "./apiClients-CChPISR0.js";
3
3
  import { Message as u } from "@arco-design/web-vue";
4
4
  import { ref as e } from "vue";
5
5
  function h(s) {
@@ -0,0 +1,174 @@
1
+ import { ref as t, readonly as P, computed as U } from "vue";
2
+ import { c as d } from "./apiClients-CChPISR0.js";
3
+ const u = t("signIn"), p = [], v = [], m = [], s = t(null);
4
+ function I() {
5
+ try {
6
+ const e = new URLSearchParams(window.location.search), n = e.get("token");
7
+ if (n) {
8
+ h(n);
9
+ const l = window.location.pathname;
10
+ window.history.replaceState({}, "", l);
11
+ const c = e.get("userId"), o = e.get("appId");
12
+ return p.forEach((g) => g({
13
+ jwtToken: n,
14
+ userId: c,
15
+ appId: o
16
+ })), !0;
17
+ }
18
+ } catch (e) {
19
+ console.warn("Failed to handle OAuth callback:", e);
20
+ }
21
+ return !1;
22
+ }
23
+ function b() {
24
+ if (I())
25
+ return !0;
26
+ try {
27
+ const e = localStorage.getItem("jwtToken");
28
+ if (e)
29
+ return s.value = e, !0;
30
+ } catch (e) {
31
+ console.warn("Failed to access localStorage:", e);
32
+ }
33
+ return !1;
34
+ }
35
+ function j() {
36
+ if (s.value)
37
+ return s.value;
38
+ try {
39
+ const e = localStorage.getItem("jwtToken");
40
+ return e && (s.value = e), e;
41
+ } catch (e) {
42
+ return console.warn("Failed to access localStorage:", e), null;
43
+ }
44
+ }
45
+ function h(e) {
46
+ s.value = e;
47
+ try {
48
+ localStorage.setItem("jwtToken", e);
49
+ } catch (n) {
50
+ console.warn("Failed to save token to localStorage:", n);
51
+ }
52
+ }
53
+ function A() {
54
+ s.value = null;
55
+ try {
56
+ localStorage.removeItem("jwtToken");
57
+ } catch (e) {
58
+ console.warn("Failed to clear localStorage:", e);
59
+ }
60
+ }
61
+ function C(e) {
62
+ p.push(e);
63
+ }
64
+ function F(e) {
65
+ v.push(e);
66
+ }
67
+ function L(e) {
68
+ m.push(e);
69
+ }
70
+ function V() {
71
+ const e = t(!1), n = t(!1), l = t(!1);
72
+ async function c(a) {
73
+ e.value = !0;
74
+ const {
75
+ data: r
76
+ } = await d.auth.signIn.post({
77
+ email: a.email,
78
+ password: a.password
79
+ });
80
+ e.value = !1, r && (h(r.jwtToken), p.forEach((f) => f(r)));
81
+ }
82
+ async function o(a) {
83
+ n.value = !0;
84
+ const {
85
+ error: r
86
+ } = await d.auth.signUp.post({
87
+ email: a.email,
88
+ userToken: a.userToken,
89
+ emailVerifyId: a.emailVerifyId,
90
+ password: a.password,
91
+ referrerId: a.referrerId
92
+ });
93
+ n.value = !1, r || (u.value = "signIn", v.forEach((f) => f()));
94
+ }
95
+ async function g(a) {
96
+ l.value = !0;
97
+ const {
98
+ error: r
99
+ } = await d.auth.resetPassword.post({
100
+ email: a.email,
101
+ userToken: a.userToken,
102
+ emailVerifyId: a.emailVerifyId,
103
+ password: a.password
104
+ });
105
+ l.value = !1, r || (u.value = "signIn", m.forEach((f) => f()));
106
+ }
107
+ function S() {
108
+ u.value = "signUp";
109
+ }
110
+ function y() {
111
+ u.value = "resetPassword";
112
+ }
113
+ function T() {
114
+ u.value = "signIn";
115
+ }
116
+ return {
117
+ signInSubmit: c,
118
+ signUpSubmit: o,
119
+ resetPasswordSubmit: g,
120
+ currentView: u,
121
+ authSignInLoading: e,
122
+ authSignUpLoading: n,
123
+ resetPasswordLoading: l,
124
+ switchSignUp: S,
125
+ switchResetPassword: y,
126
+ switchSignIn: T,
127
+ addSignInCallback: C,
128
+ addSignUpCallback: F,
129
+ addResetPasswordCallback: L,
130
+ // 简化的token管理
131
+ jwtToken: P(s),
132
+ getToken: j,
133
+ setToken: h,
134
+ initializeAuth: b,
135
+ clearAuth: A,
136
+ handleOAuthCallback: I
137
+ };
138
+ }
139
+ const i = t(null), k = t(!1), w = t(!1), E = U(() => !!i.value);
140
+ async function R() {
141
+ const {
142
+ getToken: e,
143
+ clearAuth: n
144
+ } = V();
145
+ if (!e()) {
146
+ console.warn("No authentication token found"), i.value = null;
147
+ return;
148
+ }
149
+ k.value = !0, w.value = !1;
150
+ const {
151
+ data: c,
152
+ error: o
153
+ } = await d.users.profile.post({});
154
+ k.value = !1, c ? (i.value = c, w.value = !0) : (i.value = null, w.value = !1, ((o == null ? void 0 : o.code) === 401 || (o == null ? void 0 : o.code) === 40101) && (console.warn("认证已过期,清除认证状态"), n()));
155
+ }
156
+ function O() {
157
+ i.value = null;
158
+ }
159
+ function N() {
160
+ return {
161
+ userProfile: i,
162
+ loading: k,
163
+ usersProfileSuccess: w,
164
+ isLoggedIn: E,
165
+ // 新增:基于userProfile的登录状态
166
+ fetchUserProfile: R,
167
+ clearUserProfile: O
168
+ // 新增:清除用户信息的方法
169
+ };
170
+ }
171
+ export {
172
+ N as a,
173
+ V as u
174
+ };
@@ -1,5 +1,5 @@
1
- /* empty css */
2
- import "./request-BkNyIDws.js";
1
+ import "./index-96pA3ONI.js";
2
+ import "./apiClients-CChPISR0.js";
3
3
  import { Message as v } from "@arco-design/web-vue";
4
4
  import { ref as n } from "vue";
5
5
  function g(l) {
@@ -0,0 +1,78 @@
1
+ import { ref as a, computed as L } from "vue";
2
+ import { o as c } from "./apiClients-CChPISR0.js";
3
+ function S(f = "system") {
4
+ const n = a(!0), d = a(""), i = a(!1), g = a(!1), o = a([]), t = a({
5
+ total: 0,
6
+ current: 1,
7
+ pageSize: 10
8
+ }), l = a(!1), u = a(!1), r = a("unread"), y = [{
9
+ label: "未读消息",
10
+ key: "unread"
11
+ }, {
12
+ label: "已读消息",
13
+ key: "read"
14
+ }], v = L(() => r.value === "read");
15
+ function A() {
16
+ n.value = !0;
17
+ }
18
+ function N(e) {
19
+ r.value = e, t.value.current = 1, s();
20
+ }
21
+ async function m(e) {
22
+ l.value = !0, await c.messageCenter.messageNotifications.read.post({
23
+ messageId: e
24
+ }), l.value = !1;
25
+ }
26
+ async function p(e) {
27
+ u.value = !0;
28
+ const {
29
+ error: w
30
+ } = await c.messageCenter.messageNotifications.readAll.post({
31
+ type: e
32
+ });
33
+ u.value = !1, w || s();
34
+ }
35
+ function b() {
36
+ o.value.length !== 0 && p(f);
37
+ }
38
+ async function s() {
39
+ i.value = !0;
40
+ const {
41
+ data: e
42
+ } = await c.messageCenter.messageNotifications.own.post({
43
+ current: t.value.current,
44
+ pageSize: t.value.pageSize,
45
+ where: {
46
+ read: v.value,
47
+ type: f
48
+ }
49
+ });
50
+ i.value = !1, e && (o.value = e.items, t.value.total = e.count, g.value = e.items.length < t.value.pageSize);
51
+ }
52
+ function h(e) {
53
+ d.value = e.id, n.value = !1, m(e.id);
54
+ }
55
+ return s(), {
56
+ isList: n,
57
+ id: d,
58
+ loading: i,
59
+ finished: g,
60
+ messageList: o,
61
+ pagination: t,
62
+ readLoading: l,
63
+ readAllLoading: u,
64
+ activeTab: r,
65
+ tabs: y,
66
+ read: v,
67
+ toList: A,
68
+ onTabChange: N,
69
+ messageNotificationsReadApi: m,
70
+ messageNotificationsReadAllApi: p,
71
+ readAll: b,
72
+ getData: s,
73
+ openDetails: h
74
+ };
75
+ }
76
+ export {
77
+ S as u
78
+ };
@@ -1,7 +1,7 @@
1
1
  import { ref as I, computed as d, watch as V, toValue as G, isRef as B, hasInjectionContext as F, inject as J, watchEffect as Q, getCurrentInstance as Z, onBeforeUnmount as X, onDeactivated as Y, onActivated as ee } from "vue";
2
2
  import { useRouter as x, useRoute as R } from "vue-router";
3
- import { u as U } from "./useAuthkitAppsAuthPageInfo-Bu-Q-44G.js";
4
- import { a as D } from "./useAuthkitUsersProfile-D58I5n2T.js";
3
+ import { u as U } from "./useAuthkitAppsAuthPageInfo-gn2zm_NY.js";
4
+ import { a as D } from "./useAuthkitUsersProfile-D32zPSn2.js";
5
5
  const v = I({
6
6
  key: "",
7
7
  name: ""
@@ -1,5 +1,5 @@
1
- /* empty css */
2
- import "./request-BkNyIDws.js";
1
+ import "./index-96pA3ONI.js";
2
+ import "./apiClients-CChPISR0.js";
3
3
  import { Message as O } from "@arco-design/web-vue";
4
4
  import { ref as t } from "vue";
5
5
  function A(r) {