@labelbee/lb-components 1.23.0-alpha.14 → 1.23.0-alpha.141
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.js +1 -1
- package/dist/_virtual/2DViewWorker.js +1 -0
- package/dist/_virtual/highlightSegmentWorker.js +1 -1
- package/dist/assets/annotation/icon_link.svg.js +1 -0
- package/dist/assets/annotation/icon_unlink.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/Image2DBoxScale.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/leftArrow.svg.js +1 -1
- package/dist/assets/annotation/pointCloudTool/rightArrow.svg.js +1 -1
- package/dist/assets/annotation/pointCloudTool/rotate90_black.svg.js +1 -0
- package/dist/assets/icons/ad33251.svg +26 -0
- package/dist/components/AnnotationView/hooks/useFilterAnnotations.js +1 -0
- package/dist/components/AnnotationView/index.js +1 -1
- package/dist/components/DynamicResizer/DynamicResizer.js +1 -0
- package/dist/components/DynamicResizer/assets/bottomToZero.svg.js +1 -0
- package/dist/components/DynamicResizer/assets/divider.svg.js +1 -0
- package/dist/components/DynamicResizer/assets/topToZero.svg.js +1 -0
- package/dist/components/DynamicResizer/hooks/useDrag.js +1 -0
- package/dist/components/DynamicResizer/hooks/useUpdateHeight.js +1 -0
- package/dist/components/DynamicResizer/index.js +1 -0
- package/dist/components/LLMMultiWheelView/dialogView/index.js +1 -0
- package/dist/components/LLMMultiWheelView/index.js +1 -0
- package/dist/components/LLMMultiWheelView/sidebar/index.js +1 -0
- package/dist/components/LLMToolView/index.js +1 -1
- package/dist/components/LLMToolView/questionView/components/header/index.js +1 -1
- package/dist/components/LLMToolView/questionView/components/imgView/index.js +1 -1
- package/dist/components/LLMToolView/questionView/index.js +1 -1
- package/dist/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
- package/dist/components/LLMToolView/sidebar/components/modelAnswerSort/index.js +1 -0
- package/dist/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
- package/dist/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
- package/dist/components/LLMToolView/sidebar/index.js +1 -1
- package/dist/components/attributeList/index.js +1 -1
- package/dist/components/audioAnnotate/audioContext/index.js +1 -1
- package/dist/components/audioAnnotate/audioSide/clipSidebar/index.js +2 -1
- package/dist/components/audioAnnotate/index.js +1 -1
- package/dist/components/audioAnnotate/textInput/index.js +1 -1
- package/dist/components/audioAnnotate/textInput/index.module.scss.js +1 -1
- package/dist/components/audioAnnotate/utils/dataTransform.js +1 -0
- package/dist/components/audioPlayer/clipRegion/index.js +1 -1
- package/dist/components/audioPlayer/index.js +1 -1
- package/dist/components/audioPlayer/useAudioCombine/index.js +3 -2
- package/dist/components/audioPlayer/useAudioScroll/index.js +1 -1
- package/dist/components/audioPlayer/useAudioSegment/index.js +1 -1
- package/dist/components/audioPlayer/zoomSlider/index.js +1 -1
- package/dist/components/longText/index.js +1 -1
- package/dist/components/markdownView/index.js +1 -1
- package/dist/components/pointCloud2DRectOperationView/index.js +1 -1
- package/dist/components/pointCloud2DRectOperationView/useUpdateRectList.js +1 -0
- package/dist/components/pointCloud2DRectOperationView/util.js +1 -0
- package/dist/components/pointCloudView/PointCloud2DSingleView.js +1 -1
- package/dist/components/pointCloudView/PointCloud2DView.js +1 -1
- package/dist/components/pointCloudView/PointCloud3DView.js +1 -1
- package/dist/components/pointCloudView/PointCloudBackView.js +1 -1
- package/dist/components/pointCloudView/PointCloudContext.js +1 -1
- package/dist/components/pointCloudView/PointCloudInfos.js +1 -1
- package/dist/components/pointCloudView/PointCloudLayout.js +1 -1
- package/dist/components/pointCloudView/PointCloudListener.js +1 -1
- package/dist/components/pointCloudView/PointCloudSegment2DView.js +1 -1
- package/dist/components/pointCloudView/PointCloudSegmentListener.js +1 -1
- package/dist/components/pointCloudView/PointCloudSideView.js +1 -1
- package/dist/components/pointCloudView/PointCloudTopView.js +1 -1
- package/dist/components/pointCloudView/components/HighlightVisible/index.js +1 -1
- package/dist/components/pointCloudView/hooks/useBoxes.js +1 -1
- package/dist/components/pointCloudView/hooks/useDataLinkSwitch.js +1 -0
- package/dist/components/pointCloudView/hooks/useHighlight.js +1 -1
- package/dist/components/pointCloudView/hooks/useHistory.js +1 -1
- package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
- package/dist/components/pointCloudView/hooks/usePolygon.js +1 -1
- package/dist/components/pointCloudView/hooks/useRotate.js +1 -1
- package/dist/components/pointCloudView/hooks/useRotateEdge.js +1 -0
- package/dist/components/pointCloudView/hooks/useSingleBox.js +1 -1
- package/dist/components/pointCloudView/hooks/useStatus.js +1 -1
- package/dist/components/pointCloudView/hooks/useTimeoutFunc.js +1 -0
- package/dist/components/pointCloudView/hooks/useUpdatePointCloudColor.js +1 -0
- package/dist/components/pointCloudView/hooks/useWindowKeydownListener.js +1 -0
- package/dist/components/pointCloudView/index.js +1 -1
- package/dist/components/pointCloudView/utils/event-polyfill.js +1 -0
- package/dist/components/pointCloudView/utils/map.js +1 -0
- package/dist/components/predictTracking/predictTrackingIcon/index.js +1 -1
- package/dist/components/predictTracking/previewResult/index.js +1 -1
- package/dist/components/subAttributeList/index.js +1 -0
- package/dist/components/videoAnnotate/videoClipTool/index.js +1 -1
- package/dist/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -1
- package/dist/data/enums/ToolType.js +1 -1
- package/dist/hooks/useToolStyle.js +1 -0
- package/dist/index.css +205 -16
- package/dist/index.js +1 -1
- package/dist/store/Actions.js +1 -1
- package/dist/store/LLMMultiWheel/index.js +1 -0
- package/dist/store/annotatedBox/index.js +1 -1
- package/dist/store/annotation/actionCreators.js +1 -1
- package/dist/store/annotation/reducer.js +1 -1
- package/dist/store/ctx.js +1 -1
- package/dist/store/toolConfig/baseToolConfig.js +1 -0
- package/dist/store/toolConfig/index.js +1 -0
- package/dist/store/toolConfig/pointCloudToolConfig.js +1 -0
- package/dist/types/App.d.ts +6 -1
- package/dist/types/components/AnnotationView/hooks/useFilterAnnotations.d.ts +2 -0
- package/dist/types/components/AnnotationView/index.d.ts +10 -0
- package/dist/types/components/DynamicResizer/DynamicResizer.d.ts +5 -0
- package/dist/types/components/DynamicResizer/hooks/useDrag.d.ts +12 -0
- package/dist/types/components/DynamicResizer/hooks/useUpdateHeight.d.ts +23 -0
- package/dist/types/components/DynamicResizer/index.d.ts +2 -0
- package/dist/types/components/DynamicResizer/types/interface.d.ts +17 -0
- package/dist/types/components/LLMMultiWheelView/dialogView/index.d.ts +15 -0
- package/dist/types/components/LLMMultiWheelView/index.d.ts +21 -0
- package/dist/types/components/LLMMultiWheelView/sidebar/index.d.ts +8 -0
- package/dist/types/components/LLMMultiWheelView/types.d.ts +62 -0
- package/dist/types/components/LLMToolView/questionView/components/header/index.d.ts +15 -0
- package/dist/types/components/LLMToolView/questionView/index.d.ts +7 -0
- package/dist/types/components/LLMToolView/sidebar/components/answerSort/index.d.ts +3 -0
- package/dist/types/components/LLMToolView/sidebar/components/modelAnswerSort/index.d.ts +30 -0
- package/dist/types/components/LLMToolView/sidebar/components/textInputBox/index.d.ts +2 -2
- package/dist/types/components/LLMToolView/sidebar/index.d.ts +10 -0
- package/dist/types/components/LLMToolView/types.d.ts +6 -2
- package/dist/types/components/LLMToolView/utils/data.d.ts +1 -0
- package/dist/types/components/audioAnnotate/audioContext/index.d.ts +10 -2
- package/dist/types/components/audioAnnotate/textInput/index.d.ts +1 -0
- package/dist/types/components/audioAnnotate/utils/dataTransform.d.ts +9 -0
- package/dist/types/components/audioPlayer/clipRegion/index.d.ts +1 -0
- package/dist/types/components/audioPlayer/index.d.ts +28 -21
- package/dist/types/components/audioPlayer/zoomSlider/index.d.ts +1 -0
- package/dist/types/components/longText/index.d.ts +1 -0
- package/dist/types/components/pointCloud2DRectOperationView/index.d.ts +1 -0
- package/dist/types/components/pointCloud2DRectOperationView/useUpdateRectList.d.ts +2 -0
- package/dist/types/components/pointCloud2DRectOperationView/util.d.ts +8 -0
- package/dist/types/components/pointCloudView/2DViewWorker.d.ts +1 -0
- package/dist/types/components/pointCloudView/PointCloud2DView.d.ts +1 -0
- package/dist/types/components/pointCloudView/PointCloudContext.d.ts +23 -4
- package/dist/types/components/pointCloudView/PointCloudLayout.d.ts +1 -0
- package/dist/types/components/pointCloudView/PointCloudListener.d.ts +1 -0
- package/dist/types/components/pointCloudView/components/HighlightVisible/index.d.ts +2 -1
- package/dist/types/components/pointCloudView/hooks/useBoxes.d.ts +5 -3
- package/dist/types/components/pointCloudView/hooks/useDataLinkSwitch.d.ts +19 -0
- package/dist/types/components/pointCloudView/hooks/useHighlight.d.ts +1 -1
- package/dist/types/components/pointCloudView/hooks/usePointCloudViews.d.ts +31 -1
- package/dist/types/components/pointCloudView/hooks/useRotateEdge.d.ts +9 -0
- package/dist/types/components/pointCloudView/hooks/useSingleBox.d.ts +3 -2
- package/dist/types/components/pointCloudView/hooks/useTimeoutFunc.d.ts +6 -0
- package/dist/types/components/pointCloudView/hooks/useUpdatePointCloudColor.d.ts +4 -0
- package/dist/types/components/pointCloudView/hooks/useWindowKeydownListener.d.ts +16 -0
- package/dist/types/components/pointCloudView/index.d.ts +1 -0
- package/dist/types/components/pointCloudView/utils/event-polyfill.d.ts +8 -0
- package/dist/types/components/pointCloudView/utils/map.d.ts +11 -0
- package/dist/types/components/subAttributeList/index.d.ts +10 -0
- package/dist/types/components/videoAnnotate/index.d.ts +2 -1
- package/dist/types/components/videoAnnotate/videoClipTool/index.d.ts +2 -1
- package/dist/types/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.d.ts +1 -1
- package/dist/types/data/enums/ToolType.d.ts +2 -1
- package/dist/types/hooks/useToolStyle.d.ts +30 -0
- package/dist/types/index.d.ts +9 -2
- package/dist/types/store/Actions.d.ts +1 -0
- package/dist/types/store/LLMMultiWheel/index.d.ts +15 -0
- package/dist/types/store/annotatedBox/index.d.ts +2 -0
- package/dist/types/store/annotation/actionCreators.d.ts +4 -3
- package/dist/types/store/annotation/reducer.d.ts +1 -0
- package/dist/types/store/annotation/types.d.ts +9 -2
- package/dist/types/store/ctx.d.ts +7 -0
- package/dist/types/store/toolConfig/baseToolConfig.d.ts +4 -0
- package/dist/types/store/toolConfig/index.d.ts +3 -0
- package/dist/types/store/toolConfig/pointCloudToolConfig.d.ts +4 -0
- package/dist/types/store/toolConfig/types.d.ts +10 -0
- package/dist/types/utils/AnnotationDataUtils.d.ts +58 -1
- package/dist/types/utils/ToolPointCloudBoxRenderHelper.d.ts +24 -0
- package/dist/types/utils/data.d.ts +0 -2
- package/dist/types/utils/index.d.ts +27 -0
- package/dist/types/views/MainView/LLMMultiWheelLayout/index.d.ts +9 -0
- package/dist/types/views/MainView/sidebar/GeneralOperation/ActionsConfirm.d.ts +1 -0
- package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.d.ts +3 -0
- package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.d.ts +3 -0
- package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.d.ts +3 -0
- package/dist/types/views/MainView/sidebar/TextToolSidebar/index.d.ts +1 -1
- package/dist/types/views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.d.ts +9 -0
- package/dist/types/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.d.ts +3 -0
- package/dist/types/views/MainView/toolFooter/BatchSwitchConnectIn2DView/index.d.ts +1 -0
- package/dist/types/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.d.ts +10 -2
- package/dist/types/views/MainView/toolFooter/index.d.ts +1 -1
- package/dist/types/views/MainView/toolHeader/StepSwitch/index.d.ts +1 -1
- package/dist/types/views/MainView/toolHeader/index.d.ts +1 -1
- package/dist/utils/AnnotationDataUtils.js +1 -1
- package/dist/utils/ToolPointCloudBoxRenderHelper.js +1 -0
- package/dist/utils/data.js +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/views/MainView/LLMMultiWheelLayout/index.js +1 -0
- package/dist/views/MainView/index.js +1 -1
- package/dist/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.js +1 -0
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.module.scss.js +1 -0
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.js +1 -0
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.module.scss.js +1 -0
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.js +1 -0
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.module.scss.js +1 -0
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
- package/dist/views/MainView/sidebar/TagSidebar/index.js +1 -1
- package/dist/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
- package/dist/views/MainView/sidebar/index.js +1 -1
- package/dist/views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.js +1 -0
- package/dist/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -1
- package/dist/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js +1 -1
- package/dist/views/MainView/toolFooter/index.js +1 -1
- package/dist/views/MainView/toolHeader/index.js +1 -1
- package/es/App.js +1 -1
- package/es/_virtual/2DViewWorker.js +1 -0
- package/es/_virtual/highlightSegmentWorker.js +1 -1
- package/es/assets/annotation/icon_link.svg.js +1 -0
- package/es/assets/annotation/icon_unlink.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/Image2DBoxScale.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/leftArrow.svg.js +1 -1
- package/es/assets/annotation/pointCloudTool/rightArrow.svg.js +1 -1
- package/es/assets/annotation/pointCloudTool/rotate90_black.svg.js +1 -0
- package/es/components/AnnotationView/hooks/useFilterAnnotations.js +1 -0
- package/es/components/AnnotationView/index.js +1 -1
- package/es/components/DynamicResizer/DynamicResizer.js +1 -0
- package/es/components/DynamicResizer/assets/bottomToZero.svg.js +1 -0
- package/es/components/DynamicResizer/assets/divider.svg.js +1 -0
- package/es/components/DynamicResizer/assets/topToZero.svg.js +1 -0
- package/es/components/DynamicResizer/hooks/useDrag.js +1 -0
- package/es/components/DynamicResizer/hooks/useUpdateHeight.js +1 -0
- package/es/components/DynamicResizer/index.js +1 -0
- package/es/components/LLMMultiWheelView/dialogView/index.js +1 -0
- package/es/components/LLMMultiWheelView/index.js +1 -0
- package/es/components/LLMMultiWheelView/sidebar/index.js +1 -0
- package/es/components/LLMToolView/index.js +1 -1
- package/es/components/LLMToolView/questionView/components/header/index.js +1 -1
- package/es/components/LLMToolView/questionView/components/imgView/index.js +1 -1
- package/es/components/LLMToolView/questionView/index.js +1 -1
- package/es/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
- package/es/components/LLMToolView/sidebar/components/modelAnswerSort/index.js +1 -0
- package/es/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
- package/es/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
- package/es/components/LLMToolView/sidebar/index.js +1 -1
- package/es/components/attributeList/index.js +1 -1
- package/es/components/audioAnnotate/audioContext/index.js +1 -1
- package/es/components/audioAnnotate/audioSide/clipSidebar/index.js +2 -1
- package/es/components/audioAnnotate/index.js +1 -1
- package/es/components/audioAnnotate/textInput/index.js +1 -1
- package/es/components/audioAnnotate/textInput/index.module.scss.js +1 -1
- package/es/components/audioAnnotate/utils/dataTransform.js +1 -0
- package/es/components/audioPlayer/clipRegion/index.js +1 -1
- package/es/components/audioPlayer/index.js +1 -1
- package/es/components/audioPlayer/useAudioCombine/index.js +3 -2
- package/es/components/audioPlayer/useAudioScroll/index.js +1 -1
- package/es/components/audioPlayer/useAudioSegment/index.js +1 -1
- package/es/components/audioPlayer/zoomSlider/index.js +1 -1
- package/es/components/longText/index.js +1 -1
- package/es/components/markdownView/index.js +1 -1
- package/es/components/pointCloud2DRectOperationView/index.js +1 -1
- package/es/components/pointCloud2DRectOperationView/useUpdateRectList.js +1 -0
- package/es/components/pointCloud2DRectOperationView/util.js +1 -0
- package/es/components/pointCloudView/PointCloud2DSingleView.js +1 -1
- package/es/components/pointCloudView/PointCloud2DView.js +1 -1
- package/es/components/pointCloudView/PointCloud3DView.js +1 -1
- package/es/components/pointCloudView/PointCloudBackView.js +1 -1
- package/es/components/pointCloudView/PointCloudContext.js +1 -1
- package/es/components/pointCloudView/PointCloudInfos.js +1 -1
- package/es/components/pointCloudView/PointCloudLayout.js +1 -1
- package/es/components/pointCloudView/PointCloudListener.js +1 -1
- package/es/components/pointCloudView/PointCloudSegment2DView.js +1 -1
- package/es/components/pointCloudView/PointCloudSegmentListener.js +1 -1
- package/es/components/pointCloudView/PointCloudSideView.js +1 -1
- package/es/components/pointCloudView/PointCloudTopView.js +1 -1
- package/es/components/pointCloudView/components/HighlightVisible/index.js +1 -1
- package/es/components/pointCloudView/hooks/useBoxes.js +1 -1
- package/es/components/pointCloudView/hooks/useDataLinkSwitch.js +1 -0
- package/es/components/pointCloudView/hooks/useHighlight.js +1 -1
- package/es/components/pointCloudView/hooks/useHistory.js +1 -1
- package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
- package/es/components/pointCloudView/hooks/usePolygon.js +1 -1
- package/es/components/pointCloudView/hooks/useRotate.js +1 -1
- package/es/components/pointCloudView/hooks/useRotateEdge.js +1 -0
- package/es/components/pointCloudView/hooks/useSingleBox.js +1 -1
- package/es/components/pointCloudView/hooks/useStatus.js +1 -1
- package/es/components/pointCloudView/hooks/useTimeoutFunc.js +1 -0
- package/es/components/pointCloudView/hooks/useUpdatePointCloudColor.js +1 -0
- package/es/components/pointCloudView/hooks/useWindowKeydownListener.js +1 -0
- package/es/components/pointCloudView/index.js +1 -1
- package/es/components/pointCloudView/utils/event-polyfill.js +1 -0
- package/es/components/pointCloudView/utils/map.js +1 -0
- package/es/components/predictTracking/predictTrackingIcon/index.js +1 -1
- package/es/components/predictTracking/previewResult/index.js +1 -1
- package/es/components/subAttributeList/index.js +1 -0
- package/es/components/videoAnnotate/videoClipTool/index.js +1 -1
- package/es/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -1
- package/es/data/enums/ToolType.js +1 -1
- package/es/hooks/useToolStyle.js +1 -0
- package/es/index.css +205 -16
- package/es/index.js +1 -1
- package/es/store/Actions.js +1 -1
- package/es/store/LLMMultiWheel/index.js +1 -0
- package/es/store/annotatedBox/index.js +1 -1
- package/es/store/annotation/actionCreators.js +1 -1
- package/es/store/annotation/reducer.js +1 -1
- package/es/store/ctx.js +1 -1
- package/es/store/toolConfig/baseToolConfig.js +1 -0
- package/es/store/toolConfig/index.js +1 -0
- package/es/store/toolConfig/pointCloudToolConfig.js +1 -0
- package/es/utils/AnnotationDataUtils.js +1 -1
- package/es/utils/ToolPointCloudBoxRenderHelper.js +1 -0
- package/es/utils/data.js +1 -1
- package/es/utils/index.js +1 -1
- package/es/views/MainView/LLMMultiWheelLayout/index.js +1 -0
- package/es/views/MainView/index.js +1 -1
- package/es/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
- package/es/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.js +1 -0
- package/es/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.module.scss.js +1 -0
- package/es/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.js +1 -0
- package/es/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.module.scss.js +1 -0
- package/es/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.js +1 -0
- package/es/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.module.scss.js +1 -0
- package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
- package/es/views/MainView/sidebar/TagSidebar/index.js +1 -1
- package/es/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
- package/es/views/MainView/sidebar/index.js +1 -1
- package/es/views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.js +1 -0
- package/es/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -1
- package/es/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js +1 -1
- package/es/views/MainView/toolHeader/index.js +1 -1
- package/package.json +7 -4
- package/dist/assets/annotation/pointCloudTool/rotate180_black.svg.js +0 -1
- package/dist/assets/icons/9d70807.svg +0 -5
- package/es/assets/annotation/pointCloudTool/rotate180_black.svg.js +0 -1
|
@@ -54,4 +54,5 @@ export declare const annotationReducer: (state: {
|
|
|
54
54
|
predictionResultVisible: boolean;
|
|
55
55
|
highlightAttribute: string;
|
|
56
56
|
preDataProcess?: ((params: import("../../App").IPreDataProcessParams) => IPointCloudBox[]) | undefined;
|
|
57
|
+
getImgIndexByExternal?: import("@/types/data").GetImgIndexByExternal | undefined;
|
|
57
58
|
} | undefined, action: AnnotationActionTypes) => AnnotationState;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnnotationEngine, RectOperation, TagOperation, TextToolOperation, PointOperation, PolygonOperation, LineToolOperation } from '@labelbee/lb-annotation';
|
|
2
2
|
import { ANNOTATION_ACTIONS } from '@/store/Actions';
|
|
3
3
|
import { IStepInfo } from '@/types/step';
|
|
4
|
-
import { OnSubmit, IFileItem, GetFileData, OnSave, OnPageChange, OnStepChange, LoadFileList } from '@/types/data';
|
|
4
|
+
import { OnSubmit, IFileItem, GetFileData, OnSave, OnPageChange, OnStepChange, LoadFileList, GetImgIndexByExternal } from '@/types/data';
|
|
5
5
|
import { ESubmitType } from '@/constant';
|
|
6
6
|
import { IPointCloudBox } from '@labelbee/lb-utils';
|
|
7
7
|
import { IPreDataProcessParams } from '@/App';
|
|
@@ -47,6 +47,7 @@ export interface AnnotationState {
|
|
|
47
47
|
predictionResultVisible: boolean;
|
|
48
48
|
highlightAttribute: string;
|
|
49
49
|
preDataProcess?: (params: IPreDataProcessParams) => IPointCloudBox[];
|
|
50
|
+
getImgIndexByExternal?: GetImgIndexByExternal;
|
|
50
51
|
}
|
|
51
52
|
interface UpdateToolInstance {
|
|
52
53
|
type: typeof ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE;
|
|
@@ -135,6 +136,12 @@ interface UpdateGetFileList {
|
|
|
135
136
|
getFileData: LoadFileList;
|
|
136
137
|
};
|
|
137
138
|
}
|
|
139
|
+
interface UpdataImgIndexByExternal {
|
|
140
|
+
type: typeof ANNOTATION_ACTIONS.UPDATE_IMG_INDEX_BY_EXTERNAL;
|
|
141
|
+
payload: {
|
|
142
|
+
getImgIndexByExternal: GetImgIndexByExternal;
|
|
143
|
+
};
|
|
144
|
+
}
|
|
138
145
|
interface CopyBackWordResult extends CommonActions {
|
|
139
146
|
type: typeof ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT;
|
|
140
147
|
}
|
|
@@ -158,5 +165,5 @@ interface BatchUpdateResultByTrackID {
|
|
|
158
165
|
range: [number, number];
|
|
159
166
|
};
|
|
160
167
|
}
|
|
161
|
-
export type AnnotationActionTypes = UpdateToolInstance | UpdateImgList | UpdateAnnotationConfig | SubmitFileData | LoadFileData | SetTaskConfig | InitTool | UpdateOnSubmit | UpdateOnPageChange | UpdateOnStepChange | UpdateGetFileData | UpdatePageSize | UpdateGetFileList | CopyBackWordResult | UpdateOnSave | BatchUpdateTrackID | BatchUpdateResultByTrackID | InitAnnotationState;
|
|
168
|
+
export type AnnotationActionTypes = UpdateToolInstance | UpdateImgList | UpdateAnnotationConfig | SubmitFileData | LoadFileData | SetTaskConfig | InitTool | UpdateOnSubmit | UpdateOnPageChange | UpdateOnStepChange | UpdateGetFileData | UpdatePageSize | UpdateGetFileList | CopyBackWordResult | UpdateOnSave | BatchUpdateTrackID | BatchUpdateResultByTrackID | UpdataImgIndexByExternal | InitAnnotationState;
|
|
162
169
|
export {};
|
|
@@ -9,6 +9,12 @@ interface ILLMContext {
|
|
|
9
9
|
setModelAPIResponse: React.Dispatch<React.SetStateAction<IModelAPIAnswer[]>>;
|
|
10
10
|
setNewAnswerList: (value: IAnswerList[]) => void;
|
|
11
11
|
}
|
|
12
|
+
interface ILLMMultiWheelContext {
|
|
13
|
+
hoverKey: number;
|
|
14
|
+
setHoverKey: (value: number) => void;
|
|
15
|
+
selectKey: number;
|
|
16
|
+
setSelectKey: (value: number) => void;
|
|
17
|
+
}
|
|
12
18
|
interface INLPContext {
|
|
13
19
|
highlightKey: string;
|
|
14
20
|
setHighlightKey: (value: string) => void;
|
|
@@ -18,4 +24,5 @@ export declare const useDispatch: () => Dispatch<AnyAction | any>;
|
|
|
18
24
|
export declare const useSelector: <Selected extends unknown>(selector: (state: any) => Selected, equalityFn?: ((previous: Selected, next: Selected) => boolean) | undefined) => Selected;
|
|
19
25
|
export declare const LLMContext: React.Context<ILLMContext>;
|
|
20
26
|
export declare const NLPContext: React.Context<INLPContext>;
|
|
27
|
+
export declare const LLMMultiWheelContext: React.Context<ILLMMultiWheelContext>;
|
|
21
28
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface BaseStore {
|
|
2
|
+
onlyLoadFirstData: boolean;
|
|
3
|
+
setOnlyLoadFirstData: (onlyLoadFirstData: boolean) => void;
|
|
4
|
+
}
|
|
5
|
+
export interface PointCloudToolConfigStore {
|
|
6
|
+
selectBoxVisibleSwitch: boolean;
|
|
7
|
+
setSelectBoxVisibleSwitch: (selectBoxVisibleSwitch: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface ToolConfigStore extends BaseStore, PointCloudToolConfigStore {
|
|
10
|
+
}
|
|
@@ -1,5 +1,61 @@
|
|
|
1
1
|
import { IStepInfo } from '@/types/step';
|
|
2
|
+
import { IMappingImg } from '@/types/data';
|
|
3
|
+
interface ICopyResultChangeParams {
|
|
4
|
+
copyResult: string;
|
|
5
|
+
step: number;
|
|
6
|
+
currentResult: string;
|
|
7
|
+
mappingImgList: IMappingImg[];
|
|
8
|
+
preMappingImgList: IMappingImg[];
|
|
9
|
+
valid: boolean;
|
|
10
|
+
}
|
|
11
|
+
interface IGetNextPath {
|
|
12
|
+
prePath: string;
|
|
13
|
+
preMappingImgList: IMappingImg[];
|
|
14
|
+
nextMappingImgList: IMappingImg[];
|
|
15
|
+
}
|
|
16
|
+
interface ICopyResultItemHandlerParams {
|
|
17
|
+
item: any;
|
|
18
|
+
key?: string | number;
|
|
19
|
+
parent: any;
|
|
20
|
+
mappingImgList: IMappingImg[];
|
|
21
|
+
preMappingImgList: IMappingImg[];
|
|
22
|
+
}
|
|
2
23
|
export default class AnnotationDataUtils {
|
|
24
|
+
/**
|
|
25
|
+
* Performs a depth-first traversal of an object or array, executing a callback function on each element.
|
|
26
|
+
*
|
|
27
|
+
* @param {any} objOrArr - The object or array to be traversed.
|
|
28
|
+
* @param {Function} callback - The callback function to be executed on each element.
|
|
29
|
+
* The callback function takes three parameters: element, key, and parent.
|
|
30
|
+
* @param {string | number} [key] - The key or index of the current element in its parent (optional).
|
|
31
|
+
* @param {any} [parent] - The parent of the current element (optional).
|
|
32
|
+
*/
|
|
33
|
+
static traverseDF(objOrArr: any, callback: (element: any, key?: string | number, parent?: any) => void, key?: string | number, parent?: any): void;
|
|
34
|
+
/**
|
|
35
|
+
* Calculates the next path based on the provided parameters.
|
|
36
|
+
*
|
|
37
|
+
* @param {IGetNextPath} params - The object containing necessary information.
|
|
38
|
+
* @param {string} params.prePath - The current path.
|
|
39
|
+
* @param {IImgList} params.preMappingImgList - The list of current mapping images.
|
|
40
|
+
* @param {IImgList} params.nextMappingImgList - The list of next mapping images.
|
|
41
|
+
* @returns {string} The next path, returns an empty string if not found.
|
|
42
|
+
*/
|
|
43
|
+
static getNextPath(params: IGetNextPath): string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Handles the processing of individual items during the traversal of results or resultRect.
|
|
46
|
+
* This function updates specific properties of the parent object based on the key of the current item.
|
|
47
|
+
*
|
|
48
|
+
* @param {ICopyResultItemHandlerParams} params - Parameters containing the current item, its key, parent object, and image lists.
|
|
49
|
+
* @param {ICopyResultItemHandlerParams.item} item - The current item being processed.
|
|
50
|
+
* @param {ICopyResultItemHandlerParams.key} key - The key associated with the current item.
|
|
51
|
+
* @param {ICopyResultItemHandlerParams.parent} parent - The parent object of the current item.
|
|
52
|
+
* @param {ICopyResultItemHandlerParams.mappingImgList} mappingImgList - The list of images for mapping.
|
|
53
|
+
* @param {ICopyResultItemHandlerParams.preMappingImgList} preMappingImgList - The list of images before mapping.
|
|
54
|
+
*/
|
|
55
|
+
static copyResultItemHandler(params: ICopyResultItemHandlerParams): {
|
|
56
|
+
value: any;
|
|
57
|
+
oldValue: any;
|
|
58
|
+
};
|
|
3
59
|
/**
|
|
4
60
|
* 复制上一张图片结果
|
|
5
61
|
* @param copyResult 复制的结果
|
|
@@ -7,7 +63,7 @@ export default class AnnotationDataUtils {
|
|
|
7
63
|
* @param currentResult 当前的步骤
|
|
8
64
|
* @returns
|
|
9
65
|
*/
|
|
10
|
-
static copyResultChange(
|
|
66
|
+
static copyResultChange(params: ICopyResultChangeParams): string | undefined;
|
|
11
67
|
/**
|
|
12
68
|
* 判断结果sourceID与依赖数据的id是否能对应
|
|
13
69
|
* @param result
|
|
@@ -75,3 +131,4 @@ export default class AnnotationDataUtils {
|
|
|
75
131
|
*/
|
|
76
132
|
static deleteRes(resData: any, dataSourceStep: number, deletedIds: string[], stepKeys: number[]): void;
|
|
77
133
|
}
|
|
134
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ICoordinate, IPointCloudBox } from '@labelbee/lb-utils';
|
|
2
|
+
export declare enum EPointCloudBoxRenderTrigger {
|
|
3
|
+
Default = "Default",
|
|
4
|
+
UndoRedo = "UndoRedo",
|
|
5
|
+
ClearAll = "ClearAll",
|
|
6
|
+
Single = "Single",
|
|
7
|
+
SingleDelete = "SingleDelete",
|
|
8
|
+
SingleToggleValid = "SingleToggleValid",
|
|
9
|
+
SingleRotate = "SingleRotate",
|
|
10
|
+
MultiPaste = "MultiPaste",
|
|
11
|
+
MultiMove = "MultiMove",
|
|
12
|
+
MulitSelect = "MulitSelect"
|
|
13
|
+
}
|
|
14
|
+
export declare enum EPointCloudBoxSingleModifiedType {
|
|
15
|
+
ChangeAttribute = "ChangeAttribute",
|
|
16
|
+
Move = "Move",
|
|
17
|
+
ChangeDepth = "ChangeDepth",
|
|
18
|
+
ChangeSize = "ChangeSize",
|
|
19
|
+
ToggleValid = "ToggleValid"
|
|
20
|
+
}
|
|
21
|
+
export declare const calcResetAreasAndBoxIds: (trigger: EPointCloudBoxRenderTrigger, newList: IPointCloudBox[], oldList: IPointCloudBox[]) => {
|
|
22
|
+
modifiedBoxIds: string[];
|
|
23
|
+
resetAreas: ICoordinate[][];
|
|
24
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { IStepInfo } from '@/types/step';
|
|
2
1
|
/**
|
|
3
2
|
* 解析结果,将图片信息注入到结果
|
|
4
3
|
* @param result
|
|
@@ -14,4 +13,3 @@ export declare const composeResult: (result: string, pos: {
|
|
|
14
13
|
rect: any[];
|
|
15
14
|
basicRectID?: string;
|
|
16
15
|
}, customObject: Object) => string;
|
|
17
|
-
export declare const getAnnotationStepByStepList: (stepList: IStepInfo[], step: number) => number;
|
|
@@ -28,4 +28,31 @@ export declare const getRectPointCloudBox: (params: IGetRectPointCloudBoxParams)
|
|
|
28
28
|
width: number;
|
|
29
29
|
height: number;
|
|
30
30
|
} | undefined;
|
|
31
|
+
export interface GeneratePointCloudBoxRectsOptions {
|
|
32
|
+
prepareRectsFn?: (rects: Array<ReturnType<typeof getRectPointCloudBox>>, pointCloudBox: IPointCloudBox) => Array<ReturnType<typeof getRectPointCloudBox>>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Updates the given point cloud box with rectangles derived from the mapping image list and image sizes.
|
|
36
|
+
*
|
|
37
|
+
* @param {Object} params - The parameters for the function.
|
|
38
|
+
* @param {IPointCloudBox} params.pointCloudBox - The point cloud box object to be updated.
|
|
39
|
+
* @param {IMappingImg[]} params.mappingImgList - The list of mapping images to process.
|
|
40
|
+
* @param {Object.<string, ISize>} params.imageSizes - An object containing image sizes keyed by image paths.
|
|
41
|
+
*
|
|
42
|
+
* @param {Object=} options - The options
|
|
43
|
+
* @param {Function=} options.prepareRectsFn - The prepare func for rects
|
|
44
|
+
*
|
|
45
|
+
* @returns {void}
|
|
46
|
+
*
|
|
47
|
+
* @description This function processes a list of mapping images to generate rectangles for the provided point cloud box.
|
|
48
|
+
* It filters out undefined rectangles and updates the point cloud box with the valid rectangles. Note that this function
|
|
49
|
+
* modifies the `pointCloudBox` parameter by adding a `rects` property.
|
|
50
|
+
*/
|
|
51
|
+
export declare const generatePointCloudBoxRects: (params: {
|
|
52
|
+
pointCloudBox: IPointCloudBox;
|
|
53
|
+
mappingImgList: IMappingImg[];
|
|
54
|
+
imageSizes: {
|
|
55
|
+
[key: string]: ISize;
|
|
56
|
+
};
|
|
57
|
+
}, options?: GeneratePointCloudBoxRectsOptions) => void;
|
|
31
58
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AppProps } from '@/App';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const LLMMultiWheelViewCls: string;
|
|
4
|
+
interface IProps {
|
|
5
|
+
path: string;
|
|
6
|
+
loading: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const LLMMultiWheelLayout: React.FC<AppProps & IProps>;
|
|
9
|
+
export default LLMMultiWheelLayout;
|
|
@@ -20,5 +20,5 @@ interface IProps {
|
|
|
20
20
|
export declare const SingleTextInput: (props: any) => React.JSX.Element;
|
|
21
21
|
declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
|
|
22
22
|
children?: React.ReactNode;
|
|
23
|
-
}, "
|
|
23
|
+
}, "step" | "stepList" | "imgIndex" | "basicResultList" | "toolInstance" | "triggerEventAfterIndexChanged" | "dispatch">>;
|
|
24
24
|
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The component which provides the batch operation for connection/disconnection
|
|
3
|
+
*/
|
|
4
|
+
import { FC } from 'react';
|
|
5
|
+
export declare enum EventBusEvent {
|
|
6
|
+
switchConnect = "batch:switch-connect"
|
|
7
|
+
}
|
|
8
|
+
declare const BatchSwitchConnectIn2DView: FC;
|
|
9
|
+
export default BatchSwitchConnectIn2DView;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, EventBusEvent as BatchSwitchConnectionEventBusEvent } from './BatchSwitchConnectIn2DView';
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export declare enum SwitchCuboidBoxIn2DViewStateMode {
|
|
3
|
+
isHidden = 0,
|
|
4
|
+
is2d = 1,
|
|
5
|
+
is3d = 2
|
|
6
|
+
}
|
|
7
|
+
interface SwitchCuboidBoxIn2DViewProps {
|
|
8
|
+
onChange?: (stateMode: SwitchCuboidBoxIn2DViewStateMode) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const SwitchCuboidBoxIn2DView: FC<SwitchCuboidBoxIn2DViewProps>;
|
|
3
11
|
export default SwitchCuboidBoxIn2DView;
|
|
@@ -20,5 +20,5 @@ export declare const footerCls: string;
|
|
|
20
20
|
export declare const FooterDivider: () => React.JSX.Element;
|
|
21
21
|
declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
|
|
22
22
|
children?: React.ReactNode;
|
|
23
|
-
}, "
|
|
23
|
+
}, "step" | "stepList" | "imgIndex" | "basicResultList" | "basicIndex" | "skipBeforePageTurning" | "totalPage">>;
|
|
24
24
|
export default _default;
|
|
@@ -22,5 +22,5 @@ interface IToolHeaderProps {
|
|
|
22
22
|
}
|
|
23
23
|
declare const _default: import("react-redux").ConnectedComponent<React.FC<IToolHeaderProps>, import("react-redux").Omit<IToolHeaderProps & {
|
|
24
24
|
children?: React.ReactNode;
|
|
25
|
-
}, "
|
|
25
|
+
}, "step" | "stepList" | "imgList" | "annotationEngine" | "toolName" | "stepInfo" | "stepProgress">>;
|
|
26
26
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var lbAnnotation=require("@labelbee/lb-annotation"),index=require("./index.js"),ToolType=require("../data/enums/ToolType.js"),_=require("lodash"),StepUtils=require("./StepUtils.js");function _interopDefaultLegacy(
|
|
1
|
+
"use strict";var lbAnnotation=require("@labelbee/lb-annotation"),index=require("./index.js"),ToolType=require("../data/enums/ToolType.js"),_=require("lodash"),StepUtils=require("./StepUtils.js"),antd=require("antd"),lbUtils=require("@labelbee/lb-utils");function _interopDefaultLegacy(h){return h&&typeof h=="object"&&"default"in h?h:{default:h}}var ___default=_interopDefaultLegacy(_);class AnnotationDataUtils{static traverseDF(t,s,e,i){s(t,e,i),typeof t=="object"&&t!==null&&(Array.isArray(t)?t.forEach((a,r)=>{this.traverseDF(a,s,r,t)}):Object.keys(t).forEach(a=>{this.traverseDF(t[a],s,a,t)}))}static getNextPath(t){var s,e,i;const{prePath:a,preMappingImgList:r,nextMappingImgList:n}=t,o=(e=(s=r==null?void 0:r.find(c=>c.path===a))==null?void 0:s.calib)==null?void 0:e.calName;return(i=n.find(c=>{var l;return((l=c.calib)==null?void 0:l.calName)===o}))==null?void 0:i.path}static copyResultItemHandler(t){const{item:s,key:e,parent:i,mappingImgList:a,preMappingImgList:r}=t,n=e===void 0?void 0:i[e];return e==="id"&&(i.id=lbAnnotation.uuid(8,62)),e==="imageName"&&(i.imageName=this.getNextPath({prePath:s,preMappingImgList:r,nextMappingImgList:a})),{value:e===void 0?void 0:i[e],oldValue:n}}static copyResultChange(t){const{copyResult:s,step:e,currentResult:i,mappingImgList:a,preMappingImgList:r,valid:n}=t;try{const o=index.jsonParser(s),u=index.jsonParser(i);u.valid=n;const c=`step_${e}`;if(o[c]){const l=o[c],g=["result","resultRect"],v=new Map;if(g.forEach(d=>{l[d]&&this.traverseDF(l[d],(p,f,m)=>{const{value:D,oldValue:R}=this.copyResultItemHandler({item:p,key:f,parent:m,mappingImgList:a,preMappingImgList:r});d==="result"&&f==="id"&&D!==void 0&&R!==void 0&&v.set(R,D)})}),v.size){const d=l.resultRect;Array.isArray(d)&&d.forEach(p=>{const f=p.extId,m=v.get(f);f!==void 0&&m!==void 0&&(p.extId=m)})}const y=["resultRect","rects"],I=[];return this.traverseDF(l,(d,p,f)=>{___default.default.isString(p)&&y.includes(p)&&Array.isArray(d)&&(f[p]=d.filter(m=>m.imageName?!0:(I.push(m),!1)))}),I.length&&(console.log(I),antd.message.info(lbUtils.i18n.t("PartialResultsReplicationFailure"))),u[c]=l,JSON.stringify(u)}return s}catch(o){antd.message.info(lbUtils.i18n.t("FailedToCopyResults"))}}static isResultSourceMatchedDependence(t,s){const e=t==null?void 0:t.map(a=>a.sourceID).sort(),i=s==null?void 0:s.map(a=>a.id).sort();return ___default.default.isEqual(e,i)}static deltaUpdateBasicResultList(t,s){const e=t==null?void 0:t.map(i=>i.sourceID).sort();return s.filter(i=>!e.includes(i.id))}static getInitialResultList(t,s,e,i,a){const r=t!=null?t:[];switch(e.tool){case ToolType.EToolName.Tag:case ToolType.EToolName.Text:{if(e.dataSourceStep>0){const n=this.deltaUpdateBasicResultList(r,i);if(n.length>0)return r.concat(s.getInitResultList(e.dataSourceStep,n))}return a!==!0?r:s.getInitResultList(e.dataSourceStep,i)}default:return r}}static dataCorrection(t,s,e,i){var a,r;try{const o=`step_${StepUtils.getStepInfo(e,i).step}`,u=index.jsonParser(t),c=index.jsonParser(s),l=(a=u[o])==null?void 0:a.result,g=(r=c[o])==null?void 0:r.result;if(!g||___default.default.isEqual(l.sort(this.idCmp),g.sort(this.idCmp)))return t;const v=this.findDeletedIds(l,g);if(v.length===0)return t;const y=e,I=this.getStepKeys(u).sort();return this.deleteRes(u,y,v,I),JSON.stringify(u)}catch(n){return console.error(n),t}}static idCmp(t,s){const e=t.id,i=s.id;return e<i?-1:e>i?1:0}static findDeletedIds(t,s){return this.findDeletedItems(s,t).map(e=>e.id)}static findDeletedItems(t,s){const e=[];return t.forEach(i=>{s.some(r=>r.id===i.id)||e.push(i)}),e}static getStepKeys(t){return Object.keys(t).map(s=>parseInt(s.replace("step_",""),10)).filter(s=>!isNaN(s))}static deleteRes(t,s,e,i){i.forEach(a=>{if(a>s){const r=t[`step_${a}`];if([ToolType.EToolName.FolderTag,ToolType.EToolName.Segmentation].includes(r.tool))return;if(r.dataSourceStep===s){const n=[];r.result=r.result.filter(o=>e.includes(o.sourceID)?(n.push(o.id),!1):!0),this.deleteRes(t,a,n,i)}else r.result=r.result.filter(n=>!e.includes(n.sourceID))}})}}module.exports=AnnotationDataUtils;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var lbAnnotation=require("@labelbee/lb-annotation"),_=require("lodash");exports.EPointCloudBoxRenderTrigger=void 0,function(t){t.Default="Default",t.UndoRedo="UndoRedo",t.ClearAll="ClearAll",t.Single="Single",t.SingleDelete="SingleDelete",t.SingleToggleValid="SingleToggleValid",t.SingleRotate="SingleRotate",t.MultiPaste="MultiPaste",t.MultiMove="MultiMove",t.MulitSelect="MulitSelect"}(exports.EPointCloudBoxRenderTrigger||(exports.EPointCloudBoxRenderTrigger={})),exports.EPointCloudBoxSingleModifiedType=void 0,function(t){t.ChangeAttribute="ChangeAttribute",t.Move="Move",t.ChangeDepth="ChangeDepth",t.ChangeSize="ChangeSize",t.ToggleValid="ToggleValid"}(exports.EPointCloudBoxSingleModifiedType||(exports.EPointCloudBoxSingleModifiedType={}));const checkRectanglesIntersect=(t,n)=>{const r=getAxes(t).concat(getAxes(n));for(const e of r){const o=projectRectangle(t,e),i=projectRectangle(n,e);if(!projectionsOverlap(o,i))return!1}return!0},getAxes=t=>{const n=[];for(let r=0;r<t.length;r++){const e=t[r],o=t[(r+1)%t.length],i={x:o.x-e.x,y:o.y-e.y},d={x:-i.y,y:i.x};n.push(d)}return n},projectRectangle=(t,n)=>{let r=dotProduct(t[0],n),e=r;for(const o of t){const i=dotProduct(o,n);i<r&&(r=i),i>e&&(e=i)}return{min:r,max:e}},projectionsOverlap=(t,n)=>!(t.max<n.min||n.max<t.min),dotProduct=(t,n)=>t.x*n.x+t.y*n.y,getIntersectingBoxIds=(t,n)=>{const r=[];return n.forEach(e=>{const{polygonPointList:o}=lbAnnotation.getCuboidFromPointCloudBox(e);checkRectanglesIntersect(t,o)&&r.push(e.id)}),r},getAddBoxId=(t,n)=>{const r=t.map(o=>o.id),e=n.map(o=>o.id);return r.find(o=>!e.includes(o))||""},getDeletedBox=(t,n)=>{const r=t.map(e=>e.id);return n.find(e=>!r.includes(e.id))},getValidChangedBox=(t,n)=>t.find(e=>{const o=n.find(i=>i.id===e.id);return o&&o.valid!==e.valid}),getRotationChangedBox=(t,n)=>t.find(e=>{const o=n.find(i=>i.id===e.id);return o&&o.rotation!==e.rotation}),getIntersectingBoxIdsOfBox=(t,n)=>{const{polygonPointList:r}=lbAnnotation.getCuboidFromPointCloudBox(t);return{ids:getIntersectingBoxIds(r,n.filter(o=>o.id!==t.id)),rect:r}},getModifiedBox=(t,n)=>{const r=(e,o)=>e.attribute===o.attribute&&e.center.x===o.center.x&&e.center.y===o.center.y&&e.depth===o.depth&&e.width===o.width&&e.height===o.height;for(const e of t){const o=n.find(i=>i.id===e.id);if(o&&!r(e,o)){let i;if(o.attribute!==e.attribute?i=exports.EPointCloudBoxSingleModifiedType.ChangeAttribute:o.center.x!==e.center.x||o.center.y!==e.center.y?i=exports.EPointCloudBoxSingleModifiedType.Move:o.depth!==e.depth?i=exports.EPointCloudBoxSingleModifiedType.ChangeDepth:(o.width!==e.width||o.height!==e.height)&&(i=exports.EPointCloudBoxSingleModifiedType.ChangeSize),i!==void 0)return{modifiedType:i,box:e}}}},calcResetAreasAndBoxIds=(t,n,r)=>{try{switch(t){case exports.EPointCloudBoxRenderTrigger.Single:if(n.length>r.length){const e=getAddBoxId(n,r);return e?{modifiedBoxIds:[e],resetAreas:[]}:{modifiedBoxIds:[],resetAreas:[]}}else{const e=[],o=[],i=getModifiedBox(n,r);if(i&&(e.push(i.box.id),i.modifiedType===exports.EPointCloudBoxSingleModifiedType.ChangeSize||i.modifiedType===exports.EPointCloudBoxSingleModifiedType.Move)){const d=r.find(l=>l.id===i.box.id),{ids:s,rect:c}=getIntersectingBoxIdsOfBox(d,n);e.push(...s),o.push(c)}return{modifiedBoxIds:e,resetAreas:o}}case exports.EPointCloudBoxRenderTrigger.SingleDelete:if(n.length<r.length){const e=getDeletedBox(n,r);if(e){const i=[lbAnnotation.getCuboidFromPointCloudBox(e).polygonPointList],d=[];if(n.length>1){const{ids:s}=getIntersectingBoxIdsOfBox(e,n);s.length&&d.push(...s)}return{modifiedBoxIds:d,resetAreas:i}}return{modifiedBoxIds:[],resetAreas:[]}}return{modifiedBoxIds:[],resetAreas:[]};case exports.EPointCloudBoxRenderTrigger.SingleRotate:if(getRotationChangedBox(n,r)){const e=getRotationChangedBox(n,r);if(e){const o=r.find(s=>s.id===e.id),{ids:i,rect:d}=getIntersectingBoxIdsOfBox(o,n);return{modifiedBoxIds:[e.id,...i],resetAreas:[d]}}}return{modifiedBoxIds:[],resetAreas:[]};case exports.EPointCloudBoxRenderTrigger.SingleToggleValid:if(getValidChangedBox(n,r)){const e=getValidChangedBox(n,r);return e?{modifiedBoxIds:[e.id],resetAreas:[]}:{modifiedBoxIds:[],resetAreas:[]}}return{modifiedBoxIds:[],resetAreas:[]};case exports.EPointCloudBoxRenderTrigger.MulitSelect:return{modifiedBoxIds:getDifference(n,r),resetAreas:[]};case exports.EPointCloudBoxRenderTrigger.MultiPaste:case exports.EPointCloudBoxRenderTrigger.MultiMove:case exports.EPointCloudBoxRenderTrigger.Default:case exports.EPointCloudBoxRenderTrigger.UndoRedo:case exports.EPointCloudBoxRenderTrigger.ClearAll:default:return{modifiedBoxIds:[],resetAreas:[]}}}catch(e){return console.error("calcResetAreasAndBoxIds error:",e),{modifiedBoxIds:[],resetAreas:[]}}},getDifference=(t,n)=>{const r=new Map;for(const e of n)r.set(e.id,e);return t.filter(e=>{const o=r.get(e.id);return!o||!_.isEqual(e,o)}).map(e=>e.id)};exports.calcResetAreasAndBoxIds=calcResetAreasAndBoxIds;
|
package/dist/utils/data.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index=require("./index.js"),StepUtils=require("./StepUtils.js"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(r,e,t)=>e in r?__defProp(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,__spreadValues=(r,e)=>{for(var t in e||(e={}))__hasOwnProp.call(e,t)&&__defNormalProp(r,t,e[t]);if(__getOwnPropSymbols)for(var t of __getOwnPropSymbols(e))__propIsEnum.call(e,t)&&__defNormalProp(r,t,e[t]);return r},__spreadProps=(r,e)=>__defProps(r,__getOwnPropDescs(e));const composeResultWithBasicImgInfo=(r,e)=>JSON.stringify(__spreadValues(__spreadValues({},index.jsonParser(r)),e)),composeResult=(r,e,t,c)=>{const{step:a,stepList:l}=e,{rect:n,basicRectID:u}=t;try{const s=index.jsonParser(r),f=StepUtils.getCurrentStepInfo(a,l),{dataSourceStep:_}=f,i=`step_${f.step}`;if(s[i]){const o=s[i];return Object.assign(o,c),o.result?(JSON.stringify(o.result)===JSON.stringify(n)||(u?o.result=[...o.result.filter(p=>!(p.sourceID&&p.sourceID===u)),...n.filter(p=>p.sourceID&&p.sourceID===u)]:o.result=n),JSON.stringify(s)):JSON.stringify(__spreadProps(__spreadValues({},s),{[i]:__spreadProps(__spreadValues(__spreadValues({},s[i]),c),{result:n})}))}return JSON.stringify(__spreadProps(__spreadValues({},s),{[i]:__spreadProps(__spreadValues({dataSourceStep:_},c),{toolName:l[a-1].tool,result:n})}))}catch(s){return r}};exports.composeResult=composeResult,exports.composeResultWithBasicImgInfo=composeResultWithBasicImgInfo;
|
package/dist/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _=require("lodash"),lbAnnotation=require("@labelbee/lb-annotation");function _interopDefaultLegacy(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _=require("lodash"),lbAnnotation=require("@labelbee/lb-annotation");function _interopDefaultLegacy(n){return n&&typeof n=="object"&&"default"in n?n:{default:n}}var ___default=_interopDefaultLegacy(_),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(n,t,e)=>t in n?__defProp(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,__spreadValues=(n,t)=>{for(var e in t||(t={}))__hasOwnProp.call(t,e)&&__defNormalProp(n,e,t[e]);if(__getOwnPropSymbols)for(var e of __getOwnPropSymbols(t))__propIsEnum.call(t,e)&&__defNormalProp(n,e,t[e]);return n},__spreadProps=(n,t)=>__defProps(n,__getOwnPropDescs(t));const jsonParser=(n,t={})=>{try{return typeof n=="string"?JSON.parse(n):___default.default.isObject(n)?n:t}catch(e){return t}},classnames=n=>{if(Array.isArray(n))return n.filter(t=>t).join(" ");if(___default.default.isObject(n)){const t=[];return Object.keys(n).forEach(e=>{n[e]&&t.push(e)}),t.join(" ")}return""},getBoundingRect=n=>{let t=Infinity,e=Infinity,r=-Infinity,o=-Infinity;for(const i of n)t=Math.min(t,i.x),e=Math.min(e,i.y),r=Math.max(r,i.x),o=Math.max(o,i.y);return{x:t,y:e,width:r-t,height:o-e}},isBoundingRectInImage=(()=>{const n=(t,e)=>{const r=Math.max(t.x,e.x),o=Math.max(t.y,e.y),i=Math.min(t.x+t.width,e.x+e.width),c=Math.min(t.y+t.height,e.y+e.height),s=i-r,a=c-o;return s>=0&&a>=0?{x:r,y:o,width:s,height:a}:null};return(t,e,r)=>{if(r[e]){const o=r[e].width,i=r[e].height;return n(t,{x:0,y:0,width:o,height:i})!==null}return!1}})(),getRectPointCloudBox=n=>{var t;const{pointCloudBox:e,mappingData:r,imageSizes:o}=n,{transferViewData:i}=(t=lbAnnotation.pointCloudLidar2image(e,r.calib))!=null?t:{};if(!i)return;const c=i.reduce((u,p)=>p.type==="line"?[...u,...p.pointList]:u,[]),s=__spreadProps(__spreadValues({},getBoundingRect(c)),{imageName:r.path});if(isBoundingRectInImage(s,r.path,o))return s},generatePointCloudBoxRects=(n,t)=>{var e;const{pointCloudBox:r,mappingImgList:o,imageSizes:i}=n,s=o.map(a=>getRectPointCloudBox({pointCloudBox:r,mappingData:a,imageSizes:i})).filter(a=>a!==void 0);if(s.length>0){const a=(e=t==null?void 0:t.prepareRectsFn)!=null?e:void 0,u=a?a(s,r):s;u.length>0&&Object.assign(r,{rects:u})}};exports.classnames=classnames,exports.generatePointCloudBoxRects=generatePointCloudBoxRects,exports.getBoundingRect=getBoundingRect,exports.getRectPointCloudBox=getRectPointCloudBox,exports.isBoundingRectInImage=isBoundingRectInImage,exports.jsonParser=jsonParser;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$2=require("../../../components/LLMMultiWheelView/index.js"),index=require("../../../constant/index.js"),index$1=require("../../../utils/index.js"),dom=require("../../../utils/dom.js"),es=require("antd/es"),React=require("react"),index$4=require("../sidebar/index.js"),index$3=require("../toolFooter/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const LLMMultiWheelViewCls=`${index.prefix}-LLMMultiWheelView`,{Sider,Content}=es.Layout,layoutCls=`${index.prefix}-layout`,LLMMultiWheelLayout=e=>{var t,l;return React__default.default.createElement(es.Layout,{className:dom.getClassName("layout","container")},e==null?void 0:e.leftSider,React__default.default.createElement(Content,{className:index$1.classnames({[`${layoutCls}__content`]:!0,[`${index.prefix}-LLMLayout`]:!0})},React__default.default.createElement(index$2.default,{showTips:e.showTips,tips:e.tips,drawLayerSlot:e.drawLayerSlot}),React__default.default.createElement(index$3.default,{style:(t=e.style)==null?void 0:t.footer,mode:e.mode,footer:e==null?void 0:e.footer})),React__default.default.createElement(Sider,{className:`${layoutCls}__side`,width:600,style:{position:"relative"}},React__default.default.createElement(index$4.default,{sider:e==null?void 0:e.sider,checkMode:e==null?void 0:e.checkMode}),(l=e.drawLayerSlot)==null?void 0:l.call(e,{})))};exports.LLMMultiWheelViewCls=LLMMultiWheelViewCls,exports.default=LLMMultiWheelLayout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var index$
|
|
1
|
+
"use strict";var index$8=require("../../components/customResizeHook/index.js"),index$6=require("../../constant/index.js"),antd=require("antd"),es=require("antd/es"),React=require("react"),index$c=require("./annotationOperation/index.js"),index$b=require("./annotationTips/index.js"),index$5=require("./sidebar/index.js"),index$d=require("./toolFooter/index.js"),index$a=require("./toolHeader/index.js"),reducer=require("../../store/annotation/reducer.js"),index$7=require("../../components/videoAnnotate/index.js"),reactRedux=require("react-redux"),ToolUtils=require("../../utils/ToolUtils.js"),index$e=require("../../components/pointCloudView/index.js"),dom=require("../../utils/dom.js"),index$9=require("../../utils/index.js"),index$4=require("../../components/predictTracking/previewResult/index.js"),ctx=require("../../store/ctx.js"),ToolType=require("../../data/enums/ToolType.js"),index$1=require("./LLMLayout/index.js"),index$2=require("./NLPLayout/index.js"),index$3=require("../../components/audioAnnotate/index.js"),icons=require("@ant-design/icons"),reactI18next=require("react-i18next"),lbAnnotation=require("@labelbee/lb-annotation"),index=require("./LLMMultiWheelLayout/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,a)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,__spreadValues=(e,t)=>{for(var a in t||(t={}))__hasOwnProp.call(t,a)&&__defNormalProp(e,a,t[a]);if(__getOwnPropSymbols)for(var a of __getOwnPropSymbols(t))__propIsEnum.call(t,a)&&__defNormalProp(e,a,t[a]);return e};const{Sider,Content}=es.Layout,layoutCls=`${index$6.prefix}-layout`,ImageAnnotate=e=>{var t;return React__default.default.createElement(React__default.default.Fragment,null,e.showTips===!0&&React__default.default.createElement(index$b,{path:e.path,tips:e.tips}),React__default.default.createElement(index$c,__spreadValues({},e)),React__default.default.createElement(index$d.default,{style:(t=e.style)==null?void 0:t.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},PointCloudAnnotate=e=>{var t;return React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(index$e,{drawLayerSlot:e.drawLayerSlot,checkMode:e.checkMode,intelligentFit:e.intelligentFit,measureVisible:e.measureVisible,setResourceLoading:e.setResourceLoading}),React__default.default.createElement(index$d.default,{style:(t=e.style)==null?void 0:t.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},AnnotatedArea=e=>{var t;const{stepList:a,step:l}=e,r=(t=reducer.getStepConfig(a,l))==null?void 0:t.tool,i=ToolUtils.isPointCloudTool(r),n=ToolUtils.isVideoTool(r);return i?React__default.default.createElement(PointCloudAnnotate,__spreadValues({},e)):n?React__default.default.createElement(index$7,{drawLayerSlot:e.drawLayerSlot,footer:e.footer,annotationBefore:e==null?void 0:e.annotationBefore}):React__default.default.createElement(ImageAnnotate,__spreadValues({},e))},ViewportProviderLayout=e=>{var t,a,l;const{t:r}=reactI18next.useTranslation(),{stepList:i,step:n}=e,o=(t=reducer.getStepConfig(i,n))==null?void 0:t.tool,d=![ToolType.EToolName.LLM,ToolType.EToolName.NLP,ToolType.EToolName.LLMMultiWheel].includes(o),c=![ToolType.EToolName.LLM,ToolType.EToolName.NLP,ToolType.EToolName.LLMMultiWheel].includes(o),s=[lbAnnotation.EPointCloudName.PointCloud].includes(o);return React__default.default.createElement(index$8.ViewportProvider,null,React__default.default.createElement(antd.Spin,{spinning:e.loading,indicator:React__default.default.createElement(icons.LoadingOutlined,null),tip:React__default.default.createElement("span",{style:{marginTop:200}},r("LoadingTips")),delay:500},React__default.default.createElement(es.Layout,{className:index$9.classnames([layoutCls,e.className]),style:(a=e.style)==null?void 0:a.layout},React__default.default.createElement("header",{className:`${layoutCls}__header`,style:(l=e.style)==null?void 0:l.header},React__default.default.createElement(index$a,{header:e==null?void 0:e.header,headerName:e.headerName,goBack:e.goBack,exportData:e.exportData,hasLangNode:d,hasHeaderOption:c,hasPredictTrackingIcon:s})),e.children)))},MainView=e=>{var t,a,l,r,i,n,o;const[d,c]=React.useState(void 0),s=(a=(t=e.style)==null?void 0:t.sider)==null?void 0:a.width,{stepList:m,step:f}=e,u=(l=reducer.getStepConfig(m,f))==null?void 0:l.tool,v=ToolType.EToolName.LLM===u,L=ToolType.EToolName.NLP===u,E=ToolType.EToolName.LLMMultiWheel===u,x=ToolUtils.isAudioTool(u);return E?React__default.default.createElement(ViewportProviderLayout,__spreadValues({},e),React__default.default.createElement(index.default,__spreadValues({},e))):v?React__default.default.createElement(ViewportProviderLayout,__spreadValues({},e),React__default.default.createElement(index$1,__spreadValues({},e))):L?React__default.default.createElement(ViewportProviderLayout,__spreadValues({},e),React__default.default.createElement(index$2,__spreadValues({},e))):x?React__default.default.createElement(ViewportProviderLayout,__spreadValues({},e),React__default.default.createElement(index$3,__spreadValues({},e))):React__default.default.createElement(ViewportProviderLayout,__spreadValues({},e),React__default.default.createElement(es.Layout,{className:dom.getClassName("layout","container")},e==null?void 0:e.leftSider,React__default.default.createElement(Content,{className:`${layoutCls}__content`},React__default.default.createElement(AnnotatedArea,__spreadValues({},e)),React__default.default.createElement(index$4,null)),React__default.default.createElement(Sider,{className:`${layoutCls}__side`,width:(r=d!=null?d:s)!=null?r:240,style:(i=e.style)==null?void 0:i.sider},React__default.default.createElement(index$5.default,{sider:e==null?void 0:e.sider,enableColorPicker:e==null?void 0:e.enableColorPicker,setSiderWidth:c,propsSiderWidth:(o=(n=e.style)==null?void 0:n.sider)==null?void 0:o.width}))))},mapStateToProps=({annotation:e})=>{var t,a,l;const{imgList:r,loading:i}=e,n=(t=r[e.imgIndex])!=null?t:{};return{path:(l=(a=n==null?void 0:n.path)!=null?a:n==null?void 0:n.url)!=null?l:"",loading:i}};var MainView$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(MainView);module.exports=MainView$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var React=require("react"),antd=require("antd"),reactI18next=require("react-i18next"),index=require("../../../../constant/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const forbidStyle={color:"#CCCCCC"},PopconfirmTitle=({info:e})=>{const{t}=reactI18next.useTranslation();return e.key.startsWith("sure")?React__default.default.createElement("div",{key:e.key},`${t("ConfirmTo")}${e.name.slice(0)}\uFF1F
|
|
1
|
+
"use strict";var React=require("react"),antd=require("antd"),reactI18next=require("react-i18next"),index=require("../../../../constant/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const forbidStyle={color:"#CCCCCC"},PopconfirmTitle=({info:e})=>{const{t}=reactI18next.useTranslation();return e.key.startsWith("sure")?React__default.default.createElement("div",{key:e.key},`${t("ConfirmTo")}${e.name.slice(0)}\uFF1F`,(e==null?void 0:e.content)?e.content:""):React__default.default.createElement("span",null,e.name)},ActionIcon=({icon:e})=>typeof e=="string"?React__default.default.createElement("img",{width:23,height:25,src:e}):e,ShowIcon=({isHover:e,info:t})=>{const a=!!t.forbidOperation,l=t.key===e&&!a;let n={color:l?"#666fff":""};return a&&(n=forbidStyle),React__default.default.createElement("div",{style:{cursor:a?"not-allowed":"default"},onClick:()=>{var c;return(t==null?void 0:t.forbidConfirm)&&!a&&((c=t==null?void 0:t.onClick)==null?void 0:c.call(t))}},React__default.default.createElement("div",{className:"icon"},React__default.default.createElement(ActionIcon,{icon:l?t.hoverSvg:t.imgSvg})),React__default.default.createElement("div",{className:"toolName",style:n},t.name))},ActionsConfirm=({allOperation:e})=>{const t=React.useRef(null),[a,l]=React.useState(null),{t:n}=reactI18next.useTranslation(),c=Math.floor(24/e.length);return React__default.default.createElement("div",{className:"generalOperation",ref:t},e.map((r,u)=>React__default.default.createElement(antd.Col,{span:c,key:u,className:"generalOperation-col"},React__default.default.createElement("div",{key:r.key,className:"item",onMouseEnter:()=>{l(r.key)},onMouseLeave:()=>{l(null)}},r.forbidConfirm?React__default.default.createElement(ShowIcon,{info:r,isHover:a}):React__default.default.createElement(antd.Popconfirm,{title:React__default.default.createElement(PopconfirmTitle,{info:r}),placement:"topRight",okText:n("Confirm"),cancelText:n("Cancel"),getPopupContainer:()=>{var o;return(o=t.current)!=null?o:document.body},onConfirm:r.onClick,overlayClassName:`${index.prefix}-pop-confirm`},React__default.default.createElement("div",null,React__default.default.createElement(ShowIcon,{info:r,isHover:a})))))))};module.exports=ActionsConfirm;
|
package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var React=require("react"),antd=require("antd"),index=require("../../../../../../store/toolConfig/index.js"),reactI18next=require("react-i18next"),index_module=require("./index.module.scss.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const firstFrameDataSwitch=()=>{const{t:e}=reactI18next.useTranslation(),{onlyLoadFirstData:a,setOnlyLoadFirstData:t}=index();React.useEffect(()=>{t(!1)},[]);const r=n=>{t(n)};return React__default.default.createElement("div",{className:index_module.switchBox},React__default.default.createElement("div",{className:index_module.switchLabel},e("OnlyLoadTheFirstFramePreAnnotation")),React__default.default.createElement(antd.Switch,{defaultChecked:!1,checked:a,onChange:r}))};module.exports=firstFrameDataSwitch;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var styles={switchBox:"index-module_switchBox__6DlnW"};module.exports=styles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var React=require("react"),antd=require("antd"),PointCloudContext=require("../../../../../../components/pointCloudView/PointCloudContext.js"),lbUtils=require("@labelbee/lb-utils"),index_module=require("./index.module.scss.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const marks={.5:.5,1:1,2:2,3:3,4:4},RectRotateSensitivitySlider=()=>{const e=React__default.default.useContext(PointCloudContext.PointCloudContext),t=i=>{e.setRectRotateSensitivity(i)};return React__default.default.createElement("div",{className:index_module.rectRotateSensitivitySlider},React__default.default.createElement("div",{className:index_module.title},lbUtils.i18n.t("RotationAngleSensitivity")),React__default.default.createElement("div",{className:"toolStyle"},React__default.default.createElement("div",{id:"style-rectRotateSensitivity"},React__default.default.createElement(antd.Slider,{min:.5,max:4,step:null,value:e.rectRotateSensitivity,onChange:t,marks}))))};module.exports=RectRotateSensitivitySlider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var styles={rectRotateSensitivitySlider:"index-module_rectRotateSensitivitySlider__tGjUn",title:"index-module_title__aAJW6"};module.exports=styles;
|
package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var React=require("react"),antd=require("antd"),index=require("../../../../../../store/toolConfig/index.js"),reactI18next=require("react-i18next"),icons=require("@ant-design/icons"),index_module=require("./index.module.scss.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const selectBoxVisibleSwitch=()=>{const{t:e}=reactI18next.useTranslation(),{selectBoxVisibleSwitch:i,setSelectBoxVisibleSwitch:t}=index();React.useEffect(()=>{t(!1)},[]);const l=a=>{t(a)};return React__default.default.createElement("div",{className:index_module.switchBox},React__default.default.createElement("div",{className:index_module.switchLeft},React__default.default.createElement("div",{className:index_module.switchTitle},e("SelectBoxToDisplayIndependently")),React__default.default.createElement(antd.Tooltip,{placement:"top",title:React__default.default.createElement("div",{style:{width:"210px"}},e("SelectBoxSwitchTips"))},React__default.default.createElement(icons.QuestionCircleOutlined,null))),React__default.default.createElement(antd.Switch,{defaultChecked:!1,checked:i,onChange:l}))};module.exports=selectBoxVisibleSwitch;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var styles={switchBox:"index-module_switchBox__mLSzh",switchLeft:"index-module_switchLeft__7qd-2",switchTitle:"index-module_switchTitle__de9li"};module.exports=styles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),icons=require("@ant-design/icons"),ToolIcons=require("../ToolIcons.js"),ToolType=require("../../../../data/enums/ToolType.js"),lbAnnotation=require("@labelbee/lb-annotation"),PointCloudContext=require("../../../../components/pointCloudView/PointCloudContext.js"),antd=require("antd"),StepUtils=require("../../../../utils/StepUtils.js"),reactRedux=require("react-redux"),index=require("../../../../utils/index.js"),useStatus=require("../../../../components/pointCloudView/hooks/useStatus.js"),useSingleBox=require("../../../../components/pointCloudView/hooks/useSingleBox.js"),reactI18next=require("react-i18next"),ctx=require("../../../../store/ctx.js"),index$3=require("./components/batchUpdateModal/index.js"),index$1=require("./components/annotatedBox/index.js"),index$2=require("./components/findTrackIDIndex/index.js"),lbUtils=require("@labelbee/lb-utils"),index$4=require("../../../../components/attributeList/index.js"),useAttribute=require("../../../../components/pointCloudView/hooks/useAttribute.js"),lassoSelector=require("../../../../assets/annotation/pointCloudTool/lassoSelector.svg.js"),lassoSelector_a=require("../../../../assets/annotation/pointCloudTool/lassoSelector_a.svg.js"),circleSelector=require("../../../../assets/annotation/pointCloudTool/circleSelector.svg.js"),circleSelector_a=require("../../../../assets/annotation/pointCloudTool/circleSelector_a.svg.js"),icon_rect=require("../../../../assets/annotation/rectTool/icon_rect.svg.js"),icon_rect_a=require("../../../../assets/annotation/rectTool/icon_rect_a.svg.js"),index$5=require("../index.js"),actionCreators=require("../../../../store/annotation/actionCreators.js"),usePointCloudViews=require("../../../../components/pointCloudView/hooks/usePointCloudViews.js");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(t,e,o)=>e in t?__defProp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,__spreadValues=(t,e)=>{for(var o in e||(e={}))__hasOwnProp.call(e,o)&&__defNormalProp(t,o,e[o]);if(__getOwnPropSymbols)for(var o of __getOwnPropSymbols(e))__propIsEnum.call(e,o)&&__defNormalProp(t,o,e[o]);return t},__spreadProps=(t,e)=>__defProps(t,__getOwnPropDescs(e));const BoxTrackIDInput=()=>{const[t,e]=React.useState(!1),o=React.useContext(PointCloudContext.PointCloudContext),{pointCloudBoxList:s}=o,{selectedBox:u,updateSelectedBox:l}=useSingleBox.useSingleBox(),[c,i]=React.useState(""),{t:f}=reactI18next.useTranslation(),v=u==null?void 0:u.info.trackID,r=d=>!!s.find(C=>C.trackID===d&&C.id!==(u==null?void 0:u.info.id)),a=(d=!1)=>{const m=parseInt(c,10);if(d&&e(!1),isNaN(m)){antd.message.error(f("PositiveIntegerCheck"));return}if(c.indexOf(".")>-1){antd.message.error(f("NotAllowDecimalPointsInTrackID"));return}if(r(m)){antd.message.error(f("DuplicateTrackIDsExist"));return}if(!(m>0)){antd.message.error(f("PositiveIntegerCheck"));return}S(m)};React.useEffect(()=>{e(!1)},[v]);const S=d=>{var m;const C=l({trackID:d});(m=o==null?void 0:o.topViewInstance)==null||m.updatePolygonList(C!=null?C:[])};return React__default.default.createElement("div",{style:{padding:24}},React__default.default.createElement("div",{style:{marginBottom:16,display:"flex",justifyContent:"space-between",alignItems:"center"}},React__default.default.createElement("span",null,f("CurrentBoxTrackIDs")),v&&React__default.default.createElement(index$3,{id:v,updateCurrentPolygonList:d=>S(d)})),React__default.default.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",lineHeight:"12px"}},t&&v?React__default.default.createElement(antd.Input,{defaultValue:v,onChange:d=>{i(d.target.value)},disabled:!v,size:"small",onBlur:()=>{a()},onPressEnter:()=>{a(!0)}}):React__default.default.createElement("span",null,v),React__default.default.createElement(icons.EditFilled,{style:{color:"#999",marginLeft:16,cursor:typeof v!="undefined"?"pointer":"not-allowed"},onClick:()=>{v&&e(!t)}})))},isAllowUpdateInSegment=({segmentStatus:t,globalPattern:e})=>e===lbUtils.EPointCloudPattern.Segmentation&&![lbUtils.EPointCloudSegmentStatus.Edit,lbUtils.EPointCloudSegmentStatus.Ready].includes(t),AttributeUpdater=({attributeList:t,subAttributeList:e,toolInstance:o,config:s,stepList:u,stepInfo:l,enableColorPicker:c})=>{const[i,f]=React.useState({segmentStatus:lbUtils.EPointCloudSegmentStatus.Ready}),{selectedBox:v}=useSingleBox.useSingleBox(),r=React.useContext(PointCloudContext.PointCloudContext),{ptSegmentInstance:a}=r,{t:S}=reactI18next.useTranslation(),{defaultAttribute:d}=useAttribute.useAttribute(),m=usePointCloudViews.usePointCloudViews(),{isPointCloudSegmentationPattern:C}=useStatus.useStatus(),h=ctx.useDispatch(),j={fontWeight:500,fontSize:14,margin:"12px 0 8px 20px"},L={margin:"12px 20px 8px",fontSize:14,fontWeight:500,wordWrap:"break-word"};React.useEffect(()=>{if(!!a)return a.on("syncPointCloudStatus",f),()=>{a.unbind("syncPointCloudStatus",f)}},[a]);const q=(n,_)=>{var b,P,E,y,I;const x=(b=s==null?void 0:s.attributeList)==null?void 0:b.map(g=>g.value===n?__spreadProps(__spreadValues({},g),{color:_}):g),T=__spreadProps(__spreadValues({},s),{attributeList:x}),w=JSON.stringify(T),p=u==null?void 0:u.map(g=>(g==null?void 0:g.step)===(l==null?void 0:l.step)?__spreadProps(__spreadValues({},g),{config:w}):g);(P=r==null?void 0:r.topViewInstance)==null||P.updateAttributeList(x),(E=r==null?void 0:r.sideViewInstance)==null||E.updateAttributeList(x),(y=r==null?void 0:r.backViewInstance)==null||y.updateAttributeList(x),(I=r==null?void 0:r.mainViewInstance)==null||I.setConfig(T),h(actionCreators.SetTaskStepList({stepList:p}))},k=n=>{m.updateViewsByDefaultSize&&m.updateViewsByDefaultSize(n)},B=n=>{isAllowUpdateInSegment({globalPattern:r.globalPattern,segmentStatus:i.segmentStatus})||o.setDefaultAttribute(n)},D=(n,_)=>{isAllowUpdateInSegment({globalPattern:r.globalPattern,segmentStatus:i.segmentStatus})||o.setSubAttribute(n,_)},V=t.map(n=>({label:n.key,value:n.value,color:n==null?void 0:n.color,limit:n==null?void 0:n.limit,isDefault:n==null?void 0:n.isDefault})),N=v||i.cacheSegData&&i.segmentStatus===lbUtils.EPointCloudSegmentStatus.Edit,O=C;return React__default.default.createElement("div",{style:{flex:1,overflowX:"hidden",overflowY:"auto"}},React__default.default.createElement("div",{style:j},S("Attribute")),React__default.default.createElement(index$4.default,{list:V,forbidDefault:!0,selectedAttribute:d!=null?d:"",attributeChanged:n=>B(n),updateColorConfig:q,enableColorPicker:c,updateSize:k,forbidShowLimitPopover:O}),React__default.default.createElement(antd.Divider,{style:{margin:0}}),N&&React__default.default.createElement(React__default.default.Fragment,null,e.map(n=>{var _,b,P,E,y,I,x,T,w;return(n==null?void 0:n.subSelected)&&React__default.default.createElement("div",{style:{marginTop:12},key:n.value},React__default.default.createElement("div",{style:L},S("SubAttribute"),"-",n.key),((_=n.subSelected)==null?void 0:_.length)<5?React__default.default.createElement(index$4.default,{list:n.subSelected.map(p=>({label:p.key,value:p.value})),selectedAttribute:((P=(b=r.selectedPointCloudBox)==null?void 0:b.subAttribute)==null?void 0:P[n.value])||((y=(E=i.cacheSegData)==null?void 0:E.subAttribute)==null?void 0:y[n.value]),num:"-",forbidColor:!0,forbidDefault:!0,attributeChanged:p=>D(n.value,p),style:{marginBottom:12}}):React__default.default.createElement(antd.Select,{style:{margin:"0px 21px 17px 16px",width:"87%"},value:((x=(I=r.selectedPointCloudBox)==null?void 0:I.subAttribute)==null?void 0:x[n.value])||((w=(T=i.cacheSegData)==null?void 0:T.subAttribute)==null?void 0:w[n.value]),placeholder:S("PleaseSelect"),onChange:p=>D(n.value,p),allowClear:!0},n.subSelected.map(p=>React__default.default.createElement(antd.Select.Option,{key:p.value,value:p.value},p.key))),React__default.default.createElement(antd.Divider,{style:{margin:0}}))})))},renderSegmentTools=[{toolName:"LassoSelector",commonSvg:lassoSelector,selectedSvg:lassoSelector_a},{toolName:"RectSelector",commonSvg:icon_rect,selectedSvg:icon_rect_a},{toolName:"CircleSelector",commonSvg:circleSelector,selectedSvg:circleSelector_a}],PointCloudSegToolIcon=({toolInstance:t})=>{const{ptSegmentInstance:e}=React.useContext(PointCloudContext.PointCloudContext),[o,s]=React.useState("LassoSelector"),{t:u}=reactI18next.useTranslation();return React.useEffect(()=>{if(!e)return;const l=()=>{s("LassoSelector")},c=()=>{s("RectSelector")},i=()=>{s("CircleSelector")};return e.on("LassoSelector",l),e.on("RectSelector",c),e.on("CircleSelector",i),()=>{e.unbind("LassoSelector",l),e.unbind("RectSelector",c),e.unbind("CircleSelector",i)}},[e]),React__default.default.createElement("div",{className:`${index$5.sidebarCls}__level`},renderSegmentTools.map(l=>{const c=o===l.toolName;return React__default.default.createElement("span",{className:`${index$5.sidebarCls}__toolOption`,key:l.toolName,onClick:()=>e==null?void 0:e.emit(l.toolName)},React__default.default.createElement("img",{className:`${index$5.sidebarCls}__singleTool`,src:c?l==null?void 0:l.selectedSvg:l==null?void 0:l.commonSvg}),React__default.default.createElement("span",{className:index.classnames({[`${index$5.sidebarCls}__toolOption__selected`]:c})},u(l.toolName)))}))},PointCloudToolSidebar=({stepInfo:t,toolInstance:e,imgList:o,imgIndex:s,stepList:u,enableColorPicker:l})=>{var c,i;const{updatePointCloudPattern:f,pointCloudPattern:v,isPointCloudSegmentationPattern:r}=useStatus.useStatus(),a=index.jsonParser(t.config),S=(c=a==null?void 0:a.attributeList)!=null?c:[],d=(a==null?void 0:a.secondaryAttributeConfigurable)===!0?(i=a==null?void 0:a.inputList)!=null?i:[]:[];return r?React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(PointCloudSegToolIcon,{toolInstance:e}),React__default.default.createElement(AttributeUpdater,{toolInstance:e,attributeList:S,subAttributeList:d,config:a,stepList:u,stepInfo:t,enableColorPicker:l})):React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(ToolIcons.ToolIcons,{toolName:lbAnnotation.cTool.EPointCloudName.PointCloud,selectedToolName:v,onChange:m=>f==null?void 0:f(m)}),React__default.default.createElement(AttributeUpdater,{toolInstance:e,attributeList:S,subAttributeList:d,config:a,stepList:u,stepInfo:t,enableColorPicker:l}),(a==null?void 0:a.trackConfigurable)===!0&&v===ToolType.EToolName.Rect&&React__default.default.createElement("div",{style:{flexShrink:0,height:280,overflow:"auto"}},React__default.default.createElement(BoxTrackIDInput,null),React__default.default.createElement(antd.Divider,{style:{margin:0}}),React__default.default.createElement(index$1,{imgList:o,imgIndex:s}),React__default.default.createElement(antd.Divider,{style:{margin:0}}),React__default.default.createElement(index$2.default,{imgList:o,imgIndex:s})))},mapStateToProps=t=>{var e,o,s,u;const l=StepUtils.getCurrentStepInfo((e=t.annotation)==null?void 0:e.step,(o=t.annotation)==null?void 0:o.stepList),c=(s=t.annotation)==null?void 0:s.toolInstance,i=(u=t.annotation)==null?void 0:u.stepList;return{stepInfo:l,toolInstance:c,imgList:t.annotation.imgList,imgIndex:t.annotation.imgIndex,stepList:i}};var PointCloudToolSidebar$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudToolSidebar);exports.PointCloudSegToolIcon=PointCloudSegToolIcon,exports.default=PointCloudToolSidebar$1;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),icons=require("@ant-design/icons"),ToolIcons=require("../ToolIcons.js"),ToolType=require("../../../../data/enums/ToolType.js"),lbAnnotation=require("@labelbee/lb-annotation"),PointCloudContext=require("../../../../components/pointCloudView/PointCloudContext.js"),antd=require("antd"),StepUtils=require("../../../../utils/StepUtils.js"),reactRedux=require("react-redux"),index=require("../../../../utils/index.js"),useStatus=require("../../../../components/pointCloudView/hooks/useStatus.js"),useSingleBox=require("../../../../components/pointCloudView/hooks/useSingleBox.js"),reactI18next=require("react-i18next"),ctx=require("../../../../store/ctx.js"),index$6=require("./components/batchUpdateModal/index.js"),index$1=require("./components/annotatedBox/index.js"),index$3=require("./components/rectRotateSensitivitySlider/index.js"),index$2=require("./components/findTrackIDIndex/index.js"),index$4=require("./components/firstFrameDataSwitch/index.js"),index$5=require("./components/selectBoxVisibleSwitch/index.js"),lbUtils=require("@labelbee/lb-utils"),index$7=require("../../../../components/attributeList/index.js"),useAttribute=require("../../../../components/pointCloudView/hooks/useAttribute.js"),lassoSelector=require("../../../../assets/annotation/pointCloudTool/lassoSelector.svg.js"),lassoSelector_a=require("../../../../assets/annotation/pointCloudTool/lassoSelector_a.svg.js"),circleSelector=require("../../../../assets/annotation/pointCloudTool/circleSelector.svg.js"),circleSelector_a=require("../../../../assets/annotation/pointCloudTool/circleSelector_a.svg.js"),icon_rect=require("../../../../assets/annotation/rectTool/icon_rect.svg.js"),icon_rect_a=require("../../../../assets/annotation/rectTool/icon_rect_a.svg.js"),index$9=require("../index.js"),actionCreators=require("../../../../store/annotation/actionCreators.js"),usePointCloudViews=require("../../../../components/pointCloudView/hooks/usePointCloudViews.js"),index$8=require("../../../../components/subAttributeList/index.js"),DynamicResizer=require("../../../../components/DynamicResizer/DynamicResizer.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))__hasOwnProp.call(t,n)&&__defNormalProp(e,n,t[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(t))__propIsEnum.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t));const BoxTrackIDInput=()=>{const[e,t]=React.useState(!1),n=React.useContext(PointCloudContext.PointCloudContext),{pointCloudBoxList:i}=n,{selectedBox:s,updateSelectedBox:o}=useSingleBox.useSingleBox(),[u,c]=React.useState(""),{t:p}=reactI18next.useTranslation(),m=s==null?void 0:s.info.trackID,r=d=>!!i.find(g=>g.trackID===d&&g.id!==(s==null?void 0:s.info.id)),a=(d=!1)=>{const v=parseInt(u,10);if(d&&t(!1),isNaN(v)){antd.message.error(p("PositiveIntegerCheck"));return}if(u.indexOf(".")>-1){antd.message.error(p("NotAllowDecimalPointsInTrackID"));return}if(r(v)){antd.message.error(p("DuplicateTrackIDsExist"));return}if(!(v>0)){antd.message.error(p("PositiveIntegerCheck"));return}S(v)};React.useEffect(()=>{t(!1)},[m]);const S=d=>{var v;const g=o({trackID:d});(v=n==null?void 0:n.topViewInstance)==null||v.updatePolygonList(g!=null?g:[]),n.mainViewInstance&&n.selectedPointCloudBox&&(n==null||n.mainViewInstance.generateBox(n==null?void 0:n.selectedPointCloudBox))};return React__default.default.createElement("div",{style:{padding:24}},React__default.default.createElement("div",{style:{marginBottom:16,display:"flex",justifyContent:"space-between",alignItems:"center"}},React__default.default.createElement("span",null,p("CurrentBoxTrackIDs")),m&&React__default.default.createElement(index$6,{id:m,updateCurrentPolygonList:d=>S(d)})),React__default.default.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",lineHeight:"12px"}},e&&m?React__default.default.createElement(antd.Input,{defaultValue:m,onChange:d=>{c(d.target.value)},disabled:!m,size:"small",onBlur:()=>{a()},onPressEnter:()=>{a(!0)}}):React__default.default.createElement("span",null,m),React__default.default.createElement(icons.EditFilled,{style:{color:"#999",marginLeft:16,cursor:typeof m!="undefined"?"pointer":"not-allowed"},onClick:()=>{m&&t(!e)}})))},isAllowUpdateInSegment=({segmentStatus:e,globalPattern:t})=>t===lbUtils.EPointCloudPattern.Segmentation&&![lbUtils.EPointCloudSegmentStatus.Edit,lbUtils.EPointCloudSegmentStatus.Ready].includes(e),AttributeUpdater=({attributeList:e,subAttributeList:t,toolInstance:n,config:i,stepList:s,stepInfo:o,enableColorPicker:u})=>{const[c,p]=React.useState({segmentStatus:lbUtils.EPointCloudSegmentStatus.Ready}),{selectedBox:m}=useSingleBox.useSingleBox(),r=React.useContext(PointCloudContext.PointCloudContext),{ptSegmentInstance:a}=r,{t:S}=reactI18next.useTranslation(),{defaultAttribute:d}=useAttribute.useAttribute(),v=usePointCloudViews.usePointCloudViews(),{isPointCloudSegmentationPattern:g}=useStatus.useStatus(),D=ctx.useDispatch(),T={fontWeight:500,fontSize:14,margin:"12px 0 8px 20px"};React.useEffect(()=>{if(!!a)return a.on("syncPointCloudStatus",p),()=>{a.unbind("syncPointCloudStatus",p)}},[a]);const j=(l,C)=>{var x,b,P,E,y;const _=(x=i==null?void 0:i.attributeList)==null?void 0:x.map(f=>f.value===l?__spreadProps(__spreadValues({},f),{color:C}):f),w=__spreadProps(__spreadValues({},i),{attributeList:_}),k=JSON.stringify(w),A=s==null?void 0:s.map(f=>(f==null?void 0:f.step)===(o==null?void 0:o.step)?__spreadProps(__spreadValues({},f),{config:k}):f);(b=r==null?void 0:r.topViewInstance)==null||b.updateAttributeList(_),(P=r==null?void 0:r.sideViewInstance)==null||P.updateAttributeList(_),(E=r==null?void 0:r.backViewInstance)==null||E.updateAttributeList(_),(y=r==null?void 0:r.mainViewInstance)==null||y.setConfig(w),D(actionCreators.SetTaskStepList({stepList:A}))},q=l=>{v.updateViewsByDefaultSize&&v.updateViewsByDefaultSize(l)},I=l=>{isAllowUpdateInSegment({globalPattern:r.globalPattern,segmentStatus:c.segmentStatus})||n.setDefaultAttribute(l)},h=(l,C)=>{isAllowUpdateInSegment({globalPattern:r.globalPattern,segmentStatus:c.segmentStatus})||n.setSubAttribute(l,C)},L=e.map(l=>({label:l.key,value:l.value,color:l==null?void 0:l.color,limit:l==null?void 0:l.limit,isDefault:l==null?void 0:l.isDefault})),V=m||c.cacheSegData&&c.segmentStatus===lbUtils.EPointCloudSegmentStatus.Edit,B=g;return React__default.default.createElement("div",{style:{height:"100%",overflow:"auto",display:"flex",flexDirection:"column"}},React__default.default.createElement("div",{style:T},S("Attribute")),React__default.default.createElement("div",{style:{height:0,flex:1,overflowY:"auto",overflowX:"hidden"}},React__default.default.createElement(index$7.default,{list:L,forbidDefault:!0,selectedAttribute:d!=null?d:"",attributeChanged:l=>I(l),updateColorConfig:j,enableColorPicker:u,updateSize:q,forbidShowLimitPopover:B}),React__default.default.createElement(antd.Divider,{style:{margin:0}}),V&&React__default.default.createElement(index$8,{subAttributeList:t,setSubAttribute:h,getValue:l=>{var C,x,b,P;return((x=(C=r.selectedPointCloudBox)==null?void 0:C.subAttribute)==null?void 0:x[l.value])||((P=(b=c.cacheSegData)==null?void 0:b.subAttribute)==null?void 0:P[l.value])}})))},renderSegmentTools=[{toolName:"LassoSelector",commonSvg:lassoSelector,selectedSvg:lassoSelector_a},{toolName:"RectSelector",commonSvg:icon_rect,selectedSvg:icon_rect_a},{toolName:"CircleSelector",commonSvg:circleSelector,selectedSvg:circleSelector_a}],PointCloudSegToolIcon=({toolInstance:e})=>{const{ptSegmentInstance:t}=React.useContext(PointCloudContext.PointCloudContext),[n,i]=React.useState("LassoSelector"),{t:s}=reactI18next.useTranslation();return React.useEffect(()=>{if(!t)return;const o=()=>{i("LassoSelector")},u=()=>{i("RectSelector")},c=()=>{i("CircleSelector")};return t.on("LassoSelector",o),t.on("RectSelector",u),t.on("CircleSelector",c),()=>{t.unbind("LassoSelector",o),t.unbind("RectSelector",u),t.unbind("CircleSelector",c)}},[t]),React__default.default.createElement("div",{className:`${index$9.sidebarCls}__level`},renderSegmentTools.map(o=>{const u=n===o.toolName;return React__default.default.createElement("span",{className:`${index$9.sidebarCls}__toolOption`,key:o.toolName,onClick:()=>t==null?void 0:t.emit(o.toolName)},React__default.default.createElement("img",{className:`${index$9.sidebarCls}__singleTool`,src:u?o==null?void 0:o.selectedSvg:o==null?void 0:o.commonSvg}),React__default.default.createElement("span",{className:index.classnames({[`${index$9.sidebarCls}__toolOption__selected`]:u})},s(o.toolName)))}))},PointCloudToolSidebar=({stepInfo:e,toolInstance:t,imgList:n,imgIndex:i,stepList:s,enableColorPicker:o})=>{var u,c;const{updatePointCloudPattern:p,pointCloudPattern:m,isPointCloudSegmentationPattern:r}=useStatus.useStatus(),a=index.jsonParser(e.config),S=(u=a==null?void 0:a.attributeList)!=null?u:[],d=(a==null?void 0:a.secondaryAttributeConfigurable)===!0?(c=a==null?void 0:a.inputList)!=null?c:[]:[];return r?React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(PointCloudSegToolIcon,{toolInstance:t}),React__default.default.createElement(AttributeUpdater,{toolInstance:t,attributeList:S,subAttributeList:d,config:a,stepList:s,stepInfo:e,enableColorPicker:o})):React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(ToolIcons.ToolIcons,{toolName:lbAnnotation.cTool.EPointCloudName.PointCloud,selectedToolName:m,onChange:v=>p==null?void 0:p(v)}),React__default.default.createElement("div",{style:{flex:1,overflow:"hidden"}},React__default.default.createElement(DynamicResizer,{minTopHeight:42,defaultHeight:400,localKey:"id:"+(e==null?void 0:e.id)+"taskID:"+(e==null?void 0:e.taskID)+"step:"+(e==null?void 0:e.step)+"type:"+(e==null?void 0:e.type)},React__default.default.createElement(AttributeUpdater,{toolInstance:t,attributeList:S,subAttributeList:d,config:a,stepList:s,stepInfo:e,enableColorPicker:o}),(a==null?void 0:a.trackConfigurable)===!0&&m===ToolType.EToolName.Rect?React__default.default.createElement("div",{style:{height:"100%",overflow:"auto"}},React__default.default.createElement(BoxTrackIDInput,null),React__default.default.createElement(antd.Divider,{style:{margin:0}}),React__default.default.createElement(index$1,{imgList:n,imgIndex:i}),React__default.default.createElement(antd.Divider,{style:{margin:0}}),React__default.default.createElement(index$2.default,{imgList:n,imgIndex:i}),React__default.default.createElement(antd.Divider,{style:{margin:0}}),React__default.default.createElement(index$3,null),e.loadPreStep>0&&React__default.default.createElement(index$4,null),React__default.default.createElement(index$5,null)):React__default.default.createElement("div",null))))},mapStateToProps=e=>{var t,n,i,s;const o=StepUtils.getCurrentStepInfo((t=e.annotation)==null?void 0:t.step,(n=e.annotation)==null?void 0:n.stepList),u=(i=e.annotation)==null?void 0:i.toolInstance,c=(s=e.annotation)==null?void 0:s.stepList;return{stepInfo:o,toolInstance:u,imgList:e.annotation.imgList,imgIndex:e.annotation.imgIndex,stepList:c}};var PointCloudToolSidebar$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudToolSidebar);exports.PointCloudSegToolIcon=PointCloudSegToolIcon,exports.default=PointCloudToolSidebar$1;
|