@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 d, jsx as i } from "react/jsx-runtime";
1
+ import { jsxs as n, jsx as i } from "react/jsx-runtime";
2
2
  import { useState as K } from "react";
3
- import { Modal as C, Tabs as O, Space as V, Button as l, Tooltip as x } from "antd";
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 u } from "../../index.mjs";
8
+ import { ISampleActionType as c } from "../../index.mjs";
9
9
  const W = (L) => {
10
10
  const {
11
11
  datasetId: N,
12
- setIsImageDetailVisible: c,
13
- isImageDetailVisible: m = !0,
12
+ setIsImageDetailVisible: m,
13
+ isImageDetailVisible: f = !0,
14
14
  currentSample: e,
15
- onNextClick: a,
16
- onPrevClick: o,
17
- onSave: s,
18
- onDeleteSample: f,
19
- labels: v = [],
20
- onRefresh: w,
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: h,
28
- filterItems: g,
27
+ onEnterEdit: p,
28
+ filterItems: b,
29
29
  filterMode: T,
30
- onFilterChange: p,
30
+ onFilterChange: g,
31
31
  previewMode: t = !0,
32
- canLabel: n = !1,
33
- canDelete: b = !1
34
- } = L, [y, j] = K(!1);
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
- }), /* @__PURE__ */ d(C, {
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: m,
48
- onCancel: () => c(!1),
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 && g && /* @__PURE__ */ i(O, {
59
+ children: !t && b && /* @__PURE__ */ i(O, {
60
60
  activeKey: T,
61
- items: g,
62
- onChange: (A) => p && p(A)
61
+ items: b,
62
+ onChange: (A) => g && g(A)
63
63
  })
64
64
  }), e ? /* @__PURE__ */ i(B, {
65
65
  datasetId: N,
66
- isImageDetailVisible: m,
67
- setIsImageDetailVisible: c,
66
+ isImageDetailVisible: f,
67
+ setIsImageDetailVisible: m,
68
68
  currentSample: e,
69
- onNextClick: t ? () => a == null ? void 0 : a(e == null ? void 0 : e.confirmStatus) : void 0,
70
- onPrevClick: t ? () => o == null ? void 0 : o(e == null ? void 0 : e.confirmStatus) : void 0,
71
- labels: v,
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: w,
73
+ onRefresh: v,
74
74
  onChange: D,
75
75
  isPreLabel: r,
76
76
  settingHide: k,
77
- readonly: t || !n,
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__ */ d(V, {
84
- children: [h && n && /* @__PURE__ */ i("div", {
83
+ children: t ? /* @__PURE__ */ n(V, {
84
+ children: [p && d && /* @__PURE__ */ i("div", {
85
85
  className: "detail-actions",
86
- children: /* @__PURE__ */ i(l, {
86
+ children: /* @__PURE__ */ i(s, {
87
87
  type: "primary",
88
- onClick: h,
88
+ onClick: p,
89
89
  children: "标注"
90
90
  })
91
- }), b && /* @__PURE__ */ i(l, {
91
+ }), y && /* @__PURE__ */ i(s, {
92
92
  danger: !0,
93
- onClick: f,
93
+ onClick: h,
94
94
  children: "删除数据"
95
95
  })]
96
- }) : /* @__PURE__ */ d("div", {
96
+ }) : /* @__PURE__ */ n("div", {
97
97
  className: "footer-bar",
98
98
  children: [/* @__PURE__ */ i("div", {
99
99
  className: "footer-left"
100
- }), /* @__PURE__ */ d("div", {
100
+ }), /* @__PURE__ */ n("div", {
101
101
  className: "footer-center",
102
- children: [/* @__PURE__ */ i(l, {
103
- onClick: () => o == null ? void 0 : o(e == null ? void 0 : e.confirmStatus),
104
- disabled: y,
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(l, {
107
- onClick: () => a == null ? void 0 : a(e == null ? void 0 : e.confirmStatus),
108
- disabled: y,
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__ */ d("div", {
111
+ }), /* @__PURE__ */ n("div", {
112
112
  className: "footer-right",
113
- children: [n && /* @__PURE__ */ i(x, {
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(l, {
121
+ children: /* @__PURE__ */ i(s, {
122
122
  type: "primary",
123
123
  onClick: () => {
124
- C.confirm({
124
+ u.confirm({
125
125
  title: "确认",
126
126
  content: "是否确认当前标注?",
127
127
  onOk: () => {
128
- s == null || s(0, u.Confirm);
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
- }), n && e.confirmStatus === 1 && /* @__PURE__ */ i(l, {
136
+ }), d && e.confirmStatus === 1 && /* @__PURE__ */ i(s, {
137
137
  type: "primary",
138
- onClick: () => s == null ? void 0 : s(1, u.Save),
138
+ onClick: () => a == null ? void 0 : a(1, c.Save),
139
139
  disabled: r,
140
140
  children: "保存标注"
141
- }), b && /* @__PURE__ */ i(l, {
142
- onClick: f,
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
  })]