@huyooo/ui 0.5.24 → 0.5.26

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/{AuthkitAuthModal-BdVB7Kz7.js → AuthkitAuthModal-_jUbPMfY.js} +482 -517
  2. package/dist/{AuthkitAuthorize-bzCh_YJp.js → AuthkitAuthorize-wqXxP_K2.js} +2 -2
  3. package/dist/{Clipboard-Bful1lNJ.js → Clipboard-CIWjWQOZ.js} +2 -3
  4. package/dist/{Contact-DNiynQXl.js → Contact-BYK4A8LY.js} +2 -2
  5. package/dist/{FeedbackItem-DFCuTCaI.js → FeedbackItem-CFst7U0_.js} +3 -3
  6. package/dist/{FeedbackModal-BGXr3jPm.js → FeedbackModal-Cgc59WUD.js} +5 -6
  7. package/dist/LandingPageSectionTabs-BdtJ_ajh.js +47484 -0
  8. package/dist/{MessageHandle-De7eLBi_.js → MessageHandle-BnkgjTdM.js} +16 -16
  9. package/dist/{PaySubscriptions-77rXNTOt.js → PaySubscriptions-x4b3a-nG.js} +8 -8
  10. package/dist/{ReferrerReferees-DCALYxND.js → ReferrerReferees-CyOeIbwr.js} +7 -7
  11. package/dist/{Upload.vue_vue_type_script_setup_true_lang-9HB-tLZd.js → Upload.vue_vue_type_script_setup_true_lang-D7mv66o9.js} +2 -2
  12. package/dist/{UserAccountMenu-ul2FbWYe.js → UserAccountMenu-DgfGUlvA.js} +11 -12
  13. package/dist/{WidthContainer-DmwEcM3F.js → WidthContainer-CERr6Dzf.js} +24 -27
  14. package/dist/auth-DtA2gxxa.js +178 -0
  15. package/dist/authkit.js +6 -6
  16. package/dist/common.js +1 -1
  17. package/dist/composables.js +30 -31
  18. package/dist/feedback.js +3 -3
  19. package/dist/index.js +615 -699
  20. package/dist/landingPage.js +1 -1
  21. package/dist/message.js +2 -2
  22. package/dist/pay.js +1 -1
  23. package/dist/privateCom.js +1 -1
  24. package/dist/referrer.js +1 -1
  25. package/dist/style.css +1 -1
  26. package/dist/upload.js +2 -2
  27. package/dist/{useAuthkitAppsAuthPageInfo-Dyjhw7qb.js → useAuthkitAppsAuthPageInfo-C1IsAlcM.js} +1 -1
  28. package/dist/useAuthkitCreateAndUpdate-BpTxxKc0.js +24 -0
  29. package/dist/useAuthkitUsersProfile-DNYZ87Bt.js +198 -0
  30. package/dist/{useDownloads-DnMYa52H.js → useDownloads-BpQUd6AV.js} +4 -5
  31. package/dist/{useMessageNotifications-DSRanuRe.js → useMessageNotifications-CHgy0HWC.js} +8 -8
  32. package/dist/{useSEO-BKJkX1nG.js → useSEO-BGk6cyAs.js} +2 -2
  33. package/dist/{useTableHandle-DKUIdSSh.js → useTableHandle-DujKY4Bl.js} +14 -15
  34. package/dist/{useUploadCos-D5k1YLb7.js → useUploadCos-BMEbLTPK.js} +1 -1
  35. package/dist/user.js +1 -1
  36. package/package.json +1 -1
  37. package/dist/LandingPageSectionTabs-BrAxO3Ad.js +0 -29013
  38. package/dist/globalConfig-C1YOJcxa.js +0 -22
  39. package/dist/useAuthkitAuthModal-BpOmabWi.js +0 -10
  40. package/dist/useAuthkitCreateAndUpdate-BpPW409v.js +0 -25
  41. package/dist/useAuthkitUsersProfile-zbKT0W_h.js +0 -237
