@glodon-aiot/dataset-annotation 3.25.1-alpha.7 → 3.26.0-alpha.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/dataset-annotation.js +123598 -0
- package/dist/dataset-annotation.umd.cjs +1017 -0
- package/dist/es/components/DetectionAnnotation/index.mjs +529 -535
- package/dist/es/components/OCRImageViewer/index.mjs +117 -130
- package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/index.mjs +65 -65
- package/dist/es/components/OcrAnnotation/OCRBoxDetail/index.mjs +92 -94
- package/dist/es/index.mjs +15 -21
- package/dist/example/DatasetAnnotationDemo.d.ts +3 -0
- package/dist/example/DemoTabs.d.ts +3 -0
- package/dist/example/DetectionDatasetDemo.d.ts +5 -0
- package/dist/example/DetectionImageDemo.d.ts +5 -0
- package/dist/example/OcrDatasetDemo.d.ts +5 -0
- package/dist/example/OcrImageDemo.d.ts +5 -0
- package/dist/example/OcrkvcDatasetDemo.d.ts +5 -0
- package/dist/example/constant.local.d.ts +6 -0
- package/dist/example/index.d.ts +1 -0
- package/dist/lib/index.js +4 -37
- package/dist/src/components/OCRImageViewer/index.d.ts +0 -1
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/ImageDetail/index.d.ts +16 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LabelEditorInput.d.ts +12 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LabelEditorItem.d.ts +21 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LableEditor.d.ts +16 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/index.d.ts +19 -0
- package/dist/src/index.d.ts +0 -6
- package/dist/src/utils/reactCompatibility.d.ts +5 -0
- package/package.json +2 -2
- package/dist/es/_virtual/_commonjsHelpers.mjs +0 -8
- package/dist/es/_virtual/dayjs.min.mjs +0 -4
- package/dist/es/components/VersionCompare/VersionCompareSelectModal/index.mjs +0 -122
- package/dist/es/components/VersionCompare/adapter.mjs +0 -215
- package/dist/es/components/VersionCompare/components/DataChangeStatsCard.mjs +0 -68
- package/dist/es/components/VersionCompare/components/DiffValue.mjs +0 -31
- package/dist/es/components/VersionCompare/components/LabelComparisonCard.mjs +0 -130
- package/dist/es/components/VersionCompare/components/ModifiedSampleCompareModal.mjs +0 -207
- package/dist/es/components/VersionCompare/components/SampleChangeDetailsCard.mjs +0 -160
- package/dist/es/components/VersionCompare/components/SingleSampleDetailModal.mjs +0 -165
- package/dist/es/components/VersionCompare/components/VersionCompareHeader.mjs +0 -106
- package/dist/es/components/VersionCompare/components/VersionOverviewCard.mjs +0 -70
- package/dist/es/components/VersionCompare/index.mjs +0 -416
- package/dist/es/components/VersionCompare/mock.mjs +0 -571
- package/dist/es/components/VersionCompare/style.less.mjs +0 -4
- package/dist/es/components/VersionCompare/utils/labelColors.mjs +0 -45
- package/dist/es/createDatasetVersionCompare/index.mjs +0 -124
- package/dist/es/node_modules/dayjs/dayjs.min.mjs +0 -324
- package/dist/src/components/VersionCompare/VersionCompareSelectModal/index.d.ts +0 -16
- package/dist/src/components/VersionCompare/adapter.d.ts +0 -50
- package/dist/src/components/VersionCompare/components/DataChangeStatsCard.d.ts +0 -9
- package/dist/src/components/VersionCompare/components/DiffValue.d.ts +0 -23
- package/dist/src/components/VersionCompare/components/LabelComparisonCard.d.ts +0 -12
- package/dist/src/components/VersionCompare/components/ModifiedSampleCompareModal.d.ts +0 -48
- package/dist/src/components/VersionCompare/components/SampleChangeDetailsCard.d.ts +0 -21
- package/dist/src/components/VersionCompare/components/SingleSampleDetailModal.d.ts +0 -46
- package/dist/src/components/VersionCompare/components/VersionCompareHeader.d.ts +0 -13
- package/dist/src/components/VersionCompare/components/VersionOverviewCard.d.ts +0 -9
- package/dist/src/components/VersionCompare/index.d.ts +0 -34
- package/dist/src/components/VersionCompare/mock.d.ts +0 -25
- package/dist/src/components/VersionCompare/types.d.ts +0 -75
- package/dist/src/components/VersionCompare/utils/labelColors.d.ts +0 -13
- package/dist/src/createDatasetVersionCompare/index.d.ts +0 -26
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
var $ = Object.defineProperty, j = Object.defineProperties;
|
|
2
|
-
var z = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var d = Object.getOwnPropertySymbols;
|
|
4
|
-
var F = Object.prototype.hasOwnProperty, L = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var T = (t, o, e) => o in t ? $(t, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[o] = e, h = (t, o) => {
|
|
6
|
-
for (var e in o || (o = {}))
|
|
7
|
-
F.call(o, e) && T(t, e, o[e]);
|
|
8
|
-
if (d)
|
|
9
|
-
for (var e of d(o))
|
|
10
|
-
L.call(o, e) && T(t, e, o[e]);
|
|
11
|
-
return t;
|
|
12
|
-
}, b = (t, o) => j(t, z(o));
|
|
13
|
-
var g = (t, o, e) => new Promise((f, r) => {
|
|
14
|
-
var m = (i) => {
|
|
15
|
-
try {
|
|
16
|
-
s(e.next(i));
|
|
17
|
-
} catch (c) {
|
|
18
|
-
r(c);
|
|
19
|
-
}
|
|
20
|
-
}, u = (i) => {
|
|
21
|
-
try {
|
|
22
|
-
s(e.throw(i));
|
|
23
|
-
} catch (c) {
|
|
24
|
-
r(c);
|
|
25
|
-
}
|
|
26
|
-
}, s = (i) => i.done ? f(i.value) : Promise.resolve(i.value).then(m, u);
|
|
27
|
-
s((e = e.apply(t, o)).next());
|
|
28
|
-
});
|
|
29
|
-
import { jsx as N } from "react/jsx-runtime";
|
|
30
|
-
import G from "react-dom";
|
|
31
|
-
import { notification as v } from "antd";
|
|
32
|
-
import H from "axios";
|
|
33
|
-
import { CVForceDatahubApi as J } from "@glodon-aiot/apis";
|
|
34
|
-
import { defaultApiUrl as K } from "../constant.mjs";
|
|
35
|
-
import { isExpired as P, createTokenResolver as Q } from "../utils/index.mjs";
|
|
36
|
-
import W from "../components/VersionCompare/index.mjs";
|
|
37
|
-
const ao = (t) => {
|
|
38
|
-
const {
|
|
39
|
-
getContainer: o = () => document.createElement("div"),
|
|
40
|
-
token: e,
|
|
41
|
-
getToken: f,
|
|
42
|
-
errorHandlers: r,
|
|
43
|
-
apiUrl: m = K,
|
|
44
|
-
datasetId: u,
|
|
45
|
-
baseVersionId: s,
|
|
46
|
-
targetVersionId: i,
|
|
47
|
-
datasetName: c,
|
|
48
|
-
markType: E,
|
|
49
|
-
ocrMarkTmpl: C,
|
|
50
|
-
showBreadcrumb: D = !0,
|
|
51
|
-
useMock: w = !1,
|
|
52
|
-
fallbackToMockOnError: x = !1,
|
|
53
|
-
mockScene: V,
|
|
54
|
-
onBack: y,
|
|
55
|
-
onVersionsChange: A
|
|
56
|
-
} = t, B = o(), I = (() => {
|
|
57
|
-
const M = m, R = Q(e, f), S = (n) => g(void 0, null, function* () {
|
|
58
|
-
var l;
|
|
59
|
-
const a = yield R();
|
|
60
|
-
if (!a)
|
|
61
|
-
return n;
|
|
62
|
-
if (P(a)) {
|
|
63
|
-
const p = "aiotToken is timeout";
|
|
64
|
-
r != null && r.aiotToken ? typeof r.aiotToken == "function" ? r.aiotToken(
|
|
65
|
-
// @ts-ignore
|
|
66
|
-
new Error(p, {
|
|
67
|
-
cause: {
|
|
68
|
-
status: 401,
|
|
69
|
-
message: p
|
|
70
|
-
}
|
|
71
|
-
})
|
|
72
|
-
) : console.error("errorHandlers.aiotToken is not a function") : console.error(p);
|
|
73
|
-
}
|
|
74
|
-
return n.headers = (l = n.headers) != null ? l : {}, n.headers = b(h({}, n.headers), {
|
|
75
|
-
Authorization: a ? `Bearer ${a}` : ""
|
|
76
|
-
}), n;
|
|
77
|
-
}), k = H.create({
|
|
78
|
-
baseURL: `${M}/datahub/v1`
|
|
79
|
-
});
|
|
80
|
-
k.interceptors.request.use(S);
|
|
81
|
-
const U = (n, a) => {
|
|
82
|
-
n === 10001 || n === 10215 || (v.config({
|
|
83
|
-
getContainer: o
|
|
84
|
-
}), v.error({
|
|
85
|
-
message: a
|
|
86
|
-
}));
|
|
87
|
-
}, O = (n) => {
|
|
88
|
-
if (n === 401) {
|
|
89
|
-
const a = "aiotToken is invalid";
|
|
90
|
-
r != null && r.aiotToken ? typeof r.aiotToken == "function" ? r.aiotToken(
|
|
91
|
-
// @ts-ignore
|
|
92
|
-
new Error(a, {
|
|
93
|
-
cause: {
|
|
94
|
-
status: 401,
|
|
95
|
-
message: a
|
|
96
|
-
}
|
|
97
|
-
})
|
|
98
|
-
) : console.error("errorHandlers.aiotToken is not a function") : console.error(a);
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
return new J(k, {
|
|
102
|
-
onHttpStatusError: O,
|
|
103
|
-
onAppStatusError: U
|
|
104
|
-
});
|
|
105
|
-
})();
|
|
106
|
-
G.render(/* @__PURE__ */ N(W, {
|
|
107
|
-
datasetId: u,
|
|
108
|
-
baseVersionId: s,
|
|
109
|
-
targetVersionId: i,
|
|
110
|
-
datasetName: c,
|
|
111
|
-
markType: E,
|
|
112
|
-
ocrMarkTmpl: C,
|
|
113
|
-
cvforceDatahub: I,
|
|
114
|
-
showBreadcrumb: D,
|
|
115
|
-
useMock: w,
|
|
116
|
-
fallbackToMockOnError: x,
|
|
117
|
-
mockScene: V,
|
|
118
|
-
onBack: y,
|
|
119
|
-
onVersionsChange: A
|
|
120
|
-
}), B);
|
|
121
|
-
};
|
|
122
|
-
export {
|
|
123
|
-
ao as default
|
|
124
|
-
};
|
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
import { commonjsGlobal as Q, getDefaultExportFromCjs as K } from "../../_virtual/_commonjsHelpers.mjs";
|
|
2
|
-
import { __module as E } from "../../_virtual/dayjs.min.mjs";
|
|
3
|
-
(function(V, X) {
|
|
4
|
-
(function(W, k) {
|
|
5
|
-
V.exports = k();
|
|
6
|
-
})(Q, function() {
|
|
7
|
-
var W = 1e3, k = 6e4, N = 36e5, A = "millisecond", S = "second", w = "minute", O = "hour", M = "day", T = "week", m = "month", U = "quarter", y = "year", _ = "date", J = "Invalid Date", q = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, B = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, G = {
|
|
8
|
-
name: "en",
|
|
9
|
-
weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
|
|
10
|
-
months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
|
|
11
|
-
ordinal: function(s) {
|
|
12
|
-
var n = ["th", "st", "nd", "rd"], t = s % 100;
|
|
13
|
-
return "[" + s + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
|
|
14
|
-
}
|
|
15
|
-
}, I = function(s, n, t) {
|
|
16
|
-
var r = String(s);
|
|
17
|
-
return !r || r.length >= n ? s : "" + Array(n + 1 - r.length).join(t) + s;
|
|
18
|
-
}, P = {
|
|
19
|
-
s: I,
|
|
20
|
-
z: function(s) {
|
|
21
|
-
var n = -s.utcOffset(), t = Math.abs(n), r = Math.floor(t / 60), e = t % 60;
|
|
22
|
-
return (n <= 0 ? "+" : "-") + I(r, 2, "0") + ":" + I(e, 2, "0");
|
|
23
|
-
},
|
|
24
|
-
m: function s(n, t) {
|
|
25
|
-
if (n.date() < t.date())
|
|
26
|
-
return -s(t, n);
|
|
27
|
-
var r = 12 * (t.year() - n.year()) + (t.month() - n.month()), e = n.clone().add(r, m), i = t - e < 0, u = n.clone().add(r + (i ? -1 : 1), m);
|
|
28
|
-
return +(-(r + (t - e) / (i ? e - u : u - e)) || 0);
|
|
29
|
-
},
|
|
30
|
-
a: function(s) {
|
|
31
|
-
return s < 0 ? Math.ceil(s) || 0 : Math.floor(s);
|
|
32
|
-
},
|
|
33
|
-
p: function(s) {
|
|
34
|
-
return {
|
|
35
|
-
M: m,
|
|
36
|
-
y,
|
|
37
|
-
w: T,
|
|
38
|
-
d: M,
|
|
39
|
-
D: _,
|
|
40
|
-
h: O,
|
|
41
|
-
m: w,
|
|
42
|
-
s: S,
|
|
43
|
-
ms: A,
|
|
44
|
-
Q: U
|
|
45
|
-
}[s] || String(s || "").toLowerCase().replace(/s$/, "");
|
|
46
|
-
},
|
|
47
|
-
u: function(s) {
|
|
48
|
-
return s === void 0;
|
|
49
|
-
}
|
|
50
|
-
}, x = "en", D = {};
|
|
51
|
-
D[x] = G;
|
|
52
|
-
var Z = "$isDayjsObject", F = function(s) {
|
|
53
|
-
return s instanceof C || !(!s || !s[Z]);
|
|
54
|
-
}, j = function s(n, t, r) {
|
|
55
|
-
var e;
|
|
56
|
-
if (!n)
|
|
57
|
-
return x;
|
|
58
|
-
if (typeof n == "string") {
|
|
59
|
-
var i = n.toLowerCase();
|
|
60
|
-
D[i] && (e = i), t && (D[i] = t, e = i);
|
|
61
|
-
var u = n.split("-");
|
|
62
|
-
if (!e && u.length > 1)
|
|
63
|
-
return s(u[0]);
|
|
64
|
-
} else {
|
|
65
|
-
var o = n.name;
|
|
66
|
-
D[o] = n, e = o;
|
|
67
|
-
}
|
|
68
|
-
return !r && e && (x = e), e || !r && x;
|
|
69
|
-
}, f = function(s, n) {
|
|
70
|
-
if (F(s))
|
|
71
|
-
return s.clone();
|
|
72
|
-
var t = typeof n == "object" ? n : {};
|
|
73
|
-
return t.date = s, t.args = arguments, new C(t);
|
|
74
|
-
}, a = P;
|
|
75
|
-
a.l = j, a.i = F, a.w = function(s, n) {
|
|
76
|
-
return f(s, {
|
|
77
|
-
locale: n.$L,
|
|
78
|
-
utc: n.$u,
|
|
79
|
-
x: n.$x,
|
|
80
|
-
$offset: n.$offset
|
|
81
|
-
});
|
|
82
|
-
};
|
|
83
|
-
var C = function() {
|
|
84
|
-
function s(t) {
|
|
85
|
-
this.$L = j(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[Z] = !0;
|
|
86
|
-
}
|
|
87
|
-
var n = s.prototype;
|
|
88
|
-
return n.parse = function(t) {
|
|
89
|
-
this.$d = function(r) {
|
|
90
|
-
var e = r.date, i = r.utc;
|
|
91
|
-
if (e === null)
|
|
92
|
-
return /* @__PURE__ */ new Date(NaN);
|
|
93
|
-
if (a.u(e))
|
|
94
|
-
return /* @__PURE__ */ new Date();
|
|
95
|
-
if (e instanceof Date)
|
|
96
|
-
return new Date(e);
|
|
97
|
-
if (typeof e == "string" && !/Z$/i.test(e)) {
|
|
98
|
-
var u = e.match(q);
|
|
99
|
-
if (u) {
|
|
100
|
-
var o = u[2] - 1 || 0, c = (u[7] || "0").substring(0, 3);
|
|
101
|
-
return i ? new Date(Date.UTC(u[1], o, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, c)) : new Date(u[1], o, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, c);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
return new Date(e);
|
|
105
|
-
}(t), this.init();
|
|
106
|
-
}, n.init = function() {
|
|
107
|
-
var t = this.$d;
|
|
108
|
-
this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
|
|
109
|
-
}, n.$utils = function() {
|
|
110
|
-
return a;
|
|
111
|
-
}, n.isValid = function() {
|
|
112
|
-
return this.$d.toString() !== J;
|
|
113
|
-
}, n.isSame = function(t, r) {
|
|
114
|
-
var e = f(t);
|
|
115
|
-
return this.startOf(r) <= e && e <= this.endOf(r);
|
|
116
|
-
}, n.isAfter = function(t, r) {
|
|
117
|
-
return f(t) < this.startOf(r);
|
|
118
|
-
}, n.isBefore = function(t, r) {
|
|
119
|
-
return this.endOf(r) < f(t);
|
|
120
|
-
}, n.$g = function(t, r, e) {
|
|
121
|
-
return a.u(t) ? this[r] : this.set(e, t);
|
|
122
|
-
}, n.unix = function() {
|
|
123
|
-
return Math.floor(this.valueOf() / 1e3);
|
|
124
|
-
}, n.valueOf = function() {
|
|
125
|
-
return this.$d.getTime();
|
|
126
|
-
}, n.startOf = function(t, r) {
|
|
127
|
-
var e = this, i = !!a.u(r) || r, u = a.p(t), o = function(p, $) {
|
|
128
|
-
var v = a.w(e.$u ? Date.UTC(e.$y, $, p) : new Date(e.$y, $, p), e);
|
|
129
|
-
return i ? v : v.endOf(M);
|
|
130
|
-
}, c = function(p, $) {
|
|
131
|
-
return a.w(e.toDate()[p].apply(e.toDate("s"), (i ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice($)), e);
|
|
132
|
-
}, h = this.$W, d = this.$M, l = this.$D, b = "set" + (this.$u ? "UTC" : "");
|
|
133
|
-
switch (u) {
|
|
134
|
-
case y:
|
|
135
|
-
return i ? o(1, 0) : o(31, 11);
|
|
136
|
-
case m:
|
|
137
|
-
return i ? o(1, d) : o(0, d + 1);
|
|
138
|
-
case T:
|
|
139
|
-
var g = this.$locale().weekStart || 0, Y = (h < g ? h + 7 : h) - g;
|
|
140
|
-
return o(i ? l - Y : l + (6 - Y), d);
|
|
141
|
-
case M:
|
|
142
|
-
case _:
|
|
143
|
-
return c(b + "Hours", 0);
|
|
144
|
-
case O:
|
|
145
|
-
return c(b + "Minutes", 1);
|
|
146
|
-
case w:
|
|
147
|
-
return c(b + "Seconds", 2);
|
|
148
|
-
case S:
|
|
149
|
-
return c(b + "Milliseconds", 3);
|
|
150
|
-
default:
|
|
151
|
-
return this.clone();
|
|
152
|
-
}
|
|
153
|
-
}, n.endOf = function(t) {
|
|
154
|
-
return this.startOf(t, !1);
|
|
155
|
-
}, n.$set = function(t, r) {
|
|
156
|
-
var e, i = a.p(t), u = "set" + (this.$u ? "UTC" : ""), o = (e = {}, e[M] = u + "Date", e[_] = u + "Date", e[m] = u + "Month", e[y] = u + "FullYear", e[O] = u + "Hours", e[w] = u + "Minutes", e[S] = u + "Seconds", e[A] = u + "Milliseconds", e)[i], c = i === M ? this.$D + (r - this.$W) : r;
|
|
157
|
-
if (i === m || i === y) {
|
|
158
|
-
var h = this.clone().set(_, 1);
|
|
159
|
-
h.$d[o](c), h.init(), this.$d = h.set(_, Math.min(this.$D, h.daysInMonth())).$d;
|
|
160
|
-
} else
|
|
161
|
-
o && this.$d[o](c);
|
|
162
|
-
return this.init(), this;
|
|
163
|
-
}, n.set = function(t, r) {
|
|
164
|
-
return this.clone().$set(t, r);
|
|
165
|
-
}, n.get = function(t) {
|
|
166
|
-
return this[a.p(t)]();
|
|
167
|
-
}, n.add = function(t, r) {
|
|
168
|
-
var e, i = this;
|
|
169
|
-
t = Number(t);
|
|
170
|
-
var u = a.p(r), o = function(d) {
|
|
171
|
-
var l = f(i);
|
|
172
|
-
return a.w(l.date(l.date() + Math.round(d * t)), i);
|
|
173
|
-
};
|
|
174
|
-
if (u === m)
|
|
175
|
-
return this.set(m, this.$M + t);
|
|
176
|
-
if (u === y)
|
|
177
|
-
return this.set(y, this.$y + t);
|
|
178
|
-
if (u === M)
|
|
179
|
-
return o(1);
|
|
180
|
-
if (u === T)
|
|
181
|
-
return o(7);
|
|
182
|
-
var c = (e = {}, e[w] = k, e[O] = N, e[S] = W, e)[u] || 1, h = this.$d.getTime() + t * c;
|
|
183
|
-
return a.w(h, this);
|
|
184
|
-
}, n.subtract = function(t, r) {
|
|
185
|
-
return this.add(-1 * t, r);
|
|
186
|
-
}, n.format = function(t) {
|
|
187
|
-
var r = this, e = this.$locale();
|
|
188
|
-
if (!this.isValid())
|
|
189
|
-
return e.invalidDate || J;
|
|
190
|
-
var i = t || "YYYY-MM-DDTHH:mm:ssZ", u = a.z(this), o = this.$H, c = this.$m, h = this.$M, d = e.weekdays, l = e.months, b = e.meridiem, g = function($, v, H, L) {
|
|
191
|
-
return $ && ($[v] || $(r, i)) || H[v].slice(0, L);
|
|
192
|
-
}, Y = function($) {
|
|
193
|
-
return a.s(o % 12 || 12, $, "0");
|
|
194
|
-
}, p = b || function($, v, H) {
|
|
195
|
-
var L = $ < 12 ? "AM" : "PM";
|
|
196
|
-
return H ? L.toLowerCase() : L;
|
|
197
|
-
};
|
|
198
|
-
return i.replace(B, function($, v) {
|
|
199
|
-
return v || function(H) {
|
|
200
|
-
switch (H) {
|
|
201
|
-
case "YY":
|
|
202
|
-
return String(r.$y).slice(-2);
|
|
203
|
-
case "YYYY":
|
|
204
|
-
return a.s(r.$y, 4, "0");
|
|
205
|
-
case "M":
|
|
206
|
-
return h + 1;
|
|
207
|
-
case "MM":
|
|
208
|
-
return a.s(h + 1, 2, "0");
|
|
209
|
-
case "MMM":
|
|
210
|
-
return g(e.monthsShort, h, l, 3);
|
|
211
|
-
case "MMMM":
|
|
212
|
-
return g(l, h);
|
|
213
|
-
case "D":
|
|
214
|
-
return r.$D;
|
|
215
|
-
case "DD":
|
|
216
|
-
return a.s(r.$D, 2, "0");
|
|
217
|
-
case "d":
|
|
218
|
-
return String(r.$W);
|
|
219
|
-
case "dd":
|
|
220
|
-
return g(e.weekdaysMin, r.$W, d, 2);
|
|
221
|
-
case "ddd":
|
|
222
|
-
return g(e.weekdaysShort, r.$W, d, 3);
|
|
223
|
-
case "dddd":
|
|
224
|
-
return d[r.$W];
|
|
225
|
-
case "H":
|
|
226
|
-
return String(o);
|
|
227
|
-
case "HH":
|
|
228
|
-
return a.s(o, 2, "0");
|
|
229
|
-
case "h":
|
|
230
|
-
return Y(1);
|
|
231
|
-
case "hh":
|
|
232
|
-
return Y(2);
|
|
233
|
-
case "a":
|
|
234
|
-
return p(o, c, !0);
|
|
235
|
-
case "A":
|
|
236
|
-
return p(o, c, !1);
|
|
237
|
-
case "m":
|
|
238
|
-
return String(c);
|
|
239
|
-
case "mm":
|
|
240
|
-
return a.s(c, 2, "0");
|
|
241
|
-
case "s":
|
|
242
|
-
return String(r.$s);
|
|
243
|
-
case "ss":
|
|
244
|
-
return a.s(r.$s, 2, "0");
|
|
245
|
-
case "SSS":
|
|
246
|
-
return a.s(r.$ms, 3, "0");
|
|
247
|
-
case "Z":
|
|
248
|
-
return u;
|
|
249
|
-
}
|
|
250
|
-
return null;
|
|
251
|
-
}($) || u.replace(":", "");
|
|
252
|
-
});
|
|
253
|
-
}, n.utcOffset = function() {
|
|
254
|
-
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
255
|
-
}, n.diff = function(t, r, e) {
|
|
256
|
-
var i, u = this, o = a.p(r), c = f(t), h = (c.utcOffset() - this.utcOffset()) * k, d = this - c, l = function() {
|
|
257
|
-
return a.m(u, c);
|
|
258
|
-
};
|
|
259
|
-
switch (o) {
|
|
260
|
-
case y:
|
|
261
|
-
i = l() / 12;
|
|
262
|
-
break;
|
|
263
|
-
case m:
|
|
264
|
-
i = l();
|
|
265
|
-
break;
|
|
266
|
-
case U:
|
|
267
|
-
i = l() / 3;
|
|
268
|
-
break;
|
|
269
|
-
case T:
|
|
270
|
-
i = (d - h) / 6048e5;
|
|
271
|
-
break;
|
|
272
|
-
case M:
|
|
273
|
-
i = (d - h) / 864e5;
|
|
274
|
-
break;
|
|
275
|
-
case O:
|
|
276
|
-
i = d / N;
|
|
277
|
-
break;
|
|
278
|
-
case w:
|
|
279
|
-
i = d / k;
|
|
280
|
-
break;
|
|
281
|
-
case S:
|
|
282
|
-
i = d / W;
|
|
283
|
-
break;
|
|
284
|
-
default:
|
|
285
|
-
i = d;
|
|
286
|
-
}
|
|
287
|
-
return e ? i : a.a(i);
|
|
288
|
-
}, n.daysInMonth = function() {
|
|
289
|
-
return this.endOf(m).$D;
|
|
290
|
-
}, n.$locale = function() {
|
|
291
|
-
return D[this.$L];
|
|
292
|
-
}, n.locale = function(t, r) {
|
|
293
|
-
if (!t)
|
|
294
|
-
return this.$L;
|
|
295
|
-
var e = this.clone(), i = j(t, r, !0);
|
|
296
|
-
return i && (e.$L = i), e;
|
|
297
|
-
}, n.clone = function() {
|
|
298
|
-
return a.w(this.$d, this);
|
|
299
|
-
}, n.toDate = function() {
|
|
300
|
-
return new Date(this.valueOf());
|
|
301
|
-
}, n.toJSON = function() {
|
|
302
|
-
return this.isValid() ? this.toISOString() : null;
|
|
303
|
-
}, n.toISOString = function() {
|
|
304
|
-
return this.$d.toISOString();
|
|
305
|
-
}, n.toString = function() {
|
|
306
|
-
return this.$d.toUTCString();
|
|
307
|
-
}, s;
|
|
308
|
-
}(), z = C.prototype;
|
|
309
|
-
return f.prototype = z, [["$ms", A], ["$s", S], ["$m", w], ["$H", O], ["$W", M], ["$M", m], ["$y", y], ["$D", _]].forEach(function(s) {
|
|
310
|
-
z[s[1]] = function(n) {
|
|
311
|
-
return this.$g(n, s[0], s[1]);
|
|
312
|
-
};
|
|
313
|
-
}), f.extend = function(s, n) {
|
|
314
|
-
return s.$i || (s(n, C, f), s.$i = !0), f;
|
|
315
|
-
}, f.locale = j, f.isDayjs = F, f.unix = function(s) {
|
|
316
|
-
return f(1e3 * s);
|
|
317
|
-
}, f.en = D[x], f.Ls = D, f.p = {}, f;
|
|
318
|
-
});
|
|
319
|
-
})(E);
|
|
320
|
-
var R = E.exports;
|
|
321
|
-
const nt = /* @__PURE__ */ K(R);
|
|
322
|
-
export {
|
|
323
|
-
nt as default
|
|
324
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { CVForceDatahubApi, IVersion } from '@glodon-aiot/apis';
|
|
3
|
-
export interface VersionCompareSelectModalProps {
|
|
4
|
-
open: boolean;
|
|
5
|
-
datasetId?: string;
|
|
6
|
-
datasetName?: string;
|
|
7
|
-
initialBaseVersionId?: string;
|
|
8
|
-
initialTargetVersionId?: string;
|
|
9
|
-
versions?: IVersion[];
|
|
10
|
-
cvforceDatahub?: CVForceDatahubApi;
|
|
11
|
-
useMock?: boolean;
|
|
12
|
-
onCancel: () => void;
|
|
13
|
-
onConfirm: (baseVersionId: string, targetVersionId: string, baseVersion?: IVersion, targetVersion?: IVersion) => void;
|
|
14
|
-
}
|
|
15
|
-
declare const VersionCompareSelectModal: React.FC<VersionCompareSelectModalProps>;
|
|
16
|
-
export default VersionCompareSelectModal;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { CVForceDatahubApi, IVersionCompareSampleItem, IVersionCompareSamplesParams, IVersionCompareSummary, IVersionCompareSummaryParams, Paged } from '@glodon-aiot/apis';
|
|
2
|
-
import { MockCompareScene } from './mock';
|
|
3
|
-
import { VersionCompareAsyncTaskProgress, VersionCompareSampleItemVM, VersionCompareSamplesPageVM, VersionCompareSummaryVM } from './types';
|
|
4
|
-
/**
|
|
5
|
-
* 格式化对比时间戳为 YYYY-MM-DD HH:mm:ss。
|
|
6
|
-
* 兼容毫秒级与秒级时间戳;空值或 0 显示为 -
|
|
7
|
-
*/
|
|
8
|
-
export declare const formatCompareTimestamp: (ts?: number | string) => string;
|
|
9
|
-
/**
|
|
10
|
-
* 将后端对比概览 DTO 转换为前端内部 ViewModel
|
|
11
|
-
*/
|
|
12
|
-
export declare const adaptVersionCompareSummary: (raw: IVersionCompareSummary, extraLabelNames?: string[]) => VersionCompareSummaryVM;
|
|
13
|
-
/**
|
|
14
|
-
* 将单条对比样本 DTO 转换为前端内部 ViewModel,并注入一致的标签颜色
|
|
15
|
-
*/
|
|
16
|
-
export declare const adaptVersionCompareSampleItem: (item: IVersionCompareSampleItem, colorMap?: Map<string, string>) => VersionCompareSampleItemVM;
|
|
17
|
-
/**
|
|
18
|
-
* 将后端对比样本分页列表 DTO 转换为前端内部 ViewModel
|
|
19
|
-
*/
|
|
20
|
-
export declare const adaptVersionCompareSamples: (paged: Paged<IVersionCompareSampleItem> & {
|
|
21
|
-
items?: IVersionCompareSampleItem[];
|
|
22
|
-
total?: number;
|
|
23
|
-
}, colorMap?: Map<string, string>) => VersionCompareSamplesPageVM;
|
|
24
|
-
export interface VersionCompareAdapterOptions {
|
|
25
|
-
cvforceDatahub?: CVForceDatahubApi;
|
|
26
|
-
/** 强制使用本地结构化 Mock 数据 */
|
|
27
|
-
useMock?: boolean;
|
|
28
|
-
/** 接口失败时是否降级到 Mock。默认关闭,失败直接抛出。 */
|
|
29
|
-
fallbackToMockOnError?: boolean;
|
|
30
|
-
/** Mock 数据场景(默认根据 datasetId 或传入 markType 自动推断) */
|
|
31
|
-
mockScene?: MockCompareScene;
|
|
32
|
-
/** 覆盖 Mock 数据集名称 */
|
|
33
|
-
mockDatasetName?: string;
|
|
34
|
-
/** 预留异步对比任务轮询间隔(毫秒,默认 2000ms) */
|
|
35
|
-
asyncPollIntervalMs?: number;
|
|
36
|
-
/** 预留异步对比任务最大轮询次数(默认 60 次) */
|
|
37
|
-
maxAsyncPollAttempts?: number;
|
|
38
|
-
/** 预留异步对比任务进度回调(若后续后端切换为异步任务,可通过该回调驱动进度条) */
|
|
39
|
-
onAsyncTaskProgress?: (progress: VersionCompareAsyncTaskProgress) => void;
|
|
40
|
-
/** 取消信号(组件卸载或切换版本时中止异步轮询) */
|
|
41
|
-
signal?: AbortSignal;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* 获取版本对比概览。接口为同步返回,失败时仅在显式开启 fallbackToMockOnError 时降级到 Mock。
|
|
45
|
-
*/
|
|
46
|
-
export declare const fetchVersionCompareSummaryWithAdapter: (datasetId: string, params: IVersionCompareSummaryParams, options?: VersionCompareAdapterOptions) => Promise<VersionCompareSummaryVM>;
|
|
47
|
-
/**
|
|
48
|
-
* 获取版本对比分页样本列表(支持标签颜色注入与本地 Mock 降级)
|
|
49
|
-
*/
|
|
50
|
-
export declare const fetchVersionCompareSamplesWithAdapter: (datasetId: string, params: IVersionCompareSamplesParams, colorMap?: Map<string, string>, options?: VersionCompareAdapterOptions) => Promise<VersionCompareSamplesPageVM>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { IVersionCompareChangeStats } from '../types';
|
|
3
|
-
export interface DataChangeStatsCardProps {
|
|
4
|
-
baseVersionNo: string;
|
|
5
|
-
targetVersionNo: string;
|
|
6
|
-
changeStats: IVersionCompareChangeStats;
|
|
7
|
-
}
|
|
8
|
-
declare const DataChangeStatsCard: React.FC<DataChangeStatsCardProps>;
|
|
9
|
-
export default DataChangeStatsCard;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export interface DiffValueProps {
|
|
3
|
-
/** 目标版本当前数值(若传入则与差值并排展示) */
|
|
4
|
-
value?: number;
|
|
5
|
-
/** 已计算的差值(目标版本值 - 基准版本值) */
|
|
6
|
-
diff?: number;
|
|
7
|
-
/** 基准版本数值(当未直接传 diff 时用于自动计算) */
|
|
8
|
-
baseValue?: number;
|
|
9
|
-
/** 目标版本数值(当未直接传 diff 时用于自动计算) */
|
|
10
|
-
targetValue?: number;
|
|
11
|
-
/** 主数值与差值之间的间距(px),默认 8px */
|
|
12
|
-
gap?: number;
|
|
13
|
-
className?: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* 版本对比通用差值展示组件
|
|
17
|
-
* 规则:差值 = 目标版本值 - 基准版本值
|
|
18
|
-
* - > 0:展示 +N(#FF4D4F)
|
|
19
|
-
* - < 0:展示 -|N|(#52C41A)
|
|
20
|
-
* - = 0:不展示差值标识
|
|
21
|
-
*/
|
|
22
|
-
declare const DiffValue: React.FC<DiffValueProps>;
|
|
23
|
-
export default DiffValue;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { VersionCompareLabelRowVM } from '../types';
|
|
3
|
-
export interface LabelComparisonCardProps {
|
|
4
|
-
markType: 'detection' | 'ocr' | string;
|
|
5
|
-
ocrMarkTmpl?: string;
|
|
6
|
-
isOcrDetection?: boolean;
|
|
7
|
-
baseVersionNo: string;
|
|
8
|
-
targetVersionNo: string;
|
|
9
|
-
labelComparisons: VersionCompareLabelRowVM[];
|
|
10
|
-
}
|
|
11
|
-
declare const LabelComparisonCard: React.FC<LabelComparisonCardProps>;
|
|
12
|
-
export default LabelComparisonCard;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { VersionCompareSampleItemVM } from '../types';
|
|
3
|
-
export interface ModifiedSampleCompareModalProps {
|
|
4
|
-
/** 弹窗是否打开 */
|
|
5
|
-
open: boolean;
|
|
6
|
-
/** 关闭弹窗回调 */
|
|
7
|
-
onCancel: () => void;
|
|
8
|
-
/** 当前选中的修改对比样本项 */
|
|
9
|
-
item?: VersionCompareSampleItemVM;
|
|
10
|
-
/** 是否为 OCR 检测数据集 */
|
|
11
|
-
isOcrDetection: boolean;
|
|
12
|
-
/** 数据集 ID */
|
|
13
|
-
datasetId: string;
|
|
14
|
-
/** 基准版本 ID */
|
|
15
|
-
baseVersionId: string;
|
|
16
|
-
/** 基准版本号展示文本(如 V1) */
|
|
17
|
-
baseVersionNo: string;
|
|
18
|
-
/** 目标版本 ID */
|
|
19
|
-
targetVersionId: string;
|
|
20
|
-
/** 目标版本号展示文本(如 V3) */
|
|
21
|
-
targetVersionNo: string;
|
|
22
|
-
/** 统一标签颜色映射表 */
|
|
23
|
-
labelColorMap?: Map<string, string>;
|
|
24
|
-
/** 是否存在上一张(在第 1 张时为 false) */
|
|
25
|
-
canPrev: boolean;
|
|
26
|
-
/** 是否存在下一张(在最后 1 张时为 false) */
|
|
27
|
-
canNext: boolean;
|
|
28
|
-
/** 外部列表是否正在跨页加载 */
|
|
29
|
-
switching?: boolean;
|
|
30
|
-
/** 点击上一张 */
|
|
31
|
-
onPrev: () => void;
|
|
32
|
-
/** 点击下一张 */
|
|
33
|
-
onNext: () => void;
|
|
34
|
-
/** 当前样本两侧主图均加载就绪状态回调(用于驱动后台相邻图片预加载) */
|
|
35
|
-
onImageReadyChange?: (ready: boolean) => void;
|
|
36
|
-
/** 注入的 cvforceDatahub 服务实例(真实接口兜底补全单样本详情) */
|
|
37
|
-
cvforceDatahub?: any;
|
|
38
|
-
/** 是否启用本地 Mock */
|
|
39
|
-
useMock?: boolean;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* 修改样本的左右双图并排只读对比弹窗(用于「修改」Tab 下的样本对比查看)
|
|
43
|
-
* - 左侧展示基准版本(baseSample),右侧展示目标版本(sample)
|
|
44
|
-
* - 两侧均处于只读模式,各自支持独立的画布缩放与拖拽平移
|
|
45
|
-
* - OCR 检测模式下在两侧浅蓝版本栏右侧分别展示各自的「标注框数量」
|
|
46
|
-
*/
|
|
47
|
-
declare const ModifiedSampleCompareModal: React.FC<ModifiedSampleCompareModalProps>;
|
|
48
|
-
export default ModifiedSampleCompareModal;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { IProxy } from '@glodon-aiot/apis';
|
|
3
|
-
import { IVersionCompareChangeStats, VersionCompareChangeType, VersionCompareSampleItemVM } from '../types';
|
|
4
|
-
export interface SampleChangeDetailsCardProps {
|
|
5
|
-
baseVersionNo: string;
|
|
6
|
-
targetVersionNo: string;
|
|
7
|
-
isOcrDetection: boolean;
|
|
8
|
-
changeStats: IVersionCompareChangeStats;
|
|
9
|
-
activeTab: VersionCompareChangeType;
|
|
10
|
-
items: VersionCompareSampleItemVM[];
|
|
11
|
-
total: number;
|
|
12
|
-
pageNo: number;
|
|
13
|
-
pageSize: number;
|
|
14
|
-
loading?: boolean;
|
|
15
|
-
imgProxy?: IProxy;
|
|
16
|
-
onTabChange: (tab: VersionCompareChangeType) => void;
|
|
17
|
-
onPageChange: (page: number, pageSize: number) => void;
|
|
18
|
-
onSampleClick?: (item: VersionCompareSampleItemVM, index: number) => void;
|
|
19
|
-
}
|
|
20
|
-
declare const SampleChangeDetailsCard: React.FC<SampleChangeDetailsCardProps>;
|
|
21
|
-
export default SampleChangeDetailsCard;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { VersionCompareChangeType } from '@glodon-aiot/apis';
|
|
3
|
-
import { VersionCompareSampleItemVM } from '../types';
|
|
4
|
-
export interface SingleSampleDetailModalProps {
|
|
5
|
-
/** 弹窗是否打开 */
|
|
6
|
-
open: boolean;
|
|
7
|
-
/** 关闭弹窗回调 */
|
|
8
|
-
onCancel: () => void;
|
|
9
|
-
/** 当前选中的对比样本项 */
|
|
10
|
-
item?: VersionCompareSampleItemVM;
|
|
11
|
-
/** 当前所属变更类型 Tab */
|
|
12
|
-
changeType: VersionCompareChangeType;
|
|
13
|
-
/** 是否为 OCR 检测数据集 */
|
|
14
|
-
isOcrDetection: boolean;
|
|
15
|
-
/** 数据集 ID */
|
|
16
|
-
datasetId: string;
|
|
17
|
-
/** 基准版本 ID */
|
|
18
|
-
baseVersionId: string;
|
|
19
|
-
/** 目标版本 ID */
|
|
20
|
-
targetVersionId: string;
|
|
21
|
-
/** 统一标签颜色映射表 */
|
|
22
|
-
labelColorMap?: Map<string, string>;
|
|
23
|
-
/** 是否存在上一张(在第 1 张时为 false) */
|
|
24
|
-
canPrev: boolean;
|
|
25
|
-
/** 是否存在下一张(在最后 1 张时为 false) */
|
|
26
|
-
canNext: boolean;
|
|
27
|
-
/** 外部列表是否正在跨页加载 */
|
|
28
|
-
switching?: boolean;
|
|
29
|
-
/** 点击上一张 */
|
|
30
|
-
onPrev: () => void;
|
|
31
|
-
/** 点击下一张 */
|
|
32
|
-
onNext: () => void;
|
|
33
|
-
/** 当前样本主图加载就绪状态回调(用于驱动后台相邻图片预加载) */
|
|
34
|
-
onImageReadyChange?: (ready: boolean) => void;
|
|
35
|
-
/** 注入的 cvforceDatahub 服务实例(真实接口兜底补全单样本详情) */
|
|
36
|
-
cvforceDatahub?: any;
|
|
37
|
-
/** 是否启用本地 Mock */
|
|
38
|
-
useMock?: boolean;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* 单图只读详情弹窗(用于「新增」、「删除」、「无变动」Tab 下的样本查看)
|
|
42
|
-
* - 物体检测:复用只读态 LabelMaker(支持画布缩放与拖拽平移,禁止框编辑/删除/新建)
|
|
43
|
-
* - OCR 检测:复用 OCRImageViewer,并在画布右上方额外展示「标注框数量」
|
|
44
|
-
*/
|
|
45
|
-
declare const SingleSampleDetailModal: React.FC<SingleSampleDetailModalProps>;
|
|
46
|
-
export default SingleSampleDetailModal;
|