@glodon-aiot/dataset-annotation 3.25.1-alpha.4 → 3.25.1-alpha.6

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.
@@ -1,37 +1,37 @@
1
- import { jsxs as r, jsx as a, Fragment as q } from "react/jsx-runtime";
2
- import { Spin as x, Tooltip as E, Pagination as O } from "antd";
3
- import T from "classnames";
4
- import V from "../../Thumbnail/index.mjs";
5
- import A from "../../DetectionStatus/index.mjs";
6
- import F from "../../DataEmpty/index.mjs";
7
- const I = (s) => {
8
- var d;
9
- if (!((d = s == null ? void 0 : s.labels) != null && d.length))
1
+ import { jsxs as c, jsx as a, Fragment as j } from "react/jsx-runtime";
2
+ import { Tabs as q, Spin as x, Tooltip as E, Pagination as O } from "antd";
3
+ import V from "classnames";
4
+ import A from "../../Thumbnail/index.mjs";
5
+ import F from "../../DetectionStatus/index.mjs";
6
+ import I from "../../DataEmpty/index.mjs";
7
+ const J = (i) => {
8
+ var o;
9
+ if (!((o = i == null ? void 0 : i.labels) != null && o.length))
10
10
  return [];
11
- const o = /* @__PURE__ */ new Set();
12
- return s.labels.forEach((n) => {
13
- var t;
14
- const l = (t = n == null ? void 0 : n.label) == null ? void 0 : t.trim();
15
- l && o.add(l);
16
- }), Array.from(o);
17
- }, R = (s) => {
11
+ const t = /* @__PURE__ */ new Set();
12
+ return i.labels.forEach((r) => {
13
+ var s;
14
+ const l = (s = r == null ? void 0 : r.label) == null ? void 0 : s.trim();
15
+ l && t.add(l);
16
+ }), Array.from(t);
17
+ }, W = (i) => {
18
18
  var b, p, N, g;
19
19
  const {
20
- baseVersionNo: o,
21
- targetVersionNo: d,
22
- isOcrDetection: n,
20
+ baseVersionNo: t,
21
+ targetVersionNo: o,
22
+ isOcrDetection: r,
23
23
  changeStats: l,
24
- activeTab: t,
24
+ activeTab: s,
25
25
  items: v,
26
- total: D,
26
+ total: T,
27
27
  pageNo: u,
28
28
  pageSize: f,
29
- loading: U = !1,
30
- imgProxy: z,
31
- onTabChange: L,
32
- onPageChange: P,
29
+ loading: $ = !1,
30
+ imgProxy: D,
31
+ onTabChange: U,
32
+ onPageChange: z,
33
33
  onSampleClick: h
34
- } = s, $ = [{
34
+ } = i, L = [{
35
35
  key: "added",
36
36
  label: "新增",
37
37
  count: (b = l == null ? void 0 : l.addedCount) != null ? b : 0
@@ -48,66 +48,59 @@ const I = (s) => {
48
48
  label: "无变动",
49
49
  count: (g = l == null ? void 0 : l.unchangedCount) != null ? g : 0
50
50
  }];
51
- return /* @__PURE__ */ r("div", {
51
+ return /* @__PURE__ */ c("div", {
52
52
  className: "vc-card vc-sample-details-card",
53
- children: [/* @__PURE__ */ r("div", {
54
- children: [/* @__PURE__ */ r("div", {
53
+ children: [/* @__PURE__ */ c("div", {
54
+ children: [/* @__PURE__ */ c("div", {
55
55
  className: "vc-card-header",
56
56
  children: [/* @__PURE__ */ a("h3", {
57
57
  className: "vc-card-title",
58
58
  children: "数据变更详情"
59
- }), /* @__PURE__ */ r("span", {
59
+ }), /* @__PURE__ */ c("span", {
60
60
  className: "vc-card-subtitle",
61
- children: ["(", o || "-", " → ", d || "-", ")"]
61
+ children: ["(", t || "-", " → ", o || "-", ")"]
62
62
  })]
63
- }), /* @__PURE__ */ a("div", {
64
- className: "vc-sample-tabs-bar",
65
- role: "tablist",
66
- children: $.map((c) => {
67
- const i = t === c.key;
68
- return /* @__PURE__ */ r("div", {
69
- role: "tab",
70
- "aria-selected": i,
71
- className: T("vc-sample-tab-item", {
72
- "is-active": i
73
- }),
74
- onClick: () => {
75
- c.key !== t && L(c.key);
76
- },
77
- children: [c.label, " (", c.count, ")"]
78
- }, c.key);
79
- })
63
+ }), /* @__PURE__ */ a(q, {
64
+ className: "vc-sample-tabs",
65
+ activeKey: s,
66
+ onChange: (n) => {
67
+ n !== s && U(n);
68
+ },
69
+ items: L.map((n) => ({
70
+ key: n.key,
71
+ label: `${n.label} (${n.count})`
72
+ }))
80
73
  })]
81
74
  }), /* @__PURE__ */ a(x, {
82
- spinning: U,
83
- children: v.length > 0 ? /* @__PURE__ */ r(q, {
75
+ spinning: $,
76
+ children: v.length > 0 ? /* @__PURE__ */ c(j, {
84
77
  children: [/* @__PURE__ */ a("div", {
85
78
  className: "vc-sample-grid",
86
- children: v.map((c, i) => {
87
- var y, w;
88
- const e = c.sample, j = (u - 1) * f + i + 1, m = n ? [] : I(e), C = ((w = (y = e == null ? void 0 : e.labels) == null ? void 0 : y[0]) == null ? void 0 : w.label) || m[0] || "", k = m.length >= 2 ? `+${m.length - 1}` : null;
89
- return /* @__PURE__ */ r("div", {
79
+ children: v.map((n, d) => {
80
+ var y, k;
81
+ const e = n.sample, P = (u - 1) * f + d + 1, m = r ? [] : J(e), C = ((k = (y = e == null ? void 0 : e.labels) == null ? void 0 : y[0]) == null ? void 0 : k.label) || m[0] || "", w = m.length >= 2 ? `+${m.length - 1}` : null;
82
+ return /* @__PURE__ */ c("div", {
90
83
  className: "vc-sample-card",
91
- "data-sample-id": (e == null ? void 0 : e.id) || c.fileKey || String(i),
92
- onClick: () => h == null ? void 0 : h(c, i),
84
+ "data-sample-id": (e == null ? void 0 : e.id) || n.fileKey || String(d),
85
+ onClick: () => h == null ? void 0 : h(n, d),
93
86
  children: [/* @__PURE__ */ a("div", {
94
87
  className: "vc-detection-status-wrapper",
95
- children: /* @__PURE__ */ a(A, {
88
+ children: /* @__PURE__ */ a(F, {
96
89
  sample: e
97
90
  })
98
91
  }), /* @__PURE__ */ a("div", {
99
92
  className: "vc-sample-card-img",
100
- children: /* @__PURE__ */ a(V, {
101
- fileKey: (e == null ? void 0 : e.fileKey) || c.fileKey,
93
+ children: /* @__PURE__ */ a(A, {
94
+ fileKey: (e == null ? void 0 : e.fileKey) || n.fileKey,
102
95
  width: 124,
103
96
  thumbnailUrl: (e == null ? void 0 : e.thumbnailUrl) || (e == null ? void 0 : e.fileUrl),
104
- imgProxy: z
97
+ imgProxy: D
105
98
  })
106
- }), /* @__PURE__ */ r("div", {
107
- className: T("vc-sample-card-footer", {
108
- "is-ocr": n
99
+ }), /* @__PURE__ */ c("div", {
100
+ className: V("vc-sample-card-footer", {
101
+ "is-ocr": r
109
102
  }),
110
- children: [!n && /* @__PURE__ */ a("div", {
103
+ children: [!r && /* @__PURE__ */ a("div", {
111
104
  className: "vc-sample-label-info",
112
105
  children: C ? /* @__PURE__ */ a(E, {
113
106
  placement: "top",
@@ -116,7 +109,7 @@ const I = (s) => {
116
109
  children: K
117
110
  }, K))
118
111
  }),
119
- children: /* @__PURE__ */ r("div", {
112
+ children: /* @__PURE__ */ c("div", {
120
113
  style: {
121
114
  width: "100%",
122
115
  display: "flex",
@@ -125,9 +118,9 @@ const I = (s) => {
125
118
  children: [/* @__PURE__ */ a("span", {
126
119
  className: "vc-sample-first-label",
127
120
  children: C
128
- }), k && /* @__PURE__ */ a("span", {
121
+ }), w && /* @__PURE__ */ a("span", {
129
122
  className: "vc-sample-more-count",
130
- children: k
123
+ children: w
131
124
  })]
132
125
  })
133
126
  }) : /* @__PURE__ */ a("span", {
@@ -136,26 +129,26 @@ const I = (s) => {
136
129
  })
137
130
  }), /* @__PURE__ */ a("div", {
138
131
  className: "vc-sample-serial",
139
- children: j
132
+ children: P
140
133
  })]
141
134
  })]
142
- }, `${c.changeType}-${c.fileKey || (e == null ? void 0 : e.id) || i}`);
135
+ }, `${n.changeType}-${n.fileKey || (e == null ? void 0 : e.id) || d}`);
143
136
  })
144
137
  }), /* @__PURE__ */ a("div", {
145
138
  className: "vc-sample-pagination",
146
139
  children: /* @__PURE__ */ a(O, {
147
140
  current: u,
148
141
  pageSize: f,
149
- total: D,
142
+ total: T,
150
143
  showQuickJumper: !0,
151
144
  showSizeChanger: !0,
152
145
  pageSizeOptions: ["10", "20", "50", "100"],
153
- onChange: P
146
+ onChange: z
154
147
  })
155
148
  })]
156
149
  }) : /* @__PURE__ */ a("div", {
157
150
  className: "vc-sample-empty-wrapper",
158
- children: /* @__PURE__ */ a(F, {
151
+ children: /* @__PURE__ */ a(I, {
159
152
  description: "当前分类下暂无图片数据"
160
153
  })
161
154
  })
@@ -163,5 +156,5 @@ const I = (s) => {
163
156
  });
164
157
  };
165
158
  export {
166
- R as default
159
+ W as default
167
160
  };
@@ -1,38 +1,34 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
- import { Tooltip as v, Button as b } from "antd";
3
- import { ArrowLeftOutlined as l, ArrowRightOutlined as h } from "@ant-design/icons";
4
- const f = (i) => {
2
+ import { Button as r } from "antd";
3
+ import { ArrowLeftOutlined as n, ArrowRightOutlined as t } from "@ant-design/icons";
4
+ const b = (l) => {
5
5
  const {
6
- datasetName: s,
6
+ datasetName: i,
7
7
  baseVersionNo: d,
8
- targetVersionNo: o,
9
- formattedCompareTime: t,
10
- showBreadcrumb: n = !0,
11
- onBack: r,
12
- onReselect: m
13
- } = i;
8
+ targetVersionNo: m,
9
+ formattedCompareTime: o,
10
+ showBreadcrumb: s = !0,
11
+ onBack: c,
12
+ onReselect: v
13
+ } = l;
14
14
  return /* @__PURE__ */ a("div", {
15
15
  className: "vc-top-bar-wrapper",
16
- children: [n && /* @__PURE__ */ e("div", {
16
+ children: [s && /* @__PURE__ */ e("div", {
17
17
  className: "vc-breadcrumb-bar",
18
18
  children: /* @__PURE__ */ a("div", {
19
19
  className: "vc-breadcrumb-left",
20
- children: [/* @__PURE__ */ e("span", {
20
+ children: [/* @__PURE__ */ e(r, {
21
+ type: "link",
21
22
  className: "vc-back-btn",
22
- role: "button",
23
- tabIndex: 0,
24
23
  "aria-label": "返回",
25
- onClick: r,
26
- onKeyDown: (c) => {
27
- (c.key === "Enter" || c.key === " ") && (r == null || r());
28
- },
29
- children: /* @__PURE__ */ e(l, {})
24
+ icon: /* @__PURE__ */ e(n, {}),
25
+ onClick: c
30
26
  }), /* @__PURE__ */ a("nav", {
31
27
  className: "vc-breadcrumb-nav",
32
28
  "aria-label": "面包屑",
33
29
  children: [/* @__PURE__ */ e("span", {
34
30
  className: "vc-breadcrumb-link",
35
- onClick: r,
31
+ onClick: c,
36
32
  children: "数据集管理"
37
33
  }), /* @__PURE__ */ e("span", {
38
34
  className: "vc-breadcrumb-sep",
@@ -49,66 +45,62 @@ const f = (i) => {
49
45
  className: "vc-header-left",
50
46
  children: [/* @__PURE__ */ a("div", {
51
47
  className: "vc-dataset-title-group",
52
- children: [!n && /* @__PURE__ */ e("span", {
48
+ children: [!s && /* @__PURE__ */ e(r, {
49
+ type: "link",
53
50
  className: "vc-inline-back-btn",
54
- role: "button",
55
- tabIndex: 0,
56
51
  "aria-label": "返回",
57
- onClick: r,
58
- onKeyDown: (c) => {
59
- (c.key === "Enter" || c.key === " ") && (r == null || r());
60
- },
61
- children: /* @__PURE__ */ e(l, {})
62
- }), /* @__PURE__ */ e(v, {
63
- title: s,
64
- children: /* @__PURE__ */ e("span", {
65
- className: "vc-dataset-name",
66
- children: s || "-"
67
- })
52
+ icon: /* @__PURE__ */ e(n, {}),
53
+ onClick: c
54
+ }), /* @__PURE__ */ e("span", {
55
+ className: "vc-dataset-name",
56
+ children: i || "-"
68
57
  })]
69
58
  }), /* @__PURE__ */ a("div", {
70
- className: "vc-version-direction",
71
- children: [/* @__PURE__ */ e("span", {
72
- className: "vc-version-label",
73
- children: "对比版本:"
74
- }), /* @__PURE__ */ a("div", {
75
- className: "vc-version-pair",
76
- children: [/* @__PURE__ */ a("span", {
77
- className: "vc-version-tag",
78
- children: [/* @__PURE__ */ e("span", {
79
- className: "vc-version-no",
80
- children: d || "-"
81
- }), /* @__PURE__ */ e("span", {
82
- className: "vc-version-role",
83
- children: "(基准版本)"
84
- })]
85
- }), /* @__PURE__ */ e("span", {
86
- className: "vc-version-arrow",
87
- "aria-label": "对比方向",
88
- children: /* @__PURE__ */ e(h, {})
89
- }), /* @__PURE__ */ a("span", {
90
- className: "vc-version-tag",
91
- children: [/* @__PURE__ */ e("span", {
92
- className: "vc-version-no",
93
- children: o || "-"
59
+ className: "vc-header-meta",
60
+ children: [/* @__PURE__ */ a("div", {
61
+ className: "vc-version-direction",
62
+ children: [/* @__PURE__ */ e("span", {
63
+ className: "vc-version-label",
64
+ children: "对比版本:"
65
+ }), /* @__PURE__ */ a("div", {
66
+ className: "vc-version-pair",
67
+ children: [/* @__PURE__ */ a("span", {
68
+ className: "vc-version-tag",
69
+ children: [/* @__PURE__ */ e("span", {
70
+ className: "vc-version-no",
71
+ children: d || "-"
72
+ }), /* @__PURE__ */ e("span", {
73
+ className: "vc-version-role",
74
+ children: "(基准版本)"
75
+ })]
94
76
  }), /* @__PURE__ */ e("span", {
95
- className: "vc-version-role",
96
- children: "(目标版本)"
77
+ className: "vc-version-arrow",
78
+ "aria-label": "对比方向",
79
+ children: /* @__PURE__ */ e(t, {})
80
+ }), /* @__PURE__ */ a("span", {
81
+ className: "vc-version-tag",
82
+ children: [/* @__PURE__ */ e("span", {
83
+ className: "vc-version-no",
84
+ children: m || "-"
85
+ }), /* @__PURE__ */ e("span", {
86
+ className: "vc-version-role",
87
+ children: "(目标版本)"
88
+ })]
97
89
  })]
98
90
  })]
91
+ }), /* @__PURE__ */ a("span", {
92
+ className: "vc-compare-time",
93
+ children: ["对比时间:", o || "-"]
99
94
  })]
100
- }), /* @__PURE__ */ a("span", {
101
- className: "vc-compare-time",
102
- children: ["对比时间:", t || "-"]
103
95
  })]
104
- }), /* @__PURE__ */ e(b, {
96
+ }), /* @__PURE__ */ e(r, {
105
97
  className: "vc-reselect-btn",
106
- onClick: m,
98
+ onClick: v,
107
99
  children: "重新选择"
108
100
  })]
109
101
  })]
110
102
  });
111
103
  };
112
104
  export {
113
- f as default
105
+ b as default
114
106
  };