@glodon-aiot/dataset-annotation 3.14.0-alpha.32 → 3.14.0-alpha.34

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.
Files changed (26) hide show
  1. package/dist/es/components/VLMAnnotation/RegionItem.mjs +1 -1
  2. package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useAIButtonHover.mjs +193 -0
  3. package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useDrawingMode.mjs +300 -237
  4. package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionSelection.mjs +158 -56
  5. package/dist/es/components/VLMAnnotation/VLMLabelMaker/index.mjs +424 -397
  6. package/dist/es/components/VLMAnnotation/components/AIErrorTooltip/AIErrorTooltip.less.mjs +4 -0
  7. package/dist/es/components/VLMAnnotation/components/AIErrorTooltip/index.mjs +24 -0
  8. package/dist/es/components/VLMAnnotation/components/ZoomControls.mjs +1 -1
  9. package/dist/es/components/VLMAnnotation/constants.mjs +1 -1
  10. package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/QAGenerationConfig.mjs +217 -167
  11. package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/index.mjs +114 -122
  12. package/dist/es/components/VLMAnnotationDetail/VLMDetail/index.mjs +445 -0
  13. package/dist/es/components/VLMAnnotationDetail/VlmModal/index.mjs +249 -113
  14. package/dist/es/components/VLMAnnotationDetail/index.mjs +219 -213
  15. package/dist/es/index.mjs +1 -1
  16. package/dist/lib/index.js +4 -4
  17. package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useAIButtonHover.d.ts +16 -0
  18. package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useDrawingMode.d.ts +2 -1
  19. package/dist/src/components/VLMAnnotation/components/AIErrorTooltip/index.d.ts +8 -0
  20. package/dist/src/components/VLMAnnotation/constants.d.ts +2 -2
  21. package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/QAGenerationConfig.d.ts +1 -0
  22. package/dist/src/components/VLMAnnotationDetail/VLMDetail/index.d.ts +21 -0
  23. package/dist/src/components/VLMAnnotationDetail/VlmModal/index.d.ts +11 -2
  24. package/package.json +2 -2
  25. package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/index.mjs +0 -455
  26. /package/dist/es/components/VLMAnnotationDetail/{MarkVLMBoxModal → VLMDetail}/style.less.mjs +0 -0
@@ -2,38 +2,37 @@ var Ue = Object.defineProperty, Fe = Object.defineProperties;
2
2
  var He = Object.getOwnPropertyDescriptors;
3
3
  var de = Object.getOwnPropertySymbols;
4
4
  var Ke = Object.prototype.hasOwnProperty, Ze = Object.prototype.propertyIsEnumerable;
