@huyooo/ui 0.4.71 → 0.4.73

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 (41) hide show
  1. package/dist/{AuthkitAppSetting-CX3_9Jcg.js → AuthkitAuthModal-hVSE1o31.js} +1441 -1439
  2. package/dist/{AuthkitAuthorize-CA0jmnjq.js → AuthkitAuthorize-CcuxKyfx.js} +1 -1
  3. package/dist/{FeedbackItem-C5WqFEqH.js → FeedbackItem-BCMwNxsb.js} +1 -1
  4. package/dist/{FeedbackModal-BDPw2tu7.js → FeedbackModal-CmGPYo4h.js} +3 -2
  5. package/dist/{MessageHandle-BelPivb3.js → MessageHandle-DkNum5-u.js} +3 -2
  6. package/dist/{ReferrerReferees-BVj9o5kG.js → ReferrerReferees-BFMQJqqj.js} +1 -1
  7. package/dist/UserAccountMenu-CI6Yvfwe.js +610 -0
  8. package/dist/authkit.js +3 -3
  9. package/dist/common.d.ts +0 -14
  10. package/dist/common.js +13 -37
  11. package/dist/components/Authkit/Auth/AuthkitAuthorize.vue.d.ts +2 -2
  12. package/dist/components/Authkit/Auth/AuthkitOAuthItem.vue.d.ts +1 -1
  13. package/dist/components/Authkit/Auth/AuthkitOAuthList.vue.d.ts +1 -1
  14. package/dist/components/Authkit/Auth/AuthkitPasswordUpdateAndVerify.vue.d.ts +2 -2
  15. package/dist/components/Authkit/AuthkitAppSetting.vue.d.ts +2 -2
  16. package/dist/components/Authkit/AuthkitAuthModal.vue.d.ts +4 -4
  17. package/dist/components/Feedback/FeedbackBubbleEnd.vue.d.ts +1 -1
  18. package/dist/components/Feedback/FeedbackBubbleStart.vue.d.ts +1 -1
  19. package/dist/components/Feedback/FeedbackModal.vue.d.ts +2 -2
  20. package/dist/components/Gradientbackground.vue.d.ts +1 -1
  21. package/dist/components/Message/MessageAppMessage.vue.d.ts +2 -2
  22. package/dist/components/Message/MessageHandle.vue.d.ts +3 -3
  23. package/dist/components/Pay/PaySubscriptions.vue.d.ts +2 -2
  24. package/dist/components/User/UserBasicInformation.vue.d.ts +2 -2
  25. package/dist/components/User/UserPanel.vue.d.ts +18 -18
  26. package/dist/composables.d.ts +3 -2
  27. package/dist/composables.js +70 -19
  28. package/dist/feedback.js +2 -2
  29. package/dist/index.js +137 -151
  30. package/dist/main.d.ts +0 -4
  31. package/dist/message.js +1 -1
  32. package/dist/pay.js +1 -1
  33. package/dist/referrer.js +1 -1
  34. package/dist/style.css +1 -1
  35. package/dist/{useAuthkitUsersProfile-DNOB_Kuk.js → useAuthkitUsersProfile-CRLJnYMy.js} +62 -62
  36. package/dist/user.js +6 -7
  37. package/package.json +1 -1
  38. package/dist/UserAccountMenu-BD8F9vEK.js +0 -40
  39. package/dist/UserPanel-CaaTu1mu.js +0 -576
  40. package/dist/useActiveDoc-BWHkOJhJ.js +0 -39
  41. /package/dist/{PaySubscriptions-BRWvLeed.js → PaySubscriptions-l6VlqvBy.js} +0 -0
@@ -2,27 +2,61 @@ import { ref as u, readonly as S, computed as A } from "vue";
2
2
  import { api as a } from "@huyooo/api";
3
3
  import { g as n } from "./globalConfig-DZIhLe1R.js";
4
4
  function b(e) {
5
+ return console.log(n.authPrefixUrl, "globalConfig.authPrefixUrl"), a({
6
+ url: `${n.authPrefixUrl}/restfulApi/users/profile`,
7
+ method: "post",
8
+ data: e
9
+ });
10
+ }
11
+ function G(e) {
5
12
  return a({
6
- url: `${n.authPrefixUrl}/restfulApi/auth/signIn`,
13
+ url: `${n.authPrefixUrl}/restfulApi/users/update/baseInfo`,
14
+ method: "post",
15
+ data: e
16
+ });
17
+ }
18
+ function H(e) {
19
+ return a({
20
+ url: `${n.authPrefixUrl}/restfulApi/users/update/email`,
21
+ method: "post",
22
+ data: e
23
+ });
24
+ }
25
+ function J(e) {
26
+ return a({
27
+ url: `${n.authPrefixUrl}/restfulApi/users/update/password`,
7
28
  method: "post",
8
29
  data: e
9
30
  });
10
31
  }
