@yuku123/z-team-component 0.2.90 → 0.2.92
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/{ChangeLogView-DagOxr6O.js → ChangeLogView-DMVBdFFX.js} +12 -12
- package/dist/ComponentDoc-Boc9n2c_.js +8035 -0
- package/dist/{InvitationManagementPage-BWeW0h7p.js → InvitationManagementPage-B4UJQBrv.js} +1 -1
- package/dist/{OnboardingPage-tW2xXPui.js → OnboardingPage-BuDvSKMx.js} +2 -2
- package/dist/ScheduledTasks-DY4iYtX3.js +10851 -0
- package/dist/{SystemShell-CSiNt2JL.js → SystemShell-UVZjsfJs.js} +11 -12
- package/dist/admin-logs-OIyOdfuC.js +198 -0
- package/dist/{api-WqoLUPy-.js → api-mJ7FvgsR.js} +1 -1
- package/dist/createWorkspaceWsHandler-9k7O4P-D.js +13135 -0
- package/dist/{index-B5dDwxhs.js → index-BMt6Z1yA.js} +1 -1
- package/dist/{index-7iEmueKf.js → index-Bi6mbk7-.js} +6 -7
- package/dist/{index-B8mikT45.js → index-BxRNZbw5.js} +3 -3
- package/dist/{index-DcHrkop2.js → index-C2LwqjZQ.js} +23 -24
- package/dist/{index-DKWvNjHa.js → index-COLSSd6V.js} +2 -2
- package/dist/{index-pScDd5cp.js → index-CYe2nfiG.js} +90 -91
- package/dist/{index-DyFaoD5W.js → index-CeYCMcgX.js} +11 -12
- package/dist/index-Ckpc_Z6-.js +3495 -0
- package/dist/{index-BMQ6XkO3.js → index-CpA8ev3a.js} +1 -1
- package/dist/{index-VGtET31b.js → index-CpwvgQ3b.js} +1 -1
- package/dist/{index-DS4IgliO.js → index-CsHpsX_P.js} +2 -2
- package/dist/{index-v3WaXkDJ.js → index-CwNtNKwX.js} +8 -9
- package/dist/index-D1odHNMR.js +316 -0
- package/dist/{index-Pt4RiXWL.js → index-D74FCwtx.js} +3629 -3473
- package/dist/{index-NCoTXpQ0.js → index-D83QI-17.js} +4 -4
- package/dist/{index-DBEdsfjb.js → index-DeHC7MtX.js} +5 -6
- package/dist/{index-B51WSpDM.js → index-FAhDAnIy.js} +1257 -1258
- package/dist/{index-ji8TPz9K.js → index-GHQ4Tl6H.js} +10 -11
- package/dist/{index-iCpFhLce.js → index-Gk-5X-GO.js} +1 -1
- package/dist/{index-BxBGVGKQ.js → index-Hm6ZaRmP.js} +10 -11
- package/dist/{index-s_ikMJ2V.js → index-TW4txhve.js} +1 -1
- package/dist/{index-Ds6Ac0UE.js → index-kwnNAAM0.js} +19 -18
- package/dist/{index-BIbkA-jX.js → index-r4IxoITP.js} +23 -23
- package/dist/{index-CGSWoJJv.js → index-s5yeUpMA.js} +19 -19
- package/dist/{index-MYohlrH6.js → index-zEqjsTFh.js} +5 -6
- package/dist/index.js +1 -1
- package/dist/{instance-CI6-4BZ6.js → instance-BpY3BXci.js} +1 -1
- package/dist/{menuPermission-BqZsG_Fz.js → menuPermission-DX8KlB6K.js} +11 -11
- package/dist/pages.js +8 -8
- package/dist/{send-default-agent-team-message-c5oKdQQA.js → send-default-agent-team-message-DVFuAdE9.js} +1 -1
- package/dist/{sso-user-DToM5dPy.js → sso-user-BBkFFo35.js} +1 -1
- package/dist/{training-B38tnwLL.js → training-BCi9cA6O.js} +1 -1
- package/dist/webide-MQ5gD1Go.js +5233 -0
- package/dist/z-team-component.css +1 -26
- package/package.json +3 -2
- package/dist/ComponentDoc-DgjWNYvc.js +0 -3998
- package/dist/ScheduledTasks-2X5KfwFi.js +0 -10717
- package/dist/api-BftpestH.js +0 -2156
- package/dist/createWorkspaceWsHandler-rKc7vc8k.js +0 -13030
- package/dist/index-CUVdeb8y.js +0 -638
- package/dist/index-ClRT3ECx.js +0 -3488
- package/dist/personal-D-eMMf0_.js +0 -294
- package/dist/schedule-ChO2xIGd.js +0 -625
- package/dist/useAppStore-BFO_h1L2.js +0 -1920
- package/dist/webide-DTZ46LPR.js +0 -8399
|
@@ -6,10 +6,9 @@ import { useState as F, useRef as fp, useEffect as Y, useMemo as Wp, useCallback
|
|
|
6
6
|
import Vp, { defaultUrlTransform as KA } from "react-markdown";
|
|
7
7
|
import gp from "rehype-highlight";
|
|
8
8
|
import Jp from "remark-gfm";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { d as RA, e as NA, f as kA, g as WA, h as Cp, j as DA, k as qA, r as uA, l as mA, m as wA, n as BA, o as GA, p as LA, q as zA, t as VA } from "./createWorkspaceWsHandler-rKc7vc8k.js";
|
|
9
|
+
import { ab as xa, ac as jA, d as Dp } from "./ComponentDoc-Boc9n2c_.js";
|
|
10
|
+
import { H as ia, I as oA, J as fA, K as lA, i as xA, M as iA, O as cA, Q as TA, V as vA, X as up, Y as Yp, Z as mp, _ as yp, $ as Ip, a0 as FA, a1 as dA, a2 as OA, a3 as XA } from "./index-D74FCwtx.js";
|
|
11
|
+
import { d as RA, e as NA, f as kA, g as WA, h as Cp, j as DA, k as qA, r as uA, l as mA, m as wA, n as BA, o as GA, p as LA, q as zA, t as VA } from "./createWorkspaceWsHandler-9k7O4P-D.js";
|
|
13
12
|
import { h as r } from "./index.module-CAa-2T7m.js";
|
|
14
13
|
const gA = "_editorView_as93v_7", JA = "_editorTopBar_as93v_16", bA = "_backBtn_as93v_25", MA = "_titleInput_as93v_39", sA = "_summaryBar_as93v_50", QA = "_summaryInput_as93v_55", hA = "_mdToolbar_as93v_67", YA = "_mdBtn_as93v_77", yA = "_mdSep_as93v_84", IA = "_editorBody_as93v_93", CA = "_tocPanel_as93v_100", ZA = "_tocHeader_as93v_108", EA = "_tocList_as93v_117", _A = "_tocItem_as93v_122", $A = "_tocEmpty_as93v_137", pt = "_textarea_as93v_144", at = "_half_as93v_160", At = "_preview_as93v_163", tt = "_markdown_as93v_173", et = "_videoEmbed_as93v_185", w = {
|
|
15
14
|
editorView: gA,
|
|
@@ -1682,7 +1681,7 @@ const Rt = [
|
|
|
1682
1681
|
draftDeleteBtn: T0,
|
|
1683
1682
|
markdown: v0
|
|
1684
1683
|
}, F0 = HA(
|
|
1685
|
-
() => import("./index-
|
|
1684
|
+
() => import("./index-DeHC7MtX.js").then((a) => ({ default: a.MarketContent }))
|
|
1686
1685
|
);
|
|
1687
1686
|
function d0(a) {
|
|
1688
1687
|
const n = [], x = a.split(`
|
|
@@ -2690,11 +2689,11 @@ function W0({
|
|
|
2690
2689
|
] }) }) })
|
|
2691
2690
|
] });
|
|
2692
2691
|
}
|
|
2693
|
-
const
|
|
2692
|
+
const b0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2694
2693
|
__proto__: null,
|
|
2695
2694
|
default: N0
|
|
2696
2695
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2697
2696
|
export {
|
|
2698
2697
|
Rt as M,
|
|
2699
|
-
|
|
2698
|
+
b0 as i
|
|
2700
2699
|
};
|
|
@@ -2,9 +2,9 @@ import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
|
2
2
|
import { Navigate as i, useLocation as b } from "react-router-dom";
|
|
3
3
|
import { Alert as u } from "antd";
|
|
4
4
|
import { DashboardOutlined as v, ClusterOutlined as r, ContainerOutlined as y, CloudServerOutlined as l, BranchesOutlined as O, RocketOutlined as g, AlertOutlined as k, FileTextOutlined as S, DatabaseOutlined as c, CloudOutlined as f, DeploymentUnitOutlined as z } from "@ant-design/icons";
|
|
5
|
-
import { W as P } from "./index-
|
|
6
|
-
import { M as D } from "./ComponentDoc-
|
|
7
|
-
import "./index-
|
|
5
|
+
import { W as P } from "./index-s5yeUpMA.js";
|
|
6
|
+
import { M as D } from "./ComponentDoc-Boc9n2c_.js";
|
|
7
|
+
import "./index-D74FCwtx.js";
|
|
8
8
|
const a = "K8s 管理面的数据源在**独立运维平台 z-ops**:/z-team/ops/k8s/** 由 z-ops 仓的 z-ops-web 提供(K8sController 注册 /z-team/ops/k8s,HpaController 注册 /z-team/ops/k8s/hpa)。**z-opc 主壳不承载它**:主壳制品 BOOT-INF/lib 里 0 个 z-ops-*,主壳 nginx 路由总表里也没有^/z-team/ops 这条反代规则 ⇒ 实测 GET /z-team/ops/k8s/nodes 得到的是 SPA 兜底页(HTTP 200 + text/html + 451B,与必假路径逐字节相同),不是后端 JSON。该页面的真实入口在 z-ops 独立平台(集群内端口 8886,其前端路由 /ops/k8s)。", E = [
|
|
9
9
|
{
|
|
10
10
|
title: "DevOps 运维",
|
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
import { jsx as c, jsxs as _ } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { CheckCircleFilled as
|
|
2
|
+
import { c as $, d as j, t as x, p as O, e as v, g as F } from "./ComponentDoc-Boc9n2c_.js";
|
|
3
|
+
import { CheckCircleFilled as b } from "@ant-design/icons";
|
|
4
4
|
import { Result as D, Button as R, Spin as U } from "antd";
|
|
5
5
|
import B from "query-string";
|
|
6
|
-
import { useMemo as
|
|
6
|
+
import { useMemo as y, useState as f, useRef as q, useCallback as A, useEffect as J } from "react";
|
|
7
7
|
import { useLocation as W } from "react-router-dom";
|
|
8
|
-
import { h as
|
|
9
|
-
import { l as Z, j as z, f as H, b as L, p as M } from "./instance-
|
|
10
|
-
import { u as w } from "./useAppStore-BFO_h1L2.js";
|
|
8
|
+
import { h as w } from "./history-BlrA1eaW.js";
|
|
9
|
+
import { l as Z, j as z, f as H, b as L, p as M } from "./instance-BpY3BXci.js";
|
|
11
10
|
import { b as N } from "./mobile-client-O3yr9h6t.js";
|
|
12
|
-
function
|
|
11
|
+
function nt() {
|
|
13
12
|
const m = W(), p = B.parse(m.search), o = String(
|
|
14
13
|
p.projectId ?? p.project_id ?? ""
|
|
15
|
-
).trim(), a = String(p.ticketId ?? p.ticket_id ?? "").trim(), e =
|
|
14
|
+
).trim(), a = String(p.ticketId ?? p.ticket_id ?? "").trim(), e = y(() => {
|
|
16
15
|
if (!o)
|
|
17
16
|
return null;
|
|
18
17
|
const t = x(o);
|
|
19
18
|
return $(t) ? t : null;
|
|
20
|
-
}, [o]), u =
|
|
21
|
-
C((
|
|
19
|
+
}, [o]), u = j((t) => t.token), T = j((t) => t.expandProject), [h, l] = f(""), [P, n] = f("正在启动…"), [k, C] = f([]), g = q(!1), s = A((t, r) => {
|
|
20
|
+
C((i) => [...i, t]), n(r);
|
|
22
21
|
}, []), I = async (t) => {
|
|
23
|
-
|
|
22
|
+
s("协作区已就绪", "正在同步工程列表…"), await T(t), s("工作区已准备", "即将进入工作台…"), w.replace(
|
|
24
23
|
N({
|
|
25
24
|
projectId: t.id,
|
|
26
25
|
search: m.search
|
|
@@ -32,32 +31,32 @@ function ct() {
|
|
|
32
31
|
if (r.status === "NOT_FOUND" || !r.scenarioInstance)
|
|
33
32
|
throw new Error("PROJECT_NOT_FOUND");
|
|
34
33
|
n("正在加入协作区…");
|
|
35
|
-
const
|
|
36
|
-
|
|
34
|
+
const i = await z(t, u);
|
|
35
|
+
s("已加入协作区", "正在打开协作区…"), await I(i);
|
|
37
36
|
}, E = async () => {
|
|
38
37
|
n("正在检查工单信息…");
|
|
39
38
|
const t = await H(a);
|
|
40
|
-
|
|
39
|
+
s("工单信息已获取", "正在解析工程绑定…");
|
|
41
40
|
const r = O(t);
|
|
42
41
|
if (r != null) {
|
|
43
|
-
|
|
42
|
+
s("已定位协作区", `正在打开协作区 ${r}…`), await d(r);
|
|
44
43
|
return;
|
|
45
44
|
}
|
|
46
45
|
n("正在初始化工程…");
|
|
47
|
-
const
|
|
46
|
+
const i = await v(
|
|
48
47
|
L(t, a),
|
|
49
48
|
u
|
|
50
49
|
);
|
|
51
50
|
n("正在关联工单…");
|
|
52
51
|
try {
|
|
53
|
-
await
|
|
52
|
+
await F(
|
|
54
53
|
a,
|
|
55
|
-
|
|
54
|
+
i.id,
|
|
56
55
|
M(t)
|
|
57
56
|
);
|
|
58
57
|
} catch {
|
|
59
58
|
}
|
|
60
|
-
n("正在初始化工作区…"), await I(
|
|
59
|
+
n("正在初始化工作区…"), await I(i);
|
|
61
60
|
};
|
|
62
61
|
J(() => {
|
|
63
62
|
if (!g.current) {
|
|
@@ -102,8 +101,8 @@ function ct() {
|
|
|
102
101
|
}
|
|
103
102
|
})();
|
|
104
103
|
}
|
|
105
|
-
}, [
|
|
106
|
-
const S =
|
|
104
|
+
}, [s, e, o, a, u]);
|
|
105
|
+
const S = y(() => e != null && a ? `工单 ${a} · 工程 ${e}` : e != null ? `工程 ${e}` : a ? `工单 ${a}` : "", [e, a]);
|
|
107
106
|
return h ? /* @__PURE__ */ c("div", { className: "from-ticket-page", children: /* @__PURE__ */ c(
|
|
108
107
|
D,
|
|
109
108
|
{
|
|
@@ -114,7 +113,7 @@ function ct() {
|
|
|
114
113
|
R,
|
|
115
114
|
{
|
|
116
115
|
type: "primary",
|
|
117
|
-
onClick: () =>
|
|
116
|
+
onClick: () => w.replace(
|
|
118
117
|
N({ search: m.search })
|
|
119
118
|
),
|
|
120
119
|
children: "返回工作台"
|
|
@@ -130,7 +129,7 @@ function ct() {
|
|
|
130
129
|
{
|
|
131
130
|
className: "from-ticket-page__done-item",
|
|
132
131
|
children: [
|
|
133
|
-
/* @__PURE__ */ c(
|
|
132
|
+
/* @__PURE__ */ c(b, { className: "from-ticket-page__done-icon" }),
|
|
134
133
|
/* @__PURE__ */ c("span", { children: t })
|
|
135
134
|
]
|
|
136
135
|
},
|
|
@@ -139,5 +138,5 @@ function ct() {
|
|
|
139
138
|
] }) });
|
|
140
139
|
}
|
|
141
140
|
export {
|
|
142
|
-
|
|
141
|
+
nt as default
|
|
143
142
|
};
|
|
@@ -2,7 +2,7 @@ import { jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { Navigate as t } from "react-router-dom";
|
|
3
3
|
import { lazy as A } from "react";
|
|
4
4
|
import { UnorderedListOutlined as i, HistoryOutlined as T, ClusterOutlined as p, DashboardOutlined as s, ExperimentOutlined as q, SettingOutlined as d, KeyOutlined as n, AppstoreOutlined as r, SafetyCertificateOutlined as P, TeamOutlined as w, ProfileOutlined as b, ApiOutlined as u, HddOutlined as l, ApartmentOutlined as g, InboxOutlined as k, FileTextOutlined as y, SendOutlined as G, CloudServerOutlined as a, NodeIndexOutlined as z, TableOutlined as f, SearchOutlined as m, DatabaseOutlined as v, ConsoleSqlOutlined as E, BranchesOutlined as I, DeploymentUnitOutlined as M, BookOutlined as h, FundOutlined as N, CloudUploadOutlined as _, TagsOutlined as x, CodeOutlined as B } from "@ant-design/icons";
|
|
5
|
-
import { W as R } from "./index-
|
|
5
|
+
import { W as R } from "./index-s5yeUpMA.js";
|
|
6
6
|
import { ConfigApp as U } from "@yuku123/z-config-component";
|
|
7
7
|
import { MistApp as H } from "@yuku123/z-mist-component";
|
|
8
8
|
import { MetaApp as L } from "@yuku123/z-meta-component";
|
|
@@ -16,7 +16,7 @@ import { MqApp as Z } from "@yuku123/z-mq-component";
|
|
|
16
16
|
import { OssApp as J } from "@yuku123/z-oss-component";
|
|
17
17
|
import { ZkbApp as X } from "@yuku123/z-kb-component";
|
|
18
18
|
import { ScriptProductizationPage as o } from "@yuku123/z-agent-component";
|
|
19
|
-
import "./index-
|
|
19
|
+
import "./index-D74FCwtx.js";
|
|
20
20
|
const $ = "/api/graph";
|
|
21
21
|
let O = !1;
|
|
22
22
|
function ee() {
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { r as
|
|
3
|
-
import { r as de, h as
|
|
2
|
+
import { r as D, f as le } from "./ctc-sso-DtJHC-2M.js";
|
|
3
|
+
import { r as de, h as $, s as K } from "./sso-user-BBkFFo35.js";
|
|
4
4
|
import { ArrowLeftOutlined as ue, PlusOutlined as pe, LogoutOutlined as me, SearchOutlined as he } from "@ant-design/icons";
|
|
5
|
-
import { Spin as O, Button as
|
|
5
|
+
import { Spin as O, Button as q, Input as fe, Empty as Y, Tag as ge, message as be } from "antd";
|
|
6
6
|
import Q from "query-string";
|
|
7
|
-
import { useState as y, useRef as E, useEffect as w, useMemo as
|
|
7
|
+
import { useState as y, useRef as E, useEffect as w, useMemo as J, useCallback as B } from "react";
|
|
8
8
|
import { useLocation as ke } from "react-router-dom";
|
|
9
9
|
import { h as A } from "./history-BlrA1eaW.js";
|
|
10
|
-
import { c as we, C as Se } from "./createWorkspaceWsHandler-
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { l as Pe, j as xe } from "./instance-CI6-4BZ6.js";
|
|
10
|
+
import { c as we, C as Se } from "./createWorkspaceWsHandler-9k7O4P-D.js";
|
|
11
|
+
import { d as i, Q as ye, U as ve, V as je, W as Ne, X as Te, Y as Ce, j as ee } from "./ComponentDoc-Boc9n2c_.js";
|
|
12
|
+
import { l as Pe, j as xe } from "./instance-BpY3BXci.js";
|
|
14
13
|
import { i as _e, s as Ee } from "./mobile-client-O3yr9h6t.js";
|
|
15
14
|
/* empty css */
|
|
16
|
-
import { s as Ae } from "./
|
|
17
|
-
const
|
|
18
|
-
function Ie(o, s =
|
|
15
|
+
import { s as Ae } from "./admin-logs-OIyOdfuC.js";
|
|
16
|
+
const ae = 2e4;
|
|
17
|
+
function Ie(o, s = ae, n = globalThis) {
|
|
19
18
|
let c = null;
|
|
20
19
|
return {
|
|
21
20
|
start() {
|
|
@@ -54,8 +53,8 @@ function Oe({
|
|
|
54
53
|
loadingText: o,
|
|
55
54
|
timeoutText: s = Me,
|
|
56
55
|
onRetry: n,
|
|
57
|
-
timeoutMs: c =
|
|
58
|
-
className:
|
|
56
|
+
timeoutMs: c = ae,
|
|
57
|
+
className: r
|
|
59
58
|
}) {
|
|
60
59
|
const [N, h] = y(!1), g = E(n);
|
|
61
60
|
return g.current = n, w(() => {
|
|
@@ -64,7 +63,7 @@ function Oe({
|
|
|
64
63
|
c
|
|
65
64
|
);
|
|
66
65
|
return m.start(), () => m.stop();
|
|
67
|
-
}, [c]), N ? /* @__PURE__ */ d("div", { className:
|
|
66
|
+
}, [c]), N ? /* @__PURE__ */ d("div", { className: r, children: [
|
|
68
67
|
/* @__PURE__ */ t(O, { description: "" }),
|
|
69
68
|
/* @__PURE__ */ t(
|
|
70
69
|
Le,
|
|
@@ -73,7 +72,7 @@ function Oe({
|
|
|
73
72
|
onRetry: () => g.current()
|
|
74
73
|
}
|
|
75
74
|
)
|
|
76
|
-
] }) : /* @__PURE__ */ t("div", { className:
|
|
75
|
+
] }) : /* @__PURE__ */ t("div", { className: r, children: /* @__PURE__ */ t(O, { description: o }) });
|
|
77
76
|
}
|
|
78
77
|
function Re(o, s) {
|
|
79
78
|
w(() => {
|
|
@@ -89,26 +88,26 @@ function Re(o, s) {
|
|
|
89
88
|
f != null && f.taskId && m.loadTaskMessages(f.taskId).catch(() => {
|
|
90
89
|
}), m.loadFileTree(void 0, !0).catch(() => {
|
|
91
90
|
});
|
|
92
|
-
}, c =
|
|
91
|
+
}, c = ye((m) => {
|
|
93
92
|
i.getState().setWsState(m);
|
|
94
93
|
});
|
|
95
|
-
|
|
94
|
+
ve(o, s, n), i.getState().loadRunningExecutions().catch(() => {
|
|
96
95
|
});
|
|
97
|
-
const
|
|
96
|
+
const r = i.getState(), { handler: N, dispose: h } = we({
|
|
98
97
|
projectId: o,
|
|
99
98
|
token: s,
|
|
100
|
-
updateExecution:
|
|
101
|
-
registerExecutionStart:
|
|
102
|
-
clearExecution:
|
|
103
|
-
applyExecutionCancelled:
|
|
104
|
-
addMessage:
|
|
105
|
-
addTaskMessage:
|
|
106
|
-
deleteMessage:
|
|
107
|
-
updateMessageReadStatus:
|
|
108
|
-
loadFileTree:
|
|
99
|
+
updateExecution: r.updateExecution,
|
|
100
|
+
registerExecutionStart: r.registerExecutionStart,
|
|
101
|
+
clearExecution: r.clearExecution,
|
|
102
|
+
applyExecutionCancelled: r.applyExecutionCancelled,
|
|
103
|
+
addMessage: r.addMessage,
|
|
104
|
+
addTaskMessage: r.addTaskMessage,
|
|
105
|
+
deleteMessage: r.deleteMessage,
|
|
106
|
+
updateMessageReadStatus: r.updateMessageReadStatus,
|
|
107
|
+
loadFileTree: r.loadFileTree
|
|
109
108
|
}), g = je(N);
|
|
110
109
|
return () => {
|
|
111
|
-
g(), h(),
|
|
110
|
+
g(), h(), Ne(), c(), i.getState().setObserverStatus(null);
|
|
112
111
|
};
|
|
113
112
|
}, [o, s]);
|
|
114
113
|
}
|
|
@@ -124,8 +123,8 @@ function te() {
|
|
|
124
123
|
search: c ? `?${c}` : ""
|
|
125
124
|
});
|
|
126
125
|
}
|
|
127
|
-
function
|
|
128
|
-
const o = ke(), [s, n] = y("list"), [c,
|
|
126
|
+
function Je() {
|
|
127
|
+
const o = ke(), [s, n] = y("list"), [c, r] = y("chat"), [N, h] = y("team"), [g, m] = y(""), [f, V] = y(!1), [re, I] = y(!1), {
|
|
129
128
|
currentProject: v,
|
|
130
129
|
currentUser: R,
|
|
131
130
|
projects: L,
|
|
@@ -134,16 +133,16 @@ function et() {
|
|
|
134
133
|
token: oe,
|
|
135
134
|
loadProjects: z,
|
|
136
135
|
expandProject: H,
|
|
137
|
-
updateCurrentUser:
|
|
136
|
+
updateCurrentUser: T,
|
|
138
137
|
requestChatScrollBottom: S
|
|
139
|
-
} = i(), k =
|
|
140
|
-
const e = Q.parse(o.search),
|
|
141
|
-
if (!
|
|
138
|
+
} = i(), k = J(() => {
|
|
139
|
+
const e = Q.parse(o.search), a = String(e.projectId ?? e.project_id ?? "").trim();
|
|
140
|
+
if (!a)
|
|
142
141
|
return null;
|
|
143
|
-
const l = Number(
|
|
142
|
+
const l = Number(a);
|
|
144
143
|
return Number.isFinite(l) && l > 0 ? l : null;
|
|
145
|
-
}, [o.search]),
|
|
146
|
-
|
|
144
|
+
}, [o.search]), U = E(!1), C = E(!1), P = E(!1), X = E(k);
|
|
145
|
+
X.current = k, Re(v == null ? void 0 : v.id, oe), w(() => (document.body.classList.add("team-phone-workspace-route"), () => {
|
|
147
146
|
document.body.classList.remove("team-phone-workspace-route");
|
|
148
147
|
}), []), w(() => {
|
|
149
148
|
!_e(o.search) && Ee() || A.replace({
|
|
@@ -153,28 +152,28 @@ function et() {
|
|
|
153
152
|
}, [o.search]);
|
|
154
153
|
const se = B(
|
|
155
154
|
(e) => {
|
|
156
|
-
|
|
155
|
+
r("chat"), h(e), S(e, !0);
|
|
157
156
|
},
|
|
158
157
|
[S]
|
|
159
158
|
);
|
|
160
159
|
w(() => {
|
|
161
|
-
let e = !1,
|
|
160
|
+
let e = !1, a = 0;
|
|
162
161
|
const l = 100;
|
|
163
|
-
let x = !1,
|
|
164
|
-
const M = 3,
|
|
162
|
+
let x = !1, F = 0;
|
|
163
|
+
const M = 3, j = (b) => {
|
|
165
164
|
const u = i.getState().token;
|
|
166
|
-
if (
|
|
167
|
-
e || (
|
|
168
|
-
e ||
|
|
165
|
+
if (X.current != null) {
|
|
166
|
+
e || (T(K(b)), V(!0)), ee().then((G) => {
|
|
167
|
+
e || T(G);
|
|
169
168
|
}).catch(() => {
|
|
170
169
|
!e && u && (localStorage.removeItem("z_team_token"), i.setState({ token: "" }));
|
|
171
170
|
});
|
|
172
171
|
return;
|
|
173
172
|
}
|
|
174
173
|
ee().then((G) => {
|
|
175
|
-
e ||
|
|
174
|
+
e || T(G);
|
|
176
175
|
}).catch(() => {
|
|
177
|
-
e || (u && (localStorage.removeItem("z_team_token"), i.setState({ token: "" })),
|
|
176
|
+
e || (u && (localStorage.removeItem("z_team_token"), i.setState({ token: "" })), T(K(b)));
|
|
178
177
|
}).finally(() => {
|
|
179
178
|
e || V(!0);
|
|
180
179
|
});
|
|
@@ -186,26 +185,26 @@ function et() {
|
|
|
186
185
|
if (e)
|
|
187
186
|
return;
|
|
188
187
|
let u = de();
|
|
189
|
-
if ((!u ||
|
|
188
|
+
if ((!u || !$(u)) && !x) {
|
|
190
189
|
x = !0;
|
|
191
190
|
try {
|
|
192
191
|
const p = await le();
|
|
193
|
-
p.kind === "authenticated" ? u = p.user : p.kind === "unauthenticated" && (
|
|
192
|
+
p.kind === "authenticated" ? u = p.user : p.kind === "unauthenticated" && (F += 1);
|
|
194
193
|
} catch {
|
|
195
194
|
} finally {
|
|
196
195
|
x = !1;
|
|
197
196
|
}
|
|
198
197
|
}
|
|
199
|
-
if (u &&
|
|
200
|
-
|
|
198
|
+
if (u && $(u)) {
|
|
199
|
+
j(u);
|
|
201
200
|
return;
|
|
202
201
|
}
|
|
203
|
-
if (
|
|
204
|
-
|
|
202
|
+
if (F >= M) {
|
|
203
|
+
D();
|
|
205
204
|
return;
|
|
206
205
|
}
|
|
207
|
-
if (
|
|
208
|
-
|
|
206
|
+
if (a += 1, a >= l) {
|
|
207
|
+
D();
|
|
209
208
|
return;
|
|
210
209
|
}
|
|
211
210
|
window.setTimeout(() => {
|
|
@@ -216,24 +215,24 @@ function et() {
|
|
|
216
215
|
})(), () => {
|
|
217
216
|
e = !0;
|
|
218
217
|
};
|
|
219
|
-
}, [
|
|
218
|
+
}, [T]), w(() => {
|
|
220
219
|
R && z();
|
|
221
220
|
}, [R, z]), w(() => {
|
|
222
221
|
var l;
|
|
223
222
|
if (!f || k != null || s === "project" || P.current)
|
|
224
223
|
return;
|
|
225
|
-
const e = i.getState(),
|
|
226
|
-
|
|
224
|
+
const e = i.getState(), a = (l = e.currentProject) == null ? void 0 : l.id;
|
|
225
|
+
a == null || !e.expandedProjectIds.includes(String(a)) || (n("project"), r("chat"), h("team"), S("team", !0));
|
|
227
226
|
}, [f, k, s, S]);
|
|
228
227
|
const ce = B(
|
|
229
228
|
async (e) => {
|
|
230
229
|
P.current = !1, I(!0);
|
|
231
230
|
try {
|
|
232
|
-
await H(e), n("project"),
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
String(
|
|
236
|
-
|
|
231
|
+
await H(e), n("project"), r("chat"), h("team");
|
|
232
|
+
const a = i.getState();
|
|
233
|
+
a.currentProject && await a.refreshProjectPanels(
|
|
234
|
+
String(a.currentProject.id),
|
|
235
|
+
a.projectSwitchSeq,
|
|
237
236
|
!1
|
|
238
237
|
), S("team", !0);
|
|
239
238
|
} finally {
|
|
@@ -244,19 +243,19 @@ function et() {
|
|
|
244
243
|
);
|
|
245
244
|
w(() => {
|
|
246
245
|
var M;
|
|
247
|
-
if (!f || k == null ||
|
|
246
|
+
if (!f || k == null || U.current || C.current)
|
|
248
247
|
return;
|
|
249
|
-
const e = k == null ? "" : String(k),
|
|
250
|
-
if (String(((M =
|
|
251
|
-
|
|
248
|
+
const e = k == null ? "" : String(k), a = i.getState();
|
|
249
|
+
if (String(((M = a.currentProject) == null ? void 0 : M.id) ?? "") === e && a.expandedProjectIds.includes(e)) {
|
|
250
|
+
U.current = !0, te(), P.current = !1, n("project"), r("chat"), h("team"), i.getState().loadMessages().catch(() => {
|
|
252
251
|
});
|
|
253
252
|
return;
|
|
254
253
|
}
|
|
255
254
|
let l = !1;
|
|
256
255
|
C.current = !0, I(!0);
|
|
257
256
|
const x = async () => {
|
|
258
|
-
const
|
|
259
|
-
for (; Date.now() <
|
|
257
|
+
const j = Date.now() + 4e3;
|
|
258
|
+
for (; Date.now() < j; ) {
|
|
260
259
|
if (l)
|
|
261
260
|
return;
|
|
262
261
|
const _ = i.getState();
|
|
@@ -270,25 +269,25 @@ function et() {
|
|
|
270
269
|
if (await x(), l)
|
|
271
270
|
return;
|
|
272
271
|
let {
|
|
273
|
-
token:
|
|
272
|
+
token: j,
|
|
274
273
|
projects: _,
|
|
275
274
|
expandProject: b
|
|
276
275
|
} = i.getState(), u = _.find((p) => p.id === e);
|
|
277
276
|
if (!u) {
|
|
278
|
-
const p = await Pe(e,
|
|
277
|
+
const p = await Pe(e, j);
|
|
279
278
|
if (l)
|
|
280
279
|
return;
|
|
281
280
|
if (p.status === "NOT_FOUND" || !p.scenarioInstance) {
|
|
282
281
|
be.info("无此工程");
|
|
283
282
|
return;
|
|
284
283
|
}
|
|
285
|
-
if (u = await xe(e,
|
|
284
|
+
if (u = await xe(e, j), l)
|
|
286
285
|
return;
|
|
287
286
|
}
|
|
288
287
|
if (l || !u)
|
|
289
288
|
return;
|
|
290
|
-
if (
|
|
291
|
-
P.current = !1, n("project"),
|
|
289
|
+
if (U.current = !0, await b(u), !l) {
|
|
290
|
+
P.current = !1, n("project"), r("chat"), h("team"), te();
|
|
292
291
|
const p = i.getState();
|
|
293
292
|
p.currentProject && await p.refreshProjectPanels(
|
|
294
293
|
String(p.currentProject.id),
|
|
@@ -304,13 +303,13 @@ function et() {
|
|
|
304
303
|
l = !0, C.current && (C.current = !1);
|
|
305
304
|
};
|
|
306
305
|
}, [f, k]);
|
|
307
|
-
const
|
|
306
|
+
const Z = J(() => {
|
|
308
307
|
const e = g.trim().toLowerCase();
|
|
309
308
|
return e ? L.filter(
|
|
310
|
-
(
|
|
309
|
+
(a) => a.name.toLowerCase().includes(e) || (a.scenario_name ?? "").toLowerCase().includes(e)
|
|
311
310
|
) : L;
|
|
312
311
|
}, [g, L]), ie = B(() => {
|
|
313
|
-
P.current = !0, n("list"),
|
|
312
|
+
P.current = !0, n("list"), r("chat");
|
|
314
313
|
}, []);
|
|
315
314
|
return !f || !R ? /* @__PURE__ */ t(
|
|
316
315
|
Oe,
|
|
@@ -318,12 +317,12 @@ function et() {
|
|
|
318
317
|
className: "phone-workspace phone-workspace-loading",
|
|
319
318
|
loadingText: "正在接入 4A 统一登录…",
|
|
320
319
|
timeoutText: "4A 统一登录接入超时(可能是网络抖动或服务正在重启),请重新登录。",
|
|
321
|
-
onRetry: () =>
|
|
320
|
+
onRetry: () => D()
|
|
322
321
|
}
|
|
323
322
|
) : /* @__PURE__ */ d("div", { className: "phone-workspace", children: [
|
|
324
323
|
/* @__PURE__ */ d("header", { className: "phone-workspace-header", children: [
|
|
325
324
|
s === "project" ? /* @__PURE__ */ t(
|
|
326
|
-
|
|
325
|
+
q,
|
|
327
326
|
{
|
|
328
327
|
type: "text",
|
|
329
328
|
icon: /* @__PURE__ */ t(ue, {}),
|
|
@@ -352,7 +351,7 @@ function et() {
|
|
|
352
351
|
) : /* @__PURE__ */ t("span", { className: "phone-workspace-project-name", children: (v == null ? void 0 : v.name) ?? "工程" }) }),
|
|
353
352
|
/* @__PURE__ */ d("div", { className: "phone-workspace-header-actions", children: [
|
|
354
353
|
s === "list" ? /* @__PURE__ */ t(
|
|
355
|
-
|
|
354
|
+
q,
|
|
356
355
|
{
|
|
357
356
|
type: "text",
|
|
358
357
|
icon: /* @__PURE__ */ t(pe, {}),
|
|
@@ -362,7 +361,7 @@ function et() {
|
|
|
362
361
|
}
|
|
363
362
|
) : null,
|
|
364
363
|
/* @__PURE__ */ t(
|
|
365
|
-
|
|
364
|
+
q,
|
|
366
365
|
{
|
|
367
366
|
type: "text",
|
|
368
367
|
icon: /* @__PURE__ */ t(me, {}),
|
|
@@ -385,14 +384,14 @@ function et() {
|
|
|
385
384
|
onChange: (e) => m(e.target.value)
|
|
386
385
|
}
|
|
387
386
|
) }),
|
|
388
|
-
ne && L.length === 0 ? /* @__PURE__ */ t("div", { className: "phone-workspace-list-loading", children: /* @__PURE__ */ t(O, { description: "加载项目…" }) }) :
|
|
389
|
-
|
|
387
|
+
ne && L.length === 0 ? /* @__PURE__ */ t("div", { className: "phone-workspace-list-loading", children: /* @__PURE__ */ t(O, { description: "加载项目…" }) }) : Z.length === 0 ? /* @__PURE__ */ t(
|
|
388
|
+
Y,
|
|
390
389
|
{
|
|
391
390
|
description: g ? "无匹配项目" : "暂无项目",
|
|
392
391
|
className: "phone-workspace-empty"
|
|
393
392
|
}
|
|
394
|
-
) : /* @__PURE__ */ t("ul", { className: "phone-project-list", children:
|
|
395
|
-
const
|
|
393
|
+
) : /* @__PURE__ */ t("ul", { className: "phone-project-list", children: Z.map((e) => {
|
|
394
|
+
const a = Te(
|
|
396
395
|
e.created_at
|
|
397
396
|
);
|
|
398
397
|
return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ d(
|
|
@@ -406,9 +405,9 @@ function et() {
|
|
|
406
405
|
children: [
|
|
407
406
|
/* @__PURE__ */ d("div", { className: "phone-project-item-main", children: [
|
|
408
407
|
/* @__PURE__ */ t("span", { className: "phone-project-item-name", children: e.name }),
|
|
409
|
-
e.scenario_name ||
|
|
408
|
+
e.scenario_name || a ? /* @__PURE__ */ d("div", { className: "phone-project-item-meta", children: [
|
|
410
409
|
e.scenario_name ? /* @__PURE__ */ t("span", { className: "phone-project-item-scenario", children: e.scenario_name }) : null,
|
|
411
|
-
|
|
410
|
+
a ? /* @__PURE__ */ t("span", { className: "phone-project-item-time", children: a }) : null
|
|
412
411
|
] }) : null
|
|
413
412
|
] }),
|
|
414
413
|
/* @__PURE__ */ t(
|
|
@@ -439,7 +438,7 @@ function et() {
|
|
|
439
438
|
{
|
|
440
439
|
type: "button",
|
|
441
440
|
className: c === "members" ? "phone-toolbar-tab phone-toolbar-members phone-toolbar-active" : "phone-toolbar-tab phone-toolbar-members",
|
|
442
|
-
onClick: () =>
|
|
441
|
+
onClick: () => r("members"),
|
|
443
442
|
children: [
|
|
444
443
|
"成员 (",
|
|
445
444
|
W.length,
|
|
@@ -448,7 +447,7 @@ function et() {
|
|
|
448
447
|
}
|
|
449
448
|
)
|
|
450
449
|
] }),
|
|
451
|
-
/* @__PURE__ */ t("div", { className: "phone-workspace-detail-body", children: c === "members" ? /* @__PURE__ */ t("ul", { className: "phone-member-list", children: W.length === 0 ? /* @__PURE__ */ t(
|
|
450
|
+
/* @__PURE__ */ t("div", { className: "phone-workspace-detail-body", children: c === "members" ? /* @__PURE__ */ t("ul", { className: "phone-member-list", children: W.length === 0 ? /* @__PURE__ */ t(Y, { description: "暂无成员" }) : W.map((e) => /* @__PURE__ */ d("li", { className: "phone-member-item", children: [
|
|
452
451
|
/* @__PURE__ */ t("span", { className: "phone-member-avatar", children: e.member_type === "AGENT" ? "🤖" : "👤" }),
|
|
453
452
|
/* @__PURE__ */ d("div", { className: "phone-member-info", children: [
|
|
454
453
|
/* @__PURE__ */ t("span", { className: "phone-member-name", children: e.display_name }),
|
|
@@ -471,10 +470,10 @@ function et() {
|
|
|
471
470
|
}
|
|
472
471
|
) }) })
|
|
473
472
|
] }) }),
|
|
474
|
-
|
|
475
|
-
/* @__PURE__ */ t(
|
|
473
|
+
re ? /* @__PURE__ */ t("div", { className: "phone-workspace-overlay", children: /* @__PURE__ */ t(O, { description: "正在打开工程…" }) }) : null,
|
|
474
|
+
/* @__PURE__ */ t(Ce, {})
|
|
476
475
|
] });
|
|
477
476
|
}
|
|
478
477
|
export {
|
|
479
|
-
|
|
478
|
+
Je as default
|
|
480
479
|
};
|