@huyooo/ui 1.0.3 → 1.0.5
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-BN8-xgNq.js +2674 -0
- package/dist/{Contact-M6iyuyNL.js → Contact-BWuVR9ho.js} +105 -113
- package/dist/CustomTable-BzGfaAVH.js +276 -0
- package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-B9BqGWm8.js +1480 -0
- package/dist/LandingPageDescription-BczWZHKy.js +12 -0
- package/dist/{LandingPageLinkGroup-DDNRivMt.js → LandingPageLinkGroup-BZJ48Yss.js} +87 -88
- package/dist/{LandingPageFAQ-CZJXvor9.js → LandingPageSectionHeader-3hiuw6G0.js} +44 -25
- package/dist/{LandingPageSectionTabs-Ce3_Rc2L.js → LandingPageSectionTabs-jRjkWlM-.js} +475 -375
- package/dist/LegalDocViewer-DM8FYBpf.js +2501 -0
- package/dist/Menu-uCexrsKP.js +199 -0
- package/dist/MessageHandle-mEkCsv9e.js +1173 -0
- package/dist/MessageList-Ce-_LNTk.js +244 -0
- package/dist/PaySubscriptions-CXkEjqr2.js +1326 -0
- package/dist/PricingPlans-CV97ck9p.js +427 -0
- package/dist/ReferrerReferees-DgygiIiE.js +237 -0
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-B6NOZjK0.js → Upload.vue_vue_type_script_setup_true_lang-VGh2V4o0.js} +1 -1
- package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-zgjpFVln.js +592 -0
- package/dist/WidthContainer-PeWkCK0p.js +721 -0
- package/dist/{apiClients-DrGX2iJy.js → apiClients-BcXOLuYu.js} +131 -98
- package/dist/authkit.d.ts +6 -2
- package/dist/authkit.js +53 -44
- package/dist/common/authProviderIcons.d.ts +12 -0
- package/dist/common/globalConfig.d.ts +5 -0
- package/dist/common/tableColumnWidths.d.ts +11 -0
- package/dist/common.js +3 -3
- package/dist/components/AuthProviderIcon.vue.d.ts +12 -0
- package/dist/components/Authkit/AppSetting/AuthkitEmailVerify.vue.d.ts +2 -2
- package/dist/components/Authkit/AppSetting/AuthkitOAuthBinding.vue.d.ts +2 -1
- package/dist/components/Authkit/AppSetting/AuthkitPasskeyBinding.vue.d.ts +14 -0
- package/dist/components/Authkit/AppSetting/AuthkitPasswordUpdate.vue.d.ts +11 -1
- package/dist/components/Authkit/AppSetting/AuthkitPersonalInformation.vue.d.ts +1 -3
- package/dist/components/Authkit/AppSetting/AuthkitPhoneVerify.vue.d.ts +13 -3
- package/dist/components/Authkit/Auth/AuthkitBindEmail.vue.d.ts +29 -2
- package/dist/components/Authkit/Auth/AuthkitBindPhone.vue.d.ts +2 -2
- package/dist/components/Authkit/Auth/AuthkitEmailUpdate.vue.d.ts +2 -2
- package/dist/components/Authkit/Auth/AuthkitOauthItem.vue.d.ts +37 -9
- package/dist/components/Authkit/Auth/AuthkitOauthList.vue.d.ts +7 -11
- package/dist/components/Authkit/Auth/AuthkitPasswordUpdateAndVerify.vue.d.ts +2 -2
- package/dist/components/Authkit/Auth/AuthkitPhonePasswordUpdateAndVerify.vue.d.ts +2 -2
- package/dist/components/Authkit/Auth/AuthkitServiceAgreementAndPrivacyProtection.vue.d.ts +11 -7
- package/dist/components/Authkit/Auth/AuthkitSignInEmailCode.vue.d.ts +2 -2
- package/dist/components/Authkit/Auth/AuthkitSignInPhone.vue.d.ts +3 -62
- package/dist/components/Authkit/Auth/AuthkitSignUpPhone.vue.d.ts +2 -2
- package/dist/components/Authkit/Auth/AuthkitSwitchSignUpOrResetPassword.vue.d.ts +9 -0
- package/dist/components/Authkit/AuthkitAuth.vue.d.ts +2 -8
- package/dist/components/Authkit/AuthkitAuthModal.vue.d.ts +0 -4
- package/dist/components/Authkit/AuthkitProvider.vue.d.ts +5 -2
- package/dist/components/Authkit/AuthkitSendVerifyCode.vue.d.ts +2 -1
- package/dist/components/CustomTable.vue.d.ts +27 -1
- package/dist/components/Ellipsis.vue.d.ts +2 -6
- package/dist/components/Feedback/FeedbackList.vue.d.ts +4 -1
- package/dist/components/Gradientbackground.vue.d.ts +2 -2
- package/dist/components/HeaderMenus.vue.d.ts +4 -1
- package/dist/components/InfiniteLoading.vue.d.ts +1 -1
- package/dist/components/LandingPage/LandingPageButton.vue.d.ts +2 -2
- package/dist/components/LandingPage/LandingPageContainer.vue.d.ts +2 -2
- package/dist/components/LandingPage/LandingPageFeaturePanels.vue.d.ts +19 -0
- package/dist/components/LandingPage/LandingPageHero.vue.d.ts +9 -0
- package/dist/components/LandingPage/LandingPagePageContent.vue.d.ts +2 -2
- package/dist/components/LandingPage/LandingPageSectionHeader.vue.d.ts +1 -14
- package/dist/components/LandingPage/LandingPageSections.vue.d.ts +1 -1
- package/dist/components/LegalDoc/LegalDocViewer.vue.d.ts +7 -0
- package/dist/components/Menu.vue.d.ts +2 -1
- package/dist/components/MenuItem.vue.d.ts +3 -1
- package/dist/components/Message/MessageAppMessage.vue.d.ts +12 -2
- package/dist/components/Message/MessageDetails.vue.d.ts +9 -161
- package/dist/components/Message/MessageHandle.vue.d.ts +16 -4
- package/dist/components/Message/MessageList.vue.d.ts +4 -3
- package/dist/components/Message/MessageNotificationDetails.vue.d.ts +13 -0
- package/dist/components/Message/messageBody/DescriptionsMessageBody.vue.d.ts +3 -0
- package/dist/components/Message/messageBody/JsonMessageBodyFallback.vue.d.ts +3 -0
- package/dist/components/Message/messageBody/TextMessageBody.vue.d.ts +3 -0
- package/dist/components/Message/messageBody/descriptionRows.d.ts +14 -0
- package/dist/components/Message/messageBody/descriptionsMessageBody.d.ts +32 -0
- package/dist/components/Message/messageBody/descriptionsValueRender.d.ts +4 -0
- package/dist/components/Message/messageBody/messageBodyRegistry.d.ts +9 -0
- package/dist/components/Message/messageBody/registerBuiltinMessageBodies.d.ts +2 -0
- package/dist/components/Message/messageBody/types.d.ts +7 -0
- package/dist/components/Referrer/ReferrerRefereeCell.vue.d.ts +7 -0
- package/dist/components/Referrer/ReferrerReferees.vue.d.ts +1 -0
- package/dist/components/UserMenu/UserAccountMenu.vue.d.ts +1 -16
- package/dist/components/UserMenu/UserMenuItem.vue.d.ts +4 -0
- package/dist/components/UserMenu/UserMenuModals.vue.d.ts +18 -4
- package/dist/components/UserMenu/parts/UserAvatar.vue.d.ts +6 -0
- package/dist/components/UserMenu/parts/UserBasicInformation.vue.d.ts +7 -2
- package/dist/composables/Authkit/fetchAuthPageAboutUs.d.ts +3 -0
- package/dist/composables/Authkit/resolveRoutePermission.d.ts +2 -0
- package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +16 -0
- package/dist/composables/Authkit/useAuthkitAuth.d.ts +2 -0
- package/dist/composables/Authkit/useAuthkitPasskey.d.ts +10 -0
- package/dist/composables/Authkit/useLegalDocHostActions.d.ts +6 -0
- package/dist/composables/Authkit/useLegalDocs.d.ts +19 -0
- package/dist/composables/Authkit/useOauth.d.ts +17 -4
- package/dist/composables/Authkit/useRegistrationTerms.d.ts +24 -0
- package/dist/composables/Authkit/verifyCodeCooldown.d.ts +19 -0
- package/dist/composables/Billing/useBillingPlans.d.ts +0 -4
- package/dist/composables/Billing/useBillingStatusOptions.d.ts +2 -6
- package/dist/composables/Billing/useBillingSubscriptionSummary.d.ts +16 -0
- package/dist/composables/Billing/usePaidProductOptions.d.ts +5 -0
- package/dist/composables/Message/messageCenterBadgeCounts.d.ts +28 -0
- package/dist/composables/UserMenu/useUserMenuBadgeCounts.d.ts +9 -0
- package/dist/composables/useInfiniteList.d.ts +19 -0
- package/dist/composables/useMessageNotifications.d.ts +3 -6
- package/dist/composables.d.ts +4 -2
- package/dist/composables.js +50 -45
- package/dist/feedback.d.ts +1 -0
- package/dist/feedback.js +12 -11
- package/dist/fetchAuthPageAboutUs-dzTSwRsB.js +25 -0
- package/dist/{Clipboard-Bo7gdpR6.js → index-BkLvw1PU.js} +1 -1
- package/dist/landingPage.d.ts +1 -0
- package/dist/landingPage.js +41 -40
- package/dist/legalDocs/buildBuiltinUrl.d.ts +3 -0
- package/dist/{utils/legalLinks.d.ts → legalDocs/constants.d.ts} +0 -10
- package/dist/legalDocs/index.d.ts +7 -0
- package/dist/legalDocs/isConfigured.d.ts +7 -0
- package/dist/legalDocs/open.d.ts +3 -0
- package/dist/legalDocs/resolveAppId.d.ts +8 -0
- package/dist/legalDocs/resolveTarget.d.ts +4 -0
- package/dist/legalDocs/types.d.ts +12 -0
- package/dist/main.js +321 -308
- package/dist/message.d.ts +3 -0
- package/dist/message.js +301 -21
- package/dist/pay.d.ts +1 -1
- package/dist/pay.js +14 -17
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/api/auth.generated.d.ts +1385 -328
- package/dist/types/api/billing.generated.d.ts +907 -76
- package/dist/types/api/ones.generated.d.ts +131 -2
- package/dist/types/api.d.ts +1 -0
- package/dist/types/app.d.ts +10 -0
- package/dist/types/user.d.ts +1 -0
- package/dist/upload.js +2 -2
- package/dist/{useAuthkitAppsAuthPageInfo-C2yKgl8t.js → useAuthkitAppsAuthPageInfo-CNudJd04.js} +18 -17
- package/dist/useAuthkitAuth-3m0yW6uP.js +267 -0
- package/dist/{useAuthkitCreateAndUpdate-oo9517Gj.js → useAuthkitCreateAndUpdate-BsINsI-E.js} +1 -1
- package/dist/{useAuthkitUsersProfile-BZDk21c8.js → useAuthkitUsersProfile-DJlMsftY.js} +3 -3
- package/dist/useBillingStatusOptions-CfHQOFNw.js +71 -0
- package/dist/{useEnsureAuthenticated-BuIbxqsO.js → useEnsureAuthenticated-DNkCCy_Y.js} +2 -2
- package/dist/useLegalDocs-DQP_Yq6B.js +106 -0
- package/dist/{useMessageNotifications-D85_-mDq.js → useMessageNotifications-CAphguOm.js} +21 -24
- package/dist/useRoutePermission-CEiya9AM.js +218 -0
- package/dist/useSEO-CDWxbk8B.js +221 -0
- package/dist/useSubscriptionCheckout-d_M_rKRa.js +368 -0
- package/dist/{useUploadCos-BRKRzSy3.js → useUploadCos-C8BqFPkx.js} +1 -1
- package/dist/user.js +1 -1
- package/dist/userMenuModal-D-nDaYqM.js +66 -0
- package/dist/utils/apiMiddlewares.d.ts +5 -5
- package/dist/utils/apiResponse.d.ts +11 -0
- package/dist/utils/authProviderIcon.d.ts +3 -0
- package/dist/utils/authkit.d.ts +20 -7
- package/dist/utils/formatPoints.d.ts +8 -0
- package/dist/utils/messageNotificationContent.d.ts +4 -0
- package/dist/utils/messageTextLink.d.ts +9 -0
- package/dist/utils/passkeySupport.d.ts +8 -0
- package/dist/utils/pointsFlowTypes.d.ts +10 -0
- package/dist/utils/pointsHistoryDisplay.d.ts +8 -0
- package/dist/utils/refundStatusDisplay.d.ts +1 -0
- package/dist/utils/subscriptionDisplay.d.ts +7 -0
- package/dist/utils/userDisplay.d.ts +41 -0
- package/package.json +11 -3
- package/dist/AuthkitAppSetting-C-0uuLSg.js +0 -1921
- package/dist/AuthkitGithubBinding-C5zEy9zN.js +0 -2207
- package/dist/CustomTable-nsxN4Ja4.js +0 -276
- package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-M1NQ-rx-.js +0 -1396
- package/dist/LandingPageSectionHeader-D_74W4My.js +0 -69
- package/dist/Menu-Cy2ZPeaz.js +0 -170
- package/dist/MessageHandle-BG12aX0i.js +0 -924
- package/dist/MessageList-CrCF8mU6.js +0 -233
- package/dist/MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-gsjL6yAe.js +0 -142
- package/dist/PaySubscriptions-lWnEioX5.js +0 -1241
- package/dist/PricingPlans-DFcjOMWS.js +0 -404
- package/dist/ReferrerReferees-Cn7KaO8z.js +0 -106
- package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-P0X1Exyu.js +0 -520
- package/dist/WidthContainer-CF3qOLWW.js +0 -688
- package/dist/common/authPanelWidth.d.ts +0 -2
- package/dist/components/Feedback/FeedbackDetails.vue.d.ts +0 -178
- package/dist/composables/Authkit/useLegalLinks.d.ts +0 -34
- package/dist/index-D3Kp6R4z.js +0 -4
- package/dist/useAuthkitAuth-DmS-H7M2.js +0 -175
- package/dist/useBillingStatusOptions-B7xLU3fs.js +0 -145
- package/dist/useLegalLinks-Cwr45PBT.js +0 -60
- package/dist/useRoutePermission-CaWtjLRA.js +0 -212
- package/dist/useSEO-BSMQdBR9.js +0 -158
- package/dist/useSubscriptionCheckout-BRk5h9aC.js +0 -365
- package/dist/useTableHandle-BdujaiNX.js +0 -69
- /package/dist/components/{Feedback/FeedbackVideoPreview.vue.d.ts → VideoPreview.vue.d.ts} +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { createClient as f } from "@vafast/api-client";
|
|
2
|
+
import { g, h as d, t as v, i as O, j as w, f as u } from "./apiClients-BcXOLuYu.js";
|
|
3
|
+
import { ref as c } from "vue";
|
|
4
|
+
async function b(i, n) {
|
|
5
|
+
const {
|
|
6
|
+
data: e,
|
|
7
|
+
error: r
|
|
8
|
+
} = await y.request("POST", i, n);
|
|
9
|
+
if (r)
|
|
10
|
+
throw new Error(r.message ?? "请求失败");
|
|
11
|
+
if (e == null)
|
|
12
|
+
throw new Error("请求失败");
|
|
13
|
+
return e;
|
|
14
|
+
}
|
|
15
|
+
const y = f({
|
|
16
|
+
baseURL: g.billingPrefixUrl,
|
|
17
|
+
timeout: 3e4
|
|
18
|
+
}).use(d).use(v).use(O).use(w), M = {
|
|
19
|
+
productOptions: () => b("/products/options")
|
|
20
|
+
};
|
|
21
|
+
function p(i, n, e, r) {
|
|
22
|
+
var t;
|
|
23
|
+
const a = ((t = n == null ? void 0 : n.toLowerCase) == null ? void 0 : t.call(n)) ?? n, o = i.find((s) => s.key === n || s.key === a);
|
|
24
|
+
return o != null && o[e] ? o[e] : r;
|
|
25
|
+
}
|
|
26
|
+
function l(i) {
|
|
27
|
+
const n = c(!1), e = c([]);
|
|
28
|
+
async function r() {
|
|
29
|
+
if (e.value.length > 0)
|
|
30
|
+
return e.value;
|
|
31
|
+
n.value = !0;
|
|
32
|
+
try {
|
|
33
|
+
const {
|
|
34
|
+
data: t,
|
|
35
|
+
error: s
|
|
36
|
+
} = await i();
|
|
37
|
+
return s ? (e.value = [], e.value) : t != null && t.length ? (e.value = t, e.value) : (e.value = [], e.value);
|
|
38
|
+
} finally {
|
|
39
|
+
n.value = !1;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function a(t) {
|
|
43
|
+
return p(e.value, t, "label", t);
|
|
44
|
+
}
|
|
45
|
+
function o(t) {
|
|
46
|
+
return p(e.value, t, "color", "gray");
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
statusOptionsLoading: n,
|
|
50
|
+
statusOptionsList: e,
|
|
51
|
+
statusOptionsApi: r,
|
|
52
|
+
getStatusLabel: a,
|
|
53
|
+
getStatusColor: o
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function C() {
|
|
57
|
+
return l(async () => u.pointsRecharge.statusOptions.post({}));
|
|
58
|
+
}
|
|
59
|
+
function L() {
|
|
60
|
+
return l(async () => u.refund.statusOptions.post({}));
|
|
61
|
+
}
|
|
62
|
+
function R() {
|
|
63
|
+
return l(async () => u.invoices.statusOptions.post({}));
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
C as a,
|
|
67
|
+
L as b,
|
|
68
|
+
l as c,
|
|
69
|
+
M as d,
|
|
70
|
+
R as u
|
|
71
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed as f } from "vue";
|
|
2
|
-
import { u as r } from "./useAuthkitAuth-
|
|
3
|
-
import { u as d } from "./apiClients-
|
|
2
|
+
import { u as r } from "./useAuthkitAuth-3m0yW6uP.js";
|
|
3
|
+
import { u as d } from "./apiClients-BcXOLuYu.js";
|
|
4
4
|
const A = "jwtToken";
|
|
5
5
|
let e = null, i = !1;
|
|
6
6
|
async function h(n) {
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { computed as f } from "vue";
|
|
2
|
+
import { u as m } from "./useAuthkitAppsAuthPageInfo-CNudJd04.js";
|
|
3
|
+
import { g as L } from "./apiClients-BcXOLuYu.js";
|
|
4
|
+
const c = {
|
|
5
|
+
userServiceAgreement: "用户服务协议",
|
|
6
|
+
privacyPolicy: "隐私协议",
|
|
7
|
+
personalInformationCollectionList: "个人信息收集清单",
|
|
8
|
+
thirdPartyInformationSharingList: "第三方信息共享清单",
|
|
9
|
+
licenseInformation: "证照信息"
|
|
10
|
+
}, b = Object.keys(c);
|
|
11
|
+
function A(e) {
|
|
12
|
+
typeof window > "u" || window.open(e, "_blank", "noopener,noreferrer");
|
|
13
|
+
}
|
|
14
|
+
function l(e) {
|
|
15
|
+
A(e.url);
|
|
16
|
+
}
|
|
17
|
+
function D(e) {
|
|
18
|
+
var u, a, o;
|
|
19
|
+
if ((u = e == null ? void 0 : e.appId) != null && u.trim())
|
|
20
|
+
return e.appId.trim();
|
|
21
|
+
const r = (o = (a = e == null ? void 0 : e.route) == null ? void 0 : a.query) == null ? void 0 : o.appId;
|
|
22
|
+
return typeof r == "string" && r.trim() ? r.trim() : L.appId;
|
|
23
|
+
}
|
|
24
|
+
function I(e, r) {
|
|
25
|
+
const u = typeof window < "u" ? `${window.location.origin}/AboutUsDetails` : "/AboutUsDetails", a = new URLSearchParams({
|
|
26
|
+
type: e,
|
|
27
|
+
appId: r
|
|
28
|
+
});
|
|
29
|
+
return `${u}?${a.toString()}`;
|
|
30
|
+
}
|
|
31
|
+
function v(e) {
|
|
32
|
+
if (!(e != null && e.content) || !Array.isArray(e.content) || e.content.length === 0)
|
|
33
|
+
return !1;
|
|
34
|
+
const r = e.content[0];
|
|
35
|
+
return !(e.content.length === 1 && typeof r == "object" && r !== null && "type" in r && r.type === "paragraph" && !("content" in r && Array.isArray(r.content) && r.content.length));
|
|
36
|
+
}
|
|
37
|
+
function y(e, r, u) {
|
|
38
|
+
var o;
|
|
39
|
+
const a = (o = r.aboutUs) == null ? void 0 : o[e];
|
|
40
|
+
if (v(a))
|
|
41
|
+
return {
|
|
42
|
+
key: e,
|
|
43
|
+
label: c[e],
|
|
44
|
+
url: I(e, u),
|
|
45
|
+
configured: !0
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function w(e) {
|
|
49
|
+
return {
|
|
50
|
+
...e,
|
|
51
|
+
open: () => l(e)
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function C(e) {
|
|
55
|
+
const {
|
|
56
|
+
appsData: r
|
|
57
|
+
} = m();
|
|
58
|
+
function u() {
|
|
59
|
+
return D({
|
|
60
|
+
route: e == null ? void 0 : e.route,
|
|
61
|
+
appId: e == null ? void 0 : e.appId
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function a(t) {
|
|
65
|
+
var n;
|
|
66
|
+
return y(t, {
|
|
67
|
+
aboutUs: (n = r.value) == null ? void 0 : n.aboutUs
|
|
68
|
+
}, u());
|
|
69
|
+
}
|
|
70
|
+
function o(t) {
|
|
71
|
+
const n = a(t);
|
|
72
|
+
return n ? w(n) : {
|
|
73
|
+
key: t,
|
|
74
|
+
label: c[t],
|
|
75
|
+
url: "",
|
|
76
|
+
configured: !1,
|
|
77
|
+
open: () => {
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
const i = f(() => b.map(o)), s = f(() => i.value.filter((t) => t.configured));
|
|
82
|
+
function g(t) {
|
|
83
|
+
const n = i.value.find((d) => d.key === t);
|
|
84
|
+
return n != null && n.configured ? n : void 0;
|
|
85
|
+
}
|
|
86
|
+
function p(t) {
|
|
87
|
+
const n = a(t);
|
|
88
|
+
n && l(n);
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
all: i,
|
|
92
|
+
items: s,
|
|
93
|
+
getLink: g,
|
|
94
|
+
openLegalDoc: p
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
export {
|
|
98
|
+
c as L,
|
|
99
|
+
b as a,
|
|
100
|
+
I as b,
|
|
101
|
+
y as c,
|
|
102
|
+
v as i,
|
|
103
|
+
l as o,
|
|
104
|
+
D as r,
|
|
105
|
+
C as u
|
|
106
|
+
};
|
|
@@ -1,39 +1,37 @@
|
|
|
1
|
-
import { ref as a, computed as
|
|
2
|
-
import { o as c } from "./apiClients-
|
|
3
|
-
function
|
|
4
|
-
const n = a(!0),
|
|
1
|
+
import { ref as a, computed as w } from "vue";
|
|
2
|
+
import { o as c } from "./apiClients-BcXOLuYu.js";
|
|
3
|
+
function z() {
|
|
4
|
+
const n = a(!0), f = a(""), i = a(!1), d = a(!1), o = a([]), t = a({
|
|
5
5
|
total: 0,
|
|
6
6
|
current: 1,
|
|
7
7
|
pageSize: 10
|
|
8
|
-
}), l = a(!1), u = a(!1), r = a("unread"),
|
|
8
|
+
}), l = a(!1), u = a(!1), r = a("unread"), p = [{
|
|
9
9
|
label: "未读消息",
|
|
10
10
|
key: "unread"
|
|
11
11
|
}, {
|
|
12
12
|
label: "已读消息",
|
|
13
13
|
key: "read"
|
|
14
|
-
}], v =
|
|
14
|
+
}], v = w(() => r.value === "read");
|
|
15
15
|
function A() {
|
|
16
16
|
n.value = !0;
|
|
17
17
|
}
|
|
18
18
|
function N(e) {
|
|
19
19
|
r.value = e, t.value.current = 1, s();
|
|
20
20
|
}
|
|
21
|
-
async function
|
|
21
|
+
async function g(e) {
|
|
22
22
|
l.value = !0, await c.messageCenter.messageNotifications.read.post({
|
|
23
23
|
messageId: e
|
|
24
24
|
}), l.value = !1;
|
|
25
25
|
}
|
|
26
|
-
async function
|
|
26
|
+
async function m() {
|
|
27
27
|
u.value = !0;
|
|
28
28
|
const {
|
|
29
|
-
error:
|
|
30
|
-
} = await c.messageCenter.messageNotifications.readAll.post({
|
|
31
|
-
|
|
32
|
-
});
|
|
33
|
-
u.value = !1, w || s();
|
|
29
|
+
error: e
|
|
30
|
+
} = await c.messageCenter.messageNotifications.readAll.post({});
|
|
31
|
+
u.value = !1, e || s();
|
|
34
32
|
}
|
|
35
33
|
function b() {
|
|
36
|
-
o.value.length !== 0 &&
|
|
34
|
+
o.value.length !== 0 && m();
|
|
37
35
|
}
|
|
38
36
|
async function s() {
|
|
39
37
|
i.value = !0;
|
|
@@ -43,36 +41,35 @@ function S(f = "system") {
|
|
|
43
41
|
current: t.value.current,
|
|
44
42
|
pageSize: t.value.pageSize,
|
|
45
43
|
where: {
|
|
46
|
-
read: v.value
|
|
47
|
-
type: f
|
|
44
|
+
read: v.value
|
|
48
45
|
}
|
|
49
46
|
});
|
|
50
|
-
i.value = !1, e && (o.value = e.items, t.value.total = e.count,
|
|
47
|
+
i.value = !1, e && (o.value = e.items, t.value.total = e.count, d.value = e.items.length < t.value.pageSize);
|
|
51
48
|
}
|
|
52
49
|
function h(e) {
|
|
53
|
-
|
|
50
|
+
f.value = e.id, n.value = !1, g(e.id);
|
|
54
51
|
}
|
|
55
52
|
return s(), {
|
|
56
53
|
isList: n,
|
|
57
|
-
id:
|
|
54
|
+
id: f,
|
|
58
55
|
loading: i,
|
|
59
|
-
finished:
|
|
56
|
+
finished: d,
|
|
60
57
|
messageList: o,
|
|
61
58
|
pagination: t,
|
|
62
59
|
readLoading: l,
|
|
63
60
|
readAllLoading: u,
|
|
64
61
|
activeTab: r,
|
|
65
|
-
tabs:
|
|
62
|
+
tabs: p,
|
|
66
63
|
read: v,
|
|
67
64
|
toList: A,
|
|
68
65
|
onTabChange: N,
|
|
69
|
-
messageNotificationsReadApi:
|
|
70
|
-
messageNotificationsReadAllApi:
|
|
66
|
+
messageNotificationsReadApi: g,
|
|
67
|
+
messageNotificationsReadAllApi: m,
|
|
71
68
|
readAll: b,
|
|
72
69
|
getData: s,
|
|
73
70
|
openDetails: h
|
|
74
71
|
};
|
|
75
72
|
}
|
|
76
73
|
export {
|
|
77
|
-
|
|
74
|
+
z as u
|
|
78
75
|
};
|
|
@@ -0,0 +1,218 @@
|
|
|
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-CNudJd04.js";
|
|
4
|
+
import { u as L } from "./useAuthkitUsersProfile-DJlMsftY.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
|
+
};
|