5
- var ue = (f, n, r) => n in f ? Ue(f, n, { enumerable: !0, configurable: !0, writable: !0, value: r }) : f[n] = r, d = (f, n) => {
6
- for (var r in n || (n = {}))
7
- Ke.call(n, r) && ue(f, r, n[r]);
5
+ var ue = (u, o, t) => o in u ? Ue(u, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : u[o] = t, h = (u, o) => {
6
+ for (var t in o || (o = {}))
7
+ Ke.call(o, t) && ue(u, t, o[t]);
8
8
  if (de)
9
- for (var r of de(n))
10
- Ze.call(n, r) && ue(f, r, n[r]);
11
- return f;
12
- }, g = (f, n) => Fe(f, He(n));
13
- import { jsx as o, jsxs as I, Fragment as $e } from "react/jsx-runtime";
14
- import { useState as s, useRef as je, useEffect as u } from "react";
15
- import { message as W, ConfigProvider as We, Space as A, Select as _e, Button as _, Tabs as qe, Col as Oe, Empty as Ge } from "antd";
9
+ for (var t of de(o))
10
+ Ze.call(o, t) && ue(u, t, o[t]);
11
+ return u;
12
+ }, g = (u, o) => Fe(u, He(o));
13
+ import { jsx as n, jsxs as S, Fragment as $e } from "react/jsx-runtime";
14
+ import { useState as s, useRef as je, useEffect as d } from "react";
15
+ import { message as q, ConfigProvider as We, Space as P, Select as _e, Button as O, Tabs as qe, Col as Oe, Empty as Ge } from "antd";
16
16
  import Je from "antd/es/locale/zh_CN";
17
17
  import "./style.less.mjs";
18
18
  import Qe from "./VlmModal/index.mjs";
19
- import Xe from "./MarkVLMBoxModal/index.mjs";
20
- import Ye from "lodash/merge";
19
+ import Xe from "lodash/merge";
21
20
  import { UploadZipsStatus as x } from "@glodon-aiot/apis";
22
- import et from "rc-virtual-list";
23
- import tt from "../../Common/Page/index.mjs";
24
- import rt from "../Thumbnail/index.mjs";
25
- import ot from "../../DatasetContext/index.mjs";
21
+ import Ye from "rc-virtual-list";
22
+ import et from "../../Common/Page/index.mjs";
23
+ import tt from "../Thumbnail/index.mjs";
24
+ import rt from "../../DatasetContext/index.mjs";
26
25
  import { DEFAULT_FILTER_SWITCH as nt } from "../../constant.mjs";
27
- import lt from "../PageNav/index.mjs";
26
+ import ot from "../PageNav/index.mjs";
28
27
  import it from "../PicZipImportModal/index.mjs";
29
- import { Prompt as st } from "../hooks/Prompt.mjs";
30
- import ct from "../DetectionAnnotation/icon_item_empty.svg.mjs";
31
- const Tt = (f) => {
28
+ import { Prompt as lt } from "../hooks/Prompt.mjs";
29
+ import st from "../DetectionAnnotation/icon_item_empty.svg.mjs";
30
+ const xt = (u) => {
32
31
  var se;
33
32
  const {
34
- services: n,
35
- datasetId: r,
36
- versionId: L,
33
+ services: o,
34
+ datasetId: t,
35
+ versionId: T,
37
36
  backTo: fe,
38
37
  labelManager: me = !1,
39
38
  datasetManager: b = !1,
@@ -44,76 +43,76 @@ const Tt = (f) => {
44
43
  exampleSrcRoot: pe,
45
44
  apiUrl: ge,
46
45
  token: ve
47
- } = f, [c, B] = s(), [t, k] = s(), [M, q] = s([]), [O, N] = s(!1), [be, G] = s(!1), [E, P] = s(!1), [U, J] = s(0), [h, Se] = s([]), [w, C] = s(), [ye, Q] = s(), [X, T] = s(-1), [l, V] = s({
46
+ } = u, [c, U] = s(), [r, y] = s(), [N, G] = s([]), [J, w] = s(!1), [Se, Q] = s(!1), [z, R] = s(!1), [be, A] = s("preview"), [F, X] = s(0), [f, Ie] = s([]), [H, C] = s(), [ye, Y] = s(), [K, k] = s(-1), [i, V] = s({
48
47
  current: 0,
49
48
  pageSize: 100
50
- }), [Y, ee] = s(0), [F, Ie] = s(""), [te, H] = s(!1), [S, ke] = s(""), [Ce, Ve] = s(), [De, xe] = s(), [re, K] = s(!1), [oe, Le] = s(!1), [ne, Te] = s(!0), [Me, Ne] = s(!1), z = je(null), Z = d({}, nt);
51
- Ye(Z, f.filterSwitch);
49
+ }), [ee, te] = s(0), [L, Z] = s(""), [I, Ce] = s(""), [ke, Ve] = s(), [De, xe] = s(), [re, $] = s(!1), [ne, Te] = s(!1), [oe, Le] = s(!0), [Me, Ne] = s(!1), B = je(null), j = h({}, nt);
50
+ Xe(j, u.filterSwitch);
52
51
  const we = () => {
53
- Q(void 0), H(!0);
52
+ Z("nocode"), A("annotation"), R(!0);
54
53
  }, ze = (e) => {
55
- if (!h)
54
+ if (!f)
56
55
  return;
57
- T(e);
58
- const i = h[e];
59
- C(i), P(!0);
56
+ k(e);
57
+ const l = f[e];
58
+ C(l), A("preview"), R(!0);
60
59
  };
61
- u(() => {
62
- n.cvforceDatahub && n.cvforceDatahub.getOptionsImgproxy().then((e) => Ve(e));
63
- }, [n.cvforceDatahub]), u(() => {
64
- r && n.cvforceDatahub.getS3Iam(r).then((e) => {
60
+ d(() => {
61
+ o.cvforceDatahub && o.cvforceDatahub.getOptionsImgproxy().then((e) => Ve(e));
62
+ }, [o.cvforceDatahub]), d(() => {
63
+ t && o.cvforceDatahub.getS3Iam(t).then((e) => {
65
64
  xe(e);
66
65
  });
67
- }, [r]), u(() => {
68
- !r || t || (N(!0), Promise.all([
66
+ }, [t]), d(() => {
67
+ !t || r || (w(!0), Promise.all([
69
68
  // 数据集
70
- n.cvforceDatahub.getDatasetsId(r).then((e) => {
71
- B(e);
69
+ o.cvforceDatahub.getDatasetsId(t).then((e) => {
70
+ U(e);
72
71
  }),
73
72
  // 版本列表
74
- n.cvforceDatahub.getDatasetsIdVersions(r, 1, 1e3).then((e) => {
75
- q(e.recordList), k(L ? e.recordList.find((i) => i.id === L) : e.recordList[0]);
73
+ o.cvforceDatahub.getDatasetsIdVersions(t, 1, 1e3).then((e) => {
74
+ G(e.recordList), y(T ? e.recordList.find((l) => l.id === T) : e.recordList[0]);
76
75
  })
77
- ]).finally(() => N(!1)));
78
- }, [r, t == null ? void 0 : t.id]), u(() => {
79
- r && (N(!0), Promise.all([
76
+ ]).finally(() => w(!1)));
77
+ }, [t, r == null ? void 0 : r.id]), d(() => {
78
+ t && (w(!0), Promise.all([
80
79
  // 数据集
81
- n.cvforceDatahub.getDatasetsId(r).then((e) => {
82
- B(e);
80
+ o.cvforceDatahub.getDatasetsId(t).then((e) => {
81
+ U(e);
83
82
  }),
84
83
  // 版本列表
85
- n.cvforceDatahub.getDatasetsIdVersions(r, 1, 1e3).then((e) => {
86
- q(e.recordList), k(L ? e.recordList.find((i) => i.id === L) : e.recordList[0]);
84
+ o.cvforceDatahub.getDatasetsIdVersions(t, 1, 1e3).then((e) => {
85
+ G(e.recordList), y(T ? e.recordList.find((l) => l.id === T) : e.recordList[0]);
87
86
  })
88
- ]).finally(() => N(!1)));
89
- }, [r, L]), u(() => {
90
- r && n.cvforceDatahub.getDatasetsId(r).then((e) => {
91
- B(e);
87
+ ]).finally(() => w(!1)));
88
+ }, [t, T]), d(() => {
89
+ t && o.cvforceDatahub.getDatasetsId(t).then((e) => {
90
+ U(e);
92
91
  });
93
92
  }, []);
94
- const le = () => {
95
- !r || !t || n.cvforceDatahub.getDatasetsIdVersionsVid(r, t.id).then((e) => {
96
- k(e), ke(e.versionAsyncTask.state);
93
+ const ie = () => {
94
+ !t || !r || o.cvforceDatahub.getDatasetsIdVersionsVid(t, r.id).then((e) => {
95
+ y(e), Ce(e.versionAsyncTask.state);
97
96
  });
98
97
  };
99
- u(() => {
100
- le();
101
- }, [r, t == null ? void 0 : t.id]), u(() => {
102
- S !== x.Pending && S !== x.Started || W.warning("文件导入中,请刷新页面再试");
103
- }, [S]), u(() => {
104
- Ne(!ne && oe);
105
- }, [ne, oe]);
106
- const D = () => {
107
- !r || !t || n.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(r, t.id).then((e) => {
108
- const i = e.find((p) => p.id === "allcodeid"), m = e.find((p) => p.id === "nocodeid");
109
- J(i ? i.count : 0), ee(m ? m.count : 0);
98
+ d(() => {
99
+ ie();
100
+ }, [t, r == null ? void 0 : r.id]), d(() => {
101
+ I !== x.Pending && I !== x.Started || q.warning("文件导入中,请刷新页面再试");
102
+ }, [I]), d(() => {
103
+ Ne(!oe && ne);
104
+ }, [oe, ne]);
105
+ const M = () => {
106
+ !t || !r || o.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(t, r.id).then((e) => {
107
+ const l = e.find((p) => p.id === "allcodeid"), m = e.find((p) => p.id === "nocodeid");
108
+ X(l ? l.count : 0), te(m ? m.count : 0);
110
109
  });
111
- }, y = (e, i) => {
112
- const m = (e == null ? void 0 : e.current) || l.current, p = (e == null ? void 0 : e.pageSize) || l.pageSize, $ = (e == null ? void 0 : e.type) || l.type, j = i || h || [];
113
- if (!r || !t || !m)
110
+ }, D = (e, l) => {
111
+ const m = (e == null ? void 0 : e.current) || i.current, p = (e == null ? void 0 : e.pageSize) || i.pageSize, W = (e == null ? void 0 : e.type) || i.type, _ = l || f || [];
112
+ if (!t || !r || !m)
114
113
  return Promise.resolve(!1);
115
114
  const Pe = () => {
116
- switch (F) {
115
+ switch (L) {
117
116
  case "nocode":
118
117
  return "nocode";
119
118
  case "hascode":
@@ -122,218 +121,218 @@ const Tt = (f) => {
122
121
  return;
123
122
  }
124
123
  };
125
- return m === 1 && ie(), V(g(d({}, l), {
124
+ return m === 1 && le(), V(g(h({}, i), {
126
125
  current: m,
127
126
  pageSize: p
128
- })), G(!0), n.cvforceDatahub.getDatasetsIdVersionsVidSamples(r, t.id, {
127
+ })), Q(!0), o.cvforceDatahub.getDatasetsIdVersionsVidSamples(t, r.id, {
129
128
  pageNo: m,
130
129
  pageSize: p,
131
130
  labels: Pe()
132
131
  }).then((ce) => {
133
- const v = ce.recordList || [], ae = m === 1 ? v : $ === "prev" ? [...v, ...j] : [...j, ...v];
134
- if (Se(ae), V(g(d({}, l), {
132
+ const v = ce.recordList || [], ae = m === 1 ? v : W === "prev" ? [...v, ..._] : [..._, ...v];
133
+ if (Ie(ae), V(g(h({}, i), {
135
134
  current: m,
136
135
  pageSize: p,
137
136
  type: void 0,
138
137
  total: ce.totalResults
139
- })), $ === "next" && v.length) {
140
- const R = j.length;
141
- T(R), C(v[0]);
138
+ })), W === "next" && v.length) {
139
+ const E = _.length;
140
+ k(E), C(v[0]);
142
141
  }
143
- if ($ === "prev" && v.length) {
144
- const R = v.length - 1;
145
- T(R), C(v[R]);
142
+ if (W === "prev" && v.length) {
143
+ const E = v.length - 1;
144
+ k(E), C(v[E]);
146
145
  }
147
146
  return ae;
148
- }).catch(() => !1).finally(() => G(!1));
147
+ }).catch(() => !1).finally(() => Q(!1));
149
148
  };
150
- u(() => {
151
- !t || !c || (y(g(d({}, l), {
149
+ d(() => {
150
+ !r || !c || (D(g(h({}, i), {
152
151
  current: 1
153
152
  })).then((e) => {
154
- }), D());
155
- }, [c == null ? void 0 : c.id, t == null ? void 0 : t.id]), u(() => {
156
- y().then((e) => {
157
- }), D();
158
- }, [l.current]), u(() => {
159
- y(g(d({}, l), {
153
+ }), M());
154
+ }, [c == null ? void 0 : c.id, r == null ? void 0 : r.id]), d(() => {
155
+ D().then((e) => {
156
+ }), M();
157
+ }, [i.current]), d(() => {
158
+ D(g(h({}, i), {
160
159
  current: 1,
161
160
  total: void 0
162
161
  })).then((e) => {
163
162
  });
164
- }, [F]);
163
+ }, [L]);
165
164
  const Re = () => {
166
- if (!h)
165
+ if (!f)
167
166
  return;
168
- const e = X + 1;
169
- if (e >= h.length)
170
- l.total && e >= l.total ? W.error("已经是最后一个了") : V({
171
- current: l.current + 1,
172
- pageSize: l.pageSize,
167
+ const e = K + 1;
168
+ if (e >= f.length)
169
+ i.total && e >= i.total ? q.error("已经是最后一个了") : V({
170
+ current: i.current + 1,
171
+ pageSize: i.pageSize,
173
172
  type: "next"
174
173
  });
175
174
  else {
176
- T(e);
177
- const i = h[e];
178
- C(i);
175
+ k(e);
176
+ const l = f[e];
177
+ C(l);
179
178
  }
180
179
  }, Ae = () => {
181
- if (!h)
180
+ if (!f)
182
181
  return;
183
- const e = X - 1;
182
+ const e = K - 1;
184
183
  if (e < 0)
185
- e < 0 ? W.error("已经是第一个了") : V({
186
- current: l.current - 1,
187
- pageSize: l.pageSize,
184
+ e < 0 ? q.error("已经是第一个了") : V({
185
+ current: i.current - 1,
186
+ pageSize: i.pageSize,
188
187
  type: "prev"
189
188
  });
190
189
  else {
191
- T(e);
192
- const i = h[e];
193
- C(i);
190
+ k(e);
191
+ const l = f[e];
192
+ C(l);
194
193
  }
195
194
  }, Be = [{
196
195
  key: "",
197
- label: `全部(${U})`,
196
+ label: `全部(${F})`,
198
197
  children: null
199
198
  }, {
200
199
  key: "nocode",
201
- label: `未标注(${Y})`,
200
+ label: `未标注(${ee})`,
202
201
  children: null
203
202
  }, {
204
203
  key: "hascode",
205
- label: `已标注(${U - Y})`,
204
+ label: `已标注(${F - ee})`,
206
205
  children: null
207
206
  }];
208
- u(() => {
209
- E || C(void 0);
210
- }, [E]), u(() => {
207
+ d(() => {
208
+ z || (C(void 0), k(-1), Y(void 0), A("preview"));
209
+ }, [z]), d(() => {
211
210
  c && c.markType !== "vlm" && console.error(`当前数据集不是vlm类型,请检查数据集类型。
212
211
  请检查markType是否为vlm。`);
213
212
  }, [c]);
214
- const ie = () => {
215
- var e, i;
216
- (i = (e = z.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || i.scrollTo({
213
+ const le = () => {
214
+ var e, l;
215
+ (l = (e = B.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || l.scrollTo({
217
216
  top: 0
218
217
  });
219
218
  }, Ee = (e) => {
220
- var i;
221
- (!l.total || l.total > h.length) && e.currentTarget.scrollHeight - e.currentTarget.scrollTop === ((i = z.current) == null ? void 0 : i.clientHeight) && V(g(d({}, l), {
222
- current: l.current + 1
219
+ var l;
220
+ (!i.total || i.total > f.length) && e.currentTarget.scrollHeight - e.currentTarget.scrollTop === ((l = B.current) == null ? void 0 : l.clientHeight) && V(g(h({}, i), {
221
+ current: i.current + 1
223
222
  }));
224
223
  };
225
- return /* @__PURE__ */ o(We, {
224
+ return /* @__PURE__ */ n(We, {
226
225
  locale: Je,
227
- children: /* @__PURE__ */ o(ot.Provider, {
226
+ children: /* @__PURE__ */ n(rt.Provider, {
228
227
  value: {
229
- datasetId: r,
230
- versionId: (t == null ? void 0 : t.id) || "",
231
- no: (t == null ? void 0 : t.no) || "",
232
- loading: O,
233
- version: t,
234
- versions: M,
235
- samples: h,
236
- pagination: l,
237
- services: n,
228
+ datasetId: t,
229
+ versionId: (r == null ? void 0 : r.id) || "",
230
+ no: (r == null ? void 0 : r.no) || "",
231
+ loading: J,
232
+ version: r,
233
+ versions: N,
234
+ samples: f,
235
+ pagination: i,
236
+ services: o,
238
237
  token: ve,
239
238
  apiUrl: ge,
240
239
  featuresConfig: {
241
240
  labelManager: me,
242
241
  datasetManager: b,
243
242
  annotation: he,
244
- filterSwitch: Z,
243
+ filterSwitch: j,
245
244
  header: a,
246
245
  exampleSrcRoot: pe
247
246
  }
248
247
  },
249
- children: c ? c.markType === "vlm" ? /* @__PURE__ */ I("div", {
248
+ children: c ? c.markType === "vlm" ? /* @__PURE__ */ S("div", {
250
249
  className: "vlm-version-detail",
251
- children: [/* @__PURE__ */ I(tt, {
250
+ children: [/* @__PURE__ */ S(et, {
252
251
  className: "product-details-page",
253
- header: a === !1 ? void 0 : /* @__PURE__ */ o(lt, {
252
+ header: a === !1 ? void 0 : /* @__PURE__ */ n(ot, {
254
253
  backTo: fe,
255
254
  onBackClick: a != null && a.onBackClick ? () => {
256
255
  a.onBackClick && a.onBackClick();
257
256
  } : void 0,
258
- left: !O && /* @__PURE__ */ I(A, {
259
- children: [/* @__PURE__ */ o("span", {
257
+ left: !J && /* @__PURE__ */ S(P, {
258
+ children: [/* @__PURE__ */ n("span", {
260
259
  style: {
261
260
  fontWeight: "bold"
262
261
  },
263
262
  children: c == null ? void 0 : c.name
264
- }), /* @__PURE__ */ o(_e, {
263
+ }), /* @__PURE__ */ n(_e, {
265
264
  disabled: (a == null ? void 0 : a.versionSelect) === !1,
266
- value: t == null ? void 0 : t.id,
265
+ value: r == null ? void 0 : r.id,
267
266
  style: {
268
267
  width: 70
269
268
  },
270
- options: M.map((e) => ({
269
+ options: N.map((e) => ({
271
270
  label: e.no,
272
271
  value: e.id
273
272
  })),
274
273
  onChange: (e) => {
275
- const i = M.find((p) => p.id === e);
276
- if (!c || !i)
274
+ const l = N.find((p) => p.id === e);
275
+ if (!c || !l)
277
276
  return;
278
- const m = M.find((p) => p.id === i.id);
279
- k(m), a != null && a.onVersionChange && a.onVersionChange(m);
277
+ const m = N.find((p) => p.id === l.id);
278
+ y(m), a != null && a.onVersionChange && a.onVersionChange(m);
280
279
  }
281
280
  })]
282
281
  }),
283
- right: /* @__PURE__ */ I(A, {
284
- children: [!w && b && b.add && // <DisabledTooltip
282
+ right: /* @__PURE__ */ S(P, {
283
+ children: [!H && b && b.add && // <DisabledTooltip
285
284
  // isPreLabel={false}
286
285
  // placement="bottom"
287
286
  // >
288
- /* @__PURE__ */ o(_, {
287
+ /* @__PURE__ */ n(O, {
289
288
  type: "default",
290
- onClick: () => K(!0),
291
- disabled: S === x.Pending || S === x.Started,
289
+ onClick: () => $(!0),
290
+ disabled: I === x.Pending || I === x.Started,
292
291
  children: "导入数据"
293
- }, "del"), /* @__PURE__ */ o(st, {
292
+ }, "del"), /* @__PURE__ */ n(lt, {
294
293
  when: Me,
295
294
  content: "确认要离开此页面吗?",
296
295
  subContent: "离开此页面后,将结束导入,放弃未上传的文件,请谨慎操作!"
297
- }), re && /* @__PURE__ */ o(it, {
296
+ }), re && /* @__PURE__ */ n(it, {
298
297
  datasetIam: De,
299
- datasetId: r,
300
- currentVersion: t,
298
+ datasetId: t,
299
+ currentVersion: r,
301
300
  tenCode: c == null ? void 0 : c.tenantCode,
302
301
  markType: c.markType,
303
302
  isVisible: re,
304
- setIsVisible: K,
305
- getVersionListRequest: D,
306
- setIsConfirm: Te,
303
+ setIsVisible: $,
304
+ getVersionListRequest: M,
305
+ setIsConfirm: Le,
307
306
  onUploadStatusChange: (e) => {
308
- Le(e);
307
+ Te(e);
309
308
  },
310
309
  tableReload: () => {
311
- t != null && t.id && (ie(), y(g(d({}, l), {
310
+ r != null && r.id && (le(), D(g(h({}, i), {
312
311
  current: 1
313
312
  })));
314
313
  },
315
- loadVersionData: le
314
+ loadVersionData: ie
316
315
  })]
317
316
  })
318
317
  }),
319
- children: [/* @__PURE__ */ I("div", {
318
+ children: [/* @__PURE__ */ S("div", {
320
319
  className: "vlm-header",
321
- children: [/* @__PURE__ */ o(A, {
322
- children: Z.tabs && /* @__PURE__ */ o(qe, {
320
+ children: [/* @__PURE__ */ n(P, {
321
+ children: j.tabs && /* @__PURE__ */ n(qe, {
323
322
  className: "header-tab",
324
- defaultActiveKey: "",
323
+ activeKey: L,
325
324
  onChange: (e) => {
326
- V(g(d({}, l), {
325
+ V(g(h({}, i), {
327
326
  current: 1
328
327
  // total: 0,
329
- })), Ie(e);
328
+ })), Z(e);
330
329
  },
331
330
  items: Be
332
331
  })
333
- }), /* @__PURE__ */ o(A, {
334
- children: b && b.label && /* @__PURE__ */ o(_, {
332
+ }), /* @__PURE__ */ n(P, {
333
+ children: b && b.label && /* @__PURE__ */ n(O, {
335
334
  type: "primary",
336
- disabled: !U,
335
+ disabled: !F,
337
336
  onClick: we,
338
337
  style: {
339
338
  marginRight: "10px"
@@ -341,51 +340,56 @@ const Tt = (f) => {
341
340
  children: "标注"
342
341
  })
343
342
  })]
344
- }), /* @__PURE__ */ o("div", {
343
+ }), /* @__PURE__ */ n("div", {
345
344
  className: "d-row",
346
- children: /* @__PURE__ */ o("div", {
345
+ children: /* @__PURE__ */ n("div", {
347
346
  className: "d-right",
348
- ref: z,
349
- children: w ? /* @__PURE__ */ o("div", {}) : l.total !== void 0 && l.total > 0 ? /* @__PURE__ */ o($e, {
350
- children: /* @__PURE__ */ o(et, {
347
+ ref: B,
348
+ children: H ? /* @__PURE__ */ n("div", {}) : i.total !== void 0 && i.total > 0 ? /* @__PURE__ */ n($e, {
349
+ children: /* @__PURE__ */ n(Ye, {
351
350
  innerProps: {
352
351
  className: "d-right-row"
353
352
  },
354
- data: h,
353
+ data: f,
355
354
  itemKey: "id",
356
- height: (se = z.current) == null ? void 0 : se.clientHeight,
355
+ height: (se = B.current) == null ? void 0 : se.clientHeight,
357
356
  onScroll: Ee,
358
- children: (e, i) => /* @__PURE__ */ o(Oe, {
357
+ children: (e, l) => /* @__PURE__ */ n(Oe, {
359
358
  className: "d-right-col",
360
- onClick: () => ze(i),
361
- children: /* @__PURE__ */ o("div", {
359
+ onClick: () => ze(l),
360
+ children: /* @__PURE__ */ S("div", {
362
361
  className: "right-col-wrapper",
363
- children: /* @__PURE__ */ o("div", {
362
+ children: [/* @__PURE__ */ n("div", {
364
363
  className: "right-col-img",
365
- children: /* @__PURE__ */ o(rt, {
364
+ children: /* @__PURE__ */ n(tt, {
366
365
  fileKey: e.fileKey,
367
366
  width: 124,
368
- imgProxy: Ce
367
+ imgProxy: ke
369
368
  })
370
- })
369
+ }), /* @__PURE__ */ n("div", {
370
+ className: "right-col-text",
371
+ children: /* @__PURE__ */ n("div", {
372
+ children: l + 1
373
+ })
374
+ })]
371
375
  })
372
376
  }, e.id)
373
377
  })
374
- }) : /* @__PURE__ */ o("div", {
378
+ }) : /* @__PURE__ */ n("div", {
375
379
  className: "empty",
376
- children: l.total === 0 ? /* @__PURE__ */ o(Ge, {
377
- image: ct,
378
- description: /* @__PURE__ */ I("span", {
379
- children: ["暂无数据", F !== "hascode" && /* @__PURE__ */ o("span", {
380
- children: b && b.add && /* @__PURE__ */ I(_, {
380
+ children: i.total === 0 ? /* @__PURE__ */ n(Ge, {
381
+ image: st,
382
+ description: /* @__PURE__ */ S("span", {
383
+ children: ["暂无数据", L !== "hascode" && /* @__PURE__ */ n("span", {
384
+ children: b && b.add && /* @__PURE__ */ S(O, {
381
385
  type: "link",
382
386
  size: "small",
383
387
  style: {
384
388
  padding: 0
385
389
  },
386
- onClick: () => K(!0),
387
- disabled: S === x.Pending || S === x.Started,
388
- children: [/* @__PURE__ */ o("span", {
390
+ onClick: () => $(!0),
391
+ disabled: I === x.Pending || I === x.Started,
392
+ children: [/* @__PURE__ */ n("span", {
389
393
  style: {
390
394
  color: "black"
391
395
  },
@@ -398,43 +402,45 @@ const Tt = (f) => {
398
402
  })
399
403
  })
400
404
  })]
401
- }), w && /* @__PURE__ */ o(Qe, {
402
- isVlmModalVisible: E,
403
- setIsVlmModalVisible: P,
404
- record: w,
405
+ }), z && /* @__PURE__ */ n(Qe, {
406
+ isVlmModalVisible: z,
407
+ setIsVlmModalVisible: R,
408
+ record: H,
405
409
  onNextClick: () => Re(),
406
410
  onPrevClick: () => Ae(),
407
- listLoading: be,
411
+ listLoading: Se,
408
412
  ocrMarkTmpl: c == null ? void 0 : c.ocrMarkTmpl,
409
- datasetId: r,
410
- versionId: t == null ? void 0 : t.id,
413
+ datasetId: t,
414
+ versionId: r == null ? void 0 : r.id,
415
+ initialMode: be,
416
+ filterMode: L,
417
+ onFilterModeChange: (e) => {
418
+ Z(e);
419
+ },
420
+ samples: f,
421
+ pagination: i,
422
+ currentIndex: K,
411
423
  handleMarkClick: (e) => {
412
- Q(e), P(!1), H(!0);
424
+ Y(e), A("annotation");
413
425
  },
414
426
  updateSampleList: () => {
415
- y(g(d({}, l), {
427
+ D(g(h({}, i), {
416
428
  current: 1
417
- })), D();
418
- }
419
- }), te && (t == null ? void 0 : t.id) && /* @__PURE__ */ o(Xe, {
420
- visible: te,
429
+ })), M();
430
+ },
421
431
  selectSampleId: ye,
422
- datasetId: r,
423
- versionId: t.id,
424
432
  onClose: () => {
425
- y(g(d({}, l), {
433
+ D(g(h({}, i), {
426
434
  current: 1
427
- })), D(), H(!1);
435
+ })), M(), R(!1);
428
436
  },
429
437
  onSave: (e) => {
430
- if (!r || !t)
438
+ if (!t || !r)
431
439
  throw "datasetId or version is not exist.";
432
- return n.cvforceDatahub.updateSamples(r, t.id, [d({}, e)]).then(() => (y(g(d({}, l), {
433
- current: 1
434
- })), D(), !0));
440
+ return o.cvforceDatahub.updateSamples(t, r.id, [h({}, e)]).then(() => !0);
435
441
  }
436
442
  })]
437
- }) : /* @__PURE__ */ o("div", {
443
+ }) : /* @__PURE__ */ n("div", {
438
444
  style: {
439
445
  color: "red",
440
446
  textAlign: "center"
@@ -445,5 +451,5 @@ const Tt = (f) => {
445
451
  });
446
452
  };
447
453
  export {
448
- Tt as default
454
+ xt as default
449
455
  };