@glodon-aiot/dataset-annotation 3.10.0-alpha.14 → 3.10.0-alpha.16

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