@labelbee/lb-components 1.20.0-alpha.1 → 1.20.0-alpha.10

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 (133) hide show
  1. package/dist/assets/annotation/video/icon_timePoint.svg.js +1 -0
  2. package/dist/assets/annotation/video/icon_videoCut.svg.js +1 -0
  3. package/dist/assets/annotation/video/icon_videoCutting.svg.js +1 -0
  4. package/dist/components/LLMToolView/sidebar/components/answerList/index.js +1 -1
  5. package/dist/components/LLMToolView/sidebar/components/textEditor/index.js +2 -1
  6. package/dist/components/LLMToolView/sidebar/components/textEditor/index.module.scss.js +1 -0
  7. package/dist/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -1
  8. package/dist/components/LLMToolView/sidebar/components/textInputBox/index.module.scss.js +1 -0
  9. package/dist/components/LLMToolView/sidebar/index.js +1 -1
  10. package/dist/components/audioAnnotate/textInput/index.js +1 -1
  11. package/dist/components/latexEditor/constant/config.js +1 -0
  12. package/dist/components/latexEditor/index.js +1 -0
  13. package/dist/components/latexEditor/index.module.scss.js +1 -0
  14. package/dist/components/videoAnnotate/index.js +1 -1
  15. package/dist/components/videoAnnotate/videoClipTool/VideoClipToolContext.js +1 -0
  16. package/dist/components/videoAnnotate/videoClipTool/components/ToolTipForClip.js +1 -0
  17. package/dist/components/videoAnnotate/videoClipTool/components/annotatedList/index.js +1 -0
  18. package/dist/components/videoAnnotate/videoClipTool/components/annotatedList/index.module.scss.js +1 -0
  19. package/dist/components/videoAnnotate/videoClipTool/components/resizableSnippet/index.js +1 -0
  20. package/dist/components/videoAnnotate/videoClipTool/components/resizableSnippet/index.module.scss.js +1 -0
  21. package/dist/components/videoAnnotate/videoClipTool/components/timeSliceRange/index.js +1 -0
  22. package/dist/components/videoAnnotate/videoClipTool/components/timeSliceRange/index.module.scss.js +1 -0
  23. package/dist/components/videoAnnotate/videoClipTool/components/videoClipToolHotkey/index.js +1 -0
  24. package/dist/components/videoAnnotate/videoClipTool/components/videoClipToolHotkey/index.module.scss.js +1 -0
  25. package/dist/components/videoAnnotate/videoClipTool/components/videoTimeSlicesOverVideo/index.js +1 -0
  26. package/dist/components/videoAnnotate/videoClipTool/components/videoTimeSlicesOverVideo/index.module.scss.js +1 -0
  27. package/dist/components/videoAnnotate/videoClipTool/components/videoTrack/index.js +1 -0
  28. package/dist/components/videoAnnotate/videoClipTool/components/videoTrack/index.module.scss.js +1 -0
  29. package/dist/components/videoAnnotate/videoClipTool/constant.js +1 -0
  30. package/dist/components/videoAnnotate/videoClipTool/index.js +1 -0
  31. package/dist/components/videoAnnotate/videoClipTool/index.module.scss.js +1 -0
  32. package/dist/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -0
  33. package/dist/components/videoAnnotate/videoTextTool/index.js +1 -0
  34. package/dist/components/videoPlayer/VideoTagLayer.js +1 -1
  35. package/dist/components/videoPlayer/VideoTextLayer.js +2 -0
  36. package/dist/components/videoPlayer/components/controller/index.js +1 -1
  37. package/dist/components/videoPlayer/index.js +1 -1
  38. package/dist/components/videoPlayer/utils.js +1 -1
  39. package/dist/index.css +367 -2
  40. package/dist/index.js +1 -1
  41. package/dist/store/annotation/reducer.js +1 -1
  42. package/dist/types/App.d.ts +2 -2
  43. package/dist/types/components/LLMToolView/sidebar/components/textEditor/index.d.ts +1 -0
  44. package/dist/types/components/LLMToolView/types.d.ts +1 -0
  45. package/dist/types/components/audioAnnotate/index.d.ts +1 -1
  46. package/dist/types/components/latexEditor/constant/config.d.ts +18 -0
  47. package/dist/types/components/latexEditor/index.d.ts +12 -0
  48. package/dist/types/components/pointCloudView/PointCloud2DView.d.ts +1 -1
  49. package/dist/types/components/pointCloudView/PointCloud3DView.d.ts +1 -1
  50. package/dist/types/components/pointCloudView/PointCloudBackView.d.ts +1 -1
  51. package/dist/types/components/pointCloudView/PointCloudListener.d.ts +1 -1
  52. package/dist/types/components/pointCloudView/PointCloudSegment.d.ts +1 -1
  53. package/dist/types/components/pointCloudView/PointCloudSegment2DView.d.ts +1 -1
  54. package/dist/types/components/pointCloudView/PointCloudSegmentListener.d.ts +1 -1
  55. package/dist/types/components/pointCloudView/PointCloudSideView.d.ts +1 -1
  56. package/dist/types/components/pointCloudView/PointCloudTopView.d.ts +3 -3
  57. package/dist/types/components/pointCloudView/index.d.ts +3 -3
  58. package/dist/types/components/videoAnnotate/index.d.ts +18 -7
  59. package/dist/types/components/videoAnnotate/videoClipTool/VideoClipToolContext.d.ts +27 -0
  60. package/dist/types/components/videoAnnotate/videoClipTool/components/ToolTipForClip.d.ts +8 -0
  61. package/dist/types/components/videoAnnotate/videoClipTool/components/annotatedList/index.d.ts +7 -0
  62. package/dist/types/components/videoAnnotate/videoClipTool/components/resizableSnippet/index.d.ts +14 -0
  63. package/dist/types/components/videoAnnotate/videoClipTool/components/timeSliceRange/index.d.ts +18 -0
  64. package/dist/types/components/videoAnnotate/videoClipTool/components/videoClipToolHotkey/index.d.ts +6 -0
  65. package/dist/types/components/videoAnnotate/videoClipTool/components/videoTimeSlicesOverVideo/index.d.ts +3 -0
  66. package/dist/types/components/videoAnnotate/videoClipTool/components/videoTrack/index.d.ts +11 -0
  67. package/dist/types/components/videoAnnotate/videoClipTool/constant.d.ts +26 -0
  68. package/dist/types/components/videoAnnotate/videoClipTool/index.d.ts +131 -0
  69. package/dist/types/components/{videoPlayer → videoAnnotate/videoTagTool}/TagToolInstanceAdaptor.d.ts +6 -10
  70. package/dist/types/components/videoAnnotate/videoTextTool/index.d.ts +56 -0
  71. package/dist/types/components/videoPlayer/VideoTagLayer.d.ts +1 -0
  72. package/dist/types/components/videoPlayer/VideoTextLayer.d.ts +2 -0
  73. package/dist/types/components/videoPlayer/components/controller/index.d.ts +4 -2
  74. package/dist/types/components/videoPlayer/index.d.ts +11 -0
  75. package/dist/types/components/videoPlayer/utils.d.ts +6 -0
  76. package/dist/types/index.d.ts +1 -1
  77. package/dist/types/views/MainView/sidebar/TextToolSidebar/index.d.ts +2 -1
  78. package/dist/utils/audio.js +1 -1
  79. package/dist/views/MainView/LLMLayout/index.js +1 -1
  80. package/dist/views/MainView/index.js +1 -1
  81. package/dist/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
  82. package/dist/views/MainView/sidebar/index.js +1 -1
  83. package/es/assets/annotation/video/icon_timePoint.svg.js +1 -0
  84. package/es/assets/annotation/video/icon_videoCut.svg.js +1 -0
  85. package/es/assets/annotation/video/icon_videoCutting.svg.js +1 -0
  86. package/es/components/LLMToolView/sidebar/components/answerList/index.js +1 -1
  87. package/es/components/LLMToolView/sidebar/components/textEditor/index.js +2 -1
  88. package/es/components/LLMToolView/sidebar/components/textEditor/index.module.scss.js +1 -0
  89. package/es/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -1
  90. package/es/components/LLMToolView/sidebar/components/textInputBox/index.module.scss.js +1 -0
  91. package/es/components/LLMToolView/sidebar/index.js +1 -1
  92. package/es/components/audioAnnotate/textInput/index.js +1 -1
  93. package/es/components/latexEditor/constant/config.js +1 -0
  94. package/es/components/latexEditor/index.js +1 -0
  95. package/es/components/latexEditor/index.module.scss.js +1 -0
  96. package/es/components/videoAnnotate/index.js +1 -1
  97. package/es/components/videoAnnotate/videoClipTool/VideoClipToolContext.js +1 -0
  98. package/es/components/videoAnnotate/videoClipTool/components/ToolTipForClip.js +1 -0
  99. package/es/components/videoAnnotate/videoClipTool/components/annotatedList/index.js +1 -0
  100. package/es/components/videoAnnotate/videoClipTool/components/annotatedList/index.module.scss.js +1 -0
  101. package/es/components/videoAnnotate/videoClipTool/components/resizableSnippet/index.js +1 -0
  102. package/es/components/videoAnnotate/videoClipTool/components/resizableSnippet/index.module.scss.js +1 -0
  103. package/es/components/videoAnnotate/videoClipTool/components/timeSliceRange/index.js +1 -0
  104. package/es/components/videoAnnotate/videoClipTool/components/timeSliceRange/index.module.scss.js +1 -0
  105. package/es/components/videoAnnotate/videoClipTool/components/videoClipToolHotkey/index.js +1 -0
  106. package/es/components/videoAnnotate/videoClipTool/components/videoClipToolHotkey/index.module.scss.js +1 -0
  107. package/es/components/videoAnnotate/videoClipTool/components/videoTimeSlicesOverVideo/index.js +1 -0
  108. package/es/components/videoAnnotate/videoClipTool/components/videoTimeSlicesOverVideo/index.module.scss.js +1 -0
  109. package/es/components/videoAnnotate/videoClipTool/components/videoTrack/index.js +1 -0
  110. package/es/components/videoAnnotate/videoClipTool/components/videoTrack/index.module.scss.js +1 -0
  111. package/es/components/videoAnnotate/videoClipTool/constant.js +1 -0
  112. package/es/components/videoAnnotate/videoClipTool/index.js +1 -0
  113. package/es/components/videoAnnotate/videoClipTool/index.module.scss.js +1 -0
  114. package/es/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -0
  115. package/es/components/videoAnnotate/videoTextTool/index.js +1 -0
  116. package/es/components/videoPlayer/VideoTagLayer.js +1 -1
  117. package/es/components/videoPlayer/VideoTextLayer.js +2 -0
  118. package/es/components/videoPlayer/components/controller/index.js +1 -1
  119. package/es/components/videoPlayer/index.js +1 -1
  120. package/es/components/videoPlayer/utils.js +1 -1
  121. package/es/index.css +367 -2
  122. package/es/index.js +1 -1
  123. package/es/store/annotation/reducer.js +1 -1
  124. package/es/utils/audio.js +1 -1
  125. package/es/views/MainView/index.js +1 -1
  126. package/es/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
  127. package/es/views/MainView/sidebar/index.js +1 -1
  128. package/package.json +6 -4
  129. package/dist/components/videoPlayer/TagToolInstanceAdaptor.js +0 -1
  130. package/es/components/videoPlayer/TagToolInstanceAdaptor.js +0 -1
  131. /package/dist/components/{videoPlayer → videoAnnotate/videoTagTool}/TagToolInstanceAdaptorI18nProvider.js +0 -0
  132. /package/dist/types/components/{videoPlayer → videoAnnotate/videoTagTool}/TagToolInstanceAdaptorI18nProvider.d.ts +0 -0
  133. /package/es/components/{videoPlayer → videoAnnotate/videoTagTool}/TagToolInstanceAdaptorI18nProvider.js +0 -0
