@labelbee/lb-components 1.6.0-alpha.1 → 1.6.0-alpha.11

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 (230) hide show
  1. package/dist/App.js +1 -1
  2. package/dist/assets/annotation/pointCloudTool/nodata.svg.js +1 -0
  3. package/dist/assets/attributeIcon/eraser.svg.js +1 -0
  4. package/dist/assets/attributeIcon/eraser_a.svg.js +1 -0
  5. package/dist/assets/attributeIcon/pen.svg.js +1 -0
  6. package/dist/assets/attributeIcon/pen_a.svg.js +1 -0
  7. package/dist/components/AnnotationView/index.js +1 -1
  8. package/dist/components/AnnotationView/pointCloudAnnotationView.js +1 -0
  9. package/dist/components/attributeList/index.js +1 -1
  10. package/dist/components/customResizeHook/index.js +1 -1
  11. package/dist/components/pointCloudView/PointCloud2DView.js +1 -1
  12. package/dist/components/pointCloudView/PointCloud3DView.js +1 -1
  13. package/dist/components/pointCloudView/PointCloudBackView.js +1 -1
  14. package/dist/components/pointCloudView/PointCloudContext.js +1 -1
  15. package/dist/components/pointCloudView/PointCloudInfos.js +1 -1
  16. package/dist/components/pointCloudView/PointCloudLayout.js +1 -1
  17. package/dist/components/pointCloudView/PointCloudListener.js +1 -1
  18. package/dist/components/pointCloudView/PointCloudSideView.js +1 -1
  19. package/dist/components/pointCloudView/PointCloudTopView.js +1 -1
  20. package/dist/components/pointCloudView/components/EmptyPage/index.js +1 -0
  21. package/dist/components/pointCloudView/hooks/useBoxes.js +1 -1
  22. package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
  23. package/dist/components/pointCloudView/hooks/usePolygon.js +1 -0
  24. package/dist/components/pointCloudView/hooks/useRotate.js +1 -1
  25. package/dist/components/pointCloudView/hooks/useSingleBox.js +1 -1
  26. package/dist/components/pointCloudView/hooks/useStatus.js +1 -0
  27. package/dist/components/pointCloudView/hooks/useZoom.js +1 -0
  28. package/dist/components/pointCloudView/index.js +1 -1
  29. package/dist/components/videoAnnotate/index.js +1 -1
  30. package/dist/data/enums/ToolType.js +1 -1
  31. package/dist/hooks/annotation.js +1 -1
  32. package/dist/hooks/useSize.js +1 -1
  33. package/dist/index.css +64 -10
  34. package/dist/index.js +1 -1
  35. package/dist/store/Actions.js +1 -1
  36. package/dist/store/annotation/actionCreators.js +1 -1
  37. package/dist/store/annotation/map.js +1 -1
  38. package/dist/store/annotation/reducer.js +1 -1
  39. package/dist/store/ctx.js +1 -0
  40. package/dist/types/App.d.ts +8 -0
  41. package/dist/types/components/AnnotationView/index.d.ts +4 -3
  42. package/dist/types/components/AnnotationView/pointCloudAnnotationView.d.ts +10 -0
  43. package/dist/types/components/attributeList/index.d.ts +1 -0
  44. package/dist/types/components/pointCloudView/PointCloudContext.d.ts +5 -1
  45. package/dist/types/components/pointCloudView/PointCloudLayout.d.ts +1 -0
  46. package/dist/types/components/pointCloudView/components/EmptyPage/index.d.ts +2 -0
  47. package/dist/types/components/pointCloudView/hooks/usePointCloudViews.d.ts +9 -1
  48. package/dist/types/components/pointCloudView/hooks/usePolygon.d.ts +9 -0
  49. package/dist/types/components/pointCloudView/hooks/useStatus.d.ts +11 -0
  50. package/dist/types/components/pointCloudView/hooks/useZoom.d.ts +7 -0
  51. package/dist/types/data/enums/ToolType.d.ts +14 -8
  52. package/dist/types/hooks/annotation.d.ts +14 -2
  53. package/dist/types/hooks/useSize.d.ts +2 -2
  54. package/dist/types/index.d.ts +2 -1
  55. package/dist/types/store/Actions.d.ts +3 -0
  56. package/dist/types/store/annotation/actionCreators.d.ts +11 -1
  57. package/dist/types/store/annotation/types.d.ts +2 -0
  58. package/dist/types/store/ctx.d.ts +4 -0
  59. package/dist/types/utils/data.d.ts +1 -1
  60. package/dist/types/views/MainView/annotationOperation/index.d.ts +3 -0
  61. package/dist/types/views/MainView/sidebar/ScribbleSidebar/index.d.ts +6 -0
  62. package/dist/types/views/MainView/toolFooter/ZoomController/ZoomLevel/index.d.ts +1 -0
  63. package/dist/types/views/MainView/toolFooter/ZoomController/index.d.ts +1 -0
  64. package/dist/types/views/MainView/toolFooter/index.d.ts +2 -1
  65. package/dist/utils/data.js +1 -1
  66. package/dist/views/MainView/annotationOperation/index.js +1 -1
  67. package/dist/views/MainView/annotationTips/index.js +1 -1
  68. package/dist/views/MainView/index.js +1 -1
  69. package/dist/views/MainView/sidebar/AnnotationText/index.js +1 -1
  70. package/dist/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
  71. package/dist/views/MainView/sidebar/GeneralOperation/index.js +1 -1
  72. package/dist/views/MainView/sidebar/GeneralOperation/useOperationList.js +1 -1
  73. package/dist/views/MainView/sidebar/ImgAttributeInfo/index.js +1 -1
  74. package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  75. package/dist/views/MainView/sidebar/ScribbleSidebar/index.js +1 -0
  76. package/dist/views/MainView/sidebar/SwitchAttributeList/index.js +1 -1
  77. package/dist/views/MainView/sidebar/TagSidebar/index.js +1 -1
  78. package/dist/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
  79. package/dist/views/MainView/sidebar/ToolIcons.js +1 -1
  80. package/dist/views/MainView/sidebar/ToolStyle/index.js +1 -1
  81. package/dist/views/MainView/sidebar/index.js +1 -1
  82. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -1
  83. package/dist/views/MainView/toolFooter/FooterTips/index.js +1 -1
  84. package/dist/views/MainView/toolFooter/HiddenTips/index.js +1 -1
  85. package/dist/views/MainView/toolFooter/PageNumber/index.js +1 -1
  86. package/dist/views/MainView/toolFooter/ZoomController/ZoomLevel/index.js +1 -1
  87. package/dist/views/MainView/toolFooter/ZoomController/index.js +1 -1
  88. package/dist/views/MainView/toolFooter/index.js +1 -1
  89. package/dist/views/MainView/toolHeader/ExportData/index.js +1 -1
  90. package/dist/views/MainView/toolHeader/StepSwitch/index.js +1 -1
  91. package/dist/views/MainView/toolHeader/headerOption/index.js +1 -1
  92. package/dist/views/MainView/toolHeader/index.js +1 -1
  93. package/es/App.js +1 -1
  94. package/es/App.js.map +1 -1
  95. package/es/assets/annotation/pointCloudTool/nodata.svg.js +1 -0
  96. package/es/assets/annotation/pointCloudTool/nodata.svg.js.map +1 -0
  97. package/es/assets/attributeIcon/eraser.svg.js +1 -0
  98. package/es/assets/attributeIcon/eraser.svg.js.map +1 -0
  99. package/es/assets/attributeIcon/eraser_a.svg.js +1 -0
  100. package/es/assets/attributeIcon/eraser_a.svg.js.map +1 -0
  101. package/es/assets/attributeIcon/pen.svg.js +1 -0
  102. package/es/assets/attributeIcon/pen.svg.js.map +1 -0
  103. package/es/assets/attributeIcon/pen_a.svg.js +1 -0
  104. package/es/assets/attributeIcon/pen_a.svg.js.map +1 -0
  105. package/es/components/AnnotationView/index.js +1 -1
  106. package/es/components/AnnotationView/index.js.map +1 -1
  107. package/es/components/AnnotationView/pointCloudAnnotationView.js +1 -0
  108. package/es/components/AnnotationView/pointCloudAnnotationView.js.map +1 -0
  109. package/es/components/attributeList/index.js +1 -1
  110. package/es/components/attributeList/index.js.map +1 -1
  111. package/es/components/customResizeHook/index.js +1 -1
  112. package/es/components/customResizeHook/index.js.map +1 -1
  113. package/es/components/pointCloudView/PointCloud2DView.js +1 -1
  114. package/es/components/pointCloudView/PointCloud2DView.js.map +1 -1
  115. package/es/components/pointCloudView/PointCloud3DView.js +1 -1
  116. package/es/components/pointCloudView/PointCloud3DView.js.map +1 -1
  117. package/es/components/pointCloudView/PointCloudBackView.js +1 -1
  118. package/es/components/pointCloudView/PointCloudBackView.js.map +1 -1
  119. package/es/components/pointCloudView/PointCloudContext.js +1 -1
  120. package/es/components/pointCloudView/PointCloudContext.js.map +1 -1
  121. package/es/components/pointCloudView/PointCloudInfos.js +1 -1
  122. package/es/components/pointCloudView/PointCloudInfos.js.map +1 -1
  123. package/es/components/pointCloudView/PointCloudLayout.js +1 -1
  124. package/es/components/pointCloudView/PointCloudLayout.js.map +1 -1
  125. package/es/components/pointCloudView/PointCloudListener.js +1 -1
  126. package/es/components/pointCloudView/PointCloudListener.js.map +1 -1
  127. package/es/components/pointCloudView/PointCloudSideView.js +1 -1
  128. package/es/components/pointCloudView/PointCloudSideView.js.map +1 -1
  129. package/es/components/pointCloudView/PointCloudTopView.js +1 -1
  130. package/es/components/pointCloudView/PointCloudTopView.js.map +1 -1
  131. package/es/components/pointCloudView/components/EmptyPage/index.js +1 -0
  132. package/es/components/pointCloudView/components/EmptyPage/index.js.map +1 -0
  133. package/es/components/pointCloudView/hooks/useBoxes.js +1 -1
  134. package/es/components/pointCloudView/hooks/useBoxes.js.map +1 -1
  135. package/es/components/pointCloudView/hooks/useConfig.js +19 -0
  136. package/es/components/pointCloudView/hooks/useConfig.js.map +1 -0
  137. package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
  138. package/es/components/pointCloudView/hooks/usePointCloudViews.js.map +1 -1
  139. package/es/components/pointCloudView/hooks/usePolygon.js +1 -0
  140. package/es/components/pointCloudView/hooks/usePolygon.js.map +1 -0
  141. package/es/components/pointCloudView/hooks/useRotate.js +1 -1
  142. package/es/components/pointCloudView/hooks/useRotate.js.map +1 -1
  143. package/es/components/pointCloudView/hooks/useSingleBox.js +1 -1
  144. package/es/components/pointCloudView/hooks/useSingleBox.js.map +1 -1
  145. package/es/components/pointCloudView/hooks/useStatus.js +1 -0
  146. package/es/components/pointCloudView/hooks/useStatus.js.map +1 -0
  147. package/es/components/pointCloudView/hooks/useZoom.js +1 -0
  148. package/es/components/pointCloudView/hooks/useZoom.js.map +1 -0
  149. package/es/components/pointCloudView/index.js +1 -1
  150. package/es/components/pointCloudView/index.js.map +1 -1
  151. package/es/components/videoAnnotate/index.js +1 -1
  152. package/es/components/videoAnnotate/index.js.map +1 -1
  153. package/es/data/enums/ToolType.js +1 -1
  154. package/es/data/enums/ToolType.js.map +1 -1
  155. package/es/hooks/annotation.js +1 -1
  156. package/es/hooks/annotation.js.map +1 -1
  157. package/es/hooks/useConfig.js +18 -0
  158. package/es/hooks/useConfig.js.map +1 -0
  159. package/es/hooks/useSize.js +1 -1
  160. package/es/hooks/useSize.js.map +1 -1
  161. package/es/index.css +64 -10
  162. package/es/index.js +1 -1
  163. package/es/index.js.map +1 -1
  164. package/es/store/Actions.js +1 -1
  165. package/es/store/Actions.js.map +1 -1
  166. package/es/store/annotation/actionCreators.js +1 -1
  167. package/es/store/annotation/actionCreators.js.map +1 -1
  168. package/es/store/annotation/map.js +1 -1
  169. package/es/store/annotation/map.js.map +1 -1
  170. package/es/store/annotation/reducer.js +1 -1
  171. package/es/store/annotation/reducer.js.map +1 -1
  172. package/es/store/ctx.js +1 -0
  173. package/es/store/ctx.js.map +1 -0
  174. package/es/utils/data.js +1 -1
  175. package/es/utils/data.js.map +1 -1
  176. package/es/views/MainView/annotationOperation/index.js +1 -1
  177. package/es/views/MainView/annotationOperation/index.js.map +1 -1
  178. package/es/views/MainView/annotationTips/index.js +1 -1
  179. package/es/views/MainView/annotationTips/index.js.map +1 -1
  180. package/es/views/MainView/index.js +1 -1
  181. package/es/views/MainView/index.js.map +1 -1
  182. package/es/views/MainView/sidebar/AnnotationText/index.js +1 -1
  183. package/es/views/MainView/sidebar/AnnotationText/index.js.map +1 -1
  184. package/es/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
  185. package/es/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js.map +1 -1
  186. package/es/views/MainView/sidebar/GeneralOperation/index.js +1 -1
  187. package/es/views/MainView/sidebar/GeneralOperation/index.js.map +1 -1
  188. package/es/views/MainView/sidebar/GeneralOperation/useOperationList.js +1 -1
  189. package/es/views/MainView/sidebar/GeneralOperation/useOperationList.js.map +1 -1
  190. package/es/views/MainView/sidebar/ImgAttributeInfo/index.js +1 -1
  191. package/es/views/MainView/sidebar/ImgAttributeInfo/index.js.map +1 -1
  192. package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  193. package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js.map +1 -1
  194. package/es/views/MainView/sidebar/ScribbleSidebar/index.js +1 -0
  195. package/es/views/MainView/sidebar/ScribbleSidebar/index.js.map +1 -0
  196. package/es/views/MainView/sidebar/SwitchAttributeList/index.js +1 -1
  197. package/es/views/MainView/sidebar/SwitchAttributeList/index.js.map +1 -1
  198. package/es/views/MainView/sidebar/TagSidebar/index.js +1 -1
  199. package/es/views/MainView/sidebar/TagSidebar/index.js.map +1 -1
  200. package/es/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
  201. package/es/views/MainView/sidebar/TextToolSidebar/index.js.map +1 -1
  202. package/es/views/MainView/sidebar/ToolIcons.js +1 -1
  203. package/es/views/MainView/sidebar/ToolIcons.js.map +1 -1
  204. package/es/views/MainView/sidebar/ToolStyle/index.js +1 -1
  205. package/es/views/MainView/sidebar/ToolStyle/index.js.map +1 -1
  206. package/es/views/MainView/sidebar/index.js +1 -1
  207. package/es/views/MainView/sidebar/index.js.map +1 -1
  208. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -1
  209. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js.map +1 -1
  210. package/es/views/MainView/toolFooter/FooterTips/index.js +1 -1
  211. package/es/views/MainView/toolFooter/FooterTips/index.js.map +1 -1
  212. package/es/views/MainView/toolFooter/HiddenTips/index.js +1 -1
  213. package/es/views/MainView/toolFooter/HiddenTips/index.js.map +1 -1
  214. package/es/views/MainView/toolFooter/PageNumber/index.js +1 -1
  215. package/es/views/MainView/toolFooter/PageNumber/index.js.map +1 -1
  216. package/es/views/MainView/toolFooter/ZoomController/ZoomLevel/index.js +1 -1
  217. package/es/views/MainView/toolFooter/ZoomController/ZoomLevel/index.js.map +1 -1
  218. package/es/views/MainView/toolFooter/ZoomController/index.js +1 -1
  219. package/es/views/MainView/toolFooter/ZoomController/index.js.map +1 -1
  220. package/es/views/MainView/toolFooter/index.js +1 -1
  221. package/es/views/MainView/toolFooter/index.js.map +1 -1
  222. package/es/views/MainView/toolHeader/ExportData/index.js +1 -1
  223. package/es/views/MainView/toolHeader/ExportData/index.js.map +1 -1
  224. package/es/views/MainView/toolHeader/StepSwitch/index.js +1 -1
  225. package/es/views/MainView/toolHeader/StepSwitch/index.js.map +1 -1
  226. package/es/views/MainView/toolHeader/headerOption/index.js +1 -1
  227. package/es/views/MainView/toolHeader/headerOption/index.js.map +1 -1
  228. package/es/views/MainView/toolHeader/index.js +1 -1
  229. package/es/views/MainView/toolHeader/index.js.map +1 -1
  230. package/package.json +5 -6
