@huyooo/ui 0.4.73 → 0.4.74

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 (33) hide show
  1. package/dist/{AuthkitAuthModal-hVSE1o31.js → AuthkitAuthModal-A8HqP1Bw.js} +2 -2
  2. package/dist/{AuthkitAuthorize-CcuxKyfx.js → AuthkitAuthorize-BlEC4PlY.js} +2 -2
  3. package/dist/{FeedbackItem-BCMwNxsb.js → FeedbackItem-B_EUApFA.js} +1 -1
  4. package/dist/{FeedbackModal-CmGPYo4h.js → FeedbackModal-D1htK7xY.js} +31 -31
  5. package/dist/{ReferrerReferees-BFMQJqqj.js → ReferrerReferees-BclAtmgX.js} +1 -1
  6. package/dist/{UserAccountMenu-CI6Yvfwe.js → UserAccountMenu-C7LQIjwT.js} +5 -5
  7. package/dist/authkit.js +4 -4
  8. package/dist/components/Authkit/Auth/AuthkitAuthContainer.vue.d.ts +1 -1
  9. package/dist/components/Authkit/Auth/AuthkitAuthorize.vue.d.ts +1 -1
  10. package/dist/components/Authkit/Auth/AuthkitOAuthList.vue.d.ts +1 -1
  11. package/dist/components/Authkit/Auth/AuthkitPasswordUpdateAndVerify.vue.d.ts +2 -2
  12. package/dist/components/Authkit/AuthkitAppSetting.vue.d.ts +2 -2
  13. package/dist/components/Authkit/AuthkitAuthModal.vue.d.ts +2 -2
  14. package/dist/components/Feedback/FeedbackBubbleEnd.vue.d.ts +2 -2
  15. package/dist/components/Feedback/FeedbackBubbleStart.vue.d.ts +2 -2
  16. package/dist/components/Feedback/FeedbackModal.vue.d.ts +2 -2
  17. package/dist/components/LandingPage/LandingPageContact.vue.d.ts +2 -2
  18. package/dist/components/Message/MessageAppMessage.vue.d.ts +2 -2
  19. package/dist/components/Message/MessageHandle.vue.d.ts +3 -3
  20. package/dist/components/Pay/PaySubscriptions.vue.d.ts +2 -2
  21. package/dist/components/User/UserBasicInformation.vue.d.ts +2 -2
  22. package/dist/components/User/UserPanel.vue.d.ts +15 -15
  23. package/dist/composables.js +20 -69
  24. package/dist/feedback.js +2 -2
  25. package/dist/index.js +154 -145
  26. package/dist/main.d.ts +1 -0
  27. package/dist/referrer.js +1 -1
  28. package/dist/style.css +1 -1
  29. package/dist/{useAuthkitAuthModal-hxivJw_U.js → useAuthkitAppsAuthPageInfo-COeq29Tn.js} +13 -13
  30. package/dist/{useAuthkitUsersProfile-CRLJnYMy.js → useAuthkitUsersProfile-DNOB_Kuk.js} +62 -62
  31. package/dist/user.js +1 -1
  32. package/dist/viewTransitions-C-ZLwiJ0.js +55 -0
  33. package/package.json +1 -1
@@ -1,14 +1,20 @@
1
1
  import { ref as t } from "vue";
2
2
  import { api as i } from "@huyooo/api";
3
3
  import { g as r } from "./globalConfig-DZIhLe1R.js";
