@labelbee/lb-components 1.23.0-alpha.12 → 1.23.0-alpha.120
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/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/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/sidebar/components/textEditor/index.js +2 -2
- package/dist/components/LLMToolView/sidebar/components/textEditor/index.module.scss.js +1 -1
- package/dist/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
- package/dist/components/LLMToolView/sidebar/index.js +1 -1
- package/dist/components/LLMToolView/utils/data.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/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/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/hooks/useToolStyle.js +1 -0
- package/dist/index.css +161 -12
- package/dist/index.js +1 -1
- package/dist/store/Actions.js +1 -1
- 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/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/index.d.ts +8 -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/LLMToolView/utils/data.d.ts +1 -1
- 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 +2 -1
- package/dist/types/components/pointCloudView/PointCloudContext.d.ts +28 -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 +13 -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/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/hooks/useToolStyle.d.ts +30 -0
- package/dist/types/index.d.ts +8 -2
- package/dist/types/store/Actions.d.ts +1 -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/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 +23 -0
- package/dist/types/utils/index.d.ts +31 -1
- 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/index.js +1 -1
- 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/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.js +1 -0
- package/dist/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.js +1 -0
- 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/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/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/sidebar/components/textEditor/index.js +2 -2
- package/es/components/LLMToolView/sidebar/components/textEditor/index.module.scss.js +1 -1
- package/es/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
- package/es/components/LLMToolView/sidebar/index.js +1 -1
- package/es/components/LLMToolView/utils/data.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/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/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/hooks/useToolStyle.js +1 -0
- package/es/index.css +161 -12
- package/es/index.js +1 -1
- package/es/store/Actions.js +1 -1
- 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/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/index.js +1 -1
- 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/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.js +1 -0
- package/es/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.js +1 -0
- 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 +6 -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
package/es/index.css
CHANGED
|
@@ -49,13 +49,118 @@
|
|
|
49
49
|
right: -5px;
|
|
50
50
|
top: -5px;
|
|
51
51
|
}
|
|
52
|
+
.index-module_rectRotateSensitivitySlider__tGjUn {
|
|
53
|
+
padding: 12px 20px;
|
|
54
|
+
}
|
|
55
|
+
.index-module_rectRotateSensitivitySlider__tGjUn .index-module_title__aAJW6 {
|
|
56
|
+
margin-bottom: 16px;
|
|
57
|
+
}
|
|
52
58
|
.index-module_container__RwV5P {
|
|
53
59
|
padding: 12px 20px;
|
|
54
60
|
}
|
|
55
61
|
.index-module_container__RwV5P .index-module_content__vHpS9 {
|
|
56
62
|
display: flex;
|
|
57
63
|
justify-content: space-between;
|
|
58
|
-
margin-top:
|
|
64
|
+
margin-top: 16px;
|
|
65
|
+
}
|
|
66
|
+
.index-module_switchBox__6DlnW {
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: space-between;
|
|
70
|
+
padding: 12px 20px;
|
|
71
|
+
}
|
|
72
|
+
.index-module_switchBox__mLSzh {
|
|
73
|
+
display: flex;
|
|
74
|
+
justify-content: space-between;
|
|
75
|
+
align-items: center;
|
|
76
|
+
padding: 12px 20px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.index-module_switchLeft__7qd-2 {
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.index-module_switchTitle__de9li {
|
|
85
|
+
margin-right: 8px;
|
|
86
|
+
}
|
|
87
|
+
.dynamic-resizer-content {
|
|
88
|
+
width: 100%;
|
|
89
|
+
height: 100%;
|
|
90
|
+
flex-shrink: 0;
|
|
91
|
+
flex-grow: 0;
|
|
92
|
+
position: relative;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.divider {
|
|
96
|
+
height: 10px;
|
|
97
|
+
width: 100%;
|
|
98
|
+
position: absolute;
|
|
99
|
+
top: -5px;
|
|
100
|
+
left: 0;
|
|
101
|
+
cursor: row-resize;
|
|
102
|
+
user-select: none;
|
|
103
|
+
display: flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
flex-direction: column;
|
|
106
|
+
justify-content: center;
|
|
107
|
+
}
|
|
108
|
+
.divider:hover .divider-top, .divider:hover .divider-bottom, .divider:hover .divider-all {
|
|
109
|
+
display: block;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.divider-top,
|
|
113
|
+
.divider-bottom,
|
|
114
|
+
.divider-all {
|
|
115
|
+
width: 20px;
|
|
116
|
+
height: 20px;
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
display: none;
|
|
119
|
+
user-select: none;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.divider-all {
|
|
123
|
+
position: absolute;
|
|
124
|
+
top: -50%;
|
|
125
|
+
left: 50%;
|
|
126
|
+
transform: translate(-50%);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.divider-icon {
|
|
130
|
+
width: 100%;
|
|
131
|
+
height: 20px;
|
|
132
|
+
position: relative;
|
|
133
|
+
}
|
|
134
|
+
.divider-icon::after {
|
|
135
|
+
content: "";
|
|
136
|
+
display: block;
|
|
137
|
+
position: absolute;
|
|
138
|
+
top: 50%;
|
|
139
|
+
left: 0;
|
|
140
|
+
right: 0;
|
|
141
|
+
width: 90%;
|
|
142
|
+
height: 1px;
|
|
143
|
+
background: #ccc;
|
|
144
|
+
margin: 0 auto;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.dynamic-resizer-top {
|
|
148
|
+
width: 100%;
|
|
149
|
+
overflow-y: auto;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.dynamic-resizer-bottom {
|
|
153
|
+
width: 100%;
|
|
154
|
+
overflow-y: auto;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.hide-scrollbar * {
|
|
158
|
+
scrollbar-width: none; /* Firefox */
|
|
159
|
+
-ms-overflow-style: none; /* IE and Edge */
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.hide-scrollbar *::-webkit-scrollbar {
|
|
163
|
+
display: none; /* Chrome, Safari, Opera */
|
|
59
164
|
}
|
|
60
165
|
.index-module_latexEditor__0fK8G {
|
|
61
166
|
line-height: 32px;
|
|
@@ -132,6 +237,12 @@
|
|
|
132
237
|
.index-module_outputDisplay__5dS48 .index-module_content__Iml6l .markdown-body {
|
|
133
238
|
font-size: 14px;
|
|
134
239
|
}
|
|
240
|
+
|
|
241
|
+
.index-module_tip__NFru6 {
|
|
242
|
+
margin-bottom: 8px;
|
|
243
|
+
color: rgba(0, 0, 0, 0.45);
|
|
244
|
+
font-size: 14px;
|
|
245
|
+
}
|
|
135
246
|
.index-module_tagList__cvWor {
|
|
136
247
|
padding: 0px 16px 16px 16px;
|
|
137
248
|
}
|
|
@@ -606,6 +717,7 @@
|
|
|
606
717
|
}
|
|
607
718
|
.index-module_waveformContainer__rVhq9::-webkit-scrollbar {
|
|
608
719
|
width: 8px;
|
|
720
|
+
height: 10px;
|
|
609
721
|
}
|
|
610
722
|
.index-module_waveformContainer__rVhq9::-webkit-scrollbar-track {
|
|
611
723
|
background: #555;
|
|
@@ -698,6 +810,7 @@
|
|
|
698
810
|
text-align: right;
|
|
699
811
|
background: rgb(102, 111, 255);
|
|
700
812
|
opacity: 0.6;
|
|
813
|
+
margin-top: 10px;
|
|
701
814
|
}
|
|
702
815
|
.index-module_textInputContainer__ES6X3 {
|
|
703
816
|
height: 100%;
|
|
@@ -720,6 +833,16 @@
|
|
|
720
833
|
font-family: SourceHanSansCN-Medium;
|
|
721
834
|
font-size: 14px;
|
|
722
835
|
}
|
|
836
|
+
.index-module_label__xE6hM .index-module_labelText__Zg1c4 {
|
|
837
|
+
display: flex;
|
|
838
|
+
overflow: hidden;
|
|
839
|
+
width: 60%;
|
|
840
|
+
align-items: center;
|
|
841
|
+
}
|
|
842
|
+
.index-module_label__xE6hM .index-module_labelText__Zg1c4 .index-module_titleText__BRM44 {
|
|
843
|
+
max-width: calc(100% - 20px);
|
|
844
|
+
overflow: hidden;
|
|
845
|
+
}
|
|
723
846
|
.index-module_label__xE6hM .index-module_required__iElYl::before {
|
|
724
847
|
display: inline-block;
|
|
725
848
|
margin-right: 4px;
|
|
@@ -732,6 +855,7 @@
|
|
|
732
855
|
.index-module_label__xE6hM .index-module_extra__PW5Qk {
|
|
733
856
|
float: right;
|
|
734
857
|
margin-right: 5px;
|
|
858
|
+
width: 40%;
|
|
735
859
|
}
|
|
736
860
|
|
|
737
861
|
.index-module_textareaContainer__dTIv4 {
|
|
@@ -862,6 +986,7 @@
|
|
|
862
986
|
flex-wrap: wrap;
|
|
863
987
|
align-items: center;
|
|
864
988
|
justify-content: center;
|
|
989
|
+
overflow: hidden;
|
|
865
990
|
}
|
|
866
991
|
.index-module_placeholderHotkey__0SKPo .text {
|
|
867
992
|
color: #333;
|
|
@@ -878,7 +1003,10 @@
|
|
|
878
1003
|
|
|
879
1004
|
.index-module_attribute__g8Vbl {
|
|
880
1005
|
height: 22px;
|
|
881
|
-
padding:
|
|
1006
|
+
padding: 0px 8px;
|
|
1007
|
+
width: max-content;
|
|
1008
|
+
max-width: 100%;
|
|
1009
|
+
margin-left: auto;
|
|
882
1010
|
}
|
|
883
1011
|
|
|
884
1012
|
.index-module_clearIcon__ZBZqI {
|
|
@@ -1141,7 +1269,8 @@
|
|
|
1141
1269
|
}
|
|
1142
1270
|
.index-module_clipSidebar__z2E8x .index-module_attributeList__2wnCE {
|
|
1143
1271
|
flex: 1;
|
|
1144
|
-
overflow:
|
|
1272
|
+
overflow-x: hidden;
|
|
1273
|
+
overflow-y: auto;
|
|
1145
1274
|
}
|
|
1146
1275
|
.index-module_clipSidebar__z2E8x .index-module_attributeList__2wnCE .sensebee-radio-group,
|
|
1147
1276
|
.index-module_clipSidebar__z2E8x .index-module_attributeList__2wnCE .sensebee-radio-group-no-limit-height .ant-radio-group {
|
|
@@ -1489,6 +1618,7 @@
|
|
|
1489
1618
|
.bee-sidebar #style-width .ant-slider .ant-slider-track,
|
|
1490
1619
|
.bee-sidebar #style-color .ant-slider .ant-slider-track,
|
|
1491
1620
|
.bee-sidebar #style-fillOpacity .ant-slider .ant-slider-track,
|
|
1621
|
+
.bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-slider-track,
|
|
1492
1622
|
.bee-sidebar #style-borderOpacity .ant-slider .ant-slider-track {
|
|
1493
1623
|
background: #f5f5f5;
|
|
1494
1624
|
}
|
|
@@ -1498,6 +1628,7 @@
|
|
|
1498
1628
|
.bee-sidebar #style-width .ant-slider .ant-slider-dot,
|
|
1499
1629
|
.bee-sidebar #style-color .ant-slider .ant-slider-dot,
|
|
1500
1630
|
.bee-sidebar #style-fillOpacity .ant-slider .ant-slider-dot,
|
|
1631
|
+
.bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-slider-dot,
|
|
1501
1632
|
.bee-sidebar #style-borderOpacity .ant-slider .ant-slider-dot {
|
|
1502
1633
|
width: 0;
|
|
1503
1634
|
height: 0;
|
|
@@ -1509,6 +1640,7 @@
|
|
|
1509
1640
|
.bee-sidebar #style-width .ant-slider .ant-slider-handle,
|
|
1510
1641
|
.bee-sidebar #style-color .ant-slider .ant-slider-handle,
|
|
1511
1642
|
.bee-sidebar #style-fillOpacity .ant-slider .ant-slider-handle,
|
|
1643
|
+
.bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-slider-handle,
|
|
1512
1644
|
.bee-sidebar #style-borderOpacity .ant-slider .ant-slider-handle {
|
|
1513
1645
|
background-image: url("../dist/assets/icons/cc550fff.svg");
|
|
1514
1646
|
background-repeat: no-repeat;
|
|
@@ -1526,6 +1658,7 @@
|
|
|
1526
1658
|
.bee-sidebar #style-width .ant-slider .ant-slider-handle:focus,
|
|
1527
1659
|
.bee-sidebar #style-color .ant-slider .ant-slider-handle:focus,
|
|
1528
1660
|
.bee-sidebar #style-fillOpacity .ant-slider .ant-slider-handle:focus,
|
|
1661
|
+
.bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-slider-handle:focus,
|
|
1529
1662
|
.bee-sidebar #style-borderOpacity .ant-slider .ant-slider-handle:focus {
|
|
1530
1663
|
box-shadow: none;
|
|
1531
1664
|
}
|
|
@@ -1535,6 +1668,7 @@
|
|
|
1535
1668
|
.bee-sidebar #style-width .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow,
|
|
1536
1669
|
.bee-sidebar #style-color .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow,
|
|
1537
1670
|
.bee-sidebar #style-fillOpacity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow,
|
|
1671
|
+
.bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow,
|
|
1538
1672
|
.bee-sidebar #style-borderOpacity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow {
|
|
1539
1673
|
color: inherit;
|
|
1540
1674
|
font-style: normal;
|
|
@@ -1558,6 +1692,7 @@
|
|
|
1558
1692
|
.bee-sidebar #style-width .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header,
|
|
1559
1693
|
.bee-sidebar #style-color .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header,
|
|
1560
1694
|
.bee-sidebar #style-fillOpacity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header,
|
|
1695
|
+
.bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header,
|
|
1561
1696
|
.bee-sidebar #style-borderOpacity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header {
|
|
1562
1697
|
position: relative;
|
|
1563
1698
|
color: rgba(0, 0, 0, 0.85);
|
|
@@ -1584,6 +1719,9 @@
|
|
|
1584
1719
|
.bee-sidebar #style-fillOpacity .ant-slider-rail,
|
|
1585
1720
|
.bee-sidebar #style-fillOpacity .ant-slider-track,
|
|
1586
1721
|
.bee-sidebar #style-fillOpacity .ant-slider-step,
|
|
1722
|
+
.bee-sidebar #style-rectRotateSensitivity .ant-slider-rail,
|
|
1723
|
+
.bee-sidebar #style-rectRotateSensitivity .ant-slider-track,
|
|
1724
|
+
.bee-sidebar #style-rectRotateSensitivity .ant-slider-step,
|
|
1587
1725
|
.bee-sidebar #style-borderOpacity .ant-slider-rail,
|
|
1588
1726
|
.bee-sidebar #style-borderOpacity .ant-slider-track,
|
|
1589
1727
|
.bee-sidebar #style-borderOpacity .ant-slider-step {
|
|
@@ -1596,38 +1734,46 @@
|
|
|
1596
1734
|
.bee-sidebar #style-width .ant-slider .ant-slider-track,
|
|
1597
1735
|
.bee-sidebar #style-color .ant-slider .ant-slider-track,
|
|
1598
1736
|
.bee-sidebar #style-fillOpacity .ant-slider .ant-slider-track,
|
|
1737
|
+
.bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-slider-track,
|
|
1599
1738
|
.bee-sidebar #style-borderOpacity .ant-slider .ant-slider-track {
|
|
1600
1739
|
background: none;
|
|
1601
1740
|
}
|
|
1602
1741
|
.bee-sidebar #style-radius .ant-slider-step .ant-slider-dot,
|
|
1603
|
-
.bee-sidebar #style-width .ant-slider-step .ant-slider-dot
|
|
1742
|
+
.bee-sidebar #style-width .ant-slider-step .ant-slider-dot,
|
|
1743
|
+
.bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot {
|
|
1604
1744
|
height: 12px;
|
|
1605
1745
|
background: #666666;
|
|
1606
1746
|
border-radius: 0;
|
|
1607
1747
|
margin-left: -2px;
|
|
1608
1748
|
}
|
|
1609
1749
|
.bee-sidebar #style-radius .ant-slider-step .ant-slider-dot:nth-of-type(1),
|
|
1610
|
-
.bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(1)
|
|
1750
|
+
.bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(1),
|
|
1751
|
+
.bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot:nth-of-type(1) {
|
|
1611
1752
|
width: 1px;
|
|
1612
1753
|
}
|
|
1613
1754
|
.bee-sidebar #style-radius .ant-slider-step .ant-slider-dot:nth-of-type(2),
|
|
1614
|
-
.bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(2)
|
|
1755
|
+
.bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(2),
|
|
1756
|
+
.bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot:nth-of-type(2) {
|
|
1615
1757
|
width: 2px;
|
|
1616
1758
|
}
|
|
1617
1759
|
.bee-sidebar #style-radius .ant-slider-step .ant-slider-dot:nth-of-type(3),
|
|
1618
|
-
.bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(3)
|
|
1760
|
+
.bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(3),
|
|
1761
|
+
.bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot:nth-of-type(3) {
|
|
1619
1762
|
width: 3px;
|
|
1620
1763
|
}
|
|
1621
1764
|
.bee-sidebar #style-radius .ant-slider-step .ant-slider-dot:nth-of-type(4),
|
|
1622
|
-
.bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(4)
|
|
1765
|
+
.bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(4),
|
|
1766
|
+
.bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot:nth-of-type(4) {
|
|
1623
1767
|
width: 4px;
|
|
1624
1768
|
}
|
|
1625
1769
|
.bee-sidebar #style-radius .ant-slider-step .ant-slider-dot:nth-of-type(5),
|
|
1626
|
-
.bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(5)
|
|
1770
|
+
.bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(5),
|
|
1771
|
+
.bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot:nth-of-type(5) {
|
|
1627
1772
|
width: 5px;
|
|
1628
1773
|
}
|
|
1629
1774
|
.bee-sidebar #style-radius .ant-slider:hover .ant-slider-rail,
|
|
1630
|
-
.bee-sidebar #style-width .ant-slider:hover .ant-slider-rail
|
|
1775
|
+
.bee-sidebar #style-width .ant-slider:hover .ant-slider-rail,
|
|
1776
|
+
.bee-sidebar #style-rectRotateSensitivity .ant-slider:hover .ant-slider-rail {
|
|
1631
1777
|
background: #f5f5f5;
|
|
1632
1778
|
}
|
|
1633
1779
|
.bee-sidebar #style-color .ant-slider-rail {
|
|
@@ -2244,6 +2390,9 @@
|
|
|
2244
2390
|
.bee-pop-confirm .ant-popover-buttons {
|
|
2245
2391
|
min-width: 116px;
|
|
2246
2392
|
}
|
|
2393
|
+
.bee-pop-confirm .ant-popover-inner-content .ant-popover-message {
|
|
2394
|
+
align-items: initial;
|
|
2395
|
+
}
|
|
2247
2396
|
|
|
2248
2397
|
.bee-annotated-attribute {
|
|
2249
2398
|
width: 240px;
|
|
@@ -2494,14 +2643,14 @@
|
|
|
2494
2643
|
margin-right: 16px;
|
|
2495
2644
|
background-image: url("../dist/assets/icons/7eadb9c4.svg");
|
|
2496
2645
|
}
|
|
2497
|
-
.bee-point-cloud-wrapper .bee-point-cloud-container__header-toolbar .bee-point-cloud__rotate-
|
|
2646
|
+
.bee-point-cloud-wrapper .bee-point-cloud-container__header-toolbar .bee-point-cloud__rotate-90 {
|
|
2498
2647
|
display: inline-block;
|
|
2499
2648
|
height: 24px;
|
|
2500
2649
|
width: 24px;
|
|
2501
2650
|
background-repeat: no-repeat;
|
|
2502
2651
|
cursor: pointer;
|
|
2503
2652
|
flex: none;
|
|
2504
|
-
background-image: url("../dist/assets/icons/
|
|
2653
|
+
background-image: url("../dist/assets/icons/ad33251.svg");
|
|
2505
2654
|
}
|
|
2506
2655
|
.bee-point-cloud-wrapper .bee-point-cloud-container__header-toolbar .bee-point-cloud__next {
|
|
2507
2656
|
font-size: 24px;
|
package/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default as AnnotationView}from"./components/AnnotationView/index.js";export{default as PointCloudAnnotationView}from"./components/AnnotationView/pointCloudAnnotationView.js";export{default as QuestionView}from"./components/LLMToolView/questionView/index.js";export{default as TextContent}from"./components/NLPToolView/textContent/index.js";import{i18n as
|
|
1
|
+
export{default as AnnotationView}from"./components/AnnotationView/index.js";export{default as PointCloudAnnotationView}from"./components/AnnotationView/pointCloudAnnotationView.js";export{default as QuestionView}from"./components/LLMToolView/questionView/index.js";export{default as TextContent}from"./components/NLPToolView/textContent/index.js";import{i18n as s}from"@labelbee/lb-utils";export{i18n}from"@labelbee/lb-utils";import r,{useState as m,useImperativeHandle as u}from"react";import{initReactI18next as f,I18nextProvider as x}from"react-i18next";import{Provider as w}from"react-redux";import P from"./App.js";import v from"./configureStore.js";import{PageBackward as j,PageForward as T,PageJump as S}from"./store/annotation/actionCreators.js";export{VideoTagTool}from"./components/videoAnnotate/videoTagTool/TagToolInstanceAdaptorI18nProvider.js";import{PointCloudProvider as b}from"./components/pointCloudView/PointCloudContext.js";import{LabelBeeContext as g}from"./store/ctx.js";export{default as PredictTracking}from"./components/predictTracking/predictTrackingIcon/index.js";export{default as LLMToolView}from"./components/LLMToolView/index.js";export{default as SwitchCuboidBoxIn2DView,SwitchCuboidBoxIn2DViewStateMode}from"./views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js";export{default as BatchSwitchConnectIn2DView}from"./views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.js";export{default as MeasureCanvas}from"./components/measureCanvas/index.js";export{default as AnnotatedBox}from"./views/MainView/sidebar/PointCloudToolSidebar/components/annotatedBox/index.js";export{default as RectRotateSensitivitySlider}from"./views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.js";export{FindTrackIDIndexInCheckMode as FindTrackIDIndex}from"./views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/index.js";export{WrapAudioPlayer as AudioPlayer}from"./components/audioPlayer/index.js";export{generatePointCloudBoxRects}from"./utils/index.js";export{default as SubAttributeList}from"./components/subAttributeList/index.js";import{ToolStyleProvider as C}from"./hooks/useToolStyle.js";import{LoadFileAndFileData as I}from"./store/annotation/reducer.js";export{default as useToolConfigStore}from"./store/toolConfig/index.js";export{EDataFormatType,ELLMDataType,EStepType,ESubmitType,componentCls,prefix}from"./constant/index.js";var V=Object.defineProperty,_=Object.defineProperties,h=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,p=(o,e,t)=>e in o?V(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,D=(o,e)=>{for(var t in e||(e={}))y.call(e,t)&&p(o,t,e[t]);if(l)for(var t of l(e))A.call(e,t)&&p(o,t,e[t]);return o},L=(o,e)=>_(o,h(e));const n=v();s.use(f),s.options.react={useSuspense:!1};const B=(o,e)=>{const[t,c]=m();return u(e,()=>({toolInstance:t,annotationEngine:n.getState().annotation.annotationEngine,pageBackwardActions:()=>n.dispatch(j()),pageForwardActions:()=>n.dispatch(T()),pageJump:(i,a)=>{const d=~~i-1;n.dispatch(S(d)),a&&n.dispatch(I(d))},hello:()=>alert("hello labelBee!!!")}),[t]),r.createElement(w,{store:n,context:g},r.createElement(x,{i18n:s},r.createElement(C,{value:o.toolStyle},r.createElement(b,null,r.createElement(P,L(D({},o),{setToolInstance:i=>{var a;c(i),(a=o.onLoad)==null||a.call(o,{toolInstance:i})}}))))))};var E=r.forwardRef(B);export{E as default,n as store};
|
package/es/store/Actions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const T={INIT_ALL_STATE:"@@INIT_ALL_STATE",UPDATE_TOOL_INSTANCE:"@@UPDATE_TOOL_INSTANCE",UPDATE_IMG_LIST:"@@UPDATE_IMG_LIST",UPDATE_ANNOTATION_CONFIG:"@@UPDATE_ANNOTATION_CONFIG",LOAD_FILE_DATA:"@@LOAD_FILE_DATA",SUBMIT_FILE_DATA:"@@SUBMIT_FILE_DATA",SET_TASK_CONFIG:"@@SET_TASK_CONFIG",INIT_TOOL:"@@INIT_TOOL",SET_TOOL:"@@SET_TOOL",UPDATE_ON_SUBMIT:"@@UPDATE_ON_SUBMIT",UPDATE_ON_SAVE:"@@UPDATE_ON_SAVE",UPDATE_ON_PAGE_CHANGE:"@@UPDATE_ON_PAGE_CHANGE",UPDATE_ON_STEP_CHANGE:"@@UPDATE_ON_STEP_CHANGE",UPDATE_ROTATE:"@@UPDATE_ROTATE",UPDATE_GET_FILE_DATA:"@@UPDATE_GET_FILE_DATA",UPDATE_PAGE_SIZE:"@@UPDATE_PAGE_SIZE",UPDATE_LOAD_FILE_LIST:"@@UPDATE_LOAD_FILE_LIST",GET_FILE_DATA:"@@GET_FILE_DATA",SET_FILE_DATA:"@@SET_FILE_DATA",COPY_BACKWARD_RESULT:"@@COPY_BACKWARD_RESULT",SET_STEP:"@@SET_STEP",SUBMIT_RESULT:"@@SUBMIT_RESULT",SAVE_RESULT:"@@SAVE_RESULT",SET_BASIC_INDEX:"@@SET_BASIC_INDEX",CALC_STEP_PROGRESS:"@@CALC_STEP_PROGRESS",SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:"@@SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED",SKIP_BEFORE_PAGE_TURNING:"@@SKIP_BEFORE_PAGE_TURNING",UPDATE_BEFORE_ROTATE:"@@UPDATE_BEFORE_ROTATE",SET_LOADING:"@@SET_LOADING",SET_LOADPCDFILE_LOADING:"@@SET_LOADPCDFILE_LOADING",SET_POINT_CLOUD_LOADING:"@@SET_POINT_CLOUD_LOADING",SET_CHECK_MODE:"@@SET_CHECK_MODE",SET_TASK_STEP_LIST:"@@SET_TASK_STEP_LIST",UPDATE_ANNOTATION_VALID:"@@UPDATE_ANNOTATION_VALID",BATCH_UPDATE_TRACK_ID:"@@BATCH_UPDATE_TRACK_ID",BATCH_UPDATE_RESULT_BY_TRACK_ID:"@@BATCH_UPDATE_RESULT_BY_TRACK_ID",BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:"@@BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT",SET_PREDICT_RESULT_VISIBLE:"@@SET_PREDICT_RESULT_VISIBLE",SET_PREDICT_RESULT:"@@SET_PREDICT_RESULT",SET_HIGHLIGHT_ATTRIBUTE:"@@SET_HIGHLIGHT_ATTRIBUTE",UPDATE_PRE_DATA_PROCESS:"@@UPDATE_PRE_DATA_PROCESS"},_={UPDATE_IMG_ATTRIBUTE:"@@UPDATE_IMG_ATTRIBUTE",INIT_IMG_ATTRIBUTE:"@@INIT_IMG_ATTRIBUTE"},E={INIT_TOOL_STYLE_CONFIG:"@@INIT_TOOL_STYLE_CONFIG",UPDATE_TOOL_STYLE_CONFIG:"@@UPDATE_TOOL_STYLE_CONFIG"};export{T as ANNOTATION_ACTIONS,_ as IMAGE_ATTRIBUTE_ACTIONS,E as TOOL_STYLE_ACTIONS};
|
|
1
|
+
const T={INIT_ALL_STATE:"@@INIT_ALL_STATE",UPDATE_TOOL_INSTANCE:"@@UPDATE_TOOL_INSTANCE",UPDATE_IMG_LIST:"@@UPDATE_IMG_LIST",UPDATE_ANNOTATION_CONFIG:"@@UPDATE_ANNOTATION_CONFIG",LOAD_FILE_DATA:"@@LOAD_FILE_DATA",SUBMIT_FILE_DATA:"@@SUBMIT_FILE_DATA",SET_TASK_CONFIG:"@@SET_TASK_CONFIG",INIT_TOOL:"@@INIT_TOOL",SET_TOOL:"@@SET_TOOL",UPDATE_ON_SUBMIT:"@@UPDATE_ON_SUBMIT",UPDATE_ON_SAVE:"@@UPDATE_ON_SAVE",UPDATE_ON_PAGE_CHANGE:"@@UPDATE_ON_PAGE_CHANGE",UPDATE_ON_STEP_CHANGE:"@@UPDATE_ON_STEP_CHANGE",UPDATE_ROTATE:"@@UPDATE_ROTATE",UPDATE_GET_FILE_DATA:"@@UPDATE_GET_FILE_DATA",UPDATE_PAGE_SIZE:"@@UPDATE_PAGE_SIZE",UPDATE_LOAD_FILE_LIST:"@@UPDATE_LOAD_FILE_LIST",GET_FILE_DATA:"@@GET_FILE_DATA",SET_FILE_DATA:"@@SET_FILE_DATA",COPY_BACKWARD_RESULT:"@@COPY_BACKWARD_RESULT",SET_STEP:"@@SET_STEP",SUBMIT_RESULT:"@@SUBMIT_RESULT",SAVE_RESULT:"@@SAVE_RESULT",SET_BASIC_INDEX:"@@SET_BASIC_INDEX",CALC_STEP_PROGRESS:"@@CALC_STEP_PROGRESS",SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:"@@SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED",SKIP_BEFORE_PAGE_TURNING:"@@SKIP_BEFORE_PAGE_TURNING",UPDATE_BEFORE_ROTATE:"@@UPDATE_BEFORE_ROTATE",SET_LOADING:"@@SET_LOADING",SET_LOADPCDFILE_LOADING:"@@SET_LOADPCDFILE_LOADING",SET_POINT_CLOUD_LOADING:"@@SET_POINT_CLOUD_LOADING",SET_CHECK_MODE:"@@SET_CHECK_MODE",SET_TASK_STEP_LIST:"@@SET_TASK_STEP_LIST",UPDATE_ANNOTATION_VALID:"@@UPDATE_ANNOTATION_VALID",BATCH_UPDATE_TRACK_ID:"@@BATCH_UPDATE_TRACK_ID",BATCH_UPDATE_RESULT_BY_TRACK_ID:"@@BATCH_UPDATE_RESULT_BY_TRACK_ID",BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:"@@BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT",SET_PREDICT_RESULT_VISIBLE:"@@SET_PREDICT_RESULT_VISIBLE",SET_PREDICT_RESULT:"@@SET_PREDICT_RESULT",SET_HIGHLIGHT_ATTRIBUTE:"@@SET_HIGHLIGHT_ATTRIBUTE",UPDATE_PRE_DATA_PROCESS:"@@UPDATE_PRE_DATA_PROCESS",UPDATE_IMG_INDEX_BY_EXTERNAL:"@@UPDATE_IMG_INDEX_BY_EXTERNAL"},_={UPDATE_IMG_ATTRIBUTE:"@@UPDATE_IMG_ATTRIBUTE",INIT_IMG_ATTRIBUTE:"@@INIT_IMG_ATTRIBUTE"},E={INIT_TOOL_STYLE_CONFIG:"@@INIT_TOOL_STYLE_CONFIG",UPDATE_TOOL_STYLE_CONFIG:"@@UPDATE_TOOL_STYLE_CONFIG"};export{T as ANNOTATION_ACTIONS,_ as IMAGE_ATTRIBUTE_ACTIONS,E as TOOL_STYLE_ACTIONS};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{create as
|
|
1
|
+
import{create as i}from"zustand";const o=i(e=>({ptCtx:{},pointCloudBoxList:[],setPointCloudBoxList:t=>e(s=>({pointCloudBoxList:t})),highlightIDs:[],setHighlightIDs:t=>e(s=>({highlightIDs:t})),selectedIDs:[],setSelectedIDs:t=>e(s=>({selectedIDs:t})),rectRotateSensitivity:2,setRectRotateSensitivity:t=>e(s=>({rectRotateSensitivity:t})),setPtCtx:t=>e(s=>({ptCtx:t}))}));export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ANNOTATION_ACTIONS as a}from"../Actions.js";import{LoadFileAndFileData as
|
|
1
|
+
import{ANNOTATION_ACTIONS as a}from"../Actions.js";import{LoadFileAndFileData as N,getStepConfig as V}from"./reducer.js";import{ESubmitType as E}from"../../constant/index.js";import{EPageTurningOperation as y}from"../../data/enums/AnnotationSize.js";import J from"../../utils/PageOperator.js";import{jsonParser as X}from"../../utils/index.js";import{getBoxesByTrackID as Y}from"../../components/predictTracking/previewResult/util.js";var S=(t,n,e)=>new Promise((o,r)=>{var i=l=>{try{u(e.next(l))}catch(p){r(p)}},s=l=>{try{u(e.throw(l))}catch(p){r(p)}},u=l=>l.done?o(l.value):Promise.resolve(l.value).then(i,s);u((e=e.apply(t,n)).next())});const G=(t,n)=>n.map(e=>t(e)),W=t=>t===y.Forward?E.Forward:t===y.Backward?E.Backward:t===y.Jump?E.Jump:E.Forward,q=(t,n)=>{var e,o,r;const{imgList:i,imgIndex:s}=t,{dataSourceStep:u}=V(t.stepList,t.step);return((r=(o=X((e=i[s-1])==null?void 0:e.result)[`step_${u}`])==null?void 0:o.result)==null?void 0:r.length)-1||n};function z(t){return{type:a.UPDATE_TOOL_INSTANCE,payload:{toolInstance:t}}}function w({stepList:t}){return{type:a.SET_TASK_STEP_LIST,payload:{stepList:t}}}function F({stepList:t,step:n}){return{type:a.SET_TASK_CONFIG,payload:{stepList:t,step:n}}}function L(t){return{type:a.UPDATE_ON_SUBMIT,payload:{onSubmit:t}}}function D(t){return{type:a.UPDATE_ON_SAVE,payload:{onSave:t}}}function m(t){return{type:a.UPDATE_ON_PAGE_CHANGE,payload:{onPageChange:t}}}function R(t){return{type:a.UPDATE_ON_STEP_CHANGE,payload:{onStepChange:t}}}function g(t){return{type:a.UPDATE_GET_FILE_DATA,payload:{getFileData:t}}}function h(t){return{type:a.UPDATE_PAGE_SIZE,payload:{pageSize:t}}}function B(t){return{type:a.UPDATE_LOAD_FILE_LIST,payload:{loadFileList:t}}}function Z(){return{type:a.UPDATE_ROTATE}}function k(t){return{type:a.SKIP_BEFORE_PAGE_TURNING,payload:{skipBeforePageTurning:t}}}function C(t){return{type:a.UPDATE_BEFORE_ROTATE,payload:{beforeRotate:t}}}function v(t){return{type:a.UPDATE_PRE_DATA_PROCESS,payload:{preDataProcess:t}}}function $(){return{type:a.COPY_BACKWARD_RESULT}}function b(t){return{type:a.UPDATE_IMG_INDEX_BY_EXTERNAL,payload:{getImgIndexByExternal:t}}}function Q({id:t,newID:n,rangeIndex:e,imgList:o}){return{type:a.BATCH_UPDATE_TRACK_ID,payload:{id:t,newID:n,rangeIndex:e,imgList:o}}}function tt(t,n,e){return{type:a.BATCH_UPDATE_RESULT_BY_TRACK_ID,payload:{id:t,newData:n,rangeIndex:e}}}function nt(){return{type:a.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT,payload:{}}}const H=t=>({type:a.SET_CHECK_MODE,payload:{checkMode:t}}),x=t=>({type:a.SET_HIGHLIGHT_ATTRIBUTE,payload:{attribute:t}});function et({onSubmit:t,onSave:n,onPageChange:e,onStepChange:o,getFileData:r,pageSize:i,loadFileList:s,step:u,stepList:l,skipBeforePageTurning:p,beforeRotate:_,checkMode:c,highlightAttribute:T,preDataProcess:f,getImgIndexByExternal:I}){const d=[];return t&&d.push(L(t)),n&&d.push(D(n)),e&&d.push(m(e)),o&&d.push(R(o)),r&&d.push(g(r)),s&&d.push(B(s)),i&&d.push(h(i)),p&&d.push(k(p)),_&&d.push(C(_)),f&&d.push(v(f)),typeof c=="boolean"&&d.push(H(c)),I&&d.push(b(I)),d.push(x(T)),d.push(F({stepList:l,step:u})),d.push({type:a.CALC_STEP_PROGRESS}),d.push({type:a.INIT_TOOL}),O=>G(O,d)}function at({onSubmit:t,onSave:n,onPageChange:e,onStepChange:o,getFileData:r,pageSize:i,loadFileList:s,stepList:u,beforeRotate:l,highlightAttribute:p,preDataProcess:_}){const c=[];return t&&c.push(L(t)),n&&c.push(D(n)),e&&c.push(m(e)),o&&c.push(R(o)),r&&c.push(g(r)),s&&c.push(B(s)),i&&c.push(h(i)),l&&c.push(C(l)),_&&c.push(v(_)),c.push(x(p)),c.push(w({stepList:u})),T=>G(T,c)}const ot=(t,n)=>{var e;const o=n==null?void 0:n.findIndex(r=>(r==null?void 0:r.step)===t);return(e=n[o+1])==null?void 0:e.step},rt=t=>(n,e)=>{const{annotation:o}=e(),{step:r,stepList:i}=o,s=ot(r,i);return[n(M(s,t))]},M=(t,n)=>(e,o)=>{var r,i;const{annotation:s}=o();(r=s==null?void 0:s.onStepChange)==null||r.call(s,t);const u=(i=s==null?void 0:s.imgIndex)!=null?i:0;return[e({type:a.SUBMIT_RESULT}),e({type:a.SUBMIT_FILE_DATA,payload:{submitType:E.StepChanged}}),e({type:a.SET_STEP,payload:{toStep:t}}),e({type:a.CALC_STEP_PROGRESS}),e(N(n!=null?n:u,0))]},A=t=>n=>[n({type:a.SUBMIT_RESULT}),n({type:a.SUBMIT_FILE_DATA,payload:{submitType:t}})],it=(t,n,e,o)=>S(void 0,null,function*(){t(A(e)),yield t(K(e)),t(N(n,o))}),ut=(t,n)=>[t({type:a.SUBMIT_RESULT}),t({type:a.SET_BASIC_INDEX,payload:{basicIndex:n}})],st=(t,n)=>{t({type:a.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED,payload:{triggerEventAfterIndexChanged:n}})},lt=(t=!1)=>(n,e)=>P(n,e,y.Backward,t),pt=(t=!1)=>(n,e)=>P(n,e,y.Forward,t),dt=(t,n=!1)=>(e,o)=>{if(t!==o().imgIndex)return P(e,o,y.Jump,n,t)},j=(t,n,e,o)=>S(void 0,null,function*(){var r;const{loadFileList:i,imgList:s,pageSize:u}=n().annotation,l=Math.floor(e/u);U(t,!0);try{const p=yield i(l,u);if(U(t,!1),!((r=p==null?void 0:p.fileList)==null?void 0:r.length)||!(p==null?void 0:p.total))throw new Error("fileList and total are required");const _=o?new Array(p.total):[...s];return _.splice(l*u,u,...p.fileList),t({type:a.UPDATE_IMG_LIST,payload:{imgList:_}}),!0}catch(p){U(t,!1),console.error(p)}}),P=(t,n,e,o=!1,r)=>S(void 0,null,function*(){var i,s;const u=n().annotation,l=W(e);let{fileIndexChanged:p,fileIndex:_,basicIndexChanged:c,basicIndex:T}=J.getNextPageInfo(e,u,r);const f=(i=u==null?void 0:u.getImgIndexByExternal)==null?void 0:i.call(u,u.imgIndex,l);if(f!==void 0&&(p=!0,_=f),st(t,o),p){if(u.loading||!u.imgList[_]&&!(yield j(t,n,_)))return;const I=n();(s=u.onPageChange)==null||s.call(u,_);const d=l===E.Backward?q(I.annotation,T):T;return it(t,_,l,d)}return c?ut(t,T):t(A(l))}),ct=t=>{t(A(E.Save)),t({type:a.SAVE_RESULT})},U=(t,n)=>{t({type:a.SET_LOADING,payload:{loading:n}})},_t=(t,n)=>{t({type:a.SET_LOADPCDFILE_LOADING,payload:{loadPCDFileLoading:n}})},Tt=t=>{t({type:a.INIT_ALL_STATE,payload:{}})},Et=(t,n)=>{t({type:a.SET_PREDICT_RESULT,payload:{result:n}})},yt=(t,n)=>{t({type:a.SET_PREDICT_RESULT_VISIBLE,payload:{visible:n}})},ft=(t,n)=>(e,o)=>{const{imgList:r,step:i}=o().annotation;return Y(r,i,t,n)},It=t=>(n,e)=>{var o,r;const{annotation:i}=e();return(r=(o=i==null?void 0:i.preDataProcess)==null?void 0:o.call(i,t))!=null?r:t.dataList},K=t=>(n,e)=>S(void 0,null,function*(){const{annotation:o}=e(),{onSubmit:r,imgIndex:i,imgList:s}=o;!r||(yield r([s[i]],t,i,s))});export{nt as BatchUpdateImgListResultByPredictResult,tt as BatchUpdateResultByTrackID,Q as BatchUpdateTrackID,ct as ChangeSave,$ as CopyBackWordResult,P as DispatcherTurning,ft as GetBoxesByID,Tt as InitAnnotationState,et as InitTaskData,lt as PageBackward,pt as PageForward,dt as PageJump,It as PreDataProcess,U as SetAnnotationLoading,_t as SetLoadPCDFileLoading,Et as SetPredictResult,yt as SetPredictResultVisible,F as SetTaskConfig,w as SetTaskStepList,K as SubmitHandler,rt as ToNextStep,A as ToSubmitFileData,C as UpdateBeforeRotate,H as UpdateCheckMode,g as UpdateGetFileData,B as UpdateGetFileList,x as UpdateHighlightAttribute,b as UpdateImgIndexByExternal,at as UpdateInjectFunc,m as UpdateOnPageChange,D as UpdateOnSave,R as UpdateOnStepChange,L as UpdateOnSubmit,h as UpdatePageSize,v as UpdatePreDataProcess,M as UpdateProcessingStep,Z as UpdateRotate,k as UpdateSkipBeforePageTurning,z as UpdateToolInstance,j as loadImgList};
|
|
@@ -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 l}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},i=(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:l.SET_FILE_DATA,payload:{fileData:A,index:t}})}}),Ft=t=>e=>{e({type:l.LOAD_FILE_DATA,payload:{nextIndex:t}})},jt=t=>e=>{$(e,!1),e({type:l.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:l.LOAD_FILE_DATA,payload:{imgNode:m,nextIndex:t,nextBasicIndex:e}})}).catch(()=>{$(r,!1),A==null||A.setErrorImg(),r({type:l.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(i(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 l.INIT_ALL_STATE:return n(n({},t),ft);case l.UPDATE_TOOL_INSTANCE:return i(n({},t),{toolInstance:e.payload.toolInstance});case l.UPDATE_IMG_LIST:return i(n({},t),{imgList:e.payload.imgList});case l.CALC_STEP_PROGRESS:{const{imgList:o,step:s}=t,u=Tt(o,s);return i(n({},t),{stepProgress:u})}case l.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(i(n({},C),{result:j}),I)}return C});if(((f=e.payload)==null?void 0:f.submitType)===K.SyncImgList)return i(n({},t),{imgList:v});c&&c([v[s]],(T=e.payload)==null?void 0:T.submitType,s,v);const U=Tt(v,u);return i(n({},t),{stepProgress:U,imgList:v})}case l.SAVE_RESULT:{const{imgList:o,imgIndex:s,onSave:u}=t;return u==null||u(o[s],s,o),n({},t)}case l.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=>i(n({},I),{sourceID:g}));L=_t.cloneDeep(u).filter(I=>I.sourceID!==g),L.push(..._)}return i(n({},t),{resultList:L,imgList:o})}case l.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),i(n({},t),{basicIndex:_})}case l.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:{const{triggerEventAfterIndexChanged:o}=e.payload;return i(n({},t),{triggerEventAfterIndexChanged:!!o})}case l.LOAD_FILE_DATA:{const{imgList:o,step:s,toolInstance:u,annotationEngine:a,stepList:p}=t;if(!u)return i(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 i(n({},t),{imgIndex:L,basicIndex:E,basicResultList:B,resultList:z})}case l.UPDATE_ANNOTATION_CONFIG:return i(n({},t),{config:(tt=e.payload.config)!=null?tt:"{}"});case l.SET_TASK_STEP_LIST:{const{stepList:o}=e.payload;return i(n({},t),{stepList:o})}case l.SET_TASK_CONFIG:{const{stepList:o,step:s}=e.payload;return i(n({},t),{stepList:o,step:s})}case l.INIT_TOOL:{const{imgNode:o}=t,s=Bt(t,o);if(s){const{toolInstance:u,annotationEngine:a}=s;return i(n({},t),{toolInstance:u,annotationEngine:a})}return n({},t)}case l.SET_TOOL:{const o=(et=e.payload)==null?void 0:et.instance;return o?i(n({},t),{toolInstance:o}):n({},t)}case l.UPDATE_ON_SUBMIT:return i(n({},t),{onSubmit:e.payload.onSubmit});case l.UPDATE_ON_SAVE:return i(n({},t),{onSave:e.payload.onSave});case l.UPDATE_ON_PAGE_CHANGE:return i(n({},t),{onPageChange:e.payload.onPageChange});case l.SET_PREDICT_RESULT:return i(n({},t),{predictionResult:e.payload.result});case l.SET_PREDICT_RESULT_VISIBLE:return i(n({},t),{predictionResultVisible:e.payload.visible});case l.UPDATE_ON_STEP_CHANGE:return i(n({},t),{onStepChange:e.payload.onStepChange});case l.UPDATE_GET_FILE_DATA:return i(n({},t),{getFileData:e.payload.getFileData});case l.UPDATE_PAGE_SIZE:return i(n({},t),{pageSize:e.payload.pageSize});case l.UPDATE_LOAD_FILE_LIST:return i(n({},t),{loadFileList:e.payload.loadFileList});case l.UPDATE_BEFORE_ROTATE:return i(n({},t),{beforeRotate:e.payload.beforeRotate});case l.UPDATE_PRE_DATA_PROCESS:return i(n({},t),{preDataProcess:e.payload.preDataProcess});case l.SKIP_BEFORE_PAGE_TURNING:return i(n({},t),{skipBeforePageTurning:e.payload.skipBeforePageTurning});case l.SET_FILE_DATA:{const{fileData:o,index:s}=e.payload,{imgList:u}=t,a=[...u];return a[s]=n(n({},a[s]),o),i(n({},t),{imgList:a})}case l.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 l.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 l.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]=i(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]),i(n({},t),{imgList:[...u]})}case l.SET_STEP:{const{stepList:o,annotationEngine:s}=t,{toStep:u}=e.payload;if(!s)return t;const a=x(o,u);return s==null||s.setToolName(a.tool,a.config),i(n({},t),{step:u,toolInstance:s==null?void 0:s.toolInstance})}case l.SET_LOADPCDFILE_LOADING:{const{loadPCDFileLoading:o}=e.payload;return i(n({},t),{loadPCDFileLoading:!!o})}case l.SET_LOADING:{const{loading:o}=e.payload;return i(n({},t),{loading:!!o})}case l.SET_POINT_CLOUD_LOADING:{const{pointCloudLoading:o}=e.payload;return i(n({},t),{pointCloudLoading:!!o})}case l.SET_CHECK_MODE:{const{checkMode:o}=e.payload;return i(n({},t),{checkMode:!!o})}case l.SET_HIGHLIGHT_ATTRIBUTE:{const{attribute:o}=e.payload;return i(n({},t),{highlightAttribute:o})}case l.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=i(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}),i(n({},t),{imgList:g})}case l.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=i(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}),i(n({},t),{imgList:g})}case l.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=i(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}),i(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 K}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 O from"../../utils/StepUtils.js";import J from"../../utils/ToolUtils.js";import{MathUtils as pt,CommonToolUtils as Ct,AnnotationEngine as Ot,ImgUtils as ht}from"@labelbee/lb-annotation";import{PointCloudUtils as gt,i18n as G}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,Tt=(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)&&Tt(t,u,e[u]);if(ft)for(var u of ft(e))xt.call(e,u)&&Tt(t,u,e[u]);return t},s=(t,e)=>Nt(t,Ut(e)),Lt=(t,e,u)=>new Promise((S,d)=>{var A=m=>{try{E(u.next(m))}catch(y){d(y)}},L=m=>{try{E(u.throw(m))}catch(y){d(y)}},E=m=>m.done?S(m.value):Promise.resolve(m.value).then(A,L);E((u=u.apply(t,e)).next())});const w=(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=O.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].includes(d==null?void 0:d.tool))return;const L=document.getElementById("toolContainer");if(!L)throw"Not exist dom named id-toolContainer";const E=yt({width:window.innerWidth,height:window.innerHeight}),m=new Ot({container:L,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)=>Lt(void 0,null,function*(){var d,A;const{stepList:L,step:E}=S().annotation,m=O.currentToolIsVideo(E,L),y=O.currentToolIsPointCloud(E,L),h=((d=O.getCurrentStepInfo(E,L))==null?void 0:d.tool)===W.LLM,b=((A=O.getCurrentStepInfo(E,L))==null?void 0:A.tool)===W.NLP,N=O.currentToolIsAudio(E,L);if($(u,!0),yield u(Gt(t)),m){u(Vt(t));return}if(y||h||N||b){u(Mt(t));return}u(kt(t,e))}),Gt=t=>(e,u)=>Lt(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}})}}),Vt=t=>e=>{e({type:i.LOAD_FILE_DATA,payload:{nextIndex:t}})},Mt=t=>e=>{$(e,!1),e({type:i.LOAD_FILE_DATA,payload:{nextIndex:t}})},kt=(t,e)=>(u,S)=>{var d;const{toolInstance:A,imgList:L}=S().annotation,E=(d=L==null?void 0:L[t])==null?void 0:d.url;ht.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,L,E,m;const y=((A=e[u])==null?void 0:A.result)||"",[h,b,N]=(L=t==null?void 0:t.exportData())!=null?L:[],V=(m=(E=t==null?void 0:t.exportCustomData)==null?void 0:E.call(t))!=null?m:{},M=dt(y,b),k=Y(M,{step:d,stepList:S},{rect:h},V);return e.map((F,H)=>H===u?o(s(o({},F),{result:k}),N):o({},F))},zt=(t=o({},Et),e)=>{var u,S,d,A,L,E,m,y,h,b,N,V,M,k,F,H,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:[],T=(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},T),P=t.imgList.map((C,R)=>{if(R===l){const j=X.dataCorrection(v,I,r,a);return o(s(o({},C),{result:j}),g)}return C});if(((L=e.payload)==null?void 0:L.submitType)===K.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,T=x((h=r[a])==null?void 0:h.result),D=(f||[]).filter(j=>j.sourceID===g),v=w(p,l),{dataSourceStep:P,tool:U}=v,C=w(p,P);let R=[];return P&&U&&(R=(b=T[`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(G.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=O.getCurrentStepInfo(l,p),{nextIndex:f,imgNode:I,nextBasicIndex:_,imgError:g}=e.payload,T=_!=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:(M=D.valid)!=null?M:!0};I&&g!==!0?a==null||a.setImgNode(I,U):r==null||r.setValid(U.valid);const C=w(p,c.step),{dataSourceStep:R,tool:j}=C,at=w(p,R),ct=R&&j,B=(F=(k=D[`step_${R}`])==null?void 0:k.result)!=null?F:[],z=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[T]):(a==null||a.setBasicInfo(at.tool),a==null||a.forbidOperation(),It.info(G.t("NoDependency")))),c.tool!=="check"){const At=(q=(H=B[T])==null?void 0:H.id)!=null?q:"",Dt=ct?z.filter(vt=>Ct.isSameSourceID(vt.sourceID,At)):z;(Z=r==null?void 0:r.history)==null||Z.initRecord(z,!0),r==null||r.setResult(Dt)}return s(o({},t),{imgIndex:f,basicIndex:T,basicResultList:B,resultList:z})}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:G.t(l?"updateValidFromValidToInValid":"updateValidFromInValidToValid"),onOk:()=>{n==null||n.setValid(!l)},okText:G.t("Confirm"),cancelText:G.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=O.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=w(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 T=s(o({},_),{result:gt.batchUpdateTrackID({id:n,newID:l,result:_.result})});return f.push({imgIndex:g,newInfo:T}),T}return _});return c&&c([I[p]],K.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 T=s(o({},_),{result:gt.batchUpdateResultByTrackID({id:n,newData:l,result:_.result})});return f.push({imgIndex:g,newInfo:T}),T}return _});return c&&c([I[p]],K.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:T}=g;c[T]=mt.pick(g,["center","width","height","depth","rotation","id","attribute","valid","trackID"])});const f=`step_${a}`,I=[],_=l.map((g,T)=>{if(c[T]){const D=g.result==="{}"?x(Y("",{step:a,stepList:r},{rect:[]},{})):x(g.result);D[f].result.push(c[T]);const v=s(o({},g),{result:JSON.stringify(D)});return I.push({imgIndex:T,newInfo:v}),v}return g});return n==null||n(_,K.BatchUpdateImgList,-1,_,{updateImgList:I}),s(o({},t),{imgList:_})}default:return t}};export{jt as LoadFileAndFileData,zt as annotationReducer,Ht as composeResultByToolInstance,w as getStepConfig,wt as getTotalPage};
|
|
@@ -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";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"})(i||(i={}));var d;(function(t){t.ChangeAttribute="ChangeAttribute",t.Move="Move",t.ChangeDepth="ChangeDepth",t.ChangeSize="ChangeSize",t.ToggleValid="ToggleValid"})(d||(d={}));const p=(t,o)=>{const s=g(t).concat(g(o));for(const e of s){const n=h(t,e),r=h(o,e);if(!A(n,r))return!1}return!0},g=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},h=(t,o)=>{let s=u(t[0],o),e=s;for(const n of t){const r=u(n,o);r<s&&(s=r),r>e&&(e=r)}return{min:s,max:e}},A=(t,o)=>!(t.max<o.min||o.max<t.min),u=(t,o)=>t.x*o.x+t.y*o.y,y=(t,o)=>{const s=[];return o.forEach(e=>{const{polygonPointList:n}=l(e);p(t,n)&&s.push(e.id)}),s},v=(t,o)=>{const s=t.map(n=>n.id),e=o.map(n=>n.id);return s.find(n=>!e.includes(n))||""},S=(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:y(s,o.filter(n=>n.id!==t.id)),rect:s}},M=(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}}}},D=(t,o,s)=>{try{switch(t){case i.Single:if(o.length>s.length){const e=v(o,s);return e?{modifiedBoxIds:[e],resetAreas:[]}:{modifiedBoxIds:[],resetAreas:[]}}else{const e=[],n=[],r=M(o,s);if(r&&(e.push(r.box.id),r.modifiedType===d.ChangeSize||r.modifiedType===d.Move)){const c=s.find(m=>m.id===r.box.id),{ids:a,rect:I}=f(c,o);e.push(...a),n.push(I)}return{modifiedBoxIds:e,resetAreas:n}}case i.SingleDelete:if(o.length<s.length){const e=S(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.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:[]}}};export{i as EPointCloudBoxRenderTrigger,d as EPointCloudBoxSingleModifiedType,D as calcResetAreasAndBoxIds};
|
package/es/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import f from"lodash";import{pointCloudLidar2image as
|
|
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};
|
|
@@ -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 y}from"antd/es";import t,{useState as O}from"react";import V from"./annotationOperation/index.js";import M from"./annotationTips/index.js";import k from"./sidebar/index.js";import h from"./toolFooter/index.js";import F from"./toolHeader/index.js";import{getStepConfig as E}from"../../store/annotation/reducer.js";import I from"../../components/videoAnnotate/index.js";import{connect 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 y}from"antd/es";import t,{useState as O}from"react";import V from"./annotationOperation/index.js";import M from"./annotationTips/index.js";import k from"./sidebar/index.js";import h from"./toolFooter/index.js";import F from"./toolHeader/index.js";import{getStepConfig as E}from"../../store/annotation/reducer.js";import I from"../../components/videoAnnotate/index.js";import{connect as R}from"react-redux";import g 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 W from"../../components/predictTracking/previewResult/index.js";import{LabelBeeContext as D}from"../../store/ctx.js";import{EToolName as c}from"../../data/enums/ToolType.js";import U from"./LLMLayout/index.js";import z from"./NLPLayout/index.js";import q from"../../components/audioAnnotate/index.js";import{LoadingOutlined as G}from"@ant-design/icons";import{useTranslation as J}from"react-i18next";import{EPointCloudName as K}from"@labelbee/lb-annotation";var Q=Object.defineProperty,T=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,P=(e,o,n)=>o in e?Q(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,l=(e,o)=>{for(var n in o||(o={}))X.call(o,n)&&P(e,n,o[n]);if(T)for(var n of T(o))Y.call(o,n)&&P(e,n,o[n]);return e};const{Sider:Z,Content:p}=y,u=`${C}-layout`,ee=e=>{var o;return t.createElement(t.Fragment,null,e.showTips===!0&&t.createElement(M,{path:e.path,tips:e.tips}),t.createElement(V,l({},e)),t.createElement(h,{style:(o=e.style)==null?void 0:o.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},te=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(h,{style:(o=e.style)==null?void 0:o.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},oe=e=>{var o;const{stepList:n,step:r}=e,a=(o=E(n,r))==null?void 0:o.tool,d=g.isPointCloudTool(a),i=g.isVideoTool(a);return d?t.createElement(te,l({},e)):i?t.createElement(I,{drawLayerSlot:e.drawLayerSlot,footer:e.footer,annotationBefore:e==null?void 0:e.annotationBefore}):t.createElement(ee,l({},e))},f=e=>{var o,n,r;const{t:a}=J(),{stepList:d,step:i}=e,m=(o=E(d,i))==null?void 0:o.tool,s=![c.LLM,c.NLP].includes(m),v=![c.LLM,c.NLP].includes(m),L=[K.PointCloud].includes(m);return t.createElement(b,null,t.createElement(A,{spinning:e.loading,indicator:t.createElement(G,null),tip:t.createElement("span",{style:{marginTop:200}},a("LoadingTips")),delay:500},t.createElement(y,{className:H([u,e.className]),style:(n=e.style)==null?void 0:n.layout},t.createElement("header",{className:`${u}__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:s,hasHeaderOption:v,hasPredictTrackingIcon:L})),e.children)))},ne=e=>{var o,n,r,a,d,i,m;const[s,v]=O(void 0),L=(n=(o=e.style)==null?void 0:o.sider)==null?void 0:n.width,{stepList:x,step:N}=e,_=(r=E(x,N))==null?void 0:r.tool,j=c.LLM===_,w=c.NLP===_,S=g.isAudioTool(_);return j?t.createElement(f,l({},e),t.createElement(U,l({},e))):w?t.createElement(f,l({},e),t.createElement(z,l({},e))):S?t.createElement(f,l({},e),t.createElement(q,l({},e))):t.createElement(f,l({},e),t.createElement(y,{className:$("layout","container")},e==null?void 0:e.leftSider,t.createElement(p,{className:`${u}__content`},t.createElement(oe,l({},e)),t.createElement(W,null)),t.createElement(Z,{className:`${u}__side`,width:(a=s!=null?s:L)!=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:(m=(i=e.style)==null?void 0:i.sider)==null?void 0:m.width}))))},ie=({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 le=R(ie,null,null,{context:D})(ne);export{le 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};
|