@glodon-aiot/dataset-annotation 3.1.0-beta.15 → 3.2.1

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 (121) hide show
  1. package/dist/dataset-annotation.js +123591 -0
  2. package/dist/dataset-annotation.umd.cjs +1017 -0
  3. package/dist/example/DatasetAnnotationDemo.d.ts +3 -0
  4. package/dist/example/DemoTabs.d.ts +3 -0
  5. package/dist/example/DetectionDatasetDemo.d.ts +5 -0
  6. package/dist/example/DetectionImageDemo.d.ts +5 -0
  7. package/dist/example/OcrDatasetDemo.d.ts +5 -0
  8. package/dist/example/OcrImageDemo.d.ts +5 -0
  9. package/dist/example/OcrkvcDatasetDemo.d.ts +5 -0
  10. package/dist/example/constant.local.d.ts +6 -0
  11. package/dist/example/index.d.ts +1 -0
  12. package/dist/src/Common/Page/index.d.ts +2 -1
  13. package/dist/src/Common/PageHeader/index.d.ts +1 -0
  14. package/dist/src/DatasetContext/index.d.ts +4 -3
  15. package/dist/src/components/CompositionInput/index.d.ts +2 -2
  16. package/dist/src/components/DataEmpty/index.d.ts +2 -1
  17. package/dist/src/components/DetectionAnnotation/PreSamplesPage/index.d.ts +2 -1
  18. package/dist/src/components/DetectionAnnotation/components/DisabledTooltip/index.d.ts +2 -2
  19. package/dist/src/components/DetectionAnnotation/components/ImageDetail/index.d.ts +2 -1
  20. package/dist/src/components/DetectionAnnotation/components/LabelMaker/Drawable.d.ts +2 -2
  21. package/dist/src/components/DetectionAnnotation/components/LabelMaker/RectLabel.d.ts +2 -2
  22. package/dist/src/components/DetectionAnnotation/components/LabelMaker/index.d.ts +1 -0
  23. package/dist/src/components/DetectionAnnotation/components/Labels/index.d.ts +1 -0
  24. package/dist/src/components/DetectionAnnotation/components/TagItem/index.d.ts +2 -1
  25. package/dist/src/components/DetectionAnnotation/index.d.ts +2 -1
  26. package/dist/src/components/DetectionImageAnnotation/index.d.ts +2 -0
  27. package/dist/src/components/Iconfont/index.d.ts +1 -1
  28. package/dist/src/components/MarkDescriptions/index.d.ts +1 -0
  29. package/dist/src/components/OCRImageViewer/index.d.ts +2 -1
  30. package/dist/src/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LabelEditorInput.d.ts +2 -2
  31. package/dist/src/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LabelEditorItem.d.ts +2 -1
  32. package/dist/src/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LableEditor.d.ts +1 -0
  33. package/dist/src/components/OcrAnnotation/MarkKVOCRModal/index.d.ts +1 -0
  34. package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/ImageDetail/index.d.ts +2 -1
  35. package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/LabelEditorInput.d.ts +2 -2
  36. package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/LabelEditorItem.d.ts +1 -0
  37. package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/LableEditor.d.ts +1 -0
  38. package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/index.d.ts +1 -0
  39. package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/index.d.ts +1 -0
  40. package/dist/src/components/OcrAnnotation/OcrModal/index.d.ts +2 -1
  41. package/dist/src/components/OcrAnnotation/PreLabelOCR/PreLabelModal.d.ts +2 -1
  42. package/dist/src/components/OcrAnnotation/PreLabelOCR/index.d.ts +2 -1
  43. package/dist/src/components/OcrAnnotation/index.d.ts +2 -1
  44. package/dist/src/components/OcrImageAnnotation/index.d.ts +2 -0
  45. package/dist/src/components/PageNav/index.d.ts +2 -1
  46. package/dist/src/components/PicZipImportModal/index.d.ts +2 -1
  47. package/dist/src/components/PreLabelOCR/PreLabelModal.d.ts +2 -1
  48. package/dist/src/components/PreLabelOCR/index.d.ts +2 -1
  49. package/dist/src/components/ScanTable/index.d.ts +2 -1
  50. package/dist/src/components/Thumbnail/index.d.ts +2 -1
  51. package/dist/src/components/hooks/useBlocker.d.ts +1 -1
  52. package/dist/src/featuresConfig.d.ts +1 -1
  53. package/package.json +15 -22
  54. package/dist/es/Common/Page/index.mjs +0 -28
  55. package/dist/es/Common/PageContent/index.mjs +0 -18
  56. package/dist/es/Common/PageHeader/index.mjs +0 -38
  57. package/dist/es/DatasetContext/index.mjs +0 -11
  58. package/dist/es/_virtual/_commonjsHelpers.mjs +0 -6
  59. package/dist/es/_virtual/index.mjs +0 -4
  60. package/dist/es/access/images/data_empty.svg.mjs +0 -4
  61. package/dist/es/components/CompositionInput/index.mjs +0 -53
  62. package/dist/es/components/DataEmpty/index.mjs +0 -50
  63. package/dist/es/components/DetectionAnnotation/PreSamplesPage/index.mjs +0 -291
  64. package/dist/es/components/DetectionAnnotation/components/DisabledTooltip/index.mjs +0 -23
  65. package/dist/es/components/DetectionAnnotation/components/ImageDetail/index.mjs +0 -165
  66. package/dist/es/components/DetectionAnnotation/components/LabelMaker/Drawable.mjs +0 -51
  67. package/dist/es/components/DetectionAnnotation/components/LabelMaker/FabricCustomize.mjs +0 -42
  68. package/dist/es/components/DetectionAnnotation/components/LabelMaker/RectLabel.mjs +0 -283
  69. package/dist/es/components/DetectionAnnotation/components/LabelMaker/icons/delete-icon.svg.mjs +0 -4
  70. package/dist/es/components/DetectionAnnotation/components/LabelMaker/index.mjs +0 -314
  71. package/dist/es/components/DetectionAnnotation/components/Labels/index.mjs +0 -200
  72. package/dist/es/components/DetectionAnnotation/components/TagItem/index.mjs +0 -143
  73. package/dist/es/components/DetectionAnnotation/icon_item_empty.svg.mjs +0 -4
  74. package/dist/es/components/DetectionAnnotation/index.mjs +0 -712
  75. package/dist/es/components/DetectionImageAnnotation/index.mjs +0 -61
  76. package/dist/es/components/Iconfont/index.mjs +0 -16
  77. package/dist/es/components/MarkDescriptions/index.mjs +0 -65
  78. package/dist/es/components/OCRImageViewer/index.mjs +0 -212
  79. package/dist/es/components/OcrAnnotation/MarkKVOCRModal/CategoryDrawer.mjs +0 -136
  80. package/dist/es/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LabelEditorInput.mjs +0 -57
  81. package/dist/es/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LabelEditorItem.mjs +0 -72
  82. package/dist/es/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LableEditor.mjs +0 -54
  83. package/dist/es/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/index.mjs +0 -366
  84. package/dist/es/components/OcrAnnotation/MarkKVOCRModal/index.mjs +0 -254
  85. package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/ImageDetail/index.mjs +0 -100
  86. package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/images/delete.png.mjs +0 -4
  87. package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/index.mjs +0 -755
  88. package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/index.mjs +0 -230
  89. package/dist/es/components/OcrAnnotation/OcrModal/index.mjs +0 -179
  90. package/dist/es/components/OcrAnnotation/PreLabelOCR/PreLabelModal.mjs +0 -280
  91. package/dist/es/components/OcrAnnotation/PreLabelOCR/index.mjs +0 -43
  92. package/dist/es/components/OcrAnnotation/constant.mjs +0 -5
  93. package/dist/es/components/OcrAnnotation/index.mjs +0 -381
  94. package/dist/es/components/OcrImageAnnotation/index.mjs +0 -39
  95. package/dist/es/components/PageNav/index.mjs +0 -29
  96. package/dist/es/components/PicZipImportModal/index.mjs +0 -583
  97. package/dist/es/components/PicZipImportModal/pic_zip.svg.mjs +0 -4
  98. package/dist/es/components/PicZipImportModal/pic_zip_json.svg.mjs +0 -4
  99. package/dist/es/components/PreLabelOCR/PreLabelModal.mjs +0 -275
  100. package/dist/es/components/PreLabelOCR/index.mjs +0 -43
  101. package/dist/es/components/ScanTable/index.mjs +0 -96
  102. package/dist/es/components/Thumbnail/default.png.mjs +0 -4
  103. package/dist/es/components/Thumbnail/index.mjs +0 -30
  104. package/dist/es/components/hooks/Prompt.mjs +0 -33
  105. package/dist/es/constant.mjs +0 -13
  106. package/dist/es/createDatasetAnnotation/index.mjs +0 -133
  107. package/dist/es/createDetectionDatasetAnnotation/index.mjs +0 -129
  108. package/dist/es/createDetectionImageAnnotation/index.mjs +0 -31
  109. package/dist/es/createOcrDatasetAnnotation/index.mjs +0 -129
  110. package/dist/es/createOcrImageAnnotation/index.mjs +0 -33
  111. package/dist/es/featuresConfig.mjs +0 -79
  112. package/dist/es/index.mjs +0 -35
  113. package/dist/es/node_modules/classnames/index.mjs +0 -42
  114. package/dist/es/utils/color.mjs +0 -30
  115. package/dist/es/utils/index.mjs +0 -22
  116. package/dist/es/utils/sign.mjs +0 -33
  117. package/dist/lib/index.js +0 -7
  118. package/dist/src/components/Iconfont/font_3140028_iptomfpgyu.d.ts +0 -0
  119. package/dist/src/components/Iconfont/font_3454453_gu5ijeufyng.d.ts +0 -0
  120. package/dist/src/components/Iconfont/font_4108228_3slzqhoow93.d.ts +0 -0
  121. package/dist/src/components/Iconfont/font_4439177_k3mjwv7kzfd.d.ts +0 -0
@@ -1,133 +0,0 @@
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
- };
@@ -1,129 +0,0 @@
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
- };
@@ -1,31 +0,0 @@
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
- };
@@ -1,129 +0,0 @@
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
- };
@@ -1,33 +0,0 @@
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
- };
@@ -1,79 +0,0 @@
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
- };