@labelbee/lb-components 1.23.0-alpha.14 → 1.23.0-alpha.141

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 (325) hide show
  1. package/dist/App.js +1 -1
  2. package/dist/_virtual/2DViewWorker.js +1 -0
  3. package/dist/_virtual/highlightSegmentWorker.js +1 -1
  4. package/dist/assets/annotation/icon_link.svg.js +1 -0
  5. package/dist/assets/annotation/icon_unlink.svg.js +1 -0
  6. package/dist/assets/annotation/pointCloudTool/Image2DBoxScale.svg.js +1 -0
  7. package/dist/assets/annotation/pointCloudTool/leftArrow.svg.js +1 -1
  8. package/dist/assets/annotation/pointCloudTool/rightArrow.svg.js +1 -1
  9. package/dist/assets/annotation/pointCloudTool/rotate90_black.svg.js +1 -0
  10. package/dist/assets/icons/ad33251.svg +26 -0
  11. package/dist/components/AnnotationView/hooks/useFilterAnnotations.js +1 -0
  12. package/dist/components/AnnotationView/index.js +1 -1
  13. package/dist/components/DynamicResizer/DynamicResizer.js +1 -0
  14. package/dist/components/DynamicResizer/assets/bottomToZero.svg.js +1 -0
  15. package/dist/components/DynamicResizer/assets/divider.svg.js +1 -0
  16. package/dist/components/DynamicResizer/assets/topToZero.svg.js +1 -0
  17. package/dist/components/DynamicResizer/hooks/useDrag.js +1 -0
  18. package/dist/components/DynamicResizer/hooks/useUpdateHeight.js +1 -0
  19. package/dist/components/DynamicResizer/index.js +1 -0
  20. package/dist/components/LLMMultiWheelView/dialogView/index.js +1 -0
  21. package/dist/components/LLMMultiWheelView/index.js +1 -0
  22. package/dist/components/LLMMultiWheelView/sidebar/index.js +1 -0
  23. package/dist/components/LLMToolView/index.js +1 -1
  24. package/dist/components/LLMToolView/questionView/components/header/index.js +1 -1
  25. package/dist/components/LLMToolView/questionView/components/imgView/index.js +1 -1
  26. package/dist/components/LLMToolView/questionView/index.js +1 -1
  27. package/dist/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
  28. package/dist/components/LLMToolView/sidebar/components/modelAnswerSort/index.js +1 -0
  29. package/dist/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
  30. package/dist/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
  31. package/dist/components/LLMToolView/sidebar/index.js +1 -1
  32. package/dist/components/attributeList/index.js +1 -1
  33. package/dist/components/audioAnnotate/audioContext/index.js +1 -1
  34. package/dist/components/audioAnnotate/audioSide/clipSidebar/index.js +2 -1
  35. package/dist/components/audioAnnotate/index.js +1 -1
  36. package/dist/components/audioAnnotate/textInput/index.js +1 -1
  37. package/dist/components/audioAnnotate/textInput/index.module.scss.js +1 -1
  38. package/dist/components/audioAnnotate/utils/dataTransform.js +1 -0
  39. package/dist/components/audioPlayer/clipRegion/index.js +1 -1
  40. package/dist/components/audioPlayer/index.js +1 -1
  41. package/dist/components/audioPlayer/useAudioCombine/index.js +3 -2
  42. package/dist/components/audioPlayer/useAudioScroll/index.js +1 -1
  43. package/dist/components/audioPlayer/useAudioSegment/index.js +1 -1
  44. package/dist/components/audioPlayer/zoomSlider/index.js +1 -1
  45. package/dist/components/longText/index.js +1 -1
  46. package/dist/components/markdownView/index.js +1 -1
  47. package/dist/components/pointCloud2DRectOperationView/index.js +1 -1
  48. package/dist/components/pointCloud2DRectOperationView/useUpdateRectList.js +1 -0
  49. package/dist/components/pointCloud2DRectOperationView/util.js +1 -0
  50. package/dist/components/pointCloudView/PointCloud2DSingleView.js +1 -1
  51. package/dist/components/pointCloudView/PointCloud2DView.js +1 -1
  52. package/dist/components/pointCloudView/PointCloud3DView.js +1 -1
  53. package/dist/components/pointCloudView/PointCloudBackView.js +1 -1
  54. package/dist/components/pointCloudView/PointCloudContext.js +1 -1
  55. package/dist/components/pointCloudView/PointCloudInfos.js +1 -1
  56. package/dist/components/pointCloudView/PointCloudLayout.js +1 -1
  57. package/dist/components/pointCloudView/PointCloudListener.js +1 -1
  58. package/dist/components/pointCloudView/PointCloudSegment2DView.js +1 -1
  59. package/dist/components/pointCloudView/PointCloudSegmentListener.js +1 -1
  60. package/dist/components/pointCloudView/PointCloudSideView.js +1 -1
  61. package/dist/components/pointCloudView/PointCloudTopView.js +1 -1
  62. package/dist/components/pointCloudView/components/HighlightVisible/index.js +1 -1
  63. package/dist/components/pointCloudView/hooks/useBoxes.js +1 -1
  64. package/dist/components/pointCloudView/hooks/useDataLinkSwitch.js +1 -0
  65. package/dist/components/pointCloudView/hooks/useHighlight.js +1 -1
  66. package/dist/components/pointCloudView/hooks/useHistory.js +1 -1
  67. package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
  68. package/dist/components/pointCloudView/hooks/usePolygon.js +1 -1
  69. package/dist/components/pointCloudView/hooks/useRotate.js +1 -1
  70. package/dist/components/pointCloudView/hooks/useRotateEdge.js +1 -0
  71. package/dist/components/pointCloudView/hooks/useSingleBox.js +1 -1
  72. package/dist/components/pointCloudView/hooks/useStatus.js +1 -1
  73. package/dist/components/pointCloudView/hooks/useTimeoutFunc.js +1 -0
  74. package/dist/components/pointCloudView/hooks/useUpdatePointCloudColor.js +1 -0
  75. package/dist/components/pointCloudView/hooks/useWindowKeydownListener.js +1 -0
  76. package/dist/components/pointCloudView/index.js +1 -1
  77. package/dist/components/pointCloudView/utils/event-polyfill.js +1 -0
  78. package/dist/components/pointCloudView/utils/map.js +1 -0
  79. package/dist/components/predictTracking/predictTrackingIcon/index.js +1 -1
  80. package/dist/components/predictTracking/previewResult/index.js +1 -1
  81. package/dist/components/subAttributeList/index.js +1 -0
  82. package/dist/components/videoAnnotate/videoClipTool/index.js +1 -1
  83. package/dist/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -1
  84. package/dist/data/enums/ToolType.js +1 -1
  85. package/dist/hooks/useToolStyle.js +1 -0
  86. package/dist/index.css +205 -16
  87. package/dist/index.js +1 -1
  88. package/dist/store/Actions.js +1 -1
  89. package/dist/store/LLMMultiWheel/index.js +1 -0
  90. package/dist/store/annotatedBox/index.js +1 -1
  91. package/dist/store/annotation/actionCreators.js +1 -1
  92. package/dist/store/annotation/reducer.js +1 -1
  93. package/dist/store/ctx.js +1 -1
  94. package/dist/store/toolConfig/baseToolConfig.js +1 -0
  95. package/dist/store/toolConfig/index.js +1 -0
  96. package/dist/store/toolConfig/pointCloudToolConfig.js +1 -0
  97. package/dist/types/App.d.ts +6 -1
  98. package/dist/types/components/AnnotationView/hooks/useFilterAnnotations.d.ts +2 -0
  99. package/dist/types/components/AnnotationView/index.d.ts +10 -0
  100. package/dist/types/components/DynamicResizer/DynamicResizer.d.ts +5 -0
  101. package/dist/types/components/DynamicResizer/hooks/useDrag.d.ts +12 -0
  102. package/dist/types/components/DynamicResizer/hooks/useUpdateHeight.d.ts +23 -0
  103. package/dist/types/components/DynamicResizer/index.d.ts +2 -0
  104. package/dist/types/components/DynamicResizer/types/interface.d.ts +17 -0
  105. package/dist/types/components/LLMMultiWheelView/dialogView/index.d.ts +15 -0
  106. package/dist/types/components/LLMMultiWheelView/index.d.ts +21 -0
  107. package/dist/types/components/LLMMultiWheelView/sidebar/index.d.ts +8 -0
  108. package/dist/types/components/LLMMultiWheelView/types.d.ts +62 -0
  109. package/dist/types/components/LLMToolView/questionView/components/header/index.d.ts +15 -0
  110. package/dist/types/components/LLMToolView/questionView/index.d.ts +7 -0
  111. package/dist/types/components/LLMToolView/sidebar/components/answerSort/index.d.ts +3 -0
  112. package/dist/types/components/LLMToolView/sidebar/components/modelAnswerSort/index.d.ts +30 -0
  113. package/dist/types/components/LLMToolView/sidebar/components/textInputBox/index.d.ts +2 -2
  114. package/dist/types/components/LLMToolView/sidebar/index.d.ts +10 -0
  115. package/dist/types/components/LLMToolView/types.d.ts +6 -2
  116. package/dist/types/components/LLMToolView/utils/data.d.ts +1 -0
  117. package/dist/types/components/audioAnnotate/audioContext/index.d.ts +10 -2
  118. package/dist/types/components/audioAnnotate/textInput/index.d.ts +1 -0
  119. package/dist/types/components/audioAnnotate/utils/dataTransform.d.ts +9 -0
  120. package/dist/types/components/audioPlayer/clipRegion/index.d.ts +1 -0
  121. package/dist/types/components/audioPlayer/index.d.ts +28 -21
  122. package/dist/types/components/audioPlayer/zoomSlider/index.d.ts +1 -0
  123. package/dist/types/components/longText/index.d.ts +1 -0
  124. package/dist/types/components/pointCloud2DRectOperationView/index.d.ts +1 -0
  125. package/dist/types/components/pointCloud2DRectOperationView/useUpdateRectList.d.ts +2 -0
  126. package/dist/types/components/pointCloud2DRectOperationView/util.d.ts +8 -0
  127. package/dist/types/components/pointCloudView/2DViewWorker.d.ts +1 -0
  128. package/dist/types/components/pointCloudView/PointCloud2DView.d.ts +1 -0
  129. package/dist/types/components/pointCloudView/PointCloudContext.d.ts +23 -4
  130. package/dist/types/components/pointCloudView/PointCloudLayout.d.ts +1 -0
  131. package/dist/types/components/pointCloudView/PointCloudListener.d.ts +1 -0
  132. package/dist/types/components/pointCloudView/components/HighlightVisible/index.d.ts +2 -1
  133. package/dist/types/components/pointCloudView/hooks/useBoxes.d.ts +5 -3
  134. package/dist/types/components/pointCloudView/hooks/useDataLinkSwitch.d.ts +19 -0
  135. package/dist/types/components/pointCloudView/hooks/useHighlight.d.ts +1 -1
  136. package/dist/types/components/pointCloudView/hooks/usePointCloudViews.d.ts +31 -1
  137. package/dist/types/components/pointCloudView/hooks/useRotateEdge.d.ts +9 -0
  138. package/dist/types/components/pointCloudView/hooks/useSingleBox.d.ts +3 -2
  139. package/dist/types/components/pointCloudView/hooks/useTimeoutFunc.d.ts +6 -0
  140. package/dist/types/components/pointCloudView/hooks/useUpdatePointCloudColor.d.ts +4 -0
  141. package/dist/types/components/pointCloudView/hooks/useWindowKeydownListener.d.ts +16 -0
  142. package/dist/types/components/pointCloudView/index.d.ts +1 -0
  143. package/dist/types/components/pointCloudView/utils/event-polyfill.d.ts +8 -0
  144. package/dist/types/components/pointCloudView/utils/map.d.ts +11 -0
  145. package/dist/types/components/subAttributeList/index.d.ts +10 -0
  146. package/dist/types/components/videoAnnotate/index.d.ts +2 -1
  147. package/dist/types/components/videoAnnotate/videoClipTool/index.d.ts +2 -1
  148. package/dist/types/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.d.ts +1 -1
  149. package/dist/types/data/enums/ToolType.d.ts +2 -1
  150. package/dist/types/hooks/useToolStyle.d.ts +30 -0
  151. package/dist/types/index.d.ts +9 -2
  152. package/dist/types/store/Actions.d.ts +1 -0
  153. package/dist/types/store/LLMMultiWheel/index.d.ts +15 -0
  154. package/dist/types/store/annotatedBox/index.d.ts +2 -0
  155. package/dist/types/store/annotation/actionCreators.d.ts +4 -3
  156. package/dist/types/store/annotation/reducer.d.ts +1 -0
  157. package/dist/types/store/annotation/types.d.ts +9 -2
  158. package/dist/types/store/ctx.d.ts +7 -0
  159. package/dist/types/store/toolConfig/baseToolConfig.d.ts +4 -0
  160. package/dist/types/store/toolConfig/index.d.ts +3 -0
  161. package/dist/types/store/toolConfig/pointCloudToolConfig.d.ts +4 -0
  162. package/dist/types/store/toolConfig/types.d.ts +10 -0
  163. package/dist/types/utils/AnnotationDataUtils.d.ts +58 -1
  164. package/dist/types/utils/ToolPointCloudBoxRenderHelper.d.ts +24 -0
  165. package/dist/types/utils/data.d.ts +0 -2
  166. package/dist/types/utils/index.d.ts +27 -0
  167. package/dist/types/views/MainView/LLMMultiWheelLayout/index.d.ts +9 -0
  168. package/dist/types/views/MainView/sidebar/GeneralOperation/ActionsConfirm.d.ts +1 -0
  169. package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.d.ts +3 -0
  170. package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.d.ts +3 -0
  171. package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.d.ts +3 -0
  172. package/dist/types/views/MainView/sidebar/TextToolSidebar/index.d.ts +1 -1
  173. package/dist/types/views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.d.ts +9 -0
  174. package/dist/types/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.d.ts +3 -0
  175. package/dist/types/views/MainView/toolFooter/BatchSwitchConnectIn2DView/index.d.ts +1 -0
  176. package/dist/types/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.d.ts +10 -2
  177. package/dist/types/views/MainView/toolFooter/index.d.ts +1 -1
  178. package/dist/types/views/MainView/toolHeader/StepSwitch/index.d.ts +1 -1
  179. package/dist/types/views/MainView/toolHeader/index.d.ts +1 -1
  180. package/dist/utils/AnnotationDataUtils.js +1 -1
  181. package/dist/utils/ToolPointCloudBoxRenderHelper.js +1 -0
  182. package/dist/utils/data.js +1 -1
  183. package/dist/utils/index.js +1 -1
  184. package/dist/views/MainView/LLMMultiWheelLayout/index.js +1 -0
  185. package/dist/views/MainView/index.js +1 -1
  186. package/dist/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
  187. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.js +1 -0
  188. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.module.scss.js +1 -0
  189. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.js +1 -0
  190. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.module.scss.js +1 -0
  191. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.js +1 -0
  192. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.module.scss.js +1 -0
  193. package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  194. package/dist/views/MainView/sidebar/TagSidebar/index.js +1 -1
  195. package/dist/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
  196. package/dist/views/MainView/sidebar/index.js +1 -1
  197. package/dist/views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.js +1 -0
  198. package/dist/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.js +1 -0
  199. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
  200. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -1
  201. package/dist/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js +1 -1
  202. package/dist/views/MainView/toolFooter/index.js +1 -1
  203. package/dist/views/MainView/toolHeader/index.js +1 -1
  204. package/es/App.js +1 -1
  205. package/es/_virtual/2DViewWorker.js +1 -0
  206. package/es/_virtual/highlightSegmentWorker.js +1 -1
  207. package/es/assets/annotation/icon_link.svg.js +1 -0
  208. package/es/assets/annotation/icon_unlink.svg.js +1 -0
  209. package/es/assets/annotation/pointCloudTool/Image2DBoxScale.svg.js +1 -0
  210. package/es/assets/annotation/pointCloudTool/leftArrow.svg.js +1 -1
  211. package/es/assets/annotation/pointCloudTool/rightArrow.svg.js +1 -1
  212. package/es/assets/annotation/pointCloudTool/rotate90_black.svg.js +1 -0
  213. package/es/components/AnnotationView/hooks/useFilterAnnotations.js +1 -0
  214. package/es/components/AnnotationView/index.js +1 -1
  215. package/es/components/DynamicResizer/DynamicResizer.js +1 -0
  216. package/es/components/DynamicResizer/assets/bottomToZero.svg.js +1 -0
  217. package/es/components/DynamicResizer/assets/divider.svg.js +1 -0
  218. package/es/components/DynamicResizer/assets/topToZero.svg.js +1 -0
  219. package/es/components/DynamicResizer/hooks/useDrag.js +1 -0
  220. package/es/components/DynamicResizer/hooks/useUpdateHeight.js +1 -0
  221. package/es/components/DynamicResizer/index.js +1 -0
  222. package/es/components/LLMMultiWheelView/dialogView/index.js +1 -0
  223. package/es/components/LLMMultiWheelView/index.js +1 -0
  224. package/es/components/LLMMultiWheelView/sidebar/index.js +1 -0
  225. package/es/components/LLMToolView/index.js +1 -1
  226. package/es/components/LLMToolView/questionView/components/header/index.js +1 -1
  227. package/es/components/LLMToolView/questionView/components/imgView/index.js +1 -1
  228. package/es/components/LLMToolView/questionView/index.js +1 -1
  229. package/es/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
  230. package/es/components/LLMToolView/sidebar/components/modelAnswerSort/index.js +1 -0
  231. package/es/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
  232. package/es/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
  233. package/es/components/LLMToolView/sidebar/index.js +1 -1
  234. package/es/components/attributeList/index.js +1 -1
  235. package/es/components/audioAnnotate/audioContext/index.js +1 -1
  236. package/es/components/audioAnnotate/audioSide/clipSidebar/index.js +2 -1
  237. package/es/components/audioAnnotate/index.js +1 -1
  238. package/es/components/audioAnnotate/textInput/index.js +1 -1
  239. package/es/components/audioAnnotate/textInput/index.module.scss.js +1 -1
  240. package/es/components/audioAnnotate/utils/dataTransform.js +1 -0
  241. package/es/components/audioPlayer/clipRegion/index.js +1 -1
  242. package/es/components/audioPlayer/index.js +1 -1
  243. package/es/components/audioPlayer/useAudioCombine/index.js +3 -2
  244. package/es/components/audioPlayer/useAudioScroll/index.js +1 -1
  245. package/es/components/audioPlayer/useAudioSegment/index.js +1 -1
  246. package/es/components/audioPlayer/zoomSlider/index.js +1 -1
  247. package/es/components/longText/index.js +1 -1
  248. package/es/components/markdownView/index.js +1 -1
  249. package/es/components/pointCloud2DRectOperationView/index.js +1 -1
  250. package/es/components/pointCloud2DRectOperationView/useUpdateRectList.js +1 -0
  251. package/es/components/pointCloud2DRectOperationView/util.js +1 -0
  252. package/es/components/pointCloudView/PointCloud2DSingleView.js +1 -1
  253. package/es/components/pointCloudView/PointCloud2DView.js +1 -1
  254. package/es/components/pointCloudView/PointCloud3DView.js +1 -1
  255. package/es/components/pointCloudView/PointCloudBackView.js +1 -1
  256. package/es/components/pointCloudView/PointCloudContext.js +1 -1
  257. package/es/components/pointCloudView/PointCloudInfos.js +1 -1
  258. package/es/components/pointCloudView/PointCloudLayout.js +1 -1
  259. package/es/components/pointCloudView/PointCloudListener.js +1 -1
  260. package/es/components/pointCloudView/PointCloudSegment2DView.js +1 -1
  261. package/es/components/pointCloudView/PointCloudSegmentListener.js +1 -1
  262. package/es/components/pointCloudView/PointCloudSideView.js +1 -1
  263. package/es/components/pointCloudView/PointCloudTopView.js +1 -1
  264. package/es/components/pointCloudView/components/HighlightVisible/index.js +1 -1
  265. package/es/components/pointCloudView/hooks/useBoxes.js +1 -1
  266. package/es/components/pointCloudView/hooks/useDataLinkSwitch.js +1 -0
  267. package/es/components/pointCloudView/hooks/useHighlight.js +1 -1
  268. package/es/components/pointCloudView/hooks/useHistory.js +1 -1
  269. package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
  270. package/es/components/pointCloudView/hooks/usePolygon.js +1 -1
  271. package/es/components/pointCloudView/hooks/useRotate.js +1 -1
  272. package/es/components/pointCloudView/hooks/useRotateEdge.js +1 -0
  273. package/es/components/pointCloudView/hooks/useSingleBox.js +1 -1
  274. package/es/components/pointCloudView/hooks/useStatus.js +1 -1
  275. package/es/components/pointCloudView/hooks/useTimeoutFunc.js +1 -0
  276. package/es/components/pointCloudView/hooks/useUpdatePointCloudColor.js +1 -0
  277. package/es/components/pointCloudView/hooks/useWindowKeydownListener.js +1 -0
  278. package/es/components/pointCloudView/index.js +1 -1
  279. package/es/components/pointCloudView/utils/event-polyfill.js +1 -0
  280. package/es/components/pointCloudView/utils/map.js +1 -0
  281. package/es/components/predictTracking/predictTrackingIcon/index.js +1 -1
  282. package/es/components/predictTracking/previewResult/index.js +1 -1
  283. package/es/components/subAttributeList/index.js +1 -0
  284. package/es/components/videoAnnotate/videoClipTool/index.js +1 -1
  285. package/es/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -1
  286. package/es/data/enums/ToolType.js +1 -1
  287. package/es/hooks/useToolStyle.js +1 -0
  288. package/es/index.css +205 -16
  289. package/es/index.js +1 -1
  290. package/es/store/Actions.js +1 -1
  291. package/es/store/LLMMultiWheel/index.js +1 -0
  292. package/es/store/annotatedBox/index.js +1 -1
  293. package/es/store/annotation/actionCreators.js +1 -1
  294. package/es/store/annotation/reducer.js +1 -1
  295. package/es/store/ctx.js +1 -1
  296. package/es/store/toolConfig/baseToolConfig.js +1 -0
  297. package/es/store/toolConfig/index.js +1 -0
  298. package/es/store/toolConfig/pointCloudToolConfig.js +1 -0
  299. package/es/utils/AnnotationDataUtils.js +1 -1
  300. package/es/utils/ToolPointCloudBoxRenderHelper.js +1 -0
  301. package/es/utils/data.js +1 -1
  302. package/es/utils/index.js +1 -1
  303. package/es/views/MainView/LLMMultiWheelLayout/index.js +1 -0
  304. package/es/views/MainView/index.js +1 -1
  305. package/es/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
  306. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.js +1 -0
  307. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.module.scss.js +1 -0
  308. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.js +1 -0
  309. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.module.scss.js +1 -0
  310. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.js +1 -0
  311. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.module.scss.js +1 -0
  312. package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  313. package/es/views/MainView/sidebar/TagSidebar/index.js +1 -1
  314. package/es/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
  315. package/es/views/MainView/sidebar/index.js +1 -1
  316. package/es/views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.js +1 -0
  317. package/es/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.js +1 -0
  318. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
  319. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -1
  320. package/es/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js +1 -1
  321. package/es/views/MainView/toolHeader/index.js +1 -1
  322. package/package.json +7 -4
  323. package/dist/assets/annotation/pointCloudTool/rotate180_black.svg.js +0 -1
  324. package/dist/assets/icons/9d70807.svg +0 -5
  325. package/es/assets/annotation/pointCloudTool/rotate180_black.svg.js +0 -1
