@glodon-aiot/dataset-annotation 3.10.0-alpha.25 → 3.10.0-alpha.26
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 +123598 -0
- package/dist/dataset-annotation.umd.cjs +1017 -0
- package/dist/es/components/VLMAnnotationDetail/VlmModal/index.mjs +79 -72
- package/dist/es/components/VLMAnnotationDetail/index.mjs +138 -137
- package/dist/es/index.mjs +1 -1
- 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/lib/index.js +3 -3
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/ImageDetail/index.d.ts +16 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LabelEditorInput.d.ts +12 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LabelEditorItem.d.ts +21 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LableEditor.d.ts +16 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/index.d.ts +19 -0
- package/dist/src/components/VLMAnnotationDetail/VlmModal/index.d.ts +1 -0
- package/dist/src/utils/reactCompatibility.d.ts +5 -0
- package/package.json +2 -2
|
@@ -1,136 +1,143 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var N = (p, i, l) => new Promise((o, r) => {
|
|
2
|
+
var u = (e) => {
|
|
3
3
|
try {
|
|
4
|
-
s(l.next(
|
|
4
|
+
s(l.next(e));
|
|
5
5
|
} catch (d) {
|
|
6
6
|
r(d);
|
|
7
7
|
}
|
|
8
|
-
},
|
|
8
|
+
}, h = (e) => {
|
|
9
9
|
try {
|
|
10
|
-
s(l.throw(
|
|
10
|
+
s(l.throw(e));
|
|
11
11
|
} catch (d) {
|
|
12
12
|
r(d);
|
|
13
13
|
}
|
|
14
|
-
}, s = (
|
|
15
|
-
s((l = l.apply(
|
|
14
|
+
}, s = (e) => e.done ? o(e.value) : Promise.resolve(e.value).then(u, h);
|
|
15
|
+
s((l = l.apply(p, i)).next());
|
|
16
16
|
});
|
|
17
|
-
import { jsxs as
|
|
18
|
-
import { useRef as
|
|
19
|
-
import { Modal as
|
|
17
|
+
import { jsxs as C, jsx as t } from "react/jsx-runtime";
|
|
18
|
+
import { useRef as x, useState as m, useContext as D, useEffect as A } from "react";
|
|
19
|
+
import { Modal as M, Button as f, Space as B, message as V } from "antd";
|
|
20
20
|
import "./style.less.mjs";
|
|
21
|
-
import { useKeyPress as
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
const
|
|
21
|
+
import { useKeyPress as I } from "ahooks";
|
|
22
|
+
import E from "../../../DatasetContext/index.mjs";
|
|
23
|
+
import K from "../../VLMAnnotation/index.mjs";
|
|
24
|
+
import S from "../../Iconfont/index.mjs";
|
|
25
|
+
const X = (p) => {
|
|
26
26
|
const {
|
|
27
|
-
isVlmModalVisible:
|
|
27
|
+
isVlmModalVisible: i,
|
|
28
28
|
setIsVlmModalVisible: l,
|
|
29
|
-
record:
|
|
29
|
+
record: o,
|
|
30
30
|
onNextClick: r,
|
|
31
|
-
onPrevClick:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
31
|
+
onPrevClick: u,
|
|
32
|
+
listLoading: h = !1,
|
|
33
|
+
datasetId: s,
|
|
34
|
+
versionId: e,
|
|
35
|
+
ocrMarkTmpl: d,
|
|
36
|
+
handleMarkClick: w,
|
|
37
|
+
updateSampleList: L
|
|
38
|
+
} = p;
|
|
39
|
+
x(null);
|
|
40
|
+
const j = x({});
|
|
41
|
+
m("annotation");
|
|
42
|
+
const [a, R] = m();
|
|
43
|
+
m();
|
|
44
|
+
const [b, g] = m(!1), {
|
|
44
45
|
services: {
|
|
45
46
|
cvforceDatahub: n
|
|
46
47
|
},
|
|
47
48
|
featuresConfig: {
|
|
48
|
-
datasetManager:
|
|
49
|
+
datasetManager: k
|
|
49
50
|
} = {
|
|
50
51
|
datasetManager: !1
|
|
51
52
|
}
|
|
52
|
-
} =
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
},
|
|
62
|
-
|
|
53
|
+
} = D(E), c = !(b || h), v = () => {
|
|
54
|
+
c && u();
|
|
55
|
+
}, y = () => {
|
|
56
|
+
c && r();
|
|
57
|
+
};
|
|
58
|
+
I("rightarrow", () => {
|
|
59
|
+
y();
|
|
60
|
+
}), I("leftarrow", () => {
|
|
61
|
+
v();
|
|
62
|
+
}), A(() => {
|
|
63
|
+
i && s && e && (g(!0), n == null || n.getDatasetsIdVersionsVidSsamplesSid(s, e, o.id).then((z) => {
|
|
64
|
+
R(z);
|
|
65
|
+
}).finally(() => g(!1)));
|
|
66
|
+
}, [i, o]);
|
|
67
|
+
const O = () => {
|
|
63
68
|
l(!1);
|
|
64
|
-
},
|
|
65
|
-
|
|
69
|
+
}, P = () => {
|
|
70
|
+
M.confirm({
|
|
66
71
|
title: "确认要删除此数据吗?",
|
|
67
72
|
content: "删除后不可恢复,请慎重操作",
|
|
68
73
|
onOk: () => {
|
|
69
|
-
!
|
|
70
|
-
|
|
71
|
-
}).catch(() =>
|
|
74
|
+
!s || !e || !(a != null && a.id) || n == null || n.delDatasetsIdVersionsVidSamplesId(s, e, a.id).then(() => {
|
|
75
|
+
V.success("删除成功"), l(!1), L();
|
|
76
|
+
}).catch(() => V.error("删除失败"));
|
|
72
77
|
}
|
|
73
78
|
});
|
|
74
79
|
};
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
-
title: /* @__PURE__ */
|
|
80
|
+
return /* @__PURE__ */ C(M, {
|
|
81
|
+
title: /* @__PURE__ */ t("div", {
|
|
77
82
|
className: "vlm-sample-detail-title",
|
|
78
|
-
children: /* @__PURE__ */
|
|
83
|
+
children: /* @__PURE__ */ t("span", {
|
|
79
84
|
children: "详情"
|
|
80
85
|
})
|
|
81
86
|
}),
|
|
82
87
|
width: "100%",
|
|
83
88
|
wrapClassName: "vlm-modal-wrap",
|
|
84
89
|
className: "vlm-modal",
|
|
85
|
-
open:
|
|
90
|
+
open: i,
|
|
86
91
|
destroyOnClose: !0,
|
|
87
|
-
onCancel: () =>
|
|
92
|
+
onCancel: () => O(),
|
|
88
93
|
maskClosable: !1,
|
|
89
94
|
centered: !0,
|
|
90
95
|
footer: null,
|
|
91
|
-
children: [/* @__PURE__ */
|
|
96
|
+
children: [/* @__PURE__ */ t("div", {
|
|
92
97
|
className: "vlm-detail",
|
|
93
|
-
children: /* @__PURE__ */
|
|
98
|
+
children: /* @__PURE__ */ C("div", {
|
|
94
99
|
className: "detail-content",
|
|
95
|
-
children: [/* @__PURE__ */
|
|
100
|
+
children: [/* @__PURE__ */ t(f, {
|
|
96
101
|
className: "select-prev",
|
|
97
|
-
icon: /* @__PURE__ */
|
|
102
|
+
icon: /* @__PURE__ */ t(S, {
|
|
98
103
|
type: "icon-zuojiantou"
|
|
99
104
|
}),
|
|
100
105
|
type: "text",
|
|
101
|
-
|
|
102
|
-
|
|
106
|
+
disabled: !c,
|
|
107
|
+
onClick: () => v()
|
|
108
|
+
}), /* @__PURE__ */ t("div", {
|
|
103
109
|
className: "select-main",
|
|
104
|
-
ref:
|
|
105
|
-
children:
|
|
106
|
-
sample:
|
|
110
|
+
ref: j,
|
|
111
|
+
children: a && /* @__PURE__ */ t(K, {
|
|
112
|
+
sample: a,
|
|
107
113
|
labelDefinitions: [],
|
|
108
114
|
hideRightSide: !0,
|
|
109
115
|
readOnly: !0,
|
|
110
|
-
ocrRecognize: () =>
|
|
116
|
+
ocrRecognize: () => N(void 0, null, function* () {
|
|
111
117
|
return [];
|
|
112
118
|
})
|
|
113
119
|
})
|
|
114
|
-
}), /* @__PURE__ */
|
|
120
|
+
}), /* @__PURE__ */ t(f, {
|
|
115
121
|
className: "select-next",
|
|
116
|
-
icon: /* @__PURE__ */
|
|
122
|
+
icon: /* @__PURE__ */ t(S, {
|
|
117
123
|
type: "icon-youjiantou"
|
|
118
124
|
}),
|
|
119
125
|
type: "text",
|
|
120
|
-
|
|
126
|
+
disabled: !c,
|
|
127
|
+
onClick: () => y()
|
|
121
128
|
})]
|
|
122
129
|
})
|
|
123
|
-
}), /* @__PURE__ */
|
|
130
|
+
}), /* @__PURE__ */ t("div", {
|
|
124
131
|
className: "vlm-mark-action",
|
|
125
|
-
children: /* @__PURE__ */
|
|
126
|
-
children: [/* @__PURE__ */
|
|
132
|
+
children: /* @__PURE__ */ C(B, {
|
|
133
|
+
children: [/* @__PURE__ */ t(f, {
|
|
127
134
|
type: "primary",
|
|
128
|
-
onClick: () =>
|
|
135
|
+
onClick: () => w(a == null ? void 0 : a.id),
|
|
129
136
|
children: "标注"
|
|
130
|
-
}),
|
|
137
|
+
}), k && k.delete && /* @__PURE__ */ t(f, {
|
|
131
138
|
danger: !0,
|
|
132
139
|
type: "ghost",
|
|
133
|
-
onClick:
|
|
140
|
+
onClick: P,
|
|
134
141
|
children: "删除数据"
|
|
135
142
|
})]
|
|
136
143
|
})
|
|
@@ -138,5 +145,5 @@ const G = (f) => {
|
|
|
138
145
|
});
|
|
139
146
|
};
|
|
140
147
|
export {
|
|
141
|
-
|
|
148
|
+
X as default
|
|
142
149
|
};
|