@glodon-aiot/dataset-annotation 3.2.2-beta.2 → 3.2.2-beta.4
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/es/Common/Page/index.mjs +29 -0
- package/dist/es/Common/Page/style.less.mjs +4 -0
- package/dist/es/Common/PageContent/index.mjs +18 -0
- package/dist/es/Common/PageHeader/index.mjs +39 -0
- package/dist/es/Common/PageHeader/style.less.mjs +4 -0
- package/dist/es/DatasetContext/index.mjs +11 -0
- package/dist/es/_virtual/_commonjsHelpers.mjs +4 -0
- package/dist/es/_virtual/minio.mjs +4 -0
- package/dist/es/access/images/data_empty.svg.mjs +4 -0
- package/dist/es/components/CompositionInput/index.mjs +53 -0
- package/dist/es/components/DataEmpty/index.mjs +51 -0
- package/dist/es/components/DataEmpty/style.less.mjs +4 -0
- package/dist/es/components/DetectionAnnotation/PreSamplesPage/index.mjs +292 -0
- package/dist/es/components/DetectionAnnotation/PreSamplesPage/style.less.mjs +4 -0
- package/dist/es/components/DetectionAnnotation/components/DisabledTooltip/index.mjs +23 -0
- package/dist/es/components/DetectionAnnotation/components/ImageDetail/index.mjs +166 -0
- package/dist/es/components/DetectionAnnotation/components/ImageDetail/style.less.mjs +4 -0
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/Drawable.mjs +51 -0
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/FabricCustomize.mjs +42 -0
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/RectLabel.mjs +283 -0
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/icons/delete-icon.svg.mjs +4 -0
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/index.mjs +315 -0
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/style.less.mjs +4 -0
- package/dist/es/components/DetectionAnnotation/components/Labels/index.mjs +201 -0
- package/dist/es/components/DetectionAnnotation/components/Labels/style.less.mjs +4 -0
- package/dist/es/components/DetectionAnnotation/components/TagItem/index.mjs +144 -0
- package/dist/es/components/DetectionAnnotation/components/TagItem/style.less.mjs +4 -0
- package/dist/es/components/DetectionAnnotation/icon_item_empty.svg.mjs +4 -0
- package/dist/es/components/DetectionAnnotation/index.mjs +713 -0
- package/dist/es/components/DetectionAnnotation/style.less.mjs +4 -0
- package/dist/es/components/DetectionImageAnnotation/index.mjs +62 -0
- package/dist/es/components/DetectionImageAnnotation/style.less.mjs +4 -0
- package/dist/es/components/Iconfont/index.mjs +16 -0
- package/dist/es/components/MarkDescriptions/index.mjs +66 -0
- package/dist/es/components/MarkDescriptions/style.less.mjs +4 -0
- package/dist/es/components/OCRImageViewer/index.mjs +213 -0
- package/dist/es/components/OCRImageViewer/style.less.mjs +4 -0
- package/dist/es/components/OcrAnnotation/MarkKVOCRModal/CategoryDrawer.mjs +136 -0
- package/dist/es/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LabelEditorInput.mjs +57 -0
- package/dist/es/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LabelEditorItem.mjs +73 -0
- package/dist/es/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LableEditor.mjs +55 -0
- package/dist/es/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/index.mjs +366 -0
- package/dist/es/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/style.less.mjs +4 -0
- package/dist/es/components/OcrAnnotation/MarkKVOCRModal/index.mjs +255 -0
- package/dist/es/components/OcrAnnotation/MarkKVOCRModal/style.less.mjs +4 -0
- package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/ImageDetail/index.mjs +101 -0
- package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/ImageDetail/style.less.mjs +4 -0
- package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/images/delete.png.mjs +4 -0
- package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/index.mjs +756 -0
- package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/style.less.mjs +4 -0
- package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/index.mjs +231 -0
- package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/style.less.mjs +4 -0
- package/dist/es/components/OcrAnnotation/OcrModal/index.mjs +180 -0
- package/dist/es/components/OcrAnnotation/OcrModal/style.less.mjs +4 -0
- package/dist/es/components/OcrAnnotation/PreLabelOCR/PreLabelModal.mjs +281 -0
- package/dist/es/components/OcrAnnotation/PreLabelOCR/index.mjs +44 -0
- package/dist/es/components/OcrAnnotation/PreLabelOCR/style.less.mjs +4 -0
- package/dist/es/components/OcrAnnotation/constant.mjs +5 -0
- package/dist/es/components/OcrAnnotation/index.mjs +382 -0
- package/dist/es/components/OcrAnnotation/style.less.mjs +4 -0
- package/dist/es/components/OcrImageAnnotation/index.mjs +40 -0
- package/dist/es/components/OcrImageAnnotation/style.less.mjs +4 -0
- package/dist/es/components/PageNav/index.mjs +30 -0
- package/dist/es/components/PageNav/style.less.mjs +4 -0
- package/dist/es/components/PicZipImportModal/index.mjs +584 -0
- package/dist/es/components/PicZipImportModal/pic_zip.svg.mjs +4 -0
- package/dist/es/components/PicZipImportModal/pic_zip_json.svg.mjs +4 -0
- package/dist/es/components/PicZipImportModal/style.less.mjs +4 -0
- package/dist/es/components/PreLabelOCR/PreLabelModal.mjs +276 -0
- package/dist/es/components/PreLabelOCR/index.mjs +44 -0
- package/dist/es/components/PreLabelOCR/style.less.mjs +4 -0
- package/dist/es/components/ScanTable/index.mjs +97 -0
- package/dist/es/components/ScanTable/style.less.mjs +4 -0
- package/dist/es/components/Thumbnail/default.png.mjs +4 -0
- package/dist/es/components/Thumbnail/index.mjs +31 -0
- package/dist/es/components/Thumbnail/style.less.mjs +4 -0
- package/dist/es/components/hooks/Prompt.mjs +33 -0
- package/dist/es/constant.mjs +13 -0
- package/dist/es/createDatasetAnnotation/index.mjs +133 -0
- package/dist/es/createDetectionDatasetAnnotation/index.mjs +129 -0
- package/dist/es/createDetectionImageAnnotation/index.mjs +31 -0
- package/dist/es/createOcrDatasetAnnotation/index.mjs +129 -0
- package/dist/es/createOcrImageAnnotation/index.mjs +33 -0
- package/dist/es/featuresConfig.mjs +79 -0
- package/dist/es/index.mjs +13 -0
- package/dist/es/node_modules/@glodon-aiot/minio/dist/minio.mjs +28463 -0
- package/dist/es/utils/color.mjs +30 -0
- package/dist/es/utils/index.mjs +22 -0
- package/dist/es/utils/sign.mjs +33 -0
- package/dist/lib/index.js +130 -0
- package/dist/src/Common/Page/index.d.ts +1 -2
- package/dist/src/Common/PageHeader/index.d.ts +0 -1
- package/dist/src/DatasetContext/index.d.ts +3 -4
- package/dist/src/components/CompositionInput/index.d.ts +2 -2
- package/dist/src/components/DataEmpty/index.d.ts +1 -2
- package/dist/src/components/DetectionAnnotation/PreSamplesPage/index.d.ts +1 -2
- package/dist/src/components/DetectionAnnotation/components/DisabledTooltip/index.d.ts +2 -2
- package/dist/src/components/DetectionAnnotation/components/ImageDetail/index.d.ts +1 -2
- package/dist/src/components/DetectionAnnotation/components/LabelMaker/Drawable.d.ts +2 -2
- package/dist/src/components/DetectionAnnotation/components/LabelMaker/RectLabel.d.ts +6 -5
- package/dist/src/components/DetectionAnnotation/components/LabelMaker/index.d.ts +0 -1
- package/dist/src/components/DetectionAnnotation/components/Labels/index.d.ts +0 -1
- package/dist/src/components/DetectionAnnotation/components/TagItem/index.d.ts +1 -2
- package/dist/src/components/DetectionAnnotation/index.d.ts +1 -2
- package/dist/src/components/DetectionImageAnnotation/index.d.ts +0 -2
- package/dist/src/components/Iconfont/font_3140028_iptomfpgyu.d.ts +0 -0
- package/dist/src/components/Iconfont/font_3454453_gu5ijeufyng.d.ts +0 -0
- package/dist/src/components/Iconfont/font_4108228_3slzqhoow93.d.ts +0 -0
- package/dist/src/components/Iconfont/font_4439177_k3mjwv7kzfd.d.ts +0 -0
- package/dist/src/components/Iconfont/index.d.ts +1 -2
- package/dist/src/components/MarkDescriptions/index.d.ts +0 -1
- package/dist/src/components/OCRImageViewer/index.d.ts +1 -2
- package/dist/src/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LabelEditorInput.d.ts +2 -2
- package/dist/src/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LabelEditorItem.d.ts +1 -2
- package/dist/src/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LableEditor.d.ts +0 -1
- package/dist/src/components/OcrAnnotation/MarkKVOCRModal/index.d.ts +0 -1
- package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/ImageDetail/index.d.ts +1 -2
- package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/LabelEditorInput.d.ts +2 -2
- package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/LabelEditorItem.d.ts +0 -1
- package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/LableEditor.d.ts +0 -1
- package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/index.d.ts +0 -1
- package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/index.d.ts +0 -1
- package/dist/src/components/OcrAnnotation/OcrModal/index.d.ts +1 -2
- package/dist/src/components/OcrAnnotation/PreLabelOCR/PreLabelModal.d.ts +1 -2
- package/dist/src/components/OcrAnnotation/PreLabelOCR/index.d.ts +1 -2
- package/dist/src/components/OcrAnnotation/index.d.ts +1 -2
- package/dist/src/components/OcrImageAnnotation/index.d.ts +0 -2
- package/dist/src/components/PageNav/index.d.ts +1 -2
- package/dist/src/components/PicZipImportModal/index.d.ts +1 -2
- package/dist/src/components/PreLabelOCR/PreLabelModal.d.ts +1 -2
- package/dist/src/components/PreLabelOCR/index.d.ts +1 -2
- package/dist/src/components/ScanTable/index.d.ts +1 -2
- package/dist/src/components/Thumbnail/index.d.ts +1 -2
- package/dist/src/components/hooks/Prompt.d.ts +0 -1
- package/dist/src/components/hooks/useBlocker.d.ts +1 -1
- package/dist/src/featuresConfig.d.ts +1 -1
- package/dist/src/utils/sign.d.ts +1 -1
- package/package.json +15 -6
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
var U = Object.defineProperty, _ = Object.defineProperties;
|
|
2
|
+
var x = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var f = Object.getOwnPropertySymbols;
|
|
4
|
+
var E = Object.prototype.hasOwnProperty, T = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var v = (e, r, o) => r in e ? U(e, r, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[r] = o, s = (e, r) => {
|
|
6
|
+
for (var o in r || (r = {}))
|
|
7
|
+
E.call(r, o) && v(e, o, r[o]);
|
|
8
|
+
if (f)
|
|
9
|
+
for (var o of f(r))
|
|
10
|
+
T.call(r, o) && v(e, o, r[o]);
|
|
11
|
+
return e;
|
|
12
|
+
}, k = (e, r) => _(e, x(r));
|
|
13
|
+
var D = (e, r) => {
|
|
14
|
+
var o = {};
|
|
15
|
+
for (var t in e)
|
|
16
|
+
E.call(e, t) && r.indexOf(t) < 0 && (o[t] = e[t]);
|
|
17
|
+
if (e != null && f)
|
|
18
|
+
for (var t of f(e))
|
|
19
|
+
r.indexOf(t) < 0 && T.call(e, t) && (o[t] = e[t]);
|
|
20
|
+
return o;
|
|
21
|
+
};
|
|
22
|
+
import { defaultApiUrl as y } from "../constant.mjs";
|
|
23
|
+
import { CVForceDatahubApi as F, ModelServiceApi as H } from "@glodon-aiot/apis";
|
|
24
|
+
import { isExpired as B } from "../utils/index.mjs";
|
|
25
|
+
import { notification as g } from "antd";
|
|
26
|
+
import L from "axios";
|
|
27
|
+
import $ from "lodash/merge";
|
|
28
|
+
import { VIEW_MODE_FEATURES as V, LABEL_MODE_FEATURES as z, MANAGE_MODE_FEATURES as G } from "../featuresConfig.mjs";
|
|
29
|
+
import N from "../createDetectionDatasetAnnotation/index.mjs";
|
|
30
|
+
import W from "../createOcrDatasetAnnotation/index.mjs";
|
|
31
|
+
function j(e) {
|
|
32
|
+
switch (e) {
|
|
33
|
+
case "manage":
|
|
34
|
+
return s({}, G);
|
|
35
|
+
case "label":
|
|
36
|
+
return s({}, z);
|
|
37
|
+
case "view":
|
|
38
|
+
return s({}, V);
|
|
39
|
+
default:
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
const ae = (e) => {
|
|
44
|
+
const u = e, {
|
|
45
|
+
getContainer: r = () => document.createElement("div"),
|
|
46
|
+
token: o,
|
|
47
|
+
errorHandlers: t,
|
|
48
|
+
apiUrl: h = y,
|
|
49
|
+
datasetId: A,
|
|
50
|
+
versionId: J,
|
|
51
|
+
mode: S = "label"
|
|
52
|
+
} = u, M = D(u, [
|
|
53
|
+
"getContainer",
|
|
54
|
+
"token",
|
|
55
|
+
"errorHandlers",
|
|
56
|
+
"apiUrl",
|
|
57
|
+
"datasetId",
|
|
58
|
+
"versionId",
|
|
59
|
+
"mode"
|
|
60
|
+
]), b = s({}, j(S));
|
|
61
|
+
$(b, M), r(), (() => {
|
|
62
|
+
const c = h, I = (n) => {
|
|
63
|
+
var i;
|
|
64
|
+
if (!o)
|
|
65
|
+
return n;
|
|
66
|
+
if (B(o)) {
|
|
67
|
+
const a = "aiotToken is timeout";
|
|
68
|
+
t.aiotToken ? typeof t.aiotToken == "function" ? t.aiotToken(
|
|
69
|
+
// @ts-ignore
|
|
70
|
+
new Error(a, {
|
|
71
|
+
cause: {
|
|
72
|
+
status: 401,
|
|
73
|
+
message: a
|
|
74
|
+
}
|
|
75
|
+
})
|
|
76
|
+
) : console.error("errorHandlers.aiotToken is not a function") : console.error(a);
|
|
77
|
+
}
|
|
78
|
+
return n.headers = (i = n.headers) != null ? i : {}, n.headers = k(s({}, n.headers), {
|
|
79
|
+
Authorization: o ? `Bearer ${o}` : ""
|
|
80
|
+
}), n;
|
|
81
|
+
};
|
|
82
|
+
function l(n, i = !0) {
|
|
83
|
+
const a = `${c}${n}`, d = L.create({
|
|
84
|
+
baseURL: a
|
|
85
|
+
});
|
|
86
|
+
return i && d.interceptors.request.use(I), d;
|
|
87
|
+
}
|
|
88
|
+
const m = (n, i) => {
|
|
89
|
+
n !== 10001 && n !== 10215 && (g.config({
|
|
90
|
+
getContainer: r
|
|
91
|
+
}), g.error({
|
|
92
|
+
message: i
|
|
93
|
+
}));
|
|
94
|
+
}, p = (n, i) => {
|
|
95
|
+
if (n === 401) {
|
|
96
|
+
const a = "aiotToken is invalid";
|
|
97
|
+
t.aiotToken ? typeof t.aiotToken == "function" ? t.aiotToken(
|
|
98
|
+
// @ts-ignore
|
|
99
|
+
new Error(a, {
|
|
100
|
+
cause: {
|
|
101
|
+
status: 401,
|
|
102
|
+
message: a
|
|
103
|
+
}
|
|
104
|
+
})
|
|
105
|
+
) : console.error("errorHandlers.aiotToken is not a function") : console.error(a);
|
|
106
|
+
}
|
|
107
|
+
}, w = l("/datahub/v1"), C = new F(w, {
|
|
108
|
+
onHttpStatusError: p,
|
|
109
|
+
onAppStatusError: m
|
|
110
|
+
}), O = l("/mlopsdeploy/v1"), R = new H(O, {
|
|
111
|
+
onHttpStatusError: p,
|
|
112
|
+
onAppStatusError: m
|
|
113
|
+
});
|
|
114
|
+
return {
|
|
115
|
+
cvforceDatahub: C,
|
|
116
|
+
cvforceModelService: R
|
|
117
|
+
};
|
|
118
|
+
})().cvforceDatahub.getDatasetsId(A).then((c) => {
|
|
119
|
+
switch (c.markType) {
|
|
120
|
+
case "detection":
|
|
121
|
+
N(e);
|
|
122
|
+
return;
|
|
123
|
+
case "ocr":
|
|
124
|
+
c.ocrMarkTmpl === "DetectionOCR" ? W(e) : console.error("ocr类型下只支持DetectionOCR类型,请检查数据集ocrMarkTmpl类型。");
|
|
125
|
+
return;
|
|
126
|
+
default:
|
|
127
|
+
console.error("只支持detection、ocr两种类型,请检查数据集markType类型。");
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
export {
|
|
132
|
+
ae as default
|
|
133
|
+
};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
var H = Object.defineProperty, O = Object.defineProperties;
|
|
2
|
+
var y = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var c = Object.getOwnPropertySymbols;
|
|
4
|
+
var v = Object.prototype.hasOwnProperty, g = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var E = (e, t, o) => t in e ? H(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, s = (e, t) => {
|
|
6
|
+
for (var o in t || (t = {}))
|
|
7
|
+
v.call(t, o) && E(e, o, t[o]);
|
|
8
|
+
if (c)
|
|
9
|
+
for (var o of c(t))
|
|
10
|
+
g.call(t, o) && E(e, o, t[o]);
|
|
11
|
+
return e;
|
|
12
|
+
}, A = (e, t) => O(e, y(t));
|
|
13
|
+
var T = (e, t) => {
|
|
14
|
+
var o = {};
|
|
15
|
+
for (var r in e)
|
|
16
|
+
v.call(e, r) && t.indexOf(r) < 0 && (o[r] = e[r]);
|
|
17
|
+
if (e != null && c)
|
|
18
|
+
for (var r of c(e))
|
|
19
|
+
t.indexOf(r) < 0 && g.call(e, r) && (o[r] = e[r]);
|
|
20
|
+
return o;
|
|
21
|
+
};
|
|
22
|
+
import { jsx as B } from "react/jsx-runtime";
|
|
23
|
+
import L from "react-dom";
|
|
24
|
+
import { defaultApiUrl as $ } from "../constant.mjs";
|
|
25
|
+
import V from "../components/DetectionAnnotation/index.mjs";
|
|
26
|
+
import { CVForceDatahubApi as j, ModelServiceApi as z } from "@glodon-aiot/apis";
|
|
27
|
+
import { isExpired as G } from "../utils/index.mjs";
|
|
28
|
+
import { notification as k } from "antd";
|
|
29
|
+
import N from "axios";
|
|
30
|
+
import W from "lodash/merge";
|
|
31
|
+
import { VIEW_MODE_FEATURES as J, LABEL_MODE_FEATURES as K, MANAGE_MODE_FEATURES as P } from "../featuresConfig.mjs";
|
|
32
|
+
function Q(e) {
|
|
33
|
+
switch (e) {
|
|
34
|
+
case "manage":
|
|
35
|
+
return s({}, P);
|
|
36
|
+
case "label":
|
|
37
|
+
return s({}, K);
|
|
38
|
+
case "view":
|
|
39
|
+
return s({}, J);
|
|
40
|
+
default:
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const ce = (e) => {
|
|
45
|
+
const u = e, {
|
|
46
|
+
getContainer: t = () => document.createElement("div"),
|
|
47
|
+
token: o,
|
|
48
|
+
errorHandlers: r,
|
|
49
|
+
apiUrl: D = $,
|
|
50
|
+
datasetId: h,
|
|
51
|
+
versionId: S,
|
|
52
|
+
mode: M = "label"
|
|
53
|
+
} = u, b = T(u, [
|
|
54
|
+
"getContainer",
|
|
55
|
+
"token",
|
|
56
|
+
"errorHandlers",
|
|
57
|
+
"apiUrl",
|
|
58
|
+
"datasetId",
|
|
59
|
+
"versionId",
|
|
60
|
+
"mode"
|
|
61
|
+
]), f = s({}, Q(M));
|
|
62
|
+
W(f, b);
|
|
63
|
+
const I = t(), w = (() => {
|
|
64
|
+
const U = D, _ = (n) => {
|
|
65
|
+
var a;
|
|
66
|
+
if (!o)
|
|
67
|
+
return n;
|
|
68
|
+
if (G(o)) {
|
|
69
|
+
const i = "aiotToken is timeout";
|
|
70
|
+
r.aiotToken ? typeof r.aiotToken == "function" ? r.aiotToken(
|
|
71
|
+
// @ts-ignore
|
|
72
|
+
new Error(i, {
|
|
73
|
+
cause: {
|
|
74
|
+
status: 401,
|
|
75
|
+
message: i
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
) : console.error("errorHandlers.aiotToken is not a function") : console.error(i);
|
|
79
|
+
}
|
|
80
|
+
return n.headers = (a = n.headers) != null ? a : {}, n.headers = A(s({}, n.headers), {
|
|
81
|
+
Authorization: o ? `Bearer ${o}` : ""
|
|
82
|
+
}), n;
|
|
83
|
+
};
|
|
84
|
+
function l(n, a = !0) {
|
|
85
|
+
const i = `${U}${n}`, d = N.create({
|
|
86
|
+
baseURL: i
|
|
87
|
+
});
|
|
88
|
+
return a && d.interceptors.request.use(_), d;
|
|
89
|
+
}
|
|
90
|
+
const m = (n, a) => {
|
|
91
|
+
n !== 10001 && n !== 10215 && (k.config({
|
|
92
|
+
getContainer: t
|
|
93
|
+
}), k.error({
|
|
94
|
+
message: a
|
|
95
|
+
}));
|
|
96
|
+
}, p = (n, a) => {
|
|
97
|
+
if (n === 401) {
|
|
98
|
+
const i = "aiotToken is invalid";
|
|
99
|
+
r.aiotToken ? typeof r.aiotToken == "function" ? r.aiotToken(
|
|
100
|
+
// @ts-ignore
|
|
101
|
+
new Error(i, {
|
|
102
|
+
cause: {
|
|
103
|
+
status: 401,
|
|
104
|
+
message: i
|
|
105
|
+
}
|
|
106
|
+
})
|
|
107
|
+
) : console.error("errorHandlers.aiotToken is not a function") : console.error(i);
|
|
108
|
+
}
|
|
109
|
+
}, x = l("/datahub/v1"), C = new j(x, {
|
|
110
|
+
onHttpStatusError: p,
|
|
111
|
+
onAppStatusError: m
|
|
112
|
+
}), R = l("/mlopsdeploy/v1"), F = new z(R, {
|
|
113
|
+
onHttpStatusError: p,
|
|
114
|
+
onAppStatusError: m
|
|
115
|
+
});
|
|
116
|
+
return {
|
|
117
|
+
cvforceDatahub: C,
|
|
118
|
+
cvforceModelService: F
|
|
119
|
+
};
|
|
120
|
+
})();
|
|
121
|
+
L.render(/* @__PURE__ */ B(V, s({
|
|
122
|
+
services: w,
|
|
123
|
+
datasetId: h,
|
|
124
|
+
versionId: S
|
|
125
|
+
}, f)), I);
|
|
126
|
+
};
|
|
127
|
+
export {
|
|
128
|
+
ce as default
|
|
129
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import p from "react-dom";
|
|
3
|
+
import u from "../components/DetectionImageAnnotation/index.mjs";
|
|
4
|
+
const h = (r) => {
|
|
5
|
+
const {
|
|
6
|
+
getContainer: t = () => document.createElement("div"),
|
|
7
|
+
data: n,
|
|
8
|
+
onDataChange: o,
|
|
9
|
+
readonly: a = !0,
|
|
10
|
+
onNextClick: d,
|
|
11
|
+
onPrevClick: i,
|
|
12
|
+
showLabelList: m,
|
|
13
|
+
renderLabelItem: c
|
|
14
|
+
} = r;
|
|
15
|
+
r.data;
|
|
16
|
+
const l = t();
|
|
17
|
+
n.labels.map((e) => (e.id === void 0 && (e.id = e.label), e)), (() => {
|
|
18
|
+
p.render(/* @__PURE__ */ s(u, {
|
|
19
|
+
value: n,
|
|
20
|
+
readonly: a,
|
|
21
|
+
onChange: o,
|
|
22
|
+
onNextClick: d,
|
|
23
|
+
onPrevClick: i,
|
|
24
|
+
showLabelList: m,
|
|
25
|
+
renderLabelItem: c
|
|
26
|
+
}), l);
|
|
27
|
+
})();
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
h as default
|
|
31
|
+
};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
var F = Object.defineProperty, H = Object.defineProperties;
|
|
2
|
+
var y = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var c = Object.getOwnPropertySymbols;
|
|
4
|
+
var v = Object.prototype.hasOwnProperty, g = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var E = (e, r, o) => r in e ? F(e, r, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[r] = o, s = (e, r) => {
|
|
6
|
+
for (var o in r || (r = {}))
|
|
7
|
+
v.call(r, o) && E(e, o, r[o]);
|
|
8
|
+
if (c)
|
|
9
|
+
for (var o of c(r))
|
|
10
|
+
g.call(r, o) && E(e, o, r[o]);
|
|
11
|
+
return e;
|
|
12
|
+
}, A = (e, r) => H(e, y(r));
|
|
13
|
+
var T = (e, r) => {
|
|
14
|
+
var o = {};
|
|
15
|
+
for (var t in e)
|
|
16
|
+
v.call(e, t) && r.indexOf(t) < 0 && (o[t] = e[t]);
|
|
17
|
+
if (e != null && c)
|
|
18
|
+
for (var t of c(e))
|
|
19
|
+
r.indexOf(t) < 0 && g.call(e, t) && (o[t] = e[t]);
|
|
20
|
+
return o;
|
|
21
|
+
};
|
|
22
|
+
import { jsx as B } from "react/jsx-runtime";
|
|
23
|
+
import L from "react-dom";
|
|
24
|
+
import { defaultApiUrl as $ } from "../constant.mjs";
|
|
25
|
+
import V from "../components/OcrAnnotation/index.mjs";
|
|
26
|
+
import { CVForceDatahubApi as j, ModelServiceApi as z } from "@glodon-aiot/apis";
|
|
27
|
+
import { isExpired as G } from "../utils/index.mjs";
|
|
28
|
+
import { notification as k } from "antd";
|
|
29
|
+
import N from "axios";
|
|
30
|
+
import W from "lodash/merge";
|
|
31
|
+
import { VIEW_MODE_FEATURES as J, LABEL_MODE_FEATURES as K, MANAGE_MODE_FEATURES as P } from "../featuresConfig.mjs";
|
|
32
|
+
function Q(e) {
|
|
33
|
+
switch (e) {
|
|
34
|
+
case "manage":
|
|
35
|
+
return s({}, P);
|
|
36
|
+
case "label":
|
|
37
|
+
return s({}, K);
|
|
38
|
+
case "view":
|
|
39
|
+
return s({}, J);
|
|
40
|
+
default:
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const ce = (e) => {
|
|
45
|
+
const u = e, {
|
|
46
|
+
getContainer: r = () => document.createElement("div"),
|
|
47
|
+
token: o,
|
|
48
|
+
errorHandlers: t,
|
|
49
|
+
apiUrl: h = $,
|
|
50
|
+
datasetId: S,
|
|
51
|
+
versionId: D,
|
|
52
|
+
mode: M = "label"
|
|
53
|
+
} = u, b = T(u, [
|
|
54
|
+
"getContainer",
|
|
55
|
+
"token",
|
|
56
|
+
"errorHandlers",
|
|
57
|
+
"apiUrl",
|
|
58
|
+
"datasetId",
|
|
59
|
+
"versionId",
|
|
60
|
+
"mode"
|
|
61
|
+
]), f = s({}, Q(M));
|
|
62
|
+
W(f, b);
|
|
63
|
+
const I = r(), w = (() => {
|
|
64
|
+
const O = h, U = (n) => {
|
|
65
|
+
var a;
|
|
66
|
+
if (!o)
|
|
67
|
+
return n;
|
|
68
|
+
if (G(o)) {
|
|
69
|
+
const i = "aiotToken is timeout";
|
|
70
|
+
t.aiotToken ? typeof t.aiotToken == "function" ? t.aiotToken(
|
|
71
|
+
// @ts-ignore
|
|
72
|
+
new Error(i, {
|
|
73
|
+
cause: {
|
|
74
|
+
status: 401,
|
|
75
|
+
message: i
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
) : console.error("errorHandlers.aiotToken is not a function") : console.error(i);
|
|
79
|
+
}
|
|
80
|
+
return n.headers = (a = n.headers) != null ? a : {}, n.headers = A(s({}, n.headers), {
|
|
81
|
+
Authorization: o ? `Bearer ${o}` : ""
|
|
82
|
+
}), n;
|
|
83
|
+
};
|
|
84
|
+
function l(n, a = !0) {
|
|
85
|
+
const i = `${O}${n}`, d = N.create({
|
|
86
|
+
baseURL: i
|
|
87
|
+
});
|
|
88
|
+
return a && d.interceptors.request.use(U), d;
|
|
89
|
+
}
|
|
90
|
+
const m = (n, a) => {
|
|
91
|
+
n !== 10001 && n !== 10215 && (k.config({
|
|
92
|
+
getContainer: r
|
|
93
|
+
}), k.error({
|
|
94
|
+
message: a
|
|
95
|
+
}));
|
|
96
|
+
}, p = (n, a) => {
|
|
97
|
+
if (n === 401) {
|
|
98
|
+
const i = "aiotToken is invalid";
|
|
99
|
+
t.aiotToken ? typeof t.aiotToken == "function" ? t.aiotToken(
|
|
100
|
+
// @ts-ignore
|
|
101
|
+
new Error(i, {
|
|
102
|
+
cause: {
|
|
103
|
+
status: 401,
|
|
104
|
+
message: i
|
|
105
|
+
}
|
|
106
|
+
})
|
|
107
|
+
) : console.error("errorHandlers.aiotToken is not a function") : console.error(i);
|
|
108
|
+
}
|
|
109
|
+
}, _ = l("/datahub/v1"), x = new j(_, {
|
|
110
|
+
onHttpStatusError: p,
|
|
111
|
+
onAppStatusError: m
|
|
112
|
+
}), C = l("/mlopsdeploy/v1"), R = new z(C, {
|
|
113
|
+
onHttpStatusError: p,
|
|
114
|
+
onAppStatusError: m
|
|
115
|
+
});
|
|
116
|
+
return {
|
|
117
|
+
cvforceDatahub: x,
|
|
118
|
+
cvforceModelService: R
|
|
119
|
+
};
|
|
120
|
+
})();
|
|
121
|
+
L.render(/* @__PURE__ */ B(V, s({
|
|
122
|
+
services: w,
|
|
123
|
+
datasetId: S,
|
|
124
|
+
versionId: D
|
|
125
|
+
}, f)), I);
|
|
126
|
+
};
|
|
127
|
+
export {
|
|
128
|
+
ce as default
|
|
129
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import C from "react-dom";
|
|
3
|
+
import p from "../components/OcrImageAnnotation/index.mjs";
|
|
4
|
+
const f = (e) => {
|
|
5
|
+
const {
|
|
6
|
+
getContainer: r = () => document.createElement("div"),
|
|
7
|
+
data: t,
|
|
8
|
+
onDataChange: a,
|
|
9
|
+
readonly: n = !0,
|
|
10
|
+
onNextClick: o,
|
|
11
|
+
onPrevClick: c,
|
|
12
|
+
showLabelList: d,
|
|
13
|
+
categories: i,
|
|
14
|
+
renderLabelItem: m
|
|
15
|
+
} = e;
|
|
16
|
+
e.data;
|
|
17
|
+
const l = r();
|
|
18
|
+
(() => {
|
|
19
|
+
C.render(/* @__PURE__ */ s(p, {
|
|
20
|
+
value: t,
|
|
21
|
+
readonly: n,
|
|
22
|
+
onChange: a,
|
|
23
|
+
onNextClick: o,
|
|
24
|
+
onPrevClick: c,
|
|
25
|
+
showLabelList: d,
|
|
26
|
+
categories: i,
|
|
27
|
+
renderLabelItem: m
|
|
28
|
+
}), l);
|
|
29
|
+
})();
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
f as default
|
|
33
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
const e = "https://cv-aiot.obs.cn-north-4.myhuaweicloud.com:443/demodata", a = {
|
|
2
|
+
labelManager: {
|
|
3
|
+
visible: !0,
|
|
4
|
+
add: !0,
|
|
5
|
+
delete: !0,
|
|
6
|
+
edit: !0
|
|
7
|
+
},
|
|
8
|
+
datasetManager: {
|
|
9
|
+
add: !0,
|
|
10
|
+
delete: !0,
|
|
11
|
+
label: !0,
|
|
12
|
+
preLabel: !0
|
|
13
|
+
},
|
|
14
|
+
annotation: {
|
|
15
|
+
zoomable: !0,
|
|
16
|
+
draggable: !0,
|
|
17
|
+
readonly: !1
|
|
18
|
+
},
|
|
19
|
+
filterSwitch: {
|
|
20
|
+
tabs: !0,
|
|
21
|
+
labels: !0,
|
|
22
|
+
search: !0
|
|
23
|
+
},
|
|
24
|
+
exampleSrcRoot: e
|
|
25
|
+
}, t = {
|
|
26
|
+
labelManager: {
|
|
27
|
+
visible: !1,
|
|
28
|
+
add: !0,
|
|
29
|
+
delete: !1,
|
|
30
|
+
edit: !1
|
|
31
|
+
},
|
|
32
|
+
datasetManager: {
|
|
33
|
+
add: !1,
|
|
34
|
+
delete: !1,
|
|
35
|
+
label: !0,
|
|
36
|
+
preLabel: !1
|
|
37
|
+
},
|
|
38
|
+
annotation: {
|
|
39
|
+
zoomable: !0,
|
|
40
|
+
draggable: !0,
|
|
41
|
+
readonly: !1
|
|
42
|
+
},
|
|
43
|
+
filterSwitch: {
|
|
44
|
+
tabs: !0,
|
|
45
|
+
labels: !0,
|
|
46
|
+
search: !0
|
|
47
|
+
},
|
|
48
|
+
exampleSrcRoot: e
|
|
49
|
+
}, l = {
|
|
50
|
+
labelManager: {
|
|
51
|
+
visible: !1,
|
|
52
|
+
add: !1,
|
|
53
|
+
delete: !1,
|
|
54
|
+
edit: !1
|
|
55
|
+
},
|
|
56
|
+
datasetManager: {
|
|
57
|
+
add: !1,
|
|
58
|
+
delete: !1,
|
|
59
|
+
label: !1,
|
|
60
|
+
preLabel: !1
|
|
61
|
+
},
|
|
62
|
+
annotation: {
|
|
63
|
+
zoomable: !0,
|
|
64
|
+
draggable: !0,
|
|
65
|
+
readonly: !0
|
|
66
|
+
},
|
|
67
|
+
filterSwitch: {
|
|
68
|
+
tabs: !0,
|
|
69
|
+
labels: !0,
|
|
70
|
+
search: !0
|
|
71
|
+
},
|
|
72
|
+
exampleSrcRoot: e
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
e as EXAMPLE_SRC_ROOT,
|
|
76
|
+
t as LABEL_MODE_FEATURES,
|
|
77
|
+
a as MANAGE_MODE_FEATURES,
|
|
78
|
+
l as VIEW_MODE_FEATURES
|
|
79
|
+
};
|