@glodon-aiot/dataset-annotation 3.25.0-alpha.7 → 3.25.0-alpha.8
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.
|
@@ -2,7 +2,7 @@ var Be = Object.defineProperty, Ee = Object.defineProperties;
|
|
|
2
2
|
var Ue = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var he = Object.getOwnPropertySymbols;
|
|
4
4
|
var $e = Object.prototype.hasOwnProperty, Ze = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var pe = (b, l, i) => l in b ? Be(b, l, { enumerable: !0, configurable: !0, writable: !0, value: i }) : b[l] = i,
|
|
5
|
+
var pe = (b, l, i) => l in b ? Be(b, l, { enumerable: !0, configurable: !0, writable: !0, value: i }) : b[l] = i, m = (b, l) => {
|
|
6
6
|
for (var i in l || (l = {}))
|
|
7
7
|
$e.call(l, i) && pe(b, i, l[i]);
|
|
8
8
|
if (he)
|
|
@@ -43,15 +43,15 @@ const At = (b) => {
|
|
|
43
43
|
versionSelect: !1
|
|
44
44
|
},
|
|
45
45
|
exampleSrcRoot: Se
|
|
46
|
-
} = b, U = !!(v && v.label), [o, xe] = d(), [t, $] = d(), [V, Me] = d([]), [ee, te] = d(!1), [
|
|
46
|
+
} = b, U = !!(v && v.label), [o, xe] = d(), [t, $] = d(), [V, Me] = d([]), [ee, te] = d(!1), [M, L] = d(!1), [I, ne] = d(0), [u, P] = d(), [h, k] = d(), [re, O] = d(), [Z, y] = d(-1), oe = X(null), N = X(void 0), D = X(!1), [f, S] = d({
|
|
47
47
|
current: 1,
|
|
48
48
|
pageSize: 50
|
|
49
|
-
}), [z, ie] = d(0), [A, ce] = d(0), [
|
|
49
|
+
}), [z, ie] = d(0), [A, ce] = d(0), [x, j] = d(""), [le, q] = d(!1), [ae, se] = d(), [W, de] = d(!1), [K, _] = d(null), [Te, ue] = d(!1), [Ie, ye] = d(!1), [H, De] = d(""), [J, F] = d("preview"), Q = m({}, dt);
|
|
50
50
|
ot(Q, b.filterSwitch);
|
|
51
51
|
const we = () => {
|
|
52
52
|
O(void 0), (o == null ? void 0 : o.ocrMarkTmpl) === "StructKVCOCR" ? q(!0) : (F("annotation"), L(!0), j("nocode"));
|
|
53
53
|
}, ve = (e, n) => {
|
|
54
|
-
|
|
54
|
+
S({
|
|
55
55
|
current: e,
|
|
56
56
|
pageSize: n
|
|
57
57
|
});
|
|
@@ -93,7 +93,7 @@ const At = (b) => {
|
|
|
93
93
|
ne(n ? n.count : 0), ie(r ? r.count : 0), ce(a ? a.count : 0);
|
|
94
94
|
});
|
|
95
95
|
}, Le = () => {
|
|
96
|
-
switch (
|
|
96
|
+
switch (x) {
|
|
97
97
|
case "nocode":
|
|
98
98
|
case "hascode":
|
|
99
99
|
return 0;
|
|
@@ -103,7 +103,7 @@ const At = (b) => {
|
|
|
103
103
|
return 2;
|
|
104
104
|
}
|
|
105
105
|
}, Pe = () => {
|
|
106
|
-
switch (
|
|
106
|
+
switch (x) {
|
|
107
107
|
case "nocode":
|
|
108
108
|
return "nocode";
|
|
109
109
|
case "pending":
|
|
@@ -127,12 +127,12 @@ const At = (b) => {
|
|
|
127
127
|
}).then((r) => {
|
|
128
128
|
const a = r.recordList || [];
|
|
129
129
|
if (!a.length && r.totalResults > 0) {
|
|
130
|
-
|
|
130
|
+
S((s) => g(m({}, s), {
|
|
131
131
|
current: Math.ceil(r.totalResults / n)
|
|
132
132
|
})), Math.ceil(r.totalResults / n) === e && P([]);
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
|
-
if (P(a),
|
|
135
|
+
if (P(a), S((s) => g(m({}, s), {
|
|
136
136
|
total: r.totalResults
|
|
137
137
|
})), f.type === "next" && a.length) {
|
|
138
138
|
y(0);
|
|
@@ -148,19 +148,19 @@ const At = (b) => {
|
|
|
148
148
|
D.current = !1;
|
|
149
149
|
}), fe();
|
|
150
150
|
};
|
|
151
|
-
C(R, [f.current, f.pageSize,
|
|
151
|
+
C(R, [f.current, f.pageSize, x, ae, t == null ? void 0 : t.id, i]);
|
|
152
152
|
const Oe = () => {
|
|
153
153
|
if (!u)
|
|
154
154
|
return;
|
|
155
155
|
const e = Z + 1;
|
|
156
156
|
if (e >= u.length) {
|
|
157
157
|
let n = I;
|
|
158
|
-
if (
|
|
158
|
+
if (x === "hascode" && (n = I - z - A), x === "nocode" && (n = z), x === "pending" && (n = A), (f.current - 1) * f.pageSize + e >= n)
|
|
159
159
|
B.error("已经是最后一个了");
|
|
160
160
|
else {
|
|
161
161
|
if (D.current)
|
|
162
162
|
return;
|
|
163
|
-
D.current = !0,
|
|
163
|
+
D.current = !0, S((a) => g(m({}, a), {
|
|
164
164
|
current: a.current + 1,
|
|
165
165
|
type: "next"
|
|
166
166
|
}));
|
|
@@ -180,7 +180,7 @@ const At = (b) => {
|
|
|
180
180
|
else {
|
|
181
181
|
if (D.current)
|
|
182
182
|
return;
|
|
183
|
-
D.current = !0,
|
|
183
|
+
D.current = !0, S((r) => g(m({}, r), {
|
|
184
184
|
current: r.current - 1,
|
|
185
185
|
type: "prev"
|
|
186
186
|
}));
|
|
@@ -230,19 +230,24 @@ const At = (b) => {
|
|
|
230
230
|
children: null
|
|
231
231
|
}];
|
|
232
232
|
C(() => {
|
|
233
|
-
!
|
|
234
|
-
}, [
|
|
233
|
+
!M || !(h != null && h.id) || (N.current = h.id);
|
|
234
|
+
}, [M, h == null ? void 0 : h.id]), C(() => {
|
|
235
235
|
const e = N.current;
|
|
236
|
-
if (
|
|
236
|
+
if (M || !e || !(u != null && u.length))
|
|
237
237
|
return;
|
|
238
238
|
const n = requestAnimationFrame(() => {
|
|
239
239
|
var a;
|
|
240
240
|
ht((a = oe.current) == null ? void 0 : a.querySelector(".d-right"), e) && (N.current = void 0);
|
|
241
241
|
});
|
|
242
242
|
return () => cancelAnimationFrame(n);
|
|
243
|
-
}, [
|
|
244
|
-
|
|
245
|
-
|
|
243
|
+
}, [M, u]), C(() => {
|
|
244
|
+
M || (S((e) => e.type ? m({
|
|
245
|
+
current: e.current,
|
|
246
|
+
pageSize: e.pageSize
|
|
247
|
+
}, e.total !== void 0 ? {
|
|
248
|
+
total: e.total
|
|
249
|
+
} : {}) : e), (o == null ? void 0 : o.ocrMarkTmpl) === "StructKVCOCR" ? k(void 0) : (J === "annotation" && R(), k(void 0), y(-1), O(void 0), F("preview")));
|
|
250
|
+
}, [M, J]), C(() => {
|
|
246
251
|
o && (o.markType !== "ocr" || (o == null ? void 0 : o.ocrMarkTmpl) !== "DetectionOCR") && console.error(`当前数据集不是DetectionOCR(ocr检测)类型,请检查数据集类型。
|
|
247
252
|
请检查markType是否为ocr并且ocrMarkTmpl为DetectionOCR。`);
|
|
248
253
|
}, [o]);
|
|
@@ -254,13 +259,13 @@ const At = (b) => {
|
|
|
254
259
|
content: "待确认的所有带预标注信息的图片将保存至已标注页签下",
|
|
255
260
|
onOk: () => {
|
|
256
261
|
l.cvforceDatahub.getAllConfirmSamples(i, t.id).then((e) => {
|
|
257
|
-
B.success("保存成功"),
|
|
262
|
+
B.success("保存成功"), S(g(m({}, f), {
|
|
258
263
|
current: 1
|
|
259
264
|
})), fe(), R();
|
|
260
265
|
});
|
|
261
266
|
}
|
|
262
267
|
});
|
|
263
|
-
}, me = !
|
|
268
|
+
}, me = !h && !!(v && v.preLabel) && !!(t != null && t.id), Fe = U || me;
|
|
264
269
|
return /* @__PURE__ */ c(je, {
|
|
265
270
|
locale: Ye,
|
|
266
271
|
children: /* @__PURE__ */ c(st.Provider, {
|
|
@@ -365,9 +370,9 @@ const At = (b) => {
|
|
|
365
370
|
children: [/* @__PURE__ */ c(w, {
|
|
366
371
|
children: Q.tabs && /* @__PURE__ */ c(He, {
|
|
367
372
|
className: "header-tab",
|
|
368
|
-
activeKey:
|
|
373
|
+
activeKey: x,
|
|
369
374
|
onChange: (e) => {
|
|
370
|
-
|
|
375
|
+
S(g(m({}, f), {
|
|
371
376
|
current: 1,
|
|
372
377
|
total: 0
|
|
373
378
|
})), j(e);
|
|
@@ -375,7 +380,7 @@ const At = (b) => {
|
|
|
375
380
|
items: ze
|
|
376
381
|
})
|
|
377
382
|
}), /* @__PURE__ */ c(w, {
|
|
378
|
-
children:
|
|
383
|
+
children: x === "pending" && U && /* @__PURE__ */ c(Y, {
|
|
379
384
|
type: "primary",
|
|
380
385
|
className: "pending-confirm-button",
|
|
381
386
|
onClick: Ke,
|
|
@@ -418,7 +423,7 @@ const At = (b) => {
|
|
|
418
423
|
})]
|
|
419
424
|
})
|
|
420
425
|
}, e.id))
|
|
421
|
-
}), /* @__PURE__ */ c(Ge,
|
|
426
|
+
}), /* @__PURE__ */ c(Ge, m({
|
|
422
427
|
onChange: ve,
|
|
423
428
|
className: "d-right-pageination",
|
|
424
429
|
showQuickJumper: !0,
|
|
@@ -426,11 +431,11 @@ const At = (b) => {
|
|
|
426
431
|
}, f))]
|
|
427
432
|
}) : /* @__PURE__ */ c(at, {})
|
|
428
433
|
})]
|
|
429
|
-
}),
|
|
434
|
+
}), M && /* @__PURE__ */ c(et, {
|
|
430
435
|
mode: J,
|
|
431
|
-
visible:
|
|
436
|
+
visible: M,
|
|
432
437
|
onClose: () => L(!1),
|
|
433
|
-
record:
|
|
438
|
+
record: h,
|
|
434
439
|
onNextClick: () => Oe(),
|
|
435
440
|
onPrevClick: () => Ne(),
|
|
436
441
|
ocrMarkTmpl: o == null ? void 0 : o.ocrMarkTmpl,
|
|
@@ -446,11 +451,11 @@ const At = (b) => {
|
|
|
446
451
|
var n;
|
|
447
452
|
if (!i || !t)
|
|
448
453
|
throw "datasetId or version is not exist.";
|
|
449
|
-
return l.cvforceDatahub.updateSamples(i, t.id, [g(
|
|
450
|
-
labels: (n = e.labels) == null ? void 0 : n.map((r) => g(
|
|
454
|
+
return l.cvforceDatahub.updateSamples(i, t.id, [g(m({}, e), {
|
|
455
|
+
labels: (n = e.labels) == null ? void 0 : n.map((r) => g(m({}, r), {
|
|
451
456
|
box: r.box.length > 4 ? r.box.splice(0, 4) : r.box
|
|
452
457
|
}))
|
|
453
|
-
})]).then(() => (u && (
|
|
458
|
+
})]).then(() => (u && (h == null ? void 0 : h.id) === e.id && (P((r) => {
|
|
454
459
|
if (!r)
|
|
455
460
|
return r;
|
|
456
461
|
const a = r.findIndex((s) => s.id === e.id);
|
|
@@ -465,11 +470,11 @@ const At = (b) => {
|
|
|
465
470
|
var n;
|
|
466
471
|
if (!i || !t)
|
|
467
472
|
throw "datasetId or version is not exist.";
|
|
468
|
-
return l.cvforceDatahub.updateSamples(i, t.id, [g(
|
|
469
|
-
labels: (n = e.labels) == null ? void 0 : n.map((r) => g(
|
|
473
|
+
return l.cvforceDatahub.updateSamples(i, t.id, [g(m({}, e), {
|
|
474
|
+
labels: (n = e.labels) == null ? void 0 : n.map((r) => g(m({}, r), {
|
|
470
475
|
box: r.box.length > 4 ? r.box.splice(0, 4) : r.box
|
|
471
476
|
}))
|
|
472
|
-
})], 1).then(() => (u && (
|
|
477
|
+
})], 1).then(() => (u && (h == null ? void 0 : h.id) === e.id && (P((r) => {
|
|
473
478
|
if (!r)
|
|
474
479
|
return r;
|
|
475
480
|
const a = r.findIndex((s) => s.id === e.id);
|
|
@@ -480,12 +485,12 @@ const At = (b) => {
|
|
|
480
485
|
return r;
|
|
481
486
|
}), k(e)), !0));
|
|
482
487
|
},
|
|
483
|
-
filterMode:
|
|
488
|
+
filterMode: x,
|
|
484
489
|
onFilterModeChange: (e) => {
|
|
485
490
|
O(void 0), j(e);
|
|
486
491
|
},
|
|
487
492
|
onPaginationChange: (e) => {
|
|
488
|
-
|
|
493
|
+
S(e);
|
|
489
494
|
},
|
|
490
495
|
onCurrentSampleChange: (e) => {
|
|
491
496
|
N.current = e;
|
|
@@ -504,8 +509,8 @@ const At = (b) => {
|
|
|
504
509
|
var n;
|
|
505
510
|
if (!i || !t)
|
|
506
511
|
throw "datasetId or version is not exist.";
|
|
507
|
-
return l.cvforceDatahub.updateSamples(i, t.id, [g(
|
|
508
|
-
labels: (n = e.labels) == null ? void 0 : n.map((r) => g(
|
|
512
|
+
return l.cvforceDatahub.updateSamples(i, t.id, [g(m({}, e), {
|
|
513
|
+
labels: (n = e.labels) == null ? void 0 : n.map((r) => g(m({}, r), {
|
|
509
514
|
box: r.box.length > 4 ? r.box.splice(0, 4) : r.box
|
|
510
515
|
}))
|
|
511
516
|
})]).then(() => (R(), !0));
|