package/dist/index.css CHANGED
@@ -24,6 +24,350 @@
24
24
  .index-module_imgView__wmxDk .index-module_item__-80YI .index-module_image__V49oW .ant-image {
25
25
  display: flex;
26
26
  }
27
+ .index-module_latexEditor__0fK8G {
28
+ line-height: 32px;
29
+ background-color: #ededed;
30
+ border-radius: 2px;
31
+ position: relative;
32
+ }
33
+
34
+ .index-module_latexHeaderTitle__JIpOj {
35
+ cursor: pointer;
36
+ padding: 0px 12px;
37
+ display: inline-block;
38
+ }
39
+
40
+ .index-module_dropContent__XVBYH {
41
+ display: flex;
42
+ box-shadow: 0px 2px 14px 2px rgba(204, 204, 204, 0.5);
43
+ min-width: 400px;
44
+ overflow: auto;
45
+ min-height: 300px;
46
+ max-height: 600px;
47
+ background: #fff;
48
+ }
49
+
50
+ .index-module_itemList__Y3q0e {
51
+ height: 100%;
52
+ border-right: 1px solid #eee;
53
+ }
54
+ .index-module_itemList__Y3q0e .index-module_item__q4v2V {
55
+ padding: 6px 12px;
56
+ cursor: pointer;
57
+ display: flex;
58
+ justify-content: space-between;
59
+ align-items: center;
60
+ }
61
+
62
+ .index-module_itemActive__a5EPl {
63
+ background: #e6f7ff;
64
+ font-weight: 700;
65
+ }
66
+
67
+ .index-module_lastNode__TXbWG {
68
+ width: 380px;
69
+ display: flex;
70
+ padding: 4px;
71
+ flex-wrap: wrap;
72
+ }
73
+ .index-module_lastNode__TXbWG .index-module_markdownItem__AkW22 {
74
+ padding: 2px 4px;
75
+ margin: 4px;
76
+ min-width: 40px;
77
+ height: auto;
78
+ background-color: #ebebeb;
79
+ }
80
+ .index-module_lastNode__TXbWG .index-module_markdownItem__AkW22 .markdown-body {
81
+ background-color: #ebebeb;
82
+ }
83
+ .index-module_form__IypXc {
84
+ margin-bottom: 16px;
85
+ }
86
+
87
+ .index-module_outputDisplay__5dS48 .index-module_title__vhMCp {
88
+ line-height: 32px;
89
+ margin-bottom: 8px;
90
+ }
91
+ .index-module_outputDisplay__5dS48 .index-module_content__Iml6l {
92
+ border: 1px solid #d9d9d9;
93
+ min-height: 100px;
94
+ overflow: auto;
95
+ max-height: 200px;
96
+ background-color: #ffffff;
97
+ padding: 4px 12px;
98
+ }
99
+ .index-module_outputDisplay__5dS48 .index-module_content__Iml6l .markdown-body {
100
+ font-size: 14px;
101
+ }
102
+ .index-module_form__rwjRm {
103
+ margin-bottom: 16px;
104
+ }
105
+
106
+ .index-module_outputDisplay__hCLyn .index-module_title__vPA3N {
107
+ line-height: 32px;
108
+ margin-bottom: 8px;
109
+ }
110
+ .index-module_outputDisplay__hCLyn .index-module_content__dl4N9 {
111
+ min-height: 100px;
112
+ overflow: auto;
113
+ max-height: 200px;
114
+ background-color: #ffffff;
115
+ padding: 4px 12px;
116
+ border: 1px solid #d9d9d9;
117
+ }
118
+ .index-module_outputDisplay__hCLyn .index-module_content__dl4N9 .markdown-body {
119
+ font-size: 14px;
120
+ }
121
+
122
+ .index-module_textTitle__o8hrm {
123
+ font-size: 16px;
124
+ line-height: 22px;
125
+ font-weight: 500;
126
+ color: #333333;
127
+ margin-bottom: 8px;
128
+ white-space: pre-wrap;
129
+ word-break: break-all;
130
+ }
131
+ .index-module_timeSliceInputContainer__579hr {
132
+ height: 120px;
133
+ padding: 16px;
134
+ }
135
+ .index-module_timeSliceInputContainer__579hr .index-module_title__9kdsk {
136
+ margin-bottom: 16px;
137
+ margin-bottom: 8px;
138
+ color: rgba(0, 0, 0, 0.85);
139
+ font-weight: 500;
140
+ font-size: 14px;
141
+ font-family: SourceHanSansCN-Medium;
142
+ }
143
+ .index-module_timeSliceInputContainer__579hr .index-module_inputWrapper__uXmv- {
144
+ display: flex;
145
+ flex-direction: column;
146
+ align-items: center;
147
+ }
148
+ .index-module_timeSliceInputContainer__579hr .index-module_inputWrapper__uXmv- .index-module_getCurr__-dchP {
149
+ margin-top: 8px;
150
+ color: #666fff;
151
+ font-size: 12px;
152
+ cursor: pointer;
153
+ }
154
+ .index-module_timeSliceInputContainer__579hr .index-module_inputWrapper__uXmv- .index-module_getCurr__-dchP.index-module_disabled__j6aK6 {
155
+ color: #ccc;
156
+ cursor: not-allowed;
157
+ }
158
+ .index-module_timeSliceInputContainer__579hr .index-module_inputContainer__PqtI8 {
159
+ display: flex;
160
+ }
161
+ .index-module_timeSliceInputContainer__579hr .index-module_inputContainer__PqtI8 .index-module_inputWrapper__uXmv- {
162
+ width: 92px;
163
+ }
164
+ .index-module_timeSliceInputContainer__579hr .index-module_inputContainer__PqtI8 .index-module_spliter__wXZhC {
165
+ flex: 1;
166
+ }
167
+ .index-module_textOverflow__HcSP3 {
168
+ overflow: hidden;
169
+ white-space: nowrap;
170
+ text-overflow: ellipsis;
171
+ }
172
+ .index-module_videoTrackContainer__0oBy3 {
173
+ position: absolute;
174
+ bottom: 0px;
175
+ width: 100%;
176
+ overflow-x: hidden;
177
+ overflow-y: auto;
178
+ background-color: #333333;
179
+ }
180
+ .index-module_videoTrackContainer__0oBy3 .index-module_timeTrack__f--CU {
181
+ height: 24px;
182
+ border-bottom: 1px solid #555555;
183
+ box-sizing: border-box;
184
+ }
185
+ .index-module_videoTrackContainer__0oBy3 .index-module_videoTrack__auEud {
186
+ display: flex;
187
+ flex-direction: column-reverse;
188
+ height: 90px;
189
+ overflow-x: hidden;
190
+ overflow-y: auto;
191
+ }
192
+ .index-module_videoTrackContainer__0oBy3 .index-module_videoTrack__auEud .index-module_track__N8mLd {
193
+ position: relative;
194
+ flex: 0 0 45px;
195
+ border-bottom: 1px solid #555555;
196
+ box-sizing: border-box;
197
+ }
198
+ .index-module_videoTrackContainer__0oBy3 .index-module_timeline__GppcX {
199
+ position: absolute;
200
+ top: 50%;
201
+ transform: translateY(-50%);
202
+ display: inline-block;
203
+ height: 100%;
204
+ top: 0;
205
+ left: 0;
206
+ width: 2px;
207
+ z-index: 10;
208
+ height: 100%;
209
+ }
210
+ .index-module_videoTrackContainer__0oBy3 .index-module_displayTime__h0Lg7 {
211
+ position: absolute;
212
+ top: 0;
213
+ left: -1;
214
+ z-index: 11;
215
+ width: 68px;
216
+ padding: 5px;
217
+ color: black;
218
+ font-size: 14px;
219
+ }
220
+
221
+ .index-module_textOverflow__jf6jA {
222
+ white-space: nowrap;
223
+ overflow: hidden;
224
+ text-overflow: ellipsis;
225
+ }
226
+ .index-module_clipToolbar__amC2X {
227
+ display: flex;
228
+ vertical-align: middle;
229
+ }
230
+ .index-module_clipToolbar__amC2X .index-module_buttonWrapper__o1C44 {
231
+ display: flex;
232
+ margin-left: 16px;
233
+ }
234
+ .index-module_clipToolbar__amC2X .index-module_cutButton__M6mOs,
235
+ .index-module_clipToolbar__amC2X .index-module_localButton__6D1-H {
236
+ display: inline-block;
237
+ align-self: center;
238
+ width: 20px;
239
+ height: 20px;
240
+ margin-right: 5px;
241
+ color: #bbbbbb;
242
+ cursor: pointer;
243
+ }
244
+ .index-module_clipToolbar__amC2X .index-module_cutButton__M6mOs {
245
+ margin-left: 20px;
246
+ }
247
+ .index-module_clipToolbar__amC2X .index-module_localButton__6D1-H {
248
+ margin-left: 10px;
249
+ }
250
+ .index-module_timeSliceListContent__gvFHy {
251
+ height: 224px;
252
+ overflow-y: auto;
253
+ font-size: 12px;
254
+ background-color: #fafafa;
255
+ }
256
+ .index-module_timeSliceListContent__gvFHy.index-module_empty__wcFM6 {
257
+ display: flex;
258
+ justify-content: center;
259
+ }
260
+ .index-module_timeSliceListContent__gvFHy.index-module_empty__wcFM6 .index-module_noContent__zjGb0 {
261
+ align-self: center;
262
+ color: #999999;
263
+ }
264
+ .index-module_timeSliceListContent__gvFHy.index-module_empty__wcFM6 .index-module_noContent__zjGb0 > div {
265
+ margin-bottom: 10px;
266
+ text-align: center;
267
+ }
268
+ .index-module_timeSliceListContent__gvFHy.index-module_empty__wcFM6 .index-module_noContent__zjGb0 .index-module_hotkey__dDkgv {
269
+ display: inline-block;
270
+ width: 20px;
271
+ height: 20px;
272
+ margin-right: 5px;
273
+ line-height: 20px;
274
+ text-align: center;
275
+ border: 1px #ccc solid;
276
+ }
277
+ .index-module_timeSliceListContent__gvFHy .index-module_timeSliceItem__Xa-cQ {
278
+ display: flex;
279
+ padding: 12px;
280
+ cursor: pointer;
281
+ }
282
+ .index-module_timeSliceListContent__gvFHy .index-module_timeSliceItem__Xa-cQ.index-module_timeSliceItemActivated__Zlb3b {
283
+ color: #666fff;
284
+ background-color: #ebecfb;
285
+ }
286
+ .index-module_timeSliceListContent__gvFHy .index-module_timeSliceItem__Xa-cQ .index-module_timeSliceAttribute__Q5E-f {
287
+ overflow: hidden;
288
+ white-space: nowrap;
289
+ text-overflow: ellipsis;
290
+ }
291
+ .index-module_timeSliceListContent__gvFHy .index-module_timeSliceItem__Xa-cQ .index-module_timeSliceItemContent__Aqa8l {
292
+ flex: 1;
293
+ white-space: nowrap;
294
+ overflow: hidden;
295
+ text-overflow: ellipsis;
296
+ }
297
+ .index-module_timeSliceListContent__gvFHy .index-module_timeSliceItem__Xa-cQ .index-module_timeSliceItemDeleteIcon__nlQ6B {
298
+ align-self: center;
299
+ padding: 5px;
300
+ opacity: 0;
301
+ transition: opacity 0.3s ease-in-out;
302
+ }
303
+ .index-module_timeSliceListContent__gvFHy .index-module_timeSliceItem__Xa-cQ:hover .index-module_timeSliceItemDeleteIcon__nlQ6B {
304
+ opacity: 1;
305
+ }
306
+ .index-module_clipContainer__L8DlL {
307
+ width: 100%;
308
+ height: 100%;
309
+ position: relative;
310
+ display: flex;
311
+ flex-direction: column;
312
+ }
313
+
314
+ .index-module_containerWrapper__49TNa {
315
+ position: relative;
316
+ flex: 1;
317
+ overflow: hidden;
318
+ display: flex;
319
+ flex-direction: column;
320
+ }
321
+
322
+ .video-tool-spinner {
323
+ height: calc(100vh - 60px);
324
+ }
325
+ .video-tool-spinner .ant-spin-container {
326
+ height: 100%;
327
+ }
328
+
329
+ .index-module_clipping__M-9B2 {
330
+ position: absolute;
331
+ top: 80px;
332
+ left: 56px;
333
+ width: 72px;
334
+ height: 24px;
335
+ }
336
+ .index-module_videoTimeSlices__v-2k1 {
337
+ position: absolute;
338
+ top: 0;
339
+ right: 0;
340
+ max-height: calc(100% - 80px - 90px - 24px);
341
+ padding-right: 4px;
342
+ overflow: auto;
343
+ z-index: 22;
344
+ }
345
+
346
+ .index-module_timeSliceWrapper__kebC3 {
347
+ height: 80px;
348
+ margin-bottom: 8px;
349
+ transition: opacity 0.4s ease-in-out;
350
+ opacity: 0.3;
351
+ }
352
+ .index-module_timeSliceWrapper__kebC3.index-module_active__cIGVq {
353
+ opacity: 1;
354
+ }
355
+ .index-module_timeSliceWrapper__kebC3 .index-module_timeSliceItemText__FJFwH,
356
+ .index-module_timeSliceWrapper__kebC3 .index-module_timeSliceItemAttribute__--3E1 {
357
+ height: 40px;
358
+ font-size: 16px;
359
+ color: white;
360
+ }
361
+ .index-module_timeSliceWrapper__kebC3 .index-module_timeSliceItemText__FJFwH {
362
+ background-color: #CCC;
363
+ padding: 8px 24px;
364
+ }
365
+ .index-module_timeSliceWrapper__kebC3 .index-module_timeSliceItemAttribute__--3E1 span {
366
+ display: inline-block;
367
+ height: 40px;
368
+ line-height: 40px;
369
+ padding: 0 24px;
370
+ }
27
371
  .index-module_speedControllerWrap__aFz7r {
28
372
  display: flex;
29
373
  color: white;
@@ -1650,6 +1994,13 @@
1650
1994
  overflow-y: scroll;
1651
1995
  }
