@glodon-aiot/dataset-annotation 3.10.0-alpha.19 → 3.10.0-alpha.21

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.
@@ -393,8 +393,7 @@ const {
393
393
  onChange: (e) => {
394
394
  console.log("VLMAnnotation onChange", e), w.current = e, E(e);
395
395
  },
396
- ocrRecognize: Ve,
397
- coordinateType: "center"
396
+ ocrRecognize: Ve
398
397
  })
399
398
  }), g === "attributeDefinition" && /* @__PURE__ */ c(je, {
400
399
  ref: G,
@@ -1,18 +1,18 @@
1
- var k = (f, o, i) => new Promise((c, r) => {
1
+ var k = (f, o, l) => new Promise((c, r) => {
2
2
  var m = (a) => {
3
3
  try {
4
- s(i.next(a));
4
+ s(l.next(a));
5
5
  } catch (d) {
6
6
  r(d);
7
7
  }
8
- }, l = (a) => {
8
+ }, i = (a) => {
9
9
  try {
10
- s(i.throw(a));
10
+ s(l.throw(a));
11
11
  } catch (d) {
12
12
  r(d);
13
13
  }
14
- }, s = (a) => a.done ? c(a.value) : Promise.resolve(a.value).then(m, l);
15
- s((i = i.apply(f, o)).next());
14
+ }, s = (a) => a.done ? c(a.value) : Promise.resolve(a.value).then(m, i);
15
+ s((l = l.apply(f, o)).next());
16
16
  });
17
17
  import { jsxs as u, jsx as e } from "react/jsx-runtime";
18
18
  import { useRef as y, useState as h, useContext as R, useEffect as O } from "react";
@@ -25,11 +25,11 @@ import N from "../../Iconfont/index.mjs";
25
25
  const G = (f) => {
26
26
  const {
27
27
  isVlmModalVisible: o,
28
- setIsVlmModalVisible: i,
28
+ setIsVlmModalVisible: l,
29
29
  record: c,
30
30
  onNextClick: r,
31
31
  onPrevClick: m,
32
- datasetId: l,
32
+ datasetId: i,
33
33
  versionId: s,
34
34
  ocrMarkTmpl: a,
35
35
  handleMarkClick: d,
@@ -55,19 +55,19 @@ const G = (f) => {
55
55
  }), M("leftarrow", () => {
56
56
  m();
57
57
  }), O(() => {
58
- o && l && s && (n == null || n.getDatasetsIdVersionsVidSsamplesSid(l, s, c.id).then((j) => {
58
+ o && i && s && (n == null || n.getDatasetsIdVersionsVidSsamplesSid(i, s, c.id).then((j) => {
59
59
  I(j);
60
60
  }));
61
61
  }, [o, c]);
62
62
  const w = () => {
63
- i(!1);
63
+ l(!1);
64
64
  }, S = () => {
65
65
  v.confirm({
66
66
  title: "确认要删除此数据吗?",
67
67
  content: "删除后不可恢复,请慎重操作",
68
68
  onOk: () => {
69
- !l || !s || !(t != null && t.id) || n == null || n.delDatasetsIdVersionsVidSamplesId(l, s, t.id).then(() => {
70
- g.success("删除成功"), i(!1), V();
69
+ !i || !s || !(t != null && t.id) || n == null || n.delDatasetsIdVersionsVidSamplesId(i, s, t.id).then(() => {
70
+ g.success("删除成功"), l(!1), V();
71
71
  }).catch(() => g.error("删除失败"));
72
72
  }
73
73
  });
@@ -109,8 +109,7 @@ const G = (f) => {
109
109
  readOnly: !0,
110
110
  ocrRecognize: () => k(void 0, null, function* () {
111
111
  return [];
112
- }),
113
- coordinateType: "center"
112
+ })
114
113
  })
115
114
  }), /* @__PURE__ */ e(p, {
116
115
  className: "select-next",
@@ -18,7 +18,7 @@ import "./style.less.mjs";
18
18
  import Ge from "./VlmModal/index.mjs";
19
19
  import Je from "./MarkVLMBoxModal/index.mjs";
20
20
  import Qe from "lodash/merge";
21
- import { UploadZipsStatus as D } from "@glodon-aiot/apis";
21
+ import { UploadZipsStatus as x } from "@glodon-aiot/apis";
22
22
  import Xe from "rc-virtual-list";
23
23
  import Ye from "../../Common/Page/index.mjs";
24
24
  import et from "../Thumbnail/index.mjs";
@@ -33,7 +33,7 @@ const xt = (f) => {
33
33
  const {
34
34
  services: n,
35
35
  datasetId: r,
36
- versionId: x,
36
+ versionId: T,
37
37
  backTo: ue,
38
38
  labelManager: fe = !1,
39
39
  datasetManager: b = !1,
@@ -44,7 +44,7 @@ const xt = (f) => {
44
44
  exampleSrcRoot: he,
45
45
  apiUrl: pe,
46
46
  token: ge
47
- } = f, [c, B] = s(), [t, T] = s(), [L, q] = s([]), [O, N] = s(!1), [E, P] = s(!1), [U, G] = s(0), [h, ve] = s([]), [w, y] = s(), [be, J] = s(), [Q, M] = s(-1), [l, C] = s({
47
+ } = f, [c, B] = s(), [t, y] = s(), [L, q] = s([]), [O, N] = s(!1), [E, P] = s(!1), [U, G] = s(0), [h, ve] = s([]), [w, C] = s(), [be, J] = s(), [Q, M] = s(-1), [l, V] = s({
48
48
  current: 0,
49
49
  pageSize: 100
50
50
  }), [X, Y] = s(0), [F, Se] = s(""), [ee, H] = s(!1), [S, Ie] = s(""), [ke, ye] = s(), [Ce, Ve] = s(), [te, K] = s(!1), [re, De] = s(!1), [oe, xe] = s(!0), [Te, Me] = s(!1), z = Ze(null), Z = d({}, rt);
@@ -56,7 +56,7 @@ const xt = (f) => {
56
56
  return;
57
57
  M(e);
58
58
  const i = h[e];
59
- y(i), P(!0);
59
+ C(i), P(!0);
60
60
  };
61
61
  u(() => {
62
62
  n.cvforceDatahub && n.cvforceDatahub.getOptionsImgproxy().then((e) => ye(e));
@@ -72,7 +72,7 @@ const xt = (f) => {
72
72
  }),
73
73
  // 版本列表
74
74
  n.cvforceDatahub.getDatasetsIdVersions(r, 1, 1e3).then((e) => {
75
- q(e.recordList), T(x ? e.recordList.find((i) => i.id === x) : e.recordList[0]);
75
+ q(e.recordList), y(T ? e.recordList.find((i) => i.id === T) : e.recordList[0]);
76
76
  })
77
77
  ]).finally(() => N(!1)));
78
78
  }, [r, t == null ? void 0 : t.id]), u(() => {
@@ -83,27 +83,27 @@ const xt = (f) => {
83
83
  }),
84
84
  // 版本列表
85
85
  n.cvforceDatahub.getDatasetsIdVersions(r, 1, 1e3).then((e) => {
86
- q(e.recordList), T(x ? e.recordList.find((i) => i.id === x) : e.recordList[0]);
86
+ q(e.recordList), y(T ? e.recordList.find((i) => i.id === T) : e.recordList[0]);
87
87
  })
88
88
  ]).finally(() => N(!1)));
89
- }, [r, x]), u(() => {
89
+ }, [r, T]), u(() => {
90
90
  r && n.cvforceDatahub.getDatasetsId(r).then((e) => {
91
91
  B(e);
92
92
  });
93
93
  }, []);
94
94
  const ne = () => {
95
95
  !r || !t || n.cvforceDatahub.getDatasetsIdVersionsVid(r, t.id).then((e) => {
96
- Ie(e.versionAsyncTask.state);
96
+ y(e), Ie(e.versionAsyncTask.state);
97
97
  });
98
98
  };
99
99
  u(() => {
100
100
  ne();
101
101
  }, [r, t == null ? void 0 : t.id]), u(() => {
102
- S !== D.Pending && S !== D.Started || W.warning("文件导入中,请刷新页面再试");
102
+ S !== x.Pending && S !== x.Started || W.warning("文件导入中,请刷新页面再试");
103
103
  }, [S]), u(() => {
104
104
  Me(!oe && re);
105
105
  }, [oe, re]);
106
- const V = () => {
106
+ const D = () => {
107
107
  !r || !t || n.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(r, t.id).then((e) => {
108
108
  const i = e.find((p) => p.id === "allcodeid"), m = e.find((p) => p.id === "nocodeid");
109
109
  G(i ? i.count : 0), Y(m ? m.count : 0);
@@ -122,7 +122,7 @@ const xt = (f) => {
122
122
  return;
123
123
  }
124
124
  };
125
- return m === 1 && le(), C(g(d({}, l), {
125
+ return m === 1 && le(), V(g(d({}, l), {
126
126
  current: m,
127
127
  pageSize: p
128
128
  })), n.cvforceDatahub.getDatasetsIdVersionsVidSamples(r, t.id, {
@@ -131,18 +131,18 @@ const xt = (f) => {
131
131
  labels: Be()
132
132
  }).then((se) => {
133
133
  const v = se.recordList || [], ce = m === 1 ? v : $ === "prev" ? [...v, ...j] : [...j, ...v];
134
- if (ve(ce), C(g(d({}, l), {
134
+ if (ve(ce), V(g(d({}, l), {
135
135
  current: m,
136
136
  pageSize: p,
137
137
  type: void 0,
138
138
  total: se.totalResults
139
139
  })), $ === "next" && v.length) {
140
140
  const R = j.length;
141
- M(R), y(v[0]);
141
+ M(R), C(v[0]);
142
142
  }
143
143
  if ($ === "prev" && v.length) {
144
144
  const R = v.length - 1;
145
- M(R), y(v[R]);
145
+ M(R), C(v[R]);
146
146
  }
147
147
  return ce;
148
148
  }).catch(() => !1);
@@ -151,10 +151,10 @@ const xt = (f) => {
151
151
  !t || !c || (I(g(d({}, l), {
152
152
  current: 1
153
153
  })).then((e) => {
154
- }), V());
154
+ }), D());
155
155
  }, [c == null ? void 0 : c.id, t == null ? void 0 : t.id]), u(() => {
156
156
  I().then((e) => {
157
- }), V();
157
+ }), D();
158
158
  }, [l.current]), u(() => {
159
159
  I(g(d({}, l), {
160
160
  current: 1,
@@ -167,7 +167,7 @@ const xt = (f) => {
167
167
  return;
168
168
  const e = Q + 1;
169
169
  if (e >= h.length)
170
- l.total && e >= l.total ? W.error("已经是最后一个了") : C({
170
+ l.total && e >= l.total ? W.error("已经是最后一个了") : V({
171
171
  current: l.current + 1,
172
172
  pageSize: l.pageSize,
173
173
  type: "next"
@@ -175,14 +175,14 @@ const xt = (f) => {
175
175
  else {
176
176
  M(e);
177
177
  const i = h[e];
178
- y(i);
178
+ C(i);
179
179
  }
180
180
  }, ze = () => {
181
181
  if (!h)
182
182
  return;
183
183
  const e = Q - 1;
184
184
  if (e < 0)
185
- e < 0 ? W.error("已经是第一个了") : C({
185
+ e < 0 ? W.error("已经是第一个了") : V({
186
186
  current: l.current - 1,
187
187
  pageSize: l.pageSize,
188
188
  type: "prev"
@@ -190,7 +190,7 @@ const xt = (f) => {
190
190
  else {
191
191
  M(e);
192
192
  const i = h[e];
193
- y(i);
193
+ C(i);
194
194
  }
195
195
  }, Re = [{
196
196
  key: "",
@@ -206,7 +206,7 @@ const xt = (f) => {
206
206
  children: null
207
207
  }];
208
208
  u(() => {
209
- E || y(void 0);
209
+ E || C(void 0);
210
210
  }, [E]), u(() => {
211
211
  c && c.markType !== "vlm" && console.error(`当前数据集不是vlm类型,请检查数据集类型。
212
212
  请检查markType是否为vlm。`);
@@ -218,7 +218,7 @@ const xt = (f) => {
218
218
  });
219
219
  }, Ae = (e) => {
220
220
  var i;
221
- (!l.total || l.total > h.length) && e.currentTarget.scrollHeight - e.currentTarget.scrollTop === ((i = z.current) == null ? void 0 : i.clientHeight) && C(g(d({}, l), {
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
222
  current: l.current + 1
223
223
  }));
224
224
  };
@@ -276,7 +276,7 @@ const xt = (f) => {
276
276
  if (!c || !i)
277
277
  return;
278
278
  const m = L.find((p) => p.id === i.id);
279
- T(m), a != null && a.onVersionChange && a.onVersionChange(m);
279
+ y(m), a != null && a.onVersionChange && a.onVersionChange(m);
280
280
  }
281
281
  })]
282
282
  }),
@@ -288,7 +288,7 @@ const xt = (f) => {
288
288
  /* @__PURE__ */ o(_, {
289
289
  type: "default",
290
290
  onClick: () => K(!0),
291
- disabled: S === D.Pending || S === D.Started,
291
+ disabled: S === x.Pending || S === x.Started,
292
292
  children: "导入数据"
293
293
  }, "del"), /* @__PURE__ */ o(lt, {
294
294
  when: Te,
@@ -302,7 +302,7 @@ const xt = (f) => {
302
302
  markType: c.markType,
303
303
  isVisible: te,
304
304
  setIsVisible: K,
305
- getVersionListRequest: V,
305
+ getVersionListRequest: D,
306
306
  setIsConfirm: xe,
307
307
  onUploadStatusChange: (e) => {
308
308
  De(e);
@@ -323,7 +323,7 @@ const xt = (f) => {
323
323
  className: "header-tab",
324
324
  defaultActiveKey: "",
325
325
  onChange: (e) => {
326
- C(g(d({}, l), {
326
+ V(g(d({}, l), {
327
327
  current: 1
328
328
  // total: 0,
329
329
  })), Se(e);
@@ -384,7 +384,7 @@ const xt = (f) => {
384
384
  padding: 0
385
385
  },
386
386
  onClick: () => K(!0),
387
- disabled: S === D.Pending || S === D.Started,
387
+ disabled: S === x.Pending || S === x.Started,
388
388
  children: [/* @__PURE__ */ o("span", {
389
389
  style: {
390
390
  color: "black"
@@ -413,7 +413,7 @@ const xt = (f) => {
413
413
  updateSampleList: () => {
414
414
  I(g(d({}, l), {
415
415
  current: 1
416
- })), V();
416
+ })), D();
417
417
  }
418
418
  }), ee && (t == null ? void 0 : t.id) && /* @__PURE__ */ o(Je, {
419
419
  visible: ee,
@@ -423,14 +423,14 @@ const xt = (f) => {
423
423
  onClose: () => {
424
424
  I(g(d({}, l), {
425
425
  current: 1
426
- })), V(), H(!1);
426
+ })), D(), H(!1);
427
427
  },
428
428
  onSave: (e) => {
429
429
  if (!r || !t)
430
430
  throw "datasetId or version is not exist.";
431
431
  return n.cvforceDatahub.updateSamples(r, t.id, [d({}, e)]).then(() => (I(g(d({}, l), {
432
432
  current: 1
433
- })), V(), !0));
433
+ })), D(), !0));
434
434
  }
435
435
  })]
436
436
  }) : /* @__PURE__ */ o("div", {