@yuku123/z-team-component 0.2.36 → 0.2.37
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-nPAmM1X0.js +542 -0
- package/dist/{ComponentDoc-B2qJmtU6.js → ComponentDoc-BKjq4J_p.js} +40 -40
- package/dist/{InvitationManagementPage-61uxWWwF.js → InvitationManagementPage-1ltSXMut.js} +1 -1
- package/dist/{OnboardingPage-BBKst6Qf.js → OnboardingPage-CJK2A0fG.js} +2 -2
- package/dist/SmartWorkbench.module-xRRmpTTw.js +85 -0
- package/dist/{SystemShell-C52BvjTM.js → SystemShell-BUBaiZfa.js} +160 -158
- package/dist/{admin-logs-Dv86pFvY.js → admin-logs-D6HtRcK6.js} +2 -2
- package/dist/{api-19TXED_O.js → api-C78tCfne.js} +156 -155
- package/dist/{api-Bf3E-c73.js → api-XuBBtap9.js} +1 -1
- package/dist/{createWorkspaceWsHandler-CBk4DqP4.js → createWorkspaceWsHandler-mq-UTF2O.js} +4 -4
- package/dist/{index-DOPkM2W8.js → index-7nSly-MA.js} +6 -6
- package/dist/{index-BEqPF6wm.js → index-B-VKCQnw.js} +2260 -2290
- package/dist/{index-CEmwgW65.js → index-B3kZRd65.js} +1055 -1057
- package/dist/{index-BoGVJ0hC.js → index-BAK7UDvY.js} +1 -1
- package/dist/{index-BTLD5gUt.js → index-BX1Wd9x9.js} +3 -3
- package/dist/{index-DHh0L9FB.js → index-B_JFsyJ8.js} +1222 -1207
- package/dist/{index-BIJnjJd5.js → index-Bdu31aRV.js} +2 -2
- package/dist/{index-ff3leJCK.js → index-C29bzppl.js} +3 -3
- package/dist/{index-CFakyLYo.js → index-CQDlK88K.js} +65 -56
- package/dist/{index-DYgD6BuB.js → index-ClA0896K.js} +4 -4
- package/dist/{index-tDO0JBvI.js → index-D4tQ0KN9.js} +5 -5
- package/dist/{index-B_EBV24V.js → index-D9AqC2O-.js} +1 -1
- package/dist/{index-BjqYiZpC.js → index-DFY3lzq0.js} +3 -3
- package/dist/{index-Bd57t_yF.js → index-DpcrvKsK.js} +1 -1
- package/dist/{index-7VAcVmtR.js → index-DyJp2kSb.js} +7 -7
- package/dist/index-a4cM-7bG.js +1433 -0
- package/dist/{index-BG755_pa.js → index-qAOhpMUP.js} +1 -1
- package/dist/{index-x4-W5ClM.js → index-qK6pyAGy.js} +4 -4
- package/dist/index.js +1 -1
- package/dist/{instance-D951fRuD.js → instance-D5dhjbgg.js} +1 -1
- package/dist/pages.js +1 -1
- package/dist/{schedule-DIlnA1uC.js → schedule-Dstx5SE_.js} +35 -35
- package/dist/{send-default-agent-team-message-Bbs2rMNf.js → send-default-agent-team-message-C882sJLV.js} +1 -1
- package/dist/{sso-user-BEY5ICaR.js → sso-user-Bi9_l9yi.js} +1 -1
- package/dist/{training-B-9tNFQw.js → training-Ba09KItE.js} +1 -1
- package/dist/{useAppStore-BQN-26ns.js → useAppStore-ibJyVIAX.js} +1 -1
- package/dist/{webide-mvUPb2k9.js → webide-CTvdgMFE.js} +4 -4
- package/dist/z-team-component.css +1 -1
- package/package.json +1 -1
- package/dist/ChangeLogView-FLd1wS8H.js +0 -502
- package/dist/DebugPlayground-cxffrMgF.js +0 -15
- package/dist/SmartWorkbench.module-DzQskKT0.js +0 -85
- package/dist/index-Ddm63H7s.js +0 -1335
|
@@ -0,0 +1,542 @@
|
|
|
1
|
+
import { jsxs as i, jsx as a, Fragment as te } from "react/jsx-runtime";
|
|
2
|
+
import { h as be, j as ae, r as Ne, k as Te } from "./api-C78tCfne.js";
|
|
3
|
+
import { message as ne, Button as V, DatePicker as De, Spin as j, Empty as ie, Tag as re } from "antd";
|
|
4
|
+
import S from "dayjs";
|
|
5
|
+
import "./echarts-B1OU1xr4.js";
|
|
6
|
+
import { useState as u, useCallback as x, useEffect as I, useMemo as H, useRef as se } from "react";
|
|
7
|
+
import * as Se from "echarts/core";
|
|
8
|
+
const we = "_screen_12g84_2", Ce = "_banner_12g84_14", Le = "_shareBtn_12g84_22", Be = "_bannerInner_12g84_50", xe = "_bannerLeft_12g84_59", Ie = "_bannerTitle_12g84_65", Re = "_bannerSubtitle_12g84_73", Ae = "_stats_12g84_79", He = "_statItem_12g84_86", Ee = "_statNum_12g84_93", Oe = "_statLabel_12g84_100", ke = "_statDivider_12g84_105", We = "_chartSection_12g84_112", $e = "_chartInner_12g84_118", Me = "_chartHeader_12g84_125", Ve = "_chartHeaderLeft_12g84_133", je = "_chartRangeWrap_12g84_139", ze = "_rangeBtns_12g84_146", Pe = "_rangeBtn_12g84_146", Ge = "_rangeBtnActive_12g84_170", qe = "_chartRangePicker_12g84_183", Fe = "_chartTitle_12g84_197", Ye = "_chartSubtitle_12g84_204", Ke = "_chartBody_12g84_210", Xe = "_chartLoading_12g84_214", Ze = "_chartEmpty_12g84_215", Je = "_main_12g84_225", Qe = "_timeline_12g84_236", Ue = "_timelineHeader_12g84_247", et = "_timelineScroll_12g84_256", tt = "_timelineItem_12g84_262", at = "_timelineItemActive_12g84_277", nt = "_timelineDot_12g84_282", it = "_timelineContent_12g84_297", rt = "_timelineTop_12g84_302", st = "_versionTag_12g84_309", ct = "_versionDate_12g84_315", lt = "_timelineSummary_12g84_320", ot = "_timelineMeta_12g84_330", dt = "_latestBadge_12g84_336", mt = "_detail_12g84_348", ht = "_detailHeader_12g84_359", gt = "_detailTitleRow_12g84_365", _t = "_detailVersion_12g84_371", pt = "_detailDate_12g84_377", ut = "_detailSummary_12g84_382", ft = "_detailScroll_12g84_389", yt = "_pointGrid_12g84_396", vt = "_pointCard_12g84_402", bt = "_pointHead_12g84_416", Nt = "_pointTitle_12g84_424", Tt = "_pointHeadRight_12g84_432", Dt = "_committerTag_12g84_441", St = "_pointTag_12g84_452", wt = "_pointDetail_12g84_458", Ct = "_loadingWrap_12g84_466", Lt = "_emptyWrap_12g84_473", Bt = "_authBox_12g84_483", xt = "_authHint_12g84_487", It = "_embedScreen_12g84_496", e = {
|
|
9
|
+
screen: we,
|
|
10
|
+
banner: Ce,
|
|
11
|
+
shareBtn: Le,
|
|
12
|
+
bannerInner: Be,
|
|
13
|
+
bannerLeft: xe,
|
|
14
|
+
bannerTitle: Ie,
|
|
15
|
+
bannerSubtitle: Re,
|
|
16
|
+
stats: Ae,
|
|
17
|
+
statItem: He,
|
|
18
|
+
statNum: Ee,
|
|
19
|
+
statLabel: Oe,
|
|
20
|
+
statDivider: ke,
|
|
21
|
+
chartSection: We,
|
|
22
|
+
chartInner: $e,
|
|
23
|
+
chartHeader: Me,
|
|
24
|
+
chartHeaderLeft: Ve,
|
|
25
|
+
chartRangeWrap: je,
|
|
26
|
+
rangeBtns: ze,
|
|
27
|
+
rangeBtn: Pe,
|
|
28
|
+
rangeBtnActive: Ge,
|
|
29
|
+
chartRangePicker: qe,
|
|
30
|
+
chartTitle: Fe,
|
|
31
|
+
chartSubtitle: Ye,
|
|
32
|
+
chartBody: Ke,
|
|
33
|
+
chartLoading: Xe,
|
|
34
|
+
chartEmpty: Ze,
|
|
35
|
+
main: Je,
|
|
36
|
+
timeline: Qe,
|
|
37
|
+
timelineHeader: Ue,
|
|
38
|
+
timelineScroll: et,
|
|
39
|
+
timelineItem: tt,
|
|
40
|
+
timelineItemActive: at,
|
|
41
|
+
timelineDot: nt,
|
|
42
|
+
timelineContent: it,
|
|
43
|
+
timelineTop: rt,
|
|
44
|
+
versionTag: st,
|
|
45
|
+
versionDate: ct,
|
|
46
|
+
timelineSummary: lt,
|
|
47
|
+
timelineMeta: ot,
|
|
48
|
+
latestBadge: dt,
|
|
49
|
+
detail: mt,
|
|
50
|
+
detailHeader: ht,
|
|
51
|
+
detailTitleRow: gt,
|
|
52
|
+
detailVersion: _t,
|
|
53
|
+
detailDate: pt,
|
|
54
|
+
detailSummary: ut,
|
|
55
|
+
detailScroll: ft,
|
|
56
|
+
pointGrid: yt,
|
|
57
|
+
pointCard: vt,
|
|
58
|
+
pointHead: bt,
|
|
59
|
+
pointTitle: Nt,
|
|
60
|
+
pointHeadRight: Tt,
|
|
61
|
+
committerTag: Dt,
|
|
62
|
+
pointTag: St,
|
|
63
|
+
pointDetail: wt,
|
|
64
|
+
loadingWrap: Ct,
|
|
65
|
+
emptyWrap: Lt,
|
|
66
|
+
authBox: Bt,
|
|
67
|
+
authHint: xt,
|
|
68
|
+
embedScreen: It
|
|
69
|
+
}, Rt = {
|
|
70
|
+
新功能: "green",
|
|
71
|
+
优化: "blue",
|
|
72
|
+
修复: "orange",
|
|
73
|
+
重构: "purple",
|
|
74
|
+
其他: "default"
|
|
75
|
+
}, z = {
|
|
76
|
+
新功能: "#52c41a",
|
|
77
|
+
优化: "#2f70f1",
|
|
78
|
+
修复: "#fa8c16",
|
|
79
|
+
重构: "#722ed1",
|
|
80
|
+
其他: "#8c8c8c"
|
|
81
|
+
}, ce = 8;
|
|
82
|
+
function At(g) {
|
|
83
|
+
const w = String((g == null ? void 0 : g.userMessage) || (g == null ? void 0 : g.message) || "");
|
|
84
|
+
return /未登录|Token无效|登录已失效|登录失效|登录过期|重新登录/.test(w);
|
|
85
|
+
}
|
|
86
|
+
function Ht({
|
|
87
|
+
option: g,
|
|
88
|
+
height: w = 320
|
|
89
|
+
}) {
|
|
90
|
+
const N = se(null), d = se(null);
|
|
91
|
+
return I(() => {
|
|
92
|
+
if (!N.current) return;
|
|
93
|
+
d.current || (d.current = Se.init(N.current)), d.current.setOption(g, !0);
|
|
94
|
+
const y = () => {
|
|
95
|
+
var v;
|
|
96
|
+
return (v = d.current) == null ? void 0 : v.resize();
|
|
97
|
+
};
|
|
98
|
+
return window.addEventListener("resize", y), () => window.removeEventListener("resize", y);
|
|
99
|
+
}, [g]), I(
|
|
100
|
+
() => () => {
|
|
101
|
+
var y;
|
|
102
|
+
(y = d.current) == null || y.dispose(), d.current = null;
|
|
103
|
+
},
|
|
104
|
+
[]
|
|
105
|
+
), /* @__PURE__ */ a("div", { ref: N, style: { width: "100%", height: `${w}px` } });
|
|
106
|
+
}
|
|
107
|
+
function Vt({
|
|
108
|
+
variant: g = "page"
|
|
109
|
+
}) {
|
|
110
|
+
const [w, N] = u(!1), [d, y] = u([]), [v, E] = u(null), [_, P] = u(null), [le, G] = u(!1), [O, oe] = u(
|
|
111
|
+
{}
|
|
112
|
+
), [de, q] = u(!1), [C, F] = u(!1), [R, L] = u([
|
|
113
|
+
S().subtract(6, "day").startOf("day"),
|
|
114
|
+
S().endOf("day")
|
|
115
|
+
]), [k, Y] = u("7"), K = x(async () => {
|
|
116
|
+
N(!0);
|
|
117
|
+
try {
|
|
118
|
+
const n = await be("z-team"), o = [...(Array.isArray(n) ? n : []).filter(
|
|
119
|
+
(c) => c && typeof c == "object"
|
|
120
|
+
)].sort(
|
|
121
|
+
(c, l) => new Date(l.commitDate).getTime() - new Date(c.commitDate).getTime()
|
|
122
|
+
);
|
|
123
|
+
y(o), F(!1), o.length > 0 ? E(o[0].id) : (E(null), P(null));
|
|
124
|
+
} catch (n) {
|
|
125
|
+
console.error("[ChangeLogView] load versions error:", n), At(n) && F(!0);
|
|
126
|
+
} finally {
|
|
127
|
+
N(!1);
|
|
128
|
+
}
|
|
129
|
+
}, []), X = x(async (n) => {
|
|
130
|
+
G(!0);
|
|
131
|
+
try {
|
|
132
|
+
const r = await ae(n, void 0, "z-team");
|
|
133
|
+
P(r && typeof r == "object" ? r : null);
|
|
134
|
+
} catch (r) {
|
|
135
|
+
console.error("[ChangeLogView] load detail error:", r);
|
|
136
|
+
} finally {
|
|
137
|
+
G(!1);
|
|
138
|
+
}
|
|
139
|
+
}, []);
|
|
140
|
+
I(() => {
|
|
141
|
+
K();
|
|
142
|
+
}, [K]), I(() => {
|
|
143
|
+
v != null && X(v);
|
|
144
|
+
}, [v, X]);
|
|
145
|
+
const W = H(() => {
|
|
146
|
+
const n = d.length, r = d.reduce(
|
|
147
|
+
(c, l) => c + (l.pointCount ?? 0),
|
|
148
|
+
0
|
|
149
|
+
);
|
|
150
|
+
let o = 0;
|
|
151
|
+
if (d.length >= 2) {
|
|
152
|
+
const c = d.map((l) => new Date(l.commitDate).getTime()).filter((l) => !Number.isNaN(l));
|
|
153
|
+
c.length >= 2 && (o = Math.round(
|
|
154
|
+
(Math.max(...c) - Math.min(...c)) / 864e5
|
|
155
|
+
));
|
|
156
|
+
}
|
|
157
|
+
return { versionCount: n, pointTotal: r, spanDays: o };
|
|
158
|
+
}, [d]), b = H(() => {
|
|
159
|
+
if (!R) return d;
|
|
160
|
+
const [n, r] = R, o = n.startOf("day").valueOf(), c = r.endOf("day").valueOf();
|
|
161
|
+
return d.filter((l) => {
|
|
162
|
+
const T = new Date(l.commitDate).getTime();
|
|
163
|
+
return !Number.isNaN(T) && T >= o && T <= c;
|
|
164
|
+
});
|
|
165
|
+
}, [d, R]);
|
|
166
|
+
I(() => {
|
|
167
|
+
if (b.length === 0) return;
|
|
168
|
+
let n = !1;
|
|
169
|
+
return q(!0), Promise.all(
|
|
170
|
+
b.map(
|
|
171
|
+
(r) => ae(r.id, void 0, "z-team").catch((o) => (console.warn(
|
|
172
|
+
`[ChangeLogView] failed to load detail for version ${r.version}`,
|
|
173
|
+
o
|
|
174
|
+
), null))
|
|
175
|
+
)
|
|
176
|
+
).then((r) => {
|
|
177
|
+
if (n) return;
|
|
178
|
+
const o = {};
|
|
179
|
+
r.forEach((c, l) => {
|
|
180
|
+
c && typeof c == "object" && b[l] && (o[b[l].id] = c);
|
|
181
|
+
}), oe(o);
|
|
182
|
+
}).finally(() => {
|
|
183
|
+
n || q(!1);
|
|
184
|
+
}), () => {
|
|
185
|
+
n = !0;
|
|
186
|
+
};
|
|
187
|
+
}, [b]);
|
|
188
|
+
const { chartOption: me, hasChartData: he } = H(() => {
|
|
189
|
+
const n = [...b].sort(
|
|
190
|
+
(t, s) => new Date(t.commitDate).getTime() - new Date(s.commitDate).getTime()
|
|
191
|
+
), r = n.map((t) => t.commitDate), o = /* @__PURE__ */ new Set(), c = {};
|
|
192
|
+
Object.values(O).forEach((t) => {
|
|
193
|
+
(Array.isArray(t == null ? void 0 : t.items) ? t.items : []).forEach((m) => {
|
|
194
|
+
if (m.category ? o.add(m.category) : o.add("其他"), typeof m.committers == "string") {
|
|
195
|
+
const p = m.committers.split(",").map((h) => h.trim()).filter(Boolean);
|
|
196
|
+
if (p.length > 0) {
|
|
197
|
+
const h = 1 / p.length;
|
|
198
|
+
p.forEach((B) => {
|
|
199
|
+
c[B] = (c[B] || 0) + h;
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
const l = ["新功能", "优化", "修复", "重构", "其他"].filter(
|
|
206
|
+
(t) => o.has(t)
|
|
207
|
+
);
|
|
208
|
+
o.forEach((t) => {
|
|
209
|
+
l.includes(t) || l.push(t);
|
|
210
|
+
});
|
|
211
|
+
const T = Object.entries(c).sort((t, s) => s[1] - t[1]).map(([t]) => t), pe = T.slice(0, ce), Q = T.length > ce, D = {};
|
|
212
|
+
l.forEach(
|
|
213
|
+
(t) => D[t] = new Array(r.length).fill(0)
|
|
214
|
+
);
|
|
215
|
+
const f = {};
|
|
216
|
+
pe.forEach(
|
|
217
|
+
(t) => f[t] = new Array(r.length).fill(0)
|
|
218
|
+
), Q && (f.其他 = new Array(r.length).fill(0)), n.forEach((t, s) => {
|
|
219
|
+
const m = O[t.id];
|
|
220
|
+
if (!m) return;
|
|
221
|
+
(Array.isArray(m.items) ? m.items : []).forEach((h) => {
|
|
222
|
+
const B = h.category || "其他";
|
|
223
|
+
if (D[B] && (D[B][s] += 1), typeof h.committers == "string") {
|
|
224
|
+
const M = h.committers.split(",").map((A) => A.trim()).filter(Boolean);
|
|
225
|
+
if (M.length > 0) {
|
|
226
|
+
const A = 1 / M.length;
|
|
227
|
+
M.forEach((ee) => {
|
|
228
|
+
f[ee] ? f[ee][s] += A : Q && (f.其他[s] += A);
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
const ue = n.reduce((t, s) => {
|
|
235
|
+
const m = t.length > 0 ? t[t.length - 1] : 0;
|
|
236
|
+
return t.push(m + (s.pointCount ?? 0)), t;
|
|
237
|
+
}, []), U = {};
|
|
238
|
+
l.forEach((t) => {
|
|
239
|
+
U[t] = D[t].reduce((s, m) => {
|
|
240
|
+
const p = s.length > 0 ? s[s.length - 1] : 0;
|
|
241
|
+
return s.push(p + m), s;
|
|
242
|
+
}, []);
|
|
243
|
+
});
|
|
244
|
+
const fe = [
|
|
245
|
+
...l.map((t) => ({
|
|
246
|
+
name: t,
|
|
247
|
+
type: "bar",
|
|
248
|
+
stack: "category",
|
|
249
|
+
data: D[t],
|
|
250
|
+
itemStyle: { color: z[t] || "#8c8c8c" },
|
|
251
|
+
barMaxWidth: 40
|
|
252
|
+
})),
|
|
253
|
+
...Object.keys(f).map((t) => ({
|
|
254
|
+
name: `@${t}`,
|
|
255
|
+
type: "bar",
|
|
256
|
+
stack: "committer",
|
|
257
|
+
data: f[t],
|
|
258
|
+
barMaxWidth: 40
|
|
259
|
+
})),
|
|
260
|
+
{
|
|
261
|
+
name: "要点累计",
|
|
262
|
+
type: "line",
|
|
263
|
+
yAxisIndex: 1,
|
|
264
|
+
data: ue,
|
|
265
|
+
smooth: !0,
|
|
266
|
+
symbol: "circle",
|
|
267
|
+
symbolSize: 6,
|
|
268
|
+
lineStyle: { color: "#2f70f1", width: 2 },
|
|
269
|
+
itemStyle: { color: "#2f70f1", borderWidth: 2 }
|
|
270
|
+
},
|
|
271
|
+
...l.map((t) => ({
|
|
272
|
+
name: `${t}累计`,
|
|
273
|
+
type: "line",
|
|
274
|
+
yAxisIndex: 1,
|
|
275
|
+
data: U[t],
|
|
276
|
+
smooth: !0,
|
|
277
|
+
symbol: "circle",
|
|
278
|
+
symbolSize: 4,
|
|
279
|
+
lineStyle: {
|
|
280
|
+
color: z[t] || "#8c8c8c",
|
|
281
|
+
width: 2
|
|
282
|
+
},
|
|
283
|
+
itemStyle: { color: z[t] || "#8c8c8c" }
|
|
284
|
+
}))
|
|
285
|
+
], ye = {
|
|
286
|
+
tooltip: {
|
|
287
|
+
trigger: "axis",
|
|
288
|
+
axisPointer: { type: "shadow" },
|
|
289
|
+
backgroundColor: "rgba(255,255,255,0.96)",
|
|
290
|
+
borderColor: "#f0f0f0",
|
|
291
|
+
textStyle: { color: "#262626" },
|
|
292
|
+
formatter: (t) => {
|
|
293
|
+
if (!Array.isArray(t) || t.length === 0) return "";
|
|
294
|
+
let m = `<div style="font-weight:600;margin-bottom:6px;">${t[0].axisValue}</div>`;
|
|
295
|
+
return t.forEach((p) => {
|
|
296
|
+
const h = Number(p.value) || 0;
|
|
297
|
+
h > 0 && (m += `<div style="display:flex;align-items:center;gap:8px;line-height:1.8;">
|
|
298
|
+
<span style="display:inline-block;width:10px;height:10px;border-radius:50%;background:${p.color};"></span>
|
|
299
|
+
<span style="flex:1;">${p.seriesName}</span>
|
|
300
|
+
<span style="font-weight:600;">${Number.isInteger(h) ? h : h.toFixed(2)}</span>
|
|
301
|
+
</div>`);
|
|
302
|
+
}), m;
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
legend: {
|
|
306
|
+
type: "scroll",
|
|
307
|
+
top: 0,
|
|
308
|
+
left: "center",
|
|
309
|
+
itemGap: 16,
|
|
310
|
+
textStyle: { color: "#595959" }
|
|
311
|
+
},
|
|
312
|
+
grid: {
|
|
313
|
+
left: 16,
|
|
314
|
+
right: 16,
|
|
315
|
+
bottom: 24,
|
|
316
|
+
top: 48,
|
|
317
|
+
containLabel: !0
|
|
318
|
+
},
|
|
319
|
+
xAxis: {
|
|
320
|
+
type: "category",
|
|
321
|
+
data: r,
|
|
322
|
+
axisLine: { lineStyle: { color: "#d9d9d9" } },
|
|
323
|
+
axisLabel: {
|
|
324
|
+
rotate: r.length > 12 ? 30 : 0,
|
|
325
|
+
formatter: (t) => {
|
|
326
|
+
const s = new Date(t).getDay();
|
|
327
|
+
return s >= 1 && s <= 5 ? `{weekday|${t}}` : `{weekend|${t}}`;
|
|
328
|
+
},
|
|
329
|
+
rich: {
|
|
330
|
+
weekday: { color: "#262626", fontWeight: 600 },
|
|
331
|
+
weekend: { color: "#bfbfbf" }
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
yAxis: [
|
|
336
|
+
{
|
|
337
|
+
type: "value",
|
|
338
|
+
splitLine: { lineStyle: { color: "#f0f0f0" } },
|
|
339
|
+
axisLabel: { color: "#8c8c8c" }
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
type: "value",
|
|
343
|
+
position: "right",
|
|
344
|
+
splitLine: { show: !1 },
|
|
345
|
+
axisLabel: { color: "#2f70f1" }
|
|
346
|
+
}
|
|
347
|
+
],
|
|
348
|
+
series: fe,
|
|
349
|
+
animationDuration: 600
|
|
350
|
+
}, ve = n.length > 0 && (Object.values(D).some((t) => t.some((s) => s > 0)) || Object.values(f).some((t) => t.some((s) => s > 0)));
|
|
351
|
+
return { chartOption: ye, hasChartData: ve };
|
|
352
|
+
}, [b, O]), Z = x(() => {
|
|
353
|
+
try {
|
|
354
|
+
Ne();
|
|
355
|
+
} catch (n) {
|
|
356
|
+
console.error("[ChangeLogView] redirect to login failed:", n), window.location.href = "/login";
|
|
357
|
+
}
|
|
358
|
+
}, []), ge = x(async () => {
|
|
359
|
+
const n = window.location.href;
|
|
360
|
+
try {
|
|
361
|
+
await navigator.clipboard.writeText(n), ne.success("链接已复制,可直接发送");
|
|
362
|
+
} catch {
|
|
363
|
+
ne.error("复制失败,请手动复制地址栏链接");
|
|
364
|
+
}
|
|
365
|
+
}, []), $ = x((n) => {
|
|
366
|
+
Y(n), L(n === "7" ? [
|
|
367
|
+
S().subtract(6, "day").startOf("day"),
|
|
368
|
+
S().endOf("day")
|
|
369
|
+
] : n === "30" ? [
|
|
370
|
+
S().subtract(29, "day").startOf("day"),
|
|
371
|
+
S().endOf("day")
|
|
372
|
+
] : null);
|
|
373
|
+
}, []), _e = g === "embed", J = H(
|
|
374
|
+
() => Array.isArray(_ == null ? void 0 : _.items) ? _.items : [],
|
|
375
|
+
[_]
|
|
376
|
+
);
|
|
377
|
+
return /* @__PURE__ */ i("div", { className: _e ? `${e.screen} ${e.embedScreen}` : e.screen, children: [
|
|
378
|
+
/* @__PURE__ */ a("header", { className: e.banner, children: /* @__PURE__ */ i("div", { className: e.bannerInner, children: [
|
|
379
|
+
/* @__PURE__ */ i("div", { className: e.bannerLeft, children: [
|
|
380
|
+
/* @__PURE__ */ a("h1", { className: e.bannerTitle, children: "Z Team 产品迭代日志" }),
|
|
381
|
+
/* @__PURE__ */ a("p", { className: e.bannerSubtitle, children: "每一次代码提交背后,都是产品的进化" })
|
|
382
|
+
] }),
|
|
383
|
+
/* @__PURE__ */ i("div", { className: e.stats, children: [
|
|
384
|
+
/* @__PURE__ */ i("div", { className: e.statItem, children: [
|
|
385
|
+
/* @__PURE__ */ a("div", { className: e.statNum, children: C ? "—" : W.versionCount }),
|
|
386
|
+
/* @__PURE__ */ a("div", { className: e.statLabel, children: "迭代版本" })
|
|
387
|
+
] }),
|
|
388
|
+
/* @__PURE__ */ a("div", { className: e.statDivider }),
|
|
389
|
+
/* @__PURE__ */ i("div", { className: e.statItem, children: [
|
|
390
|
+
/* @__PURE__ */ a("div", { className: e.statNum, children: C ? "—" : W.pointTotal }),
|
|
391
|
+
/* @__PURE__ */ a("div", { className: e.statLabel, children: "产品要点" })
|
|
392
|
+
] }),
|
|
393
|
+
/* @__PURE__ */ a("div", { className: e.statDivider }),
|
|
394
|
+
/* @__PURE__ */ i("div", { className: e.statItem, children: [
|
|
395
|
+
/* @__PURE__ */ a("div", { className: e.statNum, children: C ? "—" : W.spanDays }),
|
|
396
|
+
/* @__PURE__ */ a("div", { className: e.statLabel, children: "持续天数" })
|
|
397
|
+
] })
|
|
398
|
+
] }),
|
|
399
|
+
/* @__PURE__ */ a(
|
|
400
|
+
V,
|
|
401
|
+
{
|
|
402
|
+
className: e.shareBtn,
|
|
403
|
+
type: "default",
|
|
404
|
+
ghost: !0,
|
|
405
|
+
onClick: ge,
|
|
406
|
+
children: "分享链接"
|
|
407
|
+
}
|
|
408
|
+
)
|
|
409
|
+
] }) }),
|
|
410
|
+
/* @__PURE__ */ a("section", { className: e.chartSection, children: /* @__PURE__ */ i("div", { className: e.chartInner, children: [
|
|
411
|
+
/* @__PURE__ */ i("div", { className: e.chartHeader, children: [
|
|
412
|
+
/* @__PURE__ */ i("div", { className: e.chartHeaderLeft, children: [
|
|
413
|
+
/* @__PURE__ */ a("h2", { className: e.chartTitle, children: "迭代节奏与贡献分布" }),
|
|
414
|
+
/* @__PURE__ */ a("p", { className: e.chartSubtitle, children: "两根柱:类型拆分 · 人员拆分(多人贡献均摊);折线:各类型/总量累计" })
|
|
415
|
+
] }),
|
|
416
|
+
/* @__PURE__ */ i("div", { className: e.chartRangeWrap, children: [
|
|
417
|
+
/* @__PURE__ */ i("div", { className: e.rangeBtns, children: [
|
|
418
|
+
/* @__PURE__ */ a(
|
|
419
|
+
"button",
|
|
420
|
+
{
|
|
421
|
+
className: k === "7" ? e.rangeBtnActive : e.rangeBtn,
|
|
422
|
+
onClick: () => $("7"),
|
|
423
|
+
children: "近7天"
|
|
424
|
+
}
|
|
425
|
+
),
|
|
426
|
+
/* @__PURE__ */ a(
|
|
427
|
+
"button",
|
|
428
|
+
{
|
|
429
|
+
className: k === "30" ? e.rangeBtnActive : e.rangeBtn,
|
|
430
|
+
onClick: () => $("30"),
|
|
431
|
+
children: "近30天"
|
|
432
|
+
}
|
|
433
|
+
),
|
|
434
|
+
/* @__PURE__ */ a(
|
|
435
|
+
"button",
|
|
436
|
+
{
|
|
437
|
+
className: k === "all" ? e.rangeBtnActive : e.rangeBtn,
|
|
438
|
+
onClick: () => $("all"),
|
|
439
|
+
children: "全部"
|
|
440
|
+
}
|
|
441
|
+
)
|
|
442
|
+
] }),
|
|
443
|
+
/* @__PURE__ */ a(
|
|
444
|
+
De.RangePicker,
|
|
445
|
+
{
|
|
446
|
+
className: e.chartRangePicker,
|
|
447
|
+
value: R,
|
|
448
|
+
allowClear: !0,
|
|
449
|
+
placeholder: ["开始日期", "结束日期"],
|
|
450
|
+
onChange: (n) => {
|
|
451
|
+
Y(""), n && n[0] && n[1] ? L([n[0], n[1]]) : L(null);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
)
|
|
455
|
+
] })
|
|
456
|
+
] }),
|
|
457
|
+
/* @__PURE__ */ a("div", { className: e.chartBody, children: de ? /* @__PURE__ */ a("div", { className: e.chartLoading, children: /* @__PURE__ */ a(j, { description: "正在生成统计图表..." }) }) : he ? /* @__PURE__ */ a(Ht, { option: me, height: 360 }) : C ? /* @__PURE__ */ i("div", { className: `${e.chartEmpty} ${e.authBox}`, children: [
|
|
458
|
+
/* @__PURE__ */ a("div", { className: e.authHint, children: "登录后可查看完整的产品迭代日志" }),
|
|
459
|
+
/* @__PURE__ */ a(
|
|
460
|
+
V,
|
|
461
|
+
{
|
|
462
|
+
size: "small",
|
|
463
|
+
type: "primary",
|
|
464
|
+
onClick: Z,
|
|
465
|
+
children: "登录查看"
|
|
466
|
+
}
|
|
467
|
+
)
|
|
468
|
+
] }) : /* @__PURE__ */ a("div", { className: e.chartEmpty, children: "暂无足够数据生成图表" }) })
|
|
469
|
+
] }) }),
|
|
470
|
+
/* @__PURE__ */ i("main", { className: e.main, children: [
|
|
471
|
+
/* @__PURE__ */ i("aside", { className: e.timeline, children: [
|
|
472
|
+
/* @__PURE__ */ a("div", { className: e.timelineHeader, children: /* @__PURE__ */ a("span", { children: "迭代时间线" }) }),
|
|
473
|
+
/* @__PURE__ */ a("div", { className: e.timelineScroll, children: w ? /* @__PURE__ */ a("div", { className: e.loadingWrap, children: /* @__PURE__ */ a(j, { description: "加载中..." }) }) : d.length === 0 ? /* @__PURE__ */ a("div", { className: `${e.emptyWrap} ${e.authBox}`, children: C ? /* @__PURE__ */ i(te, { children: [
|
|
474
|
+
/* @__PURE__ */ a("div", { className: e.authHint, children: "登录后可查看完整的产品迭代日志" }),
|
|
475
|
+
/* @__PURE__ */ a(
|
|
476
|
+
V,
|
|
477
|
+
{
|
|
478
|
+
size: "small",
|
|
479
|
+
type: "primary",
|
|
480
|
+
onClick: Z,
|
|
481
|
+
children: "登录查看"
|
|
482
|
+
}
|
|
483
|
+
)
|
|
484
|
+
] }) : "暂无迭代记录" }) : d.map((n, r) => /* @__PURE__ */ i(
|
|
485
|
+
"div",
|
|
486
|
+
{
|
|
487
|
+
className: `${e.timelineItem} ${Te(v, n.id) ? e.timelineItemActive : ""}`,
|
|
488
|
+
onClick: () => E(n.id),
|
|
489
|
+
children: [
|
|
490
|
+
/* @__PURE__ */ a("div", { className: e.timelineDot }),
|
|
491
|
+
/* @__PURE__ */ i("div", { className: e.timelineContent, children: [
|
|
492
|
+
/* @__PURE__ */ i("div", { className: e.timelineTop, children: [
|
|
493
|
+
/* @__PURE__ */ a("span", { className: e.versionTag, children: n.version }),
|
|
494
|
+
/* @__PURE__ */ a("span", { className: e.versionDate, children: n.commitDate })
|
|
495
|
+
] }),
|
|
496
|
+
n.summary && /* @__PURE__ */ a("div", { className: e.timelineSummary, title: n.summary, children: n.summary }),
|
|
497
|
+
/* @__PURE__ */ a("div", { className: e.timelineMeta, children: /* @__PURE__ */ i("span", { children: [
|
|
498
|
+
n.pointCount ?? 0,
|
|
499
|
+
" 条产品要点"
|
|
500
|
+
] }) })
|
|
501
|
+
] }),
|
|
502
|
+
r === 0 && /* @__PURE__ */ a("span", { className: e.latestBadge, children: "最新" })
|
|
503
|
+
]
|
|
504
|
+
},
|
|
505
|
+
n.id
|
|
506
|
+
)) })
|
|
507
|
+
] }),
|
|
508
|
+
/* @__PURE__ */ a("section", { className: e.detail, children: le ? /* @__PURE__ */ a("div", { className: e.loadingWrap, children: /* @__PURE__ */ a(j, { description: "加载产品要点..." }) }) : _ ? /* @__PURE__ */ i(te, { children: [
|
|
509
|
+
/* @__PURE__ */ i("div", { className: e.detailHeader, children: [
|
|
510
|
+
/* @__PURE__ */ i("div", { className: e.detailTitleRow, children: [
|
|
511
|
+
/* @__PURE__ */ a("span", { className: e.detailVersion, children: _.version }),
|
|
512
|
+
/* @__PURE__ */ a("span", { className: e.detailDate, children: _.commitDate })
|
|
513
|
+
] }),
|
|
514
|
+
_.summary && /* @__PURE__ */ a("div", { className: e.detailSummary, children: _.summary })
|
|
515
|
+
] }),
|
|
516
|
+
/* @__PURE__ */ a("div", { className: e.detailScroll, children: J.length === 0 ? /* @__PURE__ */ a(ie, { description: "该版本下暂无产品迭代要点" }) : /* @__PURE__ */ a("div", { className: e.pointGrid, children: J.map((n) => /* @__PURE__ */ i("div", { className: e.pointCard, children: [
|
|
517
|
+
/* @__PURE__ */ i("div", { className: e.pointHead, children: [
|
|
518
|
+
/* @__PURE__ */ a("span", { className: e.pointTitle, children: n.pointTitle }),
|
|
519
|
+
/* @__PURE__ */ i("div", { className: e.pointHeadRight, children: [
|
|
520
|
+
typeof n.committers == "string" && n.committers.split(",").map((r) => /* @__PURE__ */ i(re, { className: e.committerTag, children: [
|
|
521
|
+
"@",
|
|
522
|
+
r.trim()
|
|
523
|
+
] }, r)),
|
|
524
|
+
n.category && /* @__PURE__ */ a(
|
|
525
|
+
re,
|
|
526
|
+
{
|
|
527
|
+
className: e.pointTag,
|
|
528
|
+
color: Rt[n.category] || "default",
|
|
529
|
+
children: n.category
|
|
530
|
+
}
|
|
531
|
+
)
|
|
532
|
+
] })
|
|
533
|
+
] }),
|
|
534
|
+
n.pointDetail && /* @__PURE__ */ a("div", { className: e.pointDetail, children: n.pointDetail })
|
|
535
|
+
] }, n.id)) }) })
|
|
536
|
+
] }) : /* @__PURE__ */ a("div", { className: e.emptyWrap, children: /* @__PURE__ */ a(ie, { description: "选择左侧版本查看产品迭代要点" }) }) })
|
|
537
|
+
] })
|
|
538
|
+
] });
|
|
539
|
+
}
|
|
540
|
+
export {
|
|
541
|
+
Vt as C
|
|
542
|
+
};
|