@glodon-aiot/dataset-annotation 3.19.0-alpha.20 → 3.19.0-alpha.21
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/components/VLMAnnotationDetail/VLMDetail/index.mjs +175 -175
- package/dist/es/createClassificationDatasetAnnotation/index.mjs +100 -84
- package/dist/es/createDatasetAnnotation/index.mjs +100 -84
- package/dist/es/createDetectionDatasetAnnotation/index.mjs +105 -89
- package/dist/es/createOcrDatasetAnnotation/index.mjs +103 -87
- package/dist/es/createVlmtasetAnnotation/index.mjs +103 -87
- package/dist/es/index.mjs +1 -1
- package/dist/es/utils/index.mjs +44 -17
- package/dist/lib/index.js +3 -3
- package/dist/src/DatasetContext/index.d.ts +2 -1
- package/dist/src/api.d.ts +2 -1
- package/dist/src/createClassificationDatasetAnnotation/index.d.ts +2 -1
- package/dist/src/createDatasetAnnotation/index.d.ts +2 -1
- package/dist/src/createDetectionDatasetAnnotation/index.d.ts +2 -1
- package/dist/src/createOcrDatasetAnnotation/index.d.ts +2 -1
- package/dist/src/createVlmtasetAnnotation/index.d.ts +2 -1
- package/dist/src/featuresConfig.d.ts +2 -1
- package/dist/src/utils/index.d.ts +5 -0
- package/package.json +2 -2
|
@@ -1,57 +1,73 @@
|
|
|
1
|
-
var O = Object.defineProperty,
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var
|
|
10
|
-
|
|
1
|
+
var O = Object.defineProperty, B = Object.defineProperties;
|
|
2
|
+
var V = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var p = Object.getOwnPropertySymbols;
|
|
4
|
+
var S = Object.prototype.hasOwnProperty, D = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var h = (e, r, o) => r in e ? O(e, r, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[r] = o, f = (e, r) => {
|
|
6
|
+
for (var o in r || (r = {}))
|
|
7
|
+
S.call(r, o) && h(e, o, r[o]);
|
|
8
|
+
if (p)
|
|
9
|
+
for (var o of p(r))
|
|
10
|
+
D.call(r, o) && h(e, o, r[o]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
12
|
+
}, M = (e, r) => B(e, V(r));
|
|
13
|
+
var b = (e, r) => {
|
|
14
|
+
var o = {};
|
|
15
15
|
for (var t in e)
|
|
16
|
-
|
|
17
|
-
if (e != null &&
|
|
18
|
-
for (var t of
|
|
19
|
-
|
|
20
|
-
return
|
|
16
|
+
S.call(e, t) && r.indexOf(t) < 0 && (o[t] = e[t]);
|
|
17
|
+
if (e != null && p)
|
|
18
|
+
for (var t of p(e))
|
|
19
|
+
r.indexOf(t) < 0 && D.call(e, t) && (o[t] = e[t]);
|
|
20
|
+
return o;
|
|
21
21
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
var w = (e, r, o) => new Promise((t, i) => {
|
|
23
|
+
var d = (s) => {
|
|
24
|
+
try {
|
|
25
|
+
l(o.next(s));
|
|
26
|
+
} catch (m) {
|
|
27
|
+
i(m);
|
|
28
|
+
}
|
|
29
|
+
}, v = (s) => {
|
|
30
|
+
try {
|
|
31
|
+
l(o.throw(s));
|
|
32
|
+
} catch (m) {
|
|
33
|
+
i(m);
|
|
34
|
+
}
|
|
35
|
+
}, l = (s) => s.done ? t(s.value) : Promise.resolve(s.value).then(d, v);
|
|
36
|
+
l((o = o.apply(e, r)).next());
|
|
37
|
+
});
|
|
38
|
+
import { jsx as $ } from "react/jsx-runtime";
|
|
39
|
+
import j from "react-dom";
|
|
40
|
+
import { defaultApiUrl as z } from "../constant.mjs";
|
|
41
|
+
import G from "../components/VLMAnnotationDetail/index.mjs";
|
|
42
|
+
import { CVForceDatahubApi as N, ModelServiceApi as W } from "@glodon-aiot/apis";
|
|
43
|
+
import { isExpired as J, createTokenResolver as K } from "../utils/index.mjs";
|
|
44
|
+
import { notification as I } from "antd";
|
|
45
|
+
import P from "axios";
|
|
46
|
+
import Q from "lodash/merge";
|
|
47
|
+
import { VIEW_MODE_FEATURES as X, LABEL_MODE_FEATURES as Y, MANAGE_MODE_FEATURES as Z } from "../featuresConfig.mjs";
|
|
48
|
+
function q(e) {
|
|
33
49
|
switch (e) {
|
|
34
50
|
case "manage":
|
|
35
|
-
return
|
|
51
|
+
return f({}, Z);
|
|
36
52
|
case "label":
|
|
37
|
-
return
|
|
53
|
+
return f({}, Y);
|
|
38
54
|
case "view":
|
|
39
|
-
return
|
|
55
|
+
return f({}, X);
|
|
40
56
|
default:
|
|
41
57
|
return null;
|
|
42
58
|
}
|
|
43
59
|
}
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
getContainer:
|
|
47
|
-
token:
|
|
60
|
+
const me = (e) => {
|
|
61
|
+
const T = e, {
|
|
62
|
+
getContainer: r = () => document.createElement("div"),
|
|
63
|
+
token: o,
|
|
48
64
|
getToken: t,
|
|
49
|
-
errorHandlers:
|
|
50
|
-
apiUrl:
|
|
51
|
-
datasetId:
|
|
52
|
-
versionId:
|
|
53
|
-
mode:
|
|
54
|
-
} =
|
|
65
|
+
errorHandlers: i,
|
|
66
|
+
apiUrl: d = z,
|
|
67
|
+
datasetId: v,
|
|
68
|
+
versionId: l,
|
|
69
|
+
mode: s = "label"
|
|
70
|
+
} = T, m = b(T, [
|
|
55
71
|
"getContainer",
|
|
56
72
|
"token",
|
|
57
73
|
"getToken",
|
|
@@ -60,76 +76,76 @@ const ue = (e) => {
|
|
|
60
76
|
"datasetId",
|
|
61
77
|
"versionId",
|
|
62
78
|
"mode"
|
|
63
|
-
]),
|
|
64
|
-
|
|
65
|
-
const x =
|
|
66
|
-
const _ =
|
|
67
|
-
var
|
|
68
|
-
const
|
|
69
|
-
if (!
|
|
79
|
+
]), E = f({}, q(s));
|
|
80
|
+
Q(E, m);
|
|
81
|
+
const x = r(), R = (() => {
|
|
82
|
+
const U = d, _ = K(o, t), C = (n) => w(void 0, null, function* () {
|
|
83
|
+
var c;
|
|
84
|
+
const a = yield _();
|
|
85
|
+
if (!a)
|
|
70
86
|
return n;
|
|
71
|
-
if (
|
|
72
|
-
const
|
|
73
|
-
|
|
87
|
+
if (J(a)) {
|
|
88
|
+
const u = "aiotToken is timeout";
|
|
89
|
+
i.aiotToken ? typeof i.aiotToken == "function" ? i.aiotToken(
|
|
74
90
|
// @ts-ignore
|
|
75
|
-
new Error(
|
|
91
|
+
new Error(u, {
|
|
76
92
|
cause: {
|
|
77
93
|
status: 401,
|
|
78
|
-
message:
|
|
94
|
+
message: u
|
|
79
95
|
}
|
|
80
96
|
})
|
|
81
|
-
) : console.error("errorHandlers.aiotToken is not a function") : console.error(
|
|
97
|
+
) : console.error("errorHandlers.aiotToken is not a function") : console.error(u);
|
|
82
98
|
}
|
|
83
|
-
return n.headers = (
|
|
84
|
-
Authorization:
|
|
99
|
+
return n.headers = (c = n.headers) != null ? c : {}, n.headers = M(f({}, n.headers), {
|
|
100
|
+
Authorization: a ? `Bearer ${a}` : ""
|
|
85
101
|
}), n;
|
|
86
|
-
};
|
|
87
|
-
function
|
|
88
|
-
const
|
|
89
|
-
baseURL:
|
|
102
|
+
});
|
|
103
|
+
function g(n, a = !0) {
|
|
104
|
+
const c = `${U}${n}`, u = P.create({
|
|
105
|
+
baseURL: c
|
|
90
106
|
});
|
|
91
|
-
return
|
|
107
|
+
return a && u.interceptors.request.use(C), u;
|
|
92
108
|
}
|
|
93
|
-
const
|
|
94
|
-
n !== 10001 && n !== 10215 && (
|
|
95
|
-
getContainer:
|
|
96
|
-
}),
|
|
97
|
-
message:
|
|
109
|
+
const k = (n, a) => {
|
|
110
|
+
n !== 10001 && n !== 10215 && (I.config({
|
|
111
|
+
getContainer: r
|
|
112
|
+
}), I.error({
|
|
113
|
+
message: a
|
|
98
114
|
}));
|
|
99
|
-
},
|
|
115
|
+
}, A = (n, a) => {
|
|
100
116
|
if (n === 401) {
|
|
101
|
-
const
|
|
102
|
-
|
|
117
|
+
const c = "aiotToken is invalid";
|
|
118
|
+
i.aiotToken ? typeof i.aiotToken == "function" ? i.aiotToken(
|
|
103
119
|
// @ts-ignore
|
|
104
|
-
new Error(
|
|
120
|
+
new Error(c, {
|
|
105
121
|
cause: {
|
|
106
122
|
status: 401,
|
|
107
|
-
message:
|
|
123
|
+
message: c
|
|
108
124
|
}
|
|
109
125
|
})
|
|
110
|
-
) : console.error("errorHandlers.aiotToken is not a function") : console.error(
|
|
126
|
+
) : console.error("errorHandlers.aiotToken is not a function") : console.error(c);
|
|
111
127
|
}
|
|
112
|
-
},
|
|
113
|
-
onHttpStatusError:
|
|
114
|
-
onAppStatusError:
|
|
115
|
-
}), H =
|
|
116
|
-
onHttpStatusError:
|
|
117
|
-
onAppStatusError:
|
|
128
|
+
}, y = g("/datahub/v1"), F = new N(y, {
|
|
129
|
+
onHttpStatusError: A,
|
|
130
|
+
onAppStatusError: k
|
|
131
|
+
}), H = g("/mlopsdeploy/v1"), L = new W(H, {
|
|
132
|
+
onHttpStatusError: A,
|
|
133
|
+
onAppStatusError: k
|
|
118
134
|
});
|
|
119
135
|
return {
|
|
120
136
|
cvforceDatahub: F,
|
|
121
137
|
cvforceModelService: L
|
|
122
138
|
};
|
|
123
139
|
})();
|
|
124
|
-
|
|
125
|
-
services:
|
|
126
|
-
datasetId:
|
|
127
|
-
versionId:
|
|
128
|
-
token:
|
|
140
|
+
j.render(/* @__PURE__ */ $(G, f({
|
|
141
|
+
services: R,
|
|
142
|
+
datasetId: v,
|
|
143
|
+
versionId: l,
|
|
144
|
+
token: o,
|
|
129
145
|
getToken: t,
|
|
130
|
-
apiUrl:
|
|
131
|
-
},
|
|
146
|
+
apiUrl: d
|
|
147
|
+
}, E)), x);
|
|
132
148
|
};
|
|
133
149
|
export {
|
|
134
|
-
|
|
150
|
+
me as default
|
|
135
151
|
};
|