@@ -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"),util=require("../../components/predictTracking/previewResult/util.js"),__async=(t,e,n)=>new Promise((a,r)=>{var o=s=>{try{u(n.next(s))}catch(i){r(i)}},T=s=>{try{u(n.throw(s))}catch(i){r(i)}},u=s=>s.done?a(s.value):Promise.resolve(s.value).then(o,T);u((n=n.apply(t,e)).next())});const dispatchTasks=(t,e)=>e.map(n=>t(n)),getSubmitByPageOperation=t=>t===AnnotationSize.EPageTurningOperation.Forward?index.ESubmitType.Forward:t===AnnotationSize.EPageTurningOperation.Backward?index.ESubmitType.Backward:t===AnnotationSize.EPageTurningOperation.Jump?index.ESubmitType.Jump:index.ESubmitType.Forward,getBasicIndex=(t,e)=>{var n,a;const{imgList:r,imgIndex:o}=t,{dataSourceStep:T}=reducer.getStepConfig(t.stepList,t.step);return((a=(n=index$1.jsonParser(r[o-1].result)[`step_${T}`])==null?void 0:n.result)==null?void 0:a.length)-1||e};function UpdateToolInstance(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE,payload:{toolInstance:t}}}function SetTaskStepList({stepList:t}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_STEP_LIST,payload:{stepList:t}}}function SetTaskConfig({stepList:t,step:e}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG,payload:{stepList:t,step:e}}}function UpdateOnSubmit(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT,payload:{onSubmit:t}}}function UpdateOnSave(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE,payload:{onSave:t}}}function UpdateOnPageChange(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_PAGE_CHANGE,payload:{onPageChange:t}}}function UpdateOnStepChange(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_STEP_CHANGE,payload:{onStepChange:t}}}function UpdateGetFileData(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA,payload:{getFileData:t}}}function UpdatePageSize(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_PAGE_SIZE,payload:{pageSize:t}}}function UpdateGetFileList(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_LOAD_FILE_LIST,payload:{loadFileList:t}}}function UpdateRotate(){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE}}function UpdateSkipBeforePageTurning(t){return{type:Actions.ANNOTATION_ACTIONS.SKIP_BEFORE_PAGE_TURNING,payload:{skipBeforePageTurning:t}}}function UpdateBeforeRotate(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_BEFORE_ROTATE,payload:{beforeRotate:t}}}function UpdatePreDataProcess(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_PRE_DATA_PROCESS,payload:{preDataProcess:t}}}function CopyBackWordResult(){return{type:Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT}}function BatchUpdateTrackID({id:t,newID:e,rangeIndex:n,imgList:a}){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_TRACK_ID,payload:{id:t,newID:e,rangeIndex:n,imgList:a}}}function BatchUpdateResultByTrackID(t,e,n){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID,payload:{id:t,newData:e,rangeIndex:n}}}function BatchUpdateImgListResultByPredictResult(){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT,payload:{}}}const UpdateCheckMode=t=>({type:Actions.ANNOTATION_ACTIONS.SET_CHECK_MODE,payload:{checkMode:t}}),UpdateHighlightAttribute=t=>({type:Actions.ANNOTATION_ACTIONS.SET_HIGHLIGHT_ATTRIBUTE,payload:{attribute:t}});function InitTaskData({onSubmit:t,onSave:e,onPageChange:n,onStepChange:a,getFileData:r,pageSize:o,loadFileList:T,step:u,stepList:s,skipBeforePageTurning:i,beforeRotate:N,checkMode:p,highlightAttribute:I,preDataProcess:O}){const A=[];return t&&A.push(UpdateOnSubmit(t)),e&&A.push(UpdateOnSave(e)),n&&A.push(UpdateOnPageChange(n)),a&&A.push(UpdateOnStepChange(a)),r&&A.push(UpdateGetFileData(r)),T&&A.push(UpdateGetFileList(T)),o&&A.push(UpdatePageSize(o)),i&&A.push(UpdateSkipBeforePageTurning(i)),N&&A.push(UpdateBeforeRotate(N)),O&&A.push(UpdatePreDataProcess(O)),typeof p=="boolean"&&A.push(UpdateCheckMode(p)),A.push(UpdateHighlightAttribute(I)),A.push(SetTaskConfig({stepList:s,step:u})),A.push({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),A.push({type:Actions.ANNOTATION_ACTIONS.INIT_TOOL}),d=>dispatchTasks(d,A)}function UpdateInjectFunc({onSubmit:t,onSave:e,onPageChange:n,onStepChange:a,getFileData:r,pageSize:o,loadFileList:T,stepList:u,beforeRotate:s,highlightAttribute:i,preDataProcess:N}){const p=[];return t&&p.push(UpdateOnSubmit(t)),e&&p.push(UpdateOnSave(e)),n&&p.push(UpdateOnPageChange(n)),a&&p.push(UpdateOnStepChange(a)),r&&p.push(UpdateGetFileData(r)),T&&p.push(UpdateGetFileList(T)),o&&p.push(UpdatePageSize(o)),s&&p.push(UpdateBeforeRotate(s)),N&&p.push(UpdatePreDataProcess(N)),p.push(UpdateHighlightAttribute(i)),p.push(SetTaskStepList({stepList:u})),I=>dispatchTasks(I,p)}const getNextStep=(t,e)=>{var n;const a=e==null?void 0:e.findIndex(r=>(r==null?void 0:r.step)===t);return(n=e[a+1])==null?void 0:n.step},ToNextStep=t=>(e,n)=>{const{annotation:a}=n(),{step:r,stepList:o}=a,T=getNextStep(r,o);return[e(UpdateProcessingStep(T,t))]},UpdateProcessingStep=(t,e)=>(n,a)=>{var r,o;const{annotation:T}=a();(r=T==null?void 0:T.onStepChange)==null||r.call(T,t);const u=(o=T==null?void 0:T.imgIndex)!=null?o: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:t}}),n({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),n(reducer.LoadFileAndFileData(e!=null?e:u,0))]},ToSubmitFileData=t=>e=>[e({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),e({type:Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA,payload:{submitType:t}})],SubmitAndChangeFileIndex=(t,e,n,a)=>[t(ToSubmitFileData(n)),t(reducer.LoadFileAndFileData(e,a))],ChangeBasicIndex=(t,e)=>[t({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),t({type:Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX,payload:{basicIndex:e}})],ChangeTriggerEventAfterIndexChanged=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED,payload:{triggerEventAfterIndexChanged:e}})},PageBackward=(t=!1)=>(e,n)=>DispatcherTurning(e,n,AnnotationSize.EPageTurningOperation.Backward,t),PageForward=(t=!1)=>(e,n)=>DispatcherTurning(e,n,AnnotationSize.EPageTurningOperation.Forward,t),PageJump=(t,e=!1)=>(n,a)=>{if(t!==a().imgIndex)return DispatcherTurning(n,a,AnnotationSize.EPageTurningOperation.Jump,e,t)},loadImgList=(t,e,n,a)=>__async(void 0,null,function*(){var r;const{loadFileList:o,imgList:T,pageSize:u}=e().annotation,s=Math.floor(n/u);SetAnnotationLoading(t,!0);try{const i=yield o(s,u);if(SetAnnotationLoading(t,!1),!((r=i==null?void 0:i.fileList)==null?void 0:r.length)||!(i==null?void 0:i.total))throw new Error("fileList and total are required");const N=a?new Array(i.total):[...T];return N.splice(s*u,u,...i.fileList),t({type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST,payload:{imgList:N}}),!0}catch(i){SetAnnotationLoading(t,!1),console.error(i)}}),DispatcherTurning=(t,e,n,a=!1,r)=>__async(void 0,null,function*(){var o;const T=e().annotation,{fileIndexChanged:u,fileIndex:s,basicIndexChanged:i,basicIndex:N}=PageOperator.getNextPageInfo(n,T,r),p=getSubmitByPageOperation(n);if(ChangeTriggerEventAfterIndexChanged(t,a),u){if(T.loading||!T.imgList[s]&&!(yield loadImgList(t,e,s)))return;(o=T.onPageChange)==null||o.call(T,s);const I=p===index.ESubmitType.Backward?getBasicIndex(e().annotation,N):N;return SubmitAndChangeFileIndex(t,s,p,I)}return i?ChangeBasicIndex(t,N):t(ToSubmitFileData(p))}),ChangeSave=t=>{t(ToSubmitFileData(index.ESubmitType.Save)),t({type:Actions.ANNOTATION_ACTIONS.SAVE_RESULT})},SetAnnotationLoading=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_LOADING,payload:{loading:e}})},SetPointCloudLoading=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_LOADING,payload:{loading:e}})},SetLoadPCDFileLoading=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_LOADPCDFILE_LOADING,payload:{loadPCDFileLoading:e}})},InitAnnotationState=t=>{t({type:Actions.ANNOTATION_ACTIONS.INIT_ALL_STATE,payload:{}})},SetPredictResult=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT,payload:{result:e}})},SetPredictResultVisible=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT_VISIBLE,payload:{visible:e}})},GetBoxesByID=(t,e)=>(n,a)=>{const{imgList:r,step:o}=a().annotation;return util.getBoxesByTrackID(r,o,t,e)},PreDataProcess=t=>(e,n)=>{var a,r;const{annotation:o}=n();return(r=(a=o==null?void 0:o.preDataProcess)==null?void 0:a.call(o,t))!=null?r:t.dataList};exports.BatchUpdateImgListResultByPredictResult=BatchUpdateImgListResultByPredictResult,exports.BatchUpdateResultByTrackID=BatchUpdateResultByTrackID,exports.BatchUpdateTrackID=BatchUpdateTrackID,exports.ChangeSave=ChangeSave,exports.CopyBackWordResult=CopyBackWordResult,exports.DispatcherTurning=DispatcherTurning,exports.GetBoxesByID=GetBoxesByID,exports.InitAnnotationState=InitAnnotationState,exports.InitTaskData=InitTaskData,exports.PageBackward=PageBackward,exports.PageForward=PageForward,exports.PageJump=PageJump,exports.PreDataProcess=PreDataProcess,exports.SetAnnotationLoading=SetAnnotationLoading,exports.SetLoadPCDFileLoading=SetLoadPCDFileLoading,exports.SetPointCloudLoading=SetPointCloudLoading,exports.SetPredictResult=SetPredictResult,exports.SetPredictResultVisible=SetPredictResultVisible,exports.SetTaskConfig=SetTaskConfig,exports.SetTaskStepList=SetTaskStepList,exports.ToNextStep=ToNextStep,exports.ToSubmitFileData=ToSubmitFileData,exports.UpdateBeforeRotate=UpdateBeforeRotate,exports.UpdateCheckMode=UpdateCheckMode,exports.UpdateGetFileData=UpdateGetFileData,exports.UpdateGetFileList=UpdateGetFileList,exports.UpdateHighlightAttribute=UpdateHighlightAttribute,exports.UpdateInjectFunc=UpdateInjectFunc,exports.UpdateOnPageChange=UpdateOnPageChange,exports.UpdateOnSave=UpdateOnSave,exports.UpdateOnStepChange=UpdateOnStepChange,exports.UpdateOnSubmit=UpdateOnSubmit,exports.UpdatePageSize=UpdatePageSize,exports.UpdatePreDataProcess=UpdatePreDataProcess,exports.UpdateProcessingStep=UpdateProcessingStep,exports.UpdateRotate=UpdateRotate,exports.UpdateSkipBeforePageTurning=UpdateSkipBeforePageTurning,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"),util=require("../../components/predictTracking/previewResult/util.js"),__async=(t,e,n)=>new Promise((a,r)=>{var o=s=>{try{T(n.next(s))}catch(p){r(p)}},i=s=>{try{T(n.throw(s))}catch(p){r(p)}},T=s=>s.done?a(s.value):Promise.resolve(s.value).then(o,i);T((n=n.apply(t,e)).next())});const dispatchTasks=(t,e)=>e.map(n=>t(n)),getSubmitByPageOperation=t=>t===AnnotationSize.EPageTurningOperation.Forward?index.ESubmitType.Forward:t===AnnotationSize.EPageTurningOperation.Backward?index.ESubmitType.Backward:t===AnnotationSize.EPageTurningOperation.Jump?index.ESubmitType.Jump:index.ESubmitType.Forward,getBasicIndex=(t,e)=>{var n,a,r;const{imgList:o,imgIndex:i}=t,{dataSourceStep:T}=reducer.getStepConfig(t.stepList,t.step);return((r=(a=index$1.jsonParser((n=o[i-1])==null?void 0:n.result)[`step_${T}`])==null?void 0:a.result)==null?void 0:r.length)-1||e};function UpdateToolInstance(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE,payload:{toolInstance:t}}}function SetTaskStepList({stepList:t}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_STEP_LIST,payload:{stepList:t}}}function SetTaskConfig({stepList:t,step:e}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG,payload:{stepList:t,step:e}}}function UpdateOnSubmit(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT,payload:{onSubmit:t}}}function UpdateOnSave(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE,payload:{onSave:t}}}function UpdateOnPageChange(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_PAGE_CHANGE,payload:{onPageChange:t}}}function UpdateOnStepChange(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_STEP_CHANGE,payload:{onStepChange:t}}}function UpdateGetFileData(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA,payload:{getFileData:t}}}function UpdatePageSize(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_PAGE_SIZE,payload:{pageSize:t}}}function UpdateGetFileList(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_LOAD_FILE_LIST,payload:{loadFileList:t}}}function UpdateRotate(){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE}}function UpdateSkipBeforePageTurning(t){return{type:Actions.ANNOTATION_ACTIONS.SKIP_BEFORE_PAGE_TURNING,payload:{skipBeforePageTurning:t}}}function UpdateBeforeRotate(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_BEFORE_ROTATE,payload:{beforeRotate:t}}}function UpdatePreDataProcess(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_PRE_DATA_PROCESS,payload:{preDataProcess:t}}}function CopyBackWordResult(){return{type:Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT}}function UpdateImgIndexByExternal(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_INDEX_BY_EXTERNAL,payload:{getImgIndexByExternal:t}}}function BatchUpdateTrackID({id:t,newID:e,rangeIndex:n,imgList:a}){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_TRACK_ID,payload:{id:t,newID:e,rangeIndex:n,imgList:a}}}function BatchUpdateResultByTrackID(t,e,n){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID,payload:{id:t,newData:e,rangeIndex:n}}}function BatchUpdateImgListResultByPredictResult(){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT,payload:{}}}const UpdateCheckMode=t=>({type:Actions.ANNOTATION_ACTIONS.SET_CHECK_MODE,payload:{checkMode:t}}),UpdateHighlightAttribute=t=>({type:Actions.ANNOTATION_ACTIONS.SET_HIGHLIGHT_ATTRIBUTE,payload:{attribute:t}});function InitTaskData({onSubmit:t,onSave:e,onPageChange:n,onStepChange:a,getFileData:r,pageSize:o,loadFileList:i,step:T,stepList:s,skipBeforePageTurning:p,beforeRotate:N,checkMode:A,highlightAttribute:d,preDataProcess:I,getImgIndexByExternal:l}){const u=[];return t&&u.push(UpdateOnSubmit(t)),e&&u.push(UpdateOnSave(e)),n&&u.push(UpdateOnPageChange(n)),a&&u.push(UpdateOnStepChange(a)),r&&u.push(UpdateGetFileData(r)),i&&u.push(UpdateGetFileList(i)),o&&u.push(UpdatePageSize(o)),p&&u.push(UpdateSkipBeforePageTurning(p)),N&&u.push(UpdateBeforeRotate(N)),I&&u.push(UpdatePreDataProcess(I)),typeof A=="boolean"&&u.push(UpdateCheckMode(A)),l&&u.push(UpdateImgIndexByExternal(l)),u.push(UpdateHighlightAttribute(d)),u.push(SetTaskConfig({stepList:s,step:T})),u.push({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),u.push({type:Actions.ANNOTATION_ACTIONS.INIT_TOOL}),O=>dispatchTasks(O,u)}function UpdateInjectFunc({onSubmit:t,onSave:e,onPageChange:n,onStepChange:a,getFileData:r,pageSize:o,loadFileList:i,stepList:T,beforeRotate:s,highlightAttribute:p,preDataProcess:N}){const A=[];return t&&A.push(UpdateOnSubmit(t)),e&&A.push(UpdateOnSave(e)),n&&A.push(UpdateOnPageChange(n)),a&&A.push(UpdateOnStepChange(a)),r&&A.push(UpdateGetFileData(r)),i&&A.push(UpdateGetFileList(i)),o&&A.push(UpdatePageSize(o)),s&&A.push(UpdateBeforeRotate(s)),N&&A.push(UpdatePreDataProcess(N)),A.push(UpdateHighlightAttribute(p)),A.push(SetTaskStepList({stepList:T})),d=>dispatchTasks(d,A)}const getNextStep=(t,e)=>{var n;const a=e==null?void 0:e.findIndex(r=>(r==null?void 0:r.step)===t);return(n=e[a+1])==null?void 0:n.step},ToNextStep=t=>(e,n)=>{const{annotation:a}=n(),{step:r,stepList:o}=a,i=getNextStep(r,o);return[e(UpdateProcessingStep(i,t))]},UpdateProcessingStep=(t,e)=>(n,a)=>{var r,o;const{annotation:i}=a();(r=i==null?void 0:i.onStepChange)==null||r.call(i,t);const T=(o=i==null?void 0:i.imgIndex)!=null?o: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:t}}),n({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),n(reducer.LoadFileAndFileData(e!=null?e:T,0))]},ToSubmitFileData=t=>e=>[e({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),e({type:Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA,payload:{submitType:t}})],SubmitAndChangeFileIndex=(t,e,n,a)=>__async(void 0,null,function*(){t(ToSubmitFileData(n)),yield t(SubmitHandler(n)),t(reducer.LoadFileAndFileData(e,a))}),ChangeBasicIndex=(t,e)=>[t({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),t({type:Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX,payload:{basicIndex:e}})],ChangeTriggerEventAfterIndexChanged=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED,payload:{triggerEventAfterIndexChanged:e}})},PageBackward=(t=!1)=>(e,n)=>DispatcherTurning(e,n,AnnotationSize.EPageTurningOperation.Backward,t),PageForward=(t=!1)=>(e,n)=>DispatcherTurning(e,n,AnnotationSize.EPageTurningOperation.Forward,t),PageJump=(t,e=!1)=>(n,a)=>{if(t!==a().imgIndex)return DispatcherTurning(n,a,AnnotationSize.EPageTurningOperation.Jump,e,t)},loadImgList=(t,e,n,a)=>__async(void 0,null,function*(){var r;const{loadFileList:o,imgList:i,pageSize:T}=e().annotation,s=Math.floor(n/T);SetAnnotationLoading(t,!0);try{const p=yield o(s,T);if(SetAnnotationLoading(t,!1),!((r=p==null?void 0:p.fileList)==null?void 0:r.length)||!(p==null?void 0:p.total))throw new Error("fileList and total are required");const N=a?new Array(p.total):[...i];return N.splice(s*T,T,...p.fileList),t({type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST,payload:{imgList:N}}),!0}catch(p){SetAnnotationLoading(t,!1),console.error(p)}}),DispatcherTurning=(t,e,n,a=!1,r)=>__async(void 0,null,function*(){var o,i;const T=e().annotation,s=getSubmitByPageOperation(n);let{fileIndexChanged:p,fileIndex:N,basicIndexChanged:A,basicIndex:d}=PageOperator.getNextPageInfo(n,T,r);const I=(o=T==null?void 0:T.getImgIndexByExternal)==null?void 0:o.call(T,T.imgIndex,s);if(I!==void 0&&(p=!0,N=I),ChangeTriggerEventAfterIndexChanged(t,a),p){if(T.loading||!T.imgList[N]&&!(yield loadImgList(t,e,N)))return;const l=e();(i=T.onPageChange)==null||i.call(T,N);const u=s===index.ESubmitType.Backward?getBasicIndex(l.annotation,d):d;return SubmitAndChangeFileIndex(t,N,s,u)}return A?ChangeBasicIndex(t,d):t(ToSubmitFileData(s))}),ChangeSave=t=>{t(ToSubmitFileData(index.ESubmitType.Save)),t({type:Actions.ANNOTATION_ACTIONS.SAVE_RESULT})},SetAnnotationLoading=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_LOADING,payload:{loading:e}})},SetLoadPCDFileLoading=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_LOADPCDFILE_LOADING,payload:{loadPCDFileLoading:e}})},InitAnnotationState=t=>{t({type:Actions.ANNOTATION_ACTIONS.INIT_ALL_STATE,payload:{}})},SetPredictResult=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT,payload:{result:e}})},SetPredictResultVisible=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT_VISIBLE,payload:{visible:e}})},GetBoxesByID=(t,e)=>(n,a)=>{const{imgList:r,step:o}=a().annotation;return util.getBoxesByTrackID(r,o,t,e)},PreDataProcess=t=>(e,n)=>{var a,r;const{annotation:o}=n();return(r=(a=o==null?void 0:o.preDataProcess)==null?void 0:a.call(o,t))!=null?r:t.dataList},SubmitHandler=t=>(e,n)=>__async(void 0,null,function*(){const{annotation:a}=n(),{onSubmit:r,imgIndex:o,imgList:i}=a;!r||(yield r([i[o]],t,o,i))});exports.BatchUpdateImgListResultByPredictResult=BatchUpdateImgListResultByPredictResult,exports.BatchUpdateResultByTrackID=BatchUpdateResultByTrackID,exports.BatchUpdateTrackID=BatchUpdateTrackID,exports.ChangeSave=ChangeSave,exports.CopyBackWordResult=CopyBackWordResult,exports.DispatcherTurning=DispatcherTurning,exports.GetBoxesByID=GetBoxesByID,exports.InitAnnotationState=InitAnnotationState,exports.InitTaskData=InitTaskData,exports.PageBackward=PageBackward,exports.PageForward=PageForward,exports.PageJump=PageJump,exports.PreDataProcess=PreDataProcess,exports.SetAnnotationLoading=SetAnnotationLoading,exports.SetLoadPCDFileLoading=SetLoadPCDFileLoading,exports.SetPredictResult=SetPredictResult,exports.SetPredictResultVisible=SetPredictResultVisible,exports.SetTaskConfig=SetTaskConfig,exports.SetTaskStepList=SetTaskStepList,exports.SubmitHandler=SubmitHandler,exports.ToNextStep=ToNextStep,exports.ToSubmitFileData=ToSubmitFileData,exports.UpdateBeforeRotate=UpdateBeforeRotate,exports.UpdateCheckMode=UpdateCheckMode,exports.UpdateGetFileData=UpdateGetFileData,exports.UpdateGetFileList=UpdateGetFileList,exports.UpdateHighlightAttribute=UpdateHighlightAttribute,exports.UpdateImgIndexByExternal=UpdateImgIndexByExternal,exports.UpdateInjectFunc=UpdateInjectFunc,exports.UpdateOnPageChange=UpdateOnPageChange,exports.UpdateOnSave=UpdateOnSave,exports.UpdateOnStepChange=UpdateOnStepChange,exports.UpdateOnSubmit=UpdateOnSubmit,exports.UpdatePageSize=UpdatePageSize,exports.UpdatePreDataProcess=UpdatePreDataProcess,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});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((g,u)=>{var S=I=>{try{N(s.next(I))}catch(m){u(m)}},A=I=>{try{N(s.throw(I))}catch(m){u(m)}},N=I=>I.done?g(I.value):Promise.resolve(I.value).then(S,A);N((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,g)=>{if(g){const u=g.result;if(index.jsonParser(u)[`step_${t}`])return s+1}return s},0)/e.length,updateToolInstance=(e,t)=>{const{step:s,stepList:g}=e,u=StepUtils.getCurrentStepInfo(s,g),S=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,ToolType.EToolName.NLP].includes(u==null?void 0:u.tool))return;const A=document.getElementById("toolContainer");if(!A)throw"Not exist dom named id-toolContainer";const N=index$2.getFormatSize({width:window.innerWidth,height:window.innerHeight}),I=new lbAnnotation.AnnotationEngine({container:A,toolName:u.tool,size:N,imgNode:t,config:S,style:JSON.parse(styleString)});return{toolInstance:I==null?void 0:I.toolInstance,annotationEngine:I}},LoadFileAndFileData=(e,t)=>(s,g)=>__async(void 0,null,function*(){var u,S;const{stepList:A,step:N}=g().annotation,I=StepUtils.currentToolIsVideo(N,A),m=StepUtils.currentToolIsPointCloud(N,A),D=((u=StepUtils.getCurrentStepInfo(N,A))==null?void 0:u.tool)===ToolType.EToolName.LLM,y=((S=StepUtils.getCurrentStepInfo(N,A))==null?void 0:S.tool)===ToolType.EToolName.NLP,P=StepUtils.currentToolIsAudio(N,A);if(actionCreators.SetAnnotationLoading(s,!0),yield s(TryGetFileDataByAPI(e)),I){s(AfterVideoLoaded(e));return}if(m||D||P||y){s(AfterCommonLoaded(e));return}s(AfterImageLoaded(e,t))}),TryGetFileDataByAPI=e=>(t,s)=>__async(void 0,null,function*(){const{getFileData:g,imgList:u}=s().annotation;if(g){const S=yield g(u[e],e);t({type:Actions.ANNOTATION_ACTIONS.SET_FILE_DATA,payload:{fileData:S,index:e}})}}),AfterVideoLoaded=e=>t=>{t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterCommonLoaded=e=>t=>{actionCreators.SetAnnotationLoading(t,!1),t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterImageLoaded=(e,t)=>(s,g)=>{var u;const{toolInstance:S,imgList:A}=g().annotation,N=(u=A==null?void 0:A[e])==null?void 0:u.url;lbAnnotation.ImgUtils.load(N).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),S==null||S.setErrorImg(),s({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e,nextBasicIndex:t}})})},composeResultByToolInstance=({toolInstance:e,imgList:t,imgIndex:s,stepList:g,step:u=1})=>{var S,A,N,I;const m=((S=t[s])==null?void 0:S.result)||"",[D,y,P]=(A=e==null?void 0:e.exportData())!=null?A:[],x=(I=(N=e==null?void 0:e.exportCustomData)==null?void 0:N.call(e))!=null?I:{},B=data.composeResultWithBasicImgInfo(m,y),w=data.composeResult(B,{step:u,stepList:g},{rect:D},x);return t.map((b,F)=>F===s?__spreadValues(__spreadProps(__spreadValues({},b),{result:w}),P):__spreadValues({},b))},annotationReducer=(e=__spreadValues({},initialState),t)=>{var s,g,u,S,A,N,I,m,D,y,P,x,B,w,b,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,l=calcStepProgress(n,o);return __spreadProps(__spreadValues({},e),{stepProgress:l})}case Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA:{const{imgList:n,imgIndex:o,step:l,stepList:i,toolInstance:a,onSubmit:r,resultList:p}=e;if(!a||!n[o])return e;const d=((s=n[o])==null?void 0:s.result)||"",[,c,T]=(g=a==null?void 0:a.exportData())!=null?g:[],O=(S=(u=a==null?void 0:a.exportCustomData)==null?void 0:u.call(a))!=null?S:{},f=data.composeResultWithBasicImgInfo(d,c),C=data.composeResult(f,{step:l,stepList:i},{rect:p},O),L=e.imgList.map((v,E)=>{if(E===o){const U=AnnotationDataUtils.dataCorrection(C,d,l,i);return __spreadValues(__spreadProps(__spreadValues({},v),{result:U}),T)}return v});if(((A=t.payload)==null?void 0:A.submitType)===index$1.ESubmitType.SyncImgList)return __spreadProps(__spreadValues({},e),{imgList:L});r&&r([L[o]],(N=t.payload)==null?void 0:N.submitType,o,L);const R=calcStepProgress(L,l);return __spreadProps(__spreadValues({},e),{stepProgress:R,imgList:L})}case Actions.ANNOTATION_ACTIONS.SAVE_RESULT:{const{imgList:n,imgIndex:o,onSave:l}=e;return l==null||l(n[o],o,n),__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT:{const{imgList:n,basicIndex:o,resultList:l,toolInstance:i,basicResultList:a}=e;if(!i)return e;const[r]=(I=i==null?void 0:i.exportData())!=null?I:[];let p=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}));p=___default.default.cloneDeep(l).filter(T=>T.sourceID!==d),p.push(...c)}return __spreadProps(__spreadValues({},e),{resultList:p,imgList:n})}case Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX:{const{toolInstance:n,step:o,imgList:l,imgIndex:i,stepList:a,annotationEngine:r,resultList:p,basicResultList:d}=e;if(!n||!r)return e;const c=t.payload.basicIndex,T=(D=d[c])==null?void 0:D.id,O=index.jsonParser((y=l[i])==null?void 0:y.result),f=(p||[]).filter(U=>U.sourceID===T),C=getStepConfig(a,o),{dataSourceStep:L,tool:R}=C,v=getStepConfig(a,L);let E=[];return L&&R&&(E=(P=O[`step_${L}`])==null?void 0:P.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:l,annotationEngine:i,stepList:a}=e;if(!l)return __spreadProps(__spreadValues({},e),{imgIndex:t.payload.nextIndex});const r=StepUtils.getCurrentStepInfo(o,a),{nextIndex:p,imgNode:d,nextBasicIndex:c,imgError:T}=t.payload,O=c!=null?c:0,f=index.jsonParser((x=n[p])==null?void 0:x.result),C=f[`step_${r.step}`],L=!C,R={rotate:(B=f.rotate)!=null?B:0,valid:(w=f.valid)!=null?w:!0};d&&T!==!0?i==null||i.setImgNode(d,R):l==null||l.setValid(R.valid);const v=getStepConfig(a,r.step),{dataSourceStep:E,tool:U}=v,$=getStepConfig(a,E),Y=E&&U,h=(F=(b=f[`step_${E}`])==null?void 0:b.result)!=null?F:[],j=AnnotationDataUtils.getInitialResultList(C==null?void 0:C.result,l,v,h,L);if(i==null||i.launchOperation(),Y&&((h==null?void 0:h.length)>0?i==null||i.setBasicInfo($.tool,h[O]):(i==null||i.setBasicInfo($.tool),i==null||i.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),r.tool!=="check"){const J=(V=(G=h[O])==null?void 0:G.id)!=null?V:"",X=Y?j.filter(Z=>lbAnnotation.CommonToolUtils.isSameSourceID(Z.sourceID,J)):j;(M=l==null?void 0:l.history)==null||M.initRecord(j,!0),l==null||l.setResult(X)}return __spreadProps(__spreadValues({},e),{imgIndex:p,basicIndex:O,basicResultList:h,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:l,annotationEngine:i}=o;return __spreadProps(__spreadValues({},e),{toolInstance:l,annotationEngine:i})}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:l}=e,i=[...l];return i[o]=__spreadValues(__spreadValues({},i[o]),n),__spreadProps(__spreadValues({},e),{imgList:i})}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:l,step:i}=e;if(!n)return e;if(o===0||o>=l.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),e;const a=l[o-1].result;if(!a)return e;const r=AnnotationDataUtils.copyResultChange(a,i,(K=l[o].result)!=null?K:"");l[o]=__spreadProps(__spreadValues({},l[o]),{result:r});const d=index.jsonParser(r)[`step_${i}`],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,l[o]),__spreadProps(__spreadValues({},e),{imgList:[...l]})}case Actions.ANNOTATION_ACTIONS.SET_STEP:{const{stepList:n,annotationEngine:o}=e,{toStep:l}=t.payload;if(o){const i=getStepConfig(n,l);return o==null||o.setToolName(i.tool,i.config),__spreadProps(__spreadValues({},e),{step:l,toolInstance:o==null?void 0:o.toolInstance})}return __spreadProps(__spreadValues({},e),{step:l})}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:l,imgList:i}=t.payload,{imgIndex:a,onSubmit:r}=e,p=[],d=i.map((c,T)=>{if(lbAnnotation.MathUtils.isInRange(T,l)){const O=__spreadProps(__spreadValues({},c),{result:lbUtils.PointCloudUtils.batchUpdateTrackID({id:n,newID:o,result:c.result})});return p.push({imgIndex:T,newInfo:O}),O}return c});return r&&r([d[a]],index$1.ESubmitType.BatchUpdateTrackID,a,d,{updateImgList:p}),__spreadProps(__spreadValues({},e),{imgList:d})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:n,newData:o,rangeIndex:l}=t.payload,{imgList:i,imgIndex:a,onSubmit:r}=e,p=[],d=i.map((c,T)=>{if(lbAnnotation.MathUtils.isInRange(T,l)){const O=__spreadProps(__spreadValues({},c),{result:lbUtils.PointCloudUtils.batchUpdateResultByTrackID({id:n,newData:o,result:c.result})});return p.push({imgIndex:T,newInfo:O}),O}return c});return r&&r([d[a]],index$1.ESubmitType.BatchUpdateTrackID,a,d,{updateImgList:p}),__spreadProps(__spreadValues({},e),{imgList:d})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:{const{onSubmit:n,imgList:o,stepList:l,step:i,predictionResult:a}=e,r={};a.forEach(T=>{const{index:O}=T;r[O]=___default.default.pick(T,["center","width","height","depth","rotation","id","attribute","valid","trackID"])});const p=`step_${i}`,d=[],c=o.map((T,O)=>{if(r[O]){const f=T.result==="{}"?index.jsonParser(data.composeResult("",{step:i,stepList:l},{rect:[]},{})):index.jsonParser(T.result);f[p].result.push(r[O]);const C=__spreadProps(__spreadValues({},T),{result:JSON.stringify(f)});return d.push({imgIndex:O,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,l)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l,__spreadValues=(e,t)=>{for(var l in t||(t={}))__hasOwnProp.call(t,l)&&__defNormalProp(e,l,t[l]);if(__getOwnPropSymbols)for(var l of __getOwnPropSymbols(t))__propIsEnum.call(t,l)&&__defNormalProp(e,l,t[l]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__async=(e,t,l)=>new Promise((g,u)=>{var S=I=>{try{O(l.next(I))}catch(m){u(m)}},p=I=>{try{O(l.throw(I))}catch(m){u(m)}},O=I=>I.done?g(I.value):Promise.resolve(I.value).then(S,p);O((l=l.apply(e,t)).next())});const getStepConfig=(e,t)=>e.find(l=>l.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:l}=e;return Math.ceil(t.length/l)},calcStepProgress=(e,t)=>e.reduce((l,g)=>{if(g){const u=g.result;if(index.jsonParser(u)[`step_${t}`])return l+1}return l},0)/e.length,updateToolInstance=(e,t)=>{const{step:l,stepList:g}=e,u=StepUtils.getCurrentStepInfo(l,g),S=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,ToolType.EToolName.NLP,ToolType.EToolName.LLMMultiWheel].includes(u==null?void 0:u.tool))return;const p=document.getElementById("toolContainer");if(!p)throw"Not exist dom named id-toolContainer";const O=index$2.getFormatSize({width:window.innerWidth,height:window.innerHeight}),I=new lbAnnotation.AnnotationEngine({container:p,toolName:u.tool,size:O,imgNode:t,config:S,style:JSON.parse(styleString)});return{toolInstance:I==null?void 0:I.toolInstance,annotationEngine:I}},LoadFileAndFileData=(e,t)=>(l,g)=>__async(void 0,null,function*(){var u,S;const{stepList:p,step:O}=g().annotation,I=StepUtils.currentToolIsVideo(O,p),m=StepUtils.currentToolIsPointCloud(O,p),D=[ToolType.EToolName.LLM,ToolType.EToolName.LLMMultiWheel].includes((u=StepUtils.getCurrentStepInfo(O,p))==null?void 0:u.tool),y=((S=StepUtils.getCurrentStepInfo(O,p))==null?void 0:S.tool)===ToolType.EToolName.NLP,P=StepUtils.currentToolIsAudio(O,p);if(actionCreators.SetAnnotationLoading(l,!0),yield l(TryGetFileDataByAPI(e)),I){l(AfterVideoLoaded(e));return}if(m||D||P||y){l(AfterCommonLoaded(e));return}l(AfterImageLoaded(e,t))}),TryGetFileDataByAPI=e=>(t,l)=>__async(void 0,null,function*(){const{getFileData:g,imgList:u}=l().annotation;if(g){const S=yield g(u[e],e);t({type:Actions.ANNOTATION_ACTIONS.SET_FILE_DATA,payload:{fileData:S,index:e}})}}),AfterVideoLoaded=e=>t=>{t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterCommonLoaded=e=>t=>{actionCreators.SetAnnotationLoading(t,!1),t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterImageLoaded=(e,t)=>(l,g)=>{var u;const{toolInstance:S,imgList:p}=g().annotation,O=(u=p==null?void 0:p[e])==null?void 0:u.url;lbAnnotation.ImgUtils.load(O).then(I=>{actionCreators.SetAnnotationLoading(l,!1),l({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{imgNode:I,nextIndex:e,nextBasicIndex:t}})}).catch(()=>{actionCreators.SetAnnotationLoading(l,!1),S==null||S.setErrorImg(),l({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e,nextBasicIndex:t}})})},composeResultByToolInstance=({toolInstance:e,imgList:t,imgIndex:l,stepList:g,step:u=1})=>{var S,p,O,I;const m=((S=t[l])==null?void 0:S.result)||"",[D,y,P]=(p=e==null?void 0:e.exportData())!=null?p:[],x=(I=(O=e==null?void 0:e.exportCustomData)==null?void 0:O.call(e))!=null?I:{},B=data.composeResultWithBasicImgInfo(m,y),w=data.composeResult(B,{step:u,stepList:g},{rect:D},x);return t.map((b,F)=>F===l?__spreadValues(__spreadProps(__spreadValues({},b),{result:w}),P):__spreadValues({},b))},annotationReducer=(e=__spreadValues({},initialState),t)=>{var l,g,u,S,p,O,I,m,D,y,P,x,B,w,b,F,M,G,V,q,k,H,z,W,K,$,X,Y;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,s=calcStepProgress(n,o);return __spreadProps(__spreadValues({},e),{stepProgress:s})}case Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA:{const{imgList:n,imgIndex:o,step:s,stepList:i,toolInstance:a,onSubmit:r,resultList:A}=e;if(!a||!n[o])return e;const T=((l=n[o])==null?void 0:l.result)||"",[,d,c]=(g=a==null?void 0:a.exportData())!=null?g:[],N=(S=(u=a==null?void 0:a.exportCustomData)==null?void 0:u.call(a))!=null?S:{},f=data.composeResultWithBasicImgInfo(T,d),L=data.composeResult(f,{step:s,stepList:i},{rect:A},N),C=e.imgList.map((v,E)=>{if(E===o){const U=AnnotationDataUtils.dataCorrection(L,T,s,i);return __spreadValues(__spreadProps(__spreadValues({},v),{result:U}),c)}return v});if(((p=t.payload)==null?void 0:p.submitType)===index$1.ESubmitType.SyncImgList)return __spreadProps(__spreadValues({},e),{imgList:C});const R=calcStepProgress(C,s);return __spreadProps(__spreadValues({},e),{stepProgress:R,imgList:C})}case Actions.ANNOTATION_ACTIONS.SAVE_RESULT:{const{imgList:n,imgIndex:o,onSave:s}=e;return s==null||s(n[o],o,n),__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT:{const{imgList:n,basicIndex:o,resultList:s,toolInstance:i,basicResultList:a}=e;if(!i)return e;const[r]=(O=i==null?void 0:i.exportData())!=null?O:[];let A=r;if((a==null?void 0:a.length)>0){const T=(I=a[o])==null?void 0:I.id,d=r.map(c=>__spreadProps(__spreadValues({},c),{sourceID:T}));A=___default.default.cloneDeep(s).filter(c=>c.sourceID!==T),A.push(...d)}return __spreadProps(__spreadValues({},e),{resultList:A,imgList:n})}case Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX:{const{toolInstance:n,step:o,imgList:s,imgIndex:i,stepList:a,annotationEngine:r,resultList:A,basicResultList:T}=e;if(!n||!r)return e;const d=t.payload.basicIndex,c=(m=T[d])==null?void 0:m.id,N=index.jsonParser((D=s[i])==null?void 0:D.result),f=(A||[]).filter(U=>U.sourceID===c),L=getStepConfig(a,o),{dataSourceStep:C,tool:R}=L,v=getStepConfig(a,C);let E=[];return C&&R&&(E=(y=N[`step_${C}`])==null?void 0:y.result,(E==null?void 0:E.length)>0?(r==null||r.setBasicInfo(v.tool,E[d]),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:d})}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:s,annotationEngine:i,stepList:a}=e;if(!s)return __spreadProps(__spreadValues({},e),{imgIndex:t.payload.nextIndex});const r=StepUtils.getCurrentStepInfo(o,a),{nextIndex:A,imgNode:T,nextBasicIndex:d,imgError:c}=t.payload,N=d!=null?d:0,f=index.jsonParser((P=n[A])==null?void 0:P.result),L=f[`step_${r.step}`],C=!L,R={rotate:(x=f.rotate)!=null?x:0,valid:(B=f.valid)!=null?B:!0};T&&c!==!0?i==null||i.setImgNode(T,R):s==null||s.setValid(R.valid);const v=getStepConfig(a,r.step),{dataSourceStep:E,tool:U}=v,J=getStepConfig(a,E),Z=E&&U,h=(b=(w=f[`step_${E}`])==null?void 0:w.result)!=null?b:[],j=AnnotationDataUtils.getInitialResultList(L==null?void 0:L.result,s,v,h,C);if(i==null||i.launchOperation(),Z&&((h==null?void 0:h.length)>0?i==null||i.setBasicInfo(J.tool,h[N]):(i==null||i.setBasicInfo(J.tool),i==null||i.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),r.tool!=="check"){const Q=(M=(F=h[N])==null?void 0:F.id)!=null?M:"",ee=Z?j.filter(te=>lbAnnotation.CommonToolUtils.isSameSourceID(te.sourceID,Q)):j;(G=s==null?void 0:s.history)==null||G.initRecord(j,!0),s==null||s.setResult(ee)}return __spreadProps(__spreadValues({},e),{imgIndex:A,basicIndex:N,basicResultList:h,resultList:j})}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_CONFIG:return __spreadProps(__spreadValues({},e),{config:(V=t.payload.config)!=null?V:"{}"});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:s,annotationEngine:i}=o;return __spreadProps(__spreadValues({},e),{toolInstance:s,annotationEngine:i})}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.UPDATE_IMG_INDEX_BY_EXTERNAL:return __spreadProps(__spreadValues({},e),{getImgIndexByExternal:t.payload.getImgIndexByExternal});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:s}=e,i=[...s];return i[o]=__spreadValues(__spreadValues({},i[o]),n),__spreadProps(__spreadValues({},e),{imgList:i})}case Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE:{const{toolInstance:n,beforeRotate:o}=e;return o&&o()===!1||(k=n==null?void 0:n.updateRotate)==null||k.call(n),e}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_VALID:{const{toolInstance:n}=e,o=(H=n==null?void 0:n.valid)!=null?H:!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:s,step:i,stepList:a}=e;if(!n)return e;if(o===0||o>=s.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),e;const r=s[o-1].result;if(!r)return e;const A=StepUtils.getCurrentStepInfo(i,a),T=(z=A==null?void 0:A.step)!=null?z:i,d=(W=n==null?void 0:n.valid)!=null?W:!0,c=AnnotationDataUtils.copyResultChange({copyResult:r,step:T,currentResult:(K=s[o].result)!=null?K:"",preMappingImgList:($=s[o-1].mappingImgList)!=null?$:[],mappingImgList:(X=s[o].mappingImgList)!=null?X:[],valid:d});s[o]=__spreadProps(__spreadValues({},s[o]),{result:c});const f=index.jsonParser(c)[`step_${i}`],L=(f==null?void 0:f.result)||[];return n==null||n.setResult(L),n==null||n.history.pushHistory(L),(Y=n==null?void 0:n.asyncData)==null||Y.call(n,s[o]),__spreadProps(__spreadValues({},e),{imgList:[...s]})}case Actions.ANNOTATION_ACTIONS.SET_STEP:{const{stepList:n,annotationEngine:o}=e,{toStep:s}=t.payload;if(o){const i=getStepConfig(n,s);return o==null||o.setToolName(i.tool,i.config),__spreadProps(__spreadValues({},e),{step:s,toolInstance:o==null?void 0:o.toolInstance})}return __spreadProps(__spreadValues({},e),{step:s})}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:s,imgList:i}=t.payload,{imgIndex:a,onSubmit:r}=e,A=[],T=i.map((d,c)=>{if(lbAnnotation.MathUtils.isInRange(c,s)){const N=__spreadProps(__spreadValues({},d),{result:lbUtils.PointCloudUtils.batchUpdateTrackID({id:n,newID:o,result:d.result})});return A.push({imgIndex:c,newInfo:N}),N}return d});return r&&r([T[a]],index$1.ESubmitType.BatchUpdateTrackID,a,T,{updateImgList:A}),__spreadProps(__spreadValues({},e),{imgList:T})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:n,newData:o,rangeIndex:s}=t.payload,{imgList:i,imgIndex:a,onSubmit:r}=e,A=[],T=i.map((d,c)=>{if(lbAnnotation.MathUtils.isInRange(c,s)){const N=__spreadProps(__spreadValues({},d),{result:lbUtils.PointCloudUtils.batchUpdateResultByTrackID({id:n,newData:o,result:d.result})});return A.push({imgIndex:c,newInfo:N}),N}return d});return r&&r([T[a]],index$1.ESubmitType.BatchUpdateTrackID,a,T,{updateImgList:A}),__spreadProps(__spreadValues({},e),{imgList:T})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:{const{onSubmit:n,imgList:o,stepList:s,step:i,predictionResult:a}=e,r={};a.forEach(c=>{const{index:N}=c;r[N]=___default.default.pick(c,["center","width","height","depth","rotation","id","attribute","valid","trackID"])});const A=`step_${i}`,T=[],d=o.map((c,N)=>{if(r[N]){const f=c.result==="{}"?index.jsonParser(data.composeResult("",{step:i,stepList:s},{rect:[]},{})):index.jsonParser(c.result);f[A].result.push(r[N]);const L=__spreadProps(__spreadValues({},c),{result:JSON.stringify(f)});return T.push({imgIndex:N,newInfo:L}),L}return c});return n==null||n(d,index$1.ESubmitType.BatchUpdateImgList,-1,d,{updateImgList:T}),__spreadProps(__spreadValues({},e),{imgList:d})}default:return e}};exports.LoadFileAndFileData=LoadFileAndFileData,exports.annotationReducer=annotationReducer,exports.composeResultByToolInstance=composeResultByToolInstance,exports.getStepConfig=getStepConfig,exports.getTotalPage=getTotalPage;
package/dist/store/ctx.js CHANGED
@@ -1 +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),LLMContext=React__default.default.createContext({hoverKey:-1,newAnswerList:[],setHoverKey:()=>{},modelAPIResponse:[],setModelAPIResponse:()=>{},setNewAnswerList:()=>{}}),NLPContext=React__default.default.createContext({highlightKey:"",setHighlightKey:()=>{}});exports.LLMContext=LLMContext,exports.LabelBeeContext=LabelBeeContext,exports.NLPContext=NLPContext,exports.useDispatch=useDispatch,exports.useSelector=useSelector;
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),LLMContext=React__default.default.createContext({hoverKey:-1,newAnswerList:[],setHoverKey:()=>{},modelAPIResponse:[],setModelAPIResponse:()=>{},setNewAnswerList:()=>{}}),NLPContext=React__default.default.createContext({highlightKey:"",setHighlightKey:()=>{}});React__default.default.createContext({hoverKey:-1,setHoverKey:()=>{},selectKey:1,setSelectKey:()=>{}}),exports.LLMContext=LLMContext,exports.LabelBeeContext=LabelBeeContext,exports.NLPContext=NLPContext,exports.useDispatch=useDispatch,exports.useSelector=useSelector;
@@ -0,0 +1 @@
1
+ "use strict";const baseToolStateCreator=(t,e)=>({onlyLoadFirstData:!1,setOnlyLoadFirstData:a=>t(s=>({onlyLoadFirstData:a}))});module.exports=baseToolStateCreator;
@@ -0,0 +1 @@
1
+ "use strict";var zustand=require("zustand"),baseToolConfig=require("./baseToolConfig.js"),pointCloudToolConfig=require("./pointCloudToolConfig.js"),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(o,r,e)=>r in o?__defProp(o,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[r]=e,__spreadValues=(o,r)=>{for(var e in r||(r={}))__hasOwnProp.call(r,e)&&__defNormalProp(o,e,r[e]);if(__getOwnPropSymbols)for(var e of __getOwnPropSymbols(r))__propIsEnum.call(r,e)&&__defNormalProp(o,e,r[e]);return o};const useToolConfigStore=zustand.create((o,r,e)=>__spreadValues(__spreadValues({},baseToolConfig(o)),pointCloudToolConfig(o)));module.exports=useToolConfigStore;
@@ -0,0 +1 @@
1
+ "use strict";const pointCloudToolStateCreator=(e,o)=>({selectBoxVisibleSwitch:!1,setSelectBoxVisibleSwitch:t=>e(()=>({selectBoxVisibleSwitch:t}))});module.exports=pointCloudToolStateCreator;
@@ -1,10 +1,11 @@
1
1
  import { IPointCloudBox } from '@labelbee/lb-utils';
2
2
  import React from 'react';
3
3
  import { ToolInstance } from './store/annotation/types';
4
- import { GetFileData, IFileItem, LoadFileList, OnPageChange, OnSave, OnStepChange, OnSubmit } from './types/data';
4
+ import { GetFileData, GetImgIndexByExternal, IFileItem, LoadFileList, OnPageChange, OnSave, OnStepChange, OnSubmit } from './types/data';
5
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
+ import type { ToolStyle } from './types/toolStyle';
8
9
  interface IAnnotationStyle {
9
10
  strokeColor: string;
10
11
  fillColor: string;
@@ -77,6 +78,10 @@ export interface AppProps {
77
78
  }) => void;
78
79
  preDataProcess?: (params: IPreDataProcessParams) => IPointCloudBox[];
79
80
  auditContext?: any;
81
+ getImgIndexByExternal: GetImgIndexByExternal;
82
+ annotationBefore?: (setAnnotationData: Function) => void;
83
+ setResourceLoading?: (loading: boolean) => void;
84
+ toolStyle?: ToolStyle;
80
85
  }
