@huyooo/ui 2.0.7 → 2.0.9

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 (51) hide show
  1. package/dist/{AuthkitAppSetting-CX4WTwNd.js → AuthkitAppSetting-DoC2RJh7.js} +787 -752
  2. package/dist/{Contact-CBGSJC2q.js → Contact-Ck3LVLx-.js} +3 -3
  3. package/dist/{FeedbackModal.vue_vue_type_script_setup_true_lang-BNBzOqrv.js → FeedbackModal.vue_vue_type_script_setup_true_lang-hveEkBb4.js} +2 -2
  4. package/dist/{LandingPageLinkGroup-BZJ48Yss.js → LandingPageLinkGroup-DTFhrYK1.js} +1 -1
  5. package/dist/{LandingPageSectionTabs-jRjkWlM-.js → LandingPageSectionTabs-Bm_zZrfT.js} +1 -1
  6. package/dist/LegalDocViewer-DBr0x1ZE.js +2497 -0
  7. package/dist/{Logo-D7fyXyB-.js → Logo-B9DFBxDU.js} +1 -1
  8. package/dist/{PaySubscriptions-BSkcUqHk.js → PaySubscriptions-Bv6LQ_Pf.js} +1 -1
  9. package/dist/{PricingPlans-CyFvgf18.js → PricingPlans-CQaXgOIR.js} +3 -3
  10. package/dist/{ReferrerReferees-Mvv6oiqe.js → ReferrerReferees-CGrH-gYJ.js} +1 -1
  11. package/dist/{Upload.vue_vue_type_script_setup_true_lang-oa6LJgCY.js → Upload.vue_vue_type_script_setup_true_lang-CgZQOZYt.js} +1 -1
  12. package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-V5EzZMCL.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-QE1ARaXY.js} +195 -211
  13. package/dist/WidthContainer-Clc_WxY_.js +706 -0
  14. package/dist/authkit.d.ts +1 -0
  15. package/dist/authkit.js +51 -50
  16. package/dist/common/globalConfig.d.ts +0 -5
  17. package/dist/common.js +2 -2
  18. package/dist/components/Authkit/Auth/AuthkitOauthCallback.vue.d.ts +1 -3
  19. package/dist/components/Gradientbackground.vue.d.ts +1 -1
  20. package/dist/components/UserMenu/UserMenu.vue.d.ts +2 -2
  21. package/dist/composables/Authkit/oauthCallback.d.ts +14 -0
  22. package/dist/composables/Authkit/useAppBrand.d.ts +7 -0
  23. package/dist/composables/Authkit/useAuthkitUsersProfile.d.ts +2 -0
  24. package/dist/composables/Authkit/useOAuthCallbackHandler.d.ts +11 -0
  25. package/dist/composables/Authkit/useOauth.d.ts +3 -3
  26. package/dist/composables.d.ts +1 -0
  27. package/dist/composables.js +39 -38
  28. package/dist/feedback.js +1 -1
  29. package/dist/{fetchAuthPageAboutUs-CP5a7jIo.js → fetchAuthPageAboutUs-DV7ArpNZ.js} +1 -1
  30. package/dist/landingPage.js +3 -3
  31. package/dist/main.js +239 -237
  32. package/dist/pay.js +3 -3
  33. package/dist/privateCom.js +1 -1
  34. package/dist/referrer.js +1 -1
  35. package/dist/{runtime-qs4IasEB.js → runtime-Dp7MgwhI.js} +115 -116
  36. package/dist/style.css +1 -1
  37. package/dist/upload.js +2 -2
  38. package/dist/{useAuthkitAuth-BPTZUSkM.js → useAuthkitAuth-cHrJMM8E.js} +48 -47
  39. package/dist/useAuthkitUsersProfile-8FzLTfUJ.js +55 -0
  40. package/dist/{useEnsureAuthenticated-CncOvj2H.js → useEnsureAuthenticated-C8qS8DLL.js} +1 -1
  41. package/dist/{useLegalDocs-BZlntAI7.js → useLegalDocs-C4qk5CTb.js} +1 -1
  42. package/dist/{usePageSEO-DwhbUUjW.js → usePageSEO-Dl6_kBWP.js} +1 -1
  43. package/dist/useRoutePermission-DYPZgvYv.js +247 -0
  44. package/dist/{useSubscriptionCheckout-BDDCRxSs.js → useSubscriptionCheckout-CYU2Ke0y.js} +1 -1
  45. package/dist/user.js +1 -1
  46. package/package.json +1 -1
  47. package/dist/LegalDocViewer-DPUiWxcR.js +0 -2492
  48. package/dist/WidthContainer-Dts5qV1W.js +0 -717
  49. package/dist/components/UserMenu/parts/UserMenuAuthPlaceholder.vue.d.ts +0 -7
  50. package/dist/useAuthkitUsersProfile-BclJWOvR.js +0 -45
  51. package/dist/useRoutePermission-CePjXomb.js +0 -218