package/dist/index.css CHANGED
@@ -26,6 +26,7 @@
26
26
  border-bottom: 1px solid #eee;
27
27
  }
28
28
  .bee-layout__content {
29
+ position: relative;
29
30
  display: flex;
30
31
  flex-direction: column;
31
32
  flex: 1;
@@ -469,6 +470,31 @@
469
470
  .bee-sidebar #style-borderOpacity .ant-slider-rail {
470
471
  background: linear-gradient(to right, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 20%, rgba(0, 0, 0, 0.4) 20%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.6) 40%, rgba(0, 0, 0, 0.6) 60%, rgba(0, 0, 0, 0.8) 60%, rgba(0, 0, 0, 0.8) 80%, rgb(0, 0, 0) 80%, rgb(0, 0, 0) 100%);
471
472
  }
473
+ .bee-sidebar .bee-scribble {
474
+ padding: 20px;
475
+ width: 100%;
476
+ }
477
+ .bee-sidebar .bee-scribble__select {
478
+ display: flex;
479
+ justify-content: center;
480
+ cursor: pointer;
481
+ }
482
+ .bee-sidebar .bee-scribble__select img {
483
+ width: 12px;
484
+ margin: 0px 10px;
485
+ }
486
+ .bee-sidebar .bee-scribble__silder {
487
+ display: flex;
488
+ align-items: center;
489
+ justify-content: center;
490
+ }
491
+ .bee-sidebar .bee-scribble__circle {
492
+ display: block;
493
+ width: 5px;
494
+ height: 5px;
495
+ background: #d9d9d9;
496
+ border-radius: 50%;
497
+ }
472
498
 
473
499
  .bee-tips {
474
500
  display: flex;
@@ -480,10 +506,15 @@
480
506
  height: 40px;
481
507
  padding: 0 30px;
482
508
  width: 100%;
509
+ overflow: hidden;
510
+ white-space: nowrap;
511
+ }
512
+ .bee-tips .bee-tips__path {
513
+ max-width: 40%;
514
+ margin-left: 20px;
483
515
  text-overflow: ellipsis;
484
516
  overflow: hidden;
485
517
  white-space: nowrap;
486
- cursor: text;
487
518
  }
488
519
 
489
520
  .annotationOperation {
@@ -1235,18 +1266,9 @@
1235
1266
  }
1236
1267
  .bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-2d-container .bee-point-cloud-2d-image {
1237
1268
  flex: 1;
1238
- display: flex;
1239
- align-items: center;
1240
1269
  background-color: #4c4c4c;
1241
- overflow: hidden;
1242
- }
1243
- .bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-2d-container .bee-point-cloud-2d-image > img {
1244
- object-fit: scale-down;
1245
- width: 100%;
1246
- height: 100%;
1247
1270
  }
1248
1271
  .bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container {
1249
- height: 55%;
1250
1272
  display: flex;
1251
1273
  flex-direction: column;
1252
1274
  overflow: hidden;
@@ -1338,13 +1360,45 @@
1338
1360
  display: flex;
1339
1361
  overflow: hidden;
1340
1362
  }
1363
+ .bee-point-cloud-wrapper .bee-point-cloud-container__right .bee-point-cloud-container__right-bottom .bee-point-cloud-container__empty-page {
1364
+ position: absolute;
1365
+ left: 0;
1366
+ top: 40px;
1367
+ flex: 1;
1368
+ background: black;
1369
+ color: #666666;
1370
+ display: flex;
1371
+ justify-content: center;
1372
+ align-items: center;
1373
+ flex-direction: column;
1374
+ font-size: 16px;
1375
+ z-index: 20;
1376
+ height: calc(100% - 40px);
1377
+ width: 100%;
1378
+ }
1379
+ .bee-point-cloud-wrapper .bee-point-cloud-container__right .bee-point-cloud-container__right-bottom .bee-point-cloud-container__empty-page .bee-point-cloud-container__empty-page__text {
1380
+ margin-top: 13px;
1381
+ }
1341
1382
  .bee-point-cloud-wrapper .bee-point-cloud-container__right .bee-point-cloud-container__right-bottom .bee-point-cloud-container__side-view {
1342
1383
  border-right: 1px solid white;
1343
1384
  }