81
86
  declare const _default: import("react-redux").ConnectedComponent<React.FC<AppProps>, import("react-redux").Omit<AppProps & {
82
87
  children?: React.ReactNode;
@@ -0,0 +1,2 @@
1
+ declare const useFilterAnnotations: (originAnnotations: any[] | undefined, selectedIDs: string[] | undefined, selectBoxVisibleSwitch: boolean) => any[];
2
+ export default useFilterAnnotations;
@@ -3,9 +3,12 @@
3
3
  * @author laoluo
4
4
  */
5
5
  import React from 'react';
6
+ import { EPointCloudName } from '@labelbee/lb-annotation';
7
+ import { IPointCloudBoxList } from '@labelbee/lb-utils';
6
8
  export type TAfterImgOnLoad = (img: HTMLImageElement) => void;
7
9
  interface IProps {
8
10
  src: string;
11
+ fallbackSrc?: string;
9
12
  size?: {
10
13
  width?: number;
11
14
  height?: number;
@@ -29,6 +32,13 @@ interface IProps {
29
32
  };
30
33
  staticMode?: boolean;
31
34
  measureVisible?: boolean;
35
+ onRightClick?: (e: {
36
+ event: MouseEvent;
37
+ targetId: string;
38
+ }) => void;
39
+ pointCloudBoxList?: IPointCloudBoxList;
40
+ hiddenText?: boolean;
41
+ renderToolName?: EPointCloudName.PointCloud | undefined;
32
42
  }
33
43
  declare const _default: React.ForwardRefExoticComponent<IProps & React.RefAttributes<unknown>>;
34
44
  export default _default;
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import './DynamicResizer.scss';
3
+ import { DynamicResizerProps } from './types/interface';
4
+ declare const DynamicResizer: FC<DynamicResizerProps>;
5
+ export default DynamicResizer;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { DragProps } from '../types/interface';
3
+ declare const useDrag: ({ containerRef, minTopHeight, minBottomHeight, defaultHeight, axis, localKey, isShortcutButton, }: DragProps) => {
4
+ rendered: React.JSX.Element;
5
+ topStyle: {
6
+ height: string;
7
+ };
8
+ bottomStyle: {
9
+ height: string;
10
+ };
11
+ };
12
+ export default useDrag;
@@ -0,0 +1,23 @@
1
+ import { RefObject } from 'react';
2
+ declare const useUpdateHeight: (containerRef: RefObject<HTMLDivElement>, minTopHeight: number, minBottomHeight: number, defaultHeight: number, cacheKey: string) => {
3
+ topHeight: number;
4
+ bottomHeight: number;
5
+ position: {
6
+ x: number;
7
+ y: number;
8
+ };
9
+ bounds: {
10
+ top: number;
11
+ bottom: number;
12
+ };
13
+ topStyle: {
14
+ height: string;
15
+ };
16
+ bottomStyle: {
17
+ height: string;
18
+ };
19
+ updateELHeight: (newTopHeight: number) => void;
20
+ setBottomHeightToZero: () => void;
21
+ setTopHeightToZero: () => void;
22
+ };
23
+ export default useUpdateHeight;
@@ -0,0 +1,2 @@
1
+ import DynamicResizer from './DynamicResizer';
2
+ export default DynamicResizer;
@@ -0,0 +1,17 @@
1
+ import { ReactElement, RefObject } from 'react';
2
+ interface Common {
3
+ defaultHeight?: number;
4
+ minTopHeight?: number;
5
+ minBottomHeight?: number;
6
+ axis?: 'x' | 'y';
7
+ localKey?: string;
8
+ customDivider?: ReactElement;
9
+ isShortcutButton?: boolean;
10
+ }
11
+ export interface DynamicResizerProps extends Common {
12
+ children: ReactElement[] | Element[] | Boolean[];
13
+ }
14
+ export interface DragProps extends Common {
15
+ containerRef: RefObject<HTMLDivElement>;
16
+ }
17
+ export {};
@@ -0,0 +1,15 @@
1
+ import { ILLMMultiWheelToolConfig } from '@/components/LLMToolView/types';
2
+ import React from 'react';
3
+ interface IDialogViewProps {
4
+ id: number | string;
5
+ answerList: any;
6
+ question: any;
7
+ name?: string;
8
+ index: number;
9
+ isSelected: boolean;
10
+ answerIsImg: boolean;
11
+ questionIsImg: boolean;
12
+ LLMConfig?: ILLMMultiWheelToolConfig;
13
+ }
14
+ declare const DialogView: (props: IDialogViewProps) => React.JSX.Element;
15
+ export default DialogView;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { ILLMMultiWheelToolConfig } from '../LLMToolView/types';
3
+ import { DrawLayerSlot } from '@/types/main';
4
+ interface IProps {
5
+ annotation?: any;
6
+ showTips?: boolean;
7
+ tips?: string;
8
+ drawLayerSlot?: DrawLayerSlot;
9
+ }
10
+ interface ILLMMultiWheelSourceViewProps {
11
+ questionIsImg: boolean;
12
+ answerIsImg: boolean;
13
+ LLMConfig?: ILLMMultiWheelToolConfig;
14
+ dialogList: any[];
15
+ lang?: string;
16
+ }
17
+ export declare const LLMMultiWheelSourceView: React.FC<ILLMMultiWheelSourceViewProps>;
18
+ declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
19
+ children?: React.ReactNode;
20
+ }, "annotation">>;
21
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ annotation?: any;
4
+ dispatch: any;
5
+ checkMode?: boolean;
6
+ }
7
+ declare const _default: import("react-redux").ConnectedComponent<(props: IProps) => React.JSX.Element, import("react-redux").Omit<IProps, "annotation" | "dispatch">>;
8
+ export default _default;
@@ -0,0 +1,62 @@
1
+ export interface ITextList {
2
+ textId?: string;
3
+ title?: string | number;
4
+ tip?: string;
5
+ min?: number;
6
+ max?: number;
7
+ value?: string;
8
+ isFillAnswer?: boolean;
9
+ textControl?: boolean;
10
+ isLaText?: boolean;
11
+ }
12
+ export interface IAnswerList {
13
+ id: string;
14
+ answer: string;
15
+ newAnswer: string;
16
+ indicatorScore: {
17
+ [key: string]: number;
18
+ };
19
+ indicatorDetermine: {
20
+ [key: string]: boolean;
21
+ };
22
+ tagList: {
23
+ [key: string]: string[];
24
+ };
25
+ }
26
+ export interface IModelData {
27
+ id: number;
28
+ sort: Array<number[]>;
29
+ answerList: IAnswerList[];
30
+ }
31
+ export interface IModelResult {
32
+ sort: Array<number[]>;
33
+ answerSort: {
34
+ [key: string]: number[];
35
+ };
36
+ textAttribute: ITextList[];
37
+ modelData: IModelData[];
38
+ }
39
+ export interface ISortData {
40
+ newSort?: IAnswerSort[][];
41
+ waitSorts?: IWaitAnswerSort[];
42
+ }
43
+ export interface IWaitAnswerSort {
44
+ title: string;
45
+ id: string;
46
+ }
47
+ export interface IPoint {
48
+ x: number;
49
+ y: number;
50
+ }
51
+ export interface ITagVertexPoint {
52
+ bl: IPoint;
53
+ br: IPoint;
54
+ tl: IPoint;
55
+ tr: IPoint;
56
+ }
57
+ export interface IAnswerSort {
58
+ title: string;
59
+ id: string;
60
+ tagCenterPoint?: IPoint;
61
+ tagVertexPoint?: ITagVertexPoint;
62
+ }
@@ -12,5 +12,20 @@ interface IProps {
12
12
  setDataFormatType: (v: EDataFormatType) => void;
13
13
  isImg?: boolean;
14
14
  }
