@huyooo/ui 2.0.6 → 2.0.8
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-D_94iUEG.js → AuthkitAppSetting-eXw1JiyT.js} +787 -752
- package/dist/{Contact-CBGSJC2q.js → Contact-C5T90358.js} +2 -2
- package/dist/{FeedbackModal.vue_vue_type_script_setup_true_lang-CnvQjQFT.js → FeedbackModal.vue_vue_type_script_setup_true_lang-B3CA1z6v.js} +2 -2
- package/dist/LegalDocViewer-Dxl4FngI.js +2481 -0
- package/dist/{PaySubscriptions-BSkcUqHk.js → PaySubscriptions-Bv6LQ_Pf.js} +1 -1
- package/dist/{PricingPlans-CyFvgf18.js → PricingPlans-CQaXgOIR.js} +3 -3
- package/dist/{ReferrerReferees-BU9IEQgz.js → ReferrerReferees-D4VEC8QJ.js} +1 -1
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-oa6LJgCY.js → Upload.vue_vue_type_script_setup_true_lang-CgZQOZYt.js} +1 -1
- package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-DqgwJ7r3.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BdibAudA.js} +204 -181
- package/dist/{WidthContainer-BIRNIRX5.js → WidthContainer-AZl-9MdF.js} +6 -6
- package/dist/authkit.d.ts +1 -0
- package/dist/authkit.js +51 -50
- package/dist/common/globalConfig.d.ts +0 -5
- package/dist/common.js +1 -1
- package/dist/components/Authkit/Auth/AuthkitOauthCallback.vue.d.ts +1 -3
- package/dist/components/UserMenu/parts/UserMenuAuthPlaceholder.vue.d.ts +7 -0
- package/dist/composables/Authkit/oauthCallback.d.ts +14 -0
- package/dist/composables/Authkit/useAuthkitUsersProfile.d.ts +2 -0
- package/dist/composables/Authkit/useOAuthCallbackHandler.d.ts +11 -0
- package/dist/composables/Authkit/useOauth.d.ts +3 -3
- package/dist/composables.js +8 -8
- package/dist/feedback.js +1 -1
- package/dist/{fetchAuthPageAboutUs-CP5a7jIo.js → fetchAuthPageAboutUs-DV7ArpNZ.js} +1 -1
- package/dist/main.js +194 -193
- package/dist/pay.js +3 -3
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/{runtime-qs4IasEB.js → runtime-Dp7MgwhI.js} +115 -116
- package/dist/style.css +1 -1
- package/dist/upload.js +2 -2
- package/dist/{useAuthkitAuth-BPTZUSkM.js → useAuthkitAuth-cHrJMM8E.js} +48 -47
- package/dist/useAuthkitUsersProfile-CTd6PP-a.js +50 -0
- package/dist/{useEnsureAuthenticated-CncOvj2H.js → useEnsureAuthenticated-C8qS8DLL.js} +1 -1
- package/dist/{useLegalDocs-BZlntAI7.js → useLegalDocs-C4qk5CTb.js} +1 -1
- package/dist/{usePageSEO-DwhbUUjW.js → usePageSEO-Dl6_kBWP.js} +1 -1
- package/dist/{useRoutePermission-BrQX7NTq.js → useRoutePermission-B_g-WmDZ.js} +50 -42
- package/dist/{useSubscriptionCheckout-BDDCRxSs.js → useSubscriptionCheckout-CYU2Ke0y.js} +1 -1
- package/dist/user.js +1 -1
- package/package.json +1 -1
- package/dist/LegalDocViewer-DeDXQX3X.js +0 -2492
- package/dist/useAuthkitUsersProfile-CW_exa7E.js +0 -39
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-CgZQOZYt.js";
|
|
2
|
+
import { b as s, d as p } from "./runtime-Dp7MgwhI.js";
|
|
3
3
|
export {
|
|
4
4
|
o as Upload,
|
|
5
5
|
s as createBrowserCosTransport,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref as u, computed as
|
|
2
|
-
import { o as M, g as m, r as $, s as
|
|
1
|
+
import { ref as u, computed as h, nextTick as _, readonly as x } from "vue";
|
|
2
|
+
import { o as M, g as m, r as $, s as F } from "./apiClients-Ctcq8NZs.js";
|
|
3
3
|
import { u as D } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
|
|
4
4
|
const g = u(!1), w = u(!1);
|
|
5
5
|
let I;
|
|
@@ -33,15 +33,15 @@ function N(e) {
|
|
|
33
33
|
function Y() {
|
|
34
34
|
const {
|
|
35
35
|
appsData: e
|
|
36
|
-
} = D(), r =
|
|
36
|
+
} = D(), r = h(() => e.value.registrationTerms ?? K), t = h(() => {
|
|
37
37
|
var n;
|
|
38
38
|
return ((n = e.value.signUpAuth) == null ? void 0 : n.enabled) !== !1;
|
|
39
|
-
}), l =
|
|
40
|
-
function
|
|
39
|
+
}), l = h(() => t.value && !r.value.required);
|
|
40
|
+
function s() {
|
|
41
41
|
return t.value && r.value.required;
|
|
42
42
|
}
|
|
43
43
|
function i() {
|
|
44
|
-
return
|
|
44
|
+
return s();
|
|
45
45
|
}
|
|
46
46
|
function f() {
|
|
47
47
|
g.value = !1;
|
|
@@ -53,10 +53,10 @@ function Y() {
|
|
|
53
53
|
g.value = n;
|
|
54
54
|
}
|
|
55
55
|
function S(n) {
|
|
56
|
-
const
|
|
56
|
+
const o = h(() => n === "signUp" ? s() : i()), p = h(() => N(() => o.value));
|
|
57
57
|
return {
|
|
58
|
-
showTermsField:
|
|
59
|
-
termsRules:
|
|
58
|
+
showTermsField: o,
|
|
59
|
+
termsRules: p
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
return {
|
|
@@ -65,7 +65,7 @@ function Y() {
|
|
|
65
65
|
registrationTerms: r,
|
|
66
66
|
signUpAuthEnabled: t,
|
|
67
67
|
registrationBlocked: l,
|
|
68
|
-
requiresAcceptanceForSignUp:
|
|
68
|
+
requiresAcceptanceForSignUp: s,
|
|
69
69
|
requiresAcceptanceForOAuth: i,
|
|
70
70
|
resetAcceptedTerms: f,
|
|
71
71
|
shakeTerms: A,
|
|
@@ -74,10 +74,10 @@ function Y() {
|
|
|
74
74
|
useTermsFormField: S
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
const c = u("signIn"),
|
|
78
|
-
function
|
|
77
|
+
const c = u("signIn"), O = /* @__PURE__ */ new Set(), L = /* @__PURE__ */ new Set(), j = /* @__PURE__ */ new Set(), V = /* @__PURE__ */ new Set(), a = u(null), b = "jwtToken";
|
|
78
|
+
function U() {
|
|
79
79
|
try {
|
|
80
|
-
const e = localStorage.getItem(
|
|
80
|
+
const e = localStorage.getItem(b);
|
|
81
81
|
if (e)
|
|
82
82
|
return a.value = e, !0;
|
|
83
83
|
} catch (e) {
|
|
@@ -85,20 +85,21 @@ function b() {
|
|
|
85
85
|
}
|
|
86
86
|
return !1;
|
|
87
87
|
}
|
|
88
|
+
typeof window < "u" && U();
|
|
88
89
|
function z() {
|
|
89
90
|
try {
|
|
90
91
|
const e = new URL(window.location.href), r = e.searchParams.get("token");
|
|
91
92
|
if (!r) return !1;
|
|
92
|
-
const t = e.searchParams.get("refreshToken"), l = e.searchParams.get("userId"),
|
|
93
|
-
t ?
|
|
93
|
+
const t = e.searchParams.get("refreshToken"), l = e.searchParams.get("userId"), s = e.searchParams.get("appId"), i = e.searchParams.get("needBindIdentity") === "true";
|
|
94
|
+
t ? F({
|
|
94
95
|
jwtToken: r,
|
|
95
96
|
refreshToken: t
|
|
96
|
-
}) :
|
|
97
|
+
}) : P(r), ["token", "refreshToken", "userId", "appId", "needBindIdentity", "expiresIn"].forEach((d) => e.searchParams.delete(d));
|
|
97
98
|
const f = `${e.pathname}${e.search}${e.hash}`;
|
|
98
99
|
return window.history.replaceState({}, "", f), C({
|
|
99
100
|
jwtToken: r,
|
|
100
101
|
userId: l,
|
|
101
|
-
appId:
|
|
102
|
+
appId: s,
|
|
102
103
|
needBindIdentity: i
|
|
103
104
|
}), !0;
|
|
104
105
|
} catch (e) {
|
|
@@ -106,24 +107,24 @@ function z() {
|
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
109
|
function H() {
|
|
109
|
-
return z() ? !0 :
|
|
110
|
+
return z() ? !0 : U();
|
|
110
111
|
}
|
|
111
112
|
function q() {
|
|
112
|
-
return a.value ||
|
|
113
|
+
return a.value || U() ? a.value : null;
|
|
113
114
|
}
|
|
114
|
-
function
|
|
115
|
+
function P(e) {
|
|
115
116
|
a.value = e;
|
|
116
117
|
try {
|
|
117
|
-
localStorage.setItem(
|
|
118
|
+
localStorage.setItem(b, e);
|
|
118
119
|
} catch (r) {
|
|
119
120
|
console.warn("Failed to save token to localStorage:", r);
|
|
120
121
|
}
|
|
121
122
|
}
|
|
122
123
|
function k(e) {
|
|
123
|
-
e.refreshToken ?
|
|
124
|
+
e.refreshToken ? F({
|
|
124
125
|
jwtToken: e.jwtToken,
|
|
125
126
|
refreshToken: e.refreshToken
|
|
126
|
-
}) :
|
|
127
|
+
}) : P(e.jwtToken), C(e);
|
|
127
128
|
}
|
|
128
129
|
function J() {
|
|
129
130
|
a.value = null, Z();
|
|
@@ -146,38 +147,38 @@ function T(e, r) {
|
|
|
146
147
|
};
|
|
147
148
|
}
|
|
148
149
|
function C(e) {
|
|
149
|
-
|
|
150
|
+
O.forEach((r) => {
|
|
150
151
|
r(e);
|
|
151
152
|
});
|
|
152
153
|
}
|
|
153
154
|
function W() {
|
|
154
|
-
|
|
155
|
+
L.forEach((e) => void e());
|
|
155
156
|
}
|
|
156
157
|
function X() {
|
|
157
|
-
|
|
158
|
+
j.forEach((e) => void e());
|
|
158
159
|
}
|
|
159
160
|
function Z() {
|
|
160
|
-
|
|
161
|
+
V.forEach((e) => void e());
|
|
161
162
|
}
|
|
162
163
|
function ee(e) {
|
|
163
|
-
return T(
|
|
164
|
+
return T(O, e);
|
|
164
165
|
}
|
|
165
166
|
function ne(e) {
|
|
166
|
-
return T(
|
|
167
|
+
return T(L, e);
|
|
167
168
|
}
|
|
168
169
|
function re(e) {
|
|
169
|
-
return T(
|
|
170
|
+
return T(j, e);
|
|
170
171
|
}
|
|
171
172
|
function te(e) {
|
|
172
|
-
return T(
|
|
173
|
+
return T(V, e);
|
|
173
174
|
}
|
|
174
175
|
function ue() {
|
|
175
176
|
const e = u(!1), r = u(!1), t = u(!1);
|
|
176
177
|
async function l(n) {
|
|
177
178
|
e.value = !0;
|
|
178
179
|
const {
|
|
179
|
-
data:
|
|
180
|
-
error:
|
|
180
|
+
data: o,
|
|
181
|
+
error: p
|
|
181
182
|
} = await m().auth.auth.signIn.unified.post({
|
|
182
183
|
identifier: n.identifier || n.email || "",
|
|
183
184
|
password: n.password,
|
|
@@ -185,42 +186,42 @@ function ue() {
|
|
|
185
186
|
emailVerifyId: n.emailVerifyId,
|
|
186
187
|
method: n.method || "password"
|
|
187
188
|
});
|
|
188
|
-
if (e.value = !1,
|
|
189
|
+
if (e.value = !1, p || !o)
|
|
189
190
|
return;
|
|
190
|
-
k(
|
|
191
|
+
k(o);
|
|
191
192
|
}
|
|
192
|
-
function
|
|
193
|
+
function s(n) {
|
|
193
194
|
k(n);
|
|
194
195
|
}
|
|
195
196
|
async function i(n) {
|
|
196
197
|
const {
|
|
197
|
-
resetAcceptedTerms:
|
|
198
|
-
acceptedTerms:
|
|
199
|
-
requiresAcceptanceForSignUp:
|
|
198
|
+
resetAcceptedTerms: o,
|
|
199
|
+
acceptedTerms: p,
|
|
200
|
+
requiresAcceptanceForSignUp: R
|
|
200
201
|
} = Y();
|
|
201
202
|
r.value = !0;
|
|
202
|
-
const
|
|
203
|
+
const E = R() ? p.value : void 0, {
|
|
203
204
|
error: B
|
|
204
205
|
} = n.type === "phone" ? await m().auth.auth.signUp.phone.post({
|
|
205
206
|
phone: n.phone || "",
|
|
206
207
|
code: n.code || "",
|
|
207
208
|
password: n.password,
|
|
208
209
|
inviteCode: n.inviteCode,
|
|
209
|
-
acceptedTerms:
|
|
210
|
+
acceptedTerms: E === !0
|
|
210
211
|
}) : await m().auth.auth.signUp.post({
|
|
211
212
|
email: n.email || "",
|
|
212
213
|
userToken: n.userToken || "",
|
|
213
214
|
emailVerifyId: n.emailVerifyId || "",
|
|
214
215
|
password: n.password || "",
|
|
215
216
|
inviteCode: n.inviteCode,
|
|
216
|
-
acceptedTerms:
|
|
217
|
+
acceptedTerms: E === !0
|
|
217
218
|
});
|
|
218
|
-
r.value = !1, !B && (
|
|
219
|
+
r.value = !1, !B && (o(), c.value = "signIn", W());
|
|
219
220
|
}
|
|
220
221
|
async function f(n) {
|
|
221
222
|
t.value = !0;
|
|
222
223
|
const {
|
|
223
|
-
error:
|
|
224
|
+
error: o
|
|
224
225
|
} = await m().auth.auth.resetPassword.post({
|
|
225
226
|
method: n.method || "email",
|
|
226
227
|
email: n.email,
|
|
@@ -230,7 +231,7 @@ function ue() {
|
|
|
230
231
|
emailVerifyId: n.emailVerifyId,
|
|
231
232
|
password: n.password
|
|
232
233
|
});
|
|
233
|
-
t.value = !1, !
|
|
234
|
+
t.value = !1, !o && (c.value = "signIn", X());
|
|
234
235
|
}
|
|
235
236
|
function d() {
|
|
236
237
|
c.value = "signUp";
|
|
@@ -243,7 +244,7 @@ function ue() {
|
|
|
243
244
|
}
|
|
244
245
|
return {
|
|
245
246
|
signInSubmit: l,
|
|
246
|
-
passkeySignInSubmit:
|
|
247
|
+
passkeySignInSubmit: s,
|
|
247
248
|
signUpSubmit: i,
|
|
248
249
|
resetPasswordSubmit: f,
|
|
249
250
|
currentView: c,
|
|
@@ -259,7 +260,7 @@ function ue() {
|
|
|
259
260
|
onSignOut: te,
|
|
260
261
|
jwtToken: x(a),
|
|
261
262
|
getToken: q,
|
|
262
|
-
setToken:
|
|
263
|
+
setToken: P,
|
|
263
264
|
completeSignIn: k,
|
|
264
265
|
restoreSession: H,
|
|
265
266
|
clearAuth: y,
|
|
@@ -0,0 +1,50 @@
|
|
|
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,6 +1,6 @@
|
|
|
1
1
|
import { computed as f } from "vue";
|
|
2
2
|
import { u as d } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
|
|
3
|
-
import { g as L } from "./runtime-
|
|
3
|
+
import { g as L } from "./runtime-Dp7MgwhI.js";
|
|
4
4
|
const c = {
|
|
5
5
|
userServiceAgreement: "用户服务协议",
|
|
6
6
|
privacyPolicy: "隐私协议",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "./apiClients-Ctcq8NZs.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-Dp7MgwhI.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) {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { u as
|
|
4
|
-
import { u as L } from "./useAuthkitUsersProfile-
|
|
5
|
-
|
|
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({
|
|
6
7
|
key: "",
|
|
7
8
|
name: ""
|
|
8
9
|
});
|
|
9
|
-
function
|
|
10
|
+
function B() {
|
|
10
11
|
function e(r, t) {
|
|
11
12
|
y.value.key = r, y.value.name = t;
|
|
12
13
|
}
|
|
@@ -15,7 +16,7 @@ function z() {
|
|
|
15
16
|
setActiveDoc: e
|
|
16
17
|
};
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
+
function F(e, r = "default") {
|
|
19
20
|
const t = document;
|
|
20
21
|
if (t && typeof t.startViewTransition == "function") {
|
|
21
22
|
const n = document.body;
|
|
@@ -30,7 +31,7 @@ function j(e, r = "default") {
|
|
|
30
31
|
} else
|
|
31
32
|
e();
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
+
function O(e) {
|
|
34
35
|
const r = /* @__PURE__ */ new Set();
|
|
35
36
|
r.add(e);
|
|
36
37
|
const t = e.split("/").filter(Boolean);
|
|
@@ -38,18 +39,18 @@ function K(e) {
|
|
|
38
39
|
r.add(`/${t.slice(0, n).join("/")}`);
|
|
39
40
|
return [...r];
|
|
40
41
|
}
|
|
41
|
-
function
|
|
42
|
+
function g(e, r) {
|
|
42
43
|
const t = new Set(r);
|
|
43
|
-
return t.has("*") ? !0 :
|
|
44
|
+
return t.has("*") ? !0 : O(e).some((n) => t.has(n));
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
+
function W(e, r) {
|
|
46
47
|
const t = e.endsWith("/") ? e.slice(0, -1) : e;
|
|
47
|
-
return t === "" ? !1 :
|
|
48
|
+
return t === "" ? !1 : g(t, r) || r.some((n) => n === t ? !0 : n.startsWith(`${t}/`));
|
|
48
49
|
}
|
|
49
50
|
function C(e, r) {
|
|
50
51
|
return Array.isArray(e == null ? void 0 : e.menuTypes) ? e.menuTypes.includes(r) : !1;
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
+
function N(e, r, t) {
|
|
53
54
|
for (let n = e.length - 1; n >= 0; n--) {
|
|
54
55
|
const f = e[n];
|
|
55
56
|
if (C(f.meta, r))
|
|
@@ -57,14 +58,14 @@ function B(e, r, t) {
|
|
|
57
58
|
}
|
|
58
59
|
return t;
|
|
59
60
|
}
|
|
60
|
-
function
|
|
61
|
+
function A(e) {
|
|
61
62
|
return e.split("?")[0].split("#")[0];
|
|
62
63
|
}
|
|
63
|
-
function
|
|
64
|
-
const n =
|
|
64
|
+
function U(e, r, t) {
|
|
65
|
+
const n = A(r), f = (t == null ? void 0 : t.returnParentOnChildMatch) ?? !1;
|
|
65
66
|
function d(c, p) {
|
|
66
67
|
for (const a of c) {
|
|
67
|
-
if (
|
|
68
|
+
if (A(a.path) === p)
|
|
68
69
|
return a.path;
|
|
69
70
|
if (a.children && a.children.length > 0) {
|
|
70
71
|
const s = d(a.children, p);
|
|
@@ -78,11 +79,11 @@ function F(e, r, t) {
|
|
|
78
79
|
if (m)
|
|
79
80
|
return m;
|
|
80
81
|
for (const c of e) {
|
|
81
|
-
const p =
|
|
82
|
+
const p = A(c.path);
|
|
82
83
|
if (n.startsWith(p + "/") || n === p) {
|
|
83
84
|
if (c.children && c.children.length > 0)
|
|
84
85
|
for (const a of c.children) {
|
|
85
|
-
const v =
|
|
86
|
+
const v = A(a.path);
|
|
86
87
|
if (n.startsWith(v + "/") || n === v)
|
|
87
88
|
return f ? c.path : a.path;
|
|
88
89
|
}
|
|
@@ -91,22 +92,22 @@ function F(e, r, t) {
|
|
|
91
92
|
}
|
|
92
93
|
return t != null && t.fallback ? t.fallback(n) : n;
|
|
93
94
|
}
|
|
94
|
-
function
|
|
95
|
-
const r =
|
|
95
|
+
function q(e) {
|
|
96
|
+
const r = I(), {
|
|
96
97
|
appsData: t
|
|
97
|
-
} =
|
|
98
|
+
} = M(), {
|
|
98
99
|
isLoggedIn: n,
|
|
99
100
|
userProfile: f
|
|
100
|
-
} = L(), d =
|
|
101
|
+
} = L(), d = k(() => {
|
|
101
102
|
var s;
|
|
102
103
|
return !n.value || !f.value ? [] : ((s = f.value.permissions) == null ? void 0 : s.map((u) => u.permissionKey)) || [];
|
|
103
104
|
});
|
|
104
105
|
function m(s) {
|
|
105
106
|
const u = (t.value.publicRoutes || []).map((l) => l.permissionKey);
|
|
106
|
-
return
|
|
107
|
+
return g(s, u);
|
|
107
108
|
}
|
|
108
109
|
function c(s) {
|
|
109
|
-
return n.value ?
|
|
110
|
+
return n.value ? g(s, d.value) : !1;
|
|
110
111
|
}
|
|
111
112
|
function p(s) {
|
|
112
113
|
var u;
|
|
@@ -125,7 +126,7 @@ function N(e) {
|
|
|
125
126
|
const i = o.meta;
|
|
126
127
|
if (C(i, u)) {
|
|
127
128
|
const P = o.path;
|
|
128
|
-
if (m(P) ||
|
|
129
|
+
if (m(P) || W(P, d.value)) {
|
|
129
130
|
const h = {
|
|
130
131
|
name: (i == null ? void 0 : i.menuName) || (i == null ? void 0 : i.title) || (typeof o.name == "string" ? o.name : o.path),
|
|
131
132
|
path: o.path,
|
|
@@ -134,8 +135,8 @@ function N(e) {
|
|
|
134
135
|
hidden: i == null ? void 0 : i.hidden
|
|
135
136
|
};
|
|
136
137
|
if (o.children && o.children.length > 0) {
|
|
137
|
-
const
|
|
138
|
-
|
|
138
|
+
const R = a(o.children, u);
|
|
139
|
+
R.length > 0 && (h.children = R);
|
|
139
140
|
}
|
|
140
141
|
l.push(h);
|
|
141
142
|
}
|
|
@@ -147,7 +148,7 @@ function N(e) {
|
|
|
147
148
|
return l;
|
|
148
149
|
}
|
|
149
150
|
return {
|
|
150
|
-
menus:
|
|
151
|
+
menus: k(() => {
|
|
151
152
|
if (!e)
|
|
152
153
|
return [];
|
|
153
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];
|
|
@@ -158,25 +159,25 @@ function N(e) {
|
|
|
158
159
|
isLoggedIn: n
|
|
159
160
|
};
|
|
160
161
|
}
|
|
161
|
-
function
|
|
162
|
-
const e =
|
|
162
|
+
function E() {
|
|
163
|
+
const e = I(), r = T(), {
|
|
163
164
|
appsData: t,
|
|
164
165
|
appsAuthPageInfoSuccess: n
|
|
165
|
-
} =
|
|
166
|
+
} = M(), {
|
|
166
167
|
userProfile: f,
|
|
167
168
|
isLoggedIn: d,
|
|
168
169
|
usersProfileReady: m
|
|
169
|
-
} = L(), c =
|
|
170
|
+
} = L(), c = w(!1);
|
|
170
171
|
function p(s) {
|
|
171
172
|
const u = t.value.publicRoutes || [];
|
|
172
|
-
return
|
|
173
|
+
return g(s, u.map((l) => l.permissionKey));
|
|
173
174
|
}
|
|
174
175
|
function a(s) {
|
|
175
176
|
var l;
|
|
176
177
|
if (!d.value || !f.value)
|
|
177
178
|
return !1;
|
|
178
179
|
const u = ((l = f.value.permissions) == null ? void 0 : l.map((o) => o.permissionKey)) || [];
|
|
179
|
-
return
|
|
180
|
+
return g(s, u);
|
|
180
181
|
}
|
|
181
182
|
function v(s) {
|
|
182
183
|
if (!n.value) {
|
|
@@ -192,6 +193,13 @@ function U() {
|
|
|
192
193
|
return;
|
|
193
194
|
}
|
|
194
195
|
if (!d.value) {
|
|
196
|
+
const {
|
|
197
|
+
getToken: u
|
|
198
|
+
} = K();
|
|
199
|
+
if (u()) {
|
|
200
|
+
c.value = !0;
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
195
203
|
e.replace("/"), c.value = !1;
|
|
196
204
|
return;
|
|
197
205
|
}
|
|
@@ -208,11 +216,11 @@ function U() {
|
|
|
208
216
|
};
|
|
209
217
|
}
|
|
210
218
|
export {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
g,
|
|
216
|
-
|
|
217
|
-
|
|
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
|
|
218
226
|
};
|
|
@@ -3,7 +3,7 @@ import { d as z } from "./useBillingStatusOptions-Br-iL77Z.js";
|
|
|
3
3
|
import { g as $ } from "./apiClients-Ctcq8NZs.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import { Message as h } from "@arco-design/web-vue";
|
|
6
|
-
import { u as H } from "./useEnsureAuthenticated-
|
|
6
|
+
import { u as H } from "./useEnsureAuthenticated-C8qS8DLL.js";
|
|
7
7
|
function D(e) {
|
|
8
8
|
var i;
|
|
9
9
|
const r = (i = e == null ? void 0 : e.metadata) == null ? void 0 : i.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-BdibAudA.js";
|
|
2
2
|
export {
|
|
3
3
|
a as UserAccountMenu,
|
|
4
4
|
n as UserAvatar,
|