@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
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getFormatSize as At}from"../../components/customResizeHook/index.js";import{ESubmitType as K}from"../../constant/index.js";import Dt from"../../constant/styleString.js";import{ANNOTATION_ACTIONS as i}from"../Actions.js";import{jsonParser as w}from"../../utils/index.js";import Y from"../../utils/AnnotationDataUtils.js";import{ConfigUtils as vt}from"../../utils/ConfigUtils.js";import{composeResultWithBasicImgInfo as ut,composeResult as J}from"../../utils/data.js";import O from"../../utils/StepUtils.js";import X from"../../utils/ToolUtils.js";import{MathUtils as at,CommonToolUtils as yt,AnnotationEngine as Pt,ImgUtils as Rt}from"@labelbee/lb-annotation";import{PointCloudUtils as ct,i18n as G}from"@labelbee/lb-utils";import{Modal as dt}from"antd";import{message as pt}from"antd/es";import _t from"lodash";import{SetAnnotationLoading as $}from"./actionCreators.js";import{EToolName as W}from"../../data/enums/ToolType.js";var Ct=Object.defineProperty,Ot=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,Nt=Object.prototype.propertyIsEnumerable,It=(t,e,r)=>e in t?Ct(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,n=(t,e)=>{for(var r in e||(e={}))bt.call(e,r)&&It(t,r,e[r]);if(gt)for(var r of gt(e))Nt.call(e,r)&&It(t,r,e[r]);return t},l=(t,e)=>Ot(t,ht(e)),mt=(t,e,r)=>new Promise((S,d)=>{var A=m=>{try{T(r.next(m))}catch(y){d(y)}},f=m=>{try{T(r.throw(m))}catch(y){d(y)}},T=m=>m.done?S(m.value):Promise.resolve(m.value).then(A,f);T((r=r.apply(t,e)).next())});const x=(t,e)=>t.find(r=>r.step===e),ft={annotationEngine:null,toolInstance:null,imgList:[],config:"{}",imgIndex:-1,basicIndex:0,imgPageSize:1,step:1,stepList:[],imgNode:new Image,basicResultList:[],resultList:[],stepProgress:0,loading:!1,loadPCDFileLoading:!0,triggerEventAfterIndexChanged:!1,pointCloudLoading:!1,checkMode:!1,predictionResult:[],predictionResultVisible:!1,highlightAttribute:""},Ut=t=>{const{imgList:e,imgPageSize:r}=t;return Math.ceil(e.length/r)},Tt=(t,e)=>t.reduce((r,S)=>{if(S){const d=S.result;if(w(d)[`step_${e}`])return r+1}return r},0)/t.length,Bt=(t,e)=>{const{step:r,stepList:S}=t,d=O.getCurrentStepInfo(r,S),A=vt.jsonParser(d.config);if(X.isVideoTool(d==null?void 0:d.tool)||X.isAudioTool(d==null?void 0:d.tool)||X.isPointCloudTool(d==null?void 0:d.tool)||[W.LLM,W.NLP].includes(d==null?void 0:d.tool))return;const f=document.getElementById("toolContainer");if(!f)throw"Not exist dom named id-toolContainer";const T=At({width:window.innerWidth,height:window.innerHeight}),m=new Pt({container:f,toolName:d.tool,size:T,imgNode:e,config:A,style:JSON.parse(Dt)});return{toolInstance:m==null?void 0:m.toolInstance,annotationEngine:m}},wt=(t,e)=>(r,S)=>mt(void 0,null,function*(){var d,A;const{stepList:f,step:T}=S().annotation,m=O.currentToolIsVideo(T,f),y=O.currentToolIsPointCloud(T,f),h=((d=O.getCurrentStepInfo(T,f))==null?void 0:d.tool)===W.LLM,b=((A=O.getCurrentStepInfo(T,f))==null?void 0:A.tool)===W.NLP,N=O.currentToolIsAudio(T,f);if($(r,!0),yield r(xt(t)),m){r(Ft(t));return}if(y||h||N||b){r(jt(t));return}r(Gt(t,e))}),xt=t=>(e,r)=>mt(void 0,null,function*(){const{getFileData:S,imgList:d}=r().annotation;if(S){const A=yield S(d[t],t);e({type:i.SET_FILE_DATA,payload:{fileData:A,index:t}})}}),Ft=t=>e=>{e({type:i.LOAD_FILE_DATA,payload:{nextIndex:t}})},jt=t=>e=>{$(e,!1),e({type:i.LOAD_FILE_DATA,payload:{nextIndex:t}})},Gt=(t,e)=>(r,S)=>{var d;const{toolInstance:A,imgList:f}=S().annotation,T=(d=f==null?void 0:f[t])==null?void 0:d.url;Rt.load(T).then(m=>{$(r,!1),r({type:i.LOAD_FILE_DATA,payload:{imgNode:m,nextIndex:t,nextBasicIndex:e}})}).catch(()=>{$(r,!1),A==null||A.setErrorImg(),r({type:i.LOAD_FILE_DATA,payload:{nextIndex:t,nextBasicIndex:e}})})},Vt=({toolInstance:t,imgList:e,imgIndex:r,stepList:S,step:d=1})=>{var A,f,T,m;const y=((A=e[r])==null?void 0:A.result)||"",[h,b,N]=(f=t==null?void 0:t.exportData())!=null?f:[],V=(m=(T=t==null?void 0:t.exportCustomData)==null?void 0:T.call(t))!=null?m:{},M=ut(y,b),k=J(M,{step:d,stepList:S},{rect:h},V);return e.map((F,H)=>H===r?n(l(n({},F),{result:k}),N):n({},F))},Mt=(t=n({},ft),e)=>{var r,S,d,A,f,T,m,y,h,b,N,V,M,k,F,H,q,Z,Q,tt,et,ot,nt,st,lt;switch(e.type){case i.INIT_ALL_STATE:return n(n({},t),ft);case i.UPDATE_TOOL_INSTANCE:return l(n({},t),{toolInstance:e.payload.toolInstance});case i.UPDATE_IMG_LIST:return l(n({},t),{imgList:e.payload.imgList});case i.CALC_STEP_PROGRESS:{const{imgList:o,step:s}=t,u=Tt(o,s);return l(n({},t),{stepProgress:u})}case i.SUBMIT_FILE_DATA:{const{imgList:o,imgIndex:s,step:u,stepList:a,toolInstance:p,onSubmit:c,resultList:L}=t;if(!p||!o[s])return t;const g=((r=o[s])==null?void 0:r.result)||"",[,_,I]=(S=p==null?void 0:p.exportData())!=null?S:[],E=(A=(d=p==null?void 0:p.exportCustomData)==null?void 0:d.call(p))!=null?A:{},D=ut(g,_),P=J(D,{step:u,stepList:a},{rect:L},E),v=t.imgList.map((C,R)=>{if(R===s){const j=Y.dataCorrection(P,g,u,a);return n(l(n({},C),{result:j}),I)}return C});if(((f=e.payload)==null?void 0:f.submitType)===K.SyncImgList)return l(n({},t),{imgList:v});c&&c([v[s]],(T=e.payload)==null?void 0:T.submitType,s,v);const U=Tt(v,u);return l(n({},t),{stepProgress:U,imgList:v})}case i.SAVE_RESULT:{const{imgList:o,imgIndex:s,onSave:u}=t;return u==null||u(o[s],s,o),n({},t)}case i.SUBMIT_RESULT:{const{imgList:o,basicIndex:s,resultList:u,toolInstance:a,basicResultList:p}=t;if(!a)return t;const[c]=(m=a==null?void 0:a.exportData())!=null?m:[];let L=c;if((p==null?void 0:p.length)>0){const g=(y=p[s])==null?void 0:y.id,_=c.map(I=>l(n({},I),{sourceID:g}));L=_t.cloneDeep(u).filter(I=>I.sourceID!==g),L.push(..._)}return l(n({},t),{resultList:L,imgList:o})}case i.SET_BASIC_INDEX:{const{toolInstance:o,step:s,imgList:u,imgIndex:a,stepList:p,annotationEngine:c,resultList:L,basicResultList:g}=t;if(!o||!c)return t;const _=e.payload.basicIndex,I=(h=g[_])==null?void 0:h.id,E=w((b=u[a])==null?void 0:b.result),D=(L||[]).filter(j=>j.sourceID===I),P=x(p,s),{dataSourceStep:v,tool:U}=P,C=x(p,v);let R=[];return v&&U&&(R=(N=E[`step_${v}`])==null?void 0:N.result,(R==null?void 0:R.length)>0?(c==null||c.setBasicInfo(C.tool,R[_]),c==null||c.launchOperation()):(c==null||c.setBasicInfo(C.tool),c==null||c.forbidOperation(),pt.info(G.t("NoDependency")))),o==null||o.setResult(D),o==null||o.history.initRecord(D,!0),l(n({},t),{basicIndex:_})}case i.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:{const{triggerEventAfterIndexChanged:o}=e.payload;return l(n({},t),{triggerEventAfterIndexChanged:!!o})}case i.LOAD_FILE_DATA:{const{imgList:o,step:s,toolInstance:u,annotationEngine:a,stepList:p}=t;if(!u)return l(n({},t),{imgIndex:e.payload.nextIndex});const c=O.getCurrentStepInfo(s,p),{nextIndex:L,imgNode:g,nextBasicIndex:_,imgError:I}=e.payload,E=_!=null?_:0,D=w((V=o[L])==null?void 0:V.result),P=D[`step_${c.step}`],v=!P,U={rotate:(M=D.rotate)!=null?M:0,valid:(k=D.valid)!=null?k:!0};g&&I!==!0?a==null||a.setImgNode(g,U):u==null||u.setValid(U.valid);const C=x(p,c.step),{dataSourceStep:R,tool:j}=C,it=x(p,R),rt=R&&j,B=(H=(F=D[`step_${R}`])==null?void 0:F.result)!=null?H:[],z=Y.getInitialResultList(P==null?void 0:P.result,u,C,B,v);if(a==null||a.launchOperation(),rt&&((B==null?void 0:B.length)>0?a==null||a.setBasicInfo(it.tool,B[E]):(a==null||a.setBasicInfo(it.tool),a==null||a.forbidOperation(),pt.info(G.t("NoDependency")))),c.tool!=="check"){const Lt=(Z=(q=B[E])==null?void 0:q.id)!=null?Z:"",Et=rt?z.filter(St=>yt.isSameSourceID(St.sourceID,Lt)):z;(Q=u==null?void 0:u.history)==null||Q.initRecord(z,!0),u==null||u.setResult(Et)}return l(n({},t),{imgIndex:L,basicIndex:E,basicResultList:B,resultList:z})}case i.UPDATE_ANNOTATION_CONFIG:return l(n({},t),{config:(tt=e.payload.config)!=null?tt:"{}"});case i.SET_TASK_STEP_LIST:{const{stepList:o}=e.payload;return l(n({},t),{stepList:o})}case i.SET_TASK_CONFIG:{const{stepList:o,step:s}=e.payload;return l(n({},t),{stepList:o,step:s})}case i.INIT_TOOL:{const{imgNode:o}=t,s=Bt(t,o);if(s){const{toolInstance:u,annotationEngine:a}=s;return l(n({},t),{toolInstance:u,annotationEngine:a})}return n({},t)}case i.SET_TOOL:{const o=(et=e.payload)==null?void 0:et.instance;return o?l(n({},t),{toolInstance:o}):n({},t)}case i.UPDATE_ON_SUBMIT:return l(n({},t),{onSubmit:e.payload.onSubmit});case i.UPDATE_ON_SAVE:return l(n({},t),{onSave:e.payload.onSave});case i.UPDATE_ON_PAGE_CHANGE:return l(n({},t),{onPageChange:e.payload.onPageChange});case i.SET_PREDICT_RESULT:return l(n({},t),{predictionResult:e.payload.result});case i.SET_PREDICT_RESULT_VISIBLE:return l(n({},t),{predictionResultVisible:e.payload.visible});case i.UPDATE_ON_STEP_CHANGE:return l(n({},t),{onStepChange:e.payload.onStepChange});case i.UPDATE_GET_FILE_DATA:return l(n({},t),{getFileData:e.payload.getFileData});case i.UPDATE_PAGE_SIZE:return l(n({},t),{pageSize:e.payload.pageSize});case i.UPDATE_LOAD_FILE_LIST:return l(n({},t),{loadFileList:e.payload.loadFileList});case i.UPDATE_BEFORE_ROTATE:return l(n({},t),{beforeRotate:e.payload.beforeRotate});case i.UPDATE_PRE_DATA_PROCESS:return l(n({},t),{preDataProcess:e.payload.preDataProcess});case i.SKIP_BEFORE_PAGE_TURNING:return l(n({},t),{skipBeforePageTurning:e.payload.skipBeforePageTurning});case i.SET_FILE_DATA:{const{fileData:o,index:s}=e.payload,{imgList:u}=t,a=[...u];return a[s]=n(n({},a[s]),o),l(n({},t),{imgList:a})}case i.UPDATE_ROTATE:{const{toolInstance:o,beforeRotate:s}=t;return s&&s()===!1||(ot=o==null?void 0:o.updateRotate)==null||ot.call(o),t}case i.UPDATE_ANNOTATION_VALID:{const{toolInstance:o}=t,s=(nt=o==null?void 0:o.valid)!=null?nt:!0;return dt.destroyAll(),dt.confirm({content:G.t(s?"updateValidFromValidToInValid":"updateValidFromInValidToValid"),onOk:()=>{o==null||o.setValid(!s)},okText:G.t("Confirm"),cancelText:G.t("Cancel")}),t}case i.COPY_BACKWARD_RESULT:{const{toolInstance:o,imgIndex:s,imgList:u,step:a}=t;if(!o)return t;if(s===0||s>=u.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),t;const p=u[s-1].result;if(!p)return t;const c=Y.copyResultChange(p,a,(st=u[s].result)!=null?st:"");u[s]=l(n({},u[s]),{result:c});const g=w(c)[`step_${a}`],_=(g==null?void 0:g.result)||[];return o==null||o.setResult(_),o==null||o.history.pushHistory(_),(lt=o==null?void 0:o.asyncData)==null||lt.call(o,u[s]),l(n({},t),{imgList:[...u]})}case i.SET_STEP:{const{stepList:o,annotationEngine:s}=t,{toStep:u}=e.payload;if(s){const a=x(o,u);return s==null||s.setToolName(a.tool,a.config),l(n({},t),{step:u,toolInstance:s==null?void 0:s.toolInstance})}return l(n({},t),{step:u})}case i.SET_LOADPCDFILE_LOADING:{const{loadPCDFileLoading:o}=e.payload;return l(n({},t),{loadPCDFileLoading:!!o})}case i.SET_LOADING:{const{loading:o}=e.payload;return l(n({},t),{loading:!!o})}case i.SET_POINT_CLOUD_LOADING:{const{pointCloudLoading:o}=e.payload;return l(n({},t),{pointCloudLoading:!!o})}case i.SET_CHECK_MODE:{const{checkMode:o}=e.payload;return l(n({},t),{checkMode:!!o})}case i.SET_HIGHLIGHT_ATTRIBUTE:{const{attribute:o}=e.payload;return l(n({},t),{highlightAttribute:o})}case i.BATCH_UPDATE_TRACK_ID:{const{id:o,newID:s,rangeIndex:u,imgList:a}=e.payload,{imgIndex:p,onSubmit:c}=t,L=[],g=a.map((_,I)=>{if(at.isInRange(I,u)){const E=l(n({},_),{result:ct.batchUpdateTrackID({id:o,newID:s,result:_.result})});return L.push({imgIndex:I,newInfo:E}),E}return _});return c&&c([g[p]],K.BatchUpdateTrackID,p,g,{updateImgList:L}),l(n({},t),{imgList:g})}case i.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:o,newData:s,rangeIndex:u}=e.payload,{imgList:a,imgIndex:p,onSubmit:c}=t,L=[],g=a.map((_,I)=>{if(at.isInRange(I,u)){const E=l(n({},_),{result:ct.batchUpdateResultByTrackID({id:o,newData:s,result:_.result})});return L.push({imgIndex:I,newInfo:E}),E}return _});return c&&c([g[p]],K.BatchUpdateTrackID,p,g,{updateImgList:L}),l(n({},t),{imgList:g})}case i.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:{const{onSubmit:o,imgList:s,stepList:u,step:a,predictionResult:p}=t,c={};p.forEach(I=>{const{index:E}=I;c[E]=_t.pick(I,["center","width","height","depth","rotation","id","attribute","valid","trackID"])});const L=`step_${a}`,g=[],_=s.map((I,E)=>{if(c[E]){const D=I.result==="{}"?w(J("",{step:a,stepList:u},{rect:[]},{})):w(I.result);D[L].result.push(c[E]);const P=l(n({},I),{result:JSON.stringify(D)});return g.push({imgIndex:E,newInfo:P}),P}return I});return o==null||o(_,K.BatchUpdateImgList,-1,_,{updateImgList:g}),l(n({},t),{imgList:_})}default:return t}};export{wt as LoadFileAndFileData,Mt as annotationReducer,Vt as composeResultByToolInstance,x as getStepConfig,Ut as getTotalPage};
|
|
1
|
+
import{getFormatSize as yt}from"../../components/customResizeHook/index.js";import{ESubmitType as W}from"../../constant/index.js";import Rt from"../../constant/styleString.js";import{ANNOTATION_ACTIONS as i}from"../Actions.js";import{jsonParser as x}from"../../utils/index.js";import X from"../../utils/AnnotationDataUtils.js";import{ConfigUtils as Pt}from"../../utils/ConfigUtils.js";import{composeResultWithBasicImgInfo as dt,composeResult as Y}from"../../utils/data.js";import h from"../../utils/StepUtils.js";import J from"../../utils/ToolUtils.js";import{MathUtils as pt,CommonToolUtils as Ct,AnnotationEngine as ht,ImgUtils as Ot}from"@labelbee/lb-annotation";import{PointCloudUtils as gt,i18n as M}from"@labelbee/lb-utils";import{Modal as _t}from"antd";import{message as It}from"antd/es";import mt from"lodash";import{SetAnnotationLoading as $}from"./actionCreators.js";import{EToolName as w}from"../../data/enums/ToolType.js";var bt=Object.defineProperty,Nt=Object.defineProperties,Ut=Object.getOwnPropertyDescriptors,ft=Object.getOwnPropertySymbols,Bt=Object.prototype.hasOwnProperty,xt=Object.prototype.propertyIsEnumerable,Lt=(t,e,u)=>e in t?bt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):t[e]=u,o=(t,e)=>{for(var u in e||(e={}))Bt.call(e,u)&&Lt(t,u,e[u]);if(ft)for(var u of ft(e))xt.call(e,u)&&Lt(t,u,e[u]);return t},s=(t,e)=>Nt(t,Ut(e)),Tt=(t,e,u)=>new Promise((S,d)=>{var A=m=>{try{E(u.next(m))}catch(y){d(y)}},T=m=>{try{E(u.throw(m))}catch(y){d(y)}},E=m=>m.done?S(m.value):Promise.resolve(m.value).then(A,T);E((u=u.apply(t,e)).next())});const F=(t,e)=>t.find(u=>u.step===e),Et={annotationEngine:null,toolInstance:null,imgList:[],config:"{}",imgIndex:-1,basicIndex:0,imgPageSize:1,step:1,stepList:[],imgNode:new Image,basicResultList:[],resultList:[],stepProgress:0,loading:!1,loadPCDFileLoading:!0,triggerEventAfterIndexChanged:!1,pointCloudLoading:!1,checkMode:!1,predictionResult:[],predictionResultVisible:!1,highlightAttribute:""},wt=t=>{const{imgList:e,imgPageSize:u}=t;return Math.ceil(e.length/u)},St=(t,e)=>t.reduce((u,S)=>{if(S){const d=S.result;if(x(d)[`step_${e}`])return u+1}return u},0)/t.length,Ft=(t,e)=>{const{step:u,stepList:S}=t,d=h.getCurrentStepInfo(u,S),A=Pt.jsonParser(d.config);if(J.isVideoTool(d==null?void 0:d.tool)||J.isAudioTool(d==null?void 0:d.tool)||J.isPointCloudTool(d==null?void 0:d.tool)||[w.LLM,w.NLP,w.LLMMultiWheel].includes(d==null?void 0:d.tool))return;const T=document.getElementById("toolContainer");if(!T)throw"Not exist dom named id-toolContainer";const E=yt({width:window.innerWidth,height:window.innerHeight}),m=new ht({container:T,toolName:d.tool,size:E,imgNode:e,config:A,style:JSON.parse(Rt)});return{toolInstance:m==null?void 0:m.toolInstance,annotationEngine:m}},jt=(t,e)=>(u,S)=>Tt(void 0,null,function*(){var d,A;const{stepList:T,step:E}=S().annotation,m=h.currentToolIsVideo(E,T),y=h.currentToolIsPointCloud(E,T),O=[w.LLM,w.LLMMultiWheel].includes((d=h.getCurrentStepInfo(E,T))==null?void 0:d.tool),b=((A=h.getCurrentStepInfo(E,T))==null?void 0:A.tool)===w.NLP,N=h.currentToolIsAudio(E,T);if($(u,!0),yield u(Gt(t)),m){u(Mt(t));return}if(y||O||N||b){u(Vt(t));return}u(kt(t,e))}),Gt=t=>(e,u)=>Tt(void 0,null,function*(){const{getFileData:S,imgList:d}=u().annotation;if(S){const A=yield S(d[t],t);e({type:i.SET_FILE_DATA,payload:{fileData:A,index:t}})}}),Mt=t=>e=>{e({type:i.LOAD_FILE_DATA,payload:{nextIndex:t}})},Vt=t=>e=>{$(e,!1),e({type:i.LOAD_FILE_DATA,payload:{nextIndex:t}})},kt=(t,e)=>(u,S)=>{var d;const{toolInstance:A,imgList:T}=S().annotation,E=(d=T==null?void 0:T[t])==null?void 0:d.url;Ot.load(E).then(m=>{$(u,!1),u({type:i.LOAD_FILE_DATA,payload:{imgNode:m,nextIndex:t,nextBasicIndex:e}})}).catch(()=>{$(u,!1),A==null||A.setErrorImg(),u({type:i.LOAD_FILE_DATA,payload:{nextIndex:t,nextBasicIndex:e}})})},Ht=({toolInstance:t,imgList:e,imgIndex:u,stepList:S,step:d=1})=>{var A,T,E,m;const y=((A=e[u])==null?void 0:A.result)||"",[O,b,N]=(T=t==null?void 0:t.exportData())!=null?T:[],V=(m=(E=t==null?void 0:t.exportCustomData)==null?void 0:E.call(t))!=null?m:{},k=dt(y,b),H=Y(k,{step:d,stepList:S},{rect:O},V);return e.map((j,z)=>z===u?o(s(o({},j),{result:H}),N):o({},j))},zt=(t=o({},Et),e)=>{var u,S,d,A,T,E,m,y,O,b,N,V,k,H,j,z,q,Z,Q,tt,et,nt,ot,lt,st,it,rt,ut;switch(e.type){case i.INIT_ALL_STATE:return o(o({},t),Et);case i.UPDATE_TOOL_INSTANCE:return s(o({},t),{toolInstance:e.payload.toolInstance});case i.UPDATE_IMG_LIST:return s(o({},t),{imgList:e.payload.imgList});case i.CALC_STEP_PROGRESS:{const{imgList:n,step:l}=t,r=St(n,l);return s(o({},t),{stepProgress:r})}case i.SUBMIT_FILE_DATA:{const{imgList:n,imgIndex:l,step:r,stepList:a,toolInstance:p,onSubmit:c,resultList:f}=t;if(!p||!n[l])return t;const I=((u=n[l])==null?void 0:u.result)||"",[,_,g]=(S=p==null?void 0:p.exportData())!=null?S:[],L=(A=(d=p==null?void 0:p.exportCustomData)==null?void 0:d.call(p))!=null?A:{},D=dt(I,_),v=Y(D,{step:r,stepList:a},{rect:f},L),P=t.imgList.map((C,R)=>{if(R===l){const G=X.dataCorrection(v,I,r,a);return o(s(o({},C),{result:G}),g)}return C});if(((T=e.payload)==null?void 0:T.submitType)===W.SyncImgList)return s(o({},t),{imgList:P});const U=St(P,r);return s(o({},t),{stepProgress:U,imgList:P})}case i.SAVE_RESULT:{const{imgList:n,imgIndex:l,onSave:r}=t;return r==null||r(n[l],l,n),o({},t)}case i.SUBMIT_RESULT:{const{imgList:n,basicIndex:l,resultList:r,toolInstance:a,basicResultList:p}=t;if(!a)return t;const[c]=(E=a==null?void 0:a.exportData())!=null?E:[];let f=c;if((p==null?void 0:p.length)>0){const I=(m=p[l])==null?void 0:m.id,_=c.map(g=>s(o({},g),{sourceID:I}));f=mt.cloneDeep(r).filter(g=>g.sourceID!==I),f.push(..._)}return s(o({},t),{resultList:f,imgList:n})}case i.SET_BASIC_INDEX:{const{toolInstance:n,step:l,imgList:r,imgIndex:a,stepList:p,annotationEngine:c,resultList:f,basicResultList:I}=t;if(!n||!c)return t;const _=e.payload.basicIndex,g=(y=I[_])==null?void 0:y.id,L=x((O=r[a])==null?void 0:O.result),D=(f||[]).filter(G=>G.sourceID===g),v=F(p,l),{dataSourceStep:P,tool:U}=v,C=F(p,P);let R=[];return P&&U&&(R=(b=L[`step_${P}`])==null?void 0:b.result,(R==null?void 0:R.length)>0?(c==null||c.setBasicInfo(C.tool,R[_]),c==null||c.launchOperation()):(c==null||c.setBasicInfo(C.tool),c==null||c.forbidOperation(),It.info(M.t("NoDependency")))),n==null||n.setResult(D),n==null||n.history.initRecord(D,!0),s(o({},t),{basicIndex:_})}case i.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:{const{triggerEventAfterIndexChanged:n}=e.payload;return s(o({},t),{triggerEventAfterIndexChanged:!!n})}case i.LOAD_FILE_DATA:{const{imgList:n,step:l,toolInstance:r,annotationEngine:a,stepList:p}=t;if(!r)return s(o({},t),{imgIndex:e.payload.nextIndex});const c=h.getCurrentStepInfo(l,p),{nextIndex:f,imgNode:I,nextBasicIndex:_,imgError:g}=e.payload,L=_!=null?_:0,D=x((N=n[f])==null?void 0:N.result),v=D[`step_${c.step}`],P=!v,U={rotate:(V=D.rotate)!=null?V:0,valid:(k=D.valid)!=null?k:!0};I&&g!==!0?a==null||a.setImgNode(I,U):r==null||r.setValid(U.valid);const C=F(p,c.step),{dataSourceStep:R,tool:G}=C,at=F(p,R),ct=R&&G,B=(j=(H=D[`step_${R}`])==null?void 0:H.result)!=null?j:[],K=X.getInitialResultList(v==null?void 0:v.result,r,C,B,P);if(a==null||a.launchOperation(),ct&&((B==null?void 0:B.length)>0?a==null||a.setBasicInfo(at.tool,B[L]):(a==null||a.setBasicInfo(at.tool),a==null||a.forbidOperation(),It.info(M.t("NoDependency")))),c.tool!=="check"){const At=(q=(z=B[L])==null?void 0:z.id)!=null?q:"",Dt=ct?K.filter(vt=>Ct.isSameSourceID(vt.sourceID,At)):K;(Z=r==null?void 0:r.history)==null||Z.initRecord(K,!0),r==null||r.setResult(Dt)}return s(o({},t),{imgIndex:f,basicIndex:L,basicResultList:B,resultList:K})}case i.UPDATE_ANNOTATION_CONFIG:return s(o({},t),{config:(Q=e.payload.config)!=null?Q:"{}"});case i.SET_TASK_STEP_LIST:{const{stepList:n}=e.payload;return s(o({},t),{stepList:n})}case i.SET_TASK_CONFIG:{const{stepList:n,step:l}=e.payload;return s(o({},t),{stepList:n,step:l})}case i.INIT_TOOL:{const{imgNode:n}=t,l=Ft(t,n);if(l){const{toolInstance:r,annotationEngine:a}=l;return s(o({},t),{toolInstance:r,annotationEngine:a})}return o({},t)}case i.SET_TOOL:{const n=(tt=e.payload)==null?void 0:tt.instance;return n?s(o({},t),{toolInstance:n}):o({},t)}case i.UPDATE_ON_SUBMIT:return s(o({},t),{onSubmit:e.payload.onSubmit});case i.UPDATE_ON_SAVE:return s(o({},t),{onSave:e.payload.onSave});case i.UPDATE_ON_PAGE_CHANGE:return s(o({},t),{onPageChange:e.payload.onPageChange});case i.SET_PREDICT_RESULT:return s(o({},t),{predictionResult:e.payload.result});case i.SET_PREDICT_RESULT_VISIBLE:return s(o({},t),{predictionResultVisible:e.payload.visible});case i.UPDATE_ON_STEP_CHANGE:return s(o({},t),{onStepChange:e.payload.onStepChange});case i.UPDATE_GET_FILE_DATA:return s(o({},t),{getFileData:e.payload.getFileData});case i.UPDATE_PAGE_SIZE:return s(o({},t),{pageSize:e.payload.pageSize});case i.UPDATE_LOAD_FILE_LIST:return s(o({},t),{loadFileList:e.payload.loadFileList});case i.UPDATE_BEFORE_ROTATE:return s(o({},t),{beforeRotate:e.payload.beforeRotate});case i.UPDATE_PRE_DATA_PROCESS:return s(o({},t),{preDataProcess:e.payload.preDataProcess});case i.UPDATE_IMG_INDEX_BY_EXTERNAL:return s(o({},t),{getImgIndexByExternal:e.payload.getImgIndexByExternal});case i.SKIP_BEFORE_PAGE_TURNING:return s(o({},t),{skipBeforePageTurning:e.payload.skipBeforePageTurning});case i.SET_FILE_DATA:{const{fileData:n,index:l}=e.payload,{imgList:r}=t,a=[...r];return a[l]=o(o({},a[l]),n),s(o({},t),{imgList:a})}case i.UPDATE_ROTATE:{const{toolInstance:n,beforeRotate:l}=t;return l&&l()===!1||(et=n==null?void 0:n.updateRotate)==null||et.call(n),t}case i.UPDATE_ANNOTATION_VALID:{const{toolInstance:n}=t,l=(nt=n==null?void 0:n.valid)!=null?nt:!0;return _t.destroyAll(),_t.confirm({content:M.t(l?"updateValidFromValidToInValid":"updateValidFromInValidToValid"),onOk:()=>{n==null||n.setValid(!l)},okText:M.t("Confirm"),cancelText:M.t("Cancel")}),t}case i.COPY_BACKWARD_RESULT:{const{toolInstance:n,imgIndex:l,imgList:r,step:a,stepList:p}=t;if(!n)return t;if(l===0||l>=r.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),t;const c=r[l-1].result;if(!c)return t;const f=h.getCurrentStepInfo(a,p),I=(ot=f==null?void 0:f.step)!=null?ot:a,_=(lt=n==null?void 0:n.valid)!=null?lt:!0,g=X.copyResultChange({copyResult:c,step:I,currentResult:(st=r[l].result)!=null?st:"",preMappingImgList:(it=r[l-1].mappingImgList)!=null?it:[],mappingImgList:(rt=r[l].mappingImgList)!=null?rt:[],valid:_});r[l]=s(o({},r[l]),{result:g});const D=x(g)[`step_${a}`],v=(D==null?void 0:D.result)||[];return n==null||n.setResult(v),n==null||n.history.pushHistory(v),(ut=n==null?void 0:n.asyncData)==null||ut.call(n,r[l]),s(o({},t),{imgList:[...r]})}case i.SET_STEP:{const{stepList:n,annotationEngine:l}=t,{toStep:r}=e.payload;if(l){const a=F(n,r);return l==null||l.setToolName(a.tool,a.config),s(o({},t),{step:r,toolInstance:l==null?void 0:l.toolInstance})}return s(o({},t),{step:r})}case i.SET_LOADPCDFILE_LOADING:{const{loadPCDFileLoading:n}=e.payload;return s(o({},t),{loadPCDFileLoading:!!n})}case i.SET_LOADING:{const{loading:n}=e.payload;return s(o({},t),{loading:!!n})}case i.SET_POINT_CLOUD_LOADING:{const{pointCloudLoading:n}=e.payload;return s(o({},t),{pointCloudLoading:!!n})}case i.SET_CHECK_MODE:{const{checkMode:n}=e.payload;return s(o({},t),{checkMode:!!n})}case i.SET_HIGHLIGHT_ATTRIBUTE:{const{attribute:n}=e.payload;return s(o({},t),{highlightAttribute:n})}case i.BATCH_UPDATE_TRACK_ID:{const{id:n,newID:l,rangeIndex:r,imgList:a}=e.payload,{imgIndex:p,onSubmit:c}=t,f=[],I=a.map((_,g)=>{if(pt.isInRange(g,r)){const L=s(o({},_),{result:gt.batchUpdateTrackID({id:n,newID:l,result:_.result})});return f.push({imgIndex:g,newInfo:L}),L}return _});return c&&c([I[p]],W.BatchUpdateTrackID,p,I,{updateImgList:f}),s(o({},t),{imgList:I})}case i.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:n,newData:l,rangeIndex:r}=e.payload,{imgList:a,imgIndex:p,onSubmit:c}=t,f=[],I=a.map((_,g)=>{if(pt.isInRange(g,r)){const L=s(o({},_),{result:gt.batchUpdateResultByTrackID({id:n,newData:l,result:_.result})});return f.push({imgIndex:g,newInfo:L}),L}return _});return c&&c([I[p]],W.BatchUpdateTrackID,p,I,{updateImgList:f}),s(o({},t),{imgList:I})}case i.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:{const{onSubmit:n,imgList:l,stepList:r,step:a,predictionResult:p}=t,c={};p.forEach(g=>{const{index:L}=g;c[L]=mt.pick(g,["center","width","height","depth","rotation","id","attribute","valid","trackID"])});const f=`step_${a}`,I=[],_=l.map((g,L)=>{if(c[L]){const D=g.result==="{}"?x(Y("",{step:a,stepList:r},{rect:[]},{})):x(g.result);D[f].result.push(c[L]);const v=s(o({},g),{result:JSON.stringify(D)});return I.push({imgIndex:L,newInfo:v}),v}return g});return n==null||n(_,W.BatchUpdateImgList,-1,_,{updateImgList:I}),s(o({},t),{imgList:_})}default:return t}};export{jt as LoadFileAndFileData,zt as annotationReducer,Ht as composeResultByToolInstance,F as getStepConfig,wt as getTotalPage};
|
package/es/store/ctx.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{createDispatchHook as o,createSelectorHook as s}from"react-redux";const t=e.createContext(void 0),r=o(t),c=s(t),n=e.createContext({hoverKey:-1,newAnswerList:[],setHoverKey:()=>{},modelAPIResponse:[],setModelAPIResponse:()=>{},setNewAnswerList:()=>{}}),a=e.createContext({highlightKey:"",setHighlightKey:()=>{}});export{n as LLMContext,t as LabelBeeContext,a as NLPContext,r as useDispatch,c as useSelector};
|
|
1
|
+
import e from"react";import{createDispatchHook as o,createSelectorHook as s}from"react-redux";const t=e.createContext(void 0),r=o(t),c=s(t),n=e.createContext({hoverKey:-1,newAnswerList:[],setHoverKey:()=>{},modelAPIResponse:[],setModelAPIResponse:()=>{},setNewAnswerList:()=>{}}),a=e.createContext({highlightKey:"",setHighlightKey:()=>{}});e.createContext({hoverKey:-1,setHoverKey:()=>{},selectKey:1,setSelectKey:()=>{}});export{n as LLMContext,t as LabelBeeContext,a as NLPContext,r as useDispatch,c as useSelector};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=(t,o)=>({onlyLoadFirstData:!1,setOnlyLoadFirstData:a=>t(s=>({onlyLoadFirstData:a}))});export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{create as l}from"zustand";import n from"./baseToolConfig.js";import f from"./pointCloudToolConfig.js";var i=Object.defineProperty,t=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,a=(e,r,o)=>r in e?i(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o,p=(e,r)=>{for(var o in r||(r={}))s.call(r,o)&&a(e,o,r[o]);if(t)for(var o of t(r))u.call(r,o)&&a(e,o,r[o]);return e};const m=l((e,r,o)=>p(p({},n(e)),f(e)));export{m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o=(e,l)=>({selectBoxVisibleSwitch:!1,setSelectBoxVisibleSwitch:t=>e(()=>({selectBoxVisibleSwitch:t}))});export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{uuid as
|
|
1
|
+
import{uuid as E}from"@labelbee/lb-annotation";import{jsonParser as I}from"./index.js";import{EToolName as R}from"../data/enums/ToolType.js";import S from"lodash";import L from"./StepUtils.js";import{message as N}from"antd";import{i18n as F}from"@labelbee/lb-utils";class _{static traverseDF(t,s,e,i){s(t,e,i),typeof t=="object"&&t!==null&&(Array.isArray(t)?t.forEach((n,r)=>{this.traverseDF(n,s,r,t)}):Object.keys(t).forEach(n=>{this.traverseDF(t[n],s,n,t)}))}static getNextPath(t){var s,e,i;const{prePath:n,preMappingImgList:r,nextMappingImgList:a}=t,o=(e=(s=r==null?void 0:r.find(u=>u.path===n))==null?void 0:s.calib)==null?void 0:e.calName;return(i=a.find(u=>{var l;return((l=u.calib)==null?void 0:l.calName)===o}))==null?void 0:i.path}static copyResultItemHandler(t){const{item:s,key:e,parent:i,mappingImgList:n,preMappingImgList:r}=t,a=e===void 0?void 0:i[e];return e==="id"&&(i.id=E(8,62)),e==="imageName"&&(i.imageName=this.getNextPath({prePath:s,preMappingImgList:r,nextMappingImgList:n})),{value:e===void 0?void 0:i[e],oldValue:a}}static copyResultChange(t){const{copyResult:s,step:e,currentResult:i,mappingImgList:n,preMappingImgList:r,valid:a}=t;try{const o=I(s),c=I(i);c.valid=a;const u=`step_${e}`;if(o[u]){const l=o[u],g=["result","resultRect"],h=new Map;if(g.forEach(d=>{l[d]&&this.traverseDF(l[d],(p,f,m)=>{const{value:y,oldValue:x}=this.copyResultItemHandler({item:p,key:f,parent:m,mappingImgList:n,preMappingImgList:r});d==="result"&&f==="id"&&y!==void 0&&x!==void 0&&h.set(x,y)})}),h.size){const d=l.resultRect;Array.isArray(d)&&d.forEach(p=>{const f=p.extId,m=h.get(f);f!==void 0&&m!==void 0&&(p.extId=m)})}const D=["resultRect","rects"],v=[];return this.traverseDF(l,(d,p,f)=>{S.isString(p)&&D.includes(p)&&Array.isArray(d)&&(f[p]=d.filter(m=>m.imageName?!0:(v.push(m),!1)))}),v.length&&(console.log(v),N.info(F.t("PartialResultsReplicationFailure"))),c[u]=l,JSON.stringify(c)}return s}catch(o){N.info(F.t("FailedToCopyResults"))}}static isResultSourceMatchedDependence(t,s){const e=t==null?void 0:t.map(n=>n.sourceID).sort(),i=s==null?void 0:s.map(n=>n.id).sort();return S.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,n){const r=t!=null?t:[];switch(e.tool){case R.Tag:case R.Text:{if(e.dataSourceStep>0){const a=this.deltaUpdateBasicResultList(r,i);if(a.length>0)return r.concat(s.getInitResultList(e.dataSourceStep,a))}return n!==!0?r:s.getInitResultList(e.dataSourceStep,i)}default:return r}}static dataCorrection(t,s,e,i){var n,r;try{const o=`step_${L.getStepInfo(e,i).step}`,c=I(t),u=I(s),l=(n=c[o])==null?void 0:n.result,g=(r=u[o])==null?void 0:r.result;if(!g||S.isEqual(l.sort(this.idCmp),g.sort(this.idCmp)))return t;const h=this.findDeletedIds(l,g);if(h.length===0)return t;const D=e,v=this.getStepKeys(c).sort();return this.deleteRes(c,D,h,v),JSON.stringify(c)}catch(a){return console.error(a),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(n=>{if(n>s){const r=t[`step_${n}`];if([R.FolderTag,R.Segmentation].includes(r.tool))return;if(r.dataSourceStep===s){const a=[];r.result=r.result.filter(o=>e.includes(o.sourceID)?(a.push(o.id),!1):!0),this.deleteRes(t,n,a,i)}else r.result=r.result.filter(a=>!e.includes(a.sourceID))}})}}export{_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getCuboidFromPointCloudBox as l}from"@labelbee/lb-annotation";import{isEqual as p}from"lodash";var i;(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"})(i||(i={}));var d;(function(t){t.ChangeAttribute="ChangeAttribute",t.Move="Move",t.ChangeDepth="ChangeDepth",t.ChangeSize="ChangeSize",t.ToggleValid="ToggleValid"})(d||(d={}));const A=(t,o)=>{const s=u(t).concat(u(o));for(const e of s){const n=g(t,e),r=g(o,e);if(!M(n,r))return!1}return!0},u=t=>{const o=[];for(let s=0;s<t.length;s++){const e=t[s],n=t[(s+1)%t.length],r={x:n.x-e.x,y:n.y-e.y},c={x:-r.y,y:r.x};o.push(c)}return o},g=(t,o)=>{let s=h(t[0],o),e=s;for(const n of t){const r=h(n,o);r<s&&(s=r),r>e&&(e=r)}return{min:s,max:e}},M=(t,o)=>!(t.max<o.min||o.max<t.min),h=(t,o)=>t.x*o.x+t.y*o.y,S=(t,o)=>{const s=[];return o.forEach(e=>{const{polygonPointList:n}=l(e);A(t,n)&&s.push(e.id)}),s},y=(t,o)=>{const s=t.map(n=>n.id),e=o.map(n=>n.id);return s.find(n=>!e.includes(n))||""},v=(t,o)=>{const s=t.map(e=>e.id);return o.find(e=>!s.includes(e.id))},x=(t,o)=>t.find(e=>{const n=o.find(r=>r.id===e.id);return n&&n.valid!==e.valid}),B=(t,o)=>t.find(e=>{const n=o.find(r=>r.id===e.id);return n&&n.rotation!==e.rotation}),f=(t,o)=>{const{polygonPointList:s}=l(t);return{ids:S(s,o.filter(n=>n.id!==t.id)),rect:s}},D=(t,o)=>{const s=(e,n)=>e.attribute===n.attribute&&e.center.x===n.center.x&&e.center.y===n.center.y&&e.depth===n.depth&&e.width===n.width&&e.height===n.height;for(const e of t){const n=o.find(r=>r.id===e.id);if(n&&!s(e,n)){let r;if(n.attribute!==e.attribute?r=d.ChangeAttribute:n.center.x!==e.center.x||n.center.y!==e.center.y?r=d.Move:n.depth!==e.depth?r=d.ChangeDepth:(n.width!==e.width||n.height!==e.height)&&(r=d.ChangeSize),r!==void 0)return{modifiedType:r,box:e}}}},C=(t,o,s)=>{try{switch(t){case i.Single:if(o.length>s.length){const e=y(o,s);return e?{modifiedBoxIds:[e],resetAreas:[]}:{modifiedBoxIds:[],resetAreas:[]}}else{const e=[],n=[],r=D(o,s);if(r&&(e.push(r.box.id),r.modifiedType===d.ChangeSize||r.modifiedType===d.Move)){const c=s.find(I=>I.id===r.box.id),{ids:a,rect:m}=f(c,o);e.push(...a),n.push(m)}return{modifiedBoxIds:e,resetAreas:n}}case i.SingleDelete:if(o.length<s.length){const e=v(o,s);if(e){const r=[l(e).polygonPointList],c=[];if(o.length>1){const{ids:a}=f(e,o);a.length&&c.push(...a)}return{modifiedBoxIds:c,resetAreas:r}}return{modifiedBoxIds:[],resetAreas:[]}}return{modifiedBoxIds:[],resetAreas:[]};case i.SingleRotate:if(B(o,s)){const e=B(o,s);if(e){const n=s.find(a=>a.id===e.id),{ids:r,rect:c}=f(n,o);return{modifiedBoxIds:[e.id,...r],resetAreas:[c]}}}return{modifiedBoxIds:[],resetAreas:[]};case i.SingleToggleValid:if(x(o,s)){const e=x(o,s);return e?{modifiedBoxIds:[e.id],resetAreas:[]}:{modifiedBoxIds:[],resetAreas:[]}}return{modifiedBoxIds:[],resetAreas:[]};case i.MulitSelect:return{modifiedBoxIds:V(o,s),resetAreas:[]};case i.MultiPaste:case i.MultiMove:case i.Default:case i.UndoRedo:case i.ClearAll:default:return{modifiedBoxIds:[],resetAreas:[]}}}catch(e){return console.error("calcResetAreasAndBoxIds error:",e),{modifiedBoxIds:[],resetAreas:[]}}},V=(t,o)=>{const s=new Map;for(const e of o)s.set(e.id,e);return t.filter(e=>{const n=s.get(e.id);return!n||!p(e,n)}).map(e=>e.id)};export{i as EPointCloudBoxRenderTrigger,d as EPointCloudBoxSingleModifiedType,C as calcResetAreasAndBoxIds};
|
package/es/utils/data.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsonParser as g}from"./index.js";import P from"./StepUtils.js";var I=Object.defineProperty,d=Object.defineProperties,N=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,S=(e,r,t)=>r in e?I(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,o=(e,r)=>{for(var t in r||(r={}))w.call(r,t)&&S(e,t,r[t]);if(y)for(var t of y(r))v.call(r,t)&&S(e,t,r[t]);return e},a=(e,r)=>d(e,N(r));const D=(e,r)=>JSON.stringify(o(o({},g(e)),r)),J=(e,r,t,f)=>{const{step:l,stepList:_}=r,{rect:i,basicRectID:u}=t;try{const s=g(e),O=P.getCurrentStepInfo(l,_),{dataSourceStep:m}=O,p=`step_${O.step}`;if(s[p]){const n=s[p];return Object.assign(n,f),n.result?(JSON.stringify(n.result)===JSON.stringify(i)||(u?n.result=[...n.result.filter(c=>!(c.sourceID&&c.sourceID===u)),...i.filter(c=>c.sourceID&&c.sourceID===u)]:n.result=i),JSON.stringify(s)):JSON.stringify(a(o({},s),{[p]:a(o(o({},s[p]),f),{result:i})}))}return JSON.stringify(a(o({},s),{[p]:a(o({dataSourceStep:m},f),{toolName:_[l-1].tool,result:i})}))}catch(s){return e}};export{J as composeResult,D as composeResultWithBasicImgInfo};
|
package/es/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import f from"lodash";import{pointCloudLidar2image as y}from"@labelbee/lb-annotation";var
|
|
1
|
+
import f from"lodash";import{pointCloudLidar2image as y}from"@labelbee/lb-annotation";var _=Object.defineProperty,x=Object.defineProperties,O=Object.getOwnPropertyDescriptors,g=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,h=(e,t,n)=>t in e?_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,w=(e,t)=>{for(var n in t||(t={}))P.call(t,n)&&h(e,n,t[n]);if(g)for(var n of g(t))v.call(t,n)&&h(e,n,t[n]);return e},b=(e,t)=>x(e,O(t));const I=(e,t={})=>{try{return typeof e=="string"?JSON.parse(e):f.isObject(e)?e:t}catch(n){return t}},j=e=>{if(Array.isArray(e))return e.filter(t=>t).join(" ");if(f.isObject(e)){const t=[];return Object.keys(e).forEach(n=>{e[n]&&t.push(n)}),t.join(" ")}return""},m=e=>{let t=Infinity,n=Infinity,r=-Infinity,o=-Infinity;for(const i of e)t=Math.min(t,i.x),n=Math.min(n,i.y),r=Math.max(r,i.x),o=Math.max(o,i.y);return{x:t,y:n,width:r-t,height:o-n}},u=(()=>{const e=(t,n)=>{const r=Math.max(t.x,n.x),o=Math.max(t.y,n.y),i=Math.min(t.x+t.width,n.x+n.width),c=Math.min(t.y+t.height,n.y+n.height),s=i-r,a=c-o;return s>=0&&a>=0?{x:r,y:o,width:s,height:a}:null};return(t,n,r)=>{if(r[n]){const o=r[n].width,i=r[n].height;return e(t,{x:0,y:0,width:o,height:i})!==null}return!1}})(),d=e=>{var t;const{pointCloudBox:n,mappingData:r,imageSizes:o}=e,{transferViewData:i}=(t=y(n,r.calib))!=null?t:{};if(!i)return;const c=i.reduce((p,l)=>l.type==="line"?[...p,...l.pointList]:p,[]),s=b(w({},m(c)),{imageName:r.path});if(u(s,r.path,o))return s},R=(e,t)=>{var n;const{pointCloudBox:r,mappingImgList:o,imageSizes:i}=e,s=o.map(a=>d({pointCloudBox:r,mappingData:a,imageSizes:i})).filter(a=>a!==void 0);if(s.length>0){const a=(n=t==null?void 0:t.prepareRectsFn)!=null?n:void 0,p=a?a(s,r):s;p.length>0&&Object.assign(r,{rects:p})}};export{j as classnames,R as generatePointCloudBoxRects,m as getBoundingRect,d as getRectPointCloudBox,u as isBoundingRectInImage,I as jsonParser};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"../../../components/LLMMultiWheelView/index.js";import{prefix as l}from"../../../constant/index.js";import{classnames as m}from"../../../utils/index.js";import{getClassName as d}from"../../../utils/dom.js";import{Layout as a}from"antd/es";import t from"react";import s from"../sidebar/index.js";import c from"../toolFooter/index.js";const u=`${l}-LLMMultiWheelView`,{Sider:L,Content:f}=a,n=`${l}-layout`,M=e=>{var o,i;return t.createElement(a,{className:d("layout","container")},e==null?void 0:e.leftSider,t.createElement(f,{className:m({[`${n}__content`]:!0,[`${l}-LLMLayout`]:!0})},t.createElement(r,{showTips:e.showTips,tips:e.tips,drawLayerSlot:e.drawLayerSlot}),t.createElement(c,{style:(o=e.style)==null?void 0:o.footer,mode:e.mode,footer:e==null?void 0:e.footer})),t.createElement(L,{className:`${n}__side`,width:600,style:{position:"relative"}},t.createElement(s,{sider:e==null?void 0:e.sider,checkMode:e==null?void 0:e.checkMode}),(i=e.drawLayerSlot)==null?void 0:i.call(e,{})))};export{u as LLMMultiWheelViewCls,M as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ViewportProvider as b}from"../../components/customResizeHook/index.js";import{prefix as C}from"../../constant/index.js";import{Spin as A}from"antd";import{Layout as
|
|
1
|
+
import{ViewportProvider as b}from"../../components/customResizeHook/index.js";import{prefix as C}from"../../constant/index.js";import{Spin as A}from"antd";import{Layout as E}from"antd/es";import t,{useState as O}from"react";import V from"./annotationOperation/index.js";import W from"./annotationTips/index.js";import k from"./sidebar/index.js";import g from"./toolFooter/index.js";import F from"./toolHeader/index.js";import{getStepConfig as _}from"../../store/annotation/reducer.js";import I from"../../components/videoAnnotate/index.js";import{connect as R}from"react-redux";import h from"../../utils/ToolUtils.js";import B from"../../components/pointCloudView/index.js";import{getClassName as $}from"../../utils/dom.js";import{classnames as H}from"../../utils/index.js";import D from"../../components/predictTracking/previewResult/index.js";import{LabelBeeContext as U}from"../../store/ctx.js";import{EToolName as m}from"../../data/enums/ToolType.js";import z from"./LLMLayout/index.js";import q from"./NLPLayout/index.js";import G from"../../components/audioAnnotate/index.js";import{LoadingOutlined as J}from"@ant-design/icons";import{useTranslation as K}from"react-i18next";import{EPointCloudName as Q}from"@labelbee/lb-annotation";import X from"./LLMMultiWheelLayout/index.js";var Y=Object.defineProperty,T=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,P=(e,o,n)=>o in e?Y(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,l=(e,o)=>{for(var n in o||(o={}))Z.call(o,n)&&P(e,n,o[n]);if(T)for(var n of T(o))p.call(o,n)&&P(e,n,o[n]);return e};const{Sider:ee,Content:te}=E,L=`${C}-layout`,oe=e=>{var o;return t.createElement(t.Fragment,null,e.showTips===!0&&t.createElement(W,{path:e.path,tips:e.tips}),t.createElement(V,l({},e)),t.createElement(g,{style:(o=e.style)==null?void 0:o.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},ne=e=>{var o;return t.createElement(t.Fragment,null,t.createElement(B,{drawLayerSlot:e.drawLayerSlot,checkMode:e.checkMode,intelligentFit:e.intelligentFit,measureVisible:e.measureVisible,setResourceLoading:e.setResourceLoading}),t.createElement(g,{style:(o=e.style)==null?void 0:o.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},le=e=>{var o;const{stepList:n,step:r}=e,a=(o=_(n,r))==null?void 0:o.tool,d=h.isPointCloudTool(a),i=h.isVideoTool(a);return d?t.createElement(ne,l({},e)):i?t.createElement(I,{drawLayerSlot:e.drawLayerSlot,footer:e.footer,annotationBefore:e==null?void 0:e.annotationBefore}):t.createElement(oe,l({},e))},s=e=>{var o,n,r;const{t:a}=K(),{stepList:d,step:i}=e,c=(o=_(d,i))==null?void 0:o.tool,u=![m.LLM,m.NLP,m.LLMMultiWheel].includes(c),v=![m.LLM,m.NLP,m.LLMMultiWheel].includes(c),y=[Q.PointCloud].includes(c);return t.createElement(b,null,t.createElement(A,{spinning:e.loading,indicator:t.createElement(J,null),tip:t.createElement("span",{style:{marginTop:200}},a("LoadingTips")),delay:500},t.createElement(E,{className:H([L,e.className]),style:(n=e.style)==null?void 0:n.layout},t.createElement("header",{className:`${L}__header`,style:(r=e.style)==null?void 0:r.header},t.createElement(F,{header:e==null?void 0:e.header,headerName:e.headerName,goBack:e.goBack,exportData:e.exportData,hasLangNode:u,hasHeaderOption:v,hasPredictTrackingIcon:y})),e.children)))},ie=e=>{var o,n,r,a,d,i,c;const[u,v]=O(void 0),y=(n=(o=e.style)==null?void 0:o.sider)==null?void 0:n.width,{stepList:x,step:j}=e,f=(r=_(x,j))==null?void 0:r.tool,M=m.LLM===f,N=m.NLP===f,w=m.LLMMultiWheel===f,S=h.isAudioTool(f);return w?t.createElement(s,l({},e),t.createElement(X,l({},e))):M?t.createElement(s,l({},e),t.createElement(z,l({},e))):N?t.createElement(s,l({},e),t.createElement(q,l({},e))):S?t.createElement(s,l({},e),t.createElement(G,l({},e))):t.createElement(s,l({},e),t.createElement(E,{className:$("layout","container")},e==null?void 0:e.leftSider,t.createElement(te,{className:`${L}__content`},t.createElement(le,l({},e)),t.createElement(D,null)),t.createElement(ee,{className:`${L}__side`,width:(a=u!=null?u:y)!=null?a:240,style:(d=e.style)==null?void 0:d.sider},t.createElement(k,{sider:e==null?void 0:e.sider,enableColorPicker:e==null?void 0:e.enableColorPicker,setSiderWidth:v,propsSiderWidth:(c=(i=e.style)==null?void 0:i.sider)==null?void 0:c.width}))))},re=({annotation:e})=>{var o,n,r;const{imgList:a,loading:d}=e,i=(o=a[e.imgIndex])!=null?o:{};return{path:(r=(n=i==null?void 0:i.path)!=null?n:i==null?void 0:i.url)!=null?r:"",loading:d}};var ae=R(re,null,null,{context:U})(ie);export{ae as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r,{useRef as d,useState as v}from"react";import{Col as p,Popconfirm as C}from"antd";import{useTranslation as m}from"react-i18next";import{prefix as E}from"../../../../constant/index.js";const y={color:"#CCCCCC"},g=({info:e})=>{const{t}=m();return e.key.startsWith("sure")?r.createElement("div",{key:e.key},`${t("ConfirmTo")}${e.name.slice(0)}\uFF1F`,(e==null?void 0:e.content)?e.content:""):r.createElement("span",null,e.name)},k=({icon:e})=>typeof e=="string"?r.createElement("img",{width:23,height:25,src:e}):e,i=({isHover:e,info:t})=>{const n=!!t.forbidOperation,o=t.key===e&&!n;let a={color:o?"#666fff":""};return n&&(a=y),r.createElement("div",{style:{cursor:n?"not-allowed":"default"},onClick:()=>{var c;return(t==null?void 0:t.forbidConfirm)&&!n&&((c=t==null?void 0:t.onClick)==null?void 0:c.call(t))}},r.createElement("div",{className:"icon"},r.createElement(k,{icon:o?t.hoverSvg:t.imgSvg})),r.createElement("div",{className:"toolName",style:a},t.name))},f=({allOperation:e})=>{const t=d(null),[n,o]=v(null),{t:a}=m(),c=Math.floor(24/e.length);return r.createElement("div",{className:"generalOperation",ref:t},e.map((l,u)=>r.createElement(p,{span:c,key:u,className:"generalOperation-col"},r.createElement("div",{key:l.key,className:"item",onMouseEnter:()=>{o(l.key)},onMouseLeave:()=>{o(null)}},l.forbidConfirm?r.createElement(i,{info:l,isHover:n}):r.createElement(C,{title:r.createElement(g,{info:l}),placement:"topRight",okText:a("Confirm"),cancelText:a("Cancel"),getPopupContainer:()=>{var s;return(s=t.current)!=null?s:document.body},onConfirm:l.onClick,overlayClassName:`${E}-pop-confirm`},r.createElement("div",null,r.createElement(i,{info:l,isHover:n})))))))};export{f as default};
|
package/es/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e,{useEffect as i}from"react";import{Switch as c}from"antd";import l from"../../../../../../store/toolConfig/index.js";import{useTranslation as m}from"react-i18next";import a from"./index.module.scss.js";const f=()=>{const{t:o}=m(),{onlyLoadFirstData:s,setOnlyLoadFirstData:t}=l();i(()=>{t(!1)},[]);const r=n=>{t(n)};return e.createElement("div",{className:a.switchBox},e.createElement("div",{className:a.switchLabel},o("OnlyLoadTheFirstFramePreAnnotation")),e.createElement(c,{defaultChecked:!1,checked:s,onChange:r}))};export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={switchBox:"index-module_switchBox__6DlnW"};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"react";import{Slider as l}from"antd";import{PointCloudContext as s}from"../../../../../../components/pointCloudView/PointCloudContext.js";import{i18n as a}from"@labelbee/lb-utils";import i from"./index.module.scss.js";const r={.5:.5,1:1,2:2,3:3,4:4},m=()=>{const e=t.useContext(s),o=n=>{e.setRectRotateSensitivity(n)};return t.createElement("div",{className:i.rectRotateSensitivitySlider},t.createElement("div",{className:i.title},a.t("RotationAngleSensitivity")),t.createElement("div",{className:"toolStyle"},t.createElement("div",{id:"style-rectRotateSensitivity"},t.createElement(l,{min:.5,max:4,step:null,value:e.rectRotateSensitivity,onChange:o,marks:r}))))};export{m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t={rectRotateSensitivitySlider:"index-module_rectRotateSensitivitySlider__tGjUn",title:"index-module_title__aAJW6"};export{t as default};
|
package/es/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e,{useEffect as n}from"react";import{Tooltip as a,Switch as r}from"antd";import m from"../../../../../../store/toolConfig/index.js";import{useTranslation as d}from"react-i18next";import{QuestionCircleOutlined as f}from"@ant-design/icons";import t from"./index.module.scss.js";const p=()=>{const{t:i}=d(),{selectBoxVisibleSwitch:l,setSelectBoxVisibleSwitch:s}=m();n(()=>{s(!1)},[]);const o=c=>{s(c)};return e.createElement("div",{className:t.switchBox},e.createElement("div",{className:t.switchLeft},e.createElement("div",{className:t.switchTitle},i("SelectBoxToDisplayIndependently")),e.createElement(a,{placement:"top",title:e.createElement("div",{style:{width:"210px"}},i("SelectBoxSwitchTips"))},e.createElement(f,null))),e.createElement(r,{defaultChecked:!1,checked:l,onChange:o}))};export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={switchBox:"index-module_switchBox__mLSzh",switchLeft:"index-module_switchLeft__7qd-2",switchTitle:"index-module_switchTitle__de9li"};export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e,{useState as y,useContext as I,useEffect as L}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 it}from"@labelbee/lb-annotation";import{PointCloudContext as T}from"../../../../components/pointCloudView/PointCloudContext.js";import{Divider as w,Input as rt,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 B}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 St from"./components/firstFrameDataSwitch/index.js";import bt from"./components/selectBoxVisibleSwitch/index.js";import{EPointCloudSegmentStatus as h,EPointCloudPattern as Ct}from"@labelbee/lb-utils";import xt from"../../../../components/attributeList/index.js";import{useAttribute as Et}from"../../../../components/pointCloudView/hooks/useAttribute.js";import Pt from"../../../../assets/annotation/pointCloudTool/lassoSelector.svg.js";import _t from"../../../../assets/annotation/pointCloudTool/lassoSelector_a.svg.js";import yt from"../../../../assets/annotation/pointCloudTool/circleSelector.svg.js";import wt from"../../../../assets/annotation/pointCloudTool/circleSelector_a.svg.js";import Dt from"../../../../assets/annotation/rectTool/icon_rect.svg.js";import ht from"../../../../assets/annotation/rectTool/icon_rect_a.svg.js";import{sidebarCls as j}from"../index.js";import{SetTaskStepList as jt}from"../../../../store/annotation/actionCreators.js";import{usePointCloudViews as It}from"../../../../components/pointCloudView/hooks/usePointCloudViews.js";import Lt from"../../../../components/subAttributeList/index.js";import Tt from"../../../../components/DynamicResizer/DynamicResizer.js";var Bt=Object.defineProperty,Vt=Object.defineProperties,kt=Object.getOwnPropertyDescriptors,z=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,Nt=Object.prototype.propertyIsEnumerable,F=(o,t,n)=>t in o?Bt(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n,V=(o,t)=>{for(var n in t||(t={}))At.call(t,n)&&F(o,n,t[n]);if(z)for(var n of z(t))Nt.call(t,n)&&F(o,n,t[n]);return o},k=(o,t)=>Vt(o,kt(t));const Ot=()=>{const[o,t]=y(!1),n=I(T),{pointCloudBoxList:a}=n,{selectedBox:c,updateSelectedBox:l}=$(),[u,m]=y(""),{t:v}=B(),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)),r=(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)};L(()=>{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:[]),n.mainViewInstance&&n.selectedPointCloudBox&&(n==null||n.mainViewInstance.generateBox(n==null?void 0:n.selectedPointCloudBox))};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(rt,{defaultValue:p,onChange:d=>{m(d.target.value)},disabled:!p,size:"small",onBlur:()=>{r()},onPressEnter:()=>{r(!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)}})))},U=({segmentStatus:o,globalPattern:t})=>t===Ct.Segmentation&&![h.Edit,h.Ready].includes(o),H=({attributeList:o,subAttributeList:t,toolInstance:n,config:a,stepList:c,stepInfo:l,enableColorPicker:u})=>{const[m,v]=y({segmentStatus:h.Ready}),{selectedBox:p}=$(),s=I(T),{ptSegmentInstance:r}=s,{t:S}=B(),{defaultAttribute:d}=Et(),f=It(),{isPointCloudSegmentationPattern:b}=R(),W=dt(),J={fontWeight:500,fontSize:14,margin:"12px 0 8px 20px"};L(()=>{if(!!r)return r.on("syncPointCloudStatus",v),()=>{r.unbind("syncPointCloudStatus",v)}},[r]);const K=(i,C)=>{var x,E,P,A,N;const _=(x=a==null?void 0:a.attributeList)==null?void 0:x.map(g=>g.value===i?k(V({},g),{color:C}):g),O=k(V({},a),{attributeList:_}),tt=JSON.stringify(O),et=c==null?void 0:c.map(g=>(g==null?void 0:g.step)===(l==null?void 0:l.step)?k(V({},g),{config:tt}):g);(E=s==null?void 0:s.topViewInstance)==null||E.updateAttributeList(_),(P=s==null?void 0:s.sideViewInstance)==null||P.updateAttributeList(_),(A=s==null?void 0:s.backViewInstance)==null||A.updateAttributeList(_),(N=s==null?void 0:s.mainViewInstance)==null||N.setConfig(O),W(jt({stepList:et}))},X=i=>{f.updateViewsByDefaultSize&&f.updateViewsByDefaultSize(i)},Y=i=>{U({globalPattern:s.globalPattern,segmentStatus:m.segmentStatus})||n.setDefaultAttribute(i)},q=(i,C)=>{U({globalPattern:s.globalPattern,segmentStatus:m.segmentStatus})||n.setSubAttribute(i,C)},G=o.map(i=>({label:i.key,value:i.value,color:i==null?void 0:i.color,limit:i==null?void 0:i.limit,isDefault:i==null?void 0:i.isDefault})),Q=p||m.cacheSegData&&m.segmentStatus===h.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(xt,{list:G,forbidDefault:!0,selectedAttribute:d!=null?d:"",attributeChanged:i=>Y(i),updateColorConfig:K,enableColorPicker:u,updateSize:X,forbidShowLimitPopover:Z}),e.createElement(w,{style:{margin:0}}),Q&&e.createElement(Lt,{subAttributeList:t,setSubAttribute:q,getValue:i=>{var C,x,E,P;return((x=(C=s.selectedPointCloudBox)==null?void 0:C.subAttribute)==null?void 0:x[i.value])||((P=(E=m.cacheSegData)==null?void 0:E.subAttribute)==null?void 0:P[i.value])}})))},Rt=[{toolName:"LassoSelector",commonSvg:Pt,selectedSvg:_t},{toolName:"RectSelector",commonSvg:Dt,selectedSvg:ht},{toolName:"CircleSelector",commonSvg:yt,selectedSvg:wt}],M=({toolInstance:o})=>{const{ptSegmentInstance:t}=I(T),[n,a]=y("LassoSelector"),{t:c}=B();return L(()=>{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:`${j}__level`},Rt.map(l=>{const u=n===l.toolName;return e.createElement("span",{className:`${j}__toolOption`,key:l.toolName,onClick:()=>t==null?void 0:t.emit(l.toolName)},e.createElement("img",{className:`${j}__singleTool`,src:u?l==null?void 0:l.selectedSvg:l==null?void 0:l.commonSvg}),e.createElement("span",{className:ut({[`${j}__toolOption__selected`]:u})},c(l.toolName)))}))},$t=({stepInfo:o,toolInstance:t,imgList:n,imgIndex:a,stepList:c,enableColorPicker:l})=>{var u,m;const{updatePointCloudPattern:v,pointCloudPattern:p,isPointCloudSegmentationPattern:s}=R(),r=ct(o.config),S=(u=r==null?void 0:r.attributeList)!=null?u:[],d=(r==null?void 0:r.secondaryAttributeConfigurable)===!0?(m=r==null?void 0:r.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:r,stepList:c,stepInfo:o,enableColorPicker:l})):e.createElement(e.Fragment,null,e.createElement(nt,{toolName:it.EPointCloudName.PointCloud,selectedToolName:p,onChange:f=>v==null?void 0:v(f)}),e.createElement("div",{style:{flex:1,overflow:"hidden"}},e.createElement(Tt,{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:r,stepList:c,stepInfo:o,enableColorPicker:l}),(r==null?void 0:r.trackConfigurable)===!0&&p===lt.Rect?e.createElement("div",{style:{height:"100%",overflow:"auto"}},e.createElement(Ot,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),o.loadPreStep>0&&e.createElement(St,null),e.createElement(bt,null)):e.createElement("div",null))))},zt=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 Ft=at(zt,null,null,{context:mt})($t);export{M as PointCloudSegToolIcon,Ft 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
|
|
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
|
|
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
|
|
1
|
+
import{prefix as R}from"../../../constant/index.js";import{EToolName as n}from"../../../data/enums/ToolType.js";import W from"../../../utils/StepUtils.js";import{Collapse as u}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 y}from"./GeneralOperation/index.js";import H from"./ImgAttributeInfo/index.js";import J from"./SwitchAttributeList/index.js";import p,{expandIconFuc as _}from"./TagSidebar/index.js";import f from"./TextToolSidebar/index.js";import $ from"./PointCloudToolSidebar/index.js";import Q from"./ToolStyle/index.js";import{cTool as X}from"@labelbee/lb-annotation";import Y from"./ScribbleSidebar/index.js";import{ToolIcons as Z}from"./ToolIcons.js";import{useSelector as ee}from"../../../store/ctx.js";import{Tabs as I}from"antd";import{classnames as te}from"../../../utils/index.js";import P from"../../../assets/annotation/common/icon_menu_fold.svg.js";import oe from"../../../components/LLMToolView/sidebar/index.js";import ne from"../../../components/LLMMultiWheelView/sidebar/index.js";import re from"./NLPSidebar/index.js";import ie from"../../../components/videoAnnotate/videoClipTool/components/annotatedList/index.js";const{EVideoToolName:E,EPointCloudName:le}=X,{Panel:A}=u,t=`${R}-sidebar`,ae=({sider:l,enableColorPicker:w,setSiderWidth:b,propsSiderWidth:se,checkMode:c})=>{const x=ee(r=>W.getCurrentStepInfo(r.annotation.step,r.annotation.stepList)),[m,M]=z(!0),o=x==null?void 0:x.tool,{t:S}=D();if(!o)return null;const V=r=>{const s=e.createElement(Q,null);return e.createElement(A,{header:S("Style"),className:"panel",key:r},s)},T=e.createElement(Z,{toolName:o,onChange:()=>{}}),a=e.createElement(J,null),g=e.createElement(G,null),N=e.createElement(u,{defaultActiveKey:["1","imgAttribute"],bordered:!1,expandIconPosition:"right",className:`${t}__content`,expandIcon:_},V("1")),h=e.createElement(u,{defaultActiveKey:["1","imgAttribute"],bordered:!1,expandIconPosition:"right",className:`${t}__content`,expandIcon:_},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(p,null),O=r=>e.createElement(f,{disabled:r}),L=e.createElement(Y,{onChange:(r,s)=>{}}),v=e.createElement(ie,null),C=e.createElement(oe,{checkMode:c}),k=e.createElement(ne,{checkMode:c}),j=e.createElement(re,{checkMode:c}),d=e.createElement("div",{className:`${t}__horizontal`}),F=e.createElement($,{enableColorPicker:w}),K=e.createElement(y,null);if(l)return typeof l=="function"?e.createElement("div",{className:`${t}`},l({toolIcon:T,attributeList:a,annotationText:g,toolStyle:N,imageAttributeInfo:h,operation:i,tagToolSideBar:B,textToolSideBar:O,horizontal:d,pointCloudToolSidebar:F,pointCloudOperation:K,scribbleSidebar:L,LLMSidebar:C,LLMMultiWheelSidebar:k,videoClipSidebar:v,NLPSidebar:j})):l;if([n.Rect,n.Point,n.Line,n.Rect,n.Polygon,n.Cuboid].includes(o))return e.createElement("div",{className:`${t}`},T,d,a,g,d,e.createElement("div",{className:`${t}__content`},N,h),i);if(o===n.Tag)return e.createElement("div",{className:`${t}`},e.createElement(p,null));if(o===E.VideoClipTool)return e.createElement("div",{className:`${t}`},e.createElement("div",{className:`${t}__content`},v,a),i);if(o===E.VideoTagTool)return e.createElement("div",{className:`${t}`},e.createElement("div",{className:`${t}__content`},e.createElement(p,null)),i);if(o===E.VideoTextTool)return e.createElement("div",{className:`${t}`},e.createElement(f,null));if(o===n.Text)return e.createElement("div",{className:`${t}`},"s",e.createElement(f,null));if(o===le.PointCloud){const r=()=>{M(!m),b&&b(m?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 m?e.createElement(I,{type:"card",activeKey:"1",className:te({[`${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(y,null))):s}return o===n.ScribbleTool?e.createElement("div",{className:`${t}`},e.createElement("div",{className:`${t}__content`},L,a),i):o===n.LLM?C:o===n.NLP?j:null};export{ae 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 e,{useContext as
|
|
1
|
+
import e,{useContext as L}from"react";import k from"../../../../../assets/annotation/toolHotKeyIcon/icon_kj1.svg.js";import N from"../../../../../assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js";import{EToolName as o}from"../../../../../data/enums/ToolType.js";import w from"./rectToolShortCutTable/index.js";import O from"./point/index.js";import I from"./polygon/index.js";import H from"./line/index.js";import M from"./tag/index.js";import R from"./text/index.js";import G from"./videoTag/index.js";import K,{pointCloudShortCutTable_POLYGON as V,pointCloudShortCutTable_SEGMENT as A}from"./pointCloud/index.js";import W from"./scribble/index.js";import Y from"./cuboid/index.js";import T from"./LLM/index.js";import $ from"./NLP/index.js";import B from"./audioText/index.js";import{footerCls as D}from"../../index.js";import{useTranslation as F}from"react-i18next";import{EAudioToolName as z,cTool as U}from"@labelbee/lb-annotation";import{PointCloudContext as q}from"../../../../../components/pointCloudView/PointCloudContext.js";import J from"../../FooterPopover.js";import{EPointCloudPattern as C}from"@labelbee/lb-utils";var Q=Object.defineProperty,b=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,E=(r,n,t)=>n in r?Q(r,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[n]=t,ee=(r,n)=>{for(var t in n||(n={}))X.call(n,t)&&E(r,t,n[t]);if(b)for(var t of b(n))Z.call(n,t)&&E(r,t,n[t]);return r};const{EVideoToolName:te,EPointCloudName:u}=U,f={[o.Rect]:w,[o.Tag]:M,[o.Point]:O,[o.Polygon]:I,[o.Line]:H,[o.Text]:R,[te.VideoTagTool]:G,[u.PointCloud]:K,[u.PointCloud+"_POLYGON"]:V,[u.PointCloud+"_SEGMENT"]:A,[o.ScribbleTool]:W,[o.Cuboid]:Y,[o.LLM]:T,[o.LLMMultiWheel]:T,[o.NLP]:$,[z.AudioTextTool]:B},oe=({icon:r})=>typeof r=="string"?e.createElement("img",{width:16,height:16,src:r}):r||null,x=({title:r,style:n,shortCutList:t})=>{const{t:m}=F(),d={width:320,display:"flex",justifyContent:"space-between",margin:16},s={display:"block",padding:"0 3px",minWidth:"20px",marginRight:"3px",border:"1px solid rgba(204,204,204,1)",verticalAlign:"middle",fontSize:"12px",textAlign:"center"},y=(a,c)=>e.createElement("div",{style:d,key:c},e.createElement("span",{style:{display:"flex",alignItems:"center"}},e.createElement(oe,{icon:a.icon}),e.createElement("span",{style:{marginLeft:a.icon?16:0}},m(a.name))),e.createElement("span",{style:{display:"flex",alignItems:"center"}},a.noticeInfo&&e.createElement("span",{style:{marginRight:"5px",color:"#CCCCCC"}},m(a.noticeInfo)),S(a.shortCut,a.shortCutUseHtml,a.linkSymbol))),S=(a,c=!1,j="+")=>{if(!a)return null;const v=a.map((l,i)=>{var h,g;const p={display:"flex",alignItems:"center"};return c?e.createElement("span",{key:i,style:p},e.createElement("span",{style:s,dangerouslySetInnerHTML:{__html:l}})):i<a.length-1?typeof l=="number"?e.createElement("span",{key:i,style:p},e.createElement("span",{style:s},l),e.createElement("span",{style:{marginRight:"3px"}},"~")):((h=l==null?void 0:l.startsWith)==null?void 0:h.call(l,"data"))?e.createElement("span",{key:i,style:p},e.createElement("span",{className:"shortCutButton",style:{marginRight:"3px"}},e.createElement("img",{width:16,height:23,src:l})),e.createElement("span",{style:{marginRight:"3px"}},"+")):e.createElement("span",{key:i,style:p},e.createElement("span",{style:s},l),e.createElement("span",{style:{marginRight:"3px"}},j)):typeof l=="number"?e.createElement("span",{key:i,style:p},e.createElement("span",{style:s},l)):((g=l==null?void 0:l.startsWith)==null?void 0:g.call(l,"data"))?e.createElement("span",{className:"shortCutButton",key:i,style:{marginRight:"3px"}},e.createElement("img",{width:16,height:23,src:l})):e.createElement("span",{style:s,key:i},l)});return e.createElement("div",{style:{display:"flex",justifyContent:"space-around",alignItems:"center"}},v)},P=e.createElement("div",{className:`${D}__hotkey-content`},t==null?void 0:t.map((a,c)=>y(a,c))),_=n||{};return e.createElement(J,{hoverIcon:N,icon:k,title:m("Hotkeys"),content:P,containerStyle:_})},re=({style:r,title:n,toolName:t})=>{const{pointCloudPattern:m,globalPattern:d}=L(q);if(!t||!f[t])return null;let s=t;switch(d){case C.Detection:switch(m){case o.Polygon:s+="_POLYGON";break;case o.Line:s=o.Line;break;case o.Point:s=o.Point;break}break;case C.Segmentation:s=u.PointCloud+"_SEGMENT";break}const y={style:r,title:n,shortCutList:f[s]};return e.createElement(x,ee({},y))};export{x as ToolHotKeyCom,re as default,f as shortCutTable};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{backward as
|
|
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
|
|
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
|
|
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.
|
|
3
|
+
"version": "1.23.0-alpha.141",
|
|
4
4
|
"description": "Provide a complete library of annotation components",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"es": "./es/index.js",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@ant-design/icons": "^4.6.2",
|
|
46
|
-
"@labelbee/lb-annotation": "1.27.0-alpha.
|
|
47
|
-
"@labelbee/lb-utils": "1.19.0-alpha.
|
|
48
|
-
"@labelbee/wavesurfer": "1.0.
|
|
46
|
+
"@labelbee/lb-annotation": "1.27.0-alpha.70",
|
|
47
|
+
"@labelbee/lb-utils": "1.19.0-alpha.27",
|
|
48
|
+
"@labelbee/wavesurfer": "1.1.0-alpha.1",
|
|
49
49
|
"@types/react-dom": "^18.2.7",
|
|
50
50
|
"@types/react-transition-group": "^4.4.9",
|
|
51
51
|
"ahooks": "^3.4.0",
|
|
@@ -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",
|
|
@@ -66,6 +67,7 @@
|
|
|
66
67
|
"redux-actions": "^2.6.5",
|
|
67
68
|
"redux-thunk": "^2.3.0",
|
|
68
69
|
"rehype-katex": "^6.0.3",
|
|
70
|
+
"rehype-raw": "^7.0.0",
|
|
69
71
|
"remark-gfm": "^3.0.1",
|
|
70
72
|
"remark-math": "^5.1.1",
|
|
71
73
|
"resize-observer-polyfill": "^1.5.1",
|
|
@@ -111,6 +113,7 @@
|
|
|
111
113
|
"rollup": "^2.43.1",
|
|
112
114
|
"rollup-plugin-esbuild": "^3.0.2",
|
|
113
115
|
"rollup-plugin-postcss": "^4.0.2",
|
|
116
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
114
117
|
"rollup-plugin-web-worker-loader": "^1.6.1",
|
|
115
118
|
"sass": "^1.53.0",
|
|
116
119
|
"typescript": "^4.2.3"
|