1652
1996
 
1997
+ .textToolSwitchItem {
1998
+ display: flex;
1999
+ justify-content: space-between;
2000
+ margin-top: 20px;
2001
+ font-size: 12px;
2002
+ }
2003
+
1653
2004
  .textareaContainer {
1654
2005
  position: relative;
1655
2006
  padding: 0;
@@ -1874,11 +2225,20 @@
1874
2225
  flex-direction: column;
1875
2226
  background-color: black;
1876
2227
  overflow: hidden;
2228
+ flex: 1 1;
1877
2229
  }
1878
2230
  .bee-video-wrapper .bee-video-container {
1879
- flex: 1;
2231
+ height: calc(100% - 80px);
1880
2232
  overflow: hidden;
1881
2233
  position: relative;
2234
+ display: flex;
2235
+ flex-direction: column;
2236
+ }
2237
+ .bee-video-wrapper .bee-video-container .bee-video {
2238
+ flex: 1 1;
2239
+ }
2240
+ .bee-video-wrapper .bee-video-container .bee-video-track {
2241
+ height: calc(100% - 90px - 24px);
1882
2242
  }
1883
2243
 
1884
2244
  .bee-video-progress {
@@ -1926,7 +2286,10 @@
1926
2286
  }
1927
2287
 
1928
2288
  .bee-video-controller__wrapper {
1929
- position: relative;
2289
+ position: absolute;
2290
+ bottom: 0px;
2291
+ left: 0px;
2292
+ right: 0px;
1930
2293
  }
1931
2294
 
1932
2295
  .bee-video-controller {
@@ -2454,6 +2817,8 @@
2454
2817
  font-weight: 500;
2455
2818
  font-size: 18px;
2456
2819
  margin-bottom: 24px;
2820
+ display: flex;
2821
+ align-items: center;
2457
2822
  }
