@yuku123/z-team-component 0.2.4 → 0.2.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.
@@ -0,0 +1,20 @@
1
+ import "@yuku123/z-frontend-common";
2
+ import { a } from "./ProjectApp-DjHsGbam.js";
3
+ import "react/jsx-runtime";
4
+ import "react";
5
+ import "antd";
6
+ import "@ant-design/icons";
7
+ import "react-router-dom";
8
+ const p = () => a.get("/ctc/authn/my-tenants"), v = (t, s) => a.post("/ctc/authn/select-tenant", { tenantCode: t, domainCode: "" }), l = (t) => a.post("/ctc/ac/invitations", t), d = (t) => a.post("/ctc/ac/invitations/accept", { token: t }), u = (t) => a.post("/ctc/ac/invitations/redeem", { code: t }), b = (t) => a.get("/ctc/ac/invitations", { params: { tenantCode: t } }), g = (t, s) => a.post(`/ctc/ac/invitations/${t}/revoke`, null, { params: { tenantCode: s } }), I = (t) => a.get("/ctc/ac/invitations/members", { params: { tenantCode: t } }), h = (t, s) => a.post(`/ctc/ac/invitations/members/${t}/remove`, null, { params: { tenantCode: s } }), C = (t) => a.post("/ctc/ac/invitations/leave", null, { params: { tenantCode: t } });
9
+ export {
10
+ d as a,
11
+ I as b,
12
+ C as c,
13
+ h as d,
14
+ g as e,
15
+ l as f,
16
+ p as g,
17
+ b as l,
18
+ u as r,
19
+ v as s
20
+ };
@@ -0,0 +1,183 @@
1
+ import { AppLayout as j, ErrorBoundary as v, LoginPage as H, StatusTag as K, defaultStatusMap as _ } from "@yuku123/z-frontend-common";
2
+ import { a as T } from "./ProjectApp-DjHsGbam.js";
3
+ import { C as F, E as J, d as Q, L as X, c as Y, M as Z, e as $, f as ee, O as te, g as ae, R as oe, h as re, j as ie, k as le, l as ne, r as se, r as de, s as ce } from "./ProjectApp-DjHsGbam.js";
4
+ import { jsxs as a, jsx as e } from "react/jsx-runtime";
5
+ import { useState as l, useEffect as y } from "react";
6
+ import { Card as g, Alert as x, Table as h, Spin as I, Empty as f, Space as R, Button as s, Tag as c } from "antd";
7
+ import { ReloadOutlined as w, UserAddOutlined as E, TeamOutlined as b, PlusOutlined as M, CodeOutlined as O } from "@ant-design/icons";
8
+ import { default as pe } from "./LowCodePage-BOIkfK4U.js";
9
+ import { D as ge } from "./index-DlJRXaaz.js";
10
+ const G = T, S = {
11
+ LEADER: "red",
12
+ WORKER: "blue",
13
+ OBSERVER: "default"
14
+ };
15
+ function N() {
16
+ const [o] = l(!1), [d] = l([]);
17
+ return /* @__PURE__ */ a(
18
+ g,
19
+ {
20
+ title: /* @__PURE__ */ a("span", { children: [
21
+ /* @__PURE__ */ e(b, { style: { marginRight: 8 } }),
22
+ "Agent 群组 IM"
23
+ ] }),
24
+ extra: /* @__PURE__ */ a(R, { children: [
25
+ /* @__PURE__ */ e(s, { icon: /* @__PURE__ */ e(w, {}), loading: o, children: "刷新" }),
26
+ /* @__PURE__ */ e(s, { type: "primary", icon: /* @__PURE__ */ e(E, {}), disabled: !0, children: "创建群组" })
27
+ ] }),
28
+ children: [
29
+ /* @__PURE__ */ e(
30
+ x,
31
+ {
32
+ type: "info",
33
+ showIcon: !0,
34
+ style: { marginBottom: 16 },
35
+ title: "IM 群组 (含 STOMP 实时消息) 后端服务尚未启动",
36
+ description: "当前展示群组列表占位。等 z-agent-team 后端就绪后切换为完整 IM 客户端。"
37
+ }
38
+ ),
39
+ /* @__PURE__ */ e(
40
+ h,
41
+ {
42
+ rowKey: "teamCode",
43
+ size: "small",
44
+ loading: o,
45
+ dataSource: d,
46
+ columns: [
47
+ { title: "群组编码", dataIndex: "teamCode", width: 200, ellipsis: !0 },
48
+ { title: "群组名称", dataIndex: "teamName", width: 200 },
49
+ {
50
+ title: "我的角色",
51
+ dataIndex: "role",
52
+ width: 120,
53
+ render: (r) => /* @__PURE__ */ e(c, { color: S[r] || "default", children: r || "-" })
54
+ },
55
+ { title: "成员数", dataIndex: "memberCount", width: 100 },
56
+ { title: "最近消息", dataIndex: "lastMessage", width: 240, ellipsis: !0 },
57
+ { title: "更新时间", dataIndex: "updatedAt", width: 180 }
58
+ ],
59
+ locale: { emptyText: o ? /* @__PURE__ */ e(I, {}) : /* @__PURE__ */ e(f, { description: "暂无群组" }) },
60
+ pagination: { pageSize: 20 }
61
+ }
62
+ )
63
+ ]
64
+ }
65
+ );
66
+ }
67
+ const A = {
68
+ CREATING: { text: "创建中", color: "processing" },
69
+ RUNNING: { text: "运行中", color: "success" },
70
+ STOPPED: { text: "已停止", color: "default" },
71
+ ERROR: { text: "错误", color: "error" }
72
+ }, C = {
73
+ GIT: { text: "GIT 模式", color: "blue" },
74
+ SHARED: { text: "SHARED 模式", color: "purple" }
75
+ };
76
+ function U() {
77
+ const [o, d] = l([]), [n, r] = l(!1), [u, p] = l(null), m = async () => {
78
+ r(!0), p(null);
79
+ try {
80
+ d([]);
81
+ } catch (t) {
82
+ p((t == null ? void 0 : t.message) || "加载失败");
83
+ } finally {
84
+ r(!1);
85
+ }
86
+ };
87
+ return y(() => {
88
+ m();
89
+ }, []), /* @__PURE__ */ a(
90
+ g,
91
+ {
92
+ title: /* @__PURE__ */ a("span", { children: [
93
+ /* @__PURE__ */ e(O, { style: { marginRight: 8 } }),
94
+ "WebIDE 容器管理"
95
+ ] }),
96
+ extra: /* @__PURE__ */ a(R, { children: [
97
+ /* @__PURE__ */ e(s, { icon: /* @__PURE__ */ e(w, {}), onClick: m, loading: n, children: "刷新" }),
98
+ /* @__PURE__ */ e(s, { type: "primary", icon: /* @__PURE__ */ e(M, {}), disabled: !0, children: "新建 WebIDE" })
99
+ ] }),
100
+ children: [
101
+ u && /* @__PURE__ */ e(
102
+ x,
103
+ {
104
+ type: "warning",
105
+ showIcon: !0,
106
+ style: { marginBottom: 16 },
107
+ title: "后端 API 暂未连接",
108
+ description: u
109
+ }
110
+ ),
111
+ /* @__PURE__ */ e(
112
+ h,
113
+ {
114
+ rowKey: "containerId",
115
+ size: "small",
116
+ loading: n,
117
+ dataSource: o,
118
+ columns: [
119
+ { title: "容器ID", dataIndex: "containerId", width: 220, ellipsis: !0 },
120
+ {
121
+ title: "模式",
122
+ dataIndex: "mode",
123
+ width: 120,
124
+ render: (t) => {
125
+ const i = C[t] || { text: t, color: "default" };
126
+ return /* @__PURE__ */ e(c, { color: i.color, children: i.text });
127
+ }
128
+ },
129
+ { title: "Git URL", dataIndex: "gitUrl", width: 240, ellipsis: !0 },
130
+ { title: "分支", dataIndex: "branch", width: 120 },
131
+ {
132
+ title: "状态",
133
+ dataIndex: "status",
134
+ width: 120,
135
+ render: (t) => {
136
+ const i = A[t] || { text: t, color: "default" };
137
+ return /* @__PURE__ */ e(c, { color: i.color, children: i.text });
138
+ }
139
+ },
140
+ { title: "创建时间", dataIndex: "createdAt", width: 180 }
141
+ ],
142
+ locale: {
143
+ emptyText: n ? /* @__PURE__ */ e(I, {}) : /* @__PURE__ */ e(f, { description: "后端 z-webide 服务尚未启动" })
144
+ },
145
+ pagination: { pageSize: 20 },
146
+ scroll: { x: 1e3 }
147
+ }
148
+ )
149
+ ]
150
+ }
151
+ );
152
+ }
153
+ export {
154
+ N as AgentTeamIM,
155
+ j as AppLayout,
156
+ F as CurlImportModal,
157
+ ge as DebugPlayground,
158
+ J as EndpointsTab,
159
+ Q as EnvironmentsTab,
160
+ v as ErrorBoundary,
161
+ H as LoginPage,
162
+ X as LowCodeModel,
163
+ pe as LowCodePage,
164
+ Y as LowCodeRuntime,
165
+ Z as MaterializePage,
166
+ $ as MockPlatform,
167
+ ee as MockTemplateHelper,
168
+ te as OpenApiImportModal,
169
+ ae as Overview,
170
+ oe as RecordingsTab,
171
+ re as RequestLogsTab,
172
+ ie as ScenariosTab,
173
+ K as StatusTag,
174
+ le as TestCasesTab,
175
+ U as Webide,
176
+ T as authRequest,
177
+ ne as createRequest,
178
+ G as ctcRequest,
179
+ se as default,
180
+ _ as defaultStatusMap,
181
+ de as request,
182
+ ce as setupInterceptors
183
+ };