1344
1385
  .bee-point-cloud-wrapper .bee-point-cloud-container__right .bee-point-cloud-container__right-bottom .bee-point-cloud-container__side-view,
1345
1386
  .bee-point-cloud-wrapper .bee-point-cloud-container__right .bee-point-cloud-container__right-bottom .bee-point-cloud-container__back-view {
1387
+ position: relative;
1346
1388
  flex: 1;
1389
+ display: flex;
1347
1390
  background: black;
1391
+ flex-direction: column;
1392
+ }
1393
+ .bee-point-cloud-wrapper .bee-point-cloud-container__right .bee-point-cloud-container__right-bottom .bee-point-cloud-container__side-view .bee-point-cloud-container__bottom-view-content,
1394
+ .bee-point-cloud-wrapper .bee-point-cloud-container__right .bee-point-cloud-container__right-bottom .bee-point-cloud-container__back-view .bee-point-cloud-container__bottom-view-content {
1395
+ flex: 1;
1396
+ }
1397
+ .bee-point-cloud-wrapper .bee-point-cloud-container__right .bee-point-cloud-container__right-bottom .bee-point-cloud-container__side-view .bee-point-cloud-container__bottom-view-content .bee-point-cloud-container__core-instance,
1398
+ .bee-point-cloud-wrapper .bee-point-cloud-container__right .bee-point-cloud-container__right-bottom .bee-point-cloud-container__back-view .bee-point-cloud-container__bottom-view-content .bee-point-cloud-container__core-instance {
1399
+ position: relative;
1400
+ width: 100%;
1401
+ height: 100%;
1348
1402
  }
1349
1403
 
