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