15
+ export declare const RenderQuestion: ({ question, dataFormatType, isImg, }: {
16
+ question: string | {
17
+ id: number;
18
+ path: string;
19
+ url: string;
20
+ processedUrl: string;
21
+ thumbnail: string;
22
+ };
23
+ dataFormatType: EDataFormatType;
24
+ isImg?: boolean | undefined;
25
+ }) => React.JSX.Element;
15
26
  declare const Header: (props: IProps) => React.JSX.Element;
27
+ export declare const ToggleDataFormatType: (props: {
28
+ dataFormatType: EDataFormatType;
29
+ setDataFormatType: (v: EDataFormatType) => void;
30
+ }) => React.JSX.Element;
16
31
  export default Header;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { EDataFormatType } from '@/constant';
2
3
  import { IAnswerList, IModelAPIAnswer, ILLMToolConfig } from '@/components/LLMToolView/types';
3
4
  interface IProps {
4
5
  hoverKey?: number;
@@ -19,5 +20,11 @@ interface IProps {
19
20
  answerHeaderSlot?: React.ReactDOM | string;
20
21
  }
21
22
  export declare const LLMViewCls: string;
23
+ export declare const RenderAnswer: ({ i, dataFormatType, isTextControl, }: {
24
+ i: IAnswerList;
25
+ dataFormatType: EDataFormatType;
26
+ isTextControl: boolean;
27
+ }) => React.JSX.Element;
28
+ export declare const getTextControlByConfig: (result: IAnswerList, LLMConfig: any) => boolean;
22
29
  declare const WrapQuestionView: (props: IProps) => React.JSX.Element;
23
30
  export default WrapQuestionView;
@@ -5,6 +5,9 @@ interface IProps {
5
5
  sortList: IAnswerSort[][];
6
6
  waitSortList: IWaitAnswerSort[];
7
7
  disabeledAll?: boolean;
8
+ header?: HTMLElement | string;
9
+ title?: string;
10
+ prefixId?: string;
8
11
  }
9
12
  declare const AnswerSort: (props: IProps) => React.JSX.Element;
10
13
  export default AnswerSort;
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ interface ISelectAnswerSort {
3
+ [key: string]: number[][];
4
+ }
5
+ interface IModelList {
6
+ id: number;
7
+ answerList: IAnswerList[];
8
+ title: string;
9
+ }
10
+ interface IAnswerList {
11
+ id: string;
12
+ answer: string;
13
+ }
14
+ interface IProps {
15
+ selectedSort?: ISelectAnswerSort;
16
+ modelData: IModelList[];
17
+ selectedAnswerSort: (sorts: ISelectAnswerSort) => void;
18
+ disabeledAll?: boolean;
19
+ imgIndex: number;
20
+ }
21
+ export declare const getSorts: ({ selectedSort, initSelected, modelList, }: {
22
+ selectedSort?: number[][] | undefined;
23
+ modelList: any[];
24
+ initSelected?: number[][] | undefined;
25
+ }) => {
26
+ waitSorts: any[];
27
+ newSort: any[];
28
+ };
29
+ declare const _default: React.ForwardRefExoticComponent<IProps & React.RefAttributes<unknown>>;
30
+ export default _default;
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
- import { ILLMToolConfig, ITextList } from '@/components/LLMToolView/types';
2
+ import { ITextList } from '@/components/LLMToolView/types';
3
3
  interface IProps {
4
4
  textAttribute: ITextList[];
5
5
  disabeledAll?: boolean;
6
- LLMConfig?: ILLMToolConfig;
7
6
  setText: (value: ITextList[]) => void;
7
+ textConfig: ITextList[];
8
8
  }
9
9
  declare const TextInputBox: (props: IProps) => React.JSX.Element;
10
10
  export default TextInputBox;
@@ -1,8 +1,18 @@
1
1
  import React from 'react';
2
+ import { IWaitAnswerSort, IAnswerSort, ILLMToolConfig, IAnswerList, ITextList, ISelectedTags, ILLMMultiWheelToolConfig } from '@/components/LLMToolView/types';
2
3
  interface IProps {
3
4
  annotation?: any;
4
5
  dispatch: any;
5
6
  checkMode?: boolean;
6
7
  }
8
+ export interface IAnnotationResult {
9
+ newSort?: IAnswerSort[][];
10
+ waitSorts?: IWaitAnswerSort[];
11
+ answerList?: IAnswerList[];
12
+ textAttribute?: ITextList[];
13
+ tagList?: ISelectedTags;
14
+ }
15
+ export declare const EmptyConfig: () => React.JSX.Element;
16
+ export declare const getLLMIsNoConfig: (LLMConfig?: ILLMMultiWheelToolConfig | ILLMToolConfig) => boolean;
7
17
  declare const _default: import("react-redux").ConnectedComponent<(props: IProps) => React.JSX.Element, import("react-redux").Omit<IProps, "annotation" | "dispatch">>;
8
18
  export default _default;
@@ -21,6 +21,7 @@ export interface IAnswerList {
21
21
  newAnswer?: string;
22
22
  url?: string;
23
23
  tagList?: ISelectedTags;
24
+ id?: string | number;
24
25
  }
25
26
  export interface IModelAPIAnswer {
26
27
  id: string;
@@ -56,6 +57,9 @@ export interface ILLMToolConfig {
56
57
  tagInputListConfigurable: boolean;
57
58
  inputList?: IInputList[];
58
59
  }
60
+ export interface ILLMMultiWheelToolConfig extends Omit<ILLMToolConfig, 'enableModelAPI' | 'modelAPIConfigList'> {
61
+ dialogSort?: boolean;
62
+ }
59
63
  export interface ITextList {
60
64
  textId?: string;
61
65
  title?: string | number;
@@ -68,7 +72,7 @@ export interface ITextList {
68
72
  isLaText?: boolean;
69
73
  }
70
74
  export interface IWaitAnswerSort {
71
- title: number;
75
+ title: number | string;
72
76
  id: number;
73
77
  }
74
78
  export interface IPoint {
@@ -82,7 +86,7 @@ export interface ITagVertexPoint {
82
86
  tr: IPoint;
83
87
  }
84
88
  export interface IAnswerSort {
85
- title: number;
89
+ title: number | string;
86
90
  id: number;
87
91
  tagCenterPoint?: IPoint;
88
92
  tagVertexPoint?: ITagVertexPoint;
@@ -19,6 +19,7 @@ export declare const initAnswerList: (initValue: IAnswerList[], LLMConfig?: ILLM
19
19
  } | undefined;
20
20
  newAnswer?: string | undefined;
21
21
  url?: string | undefined;
22
+ id?: string | number | undefined;
22
23
  }[];
23
24
  export declare const getRenderDataByResult: (LLMConfig?: ILLMToolConfig, result?: ILLMBoxResult) => {
24
25
  newSort: IAnswerSort[][];
@@ -1,10 +1,17 @@
1
1
  import React from 'react';
2
2
  import { SetState } from 'ahooks/lib/useSetState';
3
- import { IAudioTextToolConfig } from '@labelbee/lb-utils';
3
+ import { IAudioTextToolConfig, ITextConfigItem } from '@labelbee/lb-utils';
4
4
  export declare enum EContextType {
5
5
  before = "\u524D\u6587",
6
6
  after = "\u540E\u6587"
7
7
  }
8
+ export declare const DEFAULT_CLIP_TEXT_CONFIG_ITEM: {
9
+ label: string;
10
+ key: string;
11
+ required: boolean;
12
+ default: string;
13
+ maxLength: number;
14
+ }[];
8
15
  interface IAudioContextProps {
9
16
  audioContext: {
10
17
  visible?: boolean;
@@ -19,7 +26,7 @@ export interface ISelectedRegion {
19
26
  id?: string;
20
27
  loop?: boolean;
21
28
  }
22
- type IAudioClipConfig = Pick<IAudioTextToolConfig, 'clipConfigurable' | 'clipAttributeConfigurable' | 'clipAttributeList' | 'clipTextConfigurable'>;
29
+ type IAudioClipConfig = Pick<IAudioTextToolConfig, 'clipConfigurable' | 'clipAttributeConfigurable' | 'clipAttributeList' | 'clipTextConfigurable' | 'secondaryAttributeConfigurable' | 'subAttributeList'>;
23
30
  interface IAudioClipState extends IAudioClipConfig {
24
31
  /** 选中的截取属性,新建截取片段的默认属性 */
25
32
  selectedAttribute: string;
@@ -31,6 +38,7 @@ interface IAudioClipState extends IAudioClipConfig {
31
38
  combined: boolean;
32
39
  /** 是否按下分割键 */
33
40
  segment: boolean;
41
+ clipTextList: ITextConfigItem[];
34
42
  }
35
43
  interface IAudioClipContext {
36
44
  audioClipState: IAudioClipState;
@@ -45,6 +45,7 @@ interface IProps {
45
45
  /** 更新截取片段数据 */
46
46
  updateRegion?: (region: IAudioTimeSlice) => void;
47
47
  isEdit?: boolean;
48
+ clipTextList: ITextConfigItem[];
48
49
  }
49
50
  export declare const SingleTextInput: (props: any) => React.JSX.Element;
50
51
  /** 文本工具的文本框和对照按钮 */
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @file Process audio tool data
3
+ * @author lixinghua <lixinghua_vendor@sensetime.com>
4
+ * @date 2024.05.14
5
+ */
6
+ import { IAudioTimeSlice, ITextConfigItem } from '@labelbee/lb-utils';
7
+ export default class DataTransform {
8
+ static getClipTextByConfig: (region: IAudioTimeSlice, clipTextList: ITextConfigItem[], isDefault?: boolean) => IAudioTimeSlice;
9
+ }
@@ -16,6 +16,7 @@ interface IProps {
16
16
  zoom: number;
17
17
  /** WaveSurfer region 实例 */
18
18
  instance?: any;
19
+ isCheck?: boolean;
19
20
  }
20
21
  /** 展示在音频图上的截取片段 */
21
22
  declare const ClipRegion: (props: IProps) => React.JSX.Element;