@labelbee/lb-components 1.20.0 → 1.21.0-alpha.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.
- package/dist/assets/annotation/video/icon_timePoint.svg.js +1 -0
- package/dist/assets/annotation/video/icon_videoCut.svg.js +1 -0
- package/dist/assets/annotation/video/icon_videoCutting.svg.js +1 -0
- package/dist/components/audioAnnotate/textInput/index.js +1 -1
- package/dist/components/videoAnnotate/index.js +1 -1
- package/dist/components/videoAnnotate/videoClipTool/VideoClipToolContext.js +1 -0
- package/dist/components/videoAnnotate/videoClipTool/components/ToolTipForClip.js +1 -0
- package/dist/components/videoAnnotate/videoClipTool/components/annotatedList/index.js +1 -0
- package/dist/components/videoAnnotate/videoClipTool/components/annotatedList/index.module.scss.js +1 -0
- package/dist/components/videoAnnotate/videoClipTool/components/resizableSnippet/index.js +1 -0
- package/dist/components/videoAnnotate/videoClipTool/components/resizableSnippet/index.module.scss.js +1 -0
- package/dist/components/videoAnnotate/videoClipTool/components/timeSliceRange/index.js +1 -0
- package/dist/components/videoAnnotate/videoClipTool/components/timeSliceRange/index.module.scss.js +1 -0
- package/dist/components/videoAnnotate/videoClipTool/components/videoClipToolHotkey/index.js +1 -0
- package/dist/components/videoAnnotate/videoClipTool/components/videoClipToolHotkey/index.module.scss.js +1 -0
- package/dist/components/videoAnnotate/videoClipTool/components/videoTimeSlicesOverVideo/index.js +1 -0
- package/dist/components/videoAnnotate/videoClipTool/components/videoTimeSlicesOverVideo/index.module.scss.js +1 -0
- package/dist/components/videoAnnotate/videoClipTool/components/videoTrack/index.js +1 -0
- package/dist/components/videoAnnotate/videoClipTool/components/videoTrack/index.module.scss.js +1 -0
- package/dist/components/videoAnnotate/videoClipTool/constant.js +1 -0
- package/dist/components/videoAnnotate/videoClipTool/index.js +1 -0
- package/dist/components/videoAnnotate/videoClipTool/index.module.scss.js +1 -0
- package/dist/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -0
- package/dist/components/videoAnnotate/videoTextTool/index.js +1 -0
- package/dist/components/videoPlayer/VideoTagLayer.js +1 -1
- package/dist/components/videoPlayer/VideoTextLayer.js +2 -0
- package/dist/components/videoPlayer/components/controller/index.js +1 -1
- package/dist/components/videoPlayer/index.js +1 -1
- package/dist/components/videoPlayer/utils.js +1 -1
- package/dist/index.css +261 -2
- package/dist/index.js +1 -1
- package/dist/store/annotation/reducer.js +1 -1
- package/dist/types/App.d.ts +2 -2
- package/dist/types/components/audioAnnotate/index.d.ts +1 -1
- package/dist/types/components/pointCloudView/PointCloud2DView.d.ts +1 -1
- package/dist/types/components/pointCloudView/PointCloud3DView.d.ts +1 -1
- package/dist/types/components/pointCloudView/PointCloudBackView.d.ts +1 -1
- package/dist/types/components/pointCloudView/PointCloudListener.d.ts +1 -1
- package/dist/types/components/pointCloudView/PointCloudSegment.d.ts +1 -1
- package/dist/types/components/pointCloudView/PointCloudSegment2DView.d.ts +1 -1
- package/dist/types/components/pointCloudView/PointCloudSegmentListener.d.ts +1 -1
- package/dist/types/components/pointCloudView/PointCloudSideView.d.ts +1 -1
- package/dist/types/components/pointCloudView/PointCloudTopView.d.ts +3 -3
- package/dist/types/components/pointCloudView/index.d.ts +3 -3
- package/dist/types/components/videoAnnotate/index.d.ts +18 -7
- package/dist/types/components/videoAnnotate/videoClipTool/VideoClipToolContext.d.ts +27 -0
- package/dist/types/components/videoAnnotate/videoClipTool/components/ToolTipForClip.d.ts +8 -0
- package/dist/types/components/videoAnnotate/videoClipTool/components/annotatedList/index.d.ts +7 -0
- package/dist/types/components/videoAnnotate/videoClipTool/components/resizableSnippet/index.d.ts +14 -0
- package/dist/types/components/videoAnnotate/videoClipTool/components/timeSliceRange/index.d.ts +18 -0
- package/dist/types/components/videoAnnotate/videoClipTool/components/videoClipToolHotkey/index.d.ts +6 -0
- package/dist/types/components/videoAnnotate/videoClipTool/components/videoTimeSlicesOverVideo/index.d.ts +3 -0
- package/dist/types/components/videoAnnotate/videoClipTool/components/videoTrack/index.d.ts +11 -0
- package/dist/types/components/videoAnnotate/videoClipTool/constant.d.ts +26 -0
- package/dist/types/components/videoAnnotate/videoClipTool/index.d.ts +131 -0
- package/dist/types/components/{videoPlayer → videoAnnotate/videoTagTool}/TagToolInstanceAdaptor.d.ts +6 -10
- package/dist/types/components/videoAnnotate/videoTextTool/index.d.ts +56 -0
- package/dist/types/components/videoPlayer/VideoTagLayer.d.ts +1 -0
- package/dist/types/components/videoPlayer/VideoTextLayer.d.ts +2 -0
- package/dist/types/components/videoPlayer/components/controller/index.d.ts +4 -2
- package/dist/types/components/videoPlayer/index.d.ts +11 -0
- package/dist/types/components/videoPlayer/utils.d.ts +6 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/views/MainView/sidebar/TextToolSidebar/index.d.ts +2 -1
- package/dist/utils/audio.js +1 -1
- package/dist/views/MainView/LLMLayout/index.js +1 -1
- package/dist/views/MainView/index.js +1 -1
- package/dist/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
- package/dist/views/MainView/sidebar/index.js +1 -1
- package/es/assets/annotation/video/icon_timePoint.svg.js +1 -0
- package/es/assets/annotation/video/icon_videoCut.svg.js +1 -0
- package/es/assets/annotation/video/icon_videoCutting.svg.js +1 -0
- package/es/components/audioAnnotate/textInput/index.js +1 -1
- package/es/components/videoAnnotate/index.js +1 -1
- package/es/components/videoAnnotate/videoClipTool/VideoClipToolContext.js +1 -0
- package/es/components/videoAnnotate/videoClipTool/components/ToolTipForClip.js +1 -0
- package/es/components/videoAnnotate/videoClipTool/components/annotatedList/index.js +1 -0
- package/es/components/videoAnnotate/videoClipTool/components/annotatedList/index.module.scss.js +1 -0
- package/es/components/videoAnnotate/videoClipTool/components/resizableSnippet/index.js +1 -0
- package/es/components/videoAnnotate/videoClipTool/components/resizableSnippet/index.module.scss.js +1 -0
- package/es/components/videoAnnotate/videoClipTool/components/timeSliceRange/index.js +1 -0
- package/es/components/videoAnnotate/videoClipTool/components/timeSliceRange/index.module.scss.js +1 -0
- package/es/components/videoAnnotate/videoClipTool/components/videoClipToolHotkey/index.js +1 -0
- package/es/components/videoAnnotate/videoClipTool/components/videoClipToolHotkey/index.module.scss.js +1 -0
- package/es/components/videoAnnotate/videoClipTool/components/videoTimeSlicesOverVideo/index.js +1 -0
- package/es/components/videoAnnotate/videoClipTool/components/videoTimeSlicesOverVideo/index.module.scss.js +1 -0
- package/es/components/videoAnnotate/videoClipTool/components/videoTrack/index.js +1 -0
- package/es/components/videoAnnotate/videoClipTool/components/videoTrack/index.module.scss.js +1 -0
- package/es/components/videoAnnotate/videoClipTool/constant.js +1 -0
- package/es/components/videoAnnotate/videoClipTool/index.js +1 -0
- package/es/components/videoAnnotate/videoClipTool/index.module.scss.js +1 -0
- package/es/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -0
- package/es/components/videoAnnotate/videoTextTool/index.js +1 -0
- package/es/components/videoPlayer/VideoTagLayer.js +1 -1
- package/es/components/videoPlayer/VideoTextLayer.js +2 -0
- package/es/components/videoPlayer/components/controller/index.js +1 -1
- package/es/components/videoPlayer/index.js +1 -1
- package/es/components/videoPlayer/utils.js +1 -1
- package/es/index.css +261 -2
- package/es/index.js +1 -1
- package/es/store/annotation/reducer.js +1 -1
- package/es/utils/audio.js +1 -1
- package/es/views/MainView/index.js +1 -1
- package/es/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
- package/es/views/MainView/sidebar/index.js +1 -1
- package/package.json +6 -4
- package/dist/components/videoPlayer/TagToolInstanceAdaptor.js +0 -1
- package/es/components/videoPlayer/TagToolInstanceAdaptor.js +0 -1
- /package/dist/components/{videoPlayer → videoAnnotate/videoTagTool}/TagToolInstanceAdaptorI18nProvider.js +0 -0
- /package/dist/types/components/{videoPlayer → videoAnnotate/videoTagTool}/TagToolInstanceAdaptorI18nProvider.d.ts +0 -0
- /package/es/components/{videoPlayer → videoAnnotate/videoTagTool}/TagToolInstanceAdaptorI18nProvider.js +0 -0
package/dist/index.css
CHANGED
|
@@ -128,6 +128,246 @@
|
|
|
128
128
|
white-space: pre-wrap;
|
|
129
129
|
word-break: break-all;
|
|
130
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
|
+
}
|
|
131
371
|
.index-module_speedControllerWrap__aFz7r {
|
|
132
372
|
display: flex;
|
|
133
373
|
color: white;
|
|
@@ -1754,6 +1994,13 @@
|
|
|
1754
1994
|
overflow-y: scroll;
|
|
1755
1995
|
}
|
|
1756
1996
|
|
|
1997
|
+
.textToolSwitchItem {
|
|
1998
|
+
display: flex;
|
|
1999
|
+
justify-content: space-between;
|
|
2000
|
+
margin-top: 20px;
|
|
2001
|
+
font-size: 12px;
|
|
2002
|
+
}
|
|
2003
|
+
|
|
1757
2004
|
.textareaContainer {
|
|
1758
2005
|
position: relative;
|
|
1759
2006
|
padding: 0;
|
|
@@ -1978,11 +2225,20 @@
|
|
|
1978
2225
|
flex-direction: column;
|
|
1979
2226
|
background-color: black;
|
|
1980
2227
|
overflow: hidden;
|
|
2228
|
+
flex: 1 1;
|
|
1981
2229
|
}
|
|
1982
2230
|
.bee-video-wrapper .bee-video-container {
|
|
1983
|
-
|
|
2231
|
+
height: calc(100% - 80px);
|
|
1984
2232
|
overflow: hidden;
|
|
1985
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);
|
|
1986
2242
|
}
|
|
1987
2243
|
|
|
1988
2244
|
.bee-video-progress {
|
|
@@ -2030,7 +2286,10 @@
|
|
|
2030
2286
|
}
|
|
2031
2287
|
|
|
2032
2288
|
.bee-video-controller__wrapper {
|
|
2033
|
-
position:
|
|
2289
|
+
position: absolute;
|
|
2290
|
+
bottom: 0px;
|
|
2291
|
+
left: 0px;
|
|
2292
|
+
right: 0px;
|
|
2034
2293
|
}
|
|
2035
2294
|
|
|
2036
2295
|
.bee-video-controller {
|
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/
|
|
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;
|
package/dist/types/App.d.ts
CHANGED
|
@@ -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,
|
|
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?:
|
|
63
|
+
drawLayerSlot?: DrawLayerSlot;
|
|
64
64
|
dataInjectionAtCreation: (annotationData: any) => {};
|
|
65
65
|
renderEnhance: {
|
|
66
66
|
staticRender?: (canvas: HTMLCanvasElement, data: any, style: IAnnotationStyle) => void;
|
|
@@ -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" | "
|
|
11
|
+
}, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "stepInfo" | "currentData" | "configString">>;
|
|
12
12
|
export default _default;
|
|
@@ -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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
8
|
+
}, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "stepInfo" | "currentData" | "configString">>;
|
|
9
9
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IA2MapStateProps } from '@/store/annotation/map';
|
|
3
|
-
import {
|
|
3
|
+
import { DrawLayerSlot } from '@/types/main';
|
|
4
4
|
interface IProps extends IA2MapStateProps {
|
|
5
|
-
drawLayerSlot?:
|
|
5
|
+
drawLayerSlot?: DrawLayerSlot;
|
|
6
6
|
checkMode?: boolean;
|
|
7
7
|
intelligentFit?: boolean;
|
|
8
8
|
setIsEnlargeTopView: (value: boolean) => void;
|
|
@@ -11,5 +11,5 @@ interface IProps extends IA2MapStateProps {
|
|
|
11
11
|
}
|
|
12
12
|
declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
|
|
13
13
|
children?: React.ReactNode;
|
|
14
|
-
}, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "
|
|
14
|
+
}, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "stepInfo" | "currentData" | "configString">>;
|
|
15
15
|
export default _default;
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
* @date 2022-06-21
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import {
|
|
8
|
+
import { DrawLayerSlot } from '@/types/main';
|
|
9
9
|
import { IA2MapStateProps } from '@/store/annotation/map';
|
|
10
10
|
interface IProps extends IA2MapStateProps {
|
|
11
|
-
drawLayerSlot?:
|
|
11
|
+
drawLayerSlot?: DrawLayerSlot;
|
|
12
12
|
checkMode?: boolean;
|
|
13
13
|
intelligentFit?: boolean;
|
|
14
14
|
}
|
|
15
15
|
declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
|
|
16
16
|
children?: React.ReactNode;
|
|
17
|
-
}, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "
|
|
17
|
+
}, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "stepInfo" | "currentData" | "configString">>;
|
|
18
18
|
export default _default;
|
|
@@ -4,12 +4,23 @@
|
|
|
4
4
|
* @date 2022-06-02
|
|
5
5
|
*/
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
import { DrawLayerSlot } from '@/types/main';
|
|
8
|
+
import { IStepInfo } from '@/types/step';
|
|
9
|
+
import { IFileItem } from '@/types/data';
|
|
10
|
+
export interface IVideoAnnotateProps {
|
|
11
|
+
path: string;
|
|
12
|
+
loading: boolean;
|
|
13
|
+
videoContext?: any;
|
|
14
|
+
stepInfo: IStepInfo;
|
|
15
|
+
step: number;
|
|
16
|
+
stepList: IStepInfo[];
|
|
17
|
+
config: any;
|
|
18
|
+
imgIndex: number;
|
|
19
|
+
imgList: IFileItem[];
|
|
20
|
+
drawLayerSlot?: DrawLayerSlot;
|
|
21
|
+
footer?: any;
|
|
22
|
+
}
|
|
23
|
+
declare const _default: import("react-redux").ConnectedComponent<React.FC<IVideoAnnotateProps>, import("react-redux").Omit<IVideoAnnotateProps & {
|
|
13
24
|
children?: React.ReactNode;
|
|
14
|
-
}, "
|
|
25
|
+
}, "stepList" | "step" | "imgIndex" | "imgList" | "config" | "loading" | "path" | "stepInfo">>;
|
|
15
26
|
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author whq <752342314@qq.com>
|
|
3
|
+
* @file Store for VideoClipTool
|
|
4
|
+
* @date 2023-12-12
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { EClipStatus } from './constant';
|
|
8
|
+
import { IInputList, IVideoTimeSlice } from '@labelbee/lb-utils';
|
|
9
|
+
interface IVideoClipToolContext {
|
|
10
|
+
result: IVideoTimeSlice[];
|
|
11
|
+
selectedID: string;
|
|
12
|
+
attributeList: IInputList[];
|
|
13
|
+
videoPlayer?: any;
|
|
14
|
+
clipStatus: EClipStatus;
|
|
15
|
+
selectedAttribute?: string;
|
|
16
|
+
contextToCancel?: (e: any) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const VideoClipToolContext: React.Context<IVideoClipToolContext>;
|
|
19
|
+
export declare const VideoClipToolContextProvider: React.Provider<IVideoClipToolContext>;
|
|
20
|
+
interface IVideoClipAnnotatedListContext {
|
|
21
|
+
onSelectedTimeSlice: (timeSlice: IVideoTimeSlice) => void;
|
|
22
|
+
removeTimeSlice: (timeSlice: IVideoTimeSlice) => void;
|
|
23
|
+
updateSelectedSliceTimeProperty: (val: number, key: 'start' | 'end') => void;
|
|
24
|
+
}
|
|
25
|
+
export declare const VideoClipAnnotatedListContext: React.Context<IVideoClipAnnotatedListContext>;
|
|
26
|
+
export declare const VideoClipAnnotatedListContextProvider: React.Provider<IVideoClipAnnotatedListContext>;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IVideoTimeSlice, IInputList } from '@labelbee/lb-utils';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const ToolTipForClip: (props: {
|
|
4
|
+
slot: React.ReactElement | undefined;
|
|
5
|
+
item: IVideoTimeSlice;
|
|
6
|
+
attributeList: IInputList[];
|
|
7
|
+
}) => React.JSX.Element | null;
|
|
8
|
+
export default ToolTipForClip;
|
package/dist/types/components/videoAnnotate/videoClipTool/components/resizableSnippet/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
track: any;
|
|
4
|
+
currentTime: number;
|
|
5
|
+
attributeList: any[];
|
|
6
|
+
readonly: boolean;
|
|
7
|
+
onClipping: boolean;
|
|
8
|
+
onTrackResizeStart: () => void;
|
|
9
|
+
onResize: (direction: any, changedPercentage: number) => void;
|
|
10
|
+
style: React.CSSProperties;
|
|
11
|
+
isSelected?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const ResizableSnippet: (props: IProps) => React.JSX.Element;
|
|
14
|
+
export default ResizableSnippet;
|
package/dist/types/components/videoAnnotate/videoClipTool/components/timeSliceRange/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file 视频截取工具,片段截取时间范围
|
|
3
|
+
* @author lijingchi <lijingchi1@sensetime.com>
|
|
4
|
+
* @createdate 2022-11-07
|
|
5
|
+
*/
|
|
6
|
+
import { IVideoTimeSlice } from '@labelbee/lb-utils';
|
|
7
|
+
import React from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* 选中的片段进行时间更新的输入模块
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
declare const TimeSliceRange: ({ selectedTimeSlice, videoPlayer, updateTimeForSelected, disabled, }: {
|
|
13
|
+
selectedTimeSlice?: IVideoTimeSlice | undefined;
|
|
14
|
+
videoPlayer?: any;
|
|
15
|
+
updateTimeForSelected: (val: number, key: 'start' | 'end') => void;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
}) => React.JSX.Element | null;
|
|
18
|
+
export default TimeSliceRange;
|