@glodon-aiot/dataset-annotation 3.10.0-alpha.13 → 3.10.0-alpha.14

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.
@@ -45,10 +45,10 @@ const Lt = (f) => {
45
45
  exampleSrcRoot: pe,
46
46
  apiUrl: he,
47
47
  token: ge
48
- } = f, [c, U] = s(), [t, x] = s(), [N, O] = s([]), [G, w] = s(!1), [F, H] = s(!1), [T, J] = s(0), [p, ve] = s([]), [z, k] = s(), [be, Q] = s(), [X, L] = s(-1), [l, y] = s({
48
+ } = f, [c, U] = s(), [t, x] = s(), [w, O] = s([]), [G, z] = s(!1), [F, H] = s(!1), [T, J] = s(0), [p, ve] = s([]), [R, k] = s(), [be, Q] = s(), [X, L] = s(-1), [l, y] = s({
49
49
  current: 0,
50
50
  pageSize: 100
51
- }), [R, Y] = s(0), [M, Se] = s(""), [ee, K] = s(!1), [S, Ie] = s(""), [ke, ye] = s(), [Ce, Ve] = s(), [te, Z] = s(!1), [re, De] = s(!1), [oe, xe] = s(!0), [Te, Le] = s(!1), A = Ze(null), $ = m({}, rt);
51
+ }), [A, Y] = s(0), [M, Se] = s(""), [ee, K] = s(!1), [S, Ie] = s(""), [ke, ye] = s(), [Ce, Ve] = s(), [te, Z] = s(!1), [re, De] = s(!1), [oe, xe] = s(!0), [Te, Le] = s(!1), B = Ze(null), $ = m({}, rt);
52
52
  Qe($, f.filterSwitch);
53
53
  const Me = () => {
54
54
  Q(void 0), K(!0);
@@ -66,7 +66,7 @@ const Lt = (f) => {
66
66
  Ve(e);
67
67
  });