4
- function f(a) {
4
+ const l = t(!1);
5
+ function f() {
6
+ return {
7
+ show: l
8
+ };
9
+ }
10
+ function g(a) {
5
11
  return i({
6
12
  url: `${r.authPrefixUrl}/restfulApi/apps/findOne`,
7
13
  method: "post",
8
14
  data: a
9
15
  });
10
16
  }
11
- function l() {
17
+ function p() {
12
18
  return i({
13
19
  url: `${r.authPrefixUrl}/restfulApi/apps/authPageInfo`,
14
20
  method: "post"
@@ -86,9 +92,9 @@ const o = t({
86
92
  backgroundImage: "/66a0d5b35203890887f0e1a4/6714e2458fe86895bf3da8ae/1ef8ed72-1731-6e00-93d1-fa24165f1a3e.webp"
87
93
  }
88
94
  });
89
- function g() {
95
+ function h() {
90
96
  function a(n) {
91
- l().then(({
97
+ p().then(({
92
98
  data: e
93
99
  }) => {
94
100
  o.value.id = e.id, o.value.appKey = e.appKey, o.value.name = e.name, o.value.description = e.description, o.value.homePageUrl = e.homePageUrl, o.value.applicationLogo = e.applicationLogo, o.value.applicationLogoUrl = e.applicationLogoUrl, o.value.oauth = e.oauth, o.value.authorizationCallback = e.authorizationCallback, o.value.aboutUs = e.aboutUs, o.value.brand = e.brand, n && n();
@@ -101,14 +107,8 @@ function g() {
101
107
  appsAuthPageInfoApi: a
102
108
  };
103
109
  }
104
- const p = t(!1);
105
- function h() {
106
- return {
107
- show: p
108
- };
109
- }
110
110
  export {
111
- g as U,
112
- f as a,
113
- h as u
111
+ h as U,
112
+ g as a,
113
+ f as u
114
114
  };
@@ -2,61 +2,27 @@ 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) {
12
- return a({
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`,
28
- method: "post",
29
- data: e
30
- });
31
- }
32
- function K() {
33
- return a({
34
- url: `${n.authPrefixUrl}/restfulApi/users//unbind/email`,
35
- method: "post"
36
- });
37
- }
38
- function T(e) {
39
5
  return a({
40
6
  url: `${n.authPrefixUrl}/restfulApi/auth/signIn`,
41
7
  method: "post",
42
8
  data: e
43
9
  });
44
10
  }
45
- function x(e) {
11
+ function T(e) {
46
12
  return a({
47
13
  url: `${n.authPrefixUrl}/restfulApi/auth/resetPassword`,
48
14
  method: "post",
49
15
  data: e
50
16
  });
51
17
  }
52
- function y(e) {
18
+ function x(e) {
53
19
  return a({
54
20
  url: `${n.authPrefixUrl}/restfulApi/auth/signUp`,
55
21
  method: "post",
56
22
  data: e
57
23
  });
58
24
  }
59
- function M(e) {
25
+ function G(e) {
60
26
  return a({
61
27
  url: `${n.authPrefixUrl}/restfulApi/oauth2/authorize`,
62
28
  method: "post",
@@ -64,7 +30,7 @@ function M(e) {
64
30
  });
65
31
  }
66
32
  const c = u("signIn"), g = [], m = [], w = [], i = u(null);
67
- function $() {
33
+ function y() {
68
34
  try {
69
35
  const e = localStorage.getItem("jwtToken");
70
36
  if (e)
@@ -74,7 +40,7 @@ function $() {
74
40
  }
75
41
  return !1;
76
42
  }
77
- function C() {
43
+ function $() {
78
44
  if (i.value)
79
45
  return i.value;
80
46
  try {
@@ -92,7 +58,7 @@ function p(e) {
92
58
  console.warn("Failed to save token to localStorage:", l);
93
59
  }
94
60
  }
95
- function j() {
61
+ function C() {
96
62
  i.value = null;
97
63
  try {
98
64
  localStorage.removeItem("jwtToken");
@@ -100,19 +66,19 @@ function j() {
100
66
  console.warn("Failed to clear localStorage:", e);
101
67
  }
102
68
  }
103
- function E(e) {
69
+ function j(e) {
104
70
  g.push(e);
105
71
  }
106
- function V(e) {
72
+ function E(e) {
107
73
  m.push(e);
108
74
  }
109
- function F(e) {
75
+ function V(e) {
110
76
  w.push(e);
111
77
  }
112
- function L() {
78
+ function F() {
113
79
  const e = u(!1), l = u(!1), f = u(!1);
114
80
  function h(r) {
115
- e.value = !0, T({
81
+ e.value = !0, b({
116
82
  email: r.email,
117
83
  password: r.password
118
84
  }).then(({
@@ -124,7 +90,7 @@ function L() {
124
90
  });
125
91
  }
126
92
  function o(r) {
127
- l.value = !0, y({
93
+ l.value = !0, x({
128
94
  email: r.email,
129
95
  userToken: r.userToken,
130
96
  emailVerifyId: r.emailVerifyId,
@@ -137,7 +103,7 @@ function L() {
137
103
  });
138
104
  }
139
105
  function v(r) {
140
- f.value = !0, x({
106
+ f.value = !0, T({
141
107
  email: r.email,
142
108
  userToken: r.userToken,
143
109
  emailVerifyId: r.emailVerifyId,
@@ -168,24 +134,58 @@ function L() {
168
134
  switchSignUp: k,
169
135
  switchResetPassword: U,
170
136
  switchSignIn: P,
171
- addSignInCallback: E,
172
- addSignUpCallback: V,
173
- addResetPasswordCallback: F,
137
+ addSignInCallback: j,
138
+ addSignUpCallback: E,
139
+ addResetPasswordCallback: V,
174
140
  // 简化的token管理
175
141
  jwtToken: S(i),
176
- getToken: C,
142
+ getToken: $,
177
143
  setToken: p,
178
- initializeAuth: $,
179
- clearAuth: j
144
+ initializeAuth: y,
145
+ clearAuth: C
180
146
  };
181
147
  }
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
- } = L();
188
+ } = F();
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 b();
197
+ } = await L();
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
- 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
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
228
228
  };
package/dist/user.js CHANGED
@@ -1,4 +1,4 @@
1
- import { d as r, U as e, a as n, b as o, c as t, S as U } from "./UserAccountMenu-CI6Yvfwe.js";
1
+ import { d as r, U as e, a as n, b as o, c as t, S as U } from "./UserAccountMenu-C7LQIjwT.js";
2
2
  export {
3
3
  r as UserAccountMenu,
4
4
  e as UserAvatar,
@@ -0,0 +1,55 @@
1
+ /* empty css */
2
+ /* empty css */
3
+ import { Message as u } from "@arco-design/web-vue";
4
+ import { ref as s } from "vue";
5
+ function y(e) {
6
+ const t = s(!1), n = s(), o = s(!1), a = s(""), i = s("");
7
+ function l(r) {
8
+ u.success(r), o.value = !1, t.value = !1, e("confirm");
9
+ }
10
+ function f() {
11
+ o.value = !1, console.log("handleClose"), e("cancel");
12
+ }
13
+ return {
14
+ loading: t,
15
+ formRef: n,
16
+ submitSuccess: l,
17
+ modelType: a,
18
+ changeType: i,
19
+ show: o,
20
+ handleCancel: f
21
+ };
22
+ }
23
+ const c = s({
24
+ key: "",
25
+ name: ""
26
+ });
27
+ function h() {
28
+ function e(t, n) {
29
+ c.value.key = t, c.value.name = n;
30
+ }
31
+ return {
32
+ activeDoc: c,
33
+ setActiveDoc: e
34
+ };
35
+ }
36
+ function w(e, t = "default") {
37
+ const n = document;
38
+ if (n && typeof n.startViewTransition == "function") {
39
+ const o = document.body;
40
+ o.classList.add(`vt-${t}`), n.startViewTransition(() => {
41
+ try {
42
+ e();
43
+ } catch {
44
+ }
45
+ }).finished.finally(() => {
46
+ o.classList.remove(`vt-${t}`);
47
+ });
48
+ } else
49
+ e();
50
+ }
51
+ export {
52
+ h as a,
53
+ y as u,
54
+ w
55
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huyooo/ui",
3
- "version": "0.4.73",
3
+ "version": "0.4.74",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [