@yuku123/z-team-component 0.2.33 → 0.2.35
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-CfXxzvhB.js +544 -0
- package/dist/{ComponentDoc-B2qJmtU6.js → ComponentDoc-CTvxY3v4.js} +40 -40
- package/dist/{InvitationManagementPage-61uxWWwF.js → InvitationManagementPage-NlRdSCc0.js} +1 -1
- package/dist/{OnboardingPage-BBKst6Qf.js → OnboardingPage-BPpq5uih.js} +2 -2
- package/dist/SmartWorkbench.module-xRRmpTTw.js +85 -0
- package/dist/{SystemShell-C52BvjTM.js → SystemShell-o1Q80wKU.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-DcpNsSj8.js} +1 -1
- package/dist/{createWorkspaceWsHandler-CBk4DqP4.js → createWorkspaceWsHandler-mq-UTF2O.js} +4 -4
- package/dist/{index-DHh0L9FB.js → index-2Gkwtm48.js} +1222 -1207
- package/dist/{index-DOPkM2W8.js → index-7nSly-MA.js} +6 -6
- package/dist/{index-BoGVJ0hC.js → index-BAK7UDvY.js} +1 -1
- package/dist/{index-BTLD5gUt.js → index-BX1Wd9x9.js} +3 -3
- package/dist/{index-BIJnjJd5.js → index-Bdu31aRV.js} +2 -2
- package/dist/{index-CFakyLYo.js → index-BmPqCnxn.js} +65 -56
- package/dist/{index-B_EBV24V.js → index-C83kfp3z.js} +1 -1
- package/dist/{index-Bd57t_yF.js → index-CEW8AmbW.js} +1 -1
- package/dist/{index-BEqPF6wm.js → index-CIfE-dmM.js} +2260 -2290
- package/dist/{index-ff3leJCK.js → index-CKDlK4Zz.js} +3 -3
- package/dist/{index-BG755_pa.js → index-CRR1GuYN.js} +1 -1
- package/dist/{index-CEmwgW65.js → index-CYvL_OAH.js} +1055 -1057
- package/dist/{index-DYgD6BuB.js → index-ClA0896K.js} +4 -4
- package/dist/{index-tDO0JBvI.js → index-D4tQ0KN9.js} +5 -5
- package/dist/{index-BjqYiZpC.js → index-DFY3lzq0.js} +3 -3
- package/dist/{index-7VAcVmtR.js → index-DyJp2kSb.js} +7 -7
- package/dist/index-a4cM-7bG.js +1433 -0
- 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,544 @@
|
|
|
1
|
+
import { jsxs as i, jsx as n, Fragment as te } from "react/jsx-runtime";
|
|
2
|
+
import { h as be, j as ae, r as Ne, k as ke } from "./api-C78tCfne.js";
|
|
3
|
+
import { message as ne, Button as V, DatePicker as Te, Spin as j, Empty as ie, Tag as re } from "antd";
|
|
4
|
+
import D from "dayjs";
|
|
5
|
+
import "./echarts-B1OU1xr4.js";
|
|
6
|
+
import { useState as u, useCallback as B, useEffect as x, useMemo as A, useRef as se } from "react";
|
|
7
|
+
import * as De from "echarts/core";
|
|
8
|
+
const Se = "_screen_o5a0k_2", we = "_banner_o5a0k_14", Ce = "_shareBtn_o5a0k_22", Le = "_bannerInner_o5a0k_49", Be = "_bannerLeft_o5a0k_56", xe = "_bannerTitle_o5a0k_62", Ie = "_bannerSubtitle_o5a0k_70", Re = "_stats_o5a0k_76", Ae = "_statItem_o5a0k_82", He = "_statNum_o5a0k_89", Ee = "_statLabel_o5a0k_96", Oe = "_statDivider_o5a0k_101", We = "_chartSection_o5a0k_108", $e = "_chartInner_o5a0k_114", Me = "_chartHeader_o5a0k_121", Ve = "_chartHeaderLeft_o5a0k_129", je = "_chartRangeWrap_o5a0k_135", ze = "_rangeBtns_o5a0k_142", Pe = "_rangeBtn_o5a0k_142", Ge = "_rangeBtnActive_o5a0k_166", qe = "_chartRangePicker_o5a0k_179", Fe = "_chartTitle_o5a0k_193", Ye = "_chartSubtitle_o5a0k_200", Ke = "_chartBody_o5a0k_206", Xe = "_chartLoading_o5a0k_210", Ze = "_chartEmpty_o5a0k_211", Je = "_main_o5a0k_221", Qe = "_timeline_o5a0k_232", Ue = "_timelineHeader_o5a0k_243", et = "_timelineScroll_o5a0k_252", tt = "_timelineItem_o5a0k_258", at = "_timelineItemActive_o5a0k_273", nt = "_timelineDot_o5a0k_278", it = "_timelineContent_o5a0k_293", rt = "_timelineTop_o5a0k_298", st = "_versionTag_o5a0k_305", ot = "_versionDate_o5a0k_311", ct = "_timelineSummary_o5a0k_316", lt = "_timelineMeta_o5a0k_326", dt = "_latestBadge_o5a0k_332", mt = "_detail_o5a0k_344", ht = "_detailHeader_o5a0k_355", _t = "_detailTitleRow_o5a0k_361", pt = "_detailVersion_o5a0k_367", gt = "_detailDate_o5a0k_373", ut = "_detailSummary_o5a0k_378", ft = "_detailScroll_o5a0k_385", yt = "_pointGrid_o5a0k_392", vt = "_pointCard_o5a0k_398", bt = "_pointHead_o5a0k_412", Nt = "_pointTitle_o5a0k_420", kt = "_pointHeadRight_o5a0k_428", Tt = "_committerTag_o5a0k_437", Dt = "_pointTag_o5a0k_448", St = "_pointDetail_o5a0k_454", wt = "_loadingWrap_o5a0k_462", Ct = "_emptyWrap_o5a0k_469", Lt = "_authBox_o5a0k_479", Bt = "_authHint_o5a0k_483", xt = "_embedScreen_o5a0k_492", e = {
|
|
9
|
+
screen: Se,
|
|
10
|
+
banner: we,
|
|
11
|
+
shareBtn: Ce,
|
|
12
|
+
bannerInner: Le,
|
|
13
|
+
bannerLeft: Be,
|
|
14
|
+
bannerTitle: xe,
|
|
15
|
+
bannerSubtitle: Ie,
|
|
16
|
+
stats: Re,
|
|
17
|
+
statItem: Ae,
|
|
18
|
+
statNum: He,
|
|
19
|
+
statLabel: Ee,
|
|
20
|
+
statDivider: Oe,
|
|
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: ot,
|
|
46
|
+
timelineSummary: ct,
|
|
47
|
+
timelineMeta: lt,
|
|
48
|
+
latestBadge: dt,
|
|
49
|
+
detail: mt,
|
|
50
|
+
detailHeader: ht,
|
|
51
|
+
detailTitleRow: _t,
|
|
52
|
+
detailVersion: pt,
|
|
53
|
+
detailDate: gt,
|
|
54
|
+
detailSummary: ut,
|
|
55
|
+
detailScroll: ft,
|
|
56
|
+
pointGrid: yt,
|
|
57
|
+
pointCard: vt,
|
|
58
|
+
pointHead: bt,
|
|
59
|
+
pointTitle: Nt,
|
|
60
|
+
pointHeadRight: kt,
|
|
61
|
+
committerTag: Tt,
|
|
62
|
+
pointTag: Dt,
|
|
63
|
+
pointDetail: St,
|
|
64
|
+
loadingWrap: wt,
|
|
65
|
+
emptyWrap: Ct,
|
|
66
|
+
authBox: Lt,
|
|
67
|
+
authHint: Bt,
|
|
68
|
+
embedScreen: xt
|
|
69
|
+
}, It = {
|
|
70
|
+
新功能: "green",
|
|
71
|
+
优化: "blue",
|
|
72
|
+
修复: "orange",
|
|
73
|
+
重构: "purple",
|
|
74
|
+
其他: "default"
|
|
75
|
+
}, z = {
|
|
76
|
+
新功能: "#52c41a",
|
|
77
|
+
优化: "#2f70f1",
|
|
78
|
+
修复: "#fa8c16",
|
|
79
|
+
重构: "#722ed1",
|
|
80
|
+
其他: "#8c8c8c"
|
|
81
|
+
}, oe = 8;
|
|
82
|
+
function Rt(_) {
|
|
83
|
+
const S = String((_ == null ? void 0 : _.userMessage) || (_ == null ? void 0 : _.message) || "");
|
|
84
|
+
return /未登录|Token无效|登录已失效|登录失效|登录过期|重新登录/.test(S);
|
|
85
|
+
}
|
|
86
|
+
function At({
|
|
87
|
+
option: _,
|
|
88
|
+
height: S = 320
|
|
89
|
+
}) {
|
|
90
|
+
const N = se(null), d = se(null);
|
|
91
|
+
return x(() => {
|
|
92
|
+
if (!N.current) return;
|
|
93
|
+
d.current || (d.current = De.init(N.current)), d.current.setOption(_, !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
|
+
}, [_]), x(
|
|
100
|
+
() => () => {
|
|
101
|
+
var y;
|
|
102
|
+
(y = d.current) == null || y.dispose(), d.current = null;
|
|
103
|
+
},
|
|
104
|
+
[]
|
|
105
|
+
), /* @__PURE__ */ n("div", { ref: N, style: { width: "100%", height: `${S}px` } });
|
|
106
|
+
}
|
|
107
|
+
function Vt({
|
|
108
|
+
variant: _ = "page"
|
|
109
|
+
}) {
|
|
110
|
+
const [S, N] = u(!1), [d, y] = u([]), [v, H] = u(null), [p, P] = u(null), [ce, G] = u(!1), [E, le] = u(
|
|
111
|
+
{}
|
|
112
|
+
), [de, q] = u(!1), [w, F] = u(!1), [I, C] = u([
|
|
113
|
+
D().subtract(6, "day").startOf("day"),
|
|
114
|
+
D().endOf("day")
|
|
115
|
+
]), [O, Y] = u("7"), K = B(async () => {
|
|
116
|
+
N(!0);
|
|
117
|
+
try {
|
|
118
|
+
const a = await be("z-team"), l = [...(Array.isArray(a) ? a : []).filter(
|
|
119
|
+
(o) => o && typeof o == "object"
|
|
120
|
+
)].sort(
|
|
121
|
+
(o, c) => new Date(c.commitDate).getTime() - new Date(o.commitDate).getTime()
|
|
122
|
+
);
|
|
123
|
+
y(l), F(!1), l.length > 0 ? H(l[0].id) : (H(null), P(null));
|
|
124
|
+
} catch (a) {
|
|
125
|
+
console.error("[ChangeLogView] load versions error:", a), Rt(a) && F(!0);
|
|
126
|
+
} finally {
|
|
127
|
+
N(!1);
|
|
128
|
+
}
|
|
129
|
+
}, []), X = B(async (a) => {
|
|
130
|
+
G(!0);
|
|
131
|
+
try {
|
|
132
|
+
const r = await ae(a, 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
|
+
x(() => {
|
|
141
|
+
K();
|
|
142
|
+
}, [K]), x(() => {
|
|
143
|
+
v != null && X(v);
|
|
144
|
+
}, [v, X]);
|
|
145
|
+
const W = A(() => {
|
|
146
|
+
const a = d.length, r = d.reduce(
|
|
147
|
+
(o, c) => o + (c.pointCount ?? 0),
|
|
148
|
+
0
|
|
149
|
+
);
|
|
150
|
+
let l = 0;
|
|
151
|
+
if (d.length >= 2) {
|
|
152
|
+
const o = d.map((c) => new Date(c.commitDate).getTime()).filter((c) => !Number.isNaN(c));
|
|
153
|
+
o.length >= 2 && (l = Math.round(
|
|
154
|
+
(Math.max(...o) - Math.min(...o)) / 864e5
|
|
155
|
+
));
|
|
156
|
+
}
|
|
157
|
+
return { versionCount: a, pointTotal: r, spanDays: l };
|
|
158
|
+
}, [d]), b = A(() => {
|
|
159
|
+
if (!I) return d;
|
|
160
|
+
const [a, r] = I, l = a.startOf("day").valueOf(), o = r.endOf("day").valueOf();
|
|
161
|
+
return d.filter((c) => {
|
|
162
|
+
const k = new Date(c.commitDate).getTime();
|
|
163
|
+
return !Number.isNaN(k) && k >= l && k <= o;
|
|
164
|
+
});
|
|
165
|
+
}, [d, I]);
|
|
166
|
+
x(() => {
|
|
167
|
+
if (b.length === 0) return;
|
|
168
|
+
let a = !1;
|
|
169
|
+
return q(!0), Promise.all(
|
|
170
|
+
b.map(
|
|
171
|
+
(r) => ae(r.id, void 0, "z-team").catch((l) => (console.warn(
|
|
172
|
+
`[ChangeLogView] failed to load detail for version ${r.version}`,
|
|
173
|
+
l
|
|
174
|
+
), null))
|
|
175
|
+
)
|
|
176
|
+
).then((r) => {
|
|
177
|
+
if (a) return;
|
|
178
|
+
const l = {};
|
|
179
|
+
r.forEach((o, c) => {
|
|
180
|
+
o && typeof o == "object" && b[c] && (l[b[c].id] = o);
|
|
181
|
+
}), le(l);
|
|
182
|
+
}).finally(() => {
|
|
183
|
+
a || q(!1);
|
|
184
|
+
}), () => {
|
|
185
|
+
a = !0;
|
|
186
|
+
};
|
|
187
|
+
}, [b]);
|
|
188
|
+
const { chartOption: me, hasChartData: he } = A(() => {
|
|
189
|
+
const a = [...b].sort(
|
|
190
|
+
(t, s) => new Date(t.commitDate).getTime() - new Date(s.commitDate).getTime()
|
|
191
|
+
), r = a.map((t) => t.commitDate), l = /* @__PURE__ */ new Set(), o = {};
|
|
192
|
+
Object.values(E).forEach((t) => {
|
|
193
|
+
(Array.isArray(t == null ? void 0 : t.items) ? t.items : []).forEach((m) => {
|
|
194
|
+
if (m.category ? l.add(m.category) : l.add("其他"), typeof m.committers == "string") {
|
|
195
|
+
const g = m.committers.split(",").map((h) => h.trim()).filter(Boolean);
|
|
196
|
+
if (g.length > 0) {
|
|
197
|
+
const h = 1 / g.length;
|
|
198
|
+
g.forEach((L) => {
|
|
199
|
+
o[L] = (o[L] || 0) + h;
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
const c = ["新功能", "优化", "修复", "重构", "其他"].filter(
|
|
206
|
+
(t) => l.has(t)
|
|
207
|
+
);
|
|
208
|
+
l.forEach((t) => {
|
|
209
|
+
c.includes(t) || c.push(t);
|
|
210
|
+
});
|
|
211
|
+
const k = Object.entries(o).sort((t, s) => s[1] - t[1]).map(([t]) => t), ge = k.slice(0, oe), Q = k.length > oe, T = {};
|
|
212
|
+
c.forEach(
|
|
213
|
+
(t) => T[t] = new Array(r.length).fill(0)
|
|
214
|
+
);
|
|
215
|
+
const f = {};
|
|
216
|
+
ge.forEach(
|
|
217
|
+
(t) => f[t] = new Array(r.length).fill(0)
|
|
218
|
+
), Q && (f.其他 = new Array(r.length).fill(0)), a.forEach((t, s) => {
|
|
219
|
+
const m = E[t.id];
|
|
220
|
+
if (!m) return;
|
|
221
|
+
(Array.isArray(m.items) ? m.items : []).forEach((h) => {
|
|
222
|
+
const L = h.category || "其他";
|
|
223
|
+
if (T[L] && (T[L][s] += 1), typeof h.committers == "string") {
|
|
224
|
+
const M = h.committers.split(",").map((R) => R.trim()).filter(Boolean);
|
|
225
|
+
if (M.length > 0) {
|
|
226
|
+
const R = 1 / M.length;
|
|
227
|
+
M.forEach((ee) => {
|
|
228
|
+
f[ee] ? f[ee][s] += R : Q && (f.其他[s] += R);
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
const ue = a.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
|
+
c.forEach((t) => {
|
|
239
|
+
U[t] = T[t].reduce((s, m) => {
|
|
240
|
+
const g = s.length > 0 ? s[s.length - 1] : 0;
|
|
241
|
+
return s.push(g + m), s;
|
|
242
|
+
}, []);
|
|
243
|
+
});
|
|
244
|
+
const fe = [
|
|
245
|
+
...c.map((t) => ({
|
|
246
|
+
name: t,
|
|
247
|
+
type: "bar",
|
|
248
|
+
stack: "category",
|
|
249
|
+
data: T[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
|
+
...c.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((g) => {
|
|
296
|
+
const h = Number(g.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:${g.color};"></span>
|
|
299
|
+
<span style="flex:1;">${g.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 = a.length > 0 && (Object.values(T).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, E]), Z = B(() => {
|
|
353
|
+
try {
|
|
354
|
+
Ne();
|
|
355
|
+
} catch (a) {
|
|
356
|
+
console.error("[ChangeLogView] redirect to login failed:", a), window.location.href = "/login";
|
|
357
|
+
}
|
|
358
|
+
}, []), _e = B(async () => {
|
|
359
|
+
const a = window.location.href;
|
|
360
|
+
try {
|
|
361
|
+
await navigator.clipboard.writeText(a), ne.success("链接已复制,可直接发送");
|
|
362
|
+
} catch {
|
|
363
|
+
ne.error("复制失败,请手动复制地址栏链接");
|
|
364
|
+
}
|
|
365
|
+
}, []), $ = B((a) => {
|
|
366
|
+
Y(a), C(a === "7" ? [
|
|
367
|
+
D().subtract(6, "day").startOf("day"),
|
|
368
|
+
D().endOf("day")
|
|
369
|
+
] : a === "30" ? [
|
|
370
|
+
D().subtract(29, "day").startOf("day"),
|
|
371
|
+
D().endOf("day")
|
|
372
|
+
] : null);
|
|
373
|
+
}, []), pe = _ === "embed", J = A(
|
|
374
|
+
() => Array.isArray(p == null ? void 0 : p.items) ? p.items : [],
|
|
375
|
+
[p]
|
|
376
|
+
);
|
|
377
|
+
return /* @__PURE__ */ i("div", { className: pe ? `${e.screen} ${e.embedScreen}` : e.screen, children: [
|
|
378
|
+
/* @__PURE__ */ i("header", { className: e.banner, children: [
|
|
379
|
+
/* @__PURE__ */ i("div", { className: e.bannerInner, children: [
|
|
380
|
+
/* @__PURE__ */ i("div", { className: e.bannerLeft, children: [
|
|
381
|
+
/* @__PURE__ */ n("h1", { className: e.bannerTitle, children: "Z Team 产品迭代日志" }),
|
|
382
|
+
/* @__PURE__ */ n("p", { className: e.bannerSubtitle, children: "每一次代码提交背后,都是产品的进化" })
|
|
383
|
+
] }),
|
|
384
|
+
/* @__PURE__ */ i("div", { className: e.stats, children: [
|
|
385
|
+
/* @__PURE__ */ i("div", { className: e.statItem, children: [
|
|
386
|
+
/* @__PURE__ */ n("div", { className: e.statNum, children: w ? "—" : W.versionCount }),
|
|
387
|
+
/* @__PURE__ */ n("div", { className: e.statLabel, children: "迭代版本" })
|
|
388
|
+
] }),
|
|
389
|
+
/* @__PURE__ */ n("div", { className: e.statDivider }),
|
|
390
|
+
/* @__PURE__ */ i("div", { className: e.statItem, children: [
|
|
391
|
+
/* @__PURE__ */ n("div", { className: e.statNum, children: w ? "—" : W.pointTotal }),
|
|
392
|
+
/* @__PURE__ */ n("div", { className: e.statLabel, children: "产品要点" })
|
|
393
|
+
] }),
|
|
394
|
+
/* @__PURE__ */ n("div", { className: e.statDivider }),
|
|
395
|
+
/* @__PURE__ */ i("div", { className: e.statItem, children: [
|
|
396
|
+
/* @__PURE__ */ n("div", { className: e.statNum, children: w ? "—" : W.spanDays }),
|
|
397
|
+
/* @__PURE__ */ n("div", { className: e.statLabel, children: "持续天数" })
|
|
398
|
+
] })
|
|
399
|
+
] })
|
|
400
|
+
] }),
|
|
401
|
+
/* @__PURE__ */ n(
|
|
402
|
+
V,
|
|
403
|
+
{
|
|
404
|
+
className: e.shareBtn,
|
|
405
|
+
type: "default",
|
|
406
|
+
ghost: !0,
|
|
407
|
+
onClick: _e,
|
|
408
|
+
children: "分享链接"
|
|
409
|
+
}
|
|
410
|
+
)
|
|
411
|
+
] }),
|
|
412
|
+
/* @__PURE__ */ n("section", { className: e.chartSection, children: /* @__PURE__ */ i("div", { className: e.chartInner, children: [
|
|
413
|
+
/* @__PURE__ */ i("div", { className: e.chartHeader, children: [
|
|
414
|
+
/* @__PURE__ */ i("div", { className: e.chartHeaderLeft, children: [
|
|
415
|
+
/* @__PURE__ */ n("h2", { className: e.chartTitle, children: "迭代节奏与贡献分布" }),
|
|
416
|
+
/* @__PURE__ */ n("p", { className: e.chartSubtitle, children: "两根柱:类型拆分 · 人员拆分(多人贡献均摊);折线:各类型/总量累计" })
|
|
417
|
+
] }),
|
|
418
|
+
/* @__PURE__ */ i("div", { className: e.chartRangeWrap, children: [
|
|
419
|
+
/* @__PURE__ */ i("div", { className: e.rangeBtns, children: [
|
|
420
|
+
/* @__PURE__ */ n(
|
|
421
|
+
"button",
|
|
422
|
+
{
|
|
423
|
+
className: O === "7" ? e.rangeBtnActive : e.rangeBtn,
|
|
424
|
+
onClick: () => $("7"),
|
|
425
|
+
children: "近7天"
|
|
426
|
+
}
|
|
427
|
+
),
|
|
428
|
+
/* @__PURE__ */ n(
|
|
429
|
+
"button",
|
|
430
|
+
{
|
|
431
|
+
className: O === "30" ? e.rangeBtnActive : e.rangeBtn,
|
|
432
|
+
onClick: () => $("30"),
|
|
433
|
+
children: "近30天"
|
|
434
|
+
}
|
|
435
|
+
),
|
|
436
|
+
/* @__PURE__ */ n(
|
|
437
|
+
"button",
|
|
438
|
+
{
|
|
439
|
+
className: O === "all" ? e.rangeBtnActive : e.rangeBtn,
|
|
440
|
+
onClick: () => $("all"),
|
|
441
|
+
children: "全部"
|
|
442
|
+
}
|
|
443
|
+
)
|
|
444
|
+
] }),
|
|
445
|
+
/* @__PURE__ */ n(
|
|
446
|
+
Te.RangePicker,
|
|
447
|
+
{
|
|
448
|
+
className: e.chartRangePicker,
|
|
449
|
+
value: I,
|
|
450
|
+
allowClear: !0,
|
|
451
|
+
placeholder: ["开始日期", "结束日期"],
|
|
452
|
+
onChange: (a) => {
|
|
453
|
+
Y(""), a && a[0] && a[1] ? C([a[0], a[1]]) : C(null);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
)
|
|
457
|
+
] })
|
|
458
|
+
] }),
|
|
459
|
+
/* @__PURE__ */ n("div", { className: e.chartBody, children: de ? /* @__PURE__ */ n("div", { className: e.chartLoading, children: /* @__PURE__ */ n(j, { description: "正在生成统计图表..." }) }) : he ? /* @__PURE__ */ n(At, { option: me, height: 360 }) : w ? /* @__PURE__ */ i("div", { className: `${e.chartEmpty} ${e.authBox}`, children: [
|
|
460
|
+
/* @__PURE__ */ n("div", { className: e.authHint, children: "登录后可查看完整的产品迭代日志" }),
|
|
461
|
+
/* @__PURE__ */ n(
|
|
462
|
+
V,
|
|
463
|
+
{
|
|
464
|
+
size: "small",
|
|
465
|
+
type: "primary",
|
|
466
|
+
onClick: Z,
|
|
467
|
+
children: "登录查看"
|
|
468
|
+
}
|
|
469
|
+
)
|
|
470
|
+
] }) : /* @__PURE__ */ n("div", { className: e.chartEmpty, children: "暂无足够数据生成图表" }) })
|
|
471
|
+
] }) }),
|
|
472
|
+
/* @__PURE__ */ i("main", { className: e.main, children: [
|
|
473
|
+
/* @__PURE__ */ i("aside", { className: e.timeline, children: [
|
|
474
|
+
/* @__PURE__ */ n("div", { className: e.timelineHeader, children: /* @__PURE__ */ n("span", { children: "迭代时间线" }) }),
|
|
475
|
+
/* @__PURE__ */ n("div", { className: e.timelineScroll, children: S ? /* @__PURE__ */ n("div", { className: e.loadingWrap, children: /* @__PURE__ */ n(j, { description: "加载中..." }) }) : d.length === 0 ? /* @__PURE__ */ n("div", { className: `${e.emptyWrap} ${e.authBox}`, children: w ? /* @__PURE__ */ i(te, { children: [
|
|
476
|
+
/* @__PURE__ */ n("div", { className: e.authHint, children: "登录后可查看完整的产品迭代日志" }),
|
|
477
|
+
/* @__PURE__ */ n(
|
|
478
|
+
V,
|
|
479
|
+
{
|
|
480
|
+
size: "small",
|
|
481
|
+
type: "primary",
|
|
482
|
+
onClick: Z,
|
|
483
|
+
children: "登录查看"
|
|
484
|
+
}
|
|
485
|
+
)
|
|
486
|
+
] }) : "暂无迭代记录" }) : d.map((a, r) => /* @__PURE__ */ i(
|
|
487
|
+
"div",
|
|
488
|
+
{
|
|
489
|
+
className: `${e.timelineItem} ${ke(v, a.id) ? e.timelineItemActive : ""}`,
|
|
490
|
+
onClick: () => H(a.id),
|
|
491
|
+
children: [
|
|
492
|
+
/* @__PURE__ */ n("div", { className: e.timelineDot }),
|
|
493
|
+
/* @__PURE__ */ i("div", { className: e.timelineContent, children: [
|
|
494
|
+
/* @__PURE__ */ i("div", { className: e.timelineTop, children: [
|
|
495
|
+
/* @__PURE__ */ n("span", { className: e.versionTag, children: a.version }),
|
|
496
|
+
/* @__PURE__ */ n("span", { className: e.versionDate, children: a.commitDate })
|
|
497
|
+
] }),
|
|
498
|
+
a.summary && /* @__PURE__ */ n("div", { className: e.timelineSummary, title: a.summary, children: a.summary }),
|
|
499
|
+
/* @__PURE__ */ n("div", { className: e.timelineMeta, children: /* @__PURE__ */ i("span", { children: [
|
|
500
|
+
a.pointCount ?? 0,
|
|
501
|
+
" 条产品要点"
|
|
502
|
+
] }) })
|
|
503
|
+
] }),
|
|
504
|
+
r === 0 && /* @__PURE__ */ n("span", { className: e.latestBadge, children: "最新" })
|
|
505
|
+
]
|
|
506
|
+
},
|
|
507
|
+
a.id
|
|
508
|
+
)) })
|
|
509
|
+
] }),
|
|
510
|
+
/* @__PURE__ */ n("section", { className: e.detail, children: ce ? /* @__PURE__ */ n("div", { className: e.loadingWrap, children: /* @__PURE__ */ n(j, { description: "加载产品要点..." }) }) : p ? /* @__PURE__ */ i(te, { children: [
|
|
511
|
+
/* @__PURE__ */ i("div", { className: e.detailHeader, children: [
|
|
512
|
+
/* @__PURE__ */ i("div", { className: e.detailTitleRow, children: [
|
|
513
|
+
/* @__PURE__ */ n("span", { className: e.detailVersion, children: p.version }),
|
|
514
|
+
/* @__PURE__ */ n("span", { className: e.detailDate, children: p.commitDate })
|
|
515
|
+
] }),
|
|
516
|
+
p.summary && /* @__PURE__ */ n("div", { className: e.detailSummary, children: p.summary })
|
|
517
|
+
] }),
|
|
518
|
+
/* @__PURE__ */ n("div", { className: e.detailScroll, children: J.length === 0 ? /* @__PURE__ */ n(ie, { description: "该版本下暂无产品迭代要点" }) : /* @__PURE__ */ n("div", { className: e.pointGrid, children: J.map((a) => /* @__PURE__ */ i("div", { className: e.pointCard, children: [
|
|
519
|
+
/* @__PURE__ */ i("div", { className: e.pointHead, children: [
|
|
520
|
+
/* @__PURE__ */ n("span", { className: e.pointTitle, children: a.pointTitle }),
|
|
521
|
+
/* @__PURE__ */ i("div", { className: e.pointHeadRight, children: [
|
|
522
|
+
typeof a.committers == "string" && a.committers.split(",").map((r) => /* @__PURE__ */ i(re, { className: e.committerTag, children: [
|
|
523
|
+
"@",
|
|
524
|
+
r.trim()
|
|
525
|
+
] }, r)),
|
|
526
|
+
a.category && /* @__PURE__ */ n(
|
|
527
|
+
re,
|
|
528
|
+
{
|
|
529
|
+
className: e.pointTag,
|
|
530
|
+
color: It[a.category] || "default",
|
|
531
|
+
children: a.category
|
|
532
|
+
}
|
|
533
|
+
)
|
|
534
|
+
] })
|
|
535
|
+
] }),
|
|
536
|
+
a.pointDetail && /* @__PURE__ */ n("div", { className: e.pointDetail, children: a.pointDetail })
|
|
537
|
+
] }, a.id)) }) })
|
|
538
|
+
] }) : /* @__PURE__ */ n("div", { className: e.emptyWrap, children: /* @__PURE__ */ n(ie, { description: "选择左侧版本查看产品迭代要点" }) }) })
|
|
539
|
+
] })
|
|
540
|
+
] });
|
|
541
|
+
}
|
|
542
|
+
export {
|
|
543
|
+
Vt as C
|
|
544
|
+
};
|