@yuku123/z-cognition-component 2.0.0 → 2.0.2
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-lib/ApartmentOutlined-M6qSurnE.js +12 -0
- package/dist-lib/ArrowLeftOutlined-DowsrSUj.js +12 -0
- package/dist-lib/{ConceptsPage-DOf_CJlz.js → ConceptsPage-BOeKdDKI.js} +16 -13
- package/dist-lib/{DocsPage-CiC7TU96.js → DocsPage-BZOBFp3c.js} +4 -4
- package/dist-lib/EvidenceFormList-DXqqSpPV.js +91 -0
- package/dist-lib/{EyeOutlined-CH-5UdnC.js → EyeOutlined-DGSrX-0M.js} +1 -1
- package/dist-lib/ImpactPage-DyhUR6fT.js +71 -0
- package/dist-lib/{LeftOutlined-DQTflZ6D.js → LeftOutlined-Cgo6Izj-.js} +1 -1
- package/dist-lib/{OntologyDetailPage-mgK_NQxP.js → OntologyDetailPage-B8DyU8WW.js} +93 -99
- package/dist-lib/{OntologyInferPage-NUaoaQpN.js → OntologyInferPage-CvcjxpBB.js} +40 -38
- package/dist-lib/{OntologyListPage-C9wH01y0.js → OntologyListPage-Cb0XfpWE.js} +49 -47
- package/dist-lib/OntologyMaterializePage-B0f9TnJa.js +136 -0
- package/dist-lib/OntologyNodesPage-D4MWlm6q.js +1268 -0
- package/dist-lib/{OntologyValidatePage-DtkYK_l4.js → OntologyValidatePage-abQVJwzV.js} +52 -49
- package/dist-lib/{Pagination-Ds8VKQIT.js → Pagination-Dxslodkq.js} +258 -260
- package/dist-lib/PlusOutlined-B_dXo_97.js +12 -0
- package/dist-lib/{ReloadOutlined-B26pDoyV.js → ReloadOutlined-CS-e-TmN.js} +10 -19
- package/dist-lib/{ResolvePage-Cz9HORZ3.js → ResolvePage-rbQ-8nNZ.js} +33 -31
- package/dist-lib/{RotateRightOutlined-B575hEBK.js → RotateRightOutlined-q7zp2e47.js} +1 -1
- package/dist-lib/SearchOutlined-puH6bCY6.js +979 -0
- package/dist-lib/Skeleton-DXcERb5r.js +557 -0
- package/dist-lib/{Table-D8pPXolZ.js → Table-CDagah-g.js} +452 -450
- package/dist-lib/TagsOutlined-B4_qkn6-.js +20 -0
- package/dist-lib/TermDetailPage-CP0D6OvA.js +242 -0
- package/dist-lib/{TermsPage-BuzCMYov.js → TermsPage-CuufAyuL.js} +31 -28
- package/dist-lib/TextArea-DTpTS5HL.js +1897 -0
- package/dist-lib/ThunderboltOutlined-Bf54AaFE.js +20 -0
- package/dist-lib/{agents-DS0rPJGV.js → agents-CvgRLQw2.js} +46 -46
- package/dist-lib/{ai-CQ67aRC4.js → ai-DYDhijtn.js} +30 -30
- package/dist-lib/{ai-chat-share-AOB7rEOb.js → ai-chat-share-DJnybJtS.js} +14 -13
- package/dist-lib/{approval-LLVR3fMa.js → approval-3IbhY8Lp.js} +26 -25
- package/dist-lib/{approvals-D1DSA-Mw.js → approvals-Cd6CVzz4.js} +43 -42
- package/dist-lib/{assistant-DpabpWKV.js → assistant-cIXgilaE.js} +50 -49
- package/dist-lib/{assistant-history-ChvhtZwX.js → assistant-history-BQzH4ChB.js} +5 -5
- package/dist-lib/{assistant-summary-B0ksF8CX.js → assistant-summary-LKTj_HKM.js} +1 -1
- package/dist-lib/{audit-DeU1XEgQ.js → audit-CxuJ5unU.js} +1 -1
- package/dist-lib/{bios-Bk36bVhw.js → bios-BplnCOF4.js} +130 -125
- package/dist-lib/callSuper-DZEfdkXG.js +7 -0
- package/dist-lib/{changelog-xEt2qnho.js → changelog-BoGqt_81.js} +2 -2
- package/dist-lib/{changelog-CCMDMI4R.js → changelog-Cn81Dvgk.js} +1 -1
- package/dist-lib/chunk-YDNE64FV-DGyyfCo0.js +2004 -0
- package/dist-lib/colors-sdAcAcU3.js +24 -0
- package/dist-lib/context-Buz0ggsK.js +710 -0
- package/dist-lib/context-DpmyNOn3.js +21 -0
- package/dist-lib/createForOfIteratorHelper-DEx_aTey.js +51 -0
- package/dist-lib/d3-force-CZK-Rgd6.js +598 -0
- package/dist-lib/{dayjs.min-DoEf5yCX.js → dayjs.min-BauDENhn.js} +1 -1
- package/dist-lib/{detail-Xtof0GoK.js → detail-BaX7WiWV.js} +51 -50
- package/dist-lib/{detail-BW6dD_YP.js → detail-Cx5c4KJH.js} +89 -88
- package/dist-lib/{docx-preview-D4v2g8Yg.js → docx-preview-B5nQuTwk.js} +1 -1
- package/dist-lib/{downloads-Dj4DgBSS.js → downloads-C3Oz04OW.js} +4 -3
- package/dist-lib/{edit-nZ7siGuW.js → edit-Cbn2eJaJ.js} +265 -259
- package/dist-lib/{editor-BuhZwEsv.js → editor-mtaJBQXz.js} +21 -20
- package/dist-lib/embed-CR8XVkMy.js +31148 -0
- package/dist-lib/{evaluation-B-igEqQ9.js → evaluation-BoHiY8yT.js} +15 -14
- package/dist-lib/{focus-set-DfRWcq91.js → focus-set-h0YtOUB2.js} +34 -33
- package/dist-lib/{format-CWI99NCN.js → format-UGmYKemG.js} +1 -1
- package/dist-lib/index-9aQ4BzIK.js +500 -0
- package/dist-lib/{index-BJ2Gpcbi.js → index-B22_2Dzh.js} +2 -2
- package/dist-lib/index-B57Fj7Y0.js +1169 -0
- package/dist-lib/{index-D_-8dmug.js → index-BEjXaDfk.js} +23 -22
- package/dist-lib/{index-rtSfQuYs.js → index-BSlCGnzo.js} +12 -12
- package/dist-lib/index-Bc-Vin3j.js +256 -0
- package/dist-lib/{index-SAPKyv8e.js → index-Bm1sK-VN.js} +10 -10
- package/dist-lib/{index-g9uC_rON.js → index-BwVZgt5s.js} +129 -146
- package/dist-lib/{index-CZipVp1G.js → index-C3AMwzIi.js} +1 -1
- package/dist-lib/{index-B5jr3A7f.js → index-CHBNrCMy.js} +19 -19
- package/dist-lib/{index-BFRg0cn3.js → index-CLTfICbf.js} +6 -6
- package/dist-lib/{index-CnLkqTRm.js → index-CaXylbQR.js} +175 -173
- package/dist-lib/index-Cfu1W1H6.js +535 -0
- package/dist-lib/{index-DzrH4RQ7.js → index-Cj4DDWyj.js} +11 -10
- package/dist-lib/index-CrMcNEAZ.js +9656 -0
- package/dist-lib/index-Cy9i4Kx7.js +699 -0
- package/dist-lib/index-CyKWCYMK.js +218 -0
- package/dist-lib/{index-CjwzwBTy.js → index-D3GHtSlM.js} +94 -93
- package/dist-lib/{index-B8l4PAGJ.js → index-DBlG9uXV.js} +112 -108
- package/dist-lib/index-DBtGE89a.js +168 -0
- package/dist-lib/{index-CS5YTpdI.js → index-DMTPsTna.js} +4 -3
- package/dist-lib/index-DjFPRXl5.js +1484 -0
- package/dist-lib/{index-Bu6udiyN.js → index-DsuUGhTA.js} +123 -121
- package/dist-lib/index-DvWHYX81.js +450 -0
- package/dist-lib/{index-D5V4bZ4e.js → index-PBT9GksC.js} +8 -8
- package/dist-lib/index-Vu6sPBci.js +1884 -0
- package/dist-lib/index-bOY1cBol.js +4890 -0
- package/dist-lib/index-nQSVLWfW.js +356 -0
- package/dist-lib/{index-pcUZcUIA.js → index-o65vKUwa.js} +48 -47
- package/dist-lib/{index-K7z38Ybg.js → index-ounfql2z.js} +33 -31
- package/dist-lib/{index-B1rpIXU7.js → index-y7jVGGI0.js} +23 -21
- package/dist-lib/index.js +3 -1
- package/dist-lib/{jszip.min-dcaDnWUw.js → jszip.min-DcEHhn-b.js} +1 -1
- package/dist-lib/{kb-form-modal-9L0AUHVG.js → kb-form-modal-B0rM1ZvV.js} +71 -71
- package/dist-lib/{kbTeam-BECePvJe.js → kbTeam-Bh_FQH28.js} +3 -3
- package/dist-lib/{knowledge-base-C8gHP0dj.js → knowledge-base-Cl1Ka1e6.js} +104 -103
- package/dist-lib/{knowledge-hub-C9KkDv1A.js → knowledge-hub-CPuzdRiq.js} +52 -51
- package/dist-lib/{markdown-lite-BABX4bcl.js → markdown-lite-Cu62Fl7J.js} +181 -177
- package/dist-lib/{material-preview-docx-lp_xPipj.js → material-preview-docx-CH-09KeC.js} +1 -1
- package/dist-lib/{material-preview-pdf-CKAovvpc.js → material-preview-pdf-CTSo215V.js} +7 -7
- package/dist-lib/{material-preview-pptx-6Byitp0J.js → material-preview-pptx-D8XGDF-u.js} +1 -1
- package/dist-lib/{member-B5WF3FCj.js → member-DKDx77PD.js} +1 -1
- package/dist-lib/{message-kHyjuooj.js → message-BrooQ3Q7.js} +25 -24
- package/dist-lib/{message-D2MSaOMq.js → message-Dievi8Jw.js} +1 -1
- package/dist-lib/{messages-D_VDuKK7.js → messages-xTNmTS9g.js} +16 -15
- package/dist-lib/{meta-CEf_DYcU.js → meta-BD_qYTZu.js} +1 -1
- package/dist-lib/{metrics-hONGW0KG.js → metrics-DiHYqBKB.js} +2 -2
- package/dist-lib/{monitor-DF3WVsVV.js → monitor-BBCu3zRe.js} +8 -8
- package/dist-lib/{monitor-DFmEu6rH.js → monitor-BXsdMJSV.js} +4 -4
- package/dist-lib/{my-access-j53lA6T6.js → my-access-CEGErUgv.js} +4 -4
- package/dist-lib/{my-permissions-C5L8ZN2d.js → my-permissions-wSr5zv7g.js} +23 -22
- package/dist-lib/{new-DfZ61nMQ.js → new-BevAuTe5.js} +14 -12
- package/dist-lib/{ontology-CUH5qslO.js → ontology-DXGSJC-y.js} +145 -142
- package/dist-lib/{ontology-domains-CRC1ZRit.js → ontology-domains-jTG7CZm8.js} +88 -84
- package/dist-lib/ontology-modeling-CjRsa-DR.js +1039 -0
- package/dist-lib/{ontology-modeling-DaSk5fsh.js → ontology-modeling-DOj68TuI.js} +2125 -2117
- package/dist-lib/ontology-scenarios-CcAagMiP.js +660 -0
- package/dist-lib/{ontology-scenarios-DAbyoKV6.js → ontology-scenarios-J5kw6xgi.js} +703 -712
- package/dist-lib/pages-CsexFuEz.js +73 -0
- package/dist-lib/pages.js +3 -3
- package/dist-lib/{permission-CklDU2kO.js → permission-BUXo69Ne.js} +31 -31
- package/dist-lib/{pptx-preview.es-D4ODiBv2.js → pptx-preview.es-AUrdYKu3.js} +2 -2
- package/dist-lib/{preset-Bp_mvsJm.js → preset-gh5SGoYT.js} +9810 -10199
- package/dist-lib/{quota-DLe9so2b.js → quota-D31cXjul.js} +4 -4
- package/dist-lib/{row-CE051ClO.js → row-B5MnGm9M.js} +63 -61
- package/dist-lib/{save-blob-qKrc8-z6.js → save-blob-CiWNK-cX.js} +2 -2
- package/dist-lib/{scenario-mapping-preview-CSDqIN3R.js → scenario-mapping-preview-DQ_OBV4Z.js} +48 -46
- package/dist-lib/{scenario-simple-form-CAkhVgeV.js → scenario-simple-form-DESMvU7A.js} +425 -423
- package/dist-lib/{schedule-B_ujtL3h.js → schedule-BktxwX3S.js} +8 -8
- package/dist-lib/{settings-BIkKTQjc.js → settings-dsB3H65I.js} +147 -146
- package/dist-lib/{shared-Dfz1X4Mq.js → shared-CTCzvhyE.js} +1 -1
- package/dist-lib/{shared-utils-BeRiAkbe.js → shared-utils-BstybhBG.js} +2 -2
- package/dist-lib/{skills-BzpcX5fN.js → skills-CHPlMsgO.js} +40 -39
- package/dist-lib/{source-selection-DOL5LBrV.js → source-selection-tXqc855k.js} +16 -16
- package/dist-lib/{task-config-D0a7TOYt.js → task-config-BiTOiZj0.js} +4 -4
- package/dist-lib/{tech-CH01ekZ5.js → tech-BKlGPkV0.js} +4 -3
- package/dist-lib/{tools-YnTN61uE.js → tools-CouQ4FWk.js} +14 -14
- package/dist-lib/{use-domain-access-CXx1YzE5.js → use-domain-access-BPlNfoiP.js} +13 -13
- package/dist-lib/use-g6-graph-WLX0PweO.js +1119 -0
- package/dist-lib/{use-graph-layers-CowyyYcb.js → use-graph-layers-ja-ZIC_R.js} +50 -48
- package/dist-lib/useClosable-BY7FgWKy.js +59 -0
- package/dist-lib/useForm-Byp1LopG.js +145 -0
- package/dist-lib/{version-control-panel-CLy2ZXI_.js → version-control-panel-CkBm36Yk.js} +27 -26
- package/dist-lib/{version-management-C_v8w1E4.js → version-management-B4kIbdVc.js} +7 -6
- package/dist-lib/{welcome-ChEcA4Ej.js → welcome-F5iZoFB1.js} +4 -3
- package/package.json +2 -3
- package/dist-lib/EvidenceFormList-CrE2FzHk.js +0 -90
- package/dist-lib/ImpactPage-CYiuqy0S.js +0 -68
- package/dist-lib/OntologyMaterializePage-D_fDqYHY.js +0 -134
- package/dist-lib/OntologyNodesPage-5kH7RHwE.js +0 -2844
- package/dist-lib/PlusOutlined-BSTPGLOH.js +0 -21
- package/dist-lib/Skeleton-CxFsInYI.js +0 -671
- package/dist-lib/Table-Civ838nE.js +0 -20514
- package/dist-lib/TermDetailPage-BtkOpbPT.js +0 -263
- package/dist-lib/_commonjsHelpers-DaMA6jEr.js +0 -8
- package/dist-lib/callSuper-CwIeyYoc.js +0 -7
- package/dist-lib/chunk-6KYCQHYJ-DcgZQlO5.js +0 -1627
- package/dist-lib/context-T27uno74.js +0 -54
- package/dist-lib/d3-force-Cr_oBTiR.js +0 -647
- package/dist-lib/embed-Bs3Hmsyy.js +0 -51377
- package/dist-lib/index-0TvzCTD7.js +0 -2336
- package/dist-lib/index-4tbtbcAt.js +0 -550
- package/dist-lib/index-B1wh6i1C.js +0 -1308
- package/dist-lib/index-BVgdmf6r.js +0 -2487
- package/dist-lib/index-CSnvcFg-.js +0 -543
- package/dist-lib/index-D35Ry0PG.js +0 -1162
- package/dist-lib/index-DC57_dnh.js +0 -604
- package/dist-lib/index-DQ16Zb7x.js +0 -546
- package/dist-lib/index-DRcTwC17.js +0 -418
- package/dist-lib/index-Dd9pPAT3.js +0 -2192
- package/dist-lib/index-DxzorPvG.js +0 -13960
- package/dist-lib/index-If4xc1-H.js +0 -559
- package/dist-lib/index-R71k3nB_.js +0 -710
- package/dist-lib/index-mUlorJxp.js +0 -3279
- package/dist-lib/ontology-modeling-CvJIImxt.js +0 -3612
- package/dist-lib/ontology-scenarios-BRDkk3uA.js +0 -675
- package/dist-lib/pages-CticGC6S.js +0 -512
- package/dist-lib/use-g6-graph-SwJtPLce.js +0 -57552
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { jsx as e, jsxs as n, Fragment as
|
|
2
|
-
import {
|
|
3
|
-
import { q as Fe, s as Ve, c as $t, u as Tt, a as Oe, r as Et, d as Rt, l as xt } from "./kbTeam-
|
|
4
|
-
import { c as He, a as zt, b as Kt, l as
|
|
5
|
-
import { e as Lt, K as qe } from "./kb-form-modal-
|
|
6
|
-
import { useState as p, useCallback as Ee, useEffect as H, useRef as
|
|
1
|
+
import { jsx as e, jsxs as n, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
+
import { e as ye, I as g, u as ft, d as Ke, t as U, g as vt, v as Nt, s as yt, E as Ct, F as $e, G as Ze, J as Te, r as It, C as kt, K as wt, j as Mt, p as At, L as Be } from "./embed-CR8XVkMy.js";
|
|
3
|
+
import { q as Fe, s as Ve, c as $t, u as Tt, a as Oe, r as Et, d as Rt, l as xt } from "./kbTeam-Bh_FQH28.js";
|
|
4
|
+
import { c as He, a as zt, b as Kt, l as St, r as Pt, m as Dt } from "./changelog-Cn81Dvgk.js";
|
|
5
|
+
import { e as Lt, K as qe } from "./kb-form-modal-B0rM1ZvV.js";
|
|
6
|
+
import { useState as p, useCallback as Ee, useEffect as H, useRef as Pe, useMemo as Z, useId as _t } from "react";
|
|
7
7
|
import { u as Bt } from "./use-split-width-SsLqbGjr.js";
|
|
8
8
|
import { H as We } from "./index-mmwKYfDC.js";
|
|
9
|
-
import { a as
|
|
10
|
-
import { f as
|
|
9
|
+
import { a as Qe, R as je } from "./member-DKDx77PD.js";
|
|
10
|
+
import { f as De } from "./format-UGmYKemG.js";
|
|
11
|
+
import { u as Le } from "./chunk-YDNE64FV-DGyyfCo0.js";
|
|
11
12
|
function Ft({
|
|
12
13
|
version: t,
|
|
13
14
|
onClose: a,
|
|
@@ -23,7 +24,7 @@ function Ft({
|
|
|
23
24
|
width: 640,
|
|
24
25
|
onClose: a,
|
|
25
26
|
footLeft: "已记录到本机",
|
|
26
|
-
footRight: /* @__PURE__ */ n(
|
|
27
|
+
footRight: /* @__PURE__ */ n(Y, { children: [
|
|
27
28
|
/* @__PURE__ */ e("button", { className: "btn ghost", type: "button", onClick: a, children: "知道了" }),
|
|
28
29
|
/* @__PURE__ */ e("button", { className: "btn primary", type: "button", onClick: r, children: "查看全部更新" })
|
|
29
30
|
] }),
|
|
@@ -80,7 +81,7 @@ function Ft({
|
|
|
80
81
|
}
|
|
81
82
|
);
|
|
82
83
|
}
|
|
83
|
-
const
|
|
84
|
+
const Ge = {
|
|
84
85
|
TEAM_ADMIN: "团队管理员",
|
|
85
86
|
TEAM_MEMBER: "团队成员"
|
|
86
87
|
};
|
|
@@ -91,7 +92,7 @@ function Vt(t) {
|
|
|
91
92
|
t.employeeId
|
|
92
93
|
].filter(Boolean).join(" · ");
|
|
93
94
|
}
|
|
94
|
-
function
|
|
95
|
+
function Ue({
|
|
95
96
|
mode: t,
|
|
96
97
|
team: a,
|
|
97
98
|
onClose: r,
|
|
@@ -99,7 +100,7 @@ function Ye({
|
|
|
99
100
|
}) {
|
|
100
101
|
const { context: o } = ft(), i = (a == null ? void 0 : a.teamId) || "", [y, h] = p((a == null ? void 0 : a.name) || ""), [c, v] = p((a == null ? void 0 : a.code) || ""), [A, b] = p(
|
|
101
102
|
(a == null ? void 0 : a.visibility) || "PRIVATE"
|
|
102
|
-
), [u, k] = p((a == null ? void 0 : a.description) || ""), [x, f] = p([]), [T, w] = p([]), [z,
|
|
103
|
+
), [u, k] = p((a == null ? void 0 : a.description) || ""), [x, f] = p([]), [T, w] = p([]), [z, P] = p(""), [V, D] = p(""), [j, $] = p(!1), [X, M] = p("TEAM_MEMBER"), [I, ee] = p(t === "settings"), [G, te] = p((a == null ? void 0 : a.kbCount) ?? 0), [re, K] = p(""), [oe, de] = p(!1), [pe, B] = p(!1), J = Ee(async () => {
|
|
103
104
|
if (!i)
|
|
104
105
|
return;
|
|
105
106
|
const s = await Fe(i);
|
|
@@ -151,7 +152,7 @@ function Ye({
|
|
|
151
152
|
description: u.trim(),
|
|
152
153
|
visibility: A
|
|
153
154
|
});
|
|
154
|
-
de(!1), E !== void 0 && (
|
|
155
|
+
de(!1), E !== void 0 && (U(
|
|
155
156
|
t === "create" ? "团队已创建" : "团队设置已保存",
|
|
156
157
|
`${E.name} · ${E.visibility === "PUBLIC" ? "公开团队" : "私密团队"}`,
|
|
157
158
|
"success"
|
|
@@ -163,11 +164,11 @@ function Ye({
|
|
|
163
164
|
memberId: s.memberId,
|
|
164
165
|
role: N
|
|
165
166
|
});
|
|
166
|
-
B(!1), E !== void 0 && (
|
|
167
|
+
B(!1), E !== void 0 && (U("团队角色已更新", `${s.name || s.memberId} · ${Ge[N]}`), await J());
|
|
167
168
|
}, be = async (s) => {
|
|
168
169
|
B(!0);
|
|
169
170
|
const N = await Et(i, s.memberId);
|
|
170
|
-
B(!1), N !== void 0 && (
|
|
171
|
+
B(!1), N !== void 0 && (U("已移除成员", s.name || String(s.memberId)), await J(), await O(z));
|
|
171
172
|
}, ae = () => {
|
|
172
173
|
D(""), $(!0), O(z);
|
|
173
174
|
}, ge = (s) => {
|
|
@@ -181,12 +182,12 @@ function Ye({
|
|
|
181
182
|
memberId: F.principalId,
|
|
182
183
|
role: X
|
|
183
184
|
});
|
|
184
|
-
B(!1), s !== void 0 && (
|
|
185
|
+
B(!1), s !== void 0 && (U(
|
|
185
186
|
"已加入团队",
|
|
186
|
-
`${F.name || F.principalId} · ${
|
|
187
|
-
), D(""), await
|
|
187
|
+
`${F.name || F.principalId} · ${Ge[X]}`
|
|
188
|
+
), D(""), await J(), await O(z));
|
|
188
189
|
}, fe = x.filter((s) => s.role === "TEAM_ADMIN").length, Ce = async () => {
|
|
189
|
-
if (!(
|
|
190
|
+
if (!(G > 0 || !await vt({
|
|
190
191
|
title: "删除团队",
|
|
191
192
|
sub: `删除后「${(a == null ? void 0 : a.name) || ""}」的成员关系会一并清理,审计记录保留。`,
|
|
192
193
|
confirmText: "删除团队"
|
|
@@ -195,7 +196,7 @@ function Ye({
|
|
|
195
196
|
try {
|
|
196
197
|
if (await Rt(i, { rethrow: !0 }) === void 0)
|
|
197
198
|
return;
|
|
198
|
-
|
|
199
|
+
U("团队已删除", a == null ? void 0 : a.name, "success"), d();
|
|
199
200
|
} catch (N) {
|
|
200
201
|
K(N.message || "删除失败");
|
|
201
202
|
} finally {
|
|
@@ -210,15 +211,15 @@ function Ye({
|
|
|
210
211
|
/* @__PURE__ */ n("div", { className: "team-member-row", children: [
|
|
211
212
|
/* @__PURE__ */ n("div", { className: "nc", children: [
|
|
212
213
|
/* @__PURE__ */ e("b", { children: "删除团队" }),
|
|
213
|
-
/* @__PURE__ */ e("small", { children:
|
|
214
|
+
/* @__PURE__ */ e("small", { children: G > 0 ? `团队下还有 ${G} 个知识库,全部迁移出去后才能删除。` : "团队下已没有知识库;删除后成员关系一并清理,审计记录保留。" })
|
|
214
215
|
] }),
|
|
215
216
|
/* @__PURE__ */ n(
|
|
216
217
|
"button",
|
|
217
218
|
{
|
|
218
219
|
className: "btn danger",
|
|
219
220
|
type: "button",
|
|
220
|
-
disabled:
|
|
221
|
-
title:
|
|
221
|
+
disabled: G > 0 || oe,
|
|
222
|
+
title: G > 0 ? "请先把团队下的知识库迁移到其他团队" : void 0,
|
|
222
223
|
onClick: () => void Ce(),
|
|
223
224
|
children: [
|
|
224
225
|
/* @__PURE__ */ e(g, { name: "trash", size: 13 }),
|
|
@@ -293,7 +294,7 @@ function Ye({
|
|
|
293
294
|
"aria-label": "搜索或选择团队成员",
|
|
294
295
|
autoComplete: "off",
|
|
295
296
|
onChange: (s) => {
|
|
296
|
-
|
|
297
|
+
P(s.target.value), D(""), $(!0);
|
|
297
298
|
},
|
|
298
299
|
onFocus: () => $(!0),
|
|
299
300
|
onBlur: () => $(!1),
|
|
@@ -373,7 +374,7 @@ function Ye({
|
|
|
373
374
|
width: t === "create" ? 680 : 760,
|
|
374
375
|
onClose: r,
|
|
375
376
|
footLeft: t === "create" ? "编码创建后只读" : "团队管理员只管理团队本身",
|
|
376
|
-
footRight: /* @__PURE__ */ n(
|
|
377
|
+
footRight: /* @__PURE__ */ n(Y, { children: [
|
|
377
378
|
/* @__PURE__ */ e("button", { className: "btn", type: "button", onClick: r, children: "取消" }),
|
|
378
379
|
/* @__PURE__ */ n(
|
|
379
380
|
"button",
|
|
@@ -481,7 +482,7 @@ function Ye({
|
|
|
481
482
|
function et({
|
|
482
483
|
role: t,
|
|
483
484
|
onRoleChange: a,
|
|
484
|
-
roles: r =
|
|
485
|
+
roles: r = Qe,
|
|
485
486
|
reason: d,
|
|
486
487
|
onReasonChange: o,
|
|
487
488
|
loading: i,
|
|
@@ -537,7 +538,7 @@ function et({
|
|
|
537
538
|
const Ae = { READER: 1, KB_ADMIN: 2 };
|
|
538
539
|
function Ot(t) {
|
|
539
540
|
const a = Ae[t || ""] || 0;
|
|
540
|
-
return
|
|
541
|
+
return Qe.filter((r) => (Ae[r] || 0) > a).sort(
|
|
541
542
|
(r, d) => (Ae[r] || 0) - (Ae[d] || 0)
|
|
542
543
|
);
|
|
543
544
|
}
|
|
@@ -547,11 +548,11 @@ function tt({
|
|
|
547
548
|
onDone: r,
|
|
548
549
|
currentRole: d
|
|
549
550
|
}) {
|
|
550
|
-
const o = Ot(d), [i, y] = p(() => o[0] || "READER"), [h, c] = p(""), [v, A] = p(""), [b, u] = p(0), [k, x] = p(!1), [f, T] = p(!1), [w, z] = p(!1),
|
|
551
|
+
const o = Ot(d), [i, y] = p(() => o[0] || "READER"), [h, c] = p(""), [v, A] = p(""), [b, u] = p(0), [k, x] = p(!1), [f, T] = p(!1), [w, z] = p(!1), P = Pe(!1);
|
|
551
552
|
H(() => {
|
|
552
|
-
if (!a ||
|
|
553
|
+
if (!a || P.current)
|
|
553
554
|
return;
|
|
554
|
-
|
|
555
|
+
P.current = !0, (async () => {
|
|
555
556
|
var X;
|
|
556
557
|
x(!0), T(!1);
|
|
557
558
|
try {
|
|
@@ -576,13 +577,13 @@ function tt({
|
|
|
576
577
|
reason: h.trim() || void 0,
|
|
577
578
|
resourceCodes: []
|
|
578
579
|
});
|
|
579
|
-
|
|
580
|
+
U(
|
|
580
581
|
"审批已发起",
|
|
581
582
|
`${$.code} · 已通知${$.currentApproverName || "知识管理者"}`,
|
|
582
583
|
"success"
|
|
583
584
|
), r($);
|
|
584
585
|
} catch ($) {
|
|
585
|
-
|
|
586
|
+
U("发起审批失败", $ instanceof Error ? $.message : "请稍后重试", "error");
|
|
586
587
|
} finally {
|
|
587
588
|
z(!1);
|
|
588
589
|
}
|
|
@@ -630,7 +631,7 @@ function Ht({
|
|
|
630
631
|
}
|
|
631
632
|
),
|
|
632
633
|
footLeft: /* @__PURE__ */ e("span", { className: "mono", children: t.code }),
|
|
633
|
-
footRight: /* @__PURE__ */ n(
|
|
634
|
+
footRight: /* @__PURE__ */ n(Y, { children: [
|
|
634
635
|
/* @__PURE__ */ e("button", { className: "btn", type: "button", onClick: r, children: "取消" }),
|
|
635
636
|
/* @__PURE__ */ n(
|
|
636
637
|
"button",
|
|
@@ -656,7 +657,7 @@ function qt({
|
|
|
656
657
|
onSubmitted: d,
|
|
657
658
|
onOpenTicket: o
|
|
658
659
|
}) {
|
|
659
|
-
const [i, y] = p(!1), h = tt({ kb: t, active: i, onDone: d }), c =
|
|
660
|
+
const [i, y] = p(!1), h = tt({ kb: t, active: i, onDone: d }), c = Pe(null);
|
|
660
661
|
return H(() => {
|
|
661
662
|
var v;
|
|
662
663
|
i && ((v = c.current) == null || v.focus({ preventScroll: !1 }));
|
|
@@ -674,7 +675,7 @@ function qt({
|
|
|
674
675
|
/* @__PURE__ */ e("b", { title: t.name, children: t.name }),
|
|
675
676
|
/* @__PURE__ */ n("div", { className: `kb-denied-meta${a ? " pending" : ""}`, children: [
|
|
676
677
|
/* @__PURE__ */ e("span", { className: "mono", children: t.code }),
|
|
677
|
-
a ? /* @__PURE__ */ n(
|
|
678
|
+
a ? /* @__PURE__ */ n(Y, { children: [
|
|
678
679
|
/* @__PURE__ */ e("span", { className: "kb-denied-sep", "aria-hidden": "true", children: "·" }),
|
|
679
680
|
/* @__PURE__ */ n("span", { className: "kb-denied-note", children: [
|
|
680
681
|
"等待 ",
|
|
@@ -717,10 +718,10 @@ function qt({
|
|
|
717
718
|
}
|
|
718
719
|
)
|
|
719
720
|
] }),
|
|
720
|
-
footRight: a ? /* @__PURE__ */ n(
|
|
721
|
+
footRight: a ? /* @__PURE__ */ n(Y, { children: [
|
|
721
722
|
/* @__PURE__ */ e("button", { className: "btn", type: "button", onClick: r, children: "暂不申请" }),
|
|
722
723
|
/* @__PURE__ */ e("button", { className: "btn primary", type: "button", onClick: o, children: "查看进度" })
|
|
723
|
-
] }) : /* @__PURE__ */ n(
|
|
724
|
+
] }) : /* @__PURE__ */ n(Y, { children: [
|
|
724
725
|
/* @__PURE__ */ e("button", { className: "btn", type: "button", onClick: r, children: "暂不申请" }),
|
|
725
726
|
i ? /* @__PURE__ */ n(
|
|
726
727
|
"button",
|
|
@@ -754,7 +755,7 @@ function Wt({ kb: t, onClose: a, onDeleted: r }) {
|
|
|
754
755
|
return;
|
|
755
756
|
y(!0);
|
|
756
757
|
const v = await Ct(t.kbId);
|
|
757
|
-
y(!1), v !== void 0 && (
|
|
758
|
+
y(!1), v !== void 0 && (U("知识库已删除", t.name, "success"), r());
|
|
758
759
|
};
|
|
759
760
|
return /* @__PURE__ */ e(
|
|
760
761
|
ye,
|
|
@@ -765,7 +766,7 @@ function Wt({ kb: t, onClose: a, onDeleted: r }) {
|
|
|
765
766
|
width: 620,
|
|
766
767
|
onClose: a,
|
|
767
768
|
footLeft: "删除后编码被改写,记录不再返回列表",
|
|
768
|
-
footRight: /* @__PURE__ */ n(
|
|
769
|
+
footRight: /* @__PURE__ */ n(Y, { children: [
|
|
769
770
|
/* @__PURE__ */ e("button", { className: "btn", type: "button", onClick: a, children: "取消" }),
|
|
770
771
|
/* @__PURE__ */ n(
|
|
771
772
|
"button",
|
|
@@ -826,15 +827,15 @@ function Wt({ kb: t, onClose: a, onDeleted: r }) {
|
|
|
826
827
|
}
|
|
827
828
|
);
|
|
828
829
|
}
|
|
829
|
-
function
|
|
830
|
+
function Ye(t) {
|
|
830
831
|
return t < 10 ? `0${t}` : String(t);
|
|
831
832
|
}
|
|
832
833
|
function jt(t) {
|
|
833
|
-
return `${t.getFullYear()}-${
|
|
834
|
+
return `${t.getFullYear()}-${Ye(t.getMonth() + 1)}-${Ye(
|
|
834
835
|
t.getDate()
|
|
835
836
|
)}`;
|
|
836
837
|
}
|
|
837
|
-
function
|
|
838
|
+
function Gt(t, a) {
|
|
838
839
|
const r = /* @__PURE__ */ new Map();
|
|
839
840
|
for (const h of t || []) {
|
|
840
841
|
const c = Number(h.count) || 0;
|
|
@@ -853,20 +854,20 @@ function Ut(t, a) {
|
|
|
853
854
|
const y = o.reduce((h, c) => Math.max(h, c.count), 0);
|
|
854
855
|
return { buckets: o, total: i, max: y };
|
|
855
856
|
}
|
|
856
|
-
const nt = 30, Xe = 96,
|
|
857
|
-
function
|
|
858
|
-
const r = (a - Re * 2) / Math.max(t.buckets.length - 1, 1), d =
|
|
857
|
+
const nt = 30, Xe = 96, Q = 18, Re = 1, xe = 2;
|
|
858
|
+
function Ut(t, a) {
|
|
859
|
+
const r = (a - Re * 2) / Math.max(t.buckets.length - 1, 1), d = Q - xe * 2;
|
|
859
860
|
return t.buckets.map((o, i) => ({
|
|
860
861
|
x: Re + i * r,
|
|
861
|
-
y:
|
|
862
|
+
y: Q - xe - (t.max > 0 ? o.count / t.max * d : 0)
|
|
862
863
|
}));
|
|
863
864
|
}
|
|
864
|
-
function
|
|
865
|
+
function Yt(t) {
|
|
865
866
|
if (t.length === 0)
|
|
866
867
|
return "";
|
|
867
868
|
if (t.length === 1)
|
|
868
869
|
return `M${t[0].x},${t[0].y}`;
|
|
869
|
-
const a = (d) => Math.min(
|
|
870
|
+
const a = (d) => Math.min(Q - xe, Math.max(xe, d));
|
|
870
871
|
let r = `M${t[0].x},${t[0].y}`;
|
|
871
872
|
for (let d = 0; d < t.length - 1; d += 1) {
|
|
872
873
|
const o = t[d - 1] || t[d], i = t[d], y = t[d + 1], h = t[d + 2] || y, c = i.x + (y.x - o.x) / 6, v = a(i.y + (y.y - o.y) / 6), A = y.x - (h.x - i.x) / 6, b = a(y.y - (h.y - i.y) / 6);
|
|
@@ -883,19 +884,19 @@ function at({
|
|
|
883
884
|
unavailable: r = !1,
|
|
884
885
|
spanDays: d = nt
|
|
885
886
|
}) {
|
|
886
|
-
const o = Z(() =>
|
|
887
|
+
const o = Z(() => Gt(t, d), [t, d]), i = `kb-act-${_t().replace(/[^a-zA-Z0-9_-]/g, "")}`, y = Pe(null), [h, c] = p(Xe);
|
|
887
888
|
H(() => {
|
|
888
889
|
const f = y.current;
|
|
889
890
|
if (!f || typeof ResizeObserver > "u")
|
|
890
891
|
return;
|
|
891
892
|
const T = new ResizeObserver((w) => {
|
|
892
|
-
var
|
|
893
|
-
const z = Math.round(((
|
|
893
|
+
var P;
|
|
894
|
+
const z = Math.round(((P = w[0]) == null ? void 0 : P.contentRect.width) || 0);
|
|
894
895
|
z > 0 && c(Math.max(z, Xe));
|
|
895
896
|
});
|
|
896
897
|
return T.observe(f), () => T.disconnect();
|
|
897
898
|
}, []);
|
|
898
|
-
const v = r ? "活跃度数据暂不可用" : a ? "正在加载活跃度" : `近 ${d} 天共 ${o.total} 次操作`, A = r ? "—" : a ? "…" : `${o.total} 次`, b =
|
|
899
|
+
const v = r ? "活跃度数据暂不可用" : a ? "正在加载活跃度" : `近 ${d} 天共 ${o.total} 次操作`, A = r ? "—" : a ? "…" : `${o.total} 次`, b = Ut(o, h), u = Yt(b), k = (h - Re * 2) / Math.max(o.buckets.length - 1, 1), x = r || o.max === 0;
|
|
899
900
|
return /* @__PURE__ */ n(
|
|
900
901
|
"span",
|
|
901
902
|
{
|
|
@@ -906,8 +907,8 @@ function at({
|
|
|
906
907
|
"svg",
|
|
907
908
|
{
|
|
908
909
|
width: h,
|
|
909
|
-
height:
|
|
910
|
-
viewBox: `0 0 ${h} ${
|
|
910
|
+
height: Q,
|
|
911
|
+
viewBox: `0 0 ${h} ${Q}`,
|
|
911
912
|
role: "img",
|
|
912
913
|
"aria-label": v,
|
|
913
914
|
children: [
|
|
@@ -920,7 +921,7 @@ function at({
|
|
|
920
921
|
{
|
|
921
922
|
className: "area",
|
|
922
923
|
fill: `url(#${i})`,
|
|
923
|
-
d: `${u} L${b[b.length - 1].x},${
|
|
924
|
+
d: `${u} L${b[b.length - 1].x},${Q} L${b[0].x},${Q} Z`
|
|
924
925
|
}
|
|
925
926
|
),
|
|
926
927
|
/* @__PURE__ */ e("path", { className: "line", d: u }),
|
|
@@ -940,7 +941,7 @@ function at({
|
|
|
940
941
|
x: Re + T * k - k / 2,
|
|
941
942
|
y: 0,
|
|
942
943
|
width: k,
|
|
943
|
-
height:
|
|
944
|
+
height: Q,
|
|
944
945
|
children: /* @__PURE__ */ e("title", { children: `${Xt(f.start)} · ${f.count > 0 ? `${f.count} 次操作` : "无操作"}` })
|
|
945
946
|
},
|
|
946
947
|
f.start
|
|
@@ -957,11 +958,11 @@ const ue = 20;
|
|
|
957
958
|
function q(t) {
|
|
958
959
|
return t.scopeType === "TEAM";
|
|
959
960
|
}
|
|
960
|
-
function
|
|
961
|
+
function Se(t) {
|
|
961
962
|
return !q(t) && t.role != null;
|
|
962
963
|
}
|
|
963
964
|
function _e(t) {
|
|
964
|
-
return q(t) ? `团队 · ${t.teamName || t.teamId || "未知团队"}` :
|
|
965
|
+
return q(t) ? `团队 · ${t.teamName || t.teamId || "未知团队"}` : Se(t) ? "个人 · 我的" : "个人";
|
|
965
966
|
}
|
|
966
967
|
function lt(t) {
|
|
967
968
|
return t.ownerName || (t.ownerId ? `actorId ${t.ownerId}` : "未知");
|
|
@@ -972,7 +973,7 @@ function st(t) {
|
|
|
972
973
|
function it(t) {
|
|
973
974
|
return t.role === "READER" && !t.canManage;
|
|
974
975
|
}
|
|
975
|
-
function
|
|
976
|
+
function Jt({ status: t }) {
|
|
976
977
|
const a = Ze(t);
|
|
977
978
|
return /* @__PURE__ */ n("span", { className: `tag ${a.tag}`, children: [
|
|
978
979
|
/* @__PURE__ */ e("i", { className: "dot" }),
|
|
@@ -993,7 +994,7 @@ function Zt({
|
|
|
993
994
|
onDenied: A
|
|
994
995
|
}) {
|
|
995
996
|
var x;
|
|
996
|
-
const b =
|
|
997
|
+
const b = Le(), u = st(t), k = y;
|
|
997
998
|
return /* @__PURE__ */ n(
|
|
998
999
|
"article",
|
|
999
1000
|
{
|
|
@@ -1024,7 +1025,7 @@ function Zt({
|
|
|
1024
1025
|
/* @__PURE__ */ e("span", { className: `tag ${u ? t.canManage ? "violet" : "brown" : "gray"}`, children: u ? t.canManage ? "可管理" : "只读" : "无权限" }),
|
|
1025
1026
|
/* @__PURE__ */ e("span", { className: `tag ${q(t) ? "violet" : "gray"}`, children: _e(t) }),
|
|
1026
1027
|
/* @__PURE__ */ e("span", { className: "tag cyan mono", children: t.embeddingModel || "默认模型" }),
|
|
1027
|
-
/* @__PURE__ */ e(
|
|
1028
|
+
/* @__PURE__ */ e(Jt, { status: t.status }),
|
|
1028
1029
|
/* @__PURE__ */ n(
|
|
1029
1030
|
"span",
|
|
1030
1031
|
{
|
|
@@ -1044,7 +1045,7 @@ function Zt({
|
|
|
1044
1045
|
"创建者 · ",
|
|
1045
1046
|
lt(t)
|
|
1046
1047
|
] }),
|
|
1047
|
-
/* @__PURE__ */ e("span", { className: "kb-updated", title: "最近更新", children:
|
|
1048
|
+
/* @__PURE__ */ e("span", { className: "kb-updated", title: "最近更新", children: De(t.updateTime) })
|
|
1048
1049
|
] }),
|
|
1049
1050
|
/* @__PURE__ */ n("div", { className: "kb-foot", children: [
|
|
1050
1051
|
/* @__PURE__ */ e(
|
|
@@ -1111,7 +1112,7 @@ function Zt({
|
|
|
1111
1112
|
}
|
|
1112
1113
|
);
|
|
1113
1114
|
}
|
|
1114
|
-
function
|
|
1115
|
+
function Je({
|
|
1115
1116
|
note: t,
|
|
1116
1117
|
pageCount: a,
|
|
1117
1118
|
pageNo: r,
|
|
@@ -1157,7 +1158,7 @@ function Qe({
|
|
|
1157
1158
|
] })
|
|
1158
1159
|
] });
|
|
1159
1160
|
}
|
|
1160
|
-
function
|
|
1161
|
+
function Qt({
|
|
1161
1162
|
pageRecords: t,
|
|
1162
1163
|
favorites: a,
|
|
1163
1164
|
pendingAccess: r,
|
|
@@ -1170,7 +1171,7 @@ function Jt({
|
|
|
1170
1171
|
onRequestAccess: v,
|
|
1171
1172
|
onDenied: A
|
|
1172
1173
|
}) {
|
|
1173
|
-
const b =
|
|
1174
|
+
const b = Le();
|
|
1174
1175
|
return /* @__PURE__ */ n("section", { className: "panel", children: [
|
|
1175
1176
|
/* @__PURE__ */ e("div", { className: "table-wrap", children: /* @__PURE__ */ n("table", { className: "list-table", children: [
|
|
1176
1177
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { children: [
|
|
@@ -1273,7 +1274,7 @@ function Jt({
|
|
|
1273
1274
|
children: "申请权限"
|
|
1274
1275
|
}
|
|
1275
1276
|
) }),
|
|
1276
|
-
/* @__PURE__ */ e("td", { className: "mono-sm", children:
|
|
1277
|
+
/* @__PURE__ */ e("td", { className: "mono-sm", children: De(u.updateTime) }),
|
|
1277
1278
|
/* @__PURE__ */ e("td", { className: "col-activity", children: /* @__PURE__ */ e(
|
|
1278
1279
|
at,
|
|
1279
1280
|
{
|
|
@@ -1499,7 +1500,7 @@ function tn({
|
|
|
1499
1500
|
/* @__PURE__ */ e("td", { children: c.myRole === "TEAM_ADMIN" ? /* @__PURE__ */ e("span", { className: "tag violet sm", children: "管理员" }) : c.myRole === "TEAM_MEMBER" ? /* @__PURE__ */ e("span", { className: "tag gray sm", children: "成员" }) : "—" }),
|
|
1500
1501
|
/* @__PURE__ */ e("td", { className: "tnum", children: c.memberCount ?? 0 }),
|
|
1501
1502
|
/* @__PURE__ */ e("td", { className: "tnum", children: c.kbCount ?? 0 }),
|
|
1502
|
-
/* @__PURE__ */ e("td", { className: "mono-sm", children:
|
|
1503
|
+
/* @__PURE__ */ e("td", { className: "mono-sm", children: De(c.createTime) }),
|
|
1503
1504
|
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ n("div", { className: "row-actions kb-row-actions", children: [
|
|
1504
1505
|
/* @__PURE__ */ e(
|
|
1505
1506
|
"button",
|
|
@@ -1601,10 +1602,10 @@ function hn(t, a) {
|
|
|
1601
1602
|
};
|
|
1602
1603
|
}, [a]), { activity: r, activityLoadedKey: o, activityFailedKey: y };
|
|
1603
1604
|
}
|
|
1604
|
-
function
|
|
1605
|
-
const t =
|
|
1605
|
+
function wn() {
|
|
1606
|
+
const t = Le(), a = wt(), [r] = p(cn), [d, o] = p(
|
|
1606
1607
|
(r == null ? void 0 : r.records) ?? []
|
|
1607
|
-
), [i, y] = p((r == null ? void 0 : r.teams) ?? []), [h, c] = p(!r), [v, A] = p(""), [b, u] = p("personal"), [k, x] = p(""), [f, T] = p("mine"), [w, z] = p(""), [
|
|
1608
|
+
), [i, y] = p((r == null ? void 0 : r.teams) ?? []), [h, c] = p(!r), [v, A] = p(""), [b, u] = p("personal"), [k, x] = p(""), [f, T] = p("mine"), [w, z] = p(""), [P, V] = p("cards"), [D, j] = p(1), [$, X] = p(nn), [M, I] = p(null), [ee, G] = p(
|
|
1608
1609
|
null
|
|
1609
1610
|
), [te, re] = p({}), K = Ee(async (l = {}) => {
|
|
1610
1611
|
l.silent || c(!0), A("");
|
|
@@ -1616,8 +1617,8 @@ function kn() {
|
|
|
1616
1617
|
),
|
|
1617
1618
|
xt({ rethrow: !0 }).catch(() => {
|
|
1618
1619
|
})
|
|
1619
|
-
]), R = (m == null ? void 0 : m.records) || [],
|
|
1620
|
-
o(R), y(
|
|
1620
|
+
]), R = (m == null ? void 0 : m.records) || [], S = C || [];
|
|
1621
|
+
o(R), y(S), rn({ records: R, teams: S }), Lt();
|
|
1621
1622
|
} catch (m) {
|
|
1622
1623
|
A(m.message || "服务器错误");
|
|
1623
1624
|
} finally {
|
|
@@ -1630,8 +1631,8 @@ function kn() {
|
|
|
1630
1631
|
an($);
|
|
1631
1632
|
}, [$]), H(() => {
|
|
1632
1633
|
let l = !1;
|
|
1633
|
-
return
|
|
1634
|
-
l || !m || !m.versionCode || m.versionCode !==
|
|
1634
|
+
return St().then((m) => {
|
|
1635
|
+
l || !m || !m.versionCode || m.versionCode !== Pt() && (G(m), Dt(m.versionCode));
|
|
1635
1636
|
}).catch(() => {
|
|
1636
1637
|
}), () => {
|
|
1637
1638
|
l = !0;
|
|
@@ -1663,24 +1664,24 @@ function kn() {
|
|
|
1663
1664
|
return C !== 0 ? C : String(m.kbId).localeCompare(String(l.kbId));
|
|
1664
1665
|
}),
|
|
1665
1666
|
[d]
|
|
1666
|
-
),
|
|
1667
|
+
), J = Z(() => {
|
|
1667
1668
|
const l = /* @__PURE__ */ new Map();
|
|
1668
|
-
i.forEach((
|
|
1669
|
-
const ie =
|
|
1670
|
-
ce ? ce.push(
|
|
1669
|
+
i.forEach((S) => {
|
|
1670
|
+
const ie = S.parentTeamId || "", ce = l.get(ie);
|
|
1671
|
+
ce ? ce.push(S) : l.set(ie, [S]);
|
|
1671
1672
|
});
|
|
1672
|
-
const m = [], C = /* @__PURE__ */ new Set(), R = (
|
|
1673
|
-
(l.get(
|
|
1673
|
+
const m = [], C = /* @__PURE__ */ new Set(), R = (S, ie) => {
|
|
1674
|
+
(l.get(S) || []).forEach((ce) => {
|
|
1674
1675
|
C.has(ce.teamId) || (C.add(ce.teamId), m.push({ team: ce, depth: ie }), R(ce.teamId, ie + 1));
|
|
1675
1676
|
});
|
|
1676
1677
|
};
|
|
1677
|
-
return R("", 0), i.filter((
|
|
1678
|
+
return R("", 0), i.filter((S) => !C.has(S.teamId)).sort((S, ie) => S.name.localeCompare(ie.name, "zh")).forEach((S) => m.push({ team: S, depth: 0 })), m;
|
|
1678
1679
|
}, [i]), O = Z(
|
|
1679
1680
|
() => i.find((l) => l.teamId === k),
|
|
1680
1681
|
[k, i]
|
|
1681
1682
|
), F = Z(() => {
|
|
1682
1683
|
const l = w.trim();
|
|
1683
|
-
return l ?
|
|
1684
|
+
return l ? J.filter(
|
|
1684
1685
|
({ team: m }) => Ke(
|
|
1685
1686
|
l,
|
|
1686
1687
|
m.name,
|
|
@@ -1689,8 +1690,8 @@ function kn() {
|
|
|
1689
1690
|
m.visibility === "PRIVATE" ? "私有团队" : "公开团队",
|
|
1690
1691
|
m.myRole === "TEAM_ADMIN" ? "管理员" : m.myRole === "TEAM_MEMBER" ? "成员" : ""
|
|
1691
1692
|
)
|
|
1692
|
-
) :
|
|
1693
|
-
}, [w,
|
|
1693
|
+
) : J;
|
|
1694
|
+
}, [w, J]), L = Z(() => {
|
|
1694
1695
|
if (b === "personal")
|
|
1695
1696
|
return B.filter((m) => !q(m));
|
|
1696
1697
|
if (b === "team") {
|
|
@@ -1711,7 +1712,7 @@ function kn() {
|
|
|
1711
1712
|
}, [k, b, B, i]), _ = Z(
|
|
1712
1713
|
() => ({
|
|
1713
1714
|
total: L.length,
|
|
1714
|
-
mine: L.filter(
|
|
1715
|
+
mine: L.filter(Se).length,
|
|
1715
1716
|
active: L.filter((l) => l.status === "ACTIVE").length,
|
|
1716
1717
|
archived: L.filter((l) => l.status === "ARCHIVED").length,
|
|
1717
1718
|
managed: L.filter((l) => l.canManage).length,
|
|
@@ -1720,7 +1721,7 @@ function kn() {
|
|
|
1720
1721
|
[$, L]
|
|
1721
1722
|
), ne = Z(() => {
|
|
1722
1723
|
let l = L;
|
|
1723
|
-
f === "mine" ? l = l.filter(
|
|
1724
|
+
f === "mine" ? l = l.filter(Se) : f === "managed" ? l = l.filter((C) => C.canManage) : f === "favorite" ? l = l.filter((C) => $.includes(C.kbId)) : f !== "all" && (l = l.filter((C) => C.status === f));
|
|
1724
1725
|
const m = w.trim();
|
|
1725
1726
|
return m && (l = l.filter(
|
|
1726
1727
|
(C) => Ke(
|
|
@@ -1744,7 +1745,7 @@ function kn() {
|
|
|
1744
1745
|
le
|
|
1745
1746
|
), ke = (l) => {
|
|
1746
1747
|
const m = ln($, l);
|
|
1747
|
-
X(m),
|
|
1748
|
+
X(m), U(m.includes(l) ? "已收藏" : "已取消收藏", void 0, "info");
|
|
1748
1749
|
}, s = (l) => {
|
|
1749
1750
|
t(`/knowledge-bases/${encodeURIComponent(l.kbId)}`);
|
|
1750
1751
|
}, N = (l) => /* @__PURE__ */ e(
|
|
@@ -1764,9 +1765,9 @@ function kn() {
|
|
|
1764
1765
|
},
|
|
1765
1766
|
l.kbId
|
|
1766
1767
|
), E = /* @__PURE__ */ e(
|
|
1767
|
-
|
|
1768
|
+
Je,
|
|
1768
1769
|
{
|
|
1769
|
-
note: /* @__PURE__ */ n(
|
|
1770
|
+
note: /* @__PURE__ */ n(Y, { children: [
|
|
1770
1771
|
"共 ",
|
|
1771
1772
|
ne.length,
|
|
1772
1773
|
" 个知识库 · 第 ",
|
|
@@ -1786,9 +1787,9 @@ function kn() {
|
|
|
1786
1787
|
(we - 1) * ue,
|
|
1787
1788
|
we * ue
|
|
1788
1789
|
), ot = /* @__PURE__ */ e(
|
|
1789
|
-
|
|
1790
|
+
Je,
|
|
1790
1791
|
{
|
|
1791
|
-
note: /* @__PURE__ */ n(
|
|
1792
|
+
note: /* @__PURE__ */ n(Y, { children: [
|
|
1792
1793
|
"共 ",
|
|
1793
1794
|
F.length,
|
|
1794
1795
|
" 个团队 · 第 ",
|
|
@@ -1868,8 +1869,8 @@ function kn() {
|
|
|
1868
1869
|
onCreateTeam: () => I({ type: "team-create" }),
|
|
1869
1870
|
onClearKeyword: () => z("")
|
|
1870
1871
|
}
|
|
1871
|
-
) : ne.length ?
|
|
1872
|
-
|
|
1872
|
+
) : ne.length ? P === "cards" ? se = /* @__PURE__ */ e("div", { className: "kb-grid", children: ge.map(N) }) : se = /* @__PURE__ */ e(
|
|
1873
|
+
Qt,
|
|
1873
1874
|
{
|
|
1874
1875
|
pageRecords: ge,
|
|
1875
1876
|
favorites: $,
|
|
@@ -1919,7 +1920,7 @@ function kn() {
|
|
|
1919
1920
|
{
|
|
1920
1921
|
scope: b,
|
|
1921
1922
|
activeTeamId: k,
|
|
1922
|
-
teamRows:
|
|
1923
|
+
teamRows: J,
|
|
1923
1924
|
personalCount: ht,
|
|
1924
1925
|
teamCount: i.length,
|
|
1925
1926
|
onSwitchScope: me,
|
|
@@ -1971,7 +1972,7 @@ function kn() {
|
|
|
1971
1972
|
/* @__PURE__ */ n(
|
|
1972
1973
|
"button",
|
|
1973
1974
|
{
|
|
1974
|
-
className:
|
|
1975
|
+
className: P === "cards" ? "active" : "",
|
|
1975
1976
|
type: "button",
|
|
1976
1977
|
onClick: () => V("cards"),
|
|
1977
1978
|
children: [
|
|
@@ -1983,7 +1984,7 @@ function kn() {
|
|
|
1983
1984
|
/* @__PURE__ */ n(
|
|
1984
1985
|
"button",
|
|
1985
1986
|
{
|
|
1986
|
-
className:
|
|
1987
|
+
className: P === "table" ? "active" : "",
|
|
1987
1988
|
type: "button",
|
|
1988
1989
|
onClick: () => V("table"),
|
|
1989
1990
|
children: [
|
|
@@ -2020,19 +2021,19 @@ function kn() {
|
|
|
2020
2021
|
/* @__PURE__ */ e(
|
|
2021
2022
|
"div",
|
|
2022
2023
|
{
|
|
2023
|
-
className: `kb-list-results ${b === "teams" ? "table" :
|
|
2024
|
+
className: `kb-list-results ${b === "teams" ? "table" : P}`,
|
|
2024
2025
|
children: se
|
|
2025
2026
|
}
|
|
2026
2027
|
),
|
|
2027
|
-
b !== "teams" && ne.length > 0 &&
|
|
2028
|
+
b !== "teams" && ne.length > 0 && P !== "table" ? E : null
|
|
2028
2029
|
] }),
|
|
2029
2030
|
ee ? /* @__PURE__ */ e(
|
|
2030
2031
|
Ft,
|
|
2031
2032
|
{
|
|
2032
2033
|
version: ee,
|
|
2033
|
-
onClose: () =>
|
|
2034
|
+
onClose: () => G(null),
|
|
2034
2035
|
onOpenAll: () => {
|
|
2035
|
-
|
|
2036
|
+
G(null), t("/admin/changelog");
|
|
2036
2037
|
}
|
|
2037
2038
|
}
|
|
2038
2039
|
) : null,
|
|
@@ -2061,7 +2062,7 @@ function kn() {
|
|
|
2061
2062
|
}
|
|
2062
2063
|
) : null,
|
|
2063
2064
|
M && M.type === "team-create" ? /* @__PURE__ */ e(
|
|
2064
|
-
|
|
2065
|
+
Ue,
|
|
2065
2066
|
{
|
|
2066
2067
|
mode: "create",
|
|
2067
2068
|
onClose: () => I(null),
|
|
@@ -2071,7 +2072,7 @@ function kn() {
|
|
|
2071
2072
|
}
|
|
2072
2073
|
) : null,
|
|
2073
2074
|
M && M.type === "team-settings" ? /* @__PURE__ */ e(
|
|
2074
|
-
|
|
2075
|
+
Ue,
|
|
2075
2076
|
{
|
|
2076
2077
|
mode: "settings",
|
|
2077
2078
|
team: M.team,
|
|
@@ -2136,5 +2137,5 @@ function kn() {
|
|
|
2136
2137
|
);
|
|
2137
2138
|
}
|
|
2138
2139
|
export {
|
|
2139
|
-
|
|
2140
|
+
wn as default
|
|
2140
2141
|
};
|