@glodon-aiot/dataset-annotation 3.1.0-beta.16 → 3.2.1
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.
- package/dist/dataset-annotation.js +123591 -0
- package/dist/dataset-annotation.umd.cjs +1017 -0
- package/dist/example/DatasetAnnotationDemo.d.ts +3 -0
- package/dist/example/DemoTabs.d.ts +3 -0
- package/dist/example/DetectionDatasetDemo.d.ts +5 -0
- package/dist/example/DetectionImageDemo.d.ts +5 -0
- package/dist/example/OcrDatasetDemo.d.ts +5 -0
- package/dist/example/OcrImageDemo.d.ts +5 -0
- package/dist/example/OcrkvcDatasetDemo.d.ts +5 -0
- package/dist/example/constant.local.d.ts +6 -0
- package/dist/example/index.d.ts +1 -0
- package/dist/src/Common/Page/index.d.ts +2 -1
- package/dist/src/Common/PageHeader/index.d.ts +1 -0
- package/dist/src/DatasetContext/index.d.ts +4 -3
- package/dist/src/components/CompositionInput/index.d.ts +2 -2
- package/dist/src/components/DataEmpty/index.d.ts +2 -1
- package/dist/src/components/DetectionAnnotation/PreSamplesPage/index.d.ts +2 -1
- package/dist/src/components/DetectionAnnotation/components/DisabledTooltip/index.d.ts +2 -2
- package/dist/src/components/DetectionAnnotation/components/ImageDetail/index.d.ts +2 -1
- package/dist/src/components/DetectionAnnotation/components/LabelMaker/Drawable.d.ts +2 -2
- package/dist/src/components/DetectionAnnotation/components/LabelMaker/RectLabel.d.ts +2 -2
- package/dist/src/components/DetectionAnnotation/components/LabelMaker/index.d.ts +1 -0
- package/dist/src/components/DetectionAnnotation/components/Labels/index.d.ts +1 -0
- package/dist/src/components/DetectionAnnotation/components/TagItem/index.d.ts +2 -1
- package/dist/src/components/DetectionAnnotation/index.d.ts +2 -1
- package/dist/src/components/DetectionImageAnnotation/index.d.ts +2 -0
- package/dist/src/components/Iconfont/index.d.ts +1 -1
- package/dist/src/components/MarkDescriptions/index.d.ts +1 -0
- package/dist/src/components/OCRImageViewer/index.d.ts +2 -1
- package/dist/src/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LabelEditorInput.d.ts +2 -2
- package/dist/src/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LabelEditorItem.d.ts +2 -1
- package/dist/src/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LableEditor.d.ts +1 -0
- package/dist/src/components/OcrAnnotation/MarkKVOCRModal/index.d.ts +1 -0
- package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/ImageDetail/index.d.ts +2 -1
- package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/LabelEditorInput.d.ts +2 -2
- package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/LabelEditorItem.d.ts +1 -0
- package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/LableEditor.d.ts +1 -0
- package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/index.d.ts +1 -0
- package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/index.d.ts +1 -0
- package/dist/src/components/OcrAnnotation/OcrModal/index.d.ts +2 -1
- package/dist/src/components/OcrAnnotation/PreLabelOCR/PreLabelModal.d.ts +2 -1
- package/dist/src/components/OcrAnnotation/PreLabelOCR/index.d.ts +2 -1
- package/dist/src/components/OcrAnnotation/index.d.ts +2 -1
- package/dist/src/components/OcrImageAnnotation/index.d.ts +2 -0
- package/dist/src/components/PageNav/index.d.ts +2 -1
- package/dist/src/components/PicZipImportModal/index.d.ts +2 -1
- package/dist/src/components/PreLabelOCR/PreLabelModal.d.ts +2 -1
- package/dist/src/components/PreLabelOCR/index.d.ts +2 -1
- package/dist/src/components/ScanTable/index.d.ts +2 -1
- package/dist/src/components/Thumbnail/index.d.ts +2 -1
- package/dist/src/components/hooks/useBlocker.d.ts +1 -1
- package/dist/src/featuresConfig.d.ts +1 -1
- package/package.json +15 -22
- package/dist/es/Common/Page/index.mjs +0 -28
- package/dist/es/Common/PageContent/index.mjs +0 -18
- package/dist/es/Common/PageHeader/index.mjs +0 -38
- package/dist/es/DatasetContext/index.mjs +0 -11
- package/dist/es/_virtual/_commonjsHelpers.mjs +0 -6
- package/dist/es/_virtual/index.mjs +0 -4
- package/dist/es/access/images/data_empty.svg.mjs +0 -4
- package/dist/es/components/CompositionInput/index.mjs +0 -53
- package/dist/es/components/DataEmpty/index.mjs +0 -50
- package/dist/es/components/DetectionAnnotation/PreSamplesPage/index.mjs +0 -291
- package/dist/es/components/DetectionAnnotation/components/DisabledTooltip/index.mjs +0 -23
- package/dist/es/components/DetectionAnnotation/components/ImageDetail/index.mjs +0 -165
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/Drawable.mjs +0 -51
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/FabricCustomize.mjs +0 -42
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/RectLabel.mjs +0 -283
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/icons/delete-icon.svg.mjs +0 -4
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/index.mjs +0 -314
- package/dist/es/components/DetectionAnnotation/components/Labels/index.mjs +0 -200
- package/dist/es/components/DetectionAnnotation/components/TagItem/index.mjs +0 -143
- package/dist/es/components/DetectionAnnotation/icon_item_empty.svg.mjs +0 -4
- package/dist/es/components/DetectionAnnotation/index.mjs +0 -712
- package/dist/es/components/DetectionImageAnnotation/index.mjs +0 -61
- package/dist/es/components/Iconfont/index.mjs +0 -16
- package/dist/es/components/MarkDescriptions/index.mjs +0 -65
- package/dist/es/components/OCRImageViewer/index.mjs +0 -212
- package/dist/es/components/OcrAnnotation/MarkKVOCRModal/CategoryDrawer.mjs +0 -136
- package/dist/es/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LabelEditorInput.mjs +0 -57
- package/dist/es/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LabelEditorItem.mjs +0 -72
- package/dist/es/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LableEditor.mjs +0 -54
- package/dist/es/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/index.mjs +0 -366
- package/dist/es/components/OcrAnnotation/MarkKVOCRModal/index.mjs +0 -254
- package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/ImageDetail/index.mjs +0 -100
- package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/images/delete.png.mjs +0 -4
- package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/index.mjs +0 -755
- package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/index.mjs +0 -230
- package/dist/es/components/OcrAnnotation/OcrModal/index.mjs +0 -179
- package/dist/es/components/OcrAnnotation/PreLabelOCR/PreLabelModal.mjs +0 -280
- package/dist/es/components/OcrAnnotation/PreLabelOCR/index.mjs +0 -43
- package/dist/es/components/OcrAnnotation/constant.mjs +0 -5
- package/dist/es/components/OcrAnnotation/index.mjs +0 -381
- package/dist/es/components/OcrImageAnnotation/index.mjs +0 -39
- package/dist/es/components/PageNav/index.mjs +0 -29
- package/dist/es/components/PicZipImportModal/index.mjs +0 -583
- package/dist/es/components/PicZipImportModal/pic_zip.svg.mjs +0 -4
- package/dist/es/components/PicZipImportModal/pic_zip_json.svg.mjs +0 -4
- package/dist/es/components/PreLabelOCR/PreLabelModal.mjs +0 -275
- package/dist/es/components/PreLabelOCR/index.mjs +0 -43
- package/dist/es/components/ScanTable/index.mjs +0 -96
- package/dist/es/components/Thumbnail/default.png.mjs +0 -4
- package/dist/es/components/Thumbnail/index.mjs +0 -30
- package/dist/es/components/hooks/Prompt.mjs +0 -33
- package/dist/es/constant.mjs +0 -13
- package/dist/es/createDatasetAnnotation/index.mjs +0 -133
- package/dist/es/createDetectionDatasetAnnotation/index.mjs +0 -129
- package/dist/es/createDetectionImageAnnotation/index.mjs +0 -31
- package/dist/es/createOcrDatasetAnnotation/index.mjs +0 -129
- package/dist/es/createOcrImageAnnotation/index.mjs +0 -33
- package/dist/es/featuresConfig.mjs +0 -79
- package/dist/es/index.mjs +0 -35
- package/dist/es/node_modules/classnames/index.mjs +0 -42
- package/dist/es/utils/color.mjs +0 -30
- package/dist/es/utils/index.mjs +0 -22
- package/dist/es/utils/sign.mjs +0 -33
- package/dist/lib/index.js +0 -7
- package/dist/src/components/Iconfont/font_3140028_iptomfpgyu.d.ts +0 -0
- package/dist/src/components/Iconfont/font_3454453_gu5ijeufyng.d.ts +0 -0
- package/dist/src/components/Iconfont/font_4108228_3slzqhoow93.d.ts +0 -0
- package/dist/src/components/Iconfont/font_4439177_k3mjwv7kzfd.d.ts +0 -0
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useState as c } from "react";
|
|
3
|
-
import { Button as f, Spin as b } from "antd";
|
|
4
|
-
import p from "./PreLabelModal.mjs";
|
|
5
|
-
import { LoadingOutlined as h } from "@ant-design/icons";
|
|
6
|
-
/* empty css */import { PreLabelTaskStatus as u } from "@glodon-aiot/apis";
|
|
7
|
-
const B = (o) => {
|
|
8
|
-
const {
|
|
9
|
-
datasetId: i,
|
|
10
|
-
versionId: r,
|
|
11
|
-
disabled: l,
|
|
12
|
-
setIsTaskChange: n,
|
|
13
|
-
preLabelTask: t,
|
|
14
|
-
datasetType: d
|
|
15
|
-
} = o, [a, s] = c(!1);
|
|
16
|
-
return /* @__PURE__ */ m("div", {
|
|
17
|
-
className: "batch-btn-panel",
|
|
18
|
-
children: [/* @__PURE__ */ e(f, {
|
|
19
|
-
className: "batch-mark-btn",
|
|
20
|
-
onClick: () => s(!0),
|
|
21
|
-
disabled: l,
|
|
22
|
-
children: "批量预标注"
|
|
23
|
-
}), (t == null ? void 0 : t.state) === u.Started && /* @__PURE__ */ e(b, {
|
|
24
|
-
indicator: /* @__PURE__ */ e(h, {
|
|
25
|
-
style: {
|
|
26
|
-
fontSize: 15,
|
|
27
|
-
marginLeft: 4
|
|
28
|
-
}
|
|
29
|
-
})
|
|
30
|
-
}), a && /* @__PURE__ */ e(p, {
|
|
31
|
-
datasetId: i,
|
|
32
|
-
versionId: r,
|
|
33
|
-
isVisible: a,
|
|
34
|
-
onClose: () => s(!1),
|
|
35
|
-
setIsTaskChange: n,
|
|
36
|
-
record: t,
|
|
37
|
-
datasetType: d
|
|
38
|
-
})]
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
export {
|
|
42
|
-
B as default
|
|
43
|
-
};
|
|
@@ -1,381 +0,0 @@
|
|
|
1
|
-
var xe = Object.defineProperty, ye = Object.defineProperties;
|
|
2
|
-
var Le = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var re = Object.getOwnPropertySymbols;
|
|
4
|
-
var Ve = Object.prototype.hasOwnProperty, Pe = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var oe = (f, n, r) => n in f ? xe(f, n, { enumerable: !0, configurable: !0, writable: !0, value: r }) : f[n] = r, h = (f, n) => {
|
|
6
|
-
for (var r in n || (n = {}))
|
|
7
|
-
Ve.call(n, r) && oe(f, r, n[r]);
|
|
8
|
-
if (re)
|
|
9
|
-
for (var r of re(n))
|
|
10
|
-
Pe.call(n, r) && oe(f, r, n[r]);
|
|
11
|
-
return f;
|
|
12
|
-
}, C = (f, n) => ye(f, Le(n));
|
|
13
|
-
import { jsx as c, jsxs as D } from "react/jsx-runtime";
|
|
14
|
-
import { useState as a, useEffect as m } from "react";
|
|
15
|
-
import { message as $, ConfigProvider as Re, Space as x, Select as Ne, Tabs as Oe, Tooltip as we, Button as ze, Row as Be, Col as Ke, Pagination as Ae } from "antd";
|
|
16
|
-
import Ee from "antd/es/locale/zh_CN";
|
|
17
|
-
/* empty css */import Fe from "./OcrModal/index.mjs";
|
|
18
|
-
import Ue from "./MarkKVOCRModal/index.mjs";
|
|
19
|
-
import Ze from "./MarkOCRBoxModal/index.mjs";
|
|
20
|
-
import $e from "./PreLabelOCR/index.mjs";
|
|
21
|
-
import je from "lodash/merge";
|
|
22
|
-
import { UploadZipsStatus as ie, PreLabelTaskStatus as We } from "@glodon-aiot/apis";
|
|
23
|
-
import _e from "../../Common/Page/index.mjs";
|
|
24
|
-
import He from "../Thumbnail/index.mjs";
|
|
25
|
-
import Je from "../DataEmpty/index.mjs";
|
|
26
|
-
import Qe from "../../DatasetContext/index.mjs";
|
|
27
|
-
import { DEFAULT_FILTER_SWITCH as qe } from "../../constant.mjs";
|
|
28
|
-
import Ge from "../PageNav/index.mjs";
|
|
29
|
-
const gt = (f) => {
|
|
30
|
-
const {
|
|
31
|
-
services: n,
|
|
32
|
-
datasetId: r,
|
|
33
|
-
versionId: S,
|
|
34
|
-
backTo: ne,
|
|
35
|
-
labelManager: ce = !1,
|
|
36
|
-
datasetManager: T = !1,
|
|
37
|
-
annotation: le,
|
|
38
|
-
header: d = {
|
|
39
|
-
versionSelect: !1
|
|
40
|
-
},
|
|
41
|
-
exampleSrcRoot: ae
|
|
42
|
-
} = f, [i, R] = a(), [t, I] = a(), [y, j] = a([]), [W, L] = a(!1), [N, O] = a(!1), [g, _] = a(0), [u, H] = a(), [w, b] = a(), [se, J] = a(), [Q, M] = a(-1), [l, k] = a({
|
|
43
|
-
current: 1,
|
|
44
|
-
pageSize: 50
|
|
45
|
-
}), [V, q] = a(0), [v, de] = a(""), [G, z] = a(!1), [X, Y] = a(), [B, ee] = a(!1), [P, K] = a(null), [ue, te] = a(!1), [fe, pe] = a(!1), [A, me] = a(""), [he, ge] = a(), E = h({}, qe);
|
|
46
|
-
je(E, f.filterSwitch);
|
|
47
|
-
const be = () => {
|
|
48
|
-
J(void 0), z(!0);
|
|
49
|
-
}, ke = (e, o) => {
|
|
50
|
-
k({
|
|
51
|
-
current: e,
|
|
52
|
-
pageSize: o
|
|
53
|
-
});
|
|
54
|
-
}, Ce = (e) => {
|
|
55
|
-
if (!u)
|
|
56
|
-
return;
|
|
57
|
-
M(e);
|
|
58
|
-
const o = u[e];
|
|
59
|
-
b(o), O(!0);
|
|
60
|
-
};
|
|
61
|
-
m(() => {
|
|
62
|
-
n.cvforceDatahub && n.cvforceDatahub.getOptionsImgproxy().then((e) => ge(e));
|
|
63
|
-
}, [n.cvforceDatahub]), m(() => {
|
|
64
|
-
!r || t || (L(!0), Promise.all([
|
|
65
|
-
// 数据集
|
|
66
|
-
n.cvforceDatahub.getDatasetsId(r).then((e) => {
|
|
67
|
-
R(e);
|
|
68
|
-
}),
|
|
69
|
-
// 版本列表
|
|
70
|
-
n.cvforceDatahub.getDatasetsIdVersions(r, 1, 1e3).then((e) => {
|
|
71
|
-
j(e.recordList), I(S ? e.recordList.find((o) => o.id === S) : e.recordList[0]);
|
|
72
|
-
})
|
|
73
|
-
]).finally(() => L(!1)));
|
|
74
|
-
}, [r, t == null ? void 0 : t.id]), m(() => {
|
|
75
|
-
r && (L(!0), Promise.all([
|
|
76
|
-
// 数据集
|
|
77
|
-
n.cvforceDatahub.getDatasetsId(r).then((e) => {
|
|
78
|
-
R(e);
|
|
79
|
-
}),
|
|
80
|
-
// 版本列表
|
|
81
|
-
n.cvforceDatahub.getDatasetsIdVersions(r, 1, 1e3).then((e) => {
|
|
82
|
-
j(e.recordList), I(S ? e.recordList.find((o) => o.id === S) : e.recordList[0]);
|
|
83
|
-
})
|
|
84
|
-
]).finally(() => L(!1)));
|
|
85
|
-
}, [r, S]), m(() => {
|
|
86
|
-
r && n.cvforceDatahub.getDatasetsId(r).then((e) => {
|
|
87
|
-
R(e);
|
|
88
|
-
});
|
|
89
|
-
}, []);
|
|
90
|
-
const Se = () => {
|
|
91
|
-
!r || !t || n.cvforceDatahub.getDatasetsIdVersionsVid(r, t.id).then((e) => {
|
|
92
|
-
me(e.versionAsyncTask.state);
|
|
93
|
-
});
|
|
94
|
-
};
|
|
95
|
-
m(() => {
|
|
96
|
-
Se();
|
|
97
|
-
}, [r, t == null ? void 0 : t.id]), m(() => {
|
|
98
|
-
A !== ie.Pending && A !== ie.Started || $.warning("文件导入中,请刷新页面再试");
|
|
99
|
-
}, [A]);
|
|
100
|
-
const Te = () => {
|
|
101
|
-
!r || !t || n.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(r, t.id).then((e) => {
|
|
102
|
-
const o = e.find((p) => p.id === "allcodeid"), s = e.find((p) => p.id === "nocodeid");
|
|
103
|
-
_(o ? o.count : 0), q(s ? s.count : 0);
|
|
104
|
-
});
|
|
105
|
-
}, F = () => {
|
|
106
|
-
const e = l.current || 1, o = l.pageSize || 50;
|
|
107
|
-
!r || !t || (n.cvforceDatahub.getDatasetsIdVersionsVidSamples(r, t.id, {
|
|
108
|
-
labels: v || void 0,
|
|
109
|
-
pageNo: e,
|
|
110
|
-
pageSize: o
|
|
111
|
-
}).then((s) => {
|
|
112
|
-
const p = s.recordList || [];
|
|
113
|
-
if (!p.length && s.totalResults > 0) {
|
|
114
|
-
k(C(h({}, l), {
|
|
115
|
-
current: Math.ceil(s.totalResults / o)
|
|
116
|
-
})), Math.ceil(s.totalResults / o) === e && H([]);
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
if (H(p), k(C(h({}, l), {
|
|
120
|
-
total: s.totalResults
|
|
121
|
-
})), l.type === "next" && p.length) {
|
|
122
|
-
M(0);
|
|
123
|
-
const Z = s.recordList[0];
|
|
124
|
-
b(Z);
|
|
125
|
-
}
|
|
126
|
-
if (l.type === "prev" && p.length) {
|
|
127
|
-
M(l.pageSize - 1);
|
|
128
|
-
const Z = s.recordList[l.pageSize - 1];
|
|
129
|
-
b(Z);
|
|
130
|
-
}
|
|
131
|
-
}), Te());
|
|
132
|
-
};
|
|
133
|
-
m(F, [l.current, l.pageSize, v, X, t == null ? void 0 : t.id, r]);
|
|
134
|
-
const Ie = () => {
|
|
135
|
-
if (!u)
|
|
136
|
-
return;
|
|
137
|
-
const e = Q + 1;
|
|
138
|
-
if (e >= u.length) {
|
|
139
|
-
let o = g;
|
|
140
|
-
v === "hascode" && (o = g - V), v === "nocode" && (o = V), (l.current - 1) * l.pageSize + e >= o ? $.error("已经是最后一个了") : k({
|
|
141
|
-
current: l.current + 1,
|
|
142
|
-
pageSize: l.pageSize,
|
|
143
|
-
type: "next"
|
|
144
|
-
});
|
|
145
|
-
} else {
|
|
146
|
-
M(e);
|
|
147
|
-
const o = u[e];
|
|
148
|
-
b(o);
|
|
149
|
-
}
|
|
150
|
-
}, Me = () => {
|
|
151
|
-
if (!u)
|
|
152
|
-
return;
|
|
153
|
-
const e = Q - 1;
|
|
154
|
-
if (e < 0)
|
|
155
|
-
(l.current - 1) * l.pageSize + e < 0 ? $.error("已经是第一个了") : k({
|
|
156
|
-
current: l.current - 1,
|
|
157
|
-
pageSize: l.pageSize,
|
|
158
|
-
type: "prev"
|
|
159
|
-
});
|
|
160
|
-
else {
|
|
161
|
-
M(e);
|
|
162
|
-
const o = u[e];
|
|
163
|
-
b(o);
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
m(() => {
|
|
167
|
-
if (!r) {
|
|
168
|
-
P && (clearTimeout(P), K(null)), Y(void 0);
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
|
-
U();
|
|
172
|
-
}, [t == null ? void 0 : t.id]), m(() => {
|
|
173
|
-
U();
|
|
174
|
-
}, [fe]);
|
|
175
|
-
const U = () => {
|
|
176
|
-
!r || !t || n.cvforceDatahub.getPreLabelTask(r, t.id).then((e) => {
|
|
177
|
-
const o = e[0];
|
|
178
|
-
if (Y(o), P && (clearTimeout(P), K(null)), !(o != null && o.state) || o.state !== We.Started) {
|
|
179
|
-
ee(!1);
|
|
180
|
-
return;
|
|
181
|
-
} else
|
|
182
|
-
ee(!0);
|
|
183
|
-
K(setTimeout(() => {
|
|
184
|
-
U();
|
|
185
|
-
}, 1e4));
|
|
186
|
-
});
|
|
187
|
-
}, ve = [{
|
|
188
|
-
key: "",
|
|
189
|
-
label: `全部(${g})`,
|
|
190
|
-
children: null
|
|
191
|
-
}, {
|
|
192
|
-
key: "nocode",
|
|
193
|
-
label: `未标注(${V})`,
|
|
194
|
-
children: null
|
|
195
|
-
}, {
|
|
196
|
-
key: "hascode",
|
|
197
|
-
label: `已标注(${g - V})`,
|
|
198
|
-
children: null
|
|
199
|
-
}];
|
|
200
|
-
m(() => {
|
|
201
|
-
N || b(void 0);
|
|
202
|
-
}, [N]), m(() => {
|
|
203
|
-
i && (i.markType !== "ocr" || (i == null ? void 0 : i.ocrMarkTmpl) !== "DetectionOCR") && console.error(`当前数据集不是DetectionOCR(ocr检测)类型,请检查数据集类型。
|
|
204
|
-
请检查markType是否为ocr并且ocrMarkTmpl为DetectionOCR。`);
|
|
205
|
-
}, [i]);
|
|
206
|
-
const De = (i == null ? void 0 : i.ocrMarkTmpl) === "StructKVCOCR" ? Ue : Ze;
|
|
207
|
-
return /* @__PURE__ */ c(Re, {
|
|
208
|
-
locale: Ee,
|
|
209
|
-
children: /* @__PURE__ */ c(Qe.Provider, {
|
|
210
|
-
value: {
|
|
211
|
-
datasetId: r,
|
|
212
|
-
versionId: (t == null ? void 0 : t.id) || "",
|
|
213
|
-
no: (t == null ? void 0 : t.no) || "",
|
|
214
|
-
loading: W,
|
|
215
|
-
version: t,
|
|
216
|
-
versions: y,
|
|
217
|
-
samples: u,
|
|
218
|
-
pagination: l,
|
|
219
|
-
services: n,
|
|
220
|
-
featuresConfig: {
|
|
221
|
-
labelManager: ce,
|
|
222
|
-
datasetManager: T,
|
|
223
|
-
annotation: le,
|
|
224
|
-
filterSwitch: E,
|
|
225
|
-
header: d,
|
|
226
|
-
exampleSrcRoot: ae
|
|
227
|
-
}
|
|
228
|
-
},
|
|
229
|
-
children: i ? i.markType === "ocr" ? /* @__PURE__ */ D("div", {
|
|
230
|
-
className: "ocr-version-detail",
|
|
231
|
-
children: [/* @__PURE__ */ D(_e, {
|
|
232
|
-
className: "product-details-page",
|
|
233
|
-
header: d === !1 ? void 0 : /* @__PURE__ */ c(Ge, {
|
|
234
|
-
backTo: ne,
|
|
235
|
-
onBackClick: d != null && d.onBackClick ? () => {
|
|
236
|
-
d.onBackClick && d.onBackClick();
|
|
237
|
-
} : void 0,
|
|
238
|
-
left: !W && /* @__PURE__ */ D(x, {
|
|
239
|
-
children: [/* @__PURE__ */ c("span", {
|
|
240
|
-
style: {
|
|
241
|
-
fontWeight: "bold"
|
|
242
|
-
},
|
|
243
|
-
children: i == null ? void 0 : i.name
|
|
244
|
-
}), /* @__PURE__ */ c(Ne, {
|
|
245
|
-
disabled: (d == null ? void 0 : d.versionSelect) === !1,
|
|
246
|
-
value: t == null ? void 0 : t.id,
|
|
247
|
-
style: {
|
|
248
|
-
width: 70
|
|
249
|
-
},
|
|
250
|
-
options: y.map((e) => ({
|
|
251
|
-
label: e.no,
|
|
252
|
-
value: e.id
|
|
253
|
-
})),
|
|
254
|
-
onChange: (e) => {
|
|
255
|
-
const o = y.find((p) => p.id === e);
|
|
256
|
-
if (!i || !o)
|
|
257
|
-
return;
|
|
258
|
-
const s = y.find((p) => p.id === o.id);
|
|
259
|
-
I(s), d != null && d.onVersionChange && d.onVersionChange(s);
|
|
260
|
-
}
|
|
261
|
-
})]
|
|
262
|
-
}),
|
|
263
|
-
right: /* @__PURE__ */ c(x, {
|
|
264
|
-
children: !w && T && T.preLabel && (t != null && t.id) ? /* @__PURE__ */ c($e, {
|
|
265
|
-
datasetId: r,
|
|
266
|
-
versionId: t.id,
|
|
267
|
-
disabled: !g || (i == null ? void 0 : i.ocrMarkTmpl) !== "DetectionOCR",
|
|
268
|
-
setIsTaskChange: pe,
|
|
269
|
-
preLabelTask: X,
|
|
270
|
-
datasetType: "ocr"
|
|
271
|
-
}) : null
|
|
272
|
-
})
|
|
273
|
-
}),
|
|
274
|
-
children: [/* @__PURE__ */ D("div", {
|
|
275
|
-
className: "ocr-header",
|
|
276
|
-
children: [/* @__PURE__ */ c(x, {
|
|
277
|
-
children: E.tabs && /* @__PURE__ */ c(Oe, {
|
|
278
|
-
className: "header-tab",
|
|
279
|
-
defaultActiveKey: "",
|
|
280
|
-
onChange: (e) => {
|
|
281
|
-
k(C(h({}, l), {
|
|
282
|
-
current: 1,
|
|
283
|
-
total: 0
|
|
284
|
-
})), de(e);
|
|
285
|
-
},
|
|
286
|
-
items: ve
|
|
287
|
-
})
|
|
288
|
-
}), /* @__PURE__ */ c(x, {
|
|
289
|
-
children: T && T.label && /* @__PURE__ */ c(we, {
|
|
290
|
-
title: "预标注进行中,请任务完成后再试",
|
|
291
|
-
open: ue,
|
|
292
|
-
children: /* @__PURE__ */ c(ze, {
|
|
293
|
-
type: "primary",
|
|
294
|
-
disabled: !g || (i == null ? void 0 : i.ocrMarkTmpl) !== "StructKVCOCR" && (i == null ? void 0 : i.ocrMarkTmpl) !== "DetectionOCR" || B,
|
|
295
|
-
onClick: be,
|
|
296
|
-
onMouseEnter: () => B && te(!0),
|
|
297
|
-
onMouseLeave: () => te(!1),
|
|
298
|
-
style: {
|
|
299
|
-
marginRight: "10px"
|
|
300
|
-
},
|
|
301
|
-
children: "单张标注"
|
|
302
|
-
})
|
|
303
|
-
})
|
|
304
|
-
})]
|
|
305
|
-
}), /* @__PURE__ */ c("div", {
|
|
306
|
-
className: "d-row",
|
|
307
|
-
children: u != null && u.length ? /* @__PURE__ */ D(x, {
|
|
308
|
-
direction: "vertical",
|
|
309
|
-
className: "d-right",
|
|
310
|
-
children: [/* @__PURE__ */ c(Be, {
|
|
311
|
-
gutter: [16, 16],
|
|
312
|
-
wrap: !0,
|
|
313
|
-
className: "d-right-row",
|
|
314
|
-
children: u == null ? void 0 : u.map((e, o) => /* @__PURE__ */ c(Ke, {
|
|
315
|
-
className: "d-right-col",
|
|
316
|
-
onClick: () => Ce(o),
|
|
317
|
-
children: /* @__PURE__ */ c("div", {
|
|
318
|
-
className: "right-col-wrapper",
|
|
319
|
-
children: /* @__PURE__ */ c("div", {
|
|
320
|
-
className: "right-col-img",
|
|
321
|
-
children: /* @__PURE__ */ c(He, {
|
|
322
|
-
fileKey: e.fileKey,
|
|
323
|
-
width: 124,
|
|
324
|
-
imgProxy: he
|
|
325
|
-
})
|
|
326
|
-
})
|
|
327
|
-
})
|
|
328
|
-
}, e.id))
|
|
329
|
-
}), /* @__PURE__ */ c(Ae, h({
|
|
330
|
-
onChange: ke,
|
|
331
|
-
className: "d-right-pageination",
|
|
332
|
-
showQuickJumper: !0,
|
|
333
|
-
showSizeChanger: !0
|
|
334
|
-
}, l))]
|
|
335
|
-
}) : /* @__PURE__ */ c(Je, {})
|
|
336
|
-
})]
|
|
337
|
-
}), w && /* @__PURE__ */ c(Fe, {
|
|
338
|
-
isOcrModalVisible: N,
|
|
339
|
-
setIsOcrModalVisible: O,
|
|
340
|
-
record: w,
|
|
341
|
-
onNextClick: () => Ie(),
|
|
342
|
-
onPrevClick: () => Me(),
|
|
343
|
-
ocrMarkTmpl: i == null ? void 0 : i.ocrMarkTmpl,
|
|
344
|
-
datasetId: r,
|
|
345
|
-
versionId: t == null ? void 0 : t.id,
|
|
346
|
-
handleMarkClick: (e) => {
|
|
347
|
-
J(e), O(!1), z(!0);
|
|
348
|
-
},
|
|
349
|
-
updateSampleList: F,
|
|
350
|
-
isPreLabel: B
|
|
351
|
-
}), G && (t == null ? void 0 : t.id) && /* @__PURE__ */ c(De, {
|
|
352
|
-
visible: G,
|
|
353
|
-
selectSampleId: se,
|
|
354
|
-
ocrMarkTmpl: i == null ? void 0 : i.ocrMarkTmpl,
|
|
355
|
-
datasetId: r,
|
|
356
|
-
versionId: t.id,
|
|
357
|
-
onClose: () => z(!1),
|
|
358
|
-
onSave: (e) => {
|
|
359
|
-
var o;
|
|
360
|
-
if (!r || !t)
|
|
361
|
-
throw "datasetId or version is not exist.";
|
|
362
|
-
return n.cvforceDatahub.updateSamples(r, t.id, [C(h({}, e), {
|
|
363
|
-
labels: (o = e.labels) == null ? void 0 : o.map((s) => C(h({}, s), {
|
|
364
|
-
box: s.box.length > 4 ? s.box.splice(0, 4) : s.box
|
|
365
|
-
}))
|
|
366
|
-
})]).then(() => (F(), !0));
|
|
367
|
-
}
|
|
368
|
-
})]
|
|
369
|
-
}) : /* @__PURE__ */ c("div", {
|
|
370
|
-
style: {
|
|
371
|
-
color: "red",
|
|
372
|
-
textAlign: "center"
|
|
373
|
-
},
|
|
374
|
-
children: "当前数据集不是ocr(ocr检测)类型,请检查数据集类型。"
|
|
375
|
-
}) : null
|
|
376
|
-
})
|
|
377
|
-
});
|
|
378
|
-
};
|
|
379
|
-
export {
|
|
380
|
-
gt as default
|
|
381
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as b, useState as h, useEffect as v } from "react";
|
|
3
|
-
/* empty css */import g from "../OcrAnnotation/MarkOCRBoxModal/ImageDetail/index.mjs";
|
|
4
|
-
const S = (l) => {
|
|
5
|
-
const {
|
|
6
|
-
value: e,
|
|
7
|
-
onChange: n,
|
|
8
|
-
readonly: o,
|
|
9
|
-
onNextClick: s,
|
|
10
|
-
onPrevClick: c,
|
|
11
|
-
showLabelList: C,
|
|
12
|
-
categories: d,
|
|
13
|
-
renderLabelItem: m
|
|
14
|
-
} = l, u = b(null), [r, f] = h();
|
|
15
|
-
return v(() => {
|
|
16
|
-
e && f(e);
|
|
17
|
-
}, [e]), /* @__PURE__ */ i("div", {
|
|
18
|
-
className: "ocr-version-detail",
|
|
19
|
-
children: /* @__PURE__ */ i("div", {
|
|
20
|
-
className: "d-right",
|
|
21
|
-
ref: u,
|
|
22
|
-
children: r && /* @__PURE__ */ i(g, {
|
|
23
|
-
readonly: o,
|
|
24
|
-
currentSample: r,
|
|
25
|
-
onChange: n,
|
|
26
|
-
onNextClick: s,
|
|
27
|
-
onPrevClick: c,
|
|
28
|
-
categories: d || Object.values(r.labels.reduce((t, a) => (t.find((p) => p.id === a.id) || t.push({
|
|
29
|
-
id: a.id,
|
|
30
|
-
name: a.label
|
|
31
|
-
}), t), [])),
|
|
32
|
-
renderLabelItem: m
|
|
33
|
-
})
|
|
34
|
-
})
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
export {
|
|
38
|
-
S as default
|
|
39
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { jsxs as e, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { Space as r } from "antd";
|
|
3
|
-
/* empty css */import s from "../Iconfont/index.mjs";
|
|
4
|
-
const d = (c) => {
|
|
5
|
-
const {
|
|
6
|
-
left: n,
|
|
7
|
-
right: o,
|
|
8
|
-
onBackClick: a
|
|
9
|
-
} = c;
|
|
10
|
-
return /* @__PURE__ */ e("div", {
|
|
11
|
-
className: "page-nav",
|
|
12
|
-
children: [/* @__PURE__ */ e(r, {
|
|
13
|
-
size: 12,
|
|
14
|
-
children: [a && /* @__PURE__ */ e(r, {
|
|
15
|
-
size: 4,
|
|
16
|
-
className: "header-back",
|
|
17
|
-
onClick: a,
|
|
18
|
-
children: [/* @__PURE__ */ i(s, {
|
|
19
|
-
type: "icon-fanhui1"
|
|
20
|
-
}), /* @__PURE__ */ i("span", {
|
|
21
|
-
children: "返回"
|
|
22
|
-
})]
|
|
23
|
-
}), n]
|
|
24
|
-
}), o]
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
export {
|
|
28
|
-
d as default
|
|
29
|
-
};
|