@@ -1,7 +0,0 @@
1
- type __VLS_Props = {
2
- size?: number;
3
- };
4
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
5
- size: number;
6
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
7
- export default _default;
@@ -1,45 +0,0 @@
1
- import { ref as a, computed as i } from "vue";
2
- import { g as f } from "./apiClients-Ctcq8NZs.js";
3
- import { u as r } from "./useAuthkitAuth-BPTZUSkM.js";
4
- const e = a(null), o = a(!1), n = a(!1), v = i(() => !!e.value), d = i(() => {
5
- const {
6
- getToken: u
7
- } = r();
8
- return u() && !n.value ? "pending" : e.value ? "authenticated" : "unauthenticated";
9
- });
10
- async function h() {
11
- const {
12
- getToken: u,
13
- clearAuth: l
14
- } = r();
15
- if (!u()) {
16
- console.warn("No authentication token found"), e.value = null, n.value = !0;
17
- return;
18
- }
19
- o.value = !0, n.value = !1;
20
- const {
21
- data: s,
22
- error: t
23
- } = await f().auth.users.profile.post({});
24
- if (o.value = !1, n.value = !0, s) {
25
- const c = s;
26
- e.value = c;
27
- } else ((t == null ? void 0 : t.code) === 401 || (t == null ? void 0 : t.code) === 40101) && (e.value = null, console.warn("认证已过期,清除认证状态"), l());
28
- }
29
- function p() {
30
- e.value = null, n.value = !0;
31
- }
32
- function P() {
33
- return {
34
- userProfile: e,
35
- loading: o,
36
- usersProfileReady: n,
37
- isLoggedIn: v,
38
- authSessionState: d,
39
- fetchUserProfile: h,
40
- clearUserProfile: p
41
- };
42
- }
43
- export {
44
- P as u
45
- };
@@ -1,218 +0,0 @@
1
- import { ref as I, computed as w, watch as S } from "vue";
2
- import { useRouter as M, useRoute as T } from "vue-router";
3
- import { u as k } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
4
- import { u as L } from "./useAuthkitUsersProfile-BclJWOvR.js";
5
- const y = I({
6
- key: "",
7
- name: ""
8
- });
9
- function z() {
10
- function e(r, t) {
11
- y.value.key = r, y.value.name = t;
12
- }
13
- return {
14
- activeDoc: y,
15
- setActiveDoc: e
16
- };
17
- }
18
- function j(e, r = "default") {
19
- const t = document;
20
- if (t && typeof t.startViewTransition == "function") {
21
- const n = document.body;
22
- n.classList.add(`vt-${r}`), t.startViewTransition(() => {
23
- try {
24
- e();
25
- } catch {
26
- }
27
- }).finished.finally(() => {
28
- n.classList.remove(`vt-${r}`);
29
- });
30
- } else
31
- e();
32
- }
33
- function K(e) {
34
- const r = /* @__PURE__ */ new Set();
35
- r.add(e);
36
- const t = e.split("/").filter(Boolean);
37
- for (let n = t.length - 1; n > 0; n--)
38
- r.add(`/${t.slice(0, n).join("/")}`);
39
- return [...r];
40
- }
41
- function R(e, r) {
42
- const t = new Set(r);
43
- return t.has("*") ? !0 : K(e).some((n) => t.has(n));
44
- }
45
- function O(e, r) {
46
- const t = e.endsWith("/") ? e.slice(0, -1) : e;
47
- return t === "" ? !1 : R(t, r) || r.some((n) => n === t ? !0 : n.startsWith(`${t}/`));
48
- }
49
- function C(e, r) {
50
- return Array.isArray(e == null ? void 0 : e.menuTypes) ? e.menuTypes.includes(r) : !1;
51
- }
52
- function B(e, r, t) {
53
- for (let n = e.length - 1; n >= 0; n--) {
54
- const f = e[n];
55
- if (C(f.meta, r))
56
- return f.path;
57
- }
58
- return t;
59
- }
60
- function g(e) {
61
- return e.split("?")[0].split("#")[0];
62
- }
63
- function F(e, r, t) {
64
- const n = g(r), f = (t == null ? void 0 : t.returnParentOnChildMatch) ?? !1;
65
- function d(c, p) {
66
- for (const a of c) {
67
- if (g(a.path) === p)
68
- return a.path;
69
- if (a.children && a.children.length > 0) {
70
- const s = d(a.children, p);
71
- if (s)
72
- return f ? a.path : s;
73
- }
74
- }
75
- return null;
76
- }
77
- const m = d(e, n);
78
- if (m)
79
- return m;
80
- for (const c of e) {
81
- const p = g(c.path);
82
- if (n.startsWith(p + "/") || n === p) {
83
- if (c.children && c.children.length > 0)
84
- for (const a of c.children) {
85
- const v = g(a.path);
86
- if (n.startsWith(v + "/") || n === v)
87
- return f ? c.path : a.path;
88
- }
89
- return c.path;
90
- }
91
- }
92
- return t != null && t.fallback ? t.fallback(n) : n;
93
- }
94
- function N(e) {
95
- const r = M(), {
96
- appsData: t
97
- } = k(), {
98
- isLoggedIn: n,
99
- userProfile: f
100
- } = L(), d = w(() => {
101
- var s;
102
- return !n.value || !f.value ? [] : ((s = f.value.permissions) == null ? void 0 : s.map((u) => u.permissionKey)) || [];
103
- });
104
- function m(s) {
105
- const u = (t.value.publicRoutes || []).map((l) => l.permissionKey);
106
- return R(s, u);
107
- }
108
- function c(s) {
109
- return n.value ? R(s, d.value) : !1;
110
- }
111
- function p(s) {
112
- var u;
113
- return {
114
- path: s.path,
115
- name: s.name,
116
- meta: s.meta,
117
- children: (u = s.children) == null ? void 0 : u.map((l) => p(l))
118
- };
119
- }
120
- function a(s, u) {
121
- const l = [];
122
- for (const o of s) {
123
- if (o.path === "/" || o.path === "/:catchAll(.*)")
124
- continue;
125
- const i = o.meta;
126
- if (C(i, u)) {
127
- const P = o.path;
128
- if (m(P) || O(P, d.value)) {
129
- const h = {
130
- name: (i == null ? void 0 : i.menuName) || (i == null ? void 0 : i.title) || (typeof o.name == "string" ? o.name : o.path),
131
- path: o.path,
132
- icon: (i == null ? void 0 : i.menuIcon) || (i == null ? void 0 : i.icon),
133
- description: (i == null ? void 0 : i.menuDescription) || (i == null ? void 0 : i.description),
134
- hidden: i == null ? void 0 : i.hidden
135
- };
136
- if (o.children && o.children.length > 0) {
137
- const A = a(o.children, u);
138
- A.length > 0 && (h.children = A);
139
- }
140
- l.push(h);
141
- }
142
- } else if (o.children && o.children.length > 0) {
143
- const P = a(o.children, u);
144
- l.push(...P);
145
- }
146
- }
147
- return l;
148
- }
149
- return {
150
- menus: w(() => {
151
- if (!e)
152
- return [];
153
- const s = r.getRoutes(), u = s.find((h) => h.path === "/"), l = u != null && u.children ? u.children.map((h) => p(h)) : [], o = new Set(l.map((h) => h.path)), P = s.filter((h) => h.path === "/" || h.path === "/:catchAll(.*)" || o.has(h.path) ? !1 : h.path.split("/").filter((D) => D).length === 1).map(p), b = [...l, ...P];
154
- return a(b, e);
155
- }),
156
- isRoutePublic: m,
157
- hasPermission: (s) => m(s) ? !0 : c(s),
158
- isLoggedIn: n
159
- };
160
- }
161
- function U() {
162
- const e = M(), r = T(), {
163
- appsData: t,
164
- appsAuthPageInfoSuccess: n
165
- } = k(), {
166
- userProfile: f,
167
- isLoggedIn: d,
168
- usersProfileReady: m
169
- } = L(), c = I(!1);
170
- function p(s) {
171
- const u = t.value.publicRoutes || [];
172
- return R(s, u.map((l) => l.permissionKey));
173
- }
174
- function a(s) {
175
- var l;
176
- if (!d.value || !f.value)
177
- return !1;
178
- const u = ((l = f.value.permissions) == null ? void 0 : l.map((o) => o.permissionKey)) || [];
179
- return R(s, u);
180
- }
181
- function v(s) {
182
- if (!n.value) {
183
- c.value = !0;
184
- return;
185
- }
186
- if (c.value = !0, p(s)) {
187
- c.value = !1;
188
- return;
189
- }
190
- if (!m.value) {
191
- c.value = !0;
192
- return;
193
- }
194
- if (!d.value) {
195
- e.replace("/"), c.value = !1;
196
- return;
197
- }
198
- a(s) || e.replace("/"), c.value = !1;
199
- }
200
- return S([() => r.path, n, m, d], () => {
201
- v(r.path);
202
- }, {
203
- immediate: !0
204
- }), {
205
- isChecking: c,
206
- isRoutePublic: p,
207
- hasPermission: a
208
- };
209
- }
210
- export {
211
- B as a,
212
- N as b,
213
- U as c,
214
- F as f,
215
- g,
216
- z as u,
217
- j as w
218
- };