68
68
  }, [r]), u(() => {
69
- !r || t || (w(!0), Promise.all([
69
+ !r || t || (z(!0), Promise.all([
70
70
  // 数据集
71
71
  i.cvforceDatahub.getDatasetsId(r).then((e) => {
72
72
  U(e);
@@ -75,9 +75,9 @@ const Lt = (f) => {
75
75
  i.cvforceDatahub.getDatasetsIdVersions(r, 1, 1e3).then((e) => {
76
76
  O(e.recordList), x(D ? e.recordList.find((o) => o.id === D) : e.recordList[0]);
77
77
  })
78
- ]).finally(() => w(!1)));
78
+ ]).finally(() => z(!1)));
79
79
  }, [r, t == null ? void 0 : t.id]), u(() => {
80
- r && (w(!0), Promise.all([
80
+ r && (z(!0), Promise.all([
81
81
  // 数据集
82
82
  i.cvforceDatahub.getDatasetsId(r).then((e) => {
83
83
  U(e);
@@ -86,7 +86,7 @@ const Lt = (f) => {
86
86
  i.cvforceDatahub.getDatasetsIdVersions(r, 1, 1e3).then((e) => {
87
87
  O(e.recordList), x(D ? e.recordList.find((o) => o.id === D) : e.recordList[0]);
88
88
  })
89
- ]).finally(() => w(!1)));
89
+ ]).finally(() => z(!1)));
90
90
  }, [r, D]), u(() => {
91
91
  r && i.cvforceDatahub.getDatasetsId(r).then((e) => {
92
92
  U(e);
@@ -104,7 +104,7 @@ const Lt = (f) => {
104
104
  }, [S]), u(() => {
105
105
  Le(!oe && re);
106
106
  }, [oe, re]);
107
- const B = () => {
107
+ const N = () => {
108
108
  !r || !t || i.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(r, t.id).then((e) => {
109
109
  const o = e.find((h) => h.id === "allcodeid"), d = e.find((h) => h.id === "nocodeid");
110
110
  J(o ? o.count : 0), Y(d ? d.count : 0);
@@ -149,13 +149,13 @@ const Lt = (f) => {
149
149
  }).catch(() => !1);
150
150
  };
151
151
  u(() => {
152
- !t || !c || C(g(m({}, l), {
152
+ !t || !c || (C(g(m({}, l), {
153
153
  current: 1
154
154
  })).then((e) => {
155
- });
155
+ }), N());
156
156
  }, [c == null ? void 0 : c.id, t == null ? void 0 : t.id]), u(() => {
157
157
  C().then((e) => {
158
- }), B();
158
+ }), N();
159
159
  }, [l.current]), u(() => {
160
160
  C(g(m({}, l), {
161
161
  current: 1,
@@ -169,7 +169,7 @@ const Lt = (f) => {
169
169
  const e = X + 1;
170
170
  if (e >= p.length) {
171
171
  let o = T;
172
- M === "hascode" && (o = T - R), M === "nocode" && (o = R), (l.current - 1) * l.pageSize + e >= o ? _.error("已经是最后一个了") : y({
172
+ M === "hascode" && (o = T - A), M === "nocode" && (o = A), (l.current - 1) * l.pageSize + e >= o ? _.error("已经是最后一个了") : y({
173
173
  current: l.current + 1,
174
174
  pageSize: l.pageSize,
175
175
  type: "next"
@@ -200,11 +200,11 @@ const Lt = (f) => {
200
200
  children: null
201
201
  }, {
202
202
  key: "nocode",
203
- label: `未标注(${R})`,
203
+ label: `未标注(${A})`,
204
204
  children: null
205
205
  }, {
206
206
  key: "hascode",
207
- label: `已标注(${T - R})`,
207
+ label: `已标注(${T - A})`,
208
208
  children: null
209
209
  }];
210
210
  u(() => {
@@ -215,12 +215,12 @@ const Lt = (f) => {
215
215
  }, [c]);
216
216
  const le = () => {
217
217
  var e, o;
218
- (o = (e = A.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || o.scrollTo({
218
+ (o = (e = B.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || o.scrollTo({
219
219
  top: 0
220
220
  });
221
221
  }, Ae = (e) => {
222
222
  var o;
223
- (!l.total || l.total > p.length) && e.currentTarget.scrollHeight - e.currentTarget.scrollTop === ((o = A.current) == null ? void 0 : o.clientHeight) && y(g(m({}, l), {
223
+ (!l.total || l.total > p.length) && e.currentTarget.scrollHeight - e.currentTarget.scrollTop === ((o = B.current) == null ? void 0 : o.clientHeight) && y(g(m({}, l), {
224
224
  current: l.current + 1
225
225
  }));
226
226
  };
@@ -233,7 +233,7 @@ const Lt = (f) => {
233
233
  no: (t == null ? void 0 : t.no) || "",
234
234
  loading: G,
235
235
  version: t,
236
- versions: N,
236
+ versions: w,
237
237
  samples: p,
238
238
  pagination: l,
239
239
  services: i,
@@ -269,21 +269,21 @@ const Lt = (f) => {
269
269
  style: {
270
270
  width: 70
271
271
  },
272
- options: N.map((e) => ({
272
+ options: w.map((e) => ({
273
273
  label: e.no,
274
274
  value: e.id
275
275
  })),
276
276
  onChange: (e) => {
277
- const o = N.find((h) => h.id === e);
277
+ const o = w.find((h) => h.id === e);
278
278
  if (!c || !o)
279
279
  return;
280
- const d = N.find((h) => h.id === o.id);
280
+ const d = w.find((h) => h.id === o.id);
281
281
  x(d), a != null && a.onVersionChange && a.onVersionChange(d);
282
282
  }
283
283
  })]
284
284
  }),
285
285
  right: /* @__PURE__ */ I(E, {
286
- children: [!z && b && b.add && /* @__PURE__ */ n(lt, {
286
+ children: [!R && b && b.add && /* @__PURE__ */ n(lt, {
287
287
  isPreLabel: !1,
288
288
  placement: "bottom",
289
289
  children: /* @__PURE__ */ n(q, {
@@ -304,7 +304,7 @@ const Lt = (f) => {
304
304
  markType: c.markType,
305
305
  isVisible: te,
306
306
  setIsVisible: Z,
307
- getVersionListRequest: B,
307
+ getVersionListRequest: N,
308
308
  setIsConfirm: xe,
309
309
  onUploadStatusChange: (e) => {
310
310
  De(e);
@@ -347,15 +347,15 @@ const Lt = (f) => {
347
347
  className: "d-row",
348
348
  children: /* @__PURE__ */ n("div", {
349
349
  className: "d-right",
350
- ref: A,
351
- children: z ? /* @__PURE__ */ n("div", {}) : l.total !== void 0 && l.total > 0 ? /* @__PURE__ */ n(Ke, {
350
+ ref: B,
351
+ children: R ? /* @__PURE__ */ n("div", {}) : l.total !== void 0 && l.total > 0 ? /* @__PURE__ */ n(Ke, {
352
352
  children: /* @__PURE__ */ n(Xe, {
353
353
  innerProps: {
354
354
  className: "d-right-row"
355
355
  },
356
356
  data: p,
357
357
  itemKey: "id",
358
- height: (ie = A.current) == null ? void 0 : ie.clientHeight,
358
+ height: (ie = B.current) == null ? void 0 : ie.clientHeight,
359
359
  onScroll: Ae,
360
360
  children: (e, o) => /* @__PURE__ */ n(_e, {
361
361
  className: "d-right-col",
@@ -400,10 +400,10 @@ const Lt = (f) => {
400
400
  })
401
401
  })
402
402
  })]
403
- }), z && /* @__PURE__ */ n(Ge, {
403
+ }), R && /* @__PURE__ */ n(Ge, {
404
404
  isVlmModalVisible: F,
405
405
  setIsVlmModalVisible: H,
406
- record: z,
406
+ record: R,
407
407
  onNextClick: () => we(),
408
408
  onPrevClick: () => ze(),
409
409
  ocrMarkTmpl: c == null ? void 0 : c.ocrMarkTmpl,
@@ -415,7 +415,7 @@ const Lt = (f) => {
415
415
  updateSampleList: () => {
416
416
  C(g(m({}, l), {
417
417
  current: 1
418
- })), B();
418
+ })), N();
419
419
  }
420
420
  }), ee && (t == null ? void 0 : t.id) && /* @__PURE__ */ n(Je, {
421
421
  visible: ee,
@@ -428,7 +428,7 @@ const Lt = (f) => {
428
428
  throw "datasetId or version is not exist.";
429
429
  return i.cvforceDatahub.updateSamples(r, t.id, [m({}, e)]).then(() => (C(g(m({}, l), {
430
430
  current: 1
431
- })), B(), !0));
431
+ })), N(), !0));
432
432
  }
433
433
  })]
434
434
  }) : /* @__PURE__ */ n("div", {