package/dist/upload.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as p } from "./Upload.vue_vue_type_script_setup_true_lang-9HB-tLZd.js";
2
- import { u as s } from "./useUploadCos-D5k1YLb7.js";
1
+ import { _ as p } from "./Upload.vue_vue_type_script_setup_true_lang-D7mv66o9.js";
2
+ import { u as s } from "./useUploadCos-BMEbLTPK.js";
3
3
  export {
4
4
  p as Upload,
5
5
  s as useUploadCos
@@ -1,5 +1,5 @@
1
1
  import { ref as l } from "vue";
2
- import { g as u } from "./globalConfig-C1YOJcxa.js";
2
+ import { g as u } from "./auth-DtA2gxxa.js";
3
3
  import { api as p } from "@huyooo/api";
4
4
  function g(t) {
5
5
  return p({
@@ -0,0 +1,24 @@
1
+ /* empty css */
2
+ import { Message as r } from "@arco-design/web-vue";
3
+ import { ref as e } from "vue";
4
+ function d(s) {
5
+ const n = e(!1), a = e(), o = e(!1), c = e(""), l = e("");
6
+ function t(u) {
7
+ r.success(u), o.value = !1, n.value = !1, s("confirm");
8
+ }
9
+ function f() {
10
+ o.value = !1, console.log("handleClose"), s("cancel");
11
+ }
12
+ return {
13
+ loading: n,
14
+ formRef: a,
15
+ submitSuccess: t,
16
+ modelType: c,
17
+ changeType: l,
18
+ show: o,
19
+ handleCancel: f
20
+ };
21
+ }
22
+ export {
23
+ d as u
24
+ };
@@ -0,0 +1,198 @@
1
+ import { ref as l, readonly as b, computed as T } from "vue";
2
+ import { c as y, d as A, e as x, g as i } from "./auth-DtA2gxxa.js";
3
+ import { api as d } from "@huyooo/api";
4
+ const u = l("signIn"), v = [], m = [], w = [], t = l(null);
5
+ function C() {
6
+ try {
7
+ const e = localStorage.getItem("jwtToken");
8
+ if (e)
9
+ return t.value = e, !0;
10
+ } catch (e) {
11
+ console.warn("Failed to access localStorage:", e);
12
+ }
13
+ return !1;
14
+ }
15
+ function j() {
16
+ if (t.value)
17
+ return t.value;
18
+ try {
19
+ const e = localStorage.getItem("jwtToken");
20
+ return e && (t.value = e), e;
21
+ } catch (e) {
22
+ return console.warn("Failed to access localStorage:", e), null;
23
+ }
24
+ }
25
+ function p(e) {
26
+ t.value = e;
27
+ try {
28
+ localStorage.setItem("jwtToken", e);
29
+ } catch (o) {
30
+ console.warn("Failed to save token to localStorage:", o);
31
+ }
32
+ }
33
+ function E() {
34
+ t.value = null;
35
+ try {
36
+ localStorage.removeItem("jwtToken");
37
+ } catch (e) {
38
+ console.warn("Failed to clear localStorage:", e);
39
+ }
40
+ }
41
+ function V(e) {
42
+ v.push(e);
43
+ }
44
+ function $(e) {
45
+ m.push(e);
46
+ }
47
+ function F(e) {
48
+ w.push(e);
49
+ }
50
+ function L() {
51
+ const e = l(!1), o = l(!1), c = l(!1);
52
+ function h(a) {
53
+ e.value = !0, x({
54
+ email: a.email,
55
+ password: a.password
56
+ }).then(({
57
+ data: r
58
+ }) => {
59
+ e.value = !1, p(r.jwtToken), v.forEach((S) => S(r));
60
+ }).catch((r) => {
61
+ e.value = !1, console.error("登录失败:", r);
62
+ });
63
+ }
64
+ function n(a) {
65
+ o.value = !0, A({
66
+ email: a.email,
67
+ userToken: a.userToken,
68
+ emailVerifyId: a.emailVerifyId,
69
+ password: a.password,
70
+ referrerId: a.referrerId
71
+ }).then(() => {
72
+ o.value = !1, u.value = "signIn", m.forEach((r) => r());
73
+ }).catch((r) => {
74
+ o.value = !1, console.error("注册失败:", r);
75
+ });
76
+ }
77
+ function k(a) {
78
+ c.value = !0, y({
79
+ email: a.email,
80
+ userToken: a.userToken,
81
+ emailVerifyId: a.emailVerifyId,
82
+ password: a.password
83
+ }).then(() => {
84
+ c.value = !1, u.value = "signIn", w.forEach((r) => r());
85
+ }).catch((r) => {
86
+ c.value = !1, console.error("重置密码失败:", r);
87
+ });
88
+ }
89
+ function I() {
90
+ u.value = "signUp";
91
+ }
92
+ function P() {
93
+ u.value = "resetPassword";
94
+ }
95
+ function U() {
96
+ u.value = "signIn";
97
+ }
98
+ return {
99
+ signInSubmit: h,
100
+ signUpSubmit: n,
101
+ resetPasswordSubmit: k,
102
+ currentView: u,
103
+ authSignInLoading: e,
104
+ authSignUpLoading: o,
105
+ resetPasswordLoading: c,
106
+ switchSignUp: I,
107
+ switchResetPassword: P,
108
+ switchSignIn: U,
109
+ addSignInCallback: V,
110
+ addSignUpCallback: $,
111
+ addResetPasswordCallback: F,
112
+ // 简化的token管理
113
+ jwtToken: b(t),
114
+ getToken: j,
115
+ setToken: p,
116
+ initializeAuth: C,
117
+ clearAuth: E
118
+ };
119
+ }
120
+ function R(e) {
121
+ return console.log(i.authPrefixUrl, "globalConfig.authPrefixUrl"), d({
122
+ url: `${i.authPrefixUrl}/restfulApi/users/profile`,
123
+ method: "post",
124
+ data: e
125
+ });
126
+ }
127
+ function H(e) {
128
+ return d({
129
+ url: `${i.authPrefixUrl}/restfulApi/users/update/baseInfo`,
130
+ method: "post",
131
+ data: e
132
+ });
133
+ }
134
+ function J(e) {
135
+ return d({
136
+ url: `${i.authPrefixUrl}/restfulApi/users/update/email`,
137
+ method: "post",
138
+ data: e
139
+ });
140
+ }
141
+ function K(e) {
142
+ return d({
143
+ url: `${i.authPrefixUrl}/restfulApi/users/update/password`,
144
+ method: "post",
145
+ data: e
146
+ });
147
+ }
148
+ function M() {
149
+ return d({
150
+ url: `${i.authPrefixUrl}/restfulApi/users//unbind/email`,
151
+ method: "post"
152
+ });
153
+ }
154
+ const s = l(null), g = l(!1), f = l(!1), z = T(() => !!s.value);
155
+ async function B() {
156
+ var h;
157
+ const {
158
+ getToken: e,
159
+ clearAuth: o
160
+ } = L();
161
+ if (!e()) {
162
+ console.warn("No authentication token found"), s.value = null;
163
+ return;
164
+ }
165
+ g.value = !0, f.value = !1;
166
+ try {
167
+ const {
168
+ data: n
169
+ } = await R();
170
+ g.value = !1, n ? (s.value = n, f.value = !0) : (console.warn("获取用户资料返回空数据"), s.value = null, f.value = !1);
171
+ } catch (n) {
172
+ g.value = !1, f.value = !1, console.error("获取用户资料失败:", n), ((h = n == null ? void 0 : n.response) == null ? void 0 : h.status) === 401 && (console.warn("认证已过期,清除认证状态"), o()), s.value = null;
173
+ }
174
+ }
175
+ function N() {
176
+ s.value = null;
177
+ }
178
+ function O() {
179
+ return {
180
+ userProfile: s,
181
+ loading: g,
182
+ usersProfileSuccess: f,
183
+ isLoggedIn: z,
184
+ // 新增:基于userProfile的登录状态
185
+ fetchUserProfile: B,
186
+ clearUserProfile: N
187
+ // 新增:清除用户信息的方法
188
+ };
189
+ }
190
+ export {
191
+ O as a,
192
+ R as b,
193
+ H as c,
194
+ K as d,
195
+ J as e,
196
+ M as f,
197
+ L as u
198
+ };
@@ -1,8 +1,7 @@
1
1
  /* empty css */
2
- /* empty css */
3
2
  import { Message as v } from "@arco-design/web-vue";
4
3
  import { ref as n } from "vue";
5
- function g(l) {
4
+ function m(l) {
6
5
  const s = n(!1), r = n(), a = n(!1), d = n(""), f = n("");
7
6
  function e(o) {
8
7
  v.success(o), a.value = !1, s.value = !1, l("confirm");
@@ -21,7 +20,7 @@ function g(l) {
21
20
  };
22
21
  }
23
22
  let u = null, i = "", t = null;
24
- function D() {
23
+ function g() {
25
24
  const l = n([]), s = n(!1), r = n(""), a = n("");
26
25
  async function d({
27
26
  versionApi: f
@@ -68,6 +67,6 @@ function D() {
68
67
  };
69
68
  }
70
69
  export {
71
- D as a,
72
- g as u
70
+ g as a,
71
+ m as u
73
72
  };
@@ -1,23 +1,23 @@
1
1
  import { ref as a, computed as x } from "vue";
2
- import { api as c } from "@huyooo/api";
3
- import { g } from "./globalConfig-C1YOJcxa.js";
2
+ import { g as c } from "./auth-DtA2gxxa.js";
3
+ import { api as g } from "@huyooo/api";
4
4
  function z(t) {
5
- return c({
6
- url: `${g.prefixUrl}/restfulApi/messageCenter/messageNotifications/find`,
5
+ return g({
6
+ url: `${c.prefixUrl}/restfulApi/messageCenter/messageNotifications/find`,
7
7
  method: "post",
8
8
  data: t
9
9
  });
10
10
  }
11
11
  function R(t) {
12
- return c({
13
- url: `${g.prefixUrl}/restfulApi/messageCenter/messageNotifications/read`,
12
+ return g({
13
+ url: `${c.prefixUrl}/restfulApi/messageCenter/messageNotifications/read`,
14
14
  method: "post",
15
15
  data: t
16
16
  });
17
17
  }
18
18
  function S(t) {
19
- return c({
20
- url: `${g.prefixUrl}/restfulApi/messageCenter/messageNotifications/readAll`,
19
+ return g({
20
+ url: `${c.prefixUrl}/restfulApi/messageCenter/messageNotifications/readAll`,
21
21
  method: "post",
22
22
  data: t
23
23
  });
@@ -1,7 +1,7 @@
1
1
  import { ref as M, computed as h, watch as V, toValue as z, isRef as N, hasInjectionContext as G, inject as W, watchEffect as B, getCurrentInstance as F, onBeforeUnmount as J, onDeactivated as Q, onActivated as Z } from "vue";
2
2
  import { useRouter as _, useRoute as x } from "vue-router";
3
- import { u as R } from "./useAuthkitAppsAuthPageInfo-Dyjhw7qb.js";
4
- import { a as U } from "./useAuthkitUsersProfile-zbKT0W_h.js";
3
+ import { u as R } from "./useAuthkitAppsAuthPageInfo-C1IsAlcM.js";
4
+ import { a as U } from "./useAuthkitUsersProfile-DNYZ87Bt.js";
5
5
  const $ = M({
6
6
  key: "",
7
7
  name: ""
@@ -1,19 +1,18 @@
1
1
  /* empty css */
2
- /* empty css */
3
2
  import { Message as O } from "@arco-design/web-vue";
4
3
  import { ref as t } from "vue";
5
- function A(r) {
4
+ function h(r) {
6
5
  const f = t(r), p = t(!1), u = t(!1), a = t({
7
6
  total: 0,
8
7
  current: 1,
9
8
  pageSize: 10,
10
9
  showTotal: !0,
11
10
  showPageSize: !0
12
- }), m = t([]), o = t(), i = t(Symbol("key")), l = t(), s = t(Symbol("key")), n = t(), c = t(Symbol("key"));
13
- function v(e) {
11
+ }), v = t([]), o = t(), l = t(Symbol("key")), s = t(), i = t(Symbol("key")), n = t(), c = t(Symbol("key"));
12
+ function y(e) {
14
13
  o.value.setData(e, !0, "edit");
15
14
  }
16
- function y(e) {
15
+ function m(e) {
17
16
  n.value.setData(e, !0, "view");
18
17
  }
19
18
  function g() {
@@ -23,13 +22,13 @@ function A(r) {
23
22
  a.value.current = e, a.value.pageSize = C;
24
23
  };
25
24
  function S() {
26
- i.value = Symbol("key");
25
+ l.value = Symbol("key");
27
26
  }
28
27
  function D() {
29
- s.value = Symbol("key");
28
+ i.value = Symbol("key");
30
29
  }
31
30
  function b(e) {
32
- l.value.setData(e, !0);
31
+ s.value.setData(e, !0);
33
32
  }
34
33
  function k() {
35
34
  c.value = Symbol("key");
@@ -42,17 +41,17 @@ function A(r) {
42
41
  }
43
42
  return {
44
43
  CreateAndUpdateRef: o,
45
- CreateAndUpdateKey: i,
46
- OperationLogRef: l,
47
- OperationLogKey: s,
44
+ CreateAndUpdateKey: l,
45
+ OperationLogRef: s,
46
+ OperationLogKey: i,
48
47
  DetailsRef: n,
49
48
  DetailsKey: c,
50
49
  pagination: a,
51
50
  title: f,
52
- edit: v,
51
+ edit: y,
53
52
  create: g,
54
- view: y,
55
- dataSource: m,
53
+ view: m,
54
+ dataSource: v,
56
55
  setPage: d,
57
56
  cancel: S,
58
57
  OperationLogCancel: D,
@@ -65,5 +64,5 @@ function A(r) {
65
64
  };
66
65
  }
67
66
  export {
68
- A as u
67
+ h as u
69
68
  };
@@ -1,6 +1,6 @@
1
1
  import { c as _t, g as Ht } from "./_commonjsHelpers-DaMA6jEr.js";
2
+ import { g as it } from "./auth-DtA2gxxa.js";
2
3
  import { api as bt } from "@huyooo/api";
3
- import { g as it } from "./globalConfig-C1YOJcxa.js";
4
4
  var Nt = { exports: {} };
5
5
  (function(_, fe) {
6
6
  (function(Y, A) {
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-ul2FbWYe.js";
1
+ import { d as r, U as e, a as n, b as o, c as t, S as U } from "./UserAccountMenu-DgfGUlvA.js";
2
2
  export {
3
3
  r as UserAccountMenu,
4
4
  e as UserAvatar,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huyooo/ui",
3
- "version": "0.5.24",
3
+ "version": "0.5.26",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [