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