@labelbee/lb-components 1.0.0-alpha.1
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/README.md +41 -0
- package/dist/App.js +1 -0
- package/dist/assets/annotation/common/icon_adapt.svg.js +1 -0
- package/dist/assets/annotation/common/icon_adapt_black.svg.js +1 -0
- package/dist/assets/annotation/common/icon_back.svg.js +1 -0
- package/dist/assets/annotation/common/icon_backA.svg.js +1 -0
- package/dist/assets/annotation/common/icon_clear.svg.js +1 -0
- package/dist/assets/annotation/common/icon_clearSmall.svg.js +1 -0
- package/dist/assets/annotation/common/icon_clearSmall_a.svg.js +1 -0
- package/dist/assets/annotation/common/icon_clear_a.svg.js +1 -0
- package/dist/assets/annotation/common/icon_invalid.svg.js +1 -0
- package/dist/assets/annotation/common/icon_invalid_a.svg.js +1 -0
- package/dist/assets/annotation/common/icon_next.svg.js +1 -0
- package/dist/assets/annotation/common/icon_nextA.svg.js +1 -0
- package/dist/assets/annotation/common/icon_r.svg.js +1 -0
- package/dist/assets/annotation/common/icon_rA.svg.js +1 -0
- package/dist/assets/annotation/common/icon_save.svg.js +1 -0
- package/dist/assets/annotation/common/icon_saveA.svg.js +1 -0
- package/dist/assets/annotation/image/brightness.svg.js +1 -0
- package/dist/assets/annotation/image/contrast.svg.js +1 -0
- package/dist/assets/annotation/image/icon_yuantu.svg.js +1 -0
- package/dist/assets/annotation/image/saturation.svg.js +1 -0
- package/dist/assets/annotation/lineTool/icon_line.svg.js +1 -0
- package/dist/assets/annotation/lineTool/icon_line_a.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/changePointCloudValid.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/copy.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/nextBox.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/nodata.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/patse.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/prevBox.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/rotate180_black.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/selectAll.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/selectMultiple.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/unitAttribute.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/unitAttributeForbid.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/unitAttributeHover.svg.js +1 -0
- package/dist/assets/annotation/pointTool/icon_point.svg.js +1 -0
- package/dist/assets/annotation/pointTool/icon_point_a.svg.js +1 -0
- package/dist/assets/annotation/polygonTool/icon_polygon.svg.js +1 -0
- package/dist/assets/annotation/polygonTool/icon_polygon_a.svg.js +1 -0
- package/dist/assets/annotation/rectTool/icon_rect.svg.js +1 -0
- package/dist/assets/annotation/rectTool/icon_rect_a.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_alttab_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_back_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_cencel_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_forward_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_frameActive_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_frameChange_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_frameNull_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_frame_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_fullView_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_kj1.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_last_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_lineActive_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_lineChange_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_lineCont_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_lineDel_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_lineInsert_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_lineNull_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_lineSpecial_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_line_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_loupe_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_mouse_middle_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_next_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_noDisplay.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_playPause.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_pointActive_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_pointNull_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_point_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_polygonActive_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_polygonChange_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_polygonDel_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_polygonInsert_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_polygonMerge_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_polygonNull_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_reform_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_reload_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_save_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_segment.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_speed_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_straightLine_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_tag_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_unGrip_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/setValid.svg.js +1 -0
- package/dist/assets/annotation/video/icon_keyboard_h.svg.js +1 -0
- package/dist/assets/attributeIcon/eraser.svg.js +1 -0
- package/dist/assets/attributeIcon/eraser_a.svg.js +1 -0
- package/dist/assets/attributeIcon/pen.svg.js +1 -0
- package/dist/assets/attributeIcon/pen_a.svg.js +1 -0
- package/dist/assets/attributeIcon/zoomUp.svg.js +1 -0
- package/dist/assets/icons/25541b4d.svg +10 -0
- package/dist/assets/icons/25ef334b.svg +8 -0
- package/dist/assets/icons/7eadb9c4.svg +5 -0
- package/dist/assets/icons/9d70807.svg +5 -0
- package/dist/assets/icons/aa147cfc.png +0 -0
- package/dist/assets/icons/c5b4262e.png +0 -0
- package/dist/assets/icons/cc550fff.svg +23 -0
- package/dist/assets/icons/dc9b6bfc.svg +10 -0
- package/dist/assets/icons/e4f0b7fe.png +0 -0
- package/dist/assets/predictTracking/icon.svg.js +1 -0
- package/dist/assets/toolStyle/icon_border.svg.js +1 -0
- package/dist/assets/toolStyle/icon_borderColor.svg.js +1 -0
- package/dist/assets/toolStyle/icon_opacityFill.svg.js +1 -0
- package/dist/assets/toolStyle/icon_opacityStroke.svg.js +1 -0
- package/dist/components/AnnotationView/index.js +1 -0
- package/dist/components/AnnotationView/pointCloudAnnotationView.js +1 -0
- package/dist/components/annotationStepPopover/index.js +1 -0
- package/dist/components/attributeList/index.js +1 -0
- package/dist/components/checkboxList/index.js +1 -0
- package/dist/components/colorTag/index.js +1 -0
- package/dist/components/customAntd/IconWithText/index.js +1 -0
- package/dist/components/customResizeHook/index.js +1 -0
- package/dist/components/fileException/FileError.js +1 -0
- package/dist/components/fileException/FileInvalid.js +1 -0
- package/dist/components/fileException/index.js +1 -0
- package/dist/components/pointCloudView/PointCloud2DView.js +1 -0
- package/dist/components/pointCloudView/PointCloud3DView.js +1 -0
- package/dist/components/pointCloudView/PointCloudBackView.js +1 -0
- package/dist/components/pointCloudView/PointCloudContext.js +1 -0
- package/dist/components/pointCloudView/PointCloudInfos.js +1 -0
- package/dist/components/pointCloudView/PointCloudLayout.js +1 -0
- package/dist/components/pointCloudView/PointCloudListener.js +1 -0
- package/dist/components/pointCloudView/PointCloudSideView.js +1 -0
- package/dist/components/pointCloudView/PointCloudTopView.js +1 -0
- package/dist/components/pointCloudView/components/EmptyPage/index.js +1 -0
- package/dist/components/pointCloudView/components/UnifyParamsModal/index.js +1 -0
- package/dist/components/pointCloudView/hooks/useAttribute.js +1 -0
- package/dist/components/pointCloudView/hooks/useBoxes.js +1 -0
- package/dist/components/pointCloudView/hooks/useConfig.js +1 -0
- package/dist/components/pointCloudView/hooks/useHistory.js +1 -0
- package/dist/components/pointCloudView/hooks/useLine.js +1 -0
- package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -0
- package/dist/components/pointCloudView/hooks/usePolygon.js +1 -0
- package/dist/components/pointCloudView/hooks/useRotate.js +1 -0
- package/dist/components/pointCloudView/hooks/useSingleBox.js +1 -0
- package/dist/components/pointCloudView/hooks/useSphere.js +1 -0
- package/dist/components/pointCloudView/hooks/useStatus.js +1 -0
- package/dist/components/pointCloudView/hooks/useZoom.js +1 -0
- package/dist/components/pointCloudView/index.js +1 -0
- package/dist/components/predictTracking/index.js +1 -0
- package/dist/components/predictTracking/predictTrackingIcon/index.js +1 -0
- package/dist/components/predictTracking/previewResult/index.js +1 -0
- package/dist/components/predictTracking/previewResult/util.js +1 -0
- package/dist/components/videoAnnotate/index.js +1 -0
- package/dist/components/videoPlayer/TagToolInstanceAdaptor.js +1 -0
- package/dist/components/videoPlayer/TagToolInstanceAdaptorI18nProvider.js +1 -0
- package/dist/components/videoPlayer/VideoTagLayer.js +1 -0
- package/dist/components/videoPlayer/components/controller/index.js +1 -0
- package/dist/components/videoPlayer/index.js +1 -0
- package/dist/components/videoPlayer/utils.js +1 -0
- package/dist/configureStore.js +1 -0
- package/dist/constant/index.js +1 -0
- package/dist/constant/styleString.js +1 -0
- package/dist/data/Style.js +1 -0
- package/dist/data/enums/AnnotationSize.js +1 -0
- package/dist/data/enums/ToolType.js +1 -0
- package/dist/hooks/annotation.js +1 -0
- package/dist/hooks/useRafState.js +1 -0
- package/dist/hooks/useRefCache.js +1 -0
- package/dist/hooks/useSafeSate.js +1 -0
- package/dist/hooks/useSize.js +1 -0
- package/dist/hooks/useUnmountedRef.js +1 -0
- package/dist/index.css +1549 -0
- package/dist/index.js +1 -0
- package/dist/store/Actions.js +1 -0
- package/dist/store/annotation/actionCreators.js +1 -0
- package/dist/store/annotation/map.js +1 -0
- package/dist/store/annotation/reducer.js +1 -0
- package/dist/store/annotation/selectors.js +1 -0
- package/dist/store/ctx.js +1 -0
- package/dist/store/imgAttribute/actionCreators.js +1 -0
- package/dist/store/imgAttribute/reducer.js +1 -0
- package/dist/store/index.js +1 -0
- package/dist/store/toolStyle/actionCreators.js +1 -0
- package/dist/store/toolStyle/reducer.js +1 -0
- package/dist/types/App.d.ts +75 -0
- package/dist/types/components/AnnotationView/index.d.ts +27 -0
- package/dist/types/components/AnnotationView/pointCloudAnnotationView.d.ts +13 -0
- package/dist/types/components/annotationStepPopover/index.d.ts +9 -0
- package/dist/types/components/attributeList/index.d.ts +18 -0
- package/dist/types/components/checkboxList/index.d.ts +9 -0
- package/dist/types/components/colorTag/index.d.ts +2 -0
- package/dist/types/components/customAntd/IconWithText/index.d.ts +9 -0
- package/dist/types/components/customResizeHook/index.d.ts +31 -0
- package/dist/types/components/fileException/FileError.d.ts +15 -0
- package/dist/types/components/fileException/FileInvalid.d.ts +12 -0
- package/dist/types/components/fileException/index.d.ts +17 -0
- package/dist/types/components/pointCloudView/PointCloud2DView.d.ts +4 -0
- package/dist/types/components/pointCloudView/PointCloud3DView.d.ts +6 -0
- package/dist/types/components/pointCloudView/PointCloudBackView.d.ts +7 -0
- package/dist/types/components/pointCloudView/PointCloudContext.d.ts +54 -0
- package/dist/types/components/pointCloudView/PointCloudInfos.d.ts +23 -0
- package/dist/types/components/pointCloudView/PointCloudLayout.d.ts +7 -0
- package/dist/types/components/pointCloudView/PointCloudListener.d.ts +9 -0
- package/dist/types/components/pointCloudView/PointCloudSideView.d.ts +9 -0
- package/dist/types/components/pointCloudView/PointCloudTopView.d.ts +12 -0
- package/dist/types/components/pointCloudView/components/EmptyPage/index.d.ts +3 -0
- package/dist/types/components/pointCloudView/components/UnifyParamsModal/index.d.ts +13 -0
- package/dist/types/components/pointCloudView/hooks/useAttribute.d.ts +7 -0
- package/dist/types/components/pointCloudView/hooks/useBoxes.d.ts +12 -0
- package/dist/types/components/pointCloudView/hooks/useConfig.d.ts +5 -0
- package/dist/types/components/pointCloudView/hooks/useHistory.d.ts +22 -0
- package/dist/types/components/pointCloudView/hooks/useLine.d.ts +12 -0
- package/dist/types/components/pointCloudView/hooks/usePointCloudViews.d.ts +101 -0
- package/dist/types/components/pointCloudView/hooks/usePolygon.d.ts +12 -0
- package/dist/types/components/pointCloudView/hooks/useRotate.d.ts +8 -0
- package/dist/types/components/pointCloudView/hooks/useSingleBox.d.ts +18 -0
- package/dist/types/components/pointCloudView/hooks/useSphere.d.ts +6 -0
- package/dist/types/components/pointCloudView/hooks/useStatus.d.ts +11 -0
- package/dist/types/components/pointCloudView/hooks/useZoom.d.ts +11 -0
- package/dist/types/components/pointCloudView/index.d.ts +19 -0
- package/dist/types/components/predictTracking/index.d.ts +2 -0
- package/dist/types/components/predictTracking/predictTrackingIcon/index.d.ts +7 -0
- package/dist/types/components/predictTracking/previewResult/index.d.ts +10 -0
- package/dist/types/components/predictTracking/previewResult/util.d.ts +43 -0
- package/dist/types/components/videoAnnotate/index.d.ts +15 -0
- package/dist/types/components/videoPlayer/TagToolInstanceAdaptor.d.ts +90 -0
- package/dist/types/components/videoPlayer/TagToolInstanceAdaptorI18nProvider.d.ts +9 -0
- package/dist/types/components/videoPlayer/VideoTagLayer.d.ts +12 -0
- package/dist/types/components/videoPlayer/components/controller/index.d.ts +3 -0
- package/dist/types/components/videoPlayer/index.d.ts +73 -0
- package/dist/types/components/videoPlayer/types.d.ts +8 -0
- package/dist/types/components/videoPlayer/utils.d.ts +36 -0
- package/dist/types/configureStore.d.ts +3 -0
- package/dist/types/constant/index.d.ts +22 -0
- package/dist/types/constant/styleString.d.ts +2 -0
- package/dist/types/data/Style.d.ts +37 -0
- package/dist/types/data/enums/AnnotationSize.d.ts +32 -0
- package/dist/types/data/enums/ToolType.d.ts +54 -0
- package/dist/types/hooks/annotation.d.ts +37 -0
- package/dist/types/hooks/useRafState.d.ts +3 -0
- package/dist/types/hooks/useRefCache.d.ts +8 -0
- package/dist/types/hooks/useSafeSate.d.ts +4 -0
- package/dist/types/hooks/useSize.d.ts +7 -0
- package/dist/types/hooks/useUnmountedRef.d.ts +3 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/store/Actions.d.ts +48 -0
- package/dist/types/store/annotation/actionCreators.d.ts +95 -0
- package/dist/types/store/annotation/map.d.ts +29 -0
- package/dist/types/store/annotation/reducer.d.ts +53 -0
- package/dist/types/store/annotation/selectors.d.ts +7 -0
- package/dist/types/store/annotation/types.d.ts +158 -0
- package/dist/types/store/ctx.d.ts +4 -0
- package/dist/types/store/imgAttribute/actionCreators.d.ts +8 -0
- package/dist/types/store/imgAttribute/reducer.d.ts +8 -0
- package/dist/types/store/imgAttribute/types.d.ts +23 -0
- package/dist/types/store/index.d.ts +3 -0
- package/dist/types/store/toolStyle/actionCreators.d.ts +8 -0
- package/dist/types/store/toolStyle/reducer.d.ts +13 -0
- package/dist/types/store/toolStyle/types.d.ts +23 -0
- package/dist/types/utils/AnnotationDataUtils.d.ts +77 -0
- package/dist/types/utils/ConfigUtils.d.ts +9 -0
- package/dist/types/utils/PageOperator.d.ts +48 -0
- package/dist/types/utils/StepUtils.d.ts +32 -0
- package/dist/types/utils/TextUtils.d.ts +7 -0
- package/dist/types/utils/ToolStyleUtils.d.ts +18 -0
- package/dist/types/utils/ToolUtils.d.ts +12 -0
- package/dist/types/utils/data.d.ts +15 -0
- package/dist/types/utils/dom.d.ts +11 -0
- package/dist/types/utils/index.d.ts +5 -0
- package/dist/types/views/MainView/annotationOperation/index.d.ts +18 -0
- package/dist/types/views/MainView/annotationTips/index.d.ts +7 -0
- package/dist/types/views/MainView/index.d.ts +10 -0
- package/dist/types/views/MainView/sidebar/AnnotationText/index.d.ts +9 -0
- package/dist/types/views/MainView/sidebar/ClearIcon/index.d.ts +3 -0
- package/dist/types/views/MainView/sidebar/GeneralOperation/ActionsConfirm.d.ts +14 -0
- package/dist/types/views/MainView/sidebar/GeneralOperation/index.d.ts +19 -0
- package/dist/types/views/MainView/sidebar/GeneralOperation/useOperationList.d.ts +12 -0
- package/dist/types/views/MainView/sidebar/ImgAttributeInfo/index.d.ts +7 -0
- package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/batchUpdateModal/index.d.ts +20 -0
- package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/index.d.ts +14 -0
- package/dist/types/views/MainView/sidebar/ScribbleSidebar/index.d.ts +6 -0
- package/dist/types/views/MainView/sidebar/SwitchAttributeList/index.d.ts +11 -0
- package/dist/types/views/MainView/sidebar/TagSidebar/index.d.ts +11 -0
- package/dist/types/views/MainView/sidebar/TextAreaFormat/index.d.ts +9 -0
- package/dist/types/views/MainView/sidebar/TextToolSidebar/index.d.ts +22 -0
- package/dist/types/views/MainView/sidebar/ToolIcons.d.ts +12 -0
- package/dist/types/views/MainView/sidebar/ToolStyle/index.d.ts +8 -0
- package/dist/types/views/MainView/sidebar/index.d.ts +10 -0
- package/dist/types/views/MainView/toolFooter/AnnotatedAttributes/index.d.ts +5 -0
- package/dist/types/views/MainView/toolFooter/FooterPopover.d.ts +10 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.d.ts +132 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/cuboid/index.d.ts +6 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/index.d.ts +23 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/line/index.d.ts +71 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/point/index.d.ts +27 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.d.ts +5 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/polygon/index.d.ts +85 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/rectToolShortCutTable/index.d.ts +38 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/scribble/index.d.ts +6 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/tag/index.d.ts +3 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/text/index.d.ts +6 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/videoTag/index.d.ts +3 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/index.d.ts +3 -0
- package/dist/types/views/MainView/toolFooter/HiddenTips/index.d.ts +7 -0
- package/dist/types/views/MainView/toolFooter/PageNumber/index.d.ts +7 -0
- package/dist/types/views/MainView/toolFooter/Pagination.d.ts +22 -0
- package/dist/types/views/MainView/toolFooter/ZoomController/ZoomLevel/index.d.ts +10 -0
- package/dist/types/views/MainView/toolFooter/ZoomController/index.d.ts +21 -0
- package/dist/types/views/MainView/toolFooter/index.d.ts +24 -0
- package/dist/types/views/MainView/toolHeader/ExportData/index.d.ts +15 -0
- package/dist/types/views/MainView/toolHeader/StepSwitch/index.d.ts +14 -0
- package/dist/types/views/MainView/toolHeader/headerOption/index.d.ts +8 -0
- package/dist/types/views/MainView/toolHeader/index.d.ts +23 -0
- package/dist/utils/AnnotationDataUtils.js +1 -0
- package/dist/utils/ConfigUtils.js +1 -0
- package/dist/utils/PageOperator.js +1 -0
- package/dist/utils/StepUtils.js +1 -0
- package/dist/utils/TextUtils.js +1 -0
- package/dist/utils/ToolStyleUtils.js +1 -0
- package/dist/utils/ToolUtils.js +1 -0
- package/dist/utils/data.js +1 -0
- package/dist/utils/dom.js +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/views/MainView/annotationOperation/index.js +1 -0
- package/dist/views/MainView/annotationTips/index.js +1 -0
- package/dist/views/MainView/index.js +1 -0
- package/dist/views/MainView/sidebar/AnnotationText/index.js +1 -0
- package/dist/views/MainView/sidebar/ClearIcon/index.js +1 -0
- package/dist/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -0
- package/dist/views/MainView/sidebar/GeneralOperation/index.js +1 -0
- package/dist/views/MainView/sidebar/GeneralOperation/useOperationList.js +1 -0
- package/dist/views/MainView/sidebar/ImgAttributeInfo/index.js +1 -0
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/batchUpdateModal/index.js +1 -0
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -0
- package/dist/views/MainView/sidebar/ScribbleSidebar/index.js +1 -0
- package/dist/views/MainView/sidebar/SwitchAttributeList/index.js +1 -0
- package/dist/views/MainView/sidebar/TagSidebar/index.js +1 -0
- package/dist/views/MainView/sidebar/TextAreaFormat/index.js +1 -0
- package/dist/views/MainView/sidebar/TextToolSidebar/index.js +1 -0
- package/dist/views/MainView/sidebar/ToolIcons.js +1 -0
- package/dist/views/MainView/sidebar/ToolStyle/index.js +1 -0
- package/dist/views/MainView/sidebar/index.js +1 -0
- package/dist/views/MainView/toolFooter/AnnotatedAttributes/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterPopover.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/cuboid/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/line/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/point/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/polygon/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/rectToolShortCutTable/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/scribble/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/tag/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/text/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/videoTag/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/index.js +1 -0
- package/dist/views/MainView/toolFooter/HiddenTips/index.js +1 -0
- package/dist/views/MainView/toolFooter/PageNumber/index.js +1 -0
- package/dist/views/MainView/toolFooter/Pagination.js +1 -0
- package/dist/views/MainView/toolFooter/ZoomController/ZoomLevel/index.js +1 -0
- package/dist/views/MainView/toolFooter/ZoomController/index.js +1 -0
- package/dist/views/MainView/toolFooter/index.js +1 -0
- package/dist/views/MainView/toolHeader/ExportData/index.js +1 -0
- package/dist/views/MainView/toolHeader/StepSwitch/index.js +1 -0
- package/dist/views/MainView/toolHeader/headerOption/index.js +1 -0
- package/dist/views/MainView/toolHeader/index.js +1 -0
- package/es/App.js +1 -0
- package/es/assets/annotation/common/icon_adapt.svg.js +1 -0
- package/es/assets/annotation/common/icon_adapt_black.svg.js +1 -0
- package/es/assets/annotation/common/icon_back.svg.js +1 -0
- package/es/assets/annotation/common/icon_backA.svg.js +1 -0
- package/es/assets/annotation/common/icon_clear.svg.js +1 -0
- package/es/assets/annotation/common/icon_clearSmall.svg.js +1 -0
- package/es/assets/annotation/common/icon_clearSmall_a.svg.js +1 -0
- package/es/assets/annotation/common/icon_clear_a.svg.js +1 -0
- package/es/assets/annotation/common/icon_invalid.svg.js +1 -0
- package/es/assets/annotation/common/icon_invalid_a.svg.js +1 -0
- package/es/assets/annotation/common/icon_next.svg.js +1 -0
- package/es/assets/annotation/common/icon_nextA.svg.js +1 -0
- package/es/assets/annotation/common/icon_r.svg.js +1 -0
- package/es/assets/annotation/common/icon_rA.svg.js +1 -0
- package/es/assets/annotation/common/icon_save.svg.js +1 -0
- package/es/assets/annotation/common/icon_saveA.svg.js +1 -0
- package/es/assets/annotation/image/brightness.svg.js +1 -0
- package/es/assets/annotation/image/contrast.svg.js +1 -0
- package/es/assets/annotation/image/icon_yuantu.svg.js +1 -0
- package/es/assets/annotation/image/saturation.svg.js +1 -0
- package/es/assets/annotation/lineTool/icon_line.svg.js +1 -0
- package/es/assets/annotation/lineTool/icon_line_a.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/changePointCloudValid.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/copy.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/nextBox.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/nodata.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/patse.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/prevBox.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/rotate180_black.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/selectAll.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/selectMultiple.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/unitAttribute.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/unitAttributeForbid.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/unitAttributeHover.svg.js +1 -0
- package/es/assets/annotation/pointTool/icon_point.svg.js +1 -0
- package/es/assets/annotation/pointTool/icon_point_a.svg.js +1 -0
- package/es/assets/annotation/polygonTool/icon_polygon.svg.js +1 -0
- package/es/assets/annotation/polygonTool/icon_polygon_a.svg.js +1 -0
- package/es/assets/annotation/rectTool/icon_rect.svg.js +1 -0
- package/es/assets/annotation/rectTool/icon_rect_a.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_alttab_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_back_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_cencel_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_forward_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_frameActive_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_frameChange_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_frameNull_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_frame_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_fullView_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_kj1.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_last_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineActive_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineChange_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineCont_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineDel_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineInsert_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineNull_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineSpecial_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_line_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_loupe_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_mouse_middle_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_next_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_noDisplay.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_playPause.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_pointActive_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_pointNull_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_point_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonActive_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonChange_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonDel_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonInsert_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonMerge_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonNull_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_reform_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_reload_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_save_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_segment.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_speed_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_straightLine_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_tag_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_unGrip_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/setValid.svg.js +1 -0
- package/es/assets/annotation/video/icon_keyboard_h.svg.js +1 -0
- package/es/assets/attributeIcon/eraser.svg.js +1 -0
- package/es/assets/attributeIcon/eraser_a.svg.js +1 -0
- package/es/assets/attributeIcon/pen.svg.js +1 -0
- package/es/assets/attributeIcon/pen_a.svg.js +1 -0
- package/es/assets/attributeIcon/zoomUp.svg.js +1 -0
- package/es/assets/predictTracking/icon.svg.js +1 -0
- package/es/assets/toolStyle/icon_border.svg.js +1 -0
- package/es/assets/toolStyle/icon_borderColor.svg.js +1 -0
- package/es/assets/toolStyle/icon_opacityFill.svg.js +1 -0
- package/es/assets/toolStyle/icon_opacityStroke.svg.js +1 -0
- package/es/components/AnnotationView/index.js +1 -0
- package/es/components/AnnotationView/pointCloudAnnotationView.js +1 -0
- package/es/components/annotationStepPopover/index.js +1 -0
- package/es/components/attributeList/index.js +1 -0
- package/es/components/checkboxList/index.js +1 -0
- package/es/components/colorTag/index.js +1 -0
- package/es/components/customAntd/IconWithText/index.js +1 -0
- package/es/components/customResizeHook/index.js +1 -0
- package/es/components/fileException/FileError.js +1 -0
- package/es/components/fileException/FileInvalid.js +1 -0
- package/es/components/fileException/index.js +1 -0
- package/es/components/pointCloudView/PointCloud2DView.js +1 -0
- package/es/components/pointCloudView/PointCloud3DView.js +1 -0
- package/es/components/pointCloudView/PointCloudBackView.js +1 -0
- package/es/components/pointCloudView/PointCloudContext.js +1 -0
- package/es/components/pointCloudView/PointCloudInfos.js +1 -0
- package/es/components/pointCloudView/PointCloudLayout.js +1 -0
- package/es/components/pointCloudView/PointCloudListener.js +1 -0
- package/es/components/pointCloudView/PointCloudSideView.js +1 -0
- package/es/components/pointCloudView/PointCloudTopView.js +1 -0
- package/es/components/pointCloudView/components/EmptyPage/index.js +1 -0
- package/es/components/pointCloudView/components/UnifyParamsModal/index.js +1 -0
- package/es/components/pointCloudView/hooks/useAttribute.js +1 -0
- package/es/components/pointCloudView/hooks/useBoxes.js +1 -0
- package/es/components/pointCloudView/hooks/useConfig.js +1 -0
- package/es/components/pointCloudView/hooks/useHistory.js +1 -0
- package/es/components/pointCloudView/hooks/useLine.js +1 -0
- package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -0
- package/es/components/pointCloudView/hooks/usePolygon.js +1 -0
- package/es/components/pointCloudView/hooks/useRotate.js +1 -0
- package/es/components/pointCloudView/hooks/useSingleBox.js +1 -0
- package/es/components/pointCloudView/hooks/useSphere.js +1 -0
- package/es/components/pointCloudView/hooks/useStatus.js +1 -0
- package/es/components/pointCloudView/hooks/useZoom.js +1 -0
- package/es/components/pointCloudView/index.js +1 -0
- package/es/components/predictTracking/index.js +1 -0
- package/es/components/predictTracking/predictTrackingIcon/index.js +1 -0
- package/es/components/predictTracking/previewResult/index.js +1 -0
- package/es/components/predictTracking/previewResult/util.js +1 -0
- package/es/components/videoAnnotate/index.js +1 -0
- package/es/components/videoPlayer/TagToolInstanceAdaptor.js +1 -0
- package/es/components/videoPlayer/TagToolInstanceAdaptorI18nProvider.js +1 -0
- package/es/components/videoPlayer/VideoTagLayer.js +1 -0
- package/es/components/videoPlayer/components/controller/index.js +1 -0
- package/es/components/videoPlayer/index.js +1 -0
- package/es/components/videoPlayer/utils.js +1 -0
- package/es/configureStore.js +1 -0
- package/es/constant/index.js +1 -0
- package/es/constant/styleString.js +1 -0
- package/es/data/Style.js +1 -0
- package/es/data/enums/AnnotationSize.js +1 -0
- package/es/data/enums/ToolType.js +1 -0
- package/es/hooks/annotation.js +1 -0
- package/es/hooks/useRafState.js +1 -0
- package/es/hooks/useRefCache.js +1 -0
- package/es/hooks/useSafeSate.js +1 -0
- package/es/hooks/useSize.js +1 -0
- package/es/hooks/useUnmountedRef.js +1 -0
- package/es/index.css +1549 -0
- package/es/index.js +1 -0
- package/es/store/Actions.js +1 -0
- package/es/store/annotation/actionCreators.js +1 -0
- package/es/store/annotation/map.js +1 -0
- package/es/store/annotation/reducer.js +1 -0
- package/es/store/annotation/selectors.js +1 -0
- package/es/store/ctx.js +1 -0
- package/es/store/imgAttribute/actionCreators.js +1 -0
- package/es/store/imgAttribute/reducer.js +1 -0
- package/es/store/index.js +1 -0
- package/es/store/toolStyle/actionCreators.js +1 -0
- package/es/store/toolStyle/reducer.js +1 -0
- package/es/utils/AnnotationDataUtils.js +1 -0
- package/es/utils/ConfigUtils.js +1 -0
- package/es/utils/PageOperator.js +1 -0
- package/es/utils/StepUtils.js +1 -0
- package/es/utils/TextUtils.js +1 -0
- package/es/utils/ToolStyleUtils.js +1 -0
- package/es/utils/ToolUtils.js +1 -0
- package/es/utils/data.js +1 -0
- package/es/utils/dom.js +1 -0
- package/es/utils/index.js +1 -0
- package/es/views/MainView/annotationOperation/index.js +1 -0
- package/es/views/MainView/annotationTips/index.js +1 -0
- package/es/views/MainView/index.js +1 -0
- package/es/views/MainView/sidebar/AnnotationText/index.js +1 -0
- package/es/views/MainView/sidebar/ClearIcon/index.js +1 -0
- package/es/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -0
- package/es/views/MainView/sidebar/GeneralOperation/index.js +1 -0
- package/es/views/MainView/sidebar/GeneralOperation/useOperationList.js +1 -0
- package/es/views/MainView/sidebar/ImgAttributeInfo/index.js +1 -0
- package/es/views/MainView/sidebar/PointCloudToolSidebar/components/batchUpdateModal/index.js +1 -0
- package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -0
- package/es/views/MainView/sidebar/ScribbleSidebar/index.js +1 -0
- package/es/views/MainView/sidebar/SwitchAttributeList/index.js +1 -0
- package/es/views/MainView/sidebar/TagSidebar/index.js +1 -0
- package/es/views/MainView/sidebar/TextAreaFormat/index.js +1 -0
- package/es/views/MainView/sidebar/TextToolSidebar/index.js +1 -0
- package/es/views/MainView/sidebar/ToolIcons.js +1 -0
- package/es/views/MainView/sidebar/ToolStyle/index.js +1 -0
- package/es/views/MainView/sidebar/index.js +1 -0
- package/es/views/MainView/toolFooter/AnnotatedAttributes/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterPopover.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/cuboid/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/line/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/point/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/polygon/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/rectToolShortCutTable/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/scribble/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/tag/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/text/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/videoTag/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/index.js +1 -0
- package/es/views/MainView/toolFooter/HiddenTips/index.js +1 -0
- package/es/views/MainView/toolFooter/PageNumber/index.js +1 -0
- package/es/views/MainView/toolFooter/Pagination.js +1 -0
- package/es/views/MainView/toolFooter/ZoomController/ZoomLevel/index.js +1 -0
- package/es/views/MainView/toolFooter/ZoomController/index.js +1 -0
- package/es/views/MainView/toolFooter/index.js +1 -0
- package/es/views/MainView/toolHeader/ExportData/index.js +1 -0
- package/es/views/MainView/toolHeader/StepSwitch/index.js +1 -0
- package/es/views/MainView/toolHeader/headerOption/index.js +1 -0
- package/es/views/MainView/toolHeader/index.js +1 -0
- package/package.json +102 -0
package/es/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{default as AnnotationView}from"./components/AnnotationView/index.js";export{default as PointCloudAnnotationView}from"./components/AnnotationView/pointCloudAnnotationView.js";import{i18n as l}from"@labelbee/lb-utils";export{i18n}from"@labelbee/lb-utils";import n,{useState as m,useImperativeHandle as d}from"react";import{I18nextProvider as f}from"react-i18next";import{Provider as u}from"react-redux";import P from"./App.js";import g from"./configureStore.js";import{PageBackward as x,PageForward as w,PageJump as _}from"./store/annotation/actionCreators.js";export{VideoTagTool}from"./components/videoPlayer/TagToolInstanceAdaptorI18nProvider.js";import{PointCloudProvider as v}from"./components/pointCloudView/PointCloudContext.js";import{LabelBeeContext as j}from"./store/ctx.js";export{default as PredictTracking}from"./components/predictTracking/predictTrackingIcon/index.js";export{EStepType,ESubmitType,componentCls,prefix}from"./constant/index.js";var b=Object.defineProperty,O=Object.defineProperties,A=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,i=(o,e,t)=>e in o?b(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,I=(o,e)=>{for(var t in e||(e={}))y.call(e,t)&&i(o,t,e[t]);if(a)for(var t of a(e))E.call(e,t)&&i(o,t,e[t]);return o},T=(o,e)=>O(o,A(e));const r=g(),C=(o,e)=>{const[t,p]=m();return d(e,()=>({toolInstance:t,annotationEngine:r.getState().annotation.annotationEngine,pageBackwardActions:()=>r.dispatch(x()),pageForwardActions:()=>r.dispatch(w()),pageJump:s=>{const c=~~s-1;r.dispatch(_(c))},hello:()=>alert("hello labelBee!!!")}),[t]),n.createElement(u,{store:r,context:j},n.createElement(f,{i18n:l},n.createElement(v,null,n.createElement(P,T(I({},o),{setToolInstance:p})))))};var S=n.forwardRef(C);export{S as default,r as store};
|
|
@@ -0,0 +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_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"},_={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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ANNOTATION_ACTIONS as a}from"../Actions.js";import{LoadFileAndFileData as B,getStepConfig as k}from"./reducer.js";import{ESubmitType as T}from"../../constant/index.js";import{EPageTurningOperation as y}from"../../data/enums/AnnotationSize.js";import F from"../../utils/PageOperator.js";import{jsonParser as b}from"../../utils/index.js";import{getBoxesByTrackID as M}from"../../components/predictTracking/previewResult/util.js";var g=(t,e,n)=>new Promise((o,i)=>{var p=u=>{try{l(n.next(u))}catch(r){i(r)}},s=u=>{try{l(n.throw(u))}catch(r){i(r)}},l=u=>u.done?o(u.value):Promise.resolve(u.value).then(p,s);l((n=n.apply(t,e)).next())});const h=(t,e)=>e.map(n=>t(n)),j=t=>t===y.Forward?T.Forward:t===y.Backward?T.Backward:t===y.Jump?T.Jump:T.Forward,H=(t,e)=>{var n,o;const{imgList:i,imgIndex:p}=t,{dataSourceStep:s}=k(t.stepList,t.step);return((o=(n=b(i[p-1].result)[`step_${s}`])==null?void 0:n.result)==null?void 0:o.length)-1||e};function K(t){return{type:a.UPDATE_TOOL_INSTANCE,payload:{toolInstance:t}}}function O({stepList:t}){return{type:a.SET_TASK_STEP_LIST,payload:{stepList:t}}}function v({stepList:t,step:e}){return{type:a.SET_TASK_CONFIG,payload:{stepList:t,step:e}}}function I(t){return{type:a.UPDATE_ON_SUBMIT,payload:{onSubmit:t}}}function A(t){return{type:a.UPDATE_ON_SAVE,payload:{onSave:t}}}function U(t){return{type:a.UPDATE_ON_PAGE_CHANGE,payload:{onPageChange:t}}}function P(t){return{type:a.UPDATE_ON_STEP_CHANGE,payload:{onStepChange:t}}}function L(t){return{type:a.UPDATE_GET_FILE_DATA,payload:{getFileData:t}}}function m(t){return{type:a.UPDATE_PAGE_SIZE,payload:{pageSize:t}}}function D(t){return{type:a.UPDATE_LOAD_FILE_LIST,payload:{loadFileList:t}}}function V(){return{type:a.UPDATE_ROTATE}}function N(t){return{type:a.SKIP_BEFORE_PAGE_TURNING,payload:{skipBeforePageTurning:t}}}function R(t){return{type:a.UPDATE_BEFORE_ROTATE,payload:{beforeRotate:t}}}function J(){return{type:a.COPY_BACKWARD_RESULT}}function Y({id:t,newID:e,rangeIndex:n,imgList:o}){return{type:a.BATCH_UPDATE_TRACK_ID,payload:{id:t,newID:e,rangeIndex:n,imgList:o}}}function W(t,e,n){return{type:a.BATCH_UPDATE_RESULT_BY_TRACK_ID,payload:{id:t,newData:e,rangeIndex:n}}}function X(){return{type:a.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT,payload:{}}}const x=t=>({type:a.SET_CHECK_MODE,payload:{checkMode:t}});function q({onSubmit:t,onSave:e,onPageChange:n,onStepChange:o,getFileData:i,pageSize:p,loadFileList:s,step:l,stepList:u,skipBeforePageTurning:r,beforeRotate:c,checkMode:_}){const d=[];return t&&d.push(I(t)),e&&d.push(A(e)),n&&d.push(U(n)),o&&d.push(P(o)),i&&d.push(L(i)),s&&d.push(D(s)),p&&d.push(m(p)),r&&d.push(N(r)),c&&d.push(R(c)),typeof _=="boolean"&&d.push(x(_)),d.push(v({stepList:u,step:l})),d.push({type:a.CALC_STEP_PROGRESS}),d.push({type:a.INIT_TOOL}),C=>h(C,d)}function z({onSubmit:t,onSave:e,onPageChange:n,onStepChange:o,getFileData:i,pageSize:p,loadFileList:s,stepList:l,beforeRotate:u}){const r=[];return t&&r.push(I(t)),e&&r.push(A(e)),n&&r.push(U(n)),o&&r.push(P(o)),i&&r.push(L(i)),s&&r.push(D(s)),p&&r.push(m(p)),u&&r.push(R(u)),r.push(O({stepList:l})),c=>h(c,r)}const Z=(t,e)=>{var n;const o=e==null?void 0:e.findIndex(i=>(i==null?void 0:i.step)===t);return(n=e[o+1])==null?void 0:n.step},$=t=>(e,n)=>{const{annotation:o}=n(),{step:i,stepList:p}=o,s=Z(i,p);return[e(G(s,t))]},G=(t,e)=>(n,o)=>{var i,p;const{annotation:s}=o();(i=s==null?void 0:s.onStepChange)==null||i.call(s,t);const l=(p=s==null?void 0:s.imgIndex)!=null?p:0;return[n({type:a.SUBMIT_RESULT}),n({type:a.SUBMIT_FILE_DATA,payload:{submitType:T.StepChanged}}),n({type:a.SET_STEP,payload:{toStep:t}}),n({type:a.CALC_STEP_PROGRESS}),n(B(e!=null?e:l,0))]},E=t=>e=>[e({type:a.SUBMIT_RESULT}),e({type:a.SUBMIT_FILE_DATA,payload:{submitType:t}})],Q=(t,e,n,o)=>[t(E(n)),t(B(e,o))],tt=(t,e)=>[t({type:a.SUBMIT_RESULT}),t({type:a.SET_BASIC_INDEX,payload:{basicIndex:e}})],et=(t,e)=>{t({type:a.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED,payload:{triggerEventAfterIndexChanged:e}})},nt=(t=!1)=>(e,n)=>f(e,n,y.Backward,t),at=(t=!1)=>(e,n)=>f(e,n,y.Forward,t),ot=(t,e=!1)=>(n,o)=>{if(t!==o().imgIndex)return f(n,o,y.Jump,e,t)},w=(t,e,n,o)=>g(void 0,null,function*(){var i;const{loadFileList:p,imgList:s,pageSize:l}=e().annotation,u=Math.floor(n/l);S(t,!0);try{const r=yield p(u,l);if(S(t,!1),!((i=r==null?void 0:r.fileList)==null?void 0:i.length)||!(r==null?void 0:r.total))throw new Error("fileList and total are required");const c=o?new Array(r.total):[...s];return c.splice(u*l,l,...r.fileList),t({type:a.UPDATE_IMG_LIST,payload:{imgList:c}}),!0}catch(r){S(t,!1),console.error(r)}}),f=(t,e,n,o=!1,i)=>g(void 0,null,function*(){var p;const s=e().annotation,{fileIndexChanged:l,fileIndex:u,basicIndexChanged:r,basicIndex:c}=F.getNextPageInfo(n,s,i),_=j(n);if(et(t,o),l){if(s.loading||!s.imgList[u]&&!(yield w(t,e,u)))return;(p=s.onPageChange)==null||p.call(s,u);const d=_===T.Backward?H(e().annotation,c):c;return Q(t,u,_,d)}return r?tt(t,c):t(E(_))}),rt=t=>{t(E(T.Save)),t({type:a.SAVE_RESULT})},S=(t,e)=>{t({type:a.SET_LOADING,payload:{loading:e}})},it=(t,e)=>{t({type:a.SET_LOADING,payload:{loading:e}})},st=t=>{t({type:a.INIT_ALL_STATE,payload:{}})},ut=(t,e)=>{t({type:a.SET_PREDICT_RESULT,payload:{result:e}})},pt=(t,e)=>{t({type:a.SET_PREDICT_RESULT_VISIBLE,payload:{visible:e}})},lt=t=>(e,n)=>{const{imgList:o,step:i}=n().annotation;return M(o,i,t)};export{X as BatchUpdateImgListResultByPredictResult,W as BatchUpdateResultByTrackID,Y as BatchUpdateTrackID,rt as ChangeSave,J as CopyBackWordResult,f as DispatcherTurning,lt as GetBoxesByID,st as InitAnnotationState,q as InitTaskData,nt as PageBackward,at as PageForward,ot as PageJump,S as SetAnnotationLoading,it as SetPointCloudLoading,ut as SetPredictResult,pt as SetPredictResultVisible,v as SetTaskConfig,O as SetTaskStepList,$ as ToNextStep,E as ToSubmitFileData,R as UpdateBeforeRotate,x as UpdateCheckMode,L as UpdateGetFileData,D as UpdateGetFileList,z as UpdateInjectFunc,U as UpdateOnPageChange,A as UpdateOnSave,P as UpdateOnStepChange,I as UpdateOnSubmit,m as UpdatePageSize,G as UpdateProcessingStep,V as UpdateRotate,N as UpdateSkipBeforePageTurning,K as UpdateToolInstance,w as loadImgList};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import a from"../../utils/StepUtils.js";import{jsonParser as p}from"../../utils/index.js";const c=t=>{var o,i,r;const{annotation:{imgList:s,imgIndex:l}}=t,e=(o=s[l])!=null?o:{},n=a.getCurrentStepInfo((i=t.annotation)==null?void 0:i.step,(r=t.annotation)==null?void 0:r.stepList);return{currentData:e,imgIndex:l,imgList:s,stepInfo:n,config:p(n==null?void 0:n.config),configString:n==null?void 0:n.config}};export{c as a2MapStateToProps};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getFormatSize as Lt}from"../../components/customResizeHook/index.js";import{ESubmitType as z}from"../../constant/index.js";import Et from"../../constant/styleString.js";import{ANNOTATION_ACTIONS as u}from"../Actions.js";import{jsonParser as b}from"../../utils/index.js";import W from"../../utils/AnnotationDataUtils.js";import{ConfigUtils as St}from"../../utils/ConfigUtils.js";import{composeResultWithBasicImgInfo as st,composeResult as Y}from"../../utils/data.js";import K from"../../utils/StepUtils.js";import it from"../../utils/ToolUtils.js";import{MathUtils as lt,CommonToolUtils as vt,AnnotationEngine as At,ImgUtils as Dt}from"@labelbee/lb-annotation";import{PointCloudUtils as rt,i18n as w}from"@labelbee/lb-utils";import{Modal as ut}from"antd";import{message as at}from"antd/es";import ct from"lodash";import{SetAnnotationLoading as $}from"./actionCreators.js";var yt=Object.defineProperty,Rt=Object.defineProperties,Pt=Object.getOwnPropertyDescriptors,dt=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable,pt=(t,e,i)=>e in t?yt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,o=(t,e)=>{for(var i in e||(e={}))Ct.call(e,i)&&pt(t,i,e[i]);if(dt)for(var i of dt(e))Ot.call(e,i)&&pt(t,i,e[i]);return t},r=(t,e)=>Rt(t,Pt(e)),gt=(t,e,i)=>new Promise((L,g)=>{var E=m=>{try{v(i.next(m))}catch(P){g(P)}},S=m=>{try{v(i.throw(m))}catch(P){g(P)}},v=m=>m.done?L(m.value):Promise.resolve(m.value).then(E,S);v((i=i.apply(t,e)).next())});const U=(t,e)=>t.find(i=>i.step===e),_t={annotationEngine:null,toolInstance:null,imgList:[],config:"{}",imgIndex:-1,basicIndex:0,imgPageSize:1,step:1,stepList:[],imgNode:new Image,basicResultList:[],resultList:[],stepProgress:0,loading:!1,triggerEventAfterIndexChanged:!1,pointCloudLoading:!1,checkMode:!1,predictionResult:[],predictionResultVisible:!1},ht=t=>{const{imgList:e,imgPageSize:i}=t;return Math.ceil(e.length/i)},It=(t,e)=>t.reduce((i,L)=>{if(L){const g=L.result;if(b(g)[`step_${e}`])return i+1}return i},0)/t.length,bt=(t,e)=>{const{step:i,stepList:L}=t,g=K.getCurrentStepInfo(i,L),E=St.jsonParser(g.config);if(it.isVideoTool(g==null?void 0:g.tool)||it.isPointCloudTool(g==null?void 0:g.tool))return;const S=document.getElementById("toolContainer");if(!S)throw"Not exist dom named id-toolContainer";const v=Lt({width:window.innerWidth,height:window.innerHeight}),m=new At({container:S,toolName:g.tool,size:v,imgNode:e,config:E,style:JSON.parse(Et)});return{toolInstance:m==null?void 0:m.toolInstance,annotationEngine:m}},Ut=(t,e)=>(i,L)=>gt(void 0,null,function*(){const{stepList:g,step:E}=L().annotation,S=K.currentToolIsVideo(E,g),v=K.currentToolIsPointCloud(E,g);if($(i,!0),yield i(Nt(t)),S||v){i(Bt(t));return}i(wt(t,e))}),Nt=t=>(e,i)=>gt(void 0,null,function*(){const{getFileData:L,imgList:g}=i().annotation;if(L){const E=yield L(g[t],t);e({type:u.SET_FILE_DATA,payload:{fileData:E,index:t}})}}),Bt=t=>e=>{$(e,!1),e({type:u.LOAD_FILE_DATA,payload:{nextIndex:t}})},wt=(t,e)=>(i,L)=>{var g;const{toolInstance:E,imgList:S}=L().annotation,v=(g=S==null?void 0:S[t])==null?void 0:g.url;Dt.load(v).then(m=>{$(i,!1),i({type:u.LOAD_FILE_DATA,payload:{imgNode:m,nextIndex:t,nextBasicIndex:e}})}).catch(()=>{$(i,!1),E==null||E.setErrorImg(),i({type:u.LOAD_FILE_DATA,payload:{nextIndex:t,nextBasicIndex:e}})})},xt=({toolInstance:t,imgList:e,imgIndex:i,stepList:L,step:g=1})=>{var E,S,v,m;const P=((E=e[i])==null?void 0:E.result)||"",[x,F,j]=(S=t==null?void 0:t.exportData())!=null?S:[],V=(m=(v=t==null?void 0:t.exportCustomData)==null?void 0:v.call(t))!=null?m:{},G=st(P,F),k=Y(G,{step:g,stepList:L},{rect:x},V);return e.map((N,M)=>M===i?o(r(o({},N),{result:k}),j):o({},N))},Ft=(t=o({},_t),e)=>{var i,L,g,E,S,v,m,P,x,F,j,V,G,k,N,M,J,X,q,Z,Q,tt,et;switch(e.type){case u.INIT_ALL_STATE:return o(o({},t),_t);case u.UPDATE_TOOL_INSTANCE:return r(o({},t),{toolInstance:e.payload.toolInstance});case u.UPDATE_IMG_LIST:return r(o({},t),{imgList:e.payload.imgList});case u.CALC_STEP_PROGRESS:{const{imgList:n,step:s}=t,l=It(n,s);return r(o({},t),{stepProgress:l})}case u.SUBMIT_FILE_DATA:{const{imgList:n,imgIndex:s,step:l,stepList:a,toolInstance:d,onSubmit:c,resultList:f}=t;if(!d||!n[s])return t;const _=((i=n[s])==null?void 0:i.result)||"",[,p,I]=(L=d==null?void 0:d.exportData())!=null?L:[],T=(E=(g=d==null?void 0:d.exportCustomData)==null?void 0:g.call(d))!=null?E:{},A=st(_,p),y=Y(A,{step:l,stepList:a},{rect:f},T),D=t.imgList.map((C,R)=>{if(R===s){const B=W.dataCorrection(y,_,l,a);return o(r(o({},C),{result:B}),I)}return C});if(((S=e.payload)==null?void 0:S.submitType)===z.SyncImgList)return r(o({},t),{imgList:D});c&&c([D[s]],(v=e.payload)==null?void 0:v.submitType,s,D);const O=It(D,l);return r(o({},t),{stepProgress:O,imgList:D})}case u.SAVE_RESULT:{const{imgList:n,imgIndex:s,onSave:l}=t;return l==null||l(n[s],s,n),o({},t)}case u.SUBMIT_RESULT:{const{imgList:n,basicIndex:s,resultList:l,toolInstance:a,basicResultList:d}=t;if(!a)return t;const[c]=(m=a==null?void 0:a.exportData())!=null?m:[];let f=c;if((d==null?void 0:d.length)>0){const _=(P=d[s])==null?void 0:P.id,p=c.map(I=>r(o({},I),{sourceID:_}));f=ct.cloneDeep(l).filter(I=>I.sourceID!==_),f.push(...p)}return r(o({},t),{resultList:f,imgList:n})}case u.SET_BASIC_INDEX:{const{toolInstance:n,step:s,imgList:l,imgIndex:a,stepList:d,annotationEngine:c,resultList:f,basicResultList:_}=t;if(!n||!c)return t;const p=e.payload.basicIndex,I=(x=_[p])==null?void 0:x.id,T=b((F=l[a])==null?void 0:F.result),A=(f||[]).filter(B=>B.sourceID===I),y=U(d,s),{dataSourceStep:D,tool:O}=y,C=U(d,D);let R=[];return D&&O&&(R=(j=T[`step_${D}`])==null?void 0:j.result,(R==null?void 0:R.length)>0?(c==null||c.setBasicInfo(C.tool,R[p]),c==null||c.launchOperation()):(c==null||c.setBasicInfo(C.tool),c==null||c.forbidOperation(),at.info(w.t("NoDependency")))),n==null||n.setResult(A),n==null||n.history.initRecord(A,!0),r(o({},t),{basicIndex:p})}case u.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:{const{triggerEventAfterIndexChanged:n}=e.payload;return r(o({},t),{triggerEventAfterIndexChanged:!!n})}case u.LOAD_FILE_DATA:{const{imgList:n,step:s,toolInstance:l,annotationEngine:a,stepList:d}=t;if(!l)return r(o({},t),{imgIndex:e.payload.nextIndex});const c=K.getCurrentStepInfo(s,d),{nextIndex:f,imgNode:_,nextBasicIndex:p,imgError:I}=e.payload,T=p!=null?p:0,A=b((V=n[f])==null?void 0:V.result),y=A[`step_${c.step}`],D=!y,O={rotate:(G=A.rotate)!=null?G:0,valid:(k=A.valid)!=null?k:!0};_&&I!==!0?a==null||a.setImgNode(_,O):l==null||l.setValid(O.valid);const C=U(d,c.step),{dataSourceStep:R,tool:B}=C,nt=U(d,R),ot=R&&B,h=(M=(N=A[`step_${R}`])==null?void 0:N.result)!=null?M:[],H=W.getInitialResultList(y==null?void 0:y.result,l,C,h,D);if(a==null||a.launchOperation(),ot&&((h==null?void 0:h.length)>0?a==null||a.setBasicInfo(nt.tool,h[T]):(a==null||a.setBasicInfo(nt.tool),a==null||a.forbidOperation(),at.info(w.t("NoDependency")))),c.tool!=="check"){const mt=(X=(J=h[T])==null?void 0:J.id)!=null?X:"",ft=ot?H.filter(Tt=>vt.isSameSourceID(Tt.sourceID,mt)):H;l==null||l.history.initRecord(H,!0),l==null||l.setResult(ft)}return r(o({},t),{imgIndex:f,basicIndex:T,basicResultList:h,resultList:H})}case u.UPDATE_ANNOTATION_CONFIG:return r(o({},t),{config:(q=e.payload.config)!=null?q:"{}"});case u.SET_TASK_STEP_LIST:{const{stepList:n}=e.payload;return r(o({},t),{stepList:n})}case u.SET_TASK_CONFIG:{const{stepList:n,step:s}=e.payload;return r(o({},t),{stepList:n,step:s})}case u.INIT_TOOL:{const{imgNode:n}=t,s=bt(t,n);if(s){const{toolInstance:l,annotationEngine:a}=s;return r(o({},t),{toolInstance:l,annotationEngine:a})}return o({},t)}case u.SET_TOOL:{const n=(Z=e.payload)==null?void 0:Z.instance;return n?r(o({},t),{toolInstance:n}):o({},t)}case u.UPDATE_ON_SUBMIT:return r(o({},t),{onSubmit:e.payload.onSubmit});case u.UPDATE_ON_SAVE:return r(o({},t),{onSave:e.payload.onSave});case u.UPDATE_ON_PAGE_CHANGE:return r(o({},t),{onPageChange:e.payload.onPageChange});case u.SET_PREDICT_RESULT:return r(o({},t),{predictionResult:e.payload.result});case u.SET_PREDICT_RESULT_VISIBLE:return r(o({},t),{predictionResultVisible:e.payload.visible});case u.UPDATE_ON_STEP_CHANGE:return r(o({},t),{onStepChange:e.payload.onStepChange});case u.UPDATE_GET_FILE_DATA:return r(o({},t),{getFileData:e.payload.getFileData});case u.UPDATE_PAGE_SIZE:return r(o({},t),{pageSize:e.payload.pageSize});case u.UPDATE_LOAD_FILE_LIST:return r(o({},t),{loadFileList:e.payload.loadFileList});case u.UPDATE_BEFORE_ROTATE:return r(o({},t),{beforeRotate:e.payload.beforeRotate});case u.SKIP_BEFORE_PAGE_TURNING:return r(o({},t),{skipBeforePageTurning:e.payload.skipBeforePageTurning});case u.SET_FILE_DATA:{const{fileData:n,index:s}=e.payload,{imgList:l}=t,a=[...l];return a[s]=o(o({},a[s]),n),r(o({},t),{imgList:a})}case u.UPDATE_ROTATE:{const{toolInstance:n,beforeRotate:s}=t;return s&&s()===!1||n==null||n.updateRotate(),t}case u.UPDATE_ANNOTATION_VALID:{const{toolInstance:n}=t,s=(Q=n==null?void 0:n.valid)!=null?Q:!0;return ut.destroyAll(),ut.confirm({content:w.t(s?"updateValidFromValidToInValid":"updateValidFromInValidToValid"),onOk:()=>{n==null||n.setValid(!s)},okText:w.t("Confirm"),cancelText:w.t("Cancel")}),t}case u.COPY_BACKWARD_RESULT:{const{toolInstance:n,imgIndex:s,imgList:l,step:a}=t;if(!n)return t;if(s===0||s>=l.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),t;const d=l[s-1].result;if(!d)return t;const c=W.copyResultChange(d,a,(tt=l[s].result)!=null?tt:"");l[s]=r(o({},l[s]),{result:c});const _=b(c)[`step_${a}`],p=(_==null?void 0:_.result)||[];return n==null||n.setResult(p),n==null||n.history.pushHistory(p),(et=n==null?void 0:n.asyncData)==null||et.call(n,l[s]),r(o({},t),{imgList:[...l]})}case u.SET_STEP:{const{stepList:n,annotationEngine:s}=t,{toStep:l}=e.payload;if(!s)return t;const a=U(n,l);return s==null||s.setToolName(a.tool,a.config),r(o({},t),{step:l,toolInstance:s==null?void 0:s.toolInstance})}case u.SET_LOADING:{const{loading:n}=e.payload;return r(o({},t),{loading:!!n})}case u.SET_POINT_CLOUD_LOADING:{const{pointCloudLoading:n}=e.payload;return r(o({},t),{pointCloudLoading:!!n})}case u.SET_CHECK_MODE:{const{checkMode:n}=e.payload;return r(o({},t),{checkMode:!!n})}case u.BATCH_UPDATE_TRACK_ID:{const{id:n,newID:s,rangeIndex:l,imgList:a}=e.payload,{imgIndex:d,onSubmit:c}=t,f=[],_=a.map((p,I)=>{if(lt.isInRange(I,l)){const T=r(o({},p),{result:rt.batchUpdateTrackID({id:n,newID:s,result:p.result})});return f.push({imgIndex:I,newInfo:T}),T}return p});return c&&c([_[d]],z.BatchUpdateTrackID,d,_,{updateImgList:f}),r(o({},t),{imgList:_})}case u.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:n,newData:s,rangeIndex:l}=e.payload,{imgList:a,imgIndex:d,onSubmit:c}=t,f=[],_=a.map((p,I)=>{if(lt.isInRange(I,l)){const T=r(o({},p),{result:rt.batchUpdateResultByTrackID({id:n,newData:s,result:p.result})});return f.push({imgIndex:I,newInfo:T}),T}return p});return c&&c([_[d]],z.BatchUpdateTrackID,d,_,{updateImgList:f}),r(o({},t),{imgList:_})}case u.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:{const{onSubmit:n,imgList:s,stepList:l,step:a,predictionResult:d}=t,c={};d.forEach(I=>{const{index:T}=I;c[T]=ct.pick(I,["center","width","height","depth","rotation","id","attribute","valid","trackID"])});const f=`step_${a}`,_=[],p=s.map((I,T)=>{if(c[T]){const A=I.result==="{}"?b(Y("",{step:a,stepList:l},{rect:[]},{})):b(I.result);A[f].result.push(c[T]);const y=r(o({},I),{result:JSON.stringify(A)});return _.push({imgIndex:T,newInfo:y}),y}return I});return n==null||n(p,z.BatchUpdateImgList,-1,p,{updateImgList:_}),r(o({},t),{imgList:p})}default:return t}};export{Ut as LoadFileAndFileData,Ft as annotationReducer,xt as composeResultByToolInstance,U as getStepConfig,ht as getTotalPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsonParser as s}from"../../utils/index.js";import{getStepConfig as i}from"./reducer.js";const n=({annotation:e})=>{var t;const{stepList:o,step:r}=e;return s((t=i(o,r))==null?void 0:t.config)};export{n as stepConfigSelector};
|
package/es/store/ctx.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"react";import{createDispatchHook as o,createSelectorHook as c}from"react-redux";const e=t.createContext(void 0),r=o(e),a=c(e);export{e as LabelBeeContext,r as useDispatch,a as useSelector};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{IMAGE_ATTRIBUTE_ACTIONS as t}from"../Actions.js";function I(r){return{type:t.UPDATE_IMG_ATTRIBUTE,payload:r}}function T(){return{type:t.INIT_IMG_ATTRIBUTE,payload:{}}}var e={UpdateImgAttribute:I,InitImgAttribute:T};export{T as InitImgAttribute,I as UpdateImgAttribute,e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{IMAGE_ATTRIBUTE_ACTIONS as a}from"../Actions.js";var p=Object.defineProperty,i=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,n=(e,r,t)=>r in e?p(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,o=(e,r)=>{for(var t in r||(r={}))_.call(r,t)&&n(e,t,r[t]);if(i)for(var t of i(r))l.call(r,t)&&n(e,t,r[t]);return e};const s={contrast:1,saturation:1,brightness:1,zoomRatio:1,isOriginalSize:!1};function u(e=o({},s),r){switch(r.type){case a.UPDATE_IMG_ATTRIBUTE:return o(o({},e),r.payload);case a.INIT_IMG_ATTRIBUTE:return o({},s);default:return e}}export{u as imgAttributeReducer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{combineReducers as t}from"redux";import{annotationReducer as e}from"./annotation/reducer.js";import{imgAttributeReducer as o}from"./imgAttribute/reducer.js";import{toolStyleReducer as r}from"./toolStyle/reducer.js";const i=t({annotation:e,imgAttribute:o,toolStyle:r});export{i as rootReducer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{TOOL_STYLE_ACTIONS as o}from"../Actions.js";function T(){return{type:o.INIT_TOOL_STYLE_CONFIG,payload:void 0}}function n(t){return{type:o.UPDATE_TOOL_STYLE_CONFIG,payload:t}}export{T as InitToolStyleConfig,n as UpdateToolStyleConfig};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{NULL_COLOR as n,COLORS_ARRAY as y}from"../../data/Style.js";import{ToolStyleUtils as i}from"../../utils/ToolStyleUtils.js";import{TOOL_STYLE_ACTIONS as a}from"../Actions.js";var s=Object.defineProperty,p=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,O=(t,r,o)=>r in t?s(t,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[r]=o,l=(t,r)=>{for(var o in r||(r={}))u.call(r,o)&&O(t,o,r[o]);if(p)for(var o of p(r))_.call(r,o)&&O(t,o,r[o]);return t};const c={color:1,width:2,borderOpacity:9,fillOpacity:9,toolColor:i.getToolColors(),attributeColor:i.getAttributeColors(),lineColor:i.getDefaultToolLineColors(),attributeLineColor:[n].concat(y)};function f(t=l({},c),r){switch(r.type){case a.INIT_TOOL_STYLE_CONFIG:return l({},c);case a.UPDATE_TOOL_STYLE_CONFIG:{const o={},e=r.payload;return((e==null?void 0:e.borderOpacity)||(e==null?void 0:e.fillOpacity))&&Object.assign(o,i.initByOpacity(e.borderOpacity||t.borderOpacity,e.fillOpacity||t.fillOpacity)),l(l(l({},t),r.payload),o)}default:return t}}export{f as toolStyleReducer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{uuid as v}from"@labelbee/lb-annotation";import{jsonParser as l}from"./index.js";import{EToolName as d}from"../data/enums/ToolType.js";import _ from"lodash";import y from"./StepUtils.js";var O=Object.defineProperty,P=Object.defineProperties,j=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,S=(a,t,e)=>t in a?O(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,E=(a,t)=>{for(var e in t||(t={}))w.call(t,e)&&S(a,e,t[e]);if(h)for(var e of h(t))x.call(t,e)&&S(a,e,t[e]);return a},N=(a,t)=>P(a,j(t));class R{static copyResultChange(t,e,r){try{const s=l(t),i=l(r),o=`step_${e}`;if(s[o]){const n=s[o];if(n.result)return n.result=n.result.map(u=>N(E({},u),{id:v(8,62)})),i[o]=n,JSON.stringify(i)}return t}catch(s){return t}}static isResultSourceMatchedDependence(t,e){const r=t==null?void 0:t.map(i=>i.sourceID).sort(),s=e==null?void 0:e.map(i=>i.id).sort();return _.isEqual(r,s)}static deltaUpdateBasicResultList(t,e){const r=t==null?void 0:t.map(s=>s.sourceID).sort();return e.filter(s=>!r.includes(s.id))}static getInitialResultList(t,e,r,s,i){const o=t!=null?t:[];switch(r.tool){case d.Tag:case d.Text:{if(r.dataSourceStep>0){const n=this.deltaUpdateBasicResultList(o,s);if(n.length>0)return o.concat(e.getInitResultList(r.dataSourceStep,n))}return i!==!0?o:e.getInitResultList(r.dataSourceStep,s)}default:return o}}static dataCorrection(t,e,r,s){var i,o;try{const u=`step_${y.getStepInfo(r,s).step}`,c=l(t),I=l(e),f=(i=c[u])==null?void 0:i.result,p=(o=I[u])==null?void 0:o.result;if(!p||_.isEqual(f.sort(this.idCmp),p.sort(this.idCmp)))return t;const m=this.findDeletedIds(f,p);if(m.length===0)return t;const D=r,g=this.getStepKeys(c).sort();return this.deleteRes(c,D,m,g),JSON.stringify(c)}catch(n){return console.error(n),t}}static idCmp(t,e){const r=t.id,s=e.id;return r<s?-1:r>s?1:0}static findDeletedIds(t,e){return this.findDeletedItems(e,t).map(r=>r.id)}static findDeletedItems(t,e){const r=[];return t.forEach(s=>{e.some(o=>o.id===s.id)||r.push(s)}),r}static getStepKeys(t){return Object.keys(t).map(e=>parseInt(e.replace("step_",""),10)).filter(e=>!isNaN(e))}static deleteRes(t,e,r,s){s.forEach(i=>{if(i>e){const o=t[`step_${i}`];if([d.FolderTag,d.Segmentation].includes(o.tool))return;if(o.dataSourceStep===e){const n=[];o.result=o.result.filter(u=>r.includes(u.sourceID)?(n.push(u.id),!1):!0),this.deleteRes(t,i,n,s)}else o.result=o.result.filter(n=>!r.includes(n.sourceID))}})}}export{R as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isObject as e}from"lodash";class t{static jsonParser(r,s={}){try{return typeof r=="string"?JSON.parse(r):e(r)?r:s}catch(p){return s}}}t.getStepConfig=(i,r)=>i.find(s=>s.step===r);export{t as ConfigUtils};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{EPageTurningOperation as x}from"../data/enums/AnnotationSize.js";import f from"lodash";import{jsonParser as u}from"./index.js";const r=class{static getPageInfo(e){const{imgIndex:n,imgList:s,basicResultList:t,basicIndex:d,step:a,stepList:c}=e;return{fileIndex:n,basicIndex:d,basicList:t,fileList:s,step:a,stepList:c}}static getNextPageInfo(e,n,s){const t=r.getPageInfo(n),{fileIndex:d}=r.getPageInfo(n),a=r.getNextFileIndex(e,t,s),c=r.getNextBasicIndex(e,t.basicIndex),I=a!==d,l=r.hasNextBasicIndex(e,t),i={fileIndex:a,basicIndex:c,fileIndexChanged:I,basicIndexChanged:l};return l?(i.fileIndexChanged=!1,i.fileIndex=d,i):(i.basicIndex=e===x.Backward?r.getBasicResultIndexForNextFile(t,i.fileIndex):0,i)}};let o=r;o.getNextBasicIndex=(e,n)=>n+(e===x.Forward?1:-1),o.hasNextBasicIndex=(e,n)=>{const{basicList:s}=n;if((s==null?void 0:s.length)>0){const t=r.getNextBasicIndex(e,n.basicIndex);return t>=0&&s.length>t}return!1},o.getBasicResultIndexForNextFile=(e,n)=>{var s;const{stepList:t,step:d,fileList:a}=e,c=t.find(l=>l.step===d),I=c==null?void 0:c.dataSourceStep;if(I){const i=(s=u(a[n].result)[`step_${I}`])==null?void 0:s.result;return!i||!(i==null?void 0:i.length)?0:(i==null?void 0:i.length)-1}return 0},o.getNextFileIndex=(e,n,s)=>{const{fileIndex:t,fileList:d}=n;let a=s!==void 0?s:t;switch(e){case x.Forward:a+=1;break;case x.Backward:a-=1;break;case x.Jump:break}return f.inRange(a,0,d.length)?a:t};export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{EStepType as r}from"../constant/index.js";import u from"./ToolUtils.js";class n{static getCurrentStepInfo(e,o){const t=this.getStepInfo(e,o);return[r.QUALITY_INSPECTION,r.MANUAL_CORRECTION].includes(t==null?void 0:t.type)?this.getStepInfo(t.dataSourceStep,o):t}static getStepInfo(e,o){return o==null?void 0:o.filter(t=>t.step===e)[0]}static currentToolIsVideo(e,o){const t=n.getCurrentStepInfo(e,o);return u.isVideoTool(t==null?void 0:t.tool)}static currentToolIsPointCloud(e,o){const t=n.getCurrentStepInfo(e,o);return u.isPointCloudTool(t==null?void 0:t.tool)}}export{n as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ETextType as e}from"../data/enums/ToolType.js";import{i18n as s}from"@labelbee/lb-utils";const a="^[0-9]+$",c="^[A-Za-z]+$";class l{static checkString(r,n){let t="";switch(r){case e.Order:case e.NumberOnly:t=a;break;case e.EnglishOnly:t=c;break;case e.CustomFormat:t=n;break}return t}static getErrorNotice(r){switch(r){case e.Order:case e.NumberOnly:return s.t("TextCheckNumberOnly");case e.EnglishOnly:return s.t("TextCheckEnglishOnly");case e.CustomFormat:return s.t("TextCheckCustomFormat");default:return""}}}export{c as REGEXP_ENGLISH,a as REGEXP_NUMBER,l as TextUtils};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{CHANGE_COLOR as o,DEFAULT_COLOR as p,COLORS_ARRAY as u,NULL_COLOR as C,BORDER_OPACITY_LEVEL as k,FILL_OPACITY_LEVEL as O}from"../data/Style.js";import f from"lodash";const v=.8,c=class{static colorSplit(a,s){return a.split(" ").join("").replace(/,[0-9]+([.]{1}[0-9]+){0,1}\)/,`,${s.toFixed(2)})`)}static computeOpacity(a,s){var e,t;let r=(t=(((e=s.split(" ").join("").match(/,[0-9]+([.]{1}[0-9]+){0,1}\)/))==null?void 0:e[0])||"").match(/[0-9]+([.]{1}[0-9]+){0,1}/))==null?void 0:t[0];return a*Number(r)}static getToolColors(a=9,s=9){const e=c.colorSplit,t=c.computeOpacity,n=f.cloneDeep(o),r=k[a],d=O[s];return Object.keys(o).forEach(i=>{const l=f.cloneDeep(p);l.valid.stroke=e(o[i].valid,t(r,o[i].valid)),l.valid.fill=e(o[i].valid,t(d,o[i].valid)*v),l.validSelected.stroke=e(o[i].select.stroke,t(r,o[i].select.stroke)),l.validSelected.fill=e(o[i].select.fill,t(d,o[i].select.fill)*v),l.validHover.stroke=e(o[i].hover,t(r,o[i].hover)),l.validHover.fill=e(o[i].hover,t(d,o[i].hover)*v),l.invalid.stroke=e(l.invalid.stroke,t(r,l.invalid.stroke)),l.invalid.fill=e(l.invalid.stroke,t(d,l.invalid.stroke)*v),l.invalidSelected.stroke=e(l.invalidSelected.stroke,t(r,l.invalidSelected.stroke)),l.invalidSelected.fill=e(l.invalidSelected.fill,t(d,l.invalidSelected.fill)*v),l.invalidHover.stroke=e(l.invalidHover.stroke,t(r,l.invalidHover.fill)),l.invalidHover.fill=e(l.invalidHover.fill,t(d,l.invalidHover.fill)*v),n[i]=l}),n}static getAttributeColors(a=9,s=9){const e=c.colorSplit,t=c.computeOpacity,n=k[a],r=O[s];let d=f.cloneDeep(u);return d.unshift(C),d=d.map(i=>{const l=JSON.parse(JSON.stringify(p));return l.valid.stroke=e(i,t(n,i)),l.valid.fill=e(i,t(r,i)*v*.5),l.validSelected.stroke=e(i,t(n,i)),l.validSelected.fill=e(i,t(r,i)*v),l.validHover.stroke=e(i,t(n,i)),l.validHover.fill=e(i,t(r,i)*v),l.invalid.stroke=e(l.invalid.stroke,t(n,i)),l.invalid.fill=e(l.invalid.fill,t(r,i)*v*.5),l.invalidSelected.stroke=e(l.invalidSelected.stroke,t(n,i)),l.invalidSelected.fill=e(l.invalidSelected.fill,t(r,i)*v),l.invalidHover.stroke=e(l.invalidHover.stroke,t(n,i)),l.invalidHover.fill=e(l.invalidHover.fill,t(r,i)*v),l}),d}static getDefaultToolLineColors(){const a={};return Object.keys(o).forEach(s=>{a[s]=o[s].line}),a}static initByOpacity(a,s){return{toolColor:this.getToolColors(a,s),attributeColor:this.getAttributeColors(a,s)}}};let S=c;S.changeOpacity={1:.2,3:.4,5:.6,7:.8,9:1};export{S as ToolStyleUtils};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cTool as t}from"@labelbee/lb-annotation";const{EVideoToolName:l,EPointCloudName:i,EToolName:e}=t;class s{static isVideoTool(o){return o?Object.values(l).includes(o):!1}static isPointCloudTool(o){return o?Object.values(i).includes(o):!1}static getPointCloudToolList(){return[e.Point,e.Line,e.PointCloudPolygon]}}export{s as default};
|
package/es/utils/data.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsonParser as g}from"./index.js";import P from"./StepUtils.js";var I=Object.defineProperty,d=Object.defineProperties,N=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,S=(e,r,t)=>r in e?I(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,o=(e,r)=>{for(var t in r||(r={}))w.call(r,t)&&S(e,t,r[t]);if(y)for(var t of y(r))v.call(r,t)&&S(e,t,r[t]);return e},a=(e,r)=>d(e,N(r));const D=(e,r)=>JSON.stringify(o(o({},g(e)),r)),J=(e,r,t,f)=>{const{step:l,stepList:_}=r,{rect:i,basicRectID:u}=t;try{const s=g(e),O=P.getCurrentStepInfo(l,_),{dataSourceStep:m}=O,p=`step_${O.step}`;if(s[p]){const n=s[p];return Object.assign(n,f),n.result?(JSON.stringify(n.result)===JSON.stringify(i)||(u?n.result=[...n.result.filter(c=>!(c.sourceID&&c.sourceID===u)),...i.filter(c=>c.sourceID&&c.sourceID===u)]:n.result=i),JSON.stringify(s)):JSON.stringify(a(o({},s),{[p]:a(o(o({},s[p]),f),{result:i})}))}return JSON.stringify(a(o({},s),{[p]:a(o({dataSourceStep:m},f),{toolName:_[l-1].tool,result:i})}))}catch(s){return e}};export{J as composeResult,D as composeResultWithBasicImgInfo};
|
package/es/utils/dom.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{prefix as r}from"../constant/index.js";function i(e,t){if(!e)return t;let n;return typeof e=="function"?n=e():"current"in e?n=e.current:n=e,n}const f=(e,t,n)=>`${r}-${e}${t?"__"+t:""}${n?"__"+n:""}`;export{f as getClassName,i as getTargetElement};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import s from"lodash";const o=(r,i={})=>{try{return typeof r=="string"?JSON.parse(r):s.isObject(r)?r:i}catch(t){return i}},n=r=>{if(Array.isArray(r))return r.filter(i=>i).join(" ");if(s.isObject(r)){const i=[];return Object.keys(r).forEach(t=>{r[t]&&i.push(t)}),i.join(" ")}return""};export{n as classnames,o as jsonParser};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{store as L}from"../../../index.js";import{LabelBeeContext as N}from"../../../store/ctx.js";import{message as y}from"antd/es";import D from"lodash";import f,{useState as _,useRef as O,useEffect as a}from"react";import{connect as M}from"react-redux";import U from"../../../components/fileException/FileError.js";import Z from"../../../hooks/useSize.js";import{InitToolStyleConfig as k}from"../../../store/toolStyle/actionCreators.js";import{ImgUtils as B}from"@labelbee/lb-annotation";import{i18n as P}from"@labelbee/lb-utils";import F from"../../../utils/StepUtils.js";var T=Object.defineProperty,V=Object.defineProperties,Y=Object.getOwnPropertyDescriptors,E=Object.getOwnPropertySymbols,$=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,j=(n,o,r)=>o in n?T(n,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[o]=r,A=(n,o)=>{for(var r in o||(o={}))$.call(o,r)&&j(n,r,o[r]);if(E)for(var r of E(o))q.call(o,r)&&j(n,r,o[r]);return n},G=(n,o)=>V(n,Y(o));const H=n=>{const[,o]=_(0),{imgAttribute:r,toolStyle:l,toolInstance:e,annotationEngine:t,imgList:d,imgIndex:h,dataInjectionAtCreation:p,renderEnhance:g,customRenderStyle:u,stepList:v,step:w,drawLayerSlot:S}=n,[x,b]=_({zoom:1,currentPos:{x:0,y:0}}),I=O(null),C=O(null),c=Z(I);a(()=>{L.dispatch(k())},[]),a(()=>{if(!!t){switch(P.language){case"cn":case"en":t.setLang(P.language);break}t==null||t.setDataInjectionAtCreation(p),t==null||t.setRenderEnhance(g),u&&(t==null||t.setCustomRenderStyle(u))}},[t,p,g,u]),a(()=>{const i=(s,z)=>{b({zoom:s,currentPos:z})},m=s=>{b(s)};return e&&(e.singleOn("messageError",s=>{y.error(s)}),e.singleOn("messageInfo",s=>{y.info(s)}),e.singleOn("changeAnnotationShow",()=>{o(s=>s+1)}),e.on("renderZoom",i),e.on("dragMove",m)),()=>{e&&(e.unbind("renderZoom",i),e.unbind("dragMove",m))}},[e]),a(()=>{var i;(t==null?void 0:t.setImgAttribute)?t.setImgAttribute(r):(i=e==null?void 0:e.setImgAttribute)==null||i.call(e,r)},[r,t]),a(()=>{e&&e.setStyle(l),t&&t.setStyle(l)},[l]),a(()=>{(e==null?void 0:e.setSize)&&e.setSize(c),t&&t.setSize(c)},[c]),a(()=>{const i=F.getCurrentStepInfo(w,v);e==null||e.setConfig(i.config)},[v]);const R=()=>{const i=d==null?void 0:d[h];!(i==null?void 0:i.url)||B.load(i.url).then(m=>{t.setImgNode(m)})};return f.createElement("div",{ref:I,className:"annotationOperation"},f.createElement("div",{className:"canvas",ref:C,style:c,id:"toolContainer"},S==null?void 0:S(x)),(e==null?void 0:e.isImgError)===!0&&f.createElement(U,G(A({},c),{reloadImage:R,backgroundColor:"#e2e2e2",ignoreOffsetY:!0})))},J=n=>{const o=D.pickBy(n.annotation,(r,l)=>["imgList","imgIndex","stepList","step","toolInstance","annotationEngine","loading"].includes(l));return A({imgAttribute:n.imgAttribute,toolStyle:n.toolStyle},o)};var K=M(J,null,null,{context:N})(H);export{K as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"react";import{Tooltip as l}from"antd";import{prefix as a}from"../../../constant/index.js";const m=({path:n,tips:e})=>!n&&!e?null:t.createElement("div",{className:`${a}-tips`},t.createElement(l,{placement:"bottomRight",title:e},t.createElement("span",{className:`${a}-tips__leftContent`,title:e},e)),t.createElement(l,{placement:"bottomRight",title:n},t.createElement("span",{className:`${a}-tips__path`},n)));export{m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ViewportProvider as _}from"../../components/customResizeHook/index.js";import{prefix as y}from"../../constant/index.js";import{Spin as E}from"antd";import{Layout as c}from"antd/es";import o from"react";import g from"./annotationOperation/index.js";import x from"./annotationTips/index.js";import h from"./sidebar/index.js";import s from"./toolFooter/index.js";import j from"./toolHeader/index.js";import{getStepConfig as w}from"../../store/annotation/reducer.js";import P from"../../components/videoAnnotate/index.js";import{connect as T}from"react-redux";import u from"../../utils/ToolUtils.js";import N from"../../components/pointCloudView/index.js";import{getClassName as C}from"../../utils/dom.js";import{classnames as O}from"../../utils/index.js";import{LabelBeeContext as S}from"../../store/ctx.js";import V from"../../components/predictTracking/previewResult/index.js";var A=Object.defineProperty,f=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,v=(e,t,n)=>t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,m=(e,t)=>{for(var n in t||(t={}))b.call(t,n)&&v(e,n,t[n]);if(f)for(var n of f(t))F.call(t,n)&&v(e,n,t[n]);return e};const{Sider:L,Content:I}=c,d=`${y}-layout`,$=e=>{var t;return o.createElement(o.Fragment,null,e.showTips===!0&&o.createElement(x,{path:e.path,tips:e.tips}),o.createElement(g,m({},e)),o.createElement(s,{style:(t=e.style)==null?void 0:t.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},k=e=>{var t;return o.createElement(o.Fragment,null,o.createElement(N,{drawLayerSlot:e.drawLayerSlot,checkMode:e.checkMode,intelligentFit:e.intelligentFit}),o.createElement(s,{style:(t=e.style)==null?void 0:t.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},M=e=>{var t;const{stepList:n,step:r}=e,a=(t=w(n,r))==null?void 0:t.tool,i=u.isVideoTool(a),l=u.isPointCloudTool(a);return i?o.createElement(P,m({},e)):l?o.createElement(k,m({},e)):o.createElement($,m({},e))},R=e=>{var t,n,r,a,i;const l=(n=(t=e.style)==null?void 0:t.sider)==null?void 0:n.width;return o.createElement(_,null,o.createElement(E,{spinning:e.loading},o.createElement(c,{className:O([d,e.className]),style:(r=e.style)==null?void 0:r.layout},o.createElement("header",{className:`${d}__header`,style:(a=e.style)==null?void 0:a.header},o.createElement(j,{header:e==null?void 0:e.header,headerName:e.headerName,goBack:e.goBack,exportData:e.exportData})),o.createElement(c,{className:C("layout","container")},e==null?void 0:e.leftSider,o.createElement(I,{className:`${d}__content`},o.createElement(M,m({},e))),o.createElement(L,{className:`${d}__side`,width:l!=null?l:240,style:(i=e.style)==null?void 0:i.sider},o.createElement(h,{sider:e==null?void 0:e.sider})),o.createElement(V,null)))))},B=({annotation:e})=>{var t,n,r;const{imgList:a,loading:i}=e,l=(t=a[e.imgIndex])!=null?t:{};return{path:(r=(n=l==null?void 0:l.path)!=null?n:l==null?void 0:l.url)!=null?r:"",loading:i}};var H=T(B,null,null,{context:S})(R);export{H as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o,{useState as a,useEffect as l}from"react";import{message as u}from"antd/es";import m from"../TextAreaFormat/index.js";import{TextUtils as x}from"../../../../utils/TextUtils.js";import{connect as c}from"react-redux";import{LabelBeeContext as s}from"../../../../store/ctx.js";const f=({toolInstance:e})=>{var n;const[,i]=a(0);if(l(()=>{e&&(e.singleOn("selectedChange",()=>{i(r=>r+1)}),e.singleOn("updateTextAttribute",()=>{i(r=>r+1)}),e.singleOn("messageError",r=>{u.error(r)}))},[e]),!e)return null;const{config:t}=e;return o.createElement("div",null,((n=e==null?void 0:e.config)==null?void 0:n.textConfigurable)&&e.selectedID&&o.createElement(m,{onChange:e.textChange,textValue:e.selectedText,checkString:x.checkString(t==null?void 0:t.textCheckType,t==null?void 0:t.customFormat),textCheckType:t.textCheckType}))};function d(e){return{toolInstance:e.annotation.toolInstance}}var g=c(d,null,null,{context:s})(f);export{g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Tooltip as n}from"antd/es";import e,{useState as m}from"react";import i from"../../../../assets/annotation/common/icon_clearSmall.svg.js";import{InitImgAttribute as c}from"../../../../store/imgAttribute/actionCreators.js";import{store as l}from"../../../../index.js";import p from"../../../../assets/annotation/common/icon_clearSmall_a.svg.js";import{useTranslation as f}from"react-i18next";const u=()=>{const[o,t]=m(!1),r=()=>{l.dispatch(c())},{t:a}=f();return e.createElement(n,{placement:"bottom",title:a("RestoreImageAttributes")},e.createElement("img",{onMouseEnter:()=>t(!0),onMouseLeave:()=>t(!1),style:{marginLeft:6},src:o?p:i,onClick:s=>{s.stopPropagation(),r()}}))};export{u as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t,{useRef as d,useState as v}from"react";import{Col as p,Popconfirm as C}from"antd";import{useTranslation as s}from"react-i18next";import{prefix as E}from"../../../../constant/index.js";const y={color:"#CCCCCC"},f=({info:r})=>{const{t:e}=s();return r.key.startsWith("sure")?t.createElement("div",{key:r.key},`${e("ConfirmTo")}${r.name.slice(0)}\uFF1F`):t.createElement("span",null,r.name)},k=({icon:r})=>typeof r=="string"?t.createElement("img",{width:23,height:25,src:r}):r,i=({isHover:r,info:e})=>{const n=!!e.forbidOperation,o=e.key===r&&!n;let a={color:o?"#666fff":""};return n&&(a=y),t.createElement("div",{style:{cursor:n?"not-allowed":"default"},onClick:()=>{var c;return(e==null?void 0:e.forbidConfirm)&&!n&&((c=e==null?void 0:e.onClick)==null?void 0:c.call(e))}},t.createElement("div",{className:"icon"},t.createElement(k,{icon:o?e.hoverSvg:e.imgSvg})),t.createElement("div",{className:"toolName",style:a},e.name))},g=({allOperation:r})=>{const e=d(null),[n,o]=v(null),{t:a}=s(),c=Math.floor(24/r.length);return t.createElement("div",{className:"generalOperation",ref:e},r.map((l,u)=>t.createElement(p,{span:c,key:u},t.createElement("div",{key:l.key,className:"item",onMouseEnter:()=>{o(l.key)},onMouseLeave:()=>{o(null)}},l.forbidConfirm?t.createElement(i,{info:l,isHover:n}):t.createElement(C,{title:t.createElement(f,{info:l}),placement:"topRight",okText:a("Confirm"),cancelText:a("Cancel"),getPopupContainer:()=>{var m;return(m=e.current)!=null?m:document.body},onConfirm:l.onClick,overlayClassName:`${E}-pop-confirm`},t.createElement("div",null,t.createElement(i,{info:l,isHover:n})))))))};export{g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import s,{useState as f,useCallback as h}from"react";import{connect as d}from"react-redux";import k from"../../../../utils/StepUtils.js";import{jsonParser as g}from"../../../../utils/index.js";import v from"./ActionsConfirm.js";import C from"./useOperationList.js";import{LabelBeeContext as x}from"../../../../store/ctx.js";import B from"../../../../assets/annotation/pointCloudTool/unitAttribute.svg.js";import I from"../../../../assets/annotation/pointCloudTool/unitAttributeForbid.svg.js";import U from"../../../../assets/annotation/pointCloudTool/unitAttributeHover.svg.js";import{useTranslation as T}from"react-i18next";import w from"../../../../components/pointCloudView/components/UnifyParamsModal/index.js";import{useSingleBox as A}from"../../../../components/pointCloudView/hooks/useSingleBox.js";import{composeResultByToolInstance as E}from"../../../../store/annotation/reducer.js";const y=o=>{var t,n;const i=k.getCurrentStepInfo((t=o.annotation)==null?void 0:t.step,(n=o.annotation)==null?void 0:n.stepList);return{toolInstance:o.annotation.toolInstance,stepInfo:i,imgList:o.annotation.imgList,imgIndex:o.annotation.imgIndex,stepList:o.annotation.stepList}},M=({toolInstance:o,stepInfo:t})=>{const n=C(o),i=g(t==null?void 0:t.config),e=[n.empty];return(t==null?void 0:t.dataSourceStep)===0&&e.push(n.setValidity),(i==null?void 0:i.copyBackwardResult)&&e.push(n.copyPrevious),s.createElement(v,{allOperation:e})},V=d(y,null,null,{context:x})(({toolInstance:o,stepInfo:t,imgList:n,stepList:i,imgIndex:e})=>{const{t:L}=T(),{selectedBox:r}=A(),a=C(o),[S,l]=f(!1),[j,b]=f([]),m=g(t.config);let c=[a.copyPrevious,a.empty,a.setValidity];if(m.trackConfigurable===!0){const p=!r,O={name:L("UnifyParams"),key:"UnifyParams",imgSvg:p?I:B,hoverSvg:U,onClick:()=>{b(E({toolInstance:o,imgList:n,imgIndex:e,stepList:i})),l(!0)},forbidConfirm:!0,forbidOperation:p};c.unshift(O)}const P=h(()=>{l(!1)},[]),u=r==null?void 0:r.info;return s.createElement(s.Fragment,null,s.createElement(v,{allOperation:c}),s.createElement(w,{id:u==null?void 0:u.trackID,visible:S,onCancel:P,config:m,imgList:j}))});var R=d(y,null,null,{context:x})(M);export{V as PointCloudOperation,R as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import y from"../../../../assets/annotation/common/icon_clear.svg.js";import _ from"../../../../assets/annotation/common/icon_clear_a.svg.js";import S from"../../../../assets/annotation/common/icon_invalid.svg.js";import h from"../../../../assets/annotation/common/icon_invalid_a.svg.js";import{StopOutlined as a}from"@ant-design/icons";import{useTranslation as j}from"react-i18next";import s,{useState as O,useMemo as P}from"react";import{CopyBackWordResult as x}from"../../../../store/annotation/actionCreators.js";import{store as C}from"../../../../index.js";import{useSelector as k}from"../../../../store/ctx.js";var w=Object.defineProperty,m=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,c=(e,t,r)=>t in e?w(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,R=(e,t)=>{for(var r in t||(t={}))V.call(t,r)&&c(e,r,t[r]);if(m)for(var r of m(t))E.call(t,r)&&c(e,r,t[r]);return e};const b=e=>{const[t,r]=O(0),{t:o,i18n:l}=j(),{currentData:p}=k(i=>{const{imgList:g,imgIndex:d}=i.annotation;return{currentData:g[d]}}),n={height:"25px",lineHeight:"25px",display:"flex",justifyContent:"center",alignItems:"center"},u={name:o("ClearLabel"),key:"empty",imgSvg:y,hoverSvg:_,onClick:()=>{e==null||e.clearResult()}},v={name:o((e==null?void 0:e.valid)===!1?"SetAsValid":"SetAsInvalid"),key:"setValidity",imgSvg:s.createElement(a,{style:n}),hoverSvg:s.createElement(a,{style:R({color:"#666fff"},n)}),onClick:()=>{e.setValid(!e.valid),setTimeout(()=>{r(i=>i+1)})}},f={name:o("CopyThePrevious"),key:"copyPrevious",imgSvg:S,hoverSvg:h,onClick:()=>{C.dispatch(x())}};return P(()=>({empty:u,setValidity:v,copyPrevious:f}),[e,t,p,l.language])};export{b as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Row as s,Col as n,Slider as E,Input as h,Switch as x}from"antd/es";import{connect as b}from"react-redux";import{throttle as f}from"lodash";import e,{useEffect as C}from"react";import o from"../../../../store/imgAttribute/actionCreators.js";import{store as i}from"../../../../index.js";import{LabelBeeContext as A}from"../../../../store/ctx.js";import I from"../../../../assets/annotation/image/saturation.svg.js";import N from"../../../../assets/annotation/image/contrast.svg.js";import S from"../../../../assets/annotation/image/brightness.svg.js";import j from"../../../../assets/attributeIcon/zoomUp.svg.js";import y from"../../../../assets/annotation/image/icon_yuantu.svg.js";import{useTranslation as z}from"react-i18next";const $=r=>{const{imgAttribute:{contrast:l,saturation:c,brightness:g,zoomRatio:p,isOriginalSize:u}}=r,{t:m}=z(),a=f(t=>{i.dispatch(o.UpdateImgAttribute(t))},60,{trailing:!0}),d=[{name:"Saturation",min:-100,max:500,step:2,onChange:t=>a({saturation:t}),value:c,svg:I},{name:"Contrast",min:-100,max:300,step:2,onChange:t=>a({contrast:t}),value:l,svg:N},{name:"Exposure",min:-100,max:400,step:2,onChange:t=>a({brightness:t}),value:g,svg:S},{name:"ScreenRatio",min:.1,max:10,step:.1,onChange:t=>a({zoomRatio:t}),value:p,svg:j}];return C(()=>()=>{i.dispatch(o.InitImgAttribute())},[]),e.createElement("div",null,d.map((t,v)=>e.createElement("div",{className:"imgAttributeController",key:`option_${v}`},e.createElement(s,{className:"tools",style:{padding:"0px 0"}},e.createElement(n,{span:24},e.createElement("span",{className:"singleTool"},e.createElement("img",{width:12,height:12,src:t.svg}),e.createElement("span",{className:"toolName"},m(t.name))))),e.createElement(s,null,e.createElement(n,{span:20},e.createElement(E,{min:t.min,max:t.max,step:t.step,value:t.value,onChange:t.onChange,trackStyle:{background:"#666fff"}})),e.createElement(n,{span:4},e.createElement(h,{value:t.value,disabled:!0,style:{fontSize:12,marginBottom:23,padding:"0px 2px",textAlign:"center"}}))))),e.createElement("div",{className:"imgAttributeController"},e.createElement(s,{className:"tools",style:{padding:"10px 0"}},e.createElement(n,{span:18},e.createElement("span",{className:"singleTool"},e.createElement("img",{src:y,width:16,style:{marginTop:"-2px"}}),e.createElement("span",{className:"toolName"},m("OriginalScale")))),e.createElement(n,null,e.createElement(x,{checked:u,onChange:t=>a({isOriginalSize:t})})))))};function R({imgAttribute:r}){return{imgAttribute:r}}var T=b(R,null,null,{context:A})($);export{T as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{BatchUpdateTrackID as _}from"../../../../../../store/annotation/actionCreators.js";import{composeResultByToolInstance as E}from"../../../../../../store/annotation/reducer.js";import{LabelBeeContext as w,useDispatch as h}from"../../../../../../store/ctx.js";import{Form as o,Modal as v,InputNumber as c}from"antd";import r,{useState as O}from"react";import{useTranslation as D}from"react-i18next";import{connect as k}from"react-redux";var C=Object.defineProperty,T=Object.defineProperties,B=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,d=(e,t,n)=>t in e?C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,L=(e,t)=>{for(var n in t||(t={}))j.call(t,n)&&d(e,n,t[n]);if(u)for(var n of u(t))F.call(t,n)&&d(e,n,t[n]);return e},S=(e,t)=>T(e,B(t));const U={labelCol:{span:8},wrapperCol:{span:16}},m={width:"80px"},N=({id:e,stepList:t,imgList:n,imgIndex:f,toolInstance:y})=>{const g=h(),[I,l]=O(!1),[p]=o.useForm(),{t:a}=D(),b=i=>{g(_({id:e,newID:i.newID,rangeIndex:[i.prevPage-1,i.nextPage-1],imgList:E({toolInstance:y,imgList:n,imgIndex:f,stepList:t})})),l(!1)},x=()=>l(!1),P=()=>p.submit(),s=[{required:!0,message:a("PositiveIntegerCheck")}];return r.createElement(r.Fragment,null,r.createElement("a",{style:{color:"#666FFF"},onClick:()=>l(!0)},a("BatchUpdateText")),r.createElement(v,{title:a("BatchUpdateTrackID"),visible:I,onCancel:x,onOk:P,wrapClassName:"labelbee-custom-modal"},r.createElement(o,S(L({},U),{form:p,onFinish:b}),r.createElement(o.Item,{name:"id",label:a("CurrentBoxTrackIDs")},e),r.createElement(o.Item,{name:"newID",label:a("TrackIDUnifyAs"),rules:s},r.createElement(c,{precision:0,min:1,style:m})),r.createElement(o.Item,{label:a("UnifyTrackIDRange"),required:!0},r.createElement(o.Item,{style:{display:"inline-block"},rules:s,name:"prevPage",noStyle:!0},r.createElement(c,{precision:0,min:1,style:m})),r.createElement("span",{style:{display:"inline-block",width:"24px",textAlign:"center"}},"-"),r.createElement(o.Item,{style:{display:"inline-block"},rules:s,name:"nextPage",noStyle:!0},r.createElement(c,{precision:0,min:1,style:m})),r.createElement("span",{style:{display:"inline-block",width:"40x",marginLeft:"10px",textAlign:"center"}},a("Page"))))))},R=e=>({toolInstance:e.annotation.toolInstance,imgList:e.annotation.imgList,imgIndex:e.annotation.imgIndex,stepList:e.annotation.stepList});var A=k(R,null,null,{context:w})(N);export{A as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e,{useContext as I,useState as C,useEffect as B}from"react";import{EditFilled as w}from"@ant-design/icons";import{ToolIcons as L}from"../ToolIcons.js";import{cTool as j}from"@labelbee/lb-annotation";import{PointCloudContext as b}from"../../../../components/pointCloudView/PointCloudContext.js";import{Divider as E,Tag as _,Input as A,Select as T,message as v}from"antd";import F from"../../../../utils/StepUtils.js";import{connect as V}from"react-redux";import{jsonParser as N}from"../../../../utils/index.js";import{useStatus as U}from"../../../../components/pointCloudView/hooks/useStatus.js";import{useSingleBox as h}from"../../../../components/pointCloudView/hooks/useSingleBox.js";import{useTranslation as k}from"react-i18next";import{LabelBeeContext as M}from"../../../../store/ctx.js";import z from"./components/batchUpdateModal/index.js";import{PointCloudUtils as W}from"@labelbee/lb-utils";import P from"../../../../components/attributeList/index.js";import{useAttribute as O}from"../../../../components/pointCloudView/hooks/useAttribute.js";const R=({imgList:n,imgIndex:u})=>{const c=I(b),[a,m]=C([]),{t:i}=k();B(()=>{const r=n;let o=new Map;m(W.getAllPointCloudResult({imgList:r,extraBoxList:f,ignoreIndexList:[u]}).filter(l=>!l.trackID||o.get(l.trackID)?!1:(o.set(l.trackID,!0),!0)).sort((l,s)=>{var d,t;const x=(d=l==null?void 0:l.trackID)!=null?d:0,g=(t=s==null?void 0:s.trackID)!=null?t:0;return x-g}).map(l=>{var s;return(s=l==null?void 0:l.trackID)!=null?s:0}))},[c.pointCloudBoxList,n]);const{pointCloudBoxList:f}=c;return e.createElement("div",{style:{padding:24,borderBottom:"1px solid #eee"}},e.createElement("div",{style:{marginBottom:16}},i("AllTrackIDs")),e.createElement("div",null,a.map(r=>e.createElement(_,{color:"#F3F4FF",key:r,style:{color:"#666",marginBottom:8}},r))))},$=()=>{const[n,u]=C(!1),{pointCloudBoxList:c}=I(b),{selectedBox:a,updateSelectedBox:m}=h(),[i,f]=C(""),{t:r}=k(),o=a==null?void 0:a.info.trackID,l=d=>!!c.find(x=>x.trackID===d&&x.id!==(a==null?void 0:a.info.id)),s=(d=!1)=>{const t=parseInt(i,10);if(d&&u(!1),isNaN(t)){v.error(r("PositiveIntegerCheck"));return}if(i.indexOf(".")>-1){v.error(r("NotAllowDecimalPointsInTrackID"));return}if(l(t)){v.error(r("DuplicateTrackIDsExist"));return}if(!(t>0)){v.error(r("PositiveIntegerCheck"));return}m({trackID:t})};return B(()=>{u(!1)},[o]),e.createElement("div",{style:{padding:24}},e.createElement("div",{style:{marginBottom:16,display:"flex",justifyContent:"space-between",alignItems:"center"}},e.createElement("span",null,r("CurrentBoxTrackIDs")),o&&e.createElement(z,{id:o})),e.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},n&&o?e.createElement(A,{defaultValue:o,onChange:d=>{f(d.target.value)},disabled:!o,size:"small",onBlur:()=>{s()},onPressEnter:()=>{s(!0)}}):e.createElement("span",null,o),e.createElement(w,{style:{color:"#999",marginLeft:16,cursor:typeof o!="undefined"?"pointer":"not-allowed"},onClick:()=>{o&&u(!n)}})))},q=({attributeList:n,subAttributeList:u,toolInstance:c})=>{const{selectedBox:a}=h(),m=I(b),{t:i}=k(),{defaultAttribute:f}=O(),r={fontWeight:500,fontSize:14,margin:"12px 0 8px 20px"},o={margin:"12px 20px 8px",fontSize:14,fontWeight:500,wordWrap:"break-word"},l=t=>{c.setDefaultAttribute(t)},s=(t,x)=>{c.setSubAttribute(t,x)},d=n.map(t=>({label:t.key,value:t.value,color:t==null?void 0:t.color}));return e.createElement("div",null,e.createElement("div",{style:r},i("Attribute")),e.createElement(P,{list:d,forbidDefault:!0,selectedAttribute:f!=null?f:"",attributeChanged:t=>l(t)}),e.createElement(E,{style:{margin:0}}),a&&e.createElement(e.Fragment,null,u.map(t=>{var x,g,y,D,S;return(t==null?void 0:t.subSelected)&&e.createElement("div",{style:{marginTop:12},key:t.value},e.createElement("div",{style:o},i("SubAttribute"),"-",t.key),((x=t.subSelected)==null?void 0:x.length)<5?e.createElement(P,{list:t.subSelected.map(p=>({label:p.key,value:p.value})),selectedAttribute:(y=(g=m.selectedPointCloudBox)==null?void 0:g.subAttribute)==null?void 0:y[t.value],num:"-",forbidColor:!0,forbidDefault:!0,attributeChanged:p=>s(t.value,p),style:{marginBottom:12}}):e.createElement(T,{style:{margin:"0px 21px 17px 16px",width:"87%"},value:(S=(D=m.selectedPointCloudBox)==null?void 0:D.subAttribute)==null?void 0:S[t.value],placeholder:i("PleaseSelect"),onChange:p=>s(t.value,p),allowClear:!0},t.subSelected.map(p=>e.createElement(T.Option,{key:p.value,value:p.value},p.key))),e.createElement(E,{style:{margin:0}}))})))},G=({stepInfo:n,toolInstance:u,imgList:c,imgIndex:a})=>{var m,i;const{updatePointCloudPattern:f,pointCloudPattern:r}=U(),o=N(n.config),l=(m=o==null?void 0:o.attributeList)!=null?m:[],s=(o==null?void 0:o.secondaryAttributeConfigurable)===!0?(i=o==null?void 0:o.inputList)!=null?i:[]:[];return e.createElement(e.Fragment,null,e.createElement(L,{toolName:j.EPointCloudName.PointCloud,selectedToolName:r,onChange:d=>f==null?void 0:f(d)}),(o==null?void 0:o.trackConfigurable)===!0&&e.createElement(e.Fragment,null,e.createElement(R,{imgList:c,imgIndex:a}),e.createElement($,null),e.createElement(E,{style:{margin:0}})),e.createElement(q,{toolInstance:u,attributeList:l,subAttributeList:s}))},H=n=>{var u,c,a;const m=F.getCurrentStepInfo((u=n.annotation)==null?void 0:u.step,(c=n.annotation)==null?void 0:c.stepList),i=(a=n.annotation)==null?void 0:a.toolInstance;return{stepInfo:m,toolInstance:i,imgList:n.annotation.imgList,imgIndex:n.annotation.imgIndex}};var J=V(H,null,null,{context:M})(G);export{J as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e,{useState as n}from"react";import{Slider as p}from"antd";import u from"../../../../assets/attributeIcon/pen_a.svg.js";import g from"../../../../assets/attributeIcon/pen.svg.js";import S from"../../../../assets/attributeIcon/eraser_a.svg.js";import E from"../../../../assets/attributeIcon/eraser.svg.js";import{getClassName as r}from"../../../../utils/dom.js";import{EScribblePattern as t}from"../../../../data/enums/ToolType.js";import{useSelector as f}from"../../../../store/ctx.js";const v=m=>{const{onChange:b}=m,s=f(a=>a.annotation.toolInstance),[i,d]=n(20),[l,o]=n(t.Scribble),c=()=>{b(l,i)};return e.createElement("div",{className:r("scribble")},e.createElement("div",{className:r("scribble","select")},e.createElement("img",{src:l===t.Scribble?u:g,onClick:()=>{o(t.Scribble),s==null||s.setPattern(t.Scribble),c()}}),e.createElement("img",{src:l===t.Erase?S:E,onClick:()=>{o(t.Erase),s==null||s.setPattern(t.Erase),c()}})),e.createElement("div",{className:r("scribble","silder")},e.createElement("span",{className:r("scribble","circle")}),e.createElement(p,{onChange:a=>{d(a),c(),s==null||s.setPenSize(a)},min:1,max:50,style:{width:"60%"},value:i}),e.createElement("span",{className:r("scribble","circle"),style:{width:"10px",height:"10px"}})))};export{v as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import f,{useState as d,useRef as p,useEffect as v}from"react";import{connect as S}from"react-redux";import A from"../../../../components/attributeList/index.js";import g from"../../../../utils/StepUtils.js";import{jsonParser as I}from"../../../../utils/index.js";import{useTranslation as x}from"react-i18next";import{EToolName as L}from"../../../../data/enums/ToolType.js";import{LabelBeeContext as h}from"../../../../store/ctx.js";const T=t=>{var o;const[c,l]=d(0),i=p(null),{toolInstance:e}=t,{t:b}=x();if(v(()=>(e&&e.singleOn("changeAttributeSidebar",a=>{var s;l(n=>n+1),!!i.current&&((s=i.current.children[a])==null||s.scrollIntoView({block:"center"}))}),()=>{e==null||e.unbindAll("changeAttributeSidebar")}),[e,i]),!t.stepInfo)return null;const r=I(t.stepInfo.config),u=t.stepInfo.tool===L.ScribbleTool;if(r.attributeConfigurable!==!0&&!u)return null;if((r.attributeConfigurable===!0||u)&&(r==null?void 0:r.attributeList)){const a=r.attributeList.map(n=>({label:n.key,value:n.value,color:n==null?void 0:n.color}));u||a.unshift({label:b("NoAttribute"),value:""});const s=n=>{e.setDefaultAttribute(n),l(m=>m+1)};return f.createElement("div",null,f.createElement(A,{list:a,attributeChanged:s,selectedAttribute:(o=e==null?void 0:e.defaultAttribute)!=null?o:"",ref:i,forbidDefault:u}))}return null},j=t=>{var o,c;const l=g.getCurrentStepInfo((o=t.annotation)==null?void 0:o.step,(c=t.annotation)==null?void 0:c.stepList);return{toolInstance:t.annotation.toolInstance,stepInfo:l}};var C=S(j,null,null,{context:h})(T);export{C as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import K from"../../../../components/attributeList/index.js";import M from"../../../../components/checkboxList/index.js";import{CaretRightOutlined as P}from"@ant-design/icons";import{Collapse as T,Tooltip as H,Badge as x}from"antd/es";import{cloneDeep as F}from"lodash";import n,{useState as p,useRef as U,useEffect as v,useCallback as q}from"react";import z from"../../../../assets/annotation/common/icon_clearSmall.svg.js";import G from"../../../../assets/annotation/common/icon_clearSmall_a.svg.js";import{TagUtils as J}from"@labelbee/lb-annotation";import{connect as Q}from"react-redux";import{useTranslation as V}from"react-i18next";import{LabelBeeContext as W}from"../../../../store/ctx.js";const{Panel:X}=T,$=({isActive:a})=>n.createElement(P,{rotate:a?90:0}),Y=({toolInstance:a,imgIndex:N})=>{const[o,g]=p([]),i=U(null),[,j]=p(0),[w,f]=p(-1),{t:b}=V();v(()=>{a&&(g(a.config.inputList.map(e=>e.value)),a.singleOn("render",()=>{j(e=>e+1)}))},[a]),v(()=>{if(a&&(a.singleOn("expend",O),a.labelSelectedList.length===1)){let e=0;for(let l=0;l<a.labelSelectedList[0];l++)e+=46,s[l]&&o[l]!==""&&s[l].subSelected.forEach(r=>{e+=40});i.current&&(i.current.children[0].scrollTop=e)}}),v(()=>{i.current&&(i.current.children[0].scrollTop=0)},[N]);const O=()=>{var e;const l=a.labelSelectedList[0],r=(e=s.filter((t,m)=>m===l)[0])==null?void 0:e.value;h(l,r,!0)},h=q((e,l,r)=>{const t=F(o);t[e]===""||r===!0?t[e]=l:t[e]="",g(t)},[o]);if(!a)return null;const{labelSelectedList:c,config:{inputList:s},currentTagResult:u,setLabel:E}=a,A=e=>c.length>0&&c[0]===e?n.createElement("span",{className:"keyDownIconActive"},e+1):n.createElement("span",{className:"keyDownIcon"},e+1),y=(e,l=-1)=>e?e.map((r,t)=>{var m,L,k,_,C;if(r.subSelected){const R=J.judgeResultIsInInputList(r.value,(m=u==null?void 0:u.result)==null?void 0:m[r.value],s);return n.createElement(T,{bordered:!1,expandIcon:$,key:`collapse_${t}_${l+1}`,onChange:()=>h(t,r.value),activeKey:[o[t]]},n.createElement(X,{header:n.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flex:1}},n.createElement("span",null,r.key,n.createElement(H,{placement:"bottom",title:b("ClearThisOption")},n.createElement("img",{style:{marginLeft:5,cursor:"pointer"},onClick:D=>{D.stopPropagation(),a.clearResult(!0,r.value)},src:w===t||R?G:z,onMouseEnter:()=>{f(t)},onMouseLeave:()=>{f(-1)}})),R&&o[t]===""&&n.createElement(x,{color:"#87d068"})),(s==null?void 0:s.length)>1&&A(t)),key:r.value},n.createElement("div",{className:"level",style:{backgroundColor:c.length>0&&c[0]===t?"rgba(158, 158, 158, 0.18)":""}},y(r.subSelected,t))))}const d=(s==null?void 0:s[l])?s==null?void 0:s[l].value:0,S=((_=(k=(L=u==null?void 0:u.result)==null?void 0:L[d])==null?void 0:k.split(";"))==null?void 0:_.indexOf(r.value))>-1?r.value:"";return((C=s==null?void 0:s[l])==null?void 0:C.isMulti)===!0?n.createElement("div",{className:"singleBar",key:`${d}_${l}_${t}`},n.createElement(M,{attributeChanged:()=>E(l,t),selectedAttribute:[S],list:[{value:r.value,label:r.key}],num:t+1})):n.createElement("div",{className:"singleBar",key:`${d}_${l}_${t}`},n.createElement(K,{forbidColor:!0,attributeChanged:()=>E(l,t),selectedAttribute:S,list:[{value:r.value,label:r.key}],num:t+1}))}):null,B=window.innerHeight-61-80;return n.createElement("div",{className:"tagOperationMenu",ref:i},(s==null?void 0:s.length)===0?n.createElement("div",{style:{padding:20,textAlign:"center"}},b("NoConfiguration")):n.createElement("div",{className:"main",style:{height:B}},y(s)))};function Z(a){return{toolInstance:a.annotation.toolInstance,imgIndex:a.annotation.imgIndex}}var I=Q(Z,null,null,{context:W})(Y);export{I as default,$ as expandIconFuc};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{TEXT_ATTRIBUTE_MAX_LENGTH as m}from"../../../../data/enums/ToolType.js";import{TextUtils as C}from"../../../../utils/TextUtils.js";import{Tooltip as k,message as i,Input as A}from"antd/es";import t,{useState as r,useEffect as f}from"react";import I from"../../../../assets/annotation/common/icon_clearSmall_a.svg.js";import _ from"../../../../assets/annotation/common/icon_clearSmall.svg.js";import{classnames as T}from"../../../../utils/index.js";import{useTranslation as F}from"react-i18next";const L=v=>{const{t:n}=F(),{onChange:o,textValue:a,checkString:u,textCheckType:h}=v,[p,s]=r(0),[l,c]=r(!1),[g,x]=r(!1),[d,E]=r(!1),y=t.createElement("a",null,t.createElement(k,{placement:"bottom",title:n("EmptyTextInput")},t.createElement("img",{onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),style:{marginLeft:6},src:d?I:_,onClick:e=>{e.stopPropagation(),o("")}}))),N=e=>{e.stopPropagation()};f(()=>{a&&s(a.length)},[]),f(()=>{var e;if(a===void 0||a==="")c(!1);else try{a&&c(!new RegExp(u).test(a))}catch(j){c(!0),i.destroy(),i.error(n("RegularExpIncorrectly"))}s((e=a==null?void 0:a.length)!=null?e:0)},[a]);const w=e=>{if(l||!new RegExp(u).test(e.target.value))return o(""),i.error(C.getErrorNotice(h)),!0;o(e.target.value,!0)};return t.createElement("div",{className:"textInputContainer"},t.createElement("div",{className:"label"},n("TextInput"),y),t.createElement("div",{className:T({textareaContainer:!0,focus:g})},t.createElement("div",{className:T({toolTextAreaBox:!0,toolTextAreaBoxFocus:g})},t.createElement(A.TextArea,{style:{resize:"none",height:120,wordBreak:"break-all"},maxLength:m,onKeyDownCapture:e=>{e.stopPropagation()},onKeyUpCapture:e=>{e.stopPropagation()},onChange:e=>{o(e.target.value),s(e.target.value.length)},onFocus:e=>x(!0),onBlur:e=>{w(e),x(!1)},value:a,onKeyDown:N,className:l?"warning":""}),t.createElement("div",{className:"textAreaFooter"},t.createElement("span",{className:"wordCount"},t.createElement("span",{className:p>m||l?"warning":""},p),"/",t.createElement("span",null,m))))))};export{L as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import n,{useState as d,useEffect as _,useRef as K}from"react";import{connect as R}from"react-redux";import{cloneDeep as j}from"lodash";import{classnames as C}from"../../../../utils/index.js";import{Input as D}from"antd/es";import{cKeyCode as $}from"@labelbee/lb-annotation";import{PageForward as q}from"../../../../store/annotation/actionCreators.js";import{ConfigUtils as B}from"../../../../utils/ConfigUtils.js";import{useTranslation as U}from"react-i18next";import{LabelBeeContext as M}from"../../../../store/ctx.js";var z=Object.defineProperty,I=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,S=(e,t,a)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,G=(e,t)=>{for(var a in t||(t={}))V.call(t,a)&&S(e,a,t[a]);if(I)for(var a of I(t))W.call(t,a)&&S(e,a,t[a]);return e};const L=$.default,F=e=>{e.stopPropagation(),e.nativeEvent.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},O=e=>{const{textareaProps:t,footer:a}=e;return n.createElement(n.Fragment,null,n.createElement(D.TextArea,G({bordered:!1,rows:6,onKeyDown:F,onKeyUp:F},t)),n.createElement("div",{className:C({textAreaLength:!0})},a))},k=e=>{var t;const a=K(null),[x,c]=d(!1),[w,g]=d(!1),{t:u}=U(),{disabled:l,config:i,result:v,updateText:E,index:T,switchToNextTextarea:h,hasMultiple:P,onNext:p}=e,{maxLength:m}=i,f=v?v[i.key]:"",b=(t=f==null?void 0:f.length)!=null?t:0,N=o=>{E&&(E(o,i.key),i.required&&g(!o))},y=P&&h,r={id:`textInput-${T}`,ref:a,disabled:l,value:f,maxLength:m,autoSize:{minRows:2,maxRows:6},onChange:o=>{const A=o.target.value;N(A)},onFocus:()=>{c(!0)},onBlur:o=>{c(!1),i.required&&g(!o.target.value)},style:{resize:"none",wordBreak:"break-all"},onKeyDownCapture:o=>{o.ctrlKey&&o.keyCode===L.Enter&&(p&&p(),o.preventDefault()),o.keyCode===L.Tab&&y&&(o.preventDefault(),o.nativeEvent.stopImmediatePropagation(),h(T)),o.nativeEvent.stopPropagation()}},s=n.createElement("div",{className:"textAreaFooter"},n.createElement("div",{className:"hotkeyTip"},y&&n.createElement("span",null,`[${u("Switch")}]Tab`),n.createElement("span",null,`[${u("TurnPage")}]Ctrl+Enter`)),n.createElement("div",{className:"wordCount"},n.createElement("span",{className:b>=m?"warning":""},b),"/",n.createElement("span",null,m)));return _(()=>{l&&c(!1)},[l]),n.createElement("div",{className:"textField"},n.createElement("div",{className:"label"},n.createElement("span",{className:C({required:i.required})},i.label),n.createElement("i",{className:C({clearText:!0,disabled:l}),onClick:()=>{l||N("")}})),n.createElement("div",{className:C({disabled:l,"textarea-outline":!0,"ant-input-focused":x,textareaContainer:!0,focus:x,invalid:w})},n.createElement(O,{footer:s,textareaProps:r})))},H=({toolInstance:e,imgIndex:t,dispatch:a,triggerEventAfterIndexChanged:x,step:c,stepList:w,basicResultList:g})=>{var u,l;const[i,v]=d([]),[E,T]=d(0),[,h]=d(0),P=r=>{const s=(r+1)%i.length;p(s)},p=r=>{setTimeout(()=>{const s=document.getElementById(`textInput-${r}`);s&&(T(r),s.focus(),s.select(),s.scrollIntoView({behavior:"smooth",block:"center"}))})};_(()=>{e&&(v(j(e.config.configList)),e.singleOn("valueUpdated",()=>{h(r=>r+1)}))},[e]);const m=(r,s)=>{e.updateTextValue(s,r)};_(()=>{t>-1&&x&&p(0)},[t]);const f=(l=(u=e.textList[0])==null?void 0:u.value)!=null?l:{},b=()=>{a(q(!0))},y=B.getStepConfig(w,c).dataSourceStep>0&&g.length===0;return n.createElement("div",{className:"textToolOperationMenu"},i.map((r,s)=>n.createElement(k,{config:r,key:r.key,index:s,result:f,updateText:m,switchToNextTextarea:P,hasMultiple:i.length>1,focus:E===s,onNext:b,disabled:y})))};function J(e){return{toolInstance:e.annotation.toolInstance,imgIndex:e.annotation.imgIndex,step:e.annotation.step,basicResultList:e.annotation.basicResultList,stepList:e.annotation.stepList,triggerEventAfterIndexChanged:e.annotation.triggerEventAfterIndexChanged}}var Q=R(J,null,null,{context:M})(H);export{k as SingleTextInput,O as TextareaWithFooter,Q as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{EToolName as e}from"../../../data/enums/ToolType.js";import t from"react";import{sidebarCls as s}from"./index.js";import p from"../../../assets/annotation/lineTool/icon_line.svg.js";import v from"../../../assets/annotation/lineTool/icon_line_a.svg.js";import _ from"../../../assets/annotation/pointTool/icon_point.svg.js";import d from"../../../assets/annotation/pointTool/icon_point_a.svg.js";import N from"../../../assets/annotation/polygonTool/icon_polygon_a.svg.js";import T from"../../../assets/annotation/polygonTool/icon_polygon.svg.js";import u from"../../../assets/annotation/rectTool/icon_rect.svg.js";import f from"../../../assets/annotation/rectTool/icon_rect_a.svg.js";import{cTool as S}from"@labelbee/lb-annotation";import $ from"classnames";import{useTranslation as j}from"react-i18next";const{EPointCloudName:E,TOOL_NAME:y,TOOL_NAME_EN:O}=S,m=[{toolName:e.Rect,commonSvg:u,selectedSvg:f},{toolName:e.Polygon,commonSvg:T,selectedSvg:N},{toolName:e.Line,commonSvg:p,selectedSvg:v},{toolName:e.Point,commonSvg:_,selectedSvg:d}],P=n=>n==="en"?O:y,L=({toolName:n,selectedToolName:r,onChange:l})=>{const{i18n:c}=j(),i=m==null?void 0:m.filter(o=>n===E.PointCloud?[e.Polygon,e.Rect,e.Point,e.Line].includes(o==null?void 0:o.toolName):(o==null?void 0:o.toolName)===n),g=i.length>1;return t.createElement("div",{className:`${s}__level`},i.map(o=>{const a=g&&r===o.toolName;return t.createElement("span",{className:`${s}__toolOption`,key:o.toolName,onClick:()=>l==null?void 0:l(o.toolName)},t.createElement("img",{className:`${s}__singleTool`,src:a?o==null?void 0:o.selectedSvg:o==null?void 0:o.commonSvg}),t.createElement("span",{className:$({[`${s}__toolOption__selected`]:a})},P(c.language)[o.toolName]))}))};export{L as ToolIcons};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Slider as v}from"antd/es";import o from"react";import g from"../../../../assets/toolStyle/icon_border.svg.js";import b from"../../../../assets/toolStyle/icon_borderColor.svg.js";import S from"../../../../assets/toolStyle/icon_opacityStroke.svg.js";import h from"../../../../assets/toolStyle/icon_opacityFill.svg.js";import{connect as k}from"react-redux";import{UpdateToolStyleConfig as O}from"../../../../store/toolStyle/actionCreators.js";import{store as w}from"../../../../index.js";import{LabelBeeContext as C}from"../../../../store/ctx.js";import{useTranslation as x}from"react-i18next";const T=(e,a)=>{const c=[{step:1,value:"1"},{step:2,value:"2"},{step:3,value:"3"},{step:4,value:"4"},{step:5,value:"5"}],n=[{step:1,value:"Blue"},{step:3,value:"Cyan"},{step:5,value:"Green"},{step:7,value:"Yellow"},{step:9,value:"Pink"}],i=[{step:1,value:"0.2"},{step:3,value:"0.4"},{step:5,value:"0.6"},{step:7,value:"0.8"},{step:9,value:"1.0"}],p=[{step:1,value:"0"},{step:3,value:"0.2"},{step:5,value:"0.4"},{step:7,value:"0.6"},{step:9,value:"0.8"}];let r=[];const l={};switch(e){case"width":r=c;break;case"color":r=n;break;case"borderOpacity":r=i;break;case"fillOpacity":r=p;break}return r.forEach(({step:s,value:u})=>{l[s]={style:{color:"#999999",fontSize:"12px"},label:o.createElement("span",null,a(u))}}),l},j=e=>{switch(e){case"width":return"BorderThickness";case"color":return"Color";case"borderOpacity":return"BorderOpacity";case"fillOpacity":return"FillOpacity";default:return""}},E=e=>{switch(e){case"width":return g;case"color":return b;case"borderOpacity":return S;case"fillOpacity":return h}},M=e=>{switch(e){case"width":return 2;case"color":return 1;case"borderOpacity":return 9;case"fillOpacity":return 9}},y=e=>["width"].includes(e),N=e=>{const{toolStyle:a}=e,{width:c,color:n,borderOpacity:i,fillOpacity:p}=a,r={width:c,color:n,borderOpacity:i,fillOpacity:p},{t:l}=x(),s=e.config,u=m=>{w.dispatch(O(m))};return o.createElement("div",{className:"toolStyle"},Object.entries(r).map(m=>{var d;const t=m[0];return(s==null?void 0:s.attributeConfigurable)===!0&&t==="color"?null:o.createElement("div",{id:`style-${t}`,className:"styleSlider",key:t},o.createElement("span",{className:"title"},o.createElement("img",{src:E(t),className:"icon"}),l(j(t))),o.createElement("span",{className:"slider"},o.createElement(v,{tipFormatter:null,max:y(t)?5:10,min:y(t)?1:0,step:y(t)?1:null,value:(d=a[t])!=null?d:M(t),marks:T(t,l),onChange:f=>u({[t]:f})})))}))},_=({toolStyle:e,annotation:a})=>({toolStyle:e,config:a.toolInstance.config});var $=k(_,null,null,{context:C})(N);export{$ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{prefix as y}from"../../../constant/index.js";import{EToolName as n}from"../../../data/enums/ToolType.js";import P from"../../../utils/StepUtils.js";import{Collapse as m}from"antd/es";import e from"react";import{useTranslation as h}from"react-i18next";import L from"./AnnotationText/index.js";import O from"./ClearIcon/index.js";import R,{PointCloudOperation as x}from"./GeneralOperation/index.js";import w from"./ImgAttributeInfo/index.js";import z from"./SwitchAttributeList/index.js";import s,{expandIconFuc as N}from"./TagSidebar/index.js";import g from"./TextToolSidebar/index.js";import I from"./PointCloudToolSidebar/index.js";import B from"./ToolStyle/index.js";import{cTool as G}from"@labelbee/lb-annotation";import K from"./ScribbleSidebar/index.js";import{ToolIcons as U}from"./ToolIcons.js";import{useSelector as V}from"../../../store/ctx.js";const{EVideoToolName:k,EPointCloudName:F}=G,{Panel:j}=m,t=`${y}-sidebar`,q=({sider:r})=>{const d=V(l=>P.getCurrentStepInfo(l.annotation.step,l.annotation.stepList)),o=d==null?void 0:d.tool,{t:u}=h();if(!o)return null;const v=l=>{const S=e.createElement(B,null);return e.createElement(j,{header:u("Style"),className:"panel",key:l},S)},p=e.createElement(U,{toolName:o,onChange:()=>{}}),i=e.createElement(z,null),f=e.createElement(L,null),E=e.createElement(m,{defaultActiveKey:["1","imgAttribute"],bordered:!1,expandIconPosition:"right",className:`${t}__content`,expandIcon:N},v("1")),b=e.createElement(m,{defaultActiveKey:["1","imgAttribute"],bordered:!1,expandIconPosition:"right",className:`${t}__content`,expandIcon:N},e.createElement(j,{header:e.createElement("div",null,u("Adjust"),e.createElement(O,null)),className:"panel",key:"imgAttribute"},e.createElement(w,null))),a=e.createElement(R,null),C=e.createElement(s,null),$=e.createElement(g,null),T=e.createElement(K,{onChange:(l,S)=>{}}),c=e.createElement("div",{className:`${t}__horizontal`}),_=e.createElement(I,null),A=e.createElement(x,null);return r?typeof r=="function"?e.createElement("div",{className:`${t}`},r({toolIcon:p,attributeList:i,annotationText:f,toolStyle:E,imageAttributeInfo:b,operation:a,tagToolSideBar:C,textToolSideBar:$,horizontal:c,pointCloudToolSidebar:_,pointCloudOperation:A,scribbleSidebar:T})):r:[n.Rect,n.Point,n.Line,n.Rect,n.Polygon,n.Cuboid].includes(o)?e.createElement("div",{className:`${t}`},p,c,i,f,c,e.createElement("div",{className:`${t}__content`},E,b),a):o===n.Tag?e.createElement("div",{className:`${t}`},e.createElement(s,null)):o===k.VideoTagTool?e.createElement("div",{className:`${t}`},e.createElement("div",{className:`${t}__content`},e.createElement(s,null)),a):o===n.Text?e.createElement("div",{className:`${t}`},e.createElement(g,null)):o===F.PointCloud?e.createElement("div",{className:`${t}`},e.createElement("div",{className:`${t}__content`},e.createElement(I,null)),e.createElement(x,null)):o===n.ScribbleTool?e.createElement("div",{className:`${t}`},e.createElement("div",{className:`${t}__content`},T,i),a):null};export{q as default,t as sidebarCls};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{PointCloudContext as f}from"../../../../components/pointCloudView/PointCloudContext.js";import{Modal as K}from"antd";import t,{useContext as y,useMemo as _,useState as W}from"react";import{stepConfigSelector as q}from"../../../../store/annotation/selectors.js";import{useSelector as O}from"../../../../store/ctx.js";import{i18n as P}from"@labelbee/lb-utils";import{UnorderedListOutlined as w,PushpinFilled as b,EyeInvisibleFilled as z,EyeFilled as J,CaretDownFilled as Q,DeleteOutlined as X}from"@ant-design/icons";import{useHistory as Y}from"../../../../components/pointCloudView/hooks/useHistory.js";import{getClassName as c}from"../../../../utils/dom.js";import Z from"../../../../utils/StepUtils.js";import{EPointCloudName as tt}from"@labelbee/lb-annotation";import{useTranslation as k}from"react-i18next";import et from"../FooterPopover.js";var nt=Object.defineProperty,ot=Object.defineProperties,rt=Object.getOwnPropertyDescriptors,F=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,it=Object.prototype.propertyIsEnumerable,S=(e,o,n)=>o in e?nt(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,N=(e,o)=>{for(var n in o||(o={}))lt.call(o,n)&&S(e,n,o[n]);if(F)for(var n of F(o))it.call(o,n)&&S(e,n,o[n]);return e},j=(e,o)=>ot(e,rt(o));const at=({attribute:e})=>{const o=y(f),{pointCloudBoxList:n,pointCloudSphereList:i,hideAttributes:u,toggleAttributesVisible:m,polygonList:a,setPolygonList:C,lineList:d,setLineList:s,setPointCloudResult:I,setPointCloudSphereList:R,reRender:D,selectSpecAttr:B}=o,[L,H]=W(!0),{pushHistoryWithList:V}=Y(),h=[...n,...a,...i,...d].filter(r=>r.attribute===e.value),x=()=>{m(e.value)},$=u.includes(e.value),G=({trackID:r,order:l})=>r||l,T=({trackID:r,order:l})=>r?`trackID_${r}`:`order_${l}`,U=r=>{if(h.length===0)return;const l=a.filter(p=>r!==p.attribute),v=n.filter(p=>r!==p.attribute),E=d.filter(p=>r!==p.attribute),A=i.filter(p=>r!==p.attribute);D(v,l,A,E),C(l),I(v),R(A),s(E),V({pointCloudBoxList:v,polygonList:l,lineList:E})},M=r=>{K.confirm({content:P.t("onDeleteGraphByAttr",{attribute:r.key}),onOk:()=>{U(r.value)},okText:P.t("Confirm"),cancelText:P.t("Cancel")})};return t.createElement(t.Fragment,null,t.createElement("div",{className:c("annotated-attribute","item")},$?t.createElement(z,{onClick:x}):t.createElement(J,{onClick:x}),t.createElement(Q,{rotate:L?0:270,onClick:()=>{H(!L)}}),t.createElement("span",{className:c("annotated-attribute","item","text"),onClick:()=>{B(e.value)}},e.key),t.createElement(X,{onClick:()=>M(e)})),L&&h.map((r,l)=>t.createElement("div",{key:T(j(N({},r),{order:l})),style:{paddingLeft:54}},`${G(j(N({},r),{order:l}))}.${e.key}`)))},g=()=>{const e=O(q),{attrPanelLayout:o,setAttrPanelLayout:n,pointCloudBoxList:i,polygonList:u,lineList:m}=y(f),{t:a}=k(),C=_(()=>[...i,...u,...m].map(s=>s.attribute),[i,u,m]),d=_(()=>e.attributeList.filter(s=>C.includes(s.value)),[C]);return t.createElement("div",{className:c("annotated-attribute")},o?t.createElement("div",{className:c("annotated-attribute","text")},t.createElement("span",null,a("AnnotatedResult")),t.createElement("span",{className:c("annotated-attribute","pin"),onClick:()=>{n("")}},t.createElement(b,null),a("CancelFixed"))):t.createElement("div",{className:c("annotated-attribute","text")},t.createElement("span",{onClick:()=>{n("left")},className:c("annotated-attribute","pin")},t.createElement(b,null),a("FixedOnLeft")),t.createElement("span",{onClick:()=>{n("right")},className:c("annotated-attribute","pin")},t.createElement(b,null),a("FixedOnRight"))),t.createElement("div",null,d.length>0?d.map(s=>t.createElement(at,{attribute:s,key:s.value})):t.createElement("div",{style:{textAlign:"center",height:200,lineHeight:"200px"}},a("NoData"))))},st=()=>{const{attrPanelLayout:e}=y(f);return e==="left"?t.createElement(g,null):null},ct=()=>{const{attrPanelLayout:e}=y(f);return e==="right"?t.createElement(g,null):null},ut=()=>{const{attrPanelLayout:e}=y(f),{t:o}=k(),n=O(i=>{var u,m;return Z.getCurrentStepInfo((u=i==null?void 0:i.annotation)==null?void 0:u.step,(m=i.annotation)==null?void 0:m.stepList)});return(n==null?void 0:n.tool)!==tt.PointCloud||e?null:t.createElement(et,{hoverIcon:t.createElement(w,{style:{marginRight:4}}),icon:t.createElement(w,{style:{marginRight:4}}),title:o("AnnotatedList"),content:t.createElement(g,null)})};export{ut as AnnotatedAttributesIcon,g as AnnotatedAttributesPanel,st as AnnotatedAttributesPanelFixedLeft,ct as AnnotatedAttributesPanelFixedRight};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t,{useState as c}from"react";import{Popover as p}from"antd";const i=({source:e})=>typeof e=="string"?t.createElement("img",{src:e,width:14,height:14,style:{marginRight:4}}):e,u=({hoverIcon:e,icon:s,containerStyle:a,content:r,title:n})=>{const[l,o]=c(!1),m=t.createElement(i,{source:l&&e!=null?e:s});return t.createElement(p,{placement:"topLeft",content:r,onMouseMove:()=>{o(!0)},onMouseLeave:()=>{o(!1)},overlayClassName:"tool-hotkeys-popover",className:"tipsBar"},t.createElement("div",{className:"shortCutTitle",onMouseMove:()=>o(!0),onMouseLeave:()=>o(!1),style:a},t.createElement("a",{className:"svg"},m,n)))};export{u as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import n from"../../../../../../assets/annotation/toolHotKeyIcon/icon_cencel_kj.svg.js";import s from"../../../../../../assets/annotation/toolHotKeyIcon/icon_reform_kj.svg.js";import e from"../../../../../../assets/annotation/toolHotKeyIcon/icon_loupe_kj.svg.js";import i from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_middle_kj.svg.js";import a from"../../../../../../assets/annotation/toolHotKeyIcon/icon_fullView_kj.svg.js";import c from"../../../../../../assets/annotation/toolHotKeyIcon/icon_reload_kj.svg.js";import r from"../../../../../../assets/annotation/toolHotKeyIcon/setValid.svg.js";import m from"../../../../../../assets/annotation/toolHotKeyIcon/icon_last_kj.svg.js";import l from"../../../../../../assets/annotation/toolHotKeyIcon/icon_next_kj.svg.js";import o from"../../../../../../assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js";import g from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js";import t from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js";import _ from"../../../../../../assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js";import j from"../../../../../../assets/annotation/toolHotKeyIcon/icon_alttab_kj.svg.js";import f from"../../../../../../assets/annotation/toolHotKeyIcon/icon_save_kj.svg.js";import u from"../../../../../../assets/annotation/toolHotKeyIcon/icon_lineSpecial_kj.svg.js";import h from"../../../../../../assets/annotation/toolHotKeyIcon/icon_noDisplay.svg.js";import p from"../../../../../../assets/annotation/toolHotKeyIcon/icon_playPause.svg.js";import v from"../../../../../../assets/annotation/toolHotKeyIcon/icon_forward_kj.svg.js";import d from"../../../../../../assets/annotation/toolHotKeyIcon/icon_back_kj.svg.js";import C from"../../../../../../assets/annotation/toolHotKeyIcon/icon_speed_kj.svg.js";const I={name:"Undo",icon:n,shortCut:["Ctrl","Z"]},y={name:"Redo",icon:s,shortCut:["Ctrl","Shift","Z"]},H={name:"Scale",icon:e,shortCut:[i]},k={name:"Fullscreen",icon:a,shortCut:["F11"]},K={name:"Rotate",icon:c,shortCut:["R"],noticeInfo:"ToOriginalStep"},$={name:"ToggleEffectiveness",icon:r,shortCut:["Y"]},S={name:"PreviousImage",icon:m,shortCut:["A"]},b={name:"NextImage",icon:l,shortCut:["D"]},w={name:"Drag",icon:o,shortCut:[g],noticeInfo:"Press"},R={name:"Drag",icon:o,shortCut:["Space",t]},T={name:"ToggleSelected",icon:_,shortCut:["Tab"]},P={name:"ToggleSelectedReverse",icon:j,shortCut:["Shift","Tab"]},F={name:"HideGraphics",icon:h,noticeInfo:"",shortCut:["Z"]},D={name:"ToggleLineParticularity",icon:u,noticeInfo:"ToSide",shortCut:["Shift",t]},U={name:"Save",icon:f,shortCut:["Ctrl","S"]},x={name:"Speed",icon:C,shortCut:["↑","↓"],shortCutUseHtml:!0},L={name:"PlayPause",icon:p,shortCut:["Space"]},V={name:"FastForward",icon:v,shortCut:["→"],shortCutUseHtml:!0},Z={name:"Rewind",icon:d,shortCut:["←"],shortCutUseHtml:!0};export{S as backward,D as changeSpecialLine,R as dargWithLeftClick,w as dargWithRightClick,b as forward,V as forwardForward,k as fullScreen,F as hidden,L as playPause,y as restore,I as revoke,Z as rewind,K as rotate,U as saveResult,H as scale,$ as setValid,x as speed,T as tabChangeSelected,P as tabReverseChangeSelected};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{backward as e,forward as t,dargWithRightClick as a,scale as r,saveResult as o,restore as d,revoke as c,rotate as i,setValid as l,hidden as s}from"../common/index.js";import{drawRect as n,drawInvalidRect as h,selectRect as m,deleteRect as R,changeValid as u,changeValidByClick as b}from"../rectToolShortCutTable/index.js";const f=[e,t,n,h,a,m,R,u,b,r,o,d,c,i,l,s];export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e,{useContext as _}from"react";import j from"../../../../../assets/annotation/toolHotKeyIcon/icon_kj1.svg.js";import O from"../../../../../assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js";import{EToolName as a}from"../../../../../data/enums/ToolType.js";import w from"./rectToolShortCutTable/index.js";import I from"./point/index.js";import k from"./polygon/index.js";import N from"./line/index.js";import H from"./tag/index.js";import R from"./text/index.js";import L from"./videoTag/index.js";import K,{pointCloudShortCutTable_POLYGON as V}from"./pointCloud/index.js";import G from"./scribble/index.js";import $ from"./cuboid/index.js";import{footerCls as W}from"../../index.js";import{useTranslation as Y}from"react-i18next";import{cTool as A}from"@labelbee/lb-annotation";import{PointCloudContext as B}from"../../../../../components/pointCloudView/PointCloudContext.js";import F from"../../FooterPopover.js";var z=Object.defineProperty,h=Object.getOwnPropertySymbols,D=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable,C=(o,r,t)=>r in o?z(o,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[r]=t,U=(o,r)=>{for(var t in r||(r={}))D.call(r,t)&&C(o,t,r[t]);if(h)for(var t of h(r))M.call(r,t)&&C(o,t,r[t]);return o};const{EVideoToolName:q,EPointCloudName:y}=A,d={[a.Rect]:w,[a.Tag]:H,[a.Point]:I,[a.Polygon]:k,[a.Line]:N,[a.Text]:R,[q.VideoTagTool]:L,[y.PointCloud]:K,[y.PointCloud+"_POLYGON"]:V,[a.ScribbleTool]:G,[a.Cuboid]:$},J=({icon:o})=>typeof o=="string"?e.createElement("img",{width:16,height:16,src:o}):o||null,T=({title:o,style:r,shortCutList:t})=>{const{t:i}=Y(),m={width:320,display:"flex",justifyContent:"space-between",margin:16},c={display:"block",padding:"0 3px",minWidth:"20px",marginRight:"3px",border:"1px solid rgba(204,204,204,1)",verticalAlign:"middle",fontSize:"12px",textAlign:"center"},b=(l,p)=>e.createElement("div",{style:m,key:p},e.createElement("span",{style:{display:"flex",alignItems:"center"}},e.createElement(J,{icon:l.icon}),e.createElement("span",{style:{marginLeft:l.icon?16:0}},i(l.name))),e.createElement("span",{style:{display:"flex",alignItems:"center"}},l.noticeInfo&&e.createElement("span",{style:{marginRight:"5px",color:"#CCCCCC"}},i(l.noticeInfo)),E(l.shortCut,l.shortCutUseHtml,l.linkSymbol))),E=(l,p=!1,P="+")=>{if(!l)return null;const S=l.map((n,s)=>{var f,g;const u={display:"flex",alignItems:"center"};return p?e.createElement("span",{key:s,style:u},e.createElement("span",{style:c,dangerouslySetInnerHTML:{__html:n}})):s<l.length-1?typeof n=="number"?e.createElement("span",{key:s,style:u},e.createElement("span",{style:c},n),e.createElement("span",{style:{marginRight:"3px"}},"~")):((f=n==null?void 0:n.startsWith)==null?void 0:f.call(n,"data"))?e.createElement("span",{key:s,style:u},e.createElement("span",{className:"shortCutButton",style:{marginRight:"3px"}},e.createElement("img",{width:16,height:23,src:n})),e.createElement("span",{style:{marginRight:"3px"}},"+")):e.createElement("span",{key:s,style:u},e.createElement("span",{style:c},n),e.createElement("span",{style:{marginRight:"3px"}},P)):typeof n=="number"?e.createElement("span",{key:s,style:u},e.createElement("span",{style:c},n)):((g=n==null?void 0:n.startsWith)==null?void 0:g.call(n,"data"))?e.createElement("span",{className:"shortCutButton",key:s,style:{marginRight:"3px"}},e.createElement("img",{width:16,height:23,src:n})):e.createElement("span",{style:c,key:s},n)});return e.createElement("div",{style:{display:"flex",justifyContent:"space-around",alignItems:"center"}},S)},x=e.createElement("div",{className:`${W}__hotkey-content`},t==null?void 0:t.map((l,p)=>b(l,p))),v=r||{};return e.createElement(F,{hoverIcon:O,icon:j,title:i("Hotkeys"),content:x,containerStyle:v})},Q=({style:o,title:r,toolName:t})=>{const{pointCloudPattern:i}=_(B);if(!t||!d[t])return null;let m=t;m===`${y.PointCloud}`&&i===a.Polygon?m+="_POLYGON":i===a.Line?m=a.Line:i===a.Point&&(m=a.Point);const c={style:o,title:r,shortCutList:d[m]};return e.createElement(T,U({},c))};export{T as ToolHotKeyCom,Q as default,d as shortCutTable};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import _ from"../../../../../../assets/annotation/toolHotKeyIcon/icon_line_kj.svg.js";import o from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js";import f from"../../../../../../assets/annotation/toolHotKeyIcon/icon_lineNull_kj.svg.js";import j from"../../../../../../assets/annotation/toolHotKeyIcon/icon_straightLine_kj.svg.js";import h from"../../../../../../assets/annotation/toolHotKeyIcon/icon_lineActive_kj.svg.js";import t from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js";import p from"../../../../../../assets/annotation/toolHotKeyIcon/icon_lineChange_kj.svg.js";import C from"../../../../../../assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js";import k from"../../../../../../assets/annotation/toolHotKeyIcon/icon_lineCont_kj.svg.js";import u from"../../../../../../assets/annotation/toolHotKeyIcon/icon_lineInsert_kj.svg.js";import I from"../../../../../../assets/annotation/toolHotKeyIcon/icon_lineDel_kj.svg.js";import d from"../../../../../../assets/annotation/toolHotKeyIcon/icon_unGrip_kj.svg.js";import{changeSpecialLine as v,revoke as L,restore as H,rotate as y,scale as K,backward as $,forward as b,setValid as S,dargWithRightClick as A,dargWithLeftClick as P,hidden as D,tabChangeSelected as T,tabReverseChangeSelected as O}from"../common/index.js";const n={name:"AnnotateLine",icon:_,shortCut:[o]},e={name:"AnnotateInvalidLine",icon:f,shortCut:["Ctrl",o]},i={name:"HorizontalOrVertical",icon:j,shortCut:["Shift",o]},s={name:"SelectLine",icon:h,shortCut:[t]},a={name:"ToggleLineEffectiveness",icon:p,shortCut:["F"]},c={name:"DeleteLine",icon:C,noticeInfo:"SelectAndDoubleClick",shortCut:[t]},r={name:"ContinueToLabel",icon:k,noticeInfo:"Select",shortCut:["Space"]},l={name:"InsertPoint",icon:u,noticeInfo:"ClickOnLine",shortCut:[o]},m={name:"DeletePoint",icon:I,noticeInfo:"DblClickOnPoint",shortCut:[t]},g={name:"StopAdsorption",icon:d,noticeInfo:"Press",shortCut:["Alt"]},w=[n,e,i,s,a,c,r,v,l,m,g,L,H,y,K,$,b,S,A,P,D,T,O];export{a as changeLineAttribute,w as default,c as deleteLine,m as deletePoint,i as horizontalLine,l as insertPoint,e as invalidLine,r as keepLine,n as line,s as selectLine,g as suspendAbsorption};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import s from"../../../../../../assets/annotation/toolHotKeyIcon/icon_point_kj.svg.js";import a from"../../../../../../assets/annotation/toolHotKeyIcon/icon_pointNull_kj.svg.js";import r from"../../../../../../assets/annotation/toolHotKeyIcon/icon_pointActive_kj.svg.js";import c from"../../../../../../assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js";import o from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js";import m from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js";import{revoke as l,restore as g,rotate as _,scale as d,backward as j,forward as p,dargWithRightClick as f,tabChangeSelected as h,tabReverseChangeSelected as v}from"../common/index.js";const t={name:"AnnotatePoint",icon:s,shortCut:[o]},n={name:"AnnotateInvalidPoint",icon:a,shortCut:["Ctrl",o]},e={name:"SelectPoint",icon:r,shortCut:[m],noticeInfo:"RightClick"},i={name:"DeletePoint",icon:c,shortCut:["Del"]},k=[t,n,e,i,l,g,_,d,j,p,f,h,v];export{k as default,i as deletePoint,n as drawInvalidPoint,t as drawPoint,e as selectPoint};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{backward as n,forward as e,scale as a,fullScreen as u}from"../common/index.js";import i from"../../../../../../assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js";import C from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js";import t from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js";import p from"../../../../../../assets/annotation/pointCloudTool/changePointCloudValid.svg.js";import s from"../../../../../../assets/annotation/pointCloudTool/copy.svg.js";import d from"../../../../../../assets/annotation/pointCloudTool/nextBox.svg.js";import h from"../../../../../../assets/annotation/pointCloudTool/patse.svg.js";import f from"../../../../../../assets/annotation/pointCloudTool/prevBox.svg.js";import P from"../../../../../../assets/annotation/pointCloudTool/rotate180_black.svg.js";import v from"../../../../../../assets/annotation/pointCloudTool/selectAll.svg.js";import y from"../../../../../../assets/annotation/pointCloudTool/selectMultiple.svg.js";import x from"../../../../../../assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js";import j from"../../../../../../assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js";import o from"react";import{ReloadOutlined as R,RotateLeftOutlined as T,RotateRightOutlined as S}from"@ant-design/icons";import{polygon as B,invalidPolygon as _,selectedPolygon as b,changePolygonAttribute as I,deletePolygon as $,insertPolygonPoint as k,deletePolygonPoint as D}from"../polygon/index.js";const l={name:"PointThickness",icon:o.createElement("span",{style:{display:" inline-block",width:14,height:14,borderRadius:"50%",border:"1px solid"}}),shortCut:["+","-"],linkSymbol:""},r={name:"RotateAroundCenterPoint",icon:o.createElement(R,null),shortCut:[C],noticeInfo:"DragOperation"},c={name:"PointCloudViewTranslate",icon:i,shortCut:[t],noticeInfo:"Drag"},m={name:"TopViewTranslate",icon:i,shortCut:[t],noticeInfo:"Drag"},g={name:"ChangePointCloudValid",icon:p,shortCut:["V"]},O={name:"CopyBox",icon:s,shortCut:["Ctrl","C"]},V={name:"PasteBox",icon:h,shortCut:["Ctrl","V"]},A={name:"RotateLeft",icon:o.createElement(T,null),shortCut:["Q"]},w={name:"RotateRight",icon:o.createElement(S,null),shortCut:["E"]},E={name:"PreviousBox",icon:f,shortCut:["Shift","Tab"]},H={name:"NextBox",icon:d,shortCut:["Tab"]},K={name:"Rotate180",icon:P,shortCut:["G"],noticeInfo:"SelectedStatus"},G={name:"CopyPrevPage",icon:s,shortCut:["Alt","C"]},L={name:"ChangeBoxValid",icon:x,shortCut:["F"],noticeInfo:"SelectedStatus"},M={name:"MultiSelect",icon:y,shortCut:["Ctrl",t]},N={name:"SelectAllBox",icon:v,shortCut:["Ctrl","A"]},z={name:"Delete",icon:j,shortCut:["Del"],noticeInfo:"SelectedStatus"},F=[{name:"GeneralOperation"},n,e,l,a,r,c,m,g,{name:"RectPattern"},O,V,A,w,E,H,K,G,L,z,M,N,u],Q=[{name:"GeneralOperation"},n,e,l,a,r,c,m,g,{name:"PolygonPattern"},B,_,b,I,$,k,D];export{F as default,Q as pointCloudShortCutTable_POLYGON};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import f from"../../../../../../assets/annotation/toolHotKeyIcon/icon_line_kj.svg.js";import C from"../../../../../../assets/annotation/toolHotKeyIcon/icon_polygonNull_kj.svg.js";import _ from"../../../../../../assets/annotation/toolHotKeyIcon/icon_polygonActive_kj.svg.js";import j from"../../../../../../assets/annotation/toolHotKeyIcon/icon_polygonChange_kj.svg.js";import t from"../../../../../../assets/annotation/toolHotKeyIcon/icon_polygonDel_kj.svg.js";import o from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js";import n from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js";import u from"../../../../../../assets/annotation/toolHotKeyIcon/icon_lineCont_kj.svg.js";import h from"../../../../../../assets/annotation/toolHotKeyIcon/icon_polygonInsert_kj.svg.js";import I from"../../../../../../assets/annotation/toolHotKeyIcon/icon_unGrip_kj.svg.js";import v from"../../../../../../assets/annotation/toolHotKeyIcon/icon_segment.svg.js";import k from"../../../../../../assets/annotation/toolHotKeyIcon/icon_polygonMerge_kj.svg.js";import{revoke as d,restore as P,rotate as A,scale as b,backward as H,forward as K,setValid as $,dargWithRightClick as S,dargWithLeftClick as D,tabChangeSelected as T,tabReverseChangeSelected as L}from"../common/index.js";const e={name:"AnnotatePolygon",icon:f,shortCut:[o]},s={name:"AnnotateInvalidPolygon",icon:C,shortCut:["Ctrl",o]},i={name:"SelectPolygon",icon:_,shortCut:[n],noticeInfo:"RightClick"},a={name:"TogglePolygonEffectiveness",icon:j,shortCut:["F"]},c={name:"DeletePolygon",icon:t,shortCut:["Del"]},l={name:"ContinueToLabel",icon:u,shortCut:["Space"]},r={name:"InsertPoint",icon:h,noticeInfo:"SelectAndDoubleClick",shortCut:[o]},g={name:"DeletePoint",icon:t,noticeInfo:"SelectAndDoubleClick",shortCut:[n]},m={name:"StopAdsorption",icon:I,noticeInfo:"Press",shortCut:["Alt"]},p={name:"CropOverlapArea",icon:v,noticeInfo:"",shortCut:["ALT","X"]},y={name:"CombineOverlapArea",icon:k,noticeInfo:"",shortCut:["Alt","Z"]},R=[e,s,i,a,c,l,r,g,m,d,P,A,b,H,K,$,S,D,T,L,y,p];export{a as changePolygonAttribute,y as combinePolygon,R as default,c as deletePolygon,g as deletePolygonPoint,r as insertPolygonPoint,s as invalidPolygon,l as keepLine,e as polygon,i as selectedPolygon,p as splitPolygon,m as suspendAbsorption};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import m from"../../../../../../assets/annotation/toolHotKeyIcon/icon_frame_kj.svg.js";import l from"../../../../../../assets/annotation/toolHotKeyIcon/icon_frameNull_kj.svg.js";import o from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js";import g from"../../../../../../assets/annotation/toolHotKeyIcon/icon_frameActive_kj.svg.js";import t from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js";import e from"../../../../../../assets/annotation/toolHotKeyIcon/icon_frameChange_kj.svg.js";import f from"../../../../../../assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js";import{revoke as d,restore as h,rotate as _,scale as j,backward as C,forward as v,dargWithRightClick as k,tabChangeSelected as R,tabReverseChangeSelected as u}from"../common/index.js";const n={name:"AnnotateRect",icon:m,shortCut:[o,o]},s={name:"AnnotateInvalidRect",icon:l,shortCut:[o,"Ctrl",o]},c={name:"SelectRect",icon:g,shortCut:[t],noticeInfo:"RightClick"},a={name:"ToggleRectEffectiveness",icon:e,shortCut:["F"]},i={name:"ToggleRectEffectiveness",icon:e,shortCut:["Ctrl",o]},r={name:"DeleteRect",icon:f,shortCut:[t],noticeInfo:"SelectAndDoubleClick"},I=[n,s,c,a,i,r,d,h,_,j,C,v,k,R,u];export{a as changeValid,i as changeValidByClick,I as default,r as deleteRect,s as drawInvalidRect,n as drawRect,c as selectRect};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{scale as e,saveResult as r,restore as t,revoke as a,rotate as o,backward as s,forward as i,dargWithRightClick as l,setValid as c}from"../common/index.js";const d=[e,r,t,a,o,s,i,l,c];export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"../../../../../../assets/annotation/toolHotKeyIcon/icon_tag_kj.svg.js";import{rotate as a,scale as i,backward as n,forward as g,dargWithRightClick as r,dargWithLeftClick as e}from"../common/index.js";const t={name:"Tagging",icon:o,shortCut:[1,9]},s=[t,a,i,n,g,r,e];export{s as default,t as tagInSingleImg};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{saveResult as t,scale as e,rotate as a,fullScreen as o,setValid as r,backward as l,forward as i,dargWithRightClick as c,dargWithLeftClick as d}from"../common/index.js";const s=[t,e,a,o,r,l,i,c,d];export{s as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"lodash";import{forward as a,backward as d,saveResult as n,playPause as i,speed as l,rewind as t,forwardForward as s,fullScreen as m}from"../common/index.js";import{tagInSingleImg as c}from"../tag/index.js";const o=e.cloneDeep(a),r=e.cloneDeep(d);o.name="NextFile",r.name="PreviousFile";const p=[n,c,i,l,t,s,m,r,o];export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import n from"react";import l from"./ToolHotKey/index.js";import i from"../../../../utils/StepUtils.js";import{useSelector as s}from"../../../../store/ctx.js";const p=()=>{const t=s(o=>{var e,r;return i.getCurrentStepInfo((e=o==null?void 0:o.annotation)==null?void 0:e.step,(r=o.annotation)==null?void 0:r.stepList)});return n.createElement(l,{toolName:t==null?void 0:t.tool})};export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import n,{useState as i,useEffect as s}from"react";import{connect as c}from"react-redux";import{Divider as l}from"antd/es";import{useTranslation as d}from"react-i18next";import{LabelBeeContext as u}from"../../../../store/ctx.js";const m=e=>{const{toolInstance:t}=e,[x,o]=i(0),{t:r}=d();return s(()=>{t&&t.singleOn("hiddenChange",()=>{o(a=>a+1)})},[t]),t&&t.isHidden?n.createElement("span",null,r("HideDrawnAnnotation"),n.createElement(l,{type:"vertical",style:{background:"rgba(153, 153, 153, 1)",height:"16px"}})):null},p=e=>{var t;return{toolInstance:(t=e.annotation)==null?void 0:t.toolInstance}};var f=c(p,null,null,{context:u})(m);export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import l,{useState as i,useContext as m,useEffect as p}from"react";import{connect as d}from"react-redux";import{Divider as f}from"antd/es";import{useTranslation as g}from"react-i18next";import{LabelBeeContext as x}from"../../../../store/ctx.js";import{PointCloudContext as v}from"../../../../components/pointCloudView/PointCloudContext.js";const C=n=>{var e,o;const{toolInstance:t}=n,[h,a]=i(0),{pointCloudBoxList:u}=m(v),{t:s}=g();if(p(()=>{t&&t.singleOn("updatePageNumber",()=>{a(c=>c+1)})},[t]),!t)return null;const r=(o=(e=t==null?void 0:t.currentPageResult)==null?void 0:e.length)!=null?o:u.length;return r>=0?l.createElement("span",null,`${s("ItemsOfThisPage")}: ${r}`,l.createElement(f,{type:"vertical",style:{background:"rgba(153, 153, 153, 1)",height:"16px"}})):null},P=n=>{var e;return{toolInstance:(e=n.annotation)==null?void 0:e.toolInstance}};var b=d(P,null,null,{context:x})(C);export{b as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getClassName as d}from"../../../utils/dom.js";import{StepForwardFilled as _,RightOutlined as f,StepBackwardFilled as P,LeftOutlined as E}from"@ant-design/icons";import{Input as v}from"antd";import r,{useState as w,useRef as h,useEffect as O}from"react";var y=Object.defineProperty,m=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,p=(e,n,t)=>n in e?y(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,l=(e,n)=>{for(var t in n||(n={}))N.call(n,t)&&p(e,t,n[t]);if(m)for(var t of m(n))S.call(n,t)&&p(e,t,n[t]);return e};const u=e=>{const{jumpSkip:n,imgIndex:t}=e,[s,i]=w(t),c=h(null);O(()=>{i(t+1)},[t]);const a=o=>{/^\d*$/.test(o.target.value)&&i(o.target.value)},g=o=>{o.keyCode===13&&n(o.target.value)};return r.createElement(v,{className:d("page-input"),ref:c,onChange:a,value:s,onKeyDown:g})},I=e=>e.isVideo?r.createElement(_,l({},e.iconProps)):r.createElement(f,l({},e.iconProps)),j=e=>e.isVideo?r.createElement(P,l({},e.iconProps)):r.createElement(E,l({},e.iconProps)),k=({pageBackward:e,imgIndex:n,pageJump:t,totalPage:s,pageForward:i,isVideo:c,footerCls:a})=>r.createElement("div",{className:`${a}__pagination`},r.createElement(j,{isVideo:c,iconProps:{className:`${a}__highlight`,onClick:e}}),r.createElement(u,{imgIndex:n,jumpSkip:t}),"/",r.createElement("span",{className:`${a}__pageAll`},s),r.createElement(I,{isVideo:c,iconProps:{className:`${a}__highlight`,onClick:i}}));export{u as PageInput,k as Pagination};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import u,{useEffect as l}from"react";import{connect as f}from"react-redux";import s from"../../../../../hooks/useSafeSate.js";import{LabelBeeContext as c}from"../../../../../store/ctx.js";const d=({toolInstance:e,zoom:o})=>{var r;const[,n]=s(0);l(()=>{const t=()=>{n(a=>a+1)};return e&&e.on("renderZoom",t),()=>{e&&e.unbind("renderZoom",t)}},[e]);const m=(r=o!=null?o:e==null?void 0:e.zoom)!=null?r:1;return u.createElement("span",{className:"zoomValue"},(m*100).toFixed(1),"%")},i=e=>({toolInstance:e.annotation.toolInstance});var p=f(i,null,null,{context:c})(d);export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"react";import c from"../../../../assets/annotation/common/icon_adapt.svg.js";import i from"../../../../assets/annotation/common/icon_adapt_black.svg.js";import{MinusOutlined as d,PlusOutlined as u}from"@ant-design/icons";import{connect as g}from"react-redux";import p from"./ZoomLevel/index.js";import{footerCls as a}from"../index.js";import{LabelBeeContext as f}from"../../../../store/ctx.js";const m=({mode:e,initialPosition:t,zoomOut:n,zoomIn:l,zoom:r})=>{const s=e==="light"?c:i;return o.createElement("div",null,o.createElement("span",{className:`${a}__zoomController`},o.createElement(d,{className:`${a}__highlight`,onClick:()=>{n==null||n()}}),o.createElement("span",{className:`${a}__zoomText`,onClick:()=>{t==null||t()}},o.createElement("img",{src:s,className:"adaptIcon"}),o.createElement(p,{zoom:r})),o.createElement(u,{className:`${a}__highlight`,onClick:()=>{l==null||l()}})))},C=({toolInstance:e})=>{const t=()=>{e.initImgPos()},n=()=>{e.zoomChanged(!1)},l=()=>{e.zoomChanged(!0)};return o.createElement(m,{initialPosition:t,zoomIn:l,zoomOut:n})};var _=g(e=>({toolInstance:e.annotation.toolInstance}),null,null,{context:f})(C);export{m as ZoomController,_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{prefix as N}from"../../../constant/index.js";import{PageBackward as g,PageForward as x,PageJump as b}from"../../../store/annotation/actionCreators.js";import{getTotalPage as k}from"../../../store/annotation/reducer.js";import{Divider as B}from"antd/es";import e from"react";import{useTranslation as A}from"react-i18next";import{connect as S}from"react-redux";import{LabelBeeContext as w,useDispatch as D}from"../../../store/ctx.js";import T from"./FooterTips/index.js";import H from"./HiddenTips/index.js";import R from"./PageNumber/index.js";import $ from"./ZoomController/index.js";import{Pagination as J}from"./Pagination.js";import{AnnotatedAttributesIcon as P}from"./AnnotatedAttributes/index.js";import{cTool as K}from"@labelbee/lb-annotation";import{shortCutTable as Z,ToolHotKeyCom as z}from"./FooterTips/ToolHotKey/index.js";const{EPointCloudName:_}=K,l=`${N}-footer`,E=()=>e.createElement(B,{type:"vertical",style:{background:"rgba(153, 153, 153, 1)",height:"16px"}}),I=({footerTips:t,hiddenTips:a,pageNumber:s,pagination:m,zoomController:i,curItems:c,footerDivider:u,annotateAttrList:o})=>e.createElement(e.Fragment,null,t,o,e.createElement("div",{style:{flex:1}}),a,s,m,c,u,i),q=t=>{var a;const{stepList:s,step:m,basicResultList:i,basicIndex:c,mode:u="light",footer:o=I,skipBeforePageTurning:n}=t,r=D(),{t:j}=A(),d=(a=s[m-1])!=null?a:{},y=!!d.dataSourceStep,h=()=>{if(n){n(()=>r(g()));return}r(g())},v=()=>{if(n){n(()=>r(x()));return}r(x())},C=L=>{const f=~~L-1;if(n){n(()=>r(b(f)));return}r(b(f))},p=e.createElement(J,{imgIndex:t.imgIndex,totalPage:t.totalPage,pageJump:C,pageBackward:h,pageForward:v,footerCls:l}),F=y&&i.length>0?e.createElement("span",null,j("curItems",{current:c+1,total:i.length})):null;return typeof o=="function"?o===I&&d.tool===_.PointCloud?e.createElement("div",{className:`${l}`,style:t.style},e.createElement(T,null),e.createElement(P,null),e.createElement("div",{style:{flex:1}}),p):e.createElement("div",{className:`${l}`,style:t.style},o({footerTips:e.createElement(T,null),hiddenTips:e.createElement(H,null),pageNumber:e.createElement(R,null),annotateAttrList:e.createElement(P,null),pagination:p,zoomController:e.createElement($,{mode:u}),curItems:F,footerDivider:e.createElement(E,null),shortCutTable:Z,ToolHotKeyCom:z})):o},G=t=>({totalPage:k(t.annotation),imgIndex:t.annotation.imgIndex,stepList:t.annotation.stepList,step:t.annotation.step,basicIndex:t.annotation.basicIndex,basicResultList:t.annotation.basicResultList,skipBeforePageTurning:t.annotation.skipBeforePageTurning});var M=S(G,null,null,{context:w})(q);export{E as FooterDivider,M as default,l as footerCls};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import i from"react";import{Button as a}from"antd/es";import{connect as m}from"react-redux";import{ANNOTATION_ACTIONS as s}from"../../../../store/Actions.js";import{ESubmitType as c}from"../../../../constant/index.js";import{useTranslation as p}from"react-i18next";import{LabelBeeContext as l}from"../../../../store/ctx.js";const u=({imgList:t,dispatch:n,onSubmit:T,exportData:o})=>{const{t:r}=p();if(!o)return null;const e=()=>{n({type:s.SUBMIT_FILE_DATA,payload:{submitType:c.Export}}),o&&o(t)};return i.createElement(a,{style:{marginLeft:20},onClick:e},r("Export"))},f=t=>({toolInstance:t.annotation.toolInstance,imgList:t.annotation.imgList,onSubmit:t.annotation.onSubmit});var x=m(f,null,null,{context:l})(u);export{x as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Dropdown as p}from"antd/es";import{OrderedListOutlined as c,CaretDownOutlined as m}from"@ant-design/icons";import t from"react";import{connect as l}from"react-redux";import{LabelBeeContext as d,useDispatch as f}from"../../../../store/ctx.js";import x from"../../../../components/customAntd/IconWithText/index.js";import{prefix as u}from"../../../../constant/index.js";import S from"../../../../components/annotationStepPopover/index.js";import{UpdateProcessingStep as h}from"../../../../store/annotation/actionCreators.js";import{useTranslation as j}from"react-i18next";const E=({stepProgress:e,step:o,stepList:n})=>{const r=f(),{t:s}=j(),a=i=>{r(h(i))};return t.createElement("span",{className:`${u}`},t.createElement(p,{overlay:t.createElement(S,{stepList:n,updateStep:a,currentStep:o})},t.createElement(x,{text:s("Steps"),Icon:c,iconChildren:t.createElement(m,{style:{fontSize:8}})})))},P=e=>({stepList:e.annotation.stepList,step:e.annotation.step});var v=l(P,null,null,{context:d})(E);export{v as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r,{useState as j,useCallback as u}from"react";import{useDispatch as x,useSelector as h}from"../../../../store/ctx.js";import k from"../../../../assets/annotation/common/icon_r.svg.js";import _ from"../../../../assets/annotation/common/icon_next.svg.js";import E from"../../../../assets/annotation/common/icon_back.svg.js";import b from"../../../../assets/annotation/common/icon_rA.svg.js";import H from"../../../../assets/annotation/common/icon_nextA.svg.js";import $ from"../../../../assets/annotation/common/icon_backA.svg.js";import C from"../../../../assets/annotation/common/icon_save.svg.js";import A from"../../../../assets/annotation/common/icon_saveA.svg.js";import{prefix as w}from"../../../../constant/index.js";import{EToolName as R}from"../../../../data/enums/ToolType.js";import{ChangeSave as z}from"../../../../store/annotation/actionCreators.js";import{useTranslation as V}from"react-i18next";import{cTool as P}from"@labelbee/lb-annotation";const{EVideoToolName:d,EPointCloudName:B}=P;var t;(function(a){a.Hover="#666fff",a.Normal="#999999"})(t||(t={}));const I=a=>{const[i,l]=j(""),{stepInfo:e}=a,g=x(),{annotation:{toolInstance:n,onSave:p}}=h(o=>({annotation:o.annotation,imgAttribute:o.imgAttribute})),{t:S}=V(),m=[R.Tag,d.VideoTagTool].includes(e==null?void 0:e.tool),v=[d.VideoTagTool].includes(e==null?void 0:e.tool),f=[B.PointCloud].includes(e==null?void 0:e.tool),s=a.isBegin||m,N=()=>{e.dataSourceStep!==0&&e.dataSourceStep!==void 0||n==null||n.updateRotate()},T=u(()=>{n==null||n.undo()},[n]),y=u(()=>{n==null||n.redo()},[n]);let c=[{toolName:"save",title:"Save",show:!!p,commonSvg:C,selectedSvg:A,click:()=>{g(z)},style:{fontSize:"12px",color:!s&&i==="save"?t.Hover:t.Normal}},{toolName:"revocation",title:"Undo",show:!0,commonSvg:E,selectedSvg:$,click:()=>{m||T()},style:{opacity:s===!0?.4:1,fontSize:"12px",color:!s&&i==="revocation"?t.Hover:t.Normal}},{toolName:"restore",title:"Redo",show:!0,commonSvg:_,selectedSvg:H,click:()=>{m||y()},style:{opacity:s===!0?.4:1,fontSize:"12px",color:!s&&i==="restore"?t.Hover:t.Normal}},{toolName:"rotate",title:"Rotate",show:!0,selectedSvg:b,commonSvg:k,click:()=>{v||N()},style:{opacity:v===!0?.4:1,fontSize:"12px",color:!s&&i==="rotate"?t.Hover:t.Normal}}];return f&&(c=c.slice(0,3)),r.createElement("div",{className:`${w}-header__hotKey`},c.map(o=>o.show&&r.createElement("div",{key:o.toolName,className:"item",onMouseEnter:()=>l(o.toolName),onMouseLeave:()=>l("")},r.createElement("a",{className:"item",onClick:o.click},r.createElement("img",{className:"singleTool",src:i===o.toolName?o.selectedSvg:o.commonSvg,style:o.style}),r.createElement("div",{style:o.style},S(o.title))))))};export{I as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{prefix as n,ESubmitType as F}from"../../../constant/index.js";import I from"../../../hooks/useSize.js";import{ToSubmitFileData as P,ToNextStep as S,loadImgList as z}from"../../../store/annotation/actionCreators.js";import{LeftOutlined as H}from"@ant-design/icons";import{i18n as $}from"@labelbee/lb-utils";import{Tooltip as R,Button as A}from"antd/es";import L from"classnames";import{last as B}from"lodash";import e,{useReducer as Q,useRef as U}from"react";import{useTranslation as T}from"react-i18next";import{connect as W}from"react-redux";import{LabelBeeContext as q,useDispatch as G}from"../../../store/ctx.js";import{store as J}from"../../../index.js";import K from"./ExportData/index.js";import M from"./headerOption/index.js";import V from"./StepSwitch/index.js";import X from"../../../components/predictTracking/predictTrackingIcon/index.js";const j=({disabled:t,imgList:r})=>{const{t:o}=T(),i=()=>{const{dispatch:a,getState:s}=J;r[0]?a(S(0)):z(a,s,0).then(l=>{l&&a(S(0))})};return e.createElement(A,{type:"primary",style:{marginLeft:10},onClick:i,disabled:t},o("NextStep"))},Y=({step:t,stepProgress:r,stepList:o,imgList:i})=>{var a;const{t:s}=T(),l=(a=B(o))==null?void 0:a.step;if(o.length<2||t===l)return null;const c=r<1;return c?e.createElement(R,{title:s("StepNotFinishedNotify")},e.createElement("span",null,e.createElement(j,{disabled:c,imgList:i}))):e.createElement(j,{disabled:c,imgList:i})},Z=({goBack:t,exportData:r,header:o,headerName:i,imgList:a,stepProgress:s,stepInfo:l,stepList:c,step:b,annotationEngine:d})=>{var u;const k=G(),[,y]=Q(m=>m+1,0),p=U(null),f=I(p),C=e.createElement(K,{exportData:r}),w=()=>{k(P(F.Quit)),t&&t(a)},E=m=>{$.changeLanguage(m),d==null||d.setLang(m),y()},N=$.language,D=(u=f==null?void 0:f.width)!=null?u:window.innerWidth,g=e.createElement(H,{className:`${n}-header__icon`,onClick:w}),h=i?e.createElement("span",{className:`${n}-header__name`},i):"",x=c.length>1&&e.createElement(e.Fragment,null,e.createElement(V,{stepProgress:s}),e.createElement(Y,{step:b,stepProgress:s,stepList:c,imgList:a})),v=e.createElement(M,{stepInfo:l}),O=e.createElement("div",{className:`${n}-header__lang`},e.createElement("span",{className:`${n}-langCN ${N==="cn"?"active":""}`,onClick:()=>E("cn")},"\u4E2D\u6587")," / ",e.createElement("span",{className:`${n}-langEN ${N==="en"?"active":""}`,onClick:()=>E("en")},"En")),_=e.createElement(e.Fragment,null,e.createElement(X,null),O);return o?typeof o=="function"?e.createElement("div",{className:L(`${n}-header`),ref:p},e.createElement("div",{className:`${n}-header__title`},o({backNode:g,headerNameNode:h,stepListNode:x,headerOptionNode:v,langNode:_}))):o:e.createElement("div",{className:L(`${n}-header`),ref:p},e.createElement("div",{className:`${n}-header__title`},g,h,x,C,e.createElement("div",{id:"operationNode",className:`${n}-header__operationNode`,style:{left:D/2-174/2}},v),e.createElement("div",{className:`${n}-header__titlePlacement`}),_))},ee=t=>{var r;return{imgList:t.annotation.imgList,annotationEngine:t.annotation.annotationEngine,stepProgress:t.annotation.stepProgress,toolName:(r=t.annotation.stepList[t.annotation.step-1])==null?void 0:r.tool,stepList:t.annotation.stepList,stepInfo:t.annotation.stepList[t.annotation.step-1],step:t.annotation.step}};var te=W(ee,null,null,{context:q})(Z);export{te as default};
|