@labelbee/lb-components 1.23.0-alpha.9 → 1.23.0-alpha.90

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 (250) 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/index.js +1 -1
  12. package/dist/components/DynamicResizer/DynamicResizer.js +1 -0
  13. package/dist/components/DynamicResizer/assets/bottomToZero.svg.js +1 -0
  14. package/dist/components/DynamicResizer/assets/divider.svg.js +1 -0
  15. package/dist/components/DynamicResizer/assets/topToZero.svg.js +1 -0
  16. package/dist/components/DynamicResizer/hooks/useDrag.js +1 -0
  17. package/dist/components/DynamicResizer/hooks/useUpdateHeight.js +1 -0
  18. package/dist/components/DynamicResizer/index.js +1 -0
  19. package/dist/components/LLMToolView/index.js +1 -1
  20. package/dist/components/LLMToolView/questionView/components/header/index.js +1 -1
  21. package/dist/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
  22. package/dist/components/LLMToolView/sidebar/components/textEditor/index.module.scss.js +1 -1
  23. package/dist/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
  24. package/dist/components/LLMToolView/sidebar/index.js +1 -1
  25. package/dist/components/LLMToolView/utils/data.js +1 -1
  26. package/dist/components/NLPToolView/index.js +1 -1
  27. package/dist/components/audioAnnotate/audioContext/index.js +1 -1
  28. package/dist/components/audioAnnotate/audioSide/clipSidebar/index.js +2 -1
  29. package/dist/components/audioAnnotate/index.js +1 -1
  30. package/dist/components/audioAnnotate/textInput/index.js +1 -1
  31. package/dist/components/audioAnnotate/textInput/index.module.scss.js +1 -1
  32. package/dist/components/audioAnnotate/utils/dataTransform.js +1 -0
  33. package/dist/components/audioPlayer/clipRegion/index.js +1 -1
  34. package/dist/components/audioPlayer/index.js +1 -1
  35. package/dist/components/audioPlayer/useAudioCombine/index.js +3 -2
  36. package/dist/components/audioPlayer/useAudioSegment/index.js +1 -1
  37. package/dist/components/longText/index.js +1 -1
  38. package/dist/components/pointCloud2DRectOperationView/index.js +1 -1
  39. package/dist/components/pointCloud2DRectOperationView/useUpdateRectList.js +1 -0
  40. package/dist/components/pointCloud2DRectOperationView/util.js +1 -0
  41. package/dist/components/pointCloudView/PointCloud2DSingleView.js +1 -1
  42. package/dist/components/pointCloudView/PointCloud2DView.js +1 -1
  43. package/dist/components/pointCloudView/PointCloud3DView.js +1 -1
  44. package/dist/components/pointCloudView/PointCloudBackView.js +1 -1
  45. package/dist/components/pointCloudView/PointCloudContext.js +1 -1
  46. package/dist/components/pointCloudView/PointCloudInfos.js +1 -1
  47. package/dist/components/pointCloudView/PointCloudLayout.js +1 -1
  48. package/dist/components/pointCloudView/PointCloudListener.js +1 -1
  49. package/dist/components/pointCloudView/PointCloudSegment2DView.js +1 -1
  50. package/dist/components/pointCloudView/PointCloudSideView.js +1 -1
  51. package/dist/components/pointCloudView/PointCloudTopView.js +1 -1
  52. package/dist/components/pointCloudView/components/HighlightVisible/index.js +1 -1
  53. package/dist/components/pointCloudView/hooks/useBoxes.js +1 -1
  54. package/dist/components/pointCloudView/hooks/useDataLinkSwitch.js +1 -0
  55. package/dist/components/pointCloudView/hooks/useHighlight.js +1 -1
  56. package/dist/components/pointCloudView/hooks/useHistory.js +1 -1
  57. package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
  58. package/dist/components/pointCloudView/hooks/usePolygon.js +1 -1
  59. package/dist/components/pointCloudView/hooks/useRotate.js +1 -1
  60. package/dist/components/pointCloudView/hooks/useRotateEdge.js +1 -0
  61. package/dist/components/pointCloudView/hooks/useSingleBox.js +1 -1
  62. package/dist/components/pointCloudView/hooks/useStatus.js +1 -1
  63. package/dist/components/pointCloudView/hooks/useTimeoutFunc.js +1 -0
  64. package/dist/components/pointCloudView/hooks/useWindowKeydownListener.js +1 -0
  65. package/dist/components/pointCloudView/index.js +1 -1
  66. package/dist/components/pointCloudView/utils/event-polyfill.js +1 -0
  67. package/dist/components/pointCloudView/utils/map.js +1 -0
  68. package/dist/components/subAttributeList/index.js +1 -0
  69. package/dist/components/videoAnnotate/videoClipTool/index.js +1 -1
  70. package/dist/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -1
  71. package/dist/hooks/useToolStyle.js +1 -0
  72. package/dist/index.css +140 -17
  73. package/dist/index.js +1 -1
  74. package/dist/store/Actions.js +1 -1
  75. package/dist/store/annotatedBox/index.js +1 -1
  76. package/dist/store/annotation/actionCreators.js +1 -1
  77. package/dist/store/annotation/reducer.js +1 -1
  78. package/dist/types/App.d.ts +5 -1
  79. package/dist/types/components/AnnotationView/index.d.ts +1 -0
  80. package/dist/types/components/DynamicResizer/DynamicResizer.d.ts +5 -0
  81. package/dist/types/components/DynamicResizer/hooks/useDrag.d.ts +12 -0
  82. package/dist/types/components/DynamicResizer/hooks/useUpdateHeight.d.ts +23 -0
  83. package/dist/types/components/DynamicResizer/index.d.ts +2 -0
  84. package/dist/types/components/DynamicResizer/types/interface.d.ts +17 -0
  85. package/dist/types/components/LLMToolView/utils/data.d.ts +1 -1
  86. package/dist/types/components/audioAnnotate/audioContext/index.d.ts +10 -2
  87. package/dist/types/components/audioAnnotate/textInput/index.d.ts +1 -0
  88. package/dist/types/components/audioAnnotate/utils/dataTransform.d.ts +9 -0
  89. package/dist/types/components/audioPlayer/clipRegion/index.d.ts +1 -0
  90. package/dist/types/components/audioPlayer/index.d.ts +28 -21
  91. package/dist/types/components/longText/index.d.ts +1 -0
  92. package/dist/types/components/pointCloud2DRectOperationView/index.d.ts +1 -0
  93. package/dist/types/components/pointCloud2DRectOperationView/useUpdateRectList.d.ts +2 -0
  94. package/dist/types/components/pointCloud2DRectOperationView/util.d.ts +8 -0
  95. package/dist/types/components/pointCloudView/2DViewWorker.d.ts +1 -0
  96. package/dist/types/components/pointCloudView/PointCloud2DView.d.ts +2 -1
  97. package/dist/types/components/pointCloudView/PointCloudContext.d.ts +28 -4
  98. package/dist/types/components/pointCloudView/PointCloudLayout.d.ts +1 -0
  99. package/dist/types/components/pointCloudView/components/HighlightVisible/index.d.ts +2 -1
  100. package/dist/types/components/pointCloudView/hooks/useDataLinkSwitch.d.ts +19 -0
  101. package/dist/types/components/pointCloudView/hooks/useHighlight.d.ts +1 -1
  102. package/dist/types/components/pointCloudView/hooks/usePointCloudViews.d.ts +8 -0
  103. package/dist/types/components/pointCloudView/hooks/useRotateEdge.d.ts +9 -0
  104. package/dist/types/components/pointCloudView/hooks/useSingleBox.d.ts +3 -2
  105. package/dist/types/components/pointCloudView/hooks/useTimeoutFunc.d.ts +6 -0
  106. package/dist/types/components/pointCloudView/hooks/useWindowKeydownListener.d.ts +16 -0
  107. package/dist/types/components/pointCloudView/utils/event-polyfill.d.ts +8 -0
  108. package/dist/types/components/pointCloudView/utils/map.d.ts +11 -0
  109. package/dist/types/components/subAttributeList/index.d.ts +10 -0
  110. package/dist/types/components/videoAnnotate/index.d.ts +2 -1
  111. package/dist/types/components/videoAnnotate/videoClipTool/index.d.ts +2 -1
  112. package/dist/types/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.d.ts +1 -1
  113. package/dist/types/hooks/useToolStyle.d.ts +30 -0
  114. package/dist/types/index.d.ts +7 -2
  115. package/dist/types/store/Actions.d.ts +1 -0
  116. package/dist/types/store/annotatedBox/index.d.ts +2 -0
  117. package/dist/types/store/annotation/actionCreators.d.ts +3 -2
  118. package/dist/types/store/annotation/reducer.d.ts +1 -0
  119. package/dist/types/store/annotation/types.d.ts +9 -2
  120. package/dist/types/utils/AnnotationDataUtils.d.ts +58 -1
  121. package/dist/types/utils/ToolPointCloudBoxRenderHelper.d.ts +23 -0
  122. package/dist/types/utils/index.d.ts +31 -1
  123. package/dist/types/views/MainView/sidebar/GeneralOperation/ActionsConfirm.d.ts +1 -0
  124. package/dist/types/views/MainView/sidebar/GeneralOperation/index.d.ts +2 -0
  125. package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.d.ts +3 -0
  126. package/dist/types/views/MainView/sidebar/TextToolSidebar/index.d.ts +1 -1
  127. package/dist/types/views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.d.ts +9 -0
  128. package/dist/types/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.d.ts +3 -0
  129. package/dist/types/views/MainView/toolFooter/BatchSwitchConnectIn2DView/index.d.ts +1 -0
  130. package/dist/types/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.d.ts +10 -2
  131. package/dist/types/views/MainView/toolFooter/index.d.ts +1 -1
  132. package/dist/types/views/MainView/toolHeader/StepSwitch/index.d.ts +1 -1
  133. package/dist/types/views/MainView/toolHeader/index.d.ts +1 -1
  134. package/dist/utils/AnnotationDataUtils.js +1 -1
  135. package/dist/utils/ToolPointCloudBoxRenderHelper.js +1 -0
  136. package/dist/utils/index.js +1 -1
  137. package/dist/views/MainView/index.js +1 -1
  138. package/dist/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
  139. package/dist/views/MainView/sidebar/GeneralOperation/index.js +1 -1
  140. package/dist/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.js +1 -1
  141. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.js +1 -0
  142. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.module.scss.js +1 -0
  143. package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  144. package/dist/views/MainView/sidebar/TagSidebar/index.js +1 -1
  145. package/dist/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
  146. package/dist/views/MainView/sidebar/index.js +1 -1
  147. package/dist/views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.js +1 -0
  148. package/dist/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.js +1 -0
  149. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -1
  150. package/dist/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js +1 -1
  151. package/dist/views/MainView/toolFooter/index.js +1 -1
  152. package/dist/views/MainView/toolHeader/index.js +1 -1
  153. package/es/App.js +1 -1
  154. package/es/_virtual/2DViewWorker.js +1 -0
  155. package/es/_virtual/highlightSegmentWorker.js +1 -1
  156. package/es/assets/annotation/icon_link.svg.js +1 -0
  157. package/es/assets/annotation/icon_unlink.svg.js +1 -0
  158. package/es/assets/annotation/pointCloudTool/Image2DBoxScale.svg.js +1 -0
  159. package/es/assets/annotation/pointCloudTool/leftArrow.svg.js +1 -1
  160. package/es/assets/annotation/pointCloudTool/rightArrow.svg.js +1 -1
  161. package/es/assets/annotation/pointCloudTool/rotate90_black.svg.js +1 -0
  162. package/es/components/AnnotationView/index.js +1 -1
  163. package/es/components/DynamicResizer/DynamicResizer.js +1 -0
  164. package/es/components/DynamicResizer/assets/bottomToZero.svg.js +1 -0
  165. package/es/components/DynamicResizer/assets/divider.svg.js +1 -0
  166. package/es/components/DynamicResizer/assets/topToZero.svg.js +1 -0
  167. package/es/components/DynamicResizer/hooks/useDrag.js +1 -0
  168. package/es/components/DynamicResizer/hooks/useUpdateHeight.js +1 -0
  169. package/es/components/DynamicResizer/index.js +1 -0
  170. package/es/components/LLMToolView/index.js +1 -1
  171. package/es/components/LLMToolView/questionView/components/header/index.js +1 -1
  172. package/es/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
  173. package/es/components/LLMToolView/sidebar/components/textEditor/index.module.scss.js +1 -1
  174. package/es/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
  175. package/es/components/LLMToolView/sidebar/index.js +1 -1
  176. package/es/components/LLMToolView/utils/data.js +1 -1
  177. package/es/components/NLPToolView/index.js +1 -1
  178. package/es/components/audioAnnotate/audioContext/index.js +1 -1
  179. package/es/components/audioAnnotate/audioSide/clipSidebar/index.js +2 -1
  180. package/es/components/audioAnnotate/index.js +1 -1
  181. package/es/components/audioAnnotate/textInput/index.js +1 -1
  182. package/es/components/audioAnnotate/textInput/index.module.scss.js +1 -1
  183. package/es/components/audioAnnotate/utils/dataTransform.js +1 -0
  184. package/es/components/audioPlayer/clipRegion/index.js +1 -1
  185. package/es/components/audioPlayer/index.js +1 -1
  186. package/es/components/audioPlayer/useAudioCombine/index.js +3 -2
  187. package/es/components/audioPlayer/useAudioSegment/index.js +1 -1
  188. package/es/components/longText/index.js +1 -1
  189. package/es/components/pointCloud2DRectOperationView/index.js +1 -1
  190. package/es/components/pointCloud2DRectOperationView/useUpdateRectList.js +1 -0
  191. package/es/components/pointCloud2DRectOperationView/util.js +1 -0
  192. package/es/components/pointCloudView/PointCloud2DSingleView.js +1 -1
  193. package/es/components/pointCloudView/PointCloud2DView.js +1 -1
  194. package/es/components/pointCloudView/PointCloud3DView.js +1 -1
  195. package/es/components/pointCloudView/PointCloudBackView.js +1 -1
  196. package/es/components/pointCloudView/PointCloudContext.js +1 -1
  197. package/es/components/pointCloudView/PointCloudInfos.js +1 -1
  198. package/es/components/pointCloudView/PointCloudLayout.js +1 -1
  199. package/es/components/pointCloudView/PointCloudListener.js +1 -1
  200. package/es/components/pointCloudView/PointCloudSegment2DView.js +1 -1
  201. package/es/components/pointCloudView/PointCloudSideView.js +1 -1
  202. package/es/components/pointCloudView/PointCloudTopView.js +1 -1
  203. package/es/components/pointCloudView/components/HighlightVisible/index.js +1 -1
  204. package/es/components/pointCloudView/hooks/useBoxes.js +1 -1
  205. package/es/components/pointCloudView/hooks/useDataLinkSwitch.js +1 -0
  206. package/es/components/pointCloudView/hooks/useHighlight.js +1 -1
  207. package/es/components/pointCloudView/hooks/useHistory.js +1 -1
  208. package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
  209. package/es/components/pointCloudView/hooks/usePolygon.js +1 -1
  210. package/es/components/pointCloudView/hooks/useRotate.js +1 -1
  211. package/es/components/pointCloudView/hooks/useRotateEdge.js +1 -0
  212. package/es/components/pointCloudView/hooks/useSingleBox.js +1 -1
  213. package/es/components/pointCloudView/hooks/useStatus.js +1 -1
  214. package/es/components/pointCloudView/hooks/useTimeoutFunc.js +1 -0
  215. package/es/components/pointCloudView/hooks/useWindowKeydownListener.js +1 -0
  216. package/es/components/pointCloudView/index.js +1 -1
  217. package/es/components/pointCloudView/utils/event-polyfill.js +1 -0
  218. package/es/components/pointCloudView/utils/map.js +1 -0
  219. package/es/components/subAttributeList/index.js +1 -0
  220. package/es/components/videoAnnotate/videoClipTool/index.js +1 -1
  221. package/es/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -1
  222. package/es/hooks/useToolStyle.js +1 -0
  223. package/es/index.css +140 -17
  224. package/es/index.js +1 -1
  225. package/es/store/Actions.js +1 -1
  226. package/es/store/annotatedBox/index.js +1 -1
  227. package/es/store/annotation/actionCreators.js +1 -1
  228. package/es/store/annotation/reducer.js +1 -1
  229. package/es/utils/AnnotationDataUtils.js +1 -1
  230. package/es/utils/ToolPointCloudBoxRenderHelper.js +1 -0
  231. package/es/utils/index.js +1 -1
  232. package/es/views/MainView/index.js +1 -1
  233. package/es/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
  234. package/es/views/MainView/sidebar/GeneralOperation/index.js +1 -1
  235. package/es/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.js +1 -1
  236. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.js +1 -0
  237. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.module.scss.js +1 -0
  238. package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  239. package/es/views/MainView/sidebar/TagSidebar/index.js +1 -1
  240. package/es/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
  241. package/es/views/MainView/sidebar/index.js +1 -1
  242. package/es/views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.js +1 -0
  243. package/es/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.js +1 -0
  244. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -1
  245. package/es/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js +1 -1
  246. package/es/views/MainView/toolHeader/index.js +1 -1
  247. package/package.json +5 -3
  248. package/dist/assets/annotation/pointCloudTool/rotate180_black.svg.js +0 -1
  249. package/dist/assets/icons/9d70807.svg +0 -5
  250. package/es/assets/annotation/pointCloudTool/rotate180_black.svg.js +0 -1