2458
2823
  .bee-LLMView__content {
2459
2824
  font-weight: 500;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$1=require("./components/AnnotationView/index.js"),pointCloudAnnotationView=require("./components/AnnotationView/pointCloudAnnotationView.js"),index$2=require("./components/LLMToolView/questionView/index.js"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),reactI18next=require("react-i18next"),reactRedux=require("react-redux"),App=require("./App.js"),configureStore=require("./configureStore.js"),actionCreators=require("./store/annotation/actionCreators.js"),TagToolInstanceAdaptorI18nProvider=require("./components/videoPlayer/TagToolInstanceAdaptorI18nProvider.js"),PointCloudContext=require("./components/pointCloudView/PointCloudContext.js"),ctx=require("./store/ctx.js"),index$4=require("./components/predictTracking/predictTrackingIcon/index.js"),index$3=require("./components/LLMToolView/index.js"),index$5=require("./views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js"),index$6=require("./constant/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,r)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues=(e,t)=>{for(var r in t||(t={}))__hasOwnProp.call(t,r)&&__defNormalProp(e,r,t[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(t))__propIsEnum.call(t,r)&&__defNormalProp(e,r,t[r]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t));const store=configureStore(),OutputApp=(e,t)=>{const[r,a]=React.useState();return React.useImperativeHandle(t,()=>({toolInstance:r,annotationEngine:store.getState().annotation.annotationEngine,pageBackwardActions:()=>store.dispatch(actionCreators.PageBackward()),pageForwardActions:()=>store.dispatch(actionCreators.PageForward()),pageJump:o=>{const n=~~o-1;store.dispatch(actionCreators.PageJump(n))},hello:()=>alert("hello labelBee!!!")}),[r]),React__default.default.createElement(reactRedux.Provider,{store,context:ctx.LabelBeeContext},React__default.default.createElement(reactI18next.I18nextProvider,{i18n:lbUtils.i18n},React__default.default.createElement(PointCloudContext.PointCloudProvider,null,React__default.default.createElement(App,__spreadProps(__spreadValues({},e),{setToolInstance:o=>{var n;a(o),(n=e.onLoad)==null||n.call(e,{toolInstance:o})}})))))};var index=React__default.default.forwardRef(OutputApp);exports.AnnotationView=index$1,exports.PointCloudAnnotationView=pointCloudAnnotationView,exports.QuestionView=index$2.default,Object.defineProperty(exports,"i18n",{enumerable:!0,get:function(){return lbUtils.i18n}}),exports.VideoTagTool=TagToolInstanceAdaptorI18nProvider.VideoTagTool,exports.PredictTracking=index$4,exports.LLMToolView=index$3,exports.SwitchCuboidBoxIn2DView=index$5,Object.defineProperty(exports,"EDataFormatType",{enumerable:!0,get:function(){return index$6.EDataFormatType}}),Object.defineProperty(exports,"ELLMDataType",{enumerable:!0,get:function(){return index$6.ELLMDataType}}),Object.defineProperty(exports,"EStepType",{enumerable:!0,get:function(){return index$6.EStepType}}),Object.defineProperty(exports,"ESubmitType",{enumerable:!0,get:function(){return index$6.ESubmitType}}),exports.componentCls=index$6.componentCls,exports.prefix=index$6.prefix,exports.default=index,exports.store=store;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$1=require("./components/AnnotationView/index.js"),pointCloudAnnotationView=require("./components/AnnotationView/pointCloudAnnotationView.js"),index$2=require("./components/LLMToolView/questionView/index.js"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),reactI18next=require("react-i18next"),reactRedux=require("react-redux"),App=require("./App.js"),configureStore=require("./configureStore.js"),actionCreators=require("./store/annotation/actionCreators.js"),TagToolInstanceAdaptorI18nProvider=require("./components/videoAnnotate/videoTagTool/TagToolInstanceAdaptorI18nProvider.js"),PointCloudContext=require("./components/pointCloudView/PointCloudContext.js"),ctx=require("./store/ctx.js"),index$4=require("./components/predictTracking/predictTrackingIcon/index.js"),index$3=require("./components/LLMToolView/index.js"),index$5=require("./views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js"),index$6=require("./constant/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,r)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues=(e,t)=>{for(var r in t||(t={}))__hasOwnProp.call(t,r)&&__defNormalProp(e,r,t[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(t))__propIsEnum.call(t,r)&&__defNormalProp(e,r,t[r]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t));const store=configureStore(),OutputApp=(e,t)=>{const[r,a]=React.useState();return React.useImperativeHandle(t,()=>({toolInstance:r,annotationEngine:store.getState().annotation.annotationEngine,pageBackwardActions:()=>store.dispatch(actionCreators.PageBackward()),pageForwardActions:()=>store.dispatch(actionCreators.PageForward()),pageJump:o=>{const n=~~o-1;store.dispatch(actionCreators.PageJump(n))},hello:()=>alert("hello labelBee!!!")}),[r]),React__default.default.createElement(reactRedux.Provider,{store,context:ctx.LabelBeeContext},React__default.default.createElement(reactI18next.I18nextProvider,{i18n:lbUtils.i18n},React__default.default.createElement(PointCloudContext.PointCloudProvider,null,React__default.default.createElement(App,__spreadProps(__spreadValues({},e),{setToolInstance:o=>{var n;a(o),(n=e.onLoad)==null||n.call(e,{toolInstance:o})}})))))};var index=React__default.default.forwardRef(OutputApp);exports.AnnotationView=index$1,exports.PointCloudAnnotationView=pointCloudAnnotationView,exports.QuestionView=index$2.default,Object.defineProperty(exports,"i18n",{enumerable:!0,get:function(){return lbUtils.i18n}}),exports.VideoTagTool=TagToolInstanceAdaptorI18nProvider.VideoTagTool,exports.PredictTracking=index$4,exports.LLMToolView=index$3,exports.SwitchCuboidBoxIn2DView=index$5,Object.defineProperty(exports,"EDataFormatType",{enumerable:!0,get:function(){return index$6.EDataFormatType}}),Object.defineProperty(exports,"ELLMDataType",{enumerable:!0,get:function(){return index$6.ELLMDataType}}),Object.defineProperty(exports,"EStepType",{enumerable:!0,get:function(){return index$6.EStepType}}),Object.defineProperty(exports,"ESubmitType",{enumerable:!0,get:function(){return index$6.ESubmitType}}),exports.componentCls=index$6.componentCls,exports.prefix=index$6.prefix,exports.default=index,exports.store=store;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$2=require("../../components/customResizeHook/index.js"),index$1=require("../../constant/index.js"),styleString=require("../../constant/styleString.js"),Actions=require("../Actions.js"),index=require("../../utils/index.js"),AnnotationDataUtils=require("../../utils/AnnotationDataUtils.js"),ConfigUtils=require("../../utils/ConfigUtils.js"),data=require("../../utils/data.js"),StepUtils=require("../../utils/StepUtils.js"),ToolUtils=require("../../utils/ToolUtils.js"),lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),antd=require("antd"),es=require("antd/es"),_=require("lodash"),actionCreators=require("./actionCreators.js"),ToolType=require("../../data/enums/ToolType.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ___default=_interopDefaultLegacy(_),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,s)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,__spreadValues=(e,t)=>{for(var s in t||(t={}))__hasOwnProp.call(t,s)&&__defNormalProp(e,s,t[s]);if(__getOwnPropSymbols)for(var s of __getOwnPropSymbols(t))__propIsEnum.call(t,s)&&__defNormalProp(e,s,t[s]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__async=(e,t,s)=>new Promise((O,a)=>{var A=I=>{try{S(s.next(I))}catch(m){a(m)}},g=I=>{try{S(s.throw(I))}catch(m){a(m)}},S=I=>I.done?O(I.value):Promise.resolve(I.value).then(A,g);S((s=s.apply(e,t)).next())});const getStepConfig=(e,t)=>e.find(s=>s.step===t),initialState={annotationEngine:null,toolInstance:null,imgList:[],config:"{}",imgIndex:-1,basicIndex:0,imgPageSize:1,step:1,stepList:[],imgNode:new Image,basicResultList:[],resultList:[],stepProgress:0,loading:!1,loadPCDFileLoading:!0,triggerEventAfterIndexChanged:!1,pointCloudLoading:!1,checkMode:!1,predictionResult:[],predictionResultVisible:!1,highlightAttribute:""},getTotalPage=e=>{const{imgList:t,imgPageSize:s}=e;return Math.ceil(t.length/s)},calcStepProgress=(e,t)=>e.reduce((s,O)=>{if(O){const a=O.result;if(index.jsonParser(a)[`step_${t}`])return s+1}return s},0)/e.length,updateToolInstance=(e,t)=>{const{step:s,stepList:O}=e,a=StepUtils.getCurrentStepInfo(s,O),A=ConfigUtils.ConfigUtils.jsonParser(a.config);if(ToolUtils.isVideoTool(a==null?void 0:a.tool)||ToolUtils.isAudioTool(a==null?void 0:a.tool)||ToolUtils.isPointCloudTool(a==null?void 0:a.tool)||ToolType.EToolName.LLM===(a==null?void 0:a.tool))return;const g=document.getElementById("toolContainer");if(!g)throw"Not exist dom named id-toolContainer";const S=index$2.getFormatSize({width:window.innerWidth,height:window.innerHeight}),I=new lbAnnotation.AnnotationEngine({container:g,toolName:a.tool,size:S,imgNode:t,config:A,style:JSON.parse(styleString)});return{toolInstance:I==null?void 0:I.toolInstance,annotationEngine:I}},LoadFileAndFileData=(e,t)=>(s,O)=>__async(void 0,null,function*(){var a;const{stepList:A,step:g}=O().annotation,S=StepUtils.currentToolIsVideo(g,A),I=StepUtils.currentToolIsPointCloud(g,A),m=((a=StepUtils.getCurrentStepInfo(g,A))==null?void 0:a.tool)===ToolType.EToolName.LLM,D=StepUtils.currentToolIsAudio(g,A);if(actionCreators.SetAnnotationLoading(s,!0),yield s(TryGetFileDataByAPI(e)),S||I||m||D){s(AfterVideoLoaded(e));return}s(AfterImageLoaded(e,t))}),TryGetFileDataByAPI=e=>(t,s)=>__async(void 0,null,function*(){const{getFileData:O,imgList:a}=s().annotation;if(O){const A=yield O(a[e],e);t({type:Actions.ANNOTATION_ACTIONS.SET_FILE_DATA,payload:{fileData:A,index:e}})}}),AfterVideoLoaded=e=>t=>{actionCreators.SetAnnotationLoading(t,!1),t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterImageLoaded=(e,t)=>(s,O)=>{var a;const{toolInstance:A,imgList:g}=O().annotation,S=(a=g==null?void 0:g[e])==null?void 0:a.url;lbAnnotation.ImgUtils.load(S).then(I=>{actionCreators.SetAnnotationLoading(s,!1),s({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{imgNode:I,nextIndex:e,nextBasicIndex:t}})}).catch(()=>{actionCreators.SetAnnotationLoading(s,!1),A==null||A.setErrorImg(),s({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e,nextBasicIndex:t}})})},composeResultByToolInstance=({toolInstance:e,imgList:t,imgIndex:s,stepList:O,step:a=1})=>{var A,g,S,I;const m=((A=t[s])==null?void 0:A.result)||"",[D,b,U]=(g=e==null?void 0:e.exportData())!=null?g:[],x=(I=(S=e==null?void 0:e.exportCustomData)==null?void 0:S.call(e))!=null?I:{},B=data.composeResultWithBasicImgInfo(m,b),w=data.composeResult(B,{step:a,stepList:O},{rect:D},x);return t.map((R,F)=>F===s?__spreadValues(__spreadProps(__spreadValues({},R),{result:w}),U):__spreadValues({},R))},annotationReducer=(e=__spreadValues({},initialState),t)=>{var s,O,a,A,g,S,I,m,D,b,U,x,B,w,R,F,G,V,M,q,k,H,z;switch(t.type){case Actions.ANNOTATION_ACTIONS.INIT_ALL_STATE:return __spreadValues(__spreadValues({},e),initialState);case Actions.ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE:return __spreadProps(__spreadValues({},e),{toolInstance:t.payload.toolInstance});case Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST:return __spreadProps(__spreadValues({},e),{imgList:t.payload.imgList});case Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS:{const{imgList:n,step:o}=e,i=calcStepProgress(n,o);return __spreadProps(__spreadValues({},e),{stepProgress:i})}case Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA:{const{imgList:n,imgIndex:o,step:i,stepList:r,toolInstance:u,onSubmit:l,resultList:N}=e;if(!u||!n[o])return e;const d=((s=n[o])==null?void 0:s.result)||"",[,c,T]=(O=u==null?void 0:u.exportData())!=null?O:[],p=(A=(a=u==null?void 0:u.exportCustomData)==null?void 0:a.call(u))!=null?A:{},f=data.composeResultWithBasicImgInfo(d,c),C=data.composeResult(f,{step:i,stepList:r},{rect:N},p),L=e.imgList.map((v,E)=>{if(E===o){const h=AnnotationDataUtils.dataCorrection(C,d,i,r);return __spreadValues(__spreadProps(__spreadValues({},v),{result:h}),T)}return v});if(((g=t.payload)==null?void 0:g.submitType)===index$1.ESubmitType.SyncImgList)return __spreadProps(__spreadValues({},e),{imgList:L});l&&l([L[o]],(S=t.payload)==null?void 0:S.submitType,o,L);const y=calcStepProgress(L,i);return __spreadProps(__spreadValues({},e),{stepProgress:y,imgList:L})}case Actions.ANNOTATION_ACTIONS.SAVE_RESULT:{const{imgList:n,imgIndex:o,onSave:i}=e;return i==null||i(n[o],o,n),__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT:{const{imgList:n,basicIndex:o,resultList:i,toolInstance:r,basicResultList:u}=e;if(!r)return e;const[l]=(I=r==null?void 0:r.exportData())!=null?I:[];let N=l;if((u==null?void 0:u.length)>0){const d=(m=u[o])==null?void 0:m.id,c=l.map(T=>__spreadProps(__spreadValues({},T),{sourceID:d}));N=___default.default.cloneDeep(i).filter(T=>T.sourceID!==d),N.push(...c)}return __spreadProps(__spreadValues({},e),{resultList:N,imgList:n})}case Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX:{const{toolInstance:n,step:o,imgList:i,imgIndex:r,stepList:u,annotationEngine:l,resultList:N,basicResultList:d}=e;if(!n||!l)return e;const c=t.payload.basicIndex,T=(D=d[c])==null?void 0:D.id,p=index.jsonParser((b=i[r])==null?void 0:b.result),f=(N||[]).filter(h=>h.sourceID===T),C=getStepConfig(u,o),{dataSourceStep:L,tool:y}=C,v=getStepConfig(u,L);let E=[];return L&&y&&(E=(U=p[`step_${L}`])==null?void 0:U.result,(E==null?void 0:E.length)>0?(l==null||l.setBasicInfo(v.tool,E[c]),l==null||l.launchOperation()):(l==null||l.setBasicInfo(v.tool),l==null||l.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),n==null||n.setResult(f),n==null||n.history.initRecord(f,!0),__spreadProps(__spreadValues({},e),{basicIndex:c})}case Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:{const{triggerEventAfterIndexChanged:n}=t.payload;return __spreadProps(__spreadValues({},e),{triggerEventAfterIndexChanged:!!n})}case Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA:{const{imgList:n,step:o,toolInstance:i,annotationEngine:r,stepList:u}=e;if(!i)return __spreadProps(__spreadValues({},e),{imgIndex:t.payload.nextIndex});const l=StepUtils.getCurrentStepInfo(o,u),{nextIndex:N,imgNode:d,nextBasicIndex:c,imgError:T}=t.payload,p=c!=null?c:0,f=index.jsonParser((x=n[N])==null?void 0:x.result),C=f[`step_${l.step}`],L=!C,y={rotate:(B=f.rotate)!=null?B:0,valid:(w=f.valid)!=null?w:!0};d&&T!==!0?r==null||r.setImgNode(d,y):i==null||i.setValid(y.valid);const v=getStepConfig(u,l.step),{dataSourceStep:E,tool:h}=v,K=getStepConfig(u,E),W=E&&h,P=(F=(R=f[`step_${E}`])==null?void 0:R.result)!=null?F:[],j=AnnotationDataUtils.getInitialResultList(C==null?void 0:C.result,i,v,P,L);if(r==null||r.launchOperation(),W&&((P==null?void 0:P.length)>0?r==null||r.setBasicInfo(K.tool,P[p]):(r==null||r.setBasicInfo(K.tool),r==null||r.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),l.tool!=="check"){const $=(V=(G=P[p])==null?void 0:G.id)!=null?V:"",Y=W?j.filter(J=>lbAnnotation.CommonToolUtils.isSameSourceID(J.sourceID,$)):j;i==null||i.history.initRecord(j,!0),i==null||i.setResult(Y)}return __spreadProps(__spreadValues({},e),{imgIndex:N,basicIndex:p,basicResultList:P,resultList:j})}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_CONFIG:return __spreadProps(__spreadValues({},e),{config:(M=t.payload.config)!=null?M:"{}"});case Actions.ANNOTATION_ACTIONS.SET_TASK_STEP_LIST:{const{stepList:n}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n})}case Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG:{const{stepList:n,step:o}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n,step:o})}case Actions.ANNOTATION_ACTIONS.INIT_TOOL:{const{imgNode:n}=e,o=updateToolInstance(e,n);if(o){const{toolInstance:i,annotationEngine:r}=o;return __spreadProps(__spreadValues({},e),{toolInstance:i,annotationEngine:r})}return __spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SET_TOOL:{const n=(q=t.payload)==null?void 0:q.instance;return n?__spreadProps(__spreadValues({},e),{toolInstance:n}):__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT:return __spreadProps(__spreadValues({},e),{onSubmit:t.payload.onSubmit});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE:return __spreadProps(__spreadValues({},e),{onSave:t.payload.onSave});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_PAGE_CHANGE:return __spreadProps(__spreadValues({},e),{onPageChange:t.payload.onPageChange});case Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT:return __spreadProps(__spreadValues({},e),{predictionResult:t.payload.result});case Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT_VISIBLE:return __spreadProps(__spreadValues({},e),{predictionResultVisible:t.payload.visible});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_STEP_CHANGE:return __spreadProps(__spreadValues({},e),{onStepChange:t.payload.onStepChange});case Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA:return __spreadProps(__spreadValues({},e),{getFileData:t.payload.getFileData});case Actions.ANNOTATION_ACTIONS.UPDATE_PAGE_SIZE:return __spreadProps(__spreadValues({},e),{pageSize:t.payload.pageSize});case Actions.ANNOTATION_ACTIONS.UPDATE_LOAD_FILE_LIST:return __spreadProps(__spreadValues({},e),{loadFileList:t.payload.loadFileList});case Actions.ANNOTATION_ACTIONS.UPDATE_BEFORE_ROTATE:return __spreadProps(__spreadValues({},e),{beforeRotate:t.payload.beforeRotate});case Actions.ANNOTATION_ACTIONS.UPDATE_PRE_DATA_PROCESS:return __spreadProps(__spreadValues({},e),{preDataProcess:t.payload.preDataProcess});case Actions.ANNOTATION_ACTIONS.SKIP_BEFORE_PAGE_TURNING:return __spreadProps(__spreadValues({},e),{skipBeforePageTurning:t.payload.skipBeforePageTurning});case Actions.ANNOTATION_ACTIONS.SET_FILE_DATA:{const{fileData:n,index:o}=t.payload,{imgList:i}=e,r=[...i];return r[o]=__spreadValues(__spreadValues({},r[o]),n),__spreadProps(__spreadValues({},e),{imgList:r})}case Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE:{const{toolInstance:n,beforeRotate:o}=e;return o&&o()===!1||n==null||n.updateRotate(),e}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_VALID:{const{toolInstance:n}=e,o=(k=n==null?void 0:n.valid)!=null?k:!0;return antd.Modal.destroyAll(),antd.Modal.confirm({content:lbUtils.i18n.t(o?"updateValidFromValidToInValid":"updateValidFromInValidToValid"),onOk:()=>{n==null||n.setValid(!o)},okText:lbUtils.i18n.t("Confirm"),cancelText:lbUtils.i18n.t("Cancel")}),e}case Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT:{const{toolInstance:n,imgIndex:o,imgList:i,step:r}=e;if(!n)return e;if(o===0||o>=i.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),e;const u=i[o-1].result;if(!u)return e;const l=AnnotationDataUtils.copyResultChange(u,r,(H=i[o].result)!=null?H:"");i[o]=__spreadProps(__spreadValues({},i[o]),{result:l});const d=index.jsonParser(l)[`step_${r}`],c=(d==null?void 0:d.result)||[];return n==null||n.setResult(c),n==null||n.history.pushHistory(c),(z=n==null?void 0:n.asyncData)==null||z.call(n,i[o]),__spreadProps(__spreadValues({},e),{imgList:[...i]})}case Actions.ANNOTATION_ACTIONS.SET_STEP:{const{stepList:n,annotationEngine:o}=e,{toStep:i}=t.payload;if(!o)return e;const r=getStepConfig(n,i);return o==null||o.setToolName(r.tool,r.config),__spreadProps(__spreadValues({},e),{step:i,toolInstance:o==null?void 0:o.toolInstance})}case Actions.ANNOTATION_ACTIONS.SET_LOADPCDFILE_LOADING:{const{loadPCDFileLoading:n}=t.payload;return __spreadProps(__spreadValues({},e),{loadPCDFileLoading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_LOADING:{const{loading:n}=t.payload;return __spreadProps(__spreadValues({},e),{loading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_POINT_CLOUD_LOADING:{const{pointCloudLoading:n}=t.payload;return __spreadProps(__spreadValues({},e),{pointCloudLoading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_CHECK_MODE:{const{checkMode:n}=t.payload;return __spreadProps(__spreadValues({},e),{checkMode:!!n})}case Actions.ANNOTATION_ACTIONS.SET_HIGHLIGHT_ATTRIBUTE:{const{attribute:n}=t.payload;return __spreadProps(__spreadValues({},e),{highlightAttribute:n})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_TRACK_ID:{const{id:n,newID:o,rangeIndex:i,imgList:r}=t.payload,{imgIndex:u,onSubmit:l}=e,N=[],d=r.map((c,T)=>{if(lbAnnotation.MathUtils.isInRange(T,i)){const p=__spreadProps(__spreadValues({},c),{result:lbUtils.PointCloudUtils.batchUpdateTrackID({id:n,newID:o,result:c.result})});return N.push({imgIndex:T,newInfo:p}),p}return c});return l&&l([d[u]],index$1.ESubmitType.BatchUpdateTrackID,u,d,{updateImgList:N}),__spreadProps(__spreadValues({},e),{imgList:d})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:n,newData:o,rangeIndex:i}=t.payload,{imgList:r,imgIndex:u,onSubmit:l}=e,N=[],d=r.map((c,T)=>{if(lbAnnotation.MathUtils.isInRange(T,i)){const p=__spreadProps(__spreadValues({},c),{result:lbUtils.PointCloudUtils.batchUpdateResultByTrackID({id:n,newData:o,result:c.result})});return N.push({imgIndex:T,newInfo:p}),p}return c});return l&&l([d[u]],index$1.ESubmitType.BatchUpdateTrackID,u,d,{updateImgList:N}),__spreadProps(__spreadValues({},e),{imgList:d})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:{const{onSubmit:n,imgList:o,stepList:i,step:r,predictionResult:u}=e,l={};u.forEach(T=>{const{index:p}=T;l[p]=___default.default.pick(T,["center","width","height","depth","rotation","id","attribute","valid","trackID"])});const N=`step_${r}`,d=[],c=o.map((T,p)=>{if(l[p]){const f=T.result==="{}"?index.jsonParser(data.composeResult("",{step:r,stepList:i},{rect:[]},{})):index.jsonParser(T.result);f[N].result.push(l[p]);const C=__spreadProps(__spreadValues({},T),{result:JSON.stringify(f)});return d.push({imgIndex:p,newInfo:C}),C}return T});return n==null||n(c,index$1.ESubmitType.BatchUpdateImgList,-1,c,{updateImgList:d}),__spreadProps(__spreadValues({},e),{imgList:c})}default:return e}};exports.LoadFileAndFileData=LoadFileAndFileData,exports.annotationReducer=annotationReducer,exports.composeResultByToolInstance=composeResultByToolInstance,exports.getStepConfig=getStepConfig,exports.getTotalPage=getTotalPage;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$2=require("../../components/customResizeHook/index.js"),index$1=require("../../constant/index.js"),styleString=require("../../constant/styleString.js"),Actions=require("../Actions.js"),index=require("../../utils/index.js"),AnnotationDataUtils=require("../../utils/AnnotationDataUtils.js"),ConfigUtils=require("../../utils/ConfigUtils.js"),data=require("../../utils/data.js"),StepUtils=require("../../utils/StepUtils.js"),ToolUtils=require("../../utils/ToolUtils.js"),lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),antd=require("antd"),es=require("antd/es"),_=require("lodash"),actionCreators=require("./actionCreators.js"),ToolType=require("../../data/enums/ToolType.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ___default=_interopDefaultLegacy(_),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,s)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,__spreadValues=(e,t)=>{for(var s in t||(t={}))__hasOwnProp.call(t,s)&&__defNormalProp(e,s,t[s]);if(__getOwnPropSymbols)for(var s of __getOwnPropSymbols(t))__propIsEnum.call(t,s)&&__defNormalProp(e,s,t[s]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__async=(e,t,s)=>new Promise((O,u)=>{var A=I=>{try{S(s.next(I))}catch(m){u(m)}},g=I=>{try{S(s.throw(I))}catch(m){u(m)}},S=I=>I.done?O(I.value):Promise.resolve(I.value).then(A,g);S((s=s.apply(e,t)).next())});const getStepConfig=(e,t)=>e.find(s=>s.step===t),initialState={annotationEngine:null,toolInstance:null,imgList:[],config:"{}",imgIndex:-1,basicIndex:0,imgPageSize:1,step:1,stepList:[],imgNode:new Image,basicResultList:[],resultList:[],stepProgress:0,loading:!1,loadPCDFileLoading:!0,triggerEventAfterIndexChanged:!1,pointCloudLoading:!1,checkMode:!1,predictionResult:[],predictionResultVisible:!1,highlightAttribute:""},getTotalPage=e=>{const{imgList:t,imgPageSize:s}=e;return Math.ceil(t.length/s)},calcStepProgress=(e,t)=>e.reduce((s,O)=>{if(O){const u=O.result;if(index.jsonParser(u)[`step_${t}`])return s+1}return s},0)/e.length,updateToolInstance=(e,t)=>{const{step:s,stepList:O}=e,u=StepUtils.getCurrentStepInfo(s,O),A=ConfigUtils.ConfigUtils.jsonParser(u.config);if(ToolUtils.isVideoTool(u==null?void 0:u.tool)||ToolUtils.isAudioTool(u==null?void 0:u.tool)||ToolUtils.isPointCloudTool(u==null?void 0:u.tool)||ToolType.EToolName.LLM===(u==null?void 0:u.tool))return;const g=document.getElementById("toolContainer");if(!g)throw"Not exist dom named id-toolContainer";const S=index$2.getFormatSize({width:window.innerWidth,height:window.innerHeight}),I=new lbAnnotation.AnnotationEngine({container:g,toolName:u.tool,size:S,imgNode:t,config:A,style:JSON.parse(styleString)});return{toolInstance:I==null?void 0:I.toolInstance,annotationEngine:I}},LoadFileAndFileData=(e,t)=>(s,O)=>__async(void 0,null,function*(){var u;const{stepList:A,step:g}=O().annotation,S=StepUtils.currentToolIsVideo(g,A),I=StepUtils.currentToolIsPointCloud(g,A),m=((u=StepUtils.getCurrentStepInfo(g,A))==null?void 0:u.tool)===ToolType.EToolName.LLM,D=StepUtils.currentToolIsAudio(g,A);if(actionCreators.SetAnnotationLoading(s,!0),yield s(TryGetFileDataByAPI(e)),S||I||m||D){s(AfterVideoLoaded(e));return}s(AfterImageLoaded(e,t))}),TryGetFileDataByAPI=e=>(t,s)=>__async(void 0,null,function*(){const{getFileData:O,imgList:u}=s().annotation;if(O){const A=yield O(u[e],e);t({type:Actions.ANNOTATION_ACTIONS.SET_FILE_DATA,payload:{fileData:A,index:e}})}}),AfterVideoLoaded=e=>t=>{actionCreators.SetAnnotationLoading(t,!1),t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterImageLoaded=(e,t)=>(s,O)=>{var u;const{toolInstance:A,imgList:g}=O().annotation,S=(u=g==null?void 0:g[e])==null?void 0:u.url;lbAnnotation.ImgUtils.load(S).then(I=>{actionCreators.SetAnnotationLoading(s,!1),s({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{imgNode:I,nextIndex:e,nextBasicIndex:t}})}).catch(()=>{actionCreators.SetAnnotationLoading(s,!1),A==null||A.setErrorImg(),s({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e,nextBasicIndex:t}})})},composeResultByToolInstance=({toolInstance:e,imgList:t,imgIndex:s,stepList:O,step:u=1})=>{var A,g,S,I;const m=((A=t[s])==null?void 0:A.result)||"",[D,b,U]=(g=e==null?void 0:e.exportData())!=null?g:[],x=(I=(S=e==null?void 0:e.exportCustomData)==null?void 0:S.call(e))!=null?I:{},B=data.composeResultWithBasicImgInfo(m,b),w=data.composeResult(B,{step:u,stepList:O},{rect:D},x);return t.map((R,F)=>F===s?__spreadValues(__spreadProps(__spreadValues({},R),{result:w}),U):__spreadValues({},R))},annotationReducer=(e=__spreadValues({},initialState),t)=>{var s,O,u,A,g,S,I,m,D,b,U,x,B,w,R,F,G,V,M,q,k,H,z,K,W;switch(t.type){case Actions.ANNOTATION_ACTIONS.INIT_ALL_STATE:return __spreadValues(__spreadValues({},e),initialState);case Actions.ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE:return __spreadProps(__spreadValues({},e),{toolInstance:t.payload.toolInstance});case Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST:return __spreadProps(__spreadValues({},e),{imgList:t.payload.imgList});case Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS:{const{imgList:n,step:o}=e,i=calcStepProgress(n,o);return __spreadProps(__spreadValues({},e),{stepProgress:i})}case Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA:{const{imgList:n,imgIndex:o,step:i,stepList:l,toolInstance:a,onSubmit:r,resultList:N}=e;if(!a||!n[o])return e;const d=((s=n[o])==null?void 0:s.result)||"",[,c,T]=(O=a==null?void 0:a.exportData())!=null?O:[],p=(A=(u=a==null?void 0:a.exportCustomData)==null?void 0:u.call(a))!=null?A:{},f=data.composeResultWithBasicImgInfo(d,c),C=data.composeResult(f,{step:i,stepList:l},{rect:N},p),L=e.imgList.map((v,E)=>{if(E===o){const h=AnnotationDataUtils.dataCorrection(C,d,i,l);return __spreadValues(__spreadProps(__spreadValues({},v),{result:h}),T)}return v});if(((g=t.payload)==null?void 0:g.submitType)===index$1.ESubmitType.SyncImgList)return __spreadProps(__spreadValues({},e),{imgList:L});r&&r([L[o]],(S=t.payload)==null?void 0:S.submitType,o,L);const y=calcStepProgress(L,i);return __spreadProps(__spreadValues({},e),{stepProgress:y,imgList:L})}case Actions.ANNOTATION_ACTIONS.SAVE_RESULT:{const{imgList:n,imgIndex:o,onSave:i}=e;return i==null||i(n[o],o,n),__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT:{const{imgList:n,basicIndex:o,resultList:i,toolInstance:l,basicResultList:a}=e;if(!l)return e;const[r]=(I=l==null?void 0:l.exportData())!=null?I:[];let N=r;if((a==null?void 0:a.length)>0){const d=(m=a[o])==null?void 0:m.id,c=r.map(T=>__spreadProps(__spreadValues({},T),{sourceID:d}));N=___default.default.cloneDeep(i).filter(T=>T.sourceID!==d),N.push(...c)}return __spreadProps(__spreadValues({},e),{resultList:N,imgList:n})}case Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX:{const{toolInstance:n,step:o,imgList:i,imgIndex:l,stepList:a,annotationEngine:r,resultList:N,basicResultList:d}=e;if(!n||!r)return e;const c=t.payload.basicIndex,T=(D=d[c])==null?void 0:D.id,p=index.jsonParser((b=i[l])==null?void 0:b.result),f=(N||[]).filter(h=>h.sourceID===T),C=getStepConfig(a,o),{dataSourceStep:L,tool:y}=C,v=getStepConfig(a,L);let E=[];return L&&y&&(E=(U=p[`step_${L}`])==null?void 0:U.result,(E==null?void 0:E.length)>0?(r==null||r.setBasicInfo(v.tool,E[c]),r==null||r.launchOperation()):(r==null||r.setBasicInfo(v.tool),r==null||r.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),n==null||n.setResult(f),n==null||n.history.initRecord(f,!0),__spreadProps(__spreadValues({},e),{basicIndex:c})}case Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:{const{triggerEventAfterIndexChanged:n}=t.payload;return __spreadProps(__spreadValues({},e),{triggerEventAfterIndexChanged:!!n})}case Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA:{const{imgList:n,step:o,toolInstance:i,annotationEngine:l,stepList:a}=e;if(!i)return __spreadProps(__spreadValues({},e),{imgIndex:t.payload.nextIndex});const r=StepUtils.getCurrentStepInfo(o,a),{nextIndex:N,imgNode:d,nextBasicIndex:c,imgError:T}=t.payload,p=c!=null?c:0,f=index.jsonParser((x=n[N])==null?void 0:x.result),C=f[`step_${r.step}`],L=!C,y={rotate:(B=f.rotate)!=null?B:0,valid:(w=f.valid)!=null?w:!0};d&&T!==!0?l==null||l.setImgNode(d,y):i==null||i.setValid(y.valid);const v=getStepConfig(a,r.step),{dataSourceStep:E,tool:h}=v,$=getStepConfig(a,E),Y=E&&h,P=(F=(R=f[`step_${E}`])==null?void 0:R.result)!=null?F:[],j=AnnotationDataUtils.getInitialResultList(C==null?void 0:C.result,i,v,P,L);if(l==null||l.launchOperation(),Y&&((P==null?void 0:P.length)>0?l==null||l.setBasicInfo($.tool,P[p]):(l==null||l.setBasicInfo($.tool),l==null||l.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),r.tool!=="check"){const J=(V=(G=P[p])==null?void 0:G.id)!=null?V:"",X=Y?j.filter(Z=>lbAnnotation.CommonToolUtils.isSameSourceID(Z.sourceID,J)):j;(M=i==null?void 0:i.history)==null||M.initRecord(j,!0),i==null||i.setResult(X)}return __spreadProps(__spreadValues({},e),{imgIndex:N,basicIndex:p,basicResultList:P,resultList:j})}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_CONFIG:return __spreadProps(__spreadValues({},e),{config:(q=t.payload.config)!=null?q:"{}"});case Actions.ANNOTATION_ACTIONS.SET_TASK_STEP_LIST:{const{stepList:n}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n})}case Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG:{const{stepList:n,step:o}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n,step:o})}case Actions.ANNOTATION_ACTIONS.INIT_TOOL:{const{imgNode:n}=e,o=updateToolInstance(e,n);if(o){const{toolInstance:i,annotationEngine:l}=o;return __spreadProps(__spreadValues({},e),{toolInstance:i,annotationEngine:l})}return __spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SET_TOOL:{const n=(k=t.payload)==null?void 0:k.instance;return n?__spreadProps(__spreadValues({},e),{toolInstance:n}):__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT:return __spreadProps(__spreadValues({},e),{onSubmit:t.payload.onSubmit});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE:return __spreadProps(__spreadValues({},e),{onSave:t.payload.onSave});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_PAGE_CHANGE:return __spreadProps(__spreadValues({},e),{onPageChange:t.payload.onPageChange});case Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT:return __spreadProps(__spreadValues({},e),{predictionResult:t.payload.result});case Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT_VISIBLE:return __spreadProps(__spreadValues({},e),{predictionResultVisible:t.payload.visible});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_STEP_CHANGE:return __spreadProps(__spreadValues({},e),{onStepChange:t.payload.onStepChange});case Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA:return __spreadProps(__spreadValues({},e),{getFileData:t.payload.getFileData});case Actions.ANNOTATION_ACTIONS.UPDATE_PAGE_SIZE:return __spreadProps(__spreadValues({},e),{pageSize:t.payload.pageSize});case Actions.ANNOTATION_ACTIONS.UPDATE_LOAD_FILE_LIST:return __spreadProps(__spreadValues({},e),{loadFileList:t.payload.loadFileList});case Actions.ANNOTATION_ACTIONS.UPDATE_BEFORE_ROTATE:return __spreadProps(__spreadValues({},e),{beforeRotate:t.payload.beforeRotate});case Actions.ANNOTATION_ACTIONS.UPDATE_PRE_DATA_PROCESS:return __spreadProps(__spreadValues({},e),{preDataProcess:t.payload.preDataProcess});case Actions.ANNOTATION_ACTIONS.SKIP_BEFORE_PAGE_TURNING:return __spreadProps(__spreadValues({},e),{skipBeforePageTurning:t.payload.skipBeforePageTurning});case Actions.ANNOTATION_ACTIONS.SET_FILE_DATA:{const{fileData:n,index:o}=t.payload,{imgList:i}=e,l=[...i];return l[o]=__spreadValues(__spreadValues({},l[o]),n),__spreadProps(__spreadValues({},e),{imgList:l})}case Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE:{const{toolInstance:n,beforeRotate:o}=e;return o&&o()===!1||(H=n==null?void 0:n.updateRotate)==null||H.call(n),e}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_VALID:{const{toolInstance:n}=e,o=(z=n==null?void 0:n.valid)!=null?z:!0;return antd.Modal.destroyAll(),antd.Modal.confirm({content:lbUtils.i18n.t(o?"updateValidFromValidToInValid":"updateValidFromInValidToValid"),onOk:()=>{n==null||n.setValid(!o)},okText:lbUtils.i18n.t("Confirm"),cancelText:lbUtils.i18n.t("Cancel")}),e}case Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT:{const{toolInstance:n,imgIndex:o,imgList:i,step:l}=e;if(!n)return e;if(o===0||o>=i.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),e;const a=i[o-1].result;if(!a)return e;const r=AnnotationDataUtils.copyResultChange(a,l,(K=i[o].result)!=null?K:"");i[o]=__spreadProps(__spreadValues({},i[o]),{result:r});const d=index.jsonParser(r)[`step_${l}`],c=(d==null?void 0:d.result)||[];return n==null||n.setResult(c),n==null||n.history.pushHistory(c),(W=n==null?void 0:n.asyncData)==null||W.call(n,i[o]),__spreadProps(__spreadValues({},e),{imgList:[...i]})}case Actions.ANNOTATION_ACTIONS.SET_STEP:{const{stepList:n,annotationEngine:o}=e,{toStep:i}=t.payload;if(!o)return e;const l=getStepConfig(n,i);return o==null||o.setToolName(l.tool,l.config),__spreadProps(__spreadValues({},e),{step:i,toolInstance:o==null?void 0:o.toolInstance})}case Actions.ANNOTATION_ACTIONS.SET_LOADPCDFILE_LOADING:{const{loadPCDFileLoading:n}=t.payload;return __spreadProps(__spreadValues({},e),{loadPCDFileLoading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_LOADING:{const{loading:n}=t.payload;return __spreadProps(__spreadValues({},e),{loading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_POINT_CLOUD_LOADING:{const{pointCloudLoading:n}=t.payload;return __spreadProps(__spreadValues({},e),{pointCloudLoading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_CHECK_MODE:{const{checkMode:n}=t.payload;return __spreadProps(__spreadValues({},e),{checkMode:!!n})}case Actions.ANNOTATION_ACTIONS.SET_HIGHLIGHT_ATTRIBUTE:{const{attribute:n}=t.payload;return __spreadProps(__spreadValues({},e),{highlightAttribute:n})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_TRACK_ID:{const{id:n,newID:o,rangeIndex:i,imgList:l}=t.payload,{imgIndex:a,onSubmit:r}=e,N=[],d=l.map((c,T)=>{if(lbAnnotation.MathUtils.isInRange(T,i)){const p=__spreadProps(__spreadValues({},c),{result:lbUtils.PointCloudUtils.batchUpdateTrackID({id:n,newID:o,result:c.result})});return N.push({imgIndex:T,newInfo:p}),p}return c});return r&&r([d[a]],index$1.ESubmitType.BatchUpdateTrackID,a,d,{updateImgList:N}),__spreadProps(__spreadValues({},e),{imgList:d})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:n,newData:o,rangeIndex:i}=t.payload,{imgList:l,imgIndex:a,onSubmit:r}=e,N=[],d=l.map((c,T)=>{if(lbAnnotation.MathUtils.isInRange(T,i)){const p=__spreadProps(__spreadValues({},c),{result:lbUtils.PointCloudUtils.batchUpdateResultByTrackID({id:n,newData:o,result:c.result})});return N.push({imgIndex:T,newInfo:p}),p}return c});return r&&r([d[a]],index$1.ESubmitType.BatchUpdateTrackID,a,d,{updateImgList:N}),__spreadProps(__spreadValues({},e),{imgList:d})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:{const{onSubmit:n,imgList:o,stepList:i,step:l,predictionResult:a}=e,r={};a.forEach(T=>{const{index:p}=T;r[p]=___default.default.pick(T,["center","width","height","depth","rotation","id","attribute","valid","trackID"])});const N=`step_${l}`,d=[],c=o.map((T,p)=>{if(r[p]){const f=T.result==="{}"?index.jsonParser(data.composeResult("",{step:l,stepList:i},{rect:[]},{})):index.jsonParser(T.result);f[N].result.push(r[p]);const C=__spreadProps(__spreadValues({},T),{result:JSON.stringify(f)});return d.push({imgIndex:p,newInfo:C}),C}return T});return n==null||n(c,index$1.ESubmitType.BatchUpdateImgList,-1,c,{updateImgList:d}),__spreadProps(__spreadValues({},e),{imgList:c})}default:return e}};exports.LoadFileAndFileData=LoadFileAndFileData,exports.annotationReducer=annotationReducer,exports.composeResultByToolInstance=composeResultByToolInstance,exports.getStepConfig=getStepConfig,exports.getTotalPage=getTotalPage;
@@ -2,7 +2,7 @@ import { IPointCloudBox } from '@labelbee/lb-utils';
2
2
  import React from 'react';
3
3
  import { ToolInstance } from './store/annotation/types';
4
4
  import { GetFileData, IFileItem, LoadFileList, OnPageChange, OnSave, OnStepChange, OnSubmit } from './types/data';
5
- import { Header, RenderFooter, Sider, TDrawLayerSlot } from './types/main';
5
+ import { Header, RenderFooter, Sider, DrawLayerSlot } from './types/main';
6
6
  import { IStepInfo } from './types/step';
7
7
  import { EPointCloudName } from '@labelbee/lb-annotation';
8
8
  interface IAnnotationStyle {
@@ -60,7 +60,7 @@ export interface AppProps {
60
60
  leftSider?: () => React.ReactNode | React.ReactNode;
61
61
  skipBeforePageTurning?: (pageTurning: Function) => void;
62
62
  beforeRotate?: () => boolean;
63
- drawLayerSlot?: TDrawLayerSlot;
63
+ drawLayerSlot?: DrawLayerSlot;
64
64
  dataInjectionAtCreation: (annotationData: any) => {};
65
65
  renderEnhance: {
66
66
  staticRender?: (canvas: HTMLCanvasElement, data: any, style: IAnnotationStyle) => void;
@@ -5,6 +5,7 @@ interface IProps {
5
5
  textEditObject: ITextList;
6
6
  updateValue: (changeValue: string) => void;
7
7
  checkMode?: boolean;
8
+ answerIndex: number;
8
9
  }
9
10
  declare const TextEditor: (props: IProps) => React.JSX.Element;
10
11
  export default TextEditor;
@@ -62,6 +62,7 @@ export interface ITextList {
62
62
  value?: string;
63
63
  isFillAnswer?: boolean;
64
64
  textControl?: boolean;
65
+ isLaText?: boolean;
65
66
  }
66
67
  export interface IWaitAnswerSort {
67
68
  title: number;
@@ -8,5 +8,5 @@ interface IProps extends IA2MapStateProps {
8
8
  }
9
9
  declare const _default: import("react-redux").ConnectedComponent<React.FC<AppProps & IProps>, import("react-redux").Omit<AppProps & IProps & {
10
10
  children?: React.ReactNode;
11
- }, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "currentData" | "stepInfo" | "configString">>;
11
+ }, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "stepInfo" | "currentData" | "configString">>;
12
12
  export default _default;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @file Latex config
3
+ * Markdown renders introverted formulas by default('\\textstyle').
4
+ * If special formulas need to be displayed up and down, you need to add '\\displaystyle'
5
+ * @author lixinghua <lixinghua_vendor@sensetime.com>
6
+ * @date 2023-11-28
7
+ */
8
+ export declare const latexList: {
9
+ key: string;
10
+ label: string;
11
+ children: {
12
+ key: string;
13
+ label: string;
14
+ children: {
15
+ key: string;
16
+ }[];
17
+ }[];
18
+ }[];
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @file LatexEditor
3
+ * @author lixinghua <lixinghua_vendor@sensetime.com>
4
+ * @date 2023.11.28
5
+ */
6
+ import React from 'react';
7
+ interface IProps {
8
+ onSelectLatex: (value: string) => void;
9
+ disabled?: boolean;
10
+ }
11
+ declare const LatexEditor: ({ onSelectLatex, disabled }: IProps) => React.JSX.Element;
12
+ export default LatexEditor;
@@ -23,5 +23,5 @@ interface IProps extends IA2MapStateProps {
23
23
  isEnlargeTopView?: boolean;
24
24
  checkMode?: boolean;
25
25
  }
26
- declare const _default: import("react-redux").ConnectedComponent<({ currentData, config, thumbnailWidth, isEnlargeTopView, highlightAttribute, loadPCDFileLoading, checkMode, }: IProps) => React.JSX.Element | null, import("react-redux").Omit<IProps, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "currentData" | "stepInfo" | "configString">>;
26
+ declare const _default: import("react-redux").ConnectedComponent<({ currentData, config, thumbnailWidth, isEnlargeTopView, highlightAttribute, loadPCDFileLoading, checkMode, }: IProps) => React.JSX.Element | null, import("react-redux").Omit<IProps, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "stepInfo" | "currentData" | "configString">>;
27
27
  export default _default;
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  import { IA2MapStateProps } from '@/store/annotation/map';
3
3
  declare const _default: import("react-redux").ConnectedComponent<React.FC<IA2MapStateProps>, import("react-redux").Omit<IA2MapStateProps & {
4
4
  children?: React.ReactNode;
5
- }, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "currentData" | "stepInfo" | "configString">>;
5
+ }, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "stepInfo" | "currentData" | "configString">>;
6
6
  export default _default;
@@ -3,5 +3,5 @@ import { IA2MapStateProps } from '@/store/annotation/map';
3
3
  interface IProps {
4
4
  checkMode?: boolean;
5
5
  }
6
- declare const _default: import("react-redux").ConnectedComponent<({ currentData, config, checkMode }: IA2MapStateProps & IProps) => React.JSX.Element, import("react-redux").Omit<IA2MapStateProps & IProps, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "currentData" | "stepInfo" | "configString">>;
6
+ declare const _default: import("react-redux").ConnectedComponent<({ currentData, config, checkMode }: IA2MapStateProps & IProps) => React.JSX.Element, import("react-redux").Omit<IA2MapStateProps & IProps, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "stepInfo" | "currentData" | "configString">>;
7
7
  export default _default;
@@ -7,5 +7,5 @@ interface IProps extends IA2MapStateProps {
7
7
  }
8
8
  declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
9
9
  children?: React.ReactNode;
10
- }, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "currentData" | "stepInfo" | "configString">>;
10
+ }, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "stepInfo" | "currentData" | "configString">>;
11
11
  export default _default;
@@ -5,5 +5,5 @@ interface IProps extends IA2MapStateProps {
5
5
  }
6
6
  declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
7
7
  children?: React.ReactNode;
8
- }, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "currentData" | "stepInfo" | "configString">>;
8
+ }, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "stepInfo" | "currentData" | "configString">>;
9
9
  export default _default;
@@ -3,5 +3,5 @@ import React from 'react';
3
3
  interface IProps extends IA2MapStateProps {
4
4
  checkMode?: boolean;
5
5
  }
6
- declare const _default: import("react-redux").ConnectedComponent<({ currentData, highlightAttribute }: IProps) => React.JSX.Element | null, import("react-redux").Omit<IProps, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "currentData" | "stepInfo" | "configString">>;
6
+ declare const _default: import("react-redux").ConnectedComponent<({ currentData, highlightAttribute }: IProps) => React.JSX.Element | null, import("react-redux").Omit<IProps, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "stepInfo" | "currentData" | "configString">>;
7
7
  export default _default;
@@ -7,5 +7,5 @@ interface IProps extends IA2MapStateProps {
7
7
  }
8
8
  declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
9
9
  children?: React.ReactNode;
10
- }, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "currentData" | "stepInfo" | "configString">>;
10
+ }, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "stepInfo" | "currentData" | "configString">>;
11
11
  export default _default;
@@ -5,5 +5,5 @@ interface IProps {
5
5
  }
6
6
  declare const _default: import("react-redux").ConnectedComponent<React.FC<IA2MapStateProps & IProps>, import("react-redux").Omit<IA2MapStateProps & IProps & {
7
7
  children?: React.ReactNode;
8
- }, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "currentData" | "stepInfo" | "configString">>;
8
+ }, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "stepInfo" | "currentData" | "configString">>;
9
9
  export default _default;