@glodon-aiot/dataset-annotation 3.18.1-alpha.16 → 3.19.0-alpha.17
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.
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as n, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { useState as K } from "react";
|
|
3
|
-
import { Modal as
|
|
3
|
+
import { Modal as u, Tabs as O, Space as V, Button as s, Tooltip as x } from "antd";
|
|
4
4
|
import { useKeyPress as I } from "ahooks";
|
|
5
5
|
import B from "../ImageDetail/index.mjs";
|
|
6
6
|
import "./style.less.mjs";
|
|
7
7
|
import F from "../../../DataEmpty/index.mjs";
|
|
8
|
-
import { ISampleActionType as
|
|
8
|
+
import { ISampleActionType as c } from "../../index.mjs";
|
|
9
9
|
const W = (L) => {
|
|
10
10
|
const {
|
|
11
11
|
datasetId: N,
|
|
12
|
-
setIsImageDetailVisible:
|
|
13
|
-
isImageDetailVisible:
|
|
12
|
+
setIsImageDetailVisible: m,
|
|
13
|
+
isImageDetailVisible: f = !0,
|
|
14
14
|
currentSample: e,
|
|
15
|
-
onNextClick:
|
|
16
|
-
onPrevClick:
|
|
17
|
-
onSave:
|
|
18
|
-
onDeleteSample:
|
|
19
|
-
labels:
|
|
20
|
-
onRefresh:
|
|
15
|
+
onNextClick: o,
|
|
16
|
+
onPrevClick: l,
|
|
17
|
+
onSave: a,
|
|
18
|
+
onDeleteSample: h,
|
|
19
|
+
labels: w = [],
|
|
20
|
+
onRefresh: v,
|
|
21
21
|
onChange: D,
|
|
22
22
|
isPreLabel: r,
|
|
23
23
|
settingHide: k,
|
|
24
24
|
imgCount: H,
|
|
25
25
|
showLabelList: M = !0,
|
|
26
26
|
renderLabelItem: E,
|
|
27
|
-
onEnterEdit:
|
|
28
|
-
filterItems:
|
|
27
|
+
onEnterEdit: p,
|
|
28
|
+
filterItems: b,
|
|
29
29
|
filterMode: T,
|
|
30
|
-
onFilterChange:
|
|
30
|
+
onFilterChange: g,
|
|
31
31
|
previewMode: t = !0,
|
|
32
|
-
canLabel:
|
|
33
|
-
canDelete:
|
|
34
|
-
} = L, [
|
|
32
|
+
canLabel: d = !1,
|
|
33
|
+
canDelete: y = !1
|
|
34
|
+
} = L, [C, j] = K(!1);
|
|
35
35
|
return I("rightarrow", () => {
|
|
36
|
-
t || a && a(e == null ? void 0 : e.confirmStatus);
|
|
37
|
-
}), I("leftarrow", () => {
|
|
38
36
|
t || o && o(e == null ? void 0 : e.confirmStatus);
|
|
39
|
-
}),
|
|
37
|
+
}), I("leftarrow", () => {
|
|
38
|
+
t || l && l(e == null ? void 0 : e.confirmStatus);
|
|
39
|
+
}), /* @__PURE__ */ n(u, {
|
|
40
40
|
title: /* @__PURE__ */ i("div", {
|
|
41
41
|
className: "detection-sample-detail-title",
|
|
42
42
|
children: /* @__PURE__ */ i("span", {
|
|
@@ -44,8 +44,8 @@ const W = (L) => {
|
|
|
44
44
|
})
|
|
45
45
|
}),
|
|
46
46
|
width: "100%",
|
|
47
|
-
open:
|
|
48
|
-
onCancel: () =>
|
|
47
|
+
open: f,
|
|
48
|
+
onCancel: () => m(!1),
|
|
49
49
|
footer: null,
|
|
50
50
|
centered: !0,
|
|
51
51
|
wrapClassName: "detection-modal-wrap",
|
|
@@ -56,61 +56,61 @@ const W = (L) => {
|
|
|
56
56
|
destroyOnClose: !1,
|
|
57
57
|
children: [/* @__PURE__ */ i("div", {
|
|
58
58
|
className: "detail-tabs",
|
|
59
|
-
children: !t &&
|
|
59
|
+
children: !t && b && /* @__PURE__ */ i(O, {
|
|
60
60
|
activeKey: T,
|
|
61
|
-
items:
|
|
62
|
-
onChange: (A) =>
|
|
61
|
+
items: b,
|
|
62
|
+
onChange: (A) => g && g(A)
|
|
63
63
|
})
|
|
64
64
|
}), e ? /* @__PURE__ */ i(B, {
|
|
65
65
|
datasetId: N,
|
|
66
|
-
isImageDetailVisible:
|
|
67
|
-
setIsImageDetailVisible:
|
|
66
|
+
isImageDetailVisible: f,
|
|
67
|
+
setIsImageDetailVisible: m,
|
|
68
68
|
currentSample: e,
|
|
69
|
-
onNextClick: t ? () =>
|
|
70
|
-
onPrevClick: t ? () =>
|
|
71
|
-
labels:
|
|
69
|
+
onNextClick: t ? () => o == null ? void 0 : o(e == null ? void 0 : e.confirmStatus) : void 0,
|
|
70
|
+
onPrevClick: t ? () => l == null ? void 0 : l(e == null ? void 0 : e.confirmStatus) : void 0,
|
|
71
|
+
labels: w,
|
|
72
72
|
editing: !t,
|
|
73
|
-
onRefresh:
|
|
73
|
+
onRefresh: v,
|
|
74
74
|
onChange: D,
|
|
75
75
|
isPreLabel: r,
|
|
76
76
|
settingHide: k,
|
|
77
|
-
readonly: t || !
|
|
77
|
+
readonly: t || !d,
|
|
78
78
|
showLabelList: t ? !1 : M,
|
|
79
79
|
renderLabelItem: E,
|
|
80
80
|
onLoadingChange: j
|
|
81
81
|
}) : /* @__PURE__ */ i(F, {}), e && /* @__PURE__ */ i("div", {
|
|
82
82
|
className: "detail-footer",
|
|
83
|
-
children: t ? /* @__PURE__ */
|
|
84
|
-
children: [
|
|
83
|
+
children: t ? /* @__PURE__ */ n(V, {
|
|
84
|
+
children: [p && d && /* @__PURE__ */ i("div", {
|
|
85
85
|
className: "detail-actions",
|
|
86
|
-
children: /* @__PURE__ */ i(
|
|
86
|
+
children: /* @__PURE__ */ i(s, {
|
|
87
87
|
type: "primary",
|
|
88
|
-
onClick:
|
|
88
|
+
onClick: p,
|
|
89
89
|
children: "标注"
|
|
90
90
|
})
|
|
91
|
-
}),
|
|
91
|
+
}), y && /* @__PURE__ */ i(s, {
|
|
92
92
|
danger: !0,
|
|
93
|
-
onClick:
|
|
93
|
+
onClick: h,
|
|
94
94
|
children: "删除数据"
|
|
95
95
|
})]
|
|
96
|
-
}) : /* @__PURE__ */
|
|
96
|
+
}) : /* @__PURE__ */ n("div", {
|
|
97
97
|
className: "footer-bar",
|
|
98
98
|
children: [/* @__PURE__ */ i("div", {
|
|
99
99
|
className: "footer-left"
|
|
100
|
-
}), /* @__PURE__ */
|
|
100
|
+
}), /* @__PURE__ */ n("div", {
|
|
101
101
|
className: "footer-center",
|
|
102
|
-
children: [/* @__PURE__ */ i(
|
|
103
|
-
onClick: () =>
|
|
104
|
-
disabled:
|
|
102
|
+
children: [/* @__PURE__ */ i(s, {
|
|
103
|
+
onClick: () => l == null ? void 0 : l(e == null ? void 0 : e.confirmStatus),
|
|
104
|
+
disabled: C,
|
|
105
105
|
children: "上一张"
|
|
106
|
-
}), /* @__PURE__ */ i(
|
|
107
|
-
onClick: () =>
|
|
108
|
-
disabled:
|
|
106
|
+
}), /* @__PURE__ */ i(s, {
|
|
107
|
+
onClick: () => o == null ? void 0 : o(e == null ? void 0 : e.confirmStatus),
|
|
108
|
+
disabled: C,
|
|
109
109
|
children: "下一张"
|
|
110
110
|
})]
|
|
111
|
-
}), /* @__PURE__ */
|
|
111
|
+
}), /* @__PURE__ */ n("div", {
|
|
112
112
|
className: "footer-right",
|
|
113
|
-
children: [
|
|
113
|
+
children: [d && e.confirmStatus === 1 && /* @__PURE__ */ i(x, {
|
|
114
114
|
title: /* @__PURE__ */ i("span", {
|
|
115
115
|
style: {
|
|
116
116
|
color: "#ff9800"
|
|
@@ -118,14 +118,14 @@ const W = (L) => {
|
|
|
118
118
|
children: 'AI预标注数据,请"确认标注"完成审核'
|
|
119
119
|
}),
|
|
120
120
|
placement: "top",
|
|
121
|
-
children: /* @__PURE__ */ i(
|
|
121
|
+
children: /* @__PURE__ */ i(s, {
|
|
122
122
|
type: "primary",
|
|
123
123
|
onClick: () => {
|
|
124
|
-
|
|
124
|
+
u.confirm({
|
|
125
125
|
title: "确认",
|
|
126
126
|
content: "是否确认当前标注?",
|
|
127
127
|
onOk: () => {
|
|
128
|
-
|
|
128
|
+
a == null || a(0, c.Confirm);
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
131
|
},
|
|
@@ -133,13 +133,20 @@ const W = (L) => {
|
|
|
133
133
|
className: "confirm-label-btn",
|
|
134
134
|
children: "确认标注"
|
|
135
135
|
})
|
|
136
|
-
}),
|
|
136
|
+
}), d && e.confirmStatus === 1 && /* @__PURE__ */ i(s, {
|
|
137
137
|
type: "primary",
|
|
138
|
-
onClick: () =>
|
|
138
|
+
onClick: () => a == null ? void 0 : a(1, c.Save),
|
|
139
139
|
disabled: r,
|
|
140
140
|
children: "保存标注"
|
|
141
|
-
}),
|
|
142
|
-
|
|
141
|
+
}), d && e.confirmStatus !== 1 && /* @__PURE__ */ i(s, {
|
|
142
|
+
type: "primary",
|
|
143
|
+
onClick: () => {
|
|
144
|
+
a == null || a(0, c.Confirm);
|
|
145
|
+
},
|
|
146
|
+
disabled: r,
|
|
147
|
+
children: "保存标注"
|
|
148
|
+
}), y && /* @__PURE__ */ i(s, {
|
|
149
|
+
onClick: h,
|
|
143
150
|
disabled: r,
|
|
144
151
|
children: "删除数据"
|
|
145
152
|
})]
|