@huyooo/ui 2.2.4 → 2.2.7
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-ZopA9Gjq.js → AuthkitAppSetting-K0qhtQoU.js} +4 -4
- package/dist/{Contact-BdBQ_FA4.js → Contact-CNLjyOCR.js} +3 -3
- package/dist/{FeedbackModal.vue_vue_type_script_setup_true_lang-C7vaGD4R.js → FeedbackModal.vue_vue_type_script_setup_true_lang-hbfe8U5u.js} +2 -2
- package/dist/{LegalDocViewer-wbdoeWU9.js → LegalDocViewer-C6yZJ_kH.js} +7 -7
- package/dist/{PaySubscriptions-OZ6OFeQJ.js → PaySubscriptions-tJSQUmhE.js} +1 -1
- package/dist/{PricingPlans-Wf4QkUIz.js → PricingPlans-BKbMjHaY.js} +3 -3
- package/dist/{ReferrerReferees-DNE-htF1.js → ReferrerReferees-BQ0_OW74.js} +1 -1
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-DtciAodp.js → Upload.vue_vue_type_script_setup_true_lang-CZjNlns_.js} +1 -1
- package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-ELHt9JGf.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-K5_YUkGs.js} +5 -5
- package/dist/WidthContainer-ummelwr_.js +688 -0
- package/dist/authkit.js +8 -8
- package/dist/common/globalConfig.d.ts +5 -0
- package/dist/common.js +1 -1
- package/dist/components/SvgIcon.vue.d.ts +1 -1
- package/dist/composables/Authkit/resolveRoutePermission.d.ts +10 -1
- package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +2 -0
- package/dist/composables/Authkit/useRoutePermission.d.ts +12 -1
- package/dist/composables.d.ts +1 -0
- package/dist/composables.js +49 -44
- package/dist/feedback.js +1 -1
- package/dist/{fetchAuthPageAboutUs-D5w21LkF.js → fetchAuthPageAboutUs--dArFYk6.js} +2 -2
- package/dist/main.js +284 -279
- package/dist/pay.js +3 -3
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/{runtime-B_xhJ3i8.js → runtime-CDEl4QQl.js} +129 -128
- package/dist/style.css +1 -1
- package/dist/types/app.d.ts +4 -0
- package/dist/upload.js +2 -2
- package/dist/{useAuthkitAppsAuthPageInfo-KHO1mJvF.js → useAuthkitAppsAuthPageInfo-mv7hOnhi.js} +1 -1
- package/dist/{useAuthkitAuth-C0fVP17l.js → useAuthkitAuth-HqXgYzfZ.js} +1 -1
- package/dist/{useAuthkitUsersProfile-BvldvaRx.js → useAuthkitUsersProfile-DyjCmUka.js} +1 -1
- package/dist/{useEnsureAuthenticated-BdXJDqVv.js → useEnsureAuthenticated-CpZcAqLg.js} +1 -1
- package/dist/{useLegalDocs-BCWvu1ft.js → useLegalDocs-DUbab5R9.js} +2 -2
- package/dist/{usePageSEO-D7eyLr8d.js → usePageSEO-D8CocvOJ.js} +1 -1
- package/dist/useRoutePermission-BCXxvMoU.js +249 -0
- package/dist/{useSubscriptionCheckout-BHI3y7Cx.js → useSubscriptionCheckout-D8W6v3YG.js} +1 -1
- package/dist/user.js +1 -1
- package/package.json +1 -1
- package/dist/WidthContainer-PjmYnZwk.js +0 -706
- package/dist/useRoutePermission-BuKMkOTK.js +0 -247
package/dist/types/app.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
/** 公开路由匹配方式:prefix 级联子路径;exact 仅精确匹配 */
|
|
2
|
+
export type PublicRouteMatch = 'prefix' | 'exact';
|
|
1
3
|
export interface PublicRoute {
|
|
2
4
|
id: string;
|
|
3
5
|
name: string;
|
|
4
6
|
permissionKey: string;
|
|
5
7
|
description: string;
|
|
8
|
+
/** 缺省按 prefix(级联);exact 仅放行当前 path */
|
|
9
|
+
publicMatch?: PublicRouteMatch;
|
|
6
10
|
}
|
|
7
11
|
export interface OAuthConfig {
|
|
8
12
|
google: {
|
package/dist/upload.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as o } from "./Upload.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { b as s, d as p } from "./runtime-
|
|
1
|
+
import { _ as o } from "./Upload.vue_vue_type_script_setup_true_lang-CZjNlns_.js";
|
|
2
|
+
import { b as s, d as p } from "./runtime-CDEl4QQl.js";
|
|
3
3
|
export {
|
|
4
4
|
o as Upload,
|
|
5
5
|
s as createBrowserCosTransport,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as u, computed as h, nextTick as _, readonly as x } from "vue";
|
|
2
2
|
import { o as M, g as m, r as $, s as F } from "./apiClients-8_c5cDW5.js";
|
|
3
|
-
import { u as D } from "./useAuthkitAppsAuthPageInfo-
|
|
3
|
+
import { u as D } from "./useAuthkitAppsAuthPageInfo-mv7hOnhi.js";
|
|
4
4
|
const g = u(!1), w = u(!1);
|
|
5
5
|
let I;
|
|
6
6
|
const G = "请先阅读并同意用户协议与隐私政策", K = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as a, computed as i } from "vue";
|
|
2
2
|
import { g as p } from "./apiClients-8_c5cDW5.js";
|
|
3
|
-
import { u as l } from "./useAuthkitAuth-
|
|
3
|
+
import { u as l } from "./useAuthkitAuth-HqXgYzfZ.js";
|
|
4
4
|
const e = a(null), n = a(!1), u = a(!1), s = a(!1);
|
|
5
5
|
function v() {
|
|
6
6
|
s.value = !0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed as f } from "vue";
|
|
2
|
-
import { u as d } from "./useAuthkitAppsAuthPageInfo-
|
|
3
|
-
import { g as L } from "./runtime-
|
|
2
|
+
import { u as d } from "./useAuthkitAppsAuthPageInfo-mv7hOnhi.js";
|
|
3
|
+
import { g as L } from "./runtime-CDEl4QQl.js";
|
|
4
4
|
const c = {
|
|
5
5
|
userServiceAgreement: "用户服务协议",
|
|
6
6
|
privacyPolicy: "隐私协议",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "./apiClients-8_c5cDW5.js";
|
|
3
3
|
import { Message as y } from "@arco-design/web-vue";
|
|
4
4
|
import { ref as a, computed as s, toValue as A } from "vue";
|
|
5
|
-
import { u as N } from "./runtime-
|
|
5
|
+
import { u as N } from "./runtime-CDEl4QQl.js";
|
|
6
6
|
import { useHead as g, useSeoMeta as w } from "@unhead/vue";
|
|
7
7
|
import { useRoute as E } from "vue-router";
|
|
8
8
|
function M(t) {
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { computed as g, ref as T, watch as k } from "vue";
|
|
2
|
+
import { useRouter as R, useRoute as $ } from "vue-router";
|
|
3
|
+
import { u as w } from "./useAuthkitAppsAuthPageInfo-mv7hOnhi.js";
|
|
4
|
+
import { u as I } from "./useAuthkitUsersProfile-DyjCmUka.js";
|
|
5
|
+
import { g as C } from "./runtime-CDEl4QQl.js";
|
|
6
|
+
function j(e, r = "default") {
|
|
7
|
+
const t = document;
|
|
8
|
+
if (t && typeof t.startViewTransition == "function") {
|
|
9
|
+
const n = document.body;
|
|
10
|
+
n.classList.add(`vt-${r}`), t.startViewTransition(() => {
|
|
11
|
+
try {
|
|
12
|
+
e();
|
|
13
|
+
} catch {
|
|
14
|
+
}
|
|
15
|
+
}).finished.finally(() => {
|
|
16
|
+
n.classList.remove(`vt-${r}`);
|
|
17
|
+
});
|
|
18
|
+
} else
|
|
19
|
+
e();
|
|
20
|
+
}
|
|
21
|
+
function E() {
|
|
22
|
+
const {
|
|
23
|
+
appsData: e,
|
|
24
|
+
appsAuthPageInfoSuccess: r
|
|
25
|
+
} = w(), t = R(), n = g(() => r.value), c = g(() => n.value && e.value.applicationLogoUrl || ""), a = g(() => n.value && e.value.name || "");
|
|
26
|
+
function m() {
|
|
27
|
+
j(() => {
|
|
28
|
+
t.push("/"), window.scrollTo({
|
|
29
|
+
top: 0,
|
|
30
|
+
behavior: "smooth"
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
brandReady: n,
|
|
36
|
+
brandLogoUrl: c,
|
|
37
|
+
brandName: a,
|
|
38
|
+
navigateToAppHome: m
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
const A = T({
|
|
42
|
+
key: "",
|
|
43
|
+
name: ""
|
|
44
|
+
});
|
|
45
|
+
function F() {
|
|
46
|
+
function e(r, t) {
|
|
47
|
+
A.value.key = r, A.value.name = t;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
activeDoc: A,
|
|
51
|
+
setActiveDoc: e
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function x(e) {
|
|
55
|
+
const r = /* @__PURE__ */ new Set();
|
|
56
|
+
r.add(e);
|
|
57
|
+
const t = e.split("/").filter(Boolean);
|
|
58
|
+
for (let n = t.length - 1; n > 0; n--)
|
|
59
|
+
r.add(`/${t.slice(0, n).join("/")}`);
|
|
60
|
+
return [...r];
|
|
61
|
+
}
|
|
62
|
+
function M(e, r) {
|
|
63
|
+
const t = new Set(r);
|
|
64
|
+
return t.has("*") ? !0 : x(e).some((n) => t.has(n));
|
|
65
|
+
}
|
|
66
|
+
function O(e) {
|
|
67
|
+
return e.filter((r) => U(r.publicMatch) === "exact").map((r) => r.permissionKey);
|
|
68
|
+
}
|
|
69
|
+
function U(e) {
|
|
70
|
+
return e === "exact" ? "exact" : "prefix";
|
|
71
|
+
}
|
|
72
|
+
function L(e, r) {
|
|
73
|
+
const t = r.map((a) => a.permissionKey);
|
|
74
|
+
if (t.includes("*"))
|
|
75
|
+
return !0;
|
|
76
|
+
const n = new Set(t), c = new Set(O(r));
|
|
77
|
+
return x(e).some((a) => !(!n.has(a) || c.has(a) && e !== a));
|
|
78
|
+
}
|
|
79
|
+
function W(e, r) {
|
|
80
|
+
const t = e.endsWith("/") ? e.slice(0, -1) : e;
|
|
81
|
+
return t === "" ? !1 : M(t, r) || r.some((n) => n === t ? !0 : n.startsWith(`${t}/`));
|
|
82
|
+
}
|
|
83
|
+
function D(e, r) {
|
|
84
|
+
return Array.isArray(e == null ? void 0 : e.menuTypes) ? e.menuTypes.includes(r) : !1;
|
|
85
|
+
}
|
|
86
|
+
function q(e, r, t) {
|
|
87
|
+
for (let n = e.length - 1; n >= 0; n--) {
|
|
88
|
+
const c = e[n];
|
|
89
|
+
if (D(c.meta, r))
|
|
90
|
+
return c.path;
|
|
91
|
+
}
|
|
92
|
+
return t;
|
|
93
|
+
}
|
|
94
|
+
function b(e) {
|
|
95
|
+
return e.split("?")[0].split("#")[0];
|
|
96
|
+
}
|
|
97
|
+
function G(e, r, t) {
|
|
98
|
+
const n = b(r), c = (t == null ? void 0 : t.returnParentOnChildMatch) ?? !1;
|
|
99
|
+
function a(f, p) {
|
|
100
|
+
for (const l of f) {
|
|
101
|
+
if (b(l.path) === p)
|
|
102
|
+
return l.path;
|
|
103
|
+
if (l.children && l.children.length > 0) {
|
|
104
|
+
const o = a(l.children, p);
|
|
105
|
+
if (o)
|
|
106
|
+
return c ? l.path : o;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
const m = a(e, n);
|
|
112
|
+
if (m)
|
|
113
|
+
return m;
|
|
114
|
+
for (const f of e) {
|
|
115
|
+
const p = b(f.path);
|
|
116
|
+
if (n.startsWith(p + "/") || n === p) {
|
|
117
|
+
if (f.children && f.children.length > 0)
|
|
118
|
+
for (const l of f.children) {
|
|
119
|
+
const v = b(l.path);
|
|
120
|
+
if (n.startsWith(v + "/") || n === v)
|
|
121
|
+
return c ? f.path : l.path;
|
|
122
|
+
}
|
|
123
|
+
return f.path;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return t != null && t.fallback ? t.fallback(n) : n;
|
|
127
|
+
}
|
|
128
|
+
function J(e) {
|
|
129
|
+
const r = R(), {
|
|
130
|
+
appsData: t
|
|
131
|
+
} = w(), {
|
|
132
|
+
isLoggedIn: n,
|
|
133
|
+
userProfile: c
|
|
134
|
+
} = I(), a = g(() => {
|
|
135
|
+
var o;
|
|
136
|
+
return !n.value || !c.value ? [] : ((o = c.value.permissions) == null ? void 0 : o.map((s) => s.permissionKey)) || [];
|
|
137
|
+
});
|
|
138
|
+
function m(o) {
|
|
139
|
+
return L(o, t.value.publicRoutes || []);
|
|
140
|
+
}
|
|
141
|
+
function f(o) {
|
|
142
|
+
return n.value ? M(o, a.value) : !1;
|
|
143
|
+
}
|
|
144
|
+
function p(o) {
|
|
145
|
+
var s;
|
|
146
|
+
return {
|
|
147
|
+
path: o.path,
|
|
148
|
+
name: o.name,
|
|
149
|
+
meta: o.meta,
|
|
150
|
+
children: (s = o.children) == null ? void 0 : s.map((d) => p(d))
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
function l(o, s) {
|
|
154
|
+
const d = [];
|
|
155
|
+
for (const u of o) {
|
|
156
|
+
if (u.path === "/" || u.path === "/:catchAll(.*)")
|
|
157
|
+
continue;
|
|
158
|
+
const i = u.meta;
|
|
159
|
+
if (D(i, s)) {
|
|
160
|
+
const P = u.path;
|
|
161
|
+
if (m(P) || W(P, a.value)) {
|
|
162
|
+
const h = {
|
|
163
|
+
name: (i == null ? void 0 : i.menuName) || (i == null ? void 0 : i.title) || (typeof u.name == "string" ? u.name : u.path),
|
|
164
|
+
path: u.path,
|
|
165
|
+
icon: (i == null ? void 0 : i.menuIcon) || (i == null ? void 0 : i.icon),
|
|
166
|
+
description: (i == null ? void 0 : i.menuDescription) || (i == null ? void 0 : i.description),
|
|
167
|
+
hidden: i == null ? void 0 : i.hidden
|
|
168
|
+
};
|
|
169
|
+
if (u.children && u.children.length > 0) {
|
|
170
|
+
const y = l(u.children, s);
|
|
171
|
+
y.length > 0 && (h.children = y);
|
|
172
|
+
}
|
|
173
|
+
d.push(h);
|
|
174
|
+
}
|
|
175
|
+
} else if (u.children && u.children.length > 0) {
|
|
176
|
+
const P = l(u.children, s);
|
|
177
|
+
d.push(...P);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return d;
|
|
181
|
+
}
|
|
182
|
+
return {
|
|
183
|
+
menus: g(() => {
|
|
184
|
+
if (!e)
|
|
185
|
+
return [];
|
|
186
|
+
const o = r.getRoutes(), s = o.find((h) => h.path === "/"), d = s != null && s.children ? s.children.map((h) => p(h)) : [], u = new Set(d.map((h) => h.path)), P = o.filter((h) => h.path === "/" || h.path === "/:catchAll(.*)" || u.has(h.path) ? !1 : h.path.split("/").filter((K) => K).length === 1).map(p), S = [...d, ...P];
|
|
187
|
+
return l(S, e);
|
|
188
|
+
}),
|
|
189
|
+
isRoutePublic: m,
|
|
190
|
+
hasPermission: (o) => m(o) ? !0 : f(o),
|
|
191
|
+
isLoggedIn: n
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
function Q() {
|
|
195
|
+
const e = R(), r = $(), {
|
|
196
|
+
appsData: t,
|
|
197
|
+
appsAuthPageInfoSuccess: n
|
|
198
|
+
} = w(), {
|
|
199
|
+
userProfile: c,
|
|
200
|
+
isLoggedIn: a,
|
|
201
|
+
usersProfileReady: m
|
|
202
|
+
} = I();
|
|
203
|
+
function f() {
|
|
204
|
+
return t.value.publicRoutes || [];
|
|
205
|
+
}
|
|
206
|
+
function p(s) {
|
|
207
|
+
return L(s, f());
|
|
208
|
+
}
|
|
209
|
+
function l(s) {
|
|
210
|
+
var u;
|
|
211
|
+
if (!a.value || !c.value)
|
|
212
|
+
return !1;
|
|
213
|
+
const d = ((u = c.value.permissions) == null ? void 0 : u.map((i) => i.permissionKey)) || [];
|
|
214
|
+
return M(s, d);
|
|
215
|
+
}
|
|
216
|
+
function v() {
|
|
217
|
+
const s = C().config.accessDeniedUrl || "/";
|
|
218
|
+
e.replace(s);
|
|
219
|
+
}
|
|
220
|
+
function o(s) {
|
|
221
|
+
p(s) || !n.value || !m.value || (!a.value || !l(s)) && v();
|
|
222
|
+
}
|
|
223
|
+
return k([() => r.path, n, m, a, () => f().map((s) => `${s.permissionKey}:${s.publicMatch || "prefix"}`).join("|"), () => {
|
|
224
|
+
var s;
|
|
225
|
+
return (((s = c.value) == null ? void 0 : s.permissions) || []).map((d) => d.permissionKey).join("|");
|
|
226
|
+
}], () => {
|
|
227
|
+
o(r.path);
|
|
228
|
+
}, {
|
|
229
|
+
immediate: !0
|
|
230
|
+
}), {
|
|
231
|
+
isRoutePublic: p,
|
|
232
|
+
hasPermission: l
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
export {
|
|
236
|
+
q as a,
|
|
237
|
+
M as b,
|
|
238
|
+
x as c,
|
|
239
|
+
E as d,
|
|
240
|
+
J as e,
|
|
241
|
+
G as f,
|
|
242
|
+
b as g,
|
|
243
|
+
W as h,
|
|
244
|
+
L as i,
|
|
245
|
+
Q as j,
|
|
246
|
+
O as r,
|
|
247
|
+
F as u,
|
|
248
|
+
j as w
|
|
249
|
+
};
|
|
@@ -3,7 +3,7 @@ import { d as V } from "./useBillingStatusOptions-C8fwW-AI.js";
|
|
|
3
3
|
import { g as $ } from "./apiClients-8_c5cDW5.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import { Message as b } from "@arco-design/web-vue";
|
|
6
|
-
import { u as _ } from "./useEnsureAuthenticated-
|
|
6
|
+
import { u as _ } from "./useEnsureAuthenticated-CpZcAqLg.js";
|
|
7
7
|
function D(e) {
|
|
8
8
|
var u;
|
|
9
9
|
const i = (u = e == null ? void 0 : e.metadata) == null ? void 0 : u.originalPrice;
|
package/dist/user.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as a, a as n, b as r, c as t, d as U, _ as u, e as i, f as M, g as o, h as m, i as I, j as c, k as d, l as b, m as f } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { U as a, a as n, b as r, c as t, d as U, _ as u, e as i, f as M, g as o, h as m, i as I, j as c, k as d, l as b, m as f } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-K5_YUkGs.js";
|
|
2
2
|
export {
|
|
3
3
|
a as UserAccountMenu,
|
|
4
4
|
n as UserAvatar,
|