32
+ function K() {
33
+ return a({
34
+ url: `${n.authPrefixUrl}/restfulApi/users//unbind/email`,
35
+ method: "post"
36
+ });
37
+ }
11
38
  function T(e) {
12
39
  return a({
13
- url: `${n.authPrefixUrl}/restfulApi/auth/resetPassword`,
40
+ url: `${n.authPrefixUrl}/restfulApi/auth/signIn`,
14
41
  method: "post",
15
42
  data: e
16
43
  });
17
44
  }
18
45
  function x(e) {
46
+ return a({
47
+ url: `${n.authPrefixUrl}/restfulApi/auth/resetPassword`,
48
+ method: "post",
49
+ data: e
50
+ });
51
+ }
52
+ function y(e) {
19
53
  return a({
20
54
  url: `${n.authPrefixUrl}/restfulApi/auth/signUp`,
21
55
  method: "post",
22
56
  data: e
23
57
  });
24
58
  }
25
- function G(e) {
59
+ function M(e) {
26
60
  return a({
27
61
  url: `${n.authPrefixUrl}/restfulApi/oauth2/authorize`,
28
62
  method: "post",
@@ -30,7 +64,7 @@ function G(e) {
30
64
  });
31
65
  }
32
66
  const c = u("signIn"), g = [], m = [], w = [], i = u(null);
33
- function y() {
67
+ function $() {
34
68
  try {
35
69
  const e = localStorage.getItem("jwtToken");
36
70
  if (e)
@@ -40,7 +74,7 @@ function y() {
40
74
  }
41
75
  return !1;
42
76
  }
43
- function $() {
77
+ function C() {
44
78
  if (i.value)
45
79
  return i.value;
46
80
  try {
@@ -58,7 +92,7 @@ function p(e) {
58
92
  console.warn("Failed to save token to localStorage:", l);
59
93
  }
60
94
  }
61
- function C() {
95
+ function j() {
62
96
  i.value = null;
63
97
  try {
64
98
  localStorage.removeItem("jwtToken");
@@ -66,19 +100,19 @@ function C() {
66
100
  console.warn("Failed to clear localStorage:", e);
67
101
  }
68
102
  }
69
- function j(e) {
103
+ function E(e) {
70
104
  g.push(e);
71
105
  }
72
- function E(e) {
106
+ function V(e) {
73
107
  m.push(e);
74
108
  }
75
- function V(e) {
109
+ function F(e) {
76
110
  w.push(e);
77
111
  }
78
- function F() {
112
+ function L() {
79
113
  const e = u(!1), l = u(!1), f = u(!1);
80
114
  function h(r) {
81
- e.value = !0, b({
115
+ e.value = !0, T({
82
116
  email: r.email,
83
117
  password: r.password
84
118
  }).then(({
@@ -90,7 +124,7 @@ function F() {
90
124
  });
91
125
  }
92
126
  function o(r) {
93
- l.value = !0, x({
127
+ l.value = !0, y({
94
128
  email: r.email,
95
129
  userToken: r.userToken,
96
130
  emailVerifyId: r.emailVerifyId,
@@ -103,7 +137,7 @@ function F() {
103
137
  });
104
138
  }
105
139
  function v(r) {
106
- f.value = !0, T({
140
+ f.value = !0, x({
107
141
  email: r.email,
108
142
  userToken: r.userToken,
109
143
  emailVerifyId: r.emailVerifyId,
@@ -134,58 +168,24 @@ function F() {
134
168
  switchSignUp: k,
135
169
  switchResetPassword: U,
136
170
  switchSignIn: P,
137
- addSignInCallback: j,
138
- addSignUpCallback: E,
139
- addResetPasswordCallback: V,
171
+ addSignInCallback: E,
172
+ addSignUpCallback: V,
173
+ addResetPasswordCallback: F,
140
174
  // 简化的token管理
141
175
  jwtToken: S(i),
142
- getToken: $,
176
+ getToken: C,
143
177
  setToken: p,
144
- initializeAuth: y,
145
- clearAuth: C
178
+ initializeAuth: $,
179
+ clearAuth: j
146
180
  };
147
181
  }
148
- function L(e) {
149
- return console.log(n.authPrefixUrl, "globalConfig.authPrefixUrl"), a({
150
- url: `${n.authPrefixUrl}/restfulApi/users/profile`,
151
- method: "post",
152
- data: e
153
- });
154
- }
155
- function H(e) {
156
- return a({
157
- url: `${n.authPrefixUrl}/restfulApi/users/update/baseInfo`,
158
- method: "post",
159
- data: e
160
- });
161
- }
162
- function J(e) {
163
- return a({
164
- url: `${n.authPrefixUrl}/restfulApi/users/update/email`,
165
- method: "post",
166
- data: e
167
- });
168
- }
169
- function K(e) {
170
- return a({
171
- url: `${n.authPrefixUrl}/restfulApi/users/update/password`,
172
- method: "post",
173
- data: e
174
- });
175
- }
176
- function M() {
177
- return a({
178
- url: `${n.authPrefixUrl}/restfulApi/users//unbind/email`,
179
- method: "post"
180
- });
181
- }
182
182
  const s = u(null), d = u(!1), z = A(() => !!s.value);
183
183
  async function R() {
184
184
  var h;
185
185
  const {
186
186
  getToken: e,
187
187
  clearAuth: l
188
- } = F();
188
+ } = L();
189
189
  if (!e()) {
190
190
  console.warn("No authentication token found"), s.value = null;
191
191
  return;
@@ -194,7 +194,7 @@ async function R() {
194
194
  try {
195
195
  const {
196
196
  data: o
197
- } = await L();
197
+ } = await b();
198
198
  o ? s.value = o : (console.warn("获取用户资料返回空数据"), s.value = null);
199
199
  } catch (o) {
200
200
  console.error("获取用户资料失败:", o), ((h = o == null ? void 0 : o.response) == null ? void 0 : h.status) === 401 && (console.warn("认证已过期,清除认证状态"), l()), s.value = null;
@@ -218,11 +218,11 @@ function O() {
218
218
  }
219
219
  export {
220
220
  O as a,
221
- L as b,
222
- H as c,
223
- K as d,
224
- J as e,
225
- M as f,
226
- G as o,
227
- F as u
221
+ b,
222
+ G as c,
223
+ J as d,
224
+ H as e,
225
+ K as f,
226
+ M as o,
227
+ L as u
228
228
  };
package/dist/user.js CHANGED
@@ -1,10 +1,9 @@
1
- import { b as r, c as e, a as o, U as n, S as t } from "./UserPanel-CaaTu1mu.js";
2
- import { U as c } from "./UserAccountMenu-BD8F9vEK.js";
1
+ import { d as r, U as e, a as n, b as o, c as t, S as U } from "./UserAccountMenu-CI6Yvfwe.js";
3
2
  export {
4
- c as UserAccountMenu,
5
- r as UserAvatar,
6
- e as UserBasicInformation,
3
+ r as UserAccountMenu,
4
+ e as UserAvatar,
5
+ n as UserBasicInformation,
7
6
  o as UserButton,
8
- n as UserPanel,
9
- t as UserSubscriptionBaseInformation
7
+ t as UserPanel,
8
+ U as UserSubscriptionBaseInformation
10
9
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huyooo/ui",
3
- "version": "0.4.71",
3
+ "version": "0.4.73",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [
@@ -1,40 +0,0 @@
1
- import { defineComponent as _, createElementBlock as d, openBlock as m, createElementVNode as e, renderSlot as u, toDisplayString as r, unref as o, createVNode as p } from "vue";
2
- import { Icon as f } from "@iconify/vue";
3
- import { a as v } from "./useAuthkitUsersProfile-DNOB_Kuk.js";
4
- import { _ as h } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- const k = {
6
- class: "UserAccountMenu"
7
- }, w = {
8
- class: "avatar"
9
- }, A = {
10
- class: "meta"
11
- }, C = {
12
- class: "name"
13
- }, U = {
14
- class: "email"
15
- }, M = /* @__PURE__ */ _({
16
- __name: "UserAccountMenu",
17
- emits: ["arrowClick"],
18
- setup(x, {
19
- emit: n
20
- }) {
21
- const {
22
- userProfile: t
23
- } = v(), i = n;
24
- function a() {
25
- i("arrowClick");
26
- }
27
- return (l, B) => {
28
- var s, c;
29
- return m(), d("div", k, [e("div", w, [u(l.$slots, "avatar", {}, void 0, !0)]), e("div", A, [e("div", C, r(((s = o(t)) == null ? void 0 : s.nickname) || ""), 1), e("div", U, r(((c = o(t)) == null ? void 0 : c.email) || ""), 1)]), e("div", {
30
- class: "arrow",
31
- onClick: a
32
- }, [p(o(f), {
33
- icon: "lucide:chevrons-up-down"
34
- })])]);
35
- };
36
- }
37
- }), S = /* @__PURE__ */ h(M, [["__scopeId", "data-v-b801e222"]]);
38
- export {
39
- S as U
40
- };