1350
1404
  /** PointCloud样式 end */
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$1=require("./components/AnnotationView/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");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,r,t)=>r in e?__defProp(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,__spreadValues=(e,r)=>{for(var t in r||(r={}))__hasOwnProp.call(r,t)&&__defNormalProp(e,t,r[t]);if(__getOwnPropSymbols)for(var t of __getOwnPropSymbols(r))__propIsEnum.call(r,t)&&__defNormalProp(e,t,r[t]);return e},__spreadProps=(e,r)=>__defProps(e,__getOwnPropDescs(r));const store=configureStore(),OutputApp=(e,r)=>{const[t,o]=React.useState();return React.useImperativeHandle(r,()=>({toolInstance:t,annotationEngine:store.getState().annotation.annotationEngine,pageBackwardActions:()=>store.dispatch(actionCreators.PageBackward()),pageForwardActions:()=>store.dispatch(actionCreators.PageForward()),pageJump:a=>{const n=~~a-1;store.dispatch(actionCreators.PageJump(n))},hello:()=>alert("hello labelBee!!!")}),[t]),React__default.default.createElement(reactRedux.Provider,{store},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 index=React__default.default.forwardRef(OutputApp);exports.AnnotationView=index$1,Object.defineProperty(exports,"i18n",{enumerable:!0,get:function(){return lbUtils.i18n}}),exports.VideoTagTool=TagToolInstanceAdaptorI18nProvider.VideoTagTool,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"),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");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,o]=React.useState();return React.useImperativeHandle(t,()=>({toolInstance:r,annotationEngine:store.getState().annotation.annotationEngine,pageBackwardActions:()=>store.dispatch(actionCreators.PageBackward()),pageForwardActions:()=>store.dispatch(actionCreators.PageForward()),pageJump:n=>{const a=~~n-1;store.dispatch(actionCreators.PageJump(a))},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 index=React__default.default.forwardRef(OutputApp);exports.AnnotationView=index$1,exports.PointCloudAnnotationView=pointCloudAnnotationView,Object.defineProperty(exports,"i18n",{enumerable:!0,get:function(){return lbUtils.i18n}}),exports.VideoTagTool=TagToolInstanceAdaptorI18nProvider.VideoTagTool,exports.default=index,exports.store=store;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const ANNOTATION_ACTIONS={UPDATE_TOOL_INSTANCE:"@@UPDATE_TOOL_INSTANCE",UPDATE_IMG_LIST:"@@UPDATE_IMG_LIST",UPDATE_ANNOTATION_CONFIG:"@@UPDATE_ANNOTATION_CONFIG",LOAD_FILE_DATA:"@@LOAD_FILE_DATA",SUBMIT_FILE_DATA:"@@SUBMIT_FILE_DATA",SET_TASK_CONFIG:"@@SET_TASK_CONFIG",INIT_TOOL:"@@INIT_TOOL",SET_TOOL:"@@SET_TOOL",UPDATE_ON_SUBMIT:"@@UPDATE_ON_SUBMIT",UPDATE_ON_SAVE:"@@UPDATE_ON_SAVE",UPDATE_ON_PAGE_CHANGE:"@@UPDATE_ON_PAGE_CHANGE",UPDATE_ON_STEP_CHANGE:"@@UPDATE_ON_STEP_CHANGE",UPDATE_ROTATE:"@@UPDATE_ROTATE",UPDATE_GET_FILE_DATA:"@@UPDATE_GET_FILE_DATA",UPDATE_PAGE_SIZE:"@@UPDATE_PAGE_SIZE",UPDATE_LOAD_FILE_LIST:"@@UPDATE_LOAD_FILE_LIST",GET_FILE_DATA:"@@GET_FILE_DATA",SET_FILE_DATA:"@@SET_FILE_DATA",COPY_BACKWARD_RESULT:"@@COPY_BACKWARD_RESULT",SET_STEP:"@@SET_STEP",SUBMIT_RESULT:"@@SUBMIT_RESULT",SAVE_RESULT:"@@SAVE_RESULT",SET_BASIC_INDEX:"@@SET_BASIC_INDEX",CALC_STEP_PROGRESS:"@@CALC_STEP_PROGRESS",SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:"@@SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED",SET_LOADING:"@@SET_LOADING"},IMAGE_ATTRIBUTE_ACTIONS={UPDATE_IMG_ATTRIBUTE:"@@UPDATE_IMG_ATTRIBUTE",INIT_IMG_ATTRIBUTE:"@@INIT_IMG_ATTRIBUTE"},TOOL_STYLE_ACTIONS={INIT_TOOL_STYLE_CONFIG:"@@INIT_TOOL_STYLE_CONFIG",UPDATE_TOOL_STYLE_CONFIG:"@@UPDATE_TOOL_STYLE_CONFIG"};exports.ANNOTATION_ACTIONS=ANNOTATION_ACTIONS,exports.IMAGE_ATTRIBUTE_ACTIONS=IMAGE_ATTRIBUTE_ACTIONS,exports.TOOL_STYLE_ACTIONS=TOOL_STYLE_ACTIONS;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const ANNOTATION_ACTIONS={UPDATE_TOOL_INSTANCE:"@@UPDATE_TOOL_INSTANCE",UPDATE_IMG_LIST:"@@UPDATE_IMG_LIST",UPDATE_ANNOTATION_CONFIG:"@@UPDATE_ANNOTATION_CONFIG",LOAD_FILE_DATA:"@@LOAD_FILE_DATA",SUBMIT_FILE_DATA:"@@SUBMIT_FILE_DATA",SET_TASK_CONFIG:"@@SET_TASK_CONFIG",INIT_TOOL:"@@INIT_TOOL",SET_TOOL:"@@SET_TOOL",UPDATE_ON_SUBMIT:"@@UPDATE_ON_SUBMIT",UPDATE_ON_SAVE:"@@UPDATE_ON_SAVE",UPDATE_ON_PAGE_CHANGE:"@@UPDATE_ON_PAGE_CHANGE",UPDATE_ON_STEP_CHANGE:"@@UPDATE_ON_STEP_CHANGE",UPDATE_ROTATE:"@@UPDATE_ROTATE",UPDATE_GET_FILE_DATA:"@@UPDATE_GET_FILE_DATA",UPDATE_PAGE_SIZE:"@@UPDATE_PAGE_SIZE",UPDATE_LOAD_FILE_LIST:"@@UPDATE_LOAD_FILE_LIST",GET_FILE_DATA:"@@GET_FILE_DATA",SET_FILE_DATA:"@@SET_FILE_DATA",COPY_BACKWARD_RESULT:"@@COPY_BACKWARD_RESULT",SET_STEP:"@@SET_STEP",SUBMIT_RESULT:"@@SUBMIT_RESULT",SAVE_RESULT:"@@SAVE_RESULT",SET_BASIC_INDEX:"@@SET_BASIC_INDEX",CALC_STEP_PROGRESS:"@@CALC_STEP_PROGRESS",SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:"@@SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED",SKIP_BEFORE_PAGE_TURNING:"@@SKIP_BEFORE_PAGE_TURNING",SET_LOADING:"@@SET_LOADING",SET_POINT_CLOUD_LOADING:"@@SET_POINT_CLOUD_LOADING",SET_TASK_STEP_LIST:"@@SET_TASK_STEP_LIST"},IMAGE_ATTRIBUTE_ACTIONS={UPDATE_IMG_ATTRIBUTE:"@@UPDATE_IMG_ATTRIBUTE",INIT_IMG_ATTRIBUTE:"@@INIT_IMG_ATTRIBUTE"},TOOL_STYLE_ACTIONS={INIT_TOOL_STYLE_CONFIG:"@@INIT_TOOL_STYLE_CONFIG",UPDATE_TOOL_STYLE_CONFIG:"@@UPDATE_TOOL_STYLE_CONFIG"};exports.ANNOTATION_ACTIONS=ANNOTATION_ACTIONS,exports.IMAGE_ATTRIBUTE_ACTIONS=IMAGE_ATTRIBUTE_ACTIONS,exports.TOOL_STYLE_ACTIONS=TOOL_STYLE_ACTIONS;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Actions=require("../Actions.js"),reducer=require("./reducer.js"),index=require("../../constant/index.js"),AnnotationSize=require("../../data/enums/AnnotationSize.js"),PageOperator=require("../../utils/PageOperator.js"),index$1=require("../../utils/index.js"),__async=(e,t,n)=>new Promise((r,i)=>{var s=T=>{try{u(n.next(T))}catch(a){i(a)}},o=T=>{try{u(n.throw(T))}catch(a){i(a)}},u=T=>T.done?r(T.value):Promise.resolve(T.value).then(s,o);u((n=n.apply(e,t)).next())});const dispatchTasks=(e,t)=>t.map(n=>e(n)),getSubmitByPageOperation=e=>e===AnnotationSize.EPageTurningOperation.Forward?index.ESubmitType.Forward:e===AnnotationSize.EPageTurningOperation.Backward?index.ESubmitType.Backward:e===AnnotationSize.EPageTurningOperation.Jump?index.ESubmitType.Jump:index.ESubmitType.Forward,getBasicIndex=(e,t)=>{var n,r;const{imgList:i,imgIndex:s}=e,{dataSourceStep:o}=reducer.getStepConfig(e.stepList,e.step);return((r=(n=index$1.jsonParser(i[s-1].result)[`step_${o}`])==null?void 0:n.result)==null?void 0:r.length)-1||t};function UpdateToolInstance(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE,payload:{toolInstance:e}}}function SetTaskConfig({stepList:e,step:t}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG,payload:{stepList:e,step:t}}}function UpdateOnSubmit(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT,payload:{onSubmit:e}}}function UpdateOnSave(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE,payload:{onSave:e}}}function UpdateOnPageChange(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_PAGE_CHANGE,payload:{onPageChange:e}}}function UpdateOnStepChange(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_STEP_CHANGE,payload:{onStepChange:e}}}function UpdateGetFileData(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA,payload:{getFileData:e}}}function UpdatePageSize(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_PAGE_SIZE,payload:{pageSize:e}}}function UpdateGetFileList(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_LOAD_FILE_LIST,payload:{loadFileList:e}}}function UpdateRotate(){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE}}function CopyBackWordResult(){return{type:Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT}}function InitTaskData({onSubmit:e,onSave:t,onPageChange:n,onStepChange:r,getFileData:i,pageSize:s,loadFileList:o,step:u,stepList:T}){const a=[];return e&&a.push(UpdateOnSubmit(e)),t&&a.push(UpdateOnSave(t)),n&&a.push(UpdateOnPageChange(n)),r&&a.push(UpdateOnStepChange(r)),i&&a.push(UpdateGetFileData(i)),o&&a.push(UpdateGetFileList(o)),s&&a.push(UpdatePageSize(s)),a.push(SetTaskConfig({stepList:T,step:u})),a.push({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),a.push({type:Actions.ANNOTATION_ACTIONS.INIT_TOOL}),p=>dispatchTasks(p,a)}const getNextStep=(e,t)=>{var n;const r=t==null?void 0:t.findIndex(i=>(i==null?void 0:i.step)===e);return(n=t[r+1])==null?void 0:n.step},ToNextStep=e=>(t,n)=>{const{annotation:r}=n(),{step:i,stepList:s}=r,o=getNextStep(i,s);return[t(UpdateProcessingStep(o,e))]},UpdateProcessingStep=(e,t)=>(n,r)=>{var i,s;const{annotation:o}=r();(i=o==null?void 0:o.onStepChange)==null||i.call(o,e);const u=(s=o==null?void 0:o.imgIndex)!=null?s:0;return[n({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),n({type:Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA,payload:{submitType:index.ESubmitType.StepChanged}}),n({type:Actions.ANNOTATION_ACTIONS.SET_STEP,payload:{toStep:e}}),n({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),n(reducer.LoadFileAndFileData(t!=null?t:u,0))]},ToSubmitFileData=e=>t=>[t({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),t({type:Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA,payload:{submitType:e}})],SubmitAndChangeFileIndex=(e,t,n,r)=>[e(ToSubmitFileData(n)),e(reducer.LoadFileAndFileData(t,r))],ChangeBasicIndex=(e,t)=>[e({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),e({type:Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX,payload:{basicIndex:t}})],ChangeTriggerEventAfterIndexChanged=(e,t)=>{e({type:Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED,payload:{triggerEventAfterIndexChanged:t}})},PageBackward=(e=!1)=>(t,n)=>DispatcherTurning(t,n,AnnotationSize.EPageTurningOperation.Backward,e),PageForward=(e=!1)=>(t,n)=>DispatcherTurning(t,n,AnnotationSize.EPageTurningOperation.Forward,e),PageJump=(e,t=!1)=>(n,r)=>{if(e!==r().imgIndex)return DispatcherTurning(n,r,AnnotationSize.EPageTurningOperation.Jump,t,e)},loadImgList=(e,t,n,r)=>__async(void 0,null,function*(){var i;const{loadFileList:s,imgList:o,pageSize:u}=t().annotation,T=Math.floor(n/u);SetAnnotationLoading(e,!0);try{const a=yield s(T,u);if(SetAnnotationLoading(e,!1),!((i=a==null?void 0:a.fileList)==null?void 0:i.length)||!(a==null?void 0:a.total))throw new Error("fileList and total are required");const p=r?new Array(a.total):[...o];return p.splice(T*u,u,...a.fileList),e({type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST,payload:{imgList:p}}),!0}catch(a){SetAnnotationLoading(e,!1),console.error(a)}}),DispatcherTurning=(e,t,n,r=!1,i)=>__async(void 0,null,function*(){var s;const o=t().annotation,{fileIndexChanged:u,fileIndex:T,basicIndexChanged:a,basicIndex:p}=PageOperator.getNextPageInfo(n,o,i),A=getSubmitByPageOperation(n);if(ChangeTriggerEventAfterIndexChanged(e,r),u){if(o.loading||!o.imgList[T]&&!(yield loadImgList(e,t,T)))return;(s=o.onPageChange)==null||s.call(o,T);const N=A===index.ESubmitType.Backward?getBasicIndex(t().annotation,p):p;return SubmitAndChangeFileIndex(e,T,A,N)}return a?ChangeBasicIndex(e,p):e(ToSubmitFileData(A))}),ChangeSave=e=>{e(ToSubmitFileData(index.ESubmitType.Save)),e({type:Actions.ANNOTATION_ACTIONS.SAVE_RESULT})},SetAnnotationLoading=(e,t)=>{e({type:Actions.ANNOTATION_ACTIONS.SET_LOADING,payload:{loading:t}})};exports.ChangeSave=ChangeSave,exports.CopyBackWordResult=CopyBackWordResult,exports.DispatcherTurning=DispatcherTurning,exports.InitTaskData=InitTaskData,exports.PageBackward=PageBackward,exports.PageForward=PageForward,exports.PageJump=PageJump,exports.SetAnnotationLoading=SetAnnotationLoading,exports.SetTaskConfig=SetTaskConfig,exports.ToNextStep=ToNextStep,exports.ToSubmitFileData=ToSubmitFileData,exports.UpdateGetFileData=UpdateGetFileData,exports.UpdateGetFileList=UpdateGetFileList,exports.UpdateOnPageChange=UpdateOnPageChange,exports.UpdateOnSave=UpdateOnSave,exports.UpdateOnStepChange=UpdateOnStepChange,exports.UpdateOnSubmit=UpdateOnSubmit,exports.UpdatePageSize=UpdatePageSize,exports.UpdateProcessingStep=UpdateProcessingStep,exports.UpdateRotate=UpdateRotate,exports.UpdateToolInstance=UpdateToolInstance,exports.loadImgList=loadImgList;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Actions=require("../Actions.js"),reducer=require("./reducer.js"),index=require("../../constant/index.js"),AnnotationSize=require("../../data/enums/AnnotationSize.js"),PageOperator=require("../../utils/PageOperator.js"),index$1=require("../../utils/index.js"),__async=(e,t,n)=>new Promise((r,T)=>{var i=a=>{try{u(n.next(a))}catch(s){T(s)}},o=a=>{try{u(n.throw(a))}catch(s){T(s)}},u=a=>a.done?r(a.value):Promise.resolve(a.value).then(i,o);u((n=n.apply(e,t)).next())});const dispatchTasks=(e,t)=>t.map(n=>e(n)),getSubmitByPageOperation=e=>e===AnnotationSize.EPageTurningOperation.Forward?index.ESubmitType.Forward:e===AnnotationSize.EPageTurningOperation.Backward?index.ESubmitType.Backward:e===AnnotationSize.EPageTurningOperation.Jump?index.ESubmitType.Jump:index.ESubmitType.Forward,getBasicIndex=(e,t)=>{var n,r;const{imgList:T,imgIndex:i}=e,{dataSourceStep:o}=reducer.getStepConfig(e.stepList,e.step);return((r=(n=index$1.jsonParser(T[i-1].result)[`step_${o}`])==null?void 0:n.result)==null?void 0:r.length)-1||t};function UpdateToolInstance(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE,payload:{toolInstance:e}}}function SetTaskStepList({stepList:e}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_STEP_LIST,payload:{stepList:e}}}function SetTaskConfig({stepList:e,step:t}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG,payload:{stepList:e,step:t}}}function UpdateOnSubmit(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT,payload:{onSubmit:e}}}function UpdateOnSave(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE,payload:{onSave:e}}}function UpdateOnPageChange(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_PAGE_CHANGE,payload:{onPageChange:e}}}function UpdateOnStepChange(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_STEP_CHANGE,payload:{onStepChange:e}}}function UpdateGetFileData(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA,payload:{getFileData:e}}}function UpdatePageSize(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_PAGE_SIZE,payload:{pageSize:e}}}function UpdateGetFileList(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_LOAD_FILE_LIST,payload:{loadFileList:e}}}function UpdateRotate(){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE}}function UpdateSkipBeforePageTurning(e){return{type:Actions.ANNOTATION_ACTIONS.SKIP_BEFORE_PAGE_TURNING,payload:{skipBeforePageTurning:e}}}function CopyBackWordResult(){return{type:Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT}}function InitTaskData({onSubmit:e,onSave:t,onPageChange:n,onStepChange:r,getFileData:T,pageSize:i,loadFileList:o,step:u,stepList:a,skipBeforePageTurning:s}){const p=[];return e&&p.push(UpdateOnSubmit(e)),t&&p.push(UpdateOnSave(t)),n&&p.push(UpdateOnPageChange(n)),r&&p.push(UpdateOnStepChange(r)),T&&p.push(UpdateGetFileData(T)),o&&p.push(UpdateGetFileList(o)),i&&p.push(UpdatePageSize(i)),s&&p.push(UpdateSkipBeforePageTurning(s)),p.push(SetTaskConfig({stepList:a,step:u})),p.push({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),p.push({type:Actions.ANNOTATION_ACTIONS.INIT_TOOL}),N=>dispatchTasks(N,p)}function UpdateInjectFunc({onSubmit:e,onSave:t,onPageChange:n,onStepChange:r,getFileData:T,pageSize:i,loadFileList:o,stepList:u}){const a=[];return e&&a.push(UpdateOnSubmit(e)),t&&a.push(UpdateOnSave(t)),n&&a.push(UpdateOnPageChange(n)),r&&a.push(UpdateOnStepChange(r)),T&&a.push(UpdateGetFileData(T)),o&&a.push(UpdateGetFileList(o)),i&&a.push(UpdatePageSize(i)),a.push(SetTaskStepList({stepList:u})),s=>dispatchTasks(s,a)}const getNextStep=(e,t)=>{var n;const r=t==null?void 0:t.findIndex(T=>(T==null?void 0:T.step)===e);return(n=t[r+1])==null?void 0:n.step},ToNextStep=e=>(t,n)=>{const{annotation:r}=n(),{step:T,stepList:i}=r,o=getNextStep(T,i);return[t(UpdateProcessingStep(o,e))]},UpdateProcessingStep=(e,t)=>(n,r)=>{var T,i;const{annotation:o}=r();(T=o==null?void 0:o.onStepChange)==null||T.call(o,e);const u=(i=o==null?void 0:o.imgIndex)!=null?i:0;return[n({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),n({type:Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA,payload:{submitType:index.ESubmitType.StepChanged}}),n({type:Actions.ANNOTATION_ACTIONS.SET_STEP,payload:{toStep:e}}),n({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),n(reducer.LoadFileAndFileData(t!=null?t:u,0))]},ToSubmitFileData=e=>t=>[t({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),t({type:Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA,payload:{submitType:e}})],SubmitAndChangeFileIndex=(e,t,n,r)=>[e(ToSubmitFileData(n)),e(reducer.LoadFileAndFileData(t,r))],ChangeBasicIndex=(e,t)=>[e({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),e({type:Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX,payload:{basicIndex:t}})],ChangeTriggerEventAfterIndexChanged=(e,t)=>{e({type:Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED,payload:{triggerEventAfterIndexChanged:t}})},PageBackward=(e=!1)=>(t,n)=>DispatcherTurning(t,n,AnnotationSize.EPageTurningOperation.Backward,e),PageForward=(e=!1)=>(t,n)=>DispatcherTurning(t,n,AnnotationSize.EPageTurningOperation.Forward,e),PageJump=(e,t=!1)=>(n,r)=>{if(e!==r().imgIndex)return DispatcherTurning(n,r,AnnotationSize.EPageTurningOperation.Jump,t,e)},loadImgList=(e,t,n,r)=>__async(void 0,null,function*(){var T;const{loadFileList:i,imgList:o,pageSize:u}=t().annotation,a=Math.floor(n/u);SetAnnotationLoading(e,!0);try{const s=yield i(a,u);if(SetAnnotationLoading(e,!1),!((T=s==null?void 0:s.fileList)==null?void 0:T.length)||!(s==null?void 0:s.total))throw new Error("fileList and total are required");const p=r?new Array(s.total):[...o];return p.splice(a*u,u,...s.fileList),e({type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST,payload:{imgList:p}}),!0}catch(s){SetAnnotationLoading(e,!1),console.error(s)}}),DispatcherTurning=(e,t,n,r=!1,T)=>__async(void 0,null,function*(){var i;const o=t().annotation,{fileIndexChanged:u,fileIndex:a,basicIndexChanged:s,basicIndex:p}=PageOperator.getNextPageInfo(n,o,T),N=getSubmitByPageOperation(n);if(ChangeTriggerEventAfterIndexChanged(e,r),u){if(o.loading||!o.imgList[a]&&!(yield loadImgList(e,t,a)))return;(i=o.onPageChange)==null||i.call(o,a);const A=N===index.ESubmitType.Backward?getBasicIndex(t().annotation,p):p;return SubmitAndChangeFileIndex(e,a,N,A)}return s?ChangeBasicIndex(e,p):e(ToSubmitFileData(N))}),ChangeSave=e=>{e(ToSubmitFileData(index.ESubmitType.Save)),e({type:Actions.ANNOTATION_ACTIONS.SAVE_RESULT})},SetAnnotationLoading=(e,t)=>{e({type:Actions.ANNOTATION_ACTIONS.SET_LOADING,payload:{loading:t}})},SetPointCloudLoading=(e,t)=>{e({type:Actions.ANNOTATION_ACTIONS.SET_LOADING,payload:{loading:t}})};exports.ChangeSave=ChangeSave,exports.CopyBackWordResult=CopyBackWordResult,exports.DispatcherTurning=DispatcherTurning,exports.InitTaskData=InitTaskData,exports.PageBackward=PageBackward,exports.PageForward=PageForward,exports.PageJump=PageJump,exports.SetAnnotationLoading=SetAnnotationLoading,exports.SetPointCloudLoading=SetPointCloudLoading,exports.SetTaskConfig=SetTaskConfig,exports.SetTaskStepList=SetTaskStepList,exports.ToNextStep=ToNextStep,exports.ToSubmitFileData=ToSubmitFileData,exports.UpdateGetFileData=UpdateGetFileData,exports.UpdateGetFileList=UpdateGetFileList,exports.UpdateInjectFunc=UpdateInjectFunc,exports.UpdateOnPageChange=UpdateOnPageChange,exports.UpdateOnSave=UpdateOnSave,exports.UpdateOnStepChange=UpdateOnStepChange,exports.UpdateOnSubmit=UpdateOnSubmit,exports.UpdatePageSize=UpdatePageSize,exports.UpdateProcessingStep=UpdateProcessingStep,exports.UpdateRotate=UpdateRotate,exports.UpdateSkipBeforePageTurning=UpdateSkipBeforePageTurning,exports.UpdateToolInstance=UpdateToolInstance,exports.loadImgList=loadImgList;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const aMapStateToProps=t=>{const{annotation:{imgList:e,imgIndex:r}}=t;return{currentData:e[r]}};exports.aMapStateToProps=aMapStateToProps;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const aMapStateToProps=e=>{var t;const{annotation:{imgList:a,imgIndex:r}}=e;return{currentData:(t=a[r])!=null?t:{}}};exports.aMapStateToProps=aMapStateToProps;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$1=require("../../components/customResizeHook/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"),es=require("antd/es"),_=require("lodash"),actionCreators=require("./actionCreators.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,o)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,__spreadValues=(e,t)=>{for(var o in t||(t={}))__hasOwnProp.call(t,o)&&__defNormalProp(e,o,t[o]);if(__getOwnPropSymbols)for(var o of __getOwnPropSymbols(t))__propIsEnum.call(t,o)&&__defNormalProp(e,o,t[o]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__async=(e,t,o)=>new Promise((c,r)=>{var A=d=>{try{p(o.next(d))}catch(C){r(C)}},N=d=>{try{p(o.throw(d))}catch(C){r(C)}},p=d=>d.done?c(d.value):Promise.resolve(d.value).then(A,N);p((o=o.apply(e,t)).next())});const getStepConfig=(e,t)=>e.find(o=>o.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,triggerEventAfterIndexChanged:!1},getTotalPage=e=>{const{imgList:t,imgPageSize:o}=e;return Math.ceil(t.length/o)},calcStepProgress=(e,t)=>e.reduce((o,c)=>{if(c){const r=c.result;if(index.jsonParser(r)[`step_${t}`])return o+1}return o},0)/e.length,updateToolInstance=(e,t)=>{const{step:o,stepList:c}=e,r=StepUtils.getCurrentStepInfo(o,c),A=ConfigUtils.ConfigUtils.jsonParser(r.config);if(ToolUtils.isVideoTool(r==null?void 0:r.tool)||ToolUtils.isPointCloudTool(r==null?void 0:r.tool))return;const N=document.getElementById("toolContainer");if(!N)throw"Not exist dom named id-toolContainer";const p=index$1.getFormatSize({width:window.innerWidth,height:window.innerHeight}),d=new lbAnnotation.AnnotationEngine({container:N,toolName:r.tool,size:p,imgNode:t,config:A,style:JSON.parse(styleString)});return{toolInstance:d==null?void 0:d.toolInstance,annotationEngine:d}},LoadFileAndFileData=(e,t)=>(o,c)=>__async(void 0,null,function*(){const{stepList:r,step:A}=c().annotation,N=StepUtils.currentToolIsVideo(A,r),p=StepUtils.currentToolIsPointCloud(A,r);if(actionCreators.SetAnnotationLoading(o,!0),o(TryGetFileDataByAPI(e)),N||p){o(AfterVideoLoaded(e));return}o(AfterImageLoaded(e,t))}),TryGetFileDataByAPI=e=>(t,o)=>__async(void 0,null,function*(){const{getFileData:c,imgList:r}=o().annotation;if(c){const A=yield c(r[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)=>(o,c)=>{var r;const{toolInstance:A,imgList:N}=c().annotation,p=(r=N==null?void 0:N[e])==null?void 0:r.url;lbAnnotation.ImgUtils.load(p).then(d=>{actionCreators.SetAnnotationLoading(o,!1),o({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{imgNode:d,nextIndex:e,nextBasicIndex:t}})}).catch(()=>{actionCreators.SetAnnotationLoading(o,!1),A==null||A.setErrorImg(),o({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e,nextBasicIndex:t}})})},annotationReducer=(e=initialState,t)=>{var o,c,r,A,N,p,d,C,h,b,U,x,F,j,w,B,q,G;switch(t.type){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:s}=e,i=calcStepProgress(n,s);return __spreadProps(__spreadValues({},e),{stepProgress:i})}case Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA:{const{imgList:n,imgIndex:s,step:i,stepList:l,toolInstance:u,onSubmit:a,resultList:O}=e;if(!u||!n[s])return e;const T=((o=n[s])==null?void 0:o.result)||"",[,I]=(c=u==null?void 0:u.exportData())!=null?c:[],g=data.composeResultWithBasicImgInfo(T,I),v=data.composeResult(g,{step:i,stepList:l},{rect:O});n[s].result=AnnotationDataUtils.dataCorrection(v,T,i,l),a&&a([n[s]],(r=t.payload)==null?void 0:r.submitType,s);const f=calcStepProgress(n,i);return __spreadProps(__spreadValues({},e),{stepProgress:f,imgList:n})}case Actions.ANNOTATION_ACTIONS.SAVE_RESULT:{const{imgList:n,imgIndex:s,onSave:i}=e;return i==null||i(n[s],s,n),__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT:{const{imgList:n,basicIndex:s,resultList:i,toolInstance:l,basicResultList:u}=e;if(!l)return e;const[a]=(A=l==null?void 0:l.exportData())!=null?A:[];let O=a;if((u==null?void 0:u.length)>0){const T=(N=u[s])==null?void 0:N.id,I=a.map(g=>__spreadProps(__spreadValues({},g),{sourceID:T}));O=___default.default.cloneDeep(i).filter(g=>g.sourceID!==T),O.push(...I)}return __spreadProps(__spreadValues({},e),{resultList:O,imgList:n})}case Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX:{const{toolInstance:n,step:s,imgList:i,imgIndex:l,stepList:u,annotationEngine:a,resultList:O,basicResultList:T}=e;if(!n||!a)return e;const I=t.payload.basicIndex,g=(p=T[I])==null?void 0:p.id,v=index.jsonParser((d=i[l])==null?void 0:d.result),f=(O||[]).filter(R=>R.sourceID===g),E=getStepConfig(u,s),{dataSourceStep:m,tool:P}=E,D=getStepConfig(u,m);let S=[];return m&&P&&(S=(C=v[`step_${m}`])==null?void 0:C.result,(S==null?void 0:S.length)>0?(a==null||a.setBasicInfo(D.tool,S[I]),a==null||a.launchOperation()):(a==null||a.setBasicInfo(D.tool),a==null||a.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),n==null||n.setResult(f),n==null||n.history.initRecord(f,!0),__spreadProps(__spreadValues({},e),{basicIndex:I})}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:s,toolInstance:i,annotationEngine:l,stepList:u}=e;if(!i)return __spreadProps(__spreadValues({},e),{imgIndex:t.payload.nextIndex});const a=StepUtils.getCurrentStepInfo(s,u),{nextIndex:O,imgNode:T,nextBasicIndex:I,imgError:g}=t.payload,v=I!=null?I:0,f=index.jsonParser((h=n[O])==null?void 0:h.result),E=f[`step_${s}`],m=!E,P={rotate:(b=f.rotate)!=null?b:0,valid:(U=f.valid)!=null?U:!0};T&&g!==!0&&(l==null||l.setImgNode(T,P));const D=getStepConfig(u,s),{dataSourceStep:S,tool:R}=D,z=getStepConfig(u,S),V=S&&R,L=(F=(x=f[`step_${S}`])==null?void 0:x.result)!=null?F:[],y=AnnotationDataUtils.getInitialResultList(E==null?void 0:E.result,i,D,L,m);if(l==null||l.launchOperation(),V&&((L==null?void 0:L.length)>0?l==null||l.setBasicInfo(z.tool,L[v]):(l==null||l.setBasicInfo(z.tool),l==null||l.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),a.tool!=="check"){const H=(w=(j=L[v])==null?void 0:j.id)!=null?w:"",M=V?y.filter($=>lbAnnotation.CommonToolUtils.isSameSourceID($.sourceID,H)):y;i==null||i.setResult(M),i==null||i.history.initRecord(y,!0)}return __spreadProps(__spreadValues({},e),{imgIndex:O,basicIndex:v,basicResultList:L,resultList:y})}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_CONFIG:return __spreadProps(__spreadValues({},e),{config:(B=t.payload.config)!=null?B:"{}"});case Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG:{const{stepList:n,step:s}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n,step:s})}case Actions.ANNOTATION_ACTIONS.INIT_TOOL:{const{imgNode:n}=e,s=updateToolInstance(e,n);if(s){const{toolInstance:i,annotationEngine:l}=s;return __spreadProps(__spreadValues({},e),{toolInstance:i,annotationEngine:l})}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.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.SET_FILE_DATA:{const{fileData:n,index:s}=t.payload,{imgList:i}=e;return i[s]=__spreadValues(__spreadValues({},i[s]),n),__spreadProps(__spreadValues({},e),{imgList:i})}case Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE:{const{toolInstance:n}=e;return n==null||n.updateRotate(),e}case Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT:{const{toolInstance:n,imgIndex:s,imgList:i,step:l}=e;if(!n)return e;if(s===0||s>=i.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),e;const u=i[s-1].result;if(!u)return e;const a=AnnotationDataUtils.copyResultChange(u,l,(G=i[s].result)!=null?G:"");i[s].result=a;const T=index.jsonParser(a)[`step_${l}`],I=(T==null?void 0:T.result)||[];return n==null||n.setResult(I),n==null||n.history.pushHistory(I),__spreadProps(__spreadValues({},e),{imgList:[...i]})}case Actions.ANNOTATION_ACTIONS.SET_STEP:{const{stepList:n,annotationEngine:s}=e,{toStep:i}=t.payload;if(!s)return e;const l=getStepConfig(n,i);return s==null||s.setToolName(l.tool,l.config),__spreadProps(__spreadValues({},e),{step:i,toolInstance:s==null?void 0:s.toolInstance})}case Actions.ANNOTATION_ACTIONS.SET_LOADING:{const{loading:n}=t.payload;return __spreadProps(__spreadValues({},e),{loading:!!n})}default:return e}};exports.LoadFileAndFileData=LoadFileAndFileData,exports.annotationReducer=annotationReducer,exports.getStepConfig=getStepConfig,exports.getTotalPage=getTotalPage;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$1=require("../../components/customResizeHook/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"),es=require("antd/es"),_=require("lodash"),actionCreators=require("./actionCreators.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((c,r)=>{var T=d=>{try{O(s.next(d))}catch(E){r(E)}},N=d=>{try{O(s.throw(d))}catch(E){r(E)}},O=d=>d.done?c(d.value):Promise.resolve(d.value).then(T,N);O((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,triggerEventAfterIndexChanged:!1,pointCloudLoading:!1},getTotalPage=e=>{const{imgList:t,imgPageSize:s}=e;return Math.ceil(t.length/s)},calcStepProgress=(e,t)=>e.reduce((s,c)=>{if(c){const r=c.result;if(index.jsonParser(r)[`step_${t}`])return s+1}return s},0)/e.length,updateToolInstance=(e,t)=>{const{step:s,stepList:c}=e,r=StepUtils.getCurrentStepInfo(s,c),T=ConfigUtils.ConfigUtils.jsonParser(r.config);if(ToolUtils.isVideoTool(r==null?void 0:r.tool)||ToolUtils.isPointCloudTool(r==null?void 0:r.tool))return;const N=document.getElementById("toolContainer");if(!N)throw"Not exist dom named id-toolContainer";const O=index$1.getFormatSize({width:window.innerWidth,height:window.innerHeight}),d=new lbAnnotation.AnnotationEngine({container:N,toolName:r.tool,size:O,imgNode:t,config:T,style:JSON.parse(styleString)});return{toolInstance:d==null?void 0:d.toolInstance,annotationEngine:d}},LoadFileAndFileData=(e,t)=>(s,c)=>__async(void 0,null,function*(){const{stepList:r,step:T}=c().annotation,N=StepUtils.currentToolIsVideo(T,r),O=StepUtils.currentToolIsPointCloud(T,r);if(actionCreators.SetAnnotationLoading(s,!0),yield s(TryGetFileDataByAPI(e)),N||O){s(AfterVideoLoaded(e));return}s(AfterImageLoaded(e,t))}),TryGetFileDataByAPI=e=>(t,s)=>__async(void 0,null,function*(){const{getFileData:c,imgList:r}=s().annotation;if(c){const T=yield c(r[e],e);t({type:Actions.ANNOTATION_ACTIONS.SET_FILE_DATA,payload:{fileData:T,index:e}})}}),AfterVideoLoaded=e=>t=>{actionCreators.SetAnnotationLoading(t,!1),t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterImageLoaded=(e,t)=>(s,c)=>{var r;const{toolInstance:T,imgList:N}=c().annotation,O=(r=N==null?void 0:N[e])==null?void 0:r.url;lbAnnotation.ImgUtils.load(O).then(d=>{actionCreators.SetAnnotationLoading(s,!1),s({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{imgNode:d,nextIndex:e,nextBasicIndex:t}})}).catch(()=>{actionCreators.SetAnnotationLoading(s,!1),T==null||T.setErrorImg(),s({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e,nextBasicIndex:t}})})},annotationReducer=(e=initialState,t)=>{var s,c,r,T,N,O,d,E,b,h,U,x,F,j,w,B,G,q,V,z;switch(t.type){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:u,resultList:p}=e;if(!a||!n[o])return e;const A=((s=n[o])==null?void 0:s.result)||"",[,I,g]=(c=a==null?void 0:a.exportData())!=null?c:[],v=(T=(r=a==null?void 0:a.exportCustomData)==null?void 0:r.call(a))!=null?T:{},S=data.composeResultWithBasicImgInfo(A,I),C=data.composeResult(S,{step:i,stepList:l},{rect:p},v);n[o].result=AnnotationDataUtils.dataCorrection(C,A,i,l),g&&(n[o]=__spreadValues(__spreadValues({},n[o]),g)),u&&u([n[o]],(N=t.payload)==null?void 0:N.submitType,o);const L=calcStepProgress(n,i);return __spreadProps(__spreadValues({},e),{stepProgress:L,imgList:n})}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[u]=(O=l==null?void 0:l.exportData())!=null?O:[];let p=u;if((a==null?void 0:a.length)>0){const A=(d=a[o])==null?void 0:d.id,I=u.map(g=>__spreadProps(__spreadValues({},g),{sourceID:A}));p=___default.default.cloneDeep(i).filter(g=>g.sourceID!==A),p.push(...I)}return __spreadProps(__spreadValues({},e),{resultList:p,imgList:n})}case Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX:{const{toolInstance:n,step:o,imgList:i,imgIndex:l,stepList:a,annotationEngine:u,resultList:p,basicResultList:A}=e;if(!n||!u)return e;const I=t.payload.basicIndex,g=(E=A[I])==null?void 0:E.id,v=index.jsonParser((b=i[l])==null?void 0:b.result),S=(p||[]).filter(R=>R.sourceID===g),C=getStepConfig(a,o),{dataSourceStep:L,tool:y}=C,D=getStepConfig(a,L);let f=[];return L&&y&&(f=(h=v[`step_${L}`])==null?void 0:h.result,(f==null?void 0:f.length)>0?(u==null||u.setBasicInfo(D.tool,f[I]),u==null||u.launchOperation()):(u==null||u.setBasicInfo(D.tool),u==null||u.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),n==null||n.setResult(S),n==null||n.history.initRecord(S,!0),__spreadProps(__spreadValues({},e),{basicIndex:I})}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 u=StepUtils.getCurrentStepInfo(o,a),{nextIndex:p,imgNode:A,nextBasicIndex:I,imgError:g}=t.payload,v=I!=null?I:0,S=index.jsonParser((U=n[p])==null?void 0:U.result),C=S[`step_${o}`],L=!C,y={rotate:(x=S.rotate)!=null?x:0,valid:(F=S.valid)!=null?F:!0};A&&g!==!0?l==null||l.setImgNode(A,y):i==null||i.setValid(y.valid);const D=getStepConfig(a,o),{dataSourceStep:f,tool:R}=D,H=getStepConfig(a,f),M=f&&R,m=(w=(j=S[`step_${f}`])==null?void 0:j.result)!=null?w:[],P=AnnotationDataUtils.getInitialResultList(C==null?void 0:C.result,i,D,m,L);if(l==null||l.launchOperation(),M&&((m==null?void 0:m.length)>0?l==null||l.setBasicInfo(H.tool,m[v]):(l==null||l.setBasicInfo(H.tool),l==null||l.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),u.tool!=="check"){const $=(G=(B=m[v])==null?void 0:B.id)!=null?G:"",k=M?P.filter(K=>lbAnnotation.CommonToolUtils.isSameSourceID(K.sourceID,$)):P;i==null||i.setResult(k),i==null||i.history.initRecord(P,!0)}return __spreadProps(__spreadValues({},e),{imgIndex:p,basicIndex:v,basicResultList:m,resultList:P})}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=(V=t.payload)==null?void 0:V.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.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.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}=e;return n==null||n.updateRotate(),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 u=AnnotationDataUtils.copyResultChange(a,l,(z=i[o].result)!=null?z:"");i[o]=__spreadProps(__spreadValues({},i[o]),{result:u});const A=index.jsonParser(u)[`step_${l}`],I=(A==null?void 0:A.result)||[];return n==null||n.setResult(I),n==null||n.history.pushHistory(I),__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_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})}default:return e}};exports.LoadFileAndFileData=LoadFileAndFileData,exports.annotationReducer=annotationReducer,exports.getStepConfig=getStepConfig,exports.getTotalPage=getTotalPage;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),reactRedux=require("react-redux");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const LabelBeeContext=React__default.default.createContext(void 0),useDispatch=reactRedux.createDispatchHook(LabelBeeContext),useSelector=reactRedux.createSelectorHook(LabelBeeContext);exports.LabelBeeContext=LabelBeeContext,exports.useDispatch=useDispatch,exports.useSelector=useSelector;
@@ -49,6 +49,14 @@ export interface AppProps {
49
49
  showTips?: boolean;
50
50
  defaultLang: 'en' | 'cn';
51
51
  leftSider?: () => React.ReactNode | React.ReactNode;
52
+ skipBeforePageTurning?: (pageTurning: Function) => void;
53
+ drawLayerSlot?: (props: {
54
+ zoom: number;
55
+ currentPos: {
56
+ x: number;
57
+ y: number;
58
+ };
59
+ }) => React.ReactNode;
52
60
  dataInjectionAtCreation: (annotationData: any) => {};
53
61
  renderEnhance: {
54
62
  staticRender?: (canvas: HTMLCanvasElement, data: any, style: IAnnotationStyle) => void;
@@ -5,9 +5,9 @@
5
5
  import React from 'react';
6
6
  interface IProps {
7
7
  src: string;
8
- size: {
9
- width: number;
10
- height: number;
8
+ size?: {
9
+ width?: number;
10
+ height?: number;
11
11
  };
12
12
  style?: {
13
13
  color?: string;
@@ -19,6 +19,7 @@ interface IProps {
19
19
  backgroundStyle?: React.CSSProperties;
20
20
  onChange?: (type: 'hover' | 'selected', ids: string[]) => void;
21
21
  showLoading?: boolean;
22
+ globalStyle?: React.CSSProperties;
22
23
  }
23
24
  declare const _default: React.ForwardRefExoticComponent<IProps & React.RefAttributes<unknown>>;
24
25
  export default _default;
@@ -0,0 +1,10 @@
1
+ interface IProps {
2
+ src: string;
3
+ result: string;
4
+ size: {
5
+ width: number;
6
+ height: number;
7
+ };
8
+ }
9
+ declare const PointCloudAnnotationView: (props: IProps) => JSX.Element;
10
+ export default PointCloudAnnotationView;
@@ -4,6 +4,7 @@ interface IProps {
4
4
  list: Array<{
5
5
  label: string;
6
6
  value: string;
7
+ color?: string;
7
8
  }>;
8
9
  selectedAttribute: string;
9
10
  attributeChanged: (v: string) => void;
@@ -1,4 +1,4 @@
1
- import { IPointCloudBox, IPointCloudBoxList } from '@labelbee/lb-utils';
1
+ import { IPointCloudBox, IPointCloudBoxList, IPolygonData } from '@labelbee/lb-utils';
2
2
  import { PointCloud, PointCloudAnnotation } from '@labelbee/lb-annotation';
3
3
  import React from 'react';
4
4
  interface IPointCloudContextInstances {
@@ -23,6 +23,10 @@ export interface IPointCloudContext extends IPointCloudContextInstances {
23
23
  selectedAllBoxes: () => void;
24
24
  selectedID: string;
25
25
  addPointCloudBox: (boxParams: IPointCloudBox) => void;
26
+ polygonList: IPolygonData[];
27
+ setPolygonList: (polygonList: IPolygonData[]) => void;
28
+ zoom: number;
29
+ setZoom: (zoom: number) => void;
26
30
  }
27
31
  export declare const PointCloudContext: React.Context<IPointCloudContext>;
28
32
  export declare const PointCloudProvider: React.FC<{}>;
@@ -3,4 +3,5 @@ export declare const PointCloudContainer: React.FC<{
3
3
  title: string;
4
4
  toolbar?: React.ReactElement;
5
5
  className?: string;
6
+ style?: React.CSSProperties;
6
7
  }>;
@@ -0,0 +1,2 @@
1
+ declare const EmptyPage: () => JSX.Element;
2
+ export default EmptyPage;
@@ -19,7 +19,9 @@ export declare const transferCanvas2World: (currentPos: {
19
19
  x: number;
20
20
  y: number;
21
21
  };
22
- export declare const topViewPolygon2PointCloud: (newPolygon: any, size: ISize, pointCloud?: PointCloud | undefined, selectedPointCloud?: IPointCloudBox | undefined) => Omit<IPointCloudBox, "trackID">;
22
+ export declare const topViewPolygon2PointCloud: (newPolygon: any, size: ISize, pointCloud?: PointCloud | undefined, selectedPointCloudBox?: IPointCloudBox | undefined, defaultValue?: {
23
+ [v: string]: any;
24
+ } | undefined) => Omit<IPointCloudBox, "trackID">;
23
25
  /**
24
26
  * NewBox synchronize sideView
25
27
  * @param boxParams
@@ -45,6 +47,9 @@ export declare const usePointCloudViews: () => {
45
47
  topViewUpdateBox?: undefined;
46
48
  backViewUpdateBox?: undefined;
47
49
  pointCloudBoxListUpdated?: undefined;
50
+ clearAllResult?: undefined;
51
+ initPointCloud3d?: undefined;
52
+ updatePointCloudData?: undefined;
48
53
  } | {
49
54
  topViewAddBox: (newPolygon: any, size: ISize) => void;
50
55
  topViewSelectedChanged: () => void;
@@ -52,4 +57,7 @@ export declare const usePointCloudViews: () => {
52
57
  sideViewUpdateBox: (newPolygon: any, originPolygon: any) => void;
53
58
  backViewUpdateBox: (newPolygon: any, originPolygon: any) => void;
54
59
  pointCloudBoxListUpdated: (newBoxes: IPointCloudBox[]) => void;
60
+ clearAllResult: () => void;
61
+ initPointCloud3d: () => void;
62
+ updatePointCloudData: () => Promise<void>;
55
63
  };
@@ -0,0 +1,9 @@
1
+ import { IPolygonData } from '@labelbee/lb-utils';
2
+ /**
3
+ * PointCloud Polygon Hook
4
+ * @returns
5
+ */
6
+ export declare const usePolygon: () => {
7
+ addPolygon: (polygon: IPolygonData) => void;
8
+ deletePolygon: (id: string) => void;
9
+ };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @file Update PointCloud Status
3
+ * @createDate 2022-08-26
4
+ * @author Ron <ron.f.luo@gmail.com>
5
+ */
6
+ import { cTool } from '@labelbee/lb-annotation';
7
+ export declare const useStatus: () => {
8
+ clearAllResult: () => void;
9
+ updatePointCloudPattern: (toolName: any) => void;
10
+ pointCloudPattern: cTool.EToolName;
11
+ };
@@ -0,0 +1,7 @@
1
+ export declare const useZoom: () => {
2
+ zoom: number;
3
+ setZoom: (zoom: number) => void;
4
+ initialPosition: () => void;
5
+ zoomOut: () => void;
6
+ zoomIn: () => void;
7
+ };
@@ -1,12 +1,7 @@
1
- export declare enum ETextType {
2
- AnyString = 0,
3
- Order = 1,
4
- EnglishOnly = 2,
5
- NumberOnly = 3,
6
- CustomFormat = 4
1
+ export declare enum EScribblePattern {
2
+ Scribble = 1,
3
+ Erase = 2
7
4
  }
8
- /** 文本标注字数上限 */
9
- export declare const TEXT_ATTRIBUTE_MAX_LENGTH = 1000;
10
5
  export declare enum EToolName {
11
6
  /** 拉框工具 */
12
7
  Rect = "rectTool",
@@ -34,6 +29,8 @@ export declare enum EToolName {
34
29
  FolderTag = "folderTagTool",
35
30
  /** 拉框跟踪工具 */
36
31
  RectTrack = "rectTrackTool",
32
+ /** 涂抹工具 */
33
+ ScribbleTool = "scribbleTool",
37
34
  /** 人脸106工具 */
38
35
  Face = "faceTool",
39
36
  /** 客户端属性工具 */
@@ -43,3 +40,12 @@ export declare enum EToolName {
43
40
  /** 算法分割辅助工具 */
44
41
  SegmentByRect = "segmentByRectTool"
45
42
  }
43
+ export declare enum ETextType {
44
+ AnyString = 0,
45
+ Order = 1,
46
+ EnglishOnly = 2,
47
+ NumberOnly = 3,
48
+ CustomFormat = 4
49
+ }
50
+ /** 文本标注字数上限 */
51
+ export declare const TEXT_ATTRIBUTE_MAX_LENGTH = 1000;
@@ -1,20 +1,32 @@
1
1
  /// <reference types="react" />
2
2
  export interface ICustomToolInstance {
3
+ valid: boolean;
3
4
  exportData: () => [any[], {}];
5
+ exportCustomData: () => {};
4
6
  singleOn: () => void;
7
+ clearResult: () => void;
5
8
  on: () => void;
9
+ unbind: () => void;
6
10
  setResult: () => void;
11
+ setValid: (valid: boolean) => void;
7
12
  history: {
8
13
  initRecord: () => void;
14
+ pushHistory: () => void;
9
15
  };
10
16
  setDefaultAttribute: (attribute: string) => void;
11
17
  setSubAttribute: (key: string, value: string) => void;
18
+ updateRotate: () => void;
19
+ }
20
+ export interface ICustomToolInstanceProps {
21
+ basicInfo?: {
22
+ [v: string]: any;
23
+ };
12
24
  }
13
25
  /**
14
- * Custom an empty toolInstance to adapt old use.
15
26
  * @returns
27
+ * Custom an empty toolInstance to adapt old use.
16
28
  */
17
- declare const useCustomToolInstance: () => {
29
+ declare const useCustomToolInstance: ({ basicInfo }?: ICustomToolInstanceProps) => {
18
30
  toolInstanceRef: import("react").MutableRefObject<ICustomToolInstance>;
19
31
  };
20
32
  export { useCustomToolInstance };
@@ -1,7 +1,7 @@
1
1
  import type { BasicTarget } from '../utils/dom';
2
2
  interface Size {
3
- width?: number;
4
- height?: number;
3
+ width: number;
4
+ height: number;
5
5
  }
6
6
  declare function useSize(target: BasicTarget): Size;
7
7
  export default useSize;
@@ -1,5 +1,6 @@
1
1
  import { AppProps } from '@/App';
2
2
  import AnnotationView from '@/components/AnnotationView';
3
+ import PointCloudAnnotationView from '@/components/AnnotationView/pointCloudAnnotationView';
3
4
  import { i18n } from '@labelbee/lb-utils';
4
5
  import React from 'react';
5
6
  import { VideoTagTool } from '@/components/videoPlayer/TagToolInstanceAdaptorI18nProvider';
@@ -9,4 +10,4 @@ export declare const store: import("redux").Store<{}, import("redux").Action<any
9
10
  };
10
11
  declare const _default: React.ForwardRefExoticComponent<AppProps & React.RefAttributes<unknown>>;
11
12
  export default _default;
12
- export { AnnotationView, i18n, VideoTagTool };
13
+ export { AnnotationView, PointCloudAnnotationView, i18n, VideoTagTool };
@@ -24,7 +24,10 @@ export declare const ANNOTATION_ACTIONS: {
24
24
  SET_BASIC_INDEX: string;
25
25
  CALC_STEP_PROGRESS: string;
26
26
  SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED: string;
27
+ SKIP_BEFORE_PAGE_TURNING: string;
27
28
  SET_LOADING: string;
29
+ SET_POINT_CLOUD_LOADING: string;
30
+ SET_TASK_STEP_LIST: string;
28
31
  };
29
32
  export declare const IMAGE_ATTRIBUTE_ACTIONS: {
30
33
  UPDATE_IMG_ATTRIBUTE: string;
@@ -6,6 +6,9 @@ import { EPageTurningOperation } from '@/data/enums/AnnotationSize';
6
6
  export declare function UpdateToolInstance(toolInstance: ToolInstance): AnnotationActionTypes;
7
7
  export declare function UpdateImgList(imgList: IFileItem[]): AnnotationActionTypes;
8
8
  export declare function UpdateAnnotationConfig(config: string): AnnotationActionTypes;
9
+ export declare function SetTaskStepList({ stepList }: {
10
+ stepList: IStepInfo[];
11
+ }): AnnotationActionTypes;
9
12
  export declare function SetTaskConfig({ stepList, step, }: {
10
13
  stepList: IStepInfo[];
11
14
  step: number;
@@ -18,12 +21,18 @@ export declare function UpdateGetFileData(getFileData: GetFileData): AnnotationA
18
21
  export declare function UpdatePageSize(pageSize: number): AnnotationActionTypes;
19
22
  export declare function UpdateGetFileList(loadFileList: LoadFileList): AnnotationActionTypes;
20
23
  export declare function UpdateRotate(): AnnotationActionTypes;
24
+ export declare function UpdateSkipBeforePageTurning(skipBeforePageTurning: (pageTurning: Function) => {}): AnnotationActionTypes;
21
25
  export declare function CopyBackWordResult(): AnnotationActionTypes;
22
26
  /**
23
27
  * 初始化任务数据
24
28
  * @param param0
25
29
  */
26
- export declare function InitTaskData({ onSubmit, onSave, onPageChange, onStepChange, getFileData, pageSize, loadFileList, step, stepList, }: any): any;
30
+ export declare function InitTaskData({ onSubmit, onSave, onPageChange, onStepChange, getFileData, pageSize, loadFileList, step, stepList, skipBeforePageTurning }: any): any;
31
+ /**
32
+ * 初始化任务数据
33
+ * @param param0
34
+ */
35
+ export declare function UpdateInjectFunc({ onSubmit, onSave, onPageChange, onStepChange, getFileData, pageSize, loadFileList, stepList, }: any): any;
27
36
  /** 切换到下一步 */
28
37
  export declare const ToNextStep: (pageNumber?: number | undefined) => (dispatch: any, getState: any) => any[];
29
38
  /**
@@ -66,3 +75,4 @@ export declare const DispatcherTurning: (dispatch: any, getState: any, pageTurni
66
75
  * */
67
76
  export declare const ChangeSave: (dispatch: Function) => void;
68
77
  export declare const SetAnnotationLoading: (dispatch: Function, loading: boolean) => void;
78
+ export declare const SetPointCloudLoading: (dispatch: Function, loading: boolean) => void;
@@ -33,6 +33,8 @@ export interface AnnotationState {
33
33
  loading: boolean;
34
34
  /** 阻止文件切换后的事件 */
35
35
  triggerEventAfterIndexChanged: boolean;
36
+ skipBeforePageTurning?: (pageTurning: Function) => void;
37
+ pointCloudLoading: boolean;
36
38
  }
37
39
  interface UpdateToolInstance {
38
40
  type: typeof ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE;
@@ -0,0 +1,4 @@
1
+ import { AnyAction, Dispatch } from 'redux';
2
+ export declare const LabelBeeContext: any;
3
+ export declare const useDispatch: () => Dispatch<AnyAction | any>;
4
+ export declare const useSelector: <Selected extends unknown>(selector: (state: any) => Selected, equalityFn?: ((previous: Selected, next: Selected) => boolean) | undefined) => Selected;
@@ -12,4 +12,4 @@ export declare const composeResult: (result: string, pos: {
12
12
  }, newData: {
13
13
  rect: any[];
14
14
  basicRectID?: string;
15
- }) => string;
15
+ }, customObject: Object) => string;
@@ -3,11 +3,14 @@ import { AppState } from 'src/store';
3
3
  import { ImgAttributeState } from 'src/store/imgAttribute/types';
4
4
  import { AppProps } from '@/App';
5
5
  import { AnnotationEngine } from '@labelbee/lb-annotation';
6
+ import { IStepInfo } from '@/types/step';
6
7
  interface IProps extends AppState, AppProps {
7
8
  imgAttribute: ImgAttributeState;
8
9
  imgIndex: number;
9
10
  annotationEngine: AnnotationEngine;
10
11
  loading: boolean;
12
+ stepList: IStepInfo[];
13
+ step: number;
11
14
  }
12
15
  declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
13
16
  children?: React.ReactNode;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ onChange: (tool: number, values: number) => void;
4
+ }
5
+ declare const ScribbleSidebar: React.FC<IProps>;
6
+ export default ScribbleSidebar;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { ToolInstance } from '@/store/annotation/types';
3
3
  interface IProps {
4
4
  toolInstance: ToolInstance;
5
+ zoom?: number;
5
6
  }
6
7
  declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
7
8
  children?: React.ReactNode;
@@ -6,6 +6,7 @@ interface IZoomControllerProps {
6
6
  initialPosition?: () => void;
7
7
  zoomIn?: () => void;
8
8
  zoomOut?: () => void;
9
+ zoom?: number;
9
10
  }
10
11
  export declare const ZoomController: React.FC<IZoomControllerProps>;
11
12
  declare const _default: import("react-redux").ConnectedComponent<React.FC<{
@@ -14,10 +14,11 @@ interface IProps {
14
14
  basicIndex: number;
15
15
  mode?: FooterTheme;
16
16
  footer?: RenderFooter;
17
+ skipBeforePageTurning?: (pageTurning: Function) => void;
17
18
  }
18
19
  export declare const footerCls: string;
19
20
  export declare const FooterDivider: () => JSX.Element;
20
21
  declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
21
22
  children?: React.ReactNode;
22
- }, "stepList" | "step" | "imgIndex" | "basicResultList" | "basicIndex" | "totalPage">>;
23
+ }, "stepList" | "step" | "imgIndex" | "basicResultList" | "basicIndex" | "skipBeforePageTurning" | "totalPage">>;
23
24
  export default _default;