@@ -1 +1 @@
1
- import t,{useState as D,useContext as N,useEffect as V}from"react";import{EditFilled as re}from"@ant-design/icons";import{ToolIcons as ae}from"../ToolIcons.js";import{EToolName as ie}from"../../../../data/enums/ToolType.js";import{cTool as se}from"@labelbee/lb-annotation";import{PointCloudContext as O}from"../../../../components/pointCloudView/PointCloudContext.js";import{Divider as L,Input as ce,Select as U,message as j}from"antd";import ue from"../../../../utils/StepUtils.js";import{connect as de}from"react-redux";import{jsonParser as me,classnames as pe}from"../../../../utils/index.js";import{useStatus as F}from"../../../../components/pointCloudView/hooks/useStatus.js";import{useSingleBox as W}from"../../../../components/pointCloudView/hooks/useSingleBox.js";import{useTranslation as A}from"react-i18next";import{LabelBeeContext as fe,useDispatch as ve}from"../../../../store/ctx.js";import ge from"./components/batchUpdateModal/index.js";import Se from"./components/annotatedBox/index.js";import Ce from"./components/findTrackIDIndex/index.js";import{EPointCloudSegmentStatus as k,EPointCloudPattern as be}from"@labelbee/lb-utils";import M from"../../../../components/attributeList/index.js";import{useAttribute as _e}from"../../../../components/pointCloudView/hooks/useAttribute.js";import xe from"../../../../assets/annotation/pointCloudTool/lassoSelector.svg.js";import Pe from"../../../../assets/annotation/pointCloudTool/lassoSelector_a.svg.js";import ye from"../../../../assets/annotation/pointCloudTool/circleSelector.svg.js";import Ee from"../../../../assets/annotation/pointCloudTool/circleSelector_a.svg.js";import Ie from"../../../../assets/annotation/rectTool/icon_rect.svg.js";import we from"../../../../assets/annotation/rectTool/icon_rect_a.svg.js";import{sidebarCls as B}from"../index.js";import{SetTaskStepList as Te}from"../../../../store/annotation/actionCreators.js";import{usePointCloudViews as he}from"../../../../components/pointCloudView/hooks/usePointCloudViews.js";var De=Object.defineProperty,Le=Object.defineProperties,je=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable,J=(n,e,l)=>e in n?De(n,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[e]=l,$=(n,e)=>{for(var l in e||(e={}))ke.call(e,l)&&J(n,l,e[l]);if(H)for(var l of H(e))Be.call(e,l)&&J(n,l,e[l]);return n},R=(n,e)=>Le(n,je(e));const Ne=()=>{const[n,e]=D(!1),l=N(O),{pointCloudBoxList:c}=l,{selectedBox:u,updateSelectedBox:r}=W(),[d,s]=D(""),{t:g}=A(),p=u==null?void 0:u.info.trackID,i=m=>!!c.find(b=>b.trackID===m&&b.id!==(u==null?void 0:u.info.id)),a=(m=!1)=>{const f=parseInt(d,10);if(m&&e(!1),isNaN(f)){j.error(g("PositiveIntegerCheck"));return}if(d.indexOf(".")>-1){j.error(g("NotAllowDecimalPointsInTrackID"));return}if(i(f)){j.error(g("DuplicateTrackIDsExist"));return}if(!(f>0)){j.error(g("PositiveIntegerCheck"));return}S(f)};V(()=>{e(!1)},[p]);const S=m=>{var f;const b=r({trackID:m});(f=l==null?void 0:l.topViewInstance)==null||f.updatePolygonList(b!=null?b:[])};return t.createElement("div",{style:{padding:24}},t.createElement("div",{style:{marginBottom:16,display:"flex",justifyContent:"space-between",alignItems:"center"}},t.createElement("span",null,g("CurrentBoxTrackIDs")),p&&t.createElement(ge,{id:p,updateCurrentPolygonList:m=>S(m)})),t.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",lineHeight:"12px"}},n&&p?t.createElement(ce,{defaultValue:p,onChange:m=>{s(m.target.value)},disabled:!p,size:"small",onBlur:()=>{a()},onPressEnter:()=>{a(!0)}}):t.createElement("span",null,p),t.createElement(re,{style:{color:"#999",marginLeft:16,cursor:typeof p!="undefined"?"pointer":"not-allowed"},onClick:()=>{p&&e(!n)}})))},X=({segmentStatus:n,globalPattern:e})=>e===be.Segmentation&&![k.Edit,k.Ready].includes(n),Y=({attributeList:n,subAttributeList:e,toolInstance:l,config:c,stepList:u,stepInfo:r,enableColorPicker:d})=>{const[s,g]=D({segmentStatus:k.Ready}),{selectedBox:p}=W(),i=N(O),{ptSegmentInstance:a}=i,{t:S}=A(),{defaultAttribute:m}=_e(),f=he(),{isPointCloudSegmentationPattern:b}=F(),G=ve(),K={fontWeight:500,fontSize:14,margin:"12px 0 8px 20px"},Q={margin:"12px 20px 8px",fontSize:14,fontWeight:500,wordWrap:"break-word"};V(()=>{if(!!a)return a.on("syncPointCloudStatus",g),()=>{a.unbind("syncPointCloudStatus",g)}},[a]);const Z=(o,x)=>{var P,y,E,I,w;const _=(P=c==null?void 0:c.attributeList)==null?void 0:P.map(C=>C.value===o?R($({},C),{color:x}):C),T=R($({},c),{attributeList:_}),h=JSON.stringify(T),v=u==null?void 0:u.map(C=>(C==null?void 0:C.step)===(r==null?void 0:r.step)?R($({},C),{config:h}):C);(y=i==null?void 0:i.topViewInstance)==null||y.updateAttributeList(_),(E=i==null?void 0:i.sideViewInstance)==null||E.updateAttributeList(_),(I=i==null?void 0:i.backViewInstance)==null||I.updateAttributeList(_),(w=i==null?void 0:i.mainViewInstance)==null||w.setConfig(T),G(Te({stepList:v}))},ee=o=>{f.updateViewsByDefaultSize&&f.updateViewsByDefaultSize(o)},te=o=>{X({globalPattern:i.globalPattern,segmentStatus:s.segmentStatus})||l.setDefaultAttribute(o)},z=(o,x)=>{X({globalPattern:i.globalPattern,segmentStatus:s.segmentStatus})||l.setSubAttribute(o,x)},oe=n.map(o=>({label:o.key,value:o.value,color:o==null?void 0:o.color,limit:o==null?void 0:o.limit,isDefault:o==null?void 0:o.isDefault})),ne=p||s.cacheSegData&&s.segmentStatus===k.Edit,le=b;return t.createElement("div",{style:{flex:1,overflowX:"hidden",overflowY:"auto"}},t.createElement("div",{style:K},S("Attribute")),t.createElement(M,{list:oe,forbidDefault:!0,selectedAttribute:m!=null?m:"",attributeChanged:o=>te(o),updateColorConfig:Z,enableColorPicker:d,updateSize:ee,forbidShowLimitPopover:le}),t.createElement(L,{style:{margin:0}}),ne&&t.createElement(t.Fragment,null,e.map(o=>{var x,P,y,E,I,w,_,T,h;return(o==null?void 0:o.subSelected)&&t.createElement("div",{style:{marginTop:12},key:o.value},t.createElement("div",{style:Q},S("SubAttribute"),"-",o.key),((x=o.subSelected)==null?void 0:x.length)<5?t.createElement(M,{list:o.subSelected.map(v=>({label:v.key,value:v.value})),selectedAttribute:((y=(P=i.selectedPointCloudBox)==null?void 0:P.subAttribute)==null?void 0:y[o.value])||((I=(E=s.cacheSegData)==null?void 0:E.subAttribute)==null?void 0:I[o.value]),num:"-",forbidColor:!0,forbidDefault:!0,attributeChanged:v=>z(o.value,v),style:{marginBottom:12}}):t.createElement(U,{style:{margin:"0px 21px 17px 16px",width:"87%"},value:((_=(w=i.selectedPointCloudBox)==null?void 0:w.subAttribute)==null?void 0:_[o.value])||((h=(T=s.cacheSegData)==null?void 0:T.subAttribute)==null?void 0:h[o.value]),placeholder:S("PleaseSelect"),onChange:v=>z(o.value,v),allowClear:!0},o.subSelected.map(v=>t.createElement(U.Option,{key:v.value,value:v.value},v.key))),t.createElement(L,{style:{margin:0}}))})))},Ve=[{toolName:"LassoSelector",commonSvg:xe,selectedSvg:Pe},{toolName:"RectSelector",commonSvg:Ie,selectedSvg:we},{toolName:"CircleSelector",commonSvg:ye,selectedSvg:Ee}],q=({toolInstance:n})=>{const{ptSegmentInstance:e}=N(O),[l,c]=D("LassoSelector"),{t:u}=A();return V(()=>{if(!e)return;const r=()=>{c("LassoSelector")},d=()=>{c("RectSelector")},s=()=>{c("CircleSelector")};return e.on("LassoSelector",r),e.on("RectSelector",d),e.on("CircleSelector",s),()=>{e.unbind("LassoSelector",r),e.unbind("RectSelector",d),e.unbind("CircleSelector",s)}},[e]),t.createElement("div",{className:`${B}__level`},Ve.map(r=>{const d=l===r.toolName;return t.createElement("span",{className:`${B}__toolOption`,key:r.toolName,onClick:()=>e==null?void 0:e.emit(r.toolName)},t.createElement("img",{className:`${B}__singleTool`,src:d?r==null?void 0:r.selectedSvg:r==null?void 0:r.commonSvg}),t.createElement("span",{className:pe({[`${B}__toolOption__selected`]:d})},u(r.toolName)))}))},Oe=({stepInfo:n,toolInstance:e,imgList:l,imgIndex:c,stepList:u,enableColorPicker:r})=>{var d,s;const{updatePointCloudPattern:g,pointCloudPattern:p,isPointCloudSegmentationPattern:i}=F(),a=me(n.config),S=(d=a==null?void 0:a.attributeList)!=null?d:[],m=(a==null?void 0:a.secondaryAttributeConfigurable)===!0?(s=a==null?void 0:a.inputList)!=null?s:[]:[];return i?t.createElement(t.Fragment,null,t.createElement(q,{toolInstance:e}),t.createElement(Y,{toolInstance:e,attributeList:S,subAttributeList:m,config:a,stepList:u,stepInfo:n,enableColorPicker:r})):t.createElement(t.Fragment,null,t.createElement(ae,{toolName:se.EPointCloudName.PointCloud,selectedToolName:p,onChange:f=>g==null?void 0:g(f)}),t.createElement(Y,{toolInstance:e,attributeList:S,subAttributeList:m,config:a,stepList:u,stepInfo:n,enableColorPicker:r}),(a==null?void 0:a.trackConfigurable)===!0&&p===ie.Rect&&t.createElement("div",{style:{flexShrink:0,height:280,overflow:"auto"}},t.createElement(Ne,null),t.createElement(L,{style:{margin:0}}),t.createElement(Se,{imgList:l,imgIndex:c}),t.createElement(L,{style:{margin:0}}),t.createElement(Ce,{imgList:l,imgIndex:c})))},Ae=n=>{var e,l,c,u;const r=ue.getCurrentStepInfo((e=n.annotation)==null?void 0:e.step,(l=n.annotation)==null?void 0:l.stepList),d=(c=n.annotation)==null?void 0:c.toolInstance,s=(u=n.annotation)==null?void 0:u.stepList;return{stepInfo:r,toolInstance:d,imgList:n.annotation.imgList,imgIndex:n.annotation.imgIndex,stepList:s}};var $e=de(Ae,null,null,{context:fe})(Oe);export{q as PointCloudSegToolIcon,$e as default};
1
+ import e,{useState as P,useContext as j,useEffect as I}from"react";import{EditFilled as ot}from"@ant-design/icons";import{ToolIcons as nt}from"../ToolIcons.js";import{EToolName as lt}from"../../../../data/enums/ToolType.js";import{cTool as rt}from"@labelbee/lb-annotation";import{PointCloudContext as h}from"../../../../components/pointCloudView/PointCloudContext.js";import{Divider as w,Input as it,message as D}from"antd";import st from"../../../../utils/StepUtils.js";import{connect as at}from"react-redux";import{jsonParser as ct,classnames as ut}from"../../../../utils/index.js";import{useStatus as R}from"../../../../components/pointCloudView/hooks/useStatus.js";import{useSingleBox as $}from"../../../../components/pointCloudView/hooks/useSingleBox.js";import{useTranslation as k}from"react-i18next";import{LabelBeeContext as mt,useDispatch as dt}from"../../../../store/ctx.js";import pt from"./components/batchUpdateModal/index.js";import ft from"./components/annotatedBox/index.js";import vt from"./components/rectRotateSensitivitySlider/index.js";import gt from"./components/findTrackIDIndex/index.js";import{EPointCloudSegmentStatus as L,EPointCloudPattern as St}from"@labelbee/lb-utils";import bt from"../../../../components/attributeList/index.js";import{useAttribute as Ct}from"../../../../components/pointCloudView/hooks/useAttribute.js";import _t from"../../../../assets/annotation/pointCloudTool/lassoSelector.svg.js";import yt from"../../../../assets/annotation/pointCloudTool/lassoSelector_a.svg.js";import Et from"../../../../assets/annotation/pointCloudTool/circleSelector.svg.js";import xt from"../../../../assets/annotation/pointCloudTool/circleSelector_a.svg.js";import Pt from"../../../../assets/annotation/rectTool/icon_rect.svg.js";import wt from"../../../../assets/annotation/rectTool/icon_rect_a.svg.js";import{sidebarCls as T}from"../index.js";import{SetTaskStepList as Dt}from"../../../../store/annotation/actionCreators.js";import{usePointCloudViews as Lt}from"../../../../components/pointCloudView/hooks/usePointCloudViews.js";import Tt from"../../../../components/subAttributeList/index.js";import jt from"../../../../components/DynamicResizer/DynamicResizer.js";var It=Object.defineProperty,ht=Object.defineProperties,kt=Object.getOwnPropertyDescriptors,z=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,Vt=Object.prototype.propertyIsEnumerable,U=(o,t,n)=>t in o?It(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n,A=(o,t)=>{for(var n in t||(t={}))At.call(t,n)&&U(o,n,t[n]);if(z)for(var n of z(t))Vt.call(t,n)&&U(o,n,t[n]);return o},V=(o,t)=>ht(o,kt(t));const Bt=()=>{const[o,t]=P(!1),n=j(h),{pointCloudBoxList:a}=n,{selectedBox:c,updateSelectedBox:l}=$(),[u,m]=P(""),{t:v}=k(),p=c==null?void 0:c.info.trackID,s=d=>!!a.find(b=>b.trackID===d&&b.id!==(c==null?void 0:c.info.id)),i=(d=!1)=>{const f=parseInt(u,10);if(d&&t(!1),isNaN(f)){D.error(v("PositiveIntegerCheck"));return}if(u.indexOf(".")>-1){D.error(v("NotAllowDecimalPointsInTrackID"));return}if(s(f)){D.error(v("DuplicateTrackIDsExist"));return}if(!(f>0)){D.error(v("PositiveIntegerCheck"));return}S(f)};I(()=>{t(!1)},[p]);const S=d=>{var f;const b=l({trackID:d});(f=n==null?void 0:n.topViewInstance)==null||f.updatePolygonList(b!=null?b:[])};return e.createElement("div",{style:{padding:24}},e.createElement("div",{style:{marginBottom:16,display:"flex",justifyContent:"space-between",alignItems:"center"}},e.createElement("span",null,v("CurrentBoxTrackIDs")),p&&e.createElement(pt,{id:p,updateCurrentPolygonList:d=>S(d)})),e.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",lineHeight:"12px"}},o&&p?e.createElement(it,{defaultValue:p,onChange:d=>{m(d.target.value)},disabled:!p,size:"small",onBlur:()=>{i()},onPressEnter:()=>{i(!0)}}):e.createElement("span",null,p),e.createElement(ot,{style:{color:"#999",marginLeft:16,cursor:typeof p!="undefined"?"pointer":"not-allowed"},onClick:()=>{p&&t(!o)}})))},F=({segmentStatus:o,globalPattern:t})=>t===St.Segmentation&&![L.Edit,L.Ready].includes(o),H=({attributeList:o,subAttributeList:t,toolInstance:n,config:a,stepList:c,stepInfo:l,enableColorPicker:u})=>{const[m,v]=P({segmentStatus:L.Ready}),{selectedBox:p}=$(),s=j(h),{ptSegmentInstance:i}=s,{t:S}=k(),{defaultAttribute:d}=Ct(),f=Lt(),{isPointCloudSegmentationPattern:b}=R(),W=dt(),J={fontWeight:500,fontSize:14,margin:"12px 0 8px 20px"};I(()=>{if(!!i)return i.on("syncPointCloudStatus",v),()=>{i.unbind("syncPointCloudStatus",v)}},[i]);const K=(r,C)=>{var _,y,E,B,N;const x=(_=a==null?void 0:a.attributeList)==null?void 0:_.map(g=>g.value===r?V(A({},g),{color:C}):g),O=V(A({},a),{attributeList:x}),tt=JSON.stringify(O),et=c==null?void 0:c.map(g=>(g==null?void 0:g.step)===(l==null?void 0:l.step)?V(A({},g),{config:tt}):g);(y=s==null?void 0:s.topViewInstance)==null||y.updateAttributeList(x),(E=s==null?void 0:s.sideViewInstance)==null||E.updateAttributeList(x),(B=s==null?void 0:s.backViewInstance)==null||B.updateAttributeList(x),(N=s==null?void 0:s.mainViewInstance)==null||N.setConfig(O),W(Dt({stepList:et}))},X=r=>{f.updateViewsByDefaultSize&&f.updateViewsByDefaultSize(r)},Y=r=>{F({globalPattern:s.globalPattern,segmentStatus:m.segmentStatus})||n.setDefaultAttribute(r)},q=(r,C)=>{F({globalPattern:s.globalPattern,segmentStatus:m.segmentStatus})||n.setSubAttribute(r,C)},G=o.map(r=>({label:r.key,value:r.value,color:r==null?void 0:r.color,limit:r==null?void 0:r.limit,isDefault:r==null?void 0:r.isDefault})),Q=p||m.cacheSegData&&m.segmentStatus===L.Edit,Z=b;return e.createElement("div",{style:{height:"100%",overflow:"auto",display:"flex",flexDirection:"column"}},e.createElement("div",{style:J},S("Attribute")),e.createElement("div",{style:{height:0,flex:1,overflowY:"auto",overflowX:"hidden"}},e.createElement(bt,{list:G,forbidDefault:!0,selectedAttribute:d!=null?d:"",attributeChanged:r=>Y(r),updateColorConfig:K,enableColorPicker:u,updateSize:X,forbidShowLimitPopover:Z}),e.createElement(w,{style:{margin:0}}),Q&&e.createElement(Tt,{subAttributeList:t,setSubAttribute:q,getValue:r=>{var C,_,y,E;return((_=(C=s.selectedPointCloudBox)==null?void 0:C.subAttribute)==null?void 0:_[r.value])||((E=(y=m.cacheSegData)==null?void 0:y.subAttribute)==null?void 0:E[r.value])}})))},Nt=[{toolName:"LassoSelector",commonSvg:_t,selectedSvg:yt},{toolName:"RectSelector",commonSvg:Pt,selectedSvg:wt},{toolName:"CircleSelector",commonSvg:Et,selectedSvg:xt}],M=({toolInstance:o})=>{const{ptSegmentInstance:t}=j(h),[n,a]=P("LassoSelector"),{t:c}=k();return I(()=>{if(!t)return;const l=()=>{a("LassoSelector")},u=()=>{a("RectSelector")},m=()=>{a("CircleSelector")};return t.on("LassoSelector",l),t.on("RectSelector",u),t.on("CircleSelector",m),()=>{t.unbind("LassoSelector",l),t.unbind("RectSelector",u),t.unbind("CircleSelector",m)}},[t]),e.createElement("div",{className:`${T}__level`},Nt.map(l=>{const u=n===l.toolName;return e.createElement("span",{className:`${T}__toolOption`,key:l.toolName,onClick:()=>t==null?void 0:t.emit(l.toolName)},e.createElement("img",{className:`${T}__singleTool`,src:u?l==null?void 0:l.selectedSvg:l==null?void 0:l.commonSvg}),e.createElement("span",{className:ut({[`${T}__toolOption__selected`]:u})},c(l.toolName)))}))},Ot=({stepInfo:o,toolInstance:t,imgList:n,imgIndex:a,stepList:c,enableColorPicker:l})=>{var u,m;const{updatePointCloudPattern:v,pointCloudPattern:p,isPointCloudSegmentationPattern:s}=R(),i=ct(o.config),S=(u=i==null?void 0:i.attributeList)!=null?u:[],d=(i==null?void 0:i.secondaryAttributeConfigurable)===!0?(m=i==null?void 0:i.inputList)!=null?m:[]:[];return s?e.createElement(e.Fragment,null,e.createElement(M,{toolInstance:t}),e.createElement(H,{toolInstance:t,attributeList:S,subAttributeList:d,config:i,stepList:c,stepInfo:o,enableColorPicker:l})):e.createElement(e.Fragment,null,e.createElement(nt,{toolName:rt.EPointCloudName.PointCloud,selectedToolName:p,onChange:f=>v==null?void 0:v(f)}),e.createElement("div",{style:{flex:1,overflow:"hidden"}},e.createElement(jt,{minTopHeight:42,defaultHeight:400,localKey:"id:"+(o==null?void 0:o.id)+"taskID:"+(o==null?void 0:o.taskID)+"step:"+(o==null?void 0:o.step)+"type:"+(o==null?void 0:o.type)},e.createElement(H,{toolInstance:t,attributeList:S,subAttributeList:d,config:i,stepList:c,stepInfo:o,enableColorPicker:l}),(i==null?void 0:i.trackConfigurable)===!0&&p===lt.Rect?e.createElement("div",{style:{height:"100%",overflow:"auto"}},e.createElement(Bt,null),e.createElement(w,{style:{margin:0}}),e.createElement(ft,{imgList:n,imgIndex:a}),e.createElement(w,{style:{margin:0}}),e.createElement(gt,{imgList:n,imgIndex:a}),e.createElement(w,{style:{margin:0}}),e.createElement(vt,null)):e.createElement("div",null))))},Rt=o=>{var t,n,a,c;const l=st.getCurrentStepInfo((t=o.annotation)==null?void 0:t.step,(n=o.annotation)==null?void 0:n.stepList),u=(a=o.annotation)==null?void 0:a.toolInstance,m=(c=o.annotation)==null?void 0:c.stepList;return{stepInfo:l,toolInstance:u,imgList:o.annotation.imgList,imgIndex:o.annotation.imgIndex,stepList:m}};var $t=at(Rt,null,null,{context:mt})(Ot);export{M as PointCloudSegToolIcon,$t as default};
@@ -1 +1 @@
1
- import K from"../../../../components/attributeList/index.js";import M from"../../../../components/checkboxList/index.js";import{CaretRightOutlined as P}from"@ant-design/icons";import{Collapse as T,Tooltip as H,Badge as x}from"antd/es";import{cloneDeep as F}from"lodash";import n,{useState as v,useRef as U,useEffect as p,useCallback as q}from"react";import z from"../../../../assets/annotation/common/icon_clearSmall.svg.js";import G from"../../../../assets/annotation/common/icon_clearSmall_a.svg.js";import{TagUtils as J}from"@labelbee/lb-annotation";import{connect as Q}from"react-redux";import{useTranslation as V}from"react-i18next";import{LabelBeeContext as W}from"../../../../store/ctx.js";const{Panel:X}=T,$=({isActive:a})=>n.createElement(P,{rotate:a?90:0}),Y=({toolInstance:a,imgIndex:N})=>{const[s,g]=v([]),i=U(null),[,j]=v(0),[w,f]=v(-1),{t:b}=V();p(()=>{var r,t;a&&(g((t=(r=a.config)==null?void 0:r.inputList)==null?void 0:t.map(e=>e.value)),a.singleOn("render",()=>{j(e=>e+1)}))},[a]),p(()=>{if(a&&(a.singleOn("expend",O),a.labelSelectedList.length===1)){let r=0;for(let t=0;t<a.labelSelectedList[0];t++)r+=46,o[t]&&s[t]!==""&&o[t].subSelected.forEach(e=>{r+=40});i.current&&(i.current.children[0].scrollTop=r)}}),p(()=>{i.current&&(i.current.children[0].scrollTop=0)},[N]);const O=()=>{var r;const t=a.labelSelectedList[0],e=(r=o.filter((l,m)=>m===t)[0])==null?void 0:r.value;h(t,e,!0)},h=q((r,t,e)=>{const l=F(s);l[r]===""||e===!0?l[r]=t:l[r]="",g(l)},[s]);if(!a)return null;const{labelSelectedList:u,config:{inputList:o},currentTagResult:c,setLabel:E}=a,A=r=>u.length>0&&u[0]===r?n.createElement("span",{className:"keyDownIconActive"},r+1):n.createElement("span",{className:"keyDownIcon"},r+1),y=(r,t=-1)=>r?r.map((e,l)=>{var m,L,_,k,C;if(e.subSelected){const R=J.judgeResultIsInInputList(e.value,(m=c==null?void 0:c.result)==null?void 0:m[e.value],o);return n.createElement(T,{bordered:!1,expandIcon:$,key:`collapse_${l}_${t+1}`,onChange:()=>h(l,e.value),activeKey:[s[l]]},n.createElement(X,{header:n.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flex:1}},n.createElement("span",null,e.key,n.createElement(H,{placement:"bottom",title:b("ClearThisOption")},n.createElement("img",{style:{marginLeft:5,cursor:"pointer"},onClick:D=>{D.stopPropagation(),a.clearResult(!0,e.value)},src:w===l||R?G:z,onMouseEnter:()=>{f(l)},onMouseLeave:()=>{f(-1)}})),R&&s[l]===""&&n.createElement(x,{color:"#87d068"})),(o==null?void 0:o.length)>1&&A(l)),key:e.value},n.createElement("div",{className:"level",style:{backgroundColor:u.length>0&&u[0]===l?"rgba(158, 158, 158, 0.18)":""}},y(e.subSelected,l))))}const d=(o==null?void 0:o[t])?o==null?void 0:o[t].value:0,S=((k=(_=(L=c==null?void 0:c.result)==null?void 0:L[d])==null?void 0:_.split(";"))==null?void 0:k.indexOf(e.value))>-1?e.value:"";return((C=o==null?void 0:o[t])==null?void 0:C.isMulti)===!0?n.createElement("div",{className:"singleBar",key:`${d}_${t}_${l}`},n.createElement(M,{attributeChanged:()=>E(t,l),selectedAttribute:[S],list:[{value:e.value,label:e.key}],num:l+1})):n.createElement("div",{className:"singleBar",key:`${d}_${t}_${l}`},n.createElement(K,{forbidColor:!0,attributeChanged:()=>E(t,l),selectedAttribute:S,list:[{value:e.value,label:e.key}],num:l+1}))}):null,B=window.innerHeight-61-80;return n.createElement("div",{className:"tagOperationMenu",ref:i},(o==null?void 0:o.length)===0?n.createElement("div",{style:{padding:20,textAlign:"center"}},b("NoConfiguration")):n.createElement("div",{className:"main",style:{height:B}},y(o)))};function Z(a){return{toolInstance:a.annotation.toolInstance,imgIndex:a.annotation.imgIndex}}var I=Q(Z,null,null,{context:W})(Y);export{I as default,$ as expandIconFuc};
1
+ import K from"../../../../components/attributeList/index.js";import M from"../../../../components/checkboxList/index.js";import{CaretRightOutlined as P}from"@ant-design/icons";import{Collapse as T,Tooltip as H,Badge as x}from"antd/es";import{cloneDeep as F}from"lodash";import a,{useState as v,useRef as U,useEffect as p,useCallback as q}from"react";import z from"../../../../assets/annotation/common/icon_clearSmall.svg.js";import G from"../../../../assets/annotation/common/icon_clearSmall_a.svg.js";import{TagUtils as J}from"@labelbee/lb-annotation";import{connect as Q}from"react-redux";import{useTranslation as V}from"react-i18next";import{LabelBeeContext as W}from"../../../../store/ctx.js";const{Panel:X}=T,$=({isActive:n})=>a.createElement(P,{rotate:n?90:0}),Y=({toolInstance:n,imgIndex:N})=>{const[s,g]=v([]),i=U(null),[,j]=v(0),[w,f]=v(-1),{t:b}=V();p(()=>{var r,l;n&&(g((l=(r=n.config)==null?void 0:r.inputList)==null?void 0:l.map(e=>e.value)),n.singleOn("render",()=>{j(e=>e+1)}))},[n]),p(()=>{var r;if(n&&(n.singleOn("expend",O),((r=n==null?void 0:n.labelSelectedList)==null?void 0:r.length)===1)){let l=0;for(let e=0;e<n.labelSelectedList[0];e++)l+=46,o[e]&&s[e]!==""&&o[e].subSelected.forEach(t=>{l+=40});i.current&&(i.current.children[0].scrollTop=l)}}),p(()=>{i.current&&(i.current.children[0].scrollTop=0)},[N]);const O=()=>{var r;const l=n.labelSelectedList[0],e=(r=o.filter((t,m)=>m===l)[0])==null?void 0:r.value;h(l,e,!0)},h=q((r,l,e)=>{const t=F(s);t[r]===""||e===!0?t[r]=l:t[r]="",g(t)},[s]);if(!n)return null;const{labelSelectedList:u,config:{inputList:o},currentTagResult:c,setLabel:E}=n,A=r=>u.length>0&&u[0]===r?a.createElement("span",{className:"keyDownIconActive"},r+1):a.createElement("span",{className:"keyDownIcon"},r+1),y=(r,l=-1)=>r?r.map((e,t)=>{var m,_,L,k,C;if(e.subSelected){const R=J.judgeResultIsInInputList(e.value,(m=c==null?void 0:c.result)==null?void 0:m[e.value],o);return a.createElement(T,{bordered:!1,expandIcon:$,key:`collapse_${t}_${l+1}`,onChange:()=>h(t,e.value),activeKey:[s[t]]},a.createElement(X,{header:a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flex:1}},a.createElement("span",null,e.key,a.createElement(H,{placement:"bottom",title:b("ClearThisOption")},a.createElement("img",{style:{marginLeft:5,cursor:"pointer"},onClick:D=>{D.stopPropagation(),n.clearResult(!0,e.value)},src:w===t||R?G:z,onMouseEnter:()=>{f(t)},onMouseLeave:()=>{f(-1)}})),R&&s[t]===""&&a.createElement(x,{color:"#87d068"})),(o==null?void 0:o.length)>1&&A(t)),key:e.value},a.createElement("div",{className:"level",style:{backgroundColor:u.length>0&&u[0]===t?"rgba(158, 158, 158, 0.18)":""}},y(e.subSelected,t))))}const d=(o==null?void 0:o[l])?o==null?void 0:o[l].value:0,S=((k=(L=(_=c==null?void 0:c.result)==null?void 0:_[d])==null?void 0:L.split(";"))==null?void 0:k.indexOf(e.value))>-1?e.value:"";return((C=o==null?void 0:o[l])==null?void 0:C.isMulti)===!0?a.createElement("div",{className:"singleBar",key:`${d}_${l}_${t}`},a.createElement(M,{attributeChanged:()=>E(l,t),selectedAttribute:[S],list:[{value:e.value,label:e.key}],num:t+1})):a.createElement("div",{className:"singleBar",key:`${d}_${l}_${t}`},a.createElement(K,{forbidColor:!0,attributeChanged:()=>E(l,t),selectedAttribute:S,list:[{value:e.value,label:e.key}],num:t+1}))}):null,B=window.innerHeight-61-80;return a.createElement("div",{className:"tagOperationMenu",ref:i},(o==null?void 0:o.length)===0?a.createElement("div",{style:{padding:20,textAlign:"center"}},b("NoConfiguration")):a.createElement("div",{className:"main",style:{height:B}},y(o)))};function Z(n){return{toolInstance:n.annotation.toolInstance,imgIndex:n.annotation.imgIndex}}var I=Q(Z,null,null,{context:W})(Y);export{I as default,$ as expandIconFuc};
@@ -1 +1 @@
1
- import o,{useState as u,useEffect as h,useRef as I}from"react";import{connect as M}from"react-redux";import{cloneDeep as z}from"lodash";import{classnames as S}from"../../../../utils/index.js";import{Switch as W,Input as J}from"antd/es";import{cKeyCode as G,cTool as H}from"@labelbee/lb-annotation";import{PageForward as Q}from"../../../../store/annotation/actionCreators.js";import{ConfigUtils as X}from"../../../../utils/ConfigUtils.js";import{useTranslation as A}from"react-i18next";import{LabelBeeContext as Y}from"../../../../store/ctx.js";var Z=Object.defineProperty,K=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,$=(e,t,r)=>t in e?Z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ne=(e,t)=>{for(var r in t||(t={}))ee.call(t,r)&&$(e,r,t[r]);if(K)for(var r of K(t))te.call(t,r)&&$(e,r,t[r]);return e};const j=G.default,{EVideoToolName:oe}=H,V=e=>{e.stopPropagation(),e.nativeEvent.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},D=e=>{const{textareaProps:t,footer:r}=e;return o.createElement(o.Fragment,null,o.createElement(J.TextArea,ne({key:`${t.id}-${t.defaultValue}`,bordered:!1,rows:6,onKeyDown:V,onKeyUp:V},t)),o.createElement("div",{className:S({textAreaLength:!0})},r))},q=e=>{var t;const r=I(null),[E,f]=u(!1),[N,P]=u(!1),{t:w}=A(),{disabled:s,config:i,result:m,updateText:p,index:d,switchToNextTextarea:y,hasMultiple:L,onNext:b}=e,{maxLength:g}=i,c=m?m[i.key]:"",[_,C]=u((t=c==null?void 0:c.length)!=null?t:0);h(()=>{var n;C((n=c==null?void 0:c.length)!=null?n:0)},[c]);const v=(n,T)=>{p&&(p(n,i.key,T),i.required&&P(!n))},x=L&&y,k={id:`textInput-${d}`,ref:r,disabled:s,defaultValue:c,maxLength:g,autoSize:{minRows:2,maxRows:6},onChange:n=>{const T=n.target.value;C(n.target.value.length),v(T,!1)},onFocus:()=>{f(!0)},onBlur:n=>{f(!1),v(n.target.value,!0),i.required&&P(!n.target.value)},style:{resize:"none",wordBreak:"break-all"},onKeyDownCapture:n=>{n.ctrlKey&&n.keyCode===j.Enter&&(b&&b(),n.preventDefault()),n.keyCode===j.Tab&&x&&(n.preventDefault(),n.nativeEvent.stopImmediatePropagation(),y(d)),n.nativeEvent.stopPropagation()}},F=o.createElement("div",{className:"textAreaFooter"},o.createElement("div",{className:"hotkeyTip"},x&&o.createElement("span",null,`[${w("Switch")}]Tab`),o.createElement("span",null,`[${w("TurnPage")}]Ctrl+Enter`)),o.createElement("div",{className:"wordCount"},o.createElement("span",{className:_>=g?"warning":""},_),"/",o.createElement("span",null,g)));return h(()=>{s&&f(!1)},[s]),o.createElement("div",{className:"textField"},o.createElement("div",{className:"label"},o.createElement("span",{className:S({required:i.required})},i.label),o.createElement("i",{className:S({clearText:!0,disabled:s}),onClick:()=>{s||v("",!0)}})),o.createElement("div",{className:S({disabled:s,"textarea-outline":!0,"ant-input-focused":E,textareaContainer:!0,focus:E,invalid:N})},o.createElement(D,{footer:F,textareaProps:k})))},ae=({toolInstance:e,imgIndex:t,dispatch:r,triggerEventAfterIndexChanged:E,step:f,stepList:N,basicResultList:P,disabled:w})=>{var s,i,m,p;const[d,y]=u([]),[L,b]=u(0),[g,c]=u(!0),[,_]=u(0),{t:C}=A(),v=a=>{const l=(a+1)%d.length;x(l)},x=a=>{setTimeout(()=>{const l=document.getElementById(`textInput-${a}`);l&&(b(a),l.focus(),l.select(),l.scrollIntoView({behavior:"smooth",block:"center"}))})};h(()=>{e&&e.singleOn("valueUpdated",()=>{_(a=>a+1)})},[e]),h(()=>{var a;e&&y(z((a=e==null?void 0:e.config)==null?void 0:a.configList))},[JSON.stringify((s=e==null?void 0:e.config)==null?void 0:s.configList)]);const k=(p=(m=(i=e==null?void 0:e.textList)==null?void 0:i[0])==null?void 0:m.value)!=null?p:{},F=(a,l,U=!1)=>{var O,R;(R=e==null?void 0:e.updateTextValue)==null||R.call(e,l,a,U,(O=e==null?void 0:e.textList)==null?void 0:O[0])};h(()=>{t>-1&&E&&x(0)},[t]);const n=()=>{r(Q(!0))},T=a=>{c(a),e==null||e.toggleShowText(a)},B=X.getStepConfig(N,f).tool===oe.VideoTextTool;return e&&o.createElement("div",{className:"textToolOperationMenu"},d.map((a,l)=>o.createElement(q,{config:a,key:a.key,index:l,result:k,updateText:F,switchToNextTextarea:v,hasMultiple:d.length>1,focus:L===l,onNext:n,disabled:w})),B&&o.createElement("div",{className:"textToolSwitchItem"},C("toggleShowText"),o.createElement(W,{style:{alignSelf:"center"},checked:g,onChange:a=>{T(a)}})))};function re(e){return{toolInstance:e.annotation.toolInstance,imgIndex:e.annotation.imgIndex,step:e.annotation.step,basicResultList:e.annotation.basicResultList,stepList:e.annotation.stepList,triggerEventAfterIndexChanged:e.annotation.triggerEventAfterIndexChanged}}var le=M(re,null,null,{context:Y})(ae);export{q as SingleTextInput,D as TextareaWithFooter,le as default};
1
+ import o,{useState as d,useEffect as h,useRef as I}from"react";import{connect as M}from"react-redux";import{cloneDeep as z}from"lodash";import{classnames as S}from"../../../../utils/index.js";import{Switch as W,Input as J}from"antd/es";import{cKeyCode as G,cTool as H}from"@labelbee/lb-annotation";import{PageForward as Q}from"../../../../store/annotation/actionCreators.js";import{ConfigUtils as X}from"../../../../utils/ConfigUtils.js";import{useTranslation as A}from"react-i18next";import{LabelBeeContext as Y}from"../../../../store/ctx.js";var Z=Object.defineProperty,K=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,$=(e,t,r)=>t in e?Z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ne=(e,t)=>{for(var r in t||(t={}))ee.call(t,r)&&$(e,r,t[r]);if(K)for(var r of K(t))te.call(t,r)&&$(e,r,t[r]);return e};const j=G.default,{EVideoToolName:oe}=H,V=e=>{e.stopPropagation(),e.nativeEvent.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},D=e=>{const{textareaProps:t,footer:r}=e;return o.createElement(o.Fragment,null,o.createElement(J.TextArea,ne({key:`${t.id}-${t.defaultValue}`,bordered:!1,rows:6,onKeyDown:V,onKeyUp:V},t)),o.createElement("div",{className:S({textAreaLength:!0})},r))},q=e=>{var t;const r=I(null),[E,f]=d(!1),[N,P]=d(!1),{t:w}=A(),{disabled:s,config:i,result:m,updateText:p,index:u,switchToNextTextarea:y,hasMultiple:L,onNext:b}=e,{maxLength:g}=i,c=m?m[i.key]:"",[_,C]=d((t=c==null?void 0:c.length)!=null?t:0);h(()=>{var n;C((n=c==null?void 0:c.length)!=null?n:0)},[c]);const v=(n,T)=>{p&&(p(n,i.key,T),i.required&&P(!n))},x=L&&y,k={id:`textInput-${u}`,ref:r,disabled:s,defaultValue:c,maxLength:g,autoSize:{minRows:2,maxRows:6},onChange:n=>{const T=n.target.value;C(n.target.value.length),v(T,!1)},onFocus:()=>{f(!0)},onBlur:n=>{f(!1),v(n.target.value,!0),i.required&&P(!n.target.value)},style:{resize:"none",wordBreak:"break-all"},onKeyDownCapture:n=>{n.ctrlKey&&n.keyCode===j.Enter&&(b&&b(),n.preventDefault()),n.keyCode===j.Tab&&x&&(n.preventDefault(),n.nativeEvent.stopImmediatePropagation(),y(u)),n.nativeEvent.stopPropagation()}},F=o.createElement("div",{className:"textAreaFooter"},o.createElement("div",{className:"hotkeyTip"},x&&o.createElement("span",null,`[${w("Switch")}]Tab`),o.createElement("span",null,`[${w("TurnPage")}]Ctrl+Enter`)),o.createElement("div",{className:"wordCount"},o.createElement("span",{className:_>=g?"warning":""},_),"/",o.createElement("span",null,g)));return h(()=>{s&&f(!1)},[s]),o.createElement("div",{className:"textField"},o.createElement("div",{className:"label"},o.createElement("span",{className:S({required:i.required})},i.label),o.createElement("i",{className:S({clearText:!0,disabled:s}),onClick:()=>{s||v("",!0)}})),o.createElement("div",{className:S({disabled:s,"textarea-outline":!0,"ant-input-focused":E,textareaContainer:!0,focus:E,invalid:N})},o.createElement(D,{footer:F,textareaProps:k})))},ae=({toolInstance:e,imgIndex:t,dispatch:r,triggerEventAfterIndexChanged:E,step:f,stepList:N,basicResultList:P,disabled:w})=>{var s,i,m,p;const[u,y]=d([]),[L,b]=d(0),[g,c]=d(!0),[,_]=d(0),{t:C}=A(),v=a=>{const l=(a+1)%u.length;x(l)},x=a=>{setTimeout(()=>{const l=document.getElementById(`textInput-${a}`);l&&(b(a),l.focus(),l.select(),l.scrollIntoView({behavior:"smooth",block:"center"}))})};h(()=>{e&&e.singleOn("valueUpdated",()=>{_(a=>a+1)})},[e]),h(()=>{var a;e&&y(z((a=e==null?void 0:e.config)==null?void 0:a.configList))},[JSON.stringify((s=e==null?void 0:e.config)==null?void 0:s.configList)]);const k=(p=(m=(i=e==null?void 0:e.textList)==null?void 0:i[0])==null?void 0:m.value)!=null?p:{},F=(a,l,U=!1)=>{var O,R;(R=e==null?void 0:e.updateTextValue)==null||R.call(e,l,a,U,(O=e==null?void 0:e.textList)==null?void 0:O[0])};h(()=>{t>-1&&E&&x(0)},[t]);const n=()=>{r(Q(!0))},T=a=>{c(a),e==null||e.toggleShowText(a)},B=X.getStepConfig(N,f).tool===oe.VideoTextTool;return e&&o.createElement("div",{className:"textToolOperationMenu"},u==null?void 0:u.map((a,l)=>o.createElement(q,{config:a,key:a.key,index:l,result:k,updateText:F,switchToNextTextarea:v,hasMultiple:u.length>1,focus:L===l,onNext:n,disabled:w})),B&&o.createElement("div",{className:"textToolSwitchItem"},C("toggleShowText"),o.createElement(W,{style:{alignSelf:"center"},checked:g,onChange:a=>{T(a)}})))};function re(e){return{toolInstance:e.annotation.toolInstance,imgIndex:e.annotation.imgIndex,step:e.annotation.step,basicResultList:e.annotation.basicResultList,stepList:e.annotation.stepList,triggerEventAfterIndexChanged:e.annotation.triggerEventAfterIndexChanged}}var le=M(re,null,null,{context:Y})(ae);export{q as SingleTextInput,D as TextareaWithFooter,le as default};
@@ -1 +1 @@
1
- import{prefix as M}from"../../../constant/index.js";import{EToolName as o}from"../../../data/enums/ToolType.js";import R from"../../../utils/StepUtils.js";import{Collapse as d}from"antd/es";import e,{useState as z}from"react";import{useTranslation as D}from"react-i18next";import G from"./AnnotationText/index.js";import U from"./ClearIcon/index.js";import q,{PointCloudOperation as _}from"./GeneralOperation/index.js";import H from"./ImgAttributeInfo/index.js";import J from"./SwitchAttributeList/index.js";import u,{expandIconFuc as L}from"./TagSidebar/index.js";import p from"./TextToolSidebar/index.js";import $ from"./PointCloudToolSidebar/index.js";import Q from"./ToolStyle/index.js";import{cTool as W}from"@labelbee/lb-annotation";import X from"./ScribbleSidebar/index.js";import{ToolIcons as Y}from"./ToolIcons.js";import{useSelector as Z}from"../../../store/ctx.js";import{Tabs as I}from"antd";import{classnames as ee}from"../../../utils/index.js";import P from"../../../assets/annotation/common/icon_menu_fold.svg.js";import te from"../../../components/LLMToolView/sidebar/index.js";import ne from"./NLPSidebar/index.js";import oe from"../../../components/videoAnnotate/videoClipTool/components/annotatedList/index.js";const{EVideoToolName:f,EPointCloudName:re}=W,{Panel:A}=d,t=`${M}-sidebar`,ie=({sider:l,enableColorPicker:w,setSiderWidth:E,propsSiderWidth:le,checkMode:b})=>{const x=Z(r=>R.getCurrentStepInfo(r.annotation.step,r.annotation.stepList)),[c,V]=z(!0),n=x==null?void 0:x.tool,{t:S}=D();if(!n)return null;const k=r=>{const s=e.createElement(Q,null);return e.createElement(A,{header:S("Style"),className:"panel",key:r},s)},T=e.createElement(Y,{toolName:n,onChange:()=>{}}),a=e.createElement(J,null),g=e.createElement(G,null),N=e.createElement(d,{defaultActiveKey:["1","imgAttribute"],bordered:!1,expandIconPosition:"right",className:`${t}__content`,expandIcon:L},k("1")),v=e.createElement(d,{defaultActiveKey:["1","imgAttribute"],bordered:!1,expandIconPosition:"right",className:`${t}__content`,expandIcon:L},e.createElement(A,{header:e.createElement("div",null,S("Adjust"),e.createElement(U,null)),className:"panel",key:"imgAttribute"},e.createElement(H,null))),i=e.createElement(q,null),B=e.createElement(u,null),O=r=>e.createElement(p,{disabled:r}),h=e.createElement(X,{onChange:(r,s)=>{}}),C=e.createElement(oe,null),y=e.createElement(te,{checkMode:b}),j=e.createElement(ne,{checkMode:b}),m=e.createElement("div",{className:`${t}__horizontal`}),F=e.createElement($,{enableColorPicker:w}),K=e.createElement(_,null);if(l)return typeof l=="function"?e.createElement("div",{className:`${t}`},l({toolIcon:T,attributeList:a,annotationText:g,toolStyle:N,imageAttributeInfo:v,operation:i,tagToolSideBar:B,textToolSideBar:O,horizontal:m,pointCloudToolSidebar:F,pointCloudOperation:K,scribbleSidebar:h,LLMSidebar:y,videoClipSidebar:C,NLPSidebar:j})):l;if([o.Rect,o.Point,o.Line,o.Rect,o.Polygon,o.Cuboid].includes(n))return e.createElement("div",{className:`${t}`},T,m,a,g,m,e.createElement("div",{className:`${t}__content`},N,v),i);if(n===o.Tag)return e.createElement("div",{className:`${t}`},e.createElement(u,null));if(n===f.VideoClipTool)return e.createElement("div",{className:`${t}`},e.createElement("div",{className:`${t}__content`},C,a),i);if(n===f.VideoTagTool)return e.createElement("div",{className:`${t}`},e.createElement("div",{className:`${t}__content`},e.createElement(u,null)),i);if(n===f.VideoTextTool)return e.createElement("div",{className:`${t}`},e.createElement(p,null));if(n===o.Text)return e.createElement("div",{className:`${t}`},"s",e.createElement(p,null));if(n===re.PointCloud){const r=()=>{V(!c),E&&E(c?48:void 0)},s=e.createElement("div",{style:{width:"48px",height:"100%",display:"flex",justifyContent:"center",background:"#ffffff"}},e.createElement("span",{onClick:()=>r()},e.createElement("img",{style:{width:"16px",height:"16px",marginTop:"18px",cursor:"pointer",transform:"rotate(180deg)"},src:P})));return c?e.createElement(I,{type:"card",activeKey:"1",className:ee({[`${t}`]:!0,[`${t}__pointCloud`]:!0}),tabBarExtraContent:{left:e.createElement("span",{onClick:()=>r(),style:{padding:"0px 4px"}},e.createElement("img",{style:{width:"16px",height:"16px",marginLeft:"4px",cursor:"pointer"},src:P}))}},e.createElement(I.TabPane,{tab:"\u5DE5\u5177\u9762\u677F",key:"1",style:{height:"100%",display:"flex",flexDirection:"column"}},e.createElement("div",{className:`${t}__content`},e.createElement($,null)),e.createElement(_,null))):s}return n===o.ScribbleTool?e.createElement("div",{className:`${t}`},e.createElement("div",{className:`${t}__content`},h,a),i):n===o.LLM?y:n===o.NLP?j:null};export{ie as default,t as sidebarCls};
1
+ import{prefix as z}from"../../../constant/index.js";import{EToolName as i}from"../../../data/enums/ToolType.js";import D from"../../../utils/StepUtils.js";import{Collapse as u}from"antd/es";import e,{useState as G}from"react";import{useTranslation as U}from"react-i18next";import q from"./AnnotationText/index.js";import H from"./ClearIcon/index.js";import J,{PointCloudOperation as P}from"./GeneralOperation/index.js";import Q from"./ImgAttributeInfo/index.js";import W from"./SwitchAttributeList/index.js";import f,{expandIconFuc as L}from"./TagSidebar/index.js";import E from"./TextToolSidebar/index.js";import I from"./PointCloudToolSidebar/index.js";import X from"./ToolStyle/index.js";import{cTool as Y}from"@labelbee/lb-annotation";import Z from"./ScribbleSidebar/index.js";import{ToolIcons as ee}from"./ToolIcons.js";import{useSelector as te}from"../../../store/ctx.js";import{Tabs as $}from"antd";import{classnames as oe}from"../../../utils/index.js";import w from"../../../assets/annotation/common/icon_menu_fold.svg.js";import ne from"../../../components/LLMToolView/sidebar/index.js";import re from"./NLPSidebar/index.js";import ae from"../../../components/videoAnnotate/videoClipTool/components/annotatedList/index.js";var le=Object.defineProperty,A=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,O=(r,o,n)=>o in r?le(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,ce=(r,o)=>{for(var n in o||(o={}))ie.call(o,n)&&O(r,n,o[n]);if(A)for(var n of A(o))se.call(o,n)&&O(r,n,o[n]);return r};const{EVideoToolName:b,EPointCloudName:me}=Y,{Panel:V}=u,t=`${z}-sidebar`,de=({sider:r,enableColorPicker:o,setSiderWidth:n,propsSiderWidth:pe,checkMode:x})=>{const S=te(l=>D.getCurrentStepInfo(l.annotation.step,l.annotation.stepList)),[d,B]=G(!0),a=S==null?void 0:S.tool,{t:T}=U();if(!a)return null;const F=l=>{const m=e.createElement(X,null);return e.createElement(V,{header:T("Style"),className:"panel",key:l},m)},_=e.createElement(ee,{toolName:a,onChange:()=>{}}),c=e.createElement(W,null),g=e.createElement(q,null),v=e.createElement(u,{defaultActiveKey:["1","imgAttribute"],bordered:!1,expandIconPosition:"right",className:`${t}__content`,expandIcon:L},F("1")),y=e.createElement(u,{defaultActiveKey:["1","imgAttribute"],bordered:!1,expandIconPosition:"right",className:`${t}__content`,expandIcon:L},e.createElement(V,{header:e.createElement("div",null,T("Adjust"),e.createElement(H,null)),className:"panel",key:"imgAttribute"},e.createElement(Q,null))),s=e.createElement(J,null),K=e.createElement(f,null),M=l=>e.createElement(E,{disabled:l}),N=e.createElement(Z,{onChange:(l,m)=>{}}),h=e.createElement(ae,null),j=e.createElement(ne,{checkMode:x}),C=e.createElement(re,{checkMode:x}),p=e.createElement("div",{className:`${t}__horizontal`}),R=e.createElement(I,{enableColorPicker:o}),k=l=>e.createElement(P,ce({},l));if(r)return typeof r=="function"?e.createElement("div",{className:`${t}`},r({toolIcon:_,attributeList:c,annotationText:g,toolStyle:v,imageAttributeInfo:y,operation:s,tagToolSideBar:K,textToolSideBar:M,horizontal:p,pointCloudToolSidebar:R,pointCloudOperation:k,scribbleSidebar:N,LLMSidebar:j,videoClipSidebar:h,NLPSidebar:C})):r;if([i.Rect,i.Point,i.Line,i.Rect,i.Polygon,i.Cuboid].includes(a))return e.createElement("div",{className:`${t}`},_,p,c,g,p,e.createElement("div",{className:`${t}__content`},v,y),s);if(a===i.Tag)return e.createElement("div",{className:`${t}`},e.createElement(f,null));if(a===b.VideoClipTool)return e.createElement("div",{className:`${t}`},e.createElement("div",{className:`${t}__content`},h,c),s);if(a===b.VideoTagTool)return e.createElement("div",{className:`${t}`},e.createElement("div",{className:`${t}__content`},e.createElement(f,null)),s);if(a===b.VideoTextTool)return e.createElement("div",{className:`${t}`},e.createElement(E,null));if(a===i.Text)return e.createElement("div",{className:`${t}`},"s",e.createElement(E,null));if(a===me.PointCloud){const l=()=>{B(!d),n&&n(d?48:void 0)},m=e.createElement("div",{style:{width:"48px",height:"100%",display:"flex",justifyContent:"center",background:"#ffffff"}},e.createElement("span",{onClick:()=>l()},e.createElement("img",{style:{width:"16px",height:"16px",marginTop:"18px",cursor:"pointer",transform:"rotate(180deg)"},src:w})));return d?e.createElement($,{type:"card",activeKey:"1",className:oe({[`${t}`]:!0,[`${t}__pointCloud`]:!0}),tabBarExtraContent:{left:e.createElement("span",{onClick:()=>l(),style:{padding:"0px 4px"}},e.createElement("img",{style:{width:"16px",height:"16px",marginLeft:"4px",cursor:"pointer"},src:w}))}},e.createElement($.TabPane,{tab:"\u5DE5\u5177\u9762\u677F",key:"1",style:{height:"100%",display:"flex",flexDirection:"column"}},e.createElement("div",{className:`${t}__content`},e.createElement(I,null)),e.createElement(P,null))):m}return a===i.ScribbleTool?e.createElement("div",{className:`${t}`},e.createElement("div",{className:`${t}__content`},N,c),s):a===i.LLM?j:a===i.NLP?C:null};export{de as default,t as sidebarCls};
@@ -0,0 +1 @@
1
+ import t,{useState as g,useContext as x,useCallback as a,useMemo as I,useEffect as h}from"react";import{Popconfirm as m,Popover as f}from"antd";import{useTranslation as B}from"react-i18next";import{PointCloudContext as b}from"../../../../components/pointCloudView/PointCloudContext.js";import{EventBus as l}from"@labelbee/lb-annotation";import{IconBatchConnect as y,IconBatchDisconnect as D}from"./Icons.js";var r;(function(i){i.switchConnect="batch:switch-connect"})(r||(r={}));const v=()=>{const[i,u]=g(!1),{cuboidBoxIn2DView:C}=x(b),{t:e}=B(),o=a((n,c)=>{l.emit(r.switchConnect,c)},[]),d=a(n=>{o(n,!0)},[o]),p=a(n=>{o(n,!1)},[o]),s=I(()=>({padding:"4px",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid #cccccc",cursor:"pointer",marginLeft:12}),[]);return h(()=>{const n=E=>{u(E)},c="2d-image:enlarge";return l.on(c,n),()=>{l.unbind(c,n)}},[]),C||i?null:t.createElement("div",{style:{margin:"0 10px",display:"flex",alignItems:"center",justifyContent:"center"}},t.createElement(m,{title:e("ConfirmToBatchConnect"),onConfirm:d,okText:e("Confirm"),cancelText:e("Cancel")},t.createElement(f,{content:e("2DImageBatchConnection")},t.createElement("span",{style:s,title:e("Connect")},t.createElement(y,null)))),t.createElement(m,{title:e("ConfirmToBatchDisconnect"),onConfirm:p,okText:e("Confirm"),cancelText:e("Cancel")},t.createElement(f,{content:e("2DImageBatchDisconnection")},t.createElement("span",{style:s,title:e("Disconnect")},t.createElement(D,null)))))};export{r as EventBusEvent,v as default};
@@ -0,0 +1 @@
1
+ import e from"react";const t=()=>e.createElement("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e.createElement("path",{d:"M793.875082 158.168888H77.469479A77.272556 77.272556 0 0 0 0 235.126367v711.91576C0 989.49871 34.737204 1023.999606 77.469479 1023.999606h716.405603a77.272556 77.272556 0 0 0 77.469479-76.957479V235.126367a77.193787 77.193787 0 0 0-77.469479-76.957479z m-306.412072 557.13434l-113.151913 112.442991a137.452202 137.452202 0 0 1-97.555618 40.172276c-36.903356 0-71.404253-14.178451-97.516232-40.172276a135.71928 135.71928 0 0 1-40.447969-96.88608c0-36.58828 14.296604-70.971022 40.447969-96.964848l92.947621-92.356852a38.990739 38.990739 0 0 1 54.823342 0 38.360586 38.360586 0 0 1 0 54.468881l-92.947621 92.356852a59.588877 59.588877 0 0 0-17.683679 42.456583c0 15.990142 6.301534 31.153207 17.683679 42.456582 11.342761 11.303376 26.62398 17.565525 42.69289 17.565525 16.108295 0 31.35013-6.262149 42.732275-17.565525l113.151913-112.44299c20.558753-20.4406 23.630751-52.539037 7.246764-76.248557a38.321201 38.321201 0 0 1 10.043069-53.484266 38.872585 38.872585 0 0 1 53.878112 9.9643 136.546357 136.546357 0 0 1-16.344602 174.237404z m204.52415-167.148179l-92.947621 92.356852a38.990739 38.990739 0 0 1-54.823342 0 38.360586 38.360586 0 0 1 0-54.468881l92.947621-92.356852c11.382145-11.303376 17.644294-26.466441 17.644294-42.456583s-6.301534-31.113822-17.644294-42.456583a60.652261 60.652261 0 0 0-85.46455 0l-113.112528 112.442991c-20.598138 20.479984-23.630751 52.578421-7.286149 76.248557a38.321201 38.321201 0 0 1-10.043069 53.523651 38.833201 38.833201 0 0 1-53.720574-9.9643 136.388818 136.388818 0 0 1 16.344603-174.158636L497.033464 354.46166a138.673124 138.673124 0 0 1 194.953696 0 135.71928 135.71928 0 0 1 40.408584 96.925464c0 36.548895-14.414758 70.971022-40.408584 96.80731z"}),e.createElement("path",{d:"M946.529733 0.000394H230.124131a77.272556 77.272556 0 0 0-77.469479 76.957479v36.824587H839.679354c42.69289 0 76.327326 33.398128 76.327326 75.854711v676.193941h30.523053A77.272556 77.272556 0 0 0 1023.999212 788.873633V76.957873A77.193787 77.193787 0 0 0 946.529733 0.000394z"})),a=()=>e.createElement("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e.createElement("path",{d:"M725.312 725.312h213.312v85.312h-128v128h-85.312zM298.624 298.624H85.312V213.312h128v-128h85.312z m484.864 364.224l-60.352-60.416 60.352-60.352a213.312 213.312 0 1 0-301.376-301.696l-60.352 60.352-60.352-60.352 60.416-60.352a298.688 298.688 0 0 1 422.4 422.4l-60.352 60.352z m-120.64 120.64l-60.352 60.352a298.688 298.688 0 0 1-422.4-422.4l60.352-60.352 60.352 60.416-60.352 60.608a213.312 213.312 0 1 0 301.696 301.44l60.352-60.352 60.352 60.352z m-30.208-452.544l60.352 60.352-301.696 301.696-60.352-60.352 301.696-301.632z"}));export{t as IconBatchConnect,a as IconBatchDisconnect};
@@ -1 +1 @@
1
- import{backward as n,forward as e,scale as a,fullScreen as u}from"../common/index.js";import s from"../../../../../../assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js";import C from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js";import o from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js";import d from"../../../../../../assets/annotation/pointCloudTool/changePointCloudValid.svg.js";import l from"../../../../../../assets/annotation/pointCloudTool/copy.svg.js";import p from"../../../../../../assets/annotation/pointCloudTool/nextBox.svg.js";import h from"../../../../../../assets/annotation/pointCloudTool/patse.svg.js";import f from"../../../../../../assets/annotation/pointCloudTool/prevBox.svg.js";import S from"../../../../../../assets/annotation/pointCloudTool/rotate180_black.svg.js";import v from"../../../../../../assets/annotation/pointCloudTool/selectAll.svg.js";import P from"../../../../../../assets/annotation/pointCloudTool/selectMultiple.svg.js";import j from"../../../../../../assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js";import T from"../../../../../../assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js";import y from"../../../../../../assets/annotation/pointCloudTool/lassoSelector.svg.js";import x from"../../../../../../assets/annotation/rectTool/icon_rect.svg.js";import R from"../../../../../../assets/annotation/pointCloudTool/circleSelector.svg.js";import _ from"../../../../../../assets/annotation/pointCloudTool/addSvg.svg.js";import $ from"../../../../../../assets/annotation/pointCloudTool/clearSvg.svg.js";import t from"react";import{ReloadOutlined as I,RotateLeftOutlined as B,RotateRightOutlined as b}from"@ant-design/icons";import{polygon as D,invalidPolygon as k,selectedPolygon as A,changePolygonAttribute as V,deletePolygon as M,insertPolygonPoint as O,deletePolygonPoint as w}from"../polygon/index.js";const r={name:"PointThickness",icon:t.createElement("span",{style:{display:" inline-block",width:14,height:14,borderRadius:"50%",border:"1px solid"}}),shortCut:["+","-"],linkSymbol:""},i={name:"RotateAroundCenterPoint",icon:t.createElement(I,null),shortCut:[C],noticeInfo:"DragOperation"},c={name:"PointCloudViewTranslate",icon:s,shortCut:[o],noticeInfo:"Drag"},m={name:"TopViewTranslate",icon:s,shortCut:[o]},g={name:"ChangePointCloudValid",icon:d,shortCut:["V"]},E={name:"CopyBox",icon:l,shortCut:["Ctrl","C"]},H={name:"PasteBox",icon:h,shortCut:["Ctrl","V"]},K={name:"RotateLeft",icon:t.createElement(B,null),shortCut:["Q"]},L={name:"RotateRight",icon:t.createElement(b,null),shortCut:["E"]},G={name:"PreviousBox",icon:f,shortCut:["Shift","Tab"]},N={name:"NextBox",icon:p,shortCut:["Tab"]},z={name:"Rotate180",icon:S,shortCut:["G"],noticeInfo:"SelectedStatus"},F={name:"CopyPrevPage",icon:l,shortCut:["Alt","C"]},J={name:"ChangeBoxValid",icon:j,shortCut:["F"],noticeInfo:"SelectedStatus"},Q={name:"MultiSelect",icon:P,shortCut:["Ctrl",o]},U={name:"SelectAllBox",icon:v,shortCut:["Ctrl","A"]},Y={name:"Delete",icon:T,shortCut:["Del"],noticeInfo:"SelectedStatus"},q={name:"LassoSelector",icon:y,shortCut:["H"],noticeInfo:"SelectorMsg"},W={name:"RectSelector",icon:x,shortCut:["J"],noticeInfo:"SelectorMsg"},X={name:"CircleSelector",icon:R,shortCut:["K"],noticeInfo:"SelectorMsg"},Z={name:"PointCloudViewTranslate",icon:s,shortCut:["space",o]},oo={name:"AddPoint",icon:_,shortCut:["U"]},to={name:"DeletePoint",icon:$,shortCut:["I"]},no=[{name:"GeneralOperation"},n,e,r,a,i,c,m,g,{name:"RectPattern"},E,H,K,L,G,N,z,F,J,Y,Q,U,u],eo=[{name:"GeneralOperation"},n,e,r,a,i,c,m,g,{name:"PolygonPattern"},D,k,A,V,M,O,w],so=[n,e,i,Z,q,W,X,oo,to];export{no as default,eo as pointCloudShortCutTable_POLYGON,so as pointCloudShortCutTable_SEGMENT};
1
+ import{backward as e,forward as n,scale as i,fullScreen as u}from"../common/index.js";import s from"../../../../../../assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js";import C from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js";import o from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js";import d from"../../../../../../assets/annotation/pointCloudTool/changePointCloudValid.svg.js";import l from"../../../../../../assets/annotation/pointCloudTool/copy.svg.js";import p from"../../../../../../assets/annotation/pointCloudTool/nextBox.svg.js";import h from"../../../../../../assets/annotation/pointCloudTool/patse.svg.js";import f from"../../../../../../assets/annotation/pointCloudTool/prevBox.svg.js";import S from"../../../../../../assets/annotation/pointCloudTool/rotate90_black.svg.js";import v from"../../../../../../assets/annotation/pointCloudTool/selectAll.svg.js";import P from"../../../../../../assets/annotation/pointCloudTool/selectMultiple.svg.js";import j from"../../../../../../assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js";import T from"../../../../../../assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js";import x from"../../../../../../assets/annotation/pointCloudTool/lassoSelector.svg.js";import y from"../../../../../../assets/annotation/rectTool/icon_rect.svg.js";import R from"../../../../../../assets/annotation/pointCloudTool/circleSelector.svg.js";import I from"../../../../../../assets/annotation/pointCloudTool/addSvg.svg.js";import B from"../../../../../../assets/annotation/pointCloudTool/clearSvg.svg.js";import _ from"../../../../../../assets/annotation/pointCloudTool/Image2DBoxScale.svg.js";import t from"react";import{ReloadOutlined as $,RotateLeftOutlined as b,RotateRightOutlined as D}from"@ant-design/icons";import{polygon as k,invalidPolygon as A,selectedPolygon as V,changePolygonAttribute as M,deletePolygon as O,insertPolygonPoint as w,deletePolygonPoint as E}from"../polygon/index.js";const r={name:"PointThickness",icon:t.createElement("span",{style:{display:" inline-block",width:14,height:14,borderRadius:"50%",border:"1px solid"}}),shortCut:["+","-"],linkSymbol:""},a={name:"RotateAroundCenterPoint",icon:t.createElement($,null),shortCut:[C],noticeInfo:"DragOperation"},c={name:"PointCloudViewTranslate",icon:s,shortCut:[o],noticeInfo:"Drag"},m={name:"TopViewTranslate",icon:s,shortCut:[o]},g={name:"ChangePointCloudValid",icon:d,shortCut:["V"]},H={name:"CopyBox",icon:l,shortCut:["Ctrl","C"]},K={name:"PasteBox",icon:h,shortCut:["Ctrl","V"]},L={name:"RotateLeft",icon:t.createElement(b,null),shortCut:["Q"]},G={name:"RotateRight",icon:t.createElement(D,null),shortCut:["E"]},N={name:"PreviousBox",icon:f,shortCut:["Shift","Tab"]},z={name:"NextBox",icon:p,shortCut:["Tab"]},F={name:"Rotate90",icon:S,shortCut:["G"],noticeInfo:"SelectedStatus"},J={name:"CopyPrevPage",icon:l,shortCut:["Alt","C"]},Q={name:"ChangeBoxValid",icon:j,shortCut:["F"],noticeInfo:"SelectedStatus"},U={name:"MultiSelect",icon:P,shortCut:["Ctrl",o]},Y={name:"SelectAllBox",icon:v,shortCut:["Ctrl","A"]},q={name:"Delete",icon:T,shortCut:["Del"],noticeInfo:"SelectedStatus"},W={name:"LassoSelector",icon:x,shortCut:["H"],noticeInfo:"SelectorMsg"},X={name:"RectSelector",icon:y,shortCut:["J"],noticeInfo:"SelectorMsg"},Z={name:"CircleSelector",icon:R,shortCut:["K"],noticeInfo:"SelectorMsg"},oo={name:"PointCloudViewTranslate",icon:s,shortCut:["space",o]},to={name:"AddPoint",icon:I,shortCut:["U"]},eo={name:"DeletePoint",icon:B,shortCut:["I"]},no={name:"Image2DBoxScale",icon:_,shortCut:["R"],noticeInfo:"SelectedRect"},so=[{name:"GeneralOperation"},e,n,r,i,a,c,m,g,{name:"RectPattern"},H,K,L,G,N,z,F,J,Q,q,U,Y,u,no],ao=[{name:"GeneralOperation"},e,n,r,i,a,c,m,g,{name:"PolygonPattern"},k,A,V,M,O,w,E],io=[e,n,a,oo,W,X,Z,to,eo];export{so as default,ao as pointCloudShortCutTable_POLYGON,io as pointCloudShortCutTable_SEGMENT};
@@ -1 +1 @@
1
- import{Switch as s}from"antd";import t,{useContext as a}from"react";import{useTranslation as u}from"react-i18next";import{PointCloudContext as l}from"../../../../components/pointCloudView/PointCloudContext.js";import{useStatus as m}from"../../../../components/pointCloudView/hooks/useStatus.js";const d=()=>{const{cuboidBoxIn2DView:o,setCuboidBoxIn2DView:n}=a(l),{t:e}=u(),{isPointCloudSegmentationPattern:i}=m(),r=c=>{n(c)};return i?null:t.createElement(t.Fragment,null,t.createElement("span",{style:{marginRight:10}},e("ImageLabels")),t.createElement(s,{checkedChildren:e("3DRect"),unCheckedChildren:e("2DRect"),checked:o,onChange:r}))};export{d as default};
1
+ import{Switch as u}from"antd";import n,{useContext as m,useEffect as d}from"react";import{useTranslation as f}from"react-i18next";import{PointCloudContext as p}from"../../../../components/pointCloudView/PointCloudContext.js";import{useStatus as C}from"../../../../components/pointCloudView/hooks/useStatus.js";var i;(function(e){e[e.isHidden=0]="isHidden",e[e.is2d=1]="is2d",e[e.is3d=2]="is3d"})(i||(i={}));const g=e=>{const{cuboidBoxIn2DView:o,setCuboidBoxIn2DView:c}=m(p),{t:s}=f(),{isPointCloudSegmentationPattern:r}=C(),a=l=>{c(l)},t=e.onChange;return d(()=>{!t||t(r?0:o?2:1)},[r,o,t]),r?null:n.createElement(n.Fragment,null,n.createElement("span",{style:{marginRight:10}},s("ImageLabels")),n.createElement(u,{checkedChildren:s("3DRect"),unCheckedChildren:s("2DRect"),checked:o,onChange:a}))};export{i as SwitchCuboidBoxIn2DViewStateMode,g as default};
@@ -1 +1 @@
1
- import{prefix as n,ESubmitType as R}from"../../../constant/index.js";import A from"../../../hooks/useSize.js";import{ToSubmitFileData as B,ToNextStep as v,loadImgList as Q}from"../../../store/annotation/actionCreators.js";import{LeftOutlined as U}from"@ant-design/icons";import{i18n as $}from"@labelbee/lb-utils";import{Tooltip as W,Button as q}from"antd/es";import L from"classnames";import{last as G}from"lodash";import e,{useReducer as J,useRef as K}from"react";import{useTranslation as T}from"react-i18next";import{connect as M}from"react-redux";import{LabelBeeContext as V,useDispatch as X}from"../../../store/ctx.js";import{store as Y}from"../../../index.js";import Z from"./ExportData/index.js";import ee from"./headerOption/index.js";import te from"./StepSwitch/index.js";import ne from"../../../components/predictTracking/predictTrackingIcon/index.js";import j from"./SwitchPattern/index.js";const w=({disabled:t,imgList:r})=>{const{t:o}=T(),i=()=>{const{dispatch:a,getState:s}=Y;r[0]?a(v(0)):Q(a,s,0).then(l=>{l&&a(v(0))})};return e.createElement(q,{type:"primary",style:{marginLeft:10},onClick:i,disabled:t},o("NextStep"))},oe=({step:t,stepProgress:r,stepList:o,imgList:i})=>{var a;const{t:s}=T(),l=(a=G(o))==null?void 0:a.step;if(o.length<2||t===l)return null;const c=r<1;return c?e.createElement(W,{title:s("StepNotFinishedNotify")},e.createElement("span",null,e.createElement(w,{disabled:c,imgList:i}))):e.createElement(w,{disabled:c,imgList:i})},ae=({goBack:t,exportData:r,header:o,headerName:i,imgList:a,stepProgress:s,stepInfo:l,stepList:c,step:b,annotationEngine:d,hasLangNode:k,hasHeaderOption:C,hasPredictTrackingIcon:P})=>{var u;const y=X(),[,D]=J(m=>m+1,0),p=K(null),f=A(p),O=e.createElement(Z,{exportData:r}),F=()=>{y(B(R.Quit)),t&&t(a)},E=m=>{$.changeLanguage(m),d==null||d.setLang(m),D()},N=$.language,I=(u=f==null?void 0:f.width)!=null?u:window.innerWidth,h=e.createElement(U,{className:`${n}-header__icon`,onClick:F}),g=i?e.createElement("span",{className:`${n}-header__name`},i):"",x=c.length>1&&e.createElement(e.Fragment,null,e.createElement(te,{stepProgress:s}),e.createElement(oe,{step:b,stepProgress:s,stepList:c,imgList:a})),_=C?e.createElement(ee,{stepInfo:l}):null,z=j,H=e.createElement("div",{className:`${n}-header__lang`},e.createElement("span",{className:`${n}-langCN ${N==="cn"?"active":""}`,onClick:()=>E("cn")},"\u4E2D\u6587")," / ",e.createElement("span",{className:`${n}-langEN ${N==="en"?"active":""}`,onClick:()=>E("en")},"En")),S=e.createElement(e.Fragment,null,P&&e.createElement(ne,null),k&&H);return o?typeof o=="function"?e.createElement("div",{className:L(`${n}-header`),ref:p},e.createElement("div",{className:`${n}-header__title`},o({backNode:h,headerNameNode:g,stepListNode:x,headerOptionNode:_,langNode:S,PointCloudSwitchPattern:z}))):o:e.createElement("div",{className:L(`${n}-header`),ref:p},e.createElement("div",{className:`${n}-header__title`},h,g,x,O,e.createElement("div",{id:"operationNode",className:`${n}-header__operationNode`,style:{left:I/2-174/2}},_),e.createElement("div",{className:`${n}-header__titlePlacement`}),e.createElement(j,null),S))},re=t=>{var r;return{imgList:t.annotation.imgList,annotationEngine:t.annotation.annotationEngine,stepProgress:t.annotation.stepProgress,toolName:(r=t.annotation.stepList[t.annotation.step-1])==null?void 0:r.tool,stepList:t.annotation.stepList,stepInfo:t.annotation.stepList[t.annotation.step-1],step:t.annotation.step}};var ie=M(re,null,null,{context:V})(ae);export{ie as default};
1
+ import{prefix as n,ESubmitType as W}from"../../../constant/index.js";import q from"../../../hooks/useSize.js";import{ToSubmitFileData as G,ToNextStep as T,loadImgList as J}from"../../../store/annotation/actionCreators.js";import{LeftOutlined as K}from"@ant-design/icons";import{i18n as b}from"@labelbee/lb-utils";import{Tooltip as M,Button as V}from"antd/es";import L from"classnames";import{last as X}from"lodash";import e,{useReducer as Y,useRef as Z}from"react";import{useTranslation as w}from"react-i18next";import{connect as ee}from"react-redux";import{LabelBeeContext as te,useDispatch as ne}from"../../../store/ctx.js";import{store as oe}from"../../../index.js";import ae from"./ExportData/index.js";import re from"./headerOption/index.js";import ie from"./StepSwitch/index.js";import se from"../../../components/predictTracking/predictTrackingIcon/index.js";import C from"./SwitchPattern/index.js";import{getStepConfig as ce}from"../../../store/annotation/reducer.js";import{jsonParser as le}from"../../../utils/index.js";const P=({disabled:t,imgList:r})=>{const{t:o}=w(),i=()=>{const{dispatch:a,getState:c}=oe;r[0]?a(T(0)):J(a,c,0).then(l=>{l&&a(T(0))})};return e.createElement(V,{type:"primary",style:{marginLeft:10},onClick:i,disabled:t},o("NextStep"))},me=({step:t,stepProgress:r,stepList:o,imgList:i})=>{var a;const{t:c}=w(),l=(a=X(o))==null?void 0:a.step;if(o.length<2||t===l)return null;const s=r<1;return s?e.createElement(M,{title:c("StepNotFinishedNotify")},e.createElement("span",null,e.createElement(P,{disabled:s,imgList:i}))):e.createElement(P,{disabled:s,imgList:i})},de=({goBack:t,exportData:r,header:o,headerName:i,imgList:a,stepProgress:c,stepInfo:l,stepList:s,step:p,annotationEngine:u,hasLangNode:k,hasHeaderOption:y,hasPredictTrackingIcon:D})=>{var f,g,E;const O=ne(),[,F]=Y(m=>m+1,0),d=Z(null),I=(f=ce(s,p))==null?void 0:f.config,z=(g=le(I))!=null?g:{},{enableSegment:H=!1}=z,N=q(d),R=e.createElement(ae,{exportData:r}),A=()=>{O(G(W.Quit)),t&&t(a)},h=m=>{b.changeLanguage(m),u==null||u.setLang(m),F()},x=b.language,B=(E=N==null?void 0:N.width)!=null?E:window.innerWidth,S=e.createElement(K,{className:`${n}-header__icon`,onClick:A}),_=i?e.createElement("span",{className:`${n}-header__name`},i):"",v=s.length>1&&e.createElement(e.Fragment,null,e.createElement(ie,{stepProgress:c}),e.createElement(me,{step:p,stepProgress:c,stepList:s,imgList:a})),$=y?e.createElement(re,{stepInfo:l}):null,Q=C,U=e.createElement("div",{className:`${n}-header__lang`},e.createElement("span",{className:`${n}-langCN ${x==="cn"?"active":""}`,onClick:()=>h("cn")},"\u4E2D\u6587")," / ",e.createElement("span",{className:`${n}-langEN ${x==="en"?"active":""}`,onClick:()=>h("en")},"En")),j=e.createElement(e.Fragment,null,D&&e.createElement(se,null),k&&U);return o?typeof o=="function"?e.createElement("div",{className:L(`${n}-header`),ref:d},e.createElement("div",{className:`${n}-header__title`},o({backNode:S,headerNameNode:_,stepListNode:v,headerOptionNode:$,langNode:j,PointCloudSwitchPattern:Q}))):o:e.createElement("div",{className:L(`${n}-header`),ref:d},e.createElement("div",{className:`${n}-header__title`},S,_,v,R,e.createElement("div",{id:"operationNode",className:`${n}-header__operationNode`,style:{left:B/2-174/2}},$),e.createElement("div",{className:`${n}-header__titlePlacement`}),H&&e.createElement(C,null),j))},pe=t=>{var r;return{imgList:t.annotation.imgList,annotationEngine:t.annotation.annotationEngine,stepProgress:t.annotation.stepProgress,toolName:(r=t.annotation.stepList[t.annotation.step-1])==null?void 0:r.tool,stepList:t.annotation.stepList,stepInfo:t.annotation.stepList[t.annotation.step-1],step:t.annotation.step}};var ue=ee(pe,null,null,{context:te})(de);export{ue as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@labelbee/lb-components",
3
- "version": "1.23.0-alpha.9",
3
+ "version": "1.23.0-alpha.90",
4
4
  "description": "Provide a complete library of annotation components",
5
5
  "main": "./dist/index.js",
6
6
  "es": "./es/index.js",
@@ -43,8 +43,8 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@ant-design/icons": "^4.6.2",
46
- "@labelbee/lb-annotation": "1.27.0-alpha.4",
47
- "@labelbee/lb-utils": "1.19.0-alpha.1",
46
+ "@labelbee/lb-annotation": "1.27.0-alpha.47",
47
+ "@labelbee/lb-utils": "1.19.0-alpha.20",
48
48
  "@labelbee/wavesurfer": "1.0.0",
49
49
  "@types/react-dom": "^18.2.7",
50
50
  "@types/react-transition-group": "^4.4.9",
@@ -57,6 +57,7 @@
57
57
  "postcss-url": "^10.1.3",
58
58
  "re-resizable": "^6.9.9",
59
59
  "react-colorful": "^5.6.1",
60
+ "react-draggable": "^4.4.6",
60
61
  "react-i18next": "^11.12.0",
61
62
  "react-markdown": "^8.0.7",
62
63
  "react-redux": "^7.2.3",
@@ -111,6 +112,7 @@
111
112
  "rollup": "^2.43.1",
112
113
  "rollup-plugin-esbuild": "^3.0.2",
113
114
  "rollup-plugin-postcss": "^4.0.2",
115
+ "rollup-plugin-terser": "^7.0.2",
114
116
  "rollup-plugin-web-worker-loader": "^1.6.1",
115
117
  "sass": "^1.53.0",
116
118
  "typescript": "^4.2.3"
@@ -1 +0,0 @@
1
- "use strict";require("react");var img="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M14.0606 2.74219V5.16642H11.6364' stroke='%23666666' stroke-width='0.8' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M14.6667 8.50016C14.6667 12.1821 11.6819 15.1668 8.00002 15.1668C4.31812 15.1668 1.33335 12.1821 1.33335 8.50016C1.33335 4.81826 4.31812 1.8335 8.00002 1.8335C10.4674 1.8335 12.6217 3.17387 13.7744 5.1662' stroke='%23666666' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M4.219 11V6.016H3.281L2.518 6.611V7.661L3.281 7.115V11H4.219ZM7.6968 9.572C7.6968 9.299 7.6758 9.012 7.5638 8.781C7.4938 8.641 7.3958 8.529 7.2628 8.424C7.3818 8.326 7.4658 8.221 7.5288 8.095C7.6408 7.857 7.6618 7.612 7.6618 7.353C7.6618 6.926 7.5918 6.562 7.3048 6.275C7.0878 6.058 6.7798 5.96 6.4438 5.96C6.1078 5.96 5.8138 6.058 5.5968 6.275C5.3098 6.562 5.2398 6.926 5.2398 7.353C5.2398 7.612 5.2608 7.857 5.3728 8.095C5.4358 8.221 5.5198 8.326 5.6388 8.424C5.5058 8.529 5.4078 8.641 5.3378 8.781C5.2258 9.012 5.2048 9.299 5.2048 9.572C5.2048 10.041 5.2328 10.412 5.5618 10.734C5.7858 10.951 6.1148 11.056 6.4508 11.056C6.7868 11.056 7.1158 10.951 7.3398 10.734C7.6688 10.412 7.6968 10.041 7.6968 9.572ZM6.7588 9.523C6.7588 9.656 6.7728 9.978 6.6748 10.111C6.6258 10.174 6.5418 10.216 6.4508 10.216C6.3598 10.216 6.2758 10.181 6.2268 10.111C6.1288 9.971 6.1428 9.656 6.1428 9.523C6.1428 9.39 6.1218 9.061 6.2268 8.921C6.2758 8.851 6.3598 8.816 6.4508 8.816C6.5418 8.816 6.6188 8.851 6.6748 8.921C6.7798 9.061 6.7588 9.39 6.7588 9.523ZM6.7238 7.402C6.7238 7.528 6.7518 7.843 6.6258 7.969C6.5838 8.011 6.5208 8.032 6.4508 8.032C6.3808 8.032 6.3248 8.011 6.2758 7.969C6.1428 7.85 6.1778 7.528 6.1778 7.402C6.1778 7.283 6.1568 7.003 6.2548 6.884C6.3038 6.828 6.3738 6.8 6.4508 6.8C6.5278 6.8 6.5978 6.828 6.6468 6.884C6.7448 7.003 6.7238 7.283 6.7238 7.402ZM10.6496 9.838V7.178C10.6496 6.744 10.5306 6.492 10.3066 6.282C10.0826 6.065 9.75359 5.96 9.41759 5.96C9.08159 5.96 8.75259 6.065 8.52859 6.282C8.30459 6.492 8.18559 6.744 8.18559 7.178V9.838C8.18559 10.272 8.30459 10.524 8.52859 10.734C8.75259 10.951 9.08159 11.056 9.41759 11.056C9.75359 11.056 10.0826 10.951 10.3066 10.734C10.5306 10.524 10.6496 10.272 10.6496 9.838ZM9.71159 9.873C9.71159 10.104 9.58559 10.216 9.41759 10.216C9.24959 10.216 9.12359 10.104 9.12359 9.873V7.143C9.12359 6.912 9.24959 6.8 9.41759 6.8C9.58559 6.8 9.71159 6.912 9.71159 7.143V9.873ZM13.6304 7.129C13.6304 6.443 13.0774 5.89 12.3914 5.89C11.7054 5.89 11.1524 6.443 11.1524 7.129C11.1524 7.815 11.7054 8.368 12.3914 8.368C13.0774 8.368 13.6304 7.815 13.6304 7.129ZM12.8044 7.129C12.8044 7.36 12.6224 7.542 12.3914 7.542C12.1604 7.542 11.9784 7.36 11.9784 7.129C11.9784 6.898 12.1604 6.716 12.3914 6.716C12.6224 6.716 12.8044 6.898 12.8044 7.129Z' fill='%23666666'/%3e%3c/svg%3e";module.exports=img;
@@ -1,5 +0,0 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M21.0908 3.36377V7.00012H17.4544" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
3
- <path d="M22 12C22 17.5229 17.5229 22 12 22C6.47715 22 2 17.5229 2 12C2 6.47715 6.47715 2 12 2C15.701 2 18.9324 4.01056 20.6616 6.99905" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
4
- <path d="M8.536 15V9.304H7.464L6.592 9.984V11.184L7.464 10.56V15H8.536ZM12.5106 13.368C12.5106 13.056 12.4866 12.728 12.3586 12.464C12.2786 12.304 12.1666 12.176 12.0146 12.056C12.1506 11.944 12.2466 11.824 12.3186 11.68C12.4466 11.408 12.4706 11.128 12.4706 10.832C12.4706 10.344 12.3906 9.928 12.0626 9.6C11.8146 9.352 11.4626 9.24 11.0786 9.24C10.6946 9.24 10.3586 9.352 10.1106 9.6C9.78263 9.928 9.70263 10.344 9.70263 10.832C9.70263 11.128 9.72663 11.408 9.85463 11.68C9.92663 11.824 10.0226 11.944 10.1586 12.056C10.0066 12.176 9.89463 12.304 9.81463 12.464C9.68663 12.728 9.66263 13.056 9.66263 13.368C9.66263 13.904 9.69463 14.328 10.0706 14.696C10.3266 14.944 10.7026 15.064 11.0866 15.064C11.4706 15.064 11.8466 14.944 12.1026 14.696C12.4786 14.328 12.5106 13.904 12.5106 13.368ZM11.4386 13.312C11.4386 13.464 11.4546 13.832 11.3426 13.984C11.2866 14.056 11.1906 14.104 11.0866 14.104C10.9826 14.104 10.8866 14.064 10.8306 13.984C10.7186 13.824 10.7346 13.464 10.7346 13.312C10.7346 13.16 10.7106 12.784 10.8306 12.624C10.8866 12.544 10.9826 12.504 11.0866 12.504C11.1906 12.504 11.2786 12.544 11.3426 12.624C11.4626 12.784 11.4386 13.16 11.4386 13.312ZM11.3986 10.888C11.3986 11.032 11.4306 11.392 11.2866 11.536C11.2386 11.584 11.1666 11.608 11.0866 11.608C11.0066 11.608 10.9426 11.584 10.8866 11.536C10.7346 11.4 10.7746 11.032 10.7746 10.888C10.7746 10.752 10.7506 10.432 10.8626 10.296C10.9186 10.232 10.9986 10.2 11.0866 10.2C11.1746 10.2 11.2546 10.232 11.3106 10.296C11.4226 10.432 11.3986 10.752 11.3986 10.888ZM15.8853 13.672V10.632C15.8853 10.136 15.7493 9.848 15.4933 9.608C15.2373 9.36 14.8613 9.24 14.4773 9.24C14.0933 9.24 13.7173 9.36 13.4613 9.608C13.2053 9.848 13.0693 10.136 13.0693 10.632V13.672C13.0693 14.168 13.2053 14.456 13.4613 14.696C13.7173 14.944 14.0933 15.064 14.4773 15.064C14.8613 15.064 15.2373 14.944 15.4933 14.696C15.7493 14.456 15.8853 14.168 15.8853 13.672ZM14.8133 13.712C14.8133 13.976 14.6693 14.104 14.4773 14.104C14.2853 14.104 14.1413 13.976 14.1413 13.712V10.592C14.1413 10.328 14.2853 10.2 14.4773 10.2C14.6693 10.2 14.8133 10.328 14.8133 10.592V13.712ZM19.2919 10.576C19.2919 9.792 18.6599 9.16 17.8759 9.16C17.0919 9.16 16.4599 9.792 16.4599 10.576C16.4599 11.36 17.0919 11.992 17.8759 11.992C18.6599 11.992 19.2919 11.36 19.2919 10.576ZM18.3479 10.576C18.3479 10.84 18.1399 11.048 17.8759 11.048C17.6119 11.048 17.4039 10.84 17.4039 10.576C17.4039 10.312 17.6119 10.104 17.8759 10.104C18.1399 10.104 18.3479 10.312 18.3479 10.576Z" fill="white"/>
5
- </svg>
@@ -1 +0,0 @@
1
- import"react";var C="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M14.0606 2.74219V5.16642H11.6364' stroke='%23666666' stroke-width='0.8' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M14.6667 8.50016C14.6667 12.1821 11.6819 15.1668 8.00002 15.1668C4.31812 15.1668 1.33335 12.1821 1.33335 8.50016C1.33335 4.81826 4.31812 1.8335 8.00002 1.8335C10.4674 1.8335 12.6217 3.17387 13.7744 5.1662' stroke='%23666666' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M4.219 11V6.016H3.281L2.518 6.611V7.661L3.281 7.115V11H4.219ZM7.6968 9.572C7.6968 9.299 7.6758 9.012 7.5638 8.781C7.4938 8.641 7.3958 8.529 7.2628 8.424C7.3818 8.326 7.4658 8.221 7.5288 8.095C7.6408 7.857 7.6618 7.612 7.6618 7.353C7.6618 6.926 7.5918 6.562 7.3048 6.275C7.0878 6.058 6.7798 5.96 6.4438 5.96C6.1078 5.96 5.8138 6.058 5.5968 6.275C5.3098 6.562 5.2398 6.926 5.2398 7.353C5.2398 7.612 5.2608 7.857 5.3728 8.095C5.4358 8.221 5.5198 8.326 5.6388 8.424C5.5058 8.529 5.4078 8.641 5.3378 8.781C5.2258 9.012 5.2048 9.299 5.2048 9.572C5.2048 10.041 5.2328 10.412 5.5618 10.734C5.7858 10.951 6.1148 11.056 6.4508 11.056C6.7868 11.056 7.1158 10.951 7.3398 10.734C7.6688 10.412 7.6968 10.041 7.6968 9.572ZM6.7588 9.523C6.7588 9.656 6.7728 9.978 6.6748 10.111C6.6258 10.174 6.5418 10.216 6.4508 10.216C6.3598 10.216 6.2758 10.181 6.2268 10.111C6.1288 9.971 6.1428 9.656 6.1428 9.523C6.1428 9.39 6.1218 9.061 6.2268 8.921C6.2758 8.851 6.3598 8.816 6.4508 8.816C6.5418 8.816 6.6188 8.851 6.6748 8.921C6.7798 9.061 6.7588 9.39 6.7588 9.523ZM6.7238 7.402C6.7238 7.528 6.7518 7.843 6.6258 7.969C6.5838 8.011 6.5208 8.032 6.4508 8.032C6.3808 8.032 6.3248 8.011 6.2758 7.969C6.1428 7.85 6.1778 7.528 6.1778 7.402C6.1778 7.283 6.1568 7.003 6.2548 6.884C6.3038 6.828 6.3738 6.8 6.4508 6.8C6.5278 6.8 6.5978 6.828 6.6468 6.884C6.7448 7.003 6.7238 7.283 6.7238 7.402ZM10.6496 9.838V7.178C10.6496 6.744 10.5306 6.492 10.3066 6.282C10.0826 6.065 9.75359 5.96 9.41759 5.96C9.08159 5.96 8.75259 6.065 8.52859 6.282C8.30459 6.492 8.18559 6.744 8.18559 7.178V9.838C8.18559 10.272 8.30459 10.524 8.52859 10.734C8.75259 10.951 9.08159 11.056 9.41759 11.056C9.75359 11.056 10.0826 10.951 10.3066 10.734C10.5306 10.524 10.6496 10.272 10.6496 9.838ZM9.71159 9.873C9.71159 10.104 9.58559 10.216 9.41759 10.216C9.24959 10.216 9.12359 10.104 9.12359 9.873V7.143C9.12359 6.912 9.24959 6.8 9.41759 6.8C9.58559 6.8 9.71159 6.912 9.71159 7.143V9.873ZM13.6304 7.129C13.6304 6.443 13.0774 5.89 12.3914 5.89C11.7054 5.89 11.1524 6.443 11.1524 7.129C11.1524 7.815 11.7054 8.368 12.3914 8.368C13.0774 8.368 13.6304 7.815 13.6304 7.129ZM12.8044 7.129C12.8044 7.36 12.6224 7.542 12.3914 7.542C12.1604 7.542 11.9784 7.36 11.9784 7.129C11.9784 6.898 12.1604 6.716 12.3914 6.716C12.6224 6.716 12.8044 6.898 12.8044 7.129Z' fill='%23666666'/%3e%3c/svg%3e";export{C as default};